agentfootprint 8.19.0 → 8.20.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/bin/agentfootprint-index.mjs +28 -3
- package/dist/esm/lib/rag/defineRAG.d.ts +9 -6
- package/dist/esm/lib/rag/defineRAG.js.map +1 -1
- package/dist/esm/memory/retrieval/topK.d.ts +12 -6
- package/dist/esm/memory/retrieval/topK.js.map +1 -1
- package/dist/esm/memory/store/index.d.ts +1 -0
- package/dist/esm/memory/store/index.js +1 -0
- package/dist/esm/memory/store/index.js.map +1 -1
- package/dist/esm/memory/store/staticVectorStore.d.ts +83 -0
- package/dist/esm/memory/store/staticVectorStore.js +224 -0
- package/dist/esm/memory/store/staticVectorStore.js.map +1 -0
- package/dist/esm/observe.d.ts +1 -0
- package/dist/esm/observe.js +5 -0
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/rag/exportCorpus.d.ts +64 -0
- package/dist/esm/rag/exportCorpus.js +172 -0
- package/dist/esm/rag/exportCorpus.js.map +1 -0
- package/dist/esm/rag/index.d.ts +3 -1
- package/dist/esm/rag/index.js +8 -1
- package/dist/esm/rag/index.js.map +1 -1
- package/dist/esm/rag/splitters/byHeading.d.ts +39 -0
- package/dist/esm/rag/splitters/byHeading.js +133 -15
- package/dist/esm/rag/splitters/byHeading.js.map +1 -1
- package/dist/esm/rag/splitters/byParagraph.d.ts +14 -0
- package/dist/esm/rag/splitters/byParagraph.js +4 -2
- package/dist/esm/rag/splitters/byParagraph.js.map +1 -1
- package/dist/esm/rag/splitters/constants.d.ts +24 -1
- package/dist/esm/rag/splitters/constants.js +24 -1
- package/dist/esm/rag/splitters/constants.js.map +1 -1
- package/dist/esm/rag/splitters/index.d.ts +15 -1
- package/dist/esm/rag/splitters/index.js +15 -1
- package/dist/esm/rag/splitters/index.js.map +1 -1
- package/dist/esm/rag/splitters/shared.d.ts +32 -0
- package/dist/esm/rag/splitters/shared.js +77 -1
- package/dist/esm/rag/splitters/shared.js.map +1 -1
- package/dist/esm/recorders/observability/BoundaryRecorder.d.ts +24 -0
- package/dist/esm/recorders/observability/BoundaryRecorder.js +19 -6
- package/dist/esm/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/embeddingSummary.d.ts +56 -0
- package/dist/esm/recorders/observability/embeddingSummary.js +114 -0
- package/dist/esm/recorders/observability/embeddingSummary.js.map +1 -0
- package/dist/esm/recorders/observability/recordRun.d.ts +16 -0
- package/dist/esm/recorders/observability/recordRun.js +17 -3
- package/dist/esm/recorders/observability/recordRun.js.map +1 -1
- package/dist/lib/rag/defineRAG.js.map +1 -1
- package/dist/memory/retrieval/topK.js.map +1 -1
- package/dist/memory/store/index.js +6 -1
- package/dist/memory/store/index.js.map +1 -1
- package/dist/memory/store/staticVectorStore.js +230 -0
- package/dist/memory/store/staticVectorStore.js.map +1 -0
- package/dist/observe.js +8 -1
- package/dist/observe.js.map +1 -1
- package/dist/rag/exportCorpus.js +177 -0
- package/dist/rag/exportCorpus.js.map +1 -0
- package/dist/rag/index.js +13 -1
- package/dist/rag/index.js.map +1 -1
- package/dist/rag/splitters/byHeading.js +132 -14
- package/dist/rag/splitters/byHeading.js.map +1 -1
- package/dist/rag/splitters/byParagraph.js +3 -1
- package/dist/rag/splitters/byParagraph.js.map +1 -1
- package/dist/rag/splitters/constants.js +25 -2
- package/dist/rag/splitters/constants.js.map +1 -1
- package/dist/rag/splitters/index.js +16 -1
- package/dist/rag/splitters/index.js.map +1 -1
- package/dist/rag/splitters/shared.js +79 -1
- package/dist/rag/splitters/shared.js.map +1 -1
- package/dist/recorders/observability/BoundaryRecorder.js +19 -6
- package/dist/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/recorders/observability/embeddingSummary.js +119 -0
- package/dist/recorders/observability/embeddingSummary.js.map +1 -0
- package/dist/recorders/observability/recordRun.js +17 -3
- package/dist/recorders/observability/recordRun.js.map +1 -1
- package/dist/types/lib/rag/defineRAG.d.ts +9 -6
- package/dist/types/lib/rag/defineRAG.d.ts.map +1 -1
- package/dist/types/memory/retrieval/topK.d.ts +12 -6
- package/dist/types/memory/retrieval/topK.d.ts.map +1 -1
- package/dist/types/memory/store/index.d.ts +1 -0
- package/dist/types/memory/store/index.d.ts.map +1 -1
- package/dist/types/memory/store/staticVectorStore.d.ts +84 -0
- package/dist/types/memory/store/staticVectorStore.d.ts.map +1 -0
- package/dist/types/observe.d.ts +1 -0
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/rag/exportCorpus.d.ts +65 -0
- package/dist/types/rag/exportCorpus.d.ts.map +1 -0
- package/dist/types/rag/index.d.ts +3 -1
- package/dist/types/rag/index.d.ts.map +1 -1
- package/dist/types/rag/splitters/byHeading.d.ts +39 -0
- package/dist/types/rag/splitters/byHeading.d.ts.map +1 -1
- package/dist/types/rag/splitters/byParagraph.d.ts +14 -0
- package/dist/types/rag/splitters/byParagraph.d.ts.map +1 -1
- package/dist/types/rag/splitters/constants.d.ts +24 -1
- package/dist/types/rag/splitters/constants.d.ts.map +1 -1
- package/dist/types/rag/splitters/index.d.ts +15 -1
- package/dist/types/rag/splitters/index.d.ts.map +1 -1
- package/dist/types/rag/splitters/shared.d.ts +32 -0
- package/dist/types/rag/splitters/shared.d.ts.map +1 -1
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts +24 -0
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/embeddingSummary.d.ts +57 -0
- package/dist/types/recorders/observability/embeddingSummary.d.ts.map +1 -0
- package/dist/types/recorders/observability/recordRun.d.ts +16 -0
- package/dist/types/recorders/observability/recordRun.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { MemoryEntry } from '../entry/index.js';
|
|
2
|
+
import type { MemoryStore } from './types.js';
|
|
3
|
+
/** The bundle format marker. Version the FORMAT, not the library. */
|
|
4
|
+
export declare const CORPUS_BUNDLE_FORMAT: "agentfootprint-corpus-v1";
|
|
5
|
+
/** One exported corpus entry: the passage, its vector, and its coordinates. */
|
|
6
|
+
export interface CorpusBundleEntry {
|
|
7
|
+
/** The chunk id, e.g. `'refunds.md#3'` — what the model cites. */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
/** The passage text. */
|
|
10
|
+
readonly text: string;
|
|
11
|
+
/** The embedding vector, in the bundle embedder's space. */
|
|
12
|
+
readonly vector: readonly number[];
|
|
13
|
+
/**
|
|
14
|
+
* Everything else the stored value carried — provenance (`docUri`,
|
|
15
|
+
* `heading`, `page`, offsets, hashes) and any consumer metadata, flattened
|
|
16
|
+
* into one record the retrieval formatter's provenance reader understands.
|
|
17
|
+
*/
|
|
18
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A corpus as a plain-JSON build artifact. Produced by `exportCorpus`
|
|
22
|
+
* (`agentfootprint/rag`), served by {@link staticVectorStore}, loadable into a
|
|
23
|
+
* writable store by `importCorpus`. Survives `JSON.stringify` → `JSON.parse`
|
|
24
|
+
* byte-for-byte, which is the whole point.
|
|
25
|
+
*/
|
|
26
|
+
export interface CorpusBundle {
|
|
27
|
+
readonly format: typeof CORPUS_BUNDLE_FORMAT;
|
|
28
|
+
/** The embedding space every vector in `entries` lives in. */
|
|
29
|
+
readonly embedder: {
|
|
30
|
+
/** The embedder id recorded at index time (`'default-embedder'` when the index never named one). */
|
|
31
|
+
readonly id: string;
|
|
32
|
+
/** Vector length. Every entry's vector has exactly this many numbers. */
|
|
33
|
+
readonly dimensions: number;
|
|
34
|
+
};
|
|
35
|
+
/** The namespace the corpus was exported from (`identityNamespace` form). */
|
|
36
|
+
readonly namespace: string;
|
|
37
|
+
/** Unix ms at export time. */
|
|
38
|
+
readonly exportedAt: number;
|
|
39
|
+
readonly entries: readonly CorpusBundleEntry[];
|
|
40
|
+
}
|
|
41
|
+
/** The embedder-shaped slice the load-time fingerprint check needs. */
|
|
42
|
+
export interface EmbedderFingerprint {
|
|
43
|
+
readonly id?: string;
|
|
44
|
+
readonly dimensions: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Validate a value as a `CorpusBundle`, teachingly. Shared by
|
|
48
|
+
* `staticVectorStore` and `importCorpus`, so a truncated file or a
|
|
49
|
+
* hand-edited bundle fails the same way at every door.
|
|
50
|
+
*/
|
|
51
|
+
export declare function assertCorpusBundle(bundle: unknown, caller: string): asserts bundle is CorpusBundle;
|
|
52
|
+
/**
|
|
53
|
+
* The `MemoryEntry` a bundle entry seeds — in the exact shape the retrieval
|
|
54
|
+
* formatter reads: passage on `value.content`, provenance under
|
|
55
|
+
* `value.metadata`. Shared with `importCorpus` so a static corpus and an
|
|
56
|
+
* imported one render identically.
|
|
57
|
+
*/
|
|
58
|
+
export declare function bundleEntryToMemoryEntry(entry: CorpusBundleEntry, bundle: CorpusBundle): MemoryEntry<{
|
|
59
|
+
id: string;
|
|
60
|
+
content: string;
|
|
61
|
+
metadata?: Record<string, unknown>;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Serve an exported corpus bundle as a read-only, vector-capable
|
|
65
|
+
* `MemoryStore`.
|
|
66
|
+
*
|
|
67
|
+
* @param bundle a `CorpusBundle` from `exportCorpus` (usually
|
|
68
|
+
* `JSON.parse` of the shipped file).
|
|
69
|
+
* @param embedder optional — the embedder the RUNTIME will query with (or
|
|
70
|
+
* just `{ id, dimensions }`). When given, a fingerprint
|
|
71
|
+
* mismatch is refused HERE, at load, instead of surfacing as
|
|
72
|
+
* an empty retrieval at the first question. Recommended.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* import { staticVectorStore } from 'agentfootprint/memory';
|
|
77
|
+
* import corpus from './corpus.json';
|
|
78
|
+
*
|
|
79
|
+
* const store = staticVectorStore(corpus, embedder);
|
|
80
|
+
* const docs = defineRAG({ id: 'docs', store, embedder });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export declare function staticVectorStore(bundle: CorpusBundle, embedder?: EmbedderFingerprint): MemoryStore;
|
|
84
|
+
//# sourceMappingURL=staticVectorStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticVectorStore.d.ts","sourceRoot":"","sources":["../../../../src/memory/store/staticVectorStore.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,YAAY,CAAC;AAEpB,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,4BAAsC,CAAC;AAExE,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,oBAAoB,CAAC;IAC7C,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE;QACjB,oGAAoG;QACpG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,yEAAyE;QACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8BAA8B;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAChD;AAED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,IAAI,YAAY,CAoDhC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,YAAY,GACnB,WAAW,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,CAgBlF;AAeD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,mBAAmB,GAC7B,WAAW,CA+Ib"}
|
package/dist/types/observe.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export { boundaryRecorder, BoundaryRecorder, type ActorArrow, type BoundaryAggre
|
|
|
39
39
|
export { buildRunSteps, RunStepRecorder, runStepRecorder, type BuildRunStepsOptions, type RunStep, type RunStepGraph, type RunStepKind, type RunStepMeta, type RunStepRecorderOptions, type RunStepTransition, } from './recorders/observability/RunStepRecorder.js';
|
|
40
40
|
export { attachFlowchart, buildStepGraph, buildStepGraphFromEvents, type StepGraph, type StepNode, type StepEdge, type SlotBoundary, type ContextInjection, type FlowchartOptions, type FlowchartHandle, } from './recorders/observability/FlowchartRecorder.js';
|
|
41
41
|
export { recordRun, type Recording, type RecordRunOptions, type RunRecorder, } from './recorders/observability/recordRun.js';
|
|
42
|
+
export { summarizeEmbeddings, summarizeVector, type EmbeddingSummary, } from './recorders/observability/embeddingSummary.js';
|
|
42
43
|
export { serializeTrace, redactContent, traceToStepGraph, type Trace, type TraceSummary, type TraceRedaction, type SerializeTraceOptions, } from './recorders/observability/trace.js';
|
|
43
44
|
export { attachLocalObservability, type LocalObservabilityHandle, type LocalObservabilityOptions, } from './recorders/observability/localObservability.js';
|
|
44
45
|
export { liveStateRecorder, LiveStateRecorder, LiveLLMTracker, LiveToolTracker, LiveAgentTurnTracker, type LLMLiveState, type ToolLiveState, type AgentTurnLiveState, type LiveStateRunnerLike, } from './recorders/observability/LiveStateRecorder.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK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D,CAAC;AAEzD,OAAO,EACL,aAAa,EACb,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,GACnB,MAAM,4CAA4C,CAAC;AAKpD,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,WAAW,GACZ,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* exportCorpus / importCorpus — a corpus as a build artifact.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: projection (store → plain-JSON bundle) and its inverse.
|
|
5
|
+
* Role: rag/ layer — the build-time half of the story whose runtime half
|
|
6
|
+
* is `staticVectorStore` (`agentfootprint/memory`). Index where the
|
|
7
|
+
* credentials and the durable disk live; ship the bundle with the
|
|
8
|
+
* deploy; serve it read-only where the process runs.
|
|
9
|
+
* Emits: N/A — build-step helpers, not run-time stages.
|
|
10
|
+
*
|
|
11
|
+
* ── The deployment shape this exists for ────────────────────────────────────
|
|
12
|
+
* An immutable or serverless runtime loses its disk between invocations and
|
|
13
|
+
* often holds no embedding-API credentials — while the build machine has
|
|
14
|
+
* both. So the corpus becomes an artifact of the BUILD:
|
|
15
|
+
*
|
|
16
|
+
* // build step (cron, CI, deploy hook) — credentials live here
|
|
17
|
+
* const report = await indexFolder('./docs', { to: store, embedder });
|
|
18
|
+
* writeFileSync('corpus.json', JSON.stringify(await exportCorpus(store)));
|
|
19
|
+
*
|
|
20
|
+
* // runtime — no disk, no embedding writes, no drift
|
|
21
|
+
* const store = staticVectorStore(JSON.parse(readFileSync('corpus.json', 'utf8')), embedder);
|
|
22
|
+
* const docs = defineRAG({ id: 'docs', store, embedder });
|
|
23
|
+
*
|
|
24
|
+
* The bundle records the embedder id and dimensions it was built with, so the
|
|
25
|
+
* runtime can REFUSE a mismatched embedder at load instead of discovering it
|
|
26
|
+
* as an empty retrieval — the same fingerprint discipline the durable store
|
|
27
|
+
* enforces per write.
|
|
28
|
+
*
|
|
29
|
+
* `importCorpus` is the inverse for a WRITABLE store: load a bundle into
|
|
30
|
+
* InMemoryStore at boot, or into sqliteVectorStore to migrate a corpus
|
|
31
|
+
* between machines without re-embedding (and re-billing) anything.
|
|
32
|
+
*/
|
|
33
|
+
import type { MemoryStore } from '../memory/store/index.js';
|
|
34
|
+
import type { MemoryIdentity } from '../memory/identity/index.js';
|
|
35
|
+
import { type CorpusBundle } from '../memory/store/staticVectorStore.js';
|
|
36
|
+
/**
|
|
37
|
+
* Export every entry of a corpus namespace as a plain-JSON bundle.
|
|
38
|
+
*
|
|
39
|
+
* @param store the store the corpus was indexed into. Any `MemoryStore`
|
|
40
|
+
* that can `list` — the reference stores and the durable one
|
|
41
|
+
* all can.
|
|
42
|
+
* @param identity the namespace to export. Defaults to the same
|
|
43
|
+
* `{ conversationId: '_global' }` that `indexCorpus`,
|
|
44
|
+
* `indexFolder`, `indexDocuments` and `defineRAG` default to,
|
|
45
|
+
* so the plain path needs no argument anywhere.
|
|
46
|
+
*
|
|
47
|
+
* @throws when the namespace is empty (almost always an identity mismatch,
|
|
48
|
+
* named as such), when an entry carries no vector or no passage (a
|
|
49
|
+
* bundle never ships an unservable entry), or when the namespace
|
|
50
|
+
* mixes embedding spaces (two spaces in one bundle could never be
|
|
51
|
+
* served by one embedder).
|
|
52
|
+
*/
|
|
53
|
+
export declare function exportCorpus(store: MemoryStore, identity?: MemoryIdentity): Promise<CorpusBundle>;
|
|
54
|
+
/**
|
|
55
|
+
* Load a bundle into a WRITABLE vector-capable store — the inverse of
|
|
56
|
+
* `exportCorpus`. Use it to seed an `InMemoryStore` at boot from a shipped
|
|
57
|
+
* bundle, or to migrate a corpus between machines without re-embedding.
|
|
58
|
+
*
|
|
59
|
+
* Entries are written in the same formatter-ready shape `staticVectorStore`
|
|
60
|
+
* serves, so the two paths render identically.
|
|
61
|
+
*
|
|
62
|
+
* @returns the number of entries written.
|
|
63
|
+
*/
|
|
64
|
+
export declare function importCorpus(store: MemoryStore, bundle: CorpusBundle, identity?: MemoryIdentity): Promise<number>;
|
|
65
|
+
//# sourceMappingURL=exportCorpus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportCorpus.d.ts","sourceRoot":"","sources":["../../../src/rag/exportCorpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,sCAAsC,CAAC;AAG9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,WAAW,EAClB,QAAQ,GAAE,cAAwC,GACjD,OAAO,CAAC,YAAY,CAAC,CA6FvB;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC,CAajB"}
|
|
@@ -11,8 +11,10 @@ export { splitDocuments, type SplitDocumentsOptions } from './splitDocuments.js'
|
|
|
11
11
|
export { indexCorpus, buildIndexChart, type IndexCorpusConfig } from './indexCorpus.js';
|
|
12
12
|
export { indexFolder, type IndexFolderOptions } from './indexFolder.js';
|
|
13
13
|
export { sha256 } from './hash.js';
|
|
14
|
+
export { exportCorpus, importCorpus } from './exportCorpus.js';
|
|
15
|
+
export { staticVectorStore, CORPUS_BUNDLE_FORMAT, type CorpusBundle, type CorpusBundleEntry, type EmbedderFingerprint, } from '../memory/store/staticVectorStore.js';
|
|
14
16
|
export { DEFAULT_LOADERS, textLoader, markdownLoader, htmlLoader, pdfLoader, mockLoader, MissingPdfSupportError, type PdfLoaderOptions, type MockLoaderOptions, } from './loaders/index.js';
|
|
15
17
|
export { stripTags } from './loaders/html.js';
|
|
16
|
-
export { byParagraph, byHeading, fixedWithOverlap, wholeDocument, DEFAULT_MAX_CHARS, DEFAULT_OVERLAP_CHARS, type ByParagraphOptions, type ByHeadingOptions, type FixedWithOverlapOptions, } from './splitters/index.js';
|
|
18
|
+
export { byParagraph, byHeading, fixedWithOverlap, wholeDocument, DEFAULT_MAX_CHARS, DEFAULT_OVERLAP_CHARS, DEFAULT_MIN_CHARS, type ByParagraphOptions, type ByHeadingOptions, type FixedWithOverlapOptions, } from './splitters/index.js';
|
|
17
19
|
export type { Chunk, DocumentInput, DocumentLoader, DocumentSource, FailedDocument, IndexReport, LoadedDocument, LoadedDocumentDraft, Splitter, SplitPiece, TruncatedChunk, } from './types.js';
|
|
18
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOnC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,eAAe,EACf,UAAU,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,KAAK,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
@@ -19,6 +19,31 @@
|
|
|
19
19
|
* and, failing that, hard-cut; every piece keeps the heading it came from.
|
|
20
20
|
* Text before the first heading (a preamble, a title block) is its own
|
|
21
21
|
* heading-less section rather than being attached to a heading it precedes.
|
|
22
|
+
*
|
|
23
|
+
* ── The floor, and why merging goes FORWARD (8.20.0) ────────────────────────
|
|
24
|
+
* A section whose own body is tiny does not retrieve badly — it retrieves TOO
|
|
25
|
+
* WELL. Similarity is a density measure: a heading plus one preamble sentence
|
|
26
|
+
* concentrates its topic's vocabulary with none of its substance. Measured in
|
|
27
|
+
* a production corpus, a 180-character heading-and-preamble chunk outranked
|
|
28
|
+
* the 1,032-character body of its own section at 0.430 — and the model,
|
|
29
|
+
* handed a passage that PROMISES findings and contains none, fabricated a
|
|
30
|
+
* plausible file path to fill the gap.
|
|
31
|
+
*
|
|
32
|
+
* So a section whose body is under `minChars` is merged into the chunk that
|
|
33
|
+
* FOLLOWS it, under its own heading — the preamble sentence survives, leading
|
|
34
|
+
* the chunk it introduces, and the citation still names the section a reader
|
|
35
|
+
* would look up. Merging it BACKWARD would append it to the previous section's
|
|
36
|
+
* chunk, where it introduces nothing and its heading would be lost; merging
|
|
37
|
+
* forward is the direction the author's own document flows. The last section
|
|
38
|
+
* has no next, so a trailing short section merges backward — the one edge
|
|
39
|
+
* where that is the only honest option. Nothing is ever dropped.
|
|
40
|
+
*
|
|
41
|
+
* Two special cases are unconditional, independent of `minChars`:
|
|
42
|
+
* - a section that is heading-plus-whitespace is NEVER emitted alone. It is
|
|
43
|
+
* a coordinate, not a passage — the same distinction `indexDocuments`
|
|
44
|
+
* enforces one layer up when it refuses a passage-less document.
|
|
45
|
+
* - a document that is NOTHING but headings and whitespace yields no chunks
|
|
46
|
+
* at all: there is no passage anywhere in it to retrieve.
|
|
22
47
|
*/
|
|
23
48
|
import type { Splitter } from '../types.js';
|
|
24
49
|
export interface ByHeadingOptions {
|
|
@@ -32,6 +57,20 @@ export interface ByHeadingOptions {
|
|
|
32
57
|
* `####` for emphasis rather than structure.
|
|
33
58
|
*/
|
|
34
59
|
readonly maxLevel?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The floor under a section's own body, in characters (8.20.0). A section
|
|
62
|
+
* whose body is shorter is merged FORWARD into the next chunk under its own
|
|
63
|
+
* heading — never dropped, never shipped alone. Default
|
|
64
|
+
* `min(250, maxChars / 4)`; see `DEFAULT_MIN_CHARS` for the field
|
|
65
|
+
* measurement behind the number (a 180-char heading-and-preamble chunk that
|
|
66
|
+
* outranked its own section's 1,032-char body and drove a fabricated
|
|
67
|
+
* citation).
|
|
68
|
+
*
|
|
69
|
+
* `0` disables the floor. A heading-plus-whitespace section is still never
|
|
70
|
+
* emitted alone — that refusal is unconditional, because a chunk with no
|
|
71
|
+
* body at all is a coordinate, not a passage.
|
|
72
|
+
*/
|
|
73
|
+
readonly minChars?: number;
|
|
35
74
|
}
|
|
36
75
|
export declare function byHeading(options?: ByHeadingOptions): Splitter;
|
|
37
76
|
//# sourceMappingURL=byHeading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byHeading.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/byHeading.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"byHeading.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/byHeading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,KAAK,EAAkB,QAAQ,EAAc,MAAM,aAAa,CAAC;AAcxE,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAWD,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,QAAQ,CA0LlE"}
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* A single paragraph longer than `maxChars` is hard-cut — see the note in
|
|
15
15
|
* `shared.ts` on why packing and cutting are separate decisions.
|
|
16
|
+
*
|
|
17
|
+
* Packing already merges neighbours that FIT — but a short paragraph whose
|
|
18
|
+
* next neighbour is near `maxChars` cannot pack and used to ship alone, where
|
|
19
|
+
* its density outranks real passages (the same failure `byHeading` measured;
|
|
20
|
+
* see `DEFAULT_MIN_CHARS`). Since 8.20.0 a chunk under `minChars` merges
|
|
21
|
+
* FORWARD into the next chunk instead — never dropped, never alone.
|
|
16
22
|
*/
|
|
17
23
|
import type { Splitter } from '../types.js';
|
|
18
24
|
export interface ByParagraphOptions {
|
|
@@ -20,6 +26,14 @@ export interface ByParagraphOptions {
|
|
|
20
26
|
readonly maxChars?: number;
|
|
21
27
|
/** Backward overlap between adjacent chunks. Default 150. */
|
|
22
28
|
readonly overlapChars?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The floor under a chunk, in characters (8.20.0). A packed chunk that
|
|
31
|
+
* remains shorter — a stray short paragraph that could not pack with its
|
|
32
|
+
* full-sized neighbour — merges FORWARD into the next chunk rather than
|
|
33
|
+
* shipping alone. Default `min(250, maxChars / 4)`; `0` disables. See
|
|
34
|
+
* `DEFAULT_MIN_CHARS` for the measured failure behind the number.
|
|
35
|
+
*/
|
|
36
|
+
readonly minChars?: number;
|
|
23
37
|
}
|
|
24
38
|
export declare function byParagraph(options?: ByParagraphOptions): Splitter;
|
|
25
39
|
//# sourceMappingURL=byParagraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byParagraph.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/byParagraph.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"byParagraph.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/byParagraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAkB,QAAQ,EAAc,MAAM,aAAa,CAAC;AAaxE,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,QAAQ,CAiBtE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The numbers every splitter defaults to, in one place so they cannot
|
|
3
3
|
* drift apart between strategies.
|
|
4
4
|
*
|
|
5
5
|
* See `splitters/index.ts` for the measurement they come from: `localEmbedder`
|
|
@@ -17,4 +17,27 @@ export declare const DEFAULT_OVERLAP_CHARS = 150;
|
|
|
17
17
|
* passage.
|
|
18
18
|
*/
|
|
19
19
|
export declare const MIN_CHUNK_CHARS = 50;
|
|
20
|
+
/**
|
|
21
|
+
* The default `minChars` floor for the structural splitters (`byHeading`,
|
|
22
|
+
* `byParagraph`), at the default `maxChars`. A section or paragraph whose own
|
|
23
|
+
* text is under the floor is merged FORWARD into the next chunk rather than
|
|
24
|
+
* shipped alone (8.20.0).
|
|
25
|
+
*
|
|
26
|
+
* Why a floor at all, and why this number: short chunks do not merely retrieve
|
|
27
|
+
* badly — they retrieve TOO WELL. Similarity is a density measure, and a
|
|
28
|
+
* heading plus one preamble sentence concentrates its topic's vocabulary with
|
|
29
|
+
* none of its substance. Measured in a production corpus: a 180-character
|
|
30
|
+
* heading-and-preamble chunk outscored the 1,032-character body of its own
|
|
31
|
+
* section, 0.430 against lower — so the model was handed a passage that
|
|
32
|
+
* PROMISES findings, contains none, and fabricated a plausible file path to
|
|
33
|
+
* fill the gap. 250 characters (~60 tokens) sits comfortably above that
|
|
34
|
+
* measured failure, is a quarter of the default target, and keeps a
|
|
35
|
+
* floor-merged chunk (short section + a full neighbour ≤ ~1,250 chars ≈ 310
|
|
36
|
+
* tokens) far inside the 512-wordpiece-token embedder cliff.
|
|
37
|
+
*
|
|
38
|
+
* The effective default scales with the caller's own target: it is
|
|
39
|
+
* `min(250, maxChars / 4)`, so `byHeading({ maxChars: 400 })` gets a 100-char
|
|
40
|
+
* floor rather than one bigger than half its chunks.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_MIN_CHARS = 250;
|
|
20
43
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
|
|
@@ -30,6 +30,20 @@
|
|
|
30
30
|
* whole in one of the two neighbours. It is the smallest overlap that reliably
|
|
31
31
|
* does that for English prose; there is nothing deeper claimed for it.
|
|
32
32
|
*
|
|
33
|
+
* **`minChars` (8.20.0): the floor, from a different measurement.** Short
|
|
34
|
+
* chunks retrieve too WELL, not too badly — similarity is a density measure,
|
|
35
|
+
* and a heading plus a preamble sentence concentrates a topic's vocabulary
|
|
36
|
+
* with none of its substance. Measured in a production corpus: a 180-char
|
|
37
|
+
* heading-and-preamble chunk outranked its own section's 1,032-char body, and
|
|
38
|
+
* the model fabricated a citation to fill the promise the empty chunk made.
|
|
39
|
+
* `byHeading` and `byParagraph` therefore merge sub-floor chunks FORWARD into
|
|
40
|
+
* the next chunk (default floor `min(250, maxChars / 4)`; nothing is ever
|
|
41
|
+
* dropped, and a heading with no body is never emitted alone regardless of
|
|
42
|
+
* the floor). `fixedWithOverlap` does not have the failure shape — its chunks
|
|
43
|
+
* are uniformly `chars` long BY REQUEST, and its only runt (the file tail) has
|
|
44
|
+
* always folded backward — and `wholeDocument` is one-chunk-per-document by
|
|
45
|
+
* definition, so neither takes the option.
|
|
46
|
+
*
|
|
33
47
|
* ── Which one to use ────────────────────────────────────────────────────────
|
|
34
48
|
*
|
|
35
49
|
* | splitter | cuts on | use when |
|
|
@@ -47,5 +61,5 @@ export { byParagraph, type ByParagraphOptions } from './byParagraph.js';
|
|
|
47
61
|
export { byHeading, type ByHeadingOptions } from './byHeading.js';
|
|
48
62
|
export { fixedWithOverlap, type FixedWithOverlapOptions } from './fixedWithOverlap.js';
|
|
49
63
|
export { wholeDocument } from './wholeDocument.js';
|
|
50
|
-
export { DEFAULT_MAX_CHARS, DEFAULT_OVERLAP_CHARS } from './constants.js';
|
|
64
|
+
export { DEFAULT_MAX_CHARS, DEFAULT_OVERLAP_CHARS, DEFAULT_MIN_CHARS } from './constants.js';
|
|
51
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -79,6 +79,38 @@ export declare function applyOverlap(spans: readonly Span[], overlapChars: numbe
|
|
|
79
79
|
* Two spans merge only when they are already the same section.
|
|
80
80
|
*/
|
|
81
81
|
export declare function foldRunts(spans: readonly Span[], minChars?: number): Span[];
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the effective `minChars` floor for a splitter (8.20.0).
|
|
84
|
+
*
|
|
85
|
+
* Unset → `min(DEFAULT_MIN_CHARS, maxChars / 4)`: 250 at the default target,
|
|
86
|
+
* shrinking proportionally when the caller asked for small chunks, so a
|
|
87
|
+
* defaulted floor can never swallow the chunk size the caller chose.
|
|
88
|
+
*
|
|
89
|
+
* An EXPLICIT floor is validated instead of clamped: a floor at or above the
|
|
90
|
+
* target would merge every chunk into its neighbour, which is a configuration
|
|
91
|
+
* contradiction, not a preference — refused by name rather than rounded away.
|
|
92
|
+
*/
|
|
93
|
+
export declare function resolveMinChars(minChars: number | undefined, maxChars: number): number;
|
|
94
|
+
/**
|
|
95
|
+
* Merge sub-floor spans FORWARD into their next neighbour (8.20.0).
|
|
96
|
+
*
|
|
97
|
+
* For heading-less span families (paragraphs, and `byHeading`'s no-headings
|
|
98
|
+
* fallback). A span under the floor is never dropped and never shipped alone:
|
|
99
|
+
*
|
|
100
|
+
* - adjacent short spans accumulate; the moment the accumulation reaches the
|
|
101
|
+
* floor it is emitted as its own span (two 150-char paragraphs make a fine
|
|
102
|
+
* 300-char chunk — better than pushing both into a full-sized neighbour);
|
|
103
|
+
* - an accumulation still under the floor joins the NEXT full span, so the
|
|
104
|
+
* short text leads the merged chunk;
|
|
105
|
+
* - at the end of the document there is no next, so a trailing accumulation
|
|
106
|
+
* merges BACKWARD into the last emitted span;
|
|
107
|
+
* - a document that is nothing but short spans stays one merged span —
|
|
108
|
+
* there is no neighbour, and "never dropped" wins.
|
|
109
|
+
*
|
|
110
|
+
* Merged spans slice the SOURCE (start of the first constituent to end of the
|
|
111
|
+
* last), so the offset invariant holds by construction, as everywhere else.
|
|
112
|
+
*/
|
|
113
|
+
export declare function mergeShortSpansForward(spans: readonly Span[], minChars: number): Span[];
|
|
82
114
|
/** Turn spans into pieces, slicing the text so the invariant holds by construction. */
|
|
83
115
|
export declare function toPieces(doc: LoadedDocument, spans: readonly Span[]): SplitPiece[];
|
|
84
116
|
/** Hard-cut a span that no packing could fit, at `maxChars` with overlap. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/rag/splitters/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9D,2CAA2C;AAC3C,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAiBvF;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE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|
454
454
|
* that silently — a lean default would quietly empty their replays.
|
|
455
455
|
*/
|
|
456
456
|
readonly snapshot?: 'full' | 'lean';
|
|
457
|
+
/**
|
|
458
|
+
* Keep raw embedding vectors in captured payloads (8.20.0). Default
|
|
459
|
+
* `false`: every `embedding` / `embeddings` field in a boundary payload is
|
|
460
|
+
* replaced with its `{ dims, norm }` summary at capture time.
|
|
461
|
+
*
|
|
462
|
+
* The default exists because of a field measurement: the memory-read
|
|
463
|
+
* subflow's boundary output carries each retrieved entry's full vector,
|
|
464
|
+
* and one retrieval turn's recording weighed 2.76 MB — ~1.1 MB of it
|
|
465
|
+
* embedding floats no consumer of a recording reads. The retrieval
|
|
466
|
+
* evidence a debugger needs (score, passage, document, rejected
|
|
467
|
+
* candidates) does not live in those floats and is untouched.
|
|
468
|
+
*
|
|
469
|
+
* Set `true` only when a consumer genuinely replays vectors (say, to
|
|
470
|
+
* re-rank offline) — the recording grows by the full vector bytes again.
|
|
471
|
+
*/
|
|
472
|
+
readonly recordEmbeddings?: boolean;
|
|
457
473
|
}
|
|
458
474
|
/**
|
|
459
475
|
* Stripped projection used as the LABEL for the commit-range index.
|
|
@@ -522,6 +538,10 @@ export declare class BoundaryRecorder implements CombinedRecorder {
|
|
|
522
538
|
* `toSnapshot()` reads it; the live event stream from `getEvents()`
|
|
523
539
|
* is always full, so in-process consumers are never affected. */
|
|
524
540
|
private readonly snapshotMode;
|
|
541
|
+
/** See `BoundaryRecorderOptions.recordEmbeddings`. Applied at CAPTURE
|
|
542
|
+
* time, so the summary is what every projection (live stream, snapshot,
|
|
543
|
+
* lean) sees — one truth, not per-reader rewrites. */
|
|
544
|
+
private readonly keepEmbeddings;
|
|
525
545
|
/**
|
|
526
546
|
* Tracks whether the most recent `llm.end` had toolCalls. Used to
|
|
527
547
|
* classify the NEXT `llm.start` as `'tool→llm'` (vs `'user→llm'` if
|
|
@@ -554,6 +574,10 @@ export declare class BoundaryRecorder implements CombinedRecorder {
|
|
|
554
574
|
*/
|
|
555
575
|
private readonly runIdGuard;
|
|
556
576
|
constructor(options?: BoundaryRecorderOptions);
|
|
577
|
+
/** Boundary payloads keep a vector's shape, not its bytes — see
|
|
578
|
+
* `recordEmbeddings`. Copy-on-write: payloads without embeddings pass
|
|
579
|
+
* through by reference. */
|
|
580
|
+
private capturePayload;
|
|
557
581
|
/**
|
|
558
582
|
* Reset all transient state.
|
|
559
583
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundaryRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/BoundaryRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG;AAEH,OAAO,EAIL,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAMrB,UAAU,YAAY;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C;AAGD,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,eAAe,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C;AACD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"BoundaryRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/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AAE;IAInD,wEAAwE;IACxE,eAAe,IAAI,CAAC,cAAc,GAAG,kBAAkB,CAAC,EAAE;IAI1D,mEAAmE;IACnE,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG;QACnC,KAAK,CAAC,EAAE,cAAc,GAAG,kBAAkB,CAAC;QAC5C,IAAI,CAAC,EAAE,cAAc,GAAG,kBAAkB,CAAC;KAC5C;IAcD,qDAAqD;IACrD,eAAe,IAAI;QACjB,KAAK,CAAC,EAAE,cAAc,CAAC;QACvB,IAAI,CAAC,EAAE,cAAc,CAAC;KACvB;IAQD,4EAA4E;IAC5E,iBAAiB,IAAI;QACnB,YAAY,EAAE,kBAAkB,EAAE,CAAC;QACnC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;QAC/B,KAAK,EAAE,kBAAkB,EAAE,CAAC;KAC7B;IAaD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAY3E;;;;;;;;;;OAUG;IACH,sBAAsB,IAAI,SAAS,iBAAiB,EAAE;IAkBtD;;;;;;;;;;;;;;;;;;;;;;;sBAuBkB;IAClB,UAAU,IAAI;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,WAAW,CAAC;QAChC,IAAI,EAAE,WAAW,EAAE,GAAG,eAAe,EAAE,CAAC;QACxC,IAAI,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;KAC1C;CAYF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* embeddingSummary — what a recording keeps of a vector: its shape, not its
|
|
3
|
+
* bytes.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: pure copy-on-write projection, in the `storedPreview` family —
|
|
6
|
+
* "summarise structured values rather than serialize them", applied
|
|
7
|
+
* to the one field measured to dominate a recording's size.
|
|
8
|
+
* Role: recorders/observability layer. Applied at the RECORDING boundary
|
|
9
|
+
* (BoundaryRecorder payload capture, `recordRun` freeze), never to
|
|
10
|
+
* live run state — stages and stores keep their real vectors.
|
|
11
|
+
* Emits: N/A.
|
|
12
|
+
*
|
|
13
|
+
* ── The measurement this exists for ─────────────────────────────────────────
|
|
14
|
+
* A single retrieval turn's recording measured 2.76 MB in a production RAG
|
|
15
|
+
* deployment — about 1.1 MB of it embedding floats, because the memory-read
|
|
16
|
+
* subflow's boundary output carries every retrieved entry, and every entry
|
|
17
|
+
* carries its full vector (1,024 floats serializing at ~19 bytes each). No
|
|
18
|
+
* consumer of a recording reads those floats: retrieval debugging needs the
|
|
19
|
+
* score, the passage, the document and the rejected candidates — all of which
|
|
20
|
+
* live in the retrieval evidence and none of which this touches. The vector's
|
|
21
|
+
* only recording-worthy facts are that it existed, its dimensionality, and a
|
|
22
|
+
* checksum-grade magnitude. That is exactly what `{ dims, norm }` keeps.
|
|
23
|
+
*
|
|
24
|
+
* The walk is copy-on-write: a value with no embeddings anywhere is returned
|
|
25
|
+
* BY REFERENCE, so the common payload costs one traversal and zero
|
|
26
|
+
* allocation. It never mutates its input — recordings share structure with
|
|
27
|
+
* live run state, and live state is borrowed, not owned.
|
|
28
|
+
*
|
|
29
|
+
* Two spellings are recognised, because the memory layer writes both:
|
|
30
|
+
* - `embedding: number[]` — a `MemoryEntry`'s vector (read side);
|
|
31
|
+
* - `embeddings: number[][]` — the write pipeline's per-message batch.
|
|
32
|
+
*
|
|
33
|
+
* Idempotent by construction: a summary is not a numeric array, so a value
|
|
34
|
+
* that has already been summarised passes through unchanged.
|
|
35
|
+
*/
|
|
36
|
+
/** What remains of a vector in a recording: dimensionality and L2 norm. */
|
|
37
|
+
export interface EmbeddingSummary {
|
|
38
|
+
readonly dims: number;
|
|
39
|
+
readonly norm: number;
|
|
40
|
+
}
|
|
41
|
+
/** Summarise one vector. Exported for consumers that render recordings. */
|
|
42
|
+
export declare function summarizeVector(vector: readonly number[]): EmbeddingSummary;
|
|
43
|
+
/**
|
|
44
|
+
* Replace every `embedding` / `embeddings` field in a JSON-ish value with its
|
|
45
|
+
* `{ dims, norm }` summary. Copy-on-write: returns the SAME reference when
|
|
46
|
+
* nothing needed replacing; otherwise a structurally-shared copy. Never
|
|
47
|
+
* mutates the input.
|
|
48
|
+
*
|
|
49
|
+
* Shared nodes stay shared: a snapshot holds the same entry object at several
|
|
50
|
+
* paths (live state, stage writes, commit history), so results are memoized
|
|
51
|
+
* per input object — every path gets the SAME summarized copy, not one copy
|
|
52
|
+
* and one raw leak. Cycle-safe: an object seen again while still being walked
|
|
53
|
+
* resolves to its original reference (a cyclic value could not be serialized
|
|
54
|
+
* anyway).
|
|
55
|
+
*/
|
|
56
|
+
export declare function summarizeEmbeddings(value: unknown): unknown;
|
|
57
|
+
//# sourceMappingURL=embeddingSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddingSummary.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/embeddingSummary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAaD,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,CAE3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D"}
|
|
@@ -94,6 +94,22 @@ export interface RecordRunOptions {
|
|
|
94
94
|
* consumer reading the bundle's `meta.mode` can say so.
|
|
95
95
|
*/
|
|
96
96
|
readonly boundaryDetail?: 'full' | 'lean';
|
|
97
|
+
/**
|
|
98
|
+
* Keep raw embedding vectors in the recording (8.20.0). Default `false`:
|
|
99
|
+
* every `embedding` / `embeddings` field — in boundary payloads, in the
|
|
100
|
+
* snapshot's subflow results, in tool results riding the event stream —
|
|
101
|
+
* is replaced with its `{ dims, norm }` summary when the recording is
|
|
102
|
+
* frozen.
|
|
103
|
+
*
|
|
104
|
+
* Field measurement behind the default: one retrieval turn's recording
|
|
105
|
+
* weighed 2.76 MB, ~1.1 MB of it embedding floats, because the
|
|
106
|
+
* memory-read subflow's boundary output carries each retrieved entry's
|
|
107
|
+
* full vector. Nothing that renders a recording reads those floats; the
|
|
108
|
+
* retrieval evidence a debugger needs (score, passage, document,
|
|
109
|
+
* rejected candidates) carries no vectors and is untouched. Set `true`
|
|
110
|
+
* only when a consumer genuinely replays raw vectors offline.
|
|
111
|
+
*/
|
|
112
|
+
readonly recordEmbeddings?: boolean;
|
|
97
113
|
}
|
|
98
114
|
/** A recording in progress. Keep it until the run ends, then freeze it. */
|
|
99
115
|
export interface RunRecorder {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordRun.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/recordRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"recordRun.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/recordRun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGhF;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;OAUG;IACH,WAAW,IAAI,SAAS,CAAC;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B;;;;;OAKG;IACH,IAAI,IAAI,IAAI,CAAC;CACd;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAiErF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.20.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|