import { z } from 'zod'; export declare const ContextSliceSchema: z.ZodObject<{ source: z.ZodString; summary: z.ZodString; }, z.core.$strip>; export type ContextSlice = z.infer; export declare const ArtifactRefSchema: z.ZodObject<{ path: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; export type ArtifactRef = z.infer; export declare const HandoffDecisionSchema: z.ZodObject<{ text: z.ZodString; rationale: z.ZodOptional; }, z.core.$strip>; export type HandoffDecision = z.infer; export declare const OrgHandoffSchema: z.ZodObject<{ taskId: z.ZodOptional; contextPackage: z.ZodDefault>>; artifacts: z.ZodDefault; }, z.core.$strip>>>; decisions: z.ZodDefault; }, z.core.$strip>>>; nextAction: z.ZodString; }, z.core.$strip>; export type OrgHandoff = z.infer; export declare const FailureRoutingSchema: z.ZodObject<{ retry: z.ZodOptional; backoffMs: z.ZodOptional>>; }, z.core.$strip>>>; fallbackAssignee: z.ZodOptional>; escalate: z.ZodOptional>; }, z.core.$strip>; export type FailureRouting = z.infer; /** Per-role provider config. Default (absent) = subscription login of local Claude Code. * * @deprecated kind: 'gemini' | 'openai' — these only set GEMINI_API_KEY / * OPENAI_API_KEY on the child env (see provider.ts); no runtime actually * reads them (daemon.ts's autoRuntimeFromProvider has no case for either), * so the role silently falls through to the default ClaudeAgentRunner and * runs on Claude regardless. daemon.ts#startOrg warns loudly at start time * when this happens. Use kind: 'vercel-api-key' with vendor: 'google' or * vendor: 'openai' instead — that path actually routes to the requested * provider via VercelAgentRunner. */ export declare const ProviderSchema: z.ZodObject<{ kind: z.ZodDefault>; vendor: z.ZodOptional>; apiKeyEnv: z.ZodOptional; apiKey: z.ZodOptional; baseUrl: z.ZodOptional; authTokenEnv: z.ZodOptional; authToken: z.ZodOptional; usageProxy: z.ZodOptional; usageProxyEnvVar: z.ZodOptional; }, z.core.$strict>; export declare const FenceAllowlistRuleSchema: z.ZodObject<{ id: z.ZodString; pattern: z.ZodString; types: z.ZodDefault>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>; export declare const FenceConfigSchema: z.ZodObject<{ enabled: z.ZodOptional>; confidenceThreshold: z.ZodOptional>; enablePIIDetection: z.ZodOptional>; scanMessages: z.ZodOptional>; scanOutput: z.ZodOptional>; abortThreshold: z.ZodOptional>; allowlist: z.ZodOptional>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>>>>; }, z.core.$loose>; export type FenceConfig = z.infer; export type FenceAllowlistRule = z.infer; export declare const RolePolicySchema: z.ZodObject<{ allowTools: z.ZodOptional>>; denyTools: z.ZodOptional>>; fileWrite: z.ZodOptional>>; fileRead: z.ZodOptional>>; webAllow: z.ZodOptional>>; maxTokens: z.ZodOptional>; maxUsd: z.ZodOptional>; git: z.ZodOptional>>; fence: z.ZodOptional>; confidenceThreshold: z.ZodOptional>; enablePIIDetection: z.ZodOptional>; scanMessages: z.ZodOptional>; scanOutput: z.ZodOptional>; abortThreshold: z.ZodOptional>; allowlist: z.ZodOptional>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>>>>; }, z.core.$loose>>>; autoApproveTools: z.ZodOptional>>; }, z.core.$loose>; export declare const RoleSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodDefault; type: z.ZodDefault; reports_to: z.ZodDefault>; responsibilities: z.ZodDefault>; instructions_file: z.ZodOptional; adapter_config: z.ZodOptional>; max_tokens: z.ZodOptional>; provider: z.ZodOptional>; }, z.core.$strip>>; provider: z.ZodOptional>; vendor: z.ZodOptional>; apiKeyEnv: z.ZodOptional; apiKey: z.ZodOptional; baseUrl: z.ZodOptional; authTokenEnv: z.ZodOptional; authToken: z.ZodOptional; usageProxy: z.ZodOptional; usageProxyEnvVar: z.ZodOptional; }, z.core.$strict>>; policy: z.ZodOptional>>; denyTools: z.ZodOptional>>; fileWrite: z.ZodOptional>>; fileRead: z.ZodOptional>>; webAllow: z.ZodOptional>>; maxTokens: z.ZodOptional>; maxUsd: z.ZodOptional>; git: z.ZodOptional>>; fence: z.ZodOptional>; confidenceThreshold: z.ZodOptional>; enablePIIDetection: z.ZodOptional>; scanMessages: z.ZodOptional>; scanOutput: z.ZodOptional>; abortThreshold: z.ZodOptional>; allowlist: z.ZodOptional>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>>>>; }, z.core.$loose>>>; autoApproveTools: z.ZodOptional>>; }, z.core.$loose>>; runtime: z.ZodOptional>; max_turns_per_message: z.ZodOptional; budget_tokens: z.ZodOptional; budget_usd: z.ZodOptional; }, z.core.$loose>; /** Default per-message turn budget for a role session. Deliberately huge so * the ceiling never bricks a legitimately long-running task (#140: a role * mid-task on `error_max_turns` used to crash with no recovery) — real * guardrails are budget_tokens, the idle watchdog, and the circuit breaker. * Set run_config.max_turns_per_message (or a role's own * max_turns_per_message) to cap turns when you want a hard limit. */ export declare const DEFAULT_MAX_TURNS_PER_MESSAGE = 100000; export declare const OrgDefSchema: z.ZodObject<{ name: z.ZodString; goal: z.ZodDefault; status: z.ZodDefault; schedule: z.ZodDefault>; run_config: z.ZodPipe>; budget_tokens: z.ZodOptional>; memory_namespace: z.ZodOptional>; max_turns_per_message: z.ZodOptional>; idle_minutes: z.ZodOptional>; workspace: z.ZodOptional, z.ZodLiteral<"isolated">, z.ZodLiteral<"worktree">, z.ZodLiteral<"worktree-per-role">, z.ZodString]>>>; circuit_breaker: z.ZodOptional>; cooldown_ms: z.ZodOptional>; }, z.core.$strip>>>; failure_routing: z.ZodOptional; backoffMs: z.ZodOptional>>; }, z.core.$strip>>>; fallbackAssignee: z.ZodOptional>; escalate: z.ZodOptional>; }, z.core.$strip>>>; stale_base_threshold: z.ZodOptional>; prechecks: z.ZodOptional>>>; }, z.core.$loose>>, z.ZodTransform<{ memory_namespace?: string | undefined; idle_minutes?: number | undefined; circuit_breaker?: { failure_threshold?: number | undefined; cooldown_ms?: number | undefined; } | undefined; failure_routing?: { retry?: { maxAttempts?: number | undefined; backoffMs?: number[] | undefined; } | undefined; fallbackAssignee?: string | undefined; escalate?: boolean | undefined; } | undefined; prechecks?: { name: string; command: string; }[] | undefined; max_concurrent_agents: number; budget_tokens: number; max_turns_per_message: number; workspace: string; stale_base_threshold: number; }, { [x: string]: unknown; max_concurrent_agents?: number | undefined; budget_tokens?: number | undefined; memory_namespace?: string | undefined; max_turns_per_message?: number | undefined; idle_minutes?: number | undefined; workspace?: string | undefined; circuit_breaker?: { failure_threshold?: number | undefined; cooldown_ms?: number | undefined; } | undefined; failure_routing?: { retry?: { maxAttempts?: number | undefined; backoffMs?: number[] | undefined; } | undefined; fallbackAssignee?: string | undefined; escalate?: boolean | undefined; } | undefined; stale_base_threshold?: number | undefined; prechecks?: { name: string; command: string; }[] | undefined; }>>; fence: z.ZodOptional>; confidenceThreshold: z.ZodOptional>; enablePIIDetection: z.ZodOptional>; scanMessages: z.ZodOptional>; scanOutput: z.ZodOptional>; abortThreshold: z.ZodOptional>; allowlist: z.ZodOptional>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>>>>; }, z.core.$loose>>; roles: z.ZodArray; type: z.ZodDefault; reports_to: z.ZodDefault>; responsibilities: z.ZodDefault>; instructions_file: z.ZodOptional; adapter_config: z.ZodOptional>; max_tokens: z.ZodOptional>; provider: z.ZodOptional>; }, z.core.$strip>>; provider: z.ZodOptional>; vendor: z.ZodOptional>; apiKeyEnv: z.ZodOptional; apiKey: z.ZodOptional; baseUrl: z.ZodOptional; authTokenEnv: z.ZodOptional; authToken: z.ZodOptional; usageProxy: z.ZodOptional; usageProxyEnvVar: z.ZodOptional; }, z.core.$strict>>; policy: z.ZodOptional>>; denyTools: z.ZodOptional>>; fileWrite: z.ZodOptional>>; fileRead: z.ZodOptional>>; webAllow: z.ZodOptional>>; maxTokens: z.ZodOptional>; maxUsd: z.ZodOptional>; git: z.ZodOptional>>; fence: z.ZodOptional>; confidenceThreshold: z.ZodOptional>; enablePIIDetection: z.ZodOptional>; scanMessages: z.ZodOptional>; scanOutput: z.ZodOptional>; abortThreshold: z.ZodOptional>; allowlist: z.ZodOptional>>; context: z.ZodOptional; reason: z.ZodOptional; source: z.ZodOptional; }, z.core.$strip>>>>; }, z.core.$loose>>>; autoApproveTools: z.ZodOptional>>; }, z.core.$loose>>; runtime: z.ZodOptional>; max_turns_per_message: z.ZodOptional; budget_tokens: z.ZodOptional; budget_usd: z.ZodOptional; }, z.core.$loose>>; runtime: z.ZodOptional>; }, z.core.$loose>; export type OrgDef = z.infer; export type OrgRole = z.infer; export type RolePolicy = z.infer; export type ProviderConfig = z.infer; /** Superset of the legacy *-threads.jsonl line shape ({type,id,run_id,ts,from,to,msg,subject}). */ export interface BusEvent { id: string; ts: number; org: string; run: string; type: 'message' | 'xorg' | 'tool' | 'asset' | 'chat' | 'status' | 'audit' | 'usage' | 'question' | 'gate' | 'trace'; from?: string; to?: string; subject?: string; msg?: string; tool?: string; decision?: 'allow' | 'deny'; reason?: string; path?: string; data?: Record; /** Parent event ID for message chains (e.g., a message responding to another message) */ parentId?: string; /** OpenTelemetry tracing fields (optional, for distributed tracing and cost tracking) */ conversationId?: string; interactionId?: string; agentSessionId?: string; traceNodeId?: string; traceDurationMs?: number; traceTokensIn?: number; traceTokensOut?: number; } export interface DecisionGate { id: string; name: string; description: string; roleId: string; status: 'pending' | 'approved' | 'rejected'; createdAt: number; resolvedBy?: string; resolvedAt?: number; resolution?: string; } export declare const ORG_DIR = ".monomind/orgs"; /** * Recommended org_send handoff format for inter-role communication: * * Use org_send(target_role, context_summary, next_action, files_changed, related_issues): * * - **target_role**: Role ID to receive the handoff * - **context_summary**: Brief status of what was done (1-2 sentences) * - **next_action**: What the receiver should do next (specific, actionable) * - **files_changed**: Array of file paths modified (if applicable) * - **related_issues**: Array of issue IDs or PR references (if applicable) * * Example: * ```json * { * "summary": "Bug fix implemented in auth module", * "next_action": "Review the fix and run tests", * "files_changed": ["src/auth.ts", "tests/auth.test.ts"], * "related_issues": ["#123", "PR #456"] * } * ``` * * The org_send tool already passes `subject` and `message` — this format * documents best practice for structured handoffs between roles. */ //# sourceMappingURL=types.d.ts.map