@axonflow/sdk 5.5.0 → 6.0.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/dist/cjs/adapters/governed-tool.js +4 -4
- package/dist/cjs/adapters/langgraph.js +9 -9
- package/dist/cjs/client.d.ts +43 -8
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +304 -176
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/errors.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/telemetry.d.ts.map +1 -1
- package/dist/cjs/telemetry.js +57 -8
- package/dist/cjs/telemetry.js.map +1 -1
- package/dist/cjs/types/connector.d.ts +33 -5
- package/dist/cjs/types/connector.d.ts.map +1 -1
- package/dist/cjs/types/connector.js.map +1 -1
- package/dist/cjs/types/cost-controls.d.ts +29 -0
- package/dist/cjs/types/cost-controls.d.ts.map +1 -1
- package/dist/cjs/types/execution-replay.d.ts +2 -0
- package/dist/cjs/types/execution-replay.d.ts.map +1 -1
- package/dist/cjs/types/masfeat.d.ts +2 -0
- package/dist/cjs/types/masfeat.d.ts.map +1 -1
- package/dist/cjs/types/planning.d.ts +78 -8
- package/dist/cjs/types/planning.d.ts.map +1 -1
- package/dist/cjs/types/policies.d.ts +92 -14
- package/dist/cjs/types/policies.d.ts.map +1 -1
- package/dist/cjs/types/policy.d.ts +58 -4
- package/dist/cjs/types/policy.d.ts.map +1 -1
- package/dist/cjs/types/proxy.d.ts +22 -4
- package/dist/cjs/types/proxy.d.ts.map +1 -1
- package/dist/cjs/types/workflows.d.ts +142 -17
- package/dist/cjs/types/workflows.d.ts.map +1 -1
- package/dist/cjs/types/workflows.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/adapters/governed-tool.js +4 -4
- package/dist/esm/adapters/langgraph.js +9 -9
- package/dist/esm/client.d.ts +43 -8
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +304 -176
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/errors.js +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/telemetry.d.ts.map +1 -1
- package/dist/esm/telemetry.js +57 -8
- package/dist/esm/telemetry.js.map +1 -1
- package/dist/esm/types/connector.d.ts +33 -5
- package/dist/esm/types/connector.d.ts.map +1 -1
- package/dist/esm/types/connector.js.map +1 -1
- package/dist/esm/types/cost-controls.d.ts +29 -0
- package/dist/esm/types/cost-controls.d.ts.map +1 -1
- package/dist/esm/types/execution-replay.d.ts +2 -0
- package/dist/esm/types/execution-replay.d.ts.map +1 -1
- package/dist/esm/types/masfeat.d.ts +2 -0
- package/dist/esm/types/masfeat.d.ts.map +1 -1
- package/dist/esm/types/planning.d.ts +78 -8
- package/dist/esm/types/planning.d.ts.map +1 -1
- package/dist/esm/types/policies.d.ts +92 -14
- package/dist/esm/types/policies.d.ts.map +1 -1
- package/dist/esm/types/policy.d.ts +58 -4
- package/dist/esm/types/policy.d.ts.map +1 -1
- package/dist/esm/types/proxy.d.ts +22 -4
- package/dist/esm/types/proxy.d.ts.map +1 -1
- package/dist/esm/types/workflows.d.ts +142 -17
- package/dist/esm/types/workflows.d.ts.map +1 -1
- package/dist/esm/types/workflows.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -2
|
@@ -47,8 +47,14 @@ export type PolicySeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
|
47
47
|
* Static policy definition
|
|
48
48
|
*/
|
|
49
49
|
export interface StaticPolicy {
|
|
50
|
-
/** Unique policy
|
|
50
|
+
/** Unique policy UUID */
|
|
51
51
|
id: string;
|
|
52
|
+
/**
|
|
53
|
+
* Human-readable policy identifier (e.g. `sys_sqli_union_select`).
|
|
54
|
+
* Distinct from `id` which is the UUID; use this when referencing
|
|
55
|
+
* policies in code or audit logs.
|
|
56
|
+
*/
|
|
57
|
+
policy_id?: string;
|
|
52
58
|
/** Human-readable policy name */
|
|
53
59
|
name: string;
|
|
54
60
|
/** Policy description */
|
|
@@ -65,6 +71,8 @@ export interface StaticPolicy {
|
|
|
65
71
|
enabled: boolean;
|
|
66
72
|
/** Action to take when pattern matches */
|
|
67
73
|
action: PolicyAction;
|
|
74
|
+
/** Evaluation order — lower values are evaluated first. */
|
|
75
|
+
priority?: number;
|
|
68
76
|
/** Organization ID (for organization-tier policies) */
|
|
69
77
|
organizationId?: string;
|
|
70
78
|
/** Tenant ID (for tenant-tier policies) */
|
|
@@ -75,10 +83,21 @@ export interface StaticPolicy {
|
|
|
75
83
|
updatedAt: string;
|
|
76
84
|
/** Version number for tracking changes */
|
|
77
85
|
version?: number;
|
|
78
|
-
/**
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Whether this policy has an active override (canonical wire-shape name).
|
|
88
|
+
*/
|
|
89
|
+
has_override?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Active override details
|
|
92
|
+
*/
|
|
81
93
|
override?: PolicyOverride;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `has_override`. The `policyRequest` decoder is a
|
|
96
|
+
* JSON.parse passthrough — the wire field is `has_override`, so
|
|
97
|
+
* `hasOverride` has always read `undefined`. This alias is kept
|
|
98
|
+
* for type-compat and will be removed in v7.
|
|
99
|
+
*/
|
|
100
|
+
hasOverride?: boolean;
|
|
82
101
|
}
|
|
83
102
|
/**
|
|
84
103
|
* Options for listing static policies
|
|
@@ -125,6 +144,10 @@ export interface CreateStaticPolicyRequest {
|
|
|
125
144
|
enabled?: boolean;
|
|
126
145
|
/** Action to take when pattern matches */
|
|
127
146
|
action?: PolicyAction;
|
|
147
|
+
/** Evaluation order — lower values are evaluated first. */
|
|
148
|
+
priority?: number;
|
|
149
|
+
/** Free-form tags for grouping and filtering. */
|
|
150
|
+
tags?: string[];
|
|
128
151
|
}
|
|
129
152
|
/**
|
|
130
153
|
* Request to update an existing static policy
|
|
@@ -144,11 +167,17 @@ export interface UpdateStaticPolicyRequest {
|
|
|
144
167
|
enabled?: boolean;
|
|
145
168
|
/** Updated action */
|
|
146
169
|
action?: PolicyAction;
|
|
170
|
+
/** Updated evaluation priority. */
|
|
171
|
+
priority?: number;
|
|
172
|
+
/** Updated tags. */
|
|
173
|
+
tags?: string[];
|
|
147
174
|
}
|
|
148
175
|
/**
|
|
149
176
|
* Policy override configuration
|
|
150
177
|
*/
|
|
151
178
|
export interface PolicyOverride {
|
|
179
|
+
/** Override identifier (required to revoke a specific override). */
|
|
180
|
+
id?: string;
|
|
152
181
|
/** Policy ID this override applies to */
|
|
153
182
|
policy_id: string;
|
|
154
183
|
/** Override action */
|
|
@@ -161,8 +190,14 @@ export interface PolicyOverride {
|
|
|
161
190
|
created_at: string;
|
|
162
191
|
/** When the override expires (optional) */
|
|
163
192
|
expires_at?: string;
|
|
164
|
-
/**
|
|
165
|
-
|
|
193
|
+
/** Override enabled status (null = no override). Wire-shape canonical name. */
|
|
194
|
+
enabled_override?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated Use `enabled_override`. The decoder is JSON.parse
|
|
197
|
+
* passthrough — the wire emits `enabled_override`, so `active` has
|
|
198
|
+
* always read `undefined`. Removed in v7.
|
|
199
|
+
*/
|
|
200
|
+
active?: boolean;
|
|
166
201
|
}
|
|
167
202
|
/**
|
|
168
203
|
* Request to create a policy override
|
|
@@ -341,6 +376,10 @@ export interface TestPatternMatch {
|
|
|
341
376
|
* Policy version history entry
|
|
342
377
|
*/
|
|
343
378
|
export interface PolicyVersion {
|
|
379
|
+
/** Snapshot identifier (UUID). */
|
|
380
|
+
id?: string;
|
|
381
|
+
/** Policy ID this snapshot belongs to. */
|
|
382
|
+
policy_id?: string;
|
|
344
383
|
/** Version number */
|
|
345
384
|
version: number;
|
|
346
385
|
/** Who made the change */
|
|
@@ -349,11 +388,27 @@ export interface PolicyVersion {
|
|
|
349
388
|
changedAt: string;
|
|
350
389
|
/** Type of change */
|
|
351
390
|
changeType: 'created' | 'updated' | 'enabled' | 'disabled' | 'deleted';
|
|
352
|
-
/**
|
|
391
|
+
/** Summary of changes (canonical wire field). */
|
|
392
|
+
change_summary?: string;
|
|
393
|
+
/** Complete policy state at this version (canonical wire field). */
|
|
394
|
+
snapshot?: Record<string, unknown>;
|
|
395
|
+
/**
|
|
396
|
+
* @deprecated The transformer reads `change_description` from the
|
|
397
|
+
* wire, but the server actually emits `change_summary`. So this
|
|
398
|
+
* field has always read `undefined`. Use `change_summary`. Removed
|
|
399
|
+
* in v7.
|
|
400
|
+
*/
|
|
353
401
|
changeDescription?: string;
|
|
354
|
-
/**
|
|
402
|
+
/**
|
|
403
|
+
* @deprecated The transformer reads `previous_values` from the wire,
|
|
404
|
+
* but the server actually emits the full `snapshot` object. So this
|
|
405
|
+
* field has always read `undefined`. Use `snapshot`. Removed in v7.
|
|
406
|
+
*/
|
|
355
407
|
previousValues?: Record<string, unknown>;
|
|
356
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* @deprecated Same as `previousValues` — the wire emits a single
|
|
410
|
+
* `snapshot`, not before/after diffs. Use `snapshot`. Removed in v7.
|
|
411
|
+
*/
|
|
357
412
|
newValues?: Record<string, unknown>;
|
|
358
413
|
}
|
|
359
414
|
/**
|
|
@@ -368,13 +423,36 @@ export interface EffectivePoliciesOptions {
|
|
|
368
423
|
includeOverridden?: boolean;
|
|
369
424
|
}
|
|
370
425
|
/**
|
|
371
|
-
* Response containing effective policies with tier inheritance applied
|
|
426
|
+
* Response containing effective policies with tier inheritance applied.
|
|
427
|
+
*
|
|
428
|
+
* The wire emits this as a tier-stratified response with separate
|
|
429
|
+
* `static` and `dynamic` arrays plus tenant/org scope and a computed-at
|
|
430
|
+
* timestamp. The legacy `policies` flat array and `inheritance` summary
|
|
431
|
+
* are SDK-side conveniences — the wire-canonical fields are exposed
|
|
432
|
+
* directly below.
|
|
372
433
|
*/
|
|
373
434
|
export interface EffectivePoliciesResponse {
|
|
374
|
-
/** Effective policies after tier inheritance */
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
|
|
435
|
+
/** Effective static policies after tier inheritance (wire-canonical). */
|
|
436
|
+
static?: StaticPolicy[];
|
|
437
|
+
/** Effective dynamic policies after tier inheritance (wire-canonical). */
|
|
438
|
+
dynamic?: DynamicPolicy[];
|
|
439
|
+
/** Tenant ID this set was computed for. */
|
|
440
|
+
tenant_id?: string;
|
|
441
|
+
/** Organization ID this set was computed for (Enterprise). */
|
|
442
|
+
organization_id?: string;
|
|
443
|
+
/** When this effective set was computed (ISO 8601). */
|
|
444
|
+
computed_at?: string;
|
|
445
|
+
/**
|
|
446
|
+
* Combined effective policies (legacy flat shape). Prefer `static`
|
|
447
|
+
* and `dynamic` for new code.
|
|
448
|
+
*/
|
|
449
|
+
policies?: StaticPolicy[] | DynamicPolicy[];
|
|
450
|
+
/**
|
|
451
|
+
* Inheritance chain summary (legacy SDK-side computed view; not on
|
|
452
|
+
* the wire). Populated by the SDK when the legacy `policies` shape
|
|
453
|
+
* is decoded.
|
|
454
|
+
*/
|
|
455
|
+
inheritance?: {
|
|
378
456
|
/** System policies count */
|
|
379
457
|
systemPolicies: number;
|
|
380
458
|
/** Organization policies count */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../../src/types/policies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,MAAM,MAAM,cAAc,GAEtB,eAAe,GACf,gBAAgB,GAEhB,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,eAAe,GAEf,cAAc,GACd,aAAa,GACb,iBAAiB,GAEjB,gBAAgB,GAEhB,cAAc,GACd,oBAAoB,GACpB,kBAAkB,GAClB,cAAc,GACd,gBAAgB,GAEhB,cAAc,GACd,iBAAiB,GAC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,CAAC;IACd,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -1,31 +1,85 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Policy
|
|
2
|
+
* Generic policy with full metadata. Mirrors the OpenAPI `Policy`
|
|
3
|
+
* schema; SDK consumers historically only saw the rules-shape, but
|
|
4
|
+
* the wire emits a richer object with category, tier, action,
|
|
5
|
+
* pattern, lifecycle timestamps, and ownership scoping.
|
|
3
6
|
*/
|
|
4
7
|
export interface Policy {
|
|
5
8
|
/**
|
|
6
|
-
* Policy
|
|
9
|
+
* Policy UUID
|
|
7
10
|
*/
|
|
8
11
|
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable policy identifier (e.g. `sys_sqli_union_select`).
|
|
14
|
+
*/
|
|
15
|
+
policy_id?: string;
|
|
9
16
|
/**
|
|
10
17
|
* Policy name
|
|
11
18
|
*/
|
|
12
19
|
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Free-form description.
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
13
24
|
/**
|
|
14
25
|
* Policy type
|
|
15
26
|
*/
|
|
16
27
|
type: 'static' | 'dynamic';
|
|
28
|
+
/**
|
|
29
|
+
* Policy category for grouping and filtering.
|
|
30
|
+
*/
|
|
31
|
+
category?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Policy tier in the hierarchy.
|
|
34
|
+
*/
|
|
35
|
+
tier?: 'system' | 'organization' | 'tenant';
|
|
36
|
+
/**
|
|
37
|
+
* Regex pattern (for static policies).
|
|
38
|
+
*/
|
|
39
|
+
pattern?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Severity level.
|
|
42
|
+
*/
|
|
43
|
+
severity?: 'critical' | 'high' | 'medium' | 'low';
|
|
44
|
+
/**
|
|
45
|
+
* Action to take when the policy fires.
|
|
46
|
+
*/
|
|
47
|
+
action?: 'block' | 'require_approval' | 'redact' | 'warn' | 'log';
|
|
48
|
+
/**
|
|
49
|
+
* Multiple actions for fan-out policies.
|
|
50
|
+
*/
|
|
51
|
+
actions?: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Conditions for dynamic policies.
|
|
54
|
+
*/
|
|
55
|
+
conditions?: Array<Record<string, unknown>>;
|
|
17
56
|
/**
|
|
18
57
|
* Is the policy enabled?
|
|
19
58
|
*/
|
|
20
59
|
enabled: boolean;
|
|
21
60
|
/**
|
|
22
|
-
* Policy rules
|
|
61
|
+
* Policy rules (legacy shape; static policies expose `pattern`
|
|
62
|
+
* directly on the wire instead).
|
|
23
63
|
*/
|
|
24
|
-
rules
|
|
64
|
+
rules?: PolicyRule[];
|
|
25
65
|
/**
|
|
26
66
|
* Priority (lower numbers = higher priority)
|
|
27
67
|
*/
|
|
28
68
|
priority: number;
|
|
69
|
+
/** Organization ID for organization-tier policies. */
|
|
70
|
+
organization_id?: string;
|
|
71
|
+
/** Tenant ID for tenant-tier policies. */
|
|
72
|
+
tenant_id?: string;
|
|
73
|
+
/** Creation timestamp. */
|
|
74
|
+
created_at?: string;
|
|
75
|
+
/** Last-update timestamp. */
|
|
76
|
+
updated_at?: string;
|
|
77
|
+
/** Author of the policy. */
|
|
78
|
+
created_by?: string;
|
|
79
|
+
/** Last editor. */
|
|
80
|
+
updated_by?: string;
|
|
81
|
+
/** Version counter for change tracking. */
|
|
82
|
+
version?: number;
|
|
29
83
|
}
|
|
30
84
|
export interface PolicyRule {
|
|
31
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/types/policy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/types/policy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAA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MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAC/D,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;IAEF;;OAEG;IACH,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IAEvD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -50,9 +50,16 @@ export interface CodeArtifact {
|
|
|
50
50
|
policies_checked?: string[];
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Proxy-mode policy evaluation summary returned by `/api/request`.
|
|
54
|
+
*
|
|
55
|
+
* Renamed from `PolicyInfo` in v6.0.0 — the original name collided
|
|
56
|
+
* with the OpenAPI `PolicyInfo` schema served by the MCP path
|
|
57
|
+
* (`/api/v1/mcp/check-input` etc.), which the SDK exposes as
|
|
58
|
+
* `MCPPolicyInfo`. This type is the proxy-mode shape; the v6
|
|
59
|
+
* top-level `PolicyInfo` export now refers to the MCP shape (matching
|
|
60
|
+
* the OpenAPI spec).
|
|
54
61
|
*/
|
|
55
|
-
export interface
|
|
62
|
+
export interface ProxyPolicyInfo {
|
|
56
63
|
/** List of policies that were evaluated */
|
|
57
64
|
policiesEvaluated: string[];
|
|
58
65
|
/** Static checks that were applied */
|
|
@@ -64,6 +71,17 @@ export interface PolicyInfo {
|
|
|
64
71
|
/** Code artifact metadata if code was detected in the response */
|
|
65
72
|
codeArtifact?: CodeArtifact;
|
|
66
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Renamed to `ProxyPolicyInfo` in v6.0.0 to resolve a
|
|
76
|
+
* name collision with the OpenAPI `PolicyInfo` schema (the MCP
|
|
77
|
+
* shape). For new code, use `ProxyPolicyInfo` from `@axonflow/sdk`
|
|
78
|
+
* for the proxy-mode shape, or `PolicyInfo` for the MCP shape (the
|
|
79
|
+
* latter is what was previously exported as `MCPPolicyInfo`).
|
|
80
|
+
*
|
|
81
|
+
* This alias keeps existing code compiling for one major version.
|
|
82
|
+
* Removed in v7.0.0.
|
|
83
|
+
*/
|
|
84
|
+
export type PolicyInfoLegacyProxyShape = ProxyPolicyInfo;
|
|
67
85
|
/**
|
|
68
86
|
* Budget enforcement status information (Issue #1082).
|
|
69
87
|
*
|
|
@@ -109,8 +127,8 @@ export interface ExecuteQueryResponse {
|
|
|
109
127
|
blocked: boolean;
|
|
110
128
|
/** Reason for blocking (if blocked) */
|
|
111
129
|
blockReason?: string;
|
|
112
|
-
/** Policy evaluation info */
|
|
113
|
-
policyInfo?:
|
|
130
|
+
/** Policy evaluation info (proxy-mode shape) */
|
|
131
|
+
policyInfo?: ProxyPolicyInfo;
|
|
114
132
|
/** Budget status (Issue #1082) */
|
|
115
133
|
budgetInfo?: BudgetInfo;
|
|
116
134
|
/** Media analysis results (present when media was submitted) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/types/proxy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,wHAAwH;IACxH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,gEAAgE;IAChE,KAAK,CAAC,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C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC"}
|
|
@@ -50,14 +50,25 @@ export interface CreateWorkflowResponse {
|
|
|
50
50
|
workflow_id: string;
|
|
51
51
|
/** Name of the workflow */
|
|
52
52
|
workflow_name: string;
|
|
53
|
-
/**
|
|
54
|
-
source: WorkflowSource;
|
|
55
|
-
/** Current status (always 'in_progress' for new workflows) */
|
|
53
|
+
/** Status (always 'in_progress' for new workflows) */
|
|
56
54
|
status: WorkflowStatus;
|
|
57
|
-
/** When the workflow
|
|
58
|
-
|
|
55
|
+
/** When the workflow started executing (canonical wire field). */
|
|
56
|
+
started_at?: string;
|
|
59
57
|
/** Trace ID for correlating with external tracing systems */
|
|
60
58
|
trace_id?: string;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated The wire emits `started_at`, not `created_at`. The
|
|
61
|
+
* orchestratorRequest decoder is JSON.parse passthrough, so this
|
|
62
|
+
* field has always read `undefined`. Use `started_at`. Removed in v7.
|
|
63
|
+
*/
|
|
64
|
+
created_at?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Not emitted on the create response. The wire shape
|
|
67
|
+
* for `CreateWorkflowResponse` does not include `source`; this
|
|
68
|
+
* field has always read `undefined`. Read `source` from a
|
|
69
|
+
* subsequent `getWorkflow()` call instead. Removed in v7.
|
|
70
|
+
*/
|
|
71
|
+
source?: WorkflowSource;
|
|
61
72
|
}
|
|
62
73
|
/** Tool-level context for per-tool governance within tool_call steps. */
|
|
63
74
|
export interface ToolContext {
|
|
@@ -99,6 +110,12 @@ export interface StepGateRequest {
|
|
|
99
110
|
* echoed on retry_context.idempotency_key in every subsequent gate response.
|
|
100
111
|
*/
|
|
101
112
|
idempotency_key?: string;
|
|
113
|
+
/** Estimated input tokens for this step (used by budget policies at gate time). */
|
|
114
|
+
tokens_in?: number;
|
|
115
|
+
/** Estimated output tokens for this step (used by budget policies at gate time). */
|
|
116
|
+
tokens_out?: number;
|
|
117
|
+
/** Estimated cost in USD for this step (used by budget policies at gate time). */
|
|
118
|
+
cost_usd?: number;
|
|
102
119
|
}
|
|
103
120
|
/**
|
|
104
121
|
* Prior completion status for a step: "none" on first gate call, "completed" after
|
|
@@ -168,9 +185,23 @@ export interface StepGateResponse {
|
|
|
168
185
|
policy_ids?: string[];
|
|
169
186
|
/** URL to the approval portal (if decision is require_approval) */
|
|
170
187
|
approval_url?: string;
|
|
188
|
+
/** Unique decision identifier for auditing (links a gate response to its audit row). */
|
|
189
|
+
decision_id?: string;
|
|
171
190
|
/** All policies that were evaluated during the gate check (Issue #1021) */
|
|
172
|
-
|
|
191
|
+
policies_evaluated?: PolicyMatch[];
|
|
173
192
|
/** Policies that matched and influenced the decision (Issue #1021) */
|
|
193
|
+
policies_matched?: PolicyMatch[];
|
|
194
|
+
/**
|
|
195
|
+
* @deprecated Use `policies_evaluated` (matches the wire). The
|
|
196
|
+
* `stepGate` decoder is a JSON.parse passthrough — the wire field
|
|
197
|
+
* is `policies_evaluated`, so `policiesEvaluated` has always read
|
|
198
|
+
* `undefined`. Removed in v7.
|
|
199
|
+
*/
|
|
200
|
+
policiesEvaluated?: PolicyMatch[];
|
|
201
|
+
/**
|
|
202
|
+
* @deprecated Use `policies_matched` (matches the wire). Same
|
|
203
|
+
* orphan-read situation as `policiesEvaluated`. Removed in v7.
|
|
204
|
+
*/
|
|
174
205
|
policiesMatched?: PolicyMatch[];
|
|
175
206
|
/**
|
|
176
207
|
* Whether this response was served from a prior decision rather than a fresh policy evaluation.
|
|
@@ -277,6 +308,8 @@ export interface WorkflowStatusResponse {
|
|
|
277
308
|
completed_at?: string;
|
|
278
309
|
/** Trace ID for correlating with external tracing systems */
|
|
279
310
|
trace_id?: string;
|
|
311
|
+
/** Arbitrary workflow metadata, opaque to the platform. */
|
|
312
|
+
metadata?: Record<string, unknown>;
|
|
280
313
|
/** List of steps in the workflow */
|
|
281
314
|
steps?: WorkflowStepInfo[];
|
|
282
315
|
}
|
|
@@ -303,6 +336,10 @@ export interface ListWorkflowsResponse {
|
|
|
303
336
|
workflows: WorkflowStatusResponse[];
|
|
304
337
|
/** Total count (for pagination) */
|
|
305
338
|
total: number;
|
|
339
|
+
/** Echo of the limit query param (for pagination clients). */
|
|
340
|
+
limit?: number;
|
|
341
|
+
/** Echo of the offset query param (for pagination clients). */
|
|
342
|
+
offset?: number;
|
|
306
343
|
}
|
|
307
344
|
/**
|
|
308
345
|
* Request to abort a workflow.
|
|
@@ -340,51 +377,123 @@ export interface MarkStepCompletedRequest {
|
|
|
340
377
|
}
|
|
341
378
|
/**
|
|
342
379
|
* Response from approving a workflow step.
|
|
380
|
+
*
|
|
381
|
+
* Starting with v5.6.0 the server returns the rich step-gate shape on approve:
|
|
382
|
+
* `decision` resolves to `"allow"` once approved, `retry_context` mirrors the
|
|
383
|
+
* gate response retry state, `approved_by` / `approved_at` carry the reviewer
|
|
384
|
+
* identity, `approval_id` is the deterministic HITL queue entry UUID, and
|
|
385
|
+
* `policies_matched` reconstructs the governance trail. Legacy fields
|
|
386
|
+
* (`workflow_id`, `step_id`, `status`) remain for back-compat.
|
|
387
|
+
*
|
|
388
|
+
* See ADR-046 (HITL response parity) — the same shape is returned by both the
|
|
389
|
+
* WCP endpoint and the MAP plan-scoped equivalent.
|
|
343
390
|
*/
|
|
344
391
|
export interface ApproveStepResponse {
|
|
345
392
|
/** Workflow ID */
|
|
346
393
|
workflow_id: string;
|
|
394
|
+
/** MAP plan ID — present on responses from `/api/v1/plans/{id}/steps/{step_id}/approve`. */
|
|
395
|
+
plan_id?: string;
|
|
347
396
|
/** Step ID that was approved */
|
|
348
397
|
step_id: string;
|
|
349
|
-
/**
|
|
350
|
-
status
|
|
398
|
+
/** Legacy status field — mirrors `approval_status`. Retained for v5.x back-compat. */
|
|
399
|
+
status?: string;
|
|
400
|
+
/** Post-approval decision: `allow` once approved; `require_approval` if still pending. */
|
|
401
|
+
decision?: GateDecision;
|
|
402
|
+
/** Decision reason text (prefixed with "Approved: " on the approve path). */
|
|
403
|
+
reason?: string;
|
|
404
|
+
/** Terminal approval status (pending / approved / rejected). */
|
|
405
|
+
approval_status?: ApprovalStatus;
|
|
406
|
+
/** HITL queue entry UUID (deterministic UUID v5 over `(workflow_id, step_id)`). */
|
|
407
|
+
approval_id?: string;
|
|
408
|
+
/** Identity (X-User-ID) that approved the step. */
|
|
409
|
+
approved_by?: string;
|
|
410
|
+
/** ISO 8601 timestamp when the approval was persisted. */
|
|
411
|
+
approved_at?: string;
|
|
412
|
+
/** Policies that triggered the original require_approval decision. */
|
|
413
|
+
policies_matched?: PolicyMatch[];
|
|
414
|
+
/** Retry / idempotency state — mirrors the gate response retry_context. */
|
|
415
|
+
retry_context: RetryContext;
|
|
416
|
+
/** Human-readable status summary. */
|
|
417
|
+
message?: string;
|
|
351
418
|
}
|
|
352
419
|
/**
|
|
353
|
-
* Response from rejecting a workflow step.
|
|
420
|
+
* Response from rejecting a workflow step. Symmetric with ApproveStepResponse —
|
|
421
|
+
* `decision` resolves to `"block"`, `rejected_by` / `rejected_at` populate
|
|
422
|
+
* instead of approved_*. See ADR-046.
|
|
354
423
|
*/
|
|
355
424
|
export interface RejectStepResponse {
|
|
356
425
|
/** Workflow ID */
|
|
357
426
|
workflow_id: string;
|
|
427
|
+
/** MAP plan ID — present on MAP plane responses. */
|
|
428
|
+
plan_id?: string;
|
|
358
429
|
/** Step ID that was rejected */
|
|
359
430
|
step_id: string;
|
|
360
|
-
/**
|
|
361
|
-
status
|
|
431
|
+
/** Legacy status field — mirrors `approval_status`. Retained for back-compat. */
|
|
432
|
+
status?: string;
|
|
433
|
+
/** Post-rejection decision: `block`. */
|
|
434
|
+
decision?: GateDecision;
|
|
435
|
+
/** Decision reason text (prefixed with "Rejected: " on the reject path). */
|
|
436
|
+
reason?: string;
|
|
437
|
+
/** Terminal approval status. */
|
|
438
|
+
approval_status?: ApprovalStatus;
|
|
439
|
+
/** HITL queue entry UUID. */
|
|
440
|
+
approval_id?: string;
|
|
441
|
+
/** Identity that rejected the step. */
|
|
442
|
+
rejected_by?: string;
|
|
443
|
+
/** ISO 8601 timestamp when the rejection was persisted. */
|
|
444
|
+
rejected_at?: string;
|
|
445
|
+
/** Policies that triggered the original require_approval decision. */
|
|
446
|
+
policies_matched?: PolicyMatch[];
|
|
447
|
+
/** Retry / idempotency state — mirrors the gate response retry_context. */
|
|
448
|
+
retry_context: RetryContext;
|
|
449
|
+
/** Human-readable status summary. */
|
|
450
|
+
message?: string;
|
|
362
451
|
}
|
|
363
452
|
/**
|
|
364
453
|
* A pending approval for a workflow step.
|
|
454
|
+
*
|
|
455
|
+
* Populated by both `getPendingApprovals` (WCP plane) and
|
|
456
|
+
* `getPendingPlanApprovals` (MAP plane). `plan_id` is the intentional
|
|
457
|
+
* asymmetry between the two planes — populated on MAP-plane entries,
|
|
458
|
+
* omitted on WCP-plane entries. Mirrors ADR-046 parity rule.
|
|
365
459
|
*/
|
|
366
460
|
export interface PendingApproval {
|
|
367
461
|
/** Workflow ID */
|
|
368
462
|
workflow_id: string;
|
|
369
463
|
/** Workflow name */
|
|
370
464
|
workflow_name: string;
|
|
465
|
+
/** MAP plan id — populated on MAP-plane entries, absent on WCP-plane entries. */
|
|
466
|
+
plan_id?: string;
|
|
371
467
|
/** Step ID awaiting approval */
|
|
372
468
|
step_id: string;
|
|
469
|
+
/** Zero-based step index within the workflow. */
|
|
470
|
+
step_index: number;
|
|
373
471
|
/** Step name */
|
|
374
|
-
step_name
|
|
472
|
+
step_name?: string;
|
|
375
473
|
/** Step type */
|
|
376
|
-
step_type
|
|
474
|
+
step_type?: string;
|
|
475
|
+
/** Gate decision that paused the step — always `require_approval` for listed entries. */
|
|
476
|
+
decision: string;
|
|
477
|
+
/** Reason the policy engine paused the step. */
|
|
478
|
+
decision_reason?: string;
|
|
479
|
+
/** Policies that triggered the approval requirement. */
|
|
480
|
+
policies_matched?: Array<Record<string, unknown>>;
|
|
481
|
+
/** Step input payload (may be redacted by PII rules). */
|
|
482
|
+
step_input?: Record<string, unknown>;
|
|
483
|
+
/** Current approval state — "pending" for listed entries. */
|
|
484
|
+
approval_status?: string;
|
|
377
485
|
/** When the approval was created */
|
|
378
486
|
created_at: string;
|
|
379
487
|
}
|
|
380
488
|
/**
|
|
381
|
-
* Response from listing pending approvals.
|
|
489
|
+
* Response from listing pending approvals. Shape matches the server wire
|
|
490
|
+
* contract: `pending_approvals` array + `count`.
|
|
382
491
|
*/
|
|
383
492
|
export interface PendingApprovalsResponse {
|
|
384
493
|
/** List of pending approvals */
|
|
385
|
-
|
|
386
|
-
/** Total count */
|
|
387
|
-
|
|
494
|
+
pending_approvals: PendingApproval[];
|
|
495
|
+
/** Total count of pending approvals matching the request scope. */
|
|
496
|
+
count: number;
|
|
388
497
|
}
|
|
389
498
|
/**
|
|
390
499
|
* Options for listing pending approvals.
|
|
@@ -392,6 +501,11 @@ export interface PendingApprovalsResponse {
|
|
|
392
501
|
export interface PendingApprovalsOptions {
|
|
393
502
|
/** Maximum number of results to return */
|
|
394
503
|
limit?: number;
|
|
504
|
+
/**
|
|
505
|
+
* Scope the MAP-plane listing to a single plan_id (ignored by
|
|
506
|
+
* `getPendingApprovals`, honored by `getPendingPlanApprovals`).
|
|
507
|
+
*/
|
|
508
|
+
plan_id?: string;
|
|
395
509
|
}
|
|
396
510
|
/**
|
|
397
511
|
* Request to create a webhook subscription.
|
|
@@ -418,6 +532,17 @@ export interface WebhookSubscription {
|
|
|
418
532
|
events: string[];
|
|
419
533
|
/** Whether the webhook is active */
|
|
420
534
|
active: boolean;
|
|
535
|
+
/** Tenant ID that owns this subscription. */
|
|
536
|
+
tenant_id?: string;
|
|
537
|
+
/** Organization ID that owns this subscription. */
|
|
538
|
+
org_id?: string;
|
|
539
|
+
/**
|
|
540
|
+
* HMAC-SHA256 signing key for webhook payload signature verification.
|
|
541
|
+
* Returned by `createWebhook`. Required to verify the `X-AxonFlow-Signature`
|
|
542
|
+
* header on incoming webhook deliveries; without it, callers cannot validate
|
|
543
|
+
* payload authenticity.
|
|
544
|
+
*/
|
|
545
|
+
secret?: string;
|
|
421
546
|
/** When the webhook was created */
|
|
422
547
|
created_at: string;
|
|
423
548
|
/** When the webhook was last updated */
|