@vorim/sdk 3.22.1 → 3.23.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/CHANGELOG.md +7 -0
- package/README.md +48 -0
- package/dist/httpSignatures.cjs +726 -0
- package/dist/httpSignatures.cjs.map +1 -0
- package/dist/httpSignatures.d.cts +131 -0
- package/dist/httpSignatures.d.ts +131 -0
- package/dist/httpSignatures.js +686 -0
- package/dist/httpSignatures.js.map +1 -0
- package/dist/index.cjs +764 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +757 -12
- package/dist/index.js.map +1 -1
- package/dist/integrations/anthropic.d.cts +1 -0
- package/dist/integrations/anthropic.d.ts +1 -0
- package/dist/integrations/ap2.d.cts +1 -0
- package/dist/integrations/ap2.d.ts +1 -0
- package/dist/integrations/aws-iam.d.cts +1 -0
- package/dist/integrations/aws-iam.d.ts +1 -0
- package/dist/integrations/bank-rails.d.cts +1 -0
- package/dist/integrations/bank-rails.d.ts +1 -0
- package/dist/integrations/circle.d.cts +1 -0
- package/dist/integrations/circle.d.ts +1 -0
- package/dist/integrations/cloudflare.d.cts +1 -0
- package/dist/integrations/cloudflare.d.ts +1 -0
- package/dist/integrations/coinbase-cdp.d.cts +1 -0
- package/dist/integrations/coinbase-cdp.d.ts +1 -0
- package/dist/integrations/commerce-agents.d.cts +1 -0
- package/dist/integrations/commerce-agents.d.ts +1 -0
- package/dist/integrations/crewai.d.cts +1 -0
- package/dist/integrations/crewai.d.ts +1 -0
- package/dist/integrations/entra.d.cts +1 -0
- package/dist/integrations/entra.d.ts +1 -0
- package/dist/integrations/fhir.d.cts +1 -0
- package/dist/integrations/fhir.d.ts +1 -0
- package/dist/integrations/grok.d.cts +1 -0
- package/dist/integrations/grok.d.ts +1 -0
- package/dist/integrations/guidewire.d.cts +1 -0
- package/dist/integrations/guidewire.d.ts +1 -0
- package/dist/integrations/hermes.d.cts +1 -0
- package/dist/integrations/hermes.d.ts +1 -0
- package/dist/integrations/jira.d.cts +1 -0
- package/dist/integrations/jira.d.ts +1 -0
- package/dist/integrations/langchain.d.cts +1 -0
- package/dist/integrations/langchain.d.ts +1 -0
- package/dist/integrations/langgraph.d.cts +1 -0
- package/dist/integrations/langgraph.d.ts +1 -0
- package/dist/integrations/legal.d.cts +1 -0
- package/dist/integrations/legal.d.ts +1 -0
- package/dist/integrations/life-sciences.d.cts +1 -0
- package/dist/integrations/life-sciences.d.ts +1 -0
- package/dist/integrations/linear.d.cts +1 -0
- package/dist/integrations/linear.d.ts +1 -0
- package/dist/integrations/lithic.d.cts +1 -0
- package/dist/integrations/lithic.d.ts +1 -0
- package/dist/integrations/llamaindex.d.cts +1 -0
- package/dist/integrations/llamaindex.d.ts +1 -0
- package/dist/integrations/marqeta.d.cts +1 -0
- package/dist/integrations/marqeta.d.ts +1 -0
- package/dist/integrations/modern-treasury.d.cts +1 -0
- package/dist/integrations/modern-treasury.d.ts +1 -0
- package/dist/integrations/muse.d.cts +1 -0
- package/dist/integrations/muse.d.ts +1 -0
- package/dist/integrations/nekuda.d.cts +1 -0
- package/dist/integrations/nekuda.d.ts +1 -0
- package/dist/integrations/okta.d.cts +1 -0
- package/dist/integrations/okta.d.ts +1 -0
- package/dist/integrations/openai.d.cts +1 -0
- package/dist/integrations/openai.d.ts +1 -0
- package/dist/integrations/openrouter.d.cts +1 -0
- package/dist/integrations/openrouter.d.ts +1 -0
- package/dist/integrations/paypal-agent.d.cts +1 -0
- package/dist/integrations/paypal-agent.d.ts +1 -0
- package/dist/integrations/perplexity.d.cts +1 -0
- package/dist/integrations/perplexity.d.ts +1 -0
- package/dist/integrations/plaid.d.cts +1 -0
- package/dist/integrations/plaid.d.ts +1 -0
- package/dist/integrations/ramp.d.cts +1 -0
- package/dist/integrations/ramp.d.ts +1 -0
- package/dist/integrations/shopify.d.cts +1 -0
- package/dist/integrations/shopify.d.ts +1 -0
- package/dist/integrations/skyfire.d.cts +1 -0
- package/dist/integrations/skyfire.d.ts +1 -0
- package/dist/integrations/stripe-acp.d.cts +1 -0
- package/dist/integrations/stripe-acp.d.ts +1 -0
- package/dist/integrations/stripe-issuing.d.cts +1 -0
- package/dist/integrations/stripe-issuing.d.ts +1 -0
- package/dist/integrations/truanon.d.cts +1 -0
- package/dist/integrations/truanon.d.ts +1 -0
- package/dist/integrations/typesafe.d.cts +1 -0
- package/dist/integrations/typesafe.d.ts +1 -0
- package/dist/integrations/ucp.d.cts +1 -0
- package/dist/integrations/ucp.d.ts +1 -0
- package/dist/integrations/vercel-ai.d.cts +1 -0
- package/dist/integrations/vercel-ai.d.ts +1 -0
- package/dist/integrations/x402.d.cts +1 -0
- package/dist/integrations/x402.d.ts +1 -0
- package/package.json +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,8 @@ import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrat
|
|
|
2
2
|
export { k as AgentStatus, l as ApprovalAttestation, m as AuditEventType, n as AuditResult, o as BudgetEnforcement, p as BudgetScope, q as DecisionVerdict, r as WorkflowGraphEdge, s as WorkflowGraphEvent, t as WorkflowGraphNode } from './types-BrDQAJdl.cjs';
|
|
3
3
|
import { PortableSignedReceipt } from '@vorim/shared-types';
|
|
4
4
|
export { PortableSignedReceipt, portableReceiptCanonicalBytes } from '@vorim/shared-types';
|
|
5
|
+
import { HttpRequestLike, SignHttpRequestOptions, SignHttpRequestResult } from './httpSignatures.cjs';
|
|
6
|
+
export { ContentDigestAlgorithm, HttpMessageLike, HttpSignatureAlgorithm, HttpSignatureError, ResolvedKey, SignatureParams, VerifyHttpRequestOptions, VerifyHttpRequestResult, contentDigest, createSignatureBase, httpSignatureAlgForKey, signHttpRequest, verifyHttpRequest } from './httpSignatures.cjs';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Replayable agent decision evidence helpers.
|
|
@@ -978,6 +980,37 @@ declare class VorimSDK {
|
|
|
978
980
|
scope: string;
|
|
979
981
|
delegation_id: string;
|
|
980
982
|
}>;
|
|
983
|
+
/**
|
|
984
|
+
* Sign an outbound HTTP request (RFC 9421) with an agent's cached Ed25519
|
|
985
|
+
* key, so the receiver can tell which Vorim agent sent it. `keyid` is the
|
|
986
|
+
* agent_id, `alg` is `ed25519`, and `tag` defaults to `vorim`. When the
|
|
987
|
+
* request has a body, a Content-Digest header is added and covered.
|
|
988
|
+
*
|
|
989
|
+
* The key must already be in this instance's keyring (from `register()`,
|
|
990
|
+
* `registerEphemeral()` or `useAgentKey()`). Returns the headers to add.
|
|
991
|
+
*
|
|
992
|
+
* ```ts
|
|
993
|
+
* const { headers } = await vorim.signHttpRequest(agentId, {
|
|
994
|
+
* method: 'POST', url: 'https://agent-b.example/tasks',
|
|
995
|
+
* headers: { 'content-type': 'application/json' }, body,
|
|
996
|
+
* });
|
|
997
|
+
* await fetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body });
|
|
998
|
+
* ```
|
|
999
|
+
*/
|
|
1000
|
+
signHttpRequest(agentId: string, request: HttpRequestLike, options?: Omit<SignHttpRequestOptions, 'privateKey' | 'keyid' | 'alg'>): Promise<SignHttpRequestResult>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Verify an RFC 9421 signed request through Vorim. The server resolves the
|
|
1003
|
+
* signature's keyid (an agent_id) to that agent's registered public key,
|
|
1004
|
+
* rejects suspended or revoked agents, and checks Content-Digest when the
|
|
1005
|
+
* body is passed. Public endpoint: no API key scope is needed.
|
|
1006
|
+
*
|
|
1007
|
+
* Pass the request exactly as received: method, full URL, headers, and the
|
|
1008
|
+
* raw body if `content-digest` is covered.
|
|
1009
|
+
*/
|
|
1010
|
+
verifyHttpRequest(request: HttpRequestLike, options?: {
|
|
1011
|
+
label?: string;
|
|
1012
|
+
maxAgeSeconds?: number;
|
|
1013
|
+
}): Promise<HttpSignatureVerification>;
|
|
981
1014
|
/**
|
|
982
1015
|
* Sign a payload with an Ed25519 private key (client-side).
|
|
983
1016
|
* Uses the Web Crypto API or Node.js crypto.
|
|
@@ -995,6 +1028,21 @@ declare class VorimSDK {
|
|
|
995
1028
|
private pemToArrayBuffer;
|
|
996
1029
|
private arrayBufferToBase64;
|
|
997
1030
|
}
|
|
1031
|
+
/** Result of {@link VorimSDK.verifyHttpRequest}, from POST /v1/http-signatures/verify. */
|
|
1032
|
+
interface HttpSignatureVerification {
|
|
1033
|
+
valid: boolean;
|
|
1034
|
+
reason?: string;
|
|
1035
|
+
label: string;
|
|
1036
|
+
keyid: string | null;
|
|
1037
|
+
agent_id: string | null;
|
|
1038
|
+
org_name: string | null;
|
|
1039
|
+
agent_status: string | null;
|
|
1040
|
+
trust_score: number | null;
|
|
1041
|
+
covered: string[];
|
|
1042
|
+
created: number | null;
|
|
1043
|
+
expires: number | null;
|
|
1044
|
+
content_digest_checked: boolean;
|
|
1045
|
+
}
|
|
998
1046
|
declare class VorimError extends Error {
|
|
999
1047
|
status: number;
|
|
1000
1048
|
code: string;
|
|
@@ -1073,4 +1121,4 @@ interface DeviceLoginResult {
|
|
|
1073
1121
|
*/
|
|
1074
1122
|
declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResult>;
|
|
1075
1123
|
|
|
1076
|
-
export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, HMAC_SHA256_PREFIX, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, prepareReplayContext };
|
|
1124
|
+
export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, prepareReplayContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { A as AgentRegistrationResult, R as RuntimeDecision, a as AgentRegistrat
|
|
|
2
2
|
export { k as AgentStatus, l as ApprovalAttestation, m as AuditEventType, n as AuditResult, o as BudgetEnforcement, p as BudgetScope, q as DecisionVerdict, r as WorkflowGraphEdge, s as WorkflowGraphEvent, t as WorkflowGraphNode } from './types-BrDQAJdl.js';
|
|
3
3
|
import { PortableSignedReceipt } from '@vorim/shared-types';
|
|
4
4
|
export { PortableSignedReceipt, portableReceiptCanonicalBytes } from '@vorim/shared-types';
|
|
5
|
+
import { HttpRequestLike, SignHttpRequestOptions, SignHttpRequestResult } from './httpSignatures.js';
|
|
6
|
+
export { ContentDigestAlgorithm, HttpMessageLike, HttpSignatureAlgorithm, HttpSignatureError, ResolvedKey, SignatureParams, VerifyHttpRequestOptions, VerifyHttpRequestResult, contentDigest, createSignatureBase, httpSignatureAlgForKey, signHttpRequest, verifyHttpRequest } from './httpSignatures.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Replayable agent decision evidence helpers.
|
|
@@ -978,6 +980,37 @@ declare class VorimSDK {
|
|
|
978
980
|
scope: string;
|
|
979
981
|
delegation_id: string;
|
|
980
982
|
}>;
|
|
983
|
+
/**
|
|
984
|
+
* Sign an outbound HTTP request (RFC 9421) with an agent's cached Ed25519
|
|
985
|
+
* key, so the receiver can tell which Vorim agent sent it. `keyid` is the
|
|
986
|
+
* agent_id, `alg` is `ed25519`, and `tag` defaults to `vorim`. When the
|
|
987
|
+
* request has a body, a Content-Digest header is added and covered.
|
|
988
|
+
*
|
|
989
|
+
* The key must already be in this instance's keyring (from `register()`,
|
|
990
|
+
* `registerEphemeral()` or `useAgentKey()`). Returns the headers to add.
|
|
991
|
+
*
|
|
992
|
+
* ```ts
|
|
993
|
+
* const { headers } = await vorim.signHttpRequest(agentId, {
|
|
994
|
+
* method: 'POST', url: 'https://agent-b.example/tasks',
|
|
995
|
+
* headers: { 'content-type': 'application/json' }, body,
|
|
996
|
+
* });
|
|
997
|
+
* await fetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body });
|
|
998
|
+
* ```
|
|
999
|
+
*/
|
|
1000
|
+
signHttpRequest(agentId: string, request: HttpRequestLike, options?: Omit<SignHttpRequestOptions, 'privateKey' | 'keyid' | 'alg'>): Promise<SignHttpRequestResult>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Verify an RFC 9421 signed request through Vorim. The server resolves the
|
|
1003
|
+
* signature's keyid (an agent_id) to that agent's registered public key,
|
|
1004
|
+
* rejects suspended or revoked agents, and checks Content-Digest when the
|
|
1005
|
+
* body is passed. Public endpoint: no API key scope is needed.
|
|
1006
|
+
*
|
|
1007
|
+
* Pass the request exactly as received: method, full URL, headers, and the
|
|
1008
|
+
* raw body if `content-digest` is covered.
|
|
1009
|
+
*/
|
|
1010
|
+
verifyHttpRequest(request: HttpRequestLike, options?: {
|
|
1011
|
+
label?: string;
|
|
1012
|
+
maxAgeSeconds?: number;
|
|
1013
|
+
}): Promise<HttpSignatureVerification>;
|
|
981
1014
|
/**
|
|
982
1015
|
* Sign a payload with an Ed25519 private key (client-side).
|
|
983
1016
|
* Uses the Web Crypto API or Node.js crypto.
|
|
@@ -995,6 +1028,21 @@ declare class VorimSDK {
|
|
|
995
1028
|
private pemToArrayBuffer;
|
|
996
1029
|
private arrayBufferToBase64;
|
|
997
1030
|
}
|
|
1031
|
+
/** Result of {@link VorimSDK.verifyHttpRequest}, from POST /v1/http-signatures/verify. */
|
|
1032
|
+
interface HttpSignatureVerification {
|
|
1033
|
+
valid: boolean;
|
|
1034
|
+
reason?: string;
|
|
1035
|
+
label: string;
|
|
1036
|
+
keyid: string | null;
|
|
1037
|
+
agent_id: string | null;
|
|
1038
|
+
org_name: string | null;
|
|
1039
|
+
agent_status: string | null;
|
|
1040
|
+
trust_score: number | null;
|
|
1041
|
+
covered: string[];
|
|
1042
|
+
created: number | null;
|
|
1043
|
+
expires: number | null;
|
|
1044
|
+
content_digest_checked: boolean;
|
|
1045
|
+
}
|
|
998
1046
|
declare class VorimError extends Error {
|
|
999
1047
|
status: number;
|
|
1000
1048
|
code: string;
|
|
@@ -1073,4 +1121,4 @@ interface DeviceLoginResult {
|
|
|
1073
1121
|
*/
|
|
1074
1122
|
declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResult>;
|
|
1075
1123
|
|
|
1076
|
-
export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, HMAC_SHA256_PREFIX, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, prepareReplayContext };
|
|
1124
|
+
export { Agent, AgentDelegationRecord, AgentRegistrationInput, AgentRegistrationResult, AuditEventInput, BeforeActionInput, BudgetSpend, CANONICAL_TOOL_CATALOGUE_VERSION, type CatalogueTool, type CommitmentKey, DelegationLinkClaims, type DeviceLoginOptions, type DeviceLoginResult, HMAC_SHA256_PREFIX, HttpRequestLike, type HttpSignatureVerification, PermissionCheckResult, PermissionScope, type ReplayContext, type ReplayInputs, RuntimeDecision, SHA256_PREFIX, SharedMemoryEntry, SharedMemoryListResult, SharedMemoryWriteInput, SignHttpRequestOptions, SignHttpRequestResult, TokenBudget, TokenBudgetInput, TrustRecord, type VorimConfig, VorimDeniedError, VorimError, VorimSDK, WorkflowProvenanceGraph, canonicalPayloadV0, canonicalPayloadV1, commitPayload, createVorim as default, deviceLogin, eventDigest, hashPayload, hashPreviousEvent, hashSystemPrompt, hashTool, hashToolCatalogue, isDigest, isKeyedCommitment, jcsCanonicalise, prepareReplayContext };
|