Skip to content

v0.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Oct 17:20
· 3 commits to main since this release
0fffe21

Subact ID SDKs 0.1.0

The first release of the TypeScript libraries for Subact ID,
an agent identity and delegation control plane. Subact ID issues short-lived, scoped tokens that
let an AI agent act on behalf of a specific human and records every action against that human.
In every token, sub is the human and the agent is in act. These packages are the two ends of
that exchange: the agent that asks for a task token, and the tool server or MCP server that
checks it.

Packages

Package Used by Install
@subactid/client The agent npm install @subactid/client
@subactid/server A tool server (Express, Fastify, or none) npm install @subactid/server
@subactid/mcp An MCP server npm install @subactid/mcp @modelcontextprotocol/sdk

All three carry the same version. @subactid/mcp depends on @subactid/server and needs
@modelcontextprotocol/sdk (>=1.20.0 <2) as a peer.

What is in it

  • @subactid/client: exchanges the human's token and the agent's signed assertion (RS256,
    PS256 or ES256) for a task token over RFC 8693 token exchange; refreshes proactively at 60% of
    each token's life, so a caller is never handed a token about to expire; cuts the last token to
    the task's end and reports the task as over rather than stretching it; narrows scope mid-task
    and never asks for more than the task holds; keeps task grants in a pluggable store so a task
    survives a restart; typed errors for every refusal the control plane can give, with
    isRetryable, isTerminal and isTaskOver to act on them; honours Retry-After; refuses
    redirects, untrusted responses and plain http issuers off the loopback.
  • @subactid/server: verifies task tokens against the control plane's keys with rotation
    handled, enforces the scope each route needs, introspects high-risk routes on every call so a
    kill switch is felt at once, and logs who acted for whom on every request. Express and Fastify
    adapters, and a framework-agnostic validator. @subactid/server/audit verifies records from
    the control plane's audit ledger against its signed checkpoints and the chain between them,
    offline.
  • @subactid/mcp: SubactIdGuard for MCP servers: the same verification per request, a
    per-tool scope policy, introspection for high-risk tools, and a log line per call naming the
    human and the agent.

Guarantees

Every package keeps four invariants, and the tests hold them under attack cases:

  1. Scope only narrows. A refresh asks for the same scope or a subset, never more.
  2. No secret is ever logged, returned in an error or serialised: tokens, task grants, subject
    tokens and private keys stay out of inspect and JSON output.
  3. A token handed to a caller has life left in it.
  4. The agent is the actor, never the subject.

Requirements

Node 22 or later. ESM only. No runtime dependencies beyond the platform's WebCrypto and
fetch. Works against a Subact ID control plane implementing the v0.1 contract
(Subact ID v0.1.0 or later).

Getting started

The README walks through running the
examples against the control plane's quickstart: registering an agent, a Jira-style tool server
in Express and Fastify, an agent that narrows its scope mid-task, a 30-minute task on 5-minute
tokens, an MCP server behind SubactIdGuard, and an offline audit check. Each package README
covers its API, options and errors.

Provenance

The packages were published by this repository's release workflow through npm trusted
publishing, with no long-lived token involved; each version carries a provenance attestation
that names the commit and the workflow run that built it. To check:

npm install @subactid/client @subactid/server @subactid/mcp @modelcontextprotocol/sdk
npm audit signatures