@vorim/sdk 4.1.1 → 4.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 (116) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{_commerce-core-Dyr_dHVP.d.ts → _commerce-core-BIqTJ7Om.d.ts} +1 -1
  3. package/dist/{_commerce-core-wY2jC6rC.d.cts → _commerce-core-BQbISpWe.d.cts} +1 -1
  4. package/dist/index.cjs +85 -4
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +38 -3
  7. package/dist/index.d.ts +38 -3
  8. package/dist/index.js +84 -4
  9. package/dist/index.js.map +1 -1
  10. package/dist/integrations/amazon.d.cts +2 -2
  11. package/dist/integrations/amazon.d.ts +2 -2
  12. package/dist/integrations/anthropic.d.cts +1 -1
  13. package/dist/integrations/anthropic.d.ts +1 -1
  14. package/dist/integrations/ap2.d.cts +1 -1
  15. package/dist/integrations/ap2.d.ts +1 -1
  16. package/dist/integrations/aws-iam.d.cts +1 -1
  17. package/dist/integrations/aws-iam.d.ts +1 -1
  18. package/dist/integrations/bank-rails.d.cts +1 -1
  19. package/dist/integrations/bank-rails.d.ts +1 -1
  20. package/dist/integrations/circle.d.cts +1 -1
  21. package/dist/integrations/circle.d.ts +1 -1
  22. package/dist/integrations/cloudflare.d.cts +1 -1
  23. package/dist/integrations/cloudflare.d.ts +1 -1
  24. package/dist/integrations/coinbase-cdp.d.cts +1 -1
  25. package/dist/integrations/coinbase-cdp.d.ts +1 -1
  26. package/dist/integrations/commerce-agents.d.cts +1 -1
  27. package/dist/integrations/commerce-agents.d.ts +1 -1
  28. package/dist/integrations/crewai.d.cts +1 -1
  29. package/dist/integrations/crewai.d.ts +1 -1
  30. package/dist/integrations/delivery.d.cts +2 -2
  31. package/dist/integrations/delivery.d.ts +2 -2
  32. package/dist/integrations/ebay.d.cts +2 -2
  33. package/dist/integrations/ebay.d.ts +2 -2
  34. package/dist/integrations/entra.d.cts +1 -1
  35. package/dist/integrations/entra.d.ts +1 -1
  36. package/dist/integrations/etsy.d.cts +2 -2
  37. package/dist/integrations/etsy.d.ts +2 -2
  38. package/dist/integrations/fhir.d.cts +1 -1
  39. package/dist/integrations/fhir.d.ts +1 -1
  40. package/dist/integrations/google-merchant.d.cts +2 -2
  41. package/dist/integrations/google-merchant.d.ts +2 -2
  42. package/dist/integrations/grok.d.cts +1 -1
  43. package/dist/integrations/grok.d.ts +1 -1
  44. package/dist/integrations/guidewire.d.cts +1 -1
  45. package/dist/integrations/guidewire.d.ts +1 -1
  46. package/dist/integrations/hermes.d.cts +1 -1
  47. package/dist/integrations/hermes.d.ts +1 -1
  48. package/dist/integrations/jira.d.cts +1 -1
  49. package/dist/integrations/jira.d.ts +1 -1
  50. package/dist/integrations/langchain.d.cts +1 -1
  51. package/dist/integrations/langchain.d.ts +1 -1
  52. package/dist/integrations/langgraph.d.cts +1 -1
  53. package/dist/integrations/langgraph.d.ts +1 -1
  54. package/dist/integrations/legal.d.cts +1 -1
  55. package/dist/integrations/legal.d.ts +1 -1
  56. package/dist/integrations/life-sciences.d.cts +1 -1
  57. package/dist/integrations/life-sciences.d.ts +1 -1
  58. package/dist/integrations/linear.d.cts +1 -1
  59. package/dist/integrations/linear.d.ts +1 -1
  60. package/dist/integrations/lithic.d.cts +1 -1
  61. package/dist/integrations/lithic.d.ts +1 -1
  62. package/dist/integrations/llamaindex.d.cts +1 -1
  63. package/dist/integrations/llamaindex.d.ts +1 -1
  64. package/dist/integrations/marqeta.d.cts +1 -1
  65. package/dist/integrations/marqeta.d.ts +1 -1
  66. package/dist/integrations/meta.d.cts +2 -2
  67. package/dist/integrations/meta.d.ts +2 -2
  68. package/dist/integrations/modern-treasury.d.cts +1 -1
  69. package/dist/integrations/modern-treasury.d.ts +1 -1
  70. package/dist/integrations/muse.d.cts +1 -1
  71. package/dist/integrations/muse.d.ts +1 -1
  72. package/dist/integrations/nekuda.d.cts +1 -1
  73. package/dist/integrations/nekuda.d.ts +1 -1
  74. package/dist/integrations/okta.d.cts +1 -1
  75. package/dist/integrations/okta.d.ts +1 -1
  76. package/dist/integrations/openai.d.cts +1 -1
  77. package/dist/integrations/openai.d.ts +1 -1
  78. package/dist/integrations/openrouter.d.cts +1 -1
  79. package/dist/integrations/openrouter.d.ts +1 -1
  80. package/dist/integrations/paypal-agent.d.cts +1 -1
  81. package/dist/integrations/paypal-agent.d.ts +1 -1
  82. package/dist/integrations/perplexity.d.cts +1 -1
  83. package/dist/integrations/perplexity.d.ts +1 -1
  84. package/dist/integrations/plaid.d.cts +1 -1
  85. package/dist/integrations/plaid.d.ts +1 -1
  86. package/dist/integrations/ramp.d.cts +1 -1
  87. package/dist/integrations/ramp.d.ts +1 -1
  88. package/dist/integrations/shopify.d.cts +1 -1
  89. package/dist/integrations/shopify.d.ts +1 -1
  90. package/dist/integrations/siem.d.cts +1 -1
  91. package/dist/integrations/siem.d.ts +1 -1
  92. package/dist/integrations/skyfire.d.cts +1 -1
  93. package/dist/integrations/skyfire.d.ts +1 -1
  94. package/dist/integrations/social-ads.d.cts +2 -2
  95. package/dist/integrations/social-ads.d.ts +2 -2
  96. package/dist/integrations/stripe-acp.d.cts +1 -1
  97. package/dist/integrations/stripe-acp.d.ts +1 -1
  98. package/dist/integrations/stripe-issuing.d.cts +1 -1
  99. package/dist/integrations/stripe-issuing.d.ts +1 -1
  100. package/dist/integrations/tiktok-shop.d.cts +2 -2
  101. package/dist/integrations/tiktok-shop.d.ts +2 -2
  102. package/dist/integrations/truanon.d.cts +1 -1
  103. package/dist/integrations/truanon.d.ts +1 -1
  104. package/dist/integrations/typesafe.d.cts +1 -1
  105. package/dist/integrations/typesafe.d.ts +1 -1
  106. package/dist/integrations/ucp.d.cts +1 -1
  107. package/dist/integrations/ucp.d.ts +1 -1
  108. package/dist/integrations/vercel-ai.d.cts +1 -1
  109. package/dist/integrations/vercel-ai.d.ts +1 -1
  110. package/dist/integrations/walmart.d.cts +2 -2
  111. package/dist/integrations/walmart.d.ts +2 -2
  112. package/dist/integrations/x402.d.cts +1 -1
  113. package/dist/integrations/x402.d.ts +1 -1
  114. package/dist/{types-DphtTyIC.d.cts → types-DwPEBj7p.d.cts} +56 -1
  115. package/dist/{types-DphtTyIC.d.ts → types-DwPEBj7p.d.ts} +56 -1
  116. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { VorimSDK } from '../index.js';
2
2
  import { VorimToolRegistry } from './openai.js';
3
3
  export { VorimAgentLoopConfig, VorimOpenAIConfig as VorimOpenRouterConfig, VorimToolDefinition, createVorimOpenAIAgent as createVorimOpenRouterAgent, runAgentLoop } from './openai.js';
4
- import '../types-DphtTyIC.js';
4
+ import '../types-DwPEBj7p.js';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.js';
7
7
  import '../_runtime-gate-DOJUKJBu.js';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
2
  import { VorimToolRegistry } from './openai.cjs';
3
3
  export { VorimAgentLoopConfig, VorimOpenAIConfig as VorimPerplexityConfig, VorimToolDefinition, createVorimOpenAIAgent as createVorimPerplexityAgent, runAgentLoop } from './openai.cjs';
4
- import '../types-DphtTyIC.cjs';
4
+ import '../types-DwPEBj7p.cjs';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.cjs';
7
7
  import '../_runtime-gate-DOJUKJBu.cjs';
@@ -1,7 +1,7 @@
1
1
  import { VorimSDK } from '../index.js';
2
2
  import { VorimToolRegistry } from './openai.js';
3
3
  export { VorimAgentLoopConfig, VorimOpenAIConfig as VorimPerplexityConfig, VorimToolDefinition, createVorimOpenAIAgent as createVorimPerplexityAgent, runAgentLoop } from './openai.js';
4
- import '../types-DphtTyIC.js';
4
+ import '../types-DwPEBj7p.js';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.js';
7
7
  import '../_runtime-gate-DOJUKJBu.js';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import { P as PermissionScope } from '../types-DphtTyIC.cjs';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import { P as PermissionScope } from '../types-DphtTyIC.js';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import { P as PermissionScope } from '../types-DphtTyIC.cjs';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import { P as PermissionScope } from '../types-DphtTyIC.js';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,4 +1,4 @@
1
- import { k as AuditEventInput } from '../types-DphtTyIC.cjs';
1
+ import { k as AuditEventInput } from '../types-DwPEBj7p.cjs';
2
2
 
3
3
  type SiemSink = 'otlp-http' | 'splunk-hec' | 'elasticsearch';
4
4
  interface SiemForwarderConfig {
@@ -1,4 +1,4 @@
1
- import { k as AuditEventInput } from '../types-DphtTyIC.js';
1
+ import { k as AuditEventInput } from '../types-DwPEBj7p.js';
2
2
 
3
3
  type SiemSink = 'otlp-http' | 'splunk-hec' | 'elasticsearch';
4
4
  interface SiemForwarderConfig {
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,6 +1,6 @@
1
- import { C as CommerceProfile, V as VorimCommerceGuard, b as CommerceReceipt, a as CommerceGuardConfig } from '../_commerce-core-wY2jC6rC.cjs';
1
+ import { C as CommerceProfile, V as VorimCommerceGuard, b as CommerceReceipt, a as CommerceGuardConfig } from '../_commerce-core-BQbISpWe.cjs';
2
2
  import { VorimSDK } from '../index.cjs';
3
- import '../types-DphtTyIC.cjs';
3
+ import '../types-DwPEBj7p.cjs';
4
4
  import '../_runtime-gate-DOJUKJBu.cjs';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.cjs';
@@ -1,6 +1,6 @@
1
- import { C as CommerceProfile, V as VorimCommerceGuard, b as CommerceReceipt, a as CommerceGuardConfig } from '../_commerce-core-Dyr_dHVP.js';
1
+ import { C as CommerceProfile, V as VorimCommerceGuard, b as CommerceReceipt, a as CommerceGuardConfig } from '../_commerce-core-BIqTJ7Om.js';
2
2
  import { VorimSDK } from '../index.js';
3
- import '../types-DphtTyIC.js';
3
+ import '../types-DwPEBj7p.js';
4
4
  import '../_runtime-gate-DOJUKJBu.js';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.js';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import { P as PermissionScope } from '../types-DphtTyIC.cjs';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import { P as PermissionScope } from '../types-DphtTyIC.js';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,6 +1,6 @@
1
- import { C as CommerceProfile, a as CommerceGuardConfig, V as VorimCommerceGuard, b as CommerceReceipt } from '../_commerce-core-wY2jC6rC.cjs';
1
+ import { C as CommerceProfile, a as CommerceGuardConfig, V as VorimCommerceGuard, b as CommerceReceipt } from '../_commerce-core-BQbISpWe.cjs';
2
2
  import { VorimSDK } from '../index.cjs';
3
- import '../types-DphtTyIC.cjs';
3
+ import '../types-DwPEBj7p.cjs';
4
4
  import '../_runtime-gate-DOJUKJBu.cjs';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.cjs';
@@ -1,6 +1,6 @@
1
- import { C as CommerceProfile, a as CommerceGuardConfig, V as VorimCommerceGuard, b as CommerceReceipt } from '../_commerce-core-Dyr_dHVP.js';
1
+ import { C as CommerceProfile, a as CommerceGuardConfig, V as VorimCommerceGuard, b as CommerceReceipt } from '../_commerce-core-BIqTJ7Om.js';
2
2
  import { VorimSDK } from '../index.js';
3
- import '../types-DphtTyIC.js';
3
+ import '../types-DwPEBj7p.js';
4
4
  import '../_runtime-gate-DOJUKJBu.js';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.js';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK, ReplayInputs } from '../index.cjs';
2
- import { P as PermissionScope } from '../types-DphtTyIC.cjs';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.cjs';
3
3
  import { E as EscalationPolicy, T as TransportFailurePolicy } from '../_runtime-gate-DOJUKJBu.cjs';
4
4
  import '@vorim/shared-types';
5
5
  import '../httpSignatures.cjs';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK, ReplayInputs } from '../index.js';
2
- import { P as PermissionScope } from '../types-DphtTyIC.js';
2
+ import { P as PermissionScope } from '../types-DwPEBj7p.js';
3
3
  import { E as EscalationPolicy, T as TransportFailurePolicy } from '../_runtime-gate-DOJUKJBu.js';
4
4
  import '@vorim/shared-types';
5
5
  import '../httpSignatures.js';
@@ -1,6 +1,6 @@
1
- import { V as VorimCommerceGuard, a as CommerceGuardConfig, b as CommerceReceipt, C as CommerceProfile } from '../_commerce-core-wY2jC6rC.cjs';
1
+ import { V as VorimCommerceGuard, a as CommerceGuardConfig, b as CommerceReceipt, C as CommerceProfile } from '../_commerce-core-BQbISpWe.cjs';
2
2
  import { VorimSDK } from '../index.cjs';
3
- import '../types-DphtTyIC.cjs';
3
+ import '../types-DwPEBj7p.cjs';
4
4
  import '../_runtime-gate-DOJUKJBu.cjs';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.cjs';
@@ -1,6 +1,6 @@
1
- import { V as VorimCommerceGuard, a as CommerceGuardConfig, b as CommerceReceipt, C as CommerceProfile } from '../_commerce-core-Dyr_dHVP.js';
1
+ import { V as VorimCommerceGuard, a as CommerceGuardConfig, b as CommerceReceipt, C as CommerceProfile } from '../_commerce-core-BIqTJ7Om.js';
2
2
  import { VorimSDK } from '../index.js';
3
- import '../types-DphtTyIC.js';
3
+ import '../types-DwPEBj7p.js';
4
4
  import '../_runtime-gate-DOJUKJBu.js';
5
5
  import '@vorim/shared-types';
6
6
  import '../httpSignatures.js';
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.cjs';
2
- import '../types-DphtTyIC.cjs';
2
+ import '../types-DwPEBj7p.cjs';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { VorimSDK } from '../index.js';
2
- import '../types-DphtTyIC.js';
2
+ import '../types-DwPEBj7p.js';
3
3
  import '@vorim/shared-types';
4
4
  import '../httpSignatures.js';
5
5
 
@@ -297,6 +297,12 @@ interface BeforeActionInput {
297
297
  * the server returns the original decision instead of creating a new one.
298
298
  */
299
299
  idempotencyKey?: string;
300
+ /**
301
+ * The declared intent this action is taken under (see `declareIntent`).
302
+ * The server judges the action against it and returns `intent` on the
303
+ * decision; rules can hold or block off-intent or undeclared work.
304
+ */
305
+ intentId?: string;
300
306
  /**
301
307
  * Workflow this action belongs to (AI cost management). Groups actions so a
302
308
  * per-workflow token budget can meter and enforce spend across the whole
@@ -424,6 +430,55 @@ interface RuntimeDecision {
424
430
  * an integration settling a consequential action should refuse without it.
425
431
  */
426
432
  approval: ApprovalAttestation | null;
433
+ /**
434
+ * The declared intent this action was judged under, when `intentId` was
435
+ * sent: `aligned` (inside everything the intent declared), `off_intent`
436
+ * (the reasons name the bound crossed), or `none`. `null` when the server
437
+ * predates intents.
438
+ */
439
+ intent: {
440
+ id: string | null;
441
+ alignment: 'aligned' | 'off_intent' | 'none';
442
+ reasons: string[];
443
+ } | null;
444
+ }
445
+ /** Declare what an agent is about to do, before it does it. */
446
+ interface DeclareIntentInput {
447
+ agentId: string;
448
+ /** Plain words, up to 500 characters. */
449
+ goal: string;
450
+ /** Action types the work is expected to use; anything else is off intent. */
451
+ expectedActionTypes?: string[];
452
+ /** Targets the work is expected to touch, `*` wildcards allowed. */
453
+ expectedTargets?: string[];
454
+ /** Spend ceiling in minor units (pence, cents), read from `amountField` (default `amount`). */
455
+ maxAmount?: number;
456
+ amountCurrency?: string;
457
+ amountField?: string;
458
+ /** Most actions the intent may cover. */
459
+ maxActions?: number;
460
+ /** Seconds until the intent expires (60 to 604800, default 86400). */
461
+ ttlSeconds?: number;
462
+ workflowId?: string;
463
+ }
464
+ interface Intent {
465
+ intent_id: string;
466
+ agent_id: string;
467
+ goal: string;
468
+ declared_by: 'agent' | 'console' | 'operator';
469
+ expected_action_types: string[];
470
+ expected_targets: string[];
471
+ max_amount: number | string | null;
472
+ amount_currency: string | null;
473
+ amount_field: string | null;
474
+ max_actions: number | null;
475
+ status: 'active' | 'completed' | 'abandoned' | 'expired';
476
+ outcome: string | null;
477
+ actions_count: number;
478
+ off_intent_count: number;
479
+ created_at: string;
480
+ expires_at: string;
481
+ closed_at: string | null;
427
482
  }
428
483
  interface WorkflowGraphNode {
429
484
  agent_id: string;
@@ -494,4 +549,4 @@ interface CapabilityProfile {
494
549
  alreadyLeastPrivilege: boolean;
495
550
  }
496
551
 
497
- export type { AgentRegistrationResult as A, BeforeActionInput as B, CapabilityProfile as C, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, SuspendPreview as S, TrustRecord as T, WorkflowProvenanceGraph as W, AgentRegistrationInput as a, Agent as b, PermissionCheckResult as c, AgentDelegationRecord as d, SharedMemoryWriteInput as e, SharedMemoryEntry as f, SharedMemoryListResult as g, TokenBudgetInput as h, TokenBudget as i, BudgetSpend as j, AuditEventInput as k, SwarmView as l, AgentStatus as m, ApprovalAttestation as n, AuditEventType as o, AuditResult as p, BudgetEnforcement as q, BudgetScope as r, DecisionVerdict as s, WorkflowGraphEdge as t, WorkflowGraphEvent as u, WorkflowGraphNode as v };
552
+ export type { AgentRegistrationResult as A, BeforeActionInput as B, CapabilityProfile as C, DelegationLinkClaims as D, Intent as I, PermissionScope as P, RuntimeDecision as R, SuspendPreview as S, TrustRecord as T, WorkflowProvenanceGraph as W, AgentRegistrationInput as a, Agent as b, PermissionCheckResult as c, AgentDelegationRecord as d, SharedMemoryWriteInput as e, SharedMemoryEntry as f, SharedMemoryListResult as g, TokenBudgetInput as h, TokenBudget as i, BudgetSpend as j, AuditEventInput as k, SwarmView as l, DeclareIntentInput as m, AgentStatus as n, ApprovalAttestation as o, AuditEventType as p, AuditResult as q, BudgetEnforcement as r, BudgetScope as s, DecisionVerdict as t, WorkflowGraphEdge as u, WorkflowGraphEvent as v, WorkflowGraphNode as w };
@@ -297,6 +297,12 @@ interface BeforeActionInput {
297
297
  * the server returns the original decision instead of creating a new one.
298
298
  */
299
299
  idempotencyKey?: string;
300
+ /**
301
+ * The declared intent this action is taken under (see `declareIntent`).
302
+ * The server judges the action against it and returns `intent` on the
303
+ * decision; rules can hold or block off-intent or undeclared work.
304
+ */
305
+ intentId?: string;
300
306
  /**
301
307
  * Workflow this action belongs to (AI cost management). Groups actions so a
302
308
  * per-workflow token budget can meter and enforce spend across the whole
@@ -424,6 +430,55 @@ interface RuntimeDecision {
424
430
  * an integration settling a consequential action should refuse without it.
425
431
  */
426
432
  approval: ApprovalAttestation | null;
433
+ /**
434
+ * The declared intent this action was judged under, when `intentId` was
435
+ * sent: `aligned` (inside everything the intent declared), `off_intent`
436
+ * (the reasons name the bound crossed), or `none`. `null` when the server
437
+ * predates intents.
438
+ */
439
+ intent: {
440
+ id: string | null;
441
+ alignment: 'aligned' | 'off_intent' | 'none';
442
+ reasons: string[];
443
+ } | null;
444
+ }
445
+ /** Declare what an agent is about to do, before it does it. */
446
+ interface DeclareIntentInput {
447
+ agentId: string;
448
+ /** Plain words, up to 500 characters. */
449
+ goal: string;
450
+ /** Action types the work is expected to use; anything else is off intent. */
451
+ expectedActionTypes?: string[];
452
+ /** Targets the work is expected to touch, `*` wildcards allowed. */
453
+ expectedTargets?: string[];
454
+ /** Spend ceiling in minor units (pence, cents), read from `amountField` (default `amount`). */
455
+ maxAmount?: number;
456
+ amountCurrency?: string;
457
+ amountField?: string;
458
+ /** Most actions the intent may cover. */
459
+ maxActions?: number;
460
+ /** Seconds until the intent expires (60 to 604800, default 86400). */
461
+ ttlSeconds?: number;
462
+ workflowId?: string;
463
+ }
464
+ interface Intent {
465
+ intent_id: string;
466
+ agent_id: string;
467
+ goal: string;
468
+ declared_by: 'agent' | 'console' | 'operator';
469
+ expected_action_types: string[];
470
+ expected_targets: string[];
471
+ max_amount: number | string | null;
472
+ amount_currency: string | null;
473
+ amount_field: string | null;
474
+ max_actions: number | null;
475
+ status: 'active' | 'completed' | 'abandoned' | 'expired';
476
+ outcome: string | null;
477
+ actions_count: number;
478
+ off_intent_count: number;
479
+ created_at: string;
480
+ expires_at: string;
481
+ closed_at: string | null;
427
482
  }
428
483
  interface WorkflowGraphNode {
429
484
  agent_id: string;
@@ -494,4 +549,4 @@ interface CapabilityProfile {
494
549
  alreadyLeastPrivilege: boolean;
495
550
  }
496
551
 
497
- export type { AgentRegistrationResult as A, BeforeActionInput as B, CapabilityProfile as C, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, SuspendPreview as S, TrustRecord as T, WorkflowProvenanceGraph as W, AgentRegistrationInput as a, Agent as b, PermissionCheckResult as c, AgentDelegationRecord as d, SharedMemoryWriteInput as e, SharedMemoryEntry as f, SharedMemoryListResult as g, TokenBudgetInput as h, TokenBudget as i, BudgetSpend as j, AuditEventInput as k, SwarmView as l, AgentStatus as m, ApprovalAttestation as n, AuditEventType as o, AuditResult as p, BudgetEnforcement as q, BudgetScope as r, DecisionVerdict as s, WorkflowGraphEdge as t, WorkflowGraphEvent as u, WorkflowGraphNode as v };
552
+ export type { AgentRegistrationResult as A, BeforeActionInput as B, CapabilityProfile as C, DelegationLinkClaims as D, Intent as I, PermissionScope as P, RuntimeDecision as R, SuspendPreview as S, TrustRecord as T, WorkflowProvenanceGraph as W, AgentRegistrationInput as a, Agent as b, PermissionCheckResult as c, AgentDelegationRecord as d, SharedMemoryWriteInput as e, SharedMemoryEntry as f, SharedMemoryListResult as g, TokenBudgetInput as h, TokenBudget as i, BudgetSpend as j, AuditEventInput as k, SwarmView as l, DeclareIntentInput as m, AgentStatus as n, ApprovalAttestation as o, AuditEventType as p, AuditResult as q, BudgetEnforcement as r, BudgetScope as s, DecisionVerdict as t, WorkflowGraphEdge as u, WorkflowGraphEvent as v, WorkflowGraphNode as w };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorim/sdk",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "Official TypeScript SDK for Vorim AI \u2014 AI Agent Identity, Permissions & Audit",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",