@openagentid/sdk/local
API contract shipped by @openagentid/sdk 0.7.2. Exact exports, signatures, dependencies and availability.
All packages · Runnable examples · Start an agent
| Contract | Value |
|---|---|
| Package | @openagentid/sdk@0.7.2 |
| Entry point | @openagentid/sdk/local |
| Availability | Current integration path |
| Reference source | Published TypeScript declarations |
| Package engines | node >=20 |
Before integrating
The published VERSION constant is still the literal "0.6.0" in the 0.7.2 archive. Use package metadata or your lockfile to identify the installed release; do not use VERSION as a release check.
When using @openagentid/crypto-wasm 0.1.1 for ACT verification, call the SDK verifier builder .atTime(Math.floor(Date.now() / 1000)) on every verification. The default WASM system-clock path traps in Node. Supply trusted receiver current epoch seconds; never token-supplied time or a timestamp captured once at startup. The complete ACT example covers this requirement.
In SDK 0.7.2, withAct and requireActExpress do not expose a verification-clock option. The raw crypto-wasm 0.1.1 binding alone therefore traps for these wrappers; use the tested fluent .atTime(...) example, or qualify a binding adapter that supplies fresh trusted receiver time on every verification.
This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.
Import conditions
Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.
| Condition | Published file |
|---|---|
| types | ./dist/local-workspace.d.ts |
| import | ./dist/local-workspace.js |
| require | ./dist/local-workspace.cjs |
Exports
LocalAgent— typeLocalAgentDocument— typeLocalChallenge— typeLocalPublicKeyJwk— typeLocalWorkspaceErrorLocalWorkspaceFailure— typeOpenAgentWorkspace
LocalAgent
Local receiver registration metadata; this is not a global owner record.
Type-only declaration; it is not a runtime value.
interface LocalAgent {
readonly did: string;
readonly name: string;
readonly publicKeyJwk: LocalPublicKeyJwk;
readonly createdAt: number;
readonly revoked: boolean;
readonly hasPrivateKey: boolean;
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:11.
LocalAgentDocument
Portable public identity document. Importing it requires explicit trust.
Type-only declaration; it is not a runtime value.
interface LocalAgentDocument {
readonly schemaVersion: 1;
readonly did: string;
readonly name: string;
readonly publicKeyJwk: LocalPublicKeyJwk;
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:21.
LocalChallenge
Existing, receiver-issued challenge. All times are Unix seconds.
Type-only declaration; it is not a runtime value.
interface LocalChallenge {
readonly nonce: string;
readonly audience: string;
readonly expiresAt: number;
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:28.
LocalPublicKeyJwk
Public Ed25519 material. Private JWK parameters are never exported.
Type-only declaration; it is not a runtime value.
interface LocalPublicKeyJwk {
readonly kty: 'OKP';
readonly crv: 'Ed25519';
readonly x: string;
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:5.
LocalWorkspaceError
Workspace failures never include private material or state-file contents.
declare class LocalWorkspaceError extends Error {
readonly code: LocalWorkspaceFailure;
readonly name = "LocalWorkspaceError";
constructor(code: LocalWorkspaceFailure, message: string);
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:35.
LocalWorkspaceFailure
Type-only declaration; it is not a runtime value.
type LocalWorkspaceFailure = 'invalid_input' | 'invalid_state' | 'unavailable' | 'locked' | 'untrusted_identity' | 'no_signer' | 'revoked' | 'capacity';Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:33.
OpenAgentWorkspace
Durable, explicitly local trust and private signing-key custody.
declare class OpenAgentWorkspace {
static initialize(directory: string, options: {
audience: string;
namespace?: string;
}): Promise<OpenAgentWorkspace>;
static open(directory: string): Promise<OpenAgentWorkspace>;
createAgent(name: string): Promise<LocalAgent>;
listAgents(): Promise<LocalAgent[]>;
exportIdentity(did: string): Promise<LocalAgentDocument>;
trustIdentity(document: LocalAgentDocument): Promise<LocalAgent>;
issueChallenge(did: string): Promise<LocalChallenge>;
prove(did: string, options: {
nonce: string;
audience: string;
}): Promise<AgentIdentityProof>;
verify(proof: AgentIdentityProof, options: {
nonce: string;
}): Promise<VerifiedAgentIdentity>;
revoke(did: string): Promise<void>;
inspect(): Promise<{
audience: string;
namespace: string;
agents: number;
signers: number;
revoked: number;
}>;
}Source: @openagentid/sdk@0.7.2, dist/local-workspace.d.ts:41.
Supporting declarations
These package-owned declarations are referenced by the exports above. Their presence here does not make them importable from this entry point. Import only the names in Exports.
AgentIdentityProof
Type-only declaration; it is not a runtime value.
interface AgentIdentityProof {
readonly token: string;
readonly delegations: readonly string[];
}Source: @openagentid/sdk@0.7.2, dist/identity-verification.d.ts:42.
CommonAgentIdentity
Type-only declaration; it is not a runtime value.
interface CommonAgentIdentity {
readonly did: string;
readonly lineage: readonly string[];
readonly expiresAt: number;
}Source: @openagentid/sdk@0.7.2, dist/identity-verification.d.ts:8.
VerifiedAgentIdentity
Current identity trust. This grants no application scopes or tenant access.
Type-only declaration; it is not a runtime value.
type VerifiedAgentIdentity = CommonAgentIdentity & ({
readonly owner: VerifiedOwner;
readonly root?: {
readonly kind: 'lifeid';
readonly did: string;
};
} | {
readonly owner: null;
readonly root: {
readonly kind: 'self';
readonly did: string;
readonly authorizationId: string;
readonly revision: string;
};
});Source: @openagentid/sdk@0.7.2, dist/identity-verification.d.ts:16.
VerifiedOwner
Type-only declaration; it is not a runtime value.
interface VerifiedOwner {
readonly issuer: string;
readonly subject: string;
readonly organizationId?: string;
}Source: @openagentid/sdk@0.7.2, dist/identity-verification.d.ts:3.
Package requirements
Dependencies
| Package | Published range |
|---|---|
| zod | ^3.23.8 |
| jose | ^5.10.0 |
| @noble/hashes | ^1.8.0 |
| @scure/base | ^1.2.6 |
Peer dependencies
| Package | Published range | Optional |
|---|---|---|
| @openagentid/aegis-sdk | ^0.1.0 | Yes |
| @openagentid/arsenal-sdk | ^0.1.0 | Yes |
| @openagentid/crypto-wasm | ^0.1.0 | Yes |
| @openagentid/oas-sdk | ^1.0.2 | Yes |
Archive verification
Pinned integrity:
sha512-9YlDb02di8sGffhuMOwNAQa/M3oBrhaqPc7t+qBltdoQRCqlxDmYB/nTRSB4eZgwE4lvM4TKzI72nJtJSVm/ww==