@cleocode/contracts 2026.10.17 → 2026.10.18

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 (46) hide show
  1. package/dist/__tests__/goal-contract.test.d.ts +9 -0
  2. package/dist/__tests__/goal-contract.test.d.ts.map +1 -0
  3. package/dist/__tests__/goal-contract.test.js +107 -0
  4. package/dist/__tests__/goal-contract.test.js.map +1 -0
  5. package/dist/acceptance-gate-schema.d.ts +19 -0
  6. package/dist/acceptance-gate-schema.d.ts.map +1 -1
  7. package/dist/acceptance-gate-schema.js +28 -0
  8. package/dist/acceptance-gate-schema.js.map +1 -1
  9. package/dist/cloud/api.d.ts +6 -0
  10. package/dist/cloud/api.d.ts.map +1 -1
  11. package/dist/cloud/api.js +16 -0
  12. package/dist/cloud/api.js.map +1 -1
  13. package/dist/done-plan.d.ts +4 -2
  14. package/dist/done-plan.d.ts.map +1 -1
  15. package/dist/goal-contract.d.ts +404 -0
  16. package/dist/goal-contract.d.ts.map +1 -0
  17. package/dist/goal-contract.js +37 -0
  18. package/dist/goal-contract.js.map +1 -0
  19. package/dist/index.d.ts +5 -3
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +3 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/invariants/sync-write-invariants.js +1 -1
  24. package/dist/invariants/sync-write-invariants.js.map +1 -1
  25. package/dist/lean.d.ts +28 -0
  26. package/dist/lean.d.ts.map +1 -1
  27. package/dist/nexus-cloud.d.ts +6 -0
  28. package/dist/nexus-cloud.d.ts.map +1 -1
  29. package/dist/nexus-cloud.js +6 -0
  30. package/dist/nexus-cloud.js.map +1 -1
  31. package/dist/row-identity.d.ts +16 -0
  32. package/dist/row-identity.d.ts.map +1 -1
  33. package/dist/task.d.ts +19 -0
  34. package/dist/task.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/__tests__/goal-contract.test.ts +112 -0
  37. package/src/acceptance-gate-schema.ts +31 -0
  38. package/src/cloud/api.ts +16 -0
  39. package/src/done-plan.ts +4 -2
  40. package/src/goal-contract.ts +438 -0
  41. package/src/index.ts +39 -0
  42. package/src/invariants/sync-write-invariants.ts +1 -1
  43. package/src/lean.ts +30 -0
  44. package/src/nexus-cloud.ts +7 -0
  45. package/src/row-identity.ts +16 -0
  46. package/src/task.ts +16 -0
@@ -0,0 +1,404 @@
1
+ /**
2
+ * goal/v1 — the contract a goal runtime executes against, and what CLEO reads
3
+ * back from a run.
4
+ *
5
+ * CLEO owns the goal protocol; OpenCode-Goal (OCG) is the goal runtime (owner
6
+ * decision 2026-10-16, epic T13791). The two stay separate packages and talk
7
+ * only through the `cleo` CLI and LAFS envelopes:
8
+ *
9
+ * 1. `cleo goal draft` writes a {@link GoalContract} (`goal.yaml`) from a
10
+ * task's acceptance criteria.
11
+ * 2. The runtime locks the contract by the sha256 of its bytes, runs it, and
12
+ * writes a {@link GoalOutcome}.
13
+ * 3. `cleo goal close` reads the outcome and records evidence for each passing
14
+ * criterion on the gate it demonstrates, via {@link GoalCriterion.proves}.
15
+ *
16
+ * The shapes mirror OCG's `src/contract/types.ts` field for field, in OCG's
17
+ * snake_case YAML spelling, so one file means the same thing on both sides.
18
+ * The only addition is the optional per-criterion `proves` list.
19
+ *
20
+ * Relation to `GoalRecord` (`goal.ts`): a GoalRecord is CLEO's own
21
+ * per-agent, turn-budgeted loop state, whose criteria are free text. A goal/v1
22
+ * contract is the portable, hash-locked agreement a runtime executes; its
23
+ * criteria carry checks. They share no fields.
24
+ *
25
+ * Types only (gate 10): parsing and validation live in core.
26
+ *
27
+ * @packageDocumentation
28
+ * @module @cleocode/contracts/goal-contract
29
+ *
30
+ * @epic T13791
31
+ * @task T13792
32
+ */
33
+ /** The schema tag every goal/v1 contract carries. */
34
+ export declare const GOAL_CONTRACT_SCHEMA: "goal/v1";
35
+ /** Expected result of a {@link GoalCommandCheck}. Absent fields are not checked; no field at all means `exit: 0`. */
36
+ export interface GoalCheckExpect {
37
+ /** Required exit code. */
38
+ exit?: number;
39
+ /** Text stdout must contain. */
40
+ stdout_contains?: string;
41
+ /** Regular expression stdout must match. */
42
+ stdout_regex?: string;
43
+ }
44
+ /** The host runs a shell command and checks its result. */
45
+ export interface GoalCommandCheck {
46
+ /** Discriminant. */
47
+ kind: 'command';
48
+ /** Shell command, run from the goal workspace. */
49
+ run: string;
50
+ /** Expected result. */
51
+ expect?: GoalCheckExpect;
52
+ /** Timeout in seconds (runtime default 300). */
53
+ timeout?: number;
54
+ /** Repeat count, 1 to 10; every run must pass. */
55
+ runs?: number;
56
+ /** The command reaches a live service. */
57
+ live?: boolean;
58
+ }
59
+ /** The host checks that a path exists (or, with `exists: false`, that it does not). */
60
+ export interface GoalFileCheck {
61
+ /** Discriminant. */
62
+ kind: 'file';
63
+ /** Workspace-relative path. */
64
+ path: string;
65
+ /** Expected existence (default true). */
66
+ exists?: boolean;
67
+ }
68
+ /** The host checks that a file contains text or matches a regex. */
69
+ export interface GoalContainsCheck {
70
+ /** Discriminant. */
71
+ kind: 'contains';
72
+ /** Workspace-relative path. */
73
+ path: string;
74
+ /** Literal text to find. */
75
+ text?: string;
76
+ /** Regular expression to match. */
77
+ regex?: string;
78
+ }
79
+ /** The host checks that a pattern occurs nowhere (optionally within `paths`). */
80
+ export interface GoalAbsentCheck {
81
+ /** Discriminant. */
82
+ kind: 'absent';
83
+ /** Pattern that must not occur. */
84
+ pattern: string;
85
+ /** Paths to search; absent means the workspace. */
86
+ paths?: string[];
87
+ }
88
+ /** The host checks that the given paths are unchanged since the run's base commit (a protected oracle). */
89
+ export interface GoalDiffCheck {
90
+ /** Discriminant. */
91
+ kind: 'diff';
92
+ /** Paths (or globs) that must not change. */
93
+ paths: string[];
94
+ }
95
+ /** An independent verifier agent answers the question, citing quotes the host re-reads. */
96
+ export interface GoalVerifierCheck {
97
+ /** Discriminant. */
98
+ kind: 'verifier';
99
+ /** Question the verifier must answer. */
100
+ ask: string;
101
+ }
102
+ /** The owner signs the criterion off. */
103
+ export interface GoalHumanCheck {
104
+ /** Discriminant. */
105
+ kind: 'human';
106
+ /** Question the owner answers. */
107
+ ask: string;
108
+ }
109
+ /** How a criterion is proven. */
110
+ export type GoalCheck = GoalCommandCheck | GoalFileCheck | GoalContainsCheck | GoalAbsentCheck | GoalDiffCheck | GoalVerifierCheck | GoalHumanCheck;
111
+ /** Discriminant of {@link GoalCheck}. */
112
+ export type GoalCheckKind = GoalCheck['kind'];
113
+ /** Check kinds the host itself runs; invariants may use only these. */
114
+ export declare const GOAL_HOST_CHECK_KINDS: readonly ["command", "file", "contains", "absent", "diff"];
115
+ /**
116
+ * A CLEO acceptance-criterion reference: exactly the three target forms of a
117
+ * `satisfies:` evidence atom (`evidence-atom-schema.ts`, ADR-079-r2 §2.1).
118
+ *
119
+ * - positional `T1234#AC2` — drifts when the task's ACs are renumbered;
120
+ * - canonical `T1234#<lowercase uuid>` — the criterion's stable id, preferred
121
+ * in a hash-locked contract;
122
+ * - pinned `T1234#AC2@20260524223045` — an alias pinned to a 14-digit
123
+ * `YYYYMMDDhhmmss` version.
124
+ *
125
+ * The template types only shape the value (`${bigint}` still admits `-2`, and
126
+ * the uuid part is any dashed string). Core validates every reference with the
127
+ * real regexes: `SATISFIES_TASK_ID_REGEX` (`^T[0-9]{1,7}$`), `AC_ALIAS_REGEX`
128
+ * (`^AC[0-9]{1,4}$`), `AC_UUID_REGEX` and `SATISFIES_VERSION_PIN_REGEX`
129
+ * (`^[0-9]{14}$`).
130
+ */
131
+ export type GoalAcRef = `T${bigint}#AC${bigint}` | `T${bigint}#${string}-${string}-${string}-${string}-${string}` | `T${bigint}#AC${bigint}@${bigint}`;
132
+ /**
133
+ * One criterion (`C<n>`) or invariant (`I<n>`) of a goal.
134
+ *
135
+ * Invariants are always essential and always host-checked.
136
+ */
137
+ export interface GoalCriterion {
138
+ /** `C1`, `C2`, … for criteria; `I1`, `I2`, … for invariants. */
139
+ id: string;
140
+ /** End state that is true when the criterion holds. */
141
+ statement: string;
142
+ /** The goal is not done until every essential criterion passes. */
143
+ essential: boolean;
144
+ /** How the criterion is proven. */
145
+ check: GoalCheck;
146
+ /**
147
+ * CLEO acceptance criteria this criterion's evidence demonstrates. When the
148
+ * criterion passes, `cleo goal close` links its evidence to each one with
149
+ * `satisfies:`. Absent means the criterion proves no CLEO AC.
150
+ */
151
+ proves?: GoalAcRef[];
152
+ }
153
+ /** A decision the agent made without the owner, open to veto. */
154
+ export interface GoalAssumption {
155
+ /** `A1`, `A2`, … */
156
+ id: string;
157
+ /** What was assumed. */
158
+ text: string;
159
+ /** Why. */
160
+ rationale?: string;
161
+ /** Whether it can be undone cheaply. */
162
+ reversible?: boolean;
163
+ /** Owner disposition. */
164
+ status: 'assumed' | 'confirmed' | 'vetoed';
165
+ }
166
+ /** One plan step. */
167
+ export interface GoalStep {
168
+ /** `S1`, `S2`, … */
169
+ id: string;
170
+ /** What the step does. */
171
+ title: string;
172
+ /** Criterion ids the step proves. */
173
+ proves: string[];
174
+ /** Step ids that must finish first. */
175
+ depends_on: string[];
176
+ }
177
+ /** Optional goal priority; absent sorts last. */
178
+ export type GoalPriority = 'low' | 'medium' | 'high';
179
+ /**
180
+ * Run budget. In YAML, `wall` is a duration (`"90m"`) and `tokens` a count
181
+ * (`400k`); the parsed form holds milliseconds and integers.
182
+ */
183
+ export interface GoalBudget {
184
+ /** Agent turns. */
185
+ turns?: number;
186
+ /** Active wall-clock time, milliseconds (YAML `wall`). */
187
+ wallMs?: number;
188
+ /** Input + output + reasoning tokens. */
189
+ tokens?: number;
190
+ /** Spend ceiling in US dollars. */
191
+ cost_usd?: number;
192
+ }
193
+ /** Contract changes the owner lets the agent apply to its own contract. */
194
+ export type GoalAmendClass = 'timeout' | 'budget' | 'plan' | 'recover';
195
+ /** Owner-set autonomy policy. */
196
+ export interface GoalAutonomy {
197
+ /** Whether the agent may ask the owner questions mid-run (`defer` queues them). */
198
+ questions: 'defer' | 'allow';
199
+ /** What an owner message does to a running goal. */
200
+ on_user_message: 'steer' | 'pause';
201
+ /** What an interrupt does. */
202
+ on_interrupt: 'pause' | 'resume-on-message';
203
+ /** Amendment classes the agent may apply itself (default none). */
204
+ amend: GoalAmendClass[];
205
+ /** What the stall detector does. */
206
+ on_stall: 'pause' | 'continue';
207
+ }
208
+ /** How completion is decided. */
209
+ export type GoalVerificationMode = 'host' | 'host+verifier' | 'strict';
210
+ /** The CLEO evidence gates a goal can declare evidence for. */
211
+ export type GoalCleoGate = 'implemented' | 'testsPassed' | 'qaPassed';
212
+ /**
213
+ * A CLEO task the goal serves (OCG `CleoTaskLink`).
214
+ *
215
+ * The bare id links the task for reporting. `acs` is OCG's older per-gate
216
+ * claim of which AC aliases a gate's evidence proves; per-criterion
217
+ * {@link GoalCriterion.proves} is the precise form and what `cleo goal draft`
218
+ * writes. An AC neither form claims stays open.
219
+ */
220
+ export interface GoalTaskLink {
221
+ /** Task id (`T123`). */
222
+ id: string;
223
+ /** Per-gate AC aliases (`AC1`, …) the gate's evidence proves. */
224
+ acs?: Partial<Record<GoalCleoGate, string[]>>;
225
+ }
226
+ /** A goal/v1 contract: written by the owner (or `cleo goal draft`), locked by hash when a run starts. */
227
+ export interface GoalContract {
228
+ /** Always {@link GOAL_CONTRACT_SCHEMA}. */
229
+ schema: typeof GOAL_CONTRACT_SCHEMA;
230
+ /** Kebab-case slug; equals the goal's directory name. */
231
+ id: string;
232
+ /** Short title (under 80 characters). */
233
+ title: string;
234
+ /** Optional priority. */
235
+ priority?: GoalPriority;
236
+ /** `"<slug>@<lock-prefix>"` of the goal this one replaces. */
237
+ supersedes?: string;
238
+ /** The owner's own words, kept verbatim as the authoritative source. */
239
+ intent: {
240
+ verbatim: string;
241
+ };
242
+ /** The one end state that is true when the goal is done. */
243
+ outcome: string;
244
+ /** Why the goal matters. */
245
+ why?: string;
246
+ /** What is in and out of scope. */
247
+ scope: {
248
+ in: string[];
249
+ out: string[];
250
+ };
251
+ /** At least one non-goal. */
252
+ non_goals: string[];
253
+ /** Constraints the run must respect. */
254
+ constraints: string[];
255
+ /** At least one criterion, at least one essential. */
256
+ criteria: GoalCriterion[];
257
+ /** Host-checked conditions that must hold throughout. */
258
+ invariants: GoalCriterion[];
259
+ /** Root-relative execution workspace (default: project root). */
260
+ workspace?: string;
261
+ /** The CLEO tasks this goal serves. Absent means no CLEO behaviour. */
262
+ cleo?: {
263
+ tasks: GoalTaskLink[];
264
+ };
265
+ /** Paths the agent must not modify. */
266
+ protect: string[];
267
+ /** Decisions made without the owner. */
268
+ assumptions: GoalAssumption[];
269
+ /** Ordered plan. */
270
+ plan: GoalStep[];
271
+ /** Run budget. */
272
+ budget: GoalBudget;
273
+ /** Stop conditions. */
274
+ stop: {
275
+ when?: string;
276
+ escalate_when: string[];
277
+ };
278
+ /** Autonomy policy. */
279
+ autonomy: GoalAutonomy;
280
+ /** Verification policy. */
281
+ verification: {
282
+ /** How completion is decided (default `host+verifier`). */
283
+ mode: GoalVerificationMode;
284
+ /** Verifier rejections before the run escalates, 1 to 10 (default 3). */
285
+ max_rejections: number;
286
+ /** Folders the verifier may read. */
287
+ read: string[];
288
+ /** Verifier model, `providerID/modelID[#variant]`. */
289
+ model?: string;
290
+ /** Verifier effort. */
291
+ effort?: string;
292
+ };
293
+ /** Execution settings. */
294
+ execution: {
295
+ agent?: string;
296
+ };
297
+ /** Free-form metadata: any YAML value, opaque to CLEO. */
298
+ meta: Record<string, unknown>;
299
+ }
300
+ /** Who produced a criterion's verdict. */
301
+ export type GoalVerdictSource = 'host' | 'verifier' | 'verifier-fallback' | 'human';
302
+ /** A quote the verifier cited, which the host re-read from the file. */
303
+ export interface GoalVerifierQuote {
304
+ /** Workspace-relative path. */
305
+ path: string;
306
+ /** Exact text quoted. */
307
+ quote: string;
308
+ }
309
+ /** Evidence of a passing or failing `command` check. */
310
+ export interface GoalCommandEvidence {
311
+ /** Discriminant. */
312
+ kind: 'command';
313
+ /** The command as run. */
314
+ command: string;
315
+ /** Exit code of the last run. */
316
+ exitCode: number;
317
+ /**
318
+ * Path of a vitest-shaped JSON report the command wrote, when it ran tests.
319
+ * `cleo goal close` records it as a `test-run:` atom.
320
+ */
321
+ reportPath?: string;
322
+ /**
323
+ * sha256 (hex) of the report bytes the run produced. `cleo goal close`
324
+ * refuses a `test-run:` whose file does not hash to it, or that has none.
325
+ */
326
+ reportSha256?: string;
327
+ /** Test files the report covers. */
328
+ testFiles?: string[];
329
+ }
330
+ /**
331
+ * Evidence of a `file`, `contains`, `absent` or `diff` check.
332
+ *
333
+ * A passing `diff` proves the paths did NOT change (a protected oracle held),
334
+ * so it must never become `implemented` / `files:` evidence.
335
+ */
336
+ export interface GoalPathEvidence {
337
+ /** Discriminant: the check kind that ran. */
338
+ kind: 'file' | 'contains' | 'absent' | 'diff';
339
+ /** Repo-relative paths the check examined. */
340
+ paths: string[];
341
+ }
342
+ /** Evidence of a verifier check. */
343
+ export interface GoalVerifierEvidence {
344
+ /** Discriminant. */
345
+ kind: 'verifier';
346
+ /** The verifier's verdict. */
347
+ verdict: 'proven' | 'not_proven' | 'contradicted';
348
+ /** Quotes the verifier cited. */
349
+ quotes: GoalVerifierQuote[];
350
+ /** The verifier's reason. */
351
+ reason?: string;
352
+ }
353
+ /**
354
+ * Evidence of a human sign-off, as the runtime reports it. It is not CLEO
355
+ * evidence on its own: it counts only when CLEO's own owner or HITL record
356
+ * backs it.
357
+ */
358
+ export interface GoalHumanEvidence {
359
+ /** Discriminant. */
360
+ kind: 'human';
361
+ /** Who signed off. */
362
+ by?: string;
363
+ /** The owner's note. */
364
+ note?: string;
365
+ }
366
+ /** What a criterion's check produced. */
367
+ export type GoalCheckEvidence = GoalCommandEvidence | GoalPathEvidence | GoalVerifierEvidence | GoalHumanEvidence;
368
+ /** The verdict on one criterion or invariant. */
369
+ export interface GoalCriterionOutcome {
370
+ /** Criterion or invariant id (`C1`, `I1`). */
371
+ id: string;
372
+ /** Whether it passed. */
373
+ pass: boolean;
374
+ /** Who decided. */
375
+ by: GoalVerdictSource;
376
+ /** Human-readable detail. */
377
+ detail?: string;
378
+ /** What the check produced. */
379
+ evidence: GoalCheckEvidence;
380
+ }
381
+ /**
382
+ * What a goal run produced, written by the runtime and read by
383
+ * `cleo goal close`.
384
+ *
385
+ * `lock` ties the outcome to the exact contract bytes; `headCommit` is the
386
+ * tree the checks ran on.
387
+ */
388
+ export interface GoalOutcome {
389
+ /** Always `goal-outcome/v1`. */
390
+ schema: 'goal-outcome/v1';
391
+ /** Goal slug ({@link GoalContract.id}). */
392
+ goal: string;
393
+ /** Runtime run id. */
394
+ runId?: string;
395
+ /** sha256 (hex) of the `goal.yaml` bytes the run locked. */
396
+ lock: string;
397
+ /** Commit the run started from (the diff base), or null when none. */
398
+ baseCommit: string | null;
399
+ /** Commit the checks ran on. */
400
+ headCommit: string;
401
+ /** Per-criterion and per-invariant verdicts. */
402
+ results: GoalCriterionOutcome[];
403
+ }
404
+ //# sourceMappingURL=goal-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-contract.d.ts","sourceRoot":"","sources":["../src/goal-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,EAAG,SAAkB,CAAC;AAEvD,qHAAqH;AACrH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,uBAAuB;IACvB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MA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IACjC,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,sBAAsB;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yCAAyC;AACzC,MAAM,MAAM,iBAAiB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,CAAC;AAEtB,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB;IACnB,EAAE,EAAE,iBAAiB,CAAC;IACtB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * goal/v1 — the contract a goal runtime executes against, and what CLEO reads
3
+ * back from a run.
4
+ *
5
+ * CLEO owns the goal protocol; OpenCode-Goal (OCG) is the goal runtime (owner
6
+ * decision 2026-10-16, epic T13791). The two stay separate packages and talk
7
+ * only through the `cleo` CLI and LAFS envelopes:
8
+ *
9
+ * 1. `cleo goal draft` writes a {@link GoalContract} (`goal.yaml`) from a
10
+ * task's acceptance criteria.
11
+ * 2. The runtime locks the contract by the sha256 of its bytes, runs it, and
12
+ * writes a {@link GoalOutcome}.
13
+ * 3. `cleo goal close` reads the outcome and records evidence for each passing
14
+ * criterion on the gate it demonstrates, via {@link GoalCriterion.proves}.
15
+ *
16
+ * The shapes mirror OCG's `src/contract/types.ts` field for field, in OCG's
17
+ * snake_case YAML spelling, so one file means the same thing on both sides.
18
+ * The only addition is the optional per-criterion `proves` list.
19
+ *
20
+ * Relation to `GoalRecord` (`goal.ts`): a GoalRecord is CLEO's own
21
+ * per-agent, turn-budgeted loop state, whose criteria are free text. A goal/v1
22
+ * contract is the portable, hash-locked agreement a runtime executes; its
23
+ * criteria carry checks. They share no fields.
24
+ *
25
+ * Types only (gate 10): parsing and validation live in core.
26
+ *
27
+ * @packageDocumentation
28
+ * @module @cleocode/contracts/goal-contract
29
+ *
30
+ * @epic T13791
31
+ * @task T13792
32
+ */
33
+ /** The schema tag every goal/v1 contract carries. */
34
+ export const GOAL_CONTRACT_SCHEMA = 'goal/v1';
35
+ /** Check kinds the host itself runs; invariants may use only these. */
36
+ export const GOAL_HOST_CHECK_KINDS = ['command', 'file', 'contains', 'absent', 'diff'];
37
+ //# sourceMappingURL=goal-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-contract.js","sourceRoot":"","sources":["../src/goal-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAkB,CAAC;AAiGvD,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export type { AcceptanceGate, AcceptanceGateKind, AcceptanceGateResult, CommandGate, FileAssertion, FileGate, GateBase, GateResultDetails, HttpGate, LintGate, ManualGate, TestGate, } from './acceptance-gate.js';
9
9
  export type { AcceptanceArrayInput, AcceptanceGateResultInput, AcceptanceGateSchemaInput, AcceptanceItemInput, FileAssertionInput, GateResultDetailsInput, } from './acceptance-gate-schema.js';
10
- export { acceptanceArraySchema, acceptanceGateResultSchema, acceptanceGateSchema, acceptanceItemSchema, commandGateSchema, fileAssertionSchema, fileGateSchema, gateBaseSchema, gateResultDetailsSchema, httpGateSchema, lintGateSchema, manualGateSchema, testCountReportSchema, testGateSchema, } from './acceptance-gate-schema.js';
10
+ export { acceptanceArraySchema, acceptanceGateResultSchema, acceptanceGateSchema, acceptanceItemSchema, commandGateSchema, fileAssertionSchema, fileGateSchema, gateBaseSchema, gateResultDetailsSchema, httpGateSchema, lintGateSchema, manualGateSchema, testCountReportSchema, testCountSummarySchema, testGateSchema, } from './acceptance-gate-schema.js';
11
11
  export type { AdapterHealthStatus, CLEOProviderAdapter } from './adapter.js';
12
12
  export type { AgentCredential, AgentListFilter, AgentRegistryAPI, AgentWithProjectOverride, ProjectAgentRef, TransportConfig, } from './agent-registry.js';
13
13
  export type { AgentDoctorCode, AgentDoctorFinding, AgentRegistryExtendedFields, AgentSkillSource, AgentSpawnCapability, AgentTier, DoctorReport, ResolvedAgent, } from './agent-registry-v3.js';
@@ -77,6 +77,8 @@ export type { AdminAPI, AgentCapacity, AgentHealthStatus, AgentInstanceRow, Agen
77
77
  export { AGENT_INSTANCE_STATUSES, AGENT_TYPES, BRAIN_OBSERVATION_TYPES, } from './facade.js';
78
78
  export type { FuzzyGoal, GoalAdvanceResult, GoalContinuation, GoalJudge, GoalJudgeVerdict, GoalKind, GoalKindTag, GoalRecord, GoalStatus, TaskCompletionGoal, } from './goal.js';
79
79
  export { GOAL_STATUSES, GOAL_TARGET_TASK_ID_REGEX, GOAL_TERMINAL_STATUSES, isFuzzyGoal, isTaskCompletionGoal, isTerminalGoalStatus, isValidGoalTargetTaskId, } from './goal.js';
80
+ export type { GoalAbsentCheck, GoalAcRef, GoalAmendClass, GoalAssumption, GoalAutonomy, GoalBudget, GoalCheck, GoalCheckEvidence, GoalCheckExpect, GoalCheckKind, GoalCleoGate, GoalCommandCheck, GoalCommandEvidence, GoalContainsCheck, GoalContract, GoalCriterion, GoalCriterionOutcome, GoalDiffCheck, GoalFileCheck, GoalHumanCheck, GoalHumanEvidence, GoalOutcome, GoalPathEvidence, GoalPriority, GoalStep, GoalTaskLink, GoalVerdictSource, GoalVerificationMode, GoalVerifierCheck, GoalVerifierEvidence, GoalVerifierQuote, } from './goal-contract.js';
81
+ export { GOAL_CONTRACT_SCHEMA, GOAL_HOST_CHECK_KINDS } from './goal-contract.js';
80
82
  export type { AmbiguousProvenance, CommunityNode, ConfidenceProvenance, ExtractedProvenance, GraphEdgeConfidenceLabel, GraphIndexAssessment, GraphIndexAssessmentProjection, GraphIndexFilePage, GraphIndexFileReport, GraphIndexFileStatus, GraphIndexFileStatusCounts, GraphIndexFreshness, GraphIndexReferenceKind, GraphIndexReferenceKindCounts, GraphIndexReferencePage, GraphIndexReferenceReport, GraphIndexRunSummary, GraphNode, GraphNodeKind, GraphParseCacheEntry, GraphParseCacheUpdate, GraphPublicationRows, GraphRelation, GraphRelationType, GraphStoredReferences, ImpactResult, InferredProvenance, KnowledgeGraph, NexusNodeInsertRow, NexusRelationInsertRow, ProcessNode, SymbolIndex, } from './graph.js';
81
83
  export { confidenceFromProvenance, confidenceLabelFromNumeric, provenanceFromNumeric, } from './graph.js';
82
84
  export type { HeavyCommandHookMode, HeavyCommandHookProvider, HeavyCommandPlan, HeavyCommandSegment, HeavyHookCliProbe, HeavyHookCliState, HeavyHookDeliveryApi, HeavyHookDeliveryOptions, HeavyHookDeliveryOutcome, HeavyHookDeliveryStatus, HeavyHookInspection, HeavyHookInstallState, HookJsonValue, OpencodeHeavyCommandAnswer, PreToolUseHookInput, PreToolUseHookOutput, ShellToolInput, } from './heavy-command-hook.js';
@@ -89,7 +91,7 @@ export { KIND_LIFECYCLE_REQUIREMENTS, type KindLifecycleRequirement, } from './k
89
91
  export type { DecisionCodeEvidenceLink, DecisionCodeEvidenceOptions, DecisionCodeEvidenceResult, KnowledgeAuthority, KnowledgeAuthorityStatus, KnowledgeBackfillOptions, KnowledgeCoverage, KnowledgeCoverageStatus, KnowledgeDiagnostic, KnowledgeDiagnosticStatus, KnowledgeDoctorOptions, KnowledgeDoctorResult, KnowledgeEvidenceRef, KnowledgeFileEvidence, KnowledgeHealth, KnowledgeHealthSummary, KnowledgeRepairAction, KnowledgeRepairClass, KnowledgeRepairFinding, KnowledgeRepairProposal, KnowledgeRepairReceipt, KnowledgeRepairRecovery, KnowledgeRepairState, KnowledgeReplacement, KnowledgeSymbolCandidate, TaskKnowledgeEvidence, } from './knowledge-health.js';
90
92
  export type { CleoResponse, ConformanceReport, FlagInput, GatewayEnvelope, GatewayError, GatewayMeta, GatewaySuccess, LAFSEnvelope, LAFSError, LAFSErrorCategory, LAFSMeta, LAFSPage, LAFSPageCursor, LAFSPageNone, LAFSPageOffset, LAFSTransport, LafsAlternative, LafsEnvelope, LafsError, LafsErrorDetail, LafsSuccess, MVILevel, Warning, } from './lafs.js';
91
93
  export { isGatewayEnvelope, isLafsError, isLafsSuccess, } from './lafs.js';
92
- export type { LeanConfig, LeanDebtItem, LeanDebtReport, LeanLevel, LeanLevelSource, } from './lean.js';
94
+ export type { LeanConfig, LeanDebtItem, LeanDebtReport, LeanGainMetric, LeanGainReport, LeanLevel, LeanLevelSource, } from './lean.js';
93
95
  export type { ChildKilledUnresponsiveResponse, LeaseAcquireRequest, LeaseDeniedResponse, LeaseErrorResponse, LeaseGrantedResponse, LeaseIpcEnvelope, LeaseIpcRequest, LeaseIpcRequestEnvelope, LeaseIpcResponse, LeaseIpcResponseEnvelope, LeaseLane, LeaseQueuedResponse, LeaseReleaseRequest, LeaseRenewRequest, LeaseRevokedResponse, LeaseScope, QueueAdmitDisposition, QueueAdmitRequest, QueueAdmitResultResponse, QueuePriorityClass, RateCheckRequest, RateResultResponse, ResourceAdmitDisposition, ResourceAdmitRequest, ResourceAdmitResultResponse, ResourceReleaseRequest, ResourceReleaseResultResponse, ToolGrantedResponse, ToolGrantRequest, } from './lease-ipc/index.js';
94
96
  export { ChildKilledUnresponsiveResponseSchema, isFrozenLeaseIpcVersion, LEASE_IPC_MESSAGE_KINDS, LEASE_IPC_PROTOCOL_VERSION, LEASE_IPC_REQUEST_KINDS, LEASE_IPC_RESPONSE_KINDS, LeaseAcquireRequestSchema, LeaseDeniedResponseSchema, LeaseErrorResponseSchema, LeaseGrantedResponseSchema, LeaseIpcEnvelopeSchema, LeaseIpcRequestEnvelopeSchema, LeaseIpcRequestSchema, LeaseIpcResponseEnvelopeSchema, LeaseIpcResponseSchema, LeaseLaneSchema, LeaseQueuedResponseSchema, LeaseReleaseRequestSchema, LeaseRenewRequestSchema, LeaseRevokedResponseSchema, LeaseScopeSchema, QueueAdmitDispositionSchema, QueueAdmitRequestSchema, QueueAdmitResultResponseSchema, QueuePriorityClassSchema, RateCheckRequestSchema, RateResultResponseSchema, ResourceAdmitDispositionSchema, ResourceAdmitRequestSchema, ResourceAdmitResultResponseSchema, ResourceReleaseRequestSchema, ResourceReleaseResultResponseSchema, ToolGrantedResponseSchema, ToolGrantRequestSchema, } from './lease-ipc/index.js';
95
97
  export type { CatalogAuthType, CatalogModelEntry, CatalogModelStatus, CatalogProvider, CuratedCatalog, ModelsCatalogRowInsert, ModelsCatalogRowSelect, } from './llm/catalog-schema.js';
@@ -250,7 +252,7 @@ export { DECISION_RUNGS, DECISION_SITE_MODES } from './decide-sites.js';
250
252
  export type { NexusAccountErrorCode, NexusAccountMe, NexusAccountOrganization, NexusAccountSetup, NexusAccountSetupStep, NexusAccountStatus, NexusAccountUser, NexusDeviceEndOutcome, NexusDeviceLogoutResult, NexusDeviceLogoutRow, NexusLoginDevice, NexusLoginResult, NexusLogoutResult, NexusProjectLink, NexusProjectLinkResult, NexusReplicaAttachment, NexusSessionState, } from './nexus-account.js';
251
253
  export { NEXUS_ACCOUNT_ERROR_CODES, NEXUS_CLI_CLIENT_ID, NEXUS_DEFAULT_API_URL, NEXUS_LOGIN_TARGET, nexusAccountMeSchema, nexusAccountOrganizationSchema, nexusAccountUserSchema, } from './nexus-account.js';
252
254
  export type { CloudDevicesResult, CloudPaging, CloudProjectShowResult, CloudProjectsResult, CloudRetiredReplica, CloudStatusGlobalStore, CloudStatusHolder, CloudStatusLocal, CloudStatusOfflineDetails, CloudStatusResult, CloudStatusSummary, CloudStatusSync, CloudStatusSyncStream, CloudStatusVerdict, CloudSyncFact, CloudSyncFlags, CloudSyncKnown, CloudSyncLag, CloudSyncUnknown, CloudWarning, CloudWhoamiResult, NexusCloudCredential, NexusCloudDevice, NexusCloudDeviceCounts, NexusCloudProjectDetail, NexusCloudProjectListItem, NexusCloudReplica, NexusCloudStatus, NexusCloudStatusCheck, NexusCloudWhoami, NexusDeviceListState, NexusErrorMapping, NexusStatusCheckId, } from './nexus-cloud.js';
253
- export { CLOUD_STATUS_VERDICTS, NEXUS_CLOUD_MAX_PAGES, NEXUS_CLOUD_PROFILES, NEXUS_CONFLICT_ERRORS, NEXUS_DEVICE_LIST_STATES, NEXUS_DEVICE_STATE_UNKNOWN, NEXUS_DEVICE_STATES, NEXUS_FEATURE_PROJECT_INITIAL_KEY, NEXUS_FORBIDDEN_ERRORS, NEXUS_FORBIDDEN_REASONS, NEXUS_PAGE_LIMIT_MAX, NEXUS_PRESENCE_FRESH_SECONDS, NEXUS_REVOKED_REASON_ERRORS, NEXUS_REVOKED_REASONS, NEXUS_STATUS_CHECK_IDS, NEXUS_STATUS_VERDICTS, NEXUS_UNAUTHENTICATED_ERRORS, NEXUS_UNAUTHENTICATED_REASONS, NEXUS_UNREACHABLE_ERROR, nexusCloudCredentialSchema, nexusCloudDeviceCountsSchema, nexusCloudDevicePageSchema, nexusCloudDeviceSchema, nexusCloudOrganizationSchema, nexusCloudPresenceSchema, nexusCloudProjectDetailSchema, nexusCloudProjectListItemSchema, nexusCloudProjectPageSchema, nexusCloudReplicaPageSchema, nexusCloudReplicaSchema, nexusCloudStatusCheckSchema, nexusCloudStatusSchema, nexusCloudUserSchema, nexusCloudWhoamiSchema, } from './nexus-cloud.js';
255
+ export { CLOUD_STATUS_VERDICTS, NEXUS_CLOUD_MAX_PAGES, NEXUS_CLOUD_PROFILES, NEXUS_CONFLICT_ERRORS, NEXUS_DEVICE_LIST_STATES, NEXUS_DEVICE_STATE_UNKNOWN, NEXUS_DEVICE_STATES, NEXUS_FEATURE_MANIFEST_SNAPSHOT_AUTHORITATIVE, NEXUS_FEATURE_PROJECT_INITIAL_KEY, NEXUS_FORBIDDEN_ERRORS, NEXUS_FORBIDDEN_REASONS, NEXUS_PAGE_LIMIT_MAX, NEXUS_PRESENCE_FRESH_SECONDS, NEXUS_REVOKED_REASON_ERRORS, NEXUS_REVOKED_REASONS, NEXUS_STATUS_CHECK_IDS, NEXUS_STATUS_VERDICTS, NEXUS_UNAUTHENTICATED_ERRORS, NEXUS_UNAUTHENTICATED_REASONS, NEXUS_UNREACHABLE_ERROR, nexusCloudCredentialSchema, nexusCloudDeviceCountsSchema, nexusCloudDevicePageSchema, nexusCloudDeviceSchema, nexusCloudOrganizationSchema, nexusCloudPresenceSchema, nexusCloudProjectDetailSchema, nexusCloudProjectListItemSchema, nexusCloudProjectPageSchema, nexusCloudReplicaPageSchema, nexusCloudReplicaSchema, nexusCloudStatusCheckSchema, nexusCloudStatusSchema, nexusCloudUserSchema, nexusCloudWhoamiSchema, } from './nexus-cloud.js';
254
256
  export { NEXUS_FIRST_RUN_STATES, type NexusFirstRunBackup, type NexusFirstRunChoice, type NexusFirstRunOffer, type NexusFirstRunRestore, type NexusFirstRunResult, type NexusFirstRunState, type NexusNamedProject, type NexusProjectNameSource, } from './nexus-first-run.js';
255
257
  export { type CloudActivityItem, type CloudActivityResult, type CloudConflict, type CloudConflictField, type CloudConflictResolveResult, type CloudConflictsResult, type CloudDeviceOverviewResult, type CloudDeviceOverviewRow, type CloudJournalActivityDevice, type CloudJournalActivityItem, type CloudJournalActivityResult, type CloudJournalTableOps, type CloudLeaseReleaseResult, type CloudPushResult, type CloudRestoreResult, type CloudSyncPushEnableResult, type CloudSyncResult, type CloudSyncStreamResult, type CloudVaultLease, type CloudVaultScope, type CloudVaultSnapshot, type CloudVaultStatusResult, type CloudVaultTable, type CloudVaultTableDiff, type CloudVerifyDeepCheck, type CloudVerifyResult, NEXUS_REPLICA_RETIREMENT_REASONS, NEXUS_VAULT_LEASE_ROLE, type NexusActivityEvent, type NexusReplicaRetirementReason, nexusActivityEventSchema, nexusActivityPageSchema, nexusLeaseAcquireSchema, nexusLeaseSchema, nexusProjectKeysSchema, nexusStreamHeadSchema, nexusUserKeysSchema, } from './nexus-vault.js';
256
258
  export { SYNC_SCHEMA_VERSION } from './sync-schema.js';