@intutic/gate 2.0.0 → 2.2.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.
- package/README.md +18 -10
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +2 -0
- package/dist/actions.js.map +1 -1
- package/dist/dsh.d.ts +27 -2
- package/dist/dsh.d.ts.map +1 -1
- package/dist/dsh.js +23 -1
- package/dist/dsh.js.map +1 -1
- package/dist/eve.d.ts +81 -14
- package/dist/eve.d.ts.map +1 -1
- package/dist/eve.js +93 -10
- package/dist/eve.js.map +1 -1
- package/dist/gate.d.ts +3 -4
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +21 -10
- package/dist/gate.js.map +1 -1
- package/dist/harness.d.ts +86 -31
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js +103 -28
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/managedAgents.d.ts +35 -6
- package/dist/managedAgents.d.ts.map +1 -1
- package/dist/managedAgents.js +26 -6
- package/dist/managedAgents.js.map +1 -1
- package/dist/mastra.d.ts +5 -2
- package/dist/mastra.d.ts.map +1 -1
- package/dist/mastra.js +3 -1
- package/dist/mastra.js.map +1 -1
- package/dist/openai.d.ts +5 -3
- package/dist/openai.d.ts.map +1 -1
- package/dist/openai.js +5 -3
- package/dist/openai.js.map +1 -1
- package/dist/registry.d.ts +18 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +24 -0
- package/dist/registry.js.map +1 -0
- package/dist/snapshot.d.ts +8 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/snapshot.js +17 -1
- package/dist/snapshot.js.map +1 -1
- package/dist/ssoGroups.d.ts +44 -0
- package/dist/ssoGroups.d.ts.map +1 -0
- package/dist/ssoGroups.js +81 -0
- package/dist/ssoGroups.js.map +1 -0
- package/dist/vercel.d.ts +3 -3
- package/dist/vercel.d.ts.map +1 -1
- package/dist/vercel.js +1 -1
- package/dist/vercel.js.map +1 -1
- package/dist/workflow.d.ts +153 -39
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +162 -49
- package/dist/workflow.js.map +1 -1
- package/dist/wrapTools.d.ts +1 -1
- package/dist/wrapTools.d.ts.map +1 -1
- package/dist/wrapTools.js +1 -1
- package/dist/wrapTools.js.map +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -131,8 +131,9 @@ minimum versions).
|
|
|
131
131
|
`HarnessAgent` runs coding-agent runtimes (Claude Code, Grok Build, ...)
|
|
132
132
|
**server-side, in Vercel Sandbox microVMs** — a materially different execution
|
|
133
133
|
model from every other adapter in this package, and its veto surface differs
|
|
134
|
-
to match. Confirmed against `@ai-sdk/harness@1.0.75`
|
|
135
|
-
type-checked and exercised in
|
|
134
|
+
to match. Confirmed against `@ai-sdk/harness@1.0.75` and re-verified on
|
|
135
|
+
1.0.138 with `ai` 7.0.127 (a devDependency, type-checked and exercised in
|
|
136
|
+
`src/__tests__/harness.test.ts`):
|
|
136
137
|
|
|
137
138
|
- The `toolApproval` setting is a **static** `Readonly<Record<string,
|
|
138
139
|
ToolApprovalStatus>>` — "without callback support" (the shipped doc's own
|
|
@@ -167,17 +168,24 @@ type-checked and exercised in `src/__tests__/harness.test.ts`):
|
|
|
167
168
|
|
|
168
169
|
## `@intutic/gate/workflow` — Vercel `@ai-sdk/workflow` (durable workflow agents)
|
|
169
170
|
|
|
170
|
-
`WorkflowAgent` has **
|
|
171
|
-
`@ai-sdk/workflow@1.0.69`
|
|
171
|
+
`WorkflowAgent` has **no approval-policy field** (confirmed against
|
|
172
|
+
`@ai-sdk/workflow@1.0.69` and 2.0.58; 2.x needs `workflow` 5); its veto
|
|
173
|
+
surface is per-tool `needsApproval`,
|
|
172
174
|
which pauses a call **durably** (a human can approve hours later).
|
|
173
|
-
`
|
|
174
|
-
|
|
175
|
-
`
|
|
175
|
+
`WorkflowAgent` calls `needsApproval` inside the workflow VM, which has no
|
|
176
|
+
Node.js, so the gate runs in a `"use step"` function you declare, whose body is
|
|
177
|
+
`intuticApprovalStep(toolName, input, { gate })`.
|
|
178
|
+
`withIntuticApproval(tools, { step })` attaches a `needsApproval` that calls
|
|
179
|
+
that step to every tool in a record, composing with any `needsApproval` a tool
|
|
180
|
+
already declares; `intuticNeedsApproval(toolName, { step })` builds one. This
|
|
181
|
+
module imports nothing that needs Node.js, so workflow code can import it.
|
|
182
|
+
Without `{ step }` the gate is evaluated in-process (Node.js only; in the
|
|
183
|
+
workflow VM it throws a refusal naming the `{ step }` fix).
|
|
176
184
|
|
|
177
185
|
The durable runtime **retries** thrown errors — and its retry/abort decision
|
|
178
186
|
duck-types on `error.name === 'FatalError'` (`FatalError.is()`, confirmed
|
|
179
|
-
against `workflow@4.8.3`'s real machinery, because workflows run in
|
|
180
|
-
`vm` realm where `instanceof`
|
|
187
|
+
against `workflow@4.8.3`'s and 5.0.1's real machinery, because workflows run in
|
|
188
|
+
a separate `vm` realm where `instanceof` cannot be relied on). A plain `IntuticGateRefusal` thrown from
|
|
181
189
|
`needsApproval` would be retried toward max attempts — a governance denial
|
|
182
190
|
replayed on a timer. This adapter therefore throws `IntuticWorkflowRefusal`:
|
|
183
191
|
still an `IntuticGateRefusal` (message, `.reason`/`.code`/`.incidentId`
|
|
@@ -218,7 +226,7 @@ Eight adapters exist today, one source file each: `@intutic/gate/dsh`
|
|
|
218
226
|
(`src/vercel.ts`), `@intutic/gate/openai` (`src/openai.ts` — see above),
|
|
219
227
|
`@intutic/gate/eve` (`src/eve.ts` — approval policies for eve's
|
|
220
228
|
per-tool/per-connection `approval` surface, plus the observe-only
|
|
221
|
-
`intuticAuditHooks()`; verified against a pinned `eve@0.
|
|
229
|
+
`intuticAuditHooks()`; verified against a pinned `eve@0.71.0` install — a
|
|
222
230
|
pre-1.0 Preview product, see its module doc and TD-410), `@intutic/gate/harness`
|
|
223
231
|
(`src/harness.ts` — see above), `@intutic/gate/workflow` (`src/workflow.ts`
|
|
224
232
|
— see above), and `@intutic/gate/managed-agents` (`src/managedAgents.ts` — see
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,aAAa,YAAY,CAAA;AAEtC,0DAA0D;AAC1D,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAe5C,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAS7C,CAAA;AAED,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAO7C,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAqB1C,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAO/C,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAO9C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAclD,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAO/C,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,aAAa,YAAY,CAAA;AAEtC,0DAA0D;AAC1D,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAe5C,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAS7C,CAAA;AAED,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,EAAE,SAAS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AE,OAAO,GAAG,OAAO,CAEpE;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAErE"}
|
package/dist/actions.js
CHANGED
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAA;AAEtC,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,UAAU;IACV,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,WAAW;CACZ,CAAA;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,UAAU;IACV,sBAAsB;CACvB,CAAA;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,mBAAmB;IACnB,SAAS;IACT,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,kBAAkB;CACnB,CAAA;AAED,sCAAsC;AACtC,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,UAAU;IACV,cAAc;IACd,WAAW;IACX,eAAe;IACf,WAAW;IACX,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,WAAW;IACX,aAAa;IACb,UAAU;IACV,aAAa;IACb,YAAY;IACZ,KAAK;CACN,CAAA;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,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CAAC,CAAA;AAC5E,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,YAAY,CAAC,IAA+B;IAC1D,OAAO,UAAU,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,oBAAoB,CAAC,CAAA;AACrE,CAAC"}
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAA;AAEtC,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,UAAU;IACV,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,WAAW;CACZ,CAAA;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,UAAU;IACV,sBAAsB;CACvB,CAAA;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,mBAAmB;IACnB,SAAS;IACT,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,kBAAkB;CACnB,CAAA;AAED,sCAAsC;AACtC,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,UAAU;IACV,cAAc;IACd,WAAW;IACX,eAAe;IACf,WAAW;IACX,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,WAAW;IACX,aAAa;IACb,UAAU;IACV,aAAa;IACb,YAAY;IACZ,KAAK;CACN,CAAA;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,cAA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,CAAC,aAAa,GAAG,WAAW,CAAC,CAAA;AAC5E,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,YAAY,CAAC,IAA+B;IAC1D,OAAO,UAAU,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,oBAAoB,CAAC,CAAA;AACrE,CAAC"}
|
package/dist/dsh.d.ts
CHANGED
|
@@ -37,7 +37,29 @@
|
|
|
37
37
|
* - The decision shape is `PreToolDecision = {kind:'allow'} | {kind:'deny',
|
|
38
38
|
* reason} | {kind:'ask', reason?}` (confirmed from
|
|
39
39
|
* `@deepseek-ai/dsh-tools`'s shipped `.d.ts`) — `'deny'`, not the phase
|
|
40
|
-
* brief's guessed `'reject'`.
|
|
40
|
+
* brief's guessed `'reject'`. dsh 0.2 widened it (`deny` gained an
|
|
41
|
+
* optional `info`, `ask` an optional `displayReason`, and a new
|
|
42
|
+
* `{kind:'cancel'}` exists); this listener never produces those, but a
|
|
43
|
+
* later listener's `next()` result may be one, so the type below says so.
|
|
44
|
+
*
|
|
45
|
+
* ## Re-verified against dsh 0.2.0-rc.2 (2026-10-03, TD-370)
|
|
46
|
+
*
|
|
47
|
+
* Read from `@deepseek-ai/dsh-tools@0.2.0-rc.2`'s shipped `lib/index.js`, not
|
|
48
|
+
* only its types: the registry runs the `tools/pre-execute` waterfall with
|
|
49
|
+
* `() => ({kind:'allow'})` as the terminal `next()`; a `deny` becomes the
|
|
50
|
+
* tool result `Error: <reason>` with `isError: true` and the tool body never
|
|
51
|
+
* runs; an `ask` goes to `ctx.approval` (`dsh-user-approval`, mounted by
|
|
52
|
+
* `dsh-base` with policy `ask`) and, when no approval service is mounted, is
|
|
53
|
+
* itself converted to a deny. Guards registered with `ctx.tools.guard()` run
|
|
54
|
+
* after the waterfall and can only deny, so nothing downstream turns this
|
|
55
|
+
* listener's deny back into an allow. Every other shipped listener
|
|
56
|
+
* (`dsh-tool-jobs`, `dsh-workspace-changes`, `dsh-hooks-claude-code`, the
|
|
57
|
+
* optional `dsh-experimental-auto-review`) calls `next()` before deciding,
|
|
58
|
+
* so this listener is reached; auto-review returns the downstream result
|
|
59
|
+
* whenever it is not `allow`. Observed end to end in a live headless
|
|
60
|
+
* 0.2.0-rc.2 session against a local mock model: the blocked `bash` call
|
|
61
|
+
* never ran and the model's next request carried the deny reason as an
|
|
62
|
+
* `is_error` tool_result (uat/evidence/live-verify/dsh-0.2.md).
|
|
41
63
|
*
|
|
42
64
|
* `ctx.tools.guard()` (a separate, monotonic, explicitly SYNCHRONOUS
|
|
43
65
|
* mechanism dsh also exposes) was considered and rejected: `@intutic/gate`'s
|
|
@@ -81,7 +103,8 @@ export interface DshToolExecution {
|
|
|
81
103
|
readonly name: string;
|
|
82
104
|
readonly arguments: unknown;
|
|
83
105
|
}
|
|
84
|
-
/** The
|
|
106
|
+
/** The slice of the real `PreToolDecision` union from `@deepseek-ai/dsh-tools`
|
|
107
|
+
* (0.2.0-rc.2) this plugin returns or passes through from `next()`. */
|
|
85
108
|
export type DshPreToolDecision = {
|
|
86
109
|
kind: 'allow';
|
|
87
110
|
} | {
|
|
@@ -90,6 +113,8 @@ export type DshPreToolDecision = {
|
|
|
90
113
|
} | {
|
|
91
114
|
kind: 'ask';
|
|
92
115
|
reason?: string;
|
|
116
|
+
} | {
|
|
117
|
+
kind: 'cancel';
|
|
93
118
|
};
|
|
94
119
|
/**
|
|
95
120
|
* Structural stand-in for the Cordis `Context` this plugin needs — see the
|
package/dist/dsh.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh.d.ts","sourceRoot":"","sources":["../src/dsh.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dsh.d.ts","sourceRoot":"","sources":["../src/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG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GAAG,EAAE,iBAAiB,EAAE,MAAM,GAAE,aAAkB,GAAG,IAAI,CAY9E;AAED;;;;;oEAKoE;;;;;;AACpE,wBAAmD"}
|
package/dist/dsh.js
CHANGED
|
@@ -37,7 +37,29 @@
|
|
|
37
37
|
* - The decision shape is `PreToolDecision = {kind:'allow'} | {kind:'deny',
|
|
38
38
|
* reason} | {kind:'ask', reason?}` (confirmed from
|
|
39
39
|
* `@deepseek-ai/dsh-tools`'s shipped `.d.ts`) — `'deny'`, not the phase
|
|
40
|
-
* brief's guessed `'reject'`.
|
|
40
|
+
* brief's guessed `'reject'`. dsh 0.2 widened it (`deny` gained an
|
|
41
|
+
* optional `info`, `ask` an optional `displayReason`, and a new
|
|
42
|
+
* `{kind:'cancel'}` exists); this listener never produces those, but a
|
|
43
|
+
* later listener's `next()` result may be one, so the type below says so.
|
|
44
|
+
*
|
|
45
|
+
* ## Re-verified against dsh 0.2.0-rc.2 (2026-10-03, TD-370)
|
|
46
|
+
*
|
|
47
|
+
* Read from `@deepseek-ai/dsh-tools@0.2.0-rc.2`'s shipped `lib/index.js`, not
|
|
48
|
+
* only its types: the registry runs the `tools/pre-execute` waterfall with
|
|
49
|
+
* `() => ({kind:'allow'})` as the terminal `next()`; a `deny` becomes the
|
|
50
|
+
* tool result `Error: <reason>` with `isError: true` and the tool body never
|
|
51
|
+
* runs; an `ask` goes to `ctx.approval` (`dsh-user-approval`, mounted by
|
|
52
|
+
* `dsh-base` with policy `ask`) and, when no approval service is mounted, is
|
|
53
|
+
* itself converted to a deny. Guards registered with `ctx.tools.guard()` run
|
|
54
|
+
* after the waterfall and can only deny, so nothing downstream turns this
|
|
55
|
+
* listener's deny back into an allow. Every other shipped listener
|
|
56
|
+
* (`dsh-tool-jobs`, `dsh-workspace-changes`, `dsh-hooks-claude-code`, the
|
|
57
|
+
* optional `dsh-experimental-auto-review`) calls `next()` before deciding,
|
|
58
|
+
* so this listener is reached; auto-review returns the downstream result
|
|
59
|
+
* whenever it is not `allow`. Observed end to end in a live headless
|
|
60
|
+
* 0.2.0-rc.2 session against a local mock model: the blocked `bash` call
|
|
61
|
+
* never ran and the model's next request carried the deny reason as an
|
|
62
|
+
* `is_error` tool_result (uat/evidence/live-verify/dsh-0.2.md).
|
|
41
63
|
*
|
|
42
64
|
* `ctx.tools.guard()` (a separate, monotonic, explicitly SYNCHRONOUS
|
|
43
65
|
* mechanism dsh also exposes) was considered and rejected: `@intutic/gate`'s
|
package/dist/dsh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh.js","sourceRoot":"","sources":["../src/dsh.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dsh.js","sourceRoot":"","sources":["../src/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD;0CAC0C;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAA;AA4C/C;;;oDAGoD;AACpD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,CAAA;AAE/B;;;;;;;;;GASG;AACH,SAAS,kBAAkB,CAAC,IAAa;IACvC,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACtE,OAAO,IAAiB,CAAA;IAC1B,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAA;AACzB,CAAC;A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,MAAM,GAAG,IAAI,CAAA;IACf,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEb,GAAG,CAAC,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7D,CAAC;AAED;;;;;oEAKoE;AACpE,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/eve.d.ts
CHANGED
|
@@ -10,16 +10,17 @@
|
|
|
10
10
|
* framework for durable backend AI agents: an agent is a directory (`agent/`
|
|
11
11
|
* with `instructions.md`, `agent/tools/*.ts`, `agent/connections/*.ts`,
|
|
12
12
|
* `agent/hooks/*.ts`, ...) that eve builds by walking the tree. It is a
|
|
13
|
-
* pre-1.0 PREVIEW product (0.39.1 at
|
|
13
|
+
* pre-1.0 PREVIEW product (integrated at 0.39.1, re-verified at 0.71.0; very active) —
|
|
14
14
|
* see docs/TECH_DEBT.md TD-410 for the churn shield this adapter carries,
|
|
15
15
|
* the same posture the dsh integration established.
|
|
16
16
|
*
|
|
17
17
|
* ## The veto mechanism — CONFIRMED against a real install, not assumed
|
|
18
18
|
*
|
|
19
|
-
* `eve@0.
|
|
20
|
-
* shipped `.d.ts` files were read directly (not inferred from docs alone
|
|
19
|
+
* `eve@0.71.0` is installed as a devDependency of this package and its
|
|
20
|
+
* shipped `.d.ts` files were read directly (not inferred from docs alone;
|
|
21
|
+
* first against 0.39.1, re-read for 0.71.0 — paths below are 0.71.0's).
|
|
21
22
|
* eve's per-tool veto point is the `approval` property on a tool definition
|
|
22
|
-
* (`dist/src/
|
|
23
|
+
* (`dist/src/tools/definition.d.ts`), and the same `Approval` type is
|
|
23
24
|
* accepted per-connection by `defineMcpClientConnection` /
|
|
24
25
|
* `defineOpenAPIConnection` (`dist/src/public/definitions/connections/
|
|
25
26
|
* {mcp,openapi}.d.ts`), gating ALL of that connection's tools. There is NO
|
|
@@ -29,10 +30,13 @@
|
|
|
29
30
|
* (`docs/patterns/multi-tenant-approvals.md`), and exactly the shape this
|
|
30
31
|
* adapter exports.
|
|
31
32
|
*
|
|
32
|
-
* The confirmed policy contract (`dist/src/
|
|
33
|
+
* The confirmed policy contract (`dist/src/approval/definition.d.ts`,
|
|
34
|
+
* re-exported by `dist/src/public/definitions/approval.d.ts` and
|
|
35
|
+
* `eve/tools/approval`):
|
|
33
36
|
*
|
|
34
37
|
* ```ts
|
|
35
38
|
* export interface ApprovalContext<TInput = Record<string, unknown>> extends SessionContext {
|
|
39
|
+
* readonly abortSignal: AbortSignal // added after 0.39.1; unused here
|
|
36
40
|
* readonly approvedTools: ReadonlySet<string>
|
|
37
41
|
* readonly callId: string
|
|
38
42
|
* readonly toolInput?: ApprovalToolInput<TInput> // Readonly<TInput> | TInput; CAN be undefined
|
|
@@ -82,7 +86,10 @@
|
|
|
82
86
|
* events. Handlers are OBSERVE-ONLY by eve's own contract ("fire after eve
|
|
83
87
|
* has accepted and durably recorded each event ... cannot inject model
|
|
84
88
|
* context") — {@link intuticAuditHooks} is telemetry, not enforcement; the
|
|
85
|
-
* enforcement surface is {@link intuticApproval}.
|
|
89
|
+
* enforcement surface is {@link intuticApproval}. (Since 0.39.1 a hook may
|
|
90
|
+
* call `ctx.cancel()` to cancel the whole running turn, but it still cannot
|
|
91
|
+
* veto or rewrite one tool call, and it runs after the event is recorded;
|
|
92
|
+
* this adapter never calls it.) LOAD-BEARING caveat,
|
|
86
93
|
* verified against `dist/src/protocol/message.d.ts`: these two events carry
|
|
87
94
|
* `requestId`/`responderPrincipalId`/`turnId`/`stepIndex` but NOT the tool
|
|
88
95
|
* name or input.
|
|
@@ -105,7 +112,7 @@
|
|
|
105
112
|
* 'tool-approval'` request `intuticApproval()`'s `'user-approval'` return
|
|
106
113
|
* value produces. Each request in that ONE event already carries
|
|
107
114
|
* `requestId` AND `action.toolName` TOGETHER (`InputRequest`,
|
|
108
|
-
* `dist/src/
|
|
115
|
+
* `dist/src/shared/input.d.ts`'s `inputRequestSchema` — confirmed by
|
|
109
116
|
* the shipped zod schema, not just prose; corroborated by
|
|
110
117
|
* `docs/tools/human-in-the-loop.md`'s explicit statement that "`toolName` and
|
|
111
118
|
* `requestId` identify the action and request"). {@link intuticAuditHooks}
|
|
@@ -121,6 +128,18 @@
|
|
|
121
128
|
* reasoning and what a persistent (non-memory) correlation store would take
|
|
122
129
|
* to close that residual gap.
|
|
123
130
|
*
|
|
131
|
+
* TD-498: a live `eve start` run showed that `approval.candidate`/
|
|
132
|
+
* `approval.settled` fire ONLY for the `approval: { request, response }`
|
|
133
|
+
* form. The bare form this adapter documents (`approval: intuticApproval()`)
|
|
134
|
+
* settles through a fourth hookable event, `input.resolved` (`HookEventMap`,
|
|
135
|
+
* payload `InputResolvedStreamEvent` in `dist/src/protocol/message.d.ts`:
|
|
136
|
+
* `resolutions[]` of `{ kind, outcome, requestId, response? }`, no tool name).
|
|
137
|
+
* {@link intuticAuditHooks} subscribes to it as well, so bare-policy
|
|
138
|
+
* settlements are audited, with the same cache-or-synthetic tool naming; the
|
|
139
|
+
* `{ request, response }` form fires both events and is recorded once. eve
|
|
140
|
+
* 0.71 added the `'cancelled'` outcome: a pending request withdrawn because
|
|
141
|
+
* its turn was cancelled (or the relaying run ended) before anyone answered.
|
|
142
|
+
*
|
|
124
143
|
* ## LLM egress — documented honestly, not oversold
|
|
125
144
|
*
|
|
126
145
|
* eve routes models through the Vercel AI Gateway by default (a gateway model
|
|
@@ -147,8 +166,9 @@ export { intuticProxyUrl, withIntuticProxy } from './vercel.js';
|
|
|
147
166
|
export declare const EVE_APPROVAL_TOOL_NAME = "eve:approval";
|
|
148
167
|
/** Structural copy of eve's `ApprovalStatus` — this package does not depend
|
|
149
168
|
* on `eve` at runtime, so the shape is declared here rather than imported.
|
|
150
|
-
* Confirmed field-for-field against `eve@0.
|
|
151
|
-
* `dist/src/
|
|
169
|
+
* Confirmed field-for-field against `eve@0.71.0`'s
|
|
170
|
+
* `dist/src/approval/definition.d.ts` (see module doc; unchanged since
|
|
171
|
+
* 0.39.1), including
|
|
152
172
|
* the boolean back-compat forms this adapter itself never returns. */
|
|
153
173
|
export type EveApprovalStatus = undefined | boolean | 'not-applicable' | 'approved' | 'denied' | 'user-approval' | {
|
|
154
174
|
readonly type: 'not-applicable';
|
|
@@ -165,8 +185,8 @@ export type EveApprovalStatus = undefined | boolean | 'not-applicable' | 'approv
|
|
|
165
185
|
};
|
|
166
186
|
/** Structural copy of the slice of eve's `ApprovalContext` this adapter
|
|
167
187
|
* reads (`toolName`, `toolInput`). The real context is wider — it extends
|
|
168
|
-
* `SessionContext` and also carries `approvedTools`/`callId`
|
|
169
|
-
* type is assignable to this one, which is what makes a policy declared
|
|
188
|
+
* `SessionContext` and also carries `approvedTools`/`callId`/`abortSignal`
|
|
189
|
+
* — so the real type is assignable to this one, which is what makes a policy declared
|
|
170
190
|
* against this slice assignable to eve's own `ApprovalPolicy`. */
|
|
171
191
|
export interface EveApprovalContext {
|
|
172
192
|
/** Final runtime tool name. Path-derived for authored tools
|
|
@@ -316,7 +336,7 @@ export interface EveApprovalSettledEvent {
|
|
|
316
336
|
}
|
|
317
337
|
/**
|
|
318
338
|
* Structural copy of one element of eve's `InputRequestedStreamEvent.data.requests`
|
|
319
|
-
* (`InputRequest`, `dist/src/
|
|
339
|
+
* (`InputRequest`, `dist/src/shared/input.d.ts`'s `inputRequestSchema`,
|
|
320
340
|
* read from the shipped zod schema, not just its `.d.ts`) — narrowed to the
|
|
321
341
|
* fields this module reads. Unlike {@link EveApprovalCandidateEvent} /
|
|
322
342
|
* {@link EveApprovalSettledEvent}, this DOES carry the real tool name
|
|
@@ -346,6 +366,40 @@ export interface EveInputRequestedEvent {
|
|
|
346
366
|
readonly turnId: string;
|
|
347
367
|
};
|
|
348
368
|
}
|
|
369
|
+
/**
|
|
370
|
+
* Structural copy of one element of eve's `InputResolvedStreamEvent.data.
|
|
371
|
+
* resolutions` (`InputResolution`, `dist/src/protocol/message.d.ts`): the
|
|
372
|
+
* server-accepted terminal outcome of one human-input request. Like
|
|
373
|
+
* `approval.settled` it carries no tool name — only `requestId`.
|
|
374
|
+
* `'cancelled'` was added after 0.39.1 (present in 0.71.0): the request was
|
|
375
|
+
* withdrawn, unanswered, because its turn was cancelled or the run relaying
|
|
376
|
+
* it ended — nobody decided, so it audits as `tool_flagged`, not a veto.
|
|
377
|
+
*/
|
|
378
|
+
export interface EveInputResolution {
|
|
379
|
+
readonly kind: 'question' | 'session-limit' | 'tool-approval';
|
|
380
|
+
readonly outcome: 'answered' | 'approved' | 'cancelled' | 'denied' | 'ignored' | 'invalid';
|
|
381
|
+
readonly requestId: string;
|
|
382
|
+
readonly response?: {
|
|
383
|
+
readonly optionId?: string;
|
|
384
|
+
readonly requestId: string;
|
|
385
|
+
readonly text?: string;
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
/** Structural copy of eve's `InputResolvedStreamEvent` — a hookable
|
|
389
|
+
* `HookEventMap` key (`'input.resolved'`), fired once per batch of resolved
|
|
390
|
+
* human-input requests. It is how a BARE approval policy
|
|
391
|
+
* (`approval: intuticApproval(...)`) settles: eve emits `approval.candidate`/
|
|
392
|
+
* `approval.settled` only for the `{ request, response }` form (observed on
|
|
393
|
+
* a live `eve start` server, TD-498). */
|
|
394
|
+
export interface EveInputResolvedEvent {
|
|
395
|
+
readonly type: 'input.resolved';
|
|
396
|
+
readonly data: {
|
|
397
|
+
readonly resolutions: readonly EveInputResolution[];
|
|
398
|
+
readonly sequence: number;
|
|
399
|
+
readonly stepIndex: number;
|
|
400
|
+
readonly turnId: string;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
349
403
|
/** Structural slice of eve's `HookContext` this adapter reads. The real
|
|
350
404
|
* context is wider (extends `SessionContext`, `agent.name` required) — the
|
|
351
405
|
* real type is assignable to this one. */
|
|
@@ -364,6 +418,7 @@ export interface EveAuditHookDefinition {
|
|
|
364
418
|
readonly 'input.requested': (event: EveInputRequestedEvent, ctx: EveHookContext) => Promise<void>;
|
|
365
419
|
readonly 'approval.candidate': (event: EveApprovalCandidateEvent, ctx: EveHookContext) => Promise<void>;
|
|
366
420
|
readonly 'approval.settled': (event: EveApprovalSettledEvent, ctx: EveHookContext) => Promise<void>;
|
|
421
|
+
readonly 'input.resolved': (event: EveInputResolvedEvent, ctx: EveHookContext) => Promise<void>;
|
|
367
422
|
};
|
|
368
423
|
}
|
|
369
424
|
export interface IntuticAuditHooksOptions {
|
|
@@ -408,6 +463,17 @@ export interface IntuticAuditHooksOptions {
|
|
|
408
463
|
* `timed-out`/`stale`) → `tool_flagged` — a responder's attempt to answer
|
|
409
464
|
* went somewhere worth an operator's attention. `'pending'` (a candidate
|
|
410
465
|
* simply being created) is routine lifecycle and deliberately NOT emitted.
|
|
466
|
+
* - `input.resolved`, one `kind: 'tool-approval'` resolution — the
|
|
467
|
+
* settlement of a BARE approval policy, for which eve emits no
|
|
468
|
+
* `approval.settled` — → `tool_allowed` for `'approved'`, `tool_blocked`
|
|
469
|
+
* (a human veto, as above) for `'denied'`, and `tool_flagged` for any
|
|
470
|
+
* other outcome (`'ignored'`/`'invalid'`, and `'cancelled'` — withdrawn
|
|
471
|
+
* unanswered with its turn, not a human decision).
|
|
472
|
+
*
|
|
473
|
+
* The `{ request, response }` approval form fires BOTH `approval.settled` and
|
|
474
|
+
* `input.resolved` for the same request (in that order, observed live); each
|
|
475
|
+
* settlement is recorded once, by whichever of the two arrives first — the
|
|
476
|
+
* richer `approval.settled`, which also names the responder, in practice.
|
|
411
477
|
*
|
|
412
478
|
* `approval.candidate`/`approval.settled` attribute to the REAL tool name
|
|
413
479
|
* when this instance's in-memory `requestId -> toolName` cache (populated
|
|
@@ -416,8 +482,9 @@ export interface IntuticAuditHooksOptions {
|
|
|
416
482
|
* fallback exists and is not itself a bug.
|
|
417
483
|
*
|
|
418
484
|
* These hooks are TELEMETRY, not enforcement: eve runs hook handlers after
|
|
419
|
-
* events are durably recorded, and they cannot veto
|
|
420
|
-
* "observe-only" hook contract)
|
|
485
|
+
* events are durably recorded, and they cannot veto a tool call (eve's own
|
|
486
|
+
* "observe-only" hook contract; `ctx.cancel()` only cancels the whole turn,
|
|
487
|
+
* and these handlers never call it). The enforcement surface is
|
|
421
488
|
* {@link intuticApproval}. Handlers never throw — a telemetry failure must
|
|
422
489
|
* not break the run (`GateClient.emit`'s own never-throws contract).
|
|
423
490
|
*/
|
package/dist/eve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eve.d.ts","sourceRoot":"","sources":["../src/eve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"eve.d.ts","sourceRoot":"","sources":["../src/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8JG;AAEH,OAAO,EAAwB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAMxC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE/D;;gFAEgF;AAChF,eAAO,MAAM,sBAAsB,iBAAiB,CAAA;AAKpD;;;;;uEAKuE;AACvE,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,QAAQ,GACR,eAAe,GACf;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,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,CAAC,iBAAiB,EAAE,CAC1B,KAAK,EAAE,sBAAsB,EAC7B,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;QAClB,QAAQ,CAAC,oBAAoB,EAAE,CAC7B,KAAK,EAAE,yBAAyB,EAChC,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;QAClB,QAAQ,CAAC,kBAAkB,EAAE,CAC3B,KAAK,EAAE,uBAAuB,EAC9B,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;QAClB,QAAQ,CAAC,gBAAgB,EAAE,CACzB,KAAK,EAAE,qBAAqB,EAC5B,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,wBAA6B,GAAG,sBAAsB,CA6I7F"}
|
package/dist/eve.js
CHANGED
|
@@ -10,16 +10,17 @@
|
|
|
10
10
|
* framework for durable backend AI agents: an agent is a directory (`agent/`
|
|
11
11
|
* with `instructions.md`, `agent/tools/*.ts`, `agent/connections/*.ts`,
|
|
12
12
|
* `agent/hooks/*.ts`, ...) that eve builds by walking the tree. It is a
|
|
13
|
-
* pre-1.0 PREVIEW product (0.39.1 at
|
|
13
|
+
* pre-1.0 PREVIEW product (integrated at 0.39.1, re-verified at 0.71.0; very active) —
|
|
14
14
|
* see docs/TECH_DEBT.md TD-410 for the churn shield this adapter carries,
|
|
15
15
|
* the same posture the dsh integration established.
|
|
16
16
|
*
|
|
17
17
|
* ## The veto mechanism — CONFIRMED against a real install, not assumed
|
|
18
18
|
*
|
|
19
|
-
* `eve@0.
|
|
20
|
-
* shipped `.d.ts` files were read directly (not inferred from docs alone
|
|
19
|
+
* `eve@0.71.0` is installed as a devDependency of this package and its
|
|
20
|
+
* shipped `.d.ts` files were read directly (not inferred from docs alone;
|
|
21
|
+
* first against 0.39.1, re-read for 0.71.0 — paths below are 0.71.0's).
|
|
21
22
|
* eve's per-tool veto point is the `approval` property on a tool definition
|
|
22
|
-
* (`dist/src/
|
|
23
|
+
* (`dist/src/tools/definition.d.ts`), and the same `Approval` type is
|
|
23
24
|
* accepted per-connection by `defineMcpClientConnection` /
|
|
24
25
|
* `defineOpenAPIConnection` (`dist/src/public/definitions/connections/
|
|
25
26
|
* {mcp,openapi}.d.ts`), gating ALL of that connection's tools. There is NO
|
|
@@ -29,10 +30,13 @@
|
|
|
29
30
|
* (`docs/patterns/multi-tenant-approvals.md`), and exactly the shape this
|
|
30
31
|
* adapter exports.
|
|
31
32
|
*
|
|
32
|
-
* The confirmed policy contract (`dist/src/
|
|
33
|
+
* The confirmed policy contract (`dist/src/approval/definition.d.ts`,
|
|
34
|
+
* re-exported by `dist/src/public/definitions/approval.d.ts` and
|
|
35
|
+
* `eve/tools/approval`):
|
|
33
36
|
*
|
|
34
37
|
* ```ts
|
|
35
38
|
* export interface ApprovalContext<TInput = Record<string, unknown>> extends SessionContext {
|
|
39
|
+
* readonly abortSignal: AbortSignal // added after 0.39.1; unused here
|
|
36
40
|
* readonly approvedTools: ReadonlySet<string>
|
|
37
41
|
* readonly callId: string
|
|
38
42
|
* readonly toolInput?: ApprovalToolInput<TInput> // Readonly<TInput> | TInput; CAN be undefined
|
|
@@ -82,7 +86,10 @@
|
|
|
82
86
|
* events. Handlers are OBSERVE-ONLY by eve's own contract ("fire after eve
|
|
83
87
|
* has accepted and durably recorded each event ... cannot inject model
|
|
84
88
|
* context") — {@link intuticAuditHooks} is telemetry, not enforcement; the
|
|
85
|
-
* enforcement surface is {@link intuticApproval}.
|
|
89
|
+
* enforcement surface is {@link intuticApproval}. (Since 0.39.1 a hook may
|
|
90
|
+
* call `ctx.cancel()` to cancel the whole running turn, but it still cannot
|
|
91
|
+
* veto or rewrite one tool call, and it runs after the event is recorded;
|
|
92
|
+
* this adapter never calls it.) LOAD-BEARING caveat,
|
|
86
93
|
* verified against `dist/src/protocol/message.d.ts`: these two events carry
|
|
87
94
|
* `requestId`/`responderPrincipalId`/`turnId`/`stepIndex` but NOT the tool
|
|
88
95
|
* name or input.
|
|
@@ -105,7 +112,7 @@
|
|
|
105
112
|
* 'tool-approval'` request `intuticApproval()`'s `'user-approval'` return
|
|
106
113
|
* value produces. Each request in that ONE event already carries
|
|
107
114
|
* `requestId` AND `action.toolName` TOGETHER (`InputRequest`,
|
|
108
|
-
* `dist/src/
|
|
115
|
+
* `dist/src/shared/input.d.ts`'s `inputRequestSchema` — confirmed by
|
|
109
116
|
* the shipped zod schema, not just prose; corroborated by
|
|
110
117
|
* `docs/tools/human-in-the-loop.md`'s explicit statement that "`toolName` and
|
|
111
118
|
* `requestId` identify the action and request"). {@link intuticAuditHooks}
|
|
@@ -121,6 +128,18 @@
|
|
|
121
128
|
* reasoning and what a persistent (non-memory) correlation store would take
|
|
122
129
|
* to close that residual gap.
|
|
123
130
|
*
|
|
131
|
+
* TD-498: a live `eve start` run showed that `approval.candidate`/
|
|
132
|
+
* `approval.settled` fire ONLY for the `approval: { request, response }`
|
|
133
|
+
* form. The bare form this adapter documents (`approval: intuticApproval()`)
|
|
134
|
+
* settles through a fourth hookable event, `input.resolved` (`HookEventMap`,
|
|
135
|
+
* payload `InputResolvedStreamEvent` in `dist/src/protocol/message.d.ts`:
|
|
136
|
+
* `resolutions[]` of `{ kind, outcome, requestId, response? }`, no tool name).
|
|
137
|
+
* {@link intuticAuditHooks} subscribes to it as well, so bare-policy
|
|
138
|
+
* settlements are audited, with the same cache-or-synthetic tool naming; the
|
|
139
|
+
* `{ request, response }` form fires both events and is recorded once. eve
|
|
140
|
+
* 0.71 added the `'cancelled'` outcome: a pending request withdrawn because
|
|
141
|
+
* its turn was cancelled (or the relaying run ended) before anyone answered.
|
|
142
|
+
*
|
|
124
143
|
* ## LLM egress — documented honestly, not oversold
|
|
125
144
|
*
|
|
126
145
|
* eve routes models through the Vercel AI Gateway by default (a gateway model
|
|
@@ -149,6 +168,8 @@ export { intuticProxyUrl, withIntuticProxy } from './vercel.js';
|
|
|
149
168
|
* `approval.candidate`/`approval.settled` events do not carry the real tool
|
|
150
169
|
* name (verified against `dist/src/protocol/message.d.ts`; see module doc). */
|
|
151
170
|
export const EVE_APPROVAL_TOOL_NAME = 'eve:approval';
|
|
171
|
+
/** Bound on the settlement-dedup set in {@link intuticAuditHooks}. */
|
|
172
|
+
const MAX_TRACKED_SETTLEMENTS = 1024;
|
|
152
173
|
/**
|
|
153
174
|
* Render an eve `toolInput` as the `tool_input` object {@link Gate.guard}
|
|
154
175
|
* evaluates.
|
|
@@ -289,6 +310,17 @@ export function intuticConnectionApproval(opts = {}) {
|
|
|
289
310
|
* `timed-out`/`stale`) → `tool_flagged` — a responder's attempt to answer
|
|
290
311
|
* went somewhere worth an operator's attention. `'pending'` (a candidate
|
|
291
312
|
* simply being created) is routine lifecycle and deliberately NOT emitted.
|
|
313
|
+
* - `input.resolved`, one `kind: 'tool-approval'` resolution — the
|
|
314
|
+
* settlement of a BARE approval policy, for which eve emits no
|
|
315
|
+
* `approval.settled` — → `tool_allowed` for `'approved'`, `tool_blocked`
|
|
316
|
+
* (a human veto, as above) for `'denied'`, and `tool_flagged` for any
|
|
317
|
+
* other outcome (`'ignored'`/`'invalid'`, and `'cancelled'` — withdrawn
|
|
318
|
+
* unanswered with its turn, not a human decision).
|
|
319
|
+
*
|
|
320
|
+
* The `{ request, response }` approval form fires BOTH `approval.settled` and
|
|
321
|
+
* `input.resolved` for the same request (in that order, observed live); each
|
|
322
|
+
* settlement is recorded once, by whichever of the two arrives first — the
|
|
323
|
+
* richer `approval.settled`, which also names the responder, in practice.
|
|
292
324
|
*
|
|
293
325
|
* `approval.candidate`/`approval.settled` attribute to the REAL tool name
|
|
294
326
|
* when this instance's in-memory `requestId -> toolName` cache (populated
|
|
@@ -297,8 +329,9 @@ export function intuticConnectionApproval(opts = {}) {
|
|
|
297
329
|
* fallback exists and is not itself a bug.
|
|
298
330
|
*
|
|
299
331
|
* These hooks are TELEMETRY, not enforcement: eve runs hook handlers after
|
|
300
|
-
* events are durably recorded, and they cannot veto
|
|
301
|
-
* "observe-only" hook contract)
|
|
332
|
+
* events are durably recorded, and they cannot veto a tool call (eve's own
|
|
333
|
+
* "observe-only" hook contract; `ctx.cancel()` only cancels the whole turn,
|
|
334
|
+
* and these handlers never call it). The enforcement surface is
|
|
302
335
|
* {@link intuticApproval}. Handlers never throw — a telemetry failure must
|
|
303
336
|
* not break the run (`GateClient.emit`'s own never-throws contract).
|
|
304
337
|
*/
|
|
@@ -315,6 +348,22 @@ export function intuticAuditHooks(opts = {}) {
|
|
|
315
348
|
// this map empty and falls back to EVE_APPROVAL_TOOL_NAME, exactly this
|
|
316
349
|
// function's behaviour before this cache existed. See TD-411.
|
|
317
350
|
const requestIdToToolName = new Map();
|
|
351
|
+
// A `{ request, response }` approval settles through BOTH `approval.settled`
|
|
352
|
+
// and `input.resolved`; a bare policy only through `input.resolved`. The
|
|
353
|
+
// first of the two to arrive claims the request id and records it; the
|
|
354
|
+
// second finds the claim, releases it and records nothing. A bare-policy
|
|
355
|
+
// claim is never released by a second event, so the set is capped (oldest
|
|
356
|
+
// first) to stay bounded in a long-lived process.
|
|
357
|
+
const settled = new Set();
|
|
358
|
+
function claimSettlement(requestId) {
|
|
359
|
+
if (settled.delete(requestId))
|
|
360
|
+
return false;
|
|
361
|
+
settled.add(requestId);
|
|
362
|
+
if (settled.size > MAX_TRACKED_SETTLEMENTS) {
|
|
363
|
+
settled.delete(settled.values().next().value);
|
|
364
|
+
}
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
318
367
|
function clientFor(sessionId) {
|
|
319
368
|
if (opts.client !== undefined)
|
|
320
369
|
return opts.client;
|
|
@@ -358,9 +407,11 @@ export function intuticAuditHooks(opts = {}) {
|
|
|
358
407
|
`responder ${event.data.responderPrincipalId})${suffix}`, event.data);
|
|
359
408
|
},
|
|
360
409
|
'approval.settled': async (event, ctx) => {
|
|
361
|
-
const client = clientFor(ctx.session.id);
|
|
362
410
|
const toolName = requestIdToToolName.get(event.data.requestId) ?? EVE_APPROVAL_TOOL_NAME;
|
|
363
411
|
requestIdToToolName.delete(event.data.requestId);
|
|
412
|
+
if (!claimSettlement(event.data.requestId))
|
|
413
|
+
return;
|
|
414
|
+
const client = clientFor(ctx.session.id);
|
|
364
415
|
if (client === null)
|
|
365
416
|
return;
|
|
366
417
|
if (event.data.outcome === 'approved') {
|
|
@@ -372,6 +423,38 @@ export function intuticAuditHooks(opts = {}) {
|
|
|
372
423
|
`(request ${event.data.requestId}, responder ${event.data.responderPrincipalId}). ` +
|
|
373
424
|
`Human veto recorded by the observe-only audit hook, not an Intutic gate refusal.`, event.data);
|
|
374
425
|
},
|
|
426
|
+
'input.resolved': async (event, ctx) => {
|
|
427
|
+
// Claim every resolution before the first await, so an
|
|
428
|
+
// `approval.settled` for the same request handled concurrently sees
|
|
429
|
+
// the claim.
|
|
430
|
+
const toRecord = [];
|
|
431
|
+
for (const resolution of event.data.resolutions) {
|
|
432
|
+
if (resolution.kind !== 'tool-approval')
|
|
433
|
+
continue;
|
|
434
|
+
const toolName = requestIdToToolName.get(resolution.requestId) ?? EVE_APPROVAL_TOOL_NAME;
|
|
435
|
+
requestIdToToolName.delete(resolution.requestId);
|
|
436
|
+
if (claimSettlement(resolution.requestId))
|
|
437
|
+
toRecord.push({ resolution, toolName });
|
|
438
|
+
}
|
|
439
|
+
if (toRecord.length === 0)
|
|
440
|
+
return;
|
|
441
|
+
const client = clientFor(ctx.session.id);
|
|
442
|
+
if (client === null)
|
|
443
|
+
return;
|
|
444
|
+
for (const { resolution, toolName } of toRecord) {
|
|
445
|
+
const request = `(request ${resolution.requestId})`;
|
|
446
|
+
if (resolution.outcome === 'approved') {
|
|
447
|
+
await client.emit('tool_allowed', toolName, `eve approval resolved: approved ${request}`, resolution);
|
|
448
|
+
}
|
|
449
|
+
else if (resolution.outcome === 'denied') {
|
|
450
|
+
await client.emit('tool_blocked', toolName, `eve approval resolved: denied — the parked tool call never ran ${request}. ` +
|
|
451
|
+
`Human veto recorded by the observe-only audit hook, not an Intutic gate refusal.`, resolution);
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
await client.emit('tool_flagged', toolName, `eve approval resolved with outcome '${resolution.outcome}' ${request}`, resolution);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
},
|
|
375
458
|
},
|
|
376
459
|
};
|
|
377
460
|
}
|
package/dist/eve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eve.js","sourceRoot":"","sources":["../src/eve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"eve.js","sourceRoot":"","sources":["../src/eve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8JG;AAEH,OAAO,EAAE,MAAM,IAAI,UAAU,EAAa,MAAM,WAAW,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,2EAA2E;AAC3E,0EAA0E;AAC1E,iEAAiE;AACjE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE/D;;gFAEgF;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAA;AAEpD,sEAAsE;AACtE,MAAM,uBAAuB,GAAG,IAAI,CAAA;AA2EpC;;;;;;;;;;GAUG;AACH,SA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