import { type JsonSchemaObject, type LaunchResolvedChildExtensionsV1, type ResolvedToolBudget } from "../../shared/types.ts"; import { type ChildWatchdogConfig } from "../../watchdog/child-status.ts"; import { type ResolvedSubagentCapabilityCeiling, type SubagentCapabilityAudit } from "./capability-ceiling.ts"; import { type ResolvedMcpDirectToolSelection } from "./mcp-direct-tool-allowlist.ts"; import { type NestedPathEntry, parseNestedPathEnv } from "./nested-path.ts"; import { type PermissionRules } from "./permissions.ts"; export declare const SUBAGENT_CHILD_ENV = "PI_SUBAGENT_CHILD"; export declare const SUBAGENT_ORCHESTRATOR_TARGET_ENV = "PI_SUBAGENT_ORCHESTRATOR_TARGET"; export declare const SUBAGENT_ORCHESTRATOR_SESSION_ID_ENV = "PI_SUBAGENT_ORCHESTRATOR_SESSION_ID"; export declare const SUBAGENT_SUPERVISOR_CHANNEL_DIR_ENV = "PI_SUBAGENT_SUPERVISOR_CHANNEL_DIR"; export declare const SUBAGENT_RUN_ID_ENV = "PI_SUBAGENT_RUN_ID"; export declare const SUBAGENT_CHILD_AGENT_ENV = "PI_SUBAGENT_CHILD_AGENT"; export declare const SUBAGENT_CHILD_INDEX_ENV = "PI_SUBAGENT_CHILD_INDEX"; export declare const SUBAGENT_FANOUT_CHILD_ENV = "PI_SUBAGENT_FANOUT_CHILD"; export declare const SUBAGENT_PARENT_EVENT_SINK_ENV = "PI_SUBAGENT_PARENT_EVENT_SINK"; export declare const SUBAGENT_PARENT_CONTROL_INBOX_ENV = "PI_SUBAGENT_PARENT_CONTROL_INBOX"; export declare const SUBAGENT_PARENT_ROOT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_ROOT_RUN_ID"; export declare const SUBAGENT_PARENT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_RUN_ID"; export declare const SUBAGENT_PARENT_CHILD_INDEX_ENV = "PI_SUBAGENT_PARENT_CHILD_INDEX"; export declare const SUBAGENT_PARENT_DEPTH_ENV = "PI_SUBAGENT_PARENT_DEPTH"; export declare const SUBAGENT_PARENT_PATH_ENV = "PI_SUBAGENT_PARENT_PATH"; export declare const SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV = "PI_SUBAGENT_PARENT_CAPABILITY_TOKEN"; export declare const SUBAGENT_PARENT_SESSION_ENV = "PI_SUBAGENT_PARENT_SESSION"; export declare const SUBAGENT_STEER_INBOX_ENV = "PI_SUBAGENT_STEER_INBOX"; export declare const SUBAGENT_STEER_CAPABILITY_ENV = "PI_SUBAGENT_STEER_CAPABILITY"; export declare const SUBAGENT_STEER_ACK_DIR_ENV = "PI_SUBAGENT_STEER_ACK_DIR"; export declare const PI_INTERCOM_STABLE_ID_ENV = "PI_INTERCOM_STABLE_ID"; export declare const PI_INTERCOM_SESSION_ID_ENV = "PI_INTERCOM_SESSION_ID"; export interface BuildPiArgsInput { parentSessionId?: string; baseArgs: string[]; task: string; sessionEnabled: boolean; sessionDir?: string; sessionFile?: string; model?: string; thinking?: string | false; systemPromptMode?: "append" | "replace"; inheritProjectContext: boolean; inheritSkills: boolean; requireReadTool?: boolean; tools?: string[]; extensions?: string[]; subagentOnlyExtensions?: string[]; systemPrompt?: string | null; mcpDirectTools?: string[]; cwd?: string; promptFileStem?: string; intercomSessionName?: string; orchestratorIntercomTarget?: string; runId?: string; childAgentName?: string; childIndex?: number; parentEventSink?: string; parentControlInbox?: string; parentRootRunId?: string; parentRunId?: string; parentChildIndex?: number; parentDepth?: number; parentPath?: NestedPathEntry[]; parentCapabilityToken?: string; steerInboxDir?: string; steerCapabilityPath?: string; steerAckDir?: string; structuredOutput?: { schema: JsonSchemaObject; schemaPath: string; outputPath: string; }; toolBudget?: ResolvedToolBudget; allowZeroToolBudget?: boolean; permissionRules?: PermissionRules; permissionAuditPath?: string; childWatchdog?: ChildWatchdogConfig; waitToolEnabled?: boolean; capabilityCeiling?: ResolvedSubagentCapabilityCeiling; } export interface BuildPiArgsResult { args: string[]; env: Record; tempDir?: string; toolDiagnosticPath?: string; runtimeAcknowledgedExtensionsPath?: string; capabilityAudit?: SubagentCapabilityAudit; } export declare function applyThinkingSuffix(model: string | undefined, thinking: string | false | undefined, replaceExisting?: boolean): string | undefined; export interface ResolvePiLaunchToolPlanInput { tools?: string[]; extensions?: string[]; subagentOnlyExtensions?: string[]; mcpDirectTools?: string[]; cwd?: string; requireReadTool?: boolean; structuredOutput?: boolean | { schema: JsonSchemaObject; schemaPath: string; outputPath: string; }; capabilityCeiling?: ResolvedSubagentCapabilityCeiling; inheritedCapabilityCeiling?: ResolvedSubagentCapabilityCeiling; agentName?: string; } export interface PiLaunchToolPlan { capabilityCeiling?: ResolvedSubagentCapabilityCeiling; requestedBuiltinTools: string[]; declaredBuiltinTools: string[]; toolExtensionPaths: string[]; resolvedMcpSelections: ResolvedMcpDirectToolSelection[]; effectiveMcpSelections: ResolvedMcpDirectToolSelection[]; effectiveMcpTools: string[]; explicitToolAllowlist: boolean; internalTools: string[]; effectiveToolAllowlist: string[]; requiredChildTools: string[]; fanoutAuthorized: boolean; runtimeExtensions: string[]; configuredExtensions: string[]; extensionArgs: string[]; disableAmbientExtensions: boolean; capabilityAudit?: SubagentCapabilityAudit; } export declare function projectLaunchResolvedChildExtensions(toolPlan: Pick): LaunchResolvedChildExtensionsV1; /** * Resolve the permission-system extension entry point when installed. * Returns the absolute path to the extension's main module, or undefined * when the package is not installed. Callers can check `autoInject` config * to decide whether to include it in child processes. */ export declare function resolvePermissionSystemExtension(): string | undefined; export declare function resolvePiLaunchToolPlan(input: ResolvePiLaunchToolPlanInput): PiLaunchToolPlan; export declare function buildPiArgs(input: BuildPiArgsInput): BuildPiArgsResult; export declare const parseParentPathEnv: typeof parseNestedPathEnv; export declare function cleanupTempDir(tempDir: string | null | undefined): void; //# sourceMappingURL=pi-args.d.ts.map