AbsoluteJS

@absolutejs/agent-exchange-mandate-stores

@absolutejs/agent-exchange-mandate-storesv0.2.0betaAI

Atomic PostgreSQL and Redis stores for Agent Exchange standing mandates.

#Installation

BASH
bun add @absolutejs/agent-exchange-mandate-stores

#Capabilities

Overview

Atomic PostgreSQL and Redis implementations of the AgentExchangeMandateStore contract. They register signed mandates, reject unknown or expired records, consume each exchange ID once, enforce total use limits, and make revocation effective before later execution.

Apply AGENT_EXCHANGE_MANDATE_POSTGRES_MIGRATION before constructing the PostgreSQL adapter. The Redis adapter uses single Lua scripts for each state transition and expiry at the mandate deadline.

This is an experimental 0.x package and has not been independently audited.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/agent-exchange-mandate-stores through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/agent-exchange-mandate-stores version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/agent-exchange-mandate-stores example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Public entry points

Supported entry points declared by this package manifest.

@absolutejs/agent-exchange-mandate-storesPackage entry point declared in package.json.

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts --outdir dist --root src --sourcemap --target=browser --external @absolutejs/agent-exchange && tsc --project tsconfig.build.json
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run format:checkprettier --check "./**/*.{ts,json,md}"
bun run testbun test tests/
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

8 symbols
MandatePostgresClienttypePermalinkSource
TS
type MandatePostgresClient = {
    readonly query: <Row = Record<string, unknown>>(text: string, values: readonly unknown[]) => Promise<{
        readonly rowCount: number;
        readonly rows: readonly Row[];
    }>;
};
Exported from @absolutejs/agent-exchange-mandate-stores