@vorim/sdk 3.22.0 → 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 +14 -0
- package/README.md +60 -6
- 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 +61 -1
- package/dist/index.d.ts +61 -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.
|
|
@@ -799,6 +801,12 @@ declare class VorimSDK {
|
|
|
799
801
|
idempotencyKey?: string;
|
|
800
802
|
}): Promise<{
|
|
801
803
|
ingested: number;
|
|
804
|
+
events?: {
|
|
805
|
+
event_id: string;
|
|
806
|
+
digest?: string;
|
|
807
|
+
}[];
|
|
808
|
+
rejected_invalid_signature?: number;
|
|
809
|
+
replayed?: boolean;
|
|
802
810
|
}>;
|
|
803
811
|
/**
|
|
804
812
|
* Emit a batch of audit events (up to 1,000). Each event is signed
|
|
@@ -815,6 +823,12 @@ declare class VorimSDK {
|
|
|
815
823
|
idempotencyKey?: string;
|
|
816
824
|
}): Promise<{
|
|
817
825
|
ingested: number;
|
|
826
|
+
events?: {
|
|
827
|
+
event_id: string;
|
|
828
|
+
digest?: string;
|
|
829
|
+
}[];
|
|
830
|
+
rejected_invalid_signature?: number;
|
|
831
|
+
replayed?: boolean;
|
|
818
832
|
}>;
|
|
819
833
|
private warnOnPartialIngest;
|
|
820
834
|
/**
|
|
@@ -966,6 +980,37 @@ declare class VorimSDK {
|
|
|
966
980
|
scope: string;
|
|
967
981
|
delegation_id: string;
|
|
968
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>;
|
|
969
1014
|
/**
|
|
970
1015
|
* Sign a payload with an Ed25519 private key (client-side).
|
|
971
1016
|
* Uses the Web Crypto API or Node.js crypto.
|
|
@@ -983,6 +1028,21 @@ declare class VorimSDK {
|
|
|
983
1028
|
private pemToArrayBuffer;
|
|
984
1029
|
private arrayBufferToBase64;
|
|
985
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
|
+
}
|
|
986
1046
|
declare class VorimError extends Error {
|
|
987
1047
|
status: number;
|
|
988
1048
|
code: string;
|
|
@@ -1061,4 +1121,4 @@ interface DeviceLoginResult {
|
|
|
1061
1121
|
*/
|
|
1062
1122
|
declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResult>;
|
|
1063
1123
|
|
|
1064
|
-
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.
|
|
@@ -799,6 +801,12 @@ declare class VorimSDK {
|
|
|
799
801
|
idempotencyKey?: string;
|
|
800
802
|
}): Promise<{
|
|
801
803
|
ingested: number;
|
|
804
|
+
events?: {
|
|
805
|
+
event_id: string;
|
|
806
|
+
digest?: string;
|
|
807
|
+
}[];
|
|
808
|
+
rejected_invalid_signature?: number;
|
|
809
|
+
replayed?: boolean;
|
|
802
810
|
}>;
|
|
803
811
|
/**
|
|
804
812
|
* Emit a batch of audit events (up to 1,000). Each event is signed
|
|
@@ -815,6 +823,12 @@ declare class VorimSDK {
|
|
|
815
823
|
idempotencyKey?: string;
|
|
816
824
|
}): Promise<{
|
|
817
825
|
ingested: number;
|
|
826
|
+
events?: {
|
|
827
|
+
event_id: string;
|
|
828
|
+
digest?: string;
|
|
829
|
+
}[];
|
|
830
|
+
rejected_invalid_signature?: number;
|
|
831
|
+
replayed?: boolean;
|
|
818
832
|
}>;
|
|
819
833
|
private warnOnPartialIngest;
|
|
820
834
|
/**
|
|
@@ -966,6 +980,37 @@ declare class VorimSDK {
|
|
|
966
980
|
scope: string;
|
|
967
981
|
delegation_id: string;
|
|
968
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>;
|
|
969
1014
|
/**
|
|
970
1015
|
* Sign a payload with an Ed25519 private key (client-side).
|
|
971
1016
|
* Uses the Web Crypto API or Node.js crypto.
|
|
@@ -983,6 +1028,21 @@ declare class VorimSDK {
|
|
|
983
1028
|
private pemToArrayBuffer;
|
|
984
1029
|
private arrayBufferToBase64;
|
|
985
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
|
+
}
|
|
986
1046
|
declare class VorimError extends Error {
|
|
987
1047
|
status: number;
|
|
988
1048
|
code: string;
|
|
@@ -1061,4 +1121,4 @@ interface DeviceLoginResult {
|
|
|
1061
1121
|
*/
|
|
1062
1122
|
declare function deviceLogin(opts: DeviceLoginOptions): Promise<DeviceLoginResult>;
|
|
1063
1123
|
|
|
1064
|
-
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 };
|