@aaes-ai/govern-sdk
v0.2.0
Published
TypeScript/JavaScript SDK for AAES — the AI governance platform for the action layer: permissions, human approvals, and spending limits on routed agent actions
Maintainers
Readme
AAES TypeScript / JavaScript SDK
AAES (Autonomous Agentic Enterprise Systems) is an AI governance platform for the action layer: permissions, approvals by authorized persons, and spending limits on requests routed through it, with a sealed record of each completed decision. This package is its TypeScript/JavaScript client.
ES module package @aaes-ai/govern-sdk, dependency-free runtime, with complete public TypeScript declarations and wire response types. Node 18+.
npm install @aaes-ai/govern-sdk
# For local development: npm install ./sdk/typescript
node sdk/typescript/aaes.test.mjs # node:test, nothing to installThese examples require SDK access, a running AAES daemon, and a token issued by
your deployment operator. Set AAES_ENDPOINT and AAES_TOKEN first. The request
reads permitted capabilities; it does not execute an agent action.
import { Client } from "@aaes-ai/govern-sdk";
try {
const result = await Client.fromEnv().capabilities();
console.log(`${result.capabilities.length} permitted capabilities`);
} catch (error) {
console.error(String(error));
process.exitCode = 1;
}Methods: capabilities, catalogue, health, action, brokered,
resume, resumeBrokered, presentGrant, requestAccess, accessRequest, observe, refresh,
federate, the bounded reads listTask, task, listApprovals,
approval, listEntitlements, listReceipts, receipt, the
agent-manager card reads managerCards and decideManagerCard, the
person-only operator client's revokeAccessRequest, and the exported
verifyHint(exportPath, publicKeyPath). Every method above is covered by
this package's tests (aaes.test.mjs, resume.test.mjs, read.test.mjs, federation.test.mjs).
What it deliberately does not do: action(), requestAccess() and
observe() refuse any key they do not document, so url, method,
headers, credential, token, tenantId and actorId cannot be
smuggled in; the payload is checked against the field names the daemon refuses;
tenant and actor come from GET /v1/capabilities; receipts are the daemon's
bytes and are verified offline with aaesctl verify; a mutating call is
retried only on opt-in, only after a 503, and only under the same effect key.
Full guide: docs/guides/INTEGRATION.md.
A 503 response does not prove that the provider performed no action. Repeat only the identical request with its original effect key; never change the key to force a retry. The daemon retains the reservation and dispatch claim for uncertain outcomes and may answer the repeat with 409. It permits another dispatch only after proving that the previous attempt was never dispatched.
Published package and expanded contract
See SDK release policy and complete operation/scope table. Version 0.1.3 was published on npm as @aaes-ai/govern-sdk on 18 October 2026, by a manual first publish rather than the tag workflow (see the changelog). Version 0.2.0 is prepared and tagged sdk/typescript/v0.2.0, but the tag workflow's publish run failed, so 0.2.0 is not on npm. Publishing it needs a re-run of that workflow on the tag, or a new version. Earlier releases through 0.1.2 remain under @aaes-ai/sdk. Check npm for later releases.
Endpoint transport: bearer credentials require HTTPS. HTTP is accepted only
for explicit loopback addresses (localhost, 127.0.0.0/8, or ::1); DNS
resolution is never used to authorize plaintext transport.
