@agent-custody/state 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,13 +10,7 @@ Retrieval stays with whatever store you already use. This package owns provenanc
|
|
|
10
10
|
npm install @agent-custody/state # or bun add, pnpm add
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
bun install && bun run build # at the repository root
|
|
17
|
-
cd packages/state && bun pm pack # writes agent-custody-state-0.1.0.tgz here
|
|
18
|
-
npm install /path/to/agent-custody/packages/state/agent-custody-state-0.1.0.tgz # in your project
|
|
19
|
-
```
|
|
13
|
+
Published on npm as [`@agent-custody/state`](https://www.npmjs.com/package/@agent-custody/state): compiled JavaScript with type declarations, Node 22 or later, Apache-2.0.
|
|
20
14
|
|
|
21
15
|
```ts
|
|
22
16
|
import { Ledger } from "@agent-custody/state";
|
|
@@ -28,7 +22,7 @@ ledger.retract({ factId: a.fact.factId, actor: "user:admin", reason: "poisoned b
|
|
|
28
22
|
ledger.asOf({ validAt: "2026-09-01T00:00:00Z", txAt: "2026-09-01T00:00:00Z" });
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
[
|
|
25
|
+
Two runnable examples, both executed by the test suite. [01-ledger.ts](examples/01-ledger.ts) walks through a wrong write and its undo. [02-receipt-to-belief.ts](examples/02-receipt-to-belief.ts) runs the whole loop with the receipts package: a tool call gets a signed receipt, the receipt is verified, the belief taken from it is recorded citing the receipt, and later retracted. Run them with `node examples/<file>` from this directory, after `bun run build` at the repository root.
|
|
32
26
|
|
|
33
27
|
## The ledger
|
|
34
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-custody/state",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Governed memory for AI agents: a fact ledger with provenance, valid time, rollback, and lineage, built on @agent-custody/receipts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc -p tsconfig.build.json",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
|
-
"test": "vitest run"
|
|
27
|
+
"test": "tsc -p ../receipts/tsconfig.build.json && vitest run"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=22"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@agent-custody/receipts": "0.1.
|
|
33
|
+
"@agent-custody/receipts": "0.1.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^26.4.1",
|