@tangle-network/agent-knowledge 22.0.13 → 22.0.18
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 +3 -0
- package/CHANGELOG.md +20 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -2
- package/dist/{benchmarks-jir3ZP-M.js → benchmarks-BMDc-9V-.js} +3 -4
- package/dist/{benchmarks-jir3ZP-M.js.map → benchmarks-BMDc-9V-.js.map} +1 -1
- package/dist/cli.js +3 -4
- package/dist/{ids-Bevz_pXV.js → ids-C-Z2Uv4c.js} +2 -3
- package/dist/{ids-Bevz_pXV.js.map → ids-C-Z2Uv4c.js.map} +1 -1
- package/dist/{index-BhvSH4E4.d.ts → index-B2s20NlV.d.ts} +3 -25
- package/dist/index-B2s20NlV.d.ts.map +1 -0
- package/dist/{index-OAxtm6is.d.ts → index-CRg_7-ND.d.ts} +2 -4
- package/dist/index-CRg_7-ND.d.ts.map +1 -0
- package/dist/index.d.ts +5 -123
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -84
- package/dist/index.js.map +1 -1
- package/dist/{inspect-rXk5_r3K.js → inspect-tl0P7I7w.js} +33 -63
- package/dist/{inspect-rXk5_r3K.js.map → inspect-tl0P7I7w.js.map} +1 -1
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{memory-BH6oT1Qe.js → memory-krApkeRS.js} +15 -27
- package/dist/{memory-BH6oT1Qe.js.map → memory-krApkeRS.js.map} +1 -1
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +1 -2
- package/dist/{search-aZdP2685.js → search-BSGm7yxu.js} +4 -7
- package/dist/{search-aZdP2685.js.map → search-BSGm7yxu.js.map} +1 -1
- package/dist/{search-Dde0PEtY.d.ts → search-SPdjnQUo.d.ts} +2 -6
- package/dist/search-SPdjnQUo.d.ts.map +1 -0
- package/dist/{source-record-CdWvzvO6.js → source-record-9ZPRR1P9.js} +3 -4
- package/dist/{source-record-CdWvzvO6.js.map → source-record-9ZPRR1P9.js.map} +1 -1
- package/dist/{types-BekdNwGD.d.ts → types-1kNPDliG.d.ts} +1 -3
- package/dist/types-1kNPDliG.d.ts.map +1 -0
- package/dist/{types-BWV_Fvp7.d.ts → types-CznsaxVo.d.ts} +2 -4
- package/dist/types-CznsaxVo.d.ts.map +1 -0
- package/dist/viz/index.d.ts +1 -3
- package/dist/viz/index.d.ts.map +1 -1
- package/dist/viz/index.js +1 -2
- package/package.json +14 -14
- package/dist/index-BhvSH4E4.d.ts.map +0 -1
- package/dist/index-OAxtm6is.d.ts.map +0 -1
- package/dist/search-Dde0PEtY.d.ts.map +0 -1
- package/dist/types-BWV_Fvp7.d.ts.map +0 -1
- package/dist/types-BekdNwGD.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as loadSourceRegistry, $n as writeFileDurableWithinRoot, $t as KNOWLEDGE_EVENT_TYPES, A as validateKnowledgePage, An as finishKnowledgeFileTransaction, At as isScaffoldPath, B as CHECKABLE_RUNG_THRESHOLD, Bn as canonicalRelativeWithinRoot, Bt as KnowledgeEventSchema, C as immutablePageDigest, Cn as runInKnowledgeMutationScope, Ct as resolveKnowledgeCitation, D as normalizeVisibilityArtifact, Dn as applyKnowledgeFileTransaction, Dt as SCAFFOLD_PAGE_BASENAMES, E as nonEmpty$1, En as withKnowledgeRead, Et as resolveRunScopedCitations, F as detectNearDuplicatePages, Fn as recordLockOwner, Ft as WIKILINK_REGEX, G as gradeClaims, Gn as readRegularFileWithinRoot, Gt as KnowledgePageSchema, H as UncheckableClaimError, Hn as isMissingFile, Ht as KnowledgeGraphNodeSchema, I as normalizePageText, In as takeOverDeadHolder, It as extractWikilinks, J as verifyGradeableEvidence, Jn as renameDurable, Jt as ResearchClaimLedgerSchema, K as gradeFor, Kn as relativeWithinRoot, Kt as KnowledgeRelationSchema, L as prepareKnowledgeValidation, Ln as DEFAULT_PAGES_DIRECTORY, Lt as normalizeLinkTarget, M as verifyKnowledgeVisibilitySnapshot, Mn as prepareKnowledgeFileTransaction, Mt as layoutFor, N as visibilityIdentity, Nn as rollbackKnowledgeFileTransaction, Nt as loadKnowledgePages, O as normalizeVisibilityRef, On as assertKnowledgeMutationPath, Ot as initKnowledgeBase, P as visibilityIndexOf, Pn as RUN_LEASE, Pt as writeJson, Q as addSourceText, Qn as writeFileDurable, Qt as SourceRecordSchema, R as validateKnowledgeIndex, Rn as normalizePagesDirectory, Rt as DeepQuestionSchema, S as encodeKnowledgeVisibilitySnapshot, Sn as recoverPendingKnowledgeMutation, St as parseKnowledgeCitationReference, T as knowledgeVisibilityArtifactRef, Tn as withKnowledgeMutationLabel, Tt as resolveRunScopedCitation, U as assertGradeableEvidence, Un as listRegularFilesWithinRoot, Ut as KnowledgeIndexSchema, V as DEADLINE_EXIT_CODE, Vn as isKernelAnchoredPath, Vt as KnowledgeGraphEdgeSchema, W as claimCheckKey, Wn as readRegularFileNoFollow, Wt as KnowledgePageInvalidationSchema, X as writeKnowledgeIndex, Xn as withSafeDescendant, Xt as ResearchSourceVersionSchema, Y as buildKnowledgeIndex, Yn as syncDirectory, Yt as ResearchClaimRecordSchema, Z as addSourcePath, Zn as withSafeDirectory, Zt as SourceAnchorSchema, _ as KNOWLEDGE_USE_RECEIPT_SCHEMA_VERSION, _n as parseFrontmatter, _t as assertKnowledgeCitationsResolved, a as applyKnowledgeWriteBlocksFile, an as claimEvidenceId, at as KB_CLAIM_LEDGER_DIR, b as decodeKnowledgeVisibilitySnapshot, bn as isKnowledgeMutationHeld, bt as auditKnowledgeCitations, c as KnowledgeDuplicateIntakeError, cn as deepQuestionId, ct as KB_STORE_DIR, d as createFileRunLineageAuthority, dn as materializeRegisteredClaimEvidence, dt as buildKnowledgeGraph, en as ClaimLedgerGoalConflictError, er as writeJsonDurable, et as snapshotSourceTextInput, f as createRunScopedStores, fn as mergeClaimLedgers, ft as knowledgePageRelations, g as KNOWLEDGE_RECEIPT_DIGEST_ALGORITHM, gn as formatFrontmatter, gt as assertKnowledgeCitationAudit, h as originatedPages, hn as researchSourceVersionKey, ht as assertCurrentRunCitationsResolved, i as applyKnowledgeWriteBlocks, in as assertTrackedClaimIntegrity, it as FileSystemKbStore, j as validateOrigin, jn as knowledgeFileTransactionPlanHash, jt as knowledgePageFromMarkdown, k as snapshotImmutableVisibility, kn as commitKnowledgeFileMutations, kt as isKnowledgePagePath, l as assertKnowledgeWriteIntake, ln as emptyClaimLedger, lt as MemoryKbStore, m as loadKnowledgeToolChain, mn as normalizeClaimText, mt as KnowledgeCitationResolutionError, n as inspectKnowledgeIndex, nn as assertResearchClaimEvidenceIntegrity, nr as mediaTypeFor, nt as writeSourceRegistry, o as isSafeKnowledgePath, on as claimId, ot as KB_EVENTS_PATH, p as isKnowledgeToolChain, pn as mergeTrackedClaims, pt as KnowledgeCitationAuditError, q as verdictFor, qn as removeDurable, qt as ResearchClaimEvidenceSchema, r as stringMetadata, rn as assertResearchClaimLedgerIntegrity, rr as textSourceAdapter, rt as ClaimLedgerMigrationRequiredError, s as parseKnowledgeWriteBlocks, sn as claimSourceHost, st as KB_INDEX_PATH, t as explainKnowledgeTarget, tn as assertDeepQuestionIntegrity, tr as writeJsonDurableWithinRoot, tt as sourceRegistryPath, u as RUN_LINEAGE_BASENAME, un as linkClaimContradictions, ut as assertClaimLedgerId, v as assertSchemaVersion, vn as acquireDurableFileLock, vt as assertRunScopedCitationsResolved, w as knowledgePageDigest, wn as withKnowledgeMutation, wt as resolveKnowledgeCitations, x as digest, xn as measureKnowledgeMutation, xt as formatKnowledgeCitationReference, y as createKnowledgeVisibilitySnapshot, yn as inspectPendingKnowledgeMutation, yt as auditCurrentRunCitations, z as lintKnowledgeIndex, zn as canonicalPathsEqual, zt as KnowledgeBaseCandidateSchema } from "./inspect-
|
|
2
|
-
import { i as textSourceId, n as slugify, r as stableId, t as sha256 } from "./ids-
|
|
3
|
-
import { a as buildKnowledgeLexicalIndex, c as tokenizeText, d as lexicalPageTerms, i as searchKnowledgePages, l as DEFAULT_FIELD_BOOSTS, n as reciprocalRankFusion, o as scoreBm25, r as searchKnowledge, s as tokenizeQuery, t as KNOWLEDGE_SEARCH_RETRIEVER_ID, u as assembleLexicalIndex } from "./search-
|
|
4
|
-
import { n as memoryWriteResultToSourceRecord, t as memoryHitToSourceRecord } from "./source-record-
|
|
5
|
-
import { n as createNoopMemoryBenchmarkAdapter, t as createInMemoryBenchmarkAdapter } from "./benchmarks-
|
|
6
|
-
import { A as resetRetrievalHoldoutRegistry, C as forkAgentMemoryBranchSnapshot, D as applySessionStickyRetrievalHoldout, E as applyRetrievalHoldout, M as toOffPolicyTrajectory, O as deterministicRng, S as createAgentMemoryBranch, T as renderMemoryContext, _ as resolveMemoryCleanupTimeoutMs, a as HindsightOperationUnknownError, b as createGraphitiMemoryAdapter, c as AgentMemoryHitSchema, d as AgentMemoryWriteInputSchema, f as AgentMemoryLifecycleTimeoutError, g as memoryRecoveryDelayMs, h as createMemoryExecutionPool, i as mem0MemoryAdapterIdentity, j as retrievalHoldoutConfigHash, k as emitRetrievalHoldoutBypass, l as AgentMemoryKindSchema, m as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, n as createNeo4jAgentMemoryAdapter, o as createHindsightMemoryAdapter, p as AgentMemoryLifecycleUnsafeError, r as createMem0MemoryAdapter, s as hindsightMemoryBankId, t as createPlayMemoryTools, u as AgentMemoryScopeSchema, v as runBoundedMemoryLifecycle, w as defaultGetMemoryContext, x as graphitiMemoryAdapterIdentity, y as sleepForMemoryRecovery } from "./memory-
|
|
1
|
+
import { $ as loadSourceRegistry, $n as writeFileDurableWithinRoot, $t as KNOWLEDGE_EVENT_TYPES, A as validateKnowledgePage, An as finishKnowledgeFileTransaction, At as isScaffoldPath, B as CHECKABLE_RUNG_THRESHOLD, Bn as canonicalRelativeWithinRoot, Bt as KnowledgeEventSchema, C as immutablePageDigest, Cn as runInKnowledgeMutationScope, Ct as resolveKnowledgeCitation, D as normalizeVisibilityArtifact, Dn as applyKnowledgeFileTransaction, Dt as SCAFFOLD_PAGE_BASENAMES, E as nonEmpty$1, En as withKnowledgeRead, Et as resolveRunScopedCitations, F as detectNearDuplicatePages, Fn as recordLockOwner, Ft as WIKILINK_REGEX, G as gradeClaims, Gn as readRegularFileWithinRoot, Gt as KnowledgePageSchema, H as UncheckableClaimError, Hn as isMissingFile, Ht as KnowledgeGraphNodeSchema, I as normalizePageText, In as takeOverDeadHolder, It as extractWikilinks, J as verifyGradeableEvidence, Jn as renameDurable, Jt as ResearchClaimLedgerSchema, K as gradeFor, Kn as relativeWithinRoot, Kt as KnowledgeRelationSchema, L as prepareKnowledgeValidation, Ln as DEFAULT_PAGES_DIRECTORY, Lt as normalizeLinkTarget, M as verifyKnowledgeVisibilitySnapshot, Mn as prepareKnowledgeFileTransaction, Mt as layoutFor, N as visibilityIdentity, Nn as rollbackKnowledgeFileTransaction, Nt as loadKnowledgePages, O as normalizeVisibilityRef, On as assertKnowledgeMutationPath, Ot as initKnowledgeBase, P as visibilityIndexOf, Pn as RUN_LEASE, Pt as writeJson, Q as addSourceText, Qn as writeFileDurable, Qt as SourceRecordSchema, R as validateKnowledgeIndex, Rn as normalizePagesDirectory, Rt as DeepQuestionSchema, S as encodeKnowledgeVisibilitySnapshot, Sn as recoverPendingKnowledgeMutation, St as parseKnowledgeCitationReference, T as knowledgeVisibilityArtifactRef, Tn as withKnowledgeMutationLabel, Tt as resolveRunScopedCitation, U as assertGradeableEvidence, Un as listRegularFilesWithinRoot, Ut as KnowledgeIndexSchema, V as DEADLINE_EXIT_CODE, Vn as isKernelAnchoredPath, Vt as KnowledgeGraphEdgeSchema, W as claimCheckKey, Wn as readRegularFileNoFollow, Wt as KnowledgePageInvalidationSchema, X as writeKnowledgeIndex, Xn as withSafeDescendant, Xt as ResearchSourceVersionSchema, Y as buildKnowledgeIndex, Yn as syncDirectory, Yt as ResearchClaimRecordSchema, Z as addSourcePath, Zn as withSafeDirectory, Zt as SourceAnchorSchema, _ as KNOWLEDGE_USE_RECEIPT_SCHEMA_VERSION, _n as parseFrontmatter, _t as assertKnowledgeCitationsResolved, a as applyKnowledgeWriteBlocksFile, an as claimEvidenceId, at as KB_CLAIM_LEDGER_DIR, b as decodeKnowledgeVisibilitySnapshot, bn as isKnowledgeMutationHeld, bt as auditKnowledgeCitations, c as KnowledgeDuplicateIntakeError, cn as deepQuestionId, ct as KB_STORE_DIR, d as createFileRunLineageAuthority, dn as materializeRegisteredClaimEvidence, dt as buildKnowledgeGraph, en as ClaimLedgerGoalConflictError, er as writeJsonDurable, et as snapshotSourceTextInput, f as createRunScopedStores, fn as mergeClaimLedgers, ft as knowledgePageRelations, g as KNOWLEDGE_RECEIPT_DIGEST_ALGORITHM, gn as formatFrontmatter, gt as assertKnowledgeCitationAudit, h as originatedPages, hn as researchSourceVersionKey, ht as assertCurrentRunCitationsResolved, i as applyKnowledgeWriteBlocks, in as assertTrackedClaimIntegrity, it as FileSystemKbStore, j as validateOrigin, jn as knowledgeFileTransactionPlanHash, jt as knowledgePageFromMarkdown, k as snapshotImmutableVisibility, kn as commitKnowledgeFileMutations, kt as isKnowledgePagePath, l as assertKnowledgeWriteIntake, ln as emptyClaimLedger, lt as MemoryKbStore, m as loadKnowledgeToolChain, mn as normalizeClaimText, mt as KnowledgeCitationResolutionError, n as inspectKnowledgeIndex, nn as assertResearchClaimEvidenceIntegrity, nr as mediaTypeFor, nt as writeSourceRegistry, o as isSafeKnowledgePath, on as claimId, ot as KB_EVENTS_PATH, p as isKnowledgeToolChain, pn as mergeTrackedClaims, pt as KnowledgeCitationAuditError, q as verdictFor, qn as removeDurable, qt as ResearchClaimEvidenceSchema, r as stringMetadata, rn as assertResearchClaimLedgerIntegrity, rr as textSourceAdapter, rt as ClaimLedgerMigrationRequiredError, s as parseKnowledgeWriteBlocks, sn as claimSourceHost, st as KB_INDEX_PATH, t as explainKnowledgeTarget, tn as assertDeepQuestionIntegrity, tr as writeJsonDurableWithinRoot, tt as sourceRegistryPath, u as RUN_LINEAGE_BASENAME, un as linkClaimContradictions, ut as assertClaimLedgerId, v as assertSchemaVersion, vn as acquireDurableFileLock, vt as assertRunScopedCitationsResolved, w as knowledgePageDigest, wn as withKnowledgeMutation, wt as resolveKnowledgeCitations, x as digest, xn as measureKnowledgeMutation, xt as formatKnowledgeCitationReference, y as createKnowledgeVisibilitySnapshot, yn as inspectPendingKnowledgeMutation, yt as auditCurrentRunCitations, z as lintKnowledgeIndex, zn as canonicalPathsEqual, zt as KnowledgeBaseCandidateSchema } from "./inspect-tl0P7I7w.js";
|
|
2
|
+
import { i as textSourceId, n as slugify, r as stableId, t as sha256 } from "./ids-C-Z2Uv4c.js";
|
|
3
|
+
import { a as buildKnowledgeLexicalIndex, c as tokenizeText, d as lexicalPageTerms, i as searchKnowledgePages, l as DEFAULT_FIELD_BOOSTS, n as reciprocalRankFusion, o as scoreBm25, r as searchKnowledge, s as tokenizeQuery, t as KNOWLEDGE_SEARCH_RETRIEVER_ID, u as assembleLexicalIndex } from "./search-BSGm7yxu.js";
|
|
4
|
+
import { n as memoryWriteResultToSourceRecord, t as memoryHitToSourceRecord } from "./source-record-9ZPRR1P9.js";
|
|
5
|
+
import { n as createNoopMemoryBenchmarkAdapter, t as createInMemoryBenchmarkAdapter } from "./benchmarks-BMDc-9V-.js";
|
|
6
|
+
import { A as resetRetrievalHoldoutRegistry, C as forkAgentMemoryBranchSnapshot, D as applySessionStickyRetrievalHoldout, E as applyRetrievalHoldout, M as toOffPolicyTrajectory, O as deterministicRng, S as createAgentMemoryBranch, T as renderMemoryContext, _ as resolveMemoryCleanupTimeoutMs, a as HindsightOperationUnknownError, b as createGraphitiMemoryAdapter, c as AgentMemoryHitSchema, d as AgentMemoryWriteInputSchema, f as AgentMemoryLifecycleTimeoutError, g as memoryRecoveryDelayMs, h as createMemoryExecutionPool, i as mem0MemoryAdapterIdentity, j as retrievalHoldoutConfigHash, k as emitRetrievalHoldoutBypass, l as AgentMemoryKindSchema, m as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, n as createNeo4jAgentMemoryAdapter, o as createHindsightMemoryAdapter, p as AgentMemoryLifecycleUnsafeError, r as createMem0MemoryAdapter, s as hindsightMemoryBankId, t as createPlayMemoryTools, u as AgentMemoryScopeSchema, v as runBoundedMemoryLifecycle, w as defaultGetMemoryContext, x as graphitiMemoryAdapterIdentity, y as sleepForMemoryRecovery } from "./memory-krApkeRS.js";
|
|
7
7
|
import { agentImprovementActivationResultSchema, agentImprovementActivationSchema, canonicalCandidateDigest, omitTopLevelDigest, sha256Bytes, sha256DigestSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, canonicalJson, contentHash, evaluateReleaseConfidence, objectiveEval, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps, validateRunRecord } from "@tangle-network/agent-eval";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -14,7 +14,7 @@ import { tmpdir } from "node:os";
|
|
|
14
14
|
import { compareOptimizationMethods, surfaceHash } from "@tangle-network/agent-eval/campaign";
|
|
15
15
|
import { isDeepStrictEqual } from "node:util";
|
|
16
16
|
import { pathToFileURL } from "node:url";
|
|
17
|
-
|
|
17
|
+
// src/knowledge-state-scope.ts
|
|
18
18
|
const knowledgeStateScopeSchema = z.object({
|
|
19
19
|
pagesDirectory: z.string().transform((value) => normalizePagesDirectory(value)).optional(),
|
|
20
20
|
researchState: z.boolean().optional()
|
|
@@ -31,8 +31,7 @@ const KNOWLEDGE_RESEARCH_STATE_PATHS = [
|
|
|
31
31
|
".agent-knowledge/events.json",
|
|
32
32
|
".agent-knowledge/event-log"
|
|
33
33
|
];
|
|
34
|
-
|
|
35
|
-
//#region src/kb-improvement/contracts.ts
|
|
34
|
+
// src/kb-improvement/contracts.ts
|
|
36
35
|
const digestSchema = z.string().regex(/^[a-f0-9]{64}$/);
|
|
37
36
|
const immutableRefSchema = z.string().regex(/^(?:sha256:[a-f0-9]{64}|git:[a-f0-9]{40})$/);
|
|
38
37
|
const runIdSchema = z.string().min(1).max(2048);
|
|
@@ -240,8 +239,7 @@ const EVALUATION_PHASES = [
|
|
|
240
239
|
"answer-quality",
|
|
241
240
|
"promotion"
|
|
242
241
|
];
|
|
243
|
-
|
|
244
|
-
//#region src/kb-improvement/state.ts
|
|
242
|
+
// src/kb-improvement/state.ts
|
|
245
243
|
function knowledgeImprovementRunId(root, goal) {
|
|
246
244
|
return stableId("kimpr", `${root}:${goal}`);
|
|
247
245
|
}
|
|
@@ -383,8 +381,7 @@ function candidateEvidenceRelativePath(candidateId) {
|
|
|
383
381
|
function assertExactCandidatePlatform() {
|
|
384
382
|
if (process.platform !== "linux") throw new Error("exact knowledge candidate workflows require Linux directory descriptors");
|
|
385
383
|
}
|
|
386
|
-
|
|
387
|
-
//#region src/kb-improvement/activation.ts
|
|
384
|
+
// src/kb-improvement/activation.ts
|
|
388
385
|
/** Load the durable result for one exact activation without changing knowledge or run state. */
|
|
389
386
|
async function loadKnowledgeImprovementActivationResult(options) {
|
|
390
387
|
assertExactCandidatePlatform();
|
|
@@ -496,15 +493,13 @@ function immutableJsonValue(value) {
|
|
|
496
493
|
for (const child of Object.values(value)) immutableJsonValue(child);
|
|
497
494
|
return Object.freeze(value);
|
|
498
495
|
}
|
|
499
|
-
|
|
500
|
-
//#region src/immutable-ref.ts
|
|
496
|
+
// src/immutable-ref.ts
|
|
501
497
|
const SHA256_REF = /^sha256:[a-f0-9]{64}$/;
|
|
502
498
|
const GIT_REF = /^git:[a-f0-9]{40}$/;
|
|
503
499
|
function assertImmutableRef(value, label) {
|
|
504
500
|
if (typeof value !== "string" || !SHA256_REF.test(value) && !GIT_REF.test(value)) throw new Error(`${label} must be lowercase sha256:<64 hex> or git:<40 hex>`);
|
|
505
501
|
}
|
|
506
|
-
|
|
507
|
-
//#region src/rag-answer-evidence.ts
|
|
502
|
+
// src/rag-answer-evidence.ts
|
|
508
503
|
function assertRagAnswerEvidence(result) {
|
|
509
504
|
if (!result || typeof result !== "object") throw new Error("answer-quality evidence must be an object");
|
|
510
505
|
if (typeof result.passed !== "boolean") throw new Error("answer-quality evidence requires a boolean passed verdict");
|
|
@@ -530,8 +525,7 @@ function exceedsCostCeiling$1(totalCostUsd, costCeiling) {
|
|
|
530
525
|
const tolerance = Number.EPSILON * Math.max(1, Math.abs(totalCostUsd), Math.abs(costCeiling)) * 8;
|
|
531
526
|
return totalCostUsd - costCeiling > tolerance;
|
|
532
527
|
}
|
|
533
|
-
|
|
534
|
-
//#region src/optimization.ts
|
|
528
|
+
// src/optimization.ts
|
|
535
529
|
/**
|
|
536
530
|
* Runs one complete agent-eval method over a serialized knowledge candidate.
|
|
537
531
|
* The method receives train and selection data; agent-eval owns final scoring.
|
|
@@ -695,8 +689,7 @@ function assertPartitionContent(train, selection, final, fingerprint) {
|
|
|
695
689
|
});
|
|
696
690
|
}
|
|
697
691
|
}
|
|
698
|
-
|
|
699
|
-
//#region src/rag-eval/knowledge-base.ts
|
|
692
|
+
// src/rag-eval/knowledge-base.ts
|
|
700
693
|
function scoreKnowledgeBaseIndex(index, options = {}) {
|
|
701
694
|
return scoreValidatedKnowledgeBaseIndex(index, options, validateKnowledgeIndex(index, options));
|
|
702
695
|
}
|
|
@@ -792,8 +785,7 @@ function unitInterval(value, name) {
|
|
|
792
785
|
if (!Number.isFinite(value) || value < 0 || value > 1) throw new Error(`${name} must be a finite number in [0, 1]`);
|
|
793
786
|
return value;
|
|
794
787
|
}
|
|
795
|
-
|
|
796
|
-
//#region src/claim-grounding.ts
|
|
788
|
+
// src/claim-grounding.ts
|
|
797
789
|
/**
|
|
798
790
|
* Stopwords stripped before overlap scoring so the bar measures the claim's
|
|
799
791
|
* SUBSTANTIVE words (the numbers, nouns, methods it asserts), not filler a
|
|
@@ -920,8 +912,7 @@ function groundClaimInText(claim, pageText, options = {}) {
|
|
|
920
912
|
missingWords
|
|
921
913
|
};
|
|
922
914
|
}
|
|
923
|
-
|
|
924
|
-
//#region src/statistics.ts
|
|
915
|
+
// src/statistics.ts
|
|
925
916
|
/**
|
|
926
917
|
* The mean of a set of measurements.
|
|
927
918
|
*
|
|
@@ -942,8 +933,7 @@ function mean(values) {
|
|
|
942
933
|
if (finite.length === 0) return 0;
|
|
943
934
|
return finite.reduce((sum, value) => sum + value, 0) / finite.length;
|
|
944
935
|
}
|
|
945
|
-
|
|
946
|
-
//#region src/rag-eval/answer.ts
|
|
936
|
+
// src/rag-eval/answer.ts
|
|
947
937
|
function requiredContextTargets(scenario) {
|
|
948
938
|
if (scenario.requiredContext?.length) return [...scenario.requiredContext];
|
|
949
939
|
return (scenario.expectedClaims ?? []).map((text) => ({ text }));
|
|
@@ -1137,8 +1127,7 @@ const stopwords = /* @__PURE__ */ new Set([
|
|
|
1137
1127
|
"why",
|
|
1138
1128
|
"how"
|
|
1139
1129
|
]);
|
|
1140
|
-
|
|
1141
|
-
//#region src/rag-eval/providers.ts
|
|
1130
|
+
// src/rag-eval/providers.ts
|
|
1142
1131
|
const metricAliases = {
|
|
1143
1132
|
answer_correctness: "answer_correctness",
|
|
1144
1133
|
answer_relevance: "answer_relevance",
|
|
@@ -1215,8 +1204,7 @@ function toRagCheckerRecords(cases) {
|
|
|
1215
1204
|
function normalizeMetricName(metric) {
|
|
1216
1205
|
return metric.trim().toLowerCase().replace(/[@/.-]+/g, "_").replace(/\s+/g, "_");
|
|
1217
1206
|
}
|
|
1218
|
-
|
|
1219
|
-
//#region src/rag-eval/scoring.ts
|
|
1207
|
+
// src/rag-eval/scoring.ts
|
|
1220
1208
|
const defaultThresholds = {
|
|
1221
1209
|
context_precision: .5,
|
|
1222
1210
|
context_recall: .8,
|
|
@@ -1410,8 +1398,7 @@ function weightedComposite(metrics, weights) {
|
|
|
1410
1398
|
function below(metric, threshold) {
|
|
1411
1399
|
return threshold !== void 0 && metric < threshold;
|
|
1412
1400
|
}
|
|
1413
|
-
|
|
1414
|
-
//#region src/rag-optimization.ts
|
|
1401
|
+
// src/rag-optimization.ts
|
|
1415
1402
|
/** Optimizes retrieval and answer behavior together as one serialized RAG configuration. */
|
|
1416
1403
|
async function runRagOptimization(options) {
|
|
1417
1404
|
const { baseline, method, trainScenarios, selectionScenarios, finalScenarios, run, judges, ...runOptions } = options;
|
|
@@ -1442,8 +1429,7 @@ async function runRagOptimization(options) {
|
|
|
1442
1429
|
finalScenarios: [...finalScenarios]
|
|
1443
1430
|
};
|
|
1444
1431
|
}
|
|
1445
|
-
|
|
1446
|
-
//#region src/events.ts
|
|
1432
|
+
// src/events.ts
|
|
1447
1433
|
function createKnowledgeEvent(input) {
|
|
1448
1434
|
const createdAt = (input.now ?? (() => /* @__PURE__ */ new Date()))().toISOString();
|
|
1449
1435
|
return {
|
|
@@ -1455,8 +1441,7 @@ function createKnowledgeEvent(input) {
|
|
|
1455
1441
|
...input.metadata === void 0 ? {} : { metadata: input.metadata }
|
|
1456
1442
|
};
|
|
1457
1443
|
}
|
|
1458
|
-
|
|
1459
|
-
//#region src/eval-readiness.ts
|
|
1444
|
+
// src/eval-readiness.ts
|
|
1460
1445
|
/**
|
|
1461
1446
|
* Defaults applied by `defineReadinessSpec` when the caller omits the field.
|
|
1462
1447
|
*
|
|
@@ -1620,8 +1605,7 @@ function unique(items) {
|
|
|
1620
1605
|
function round(value) {
|
|
1621
1606
|
return Math.round(value * 1e3) / 1e3;
|
|
1622
1607
|
}
|
|
1623
|
-
|
|
1624
|
-
//#region src/readiness-helpers.ts
|
|
1608
|
+
// src/readiness-helpers.ts
|
|
1625
1609
|
/**
|
|
1626
1610
|
* Build the readiness bundle for a loop run over the given index, or
|
|
1627
1611
|
* `undefined` when no readiness specs are configured (no gate to report).
|
|
@@ -1650,8 +1634,7 @@ function assessKnowledgeIndex(options, index) {
|
|
|
1650
1634
|
kbQuality: scoreValidatedKnowledgeBaseIndex(index, qualityOptions, Boolean(qualityOptions.strict) === Boolean(options.strict) ? validation : prepared.validate(qualityOptions))
|
|
1651
1635
|
};
|
|
1652
1636
|
}
|
|
1653
|
-
|
|
1654
|
-
//#region src/research-loop.ts
|
|
1637
|
+
// src/research-loop.ts
|
|
1655
1638
|
/**
|
|
1656
1639
|
* Adapter for running knowledge growth through `agent-eval`'s generic control
|
|
1657
1640
|
* runtime. The caller still owns `decide`: that can be a proposer agent,
|
|
@@ -1793,8 +1776,7 @@ async function observeKnowledgeResearch(options) {
|
|
|
1793
1776
|
readiness: readinessFor(options, index)
|
|
1794
1777
|
};
|
|
1795
1778
|
}
|
|
1796
|
-
|
|
1797
|
-
//#region src/retrieval-eval.ts
|
|
1779
|
+
// src/retrieval-eval.ts
|
|
1798
1780
|
function retrievalConfigSurface(config) {
|
|
1799
1781
|
return canonicalJson(config);
|
|
1800
1782
|
}
|
|
@@ -2018,8 +2000,7 @@ function seededShuffle(items, seed) {
|
|
|
2018
2000
|
}
|
|
2019
2001
|
return out;
|
|
2020
2002
|
}
|
|
2021
|
-
|
|
2022
|
-
//#region src/retrieval-optimization.ts
|
|
2003
|
+
// src/retrieval-optimization.ts
|
|
2023
2004
|
async function runRetrievalImprovementLoop(options) {
|
|
2024
2005
|
const dispatch = buildRetrievalEvalDispatch({
|
|
2025
2006
|
index: options.index,
|
|
@@ -2055,8 +2036,7 @@ function retrievalScenarioFingerprint(scenario) {
|
|
|
2055
2036
|
k: scenario.k ?? null
|
|
2056
2037
|
}));
|
|
2057
2038
|
}
|
|
2058
|
-
|
|
2059
|
-
//#region src/rag-improvement-phases.ts
|
|
2039
|
+
// src/rag-improvement-phases.ts
|
|
2060
2040
|
async function runRagKnowledgeImprovementPhases(options, previous) {
|
|
2061
2041
|
assertConfiguredRequiredPhases(options);
|
|
2062
2042
|
assertOptionalCostCeiling(options.answerQualityCostCeiling, "answerQualityCostCeiling");
|
|
@@ -2283,13 +2263,11 @@ function requiredPhaseMessage(phase) {
|
|
|
2283
2263
|
function assertNotAborted(signal) {
|
|
2284
2264
|
if (signal?.aborted) throw new Error("RAG knowledge improvement loop aborted");
|
|
2285
2265
|
}
|
|
2286
|
-
|
|
2287
|
-
//#region src/rag-improvement-loop.ts
|
|
2266
|
+
// src/rag-improvement-loop.ts
|
|
2288
2267
|
async function runRagKnowledgeImprovementLoop(options) {
|
|
2289
2268
|
return runRagKnowledgeImprovementPhases(options);
|
|
2290
2269
|
}
|
|
2291
|
-
|
|
2292
|
-
//#region src/kb-improvement/workspace.ts
|
|
2270
|
+
// src/kb-improvement/workspace.ts
|
|
2293
2271
|
/** Freeze the exact knowledge bytes and measured evidence a later approval may promote. */
|
|
2294
2272
|
function knowledgeImprovementCandidateRef(result) {
|
|
2295
2273
|
if (!result.candidate) throw new Error("knowledge improvement result has no candidate");
|
|
@@ -2577,8 +2555,7 @@ function knowledgeFileIdentity(path, bytes, mode) {
|
|
|
2577
2555
|
mode
|
|
2578
2556
|
};
|
|
2579
2557
|
}
|
|
2580
|
-
|
|
2581
|
-
//#region src/kb-improvement/transition.ts
|
|
2558
|
+
// src/kb-improvement/transition.ts
|
|
2582
2559
|
/** Promote one previously measured candidate without rerunning research or evaluation. */
|
|
2583
2560
|
async function promoteKnowledgeCandidate(options) {
|
|
2584
2561
|
return transitionKnowledgeCandidate(options, "candidate");
|
|
@@ -2917,8 +2894,7 @@ async function hasCandidateTransitionEvent(runDir, candidateRef, target) {
|
|
|
2917
2894
|
}
|
|
2918
2895
|
return matched;
|
|
2919
2896
|
}
|
|
2920
|
-
|
|
2921
|
-
//#region src/kb-improvement/evaluation.ts
|
|
2897
|
+
// src/kb-improvement/evaluation.ts
|
|
2922
2898
|
function assertKnowledgeImprovementOptions(options) {
|
|
2923
2899
|
assertImmutableRef(options.implementationRef, "knowledge improvement implementationRef");
|
|
2924
2900
|
normalizeKnowledgeStateScope(options.stateScope);
|
|
@@ -3169,8 +3145,7 @@ function applyLifecycleFailures(metric, lifecycle, answerQualityCostCeiling) {
|
|
|
3169
3145
|
function normalizeMetric(metric) {
|
|
3170
3146
|
return improvementMetricSchema.parse(metric);
|
|
3171
3147
|
}
|
|
3172
|
-
|
|
3173
|
-
//#region src/kb-improvement/run.ts
|
|
3148
|
+
// src/kb-improvement/run.ts
|
|
3174
3149
|
async function improveKnowledgeBase(options) {
|
|
3175
3150
|
assertExactCandidatePlatform();
|
|
3176
3151
|
options = {
|
|
@@ -3346,8 +3321,7 @@ async function improveKnowledgeBaseInRun(options, runId, runDir, now) {
|
|
|
3346
3321
|
await lease.release();
|
|
3347
3322
|
}
|
|
3348
3323
|
}
|
|
3349
|
-
|
|
3350
|
-
//#region src/agent-candidate.ts
|
|
3324
|
+
// src/agent-candidate.ts
|
|
3351
3325
|
/** Convert a measured knowledge candidate into the shared review and execution identity. */
|
|
3352
3326
|
function toAgentCandidateKnowledgeRef(candidate) {
|
|
3353
3327
|
const parsed = KnowledgeImprovementCandidateRefSchema.parse(candidate);
|
|
@@ -3377,8 +3351,7 @@ function prefixedDigest(value) {
|
|
|
3377
3351
|
function rawDigest(value) {
|
|
3378
3352
|
return sha256DigestSchema.parse(value).slice(7);
|
|
3379
3353
|
}
|
|
3380
|
-
|
|
3381
|
-
//#region src/chunking.ts
|
|
3354
|
+
// src/chunking.ts
|
|
3382
3355
|
const DEFAULT_OPTIONS = {
|
|
3383
3356
|
targetChars: 1e3,
|
|
3384
3357
|
maxChars: 1500,
|
|
@@ -3529,8 +3502,7 @@ function mergeTinyChunks(chunks, opts) {
|
|
|
3529
3502
|
}
|
|
3530
3503
|
return out;
|
|
3531
3504
|
}
|
|
3532
|
-
|
|
3533
|
-
//#region src/discovery.ts
|
|
3505
|
+
// src/discovery.ts
|
|
3534
3506
|
/**
|
|
3535
3507
|
* Dispatch discovery tasks and recursively pursue worker-proposed follow-ups.
|
|
3536
3508
|
*
|
|
@@ -3644,8 +3616,7 @@ function positiveInteger(value, name) {
|
|
|
3644
3616
|
if (!Number.isInteger(value) || value < 1) throw new Error(`Discovery loop ${name} must be a positive integer`);
|
|
3645
3617
|
return value;
|
|
3646
3618
|
}
|
|
3647
|
-
|
|
3648
|
-
//#region src/filesystem-search-provider.ts
|
|
3619
|
+
// src/filesystem-search-provider.ts
|
|
3649
3620
|
/**
|
|
3650
3621
|
* File-first retrieval over an `agent-knowledge` KB.
|
|
3651
3622
|
*
|
|
@@ -3711,8 +3682,7 @@ function hitFromSearchResult(result) {
|
|
|
3711
3682
|
snippet: result.snippet
|
|
3712
3683
|
};
|
|
3713
3684
|
}
|
|
3714
|
-
|
|
3715
|
-
//#region src/hub-vector-search-provider.ts
|
|
3685
|
+
// src/hub-vector-search-provider.ts
|
|
3716
3686
|
/** A hub exec or upstream-provider failure, carrying the hub's status/code. */
|
|
3717
3687
|
var HubVectorSearchError = class extends Error {
|
|
3718
3688
|
status;
|
|
@@ -3945,8 +3915,7 @@ var HubVectorSearchProvider = class {
|
|
|
3945
3915
|
function createHubVectorSearchProvider(options) {
|
|
3946
3916
|
return new HubVectorSearchProvider(options);
|
|
3947
3917
|
}
|
|
3948
|
-
|
|
3949
|
-
//#region src/knowledge-brief.ts
|
|
3918
|
+
// src/knowledge-brief.ts
|
|
3950
3919
|
/**
|
|
3951
3920
|
* Retrieval briefing.
|
|
3952
3921
|
*
|
|
@@ -4071,8 +4040,7 @@ function briefLine(hit) {
|
|
|
4071
4040
|
const snippet = hit.snippet.replace(/\s+/g, " ").trim();
|
|
4072
4041
|
return snippet === "" ? `- [${hit.citationId}] ${hit.page.title}` : `- [${hit.citationId}] ${hit.page.title} — ${snippet}`;
|
|
4073
4042
|
}
|
|
4074
|
-
|
|
4075
|
-
//#region src/knowledge-use-receipts.ts
|
|
4043
|
+
// src/knowledge-use-receipts.ts
|
|
4076
4044
|
/**
|
|
4077
4045
|
* The visibility snapshot a receipt references could not be obtained, so the
|
|
4078
4046
|
* result-to-visibility join cannot be proven. This is distinct from a snapshot
|
|
@@ -4518,8 +4486,7 @@ function isoTimestamp(value, label) {
|
|
|
4518
4486
|
if (!Number.isFinite(date.getTime())) throw new TypeError(`${label} must be a valid timestamp`);
|
|
4519
4487
|
return date.toISOString();
|
|
4520
4488
|
}
|
|
4521
|
-
|
|
4522
|
-
//#region src/knowledge-tools.ts
|
|
4489
|
+
// src/knowledge-tools.ts
|
|
4523
4490
|
/**
|
|
4524
4491
|
* Provider-neutral knowledge tools.
|
|
4525
4492
|
*
|
|
@@ -4759,8 +4726,7 @@ async function fileIdentity(path) {
|
|
|
4759
4726
|
throw error;
|
|
4760
4727
|
}
|
|
4761
4728
|
}
|
|
4762
|
-
|
|
4763
|
-
//#region src/promotion.ts
|
|
4729
|
+
// src/promotion.ts
|
|
4764
4730
|
/**
|
|
4765
4731
|
* Run-scope to shared-scope promotion.
|
|
4766
4732
|
*
|
|
@@ -4942,8 +4908,7 @@ function nonEmpty(value, label) {
|
|
|
4942
4908
|
if (typeof value !== "string" || value.trim().length === 0) throw new TypeError(`${label} must be a non-empty string`);
|
|
4943
4909
|
return value.trim();
|
|
4944
4910
|
}
|
|
4945
|
-
|
|
4946
|
-
//#region src/propose-from-finding.ts
|
|
4911
|
+
// src/propose-from-finding.ts
|
|
4947
4912
|
var KnowledgeProposalParseError = class extends Error {
|
|
4948
4913
|
findingId;
|
|
4949
4914
|
subject;
|
|
@@ -5181,8 +5146,7 @@ function renderWikiBody(finding, slug, heading) {
|
|
|
5181
5146
|
function humanize(slug) {
|
|
5182
5147
|
return slug.split("-").filter(Boolean).map((w) => w[0]?.toUpperCase() + w.slice(1)).join(" ") || slug;
|
|
5183
5148
|
}
|
|
5184
|
-
|
|
5185
|
-
//#region src/qmd-search-provider.ts
|
|
5149
|
+
// src/qmd-search-provider.ts
|
|
5186
5150
|
const indexedDocument = z.object({
|
|
5187
5151
|
filepath: z.string(),
|
|
5188
5152
|
collectionName: z.string(),
|
|
@@ -5361,8 +5325,7 @@ function createQmdKnowledgeTools(options) {
|
|
|
5361
5325
|
}
|
|
5362
5326
|
}];
|
|
5363
5327
|
}
|
|
5364
|
-
|
|
5365
|
-
//#region src/readiness-check.ts
|
|
5328
|
+
// src/readiness-check.ts
|
|
5366
5329
|
async function evaluateKnowledgeBaseReadiness(options) {
|
|
5367
5330
|
const index = await buildKnowledgeIndex(options.root);
|
|
5368
5331
|
const { validation, readiness, kbQuality } = assessKnowledgeIndex(options, index);
|
|
@@ -5389,8 +5352,7 @@ async function evaluateKnowledgeBaseReadiness(options) {
|
|
|
5389
5352
|
}
|
|
5390
5353
|
};
|
|
5391
5354
|
}
|
|
5392
|
-
|
|
5393
|
-
//#region src/release.ts
|
|
5355
|
+
// src/release.ts
|
|
5394
5356
|
function knowledgeReleaseReport(input) {
|
|
5395
5357
|
const baselineRuns = input.baselineRuns ?? [];
|
|
5396
5358
|
const runRecords = [...input.candidateRuns, ...baselineRuns].map(validateRunRecord);
|
|
@@ -5425,7 +5387,6 @@ function knowledgeReleaseReport(input) {
|
|
|
5425
5387
|
baselineRuns
|
|
5426
5388
|
};
|
|
5427
5389
|
}
|
|
5428
|
-
//#endregion
|
|
5429
5390
|
export { AgentMemoryHitSchema, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, AgentMemoryScopeSchema, AgentMemoryWriteInputSchema, CHECKABLE_RUNG_THRESHOLD, ClaimLedgerGoalConflictError, ClaimLedgerMigrationRequiredError, DEADLINE_EXIT_CODE, DEFAULT_KNOWLEDGE_BRIEF_LIMIT, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, DEFAULT_PAGES_DIRECTORY, DeepQuestionSchema, FileSystemKbStore, FileSystemSearchProvider, HindsightOperationUnknownError, HubVectorSearchError, HubVectorSearchProvider, KB_CLAIM_LEDGER_DIR, KB_EVENTS_PATH, KB_INDEX_PATH, KB_STORE_DIR, KNOWLEDGE_EVENT_TYPES, KNOWLEDGE_PROMOTIONS_DIRECTORY, KNOWLEDGE_PROMOTION_DIGEST_ALGORITHM, KNOWLEDGE_PROMOTION_SCHEMA_VERSION, KNOWLEDGE_RECEIPT_DIGEST_ALGORITHM, KNOWLEDGE_SEARCH_RETRIEVER_ID, KNOWLEDGE_USE_RECEIPT_SCHEMA_VERSION, KnowledgeBaseCandidateSchema, KnowledgeCitationAuditError, KnowledgeCitationResolutionError, KnowledgeDuplicateIntakeError, KnowledgeEventSchema, KnowledgeGraphEdgeSchema, KnowledgeGraphNodeSchema, KnowledgeImprovementCandidateRefSchema, KnowledgeImprovementEvidenceSchema, KnowledgeImprovementRunStateSchema, KnowledgeIndexSchema, KnowledgePageInvalidationSchema, KnowledgePageSchema, KnowledgePromotionError, KnowledgeProposalParseError, KnowledgeRelationSchema, KnowledgeVisibilityUnavailableError, MemoryKbStore, READINESS_SPEC_DEFAULTS, RUN_LINEAGE_BASENAME, ResearchClaimEvidenceSchema, ResearchClaimLedgerSchema, ResearchClaimRecordSchema, ResearchSourceVersionSchema, SCAFFOLD_PAGE_BASENAMES, SourceAnchorSchema, SourceRecordSchema, UncheckableClaimError, WIKILINK_REGEX, addSourcePath, addSourceText, applyKnowledgeWriteBlocks, applyKnowledgeWriteBlocksFile, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, assertClaimLedgerId, assertCurrentRunCitationsResolved, assertDeepQuestionIntegrity, assertGradeableEvidence, assertKnowledgeCitationAudit, assertKnowledgeCitationsResolved, assertKnowledgeRetrievalMatchesVisibility, assertKnowledgeRetrievalMatchesVisibilityArtifact, assertKnowledgeWriteIntake, assertResearchClaimEvidenceIntegrity, assertResearchClaimLedgerIntegrity, assertRunScopedCitationsResolved, assertTrackedClaimIntegrity, auditCurrentRunCitations, auditKnowledgeCitations, buildEvalKnowledgeBundle, buildKnowledgeBrief, buildKnowledgeGraph, buildKnowledgeIndex, buildKnowledgeLexicalIndex, buildRetrievalEvalDispatch, canonicalPathsEqual, canonicalRelativeWithinRoot, chunkMarkdown, claimCheckKey, claimEvidenceId, claimId, claimSourceHost, createAgentMemoryBranch, createFileRunLineageAuthority, createFileSystemSearchProvider, createGraphitiMemoryAdapter, createHindsightMemoryAdapter, createHubVectorSearchProvider, createInMemoryBenchmarkAdapter, createKnowledgeControlLoopAdapter, createKnowledgeEvent, createKnowledgeRetrievalDisposition, createKnowledgeRetrievalReceipt, createKnowledgeTools, createKnowledgeUseReceipt, createKnowledgeVisibilitySnapshot, createLocalDiscoveryDispatcher, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, createNoopMemoryBenchmarkAdapter, createPlayMemoryTools, createQmdKnowledgeTools, createQmdSearchProvider, createRunScopedStores, decodeKnowledgeVisibilitySnapshot, deepQuestionId, defaultGetMemoryContext, defineReadinessSpec, detectNearDuplicatePages, deterministicRng, diagnoseRagAnswerFailure, emitRetrievalHoldoutBypass, emptyClaimLedger, encodeKnowledgeVisibilitySnapshot, evaluateKnowledgeBaseReadiness, explainKnowledgeTarget, extractWikilinks, forkAgentMemoryBranchSnapshot, formatFrontmatter, formatKnowledgeCitationReference, fromAgentCandidateKnowledgeRef, gradeClaims, gradeFor, graphitiMemoryAdapterIdentity, groundClaimInText, hashKnowledgeBase, hindsightMemoryBankId, improveKnowledgeBase, initKnowledgeBase, inspectKnowledgeIndex, inspectPendingKnowledgeMutation, isKernelAnchoredPath, isKnowledgeMutationHeld, isKnowledgePagePath, isMissingFile, isSafeKnowledgePath, isScaffoldPath, jsonCandidateCodec, jsonObjectCandidateCodec, knowledgeImprovementCandidateRef, knowledgeImprovementRunDir, knowledgeImprovementRunId, knowledgePageDigest, knowledgePageFromMarkdown, knowledgePageRelations, knowledgeReleaseReport, knowledgeVisibilityArtifactRef, layoutFor, linkClaimContradictions, lintKnowledgeIndex, listRegularFilesWithinRoot, loadKnowledgeImprovementActivationResult, loadKnowledgeImprovementEvents, loadKnowledgeImprovementState, loadKnowledgePages, loadKnowledgePromotionRecord, loadSourceRegistry, materializeRegisteredClaimEvidence, mediaTypeFor, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, mergeClaimLedgers, mergeTrackedClaims, normalizeClaimText, normalizeExternalRagScores, normalizeKnowledgeStateScope, normalizeLinkTarget, normalizePageText, normalizePagesDirectory, originatedPages, parseFrontmatter, parseKnowledgeCitationReference, parseKnowledgeWriteBlocks, partitionRetrievalScenarios, promoteKnowledgeCandidate, promoteRunScopedPages, proposeFromFinding, proposeFromFindings, ragAnswerQualityJudge, readRegularFileNoFollow, readRegularFileWithinRoot, reciprocalRankFusion, recoverPendingKnowledgeMutation, relativeWithinRoot, removeDurable, renameDurable, renderMemoryContext, researchSourceVersionKey, resetRetrievalHoldoutRegistry, resolveKnowledgeCitation, resolveKnowledgeCitations, resolveMemoryCleanupTimeoutMs, resolveRunScopedCitation, resolveRunScopedCitations, restoreKnowledgeCandidateBaseline, retrievalConfigFromSurface, retrievalConfigSurface, retrievalHoldoutConfigHash, retrievalRecallJudge, runBoundedMemoryLifecycle, runDiscoveryLoop, runInKnowledgeMutationScope, runKnowledgeResearchLoop, runRagKnowledgeImprovementLoop, runRagOptimization, runRetrievalImprovementLoop, runSerializedKnowledgeOptimization, scenarioContentFingerprint, scoreBm25, scoreKnowledgeBaseIndex, scoreRagAnswerArtifact, scoreRetrievalArtifact, searchKnowledge, searchKnowledgePages, sha256, sleepForMemoryRecovery, slugify, snapshotSourceTextInput, sourceRegistryPath, stableId, stripFrontmatter, syncDirectory, textSourceAdapter, textSourceId, toAgentCandidateKnowledgeRef, toDeepEvalTestCases, toOffPolicyTrajectory, toRagCheckerRecords, toRagasEvaluationRows, toTruLensRecords, tokenizeQuery, tokenizeText, validateKnowledgeIndex, verdictFor, verifyGradeableEvidence, verifyKnowledgeRetrievalDisposition, verifyKnowledgeRetrievalReceipt, verifyKnowledgeUseReceipt, verifyKnowledgeVisibilitySnapshot, withKnowledgeImprovementCandidate, withKnowledgeImprovementComparison, withKnowledgeMutation, withKnowledgeRead, withSafeDescendant, withSafeDirectory, writeFileDurable, writeFileDurableWithinRoot, writeJson, writeJsonDurable, writeJsonDurableWithinRoot, writeKnowledgeIndex, writeSourceRegistry };
|
|
5430
5391
|
|
|
5431
5392
|
//# sourceMappingURL=index.js.map
|