@agentic-passport/protocol
v0.4.1
Published
AgentPassport wire-format protocol — Zod schemas, error codes, audit hash-chain, spec.
Maintainers
Readme
@agentic-passport/protocol
The AgentPassport wire-format protocol. Zod schemas for every message, error codes, audit hash-chain helper, and the canonical spec.
This package is the source of truth for the wire format. Other implementations validate against these schemas.
Install
pnpm add @agentic-passport/protocolUse
import {
ProtocolVersion,
DiscoveryDocSchema,
MandateClaimsSchema,
RegisterRequestSchema,
RegisterResponseSchema,
AuthorizeRequestSchema,
AuthorizeResponseSchema,
AccessTokenClaimsSchema,
AuditEntrySchema,
ErrorCode,
} from '@agentic-passport/protocol';
// ProtocolVersion === 'agent-passport/0.1'
const parsed = MandateClaimsSchema.safeParse(jwtPayload);
if (!parsed.success) throw new Error('invalid mandate');Spec
The full wire format is documented in spec.md (also shipped in the npm tarball).
Subpath exports
@agentic-passport/protocol— schemas + types@agentic-passport/protocol/errors—ErrorCodeenum@agentic-passport/protocol/schemas— Zod schemas@agentic-passport/protocol/audit—verifyChainhelper for hash-chained audit logs
License
Apache-2.0. See LICENSE.
