@openagentid/oas-resolve
API contract shipped by @openagentid/oas-resolve 1.0.2. Exact exports, signatures, dependencies and availability.
All packages · Runnable examples · Start an agent
| Contract | Value |
|---|---|
| Package | @openagentid/oas-resolve@1.0.2 |
| Entry point | @openagentid/oas-resolve |
| Availability | Published package |
| Reference source | Published TypeScript declarations |
| Package engines | node >=20 |
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/index.d.ts |
| import | ./dist/index.js |
Exports
CachingResolver
Caching wrapper for any {@link Resolver}.
Caches resolved documents with a configurable TTL (time-to-live). Cache misses are forwarded to the inner resolver. Expired entries are transparently refreshed.
export declare class CachingResolver implements Resolver {
constructor(inner: Resolver, ttlMs?: number);
resolve(did: string): Promise<OasDocument>;
invalidate(did: string): void;
clear(): void;
get size(): number;
get isEmpty(): boolean;
}Source: @openagentid/oas-resolve@1.0.2, dist/cache.d.ts:18.
FallbackResolver
Fallback resolver that tries multiple resolvers in priority order.
Returns the result from the first resolver that succeeds. If all resolvers fail, throws an error aggregating all failure reasons.
export declare class FallbackResolver implements Resolver {
constructor(resolvers: ReadonlyArray<Resolver>);
resolve(did: string): Promise<OasDocument>;
}Source: @openagentid/oas-resolve@1.0.2, dist/fallback.d.ts:18.
InMemoryResolver
In-memory DID resolver for testing and local usage.
Stores documents in a Map keyed by DID string. This is the standard testing approach across the OAS stack.
export declare class InMemoryResolver implements Resolver {
register(doc: OasDocument): void;
remove(did: string): boolean;
resolve(did: string): Promise<OasDocument>;
get size(): number;
get isEmpty(): boolean;
}Source: @openagentid/oas-resolve@1.0.2, dist/memory.d.ts:18.
ResolveError
Structured error for resolution operations.
Carries a machine-readable code from the OAS §12.5 error code registry and a human-readable message.
export declare class ResolveError extends Error {
readonly code: ResolveErrorCode;
readonly details: Readonly<Record<string, unknown>>;
constructor(code: ResolveErrorCode, message: string, details?: Record<string, unknown>);
}Source: @openagentid/oas-resolve@1.0.2, dist/error.d.ts:47.
ResolveErrorCode
Error codes for DID resolution operations.
These codes map to the OAS Spec §12.5 error code registry.
declare const ResolveErrorCode: {
readonly NotFound: "NOT_FOUND";
readonly InvalidSignature: "INVALID_SIGNATURE";
readonly Revoked: "REVOKED";
readonly LineageInvalid: "LINEAGE_INVALID";
readonly Timeout: "TIMEOUT";
readonly NetworkError: "NETWORK_ERROR";
readonly Unsupported: "UNSUPPORTED";
readonly InternalError: "INTERNAL_ERROR";
readonly InvalidDid: "INVALID_DID";
readonly RateLimited: "RATE_LIMITED";
readonly AllResolversFailed: "ALL_RESOLVERS_FAILED";
};Source: @openagentid/oas-resolve@1.0.2, dist/error.d.ts:6.
export type ResolveErrorCode = (typeof ResolveErrorCode)[keyof typeof ResolveErrorCode];Source: @openagentid/oas-resolve@1.0.2, dist/error.d.ts:30.
Resolver
Interface for asynchronous OAS DID resolution.
Implementations resolve did:oas:* strings to their Identity Documents
from various backends: in-memory maps, HTTP servers, DHT networks,
MARS registries, etc.
The OAS SDK defines this interface; consumers implement it for their infrastructure. This is the agnosticism boundary.
Type-only declaration; it is not a runtime value.
export interface Resolver {
resolve(did: string): Promise<OasDocument>;
}Source: @openagentid/oas-resolve@1.0.2, dist/resolver.d.ts:19.
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.
Affiliation
Type-only declaration; it is not a runtime value.
export interface Affiliation {
readonly did: string;
readonly relationship: string;
readonly label?: string;
}Source: @openagentid/oas-document@1.0.2, dist/relationships.d.ts:1.
AgentLineageProofData
A verifiable proof linking a child entity to its parent in the OAS lineage chain.
AgentLineageProof2025 establishes cryptographic accountability by proving that
a parent entity authorized the creation of a child entity at a specific derivation path.
The proof contains:
- The parent and child DIDs
- The derivation path used for HKDF key derivation
- The parent's public key (multibase-encoded)
- An Ed25519 signature over the canonical proof payload
See OAS Specification §9.4, §9.5 for the complete proof format.
Type-only declaration; it is not a runtime value.
export interface AgentLineageProofData {
readonly proofType: typeof PROOF_TYPE;
readonly parentDid: string;
readonly childDid: string;
readonly derivationPath: string;
readonly algorithm: typeof PROOF_ALGORITHM;
readonly publicKeyMultibase: string;
readonly signature: string;
}Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:40.
ApiSchema
Type-only declaration; it is not a runtime value.
export interface ApiSchema {
readonly schemaType: string;
readonly url: string;
readonly version?: string;
}Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:6.
BookingEndpoint
Type-only declaration; it is not a runtime value.
export interface BookingEndpoint {
readonly id: string;
readonly url: string;
readonly label?: string;
readonly bookingType?: string;
readonly visibility?: Visibility;
}Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:8.
CalendarSection
Type-only declaration; it is not a runtime value.
export interface CalendarSection {
readonly bookingEndpoints?: ReadonlyArray<BookingEndpoint>;
readonly availabilityFeed?: string;
readonly schedulingProtocol?: string;
readonly officeHours?: ReadonlyArray<ScheduleWindow>;
readonly timezone?: string;
}Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:15.
Certification
Type-only declaration; it is not a runtime value.
export interface Certification {
readonly standard: string;
readonly issuer?: string;
readonly validUntil?: string;
readonly url?: string;
}Source: @openagentid/oas-document@1.0.2, dist/compliance.d.ts:1.
ComplianceSection
Type-only declaration; it is not a runtime value.
export interface ComplianceSection {
readonly jurisdictions?: ReadonlyArray<string>;
readonly certifications?: ReadonlyArray<Certification>;
readonly termsOfServiceUrl?: string;
readonly privacyPolicyUrl?: string;
readonly dataHandlingPolicyUrl?: string;
readonly dataResidency?: string;
}Source: @openagentid/oas-document@1.0.2, dist/compliance.d.ts:7.
ConformanceLevel
OAS conformance levels.
Each level represents a tier of compliance with the OAS specification. Higher levels subsume lower levels: L2 includes all L1 requirements, which includes all L0 requirements.
- L0: Basic identity (DID, verification method, proof)
- L1: L0 + lineage, conformance declaration, lifecycle
- L2: L2 + full attestation chain, WASM compilation
declare const ConformanceLevel: {
readonly L0: "L0";
readonly L1: "L1";
readonly L2: "L2";
};Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:12.
export type ConformanceLevel = (typeof ConformanceLevel)[keyof typeof ConformanceLevel];Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:20.
ContactEntry
Type-only declaration; it is not a runtime value.
export interface ContactEntry {
readonly id: string;
readonly entryType: string;
readonly value: string;
readonly label?: string;
readonly platform?: string;
readonly handle?: string;
readonly visibility?: Visibility;
readonly verified?: boolean;
}Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:2.
ContactSection
Type-only declaration; it is not a runtime value.
export interface ContactSection {
readonly entries: ReadonlyArray<ContactEntry>;
}Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:12.
CostEntry
Type-only declaration; it is not a runtime value.
export interface CostEntry {
readonly unit: string;
readonly amount: string;
readonly currency: string;
}Source: @openagentid/oas-document@1.0.2, dist/pricing.d.ts:2.
DocumentProof
A document proof (Ed25519Signature2020) attached to an OAS Identity Document.
The proof authenticates the document content by signing the JCS-canonicalized document (excluding the proof itself) with the entity's Ed25519 key.
Type-only declaration; it is not a runtime value.
export interface DocumentProof {
readonly type: 'Ed25519Signature2020';
readonly created: string;
readonly verificationMethod: string;
readonly proofPurpose: 'assertionMethod';
readonly proofValue: string;
}Source: @openagentid/oas-document@1.0.2, dist/proof-format.d.ts:8.
EntityKind
The set of recognized OAS entity kinds.
Each entity kind represents a category of autonomous entity in the OAS identity system. Root kinds ({@link EntityKind.Hmr}, {@link EntityKind.Mhr}, {@link EntityKind.Enr}) are the trust anchors from which all other entities derive their lineage.
declare const EntityKind: {
readonly Hmr: "hmr";
readonly Mhr: "mhr";
readonly Enr: "enr";
readonly Ao: "ao";
readonly Agent: "agent";
readonly AgentInstance: "agent:instance";
readonly Tool: "tool";
readonly Skill: "skill";
readonly Workflow: "workflow";
readonly Model: "model";
readonly Dataset: "dataset";
readonly Service: "service";
};Source: @openagentid/oas-did@1.0.2, dist/kind.d.ts:18.
export type EntityKind = (typeof EntityKind)[keyof typeof EntityKind];Source: @openagentid/oas-did@1.0.2, dist/kind.d.ts:44.
GovernancePolicy
Policy constraints governing how ENR transitions may occur.
Type-only declaration; it is not a runtime value.
export interface GovernancePolicy {
readonly transitionRequires: string;
readonly signingKeyRotationRequires: string;
readonly maxTransitionsPerDay: number;
readonly timelockHours: number;
}Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:26.
GovernanceSection
Governance section attached to ENR identity documents.
Tracks the governing MHR, monotonic epoch counter, transition history, and governance policy constraints.
Invariants:
epochMUST strictly increase (no gaps, no rewinds).currentMhrMUST reference a valid, non-revoked MHR DID.- Each transition's
fromMUST match the previous transition'sto.
Type-only declaration; it is not a runtime value.
export interface GovernanceSection {
readonly currentMhr: string;
readonly epoch: number;
readonly transitions: ReadonlyArray<GovernanceTransition>;
readonly policy: GovernancePolicy;
}Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:96.
GovernanceTransition
A single governance transition record.
Records the handoff from one MHR to another, including the cryptographic proof (FROST threshold signature from the outgoing MHR).
Type-only declaration; it is not a runtime value.
export interface GovernanceTransition {
readonly from?: string | undefined;
readonly to: string;
readonly epoch: number;
readonly proof: GovernanceTransitionProof;
}Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:63.
GovernanceTransitionProof
Proof that a governance transition was authorized.
Contains a FROST threshold signature from the outgoing MHR members, proving that a quorum approved the handoff.
Type-only declaration; it is not a runtime value.
export interface GovernanceTransitionProof {
readonly type: string;
readonly mhrThresholdSignature: string;
readonly timestamp: string;
}Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:49.
InteroperabilitySection
Type-only declaration; it is not a runtime value.
export interface InteroperabilitySection {
readonly protocols?: ReadonlyArray<ProtocolSupport>;
readonly apiSchemas?: ReadonlyArray<ApiSchema>;
readonly authMethods?: ReadonlyArray<string>;
}Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:11.
LifecycleStatus
OAS entity lifecycle statuses.
Entities progress through these statuses during their lifetime. The lifecycle is largely linear, but suspension and reactivation create branches.
declare const LifecycleStatus: {
readonly Nascent: "nascent";
readonly Active: "active";
readonly Dormant: "dormant";
readonly Suspended: "suspended";
readonly Terminated: "terminated";
readonly Archived: "archived";
};Source: @openagentid/oas-document@1.0.2, dist/lifecycle.d.ts:8.
export type LifecycleStatus = (typeof LifecycleStatus)[keyof typeof LifecycleStatus];Source: @openagentid/oas-document@1.0.2, dist/lifecycle.d.ts:22.
LineageSection
The lineage section of an OAS Identity Document.
Describes the entity's position in the derivation chain, linking it back to its human root. Root entities (HMR, MHR) do not have a lineage section.
Type-only declaration; it is not a runtime value.
export interface LineageSection {
readonly humanRootDid: string;
readonly creatorDid: string;
readonly generation: number;
readonly derivationProof?: AgentLineageProofData | undefined;
readonly humanRootChain: ReadonlyArray<string>;
}Source: @openagentid/oas-document@1.0.2, dist/lineage-section.d.ts:24.
OAS_VERSION
Current OAS specification version.
declare const OAS_VERSION: "1.0.0";Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:33.
OasDocument
An OAS Identity Document.
This is the core identity artifact in the OAS ecosystem. It extends the W3C DID Document format with OAS-specific properties for lineage, conformance, lifecycle, and entity classification.
Documents are immutable once created. Use {@link DocumentBuilder } to construct new documents.
Type-only declaration; it is not a runtime value.
export interface OasDocument {
readonly '@context': ReadonlyArray<string>;
readonly id: string;
readonly controller: string | ReadonlyArray<string>;
readonly verificationMethod: ReadonlyArray<VerificationMethod>;
readonly authentication: ReadonlyArray<string>;
readonly assertionMethod: ReadonlyArray<string>;
readonly capabilityInvocation: ReadonlyArray<string>;
readonly capabilityDelegation: ReadonlyArray<string>;
readonly service: ReadonlyArray<ServiceEndpoint>;
readonly oasVersion: typeof OAS_VERSION;
readonly kind: EntityKind;
readonly name?: string | undefined;
readonly description?: string | undefined;
readonly lineage?: LineageSection | undefined;
readonly conformanceLevel: ConformanceLevel;
readonly lifecycleStatus?: LifecycleStatus | undefined;
readonly sequence: number;
readonly metadata: Readonly<Record<string, unknown>>;
readonly proof?: DocumentProof | undefined;
readonly revoked?: boolean | undefined;
readonly revokedAt?: string | undefined;
readonly profile?: ProfileSection | undefined;
readonly contact?: ContactSection | undefined;
readonly calendar?: CalendarSection | undefined;
readonly operational?: OperationalSection | undefined;
readonly pricing?: PricingSection | undefined;
readonly interoperability?: InteroperabilitySection | undefined;
readonly reputation?: ReputationSection | undefined;
readonly compliance?: ComplianceSection | undefined;
readonly relationships?: RelationshipsSection | undefined;
readonly governance?: GovernanceSection | undefined;
}Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:52.
OperationalSection
Type-only declaration; it is not a runtime value.
export interface OperationalSection {
readonly availability?: string;
readonly sla?: ReadonlyArray<SlaCommitment>;
readonly rateLimits?: ReadonlyArray<RateLimit>;
readonly supportedInputFormats?: ReadonlyArray<string>;
readonly supportedOutputFormats?: ReadonlyArray<string>;
readonly maxPayloadBytes?: number;
readonly maxContextTokens?: number;
readonly maintenanceWindows?: ReadonlyArray<ScheduleWindow>;
}Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:11.
PricingSection
Type-only declaration; it is not a runtime value.
export interface PricingSection {
readonly model: string;
readonly costs?: ReadonlyArray<CostEntry>;
readonly currenciesAccepted?: ReadonlyArray<string>;
readonly billingEndpoint?: string;
readonly freeTierLimits?: string;
readonly billingVisibility?: Visibility;
}Source: @openagentid/oas-document@1.0.2, dist/pricing.d.ts:7.
ProfileSection
Type-only declaration; it is not a runtime value.
export interface ProfileSection {
readonly avatarUrl?: string;
readonly bannerUrl?: string;
readonly tagline?: string;
readonly categories?: ReadonlyArray<string>;
readonly languages?: ReadonlyArray<string>;
readonly timezone?: string;
readonly accentColor?: string;
}Source: @openagentid/oas-document@1.0.2, dist/profile.d.ts:1.
PROOF_ALGORITHM
The algorithm used for key derivation in lineage proofs.
declare const PROOF_ALGORITHM: "HKDF-SHA256-Ed25519";Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:9.
PROOF_TYPE
The proof type identifier for OAS lineage proofs.
declare const PROOF_TYPE: "AgentLineageProof2025";Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:5.
ProtocolSupport
Type-only declaration; it is not a runtime value.
export interface ProtocolSupport {
readonly protocol: string;
readonly version?: string;
readonly endpoint?: string;
}Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:1.
RateLimit
Type-only declaration; it is not a runtime value.
export interface RateLimit {
readonly resource: string;
readonly limit: number;
readonly window: string;
}Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:6.
RelationshipsSection
Type-only declaration; it is not a runtime value.
export interface RelationshipsSection {
readonly parentOrganization?: string;
readonly affiliations?: ReadonlyArray<Affiliation>;
readonly blockedDids?: ReadonlyArray<string>;
}Source: @openagentid/oas-document@1.0.2, dist/relationships.d.ts:6.
ReputationSection
Type-only declaration; it is not a runtime value.
export interface ReputationSection {
readonly totalInteractions?: number;
readonly endorsementCount?: number;
readonly trustScore?: string;
readonly uptime30d?: string;
readonly uptime90d?: string;
readonly firstActive?: string;
readonly endorserDids?: ReadonlyArray<string>;
}Source: @openagentid/oas-document@1.0.2, dist/reputation.d.ts:1.
ScheduleWindow
Type-only declaration; it is not a runtime value.
export interface ScheduleWindow {
readonly day: string;
readonly start: string;
readonly end: string;
readonly timezone: string;
}Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:2.
ServiceEndpoint
A service endpoint declaration in an OAS Identity Document.
Services describe how to interact with the entity — API endpoints, communication channels, discovery mechanisms, etc.
Type-only declaration; it is not a runtime value.
export interface ServiceEndpoint {
readonly id: string;
readonly type: string;
readonly serviceEndpoint: string;
readonly label?: string;
readonly description?: string;
readonly properties?: Readonly<Record<string, string>>;
}Source: @openagentid/oas-document@1.0.2, dist/service.d.ts:18.
SlaCommitment
Type-only declaration; it is not a runtime value.
export interface SlaCommitment {
readonly metric: string;
readonly target: string;
}Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:2.
VerificationMethod
An Ed25519 verification method in an OAS Identity Document.
Verification methods bind public keys to the DID subject, enabling signature verification on documents, proofs, and attestations.
Type-only declaration; it is not a runtime value.
export interface VerificationMethod {
readonly id: string;
readonly type: 'Ed25519VerificationKey2020';
readonly controller: string;
readonly publicKeyMultibase: string;
}Source: @openagentid/oas-document@1.0.2, dist/verification-method.d.ts:19.
Visibility
Type-only declaration; it is not a runtime value.
export type Visibility = 'public' | 'authenticated' | 'organization' | 'private';Source: @openagentid/oas-document@1.0.2, dist/visibility.d.ts:1.
Package requirements
Dependencies
| Package | Published range |
|---|---|
| @openagentid/oas-document | 1.0.2 |
Archive verification
Pinned integrity:
sha512-aPu2d1VKAyj9Bgl+YmjoPt4YZKgx3qWXwAkv5VtsartpENCTlk1oYoUT6iirurOZfFE1LwSBloeiiCJBAjRGqg==