/** * Resolve-only execution coordinator and partial W1a control-plane scaffold * for the 0.2.1 cwd bridge. * * This is deliberately named for its guarantee: it provides principal/root * authorization, canonical resolution, cross-process leases, durable write * intents, one-shot mutation permits, and authenticated plans, but it does not * claim an OS filesystem sandbox, a race-free FileBroker, or atomic protection * against external path replacement. A future native backend can implement the * same runtime seam only after an exact host-support baseline cell passes. */ import type { AgentConfig } from "../agents.ts"; import type { RunOptions, RunResult } from "../host/runner-types.ts"; import { type InvocationAuthority } from "./authority.ts"; import { type ReconciliationResult } from "./journal.ts"; import { type RootRegistry } from "./registry.ts"; import { type PreparedResourceFileTransaction } from "./file-transaction.ts"; import type { PathRef } from "./schema.ts"; export interface CoordinatedScriptResult { stdout: string; stderr: string; code: number | null; stdoutOversize: boolean; timedOut: boolean; } export interface ResolveOnlyWorkspaceSessionOptions { invocationRoot: string; /** Trusted control-plane storage, never exposed as a flow workspace. */ controlDirectory?: string; principalId?: string; grantId?: string; registryId?: string; leaseTimeoutMs?: number; permitTtlMs?: number; signal?: AbortSignal; /** Trusted host decision. Flow/tool arguments cannot enable reconciliation. */ allowReconcile?: boolean; } export interface BindResolveOnlyPhaseInput { invocationRoot: string; runId: string; phaseId: string; argName?: string; argDefinitions: Readonly>; argValues: Readonly>; } export interface ResolveOnlyAgentCall { agents: AgentConfig[]; agentName: string; task: string; opts: RunOptions; globalThinking?: string; unitId?: string; invoke: () => Promise; } export interface ResolveOnlyScriptCall { unitId?: string; signal?: AbortSignal; invoke: () => Promise; } export interface ResolveOnlyPhaseBinding { readonly assurance: "resolve-only-no-sandbox"; readonly absolutePath: string; readonly logicalPath: string; readonly resourceDomainId: string; readonly runId: string; readonly phaseId: string; beginFileWriteTransaction(targets: readonly { effectId: string; path: PathRef; }[], options?: { unitId?: string; signal?: AbortSignal; }): Promise; runAgent(call: ResolveOnlyAgentCall): Promise; runScript(call: ResolveOnlyScriptCall): Promise; } export declare const WORKSPACE_RECONCILE_ACKNOWLEDGEMENT = "I acknowledge the current workspace state"; export declare const WORKSPACE_RECONCILE_MODE_ENV = "TASKFLOW_WORKSPACE_RECONCILE_MODE"; export declare function workspaceReconcileAllowedFromEnv(value?: string | undefined): boolean; export interface ReconcileResolveOnlyWorkspaceInput { /** Exact deliberate acknowledgement. Reconciliation accepts the current * external filesystem state; it does not restore or inspect lost writes. */ acknowledgement: string; reason?: string; signal?: AbortSignal; } export interface ResolveOnlyWorkspaceSession { readonly assurance: "resolve-only-no-sandbox"; readonly invocationRoot: string; readonly registry: RootRegistry; readonly authority: InvocationAuthority; bindPhase(input: BindResolveOnlyPhaseInput): Promise; reconcile(input: ReconcileResolveOnlyWorkspaceInput): Promise; } export declare function defaultWorkspaceControlDirectory(invocationRoot: string): string; export declare function createResolveOnlyWorkspaceSession(options: ResolveOnlyWorkspaceSessionOptions): Promise; export declare function reconcileResolveOnlyWorkspace(options: ResolveOnlyWorkspaceSessionOptions, input: ReconcileResolveOnlyWorkspaceInput): Promise; //# sourceMappingURL=execution.d.ts.map