@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.
Files changed (60) hide show
  1. package/README.md +18 -10
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +2 -0
  4. package/dist/actions.js.map +1 -1
  5. package/dist/dsh.d.ts +27 -2
  6. package/dist/dsh.d.ts.map +1 -1
  7. package/dist/dsh.js +23 -1
  8. package/dist/dsh.js.map +1 -1
  9. package/dist/eve.d.ts +81 -14
  10. package/dist/eve.d.ts.map +1 -1
  11. package/dist/eve.js +93 -10
  12. package/dist/eve.js.map +1 -1
  13. package/dist/gate.d.ts +3 -4
  14. package/dist/gate.d.ts.map +1 -1
  15. package/dist/gate.js +21 -10
  16. package/dist/gate.js.map +1 -1
  17. package/dist/harness.d.ts +86 -31
  18. package/dist/harness.d.ts.map +1 -1
  19. package/dist/harness.js +103 -28
  20. package/dist/harness.js.map +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/managedAgents.d.ts +35 -6
  25. package/dist/managedAgents.d.ts.map +1 -1
  26. package/dist/managedAgents.js +26 -6
  27. package/dist/managedAgents.js.map +1 -1
  28. package/dist/mastra.d.ts +5 -2
  29. package/dist/mastra.d.ts.map +1 -1
  30. package/dist/mastra.js +3 -1
  31. package/dist/mastra.js.map +1 -1
  32. package/dist/openai.d.ts +5 -3
  33. package/dist/openai.d.ts.map +1 -1
  34. package/dist/openai.js +5 -3
  35. package/dist/openai.js.map +1 -1
  36. package/dist/registry.d.ts +18 -0
  37. package/dist/registry.d.ts.map +1 -0
  38. package/dist/registry.js +24 -0
  39. package/dist/registry.js.map +1 -0
  40. package/dist/snapshot.d.ts +8 -0
  41. package/dist/snapshot.d.ts.map +1 -1
  42. package/dist/snapshot.js +17 -1
  43. package/dist/snapshot.js.map +1 -1
  44. package/dist/ssoGroups.d.ts +44 -0
  45. package/dist/ssoGroups.d.ts.map +1 -0
  46. package/dist/ssoGroups.js +81 -0
  47. package/dist/ssoGroups.js.map +1 -0
  48. package/dist/vercel.d.ts +3 -3
  49. package/dist/vercel.d.ts.map +1 -1
  50. package/dist/vercel.js +1 -1
  51. package/dist/vercel.js.map +1 -1
  52. package/dist/workflow.d.ts +153 -39
  53. package/dist/workflow.d.ts.map +1 -1
  54. package/dist/workflow.js +162 -49
  55. package/dist/workflow.js.map +1 -1
  56. package/dist/wrapTools.d.ts +1 -1
  57. package/dist/wrapTools.d.ts.map +1 -1
  58. package/dist/wrapTools.js +1 -1
  59. package/dist/wrapTools.js.map +1 -1
  60. package/package.json +11 -10
@@ -0,0 +1,44 @@
1
+ /**
2
+ * SSO-group tool clearance, read from the policy snapshot.
3
+ *
4
+ * Port of `evaluateSsoGroupClearance` and the `@sso_groups` record in
5
+ * `packages/shared-types/src/ssoGroupClearance.ts` — the evaluator the control
6
+ * plane's hook gate, the MCP proxy and the sync daemon's snapshot compiler
7
+ * share. This package has no workspace dependencies, so it carries a copy, and
8
+ * `src/__tests__/ssoGroups.test.ts` runs the shared vectors
9
+ * (`packages/shared-types/fixtures/sso-group-clearance-vectors.json`) through
10
+ * it so the copy cannot drift. `intutic_clawde/gate/sso_groups.py` is the
11
+ * Python port of the same thing.
12
+ *
13
+ * The snapshot's record carries the workspace's policy and the member the
14
+ * snapshot was issued to, with their groups as the control plane resolved
15
+ * them. It sits inside the snapshot's digest; when the digest fails, the gate
16
+ * still applies the policy but treats the member's groups as unknown, so an
17
+ * edited group list clears nothing.
18
+ */
19
+ export type SsoGroupClearance = 'GRANTED' | 'DENIED' | 'REQUIRES_OBO';
20
+ export interface SsoGroupPolicy {
21
+ highRiskTools: string[];
22
+ requiredGroups: string[];
23
+ requireOboFor: string[];
24
+ }
25
+ export interface SsoGroupRecord {
26
+ policy: SsoGroupPolicy;
27
+ member: {
28
+ memberId: string;
29
+ ssoGroups: string[];
30
+ } | null;
31
+ issuedAt: string;
32
+ }
33
+ export interface SsoGroupDecision {
34
+ clearance: SsoGroupClearance;
35
+ ruleId: string | null;
36
+ reason: string;
37
+ }
38
+ export declare const SSO_GROUP_RECORD_TAG = "@sso_groups";
39
+ export declare function parseSsoGroupPolicy(value: unknown): SsoGroupPolicy | null;
40
+ /** `memberGroups` null means the groups are unknown — a high-risk tool is then refused. */
41
+ export declare function evaluateSsoGroupClearance(policy: SsoGroupPolicy | null, toolName: string, memberGroups: readonly string[] | null): SsoGroupDecision;
42
+ /** Reads the snapshot's record line; null for any other line or a damaged one. */
43
+ export declare function decodeSsoGroupRecord(line: string): SsoGroupRecord | null;
44
+ //# sourceMappingURL=ssoGroups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssoGroups.d.ts","sourceRoot":"","sources":["../src/ssoGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAA;AAErE,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,IAAI,CAAA;IACxD,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,iBAAiB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,oBAAoB,gBAAgB,CAAA;AAMjD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAQzE;AAMD,2FAA2F;AAC3F,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,GAAG,IAAI,EAC7B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GACrC,gBAAgB,CAqBlB;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAgBxE"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * SSO-group tool clearance, read from the policy snapshot.
3
+ *
4
+ * Port of `evaluateSsoGroupClearance` and the `@sso_groups` record in
5
+ * `packages/shared-types/src/ssoGroupClearance.ts` — the evaluator the control
6
+ * plane's hook gate, the MCP proxy and the sync daemon's snapshot compiler
7
+ * share. This package has no workspace dependencies, so it carries a copy, and
8
+ * `src/__tests__/ssoGroups.test.ts` runs the shared vectors
9
+ * (`packages/shared-types/fixtures/sso-group-clearance-vectors.json`) through
10
+ * it so the copy cannot drift. `intutic_clawde/gate/sso_groups.py` is the
11
+ * Python port of the same thing.
12
+ *
13
+ * The snapshot's record carries the workspace's policy and the member the
14
+ * snapshot was issued to, with their groups as the control plane resolved
15
+ * them. It sits inside the snapshot's digest; when the digest fails, the gate
16
+ * still applies the policy but treats the member's groups as unknown, so an
17
+ * edited group list clears nothing.
18
+ */
19
+ export const SSO_GROUP_RECORD_TAG = '@sso_groups';
20
+ function stringList(value) {
21
+ return Array.isArray(value) ? value.filter((v) => typeof v === 'string') : [];
22
+ }
23
+ export function parseSsoGroupPolicy(value) {
24
+ if (typeof value !== 'object' || value === null || Array.isArray(value))
25
+ return null;
26
+ const p = value;
27
+ return {
28
+ highRiskTools: stringList(p['highRiskTools']),
29
+ requiredGroups: stringList(p['requiredGroups']),
30
+ requireOboFor: stringList(p['requireOboFor']),
31
+ };
32
+ }
33
+ function ruleId(kind, toolName) {
34
+ return `sso_group.${kind}.${toolName.replace(/[^A-Za-z0-9_.:-]/g, '_')}`;
35
+ }
36
+ /** `memberGroups` null means the groups are unknown — a high-risk tool is then refused. */
37
+ export function evaluateSsoGroupClearance(policy, toolName, memberGroups) {
38
+ if (!policy)
39
+ return { clearance: 'GRANTED', ruleId: null, reason: '' };
40
+ if (policy.requireOboFor.includes(toolName)) {
41
+ return {
42
+ clearance: 'REQUIRES_OBO',
43
+ ruleId: ruleId('require_obo', toolName),
44
+ reason: `SSO group policy: ${toolName} is on-behalf-of only, and a tool-call gate has no OBO token to present`,
45
+ };
46
+ }
47
+ if (!policy.highRiskTools.includes(toolName))
48
+ return { clearance: 'GRANTED', ruleId: null, reason: '' };
49
+ if (memberGroups && policy.requiredGroups.some((g) => memberGroups.includes(g))) {
50
+ return { clearance: 'GRANTED', ruleId: null, reason: '' };
51
+ }
52
+ const groups = policy.requiredGroups.length > 0 ? policy.requiredGroups.join(', ') : '(none configured)';
53
+ return {
54
+ clearance: 'DENIED',
55
+ ruleId: ruleId('high_risk', toolName),
56
+ reason: memberGroups
57
+ ? `SSO group policy: ${toolName} requires one of the SSO groups ${groups}, and this member holds none of them`
58
+ : `SSO group policy: ${toolName} requires one of the SSO groups ${groups}, and this gate does not know the member's groups`,
59
+ };
60
+ }
61
+ /** Reads the snapshot's record line; null for any other line or a damaged one. */
62
+ export function decodeSsoGroupRecord(line) {
63
+ const [tag, b64, ...rest] = line.split('\t');
64
+ if (tag !== SSO_GROUP_RECORD_TAG || !b64 || rest.length > 0)
65
+ return null;
66
+ try {
67
+ const raw = JSON.parse(Buffer.from(b64, 'base64').toString('utf8'));
68
+ const policy = parseSsoGroupPolicy(raw['policy']);
69
+ if (!policy || typeof raw['issuedAt'] !== 'string')
70
+ return null;
71
+ const m = raw['member'];
72
+ const member = m && typeof m === 'object' && typeof m['memberId'] === 'string'
73
+ ? { memberId: m['memberId'], ssoGroups: stringList(m['ssoGroups']) }
74
+ : null;
75
+ return { policy, member, issuedAt: raw['issuedAt'] };
76
+ }
77
+ catch {
78
+ return null;
79
+ }
80
+ }
81
+ //# sourceMappingURL=ssoGroups.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IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACxE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAA4B,CAAA;QAC9F,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;QACjD,IAAI,CAAC,MAAM,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAA;QAC/D,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAmC,CAAA;QACzD,MAAM,MAAM,GACV,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,UAAU,CAAC,KAAK,QAAQ;YAC7D,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE;YACpE,CAAC,CAAC,IAAI,CAAA;QACV,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE,CAAA;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
package/dist/vercel.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * `ai@7.0.68` + `@ai-sdk/openai@4.0.43` were installed in a scratch directory
16
16
  * and `node_modules/ai/dist/index.d.ts` read directly (not inferred from
17
- * docs alone). The relevant types:
17
+ * docs alone); re-read unchanged on `ai@7.0.127`. The relevant types:
18
18
  *
19
19
  * ```ts
20
20
  * type ToolApprovalStatus =
@@ -66,7 +66,7 @@ import { type Gate } from './gate.js';
66
66
  /** Structural copy of `ai`'s `ToolApprovalStatus` — this package does not
67
67
  * depend on `ai` at runtime, so the shape is declared here rather than
68
68
  * imported. Confirmed field-for-field against `ai@7.0.68`'s
69
- * `dist/index.d.ts` (see module doc). */
69
+ * `dist/index.d.ts` (see module doc), unchanged in `ai@7.0.127`. */
70
70
  export type VercelToolApprovalStatus = undefined | 'not-applicable' | 'approved' | 'denied' | 'user-approval' | {
71
71
  type: 'not-applicable';
72
72
  reason?: undefined;
@@ -170,5 +170,5 @@ export declare function intuticProxyUrl(): string;
170
170
  */
171
171
  export declare function withIntuticProxy<TOptions extends {
172
172
  baseURL?: string;
173
- }, TProvider>(providerFactory: (options: TOptions) => TProvider, baseUrl?: string): (options: TOptions) => TProvider;
173
+ } | undefined, TProvider>(providerFactory: (options: TOptions) => TProvider, baseUrl?: string): (options: TOptions) => TProvider;
174
174
  //# sourceMappingURL=vercel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../src/vercel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,EAAwB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAA;AAG3D;;;0CAG0C;AAC1C,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,gBAAgB,GAChB,UAAU,GACV,QAAQ,GACR,eAAe,GACf;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAEjD;wEACwE;AACxE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAA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_modules/ai/dist/index.d.ts` read directly (not inferred from
17
- * docs alone). The relevant types:
17
+ * docs alone); re-read unchanged on `ai@7.0.127`. The relevant types:
18
18
  *
19
19
  * ```ts
20
20
  * type ToolApprovalStatus =
@@ -1 +1 @@
1
- {"version":3,"file":"vercel.js","sourceRoot":"","sources":["../src/vercel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,EAAE,MAAM,IAAI,UAAU,EAAa,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AA6ChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAmC,EAAE;IACvE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,UAAU,EAAE,CAAA;QACnC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,8EAA8E;gBAC5E,wEAAwE,CAC3E,CAAA;QACH,CAAC;QACD,IAAI,CAAC;YACH,MAAM,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAA4B,CAAC,CAAA;YACnF,OAAO,gBAAgB,CAAA;QACzB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,kBAAkB,EAAE,CAAC;gBACtC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAA;YAChD,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;IACH,CAAC,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,OAAO,CAAC,GAAG,C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AG,CAAC,OAAO,EAAE,CAAA;YAChD,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;IACH,CAAC,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,uBAAuB,CAAA;AACjE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,gBAAgB,CAO9B,eAAiD,EAAE,OAAgB;IACnE,MAAM,GAAG,GAAG,OAAO,IAAI,eAAe,EAAE,CAAA;IACxC,OAAO,CAAC,OAAiB,EAAa,EAAE,CAAC,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAA;AACxF,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /**
2
- * `@ai-sdk/workflow` adapter: `intuticNeedsApproval()`, `withIntuticApproval()`,
3
- * `wrapWorkflowTools()`, and the FatalError-compatible `IntuticWorkflowRefusal`.
2
+ * `@ai-sdk/workflow` adapter: `withIntuticApproval()`, `intuticNeedsApproval()`,
3
+ * `intuticApprovalStep()`, `wrapWorkflowTools()`, and the FatalError-compatible
4
+ * `IntuticWorkflowRefusal`.
4
5
  *
5
6
  * `@intutic/gate/workflow` — the same idea `vercel.ts` implements for the base
6
7
  * `ai` package (wrap the framework's own veto point around this package's
@@ -9,10 +10,11 @@
9
10
  *
10
11
  * ## 1. The veto surface is per-tool `needsApproval`, not an agent option
11
12
  *
12
- * Confirmed against a real install (`@ai-sdk/workflow@1.0.69`):
13
- * `WorkflowAgent`/`WorkflowAgentOptions` carry ZERO approval fields — the
14
- * string `toolApproval` does not appear anywhere in the package's shipped
15
- * `.d.ts`. The veto surface is `needsApproval` (boolean | function) on the
13
+ * Confirmed against a real install (`@ai-sdk/workflow@1.0.69`, re-read on
14
+ * 2.0.58): `WorkflowAgent`/`WorkflowAgentOptions` carry NO approval-policy
15
+ * field — 1.x's shipped `.d.ts` never mentions `toolApproval`, and 2.x adds
16
+ * only `experimental_toolApprovalSecret`, an HMAC secret that signs approval
17
+ * requests so a replayed approval can be verified, not a veto. The veto surface is `needsApproval` (boolean | function) on the
16
18
  * TOOL definition, exactly as the framework's own workflow-agent docs
17
19
  * describe under "Tool Approval". The compiled agent loop confirms the
18
20
  * semantics (dist/index.js): `needsApproval == null` → no approval; a
@@ -22,9 +24,9 @@
22
24
  * later — so this framework, uniquely in this package, has a real
23
25
  * human-in-the-loop lane for the gate to route into.
24
26
  *
25
- * (`ai@7.0.68` marks tool-level `needsApproval` `@deprecated` in favour of
26
- * generateText-level `toolApproval` — but `@ai-sdk/workflow`'s OWN agent loop
27
- * reads the tool-level field and exposes no other veto surface, so it is the
27
+ * (`ai@7` — still in 7.0.127 — marks tool-level `needsApproval` `@deprecated`
28
+ * in favour of generateText-level `toolApproval` — but `@ai-sdk/workflow`'s
29
+ * OWN agent loop (1.x and 2.0.58 alike) reads the tool-level field and exposes no other veto surface, so it is the
28
30
  * correct — indeed the only — integration point here. Noted in the TD entry
29
31
  * this phase filed, so a future @ai-sdk/workflow release moving to the
30
32
  * generateText-shaped surface gets caught rather than silently ungated.)
@@ -33,11 +35,13 @@
33
35
  *
34
36
  * A durable workflow retries failed steps. Confirmed against real installs
35
37
  * (`workflow@4.8.3` re-exporting `@workflow/errors@4.2.1` via
36
- * `@workflow/core`): the runtime's retry/abort decision consults
37
- * `FatalError.is(err)` (`@workflow/core`'s `runtime/step-handler.js` — a
38
- * fatal error "bubbl[es] up to parent workflow"; anything else is retried
39
- * toward `maxAttempts`), and `FatalError.is()` DUCK-TYPES: it checks
40
- * `err.name === 'FatalError'` on any Error-shaped object, precisely because
38
+ * `@workflow/core`; re-read on `workflow@5.0.1` / `@workflow/errors@5.0.1`):
39
+ * the runtime's retry/abort decision consults `FatalError.is(err)`
40
+ * (`@workflow/core`'s `runtime/step-handler.js` in 4.x,
41
+ * `runtime/step-executor.js` in 5.x — a fatal error "bubbl[es] up to parent
42
+ * workflow"; anything else is retried toward `maxAttempts`), and
43
+ * `FatalError.is()` DUCK-TYPES: it checks `err.name === 'FatalError'` (5.x
44
+ * also accepts `err.fatal === true`) on any Error-shaped object, precisely because
41
45
  * workflows execute in a separate `vm` realm where `instanceof` fails across
42
46
  * the boundary. A plain `IntuticGateRefusal` thrown from `needsApproval` or a
43
47
  * tool body would therefore be RETRIED — a governance denial replayed on a
@@ -56,9 +60,44 @@
56
60
  * "no gate configured" case, which is deterministic and would fail every
57
61
  * retry identically) is made fatal.
58
62
  *
63
+ * ## 3. `needsApproval` runs in the workflow VM — the gate must run in a step
64
+ *
65
+ * Observed in a live run on the Workflow DevKit's local world (TD-498):
66
+ * `WorkflowAgent`'s loop runs inside the `"use workflow"` function, so it
67
+ * calls `needsApproval` in the workflow VM, which has no Node.js modules.
68
+ * `Gate` reads its policy snapshot with `node:fs`, so evaluating it there
69
+ * fails with `require is not defined` — and when the workflow bundle pulls
70
+ * `node:fs` in at module level, EVERY workflow sharing that bundle fails at
71
+ * load (observed with `workflow/nitro`).
72
+ *
73
+ * So the gate runs in a STEP, which has full Node.js and is durable. The
74
+ * caller declares one `"use step"` function in their own module — the
75
+ * directive must sit in a module the workflow bundler transforms, and the
76
+ * step's body must build/receive the `Gate` itself, because step arguments
77
+ * are serialized and a `Gate` instance is not serializable — whose body is
78
+ * {@link intuticApprovalStep}, and passes it as `{ step }`:
79
+ *
80
+ * ```ts
81
+ * export async function intuticGate(toolName: string, input: unknown) {
82
+ * 'use step'
83
+ * return intuticApprovalStep(toolName, input, { gate: new Gate({ ... }) })
84
+ * }
85
+ * // in the workflow: tools: withIntuticApproval(tools, { step: intuticGate })
86
+ * ```
87
+ *
88
+ * With `{ step }`, the `needsApproval` this module builds only calls the step
89
+ * (a durable step invocation from the VM's point of view) and maps its
90
+ * boolean; nothing Node-only runs in the VM. This module itself is safe to
91
+ * import into workflow code: it imports nothing that touches Node.js
92
+ * (`errors.ts`, `registry.ts`, `wrapTools.ts`; `Gate` is a type-only
93
+ * import). Without `{ step }`, the gate is evaluated in-process, which still
94
+ * works wherever Node.js is available (inside a step, or any plain `ai`
95
+ * loop); called in the workflow VM it throws an {@link IntuticWorkflowRefusal}
96
+ * naming this fix instead of failing with `require is not defined`.
97
+ *
59
98
  * @module
60
99
  */
61
- import { type Gate } from './gate.js';
100
+ import type { Gate } from './gate.js';
62
101
  import { IntuticGateRefusal } from './errors.js';
63
102
  import { type AnyFn, type ExecutableTool } from './wrapTools.js';
64
103
  /**
@@ -99,9 +138,15 @@ export interface WorkflowNeedsApprovalOptions {
99
138
  * `ai`'s tool-level `needsApproval` (the surface `@ai-sdk/workflow`'s agent
100
139
  * loop actually consults). */
101
140
  export type WorkflowNeedsApproval = (input: unknown, options: WorkflowNeedsApprovalOptions) => Promise<boolean>;
102
- export interface IntuticNeedsApprovalOptions {
103
- /** Overrides the process-wide installed gate (`install(new Gate(...))`). */
104
- gate?: Gate;
141
+ /**
142
+ * The `"use step"` function the caller declares to run the gate (see module
143
+ * doc, section 3): called with the tool name and the call's input — both
144
+ * serializable — it resolves `true` when a human should approve the call and
145
+ * throws {@link IntuticWorkflowRefusal} when the gate blocks it. Its body is
146
+ * {@link intuticApprovalStep}.
147
+ */
148
+ export type IntuticGateStep = (toolName: string, input: unknown) => Promise<boolean>;
149
+ interface OnAllowOption {
105
150
  /**
106
151
  * What an ALLOWED call maps to. `needsApproval` answers "does a human need
107
152
  * to approve this?", which is a different question from "may this run?" —
@@ -119,30 +164,74 @@ export interface IntuticNeedsApprovalOptions {
119
164
  * the decision to a human approver as though the gate had no verdict, and
120
165
  * returning `false` would RUN the tool — the one thing a block must never
121
166
  * do.
167
+ *
168
+ * With `{ step }`, `'human'` here and the step's own answer are OR-ed:
169
+ * either one asking for a human is enough.
122
170
  */
123
171
  onAllow?: 'auto' | 'human';
124
172
  }
173
+ export type IntuticNeedsApprovalOptions = (OnAllowOption & {
174
+ /**
175
+ * Evaluate the gate in this `"use step"` function — required when the
176
+ * `needsApproval` runs in the workflow VM, i.e. on a `WorkflowAgent`
177
+ * (see module doc, section 3). The step builds or receives its own
178
+ * `Gate`; a `gate` cannot be passed here, since the VM cannot hold one.
179
+ */
180
+ step: IntuticGateStep;
181
+ gate?: never;
182
+ }) | (OnAllowOption & {
183
+ /** Evaluate in-process, Node.js only. Overrides the process-wide
184
+ * installed gate (`install(new Gate(...))`). */
185
+ gate?: Gate;
186
+ step?: undefined;
187
+ });
188
+ /** Options for {@link intuticApprovalStep} — the in-process evaluation, so no
189
+ * `step`. */
190
+ export type IntuticApprovalStepOptions = OnAllowOption & {
191
+ gate?: Gate;
192
+ };
125
193
  /**
126
- * Build an async `needsApproval` function for ONE workflow tool:
194
+ * The gate evaluation for ONE call, written to be the body of the caller's
195
+ * `"use step"` function (see module doc, section 3):
127
196
  *
128
197
  * ```ts
129
- * import { WorkflowAgent } from '@ai-sdk/workflow'
130
- * import { Gate, install } from '@intutic/gate'
131
- * import { intuticNeedsApproval } from '@intutic/gate/workflow'
132
- *
133
- * install(new Gate({ workspaceId: process.env.INTUTIC_WORKSPACE_ID }))
134
- *
135
- * const agent = new WorkflowAgent({
136
- * model,
137
- * tools: {
138
- * deployService: {
139
- * description: '...',
140
- * inputSchema,
141
- * execute: deployStep,
142
- * needsApproval: intuticNeedsApproval('deployService'),
143
- * },
144
- * },
145
- * })
198
+ * // workflows/intutic-gate.ts
199
+ * import { Gate } from '@intutic/gate'
200
+ * import { intuticApprovalStep } from '@intutic/gate/workflow'
201
+ *
202
+ * export async function intuticGate(toolName: string, input: unknown): Promise<boolean> {
203
+ * 'use step'
204
+ * return intuticApprovalStep(toolName, input, {
205
+ * gate: new Gate({ workspaceId: process.env.INTUTIC_WORKSPACE_ID }),
206
+ * })
207
+ * }
208
+ * ```
209
+ *
210
+ * Reference `@intutic/gate` only inside step bodies in that module: the
211
+ * workflow bundler also bundles it into the VM with the step bodies
212
+ * replaced, and a module-level use would keep the Node-only gate there.
213
+ *
214
+ * Verdict mapping: BLOCK → throws {@link IntuticWorkflowRefusal} (fatal — the
215
+ * step runs once and the run fails instead of retry-looping; see module doc);
216
+ * ALLOW → `false`, or `true` with `onAllow: 'human'`. A non-refusal crash in
217
+ * the gate is re-thrown untouched (the step retries — correct for
218
+ * transients). Requires a gate (`{ gate }` or `install()` in the process
219
+ * that runs steps); called in the workflow VM itself, it throws naming the
220
+ * fix.
221
+ */
222
+ export declare function intuticApprovalStep(toolName: string, input: unknown, opts?: IntuticApprovalStepOptions): Promise<boolean>;
223
+ /**
224
+ * Build an async `needsApproval` function for ONE workflow tool. On a
225
+ * `WorkflowAgent`, pass the caller's gate step (see
226
+ * {@link intuticApprovalStep}):
227
+ *
228
+ * ```ts
229
+ * deployService: {
230
+ * description: '...',
231
+ * inputSchema,
232
+ * execute: deployStep,
233
+ * needsApproval: intuticNeedsApproval('deployService', { step: intuticGate }),
234
+ * },
146
235
  * ```
147
236
  *
148
237
  * The tool name is a parameter because the framework's `needsApproval`
@@ -151,6 +240,12 @@ export interface IntuticNeedsApprovalOptions {
151
240
  * {@link withIntuticApproval} to attach this to a whole tools record without
152
241
  * hand-repeating each name.
153
242
  *
243
+ * With `{ step }`, the returned function only calls the step and maps its
244
+ * answer — safe in the workflow VM. Without it, the gate is evaluated
245
+ * in-process (`{ gate }` or the installed gate), which needs Node.js: fine in
246
+ * a plain `ai` loop or inside a step, and in the workflow VM it throws an
247
+ * {@link IntuticWorkflowRefusal} naming the `{ step }` fix.
248
+ *
154
249
  * Verdict mapping: BLOCK → throws {@link IntuticWorkflowRefusal} (fatal —
155
250
  * aborts instead of retry-looping; see module doc); ALLOW → `false` or `true`
156
251
  * per `onAllow`. A non-refusal crash in the gate is re-thrown untouched
@@ -169,13 +264,29 @@ export interface WorkflowToolLike {
169
264
  * `needsApproval` the tool already declares:
170
265
  *
171
266
  * ```ts
172
- * const agent = new WorkflowAgent({ model, tools: withIntuticApproval(tools) })
267
+ * import { WorkflowAgent } from '@ai-sdk/workflow'
268
+ * import { withIntuticApproval } from '@intutic/gate/workflow'
269
+ * import { intuticGate } from './intutic-gate' // the "use step" function
270
+ *
271
+ * export async function deployAgent(messages: ModelMessage[]) {
272
+ * 'use workflow'
273
+ * const agent = new WorkflowAgent({
274
+ * model,
275
+ * tools: withIntuticApproval(tools, { step: intuticGate }),
276
+ * })
277
+ * // ...
278
+ * }
173
279
  * ```
174
280
  *
281
+ * (`{ step }` is what makes this work on a `WorkflowAgent`, whose
282
+ * `needsApproval` runs in the workflow VM — see {@link intuticApprovalStep}
283
+ * and the module doc, section 3. Without it the gate is evaluated
284
+ * in-process, which needs Node.js.)
285
+ *
175
286
  * For each tool (the record KEY is the tool name reported to the gate — the
176
287
  * same identity the framework itself dispatches on):
177
288
  *
178
- * 1. `Gate.guard()` runs first. BLOCK throws {@link IntuticWorkflowRefusal}.
289
+ * 1. The gate runs first. BLOCK throws {@link IntuticWorkflowRefusal}.
179
290
  * 2. On allow, the tool's OWN prior `needsApproval` still applies: a
180
291
  * boolean is returned as-is; a function is awaited with the original
181
292
  * arguments; a tool with none falls back to `onAllow` ('auto' → false).
@@ -198,7 +309,9 @@ export declare function withIntuticApproval<T extends Record<string, WorkflowToo
198
309
  * "no gate configured" handling and the record-key-is-tool-name convention —
199
310
  * is `wrapTools`'s own behaviour, reused rather than reimplemented.
200
311
  *
201
- * Prefer {@link withIntuticApproval} as the primary integration: it uses the
312
+ * Call it inside the tool's `"use step"` body (it evaluates the gate
313
+ * in-process, so it needs Node.js). Prefer {@link withIntuticApproval} as the
314
+ * primary integration: it uses the
202
315
  * framework's own pre-execution veto surface, refuses BEFORE the durable
203
316
  * step ever starts, and keeps the human-approval lane available. This
204
317
  * execute-level wrapper is defense in depth (or the option for callers whose
@@ -206,4 +319,5 @@ export declare function withIntuticApproval<T extends Record<string, WorkflowToo
206
319
  * the call, which is harmless but emits duplicate gate telemetry.
207
320
  */
208
321
  export declare function wrapWorkflowTools<T extends AnyFn | ExecutableTool>(tools: Record<string, T>, gate?: Gate): Record<string, T>;
322
+ export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