{"version":3,"file":"mission-handle.d.ts","sourceRoot":"","sources":["../../../src/core/mission-domain/mission-handle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,wBAAwB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,aAAa,CAYlF","sourcesContent":["/**\n * First-Class Mission Handle (2.3.0).\n *\n * A handle references a launched mission independently of its executor. It is a\n * read-only domain snapshot: no ChildProcess, no socket, no concrete transport\n * appears here. The executor owns cancellation behind its own boundary and\n * attaches a typed `cancel` control to the handle.\n */\n\nimport type { MissionState } from \"./mission-state.js\";\n\nexport interface MissionHandle {\n\t/** Stable canonical mission identity. */\n\treadonly missionId: string;\n\t/** Explicit structured parent identity; absent for a root mission. */\n\treadonly parentMissionId?: string;\n\t/** Structural recursion depth. */\n\treadonly depth: number;\n\t/**\n\t * Executor-scoped execution identity (opaque string). It is NOT a process id\n\t * and must remain meaningful for a remote or restarted executor.\n\t */\n\treadonly executionId: string;\n\t/** Current lifecycle state (snapshot at handle creation). */\n\treadonly state: MissionState;\n\treadonly createdAtMs: number;\n\treadonly startedAtMs?: number;\n\treadonly finishedAtMs?: number;\n\t/**\n\t * Cancellation control owned by the executor. Safe to call after launch;\n\t * idempotent.\n\t */\n\treadonly cancel: (reason?: string) => Promise<void>;\n}\n\nexport interface CreateMissionHandleInput {\n\tmissionId: string;\n\tparentMissionId?: string;\n\tdepth: number;\n\texecutionId: string;\n\tstate: MissionState;\n\tcreatedAtMs: number;\n\tstartedAtMs?: number;\n\tfinishedAtMs?: number;\n\tcancel: (reason?: string) => Promise<void>;\n}\n\n/**\n * Construct an immutable handle snapshot. `cancel` is supplied by the executor;\n * the domain never knows what it closes over.\n */\nexport function createMissionHandle(input: CreateMissionHandleInput): MissionHandle {\n\treturn Object.freeze({\n\t\tmissionId: input.missionId,\n\t\tparentMissionId: input.parentMissionId,\n\t\tdepth: input.depth,\n\t\texecutionId: input.executionId,\n\t\tstate: input.state,\n\t\tcreatedAtMs: input.createdAtMs,\n\t\tstartedAtMs: input.startedAtMs,\n\t\tfinishedAtMs: input.finishedAtMs,\n\t\tcancel: input.cancel,\n\t});\n}\n"]}