@tangle-network/agent-knowledge 19.0.2 → 19.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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $ as writeSourceRegistry, $t as ClaimLedgerGoalConflictError, A as verifyKnowledgeVisibilitySnapshot, An as rollbackKnowledgeFileTransaction, At as loadKnowledgePages, B as assertGradeableEvidence, Bn as relativeWithinRoot, Bt as KnowledgeIndexSchema, C as knowledgePageDigest, Cn as withKnowledgeRead, Ct as resolveRunScopedCitations, D as normalizeVisibilityRef, Dn as finishKnowledgeFileTransaction, Dt as isScaffoldPath, E as normalizeVisibilityArtifact, En as commitKnowledgeFileMutations, Et as isKnowledgePagePath, F as validateKnowledgeIndex, Fn as isKernelAnchoredPath, Ft as DeepQuestionSchema, G as verifyGradeableEvidence, Gn as withSafeDirectory, Gt as KnowledgeRelationSchema, H as gradeClaims, Hn as renameDurable, Ht as KnowledgePageSchema, I as lintKnowledgeIndex, In as isMissingFile, It as KnowledgeBaseCandidateSchema, J as addSourcePath, Jn as writeJsonDurable, Jt as ResearchClaimRecordSchema, K as buildKnowledgeIndex, Kn as writeFileDurable, Kt as ResearchClaimEvidenceSchema, L as CHECKABLE_RUNG_THRESHOLD, Ln as listRegularFilesWithinRoot, Lt as KnowledgeEventSchema, M as visibilityIndexOf, Mn as normalizePagesDirectory, Mt as WIKILINK_REGEX, N as detectNearDuplicatePages, Nn as canonicalPathsEqual, Nt as extractWikilinks, O as validateKnowledgePage, On as knowledgeFileTransactionPlanHash, Ot as knowledgePageFromMarkdown, P as normalizePageText, Pn as canonicalRelativeWithinRoot, Pt as normalizeLinkTarget, Q as sourceRegistryPath, Qt as KNOWLEDGE_EVENT_TYPES, R as DEADLINE_EXIT_CODE, Rn as readRegularFileNoFollow, Rt as KnowledgeGraphEdgeSchema, S as encodeKnowledgeVisibilitySnapshot, Sn as withKnowledgeMutation, St as resolveRunScopedCitation, T as nonEmpty$1, Tn as assertKnowledgeMutationPath, Tt as initKnowledgeBase, U as gradeFor, Un as syncDirectory, Ut as KnowledgeRelationGraphSchema, V as claimCheckKey, Vn as removeDurable, Vt as KnowledgePageInvalidationSchema, W as verdictFor, Wn as withSafeDescendant, Wt as KnowledgeRelationNodeSchema, X as loadSourceRegistry, Xn as mediaTypeFor, Xt as SourceAnchorSchema, Y as addSourceText, Yn as writeJsonDurableWithinRoot, Yt as ResearchSourceVersionSchema, Z as snapshotSourceTextInput, Zn as textSourceAdapter, Zt as SourceRecordSchema, _ as KNOWLEDGE_USE_RECEIPT_SCHEMA_VERSION, _n as acquireDurableFileLock, _t as auditKnowledgeCitations, a as applyKnowledgeWriteBlocksFile, an as claimId, at as KB_STORE_DIR, b as decodeKnowledgeVisibilitySnapshot, bn as recoverPendingKnowledgeMutation, bt as resolveKnowledgeCitation, c as KnowledgeDuplicateIntakeError, cn as emptyClaimLedger, ct as buildKnowledgeGraph, d as createFileRunLineageAuthority, dn as mergeClaimLedgers, dt as KnowledgeCitationResolutionError, en as assertDeepQuestionIntegrity, et as ClaimLedgerMigrationRequiredError, f as createRunScopedStores, fn as mergeTrackedClaims, ft as assertCurrentRunCitationsResolved, g as KNOWLEDGE_RECEIPT_DIGEST_ALGORITHM, gn as parseFrontmatter, gt as auditCurrentRunCitations, h as originatedPages, hn as formatFrontmatter, ht as assertRunScopedCitationsResolved, i as applyKnowledgeWriteBlocks, in as claimEvidenceId, it as KB_INDEX_PATH, j as visibilityIdentity, jn as DEFAULT_PAGES_DIRECTORY, jt as writeJson, k as validateOrigin, kn as prepareKnowledgeFileTransaction, kt as layoutFor, l as assertKnowledgeWriteIntake, ln as linkClaimContradictions, lt as knowledgePageRelations, m as loadKnowledgeToolChain, mn as researchSourceVersionKey, mt as assertKnowledgeCitationsResolved, n as inspectKnowledgeIndex, nn as assertResearchClaimLedgerIntegrity, nt as KB_CLAIM_LEDGER_DIR, o as isSafeKnowledgePath, on as claimSourceHost, ot as MemoryKbStore, p as isKnowledgeToolChain, pn as normalizeClaimText, pt as assertKnowledgeCitationAudit, q as writeKnowledgeIndex, qn as writeFileDurableWithinRoot, qt as ResearchClaimLedgerSchema, r as stringMetadata, rn as assertTrackedClaimIntegrity, rt as KB_EVENTS_PATH, s as parseKnowledgeWriteBlocks, sn as deepQuestionId, st as assertClaimLedgerId, t as explainKnowledgeTarget, tn as assertResearchClaimEvidenceIntegrity, tt as FileSystemKbStore, u as RUN_LINEAGE_BASENAME, un as materializeRegisteredClaimEvidence, ut as KnowledgeCitationAuditError, v as assertSchemaVersion, vn as inspectPendingKnowledgeMutation, vt as formatKnowledgeCitationReference, w as knowledgeVisibilityArtifactRef, wn as applyKnowledgeFileTransaction, wt as SCAFFOLD_PAGE_BASENAMES, x as digest, xn as runInKnowledgeMutationScope, xt as resolveKnowledgeCitations, y as createKnowledgeVisibilitySnapshot, yn as isKnowledgeMutationHeld, yt as parseKnowledgeCitationReference, z as UncheckableClaimError, zn as readRegularFileWithinRoot, zt as KnowledgeGraphNodeSchema } from "./inspect-CwIvMcno.js";
2
2
  import { i as textSourceId, n as slugify, r as stableId, t as sha256 } from "./ids-Bevz_pXV.js";
3
- import { A as runSerializedKnowledgeOptimization, C as deterministicRng, D as toOffPolicyTrajectory, E as retrievalHoldoutConfigHash, M as assertImmutableRef, O as jsonCandidateCodec, S as applySessionStickyRetrievalHoldout, T as resetRetrievalHoldoutRegistry, _ as createAgentMemoryBranch, a as createNeo4jAgentMemoryAdapter, b as renderMemoryContext, c as runAgentMemoryImprovement, d as compareAgentMemoryLearning, f as runAgentMemoryLearningExperiment, g as buildAgentMemorySequencesFromBenchmarkCases, h as buildAgentMemorySequenceScenarios, i as AgentMemoryWriteInputSchema, j as scenarioContentFingerprint, k as jsonObjectCandidateCodec, l as createGraphitiMemoryAdapter, m as agentMemorySequenceJudge, n as AgentMemoryKindSchema, o as createMem0MemoryAdapter, p as runAgentMemoryExperiment, r as AgentMemoryScopeSchema, s as mem0MemoryAdapterIdentity, t as AgentMemoryHitSchema, u as graphitiMemoryAdapterIdentity, v as forkAgentMemoryBranchSnapshot, w as emitRetrievalHoldoutBypass, x as applyRetrievalHoldout, y as defaultGetMemoryContext } from "./memory-BYWNir2t.js";
3
+ import { A as retrievalHoldoutConfigHash, C as defaultGetMemoryContext, D as deterministicRng, E as applySessionStickyRetrievalHoldout, F as scenarioContentFingerprint, I as assertImmutableRef, M as jsonCandidateCodec, N as jsonObjectCandidateCodec, O as emitRetrievalHoldoutBypass, P as runSerializedKnowledgeOptimization, S as forkAgentMemoryBranchSnapshot, T as applyRetrievalHoldout, _ as runAgentMemoryExperiment, a as runAgentMemoryImprovement, b as buildAgentMemorySequencesFromBenchmarkCases, c as hindsightMemoryBankId, d as AgentMemoryScopeSchema, f as AgentMemoryWriteInputSchema, g as runAgentMemoryLearningExperiment, h as compareAgentMemoryLearning, i as mem0MemoryAdapterIdentity, j as toOffPolicyTrajectory, k as resetRetrievalHoldoutRegistry, l as AgentMemoryHitSchema, m as graphitiMemoryAdapterIdentity, n as createNeo4jAgentMemoryAdapter, o as HindsightOperationUnknownError, p as createGraphitiMemoryAdapter, r as createMem0MemoryAdapter, s as createHindsightMemoryAdapter, t as createPlayMemoryTools, u as AgentMemoryKindSchema, v as agentMemorySequenceJudge, w as renderMemoryContext, x as createAgentMemoryBranch, y as buildAgentMemorySequenceScenarios } from "./memory-PlYkyv8x.js";
4
4
  import { C as sleepForMemoryRecovery, F as buildIndustryRagBenchmarkSmokeCases, G as buildRetrievalEvalDispatch, H as createNoopMemoryBenchmarkAdapter, I as respondToIndustryMemoryBenchmarkSmokeCase, J as retrievalConfigSurface, K as partitionRetrievalScenarios, L as respondToIndustryRagBenchmarkSmokeCase, M as INDUSTRY_RAG_BENCHMARKS, N as buildFirstPartyMemoryLifecycleBenchmarkCases, P as buildIndustryMemoryBenchmarkSmokeCases, R as isKnowledgeMemoryBenchmarkCase, S as runBoundedMemoryLifecycle, U as memoryHitToSourceRecord, V as createInMemoryBenchmarkAdapter, W as memoryWriteResultToSourceRecord, X as scoreRetrievalArtifact, Y as retrievalRecallJudge, Z as mean, a as buildKnowledgeBenchmarkScenarios, b as memoryRecoveryDelayMs, c as runKnowledgeBenchmarkSuite, d as summarizeKnowledgeBenchmarkCampaign, f as acquireAgentMemoryRunLease, h as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, i as runMemoryAdapterBenchmark, j as INDUSTRY_MEMORY_BENCHMARKS, l as scoreKnowledgeBenchmarkArtifact, m as AgentMemoryLifecycleUnsafeError, n as parseKnowledgeBenchmarkJsonl, o as knowledgeBenchmarkJudge, p as AgentMemoryLifecycleTimeoutError, q as retrievalConfigFromSurface, r as parseKnowledgeBenchmarkQrels, s as renderKnowledgeBenchmarkReportMarkdown, t as buildRetrievalBenchmarkCasesFromQrels, u as scoreMemoryBenchmarkArtifact, x as resolveMemoryCleanupTimeoutMs, y as createMemoryExecutionPool } from "./benchmarks-B3kU-Yxz.js";
5
5
  import { a as buildKnowledgeLexicalIndex, c as tokenizeText, i as searchKnowledgePages, n as reciprocalRankFusion, o as scoreBm25, r as searchKnowledge, s as tokenizeQuery, t as KNOWLEDGE_SEARCH_RETRIEVER_ID } from "./search-Cbyj2shJ.js";
6
6
  import { IRS_DIMENSION_HINTS, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, POLITE_USER_AGENT, __resetHttpThrottle, createCornellLiiSource, createIrsPublicationsSource, createStateSosSource, extractLinks, firstMatch, htmlToText, innerHtmlById, looksLikeBlockPage, politeFetch } from "./sources/index.js";
@@ -7098,6 +7098,186 @@ function humanize(slug) {
7098
7098
  return slug.split("-").filter(Boolean).map((w) => w[0]?.toUpperCase() + w.slice(1)).join(" ") || slug;
7099
7099
  }
7100
7100
  //#endregion
7101
+ //#region src/qmd-search-provider.ts
7102
+ const indexedDocument = z.object({
7103
+ filepath: z.string(),
7104
+ collectionName: z.string(),
7105
+ body: z.string()
7106
+ });
7107
+ const searchResults = z.array(z.object({
7108
+ filepath: z.string(),
7109
+ score: z.number().finite()
7110
+ }));
7111
+ const querySchema = z.object({
7112
+ query: z.string().trim().min(1).max(16e3),
7113
+ limit: z.number().int().min(1).max(50).default(5)
7114
+ }).strict();
7115
+ const readSchema = z.object({
7116
+ sourceId: z.string().min(1),
7117
+ fromLine: z.number().int().min(1).default(1),
7118
+ maxLines: z.number().int().min(1).max(200).default(80)
7119
+ }).strict();
7120
+ /**
7121
+ * A fixed source snapshot, not an authorization decision. The trusted host supplies
7122
+ * one authorized corpus; agents cannot select a collection, bank, or arbitrary path.
7123
+ * QMD's index is derived: its bytes must agree with the authoritative source hash.
7124
+ */
7125
+ function createQmdSearchProvider(options) {
7126
+ const { client } = options;
7127
+ const scopeId = z.string().trim().min(1).parse(options.scopeId);
7128
+ const revision = z.string().trim().min(1).parse(options.revision);
7129
+ const collection = z.string().regex(/^[a-zA-Z0-9_-]+$/).parse(options.collection);
7130
+ const mode = z.enum(["lexical", "vector"]).parse(options.mode ?? "lexical");
7131
+ const indexedAt = options.indexedAt === void 0 ? null : z.iso.datetime({ offset: true }).parse(options.indexedAt);
7132
+ if (mode === "vector" && !client.searchVector) throw new Error("QMD vector search is unavailable");
7133
+ const byId = /* @__PURE__ */ new Map();
7134
+ const byPath = /* @__PURE__ */ new Map();
7135
+ for (const entry of options.documents) {
7136
+ const source = SourceRecordSchema.parse(structuredClone(entry.source));
7137
+ if (!/^[a-f0-9]{64}$/.test(source.contentHash)) throw new TypeError("QMD sources require an exact SHA-256 contentHash");
7138
+ if (source.text !== void 0 && sha256(source.text) !== source.contentHash) throw new Error("QMD source text does not match its contentHash");
7139
+ const prefix = `qmd://${collection}/`;
7140
+ const path = entry.qmdPath.slice(prefix.length);
7141
+ if (!entry.qmdPath.startsWith(prefix) || !path || path.split("/").some((part) => !part || part === "." || part === ".." || /[\\?#%]/.test(part) || [...part].some((char) => char.charCodeAt(0) < 32))) throw new TypeError("QMD document path must be within the bound collection");
7142
+ if (byId.has(source.id) || byPath.has(entry.qmdPath)) throw new Error("QMD snapshot contains duplicate source ids or paths");
7143
+ const document = {
7144
+ qmdPath: entry.qmdPath,
7145
+ source
7146
+ };
7147
+ byId.set(source.id, document);
7148
+ byPath.set(entry.qmdPath, document);
7149
+ }
7150
+ const snapshotDigest = canonicalCandidateDigest({
7151
+ scopeId,
7152
+ revision,
7153
+ collection,
7154
+ documents: [...byPath.values()].map(({ qmdPath, source }) => ({
7155
+ qmdPath,
7156
+ id: source.id,
7157
+ uri: source.uri,
7158
+ contentHash: source.contentHash
7159
+ })).sort((a, b) => a.qmdPath < b.qmdPath ? -1 : a.qmdPath > b.qmdPath ? 1 : 0)
7160
+ });
7161
+ const identity = Object.freeze({
7162
+ scopeId,
7163
+ revision,
7164
+ snapshotDigest,
7165
+ indexedAt,
7166
+ mode,
7167
+ documentCount: byId.size
7168
+ });
7169
+ const verifiedRead = async (document) => {
7170
+ const parsed = indexedDocument.safeParse(await client.get(document.qmdPath, { includeBody: true }));
7171
+ if (!parsed.success) throw new Error("QMD snapshot document is unavailable or malformed; rebuild the scoped index");
7172
+ const indexed = parsed.data;
7173
+ if (indexed.filepath !== document.qmdPath || indexed.collectionName !== collection) throw new Error("QMD returned a document outside the bound snapshot");
7174
+ if (sha256(indexed.body) !== document.source.contentHash) throw new Error("QMD index is stale for this source revision; rebuild the scoped index");
7175
+ return {
7176
+ qmdPath: document.qmdPath,
7177
+ source: {
7178
+ ...structuredClone(document.source),
7179
+ text: indexed.body
7180
+ }
7181
+ };
7182
+ };
7183
+ return {
7184
+ ...identity,
7185
+ /** Call once at admission; ordinary reads still verify their returned bytes. */
7186
+ async verifySnapshot() {
7187
+ for (const document of byPath.values()) await verifiedRead(document);
7188
+ return {
7189
+ ...identity,
7190
+ verifiedDocumentCount: byPath.size,
7191
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString()
7192
+ };
7193
+ },
7194
+ async search(query, searchOptions = {}) {
7195
+ const request = querySchema.parse({
7196
+ query,
7197
+ ...searchOptions
7198
+ });
7199
+ const search = mode === "vector" ? client.searchVector : client.searchLex;
7200
+ const results = searchResults.parse(await search.call(client, request.query, {
7201
+ collection,
7202
+ limit: request.limit
7203
+ }));
7204
+ const seen = /* @__PURE__ */ new Set();
7205
+ for (const hit of results) {
7206
+ if (!byPath.has(hit.filepath)) throw new Error("QMD returned a search result outside the bound snapshot");
7207
+ if (seen.has(hit.filepath)) throw new Error("QMD returned duplicate search results");
7208
+ seen.add(hit.filepath);
7209
+ }
7210
+ const hits = await Promise.all(results.slice(0, request.limit).map(async (hit) => ({
7211
+ ...await verifiedRead(byPath.get(hit.filepath)),
7212
+ score: hit.score
7213
+ })));
7214
+ return {
7215
+ ...identity,
7216
+ hits
7217
+ };
7218
+ },
7219
+ async read(sourceId) {
7220
+ const document = byId.get(sourceId);
7221
+ if (!document) throw new Error("Source is not in the bound QMD snapshot");
7222
+ return {
7223
+ ...identity,
7224
+ document: await verifiedRead(document)
7225
+ };
7226
+ }
7227
+ };
7228
+ }
7229
+ /** Same source-checked functions used by a human reader and exact-profile tool grants. */
7230
+ function createQmdKnowledgeTools(options) {
7231
+ const prefix = options.namePrefix ?? "";
7232
+ if (!/^[a-zA-Z0-9_]*$/.test(prefix)) throw new TypeError("Invalid QMD tool name prefix");
7233
+ return [{
7234
+ name: `${prefix}qmd_search`,
7235
+ description: "Search this bound source snapshot. Results carry original source ids, URIs and hashes; use qmd_read for full source lines.",
7236
+ inputSchema: querySchema,
7237
+ inputSchemaJson: z.toJSONSchema(querySchema),
7238
+ async handler(input) {
7239
+ const request = querySchema.parse(input);
7240
+ const result = await options.provider.search(request.query, { limit: request.limit });
7241
+ return {
7242
+ ...result,
7243
+ hits: result.hits.map(({ source, ...hit }) => {
7244
+ const { text, ...reference } = source;
7245
+ return {
7246
+ ...hit,
7247
+ source: reference,
7248
+ excerpt: text?.slice(0, 2e3),
7249
+ excerptTruncated: (text?.length ?? 0) > 2e3
7250
+ };
7251
+ })
7252
+ };
7253
+ }
7254
+ }, {
7255
+ name: `${prefix}qmd_read`,
7256
+ description: "Read exact source lines by a source id returned from this snapshot. Other play sources are unavailable.",
7257
+ inputSchema: readSchema,
7258
+ inputSchemaJson: z.toJSONSchema(readSchema),
7259
+ async handler(input) {
7260
+ const request = readSchema.parse(input);
7261
+ const result = await options.provider.read(request.sourceId);
7262
+ const { text = "", ...source } = result.document.source;
7263
+ const lines = text.split("\n");
7264
+ const selected = lines.slice(request.fromLine - 1, request.fromLine - 1 + request.maxLines);
7265
+ const rendered = selected.map((line, index) => `${request.fromLine + index}: ${line}`).join("\n");
7266
+ return {
7267
+ ...result,
7268
+ document: {
7269
+ ...result.document,
7270
+ source,
7271
+ text: rendered.slice(0, 32e3),
7272
+ fromLine: request.fromLine,
7273
+ totalLines: lines.length,
7274
+ truncated: rendered.length > 32e3 || request.fromLine - 1 + selected.length < lines.length
7275
+ }
7276
+ };
7277
+ }
7278
+ }];
7279
+ }
7280
+ //#endregion
7101
7281
  //#region src/readiness-check.ts
7102
7282
  async function evaluateKnowledgeBaseReadiness(options) {
7103
7283
  const index = await buildKnowledgeIndex(options.root);
@@ -8065,6 +8245,6 @@ function buildSteerText(gaps, deepQuestions, invalidationTargets, minIndependent
8065
8245
  return lines.join("\n");
8066
8246
  }
8067
8247
  //#endregion
8068
- export { AgentMemoryHitSchema, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, AgentMemoryScopeSchema, AgentMemoryWriteInputSchema, CHECKABLE_RUNG_THRESHOLD, CITES_INVALIDATED_FIELD, ClaimLedgerGoalConflictError, ClaimLedgerMigrationRequiredError, DEADLINE_EXIT_CODE, DEFAULT_KNOWLEDGE_BRIEF_LIMIT, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, DEFAULT_PAGES_DIRECTORY, DeepQuestionSchema, FileSystemKbStore, FileSystemSearchProvider, INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, IRS_DIMENSION_HINTS, 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, KnowledgeRelationGraphError, KnowledgeRelationGraphSchema, KnowledgeRelationNodeSchema, KnowledgeRelationSchema, KnowledgeVisibilityUnavailableError, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, MemoryKbStore, POLITE_USER_AGENT, READINESS_SPEC_DEFAULTS, RUN_LINEAGE_BASENAME, ResearchClaimEvidenceSchema, ResearchClaimLedgerSchema, ResearchClaimRecordSchema, ResearchSourceVersionSchema, RouterError, SCAFFOLD_PAGE_BASENAMES, SourceAnchorSchema, SourceRecordSchema, UncheckableClaimError, WIKILINK_REGEX, __resetHttpThrottle, acquireAgentMemoryRunLease, addSourcePath, addSourceText, agentMemorySequenceJudge, applyKnowledgeWriteBlocks, applyKnowledgeWriteBlocksFile, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, assertClaimLedgerId, assertCurrentRunCitationsResolved, assertDeepQuestionIntegrity, assertGradeableEvidence, assertKnowledgeCitationAudit, assertKnowledgeCitationsResolved, assertKnowledgeRetrievalMatchesVisibility, assertKnowledgeRetrievalMatchesVisibilityArtifact, assertKnowledgeWriteIntake, assertResearchClaimEvidenceIntegrity, assertResearchClaimLedgerIntegrity, assertRunScopedCitationsResolved, assertTrackedClaimIntegrity, auditCurrentRunCitations, auditKnowledgeCitations, buildAgentMemorySequenceScenarios, buildAgentMemorySequencesFromBenchmarkCases, buildEvalKnowledgeBundle, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildKnowledgeBrief, buildKnowledgeGraph, buildKnowledgeIndex, buildKnowledgeLexicalIndex, buildKnowledgeRelationGraph, buildRetrievalBenchmarkCasesFromQrels, buildRetrievalEvalDispatch, calibrateRagAnswerJudge, canonicalPathsEqual, canonicalRelativeWithinRoot, canonicalizeUrl, chunkMarkdown, citedClaimKey, citedClaimOf, claimCheckKey, claimEvidenceId, claimId, claimSourceHost, compareAgentMemoryLearning, contentKey, createAdaptiveResearchDriver, createAgentMemoryBranch, createClaimDecorator, createClaimGroundingVerifier, createCollectionResearchDriver, createCornellLiiSource, createD1FreshnessStoreStub, createFileRunLineageAuthority, createFileSystemFreshnessStore, createFileSystemSearchProvider, createGraphitiMemoryAdapter, createInMemoryBenchmarkAdapter, createIrsPublicationsSource, createKnowledgeControlLoopAdapter, createKnowledgeEvent, createKnowledgeRetrievalDisposition, createKnowledgeRetrievalReceipt, createKnowledgeTools, createKnowledgeUseReceipt, createKnowledgeVisibilitySnapshot, createLocalDiscoveryDispatcher, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, createNoopMemoryBenchmarkAdapter, createPersistentResearchDrivingDriver, createRagAnswerQualityHook, createResearchDrivingDriver, createRunScopedStores, createStateSosSource, createTangleRouterClient, createVerifyingResearchDriver, createWebResearchWorker, decodeKnowledgeVisibilitySnapshot, deepQuestionId, defaultGetMemoryContext, defineReadinessSpec, detectChanges, detectNearDuplicatePages, deterministicRng, diagnoseRagAnswerFailure, emitRetrievalHoldoutBypass, emptyClaimLedger, encodeKnowledgeVisibilitySnapshot, evaluateKnowledgeBaseReadiness, explainKnowledgeTarget, extractLinks, extractWikilinks, firstMatch, forkAgentMemoryBranchSnapshot, formatFrontmatter, formatKnowledgeCitationReference, formatKnowledgeInvalidationProposal, fromAgentCandidateKnowledgeRef, gradeClaims, gradeCompanyAgainstText, gradeFactAgainstText, gradeFor, graphitiMemoryAdapterIdentity, groundClaimInText, hashKnowledgeBase, htmlToText, improveKnowledgeBase, improveSelectedKnowledgeCandidate, initKnowledgeBase, innerHtmlById, inspectKnowledgeIndex, inspectPendingKnowledgeMutation, investmentThesisSet, isKernelAnchoredPath, isKnowledgeMemoryBenchmarkCase, isKnowledgeMutationHeld, isKnowledgePagePath, isMissingFile, isReachable, isSafeKnowledgePath, isScaffoldPath, jsonCandidateCodec, jsonObjectCandidateCodec, kbIndexToText, knowledgeBenchmarkJudge, knowledgeCitationAuditFindings, knowledgeImprovementCandidateRef, knowledgeImprovementRunDir, knowledgeImprovementRunId, knowledgePageDigest, knowledgePageFromMarkdown, knowledgePageRelations, knowledgeReleaseReport, knowledgeVisibilityArtifactRef, layoutFor, lensDistribution, linkClaimContradictions, lintCurrentRunCitations, lintKnowledgeIndex, listRegularFilesWithinRoot, loadKnowledgeImprovementActivationResult, loadKnowledgeImprovementEvents, loadKnowledgeImprovementState, loadKnowledgePages, loadKnowledgePromotionRecord, loadSourceRegistry, looksLikeBlockPage, materialFactsSurfaced, materialFactsSurfacedInText, materializeRegisteredClaimEvidence, mediaTypeFor, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, mergeClaimLedgers, mergeTrackedClaims, neighbors, normalizeClaimText, normalizeExternalRagScores, normalizeKnowledgeStateScope, normalizeLinkTarget, normalizePageText, normalizePagesDirectory, optimizeKnowledgeBasePolicy, originatedPages, parseFrontmatter, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, parseKnowledgeCitationReference, parseKnowledgeWriteBlocks, partitionRetrievalScenarios, planInvalidationPropagation, politeFetch, promoteKnowledgeCandidate, promoteRunScopedPages, proposeFromFinding, proposeFromFindings, ragAnswerQualityJudge, readRegularFileNoFollow, readRegularFileWithinRoot, reciprocalRankFusion, recoverPendingKnowledgeMutation, relativeWithinRoot, removeDurable, renameDurable, renderKnowledgeBenchmarkReportMarkdown, renderMemoryContext, researchSourceVersionKey, resetRetrievalHoldoutRegistry, resolveKnowledgeCitation, resolveKnowledgeCitations, resolveMemoryCleanupTimeoutMs, resolveRunScopedCitation, resolveRunScopedCitations, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, restoreKnowledgeCandidateBaseline, retrievalConfigFromSurface, retrievalConfigSurface, retrievalHoldoutConfigHash, retrievalRecallJudge, runAgentMemoryExperiment, runAgentMemoryImprovement, runAgentMemoryLearningExperiment, runBoundedMemoryLifecycle, runDiscoveryLoop, runInKnowledgeMutationScope, runInvestmentThesisTask, runKnowledgeBenchmarkSuite, runKnowledgeResearchLoop, runMemoryAdapterBenchmark, runRagKnowledgeImprovementLoop, runRagOptimization, runRetrievalImprovementLoop, runSerializedKnowledgeOptimization, runVerifiedResearchLoop, scenarioContentFingerprint, scoreBm25, scoreKnowledgeBaseIndex, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, scoreRagAnswerArtifact, scoreRetrievalArtifact, searchKnowledge, searchKnowledgePages, sha256, sleepForMemoryRecovery, slugify, snapshotSourceTextInput, sourceMatchesGaps, sourceRegistryPath, stableId, stripFrontmatter, summarizeKnowledgeBenchmarkCampaign, syncDirectory, textSourceAdapter, textSourceId, thesisReadinessSpecs, toAgentCandidateKnowledgeRef, toDeepEvalTestCases, toOffPolicyTrajectory, toRagCheckerRecords, toRagasEvaluationRows, toTruLensRecords, tokenizeQuery, tokenizeText, totalMaterialFacts, triageSource, validateKnowledgeIndex, verdictFor, verifyGradeableEvidence, verifyKnowledgeRetrievalDisposition, verifyKnowledgeRetrievalReceipt, verifyKnowledgeUseReceipt, verifyKnowledgeVisibilitySnapshot, walk, withCitedClaim, withKnowledgeImprovementCandidate, withKnowledgeImprovementComparison, withKnowledgeMutation, withKnowledgeRead, withSafeDescendant, withSafeDirectory, writeFileDurable, writeFileDurableWithinRoot, writeJson, writeJsonDurable, writeJsonDurableWithinRoot, writeKnowledgeIndex, writeSourceRegistry };
8248
+ export { AgentMemoryHitSchema, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, AgentMemoryScopeSchema, AgentMemoryWriteInputSchema, CHECKABLE_RUNG_THRESHOLD, CITES_INVALIDATED_FIELD, ClaimLedgerGoalConflictError, ClaimLedgerMigrationRequiredError, DEADLINE_EXIT_CODE, DEFAULT_KNOWLEDGE_BRIEF_LIMIT, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, DEFAULT_PAGES_DIRECTORY, DeepQuestionSchema, FileSystemKbStore, FileSystemSearchProvider, HindsightOperationUnknownError, INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, IRS_DIMENSION_HINTS, 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, KnowledgeRelationGraphError, KnowledgeRelationGraphSchema, KnowledgeRelationNodeSchema, KnowledgeRelationSchema, KnowledgeVisibilityUnavailableError, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, MemoryKbStore, POLITE_USER_AGENT, READINESS_SPEC_DEFAULTS, RUN_LINEAGE_BASENAME, ResearchClaimEvidenceSchema, ResearchClaimLedgerSchema, ResearchClaimRecordSchema, ResearchSourceVersionSchema, RouterError, SCAFFOLD_PAGE_BASENAMES, SourceAnchorSchema, SourceRecordSchema, UncheckableClaimError, WIKILINK_REGEX, __resetHttpThrottle, acquireAgentMemoryRunLease, addSourcePath, addSourceText, agentMemorySequenceJudge, applyKnowledgeWriteBlocks, applyKnowledgeWriteBlocksFile, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, assertClaimLedgerId, assertCurrentRunCitationsResolved, assertDeepQuestionIntegrity, assertGradeableEvidence, assertKnowledgeCitationAudit, assertKnowledgeCitationsResolved, assertKnowledgeRetrievalMatchesVisibility, assertKnowledgeRetrievalMatchesVisibilityArtifact, assertKnowledgeWriteIntake, assertResearchClaimEvidenceIntegrity, assertResearchClaimLedgerIntegrity, assertRunScopedCitationsResolved, assertTrackedClaimIntegrity, auditCurrentRunCitations, auditKnowledgeCitations, buildAgentMemorySequenceScenarios, buildAgentMemorySequencesFromBenchmarkCases, buildEvalKnowledgeBundle, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildKnowledgeBrief, buildKnowledgeGraph, buildKnowledgeIndex, buildKnowledgeLexicalIndex, buildKnowledgeRelationGraph, buildRetrievalBenchmarkCasesFromQrels, buildRetrievalEvalDispatch, calibrateRagAnswerJudge, canonicalPathsEqual, canonicalRelativeWithinRoot, canonicalizeUrl, chunkMarkdown, citedClaimKey, citedClaimOf, claimCheckKey, claimEvidenceId, claimId, claimSourceHost, compareAgentMemoryLearning, contentKey, createAdaptiveResearchDriver, createAgentMemoryBranch, createClaimDecorator, createClaimGroundingVerifier, createCollectionResearchDriver, createCornellLiiSource, createD1FreshnessStoreStub, createFileRunLineageAuthority, createFileSystemFreshnessStore, createFileSystemSearchProvider, createGraphitiMemoryAdapter, createHindsightMemoryAdapter, createInMemoryBenchmarkAdapter, createIrsPublicationsSource, createKnowledgeControlLoopAdapter, createKnowledgeEvent, createKnowledgeRetrievalDisposition, createKnowledgeRetrievalReceipt, createKnowledgeTools, createKnowledgeUseReceipt, createKnowledgeVisibilitySnapshot, createLocalDiscoveryDispatcher, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, createNoopMemoryBenchmarkAdapter, createPersistentResearchDrivingDriver, createPlayMemoryTools, createQmdKnowledgeTools, createQmdSearchProvider, createRagAnswerQualityHook, createResearchDrivingDriver, createRunScopedStores, createStateSosSource, createTangleRouterClient, createVerifyingResearchDriver, createWebResearchWorker, decodeKnowledgeVisibilitySnapshot, deepQuestionId, defaultGetMemoryContext, defineReadinessSpec, detectChanges, detectNearDuplicatePages, deterministicRng, diagnoseRagAnswerFailure, emitRetrievalHoldoutBypass, emptyClaimLedger, encodeKnowledgeVisibilitySnapshot, evaluateKnowledgeBaseReadiness, explainKnowledgeTarget, extractLinks, extractWikilinks, firstMatch, forkAgentMemoryBranchSnapshot, formatFrontmatter, formatKnowledgeCitationReference, formatKnowledgeInvalidationProposal, fromAgentCandidateKnowledgeRef, gradeClaims, gradeCompanyAgainstText, gradeFactAgainstText, gradeFor, graphitiMemoryAdapterIdentity, groundClaimInText, hashKnowledgeBase, hindsightMemoryBankId, htmlToText, improveKnowledgeBase, improveSelectedKnowledgeCandidate, initKnowledgeBase, innerHtmlById, inspectKnowledgeIndex, inspectPendingKnowledgeMutation, investmentThesisSet, isKernelAnchoredPath, isKnowledgeMemoryBenchmarkCase, isKnowledgeMutationHeld, isKnowledgePagePath, isMissingFile, isReachable, isSafeKnowledgePath, isScaffoldPath, jsonCandidateCodec, jsonObjectCandidateCodec, kbIndexToText, knowledgeBenchmarkJudge, knowledgeCitationAuditFindings, knowledgeImprovementCandidateRef, knowledgeImprovementRunDir, knowledgeImprovementRunId, knowledgePageDigest, knowledgePageFromMarkdown, knowledgePageRelations, knowledgeReleaseReport, knowledgeVisibilityArtifactRef, layoutFor, lensDistribution, linkClaimContradictions, lintCurrentRunCitations, lintKnowledgeIndex, listRegularFilesWithinRoot, loadKnowledgeImprovementActivationResult, loadKnowledgeImprovementEvents, loadKnowledgeImprovementState, loadKnowledgePages, loadKnowledgePromotionRecord, loadSourceRegistry, looksLikeBlockPage, materialFactsSurfaced, materialFactsSurfacedInText, materializeRegisteredClaimEvidence, mediaTypeFor, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, mergeClaimLedgers, mergeTrackedClaims, neighbors, normalizeClaimText, normalizeExternalRagScores, normalizeKnowledgeStateScope, normalizeLinkTarget, normalizePageText, normalizePagesDirectory, optimizeKnowledgeBasePolicy, originatedPages, parseFrontmatter, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, parseKnowledgeCitationReference, parseKnowledgeWriteBlocks, partitionRetrievalScenarios, planInvalidationPropagation, politeFetch, promoteKnowledgeCandidate, promoteRunScopedPages, proposeFromFinding, proposeFromFindings, ragAnswerQualityJudge, readRegularFileNoFollow, readRegularFileWithinRoot, reciprocalRankFusion, recoverPendingKnowledgeMutation, relativeWithinRoot, removeDurable, renameDurable, renderKnowledgeBenchmarkReportMarkdown, renderMemoryContext, researchSourceVersionKey, resetRetrievalHoldoutRegistry, resolveKnowledgeCitation, resolveKnowledgeCitations, resolveMemoryCleanupTimeoutMs, resolveRunScopedCitation, resolveRunScopedCitations, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, restoreKnowledgeCandidateBaseline, retrievalConfigFromSurface, retrievalConfigSurface, retrievalHoldoutConfigHash, retrievalRecallJudge, runAgentMemoryExperiment, runAgentMemoryImprovement, runAgentMemoryLearningExperiment, runBoundedMemoryLifecycle, runDiscoveryLoop, runInKnowledgeMutationScope, runInvestmentThesisTask, runKnowledgeBenchmarkSuite, runKnowledgeResearchLoop, runMemoryAdapterBenchmark, runRagKnowledgeImprovementLoop, runRagOptimization, runRetrievalImprovementLoop, runSerializedKnowledgeOptimization, runVerifiedResearchLoop, scenarioContentFingerprint, scoreBm25, scoreKnowledgeBaseIndex, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, scoreRagAnswerArtifact, scoreRetrievalArtifact, searchKnowledge, searchKnowledgePages, sha256, sleepForMemoryRecovery, slugify, snapshotSourceTextInput, sourceMatchesGaps, sourceRegistryPath, stableId, stripFrontmatter, summarizeKnowledgeBenchmarkCampaign, syncDirectory, textSourceAdapter, textSourceId, thesisReadinessSpecs, toAgentCandidateKnowledgeRef, toDeepEvalTestCases, toOffPolicyTrajectory, toRagCheckerRecords, toRagasEvaluationRows, toTruLensRecords, tokenizeQuery, tokenizeText, totalMaterialFacts, triageSource, validateKnowledgeIndex, verdictFor, verifyGradeableEvidence, verifyKnowledgeRetrievalDisposition, verifyKnowledgeRetrievalReceipt, verifyKnowledgeUseReceipt, verifyKnowledgeVisibilitySnapshot, walk, withCitedClaim, withKnowledgeImprovementCandidate, withKnowledgeImprovementComparison, withKnowledgeMutation, withKnowledgeRead, withSafeDescendant, withSafeDirectory, writeFileDurable, writeFileDurableWithinRoot, writeJson, writeJsonDurable, writeJsonDurableWithinRoot, writeKnowledgeIndex, writeSourceRegistry };
8069
8249
 
8070
8250
  //# sourceMappingURL=index.js.map