agentfootprint 8.8.0 → 8.9.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.
Files changed (86) hide show
  1. package/CLAUDE.md +3 -1
  2. package/dist/adapters/memory/sqliteVector.js +875 -0
  3. package/dist/adapters/memory/sqliteVector.js.map +1 -0
  4. package/dist/core/Agent.js +6 -0
  5. package/dist/core/Agent.js.map +1 -1
  6. package/dist/embedders/index.js +11 -0
  7. package/dist/embedders/index.js.map +1 -1
  8. package/dist/esm/adapters/memory/sqliteVector.d.ts +251 -0
  9. package/dist/esm/adapters/memory/sqliteVector.js +869 -0
  10. package/dist/esm/adapters/memory/sqliteVector.js.map +1 -0
  11. package/dist/esm/core/Agent.js +6 -0
  12. package/dist/esm/core/Agent.js.map +1 -1
  13. package/dist/esm/embedders/index.js +11 -0
  14. package/dist/esm/embedders/index.js.map +1 -1
  15. package/dist/esm/hosting/sqliteSessions.d.ts +7 -13
  16. package/dist/esm/hosting/sqliteSessions.js +8 -25
  17. package/dist/esm/hosting/sqliteSessions.js.map +1 -1
  18. package/dist/esm/lib/rag/indexDocuments.d.ts +26 -4
  19. package/dist/esm/lib/rag/indexDocuments.js +12 -1
  20. package/dist/esm/lib/rag/indexDocuments.js.map +1 -1
  21. package/dist/esm/lib/sqliteUnavailable.d.ts +55 -0
  22. package/dist/esm/lib/sqliteUnavailable.js +61 -0
  23. package/dist/esm/lib/sqliteUnavailable.js.map +1 -0
  24. package/dist/esm/memory/embedding/embedMessages.js +16 -0
  25. package/dist/esm/memory/embedding/embedMessages.js.map +1 -1
  26. package/dist/esm/memory/embedding/emitEmbedding.d.ts +38 -0
  27. package/dist/esm/memory/embedding/emitEmbedding.js +15 -0
  28. package/dist/esm/memory/embedding/emitEmbedding.js.map +1 -0
  29. package/dist/esm/memory/embedding/loadRelevant.js +14 -0
  30. package/dist/esm/memory/embedding/loadRelevant.js.map +1 -1
  31. package/dist/esm/memory/embedding/mockEmbedder.js +4 -0
  32. package/dist/esm/memory/embedding/mockEmbedder.js.map +1 -1
  33. package/dist/esm/memory/embedding/types.d.ts +24 -0
  34. package/dist/esm/memory-providers.d.ts +2 -0
  35. package/dist/esm/memory-providers.js +8 -0
  36. package/dist/esm/memory-providers.js.map +1 -1
  37. package/dist/esm/observe.d.ts +2 -0
  38. package/dist/esm/observe.js +2 -0
  39. package/dist/esm/observe.js.map +1 -1
  40. package/dist/esm/recorders/core/EmbeddingRecorder.d.ts +19 -0
  41. package/dist/esm/recorders/core/EmbeddingRecorder.js +24 -0
  42. package/dist/esm/recorders/core/EmbeddingRecorder.js.map +1 -0
  43. package/dist/hosting/sqliteSessions.js +10 -27
  44. package/dist/hosting/sqliteSessions.js.map +1 -1
  45. package/dist/lib/rag/indexDocuments.js +12 -1
  46. package/dist/lib/rag/indexDocuments.js.map +1 -1
  47. package/dist/lib/sqliteUnavailable.js +65 -0
  48. package/dist/lib/sqliteUnavailable.js.map +1 -0
  49. package/dist/memory/embedding/embedMessages.js +16 -0
  50. package/dist/memory/embedding/embedMessages.js.map +1 -1
  51. package/dist/memory/embedding/emitEmbedding.js +19 -0
  52. package/dist/memory/embedding/emitEmbedding.js.map +1 -0
  53. package/dist/memory/embedding/loadRelevant.js +14 -0
  54. package/dist/memory/embedding/loadRelevant.js.map +1 -1
  55. package/dist/memory/embedding/mockEmbedder.js +4 -0
  56. package/dist/memory/embedding/mockEmbedder.js.map +1 -1
  57. package/dist/memory-providers.js +13 -1
  58. package/dist/memory-providers.js.map +1 -1
  59. package/dist/observe.js +4 -1
  60. package/dist/observe.js.map +1 -1
  61. package/dist/recorders/core/EmbeddingRecorder.js +28 -0
  62. package/dist/recorders/core/EmbeddingRecorder.js.map +1 -0
  63. package/dist/types/adapters/memory/sqliteVector.d.ts +252 -0
  64. package/dist/types/adapters/memory/sqliteVector.d.ts.map +1 -0
  65. package/dist/types/core/Agent.d.ts.map +1 -1
  66. package/dist/types/embedders/index.d.ts.map +1 -1
  67. package/dist/types/hosting/sqliteSessions.d.ts +7 -13
  68. package/dist/types/hosting/sqliteSessions.d.ts.map +1 -1
  69. package/dist/types/lib/rag/indexDocuments.d.ts +26 -4
  70. package/dist/types/lib/rag/indexDocuments.d.ts.map +1 -1
  71. package/dist/types/lib/sqliteUnavailable.d.ts +56 -0
  72. package/dist/types/lib/sqliteUnavailable.d.ts.map +1 -0
  73. package/dist/types/memory/embedding/embedMessages.d.ts.map +1 -1
  74. package/dist/types/memory/embedding/emitEmbedding.d.ts +39 -0
  75. package/dist/types/memory/embedding/emitEmbedding.d.ts.map +1 -0
  76. package/dist/types/memory/embedding/loadRelevant.d.ts.map +1 -1
  77. package/dist/types/memory/embedding/mockEmbedder.d.ts.map +1 -1
  78. package/dist/types/memory/embedding/types.d.ts +24 -0
  79. package/dist/types/memory/embedding/types.d.ts.map +1 -1
  80. package/dist/types/memory-providers.d.ts +2 -0
  81. package/dist/types/memory-providers.d.ts.map +1 -1
  82. package/dist/types/observe.d.ts +2 -0
  83. package/dist/types/observe.d.ts.map +1 -1
  84. package/dist/types/recorders/core/EmbeddingRecorder.d.ts +20 -0
  85. package/dist/types/recorders/core/EmbeddingRecorder.d.ts.map +1 -0
  86. package/package.json +1 -1
@@ -59,10 +59,15 @@ export interface IndexDocumentsOptions {
59
59
  */
60
60
  readonly identity?: MemoryIdentity;
61
61
  /**
62
- * Stable id of the embedder. Stored on each entry so a future
63
- * embedder swap doesn't silently mix similarity scores. Default:
64
- * `'default-embedder'` — pass an explicit id when you may rotate
65
- * embedders.
62
+ * Stable id of the embedder. Stored on each entry so a future embedder swap
63
+ * doesn't silently mix similarity scores.
64
+ *
65
+ * Defaults to the embedder's own `id` (8.9.0 — every shipped embedder sets
66
+ * one), and to `'default-embedder'` for a hand-written `Embedder` that has
67
+ * none. That default matters more with a durable store: it is half of the
68
+ * `'<id>@<dims>'` fingerprint `sqliteVectorStore` records per vector and
69
+ * refuses on, so an index built by `staticEmbedder()` will not silently
70
+ * accept vectors from `openaiEmbedder()`.
66
71
  */
67
72
  readonly embedderId?: string;
68
73
  /**
@@ -81,6 +86,23 @@ export interface IndexDocumentsOptions {
81
86
  * this through to abort batch indexing on shutdown / timeout.
82
87
  */
83
88
  readonly signal?: AbortSignal;
89
+ /**
90
+ * Called once with the cost of the embedding work this call did (8.9.0).
91
+ *
92
+ * `indexDocuments` runs at STARTUP, outside any agent run, so it has no
93
+ * emit channel to ride — there is no scope, no dispatcher and no
94
+ * `runtimeStageId` to correlate against. Rather than pretend otherwise, it
95
+ * hands the same payload the in-run stages emit as
96
+ * `agentfootprint.embedding.generated` straight to you, so the index-time
97
+ * half of the cost model is reportable from a boot script:
98
+ *
99
+ * ```ts
100
+ * await indexDocuments(store, embedder, docs, {
101
+ * onEmbedding: (e) => console.log(`embedded ${e.count} documents in ${e.durationMs}ms`),
102
+ * });
103
+ * ```
104
+ */
105
+ readonly onEmbedding?: (payload: import('../../events/payloads.js').EmbeddingGeneratedPayload) => void;
84
106
  /**
85
107
  * Max number of concurrent embed calls when the embedder doesn't
86
108
  * implement `embedBatch`. Default `8`. Without this cap, a 10K-doc
@@ -1 +1 @@
1
- {"version":3,"file":"indexDocuments.d.ts","sourceRoot":"","sources":["../../../../src/lib/rag/indexDocuments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AAED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;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAEnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAExC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAE9B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CACrB,OAAO,EAAE,OAAO,0BAA0B,EAAE,yBAAyB,KAClE,IAAI,CAAC;IAEV;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAID;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,WAAW,EAAE,EACjC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,MAAM,CAAC,CAyDjB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * lib/sqliteUnavailable — the one refusal for "this Node has no `node:sqlite`".
3
+ *
4
+ * Pattern: leaf error type (imports nothing).
5
+ * Role: shared by `hosting/sqliteSessions` and `adapters/memory/sqliteVector`.
6
+ * It lives here rather than in either of them because two adapters
7
+ * hitting the same missing module must raise the same error: a
8
+ * consumer catching `SqliteUnavailableError` should not have to know
9
+ * which of our stores was being constructed, and two classes of one
10
+ * name is a duplicate type the build refuses anyway.
11
+ * Emits: N/A.
12
+ *
13
+ * Node 20 does not have the module at all; Node 22.5 through 22.12 have it
14
+ * behind `--experimental-sqlite`; Node 22.13+ and 23.4+ have it as-is (still
15
+ * marked experimental by Node, which is why it prints a warning on first use).
16
+ *
17
+ * The refusal names the version you are on and the three ways out, because
18
+ * "cannot find module 'node:sqlite'" out of a library's guts tells you what
19
+ * broke and nothing about what to do.
20
+ *
21
+ * **There is deliberately no fallback.** Each caller supplies its own last
22
+ * sentence saying what a silent fallback would have looked like from the
23
+ * outside, because that sentence is the argument — not decoration.
24
+ */
25
+ /** What the refusal says about the caller that raised it. */
26
+ export interface SqliteUnavailableContext {
27
+ /** The factory the consumer actually wrote, e.g. `sqliteSessions()`. */
28
+ readonly factory: string;
29
+ /** The honest in-memory alternative, named so it can be reached for. */
30
+ readonly alternative: string;
31
+ /** Why falling back to that alternative silently would be worse than refusing. */
32
+ readonly whyNotFallback: string;
33
+ /** Which door the message belongs to, for the `[prefix]` tag. */
34
+ readonly door: string;
35
+ }
36
+ /**
37
+ * Raised when `node:sqlite` is not available in the running Node.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * try {
42
+ * const store = sqliteVectorStore({ file: './corpus.db' });
43
+ * } catch (err) {
44
+ * if (err instanceof SqliteUnavailableError) {
45
+ * console.error(`Node ${err.nodeVersion} cannot do this`, err.message);
46
+ * }
47
+ * }
48
+ * ```
49
+ */
50
+ export declare class SqliteUnavailableError extends Error {
51
+ readonly code: "ERR_SQLITE_UNAVAILABLE";
52
+ /** The Node version this process is running. */
53
+ readonly nodeVersion: string;
54
+ constructor(nodeVersion: string, reason: string, context?: SqliteUnavailableContext);
55
+ }
56
+ //# sourceMappingURL=sqliteUnavailable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqliteUnavailable.d.ts","sourceRoot":"","sources":["../../../src/lib/sqliteUnavailable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kFAAkF;IAClF,QAAQ,CAA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,kBAAkB,CAAC,KAAG,QAAQ,IAAI,CAAC,CA6BpE"}
1
+ {"version":3,"file":"embedMessages.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/embedMessages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,4EAA4E;AAC5E,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IAEtD,mFAAmF;IACnF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE5B;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAClD;AAOD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,WAIlC,WAAW,kBAAkB,CAAC,KAAG,QAAQ,IAAI,CAAC,CA6CpE"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * emitEmbedding — one place that reports an embedding call.
3
+ *
4
+ * Pattern: leaf helper over the emit channel.
5
+ * Role: memory/ layer. Both halves of the two-phase cost model go through
6
+ * it — `embedMessages` reports `'document'`, `loadRelevant` reports
7
+ * `'query'` — so the two can never drift into describing the same
8
+ * fact two different ways.
9
+ * Emits: `agentfootprint.embedding.generated`.
10
+ *
11
+ * ── Why this event matters more than it looks ───────────────────────────────
12
+ * Embedding cost is not one number. **Index time** embeds the corpus: it
13
+ * happens once, and its cost scales with how much you store. **Query time**
14
+ * embeds the user's question: it happens per retrieval, and its cost scales
15
+ * with traffic. `inputKind` is the field that separates them, and separating
16
+ * them is what makes "should this corpus live in a file?" a question with an
17
+ * arithmetic answer instead of a feeling.
18
+ *
19
+ * The payload has been declared since 2.x and nothing emitted it, so any
20
+ * dashboard built against it has been reading a flat line that meant "not
21
+ * wired", not "no cost".
22
+ *
23
+ * Telemetry rides the EMIT channel, never a commit payload — a cost report is
24
+ * an observation about a stage, not state the next stage reads.
25
+ */
26
+ import type { TypedScope } from 'footprintjs';
27
+ import type { EmbeddingGeneratedPayload } from '../../events/payloads.js';
28
+ /**
29
+ * Fire the event when the scope has an emit channel, and do nothing when it
30
+ * does not.
31
+ *
32
+ * A memory pipeline can be mounted outside an Agent (`mountMemoryRead` on a
33
+ * bare flowchart), and a stage that threw because nobody was listening would
34
+ * make observability a requirement rather than an option.
35
+ */
36
+ export declare function emitEmbedding(scope: TypedScope<Record<string, unknown>> | {
37
+ $emit?: unknown;
38
+ }, payload: EmbeddingGeneratedPayload): void;
39
+ //# sourceMappingURL=emitEmbedding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitEmbedding.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/emitEmbedding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAChE,OAAO,EAAE,yB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,CAAC,CA8I7D;AAkBD,kGAAkG;AAClG,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"mockEmbedder.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/mockEmbedder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,QAAQ,EAA6B,MAAM,YAAY,CAAC;AAYtE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,QAAQ,CAexE"}
1
+ {"version":3,"file":"mockEmbedder.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/mockEmbedder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,QAAQ,EAA6B,MAAM,YAAY,CAAC;AAYtE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,QAAQ,CAmBxE"}
@@ -35,6 +35,30 @@ export interface EmbedBatchArgs {
35
35
  export interface Embedder {
36
36
  /** Vector length. Constant per embedder instance. */
37
37
  readonly dimensions: number;
38
+ /**
39
+ * Stable name of the embedding space this instance produces (8.9.0).
40
+ *
41
+ * Together with `dimensions` it forms the fingerprint a durable store
42
+ * records per vector — `'<id>@<dims>'` — and refuses on when it changes.
43
+ * Cosine similarity between two embedding spaces is not a weak signal; it
44
+ * is not a signal, and it comes back as a confident number in the same
45
+ * range as a real one. A store that can name the space can refuse the mix;
46
+ * one that cannot has to let it through.
47
+ *
48
+ * Optional, because an `Embedder` is a structural interface and every
49
+ * hand-written one predates this field. When it is absent the store falls
50
+ * back to comparing `dimensions` alone, which catches the arithmetically
51
+ * impossible case and not the merely wrong one.
52
+ *
53
+ * Every shipped embedder sets it, and it is what you pass as `embedderId`:
54
+ *
55
+ * ```ts
56
+ * const embedder = staticEmbedder();
57
+ * await indexDocuments(store, embedder, docs, { embedderId: embedder.id });
58
+ * defineRAG({ id: 'docs', store, embedder, embedderId: embedder.id });
59
+ * ```
60
+ */
61
+ readonly id?: string;
38
62
  /** Embed a single text into a vector of length `dimensions`. */
39
63
  embed(args: EmbedArgs): Promise<number[]>;
40
64
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,qDAAqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,gEAAgE;IAChE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CACxD"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/memory/embedding/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,qDAAqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAErB,gEAAgE;IAChE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CACxD"}
@@ -38,5 +38,7 @@
38
38
  */
39
39
  export { RedisStore, type RedisStoreOptions, type RedisLikeClient, type RedisLikePipeline, } from './adapters/memory/redis.js';
40
40
  export { AgentCoreStore, UnreadableMemoryEntryError, type AgentCoreStoreOptions, type AgentCoreLikeClient, type AgentCoreEvent, type AgentCoreMemoryRecord, } from './adapters/memory/agentcore.js';
41
+ export { sqliteVectorStore, UnreadableIndexFileError, EmbedderMismatchError, type SqliteVectorStore, type SqliteVectorStoreOptions, type SqliteVectorDatabaseLike, type SqliteVectorStatementLike, type SqliteVectorModuleLike, } from './adapters/memory/sqliteVector.js';
42
+ export { SqliteUnavailableError } from './lib/sqliteUnavailable.js';
41
43
  export { BedrockAgentMemory, type BedrockAgentMemoryOptions, type BedrockAgentMemoryLikeClient, type BedrockAgentSummary, } from './adapters/memory/bedrockAgentMemory.js';
42
44
  //# sourceMappingURL=memory-providers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,GACzB,MAAM,yCAAyC,CAAC"}
1
+ {"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIpE,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,GACzB,MAAM,yCAAyC,CAAC"}
@@ -22,6 +22,7 @@
22
22
  * • CostRecorder — token/USD spend
23
23
  * • EvalRecorder — eval scores from `runner.emit('eval.*', ...)`
24
24
  * • MemoryRecorder — memory injections + writes
25
+ * • EmbeddingRecorder — embedding cost, index-time vs query-time
25
26
  * • PermissionRecorder — permission decisions + denials
26
27
  * • SkillRecorder — skill activations
27
28
  * • LoggingRecorder — structured log lines per event
@@ -46,6 +47,7 @@ export { toolsRecorder, type ToolsRecorderOptions } from './recorders/core/Tools
46
47
  export { contextEvaluatedRecorder, type ContextEvaluatedRecorderOptions, } from './recorders/core/ContextEvaluatedRecorder.js';
47
48
  export { evalRecorder, type EvalRecorderOptions } from './recorders/core/EvalRecorder.js';
48
49
  export { memoryRecorder, type MemoryRecorderOptions } from './recorders/core/MemoryRecorder.js';
50
+ export { embeddingRecorder, type EmbeddingRecorderOptions, } from './recorders/core/EmbeddingRecorder.js';
49
51
  export { permissionRecorder, type PermissionRecorderOptions, } from './recorders/core/PermissionRecorder.js';
50
52
  export { skillRecorder, type SkillRecorderOptions } from './recorders/core/SkillRecorder.js';
51
53
  export { resilienceRecorder, type ResilienceRecorderOptions, } from './recorders/core/ResilienceRecorder.js';
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;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,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ACL,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,20 @@
1
+ /**
2
+ * EmbeddingRecorder — forwards `agentfootprint.embedding.*` emits to the dispatcher.
3
+ *
4
+ * Pattern: Factory over EmitBridge.
5
+ * Role: Bridges the embedding domain — the two-phase cost model. Without a
6
+ * bridge an emit never reaches `agent.on(...)` no matter how correctly
7
+ * it is fired, which is the shape this domain was in until 8.9.0: it
8
+ * had a payload type, a registry entry and a `DomainWildcard` arm, and
9
+ * no way for the event to arrive.
10
+ * Emits: agentfootprint.embedding.generated
11
+ *
12
+ * Always-on and zero-cost: an agent with no memory pipeline embeds nothing and
13
+ * this bridge sees nothing.
14
+ */
15
+ import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
16
+ export type EmbeddingRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
17
+ readonly id?: string;
18
+ };
19
+ export declare function embeddingRecorder(options: EmbeddingRecorderOptions): EmitBridge;
20
+ //# sourceMappingURL=EmbeddingRecorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddingRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/core/EmbeddingRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,EAAE,IAAI,GAAG,QAAQ,CAAC,GAAG;IAChF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,UAAU,CAO/E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentfootprint",
3
- "version": "8.8.0",
3
+ "version": "8.9.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",