@axonflow/sdk 8.5.1 → 9.1.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 (36) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/adapters/langgraph.d.ts +9 -2
  3. package/dist/cjs/adapters/langgraph.d.ts.map +1 -1
  4. package/dist/cjs/adapters/langgraph.js +5 -2
  5. package/dist/cjs/adapters/langgraph.js.map +1 -1
  6. package/dist/cjs/client.d.ts +1 -1
  7. package/dist/cjs/client.d.ts.map +1 -1
  8. package/dist/cjs/client.js +47 -1
  9. package/dist/cjs/client.js.map +1 -1
  10. package/dist/cjs/types/connector.d.ts +23 -0
  11. package/dist/cjs/types/connector.d.ts.map +1 -1
  12. package/dist/cjs/types/connector.js.map +1 -1
  13. package/dist/cjs/types/gateway.d.ts +87 -9
  14. package/dist/cjs/types/gateway.d.ts.map +1 -1
  15. package/dist/cjs/types/masfeat.d.ts +98 -0
  16. package/dist/cjs/types/masfeat.d.ts.map +1 -1
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/adapters/langgraph.d.ts +9 -2
  20. package/dist/esm/adapters/langgraph.d.ts.map +1 -1
  21. package/dist/esm/adapters/langgraph.js +5 -2
  22. package/dist/esm/adapters/langgraph.js.map +1 -1
  23. package/dist/esm/client.d.ts +1 -1
  24. package/dist/esm/client.d.ts.map +1 -1
  25. package/dist/esm/client.js +47 -1
  26. package/dist/esm/client.js.map +1 -1
  27. package/dist/esm/types/connector.d.ts +23 -0
  28. package/dist/esm/types/connector.d.ts.map +1 -1
  29. package/dist/esm/types/connector.js.map +1 -1
  30. package/dist/esm/types/gateway.d.ts +87 -9
  31. package/dist/esm/types/gateway.d.ts.map +1 -1
  32. package/dist/esm/types/masfeat.d.ts +98 -0
  33. package/dist/esm/types/masfeat.d.ts.map +1 -1
  34. package/dist/esm/version.d.ts +1 -1
  35. package/dist/esm/version.js +1 -1
  36. package/package.json +1 -1
@@ -1121,6 +1121,9 @@ export class AxonFlow {
1121
1121
  connector_type: options.connectorType,
1122
1122
  statement: options.statement,
1123
1123
  };
1124
+ if (options.tool) {
1125
+ body.tool = options.tool;
1126
+ }
1124
1127
  if (options.parameters) {
1125
1128
  body.parameters = options.parameters;
1126
1129
  }
@@ -1188,6 +1191,9 @@ export class AxonFlow {
1188
1191
  const body = {
1189
1192
  connector_type: options.connectorType,
1190
1193
  };
1194
+ if (options.tool) {
1195
+ body.tool = options.tool;
1196
+ }
1191
1197
  if (options.responseData !== undefined) {
1192
1198
  body.response_data = options.responseData;
1193
1199
  }
@@ -1770,7 +1776,7 @@ export class AxonFlow {
1770
1776
  * ```typescript
1771
1777
  * const result = await axonflow.auditToolCall({
1772
1778
  * toolName: 'search_database',
1773
- * toolType: 'function',
1779
+ * callerName: 'claude_code',
1774
1780
  * input: { query: 'SELECT * FROM users' },
1775
1781
  * output: { rows: 42 },
1776
1782
  * workflowId: 'wf-123',
@@ -1789,6 +1795,8 @@ export class AxonFlow {
1789
1795
  };
1790
1796
  if (request.toolType !== undefined)
1791
1797
  body.tool_type = request.toolType;
1798
+ if (request.callerName !== undefined)
1799
+ body.caller_name = request.callerName;
1792
1800
  if (request.input !== undefined)
1793
1801
  body.input = request.input;
1794
1802
  if (request.output !== undefined)
@@ -2434,6 +2442,11 @@ export class AxonFlow {
2434
2442
  body.end_time = request.endTime.toISOString();
2435
2443
  if (request?.requestType)
2436
2444
  body.request_type = request.requestType;
2445
+ // #3254: `action` is the filter the 9.x server actually reads (verdict
2446
+ // normalization server-side). request_type keeps serializing above for
2447
+ // back-compat - the server ignores it (silent no-op).
2448
+ if (request?.action)
2449
+ body.action = request.action;
2437
2450
  if (request?.decisionId)
2438
2451
  body.decision_id = request.decisionId;
2439
2452
  if (request?.policyName)
@@ -2542,6 +2555,16 @@ export class AxonFlow {
2542
2555
  latencyMs: data.latency_ms ?? 0,
2543
2556
  policyViolations: data.policy_violations ?? [],
2544
2557
  metadata: data.metadata ?? {},
2558
+ // #3254 real wire fields. Optional on the model, so absence on an old
2559
+ // server or a non-LLM plane leaves them undefined rather than
2560
+ // fabricating defaults. policy_decision is an OPEN string set
2561
+ // (allowed/blocked/redacted named in the struct, "error" observed
2562
+ // live) - no enum narrowing here.
2563
+ ...(data.policy_decision != null && { policyDecision: data.policy_decision }),
2564
+ ...(data.policy_details != null && {
2565
+ policyDetails: data.policy_details,
2566
+ }),
2567
+ ...(data.response_time_ms != null && { responseTimeMs: data.response_time_ms }),
2545
2568
  ...(data.data_residency != null && { dataResidency: data.data_residency }),
2546
2569
  // Cast is compile-time only — the value is surfaced verbatim, so an
2547
2570
  // unknown future transfer-basis value still passes through (v8.4.0).
@@ -5158,6 +5181,16 @@ export class AxonFlow {
5158
5181
  lowMaterialityCount: data.low_materiality_count ?? data.low_materiality ?? 0,
5159
5182
  byUseCase: data.by_use_case ?? {},
5160
5183
  byStatus: data.by_status ?? {},
5184
+ // #3254 real wire fields. Optional on the model; absence on an old
5185
+ // server leaves them undefined rather than fabricating defaults.
5186
+ ...(data.org_id != null && { orgId: data.org_id }),
5187
+ ...(data.high_materiality != null && { highMateriality: data.high_materiality }),
5188
+ ...(data.medium_materiality != null && { mediumMateriality: data.medium_materiality }),
5189
+ ...(data.low_materiality != null && { lowMateriality: data.low_materiality }),
5190
+ ...(data.assessments_due != null && { assessmentsDue: data.assessments_due }),
5191
+ ...(data.kill_switches_triggered != null && {
5192
+ killSwitchesTriggered: data.kill_switches_triggered,
5193
+ }),
5161
5194
  };
5162
5195
  }
5163
5196
  // Assessment Methods
@@ -5557,6 +5590,14 @@ export class AxonFlow {
5557
5590
  createdAt: new Date(data.created_at),
5558
5591
  updatedAt: new Date(data.updated_at),
5559
5592
  createdBy: data.created_by,
5593
+ // #3254 real wire fields. Optional on the model; absence on an old
5594
+ // server leaves them undefined rather than fabricating defaults.
5595
+ ...(data.owner_email != null && { ownerEmail: data.owner_email }),
5596
+ ...(data.risk_rating_impact != null && { riskRatingImpact: data.risk_rating_impact }),
5597
+ ...(data.risk_rating_complexity != null && {
5598
+ riskRatingComplexity: data.risk_rating_complexity,
5599
+ }),
5600
+ ...(data.risk_rating_reliance != null && { riskRatingReliance: data.risk_rating_reliance }),
5560
5601
  };
5561
5602
  }
5562
5603
  mapFindingResponse(data) {
@@ -5621,6 +5662,11 @@ export class AxonFlow {
5621
5662
  restoredBy: data.restored_by,
5622
5663
  createdAt: new Date(data.created_at),
5623
5664
  updatedAt: new Date(data.updated_at),
5665
+ // #3254 real wire fields. Optional on the model; absence on an old
5666
+ // server leaves them undefined rather than fabricating defaults.
5667
+ ...(data.trigger_reason != null && { triggerReason: data.trigger_reason }),
5668
+ ...(data.trigger_conditions != null && { triggerConditions: data.trigger_conditions }),
5669
+ ...(data.restore_reason != null && { restoreReason: data.restore_reason }),
5624
5670
  };
5625
5671
  }
5626
5672
  // ============================================================================