/** * Pod template schema validator (ADR-164 §3.3 + ADR-164.1 §3.2). * * Defines the `PodTemplate` type that every business-pod JSON file under * `plugins/ruflo-business-pods/templates/` MUST conform to, and a hand-rolled * validator that throws structured errors on invalid templates. No external * deps (no AJV, no zod) — the schema is small enough to validate by hand and * doing so keeps the cli's optional-dep surface unchanged. * * @module @claude-flow/cli/business-pods/pod-schema */ export type PiiPolicy = 'soc2' | 'gdpr' | 'hipaa' | 'permissive'; export interface PodAgent { /** Role label inside the pod, e.g. "lead-gen-agent". */ role: string; /** Must resolve to a known ruflo agent type (researcher / coder / ...). */ agentType: string; /** Human-readable description of what the agent does in this pod. */ description: string; /** Routing hint — true = prefer local stdio execution. */ preferLocal: boolean; } export interface PodBench { /** Bench identifier, e.g. "sales-pipeline-bench". */ name: string; /** What the bench measures. */ description: string; /** Acceptance criteria — non-empty list of human-readable bullets. */ successCriteria: string[]; /** Cadence between bench evaluations (hours, ≥1). */ scheduleHours: number; } export interface PodAuditReadView { /** Event types surfaced to the business-owner read view. */ includedEventTypes: string[]; /** Retention window for the read view (days, ≥1). */ retentionDays: number; } export interface PodTemplate { /** Canonical pod name (matches BBS roomId). */ name: string; /** Display name for the cockpit. */ displayName: string; /** BBS room this pod serves, e.g. "sales". */ roomId: string; /** Ordered list of pod agent compositions. */ agents: PodAgent[]; /** Allow-list of MCP tools the pod's agents may invoke. */ allowedMcpTools: string[]; /** Bench definition for periodic Darwin /loop scoring. */ bench: PodBench; /** PII compliance mode applied to every envelope in/out of this room. */ piiPolicy: PiiPolicy; /** Monthly USD hard cap (0 = unlimited; not recommended). */ budgetUsdMonthly: number; /** Estimated USD per pod tick — drives reservation amount. */ budgetUsdPerRun: number; /** If true, @metaharness/router routes to local first. */ preferLocalExecution: boolean; /** POSIX cron expression for the perpetual /loop scheduler. */ cronSchedule: string; /** Compliance audit-log projection. */ auditReadView: PodAuditReadView; /** * Reservation expiry for the atomic budget tracker — ADR-164.1 §3.2. * Bounded to [5000, 300000] ms (5 s – 5 min). Default 60_000 if omitted. */ reservationExpiryMs?: number; } /** * Structured validation error — carries the JSON pointer that caused it so * callers can render a precise message. */ export declare class PodTemplateValidationError extends Error { path: string; constructor(message: string, path: string); } /** * Validate `json` and return a typed `PodTemplate`. Throws * `PodTemplateValidationError` with a JSON-pointer-style path on failure. * * Used by: * - `business_pod_validate` MCP tool — returns the error verbatim * - `pod-tick.mjs` — pre-flight check before any pod execution * - any external schema-loader that wants typed templates */ export declare function validatePodTemplate(json: unknown): PodTemplate; /** * Known ruflo agent types — kept in sync with src/commands/agent.ts AGENT_TYPES. * The list is duplicated here intentionally so pod-tick.mjs can run without * importing the entire commands module. * * If a new agent type is added to AGENT_TYPES, mirror it here. */ export declare const KNOWN_AGENT_TYPES: readonly ["coder", "researcher", "tester", "reviewer", "architect", "system-architect", "coordinator", "analyst", "optimizer", "security-architect", "security-auditor", "memory-specialist", "swarm-specialist", "performance-engineer", "core-architect", "test-architect", "planner", "task-orchestrator", "perf-analyzer", "backend-dev", "api-docs", "cicd-engineer", "code-analyzer", "database-specialist", "base-template-generator"]; //# sourceMappingURL=pod-schema.d.ts.map