@intentius/chant 0.72.2 → 0.72.3

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.
@@ -1,6 +1,7 @@
1
1
  import { type ConvergeTickRecord } from "../../lifecycle/converge-ledger.js";
2
2
  import type { OpRunRecord } from "../../op/runtime.js";
3
3
  import type { GateResolutionRecord, PendingGateRecord } from "../../lifecycle/gate-ledger.js";
4
+ import { type GateOrigin } from "../../lifecycle/gate-origin.js";
4
5
  import type { CommandContext } from "../registry.js";
5
6
  /**
6
7
  * `chant operator [--env <env>] [--interval <duration>] [--lease-ttl
@@ -115,6 +116,21 @@ export declare function runOperatorLog(ctx: CommandContext): Promise<number>;
115
116
  export declare function runApprove(ctx: CommandContext): Promise<number>;
116
117
  /** What a caller supplies alongside the op and gate names. */
117
118
  export interface GateApprovalOptions {
119
+ /**
120
+ * The channel this resolution arrived on (chant#2384). Defaults to the
121
+ * process's own — `"cli"` unless an entry point declared otherwise — and is
122
+ * a parameter only so a caller that knows better can say so.
123
+ */
124
+ origin?: GateOrigin;
125
+ /**
126
+ * Record a resolution that the same-origin rule would refuse (chant#2384).
127
+ *
128
+ * There is a legitimate case: a single operator driving an agent, who wants
129
+ * the model's run resolved from the same session and accepts what that
130
+ * means. The override exists so that is a deliberate act with a trace on the
131
+ * record, rather than the default.
132
+ */
133
+ allowSameOrigin?: boolean;
118
134
  /** `--actor`/`--approver`; falls back to the CI or shell identity. */
119
135
  actor?: string;
120
136
  /** `--note` — free-text prose. */
@@ -1 +1 @@
1
- {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/operator.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAU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B,CAAA;CAAE,GAC1C;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAElB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CA8H9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAyF9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAmWpD;AA8bD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmGvC,CAAC;AAqIF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAyF9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAuWpD;AA8bD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmGvC,CAAC;AAqIF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"op-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/op-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAoC1D,wBAAgB,gBAAgB,IAAI,gBAAgB,CAsCnD;AAED,wBAAgB,eAAe,IAAI,gBAAgB,CAuClD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAoCrD;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CA2CtD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAkDrD"}
1
+ {"version":3,"file":"op-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/op-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAoC1D,wBAAgB,gBAAgB,IAAI,gBAAgB,CAsCnD;AAED,wBAAgB,eAAe,IAAI,gBAAgB,CAuClD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAoCrD;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAyDtD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAkDrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/server.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAmE,MAAM,SAAS,CAAC;AAaxH;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK9E;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CASxI;AAED;;;GAGG;AACH,wBAAgB,kB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
  /** `chant approve <op> <gate> --expire` (#2119) — clear the gate's standing pending fact instead of approving it, so the next run decides the gate from scratch and records a fresh one. Writes no resolution: nothing is approved, the wait is only restarted. */
341
341
  expire?: boolean;
342
+ /**
343
+ * `chant approve --allow-same-origin` (chant#2384) — record a resolution
344
+ * from the same channel that reached the gate, which is refused by default
345
+ * on a model-authored channel.
346
+ */
347
+ allowSameOrigin?: boolean;
342
348
  /** `chant approve <op> <gate> --plan <digest>` (#2300) — the plan this approval is for, as `sha256:<64 hex>`. Omitted, the digest is taken from the gate's standing pending fact, which is the plan the run that stopped at the gate actually produced; pass it to approve a plan explicitly, or to approve one before any run has recorded a pending fact. */
343
349
  plan?: string;
344
350
  /** `chant operator log --op <name>` (#2029) — restrict the tick history to one ConvergeOp by name. Omitted, every discovered ConvergeOp's ticks are merged into one timeline. */
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,K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@@ -213,6 +213,8 @@ export interface FoldSession {
213
213
  * only the fold half would buy nothing there.
214
214
  */
215
215
  readonly sandbox: boolean;
216
+ /** chant#2455 — `ι = executing`: invoke a declared project function whose body did not fold. */
217
+ readonly executing: boolean;
216
218
  /**
217
219
  * chant #1023 — per-build memo for {@link readFactoryModule}, keyed by the
218
220
  * resolved absolute path of a module that DEFINES a composite. A composite
@@ -265,7 +267,9 @@ export declare function createFoldSession(intrinsics?: readonly IntrinsicDef[],
265
267
  * unchanged, an explicitly named package of this build, only now it can be
266
268
  * named as a specifier rather than only as a lexicon.
267
269
  */
268
- lexiconPackages?: readonly string[]): FoldSession;
270
+ lexiconPackages?: readonly string[],
271
+ /** chant#2455 — `ι = executing`. Mutually exclusive with `sandbox`. */
272
+ executing?: boolean): FoldSession;
269
273
  /**
270
274
  * What the fold pass actually EXECUTED, and what it interpreted instead — the
271
275
  * number chant #1023 is measured by, and the one the #1093/#1111
@@ -528,6 +532,25 @@ export interface FoldProjectOptions {
528
532
  readonly buildParams?: Readonly<Record<string, BuildParamValue>>;
529
533
  /** chant #1093: this build asked for the sandbox, so fold may not reach outside the trusted allowlist. */
530
534
  readonly sandbox?: boolean;
535
+ /**
536
+ * chant#2455 — opt in to `ι = executing`, the third isolation mode
537
+ * (typescript-as-data spec `1.8`).
538
+ *
539
+ * Under it, a declarator call to a declared project function whose body
540
+ * cannot fold continues at `F-Call` step 6 and is invoked, so the fold's
541
+ * value is what a run would compute **in the folding process's
542
+ * environment**. That is the behaviour chant had before #2453, where it was
543
+ * the silent default and leaked the folding shell's `process.env` into the
544
+ * output of a file reported as `fold`.
545
+ *
546
+ * It is here as a mode rather than gone, because the value is real when the
547
+ * caller means it. What it cannot be is implicit: `open` is the default and
548
+ * is strict, so a build that wants a run's answer has to say so.
549
+ *
550
+ * Mutually exclusive with {@link sandbox}, which refuses to import project
551
+ * code at all. Asking for both is a contradiction and refuses.
552
+ */
553
+ readonly executing?: boolean;
531
554
  /**
532
555
  * chant#2438 — package specifiers to follow a bare import into, verbatim,
533
556
  * alongside whatever `lexicons` names.
@@ -1 +1 @@
1
- {"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;AAyC7G,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,mGAAmG;AACnG,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC,CAAC;AAElF,MAAM,MAAM,cAAc,GACtB;IACE,EAAE,EAAE,IAAI,CAAC;IACT;;;;;;;;OAQG;IACH,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB;;;;;;;;;;;;;OAaG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;;;;;;;;OAYG;IACH,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAClC,GACD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,UAAU,EAAE,SAAS,YAAY,EAAE,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACz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ACjE,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC;IAC3D,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAgD1C"}
@@ -1,3 +1,4 @@
1
+ import { type GateOrigin } from "./gate-origin.js";
1
2
  /**
2
3
  * The address of the approval surface for a gate, resolved from the CI
3
4
  * environment (#2028).
@@ -68,6 +69,27 @@ export interface GateResolutionRecord {
68
69
  * such a record proves is that somebody approved *something*.
69
70
  */
70
71
  planDigest?: string;
72
+ /**
73
+ * The channel this resolution was authored on (chant#2384) — set by the
74
+ * writer, never by the caller. `chant approve` records `"cli"`, the
75
+ * `op-approve` MCP tool records `"mcp"`, an ACP-driven approve records
76
+ * `"acp"`.
77
+ *
78
+ * Absent on every resolution written before chant#2384, and absent is not
79
+ * `"cli"`: an old record simply does not say. `sameOriginRefusal`
80
+ * (./gate-origin.ts) refuses only on a positive match, so an unlabelled
81
+ * record is never refused on this ground.
82
+ */
83
+ origin?: GateOrigin;
84
+ /**
85
+ * This resolution was recorded from the same channel that reached the gate,
86
+ * deliberately (chant#2384's `--allow-same-origin`).
87
+ *
88
+ * On the record rather than only in the console, because the point of the
89
+ * refusal is that someone chose to bypass it. A reader auditing the ledger
90
+ * later should see which approvals had a second party and which did not.
91
+ */
92
+ sameOriginOverride?: boolean;
71
93
  }
72
94
  export type GateResolutionInput = Omit<GateResolutionRecord, "version" | "kind">;
73
95
  /**
@@ -111,6 +133,13 @@ export interface PendingGateRecord {
111
133
  * step with no `plan`), which is the shape every gate had before #2300.
112
134
  */
113
135
  planDigest?: string;
136
+ /**
137
+ * The channel the run that reached this gate was driven from (chant#2384).
138
+ *
139
+ * This is the half a resolution is compared against: a gate reached over MCP
140
+ * and resolved over MCP has one author, not two.
141
+ */
142
+ origin?: GateOrigin;
114
143
  }
115
144
  export type PendingGateInput = Omit<PendingGateRecord, "version" | "kind">;
116
145
  /** Either kind of line in `_gates/<op>.jsonl`. */
@@ -1 +1 @@
1
- {"version":3,"file":"gate-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-ledger.ts"],"names":[],"mappings":"AAiDA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAY3F;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOlD;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,wFAAwF;IACxF,OAAO,EAAE,CAAC,CAAC;IACX,8KAA8K;IAC9K,IAAI,CAAC,EAAE,YAAY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AAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,oBAAoB,GAAG,SAAS,CASlC;AAED,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,oBAAoB,EAAE,EAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,mBAAmB,CAuBrB"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Which channel a gate fact was authored on — chant#2384.
3
+ *
4
+ * The gate is the strongest thing chant says about agent-driven change: a run
5
+ * that reaches an unapproved gate records a pending fact and exits 3, and since
6
+ * #2300 a resolution counts only for the plan it names. That property rests on
7
+ * the two halves being authored by different parties.
8
+ *
9
+ * `gate-ledger.ts` already states the trust boundary, and is right about it:
10
+ *
11
+ * > this record is *not* itself an authorization check — anyone who can run
12
+ * > `chant approve` locally can write one, the same trust boundary a local
13
+ * > commit already has.
14
+ *
15
+ * That holds at a shell. A person who can run `chant approve` can also run
16
+ * `chant run`, and the ledger records what they did. It stops holding on MCP
17
+ * and ACP, because the person's only act was launching the server once; every
18
+ * call after that is authored by the model. `op-run` returns the gate it
19
+ * stopped on and `op-approve` resolves it, so the same caller writes both
20
+ * halves and the separation is gone.
21
+ *
22
+ * The ledger could not tell those situations apart, because both produce a
23
+ * `resolvedBy` string with no record of where it came from. This records the
24
+ * where.
25
+ *
26
+ * ## Why an ambient value rather than a parameter
27
+ *
28
+ * A channel is a property of the process, not of a call. A `chant mcp` server
29
+ * is launched once by a person and then serves a model for its lifetime; there
30
+ * is no call on it that is not model-authored. So the origin is established at
31
+ * the entry point and read by whoever writes a ledger line, rather than
32
+ * threaded through every runtime, executor and step that sits between them.
33
+ *
34
+ * This is provenance, not authentication. It records the door a fact came
35
+ * through. It does not prove who was behind it, and nothing here should be read
36
+ * as if it did — see {@link UNATTESTED_APPROVER}.
37
+ */
38
+ /** A channel a gate fact can be authored on. */
39
+ export type GateOrigin = "cli" | "mcp" | "acp";
40
+ /** Whether a channel's calls are authored by a model rather than by a person. */
41
+ export declare function isModelAuthored(origin: GateOrigin | undefined): boolean;
42
+ /**
43
+ * What `resolvedBy` says for a resolution recorded on a channel that cannot
44
+ * attest to a name.
45
+ *
46
+ * `op-approve` used to take a free-text `approver` and write it down. Recording
47
+ * a name the model chose is worse than recording nothing, because it reads in
48
+ * the ledger exactly like a name a person gave. This is the honest value.
49
+ */
50
+ export declare const UNATTESTED_APPROVER = "unattested";
51
+ /**
52
+ * Declare the channel this process serves. Called once at an entry point, not
53
+ * per call: `chant mcp` sets `"mcp"` before it serves anything, `chant acp`
54
+ * sets `"acp"`, and the CLI leaves the default.
55
+ */
56
+ export declare function setGateOrigin(origin: GateOrigin): void;
57
+ /** The channel this process serves. `"cli"` unless an entry point said otherwise. */
58
+ export declare function currentGateOrigin(): GateOrigin;
59
+ /** Restore the default. For tests, which must not leak a channel into each other. */
60
+ export declare function resetGateOrigin(): void;
61
+ /**
62
+ * Why a resolution from this origin cannot answer a pending fact from the same
63
+ * one, or `undefined` when it can.
64
+ *
65
+ * The rule, and the two cases it deliberately leaves alone:
66
+ *
67
+ * - Same channel, model-authored. Refused. `op-run` produced the pending
68
+ * fact and `op-approve` would resolve it, both authored by the same model
69
+ * in the same session. Nothing about that is an approval.
70
+ * - Same channel, `cli`. Allowed. A person ran `chant run`, read the plan and
71
+ * ran `chant approve`. That is the intended workflow and the trust boundary
72
+ * the ledger already documents.
73
+ * - Different channels. Allowed, and the point: a model's run approved by a
74
+ * person at a shell is exactly the separation the gate is for.
75
+ */
76
+ export declare function sameOriginRefusal(pendingOrigin: GateOrigin | undefined, resolutionOrigin: GateOrigin): string | undefined;
77
+ //# sourceMappingURL=gate-origin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-origin.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAY/C,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEvE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAEtD;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,IAAI,UAAU,CAE9C;AAED,qFAAqF;AACrF,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,UAAU,GAAG,SAAS,EACrC,gBAAgB,EAAE,UAAU,GAC3B,MAAM,GAAG,SAAS,CAOpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.72.2",
3
+ "version": "0.72.3",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
package/src/audit/core.ts CHANGED
@@ -288,7 +288,7 @@ function runChecks(
288
288
  }
289
289
 
290
290
  function diagKey(d: { checkId: string; entity?: string; message: string }): string {
291
- return `${d.checkId}${d.entity ?? ""}${d.message}`;
291
+ return `${d.checkId}\u0000${d.entity ?? ""}\u0000${d.message}`;
292
292
  }
293
293
 
294
294
  /**
@@ -29,6 +29,9 @@ import { readConvergeLedger, type ConvergeTickRecord } from "../../lifecycle/con
29
29
  import { readRunLedger } from "../../lifecycle/run-ledger";
30
30
  import type { OpRunRecord } from "../../op/runtime";
31
31
  import type { GateResolutionRecord, PendingGateRecord } from "../../lifecycle/gate-ledger";
32
+ import {
33
+ currentGateOrigin, isModelAuthored, sameOriginRefusal, UNATTESTED_APPROVER, type GateOrigin,
34
+ } from "../../lifecycle/gate-origin";
32
35
  import {
33
36
  appendGateResolution, appendPendingGate, readGateResolutions, readGateLedger,
34
37
  latestResolutionSince, latestPendingGate, isPendingGateExpired,
@@ -694,6 +697,7 @@ export async function runApprove(ctx: CommandContext): Promise<number> {
694
697
  note: ctx.args.note,
695
698
  url: ctx.args.url,
696
699
  plan: ctx.args.plan,
700
+ allowSameOrigin: ctx.args.allowSameOrigin,
697
701
  });
698
702
  if (!outcome.ok) return 1;
699
703
 
@@ -708,6 +712,21 @@ export async function runApprove(ctx: CommandContext): Promise<number> {
708
712
 
709
713
  /** What a caller supplies alongside the op and gate names. */
710
714
  export interface GateApprovalOptions {
715
+ /**
716
+ * The channel this resolution arrived on (chant#2384). Defaults to the
717
+ * process's own — `"cli"` unless an entry point declared otherwise — and is
718
+ * a parameter only so a caller that knows better can say so.
719
+ */
720
+ origin?: GateOrigin;
721
+ /**
722
+ * Record a resolution that the same-origin rule would refuse (chant#2384).
723
+ *
724
+ * There is a legitimate case: a single operator driving an agent, who wants
725
+ * the model's run resolved from the same session and accepts what that
726
+ * means. The override exists so that is a deliberate act with a trace on the
727
+ * record, rather than the default.
728
+ */
729
+ allowSameOrigin?: boolean;
711
730
  /** `--actor`/`--approver`; falls back to the CI or shell identity. */
712
731
  actor?: string;
713
732
  /** `--note` — free-text prose. */
@@ -815,7 +834,33 @@ export async function recordGateApproval(
815
834
  planDigest = standing.planDigest;
816
835
  }
817
836
 
818
- const resolvedBy = opts.actor ?? process.env.GITHUB_ACTOR ?? process.env.GITLAB_USER_LOGIN ?? process.env.USER ?? "unknown";
837
+ // chant#2384 — the gate's whole value is that its two halves have different
838
+ // authors. At a shell they do: a person runs, reads the plan, and approves.
839
+ // On MCP and ACP the person's only act was launching the server, and every
840
+ // call after is the model's, so a gate reached over one of those channels and
841
+ // resolved over the same one has no second party in it. Refused by default,
842
+ // the way #2300 refuses a plan nobody approved.
843
+ const origin = opts.origin ?? currentGateOrigin();
844
+ const standingForOrigin = latestPendingGate((await readGateLedger(opName)).pending, gate);
845
+ const refusal = sameOriginRefusal(standingForOrigin?.origin, origin);
846
+ if (refusal && !opts.allowSameOrigin) {
847
+ console.error(formatError({
848
+ message: `Gate "${gate}" on "${opName}" cannot be resolved from here: ${refusal}`,
849
+ hint:
850
+ `Approve it from a channel the run did not come from — \`chant approve ${opName} ${gate}\` ` +
851
+ `at a shell is the usual one. If resolving from the same channel genuinely is the intent, ` +
852
+ `pass --allow-same-origin, which records that it was deliberate.`,
853
+ }));
854
+ return { ok: false };
855
+ }
856
+
857
+ const resolvedBy = opts.actor
858
+ ?? (isModelAuthored(origin)
859
+ // A channel that cannot attest to a name does not get to write one down.
860
+ // "unattested" reads as what it is; a name the model chose would read in
861
+ // the ledger exactly like a name a person gave.
862
+ ? UNATTESTED_APPROVER
863
+ : process.env.GITHUB_ACTOR ?? process.env.GITLAB_USER_LOGIN ?? process.env.USER ?? "unknown");
819
864
 
820
865
  const { record } = await appendGateResolution({
821
866
  op: opName,
@@ -825,6 +870,8 @@ export async function recordGateApproval(
825
870
  ...(opts.note ? { note: opts.note } : {}),
826
871
  ...(url ? { url } : {}),
827
872
  ...(planDigest !== undefined ? { planDigest } : {}),
873
+ origin,
874
+ ...(refusal && opts.allowSameOrigin ? { sameOriginOverride: true } : {}),
828
875
  });
829
876
  const pushed = await reportedPush(
830
877
  `The resolution is recorded locally on ${LIFECYCLE_BRANCH}. Until it reaches the remote, ` +
package/src/cli/main.ts CHANGED
@@ -411,6 +411,10 @@ export function parseArgs(args: string[]): ParsedArgs {
411
411
  result.note = args[++i];
412
412
  } else if (arg === "--expire") {
413
413
  result.expire = true;
414
+ } else if (arg === "--allow-same-origin") {
415
+ // chant#2384 — record a resolution the same-origin rule would refuse,
416
+ // deliberately. Flagged on the record, not just accepted quietly.
417
+ result.allowSameOrigin = true;
414
418
  } else if (arg === "--plan") {
415
419
  result.plan = args[++i];
416
420
  } else if (arg === "--url") {
@@ -0,0 +1,70 @@
1
+ import { describe, test, expect, afterEach } from "vitest";
2
+ import { createOpApproveTool } from "./op-tools";
3
+ import { McpServer } from "./server";
4
+ import { readFileSync } from "node:fs";
5
+ import { resetGateOrigin, currentGateOrigin } from "../../lifecycle/gate-origin";
6
+
7
+ /**
8
+ * chant#2384 — the MCP surface cannot both produce a gate and resolve it.
9
+ *
10
+ * `op-run` executes the Op in-process and returns the gate it stopped on;
11
+ * `op-approve` then wrote the resolution with the approver taken from the
12
+ * request. So the agent that produced a pending gate resolved it under any
13
+ * name it liked, and #2300's plan binding did not close it: the digest comes
14
+ * off the standing pending fact, which is the plan the same caller produced one
15
+ * tool call earlier. The approval was for the right plan and meant nothing.
16
+ *
17
+ * These assert the two halves of the fix that are visible without a ledger: the
18
+ * tool no longer offers a name it cannot verify, and constructing the server
19
+ * declares the channel. The rule itself is exercised in
20
+ * `../../lifecycle/gate-origin.test.ts`.
21
+ */
22
+ describe("op-approve on the MCP channel (chant#2384)", () => {
23
+ afterEach(() => resetGateOrigin());
24
+
25
+ test("the tool no longer accepts a free-text approver", () => {
26
+ const schema = createOpApproveTool().definition.inputSchema as {
27
+ properties: Record<string, unknown>;
28
+ required: string[];
29
+ };
30
+
31
+ // The hole, stated as a test: `approver` was free text on a channel that
32
+ // cannot verify one, and the ledger recorded it indistinguishably from a
33
+ // name a person gave. Recording "unattested" is more honest than recording
34
+ // a name the model chose.
35
+ expect(Object.keys(schema.properties)).not.toContain("approver");
36
+
37
+ // The rest of the tool is unchanged — this narrows one field, it does not
38
+ // remove the tool. The narrower alternative in the issue was to drop
39
+ // op-approve entirely; this keeps it useful for the cross-channel case.
40
+ expect(Object.keys(schema.properties).sort()).toEqual(["gate", "name", "note", "runtime", "url"]);
41
+ expect(schema.required.sort()).toEqual(["gate", "name"]);
42
+ });
43
+
44
+ test("the description tells the caller where an approval has to come from", () => {
45
+ // A model reads this string and nothing else. If it does not say that the
46
+ // gate must be approved elsewhere, the model's only signal is a refusal it
47
+ // cannot act on.
48
+ const description = createOpApproveTool().definition.description;
49
+ expect(description).toMatch(/refuses a gate this same channel reached/i);
50
+ expect(description).toContain("chant approve");
51
+ expect(description).toMatch(/unattested/i);
52
+ });
53
+
54
+ test("merely constructing a server does not change what the process is", () => {
55
+ // Deliberate: the channel is declared in `start()`, not the constructor.
56
+ // Building a server object in a test must not make every later gate fact in
57
+ // that worker read as model-authored — which is exactly the contamination
58
+ // the first version of this caused.
59
+ new McpServer();
60
+ expect(currentGateOrigin()).toBe("cli");
61
+ });
62
+
63
+ test("op-approve names its own channel, so it holds even on a server that never started", () => {
64
+ // The ambient value covers the pending fact written during `op-run`. The
65
+ // resolution does not rely on it: the tool passes `origin: "mcp"` outright,
66
+ // so the rule holds regardless of what the process thinks it is.
67
+ const source = readFileSync(new URL("./op-tools.ts", import.meta.url), "utf8");
68
+ expect(source).toContain('origin: "mcp"');
69
+ });
70
+ });
@@ -181,13 +181,18 @@ export function createOpApproveTool(): ToolRegistration {
181
181
  definition: {
182
182
  name: "op-approve",
183
183
  description:
184
- "Record a gate's resolution on the gate ledger and wake the runtime hosting the gated run. The rename of op-signal: a gate is resolved by recording the fact, not by sending a message.",
184
+ "Record a gate's resolution on the gate ledger and wake the runtime hosting the gated run. " +
185
+ "Refuses a gate this same channel reached: a run started with op-run must be approved from " +
186
+ "somewhere else, normally `chant approve <op> <gate>` at a shell. The approver is recorded as " +
187
+ "unattested, because this channel cannot verify a name.",
185
188
  inputSchema: {
186
189
  type: "object",
187
190
  properties: {
188
191
  name: { type: "string", description: "Op name (e.g. alb-deploy)" },
189
192
  gate: { type: "string", description: "Gate name (e.g. gate-dns-delegation)" },
190
- approver: { type: "string", description: "Who approved; defaults to the CI or shell identity" },
193
+ // chant#2384 — no `approver`. It was free text on a channel that
194
+ // cannot verify one, so the model named itself whatever it liked and
195
+ // the ledger recorded it indistinguishably from a name a person gave.
191
196
  note: { type: "string", description: "Free-text context recorded on the resolution" },
192
197
  url: { type: "string", description: "Absolute http/https URL this resolution happened at" },
193
198
  runtime: RUNTIME_PARAM,
@@ -202,11 +207,19 @@ export function createOpApproveTool(): ToolRegistration {
202
207
 
203
208
  const runtime = await runtimeFor(params.runtime);
204
209
  const outcome = await recordGateApproval(name, gate, {
205
- actor: params.approver as string | undefined,
206
210
  note: params.note as string | undefined,
207
211
  url: params.url as string | undefined,
212
+ // Named rather than left to the ambient value, so this tool states its
213
+ // own channel even if it is ever registered on a server that did not.
214
+ origin: "mcp",
208
215
  });
209
- if (!outcome.ok) throw new Error(`Gate "${gate}" on "${name}" was not recorded`);
216
+ if (!outcome.ok) {
217
+ throw new Error(
218
+ `Gate "${gate}" on "${name}" was not recorded. If the gate was reached over MCP, it cannot ` +
219
+ `also be resolved over MCP — approve it from another channel, normally ` +
220
+ `\`chant approve ${name} ${gate}\` at a shell.`,
221
+ );
222
+ }
210
223
 
211
224
  if (runtime.resolveGate) await runtime.resolveGate(name, gate, outcome.record);
212
225
 
@@ -214,6 +227,7 @@ export function createOpApproveTool(): ToolRegistration {
214
227
  op: name,
215
228
  gate,
216
229
  resolvedBy: outcome.record.resolvedBy,
230
+ origin: outcome.record.origin,
217
231
  timestamp: outcome.record.timestamp,
218
232
  runtimeNotified: Boolean(runtime.resolveGate),
219
233
  };
@@ -9,6 +9,7 @@ import { searchTool, createSearchHandler } from "./tools/search";
9
9
  import type { LexiconPlugin } from "../../lexicon";
10
10
  import type { McpRequest, McpResponse, McpRequestMeta, ToolDefinition, ToolHandler, ResourceDefinition } from "./types";
11
11
  import { createSnapshotTool, createDiffTool } from "./lifecycle-tools";
12
+ import { setGateOrigin } from "../../lifecycle/gate-origin";
12
13
  import { createOpListTool, createOpRunTool, createOpStatusTool, createOpApproveTool, createOpReportTool } from "./op-tools";
13
14
  import { buildResourcesList, handleResourcesRead } from "./resource-handlers";
14
15
 
@@ -302,6 +303,16 @@ export class McpServer {
302
303
  * Start the MCP server on stdio
303
304
  */
304
305
  async start(): Promise<void> {
306
+ // chant#2384 — declared here rather than in the constructor, because this
307
+ // is where the PROCESS becomes an MCP server. Constructing the object does
308
+ // not change what the process is, and a test that builds one should not
309
+ // silently make every later gate fact in that worker read as model-authored.
310
+ //
311
+ // From here on a person's only act was launching this; every call is the
312
+ // model's. So every gate fact written records the channel it came through,
313
+ // and a gate reached here cannot also be resolved here.
314
+ setGateOrigin("mcp");
315
+
305
316
  const rl = createInterface({
306
317
  input: process.stdin,
307
318
  output: process.stdout,
@@ -341,6 +341,12 @@ export interface ParsedArgs {
341
341
  note?: string;
342
342
  /** `chant approve <op> <gate> --expire` (#2119) — clear the gate's standing pending fact instead of approving it, so the next run decides the gate from scratch and records a fresh one. Writes no resolution: nothing is approved, the wait is only restarted. */
343
343
  expire?: boolean;
344
+ /**
345
+ * `chant approve --allow-same-origin` (chant#2384) — record a resolution
346
+ * from the same channel that reached the gate, which is refused by default
347
+ * on a model-authored channel.
348
+ */
349
+ allowSameOrigin?: boolean;
344
350
  /** `chant approve <op> <gate> --plan <digest>` (#2300) — the plan this approval is for, as `sha256:<64 hex>`. Omitted, the digest is taken from the gate's standing pending fact, which is the plan the run that stopped at the gate actually produced; pass it to approve a plan explicitly, or to approve one before any run has recorded a pending fact. */
345
351
  plan?: string;
346
352
  /** `chant operator log --op <name>` (#2029) — restrict the tick history to one ConvergeOp by name. Omitted, every discovered ConvergeOp's ticks are merged into one timeline. */