@tangle-network/agent-knowledge 6.1.11 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +9 -0
- package/CHANGELOG.md +25 -0
- package/README.md +1 -1
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-CmW6iORW.js → benchmarks-C8L7HJb4.js} +2 -2
- package/dist/{benchmarks-CmW6iORW.js.map → benchmarks-C8L7HJb4.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{ids-DRqPZ42_.js → ids-Bevz_pXV.js} +6 -2
- package/dist/ids-Bevz_pXV.js.map +1 -0
- package/dist/{index-CIW3G4s_.d.ts → index-D0wc4GYg.d.ts} +2 -2
- package/dist/{index-CIW3G4s_.d.ts.map → index-D0wc4GYg.d.ts.map} +1 -1
- package/dist/{index-CGBctbit.d.ts → index-Dwp3Mx-w.d.ts} +3 -3
- package/dist/{index-CGBctbit.d.ts.map → index-Dwp3Mx-w.d.ts.map} +1 -1
- package/dist/index.d.ts +377 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -198
- package/dist/index.js.map +1 -1
- package/dist/{inspect-DAXpFyrs.js → inspect-CJQGYuKa.js} +809 -17
- package/dist/inspect-CJQGYuKa.js.map +1 -0
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{memory-C6KPRhoU.js → memory-CIYRB_Q8.js} +3 -3
- package/dist/{memory-C6KPRhoU.js.map → memory-CIYRB_Q8.js.map} +1 -1
- package/dist/sources/index.js +1 -1
- package/dist/types-BOfmvDe-.d.ts +306 -0
- package/dist/{types-DcCCzreS.d.ts.map → types-BOfmvDe-.d.ts.map} +1 -1
- package/dist/viz/index.d.ts +1 -1
- package/docs/architecture.md +32 -0
- package/package.json +1 -1
- package/dist/ids-DRqPZ42_.js.map +0 -1
- package/dist/inspect-DAXpFyrs.js.map +0 -1
- package/dist/types-DcCCzreS.d.ts +0 -175
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { $ as RetrievalConfig, A as KnowledgeBenchmarkResponder, At as AgentMemoryScope, B as KnowledgeMemoryEvent, Bt as RetrievalHoldoutSessionState, C as KnowledgeBenchmarkArtifact, Ct as createInMemoryBenchmarkAdapter, D as KnowledgeBenchmarkEvaluation, Dt as AgentMemoryContext, E as KnowledgeBenchmarkDistribution, Et as AgentMemoryBranchIsolation, F as KnowledgeBenchmarkSplit, Ft as RetrievalHoldoutCallContext, G as MemoryAdapterBenchmarkCandidate, H as KnowledgeRetrievalBenchmarkCase, I as KnowledgeBenchmarkTaskKind, It as RetrievalHoldoutConfig, J as RunKnowledgeBenchmarkSuiteResult, K as MemoryAdapterBenchmarkRankingRow, L as KnowledgeClaimMatcher, Lt as RetrievalHoldoutEligibleItem, M as KnowledgeBenchmarkSliceSummary, Mt as AgentMemoryWriteInput, N as KnowledgeBenchmarkSource, Nt as AgentMemoryWriteResult, O as KnowledgeBenchmarkFamily, Ot as AgentMemoryHit, P as KnowledgeBenchmarkSpec, Pt as RetrievalHoldoutBypassReason, Q as PartitionRetrievalScenariosOptions, R as KnowledgeMemoryBenchmarkCase, Rt as RetrievalHoldoutEvent, S as KnowledgeAnswerBenchmarkTaskKind, St as acquireAgentMemoryRunLease, T as KnowledgeBenchmarkCaseBase, Tt as AgentMemoryAdapter, U as KnowledgeRetrievalBenchmarkQrel, V as KnowledgeMemoryFactMatcher, W as KnowledgeRetrievalBenchmarkQuery, X as RunMemoryAdapterBenchmarkResult, Y as RunMemoryAdapterBenchmarkOptions, Z as BuildRetrievalEvalDispatchOptions, _ as buildIndustryRagBenchmarkSmokeCases, _t as scoreRetrievalArtifact, a as runKnowledgeBenchmarkSuite, at as RetrievalGoldTarget, b as BuildRetrievalBenchmarkCasesFromQrelsOptions, bt as AgentMemoryRunLease, c as buildRetrievalBenchmarkCasesFromQrels, ct as RetrievalRecallJudgeOptions, d as summarizeKnowledgeBenchmarkCampaign, dt as RetrievedSourceSpan, et as RetrievalEvalArtifact, f as runMemoryAdapterBenchmark, ft as buildRetrievalEvalDispatch, g as buildIndustryMemoryBenchmarkSmokeCases, gt as retrievalRecallJudge, h as buildFirstPartyMemoryLifecycleBenchmarkCases, ht as retrievalConfigSurface, i as renderKnowledgeBenchmarkReportMarkdown, it as RetrievalEvalScenario, j as KnowledgeBenchmarkScenario, jt as AgentMemorySearchOptions, k as KnowledgeBenchmarkReport, kt as AgentMemoryKind, l as parseKnowledgeBenchmarkJsonl, lt as RetrievalScenarioPartitions, m as INDUSTRY_RAG_BENCHMARKS, mt as retrievalConfigFromSurface, n as buildKnowledgeBenchmarkScenarios, nt as RetrievalEvalRetrieverInput, o as scoreKnowledgeBenchmarkArtifact, ot as RetrievalMetricSummary, p as INDUSTRY_MEMORY_BENCHMARKS, pt as partitionRetrievalScenarios, q as RunKnowledgeBenchmarkSuiteOptions, r as knowledgeBenchmarkJudge, rt as RetrievalEvalRetrieverResult, s as scoreMemoryBenchmarkArtifact, st as RetrievalMetricWeights, t as isKnowledgeMemoryBenchmarkCase, tt as RetrievalEvalRetriever, u as parseKnowledgeBenchmarkQrels, ut as RetrievedKnowledgeHit, v as respondToIndustryMemoryBenchmarkSmokeCase, vt as AgentMemoryAcquireRunLease, w as KnowledgeBenchmarkCase, wt as createNoopMemoryBenchmarkAdapter, x as KnowledgeAnswerBenchmarkCase, xt as OwnedAgentMemoryRunLease, y as respondToIndustryRagBenchmarkSmokeCase, yt as AgentMemoryControllerMode, z as KnowledgeMemoryBenchmarkTaskKind, zt as RetrievalHoldoutResult } from "./index-
|
|
3
|
-
import { $ as buildAgentMemorySequenceScenarios, A as AgentMemoryFinalPair, At as defaultGetMemoryContext, B as applySessionStickyRetrievalHoldout, C as runBoundedMemoryLifecycle, Ct as AgentMemoryJournalEntry, D as AgentMemoryActivationDriver, Dt as ForkAgentMemoryBranchSnapshotOptions, E as AgentMemoryActivation, Et as CreateAgentMemoryBranchOptions, F as RunAgentMemoryImprovementResult, Ft as SerializedCandidateCodec, G as toOffPolicyTrajectory, H as emitRetrievalHoldoutBypass, I as RetrievalHoldoutOffPolicyOptions, It as jsonCandidateCodec, J as GraphitiToolNames, K as GraphitiMcpClientLike, L as RetrievalHoldoutOffPolicyResult, Lt as jsonObjectCandidateCodec, M as AgentMemoryPromotionDecision, Mt as RunSerializedKnowledgeOptimizationOptions, N as MemoryConfigScenario, Nt as RunSerializedKnowledgeOptimizationResult, O as AgentMemoryDimensionComparison, Ot as createAgentMemoryBranch, P as RunAgentMemoryImprovementOptions, Pt as SerializedCandidate, Q as agentMemorySequenceJudge, R as RetrievalHoldoutSessionSummary, Rt as runSerializedKnowledgeOptimization, S as resolveMemoryCleanupTimeoutMs, St as AgentMemoryBranchSnapshot, T as runAgentMemoryImprovement, Tt as AgentMemoryVisibility, U as resetRetrievalHoldoutRegistry, V as deterministicRng, W as retrievalHoldoutConfigHash, X as graphitiMemoryAdapterIdentity, Y as createGraphitiMemoryAdapter, Z as runAgentMemoryExperiment, _ as AgentMemoryLifecycleTimeoutError, _t as BuildAgentMemorySequencesFromBenchmarkCasesOptions, a as AgentMemoryScopeSchema, at as AgentMemoryExecutionPaidCallInput, b as createMemoryExecutionPool, bt as AgentMemoryBranch, c as createNeo4jAgentMemoryAdapter, ct as AgentMemoryExperimentCandidate, d as Mem0HostedMemoryAdapterOptions, dt as AgentMemorySequence, et as buildAgentMemorySequencesFromBenchmarkCases, f as Mem0MemoryAdapterOptions, ft as AgentMemorySequenceArtifact, g as mem0MemoryAdapterIdentity, gt as AgentMemorySequenceStep, h as createMem0MemoryAdapter, ht as AgentMemorySequenceScenario, i as AgentMemoryKindSchema, it as AgentMemoryExecutionCostReceipt, j as AgentMemoryImprovementRunLease, jt as renderMemoryContext, k as AgentMemoryFinalEvaluation, kt as forkAgentMemoryBranchSnapshot, l as Mem0ClientMode, lt as AgentMemoryExperimentRankingRow, m as Mem0OssMemoryAdapterOptions, mt as AgentMemorySequenceProbeResult, n as memoryWriteResultToSourceRecord, nt as AgentMemoryExecutionContext, o as AgentMemoryWriteInputSchema, ot as AgentMemoryExecutionPaidCallResult, p as Mem0OssClient, pt as AgentMemorySequenceProbe, q as GraphitiMemoryAdapterOptions, r as AgentMemoryHitSchema, rt as AgentMemoryExecutionCostMeter, s as Neo4jAgentMemoryAdapterOptions, st as AgentMemoryExecutionStep, t as memoryHitToSourceRecord, tt as AgentMemoryAttemptEvent, u as Mem0HostedClient, ut as AgentMemoryExperimentRunLease, v as AgentMemoryLifecycleUnsafeError, vt as RunAgentMemoryExperimentOptions, w as sleepForMemoryRecovery, wt as AgentMemorySharingPolicy, x as memoryRecoveryDelayMs, xt as AgentMemoryBranchLifetime, y as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, yt as RunAgentMemoryExperimentResult, z as applyRetrievalHoldout, zt as scenarioContentFingerprint } from "./index-
|
|
1
|
+
import { A as TrackedClaim, C as ResearchClaimEvidence, D as SourceAnchor, E as ResearchSourceVersion, O as SourceRecord, S as KnowledgeWriteParseResult, T as ResearchClaimRecord, _ as KnowledgeRelation, a as KnowledgeBaseCandidate, b as KnowledgeUnit, c as KnowledgeEventType, d as KnowledgeGraphNode, f as KnowledgeId, g as KnowledgePolicy, h as KnowledgePage, i as KNOWLEDGE_EVENT_TYPES, k as SourceRegistry, l as KnowledgeGraph, m as KnowledgeLintFinding, n as DeepQuestion, o as KnowledgeClaim, p as KnowledgeIndex, r as DeepQuestionKind, s as KnowledgeEvent, t as ClaimRef, u as KnowledgeGraphEdge, v as KnowledgeRelease, w as ResearchClaimLedger, x as KnowledgeWriteBlock, y as KnowledgeSearchResult } from "./types-BOfmvDe-.js";
|
|
2
|
+
import { $ as RetrievalConfig, A as KnowledgeBenchmarkResponder, At as AgentMemoryScope, B as KnowledgeMemoryEvent, Bt as RetrievalHoldoutSessionState, C as KnowledgeBenchmarkArtifact, Ct as createInMemoryBenchmarkAdapter, D as KnowledgeBenchmarkEvaluation, Dt as AgentMemoryContext, E as KnowledgeBenchmarkDistribution, Et as AgentMemoryBranchIsolation, F as KnowledgeBenchmarkSplit, Ft as RetrievalHoldoutCallContext, G as MemoryAdapterBenchmarkCandidate, H as KnowledgeRetrievalBenchmarkCase, I as KnowledgeBenchmarkTaskKind, It as RetrievalHoldoutConfig, J as RunKnowledgeBenchmarkSuiteResult, K as MemoryAdapterBenchmarkRankingRow, L as KnowledgeClaimMatcher, Lt as RetrievalHoldoutEligibleItem, M as KnowledgeBenchmarkSliceSummary, Mt as AgentMemoryWriteInput, N as KnowledgeBenchmarkSource, Nt as AgentMemoryWriteResult, O as KnowledgeBenchmarkFamily, Ot as AgentMemoryHit, P as KnowledgeBenchmarkSpec, Pt as RetrievalHoldoutBypassReason, Q as PartitionRetrievalScenariosOptions, R as KnowledgeMemoryBenchmarkCase, Rt as RetrievalHoldoutEvent, S as KnowledgeAnswerBenchmarkTaskKind, St as acquireAgentMemoryRunLease, T as KnowledgeBenchmarkCaseBase, Tt as AgentMemoryAdapter, U as KnowledgeRetrievalBenchmarkQrel, V as KnowledgeMemoryFactMatcher, W as KnowledgeRetrievalBenchmarkQuery, X as RunMemoryAdapterBenchmarkResult, Y as RunMemoryAdapterBenchmarkOptions, Z as BuildRetrievalEvalDispatchOptions, _ as buildIndustryRagBenchmarkSmokeCases, _t as scoreRetrievalArtifact, a as runKnowledgeBenchmarkSuite, at as RetrievalGoldTarget, b as BuildRetrievalBenchmarkCasesFromQrelsOptions, bt as AgentMemoryRunLease, c as buildRetrievalBenchmarkCasesFromQrels, ct as RetrievalRecallJudgeOptions, d as summarizeKnowledgeBenchmarkCampaign, dt as RetrievedSourceSpan, et as RetrievalEvalArtifact, f as runMemoryAdapterBenchmark, ft as buildRetrievalEvalDispatch, g as buildIndustryMemoryBenchmarkSmokeCases, gt as retrievalRecallJudge, h as buildFirstPartyMemoryLifecycleBenchmarkCases, ht as retrievalConfigSurface, i as renderKnowledgeBenchmarkReportMarkdown, it as RetrievalEvalScenario, j as KnowledgeBenchmarkScenario, jt as AgentMemorySearchOptions, k as KnowledgeBenchmarkReport, kt as AgentMemoryKind, l as parseKnowledgeBenchmarkJsonl, lt as RetrievalScenarioPartitions, m as INDUSTRY_RAG_BENCHMARKS, mt as retrievalConfigFromSurface, n as buildKnowledgeBenchmarkScenarios, nt as RetrievalEvalRetrieverInput, o as scoreKnowledgeBenchmarkArtifact, ot as RetrievalMetricSummary, p as INDUSTRY_MEMORY_BENCHMARKS, pt as partitionRetrievalScenarios, q as RunKnowledgeBenchmarkSuiteOptions, r as knowledgeBenchmarkJudge, rt as RetrievalEvalRetrieverResult, s as scoreMemoryBenchmarkArtifact, st as RetrievalMetricWeights, t as isKnowledgeMemoryBenchmarkCase, tt as RetrievalEvalRetriever, u as parseKnowledgeBenchmarkQrels, ut as RetrievedKnowledgeHit, v as respondToIndustryMemoryBenchmarkSmokeCase, vt as AgentMemoryAcquireRunLease, w as KnowledgeBenchmarkCase, wt as createNoopMemoryBenchmarkAdapter, x as KnowledgeAnswerBenchmarkCase, xt as OwnedAgentMemoryRunLease, y as respondToIndustryRagBenchmarkSmokeCase, yt as AgentMemoryControllerMode, z as KnowledgeMemoryBenchmarkTaskKind, zt as RetrievalHoldoutResult } from "./index-D0wc4GYg.js";
|
|
3
|
+
import { $ as buildAgentMemorySequenceScenarios, A as AgentMemoryFinalPair, At as defaultGetMemoryContext, B as applySessionStickyRetrievalHoldout, C as runBoundedMemoryLifecycle, Ct as AgentMemoryJournalEntry, D as AgentMemoryActivationDriver, Dt as ForkAgentMemoryBranchSnapshotOptions, E as AgentMemoryActivation, Et as CreateAgentMemoryBranchOptions, F as RunAgentMemoryImprovementResult, Ft as SerializedCandidateCodec, G as toOffPolicyTrajectory, H as emitRetrievalHoldoutBypass, I as RetrievalHoldoutOffPolicyOptions, It as jsonCandidateCodec, J as GraphitiToolNames, K as GraphitiMcpClientLike, L as RetrievalHoldoutOffPolicyResult, Lt as jsonObjectCandidateCodec, M as AgentMemoryPromotionDecision, Mt as RunSerializedKnowledgeOptimizationOptions, N as MemoryConfigScenario, Nt as RunSerializedKnowledgeOptimizationResult, O as AgentMemoryDimensionComparison, Ot as createAgentMemoryBranch, P as RunAgentMemoryImprovementOptions, Pt as SerializedCandidate, Q as agentMemorySequenceJudge, R as RetrievalHoldoutSessionSummary, Rt as runSerializedKnowledgeOptimization, S as resolveMemoryCleanupTimeoutMs, St as AgentMemoryBranchSnapshot, T as runAgentMemoryImprovement, Tt as AgentMemoryVisibility, U as resetRetrievalHoldoutRegistry, V as deterministicRng, W as retrievalHoldoutConfigHash, X as graphitiMemoryAdapterIdentity, Y as createGraphitiMemoryAdapter, Z as runAgentMemoryExperiment, _ as AgentMemoryLifecycleTimeoutError, _t as BuildAgentMemorySequencesFromBenchmarkCasesOptions, a as AgentMemoryScopeSchema, at as AgentMemoryExecutionPaidCallInput, b as createMemoryExecutionPool, bt as AgentMemoryBranch, c as createNeo4jAgentMemoryAdapter, ct as AgentMemoryExperimentCandidate, d as Mem0HostedMemoryAdapterOptions, dt as AgentMemorySequence, et as buildAgentMemorySequencesFromBenchmarkCases, f as Mem0MemoryAdapterOptions, ft as AgentMemorySequenceArtifact, g as mem0MemoryAdapterIdentity, gt as AgentMemorySequenceStep, h as createMem0MemoryAdapter, ht as AgentMemorySequenceScenario, i as AgentMemoryKindSchema, it as AgentMemoryExecutionCostReceipt, j as AgentMemoryImprovementRunLease, jt as renderMemoryContext, k as AgentMemoryFinalEvaluation, kt as forkAgentMemoryBranchSnapshot, l as Mem0ClientMode, lt as AgentMemoryExperimentRankingRow, m as Mem0OssMemoryAdapterOptions, mt as AgentMemorySequenceProbeResult, n as memoryWriteResultToSourceRecord, nt as AgentMemoryExecutionContext, o as AgentMemoryWriteInputSchema, ot as AgentMemoryExecutionPaidCallResult, p as Mem0OssClient, pt as AgentMemorySequenceProbe, q as GraphitiMemoryAdapterOptions, r as AgentMemoryHitSchema, rt as AgentMemoryExecutionCostMeter, s as Neo4jAgentMemoryAdapterOptions, st as AgentMemoryExecutionStep, t as memoryHitToSourceRecord, tt as AgentMemoryAttemptEvent, u as Mem0HostedClient, ut as AgentMemoryExperimentRunLease, v as AgentMemoryLifecycleUnsafeError, vt as RunAgentMemoryExperimentOptions, w as sleepForMemoryRecovery, wt as AgentMemorySharingPolicy, x as memoryRecoveryDelayMs, xt as AgentMemoryBranchLifetime, y as DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, yt as RunAgentMemoryExperimentResult, z as applyRetrievalHoldout, zt as scenarioContentFingerprint } from "./index-Dwp3Mx-w.js";
|
|
4
4
|
import { CornellLiiSelector, CornellLiiSourceOptions, FetchOpts, FragmentProvenance, IRS_DIMENSION_HINTS, IrsPublicationsSourceOptions, KnowledgeFragment, KnowledgeSource, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, POLITE_USER_AGENT, PoliteFetchOptions, PoliteFetchResult, StateSosEntity, StateSosSourceConfig, __resetHttpThrottle, createCornellLiiSource, createIrsPublicationsSource, createStateSosSource, extractLinks, firstMatch, htmlToText, innerHtmlById, looksLikeBlockPage, politeFetch } from "./sources/index.js";
|
|
5
5
|
import { AgentCandidateJsonValue, AgentCandidateKnowledgeRef, AgentImprovementActivation, AgentImprovementActivationResult } from "@tangle-network/agent-interface";
|
|
6
6
|
import { AnalystFinding, AnalystSeverity, ControlEvalResult, ControlRuntimeConfig, DataAcquisitionPlan, DatasetScenario, GateDecision, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeSensitivity, ReleaseConfidenceScorecard, ReleaseTraceEvidence, RunRecord, UserQuestion } from "@tangle-network/agent-eval";
|
|
@@ -135,6 +135,8 @@ interface AddSourceTextInput {
|
|
|
135
135
|
lastVerifiedAt?: string;
|
|
136
136
|
metadata?: Record<string, unknown>;
|
|
137
137
|
}
|
|
138
|
+
/** Copy and freeze an untrusted source proposal before any asynchronous work. */
|
|
139
|
+
declare function snapshotSourceTextInput(input: AddSourceTextInput): AddSourceTextInput;
|
|
138
140
|
declare function loadSourceRegistry(root: string): Promise<SourceRegistry>;
|
|
139
141
|
declare function writeSourceRegistry(root: string, registry: SourceRegistry): Promise<void>;
|
|
140
142
|
declare function addSourcePath(root: string, sourcePath: string, options?: AddSourceOptions): Promise<SourceRecord[]>;
|
|
@@ -238,11 +240,21 @@ interface DriverResearchContext {
|
|
|
238
240
|
* open. Only invoked when `driverResearches` is true.
|
|
239
241
|
* - `foldGaps` — turn the remaining gaps into a steer string for the worker's
|
|
240
242
|
* next prompt. Defaults to a compact bulleted list when omitted.
|
|
243
|
+
* - `checkpoint` — write whatever state the driver accumulated to durable
|
|
244
|
+
* storage. Called at the end of every round, after `foldGaps`, so state that
|
|
245
|
+
* a synchronous hook produced is on disk before the next round can crash.
|
|
246
|
+
* - `prepareFold` — durably announce the next synchronous fold before it runs,
|
|
247
|
+
* so a crash between question generation and `checkpoint` can be recovered.
|
|
248
|
+
* - `commitSources` — confirm exact source records are durable after verification;
|
|
249
|
+
* drivers with pending evidence must not count it before this callback.
|
|
241
250
|
*/
|
|
242
251
|
interface ResearchDriver {
|
|
243
252
|
verifySource(source: ResearchSourceProposal, ctx: SourceVerificationContext): Promise<SourceVerdict> | SourceVerdict;
|
|
244
253
|
research?(ctx: DriverResearchContext): Promise<ResearchContribution> | ResearchContribution;
|
|
245
254
|
foldGaps?(gaps: KnowledgeGap[]): string;
|
|
255
|
+
prepareFold?(): Promise<void> | void;
|
|
256
|
+
commitSources?(sources: readonly SourceRecord[]): Promise<void> | void;
|
|
257
|
+
checkpoint?(): Promise<void> | void;
|
|
246
258
|
}
|
|
247
259
|
type SourceVerdict = {
|
|
248
260
|
accept: true;
|
|
@@ -1612,6 +1624,106 @@ interface WorkerClaimDecorationOptions {
|
|
|
1612
1624
|
*/
|
|
1613
1625
|
declare function createClaimDecorator(options?: WorkerClaimDecorationOptions): (source: ResearchSourceProposal, goal: string) => Promise<ResearchSourceProposal>;
|
|
1614
1626
|
//#endregion
|
|
1627
|
+
//#region src/claim-ledger.d.ts
|
|
1628
|
+
/**
|
|
1629
|
+
* Claim identity = sha256 of the normalized claim text, so the same assertion
|
|
1630
|
+
* discovered independently by two workers is ONE claim with two supporting
|
|
1631
|
+
* sources rather than two claims with one each — which is the difference
|
|
1632
|
+
* between corroborated and unsupported.
|
|
1633
|
+
*/
|
|
1634
|
+
declare function claimId(text: string): string;
|
|
1635
|
+
/** Stable identity for one extracted claim/source/contradiction observation. */
|
|
1636
|
+
declare function claimEvidenceId(claim: Pick<ResearchClaimEvidence, 'claimId' | 'sourceId' | 'sourceUri' | 'sourceContentHash' | 'contradictsClaimId'>): string;
|
|
1637
|
+
/** Canonical key for one exact registry-id + original-URI + hash source version. */
|
|
1638
|
+
declare function researchSourceVersionKey(source: Pick<ResearchSourceVersion, 'sourceId' | 'uri' | 'contentHash'>): string;
|
|
1639
|
+
/** Case-, whitespace-, and stylistic-punctuation-insensitive claim identity form. */
|
|
1640
|
+
declare function normalizeClaimText(text: string): string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The canonical host a source uri counts as, which is what makes two sources
|
|
1643
|
+
* INDEPENDENT: corroboration is "distinct hosts", so this function is the rule
|
|
1644
|
+
* that decides whether a claim is confirmed or merely repeated. Exported so a
|
|
1645
|
+
* consumer building a `ResearchClaimRecord` cannot answer it a different way — a
|
|
1646
|
+
* consumer that counted raw uris would report two pages of one site as
|
|
1647
|
+
* independent confirmation.
|
|
1648
|
+
*/
|
|
1649
|
+
declare function claimSourceHost(uri: string): string;
|
|
1650
|
+
/** Stable identity for one deep question. */
|
|
1651
|
+
declare function deepQuestionId(kind: DeepQuestion['kind'], text: string): string;
|
|
1652
|
+
/**
|
|
1653
|
+
* Refuse a claim record whose identity or source count disagrees with its evidence.
|
|
1654
|
+
*
|
|
1655
|
+
* `supportingHosts` is used as the independent-source count, so accepting hosts
|
|
1656
|
+
* that cannot be derived from `supportingUris` would let a malformed record
|
|
1657
|
+
* manufacture corroboration. Canonical ordering also makes equal records have
|
|
1658
|
+
* equal bytes regardless of which process assembled them.
|
|
1659
|
+
*/
|
|
1660
|
+
declare function assertTrackedClaimIntegrity(claim: ResearchClaimRecord): void;
|
|
1661
|
+
/** Refuse a deep question whose stable identity or set fields are malformed. */
|
|
1662
|
+
declare function assertDeepQuestionIntegrity(question: DeepQuestion): void;
|
|
1663
|
+
/** Refuse an extracted observation whose identity or content is malformed. */
|
|
1664
|
+
declare function assertResearchClaimEvidenceIntegrity(evidence: ResearchClaimEvidence): void;
|
|
1665
|
+
/** Refuse a ledger that is not one canonical, internally consistent record. */
|
|
1666
|
+
declare function assertResearchClaimLedgerIntegrity(ledger: ResearchClaimLedger): void;
|
|
1667
|
+
/** A ledger with nothing in it yet. */
|
|
1668
|
+
declare function emptyClaimLedger(id: string, goal?: string): ResearchClaimLedger;
|
|
1669
|
+
/**
|
|
1670
|
+
* Turn only evidence backed by a confirmed source registration into support.
|
|
1671
|
+
*
|
|
1672
|
+
* This is a monotone closure: it never removes claims or evidence, and running
|
|
1673
|
+
* it twice is a no-op. Keeping it in the ledger algebra means a source-confirming
|
|
1674
|
+
* writer and an evidence-producing writer can arrive in either order.
|
|
1675
|
+
*/
|
|
1676
|
+
declare function materializeRegisteredClaimEvidence(ledger: ResearchClaimLedger): ResearchClaimLedger;
|
|
1677
|
+
/**
|
|
1678
|
+
* Raised when two ledgers that accumulated evidence for DIFFERENT goals are
|
|
1679
|
+
* combined. Merging them would pool two questions' evidence into one
|
|
1680
|
+
* corroboration count, which reports a claim as independently confirmed when
|
|
1681
|
+
* nobody confirmed it — strictly worse than losing the ledger, so this refuses.
|
|
1682
|
+
*/
|
|
1683
|
+
declare class ClaimLedgerGoalConflictError extends Error {
|
|
1684
|
+
readonly ledgerId: string;
|
|
1685
|
+
readonly existingGoal: string;
|
|
1686
|
+
readonly incomingGoal: string;
|
|
1687
|
+
constructor(ledgerId: string, existingGoal: string, incomingGoal: string);
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Combine two records of the same claim.
|
|
1691
|
+
*
|
|
1692
|
+
* Union on every support collection, because a claim asserted by hosts {a} in
|
|
1693
|
+
* one writer and {b} in another is asserted by two independent hosts and the
|
|
1694
|
+
* whole completion oracle turns on that count. `contested` is OR — one writer
|
|
1695
|
+
* seeing a contradiction is enough for the claim to be contested, and no later
|
|
1696
|
+
* writer that simply did not see it may clear the flag.
|
|
1697
|
+
*/
|
|
1698
|
+
declare function mergeTrackedClaims(base: ResearchClaimRecord, incoming: ResearchClaimRecord): ResearchClaimRecord;
|
|
1699
|
+
/**
|
|
1700
|
+
* Combine two ledgers for the same run.
|
|
1701
|
+
*
|
|
1702
|
+
* `addressed` on a question is OR for the same reason `contested` is: a writer
|
|
1703
|
+
* that answered a question has answered it, and a writer that never saw the
|
|
1704
|
+
* answer must not reopen it. Everything else is a union or an extreme, so this
|
|
1705
|
+
* is associative and idempotent — merge order cannot change the result and a
|
|
1706
|
+
* replayed merge is a no-op.
|
|
1707
|
+
*/
|
|
1708
|
+
declare function mergeClaimLedgers(base: ResearchClaimLedger, incoming: ResearchClaimLedger): ResearchClaimLedger;
|
|
1709
|
+
/**
|
|
1710
|
+
* Make every contradiction edge symmetric and mark both ends contested.
|
|
1711
|
+
*
|
|
1712
|
+
* A contradiction is a property of a PAIR, and a writer only ever sees one side
|
|
1713
|
+
* of it: the worker that found the refuting source records "X contradicts Y" and
|
|
1714
|
+
* knows nothing about Y's record. Left one-sided, Y reads as an uncontested
|
|
1715
|
+
* claim, and the completion oracle would settle a question two sources disagree
|
|
1716
|
+
* about. `createResearchDrivingDriver` does this pairwise as it records; this is
|
|
1717
|
+
* the same rule stated over a whole ledger, for writers that assemble one from
|
|
1718
|
+
* events rather than from a live loop.
|
|
1719
|
+
*
|
|
1720
|
+
* One-sided observations stay in `claimEvidence` until both claims are backed
|
|
1721
|
+
* by registered source versions. The materialized claim projection contains
|
|
1722
|
+
* only closed pairs, so it cannot report a lone weak claim as settled merely
|
|
1723
|
+
* because its evidence named a claim that never arrived.
|
|
1724
|
+
*/
|
|
1725
|
+
declare function linkClaimContradictions(ledger: ResearchClaimLedger): ResearchClaimLedger;
|
|
1726
|
+
//#endregion
|
|
1615
1727
|
//#region src/collection-research-driver.d.ts
|
|
1616
1728
|
/**
|
|
1617
1729
|
* Build the single-agent collection driver. Accepts every source; never gates,
|
|
@@ -1687,6 +1799,39 @@ interface RunDiscoveryLoopOptions {
|
|
|
1687
1799
|
declare function runDiscoveryLoop(options: RunDiscoveryLoopOptions): Promise<DiscoveryLoopResult>;
|
|
1688
1800
|
declare function createLocalDiscoveryDispatcher(worker: KnowledgeDiscoveryWorker): KnowledgeDiscoveryDispatcher;
|
|
1689
1801
|
//#endregion
|
|
1802
|
+
//#region src/durable-fs.d.ts
|
|
1803
|
+
interface RegularFileSnapshot {
|
|
1804
|
+
bytes: Buffer;
|
|
1805
|
+
mode: number;
|
|
1806
|
+
}
|
|
1807
|
+
declare function writeFileDurable(path: string, data: string | Buffer, options?: {
|
|
1808
|
+
encoding?: BufferEncoding;
|
|
1809
|
+
mode?: number;
|
|
1810
|
+
}): Promise<void>;
|
|
1811
|
+
declare function writeJsonDurable(path: string, value: unknown): Promise<void>;
|
|
1812
|
+
declare function writeFileDurableWithinRoot(root: string, relativePath: string, data: string | Buffer, options?: {
|
|
1813
|
+
encoding?: BufferEncoding;
|
|
1814
|
+
mode?: number;
|
|
1815
|
+
}): Promise<void>;
|
|
1816
|
+
declare function writeJsonDurableWithinRoot(root: string, relativePath: string, value: unknown): Promise<void>;
|
|
1817
|
+
declare function renameDurable(source: string, target: string): Promise<void>;
|
|
1818
|
+
declare function removeDurable(path: string): Promise<void>;
|
|
1819
|
+
declare function syncDirectory(path: string): Promise<void>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Keeps the target's parent directory open while the operation runs. On Linux,
|
|
1822
|
+
* `/proc/self/fd` anchors every lookup to that directory even if an ancestor is
|
|
1823
|
+
* renamed concurrently.
|
|
1824
|
+
*/
|
|
1825
|
+
declare function withSafeDescendant<T>(root: string, relativePath: string, use: (path: string) => Promise<T> | T): Promise<T>;
|
|
1826
|
+
declare function withSafeDirectory<T>(root: string, relativePath: string, create: boolean, use: (path: string) => Promise<T> | T): Promise<T>;
|
|
1827
|
+
declare function readRegularFileNoFollow(path: string): Promise<RegularFileSnapshot>;
|
|
1828
|
+
declare function readRegularFileWithinRoot(root: string, relativePath: string): Promise<RegularFileSnapshot>;
|
|
1829
|
+
declare function listRegularFilesWithinRoot(root: string, relativeDirectory: string): Promise<Array<RegularFileSnapshot & {
|
|
1830
|
+
path: string;
|
|
1831
|
+
}>>;
|
|
1832
|
+
declare function isMissingFile(error: unknown): boolean;
|
|
1833
|
+
declare function isKernelAnchoredPath(path: string): boolean;
|
|
1834
|
+
//#endregion
|
|
1690
1835
|
//#region src/events.d.ts
|
|
1691
1836
|
interface KnowledgeEventQuery {
|
|
1692
1837
|
type?: KnowledgeEventType;
|
|
@@ -1856,9 +2001,20 @@ declare function buildKnowledgeGraph(pages: KnowledgePage[]): KnowledgeGraph;
|
|
|
1856
2001
|
declare function sha256(text: string): string;
|
|
1857
2002
|
declare function slugify(input: string): string;
|
|
1858
2003
|
declare function stableId(prefix: string, content: string): string;
|
|
2004
|
+
/** Canonical registry id for exact text submitted at one original URI. */
|
|
2005
|
+
declare function textSourceId(uri: string, contentHash: string): string;
|
|
1859
2006
|
//#endregion
|
|
1860
2007
|
//#region src/indexer.d.ts
|
|
1861
2008
|
declare function buildKnowledgeIndex(root: string): Promise<KnowledgeIndex>;
|
|
2009
|
+
/**
|
|
2010
|
+
* Build the index from the knowledge tree and store it.
|
|
2011
|
+
*
|
|
2012
|
+
* The write goes through `FileSystemKbStore` rather than straight to disk: this
|
|
2013
|
+
* function and the store used to write two different index files in two
|
|
2014
|
+
* different places, so a knowledge base could hold two disagreeing indexes and
|
|
2015
|
+
* a store-based reader saw none of the indexer's work. One writer now, and it
|
|
2016
|
+
* validates through `KnowledgeIndexSchema` on the way out.
|
|
2017
|
+
*/
|
|
1862
2018
|
declare function writeKnowledgeIndex(root: string): Promise<KnowledgeIndex>;
|
|
1863
2019
|
//#endregion
|
|
1864
2020
|
//#region src/inspect.d.ts
|
|
@@ -2119,6 +2275,28 @@ interface ThesisRunResult {
|
|
|
2119
2275
|
declare function runInvestmentThesisTask(input: ThesisTaskInput, options: ThesisRunOptions): Promise<ThesisRunResult>;
|
|
2120
2276
|
//#endregion
|
|
2121
2277
|
//#region src/kb-store.d.ts
|
|
2278
|
+
/**
|
|
2279
|
+
* Where a filesystem knowledge base keeps its machine-written records, relative
|
|
2280
|
+
* to the knowledge-base root.
|
|
2281
|
+
*
|
|
2282
|
+
* This is the ONE location. `FileSystemKbStore` used to write `<dir>/index.json`
|
|
2283
|
+
* while `writeKnowledgeIndex` wrote `<root>/.agent-knowledge/index.json` — two
|
|
2284
|
+
* index writers, two files, and only the second one reachable, so a store that
|
|
2285
|
+
* had just been written to reported an empty knowledge base. Both now go through
|
|
2286
|
+
* `FileSystemKbStore`, anchored on the knowledge-base root, which is also the
|
|
2287
|
+
* directory `withKnowledgeMutation` locks: one file, one lock domain.
|
|
2288
|
+
*/
|
|
2289
|
+
declare const KB_STORE_DIR = ".agent-knowledge";
|
|
2290
|
+
declare const KB_INDEX_PATH = ".agent-knowledge/index.json";
|
|
2291
|
+
declare const KB_EVENTS_PATH = ".agent-knowledge/events.json";
|
|
2292
|
+
declare const KB_CLAIM_LEDGER_DIR = ".agent-knowledge/claim-ledgers";
|
|
2293
|
+
declare function assertClaimLedgerId(id: string): string;
|
|
2294
|
+
/** A URI-only ledger cannot be upgraded without re-verifying its source bytes. */
|
|
2295
|
+
declare class ClaimLedgerMigrationRequiredError extends Error {
|
|
2296
|
+
readonly ledgerId: string;
|
|
2297
|
+
readonly foundSchemaVersion: number | 'unversioned';
|
|
2298
|
+
constructor(ledgerId: string, foundSchemaVersion: number | 'unversioned');
|
|
2299
|
+
}
|
|
2122
2300
|
interface KbStore {
|
|
2123
2301
|
putSource(source: SourceRecord): Promise<void>;
|
|
2124
2302
|
getSource(id: string): Promise<SourceRecord | null>;
|
|
@@ -2131,10 +2309,38 @@ interface KbStore {
|
|
|
2131
2309
|
putEvent(event: KnowledgeEvent): Promise<void>;
|
|
2132
2310
|
listEvents(query?: KnowledgeEventQuery): Promise<KnowledgeEvent[]>;
|
|
2133
2311
|
}
|
|
2134
|
-
|
|
2312
|
+
/** Optional durable capability for stores that retain per-run research belief. */
|
|
2313
|
+
interface ClaimLedgerStore {
|
|
2314
|
+
/**
|
|
2315
|
+
* Persist one research run's claim ledger — the corroboration counts,
|
|
2316
|
+
* contradiction edges, and open deep questions that make up its belief state.
|
|
2317
|
+
* Addressed by `ledger.id` so two runs against one knowledge base cannot
|
|
2318
|
+
* overwrite each other.
|
|
2319
|
+
*/
|
|
2320
|
+
putClaimLedger(ledger: ResearchClaimLedger): Promise<void>;
|
|
2321
|
+
getClaimLedger(id: string): Promise<ResearchClaimLedger | null>;
|
|
2322
|
+
listClaimLedgers(): Promise<ResearchClaimLedger[]>;
|
|
2323
|
+
/**
|
|
2324
|
+
* Read one ledger, hand it to `merge`, and write what comes back — with the
|
|
2325
|
+
* store's exclusive lock held across all three steps.
|
|
2326
|
+
*
|
|
2327
|
+
* This is the call a concurrent writer must use, and `putClaimLedger` is the
|
|
2328
|
+
* one it must not. `putClaimLedger` writes the whole record, so two writers
|
|
2329
|
+
* accumulating into one ledger each write a record built from what they read
|
|
2330
|
+
* before the other wrote, and the later write erases the earlier writer's
|
|
2331
|
+
* claims. Persisting a ledger that loses half its evidence is not compounding
|
|
2332
|
+
* knowledge; it is losing it more slowly.
|
|
2333
|
+
*
|
|
2334
|
+
* `merge` is SYNCHRONOUS on purpose: it runs inside the critical section, and
|
|
2335
|
+
* an `await` in there is a lock held across arbitrary I/O.
|
|
2336
|
+
*/
|
|
2337
|
+
mergeClaimLedger(id: string, merge: (current: ResearchClaimLedger | null) => ResearchClaimLedger): Promise<ResearchClaimLedger>;
|
|
2338
|
+
}
|
|
2339
|
+
declare class MemoryKbStore implements KbStore, ClaimLedgerStore {
|
|
2135
2340
|
private readonly sources;
|
|
2136
2341
|
private readonly pages;
|
|
2137
2342
|
private readonly events;
|
|
2343
|
+
private readonly claimLedgers;
|
|
2138
2344
|
private index;
|
|
2139
2345
|
putSource(source: SourceRecord): Promise<void>;
|
|
2140
2346
|
getSource(id: string): Promise<SourceRecord | null>;
|
|
@@ -2146,10 +2352,35 @@ declare class MemoryKbStore implements KbStore {
|
|
|
2146
2352
|
getIndex(): Promise<KnowledgeIndex | null>;
|
|
2147
2353
|
putEvent(event: KnowledgeEvent): Promise<void>;
|
|
2148
2354
|
listEvents(query?: KnowledgeEventQuery): Promise<KnowledgeEvent[]>;
|
|
2355
|
+
putClaimLedger(ledger: ResearchClaimLedger): Promise<void>;
|
|
2356
|
+
getClaimLedger(id: string): Promise<ResearchClaimLedger | null>;
|
|
2357
|
+
listClaimLedgers(): Promise<ResearchClaimLedger[]>;
|
|
2358
|
+
mergeClaimLedger(id: string, merge: (current: ResearchClaimLedger | null) => ResearchClaimLedger): Promise<ResearchClaimLedger>;
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* The durable record store for one knowledge base.
|
|
2362
|
+
*
|
|
2363
|
+
* The object constructor is anchored on the knowledge-base root and keeps its
|
|
2364
|
+
* records under `<root>/.agent-knowledge/`, which is the layout used by
|
|
2365
|
+
* `writeKnowledgeIndex`. The string constructor preserves the published direct
|
|
2366
|
+
* record-directory layout (`<directory>/index.json`).
|
|
2367
|
+
*/
|
|
2368
|
+
interface FileSystemKbStoreOptions {
|
|
2369
|
+
/** Knowledge-base root; records are stored under `<root>/.agent-knowledge/`. */
|
|
2370
|
+
root: string;
|
|
2149
2371
|
}
|
|
2150
|
-
declare class FileSystemKbStore implements KbStore {
|
|
2151
|
-
private readonly
|
|
2152
|
-
|
|
2372
|
+
declare class FileSystemKbStore implements KbStore, ClaimLedgerStore {
|
|
2373
|
+
private readonly root;
|
|
2374
|
+
private readonly indexPath;
|
|
2375
|
+
private readonly eventsPath;
|
|
2376
|
+
private readonly claimLedgerDir;
|
|
2377
|
+
/**
|
|
2378
|
+
* A string retains the published direct-directory contract.
|
|
2379
|
+
* The object form explicitly selects a knowledge-base root and the canonical
|
|
2380
|
+
* `.agent-knowledge/` layout. A string naming that exact canonical directory
|
|
2381
|
+
* keeps its file paths but shares the root form's lock domain.
|
|
2382
|
+
*/
|
|
2383
|
+
constructor(input: string | FileSystemKbStoreOptions);
|
|
2153
2384
|
putSource(source: SourceRecord): Promise<void>;
|
|
2154
2385
|
getSource(id: string): Promise<SourceRecord | null>;
|
|
2155
2386
|
listSources(): Promise<SourceRecord[]>;
|
|
@@ -2160,9 +2391,14 @@ declare class FileSystemKbStore implements KbStore {
|
|
|
2160
2391
|
getIndex(): Promise<KnowledgeIndex | null>;
|
|
2161
2392
|
putEvent(event: KnowledgeEvent): Promise<void>;
|
|
2162
2393
|
listEvents(query?: KnowledgeEventQuery): Promise<KnowledgeEvent[]>;
|
|
2394
|
+
putClaimLedger(ledger: ResearchClaimLedger): Promise<void>;
|
|
2395
|
+
getClaimLedger(id: string): Promise<ResearchClaimLedger | null>;
|
|
2396
|
+
listClaimLedgers(): Promise<ResearchClaimLedger[]>;
|
|
2397
|
+
mergeClaimLedger(id: string, merge: (current: ResearchClaimLedger | null) => ResearchClaimLedger): Promise<ResearchClaimLedger>;
|
|
2163
2398
|
private updateIndex;
|
|
2164
2399
|
private readIndex;
|
|
2165
2400
|
private readEvents;
|
|
2401
|
+
private claimLedgerPath;
|
|
2166
2402
|
}
|
|
2167
2403
|
//#endregion
|
|
2168
2404
|
//#region src/lint.d.ts
|
|
@@ -2354,43 +2590,9 @@ interface KnowledgeReleaseInput {
|
|
|
2354
2590
|
declare function knowledgeReleaseReport(input: KnowledgeReleaseInput): KnowledgeReleaseReport;
|
|
2355
2591
|
//#endregion
|
|
2356
2592
|
//#region src/research-driving-driver.d.ts
|
|
2357
|
-
/** The four deep sub-question kinds the driver generates to drive depth. */
|
|
2358
|
-
type DeepQuestionKind = 'comparative' | 'mechanism' | 'gap' | 'contradiction';
|
|
2359
|
-
/** A deep sub-question the driver folds into the worker's next prompt. */
|
|
2360
|
-
interface DeepQuestion {
|
|
2361
|
-
kind: DeepQuestionKind;
|
|
2362
|
-
text: string;
|
|
2363
|
-
/** sha256-derived stable id, so "addressed" can be tracked across rounds. */
|
|
2364
|
-
id: string;
|
|
2365
|
-
/** Claim id(s) this question interrogates (for contradiction/mechanism kinds). */
|
|
2366
|
-
claimIds: string[];
|
|
2367
|
-
/** True once a later round's evidence addressed it (see `markAddressed`). */
|
|
2368
|
-
addressed: boolean;
|
|
2369
|
-
/** The round this question was raised in. */
|
|
2370
|
-
raisedRound: number;
|
|
2371
|
-
}
|
|
2372
|
-
/** One tracked claim plus the independent sources that assert it. */
|
|
2373
|
-
interface TrackedClaim {
|
|
2374
|
-
id: string;
|
|
2375
|
-
/** The claim text as first extracted (kept for prompts/audit). */
|
|
2376
|
-
text: string;
|
|
2377
|
-
/** Canonical hosts of the INDEPENDENT sources that assert this claim. */
|
|
2378
|
-
supportingHosts: Set<string>;
|
|
2379
|
-
/** Source URIs that assert this claim (provenance; may share a host). */
|
|
2380
|
-
supportingUris: string[];
|
|
2381
|
-
/** Claim ids this claim was found to CONTRADICT (and vice versa). */
|
|
2382
|
-
contradicts: Set<string>;
|
|
2383
|
-
/**
|
|
2384
|
-
* CONTESTED = a contradiction the loop surfaced but could not resolve to a
|
|
2385
|
-
* single supported claim. A contested claim counts as "settled enough to be
|
|
2386
|
-
* done" (we report the disagreement) even with < 2 independent sources.
|
|
2387
|
-
*/
|
|
2388
|
-
contested: boolean;
|
|
2389
|
-
firstSeenRound: number;
|
|
2390
|
-
}
|
|
2391
2593
|
/** The driver's accumulated research state — the completion oracle reads this. */
|
|
2392
2594
|
interface ResearchDrivingState {
|
|
2393
|
-
/** Every claim
|
|
2595
|
+
/** Every extracted claim backed by a registered source, by id. */
|
|
2394
2596
|
claims: TrackedClaim[];
|
|
2395
2597
|
/** Every deep sub-question raised, by id. */
|
|
2396
2598
|
questions: DeepQuestion[];
|
|
@@ -2427,6 +2629,20 @@ interface ResearchDrivingDriverOptions {
|
|
|
2427
2629
|
/** Observe each round's generated steer (for instrumentation / the script). */
|
|
2428
2630
|
onSteer?: (steer: ResearchDrivingSteer) => void;
|
|
2429
2631
|
}
|
|
2632
|
+
/**
|
|
2633
|
+
* Options for the durable driver: the same driver plus a store to keep its
|
|
2634
|
+
* belief state in.
|
|
2635
|
+
*/
|
|
2636
|
+
interface PersistentResearchDrivingDriverOptions extends ResearchDrivingDriverOptions {
|
|
2637
|
+
/** Where the claim ledger is read from and written to. */
|
|
2638
|
+
store: ClaimLedgerStore;
|
|
2639
|
+
/**
|
|
2640
|
+
* Names this run's ledger. Stable across resumes (that is what makes a resume
|
|
2641
|
+
* a resume) and distinct per run against one knowledge base. Must be a single
|
|
2642
|
+
* safe path segment — see `assertClaimLedgerId`.
|
|
2643
|
+
*/
|
|
2644
|
+
ledgerId: string;
|
|
2645
|
+
}
|
|
2430
2646
|
/** What the driver folded into one round's worker prompt, surfaced for audit. */
|
|
2431
2647
|
interface ResearchDrivingSteer {
|
|
2432
2648
|
round: number;
|
|
@@ -2459,8 +2675,43 @@ interface ResearchDrivingDriver extends ResearchDriver {
|
|
|
2459
2675
|
* to assert the driver produced deeper questions / invalidation challenges.
|
|
2460
2676
|
*/
|
|
2461
2677
|
lastSteer(): ResearchDrivingSteer | undefined;
|
|
2678
|
+
/**
|
|
2679
|
+
* Write the current belief state to the store. `verifySource` already persists
|
|
2680
|
+
* each pending observation; this exists for the state `foldGaps` produces —
|
|
2681
|
+
* the deep questions — which is raised by a synchronous hook and would
|
|
2682
|
+
* otherwise be lost if the process died before the next source arrived.
|
|
2683
|
+
*
|
|
2684
|
+
* `runVerifiedResearchLoop` calls this at the end of every round. A driver
|
|
2685
|
+
* built without a store has nothing to write and resolves immediately.
|
|
2686
|
+
*/
|
|
2687
|
+
checkpoint(): Promise<void>;
|
|
2688
|
+
/** Durably announce the next synchronous fold before it begins. */
|
|
2689
|
+
prepareFold(): Promise<void>;
|
|
2690
|
+
/**
|
|
2691
|
+
* Confirm exact registered source records.
|
|
2692
|
+
* URI equality alone is insufficient: pending evidence is authorized only
|
|
2693
|
+
* when its expected content hash matches the registered record.
|
|
2694
|
+
*/
|
|
2695
|
+
commitSources(sources: readonly SourceRecord[]): Promise<void>;
|
|
2696
|
+
/** The ledger record as it would be written right now. */
|
|
2697
|
+
toLedger(): ResearchClaimLedger;
|
|
2462
2698
|
}
|
|
2699
|
+
/**
|
|
2700
|
+
* The in-memory driver. Its belief state lives for exactly as long as the
|
|
2701
|
+
* process does — use `createPersistentResearchDrivingDriver` when the run must
|
|
2702
|
+
* survive a crash or resume.
|
|
2703
|
+
*/
|
|
2463
2704
|
declare function createResearchDrivingDriver(options?: ResearchDrivingDriverOptions): ResearchDrivingDriver;
|
|
2705
|
+
/**
|
|
2706
|
+
* The durable driver: same behaviour, plus its claim ledger is read from the
|
|
2707
|
+
* store at construction and written back after every claim and every round.
|
|
2708
|
+
*
|
|
2709
|
+
* Construction is asynchronous because loading is I/O, and loading has to happen
|
|
2710
|
+
* before the caller can read `researchState()` or `isComplete()` — a driver that
|
|
2711
|
+
* loaded lazily would answer "nothing researched, not complete" for a run that
|
|
2712
|
+
* had already corroborated everything.
|
|
2713
|
+
*/
|
|
2714
|
+
declare function createPersistentResearchDrivingDriver(options: PersistentResearchDrivingDriverOptions): Promise<ResearchDrivingDriver>;
|
|
2464
2715
|
//#endregion
|
|
2465
2716
|
//#region src/schemas.d.ts
|
|
2466
2717
|
declare const SourceAnchorSchema: z.ZodObject<{
|
|
@@ -2588,6 +2839,7 @@ declare const KnowledgeEventSchema: z.ZodObject<{
|
|
|
2588
2839
|
"proposal.applied": "proposal.applied";
|
|
2589
2840
|
"release.promoted": "release.promoted";
|
|
2590
2841
|
"release.rejected": "release.rejected";
|
|
2842
|
+
"research.iteration": "research.iteration";
|
|
2591
2843
|
"source.added": "source.added";
|
|
2592
2844
|
}>;
|
|
2593
2845
|
createdAt: z.ZodString;
|
|
@@ -2595,6 +2847,88 @@ declare const KnowledgeEventSchema: z.ZodObject<{
|
|
|
2595
2847
|
target: z.ZodOptional<z.ZodString>;
|
|
2596
2848
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2597
2849
|
}, z.core.$strip>;
|
|
2850
|
+
declare const DeepQuestionSchema: z.ZodObject<{
|
|
2851
|
+
kind: z.ZodEnum<{
|
|
2852
|
+
comparative: "comparative";
|
|
2853
|
+
contradiction: "contradiction";
|
|
2854
|
+
gap: "gap";
|
|
2855
|
+
mechanism: "mechanism";
|
|
2856
|
+
}>;
|
|
2857
|
+
text: z.ZodString;
|
|
2858
|
+
id: z.ZodString;
|
|
2859
|
+
claimIds: z.ZodArray<z.ZodString>;
|
|
2860
|
+
addressed: z.ZodBoolean;
|
|
2861
|
+
raisedRound: z.ZodNumber;
|
|
2862
|
+
}, z.core.$strict>;
|
|
2863
|
+
declare const ResearchClaimRecordSchema: z.ZodObject<{
|
|
2864
|
+
id: z.ZodString;
|
|
2865
|
+
text: z.ZodString;
|
|
2866
|
+
supportingHosts: z.ZodArray<z.ZodString>;
|
|
2867
|
+
supportingUris: z.ZodArray<z.ZodString>;
|
|
2868
|
+
contradicts: z.ZodArray<z.ZodString>;
|
|
2869
|
+
contested: z.ZodBoolean;
|
|
2870
|
+
firstSeenRound: z.ZodNumber;
|
|
2871
|
+
}, z.core.$strict>;
|
|
2872
|
+
declare const ResearchSourceVersionSchema: z.ZodObject<{
|
|
2873
|
+
sourceId: z.ZodString;
|
|
2874
|
+
uri: z.ZodString;
|
|
2875
|
+
contentHash: z.ZodString;
|
|
2876
|
+
}, z.core.$strict>;
|
|
2877
|
+
declare const ResearchClaimEvidenceSchema: z.ZodObject<{
|
|
2878
|
+
id: z.ZodString;
|
|
2879
|
+
claimId: z.ZodString;
|
|
2880
|
+
text: z.ZodString;
|
|
2881
|
+
sourceId: z.ZodString;
|
|
2882
|
+
sourceUri: z.ZodString;
|
|
2883
|
+
sourceContentHash: z.ZodString;
|
|
2884
|
+
contradictsClaimId: z.ZodOptional<z.ZodString>;
|
|
2885
|
+
firstSeenRound: z.ZodNumber;
|
|
2886
|
+
}, z.core.$strict>;
|
|
2887
|
+
declare const ResearchClaimLedgerSchema: z.ZodObject<{
|
|
2888
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
2889
|
+
id: z.ZodString;
|
|
2890
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
2891
|
+
updatedAt: z.ZodISODateTime;
|
|
2892
|
+
rounds: z.ZodNumber;
|
|
2893
|
+
preparedRounds: z.ZodOptional<z.ZodNumber>;
|
|
2894
|
+
claimEvidence: z.ZodArray<z.ZodObject<{
|
|
2895
|
+
id: z.ZodString;
|
|
2896
|
+
claimId: z.ZodString;
|
|
2897
|
+
text: z.ZodString;
|
|
2898
|
+
sourceId: z.ZodString;
|
|
2899
|
+
sourceUri: z.ZodString;
|
|
2900
|
+
sourceContentHash: z.ZodString;
|
|
2901
|
+
contradictsClaimId: z.ZodOptional<z.ZodString>;
|
|
2902
|
+
firstSeenRound: z.ZodNumber;
|
|
2903
|
+
}, z.core.$strict>>;
|
|
2904
|
+
registeredSources: z.ZodArray<z.ZodObject<{
|
|
2905
|
+
sourceId: z.ZodString;
|
|
2906
|
+
uri: z.ZodString;
|
|
2907
|
+
contentHash: z.ZodString;
|
|
2908
|
+
}, z.core.$strict>>;
|
|
2909
|
+
claims: z.ZodArray<z.ZodObject<{
|
|
2910
|
+
id: z.ZodString;
|
|
2911
|
+
text: z.ZodString;
|
|
2912
|
+
supportingHosts: z.ZodArray<z.ZodString>;
|
|
2913
|
+
supportingUris: z.ZodArray<z.ZodString>;
|
|
2914
|
+
contradicts: z.ZodArray<z.ZodString>;
|
|
2915
|
+
contested: z.ZodBoolean;
|
|
2916
|
+
firstSeenRound: z.ZodNumber;
|
|
2917
|
+
}, z.core.$strict>>;
|
|
2918
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
2919
|
+
kind: z.ZodEnum<{
|
|
2920
|
+
comparative: "comparative";
|
|
2921
|
+
contradiction: "contradiction";
|
|
2922
|
+
gap: "gap";
|
|
2923
|
+
mechanism: "mechanism";
|
|
2924
|
+
}>;
|
|
2925
|
+
text: z.ZodString;
|
|
2926
|
+
id: z.ZodString;
|
|
2927
|
+
claimIds: z.ZodArray<z.ZodString>;
|
|
2928
|
+
addressed: z.ZodBoolean;
|
|
2929
|
+
raisedRound: z.ZodNumber;
|
|
2930
|
+
}, z.core.$strict>>;
|
|
2931
|
+
}, z.core.$strict>;
|
|
2598
2932
|
declare const KnowledgeBaseCandidateSchema: z.ZodObject<{
|
|
2599
2933
|
id: z.ZodString;
|
|
2600
2934
|
units: z.ZodArray<z.ZodObject<{
|
|
@@ -2683,5 +3017,5 @@ declare function normalizeLinkTarget(target: string): string;
|
|
|
2683
3017
|
declare function isSafeKnowledgePath(path: string, allowedPrefixes?: string[]): boolean;
|
|
2684
3018
|
declare function parseKnowledgeWriteBlocks(text: string, allowedPrefixes?: string[]): KnowledgeWriteParseResult;
|
|
2685
3019
|
//#endregion
|
|
2686
|
-
export { AdaptiveDecision, AdaptiveDriverOptions, AdaptiveResearchDriver, AdaptiveStats, AddSourceOptions, AddSourceTextInput, AgentMemoryAcquireRunLease, type AgentMemoryActivation, type AgentMemoryActivationDriver, AgentMemoryAdapter, type AgentMemoryAttemptEvent, AgentMemoryBranch, AgentMemoryBranchIsolation, AgentMemoryBranchLifetime, AgentMemoryBranchSnapshot, AgentMemoryContext, AgentMemoryControllerMode, type AgentMemoryDimensionComparison, type AgentMemoryExecutionContext, type AgentMemoryExecutionCostMeter, type AgentMemoryExecutionCostReceipt, type AgentMemoryExecutionPaidCallInput, type AgentMemoryExecutionPaidCallResult, type AgentMemoryExecutionStep, type AgentMemoryExperimentCandidate, type AgentMemoryExperimentRankingRow, type AgentMemoryExperimentRunLease, type AgentMemoryFinalEvaluation, type AgentMemoryFinalPair, AgentMemoryHit, AgentMemoryHitSchema, type AgentMemoryImprovementRunLease, AgentMemoryJournalEntry, AgentMemoryKind, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, type AgentMemoryPromotionDecision, AgentMemoryRunLease, AgentMemoryScope, AgentMemoryScopeSchema, AgentMemorySearchOptions, type AgentMemorySequence, type AgentMemorySequenceArtifact, type AgentMemorySequenceProbe, type AgentMemorySequenceProbeResult, type AgentMemorySequenceScenario, type AgentMemorySequenceStep, AgentMemorySharingPolicy, AgentMemoryVisibility, AgentMemoryWriteInput, AgentMemoryWriteInputSchema, AgentMemoryWriteResult, ApplyWriteBlocksResult, type BuildAgentMemorySequencesFromBenchmarkCasesOptions, BuildEvalKnowledgeBundleOptions, type BuildRetrievalBenchmarkCasesFromQrelsOptions, BuildRetrievalEvalDispatchOptions, ChunkingOptions, ClaimGroundingDriverOptions, ClaimRef, CompanyEvalCase, CornellLiiSelector, CornellLiiSourceOptions, CreateAgentMemoryBranchOptions, D1Adapter, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, DedupReason, DeepQuestion, DeepQuestionKind, DefineReadinessSpecInput, DetectChangesOptions, DetectChangesResult, DiscoveryLoopResult, DiscoveryLoopRound, DiscoveryLoopStopReason, DiscoveryResult, DiscoveryTask, DriverResearchContext, EvalKnowledgeBundleBuildResult, EvaluateKnowledgeBaseReadinessOptions, ExpectedGroup, type ExternalRagEvalScore, FactResult, FetchOpts, FileSystemFreshnessStoreOptions, FileSystemKbStore, FileSystemSearchOptions, FileSystemSearchProvider, FileSystemSearchProviderOptions, ForkAgentMemoryBranchSnapshotOptions, FragmentProvenance, FreshnessKey, FreshnessMark, FreshnessRecord, FreshnessTtl, GraphitiMcpClientLike, GraphitiMemoryAdapterOptions, GraphitiToolNames, GroundClaimOptions, GroundingResult, INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, IRS_DIMENSION_HINTS, IrsPublicationsSourceOptions, KbStore, type KnowledgeAnswerBenchmarkCase, type KnowledgeAnswerBenchmarkTaskKind, KnowledgeBaseCandidate, KnowledgeBaseCandidateSchema, type KnowledgeBaseQualityOptions, type KnowledgeBaseQualityReport, KnowledgeBaseReadinessEvaluation, type KnowledgeBenchmarkArtifact, type KnowledgeBenchmarkCase, type KnowledgeBenchmarkCaseBase, type KnowledgeBenchmarkDistribution, type KnowledgeBenchmarkEvaluation, type KnowledgeBenchmarkFamily, type KnowledgeBenchmarkReport, type KnowledgeBenchmarkResponder, type KnowledgeBenchmarkScenario, type KnowledgeBenchmarkSliceSummary, type KnowledgeBenchmarkSource, type KnowledgeBenchmarkSpec, type KnowledgeBenchmarkSplit, type KnowledgeBenchmarkTaskKind, KnowledgeChange, KnowledgeChangeKind, KnowledgeChunk, KnowledgeClaim, type KnowledgeClaimMatcher, KnowledgeControlLoopAction, KnowledgeControlLoopActionResult, KnowledgeControlLoopAdapter, KnowledgeControlLoopAdapterOptions, KnowledgeControlLoopState, KnowledgeDiscoveryDispatcher, KnowledgeDiscoveryWorker, KnowledgeEvent, KnowledgeEventQuery, KnowledgeEventSchema, KnowledgeEventType, KnowledgeExplanation, KnowledgeFragment, KnowledgeFreshnessStore, KnowledgeGap, KnowledgeGraph, KnowledgeGraphEdge, KnowledgeGraphEdgeSchema, KnowledgeGraphNode, KnowledgeGraphNodeSchema, KnowledgeId, type KnowledgeImprovementActivationPersistence, type KnowledgeImprovementCandidateRecord, type KnowledgeImprovementCandidateRef, KnowledgeImprovementCandidateRefSchema, type KnowledgeImprovementEvaluationInput, type KnowledgeImprovementEvaluator, type KnowledgeImprovementEvent, type KnowledgeImprovementEvidence, KnowledgeImprovementEvidenceSchema, type KnowledgeImprovementMetric, type KnowledgeImprovementMetricProvenance, type KnowledgeImprovementMutationReceipt, type KnowledgeImprovementMutationResult, type KnowledgeImprovementOptions, type KnowledgeImprovementRagOptimizationOptions, type KnowledgeImprovementRagOptimizationRunInput, type KnowledgeImprovementResult, type KnowledgeImprovementRetrievalOptions, type KnowledgeImprovementRunState, KnowledgeImprovementRunStateSchema, type KnowledgeImprovementStatus, type KnowledgeImprovementTarget, type KnowledgeImprovementUpdate, type KnowledgeImprovementUpdateInput, KnowledgeIndex, KnowledgeIndexSchema, KnowledgeInspection, KnowledgeLayout, KnowledgeLintFinding, type KnowledgeMemoryBenchmarkCase, type KnowledgeMemoryBenchmarkTaskKind, type KnowledgeMemoryEvent, type KnowledgeMemoryFactMatcher, KnowledgePage, KnowledgePageSchema, KnowledgePolicy, type KnowledgePolicyDispatch, KnowledgeProposal, KnowledgeProposalParseError, KnowledgeReadinessSpec, KnowledgeRelation, KnowledgeRelease, KnowledgeReleaseInput, KnowledgeReleaseReport, KnowledgeResearchLoopContext, KnowledgeResearchLoopDecision, KnowledgeResearchLoopResult, KnowledgeResearchLoopStep, type KnowledgeRetrievalBenchmarkCase, type KnowledgeRetrievalBenchmarkQrel, type KnowledgeRetrievalBenchmarkQuery, KnowledgeSearchResult, KnowledgeSource, KnowledgeUnit, KnowledgeWriteBlock, KnowledgeWriteParseResult, type LoadKnowledgeImprovementActivationResultOptions, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, MaterialFact, MaterialFactLens, MaterialFactsResult, Mem0ClientMode, Mem0HostedClient, Mem0HostedMemoryAdapterOptions, Mem0MemoryAdapterOptions, Mem0OssClient, Mem0OssMemoryAdapterOptions, type MemoryAdapterBenchmarkCandidate, type MemoryAdapterBenchmarkRankingRow, type MemoryConfigScenario, MemoryKbStore, Neo4jAgentMemoryAdapterOptions, type OptimizeKnowledgeBasePolicyOptions, type OptimizeKnowledgeBasePolicyResult, OwnedAgentMemoryRunLease, POLITE_USER_AGENT, ParsedFrontmatter, PartitionRetrievalScenariosOptions, type PendingKnowledgeMutation, PoliteFetchOptions, PoliteFetchResult, type PromoteKnowledgeCandidateOptions, ProposeFromFindingsResult, READINESS_SPEC_DEFAULTS, type RagAnswerEvalArtifact, type RagAnswerEvalCase, type RagAnswerEvalScenario, type RagAnswerMetricSummary, type RagAnswerQualityHookOptions, RagAnswerQualityInput, type RagAnswerQualityJudgeOptions, RagAnswerQualityResult, type RagCalibrationOptions, type RagCalibrationResult, RagDiagnosisInput, type RagEvalCitation, type RagEvalClaim, type RagEvalContext, type RagEvalMetricKey, type RagEvalProvider, type RagEvalSlice, RagGapFinding, RagGapKind, RagGapSeverity, RagKnowledgeAcquisitionInput, RagKnowledgeImprovementPhase, RagKnowledgeImprovementPhaseResult, RagKnowledgeImprovementPhaseStatus, RagKnowledgeResearchOptions, RagKnowledgeUpdateInput, RagKnowledgeUpdateResult, RagOptimizationConfig, RagOptimizationSelection, RagPhaseInputBase, RagPromotionInput, RagPromotionResult, type RagRequiredContext, type RecoverPendingKnowledgeMutationOptions, RejectedSource, ResearchContribution, ResearchDriver, ResearchDrivingDriver, ResearchDrivingDriverOptions, ResearchDrivingState, ResearchDrivingSteer, ResearchSourceProposal, ResearchWorker, type ResolvedKnowledgeImprovementCandidate, type ResolvedKnowledgeImprovementComparison, type ResolvedKnowledgeImprovementComparisonSnapshot, type RestoreKnowledgeCandidateBaselineOptions, RetrievalConfig, RetrievalEvalArtifact, RetrievalEvalRetriever, RetrievalEvalRetrieverInput, RetrievalEvalRetrieverResult, RetrievalEvalScenario, RetrievalGoldTarget, RetrievalHoldoutBypassReason, RetrievalHoldoutCallContext, RetrievalHoldoutConfig, RetrievalHoldoutEligibleItem, RetrievalHoldoutEvent, RetrievalHoldoutOffPolicyOptions, RetrievalHoldoutOffPolicyResult, RetrievalHoldoutResult, RetrievalHoldoutSessionState, RetrievalHoldoutSessionSummary, RetrievalMetricSummary, RetrievalMetricWeights, RetrievalOptimizationSelection, RetrievalRecallJudgeOptions, RetrievalScenarioPartitions, RetrievedKnowledgeHit, RetrievedSourceSpan, RouterClient, RouterError, RouterUsage, type RunAgentMemoryExperimentOptions, type RunAgentMemoryExperimentResult, type RunAgentMemoryImprovementOptions, type RunAgentMemoryImprovementResult, RunDiscoveryLoopOptions, type RunKnowledgeBenchmarkSuiteOptions, type RunKnowledgeBenchmarkSuiteResult, RunKnowledgeResearchLoopOptions, type RunMemoryAdapterBenchmarkOptions, type RunMemoryAdapterBenchmarkResult, RunRagKnowledgeImprovementLoopOptions, RunRagKnowledgeImprovementLoopResult, RunRagOptimizationOptions, RunRagOptimizationResult, RunRetrievalImprovementLoopOptions, RunRetrievalImprovementLoopResult, RunSerializedKnowledgeOptimizationOptions, RunSerializedKnowledgeOptimizationResult, SCAFFOLD_PAGE_BASENAMES, SerializedCandidate, SerializedCandidateCodec, SourceAdapter, SourceAdapterInput, SourceAdapterOutput, SourceAnchor, SourceAnchorSchema, SourceFreshnessInspection, SourceRecord, SourceRecordSchema, SourceRegistry, SourceVerdict, SourceVerificationContext, StateSosEntity, StateSosSourceConfig, TangleRouterOptions, ThesisRunOptions, ThesisRunResult, ThesisTaskInput, TrackedClaim, TriageClass, type UseKnowledgeImprovementCandidateOptions, ValidateKnowledgeOptions, ValidateKnowledgeResult, VerifiedResearchLoopOptions, VerifiedResearchLoopResult, VerifiedResearchRound, VerifyingDriverOptions, WIKILINK_REGEX, WebResearchWorkerOptions, WebSearchHit, WorkerClaimDecorationOptions, WorkerResearchContext, __resetHttpThrottle, acquireAgentMemoryRunLease, addSourcePath, addSourceText, agentMemorySequenceJudge, applyKnowledgeWriteBlocks, applyKnowledgeWriteBlocksFile, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, buildAgentMemorySequenceScenarios, buildAgentMemorySequencesFromBenchmarkCases, buildEvalKnowledgeBundle, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildKnowledgeGraph, buildKnowledgeIndex, buildRetrievalBenchmarkCasesFromQrels, buildRetrievalEvalDispatch, calibrateRagAnswerJudge, canonicalizeUrl, chunkMarkdown, citedClaimKey, citedClaimOf, contentKey, createAdaptiveResearchDriver, createAgentMemoryBranch, createClaimDecorator, createClaimGroundingVerifier, createCollectionResearchDriver, createCornellLiiSource, createD1FreshnessStoreStub, createFileSystemFreshnessStore, createFileSystemSearchProvider, createGraphitiMemoryAdapter, createInMemoryBenchmarkAdapter, createIrsPublicationsSource, createKnowledgeControlLoopAdapter, createKnowledgeEvent, createLocalDiscoveryDispatcher, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, createNoopMemoryBenchmarkAdapter, createRagAnswerQualityHook, createResearchDrivingDriver, createStateSosSource, createTangleRouterClient, createVerifyingResearchDriver, createWebResearchWorker, defaultGetMemoryContext, defineReadinessSpec, detectChanges, deterministicRng, diagnoseRagAnswerFailure, emitRetrievalHoldoutBypass, evaluateKnowledgeBaseReadiness, explainKnowledgeTarget, extractLinks, extractWikilinks, firstMatch, forkAgentMemoryBranchSnapshot, formatFrontmatter, fromAgentCandidateKnowledgeRef, gradeCompanyAgainstText, gradeFactAgainstText, graphitiMemoryAdapterIdentity, groundClaimInText, hashKnowledgeBase, htmlToText, improveKnowledgeBase, initKnowledgeBase, innerHtmlById, inspectKnowledgeIndex, inspectPendingKnowledgeMutation, investmentThesisSet, isKnowledgeMemoryBenchmarkCase, isSafeKnowledgePath, isScaffoldPath, jsonCandidateCodec, jsonObjectCandidateCodec, kbIndexToText, knowledgeBenchmarkJudge, knowledgeImprovementCandidateRef, knowledgeImprovementRunDir, knowledgeImprovementRunId, knowledgeReleaseReport, layoutFor, lensDistribution, lintKnowledgeIndex, loadKnowledgeImprovementActivationResult, loadKnowledgeImprovementEvents, loadKnowledgeImprovementState, loadKnowledgePages, loadSourceRegistry, looksLikeBlockPage, materialFactsSurfaced, materialFactsSurfacedInText, mediaTypeFor, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, normalizeExternalRagScores, normalizeLinkTarget, optimizeKnowledgeBasePolicy, parseFrontmatter, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, parseKnowledgeWriteBlocks, partitionRetrievalScenarios, politeFetch, promoteKnowledgeCandidate, proposeFromFinding, proposeFromFindings, ragAnswerQualityJudge, reciprocalRankFusion, recoverPendingKnowledgeMutation, renderKnowledgeBenchmarkReportMarkdown, renderMemoryContext, resetRetrievalHoldoutRegistry, resolveMemoryCleanupTimeoutMs, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, restoreKnowledgeCandidateBaseline, retrievalConfigFromSurface, retrievalConfigSurface, retrievalHoldoutConfigHash, retrievalRecallJudge, runAgentMemoryExperiment, runAgentMemoryImprovement, runBoundedMemoryLifecycle, runDiscoveryLoop, runInvestmentThesisTask, runKnowledgeBenchmarkSuite, runKnowledgeResearchLoop, runMemoryAdapterBenchmark, runRagKnowledgeImprovementLoop, runRagOptimization, runRetrievalImprovementLoop, runSerializedKnowledgeOptimization, runVerifiedResearchLoop, scenarioContentFingerprint, scoreKnowledgeBaseIndex, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, scoreRagAnswerArtifact, scoreRetrievalArtifact, searchKnowledge, sha256, sleepForMemoryRecovery, slugify, sourceMatchesGaps, sourceRegistryPath, stableId, stripFrontmatter, summarizeKnowledgeBenchmarkCampaign, textSourceAdapter, thesisReadinessSpecs, toAgentCandidateKnowledgeRef, toDeepEvalTestCases, toOffPolicyTrajectory, toRagCheckerRecords, toRagasEvaluationRows, toTruLensRecords, tokenizeQuery, totalMaterialFacts, triageSource, validateKnowledgeIndex, withCitedClaim, withKnowledgeImprovementCandidate, withKnowledgeImprovementComparison, writeJson, writeKnowledgeIndex, writeSourceRegistry };
|
|
3020
|
+
export { AdaptiveDecision, AdaptiveDriverOptions, AdaptiveResearchDriver, AdaptiveStats, AddSourceOptions, AddSourceTextInput, AgentMemoryAcquireRunLease, type AgentMemoryActivation, type AgentMemoryActivationDriver, AgentMemoryAdapter, type AgentMemoryAttemptEvent, AgentMemoryBranch, AgentMemoryBranchIsolation, AgentMemoryBranchLifetime, AgentMemoryBranchSnapshot, AgentMemoryContext, AgentMemoryControllerMode, type AgentMemoryDimensionComparison, type AgentMemoryExecutionContext, type AgentMemoryExecutionCostMeter, type AgentMemoryExecutionCostReceipt, type AgentMemoryExecutionPaidCallInput, type AgentMemoryExecutionPaidCallResult, type AgentMemoryExecutionStep, type AgentMemoryExperimentCandidate, type AgentMemoryExperimentRankingRow, type AgentMemoryExperimentRunLease, type AgentMemoryFinalEvaluation, type AgentMemoryFinalPair, AgentMemoryHit, AgentMemoryHitSchema, type AgentMemoryImprovementRunLease, AgentMemoryJournalEntry, AgentMemoryKind, AgentMemoryKindSchema, AgentMemoryLifecycleTimeoutError, AgentMemoryLifecycleUnsafeError, type AgentMemoryPromotionDecision, AgentMemoryRunLease, AgentMemoryScope, AgentMemoryScopeSchema, AgentMemorySearchOptions, type AgentMemorySequence, type AgentMemorySequenceArtifact, type AgentMemorySequenceProbe, type AgentMemorySequenceProbeResult, type AgentMemorySequenceScenario, type AgentMemorySequenceStep, AgentMemorySharingPolicy, AgentMemoryVisibility, AgentMemoryWriteInput, AgentMemoryWriteInputSchema, AgentMemoryWriteResult, ApplyWriteBlocksResult, type BuildAgentMemorySequencesFromBenchmarkCasesOptions, BuildEvalKnowledgeBundleOptions, type BuildRetrievalBenchmarkCasesFromQrelsOptions, BuildRetrievalEvalDispatchOptions, ChunkingOptions, ClaimGroundingDriverOptions, ClaimLedgerGoalConflictError, ClaimLedgerMigrationRequiredError, ClaimLedgerStore, ClaimRef, CompanyEvalCase, CornellLiiSelector, CornellLiiSourceOptions, CreateAgentMemoryBranchOptions, D1Adapter, DEFAULT_MEMORY_CLEANUP_TIMEOUT_MS, DedupReason, DeepQuestion, DeepQuestionKind, DeepQuestionSchema, DefineReadinessSpecInput, DetectChangesOptions, DetectChangesResult, DiscoveryLoopResult, DiscoveryLoopRound, DiscoveryLoopStopReason, DiscoveryResult, DiscoveryTask, DriverResearchContext, EvalKnowledgeBundleBuildResult, EvaluateKnowledgeBaseReadinessOptions, ExpectedGroup, type ExternalRagEvalScore, FactResult, FetchOpts, FileSystemFreshnessStoreOptions, FileSystemKbStore, FileSystemKbStoreOptions, FileSystemSearchOptions, FileSystemSearchProvider, FileSystemSearchProviderOptions, ForkAgentMemoryBranchSnapshotOptions, FragmentProvenance, FreshnessKey, FreshnessMark, FreshnessRecord, FreshnessTtl, GraphitiMcpClientLike, GraphitiMemoryAdapterOptions, GraphitiToolNames, GroundClaimOptions, GroundingResult, INDUSTRY_MEMORY_BENCHMARKS, INDUSTRY_RAG_BENCHMARKS, IRS_DIMENSION_HINTS, IrsPublicationsSourceOptions, KB_CLAIM_LEDGER_DIR, KB_EVENTS_PATH, KB_INDEX_PATH, KB_STORE_DIR, KNOWLEDGE_EVENT_TYPES, KbStore, type KnowledgeAnswerBenchmarkCase, type KnowledgeAnswerBenchmarkTaskKind, KnowledgeBaseCandidate, KnowledgeBaseCandidateSchema, type KnowledgeBaseQualityOptions, type KnowledgeBaseQualityReport, KnowledgeBaseReadinessEvaluation, type KnowledgeBenchmarkArtifact, type KnowledgeBenchmarkCase, type KnowledgeBenchmarkCaseBase, type KnowledgeBenchmarkDistribution, type KnowledgeBenchmarkEvaluation, type KnowledgeBenchmarkFamily, type KnowledgeBenchmarkReport, type KnowledgeBenchmarkResponder, type KnowledgeBenchmarkScenario, type KnowledgeBenchmarkSliceSummary, type KnowledgeBenchmarkSource, type KnowledgeBenchmarkSpec, type KnowledgeBenchmarkSplit, type KnowledgeBenchmarkTaskKind, KnowledgeChange, KnowledgeChangeKind, KnowledgeChunk, KnowledgeClaim, type KnowledgeClaimMatcher, KnowledgeControlLoopAction, KnowledgeControlLoopActionResult, KnowledgeControlLoopAdapter, KnowledgeControlLoopAdapterOptions, KnowledgeControlLoopState, KnowledgeDiscoveryDispatcher, KnowledgeDiscoveryWorker, KnowledgeEvent, KnowledgeEventQuery, KnowledgeEventSchema, KnowledgeEventType, KnowledgeExplanation, KnowledgeFragment, KnowledgeFreshnessStore, KnowledgeGap, KnowledgeGraph, KnowledgeGraphEdge, KnowledgeGraphEdgeSchema, KnowledgeGraphNode, KnowledgeGraphNodeSchema, KnowledgeId, type KnowledgeImprovementActivationPersistence, type KnowledgeImprovementCandidateRecord, type KnowledgeImprovementCandidateRef, KnowledgeImprovementCandidateRefSchema, type KnowledgeImprovementEvaluationInput, type KnowledgeImprovementEvaluator, type KnowledgeImprovementEvent, type KnowledgeImprovementEvidence, KnowledgeImprovementEvidenceSchema, type KnowledgeImprovementMetric, type KnowledgeImprovementMetricProvenance, type KnowledgeImprovementMutationReceipt, type KnowledgeImprovementMutationResult, type KnowledgeImprovementOptions, type KnowledgeImprovementRagOptimizationOptions, type KnowledgeImprovementRagOptimizationRunInput, type KnowledgeImprovementResult, type KnowledgeImprovementRetrievalOptions, type KnowledgeImprovementRunState, KnowledgeImprovementRunStateSchema, type KnowledgeImprovementStatus, type KnowledgeImprovementTarget, type KnowledgeImprovementUpdate, type KnowledgeImprovementUpdateInput, KnowledgeIndex, KnowledgeIndexSchema, KnowledgeInspection, KnowledgeLayout, KnowledgeLintFinding, type KnowledgeMemoryBenchmarkCase, type KnowledgeMemoryBenchmarkTaskKind, type KnowledgeMemoryEvent, type KnowledgeMemoryFactMatcher, KnowledgePage, KnowledgePageSchema, KnowledgePolicy, type KnowledgePolicyDispatch, KnowledgeProposal, KnowledgeProposalParseError, KnowledgeReadinessSpec, KnowledgeRelation, KnowledgeRelease, KnowledgeReleaseInput, KnowledgeReleaseReport, KnowledgeResearchLoopContext, KnowledgeResearchLoopDecision, KnowledgeResearchLoopResult, KnowledgeResearchLoopStep, type KnowledgeRetrievalBenchmarkCase, type KnowledgeRetrievalBenchmarkQrel, type KnowledgeRetrievalBenchmarkQuery, KnowledgeSearchResult, KnowledgeSource, KnowledgeUnit, KnowledgeWriteBlock, KnowledgeWriteParseResult, type LoadKnowledgeImprovementActivationResultOptions, MAX_RESPONSE_BYTES, MIN_REQUEST_GAP_MS, MaterialFact, MaterialFactLens, MaterialFactsResult, Mem0ClientMode, Mem0HostedClient, Mem0HostedMemoryAdapterOptions, Mem0MemoryAdapterOptions, Mem0OssClient, Mem0OssMemoryAdapterOptions, type MemoryAdapterBenchmarkCandidate, type MemoryAdapterBenchmarkRankingRow, type MemoryConfigScenario, MemoryKbStore, Neo4jAgentMemoryAdapterOptions, type OptimizeKnowledgeBasePolicyOptions, type OptimizeKnowledgeBasePolicyResult, OwnedAgentMemoryRunLease, POLITE_USER_AGENT, ParsedFrontmatter, PartitionRetrievalScenariosOptions, type PendingKnowledgeMutation, PersistentResearchDrivingDriverOptions, PoliteFetchOptions, PoliteFetchResult, type PromoteKnowledgeCandidateOptions, ProposeFromFindingsResult, READINESS_SPEC_DEFAULTS, type RagAnswerEvalArtifact, type RagAnswerEvalCase, type RagAnswerEvalScenario, type RagAnswerMetricSummary, type RagAnswerQualityHookOptions, RagAnswerQualityInput, type RagAnswerQualityJudgeOptions, RagAnswerQualityResult, type RagCalibrationOptions, type RagCalibrationResult, RagDiagnosisInput, type RagEvalCitation, type RagEvalClaim, type RagEvalContext, type RagEvalMetricKey, type RagEvalProvider, type RagEvalSlice, RagGapFinding, RagGapKind, RagGapSeverity, RagKnowledgeAcquisitionInput, RagKnowledgeImprovementPhase, RagKnowledgeImprovementPhaseResult, RagKnowledgeImprovementPhaseStatus, RagKnowledgeResearchOptions, RagKnowledgeUpdateInput, RagKnowledgeUpdateResult, RagOptimizationConfig, RagOptimizationSelection, RagPhaseInputBase, RagPromotionInput, RagPromotionResult, type RagRequiredContext, type RecoverPendingKnowledgeMutationOptions, RegularFileSnapshot, RejectedSource, ResearchClaimEvidence, ResearchClaimEvidenceSchema, ResearchClaimLedger, ResearchClaimLedgerSchema, ResearchClaimRecord, ResearchClaimRecordSchema, ResearchContribution, ResearchDriver, ResearchDrivingDriver, ResearchDrivingDriverOptions, ResearchDrivingState, ResearchDrivingSteer, ResearchSourceProposal, ResearchSourceVersion, ResearchSourceVersionSchema, ResearchWorker, type ResolvedKnowledgeImprovementCandidate, type ResolvedKnowledgeImprovementComparison, type ResolvedKnowledgeImprovementComparisonSnapshot, type RestoreKnowledgeCandidateBaselineOptions, RetrievalConfig, RetrievalEvalArtifact, RetrievalEvalRetriever, RetrievalEvalRetrieverInput, RetrievalEvalRetrieverResult, RetrievalEvalScenario, RetrievalGoldTarget, RetrievalHoldoutBypassReason, RetrievalHoldoutCallContext, RetrievalHoldoutConfig, RetrievalHoldoutEligibleItem, RetrievalHoldoutEvent, RetrievalHoldoutOffPolicyOptions, RetrievalHoldoutOffPolicyResult, RetrievalHoldoutResult, RetrievalHoldoutSessionState, RetrievalHoldoutSessionSummary, RetrievalMetricSummary, RetrievalMetricWeights, RetrievalOptimizationSelection, RetrievalRecallJudgeOptions, RetrievalScenarioPartitions, RetrievedKnowledgeHit, RetrievedSourceSpan, RouterClient, RouterError, RouterUsage, type RunAgentMemoryExperimentOptions, type RunAgentMemoryExperimentResult, type RunAgentMemoryImprovementOptions, type RunAgentMemoryImprovementResult, RunDiscoveryLoopOptions, type RunKnowledgeBenchmarkSuiteOptions, type RunKnowledgeBenchmarkSuiteResult, RunKnowledgeResearchLoopOptions, type RunMemoryAdapterBenchmarkOptions, type RunMemoryAdapterBenchmarkResult, RunRagKnowledgeImprovementLoopOptions, RunRagKnowledgeImprovementLoopResult, RunRagOptimizationOptions, RunRagOptimizationResult, RunRetrievalImprovementLoopOptions, RunRetrievalImprovementLoopResult, RunSerializedKnowledgeOptimizationOptions, RunSerializedKnowledgeOptimizationResult, SCAFFOLD_PAGE_BASENAMES, SerializedCandidate, SerializedCandidateCodec, SourceAdapter, SourceAdapterInput, SourceAdapterOutput, SourceAnchor, SourceAnchorSchema, SourceFreshnessInspection, SourceRecord, SourceRecordSchema, SourceRegistry, SourceVerdict, SourceVerificationContext, StateSosEntity, StateSosSourceConfig, TangleRouterOptions, ThesisRunOptions, ThesisRunResult, ThesisTaskInput, TrackedClaim, TriageClass, type UseKnowledgeImprovementCandidateOptions, ValidateKnowledgeOptions, ValidateKnowledgeResult, VerifiedResearchLoopOptions, VerifiedResearchLoopResult, VerifiedResearchRound, VerifyingDriverOptions, WIKILINK_REGEX, WebResearchWorkerOptions, WebSearchHit, WorkerClaimDecorationOptions, WorkerResearchContext, __resetHttpThrottle, acquireAgentMemoryRunLease, addSourcePath, addSourceText, agentMemorySequenceJudge, applyKnowledgeWriteBlocks, applyKnowledgeWriteBlocksFile, applyRetrievalHoldout, applySessionStickyRetrievalHoldout, assertClaimLedgerId, assertDeepQuestionIntegrity, assertResearchClaimEvidenceIntegrity, assertResearchClaimLedgerIntegrity, assertTrackedClaimIntegrity, buildAgentMemorySequenceScenarios, buildAgentMemorySequencesFromBenchmarkCases, buildEvalKnowledgeBundle, buildFirstPartyMemoryLifecycleBenchmarkCases, buildIndustryMemoryBenchmarkSmokeCases, buildIndustryRagBenchmarkSmokeCases, buildKnowledgeBenchmarkScenarios, buildKnowledgeGraph, buildKnowledgeIndex, buildRetrievalBenchmarkCasesFromQrels, buildRetrievalEvalDispatch, calibrateRagAnswerJudge, canonicalizeUrl, chunkMarkdown, citedClaimKey, citedClaimOf, claimEvidenceId, claimId, claimSourceHost, contentKey, createAdaptiveResearchDriver, createAgentMemoryBranch, createClaimDecorator, createClaimGroundingVerifier, createCollectionResearchDriver, createCornellLiiSource, createD1FreshnessStoreStub, createFileSystemFreshnessStore, createFileSystemSearchProvider, createGraphitiMemoryAdapter, createInMemoryBenchmarkAdapter, createIrsPublicationsSource, createKnowledgeControlLoopAdapter, createKnowledgeEvent, createLocalDiscoveryDispatcher, createMem0MemoryAdapter, createMemoryExecutionPool, createNeo4jAgentMemoryAdapter, createNoopMemoryBenchmarkAdapter, createPersistentResearchDrivingDriver, createRagAnswerQualityHook, createResearchDrivingDriver, createStateSosSource, createTangleRouterClient, createVerifyingResearchDriver, createWebResearchWorker, deepQuestionId, defaultGetMemoryContext, defineReadinessSpec, detectChanges, deterministicRng, diagnoseRagAnswerFailure, emitRetrievalHoldoutBypass, emptyClaimLedger, evaluateKnowledgeBaseReadiness, explainKnowledgeTarget, extractLinks, extractWikilinks, firstMatch, forkAgentMemoryBranchSnapshot, formatFrontmatter, fromAgentCandidateKnowledgeRef, gradeCompanyAgainstText, gradeFactAgainstText, graphitiMemoryAdapterIdentity, groundClaimInText, hashKnowledgeBase, htmlToText, improveKnowledgeBase, initKnowledgeBase, innerHtmlById, inspectKnowledgeIndex, inspectPendingKnowledgeMutation, investmentThesisSet, isKernelAnchoredPath, isKnowledgeMemoryBenchmarkCase, isMissingFile, isSafeKnowledgePath, isScaffoldPath, jsonCandidateCodec, jsonObjectCandidateCodec, kbIndexToText, knowledgeBenchmarkJudge, knowledgeImprovementCandidateRef, knowledgeImprovementRunDir, knowledgeImprovementRunId, knowledgeReleaseReport, layoutFor, lensDistribution, linkClaimContradictions, lintKnowledgeIndex, listRegularFilesWithinRoot, loadKnowledgeImprovementActivationResult, loadKnowledgeImprovementEvents, loadKnowledgeImprovementState, loadKnowledgePages, loadSourceRegistry, looksLikeBlockPage, materialFactsSurfaced, materialFactsSurfacedInText, materializeRegisteredClaimEvidence, mediaTypeFor, mem0MemoryAdapterIdentity, memoryHitToSourceRecord, memoryRecoveryDelayMs, memoryWriteResultToSourceRecord, mergeClaimLedgers, mergeTrackedClaims, normalizeClaimText, normalizeExternalRagScores, normalizeLinkTarget, optimizeKnowledgeBasePolicy, parseFrontmatter, parseKnowledgeBenchmarkJsonl, parseKnowledgeBenchmarkQrels, parseKnowledgeWriteBlocks, partitionRetrievalScenarios, politeFetch, promoteKnowledgeCandidate, proposeFromFinding, proposeFromFindings, ragAnswerQualityJudge, readRegularFileNoFollow, readRegularFileWithinRoot, reciprocalRankFusion, recoverPendingKnowledgeMutation, removeDurable, renameDurable, renderKnowledgeBenchmarkReportMarkdown, renderMemoryContext, researchSourceVersionKey, resetRetrievalHoldoutRegistry, resolveMemoryCleanupTimeoutMs, respondToIndustryMemoryBenchmarkSmokeCase, respondToIndustryRagBenchmarkSmokeCase, restoreKnowledgeCandidateBaseline, retrievalConfigFromSurface, retrievalConfigSurface, retrievalHoldoutConfigHash, retrievalRecallJudge, runAgentMemoryExperiment, runAgentMemoryImprovement, runBoundedMemoryLifecycle, runDiscoveryLoop, runInvestmentThesisTask, runKnowledgeBenchmarkSuite, runKnowledgeResearchLoop, runMemoryAdapterBenchmark, runRagKnowledgeImprovementLoop, runRagOptimization, runRetrievalImprovementLoop, runSerializedKnowledgeOptimization, runVerifiedResearchLoop, scenarioContentFingerprint, scoreKnowledgeBaseIndex, scoreKnowledgeBenchmarkArtifact, scoreMemoryBenchmarkArtifact, scoreRagAnswerArtifact, scoreRetrievalArtifact, searchKnowledge, sha256, sleepForMemoryRecovery, slugify, snapshotSourceTextInput, sourceMatchesGaps, sourceRegistryPath, stableId, stripFrontmatter, summarizeKnowledgeBenchmarkCampaign, syncDirectory, textSourceAdapter, textSourceId, thesisReadinessSpecs, toAgentCandidateKnowledgeRef, toDeepEvalTestCases, toOffPolicyTrajectory, toRagCheckerRecords, toRagasEvaluationRows, toTruLensRecords, tokenizeQuery, totalMaterialFacts, triageSource, validateKnowledgeIndex, withCitedClaim, withKnowledgeImprovementCandidate, withKnowledgeImprovementComparison, withSafeDescendant, withSafeDirectory, writeFileDurable, writeFileDurableWithinRoot, writeJson, writeJsonDurable, writeJsonDurableWithinRoot, writeKnowledgeIndex, writeSourceRegistry };
|
|
2687
3021
|
//# sourceMappingURL=index.d.ts.map
|