Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 20.0.0

Remove the web research drivers, which no consumer imported, and the TCloud dependency only they used.
Knowledge no longer browses or calls models itself; supply research through `runKnowledgeResearchLoop` callbacks or `@tangle-network/agent-runtime`.
Removed: `runVerifiedResearchLoop`, `createWebResearchWorker`, `createVerifyingResearchDriver`, `createTangleRouterClient`, `RouterError`, `createAdaptiveResearchDriver`, `createCollectionResearchDriver`, `createResearchDrivingDriver`, `createPersistentResearchDrivingDriver`, `createClaimGroundingVerifier`, `createClaimDecorator`, the cited-claim helpers, the investment-thesis set, task, and material-facts metric, and their types.
`groundClaimInText`, claim ledgers, `TrackedClaim`, store formats, and every other public operation are unchanged.
The verified-research paper and its results remain as a historical record linked to the last commit with that code.

## 19.1.5

Publish the Eval 0.208 qualification. The play-memory tests gave their fixture Hindsight a 10 ms ingestion deadline on every path; on a loaded self-hosted runner a write that completes at once missed it and the 19.1.4 publish failed. Success paths now get 10 s; only the unresolved-path test keeps 10 ms.
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent-
pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval@0.208.2 @tangle-network/agent-interface@2.16.0
```

Requires Node.js 22.12 or later and Interface 2.16 or later within v2, matching the Sandbox dependency.
Requires Node.js 22.12 or later and Interface 2.16 or later within v2.

Eval 0.201 through 0.208 are supported.
Package and official optimizer checks exercise each supported minor; development uses 0.208.2.
These releases use Core 0.10, Trace Contract 2, and Zod 4.6.5.
Knowledge 19 requires TCloud 0.8 with Sandbox 0.58.4 or later in that minor.
Use Knowledge 17 with older Eval releases.

## Choose an API
Expand Down Expand Up @@ -545,7 +544,7 @@ Those choices stay in the application or in `@tangle-network/agent-runtime`.
- [Knowledge retrieval and use receipts](docs/knowledge-use-receipts.md)
- [QMD source snapshots](docs/qmd-retrieval.md)
- [Play-scoped Hindsight memory](docs/hindsight-memory.md)
- [Verified research comparison](docs/verified-research-ab.md)
- [Verified research comparison (historical; the research drivers were removed in 20.0.0)](docs/verified-research-ab.md)
- [Changelog](CHANGELOG.md)

## License
Expand Down
69 changes: 0 additions & 69 deletions api-surface.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"package": "@tangle-network/agent-knowledge",
"entries": {
".": {
"AdaptiveDecision": "type b5e46c8679f8",
"AdaptiveDriverOptions": "type cd574a17bf6a",
"AdaptiveResearchDriver": "type 18ad2ba1fe1c",
"AdaptiveStats": "type 94e0566b954b",
"AddSourceOptions": "type bee9a2194b6c",
"AddSourceTextInput": "type 9619930752c2",
"AgentMemoryAcquireRunLease": "type 4ff237e19d6d",
Expand Down Expand Up @@ -82,13 +78,11 @@
"ChunkingOptions": "type 00fb66d7d155",
"ClaimEvidence": "type f780da49a3ef",
"ClaimGrade": "type a9e6edbc7877",
"ClaimGroundingDriverOptions": "type 4c5ca74e7255",
"ClaimLedgerGoalConflictError": "value c96a14249e23",
"ClaimLedgerMigrationRequiredError": "value 2dc627c3fa60",
"ClaimLedgerStore": "type c402ec258adc",
"ClaimRef": "type e200b4c5eeec",
"ClaimVerdict": "type 18f044018844",
"CompanyEvalCase": "type d2903a86209b",
"CompareAgentMemoryLearningOptions": "type 33bff9c3b28a",
"CornellLiiSelector": "type c92fb79c4d6b",
"CornellLiiSourceOptions": "type 3d1a7a174053",
Expand All @@ -103,7 +97,6 @@
"DEFAULT_KNOWLEDGE_BRIEF_LIMIT": "value a16e63bcd9c7",
"DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS": "value 10d1ef3e7731",
"DEFAULT_PAGES_DIRECTORY": "value 5aa47f8e3dde",
"DedupReason": "type 8cce009c6ec0",
"DeepQuestion": "type 244fa050c94a",
"DeepQuestionKind": "type e1a27d1fc3c2",
"DeepQuestionSchema": "value 373728f5643d",
Expand All @@ -115,13 +108,10 @@
"DiscoveryLoopStopReason": "type 61912c65132e",
"DiscoveryResult": "type 3a5c8b06d765",
"DiscoveryTask": "type bfd854dba2b8",
"DriverResearchContext": "type 3f6ac21642ed",
"EvalKnowledgeBundleBuildResult": "type 91fa1b7300ac",
"EvaluateKnowledgeBaseReadinessOptions": "type 9a3de35dc405",
"EvidenceRung": "type fa5c1c76aa73",
"ExpectedGroup": "type c8024ceb7a23",
"ExternalRagEvalScore": "type df1d799a1de6",
"FactResult": "type 79c8d48575f6",
"FetchOpts": "type 7b44d8f28084",
"FileSystemFreshnessStoreOptions": "type 10a9cbd1e857",
"FileSystemKbStore": "value 3e4c27745531",
Expand Down Expand Up @@ -219,7 +209,6 @@
"KnowledgeExplanation": "type 4326c52192e1",
"KnowledgeFragment": "type 5d9512fd9945",
"KnowledgeFreshnessStore": "type 6805e31ec36f",
"KnowledgeGap": "type 4630026a4274",
"KnowledgeGraph": "type 2a4f44745410",
"KnowledgeGraphEdge": "type 9eba2728a7b2",
"KnowledgeGraphEdgeSchema": "value 373728f5643d",
Expand Down Expand Up @@ -336,9 +325,6 @@
"LoadKnowledgeImprovementActivationResultOptions": "type 3c304bc52d1c",
"MAX_RESPONSE_BYTES": "value 373728f5643d",
"MIN_REQUEST_GAP_MS": "value 648cef7e8361",
"MaterialFact": "type 7b848dee213b",
"MaterialFactLens": "type 504d719aaa16",
"MaterialFactsResult": "type 8e5c394d8ac3",
"MeasuredKnowledgeSelectionReceipt": "type 28a9a57c6626",
"Mem0ClientMode": "type abfe4225abaf",
"Mem0HostedClient": "type 4d1434ac5a9a",
Expand All @@ -364,7 +350,6 @@
"ParsedFrontmatter": "type 7aebd4ab7c31",
"PartitionRetrievalScenariosOptions": "type bfb5473c9c0c",
"PendingKnowledgeMutation": "type 265414e3a059",
"PersistentResearchDrivingDriverOptions": "type 1a2cb7bacb89",
"PlayMemoryRetrievalReceipt": "type 0118f85065b1",
"PoliteFetchOptions": "type e8c10ab474da",
"PoliteFetchResult": "type 68c8ac7c266b",
Expand Down Expand Up @@ -412,23 +397,14 @@
"RagRequiredContext": "type 2ef3d6dfc30b",
"RecoverPendingKnowledgeMutationOptions": "type a90f6aeb047d",
"RegularFileSnapshot": "type 55d315589931",
"RejectedSource": "type 81899fc9ed5b",
"ResearchClaimEvidence": "type 31fa8f46f25a",
"ResearchClaimEvidenceSchema": "value 373728f5643d",
"ResearchClaimLedger": "type f3435f987d19",
"ResearchClaimLedgerSchema": "value 373728f5643d",
"ResearchClaimRecord": "type febfce5cc05e",
"ResearchClaimRecordSchema": "value 373728f5643d",
"ResearchContribution": "type 4ef9b903af78",
"ResearchDriver": "type 76db7bd73161",
"ResearchDrivingDriver": "type 919454a2ef43",
"ResearchDrivingDriverOptions": "type bf4180687f2d",
"ResearchDrivingState": "type 55bc4328e4c3",
"ResearchDrivingSteer": "type 5f5bca7f3f8f",
"ResearchSourceProposal": "type be9f803d5a8e",
"ResearchSourceVersion": "type f20d55e99f71",
"ResearchSourceVersionSchema": "value 373728f5643d",
"ResearchWorker": "type 5b69df6c9975",
"ResolvedKnowledgeImprovementCandidate": "type 60be04dfb75d",
"ResolvedKnowledgeImprovementComparison": "type 2d4520e11c17",
"ResolvedKnowledgeImprovementComparisonSnapshot": "type 09ca4bdc3f81",
Expand Down Expand Up @@ -457,9 +433,6 @@
"RetrievalScenarioPartitions": "type a8a61ddef80a",
"RetrievedKnowledgeHit": "type 9dfb968780ec",
"RetrievedSourceSpan": "type d421429a842f",
"RouterClient": "type 0e152cea3cc2",
"RouterError": "value c1a8d51a094e",
"RouterUsage": "type 65c8360220a5",
"RunAgentMemoryExperimentOptions": "type ea599b678ed8",
"RunAgentMemoryExperimentResult": "type 4c59c13e22c2",
"RunAgentMemoryImprovementOptions": "type d4fc3b183ac9",
Expand Down Expand Up @@ -497,31 +470,16 @@
"SourceRecord": "type b525cb8c09ee",
"SourceRecordSchema": "value 373728f5643d",
"SourceRegistry": "type 062b92354d23",
"SourceVerdict": "type bb58bf97fe54",
"SourceVerificationContext": "type bfe4dde94e67",
"StateSosEntity": "type 4ecdc780ae4d",
"StateSosSourceConfig": "type 3a2d0b61a718",
"TangleRouterOptions": "type 36f56817baa8",
"ThesisRunOptions": "type 84ede3dc0190",
"ThesisRunResult": "type 24e8289fb585",
"ThesisTaskInput": "type 79a0ee86f1c6",
"TrackedClaim": "type 823ab1f0941e",
"TriageClass": "type 684366d72b8e",
"UncheckableClaimError": "value 86a15815c4f1",
"UseKnowledgeImprovementCandidateOptions": "type 848b0e83e03f",
"ValidateKnowledgeOptions": "type 75186f551139",
"ValidateKnowledgeResult": "type 85becbbaf24d",
"VerifiedGradeableEvidence": "type 68ecc1af89b5",
"VerifiedResearchLoopOptions": "type f879fa4412f4",
"VerifiedResearchLoopResult": "type d9e27e0d871b",
"VerifiedResearchRound": "type c0f34b185f68",
"VerifyGradeableEvidenceOptions": "type 01ef698f9b40",
"VerifyingDriverOptions": "type eddd766acc7c",
"WIKILINK_REGEX": "value 373728f5643d",
"WebResearchWorkerOptions": "type c26a8fa43a47",
"WebSearchHit": "type 2c6fc9b2fb25",
"WorkerClaimDecorationOptions": "type a3db98314057",
"WorkerResearchContext": "type 1db692fde00a",
"__resetHttpThrottle": "value e47f3b6734a6",
"acquireAgentMemoryRunLease": "value 7d23f0e042cc",
"addSourcePath": "value 9dabb587c73c",
Expand Down Expand Up @@ -563,21 +521,13 @@
"calibrateRagAnswerJudge": "value 74f91dafd1b1",
"canonicalPathsEqual": "value 1a1d22b3b1c3",
"canonicalRelativeWithinRoot": "value 9a5ffa3946f3",
"canonicalizeUrl": "value a8a18cde9fcc",
"chunkMarkdown": "value 3f930d4ba32f",
"citedClaimKey": "value 810f529bf94c",
"citedClaimOf": "value 1b37f8f9af86",
"claimCheckKey": "value f7b71c731a17",
"claimEvidenceId": "value 10ea894124db",
"claimId": "value 4c9eca896a37",
"claimSourceHost": "value a8a18cde9fcc",
"compareAgentMemoryLearning": "value 80e066a5a265",
"contentKey": "value 4c9eca896a37",
"createAdaptiveResearchDriver": "value 963a73b60a1f",
"createAgentMemoryBranch": "value bae206df8be9",
"createClaimDecorator": "value 0b0ae76ddc8b",
"createClaimGroundingVerifier": "value cd737b122041",
"createCollectionResearchDriver": "value e3f6add71c21",
"createCornellLiiSource": "value 5708478c5b8a",
"createD1FreshnessStoreStub": "value e89ca59074b9",
"createFileRunLineageAuthority": "value 92afeb585f32",
Expand All @@ -599,17 +549,12 @@
"createMemoryExecutionPool": "value 2cee6a42eafb",
"createNeo4jAgentMemoryAdapter": "value 6a86dd3496a1",
"createNoopMemoryBenchmarkAdapter": "value d0ec3fcca863",
"createPersistentResearchDrivingDriver": "value f115035319ee",
"createPlayMemoryTools": "value cbd6422b065c",
"createQmdKnowledgeTools": "value 136b3d258c5c",
"createQmdSearchProvider": "value f1d2a2d4d631",
"createRagAnswerQualityHook": "value 7e18d330e76b",
"createResearchDrivingDriver": "value 34e12fd11a6a",
"createRunScopedStores": "value 6bfc535c7281",
"createStateSosSource": "value e7467eeee69b",
"createTangleRouterClient": "value 539a2d5c07dd",
"createVerifyingResearchDriver": "value e70c80302494",
"createWebResearchWorker": "value 3d1356ac9f3b",
"decodeKnowledgeVisibilitySnapshot": "value 143bc2b124e6",
"deepQuestionId": "value ffec05529ae9",
"defaultGetMemoryContext": "value 6a368eb4ea71",
Expand All @@ -632,8 +577,6 @@
"formatKnowledgeInvalidationProposal": "value 0facdbad3e8e",
"fromAgentCandidateKnowledgeRef": "value 247b544b764e",
"gradeClaims": "value 5a3c1c162258",
"gradeCompanyAgainstText": "value 7470a3d96d31",
"gradeFactAgainstText": "value 9818c38e4ce2",
"gradeFor": "value 79db4a5137a3",
"graphitiMemoryAdapterIdentity": "value 203f93807ab2",
"groundClaimInText": "value f74ed9ca26c6",
Expand All @@ -646,7 +589,6 @@
"innerHtmlById": "value f0ffa022d6c0",
"inspectKnowledgeIndex": "value 79b67f7de1cd",
"inspectPendingKnowledgeMutation": "value 38b2e30827bd",
"investmentThesisSet": "value 373728f5643d",
"isKernelAnchoredPath": "value 2819fa14db65",
"isKnowledgeMemoryBenchmarkCase": "value 8634e2c95fec",
"isKnowledgeMutationHeld": "value e8f0de09e802",
Expand All @@ -657,7 +599,6 @@
"isScaffoldPath": "value 2819fa14db65",
"jsonCandidateCodec": "value 6520c69bb348",
"jsonObjectCandidateCodec": "value 8eb601cd6de7",
"kbIndexToText": "value cb17a57bfdaf",
"knowledgeBenchmarkJudge": "value e7c74f6e007a",
"knowledgeCitationAuditFindings": "value 639f15656570",
"knowledgeImprovementCandidateRef": "value 2c85f9c2a1a0",
Expand All @@ -669,7 +610,6 @@
"knowledgeReleaseReport": "value 76d7eebb2957",
"knowledgeVisibilityArtifactRef": "value dfa0672dff59",
"layoutFor": "value a4861d951cf1",
"lensDistribution": "value e6cf3a8f1040",
"linkClaimContradictions": "value cf315a2deab2",
"lintCurrentRunCitations": "value 59004ed0538a",
"lintKnowledgeIndex": "value c866a9cbb418",
Expand All @@ -681,8 +621,6 @@
"loadKnowledgePromotionRecord": "value 65617956865c",
"loadSourceRegistry": "value cae49411bcc5",
"looksLikeBlockPage": "value 371f55d1c1d9",
"materialFactsSurfaced": "value 80d0cc7f1647",
"materialFactsSurfacedInText": "value 0f9382be96a6",
"materializeRegisteredClaimEvidence": "value cf315a2deab2",
"mediaTypeFor": "value a8a18cde9fcc",
"mem0MemoryAdapterIdentity": "value c590a9c1e72f",
Expand Down Expand Up @@ -742,15 +680,13 @@
"runBoundedMemoryLifecycle": "value 75f3e3b274a0",
"runDiscoveryLoop": "value addb8a464a58",
"runInKnowledgeMutationScope": "value 83a5698000d7",
"runInvestmentThesisTask": "value 2eac673e45ab",
"runKnowledgeBenchmarkSuite": "value ce72ffe18eef",
"runKnowledgeResearchLoop": "value 4d00a0a2e19d",
"runMemoryAdapterBenchmark": "value e783141bcd1d",
"runRagKnowledgeImprovementLoop": "value c943e69b947e",
"runRagOptimization": "value 9493b6dd6742",
"runRetrievalImprovementLoop": "value d1f8efdb025d",
"runSerializedKnowledgeOptimization": "value 8571ad4d22bd",
"runVerifiedResearchLoop": "value 16ec2882b9ce",
"scenarioContentFingerprint": "value c6788a57974b",
"scoreBm25": "value 42139506975a",
"scoreKnowledgeBaseIndex": "value c16e27e90d97",
Expand All @@ -764,15 +700,13 @@
"sleepForMemoryRecovery": "value 4a6818f984e4",
"slugify": "value 8b2ddb657a6c",
"snapshotSourceTextInput": "value 853c0b94fd4b",
"sourceMatchesGaps": "value be42d9fa537e",
"sourceRegistryPath": "value 5fe2ec842844",
"stableId": "value a7bc5069602e",
"stripFrontmatter": "value 335a29d6a1cd",
"summarizeKnowledgeBenchmarkCampaign": "value 681c7995df88",
"syncDirectory": "value 6218521600a7",
"textSourceAdapter": "value 373728f5643d",
"textSourceId": "value 3ea77a7de22d",
"thesisReadinessSpecs": "value da64bfb4d878",
"toAgentCandidateKnowledgeRef": "value 6b07b25e59e9",
"toDeepEvalTestCases": "value 18e7b27cf433",
"toOffPolicyTrajectory": "value 934dec24305c",
Expand All @@ -781,8 +715,6 @@
"toTruLensRecords": "value d46aa76e3ee3",
"tokenizeQuery": "value 86241b60c1a4",
"tokenizeText": "value 1370ca50219c",
"totalMaterialFacts": "value 47ef736007c5",
"triageSource": "value 1aad35658ea4",
"validateKnowledgeIndex": "value 1325e74dea5e",
"verdictFor": "value deb848cf5c44",
"verifyGradeableEvidence": "value 46baf5f38063",
Expand All @@ -791,7 +723,6 @@
"verifyKnowledgeUseReceipt": "value 13e38b6c70c9",
"verifyKnowledgeVisibilitySnapshot": "value cc5c6db30910",
"walk": "value 5035737ef563",
"withCitedClaim": "value 480a57a11853",
"withKnowledgeImprovementCandidate": "value 1807f0708eaa",
"withKnowledgeImprovementComparison": "value 209ea121fc27",
"withKnowledgeMutation": "value 499371d01638",
Expand Down
9 changes: 2 additions & 7 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,10 @@ They reach it through `mergeClaimLedger(id, merge)`, which holds the mutation lo
The combining rule is `mergeClaimLedgers`: support and contradiction edges union, `contested` and `addressed` latch on, `firstSeenRound` moves earlier, and every collection is sorted.
The merge is commutative, associative, and idempotent, so the bytes on disk depend on the evidence rather than on scheduling.
Ledgers for two different goals refuse to merge (`ClaimLedgerGoalConflictError`) rather than pooling unrelated evidence into one corroboration count.
The live driver exposes the published Set-based `TrackedClaim`; the ledger stores a separate `ResearchClaimRecord` with sorted arrays so JSON serialization cannot erase those sets.
Source verification snapshots the proposal and persists a `ResearchClaimEvidence` observation containing the expected registry id, original URI, and full content hash; that observation cannot affect claim support or completion by itself.
After the exact submitted bytes are durable, `runVerifiedResearchLoop` passes the resulting `SourceRecord` to `commitSources`.
`TrackedClaim` keeps its published `Set` fields; the ledger stores a separate `ResearchClaimRecord` with sorted arrays so JSON serialization cannot erase those sets.
A `ResearchClaimEvidence` observation records the expected registry id, original URI, and full content hash; it cannot affect claim support or completion by itself.
The ledger materializes only observations whose complete source identity matches a confirmed record, so reusing one URI for different bytes cannot activate the wrong claims and a crash on either side resumes safely.
Unversioned URI-only ledgers cannot prove which bytes produced their observations; reads and writes fail with `ClaimLedgerMigrationRequiredError` and preserve the original file for an explicit archive-and-reverify migration.
Before synchronous question generation, the persistent driver records `preparedRounds`; a resume reconstructs and checkpoints any prepared round whose questions were interrupted, and the loop publishes its `research.iteration` event only after that checkpoint succeeds.
The research loop requires storage readiness and the driver's optional `isComplete()` result before it reports completion.
An unfinished driver can generate steering with no remaining storage gaps, so passing source requirements does not stop research prematurely.
Drivers without `isComplete()` use storage readiness alone.
Without readiness specifications, the loop runs to its round limit and never reports ready.

Every write in this layer goes through `durable-fs` (`writeFileDurable`, `writeJsonDurableWithinRoot`): temp file, fsync, atomic rename, and parent fsync.
Expand Down
2 changes: 2 additions & 0 deletions docs/eval/investment-material-facts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Held-out investment-research eval set: material facts + provenance

> Historical record. The investment-thesis set and task were removed in Knowledge 20.0.0; see commit bc2abe0cee1047350a27af37200b94b6801d1f6b for the code.

This is the answer key and the provenance ledger for `tests/eval/investment-thesis-set.ts`.

**What the set measures.** Give a research loop a company + ticker + an as-of
Expand Down
Loading