@tangle-network/agent-knowledge 6.1.11 → 7.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/AGENTS.md +9 -0
- package/CHANGELOG.md +25 -0
- package/README.md +1 -1
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-CmW6iORW.js → benchmarks-C8L7HJb4.js} +2 -2
- package/dist/{benchmarks-CmW6iORW.js.map → benchmarks-C8L7HJb4.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{ids-DRqPZ42_.js → ids-Bevz_pXV.js} +6 -2
- package/dist/ids-Bevz_pXV.js.map +1 -0
- package/dist/{index-CIW3G4s_.d.ts → index-D0wc4GYg.d.ts} +2 -2
- package/dist/{index-CIW3G4s_.d.ts.map → index-D0wc4GYg.d.ts.map} +1 -1
- package/dist/{index-CGBctbit.d.ts → index-Dwp3Mx-w.d.ts} +3 -3
- package/dist/{index-CGBctbit.d.ts.map → index-Dwp3Mx-w.d.ts.map} +1 -1
- package/dist/index.d.ts +377 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -198
- package/dist/index.js.map +1 -1
- package/dist/{inspect-DAXpFyrs.js → inspect-CJQGYuKa.js} +809 -17
- package/dist/inspect-CJQGYuKa.js.map +1 -0
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{memory-C6KPRhoU.js → memory-CIYRB_Q8.js} +3 -3
- package/dist/{memory-C6KPRhoU.js.map → memory-CIYRB_Q8.js.map} +1 -1
- package/dist/sources/index.js +1 -1
- package/dist/types-BOfmvDe-.d.ts +306 -0
- package/dist/{types-DcCCzreS.d.ts.map → types-BOfmvDe-.d.ts.map} +1 -1
- package/dist/viz/index.d.ts +1 -1
- package/docs/architecture.md +32 -0
- package/package.json +1 -1
- package/dist/ids-DRqPZ42_.js.map +0 -1
- package/dist/inspect-DAXpFyrs.js.map +0 -1
- package/dist/types-DcCCzreS.d.ts +0 -175
package/AGENTS.md
CHANGED
|
@@ -84,6 +84,15 @@ Use `knowledgeReleaseReport()` before promotion. It folds the candidate and base
|
|
|
84
84
|
## Integration Boundaries
|
|
85
85
|
|
|
86
86
|
- Use `KbStore` for storage. Applications may provide any durable backend that implements it.
|
|
87
|
+
- Use `new FileSystemKbStore({ root })` when opening a knowledge-base root; it keeps every record under `<root>/.agent-knowledge/` — index, event log, and per-run claim ledgers.
|
|
88
|
+
The string constructor retains the published direct-directory behavior.
|
|
89
|
+
A legacy string that names `<root>/.agent-knowledge` is canonicalized to the same root lock, so the two constructor forms cannot race on one file under different locks.
|
|
90
|
+
The store is the single writer of `index.json`; `writeKnowledgeIndex` goes through it.
|
|
91
|
+
Do not add a second writer for a record this store owns.
|
|
92
|
+
- Research state is durable state. A driver that accumulates belief across rounds takes a store and a `ledgerId` (`createPersistentResearchDrivingDriver`) so corroboration counts, contradiction edges, and open questions survive the process. `runVerifiedResearchLoop` durably announces a fold before its synchronous question generation, calls `driver.checkpoint()` before publishing the round event, and reconstructs an interrupted fold on resume.
|
|
93
|
+
- `TrackedClaim` remains the live Set-based driver API; `ResearchClaimRecord` is its sorted-array durable form. Convert at the persistence boundary rather than changing the published live shape.
|
|
94
|
+
- More than one writer per ledger means `mergeClaimLedger(id, merge)`, never `putClaimLedger`. `putClaimLedger` writes the whole record, so two writers accumulating into one ledger each write what they built from a stale read and the later write erases the earlier writer's claims. `mergeClaimLedger` holds the store's lock across read, merge, and write; `mergeClaimLedgers` is the combining rule and is commutative, associative, and idempotent, so replay and arrival order cannot change the result.
|
|
95
|
+
- Use `writeFileDurable` / `writeJsonDurableWithinRoot` from the entrypoint for any file that must survive a crash. They are atomic, fsynced, and symlink-safe; a hand-rolled `writeFile` is none of those.
|
|
87
96
|
- Use `KnowledgeDiscoveryDispatcher` for research workers. Applications should connect it to their own runtime.
|
|
88
97
|
- Do not bypass `lint` or `validate` before using generated knowledge in an agent.
|
|
89
98
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- Changed research source confirmation from URI strings to exact `SourceRecord` values and versioned the durable claim ledger schema so every observation is bound to its registry id, original URI, and full SHA-256 content hash.
|
|
8
|
+
- URI-only 6.2 ledgers now fail with `ClaimLedgerMigrationRequiredError` and remain untouched for explicit archive-and-reverify migration; they are never guessed into the exact-source schema.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Prevented registering one version of a URI from activating claims extracted from different bytes at that URI, including concurrent writers and crash recovery.
|
|
13
|
+
- Snapshotted source proposals before asynchronous work, preserved the exact submitted raw bytes, and used full content hashes in raw-source paths.
|
|
14
|
+
- Kept one-sided contradiction observations pending until both claims have exact registered support, preventing a missing counterpart from satisfying completion.
|
|
15
|
+
|
|
16
|
+
## 6.2.0
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Added durable, merge-safe research claim ledgers and `createPersistentResearchDrivingDriver`, preserving corroboration, contradictions, deep questions, and round state across crashes, resumes, and concurrent workers.
|
|
21
|
+
- Exported the durable filesystem write primitives used by the reference store so other journaled consumers can reuse the same atomic, symlink-safe writes.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Kept extracted claim evidence pending until its exact source registration is confirmed, and reconciled interrupted registrations on restart so absent sources cannot satisfy completion while registered sources are not lost.
|
|
26
|
+
- Routed knowledge indexes, research iteration events, and claim ledgers through the canonical store layout and one mutation-lock domain.
|
|
27
|
+
|
|
3
28
|
## 6.1.11
|
|
4
29
|
|
|
5
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent-
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pnpm add @tangle-network/agent-knowledge@
|
|
12
|
+
pnpm add @tangle-network/agent-knowledge@7.0.0 @tangle-network/agent-eval@0.135.2
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Requires Node.js 20.19 or later.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as KnowledgeBenchmarkResponder, B as KnowledgeMemoryEvent, C as KnowledgeBenchmarkArtifact, Ct as createInMemoryBenchmarkAdapter, D as KnowledgeBenchmarkEvaluation, E as KnowledgeBenchmarkDistribution, F as KnowledgeBenchmarkSplit, G as MemoryAdapterBenchmarkCandidate, H as KnowledgeRetrievalBenchmarkCase, I as KnowledgeBenchmarkTaskKind, J as RunKnowledgeBenchmarkSuiteResult, K as MemoryAdapterBenchmarkRankingRow, L as KnowledgeClaimMatcher, M as KnowledgeBenchmarkSliceSummary, N as KnowledgeBenchmarkSource, O as KnowledgeBenchmarkFamily, P as KnowledgeBenchmarkSpec, R as KnowledgeMemoryBenchmarkCase, S as KnowledgeAnswerBenchmarkTaskKind, T as KnowledgeBenchmarkCaseBase, U as KnowledgeRetrievalBenchmarkQrel, V as KnowledgeMemoryFactMatcher, W as KnowledgeRetrievalBenchmarkQuery, X as RunMemoryAdapterBenchmarkResult, Y as RunMemoryAdapterBenchmarkOptions, _ as buildIndustryRagBenchmarkSmokeCases, a as runKnowledgeBenchmarkSuite, b as BuildRetrievalBenchmarkCasesFromQrelsOptions, c as buildRetrievalBenchmarkCasesFromQrels, d as summarizeKnowledgeBenchmarkCampaign, f as runMemoryAdapterBenchmark, g as buildIndustryMemoryBenchmarkSmokeCases, h as buildFirstPartyMemoryLifecycleBenchmarkCases, i as renderKnowledgeBenchmarkReportMarkdown, j as KnowledgeBenchmarkScenario, k as KnowledgeBenchmarkReport, l as parseKnowledgeBenchmarkJsonl, m as INDUSTRY_RAG_BENCHMARKS, n as buildKnowledgeBenchmarkScenarios, o as scoreKnowledgeBenchmarkArtifact, p as INDUSTRY_MEMORY_BENCHMARKS, q as RunKnowledgeBenchmarkSuiteOptions, r as knowledgeBenchmarkJudge, s as scoreMemoryBenchmarkArtifact, t as isKnowledgeMemoryBenchmarkCase, u as parseKnowledgeBenchmarkQrels, v as respondToIndustryMemoryBenchmarkSmokeCase, w as KnowledgeBenchmarkCase, wt as createNoopMemoryBenchmarkAdapter, x as KnowledgeAnswerBenchmarkCase, y as respondToIndustryRagBenchmarkSmokeCase, z as KnowledgeMemoryBenchmarkTaskKind } from "../index-
|
|
1
|
+
import { A as KnowledgeBenchmarkResponder, B as KnowledgeMemoryEvent, C as KnowledgeBenchmarkArtifact, Ct as createInMemoryBenchmarkAdapter, D as KnowledgeBenchmarkEvaluation, E as KnowledgeBenchmarkDistribution, F as KnowledgeBenchmarkSplit, G as MemoryAdapterBenchmarkCandidate, H as KnowledgeRetrievalBenchmarkCase, I as KnowledgeBenchmarkTaskKind, J as RunKnowledgeBenchmarkSuiteResult, K as MemoryAdapterBenchmarkRankingRow, L as KnowledgeClaimMatcher, M as KnowledgeBenchmarkSliceSummary, N as KnowledgeBenchmarkSource, O as KnowledgeBenchmarkFamily, P as KnowledgeBenchmarkSpec, R as KnowledgeMemoryBenchmarkCase, S as KnowledgeAnswerBenchmarkTaskKind, T as KnowledgeBenchmarkCaseBase, U as KnowledgeRetrievalBenchmarkQrel, V as KnowledgeMemoryFactMatcher, W as KnowledgeRetrievalBenchmarkQuery, X as RunMemoryAdapterBenchmarkResult, Y as RunMemoryAdapterBenchmarkOptions, _ as buildIndustryRagBenchmarkSmokeCases, a as runKnowledgeBenchmarkSuite, b as BuildRetrievalBenchmarkCasesFromQrelsOptions, c as buildRetrievalBenchmarkCasesFromQrels, d as summarizeKnowledgeBenchmarkCampaign, f as runMemoryAdapterBenchmark, g as buildIndustryMemoryBenchmarkSmokeCases, h as buildFirstPartyMemoryLifecycleBenchmarkCases, i as renderKnowledgeBenchmarkReportMarkdown, j as KnowledgeBenchmarkScenario, k as KnowledgeBenchmarkReport, l as parseKnowledgeBenchmarkJsonl, m as INDUSTRY_RAG_BENCHMARKS, n as buildKnowledgeBenchmarkScenarios, o as scoreKnowledgeBenchmarkArtifact, p as INDUSTRY_MEMORY_BENCHMARKS, q as RunKnowledgeBenchmarkSuiteOptions, r as knowledgeBenchmarkJudge, s as scoreMemoryBenchmarkArtifact, t as isKnowledgeMemoryBenchmarkCase, u as parseKnowledgeBenchmarkQrels, v as respondToIndustryMemoryBenchmarkSmokeCase, w as KnowledgeBenchmarkCase, wt as createNoopMemoryBenchmarkAdapter, x as KnowledgeAnswerBenchmarkCase, y as respondToIndustryRagBenchmarkSmokeCase, z as KnowledgeMemoryBenchmarkTaskKind } from "../index-D0wc4GYg.js";
|
|
2
2
|
export { type BuildRetrievalBenchmarkCasesFromQrelsOptions, INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, type KnowledgeAnswerBenchmarkCase, type KnowledgeAnswerBenchmarkTaskKind, type KnowledgeBenchmarkArtifact, type KnowledgeBenchmarkCase, type KnowledgeBenchmarkCaseBase, type KnowledgeBenchmarkDistribution, type KnowledgeBenchmarkEvaluation, type KnowledgeBenchmarkFamily, type KnowledgeBenchmarkReport, type KnowledgeBenchmarkResponder, type KnowledgeBenchmarkScenario, type KnowledgeBenchmarkSliceSummary, type KnowledgeBenchmarkSource, type KnowledgeBenchmarkSpec, type KnowledgeBenchmarkSplit, type KnowledgeBenchmarkTaskKind, type KnowledgeClaimMatcher, type KnowledgeMemoryBenchmarkCase, type KnowledgeMemoryBenchmarkTaskKind, type KnowledgeMemoryEvent, type KnowledgeMemoryFactMatcher, type KnowledgeRetrievalBenchmarkCase, type KnowledgeRetrievalBenchmarkQrel, type KnowledgeRetrievalBenchmarkQuery, type MemoryAdapterBenchmarkCandidate, type MemoryAdapterBenchmarkRankingRow, type RunKnowledgeBenchmarkSuiteOptions, type RunKnowledgeBenchmarkSuiteResult, type RunMemoryAdapterBenchmarkOptions, type RunMemoryAdapterBenchmarkResult, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildRetrievalBenchmarkCasesFromQrels, createInMemoryBenchmarkAdapter, createNoopMemoryBenchmarkAdapter, isKnowledgeMemoryBenchmarkCase, knowledgeBenchmarkJudge, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, renderKnowledgeBenchmarkReportMarkdown, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, runKnowledgeBenchmarkSuite, runMemoryAdapterBenchmark, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, summarizeKnowledgeBenchmarkCampaign };
|
package/dist/benchmarks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as INDUSTRY_RAG_BENCHMARKS, F as respondToIndustryRagBenchmarkSmokeCase, I as isKnowledgeMemoryBenchmarkCase, L as createInMemoryBenchmarkAdapter, M as buildIndustryMemoryBenchmarkSmokeCases, N as buildIndustryRagBenchmarkSmokeCases, P as respondToIndustryMemoryBenchmarkSmokeCase, R as createNoopMemoryBenchmarkAdapter, a as buildKnowledgeBenchmarkScenarios, c as runKnowledgeBenchmarkSuite, d as summarizeKnowledgeBenchmarkCampaign, i as runMemoryAdapterBenchmark, j as buildFirstPartyMemoryLifecycleBenchmarkCases, k as INDUSTRY_MEMORY_BENCHMARKS, l as scoreKnowledgeBenchmarkArtifact, n as parseKnowledgeBenchmarkJsonl, o as knowledgeBenchmarkJudge, r as parseKnowledgeBenchmarkQrels, s as renderKnowledgeBenchmarkReportMarkdown, t as buildRetrievalBenchmarkCasesFromQrels, u as scoreMemoryBenchmarkArtifact } from "../benchmarks-
|
|
1
|
+
import { A as INDUSTRY_RAG_BENCHMARKS, F as respondToIndustryRagBenchmarkSmokeCase, I as isKnowledgeMemoryBenchmarkCase, L as createInMemoryBenchmarkAdapter, M as buildIndustryMemoryBenchmarkSmokeCases, N as buildIndustryRagBenchmarkSmokeCases, P as respondToIndustryMemoryBenchmarkSmokeCase, R as createNoopMemoryBenchmarkAdapter, a as buildKnowledgeBenchmarkScenarios, c as runKnowledgeBenchmarkSuite, d as summarizeKnowledgeBenchmarkCampaign, i as runMemoryAdapterBenchmark, j as buildFirstPartyMemoryLifecycleBenchmarkCases, k as INDUSTRY_MEMORY_BENCHMARKS, l as scoreKnowledgeBenchmarkArtifact, n as parseKnowledgeBenchmarkJsonl, o as knowledgeBenchmarkJudge, r as parseKnowledgeBenchmarkQrels, s as renderKnowledgeBenchmarkReportMarkdown, t as buildRetrievalBenchmarkCasesFromQrels, u as scoreMemoryBenchmarkArtifact } from "../benchmarks-C8L7HJb4.js";
|
|
2
2
|
export { INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildRetrievalBenchmarkCasesFromQrels, createInMemoryBenchmarkAdapter, createNoopMemoryBenchmarkAdapter, isKnowledgeMemoryBenchmarkCase, knowledgeBenchmarkJudge, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, renderKnowledgeBenchmarkReportMarkdown, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, runKnowledgeBenchmarkSuite, runMemoryAdapterBenchmark, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, summarizeKnowledgeBenchmarkCampaign };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as stableId, t as sha256 } from "./ids-
|
|
1
|
+
import { r as stableId, t as sha256 } from "./ids-Bevz_pXV.js";
|
|
2
2
|
import { n as searchKnowledge } from "./search-CP0QtBJZ.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -2715,4 +2715,4 @@ function defaultDocumentTarget(documentId, targetKind) {
|
|
|
2715
2715
|
//#endregion
|
|
2716
2716
|
export { INDUSTRY_RAG_BENCHMARKS as A, memoryWriteResultToSourceRecord as B, appendDurableJournalEvent as C, reconcileInterruptedMemoryPaidCalls as D, readActiveAttemptJournal as E, respondToIndustryRagBenchmarkSmokeCase as F, retrievalRecallJudge as G, partitionRetrievalScenarios as H, isKnowledgeMemoryBenchmarkCase as I, scoreRetrievalArtifact as K, createInMemoryBenchmarkAdapter as L, buildIndustryMemoryBenchmarkSmokeCases as M, buildIndustryRagBenchmarkSmokeCases as N, reserveRecoveryAttempts as O, respondToIndustryMemoryBenchmarkSmokeCase as P, createNoopMemoryBenchmarkAdapter as R, appendAttemptJournalEvent as S, hasSettledPaidCall as T, retrievalConfigFromSurface as U, buildRetrievalEvalDispatch as V, retrievalConfigSurface as W, memoryRecoveryDelayMs as _, buildKnowledgeBenchmarkScenarios as a, runBoundedMemoryLifecycle as b, runKnowledgeBenchmarkSuite as c, summarizeKnowledgeBenchmarkCampaign as d, acquireAgentMemoryRunLease as f, createMemoryExecutionPool as g, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS as h, runMemoryAdapterBenchmark as i, buildFirstPartyMemoryLifecycleBenchmarkCases as j, INDUSTRY_MEMORY_BENCHMARKS as k, scoreKnowledgeBenchmarkArtifact as l, AgentMemoryLifecycleUnsafeError as m, parseKnowledgeBenchmarkJsonl as n, knowledgeBenchmarkJudge as o, AgentMemoryLifecycleTimeoutError as p, parseKnowledgeBenchmarkQrels as r, renderKnowledgeBenchmarkReportMarkdown as s, buildRetrievalBenchmarkCasesFromQrels as t, scoreMemoryBenchmarkArtifact as u, releaseMemoryAdapterCreatedAfterAbort as v, assertNoInterruptedPaidCalls as w, sleepForMemoryRecovery as x, resolveMemoryCleanupTimeoutMs as y, memoryHitToSourceRecord as z };
|
|
2717
2717
|
|
|
2718
|
-
//# sourceMappingURL=benchmarks-
|
|
2718
|
+
//# sourceMappingURL=benchmarks-C8L7HJb4.js.map
|