Repository navigation
v0.5.0 (experimental)
Labels now survive memory servers that rewrite what they store, the audit log is tamper-evident, "ask" follows the confirmation proposal for SEP-2624, and the gateway can check who may use a tool before the policy runs.
Breaking changes
callHashnow covers the SEP-2624 call binding{ event, phase, target, payload }, so hashes in audit logs differ from 0.4.adtl-gateway ledger declassifyrequires--reason.ChainOutcomeis nowPhaseOutcome(@adtl/gateway), since SEP-2624 no longer has a chain concept.adtl.labelalso hooks the request phase oftools/call. This only matters if you run ADTL's interceptors behind your own invoker.
@adtl/labels
- Tool rules take
labelInto(stamp the session label into a per-record argument such asmetadata) andreadLabels(join stamps found in results, stricter only), for memory servers that extract facts or merge records, which the ledger can't recognize.stampRecordLabel()andreadRecordLabels(). callBindingHash().
@adtl/interceptors
adtl.policyreturns "ask" with aconfirmationrequest (id,reason,callHash,expiresAt,token), as proposed in experimental-ext-interceptors#45, and acceptscontext.confirmationswhen invoked again. Each confirmation allows one call, in one session, before it expires. A confirmation never turns a block into an allow.info["adtl/decision"]is still set.adtl.labelstamps records for tools withlabelInto, and joins the stamps it finds for tools withreadLabels.
@adtl/ledger
declassify()takes a subject (e.g. the file name), kept with the reason.declassifications()lists recent declassifications.
@adtl/gateway
Authorizerinterface: decides whether the caller may use a tool, resource or prompt at all, before the policy runs. A denial wins over any policy decision; failures deny; audit mode only logs. Pass it asnew AdtlGateway({ authorizer, principal }); denials are audited asdenied: { by, reason }. No config support yet (#8).- After a human approves a call, the gateway checks it again with the confirmation and runs it only if every validator allows it and the call still matches the approved hash. The confirmation token never reaches the agent.
- Sets
context.targetto the upstream server, andcontext.principalto the configured principal, on every interceptor invocation. - The audit log is hash-chained: each line carries
prevandhash.adtl-gateway audit verifydetects edited, removed, reordered and inserted lines and prints the last hash. The gateway and the Claude Code hook append through a lock file so the chain doesn't fork. Logs from 0.4 are continued, with their lines reported as written before the chain. - The Claude Code hook guards the audit log like the ledger:
Write/Editon it are blocked, shell commands that mention it ask first. ledger declassifyrecords the file with the reason. Newledger declassifiedlists recent declassifications: when, who, which file, why.- Audit entries get
records: { stamps, writers }when a result carried record stamps. - The npm README shows the architecture sketch.
Examples and docs
examples/fake-memory: a memory server that extracts facts on write, keeps per-item metadata and consolidates records, used in the tests.- The README has a diagram of a label following content through a memory server.