import type { IsolationConfig } from './isolation/types.js'; import type { AgentLoopsConfig } from './loops/config.js'; import { type ApprovalMode, type FilesystemMode, type ResolvedRole, type MonitorConfig, type UnattendedMode, type RoomMemberStartup, type AgentDefinition, type AgentSelection } from './config.js'; import { type OpsDeps } from './ops.js'; import { type CreationDeps, type CreationProvenance } from './creation.js'; import './harness/claude-code.js'; import './harness/codex.js'; import './harness/hermes.js'; import { type SupervisorLauncher } from './temp-lifecycle.js'; /** * The provenance record written by the most recent spawn in this process, so * the CLI can print the same summary it persisted rather than rebuilding it. */ export declare let lastProvenance: CreationProvenance | undefined; export interface SpawnOpts { name: string; temp?: boolean; brain?: AgentSelection; role?: AgentSelection; /** Trusted canonical definition used by room provisioning; never a second schema. */ agentDefinition?: AgentDefinition; identity?: string; cwd?: string; coordinator?: string; approval?: ApprovalMode; filesystem?: FilesystemMode; unattended?: UnattendedMode; /** Typed external monitor configuration used by trusted creation surfaces. */ monitorConfig?: Partial; /** Internal, non-sensitive provenance correlation for typed presentation layers. */ surface?: 'cli' | 'web' | 'agent'; creationActionId?: string; /** Set only by a live role supervisor after a role-scoped proxy request. */ callerRole?: string; /** Trusted Fleet-internal first-boot payload for a Cowork room member. */ roomMemberStartup?: RoomMemberStartup; /** Internal provenance labels for values filled by the caller's supervisor. */ inheritedFromCaller?: string[]; /** * Path to a file holding exactly the existing `isolation:` mapping — the same * schema fleet.yaml uses, not a second policy language. The ONE new operator * input in this release. */ isolationFile?: string; /** Trusted YAML containing exactly a top-level `loops:` map. Temporary launches only. */ loopsFile?: string; /** Explicitly override any selected Agent Template loops with none. */ noLoops?: boolean; /** Internal source label retained after room-member plan resolution. */ loopSource?: 'agent-template' | 'cli' | 'omitted'; overseeInterval?: string; configPath?: string; dryRun?: boolean; json?: boolean; } export declare function agentDefinitionFromSpawn(o: SpawnOpts): AgentDefinition; /** * Read and validate an `--isolation-file`. The file is the existing * `isolation:` mapping and nothing else — the same schema, the same validator * (`validateIsolationConfig`), so a policy written here cannot mean something * different from the identical block in fleet.yaml. * * Called BEFORE the creation transaction reserves anything: an invalid file * must fail before any artifact exists. */ export declare function readIsolationFile(path: string): IsolationConfig; /** Read a private canonical temporary-loop override before any creation side effect. */ export declare function readLoopsFile(path: string): AgentLoopsConfig; export declare function validateSpawnOpts(o: SpawnOpts): void; /** The ours identity a spawn will bind: explicit, else the role name. */ export declare const effectiveIdentity: (o: SpawnOpts) => string; export interface SpawnDryRun { schemaVersion: 1; warning: string; roleDocument: Record; resolvedRole: ResolvedRole; } /** * Validate and resolve a spawn without reserving names, contacting the daemon, * or writing state. Collision checks are necessarily a point-in-time snapshot. */ export declare function spawnDryRun(o: SpawnOpts): SpawnDryRun; /** Permanent spawn: persist one bare Agent document under the selected v2 root. */ export declare function spawnPermanent(o: SpawnOpts, deps: OpsDeps, creation?: CreationDeps): Promise; export type { SupervisorLauncher } from './temp-lifecycle.js'; /** Temp spawn: live state under ~/.ours-fleet/tmp, independent transient supervision. */ export declare function spawnTemp(o: SpawnOpts, binPath: string, launch?: SupervisorLauncher, creation?: CreationDeps): Promise;