@thaodangspace/argos-core 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -2
  3. package/dist/durable/context.d.ts +207 -0
  4. package/dist/durable/context.d.ts.map +1 -0
  5. package/dist/durable/context.js +24 -0
  6. package/dist/durable/context.js.map +1 -0
  7. package/dist/durable/host-models.d.ts +15 -0
  8. package/dist/durable/host-models.d.ts.map +1 -0
  9. package/dist/durable/host-models.js +35 -0
  10. package/dist/durable/host-models.js.map +1 -0
  11. package/dist/durable/host-types.d.ts +247 -0
  12. package/dist/durable/host-types.d.ts.map +1 -0
  13. package/dist/durable/host-types.js +8 -0
  14. package/dist/durable/host-types.js.map +1 -0
  15. package/dist/durable/host.d.ts +206 -0
  16. package/dist/durable/host.d.ts.map +1 -0
  17. package/dist/durable/host.js +1027 -0
  18. package/dist/durable/host.js.map +1 -0
  19. package/dist/durable/index.d.ts +17 -0
  20. package/dist/durable/index.d.ts.map +1 -0
  21. package/dist/durable/index.js +18 -0
  22. package/dist/durable/index.js.map +1 -0
  23. package/dist/durable/mirror.d.ts +213 -0
  24. package/dist/durable/mirror.d.ts.map +1 -0
  25. package/dist/durable/mirror.js +326 -0
  26. package/dist/durable/mirror.js.map +1 -0
  27. package/dist/durable/pid.d.ts +17 -0
  28. package/dist/durable/pid.d.ts.map +1 -0
  29. package/dist/durable/pid.js +68 -0
  30. package/dist/durable/pid.js.map +1 -0
  31. package/dist/durable/run-request.d.ts +48 -0
  32. package/dist/durable/run-request.d.ts.map +1 -0
  33. package/dist/durable/run-request.js +115 -0
  34. package/dist/durable/run-request.js.map +1 -0
  35. package/dist/durable/schedule-docs.d.ts +256 -0
  36. package/dist/durable/schedule-docs.d.ts.map +1 -0
  37. package/dist/durable/schedule-docs.js +394 -0
  38. package/dist/durable/schedule-docs.js.map +1 -0
  39. package/dist/durable/schedules.d.ts +148 -0
  40. package/dist/durable/schedules.d.ts.map +1 -0
  41. package/dist/durable/schedules.js +1251 -0
  42. package/dist/durable/schedules.js.map +1 -0
  43. package/dist/durable/tasks/after.d.ts +53 -0
  44. package/dist/durable/tasks/after.d.ts.map +1 -0
  45. package/dist/durable/tasks/after.js +102 -0
  46. package/dist/durable/tasks/after.js.map +1 -0
  47. package/dist/durable/tasks/delay.d.ts +62 -0
  48. package/dist/durable/tasks/delay.d.ts.map +1 -0
  49. package/dist/durable/tasks/delay.js +93 -0
  50. package/dist/durable/tasks/delay.js.map +1 -0
  51. package/dist/durable/tasks/gate.d.ts +63 -0
  52. package/dist/durable/tasks/gate.d.ts.map +1 -0
  53. package/dist/durable/tasks/gate.js +86 -0
  54. package/dist/durable/tasks/gate.js.map +1 -0
  55. package/dist/durable/tasks/run-checkpoint.d.ts +446 -0
  56. package/dist/durable/tasks/run-checkpoint.d.ts.map +1 -0
  57. package/dist/durable/tasks/run-checkpoint.js +92 -0
  58. package/dist/durable/tasks/run-checkpoint.js.map +1 -0
  59. package/dist/durable/tasks/run-events.d.ts +29 -0
  60. package/dist/durable/tasks/run-events.d.ts.map +1 -0
  61. package/dist/durable/tasks/run-events.js +98 -0
  62. package/dist/durable/tasks/run-events.js.map +1 -0
  63. package/dist/durable/tasks/run-plan.d.ts +79 -0
  64. package/dist/durable/tasks/run-plan.d.ts.map +1 -0
  65. package/dist/durable/tasks/run-plan.js +337 -0
  66. package/dist/durable/tasks/run-plan.js.map +1 -0
  67. package/dist/durable/tasks/run-recovery.d.ts +14 -0
  68. package/dist/durable/tasks/run-recovery.d.ts.map +1 -0
  69. package/dist/durable/tasks/run-recovery.js +49 -0
  70. package/dist/durable/tasks/run-recovery.js.map +1 -0
  71. package/dist/durable/tasks/run.d.ts +55 -0
  72. package/dist/durable/tasks/run.d.ts.map +1 -0
  73. package/dist/durable/tasks/run.js +343 -0
  74. package/dist/durable/tasks/run.js.map +1 -0
  75. package/dist/durable/tasks/script-pin.d.ts +54 -0
  76. package/dist/durable/tasks/script-pin.d.ts.map +1 -0
  77. package/dist/durable/tasks/script-pin.js +136 -0
  78. package/dist/durable/tasks/script-pin.js.map +1 -0
  79. package/dist/durable/tasks/script.d.ts +133 -0
  80. package/dist/durable/tasks/script.d.ts.map +1 -0
  81. package/dist/durable/tasks/script.js +473 -0
  82. package/dist/durable/tasks/script.js.map +1 -0
  83. package/dist/durable/tasks/step.d.ts +126 -0
  84. package/dist/durable/tasks/step.d.ts.map +1 -0
  85. package/dist/durable/tasks/step.js +473 -0
  86. package/dist/durable/tasks/step.js.map +1 -0
  87. package/dist/durable/ulid.d.ts +29 -0
  88. package/dist/durable/ulid.d.ts.map +1 -0
  89. package/dist/durable/ulid.js +87 -0
  90. package/dist/durable/ulid.js.map +1 -0
  91. package/dist/durable/worktrees.d.ts +112 -0
  92. package/dist/durable/worktrees.d.ts.map +1 -0
  93. package/dist/durable/worktrees.js +168 -0
  94. package/dist/durable/worktrees.js.map +1 -0
  95. package/dist/engine/decide.d.ts +43 -0
  96. package/dist/engine/decide.d.ts.map +1 -0
  97. package/dist/engine/decide.js +78 -0
  98. package/dist/engine/decide.js.map +1 -0
  99. package/dist/engine/env.d.ts +78 -0
  100. package/dist/engine/env.d.ts.map +1 -0
  101. package/dist/engine/env.js +141 -0
  102. package/dist/engine/env.js.map +1 -0
  103. package/dist/engine/index.d.ts +13 -0
  104. package/dist/engine/index.d.ts.map +1 -0
  105. package/dist/engine/index.js +13 -0
  106. package/dist/engine/index.js.map +1 -0
  107. package/dist/engine/loops.d.ts +45 -0
  108. package/dist/engine/loops.d.ts.map +1 -0
  109. package/dist/engine/loops.js +56 -0
  110. package/dist/engine/loops.js.map +1 -0
  111. package/dist/engine/ready.d.ts +56 -0
  112. package/dist/engine/ready.d.ts.map +1 -0
  113. package/dist/engine/ready.js +139 -0
  114. package/dist/engine/ready.js.map +1 -0
  115. package/dist/engine/record.d.ts +479 -0
  116. package/dist/engine/record.d.ts.map +1 -0
  117. package/dist/engine/record.js +343 -0
  118. package/dist/engine/record.js.map +1 -0
  119. package/dist/engine/reducer.d.ts +107 -0
  120. package/dist/engine/reducer.d.ts.map +1 -0
  121. package/dist/engine/reducer.js +349 -0
  122. package/dist/engine/reducer.js.map +1 -0
  123. package/dist/engine/timeouts.d.ts +57 -0
  124. package/dist/engine/timeouts.d.ts.map +1 -0
  125. package/dist/engine/timeouts.js +99 -0
  126. package/dist/engine/timeouts.js.map +1 -0
  127. package/dist/engine/transition.d.ts +85 -0
  128. package/dist/engine/transition.d.ts.map +1 -0
  129. package/dist/engine/transition.js +396 -0
  130. package/dist/engine/transition.js.map +1 -0
  131. package/dist/errors.d.ts +51 -0
  132. package/dist/errors.d.ts.map +1 -0
  133. package/dist/errors.js +95 -0
  134. package/dist/errors.js.map +1 -0
  135. package/dist/git/exec.d.ts +58 -0
  136. package/dist/git/exec.d.ts.map +1 -0
  137. package/dist/git/exec.js +110 -0
  138. package/dist/git/exec.js.map +1 -0
  139. package/dist/git/index.d.ts +12 -0
  140. package/dist/git/index.d.ts.map +1 -0
  141. package/dist/git/index.js +12 -0
  142. package/dist/git/index.js.map +1 -0
  143. package/dist/git/snapshot.d.ts +50 -0
  144. package/dist/git/snapshot.d.ts.map +1 -0
  145. package/dist/git/snapshot.js +98 -0
  146. package/dist/git/snapshot.js.map +1 -0
  147. package/dist/git/worktree.d.ts +128 -0
  148. package/dist/git/worktree.d.ts.map +1 -0
  149. package/dist/git/worktree.js +329 -0
  150. package/dist/git/worktree.js.map +1 -0
  151. package/dist/history.d.ts +10 -0
  152. package/dist/history.d.ts.map +1 -0
  153. package/dist/history.js +24 -0
  154. package/dist/history.js.map +1 -0
  155. package/dist/index.d.ts +6 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +6 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/paseo/agent-step.d.ts +49 -0
  160. package/dist/paseo/agent-step.d.ts.map +1 -0
  161. package/dist/paseo/agent-step.js +421 -0
  162. package/dist/paseo/agent-step.js.map +1 -0
  163. package/dist/paseo/client.d.ts +55 -0
  164. package/dist/paseo/client.d.ts.map +1 -0
  165. package/dist/paseo/client.js +260 -0
  166. package/dist/paseo/client.js.map +1 -0
  167. package/dist/paseo/fake.d.ts +66 -0
  168. package/dist/paseo/fake.d.ts.map +1 -0
  169. package/dist/paseo/fake.js +223 -0
  170. package/dist/paseo/fake.js.map +1 -0
  171. package/dist/paseo/index.d.ts +14 -0
  172. package/dist/paseo/index.d.ts.map +1 -0
  173. package/dist/paseo/index.js +14 -0
  174. package/dist/paseo/index.js.map +1 -0
  175. package/dist/paseo/model-catalog.d.ts +76 -0
  176. package/dist/paseo/model-catalog.d.ts.map +1 -0
  177. package/dist/paseo/model-catalog.js +134 -0
  178. package/dist/paseo/model-catalog.js.map +1 -0
  179. package/dist/paseo/output.d.ts +95 -0
  180. package/dist/paseo/output.d.ts.map +1 -0
  181. package/dist/paseo/output.js +238 -0
  182. package/dist/paseo/output.js.map +1 -0
  183. package/dist/paseo/port.d.ts +169 -0
  184. package/dist/paseo/port.d.ts.map +1 -0
  185. package/dist/paseo/port.js +233 -0
  186. package/dist/paseo/port.js.map +1 -0
  187. package/dist/paths.d.ts +18 -0
  188. package/dist/paths.d.ts.map +1 -0
  189. package/dist/paths.js +36 -0
  190. package/dist/paths.js.map +1 -0
  191. package/dist/playbook/expand.d.ts +26 -0
  192. package/dist/playbook/expand.d.ts.map +1 -0
  193. package/dist/playbook/expand.js +141 -0
  194. package/dist/playbook/expand.js.map +1 -0
  195. package/dist/playbook/hash.d.ts +11 -0
  196. package/dist/playbook/hash.d.ts.map +1 -0
  197. package/dist/playbook/hash.js +35 -0
  198. package/dist/playbook/hash.js.map +1 -0
  199. package/dist/playbook/index.d.ts +10 -0
  200. package/dist/playbook/index.d.ts.map +1 -0
  201. package/dist/playbook/index.js +9 -0
  202. package/dist/playbook/index.js.map +1 -0
  203. package/dist/playbook/ir.d.ts +250 -0
  204. package/dist/playbook/ir.d.ts.map +1 -0
  205. package/dist/playbook/ir.js +30 -0
  206. package/dist/playbook/ir.js.map +1 -0
  207. package/dist/playbook/load.d.ts +68 -0
  208. package/dist/playbook/load.d.ts.map +1 -0
  209. package/dist/playbook/load.js +451 -0
  210. package/dist/playbook/load.js.map +1 -0
  211. package/dist/playbook/resolve.d.ts +79 -0
  212. package/dist/playbook/resolve.d.ts.map +1 -0
  213. package/dist/playbook/resolve.js +702 -0
  214. package/dist/playbook/resolve.js.map +1 -0
  215. package/dist/playbook/schema.d.ts +1698 -0
  216. package/dist/playbook/schema.d.ts.map +1 -0
  217. package/dist/playbook/schema.js +253 -0
  218. package/dist/playbook/schema.js.map +1 -0
  219. package/dist/playbook/validate.d.ts +7 -0
  220. package/dist/playbook/validate.d.ts.map +1 -0
  221. package/dist/playbook/validate.js +173 -0
  222. package/dist/playbook/validate.js.map +1 -0
  223. package/dist/rpc/client.d.ts +101 -0
  224. package/dist/rpc/client.d.ts.map +1 -0
  225. package/dist/rpc/client.js +222 -0
  226. package/dist/rpc/client.js.map +1 -0
  227. package/dist/rpc/contracts.d.ts +1637 -0
  228. package/dist/rpc/contracts.d.ts.map +1 -0
  229. package/dist/rpc/contracts.js +545 -0
  230. package/dist/rpc/contracts.js.map +1 -0
  231. package/dist/rpc/index.d.ts +10 -0
  232. package/dist/rpc/index.d.ts.map +1 -0
  233. package/dist/rpc/index.js +10 -0
  234. package/dist/rpc/index.js.map +1 -0
  235. package/dist/rpc/server.d.ts +68 -0
  236. package/dist/rpc/server.d.ts.map +1 -0
  237. package/dist/rpc/server.js +721 -0
  238. package/dist/rpc/server.js.map +1 -0
  239. package/dist/rpc/summary.d.ts +61 -0
  240. package/dist/rpc/summary.d.ts.map +1 -0
  241. package/dist/rpc/summary.js +236 -0
  242. package/dist/rpc/summary.js.map +1 -0
  243. package/dist/schedule/model.d.ts +112 -0
  244. package/dist/schedule/model.d.ts.map +1 -0
  245. package/dist/schedule/model.js +126 -0
  246. package/dist/schedule/model.js.map +1 -0
  247. package/dist/schedule/next.d.ts +82 -0
  248. package/dist/schedule/next.d.ts.map +1 -0
  249. package/dist/schedule/next.js +208 -0
  250. package/dist/schedule/next.js.map +1 -0
  251. package/package.json +89 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Argos contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,56 @@
1
- # Temporary Holding Version
1
+ # @thaodangspace/argos-core
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Library core of [Argos](https://github.com/thaodangspace/argos) — the durable YAML playbook engine
4
+ for [Paseo](https://github.com/getpaseo) agents. Most users want the CLI instead:
5
+ `npm i -g @thaodangspace/argos`.
6
+
7
+ This package has no entry in the playbook control path that consults a model: readiness,
8
+ transitions, loop limits, gates, retries, and timeouts are decided by a pure reducer. A model only
9
+ does the work inside a step.
10
+
11
+ ## Subpaths
12
+
13
+ Everything is opt-in — the package root exports the error codes, the path helpers, and the
14
+ `playbook`/`engine` barrels, but never `durable`/`paseo`/`git`/`rpc`. A consumer therefore cannot
15
+ accidentally pull the SQLite owner into the wrong process.
16
+
17
+ | Import | Contains |
18
+ |---|---|
19
+ | `@thaodangspace/argos-core` | error codes, `$ARGOS_HOME` paths, plus `playbook` and `engine` |
20
+ | `@thaodangspace/argos-core/playbook` | YAML loader, resolver, sub-playbook expansion, validation, hashing, frozen IR |
21
+ | `@thaodangspace/argos-core/engine` | the pure decision layer (`next(record, event)` → record + effects); no I/O, no timers |
22
+ | `@thaodangspace/argos-core/durable` | `ArgosHost`: the one SQLite owner, run lifecycle, schedules, worktrees, scripts |
23
+ | `@thaodangspace/argos-core/paseo` | Paseo adapter, target/quota policy, deterministic fake |
24
+ | `@thaodangspace/argos-core/git` | the only `node:child_process` user (worktrees, snapshots) |
25
+ | `@thaodangspace/argos-core/rpc` | HTTP contracts + client; safe for CLIs and plugins |
26
+ | `@thaodangspace/argos-core/rpc/contracts` | Node-free contracts only |
27
+ | `@thaodangspace/argos-core/rpc/server` | the RPC server that wraps the durable host (serve-only) |
28
+
29
+ ## Example
30
+
31
+ ```ts
32
+ import { loadPlaybook } from "@thaodangspace/argos-core/playbook";
33
+ import { createRunRecord, next } from "@thaodangspace/argos-core/engine";
34
+
35
+ const ir = loadPlaybook(process.cwd(), "fix"); // deep-frozen IR + content hash
36
+ let record = createRunRecord({
37
+ id: "01J...",
38
+ ir,
39
+ inputs: { issue: "login returns 500" },
40
+ cwd: process.cwd(),
41
+ now: Date.now(),
42
+ });
43
+ const { record: advanced, effects } = next(record, { type: "tick", now: Date.now() });
44
+ // `effects` names what the host should do (dispatchStep, openGate, finishRun, ...); `next` performs nothing.
45
+ ```
46
+
47
+ A run writes to `$ARGOS_HOME/argos.sqlite` only through `ArgosHost`, which refuses a second live
48
+ owner. In practice you run the host with `argos serve` (the CLI package) rather than embedding it.
49
+
50
+ Requires Node `>=22.13`. See the
51
+ [repository](https://github.com/thaodangspace/argos/blob/main/docs/architecture.md) for the
52
+ architecture, the durability model, and the scheduler.
53
+
54
+ ## License
55
+
56
+ MIT
@@ -0,0 +1,207 @@
1
+ /**
2
+ * The durable host's ports and shared value types.
3
+ *
4
+ * `StepExecutor` is the whole seam between the durable task layer and whatever actually runs a
5
+ * step (the fake in Phase 4, the Paseo adapter in Phase 6, scripts in Phase 7). The tasks never
6
+ * import a client, a process, or a clock: everything comes through these interfaces, which is what
7
+ * keeps the durability tests deterministic and the engine free of I/O.
8
+ */
9
+ import type { ArgosErrorCode } from "../errors.js";
10
+ import type { OutputDefIR, Scalar } from "../playbook/ir.js";
11
+ /**
12
+ * The host clock. `now()` is used for every durable decision (timeouts, poll deadlines, event
13
+ * times); `setTimer` arms the pi-durable scheduler. Tests inject a fake implementation and
14
+ * advance it explicitly instead of sleeping.
15
+ */
16
+ export interface Clock {
17
+ now(): number;
18
+ setTimer?(callback: () => void, delayMs: number, options: {
19
+ readonly background: boolean;
20
+ }): (() => void) | undefined;
21
+ }
22
+ /** The production clock: wall time plus `setTimeout`, exactly pi-durable's default. */
23
+ export declare const systemClock: Clock;
24
+ /** D3: gate wake poll (FR19). The gate task re-reads its decision document on every wake. */
25
+ export declare const GATE_POLL_MS = 2000;
26
+ /** `argos:<runId>:<stepId>:<attempt>` — stable across restarts, the launch idempotency key. */
27
+ export declare function stepRequestId(runId: string, stepId: string, attempt: number): string;
28
+ /** The Paseo label set carried by every agent launch (Phase 6 reads it for reconciliation). */
29
+ export declare function launchLabel(runId: string, stepId: string, attempt: number): string;
30
+ /** Everything the executor needs to create or adopt one agent launch. */
31
+ export interface StepAgentContext {
32
+ /** Idempotency key: `argos:<runId>:<stepId>:<attempt>`. */
33
+ readonly requestId: string;
34
+ /** `argos/run=…,argos/step=…,argos/attempt=…` — the reconciliation label (Phase 6). */
35
+ readonly label: string;
36
+ readonly runId: string;
37
+ readonly stepId: string;
38
+ readonly attempt: number;
39
+ /** Working directory: the run worktree when isolation is on, otherwise the run cwd. */
40
+ readonly cwd: string;
41
+ /** First resolved `provider/model` of the step (the preferred target). */
42
+ readonly target?: string;
43
+ /** Ordered candidates: preferred target first, then role/playbook fallbacks (FR24). */
44
+ readonly targets?: readonly string[];
45
+ /** Provider settings of the preferred target (`modeId`/`thinking`). */
46
+ readonly agentConfig?: AgentStepConfig;
47
+ readonly prompt?: string;
48
+ /**
49
+ * Feedback from the loop/gate that re-queued this step (`{{ feedback }}`). Also interpolated
50
+ * into `prompt` by the run task, so an executor that reads only the prompt still sees it.
51
+ */
52
+ readonly feedback?: string;
53
+ /** Outcome names declared by the step; an executor may compile them into a schema. */
54
+ readonly outcomes: readonly string[];
55
+ /** Output names declared by the step. */
56
+ readonly outputs: readonly string[];
57
+ /** Output definitions (type/enum/required/default) for the structured-result schema (D12). */
58
+ readonly outputDefs: Readonly<Record<string, OutputDefIR>>;
59
+ /** Targets the run already recorded as quota-exhausted, with their exhaustion time (FR24). */
60
+ readonly exhausted?: readonly ExhaustedTarget[];
61
+ /** How long an exhausted target is skipped (`providers.exhausted_for`); executor default if absent. */
62
+ readonly quotaWindowMs?: number;
63
+ }
64
+ /** Provider settings for the preferred target. */
65
+ export interface AgentStepConfig {
66
+ readonly provider: string;
67
+ readonly model: string;
68
+ readonly modeId?: string;
69
+ readonly thinking?: string;
70
+ }
71
+ /** A `provider/model` skipped until `at + window` (mirrors the run record's `exhausted`). */
72
+ export interface ExhaustedTarget {
73
+ readonly target: string;
74
+ readonly at: number;
75
+ }
76
+ /** Launch input: the agent context plus the crash-reconciliation hint. */
77
+ export interface LaunchInput extends StepAgentContext {
78
+ /**
79
+ * True when an earlier `launch` invocation already marked "create attempted" in the
80
+ * checkpoint. With an unsupported label filter that must fail `launch_uncertain` instead of
81
+ * creating a possible duplicate (the crash window from FR16).
82
+ */
83
+ readonly priorCreateAttempt?: boolean;
84
+ }
85
+ /** The adopted or created agent. */
86
+ export interface AgentLaunch {
87
+ readonly agentId: string;
88
+ readonly target?: string;
89
+ /** Targets discovered quota-exhausted during this launch (FR24). */
90
+ readonly exhausted?: readonly ExhaustedTarget[];
91
+ }
92
+ /** Poll input: identify the agent that `launch` returned. */
93
+ export interface AgentStatusInput extends StepAgentContext {
94
+ readonly agentId: string;
95
+ /** True after the one allowed handover relaunch (agent archived mid-step). */
96
+ readonly handoverAttempted?: boolean;
97
+ }
98
+ /** The provider's raw result, carried in the checkpoint so `collect` validates after a restart. */
99
+ export interface RawStepOutput {
100
+ readonly output?: unknown;
101
+ readonly text?: string | null;
102
+ readonly provider?: string;
103
+ }
104
+ /**
105
+ * What a status poll reports. `running` keeps the step task asleep for another `pollMs`; `done`
106
+ * carries the engine-shaped result of the attempt. An `errorCode` on a `done` status is a step
107
+ * failure, not a task failure: the run records it through `stepSettled`.
108
+ *
109
+ * `running` may carry a replacement `agentId` (the handover relaunch) plus `handover: true`, and
110
+ * `exhausted` targets discovered while relaunching.
111
+ */
112
+ export type StepAgentStatus = {
113
+ readonly state: "running";
114
+ readonly agentId?: string;
115
+ readonly target?: string;
116
+ readonly handover?: boolean;
117
+ readonly exhausted?: readonly ExhaustedTarget[];
118
+ } | {
119
+ readonly state: "done";
120
+ readonly outcome?: string;
121
+ readonly outputs?: Readonly<Record<string, Scalar>>;
122
+ readonly errorCode?: ArgosErrorCode;
123
+ readonly usage?: Readonly<Record<string, number>>;
124
+ readonly feedback?: string;
125
+ readonly exhausted?: readonly ExhaustedTarget[];
126
+ /** Raw provider result; `collect` re-validates it with the step schema. */
127
+ readonly raw?: RawStepOutput;
128
+ };
129
+ /** Input of the optional final collection pass (structured-output parsing lives here in Phase 6). */
130
+ export interface CollectInput extends AgentStatusInput {
131
+ readonly status: StepAgentStatus;
132
+ }
133
+ /** The refined result of a finished attempt. Collect may override the polled status. */
134
+ export interface CollectResult {
135
+ readonly outcome?: string;
136
+ readonly outputs?: Readonly<Record<string, Scalar>>;
137
+ readonly errorCode?: ArgosErrorCode;
138
+ readonly usage?: Readonly<Record<string, number>>;
139
+ readonly feedback?: string;
140
+ readonly exhausted?: readonly ExhaustedTarget[];
141
+ }
142
+ /**
143
+ * Launch, poll, and optionally collect one agent step.
144
+ *
145
+ * `launch` is **idempotent by `requestId`**: it must adopt an existing agent carrying the label
146
+ * instead of creating a second one, because a crash can re-run the launch phase. `status` is a
147
+ * pure read. `collect` is optional; when present it runs once per finished attempt and may
148
+ * validate structured output.
149
+ */
150
+ export interface StepExecutor {
151
+ launch(input: LaunchInput): Promise<AgentLaunch>;
152
+ status(input: AgentStatusInput): Promise<StepAgentStatus>;
153
+ collect?(input: CollectInput): Promise<CollectResult>;
154
+ }
155
+ /**
156
+ * The `argos.step` task result consumed by `argos.run`. A step that fails is still a *completed*
157
+ * task carrying an `errorCode`: task failure is reserved for a broken task, while a failed step is
158
+ * an ordinary engine transition (`step_failed`, `step_timeout`, …).
159
+ */
160
+ export interface StepTaskResult {
161
+ readonly stepId: string;
162
+ readonly attempt: number;
163
+ readonly requestId: string;
164
+ readonly outcome?: string;
165
+ readonly outputs?: Readonly<Record<string, Scalar>>;
166
+ readonly errorCode?: ArgosErrorCode;
167
+ readonly agentId?: string;
168
+ readonly target?: string;
169
+ readonly usage?: Readonly<Record<string, number>>;
170
+ readonly feedback?: string;
171
+ /** Quota-exhausted targets observed by this attempt (merged into the run record, FR24). */
172
+ readonly exhausted?: readonly ExhaustedTarget[];
173
+ /**
174
+ * Script steps only (FR22): the last exit code, how many times the script ran (exit-75 loops
175
+ * included), and why the step failed. The run record keeps the stable `errorCode`; this is the
176
+ * diagnostic detail the task receipt preserves (a terminal task cannot carry a checkpoint).
177
+ */
178
+ readonly exitCode?: number;
179
+ readonly runs?: number;
180
+ readonly detail?: string;
181
+ }
182
+ /** Terminal result of one `argos.run` task, mirroring the run's final status. */
183
+ export interface RunTaskResult {
184
+ readonly runId: string;
185
+ readonly status: "completed" | "failed" | "cancelled";
186
+ readonly outcome?: string;
187
+ readonly errorCode?: ArgosErrorCode;
188
+ }
189
+ /**
190
+ * Terminal result of one `argos.gate` task: exactly what the run task needs to feed
191
+ * `gateDecided` into the reducer.
192
+ */
193
+ export interface GateTaskResult {
194
+ readonly runId: string;
195
+ readonly gateId: string;
196
+ readonly decision: string;
197
+ readonly comment?: string;
198
+ readonly decidedBy?: string;
199
+ readonly decidedVia?: string;
200
+ readonly decidedAt: number;
201
+ }
202
+ /** Link from an after-task run back to the run that started it (FR11). */
203
+ export interface AfterTaskLink {
204
+ readonly parentRunId: string;
205
+ readonly afterId: string;
206
+ }
207
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/durable/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI7D;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,GAAG,IAAI,MAAM,CAAC;IACd,QAAQ,CAAC,CACP,QAAQ,EAAE,MAAM,IAAI,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;KAAE,GACxC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7B;AAED,uFAAuF;AACvF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,YAAY,OAAQ,CAAC;AAIlC,+FAA+F;AAC/F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAElF;AAID,yEAAyE;AACzE,MAAM,WAAW,gBA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G;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The durable host's ports and shared value types.
3
+ *
4
+ * `StepExecutor` is the whole seam between the durable task layer and whatever actually runs a
5
+ * step (the fake in Phase 4, the Paseo adapter in Phase 6, scripts in Phase 7). The tasks never
6
+ * import a client, a process, or a clock: everything comes through these interfaces, which is what
7
+ * keeps the durability tests deterministic and the engine free of I/O.
8
+ */
9
+ /** The production clock: wall time plus `setTimeout`, exactly pi-durable's default. */
10
+ export const systemClock = {
11
+ now: () => Date.now(),
12
+ };
13
+ /** D3: gate wake poll (FR19). The gate task re-reads its decision document on every wake. */
14
+ export const GATE_POLL_MS = 2_000;
15
+ // ------------------------------------------------------------------ ids (D14)
16
+ /** `argos:<runId>:<stepId>:<attempt>` — stable across restarts, the launch idempotency key. */
17
+ export function stepRequestId(runId, stepId, attempt) {
18
+ return `argos:${runId}:${stepId}:${attempt}`;
19
+ }
20
+ /** The Paseo label set carried by every agent launch (Phase 6 reads it for reconciliation). */
21
+ export function launchLabel(runId, stepId, attempt) {
22
+ return `argos/run=${runId},argos/step=${stepId},argos/attempt=${attempt}`;
23
+ }
24
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/durable/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH,uFAAuF;AACvF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;CACtB,CAAC;AAEF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC;AAElC,+EAA+E;AAE/E,+FAA+F;AAC/F,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,MAAc,EAAE,OAAe;IAC1E,OAAO,SAAS,KAAK,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;AAC/C,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAc,EAAE,OAAe;IACxE,OAAO,aAAa,KAAK,eAAe,MAAM,kBAAkB,OAAO,EAAE,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * D6: the durable host's model stand-in (FR5.2 split of `host.ts`).
3
+ *
4
+ * The engine never consults a model for control flow, so the harness is opened with a `Models`
5
+ * that fails loudly on any use. No `pi.generation` task can be scheduled because nothing ever
6
+ * obtains a model.
7
+ */
8
+ import type { Models } from "@earendil-works/pi-ai/models";
9
+ /**
10
+ * D6: a `Models` stand-in that throws on any use. `Harness.open` reads `getAuth` once (to bind
11
+ * it into its identity wrapper), so the property must exist — calling it throws like everything
12
+ * else. No `pi.generation` task can be scheduled because nothing ever obtains a model.
13
+ */
14
+ export declare function createStubModels(): Models;
15
+ //# sourceMappingURL=host-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-models.d.ts","sourceRoot":"","sources":["../../src/durable/host-models.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAM3D;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAqBzC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * D6: the durable host's model stand-in (FR5.2 split of `host.ts`).
3
+ *
4
+ * The engine never consults a model for control flow, so the harness is opened with a `Models`
5
+ * that fails loudly on any use. No `pi.generation` task can be scheduled because nothing ever
6
+ * obtains a model.
7
+ */
8
+ /** Messages used by the D6 guard: the stub must fail loudly, never silently. */
9
+ const STUB_MODELS_MESSAGE = "argos: the durable host has no model access; control flow is decided by the engine (FR21)";
10
+ /**
11
+ * D6: a `Models` stand-in that throws on any use. `Harness.open` reads `getAuth` once (to bind
12
+ * it into its identity wrapper), so the property must exist — calling it throws like everything
13
+ * else. No `pi.generation` task can be scheduled because nothing ever obtains a model.
14
+ */
15
+ export function createStubModels() {
16
+ const touched = () => {
17
+ throw new Error(STUB_MODELS_MESSAGE);
18
+ };
19
+ return new Proxy({}, {
20
+ get(_target, property) {
21
+ if (typeof property === "symbol" || property === "then" || property === "toJSON") {
22
+ return undefined;
23
+ }
24
+ // `Harness.open` binds `getAuth` once into its identity wrapper; that binding is the only
25
+ // eager read. Calling it (or reading any other member) fails loudly.
26
+ if (property === "getAuth")
27
+ return touched;
28
+ throw new Error(STUB_MODELS_MESSAGE);
29
+ },
30
+ // `withClientIdentity` checks `"setProvider" in models`; a false answer keeps the wrapper
31
+ // read-only, which is all the stub needs to be.
32
+ has: () => false,
33
+ });
34
+ }
35
+ //# sourceMappingURL=host-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-models.js","sourceRoot":"","sources":["../../src/durable/host-models.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,gFAAgF;AAChF,MAAM,mBAAmB,GACvB,2FAA2F,CAAC;AAE9F;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,OAAO,GAAG,GAAU,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC,CAAC;IACF,OAAO,IAAI,KAAK,CACd,EAAE,EACF;QACE,GAAG,CAAC,OAAO,EAAE,QAAQ;YACnB,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACjF,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,0FAA0F;YAC1F,qEAAqE;YACrE,IAAI,QAAQ,KAAK,SAAS;gBAAE,OAAO,OAAO,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QACD,0FAA0F;QAC1F,gDAAgD;QAChD,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK;KACjB,CACmB,CAAC;AACzB,CAAC"}
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Public types of `ArgosHost` (FR5.2 split of `host.ts`, D1).
3
+ *
4
+ * These are the shapes the RPC server, the CLI, and the tests speak: no harness, no SQLite, and
5
+ * no task checkpoint crosses this boundary.
6
+ */
7
+ import type { Models } from "@earendil-works/pi-ai/models";
8
+ import type { Conversation, Storage, Tx } from "@earendil-works/pi-durable";
9
+ import type { RunRecord, WorktreeRecord } from "../engine/index.js";
10
+ import type { RunTrigger } from "../engine/record.js";
11
+ import type { GitRunner } from "../git/exec.js";
12
+ import type { TargetCatalog } from "../paseo/model-catalog.js";
13
+ import type { IsolationIR, PlaybookIR, Scalar } from "../playbook/ir.js";
14
+ import type { CatchUpInput, KeepInput, Overlap } from "../schedule/model.js";
15
+ import type { Clock, StepExecutor } from "./context.js";
16
+ import type { RunDoc } from "./mirror.js";
17
+ import type { ScheduleDoc } from "./schedule-docs.js";
18
+ export interface ArgosHostOptions {
19
+ /** `$ARGOS_HOME`; default `argosHome()`. Ignored when `storage` is supplied. */
20
+ readonly home?: string;
21
+ /** Injected storage (MemoryStorage in fast unit tests). Skips the home/pid setup. */
22
+ readonly storage?: Storage;
23
+ readonly executor: StepExecutor;
24
+ /** Injected clock; default wall time. The harness clock and every timeout use it. */
25
+ readonly clock?: Clock;
26
+ /** Override the D6 stub (tests only; production leaves it unset). */
27
+ readonly models?: Models;
28
+ /**
29
+ * Provider/model catalog (FR24). When supplied, `startRun` refuses a run whose resolved
30
+ * `provider/model` is missing with `model_unavailable` **before** creating any task. Phase 4
31
+ * tests leave it unset, so the durable host stays independent of Paseo.
32
+ */
33
+ readonly modelCatalog?: TargetCatalog;
34
+ /**
35
+ * Injected git port for worktree creation and read-only snapshots (D9). Production leaves it
36
+ * unset: `execFile("git", [...])` is the only implementation that ships.
37
+ */
38
+ readonly git?: GitRunner;
39
+ /**
40
+ * FR10.4: the fire listener, registered **before** the schedule runner's first tick. `open()`
41
+ * queues that tick, so a catch-up fire that runs while the host is still opening would otherwise
42
+ * finish before a caller could subscribe; `argos serve` passes its stderr line here so every fire
43
+ * outcome is announced, including the first one after a restart.
44
+ */
45
+ readonly onScheduleFire?: ScheduleFireListener;
46
+ }
47
+ export interface StartRunInput {
48
+ readonly ir: PlaybookIR;
49
+ readonly inputs: Readonly<Record<string, Scalar>>;
50
+ readonly cwd: string;
51
+ readonly worktree?: WorktreeRecord;
52
+ readonly deadline?: number;
53
+ /** Explicit run id (tests / idempotent callers); default `ulid()`. */
54
+ readonly id?: string;
55
+ /**
56
+ * Isolation override for this run (Phase 8's `argos run --isolation`). Default: the frozen IR's
57
+ * `isolation` block, which the loader already resolved from playbook/defaults.
58
+ */
59
+ readonly isolation?: IsolationIR;
60
+ /**
61
+ * D15: idempotency key for `POST /runs`. A repeated request with the same id returns the run the
62
+ * first request created instead of starting a second one.
63
+ */
64
+ readonly clientRequestId?: string;
65
+ }
66
+ export interface StartedRun {
67
+ readonly runId: string;
68
+ readonly taskId: string;
69
+ }
70
+ /**
71
+ * Internal start input: the public `StartRunInput` plus the scheduler's provenance (FR8.1).
72
+ *
73
+ * Only the scheduler sets `trigger`; `POST /runs` and the CLI keep the public `StartRunInput`, so a
74
+ * manual run's record stays byte-identical (no `trigger` key at all).
75
+ */
76
+ export interface ScheduleRunStartInput extends StartRunInput {
77
+ readonly trigger?: RunTrigger;
78
+ }
79
+ /** Everything `#commitRun` needs, already resolved and validated by `#prepareRun`. */
80
+ export interface PreparedRun {
81
+ readonly runId: string;
82
+ readonly record: RunRecord;
83
+ /** Step 2 of prepare; the idempotency re-check inside the commit uses the same instant. */
84
+ readonly now: number;
85
+ readonly clientRequestId?: string;
86
+ }
87
+ /**
88
+ * What `#prepareRun` produced. `started` is the D15 idempotency fast path: a retried write that
89
+ * already landed returns the original receipt and creates nothing (not even a worktree).
90
+ */
91
+ export type PrepareRunOutcome = {
92
+ readonly kind: "started";
93
+ readonly started: StartedRun;
94
+ } | {
95
+ readonly kind: "prepared";
96
+ readonly prepared: PreparedRun;
97
+ };
98
+ /** The conversation every run task is owned by (D5). */
99
+ export type RunOwnerConversation = Conversation;
100
+ export interface CommitRunOptions {
101
+ /** `run_started` history detail: `<playbookId>`, or `<playbookId> (schedule <id>)` (FR4.7). */
102
+ readonly historyDetail: string;
103
+ }
104
+ /**
105
+ * The start path as the scheduler sees it (`schedules.ts`, Phase 5). A fire prepares outside the
106
+ * commit, then calls `commitInTx` inside the **one** commit that also writes the schedule document,
107
+ * so a crash cannot leave a run without its fire marker (or the other way round).
108
+ *
109
+ * Internal on purpose: it is reachable through `ArgosHost.startPort` and is never exported from
110
+ * `@thaodangspace/argos-core/durable`.
111
+ */
112
+ export interface RunStartPort {
113
+ /** Model check, idempotency fast path, run id, script pins, worktree, record. Never commits. */
114
+ prepare(input: ScheduleRunStartInput): Promise<PrepareRunOutcome>;
115
+ /** Task + mirror + history + run index + idempotency receipt, inside the caller's commit. */
116
+ commitInTx(tx: Tx, prepared: PreparedRun, root: RunOwnerConversation, options: CommitRunOptions): Promise<StartedRun>;
117
+ /** FR2.4 dry check: every prepare step, creating no task, index entry, worktree, or run. */
118
+ dryCheck(input: ScheduleRunStartInput): Promise<void>;
119
+ /** Continue every unfinished task after the caller's commit landed. */
120
+ resume(): void;
121
+ /** The root conversation that owns the run task `commitInTx` creates. */
122
+ root(): Promise<RunOwnerConversation>;
123
+ }
124
+ /**
125
+ * The two run operations retention needs (FR9.3), supplied by the host so `schedules.ts` never
126
+ * imports `host.ts`: the host stays the only writer of run documents, and the runner only asks.
127
+ *
128
+ * Both are the host's own methods (`getRun`, `removeRun`), so a pruned run is retired exactly the
129
+ * way `argos rm` retires one — the run, history, gate, and idempotency documents plus the index
130
+ * entry, in one commit — and the worktree is left in place for `argos worktree rm`/`gc`.
131
+ */
132
+ export interface ScheduleRunPort {
133
+ /** The mirrored run document, or `undefined` for a run the operator already removed. */
134
+ get(runId: string): Promise<RunDoc | undefined>;
135
+ /** `removeRun`: `run_terminal` while the run (or one of its after-tasks) is still going. */
136
+ remove(runId: string): Promise<RemoveRunResult>;
137
+ }
138
+ /** Where one fire ended (FR6, FR7.6, FR5.2, FR3.6); the same vocabulary as the fire log. */
139
+ export type ScheduleFireStatus = "started" | "skipped_overlap" | "refused" | "missed";
140
+ /**
141
+ * One fire outcome, as `ArgosHost.observeScheduleFires` announces it (FR10.4).
142
+ *
143
+ * It is exactly what `argos serve` prints on one stderr line: the schedule, the fire time, the
144
+ * status, and either the run it started or the error code that refused it. No input value — and no
145
+ * message text — ever appears here; the fire log inside the document keeps the (bounded) message.
146
+ */
147
+ export interface ScheduleFireEvent {
148
+ readonly scheduleId: string;
149
+ readonly fireAt: number;
150
+ readonly status: ScheduleFireStatus;
151
+ readonly runId?: string;
152
+ /** `null` for a failure that was not an `ArgosError` (FR6.2); absent for a non-refusal. */
153
+ readonly errorCode?: string | null;
154
+ /** The missed-fire count, for a `missed` summary (FR3.4). */
155
+ readonly count?: number | "10000+";
156
+ }
157
+ /** The listener `observeScheduleFires` takes. A throwing listener never breaks the runner (FR10.4). */
158
+ export type ScheduleFireListener = (event: ScheduleFireEvent) => void;
159
+ /**
160
+ * Options for `argos schedule run` / `POST /schedules/:id/run` (FR7.6). The idempotency key is the
161
+ * same D15 receipt `POST /runs` uses, so a retried run now returns the first receipt.
162
+ */
163
+ export interface RunScheduleOptions {
164
+ readonly clientRequestId?: string;
165
+ }
166
+ /**
167
+ * Result of `removeRun`: the terminal status the run had when it was removed, and the worktree it
168
+ * leaves behind (worktrees are never removed automatically, so the caller can clean it up).
169
+ */
170
+ export interface RemoveRunResult {
171
+ readonly runId: string;
172
+ readonly status: RunRecord["status"];
173
+ readonly worktree?: string;
174
+ }
175
+ /** Result of `cancelRun`: the status the mirrored record reached. */
176
+ export interface CancelRunResult {
177
+ readonly runId: string;
178
+ readonly status: RunRecord["status"];
179
+ }
180
+ /** A run document changed (after-tasks included). Returned by `ArgosHost.observeRuns`. */
181
+ export type RunChangeListener = (runId: string) => void;
182
+ /** What `decideGate` wrote; idempotent by `gateId` (the first writer wins). */
183
+ export interface GateDecisionReceipt {
184
+ readonly runId: string;
185
+ readonly gateId: string;
186
+ readonly decision: string;
187
+ readonly comment?: string;
188
+ readonly decidedBy?: string;
189
+ readonly decidedVia?: string;
190
+ readonly decidedAt: number;
191
+ }
192
+ export interface DecideGateOptions {
193
+ readonly comment?: string;
194
+ readonly decidedBy?: string;
195
+ readonly decidedVia?: string;
196
+ /** D15: makes a retried `POST /runs/:id/gates/:gateId` a no-op success. */
197
+ readonly clientRequestId?: string;
198
+ }
199
+ /** Result of `startAfterTask` (FR11). `started: false` means it was already started/settled. */
200
+ export interface StartedAfterTask {
201
+ readonly runId: string;
202
+ readonly afterId: string;
203
+ readonly started: boolean;
204
+ readonly taskId?: string;
205
+ }
206
+ /**
207
+ * What `argos schedule add` / `POST /schedules` supplies (FR1.4, FR2.5).
208
+ *
209
+ * `id` defaults to `playbookId` when that matches {@link SCHEDULE_ID_PATTERN}; `tz` defaults to the
210
+ * zone `argos serve` runs in (FR2.2); `overlap`, `catchUp`, and `keep` fall back to the spec
211
+ * defaults, and `enabled: false` is `--paused` (FR7.1).
212
+ */
213
+ export interface AddScheduleInput {
214
+ readonly id?: string;
215
+ readonly playbookId: string;
216
+ readonly cwd: string;
217
+ readonly inputs?: Readonly<Record<string, Scalar>>;
218
+ readonly isolation?: "none" | "worktree";
219
+ readonly cron: string;
220
+ readonly tz?: string;
221
+ readonly overlap?: Overlap;
222
+ readonly catchUp?: CatchUpInput;
223
+ readonly keep?: KeepInput;
224
+ readonly enabled?: boolean;
225
+ }
226
+ /**
227
+ * What `argos schedule edit` / `POST /schedules/:id` supplies (FR7.2): any stored field except `id`,
228
+ * `uid`, and `playbookId`. At least one key must be present — a payload that changes nothing is
229
+ * `invalid_request` rather than a silent `generation` bump.
230
+ */
231
+ export interface EditScheduleInput {
232
+ readonly cwd?: string;
233
+ readonly inputs?: Readonly<Record<string, Scalar>>;
234
+ readonly isolation?: "none" | "worktree";
235
+ readonly cron?: string;
236
+ readonly tz?: string;
237
+ readonly overlap?: Overlap;
238
+ readonly catchUp?: CatchUpInput;
239
+ readonly keep?: KeepInput;
240
+ }
241
+ /**
242
+ * One schedule as the host hands it to a caller: the complete typed document, including `uid`,
243
+ * `runIds`, and `fires`. The RPC layer narrows this to `ScheduleSummary`/`ScheduleDetail`
244
+ * (FR10.1); the CLI and the tests read it as is.
245
+ */
246
+ export type ScheduleView = ScheduleDoc;
247
+ //# sourceMappingURL=host-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-types.d.ts","sourceRoot":"","sources":["../../src/durable/host-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE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5.2 split of `host.ts`, D1).
3
+ *
4
+ * These are the shapes the RPC server, the CLI, and the tests speak: no harness, no SQLite, and
5
+ * no task checkpoint crosses this boundary.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=host-types.js.map