/** * Effect Schema for Fred's framework config (Phase 61, STEP-61-02). * * `FrameworkConfigSchema` is the declarative source of truth for framework * configuration structure. Cross-field rules are applied by `validate.ts`. * * Design notes: * - Config-owned sections (providers, MCP, persistence, observability, * policies, template, memory, pipelinesV2) are modelled precisely against * `types.ts`. * - Cross-module sections (agents, intents, routing) are modelled * as *open* structs — known identifying fields plus an index signature that * preserves everything else — so decoding is lossless and every existing * fixture is accepted. Their required-field rules are semantic and belong * in STEP-61-03, not here (e.g. an agent may omit `systemMessage` when * `defaultSystemMessage` is set). */ import { Schema } from 'effect'; export declare const ProviderModelDefaultsSchema: Schema.Struct<{ model: Schema.optional; temperature: Schema.optional; maxTokens: Schema.optional; }>; export declare const ProviderPackConfigSchema: Schema.Struct<{ id: typeof Schema.String; package: Schema.optional; apiKeyEnvVar: Schema.optional; baseUrl: Schema.optional; headers: Schema.optional>; modelDefaults: Schema.optional; temperature: Schema.optional; maxTokens: Schema.optional; }>>; }>; export declare const PluginObjectDeclarationSchema: Schema.Struct<{ id: typeof Schema.String; source: typeof Schema.String; options: Schema.optional>; }>; export declare const PluginDeclarationSchema: Schema.Union<[typeof Schema.String, Schema.Struct<{ id: typeof Schema.String; source: typeof Schema.String; options: Schema.optional>; }>]>; export declare const MCPRetrySchema: Schema.Struct<{ maxRetries: Schema.optional; backoffMs: Schema.optional; maxBackoffMs: Schema.optional; }>; export declare const MCPGlobalServerConfigSchema: Schema.Struct<{ transport: Schema.Literal<["stdio", "http", "sse"]>; command: Schema.optional; args: Schema.optional>; env: Schema.optional>; allowedCommands: Schema.optional>; envAllowlist: Schema.optional>; url: Schema.optional; headers: Schema.optional>; allowedHosts: Schema.optional>; allowedSchemes: Schema.optional>; timeout: Schema.optional; enabled: Schema.optional; lazy: Schema.optional; retry: Schema.optional; backoffMs: Schema.optional; maxBackoffMs: Schema.optional; }>>; healthCheckIntervalMs: Schema.optional; }>; export declare const CheckpointConfigSchema: Schema.Struct<{ enabled: Schema.optional; ttlMs: Schema.optional; cleanupIntervalMs: Schema.optional; }>; export declare const PersistenceConfigSchema: Schema.Struct<{ adapter: Schema.Literal<["postgres", "sqlite"]>; checkpoint: Schema.optional; ttlMs: Schema.optional; cleanupIntervalMs: Schema.optional; }>>; }>; export declare const ObservabilityConfigSchema: Schema.Struct<{ otlp: Schema.optional; headers: Schema.optional>; }>>; logLevel: Schema.optional>; resource: Schema.optional; serviceVersion: Schema.optional; environment: Schema.optional; }, readonly [Schema.Record$]>>; enableConsoleFallback: Schema.optional; sampling: Schema.optional; slowThresholdMs: Schema.optional; debugMode: Schema.optional; }>>; metrics: Schema.optional>>; }>>; }>; export declare const ToolPolicyConditionSchema: Schema.Struct<{ role: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>; export declare const ToolPolicyRuleSchema: Schema.Struct<{ allow: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>; export declare const ToolPolicyOverrideSchema: Schema.Struct<{ id: typeof Schema.String; override: Schema.Literal<[true]>; target: Schema.Struct<{ intentId: Schema.optional; agentId: Schema.optional; }>; allow: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>; export declare const ToolPoliciesConfigSchema: Schema.Struct<{ default: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>; intents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; agents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; overrides: Schema.optional; target: Schema.Struct<{ intentId: Schema.optional; agentId: Schema.optional; }>; allow: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; }>; export declare const TemplateConfigSchema: Schema.Struct<{ partialDirs: Schema.optional>; envAllowlist: Schema.optional>; strict: Schema.optional; maxOutputSize: Schema.optional; }>; export declare const MemoryConfigSchema: Schema.Struct<{ policy: Schema.optional; maxChars: Schema.optional; strict: Schema.optional; isolated: Schema.optional; }>>; requireConversationId: Schema.optional; sequentialVisibility: Schema.optional; }>; /** Decoded shape of a config step; used to type the recursive `Schema.suspend`. */ export type ConfigStepShape = ConfigAgentStepShape | ConfigFunctionRefStepShape | ConfigPipelineRefStepShape | ConfigConditionalStepShape; interface ConfigStepBaseShape { readonly name: string; readonly retry?: { readonly maxRetries: number; readonly backoffMs: number; readonly maxBackoffMs?: number; }; readonly contextView?: 'accumulated' | 'isolated'; } interface ConfigAgentStepShape extends ConfigStepBaseShape { readonly type: 'agent'; readonly agentId: string; } interface ConfigFunctionRefStepShape extends ConfigStepBaseShape { readonly type: 'function'; readonly functionId: string; } interface ConfigPipelineRefStepShape extends ConfigStepBaseShape { readonly type: 'pipeline'; readonly pipelineId: string; } interface ConfigConditionalStepShape extends ConfigStepBaseShape { readonly type: 'conditional'; readonly condition: { readonly field: string; readonly equals?: unknown; readonly notEquals?: unknown; readonly exists?: boolean; }; readonly whenTrue: ReadonlyArray; readonly whenFalse?: ReadonlyArray; } export declare const ConfigStepSchema: Schema.Schema; export declare const ExtendedPipelineConfigSchema: Schema.Struct<{ steps: Schema.Array$>; description: Schema.optional; utterances: Schema.optional>; failFast: Schema.optional; }>; export declare const ToolConfigSchema: Schema.TypeLiteral<{ id: Schema.optional; name: Schema.optional; description: Schema.optional; schema: Schema.optional>; }, readonly [Schema.Record$]>>; }, readonly [Schema.Record$]>; export declare const IntentConfigSchema: Schema.TypeLiteral<{ id: Schema.optional; utterances: Schema.optional>; }, readonly [Schema.Record$]>; export declare const AgentPromptVariableSchema: Schema.Union<[typeof Schema.String, typeof Schema.Number, typeof Schema.Boolean]>; export declare const AgentTemplatePromptSchema: Schema.Struct<{ template: typeof Schema.String; variables: Schema.optional>>; baml: Schema.optional; }>; export declare const AgentBamlPromptSchema: Schema.Struct<{ baml: Schema.Struct<{ function: typeof Schema.String; }>; template: Schema.optional; variables: Schema.optional; }>; export declare const AgentPromptSchema: Schema.Union<[typeof Schema.String, Schema.Struct<{ template: typeof Schema.String; variables: Schema.optional>>; baml: Schema.optional; }>, Schema.Struct<{ baml: Schema.Struct<{ function: typeof Schema.String; }>; template: Schema.optional; variables: Schema.optional; }>]>; export declare const AgentConfigSchema: Schema.filter; platform: Schema.optional; connectionId: Schema.optional>; connectionNamespace: Schema.optional, "@fred/ProviderConnectionNamespace">>; model: Schema.optional; systemMessage: Schema.optional>>; baml: Schema.optional; }>, Schema.Struct<{ baml: Schema.Struct<{ function: typeof Schema.String; }>; template: Schema.optional; variables: Schema.optional; }>]>>; }, readonly [Schema.Record$]>>; export declare const RoutingConfigSchema: Schema.TypeLiteral<{ defaultAgent: Schema.optional; rules: Schema.Array$]>>; }, readonly [Schema.Record$]>; export declare const WorkflowConfigSchema: Schema.Struct<{ defaultAgent: typeof Schema.String; agents: Schema.Array$; routing: Schema.optional; rules: Schema.Array$]>>; }, readonly [Schema.Record$]>>; }>; export declare const FrameworkConfigSchema: Schema.Struct<{ intents: Schema.optional; utterances: Schema.optional>; }, readonly [Schema.Record$]>>>; agents: Schema.optional; platform: Schema.optional; connectionId: Schema.optional>; connectionNamespace: Schema.optional, "@fred/ProviderConnectionNamespace">>; model: Schema.optional; systemMessage: Schema.optional>>; baml: Schema.optional; }>, Schema.Struct<{ baml: Schema.Struct<{ function: typeof Schema.String; }>; template: Schema.optional; variables: Schema.optional; }>]>>; }, readonly [Schema.Record$]>>>>; agentDirs: Schema.optional>; /** Removed V1 surface: presence is rejected instead of being silently stripped. */ pipelines: Schema.optional; pipelinesV2: Schema.optional>; description: Schema.optional; utterances: Schema.optional>; failFast: Schema.optional; }>>>; tools: Schema.optional; name: Schema.optional; description: Schema.optional; schema: Schema.optional>; }, readonly [Schema.Record$]>>; }, readonly [Schema.Record$]>>>; defaultSystemMessage: Schema.optional; memory: Schema.optional; maxChars: Schema.optional; strict: Schema.optional; isolated: Schema.optional; }>>; requireConversationId: Schema.optional; sequentialVisibility: Schema.optional; }>>; routing: Schema.optional; rules: Schema.Array$]>>; }, readonly [Schema.Record$]>>; workflows: Schema.optional; routing: Schema.optional; rules: Schema.Array$]>>; }, readonly [Schema.Record$]>>; }>>>; providers: Schema.optional; apiKeyEnvVar: Schema.optional; baseUrl: Schema.optional; headers: Schema.optional>; modelDefaults: Schema.optional; temperature: Schema.optional; maxTokens: Schema.optional; }>>; }>>>; plugins: Schema.optional>; }>]>>>; persistence: Schema.optional; checkpoint: Schema.optional; ttlMs: Schema.optional; cleanupIntervalMs: Schema.optional; }>>; }>>; observability: Schema.optional; headers: Schema.optional>; }>>; logLevel: Schema.optional>; resource: Schema.optional; serviceVersion: Schema.optional; environment: Schema.optional; }, readonly [Schema.Record$]>>; enableConsoleFallback: Schema.optional; sampling: Schema.optional; slowThresholdMs: Schema.optional; debugMode: Schema.optional; }>>; metrics: Schema.optional>>; }>>; }>>; policies: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>; intents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; agents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; overrides: Schema.optional; target: Schema.Struct<{ intentId: Schema.optional; agentId: Schema.optional; }>; allow: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; }>>; toolPolicies: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>; intents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; agents: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; overrides: Schema.optional; target: Schema.Struct<{ intentId: Schema.optional; agentId: Schema.optional; }>; allow: Schema.optional>; deny: Schema.optional>; requireApproval: Schema.optional>; requiredCategories: Schema.optional>; conflictResolution: Schema.optional>; conditions: Schema.optional]>>; userId: Schema.optional]>>; metadata: Schema.optional>; }>>; }>>>; }>>; mcpServers: Schema.optional; command: Schema.optional; args: Schema.optional>; env: Schema.optional>; allowedCommands: Schema.optional>; envAllowlist: Schema.optional>; url: Schema.optional; headers: Schema.optional>; allowedHosts: Schema.optional>; allowedSchemes: Schema.optional>; timeout: Schema.optional; enabled: Schema.optional; lazy: Schema.optional; retry: Schema.optional; backoffMs: Schema.optional; maxBackoffMs: Schema.optional; }>>; healthCheckIntervalMs: Schema.optional; }>>>; template: Schema.optional>; envAllowlist: Schema.optional>; strict: Schema.optional; maxOutputSize: Schema.optional; }>>; }>; /** Decoded type of the framework config schema. */ export type FrameworkConfigSchemaType = Schema.Schema.Type; export {}; //# sourceMappingURL=schema.d.ts.map