@tangle-network/agent-knowledge 14.0.2 → 15.0.0
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/CHANGELOG.md +15 -0
- package/README.md +21 -2
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +28 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +193 -116
- package/dist/index.js.map +1 -1
- package/dist/{inspect-DCpUoPVb.js → inspect-DMZXOQYl.js} +12 -9
- package/dist/inspect-DMZXOQYl.js.map +1 -0
- package/docs/architecture.md +11 -0
- package/docs/knowledge-use-receipts.md +10 -0
- package/package.json +2 -2
- package/skills/build-with-agent-knowledge/SKILL.md +1 -1
- package/dist/inspect-DCpUoPVb.js.map +0 -1
package/docs/architecture.md
CHANGED
|
@@ -67,6 +67,17 @@ Every write in this layer goes through `durable-fs` (`writeFileDurable`, `writeJ
|
|
|
67
67
|
`O_NOFOLLOW` descriptors anchored through `/proc/self/fd` prevent a directory swapped for a symlink during a write from redirecting it outside the root.
|
|
68
68
|
These are exported from the package entrypoint; consumers that keep their own journals should use them rather than reimplement them.
|
|
69
69
|
|
|
70
|
+
## Candidate state scope
|
|
71
|
+
|
|
72
|
+
KB improvement snapshots include pages, raw evidence, and the source registry by default.
|
|
73
|
+
A declared `stateScope.pagesDirectory` selects the same pages for writers, readers, indexing, and promotion.
|
|
74
|
+
Opting into `stateScope.researchState` also binds canonical claim ledgers and research events.
|
|
75
|
+
The hash includes nondefault scope declarations, so two different scopes cannot silently share an identity when their extra directories are empty.
|
|
76
|
+
Resume uses the persisted scope and refuses a changed declaration.
|
|
77
|
+
Promotion and crash recovery apply its narrow path allowlist through the existing file transaction journal.
|
|
78
|
+
Derived indexes, lock state, retrieval artifacts, and external providers are excluded.
|
|
79
|
+
Applications must bind external state through their existing memory branch or evaluation contracts.
|
|
80
|
+
|
|
70
81
|
## Runtime Loop
|
|
71
82
|
|
|
72
83
|
1. Normalize sources into immutable source records.
|
|
@@ -62,6 +62,16 @@ const artifact = knowledgeVisibilityArtifactRef({ uri: 'artifact://run/visibilit
|
|
|
62
62
|
|
|
63
63
|
The artifact reference is optional at this contract layer: a caller that retains the snapshot in another durable record may omit it. A production adapter should require a durable locator.
|
|
64
64
|
|
|
65
|
+
When `createKnowledgeTools` has a `recordRetrieval` sink, it persists canonical visibility bytes before calling that sink.
|
|
66
|
+
It stores artifacts under the run's `.agent-knowledge/retrieval-visibility/` directory and attaches a `file:` artifact locator to each receipt.
|
|
67
|
+
Searches over the same view reuse that artifact, including concurrent searches.
|
|
68
|
+
Changed views receive different artifacts.
|
|
69
|
+
A persistence failure or conflicting stored bytes prevents receipt delivery.
|
|
70
|
+
The host must retain these artifacts with its receipts and make the locator accessible to later verification.
|
|
71
|
+
Searches without a receipt sink still return an in-memory receipt without creating durable evidence.
|
|
72
|
+
These artifacts record visibility; they do not promote observations into sourced claims or prove downstream utility.
|
|
73
|
+
|
|
74
|
+
|
|
65
75
|
## Retrieval receipt
|
|
66
76
|
|
|
67
77
|
`createKnowledgeRetrievalReceipt()` binds:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-knowledge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "Build, search, evaluate, and improve source-backed knowledge bases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-knowledge#readme",
|
|
6
6
|
"repository": {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"zod": "4.5.4"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@tangle-network/agent-eval": ">=0.
|
|
87
|
+
"@tangle-network/agent-eval": ">=0.174.0 <0.177.0",
|
|
88
88
|
"@tangle-network/agent-interface": "^2.0.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
@@ -46,7 +46,7 @@ The agent's current answer is not a gold answer.
|
|
|
46
46
|
It does not own model choice, prompts, browsing, agent scheduling, product authorization, or product storage transactions.
|
|
47
47
|
|
|
48
48
|
Supply callbacks for research, retrieval, answer generation, and scoring.
|
|
49
|
-
Use `@tangle-network/agent-runtime
|
|
49
|
+
Use `@tangle-network/agent-runtime` when those callbacks should run agents.
|
|
50
50
|
Use existing vector, graph, search, and memory systems through adapters instead of rebuilding their databases here.
|
|
51
51
|
|
|
52
52
|
## Build The Smallest Complete Path
|