agentfootprint 9.2.0 → 9.4.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 (183) hide show
  1. package/CLAUDE.md +3 -1
  2. package/dist/adapters/identity/agentcore.js +94 -26
  3. package/dist/adapters/identity/agentcore.js.map +1 -1
  4. package/dist/adapters/llm/BedrockProvider.js +34 -9
  5. package/dist/adapters/llm/BedrockProvider.js.map +1 -1
  6. package/dist/adapters/memory/pgVector.js +731 -0
  7. package/dist/adapters/memory/pgVector.js.map +1 -0
  8. package/dist/adapters/memory/s3Vectors.js +780 -0
  9. package/dist/adapters/memory/s3Vectors.js.map +1 -0
  10. package/dist/adapters/memory/sqliteVector.js +16 -79
  11. package/dist/adapters/memory/sqliteVector.js.map +1 -1
  12. package/dist/adapters/observability/cloudwatch.js +13 -8
  13. package/dist/adapters/observability/cloudwatch.js.map +1 -1
  14. package/dist/adapters/observability/xray.js +13 -8
  15. package/dist/adapters/observability/xray.js.map +1 -1
  16. package/dist/adapters/security/agentcore.js +0 -0
  17. package/dist/adapters/security/agentcore.js.map +1 -1
  18. package/dist/bridge/eventMeta.js +3 -0
  19. package/dist/bridge/eventMeta.js.map +1 -1
  20. package/dist/core/Agent.js +11 -0
  21. package/dist/core/Agent.js.map +1 -1
  22. package/dist/core/agent/stages/toolCalls.js +80 -7
  23. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  24. package/dist/doors/security.js +3 -2
  25. package/dist/doors/security.js.map +1 -1
  26. package/dist/embedders/index.js +240 -76
  27. package/dist/embedders/index.js.map +1 -1
  28. package/dist/esm/adapters/identity/agentcore.d.ts +39 -9
  29. package/dist/esm/adapters/identity/agentcore.js +94 -26
  30. package/dist/esm/adapters/identity/agentcore.js.map +1 -1
  31. package/dist/esm/adapters/llm/BedrockProvider.d.ts +24 -0
  32. package/dist/esm/adapters/llm/BedrockProvider.js +34 -9
  33. package/dist/esm/adapters/llm/BedrockProvider.js.map +1 -1
  34. package/dist/esm/adapters/memory/pgVector.d.ts +243 -0
  35. package/dist/esm/adapters/memory/pgVector.js +726 -0
  36. package/dist/esm/adapters/memory/pgVector.js.map +1 -0
  37. package/dist/esm/adapters/memory/s3Vectors.d.ts +240 -0
  38. package/dist/esm/adapters/memory/s3Vectors.js +776 -0
  39. package/dist/esm/adapters/memory/s3Vectors.js.map +1 -0
  40. package/dist/esm/adapters/memory/sqliteVector.d.ts +5 -27
  41. package/dist/esm/adapters/memory/sqliteVector.js +10 -73
  42. package/dist/esm/adapters/memory/sqliteVector.js.map +1 -1
  43. package/dist/esm/adapters/observability/cloudwatch.d.ts +20 -0
  44. package/dist/esm/adapters/observability/cloudwatch.js +13 -8
  45. package/dist/esm/adapters/observability/cloudwatch.js.map +1 -1
  46. package/dist/esm/adapters/observability/xray.d.ts +18 -0
  47. package/dist/esm/adapters/observability/xray.js +13 -8
  48. package/dist/esm/adapters/observability/xray.js.map +1 -1
  49. package/dist/esm/adapters/security/agentcore.d.ts +81 -107
  50. package/dist/esm/adapters/security/agentcore.js +0 -0
  51. package/dist/esm/adapters/security/agentcore.js.map +1 -1
  52. package/dist/esm/bridge/eventMeta.d.ts +3 -0
  53. package/dist/esm/bridge/eventMeta.js +3 -0
  54. package/dist/esm/bridge/eventMeta.js.map +1 -1
  55. package/dist/esm/core/Agent.d.ts +16 -0
  56. package/dist/esm/core/Agent.js +11 -0
  57. package/dist/esm/core/Agent.js.map +1 -1
  58. package/dist/esm/core/agent/stages/toolCalls.js +80 -7
  59. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  60. package/dist/esm/doors/security.d.ts +3 -2
  61. package/dist/esm/doors/security.js +3 -2
  62. package/dist/esm/doors/security.js.map +1 -1
  63. package/dist/esm/embedders/index.d.ts +99 -19
  64. package/dist/esm/embedders/index.js +240 -76
  65. package/dist/esm/embedders/index.js.map +1 -1
  66. package/dist/esm/events/dispatcher.d.ts +1 -1
  67. package/dist/esm/events/dispatcher.js.map +1 -1
  68. package/dist/esm/events/payloads.d.ts +23 -1
  69. package/dist/esm/events/types.d.ts +17 -0
  70. package/dist/esm/hosting/standingAgent.js +14 -1
  71. package/dist/esm/hosting/standingAgent.js.map +1 -1
  72. package/dist/esm/lib/embedderMismatch.d.ts +67 -0
  73. package/dist/esm/lib/embedderMismatch.js +96 -0
  74. package/dist/esm/lib/embedderMismatch.js.map +1 -0
  75. package/dist/esm/lib/rag/defineRAG.d.ts +28 -6
  76. package/dist/esm/lib/rag/defineRAG.js +39 -5
  77. package/dist/esm/lib/rag/defineRAG.js.map +1 -1
  78. package/dist/esm/memory/define.js +31 -1
  79. package/dist/esm/memory/define.js.map +1 -1
  80. package/dist/esm/memory/define.types.d.ts +13 -2
  81. package/dist/esm/memory/define.types.js.map +1 -1
  82. package/dist/esm/memory/embedding/loadRelevant.d.ts +10 -2
  83. package/dist/esm/memory/embedding/loadRelevant.js +36 -18
  84. package/dist/esm/memory/embedding/loadRelevant.js.map +1 -1
  85. package/dist/esm/memory/pipeline/semantic.d.ts +13 -2
  86. package/dist/esm/memory/pipeline/semantic.js +11 -5
  87. package/dist/esm/memory/pipeline/semantic.js.map +1 -1
  88. package/dist/esm/memory/store/capability.d.ts +25 -6
  89. package/dist/esm/memory/store/capability.js +68 -3
  90. package/dist/esm/memory/store/capability.js.map +1 -1
  91. package/dist/esm/memory/store/index.d.ts +1 -0
  92. package/dist/esm/memory/store/index.js +4 -0
  93. package/dist/esm/memory/store/index.js.map +1 -1
  94. package/dist/esm/memory/store/types.d.ts +40 -0
  95. package/dist/esm/memory-providers.d.ts +7 -4
  96. package/dist/esm/memory-providers.js +18 -4
  97. package/dist/esm/memory-providers.js.map +1 -1
  98. package/dist/esm/recorders/core/CredentialRecorder.d.ts +30 -0
  99. package/dist/esm/recorders/core/CredentialRecorder.js +35 -0
  100. package/dist/esm/recorders/core/CredentialRecorder.js.map +1 -0
  101. package/dist/esm/security/index.d.ts +7 -3
  102. package/dist/esm/security/index.js +12 -7
  103. package/dist/esm/security/index.js.map +1 -1
  104. package/dist/events/dispatcher.js.map +1 -1
  105. package/dist/hosting/standingAgent.js +14 -1
  106. package/dist/hosting/standingAgent.js.map +1 -1
  107. package/dist/lib/embedderMismatch.js +103 -0
  108. package/dist/lib/embedderMismatch.js.map +1 -0
  109. package/dist/lib/rag/defineRAG.js +39 -5
  110. package/dist/lib/rag/defineRAG.js.map +1 -1
  111. package/dist/memory/define.js +31 -1
  112. package/dist/memory/define.js.map +1 -1
  113. package/dist/memory/define.types.js.map +1 -1
  114. package/dist/memory/embedding/loadRelevant.js +36 -18
  115. package/dist/memory/embedding/loadRelevant.js.map +1 -1
  116. package/dist/memory/pipeline/semantic.js +11 -5
  117. package/dist/memory/pipeline/semantic.js.map +1 -1
  118. package/dist/memory/store/capability.js +70 -4
  119. package/dist/memory/store/capability.js.map +1 -1
  120. package/dist/memory/store/index.js +7 -1
  121. package/dist/memory/store/index.js.map +1 -1
  122. package/dist/memory-providers.js +22 -5
  123. package/dist/memory-providers.js.map +1 -1
  124. package/dist/recorders/core/CredentialRecorder.js +39 -0
  125. package/dist/recorders/core/CredentialRecorder.js.map +1 -0
  126. package/dist/security/index.js +13 -7
  127. package/dist/security/index.js.map +1 -1
  128. package/dist/types/adapters/identity/agentcore.d.ts +39 -9
  129. package/dist/types/adapters/identity/agentcore.d.ts.map +1 -1
  130. package/dist/types/adapters/llm/BedrockProvider.d.ts +24 -0
  131. package/dist/types/adapters/llm/BedrockProvider.d.ts.map +1 -1
  132. package/dist/types/adapters/memory/pgVector.d.ts +244 -0
  133. package/dist/types/adapters/memory/pgVector.d.ts.map +1 -0
  134. package/dist/types/adapters/memory/s3Vectors.d.ts +241 -0
  135. package/dist/types/adapters/memory/s3Vectors.d.ts.map +1 -0
  136. package/dist/types/adapters/memory/sqliteVector.d.ts +5 -27
  137. package/dist/types/adapters/memory/sqliteVector.d.ts.map +1 -1
  138. package/dist/types/adapters/observability/cloudwatch.d.ts +20 -0
  139. package/dist/types/adapters/observability/cloudwatch.d.ts.map +1 -1
  140. package/dist/types/adapters/observability/xray.d.ts +18 -0
  141. package/dist/types/adapters/observability/xray.d.ts.map +1 -1
  142. package/dist/types/adapters/security/agentcore.d.ts +81 -107
  143. package/dist/types/adapters/security/agentcore.d.ts.map +1 -1
  144. package/dist/types/bridge/eventMeta.d.ts +3 -0
  145. package/dist/types/bridge/eventMeta.d.ts.map +1 -1
  146. package/dist/types/core/Agent.d.ts +16 -0
  147. package/dist/types/core/Agent.d.ts.map +1 -1
  148. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  149. package/dist/types/doors/security.d.ts +3 -2
  150. package/dist/types/doors/security.d.ts.map +1 -1
  151. package/dist/types/embedders/index.d.ts +99 -19
  152. package/dist/types/embedders/index.d.ts.map +1 -1
  153. package/dist/types/events/dispatcher.d.ts +1 -1
  154. package/dist/types/events/dispatcher.d.ts.map +1 -1
  155. package/dist/types/events/payloads.d.ts +23 -1
  156. package/dist/types/events/payloads.d.ts.map +1 -1
  157. package/dist/types/events/types.d.ts +17 -0
  158. package/dist/types/events/types.d.ts.map +1 -1
  159. package/dist/types/hosting/standingAgent.d.ts.map +1 -1
  160. package/dist/types/lib/embedderMismatch.d.ts +68 -0
  161. package/dist/types/lib/embedderMismatch.d.ts.map +1 -0
  162. package/dist/types/lib/rag/defineRAG.d.ts +28 -6
  163. package/dist/types/lib/rag/defineRAG.d.ts.map +1 -1
  164. package/dist/types/memory/define.d.ts.map +1 -1
  165. package/dist/types/memory/define.types.d.ts +13 -2
  166. package/dist/types/memory/define.types.d.ts.map +1 -1
  167. package/dist/types/memory/embedding/loadRelevant.d.ts +10 -2
  168. package/dist/types/memory/embedding/loadRelevant.d.ts.map +1 -1
  169. package/dist/types/memory/pipeline/semantic.d.ts +13 -2
  170. package/dist/types/memory/pipeline/semantic.d.ts.map +1 -1
  171. package/dist/types/memory/store/capability.d.ts +25 -6
  172. package/dist/types/memory/store/capability.d.ts.map +1 -1
  173. package/dist/types/memory/store/index.d.ts +1 -0
  174. package/dist/types/memory/store/index.d.ts.map +1 -1
  175. package/dist/types/memory/store/types.d.ts +40 -0
  176. package/dist/types/memory/store/types.d.ts.map +1 -1
  177. package/dist/types/memory-providers.d.ts +7 -4
  178. package/dist/types/memory-providers.d.ts.map +1 -1
  179. package/dist/types/recorders/core/CredentialRecorder.d.ts +31 -0
  180. package/dist/types/recorders/core/CredentialRecorder.d.ts.map +1 -0
  181. package/dist/types/security/index.d.ts +7 -3
  182. package/dist/types/security/index.d.ts.map +1 -1
  183. package/package.json +9 -1
@@ -0,0 +1,244 @@
1
+ /**
2
+ * adapters/memory/pgVector — the target our own port has named since 2.x.
3
+ *
4
+ * `MemoryStore`'s docstring has listed the backends it was designed for from
5
+ * the beginning — *"Every storage backend (InMemory, Redis, DynamoDB,
6
+ * **Postgres**, Bedrock AgentCore) implements this interface"* — and named the
7
+ * query, twice, in the places an implementer would look: *"**Postgres**:
8
+ * multi-row INSERT … ON CONFLICT DO UPDATE"* for `putMany`, *"**pgvector**:
9
+ * `ORDER BY embedding <=> query LIMIT k`"* for `search`. Every one of those
10
+ * sentences was true about the design and false about the shipped package.
11
+ * This is the adapter that makes them the same sentence.
12
+ *
13
+ * It matters more than one row in a table of backends. Postgres is the database
14
+ * most teams already run, `pgvector` is an extension away, and a corpus that
15
+ * lives beside the application's own data inherits its backups, its failover,
16
+ * its access control and its migrations. `sqliteVectorStore` is one machine;
17
+ * `s3VectorsStore` is serverless and eventually consistent; this is the one for
18
+ * a fleet that already has a database.
19
+ *
20
+ * ── The table, and why this does not create it ──────────────────────────────
21
+ * A `vector(N)` column fixes N at creation, and N is a fact about your
22
+ * embedder. Creating the table implicitly would pick that number — and the
23
+ * index type, and the operator class — on your behalf, in a migration you never
24
+ * reviewed, in a database whose DDL is usually somebody's job. So the schema is
25
+ * yours to run, and this store REFUSES a table that is missing rather than
26
+ * silently answering "no matches" against nothing:
27
+ *
28
+ * ```sql
29
+ * CREATE EXTENSION IF NOT EXISTS vector;
30
+ *
31
+ * -- 1024 = your embedder's dimensions. bedrockEmbedder() default: 1024.
32
+ * -- openaiEmbedder() default: 1536. staticEmbedder(): 256.
33
+ * CREATE TABLE af_vectors (
34
+ * namespace TEXT NOT NULL,
35
+ * id TEXT NOT NULL,
36
+ * value JSONB NOT NULL,
37
+ * metadata JSONB,
38
+ * embedding vector(1024),
39
+ * embedder_fp TEXT,
40
+ * version INTEGER NOT NULL,
41
+ * created_at BIGINT NOT NULL,
42
+ * updated_at BIGINT NOT NULL,
43
+ * last_accessed_at BIGINT NOT NULL,
44
+ * access_count INTEGER NOT NULL,
45
+ * ttl BIGINT,
46
+ * tier TEXT,
47
+ * source JSONB,
48
+ * embedding_model TEXT,
49
+ * PRIMARY KEY (namespace, id)
50
+ * );
51
+ *
52
+ * -- Cosine, because that is the score this port reports and every threshold
53
+ * -- in this library is calibrated on. Match the operator class to the metric.
54
+ * CREATE INDEX af_vectors_hnsw ON af_vectors
55
+ * USING hnsw (embedding vector_cosine_ops);
56
+ * CREATE INDEX af_vectors_ns ON af_vectors (namespace);
57
+ *
58
+ * -- Recognition (`seen`/`recordSignature`), usefulness feedback, and the
59
+ * -- per-namespace embedder fingerprint. Small, and each one is a port method
60
+ * -- that would otherwise have to be refused.
61
+ * CREATE TABLE af_signatures (
62
+ * namespace TEXT NOT NULL, signature TEXT NOT NULL,
63
+ * PRIMARY KEY (namespace, signature)
64
+ * );
65
+ * CREATE TABLE af_feedback (
66
+ * namespace TEXT NOT NULL, id TEXT NOT NULL,
67
+ * total DOUBLE PRECISION NOT NULL, count INTEGER NOT NULL,
68
+ * PRIMARY KEY (namespace, id)
69
+ * );
70
+ * CREATE TABLE af_index_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL);
71
+ * ```
72
+ *
73
+ * Every table and column name above is an OPTION with that value as its
74
+ * default, so this drops into a schema that already has naming conventions —
75
+ * see {@link PgVectorStoreOptions}. Identifiers are validated and quoted; a
76
+ * name that is not a plain SQL identifier is refused rather than interpolated.
77
+ *
78
+ * ── Cosine, and only cosine ─────────────────────────────────────────────────
79
+ * `search` is `1 - (embedding <=> $query::vector)` — pgvector's cosine
80
+ * DISTANCE, converted to the cosine SIMILARITY the port reports and
81
+ * `defineRAG`'s 0.7 default is calibrated on. `<->` (L2) and `<#>` (inner
82
+ * product) are deliberately not options: their ranges are not that range, and a
83
+ * number that reads like a cosine and is not one is the failure mode the whole
84
+ * fingerprint machinery exists to prevent. Build the HNSW index with
85
+ * `vector_cosine_ops` so the operator and the index agree — with the wrong
86
+ * operator class the query still returns the right answer, slowly, by scanning.
87
+ *
88
+ * ── One statement at a time, on purpose ─────────────────────────────────────
89
+ * The client here is anything with `query()` — a `pg.Pool` is the expected one,
90
+ * and a Pool hands each `query()` its own connection. `BEGIN` on one and the
91
+ * next statement on another is a transaction that silently is not one, so this
92
+ * adapter never writes multi-statement transactions. Everything that must be
93
+ * atomic is ONE statement: `putMany` is one multi-row upsert, `putIfVersion` is
94
+ * one conditional upsert, `forget` is one statement with CTEs across all four
95
+ * tables. That is a constraint that made the code better.
96
+ *
97
+ * ── Lazy peer dependency ────────────────────────────────────────────────────
98
+ * `pg` is an OPTIONAL peer dependency, required at construction time. Importing
99
+ * `agentfootprint/memory` costs nothing for consumers who never build one of
100
+ * these. Pass `client` to reuse the pool your app already has — which is the
101
+ * recommended shape, because a second pool to the same database is a second set
102
+ * of connections nobody counted.
103
+ */
104
+ import type { MemoryIdentity } from '../../memory/identity/index.js';
105
+ import type { MemoryStore } from '../../memory/store/types.js';
106
+ /** One result set, as this adapter reads it. */
107
+ export interface PgQueryResult {
108
+ readonly rows: readonly Record<string, unknown>[];
109
+ }
110
+ /**
111
+ * The slice of a `pg` client this adapter calls.
112
+ *
113
+ * Structural, so a `Pool`, a `Client`, a pgBouncer-fronted wrapper or a test
114
+ * double all satisfy it without this package taking a hard type dependency on
115
+ * the optional peer.
116
+ */
117
+ export interface PgLikeClient {
118
+ query(text: string, params?: readonly unknown[]): Promise<PgQueryResult>;
119
+ /** Optional — awaited by {@link PgVectorStore.close} when this store built the pool. */
120
+ end?(): Promise<void>;
121
+ }
122
+ /** The one constructor this adapter needs out of `pg`. */
123
+ export interface PgSdkModule {
124
+ readonly Pool?: new (config: {
125
+ connectionString?: string;
126
+ }) => PgLikeClient;
127
+ }
128
+ /**
129
+ * Column names, so this store fits a schema that already has conventions.
130
+ * Every one defaults to the name in the `CREATE TABLE` above.
131
+ */
132
+ export interface PgVectorColumns {
133
+ readonly namespace?: string;
134
+ readonly id?: string;
135
+ readonly value?: string;
136
+ readonly metadata?: string;
137
+ readonly embedding?: string;
138
+ readonly embedderFp?: string;
139
+ readonly version?: string;
140
+ readonly createdAt?: string;
141
+ readonly updatedAt?: string;
142
+ readonly lastAccessedAt?: string;
143
+ readonly accessCount?: string;
144
+ readonly ttl?: string;
145
+ readonly tier?: string;
146
+ readonly source?: string;
147
+ readonly embeddingModel?: string;
148
+ }
149
+ export interface PgVectorStoreOptions {
150
+ /**
151
+ * Postgres connection string, used only when this store builds its own pool.
152
+ * Prefer `client` — a second pool to one database is a second set of
153
+ * connections nobody counted.
154
+ */
155
+ readonly connectionString?: string;
156
+ /** A pre-built `pg.Pool` (or anything with `query`). Recommended. */
157
+ readonly client?: PgLikeClient;
158
+ /** Schema the tables live in. Default `'public'`. */
159
+ readonly schema?: string;
160
+ /** The vectors table. Default `'af_vectors'`. */
161
+ readonly table?: string;
162
+ /** The recognition-set table (`seen`/`recordSignature`). Default `'af_signatures'`. */
163
+ readonly signaturesTable?: string;
164
+ /** The usefulness-aggregate table. Default `'af_feedback'`. */
165
+ readonly feedbackTable?: string;
166
+ /** The key/value table holding one embedder fingerprint per namespace. Default `'af_index_meta'`. */
167
+ readonly metaTable?: string;
168
+ /** Column names inside {@link table}. Each defaults to the documented one. */
169
+ readonly columns?: PgVectorColumns;
170
+ /**
171
+ * Rows per multi-row upsert. Default 500.
172
+ *
173
+ * Postgres caps a statement at 65,535 bound parameters and this store binds
174
+ * 15 per row, so 500 leaves an order of magnitude of headroom. Raising it
175
+ * trades round-trips for a statement that fails all-or-nothing on a bigger
176
+ * unit.
177
+ */
178
+ readonly batchSize?: number;
179
+ /** @internal Test injection — skips the `pg` require entirely. */
180
+ readonly _client?: PgLikeClient;
181
+ /** @internal Test injection — the `pg` module (exercises the real shim with a mock module). */
182
+ readonly _pg?: PgSdkModule;
183
+ }
184
+ /** A Postgres-backed vector store, plus the two things it owns beyond the port. */
185
+ export interface PgVectorStore extends MemoryStore {
186
+ /**
187
+ * The embedder fingerprint (`'<id>@<dims>'`) a namespace was built with, or
188
+ * `undefined` when nothing with a vector has been written to it yet.
189
+ *
190
+ * Read this before an embedder swap: it is the fact `EmbedderMismatchError`
191
+ * refuses on, available up front instead of at the first failed write.
192
+ */
193
+ fingerprintOf(identity: MemoryIdentity): Promise<string | undefined>;
194
+ /**
195
+ * Release the pool, if this store built one. Idempotent. A client you passed
196
+ * in is yours and is left alone.
197
+ */
198
+ close(): Promise<void>;
199
+ }
200
+ /**
201
+ * Raised when the database is reachable but its schema is not this store's.
202
+ *
203
+ * The law `sqliteVectorStore` states for a file, one backend over: **an
204
+ * unreadable index and an empty one are different facts, and only one of them
205
+ * is safe to answer with "no matches".** A store that treated a missing table
206
+ * as an empty corpus would answer every question from the model's own weights
207
+ * and log nothing.
208
+ */
209
+ export declare class PgVectorSchemaError extends Error {
210
+ readonly code: "ERR_PGVECTOR_SCHEMA";
211
+ /** The schema-qualified table that could not be used. */
212
+ readonly table: string;
213
+ /** Columns this store needs and did not find. Empty when the table is absent entirely. */
214
+ readonly missingColumns: readonly string[];
215
+ constructor(table: string, missingColumns: readonly string[], detail: string);
216
+ }
217
+ /**
218
+ * Open a `MemoryStore` over an existing Postgres + pgvector table.
219
+ *
220
+ * @throws when `pg` is absent and no `client` was passed.
221
+ * @throws PgVectorSchemaError on the first call, when the table or a column it
222
+ * needs is not there.
223
+ * @throws EmbedderMismatchError from `put`/`putMany`/`search` when a vector
224
+ * meets a namespace built by a different embedder.
225
+ *
226
+ * @example A corpus beside the application's own data
227
+ * ```ts
228
+ * import { Pool } from 'pg';
229
+ * import { defineRAG, indexDocuments } from 'agentfootprint';
230
+ * import { pgVectorStore } from 'agentfootprint/memory';
231
+ * import { openaiEmbedder } from 'agentfootprint/providers';
232
+ *
233
+ * const store = pgVectorStore({ client: new Pool({ connectionString: process.env.DATABASE_URL }) });
234
+ * const embedder = openaiEmbedder();
235
+ *
236
+ * await indexDocuments(store, embedder, docs, { embedderId: embedder.id });
237
+ *
238
+ * const agent = Agent.create({ provider })
239
+ * .rag(defineRAG({ id: 'docs', store, embedder, embedderId: embedder.id }))
240
+ * .build();
241
+ * ```
242
+ */
243
+ export declare function pgVectorStore(options?: PgVectorStoreOptions): PgVectorStore;
244
+ //# sourceMappingURL=pgVector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pgVector.d.ts","sourceRoot":"","sources":["../../../../src/adapters/memory/pgVector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,6BAA6B,CAAC;AAIrC,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACnD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACzE,wFAAwF;IACxF,GAAG,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,C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C,EAAE,MAAM,CAAC;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,qGAAqG;IACrG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED,mFAAmF;AACnF,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrE;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,wBAAkC;IAC/C,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;gBAE/B,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;CAa7E;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,aAAa,CAskB/E"}
@@ -0,0 +1,241 @@
1
+ /**
2
+ * adapters/memory/s3Vectors — the corpus outlives the runtime, and can still
3
+ * be updated without one.
4
+ *
5
+ * `sqliteVectorStore` (8.9.0) made a corpus survive a restart by putting it in
6
+ * a file, and `staticVectorStore` (8.20.0) made it survive a runtime with no
7
+ * disk at all by shipping it as a build artifact. Both leave the same gap, and
8
+ * a production field report named it: **a bundle can only change when you
9
+ * redeploy.** Add three documents on a Tuesday and the answer arrives with the
10
+ * next release train. That is a fine trade for product documentation and a bad
11
+ * one for anything a human edits during the day.
12
+ *
13
+ * Amazon S3 Vectors closes it. It is object storage with a native vector index
14
+ * and a query API: durable, serverless, nothing to run, priced like storage
15
+ * rather than like a database cluster. This adapter is the `MemoryStore` port
16
+ * over it, and the two halves that matter are:
17
+ *
18
+ * - `search()` maps 1:1 onto **QueryVectors** — the vector goes as
19
+ * `queryVector.float32`, `k` becomes `topK`, tiers become a metadata
20
+ * `filter`, and the returned `distance` becomes the port's score.
21
+ * - `put()` / `putMany()` map onto **PutVectors** — so `indexCorpus`,
22
+ * `indexFolder` and `indexDocuments` run against it unchanged. **That is
23
+ * the point of writing it rather than only reading it:** a corpus you can
24
+ * add to from a cron job at 14:00 is a different product from one you can
25
+ * add to at the next deploy.
26
+ *
27
+ * ── What it is NOT ──────────────────────────────────────────────────────────
28
+ * A vector index is not a key-value store, and this adapter refuses the
29
+ * operations that would need one rather than faking them:
30
+ *
31
+ * - `putIfVersion` — PutVectors is last-write-wins; there is no
32
+ * compare-and-set. A read-then-write here would be a compare-and-set that
33
+ * another writer can walk through the middle of, which is worse than none.
34
+ * - `recordSignature` / `feedback` — a set of strings and a running average
35
+ * are not vectors. `seen()` answers `false` and `getFeedback()` `null`,
36
+ * which are both TRUE (nothing can be recorded, so nothing has been); the
37
+ * WRITE halves refuse by name.
38
+ *
39
+ * Pair it with a second store for conversation memory — `defineRAG` for the
40
+ * corpus, `defineMemory` for the chat, each with the backend it suits. That is
41
+ * the same shape `staticVectorStore` documents.
42
+ *
43
+ * ── The index you must create first, and why this does not create it ────────
44
+ * A vector index has a DIMENSION and a DISTANCE METRIC fixed at creation, and
45
+ * both are decisions about your embedder that this library must not make on
46
+ * your behalf — creating one silently would pick a size and a metric your
47
+ * corpus then lives with. Create it once, with your infrastructure:
48
+ *
49
+ * ```bash
50
+ * aws s3vectors create-vector-bucket --vector-bucket-name my-corpus
51
+ * aws s3vectors create-index \
52
+ * --vector-bucket-name my-corpus \
53
+ * --index-name docs \
54
+ * --data-type float32 \
55
+ * --dimension 1024 \
56
+ * --distance-metric cosine \
57
+ * --metadata-configuration '{"nonFilterableMetadataKeys":["af"]}'
58
+ * ```
59
+ *
60
+ * `nonFilterableMetadataKeys: ["af"]` is load-bearing, not decoration. This
61
+ * adapter stores the whole entry — the passage the model will read, its
62
+ * provenance, its timestamps — as JSON under the metadata key `af`. Filterable
63
+ * metadata has a small per-vector budget; non-filterable metadata has the large
64
+ * one. Declare `af` non-filterable and a full passage fits; leave it filterable
65
+ * and PutVectors starts refusing your longer chunks partway through an
66
+ * indexing run.
67
+ *
68
+ * Only `ns` (the identity namespace) and `tier` are ever filtered on, and both
69
+ * are short strings.
70
+ *
71
+ * ── The preflight: this store now READS the index before trusting it (9.4.0) ─
72
+ * One `GetIndex`, lazily on first use and memoized for the life of the store.
73
+ * It checks the three things this adapter used to assume — and that a
74
+ * production deployment got wrong in all three ways at once:
75
+ *
76
+ * 1. the distance metric really is cosine (a euclidean index scored a
77
+ * self-query at 0.999…, where a true cosine is exactly 1.0);
78
+ * 2. `af` really is non-filterable, checked BEFORE the first write, so a
79
+ * misconfigured index fails at document 1 rather than at document 400
80
+ * with an AWS "Filterable metadata must have at most 2048 bytes";
81
+ * 3. the index dimension matches the vectors being written or searched.
82
+ *
83
+ * This is the discipline every sibling store already had at open —
84
+ * `sqliteVectorStore`'s schema identity, `pgVectorStore`'s schema check,
85
+ * `staticVectorStore`'s load-time fingerprint. This store had nothing to open,
86
+ * so it opened nothing.
87
+ *
88
+ * **IAM:** the caller now needs `s3vectors:GetIndex` alongside `PutVectors` /
89
+ * `QueryVectors` / `GetVectors` / `ListVectors` / `DeleteVectors`. A GetIndex
90
+ * that fails is refused by name, never passed through — an index this store
91
+ * cannot read is an index whose metric, layout and dimension it would be
92
+ * guessing at.
93
+ *
94
+ * ── Cosine only, said out loud ──────────────────────────────────────────────
95
+ * The port's score is a cosine similarity, and every threshold in this library
96
+ * — starting with `defineRAG`'s 0.7 default — is calibrated on that range. A
97
+ * cosine distance converts exactly (`score = 1 - distance`). A EUCLIDEAN
98
+ * distance does not: any mapping into [-1, 1] produces a number that READS like
99
+ * a cosine and is not one, which is the same class of confident-and-meaningless
100
+ * value the embedder-mismatch refusal exists to stop. So a euclidean index is
101
+ * refused at construction, by name.
102
+ *
103
+ * ── The fingerprint guarantee, stated exactly ───────────────────────────────
104
+ * `sqliteVectorStore` owns its file and can keep a fingerprint row in it. This
105
+ * store owns nothing but vectors, so the guarantee is assembled from what the
106
+ * service actually provides, and it is smaller — so it is spelled out rather
107
+ * than implied:
108
+ *
109
+ * - **Dimensions** are enforced by S3 Vectors itself. The index declares one;
110
+ * a vector of another length is rejected by the service, loudly, at the
111
+ * call. Nothing here can be sloppier than that.
112
+ * - **The model id** is stamped into every vector's metadata (`fp`) and
113
+ * checked in two places: against the fingerprint this process has already
114
+ * seen for the namespace (at write and at search), and against the
115
+ * fingerprint carried by the HITS that come back (at search). The second
116
+ * one is what survives a restart: the first query after an embedder swap
117
+ * sees documents stamped by the old embedder and refuses by name, instead
118
+ * of returning a confident ranking of two incompatible spaces.
119
+ * - Since 9.4.0 the index's OWN dimension is checked too, at the preflight —
120
+ * so a wrong-size embedder is caught on the first write and the first
121
+ * search of a fresh process, which the per-process fingerprint could not do
122
+ * (it has nothing to disagree with at boot).
123
+ * - What is still NOT caught: the first write of a fresh process into a
124
+ * namespace built by a different embedder OF THE SAME SIZE. Only the model
125
+ * id separates those, and it lives in the vectors rather than on the index.
126
+ * There is no cheap read that would catch it, and a full index scan on
127
+ * every boot is not one either. It is caught at the next search, before a
128
+ * single wrong answer is returned.
129
+ *
130
+ * ── Lazy peer dependency ────────────────────────────────────────────────────
131
+ * `@aws-sdk/client-s3vectors` is an OPTIONAL peer dependency, required at
132
+ * construction time. Importing `agentfootprint/memory` costs nothing for
133
+ * consumers who never build one of these. Pass `client` to share the SDK
134
+ * configuration your app already has.
135
+ */
136
+ import type { MemoryIdentity } from '../../memory/identity/index.js';
137
+ import type { MemoryStore } from '../../memory/store/types.js';
138
+ /**
139
+ * The slice of an S3 Vectors client this adapter calls.
140
+ *
141
+ * Structural, so the real SDK client, a pre-built one shared with the rest of
142
+ * your app, or a test double all satisfy it without this package taking a hard
143
+ * type dependency on the optional peer.
144
+ */
145
+ export interface S3VectorsLikeClient {
146
+ /** `send(command, options?)` — the second argument carries `abortSignal`. */
147
+ send(command: unknown, options?: {
148
+ abortSignal?: AbortSignal;
149
+ }): Promise<unknown>;
150
+ /** Optional — released by {@link S3VectorsStore.close} when this store built the client. */
151
+ destroy?(): void;
152
+ }
153
+ /** The constructors this adapter needs out of `@aws-sdk/client-s3vectors`. */
154
+ export interface S3VectorsSdkModule {
155
+ readonly S3VectorsClient?: new (config: {
156
+ region?: string;
157
+ }) => S3VectorsLikeClient;
158
+ /** The PREFLIGHT (9.4.0) — the one call that reads the index rather than its
159
+ * vectors. See `verifyIndex` for what it checks and why each one is fatal. */
160
+ readonly GetIndexCommand?: new (input: unknown) => unknown;
161
+ readonly PutVectorsCommand?: new (input: unknown) => unknown;
162
+ readonly QueryVectorsCommand?: new (input: unknown) => unknown;
163
+ readonly GetVectorsCommand?: new (input: unknown) => unknown;
164
+ readonly ListVectorsCommand?: new (input: unknown) => unknown;
165
+ readonly DeleteVectorsCommand?: new (input: unknown) => unknown;
166
+ }
167
+ export interface S3VectorsStoreOptions {
168
+ /** The vector bucket (`vectorBucketName`). Created by you, not by this. */
169
+ readonly bucket: string;
170
+ /** The vector index inside it (`indexName`). Created by you, not by this. */
171
+ readonly index: string;
172
+ /** AWS region. Passed to the SDK client when this factory builds one. */
173
+ readonly region?: string;
174
+ /**
175
+ * The metric the index was created with. Only `'cosine'` is supported, and
176
+ * anything else is refused at construction — see the header. This is a
177
+ * DECLARATION about an index this store did not create; state the metric you
178
+ * actually used.
179
+ */
180
+ readonly distanceMetric?: 'cosine';
181
+ /**
182
+ * How many vectors go in one PutVectors call. Default 100 — deliberately
183
+ * well under the service limit, because the failure mode of guessing that
184
+ * limit high is a corpus that indexes 90% of the way and stops.
185
+ */
186
+ readonly batchSize?: number;
187
+ /** A pre-built S3 Vectors client, so one SDK config serves the whole app. */
188
+ readonly client?: S3VectorsLikeClient;
189
+ /** @internal Test injection — skips the SDK require entirely. */
190
+ readonly _client?: S3VectorsLikeClient;
191
+ /** @internal Test injection — the AWS SDK module (exercises the real shim with a mock SDK). */
192
+ readonly _sdk?: S3VectorsSdkModule;
193
+ }
194
+ /** A durable vector index in S3, plus the two things this store owns beyond the port. */
195
+ export interface S3VectorsStore extends MemoryStore {
196
+ /** The vector bucket this store reads and writes. */
197
+ readonly bucket: string;
198
+ /** The vector index inside it. */
199
+ readonly index: string;
200
+ /**
201
+ * The embedder fingerprint (`'<id>@<dims>'`) this PROCESS has seen for a
202
+ * namespace, or `undefined` when it has seen none yet.
203
+ *
204
+ * Deliberately not "the fingerprint the index was built with" — see the
205
+ * header for exactly what this store can and cannot know. It is populated by
206
+ * the first write or the first search of the namespace in this process.
207
+ */
208
+ fingerprintOf(identity: MemoryIdentity): string | undefined;
209
+ /**
210
+ * Release the SDK client, if this store built one. Idempotent. A client you
211
+ * passed in is yours and is left alone.
212
+ */
213
+ close(): void;
214
+ }
215
+ /**
216
+ * Open a `MemoryStore` over an existing S3 Vectors index.
217
+ *
218
+ * @throws when `@aws-sdk/client-s3vectors` is absent and no `client` was passed.
219
+ * @throws when `distanceMetric` is anything but `'cosine'`.
220
+ * @throws EmbedderMismatchError from `put`/`putMany`/`search` when a vector
221
+ * meets a namespace built by a different embedder.
222
+ *
223
+ * @example A corpus you can add to without a redeploy
224
+ * ```ts
225
+ * import { defineRAG, indexDocuments } from 'agentfootprint';
226
+ * import { s3VectorsStore } from 'agentfootprint/memory';
227
+ * import { bedrockEmbedder } from 'agentfootprint/providers';
228
+ *
229
+ * const store = s3VectorsStore({ bucket: 'my-corpus', index: 'docs', region: 'us-east-1' });
230
+ * const embedder = bedrockEmbedder({ region: 'us-east-1' });
231
+ *
232
+ * // Run this from a cron job. No deploy, no restart — the agent sees it next turn.
233
+ * await indexDocuments(store, embedder, newDocs, { embedderId: embedder.id });
234
+ *
235
+ * const agent = Agent.create({ provider })
236
+ * .rag(defineRAG({ id: 'docs', store, embedder, embedderId: embedder.id }))
237
+ * .build();
238
+ * ```
239
+ */
240
+ export declare function s3VectorsStore(options: S3VectorsStoreOptions): S3VectorsStore;
241
+ //# sourceMappingURL=s3Vectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3Vectors.d.ts","sourceRoot":"","sources":["../../../../src/adapters/memory/s3Vectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsIG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,6BAA6B,CAAC;AAIrC;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClF,4FAA4F;IAC5F,OAAO,CAAC,IAAI,IAAI,CAAC;CAClB;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,mBAAmB,CAAC;IACpF;mFAC+E;IAC/E,QAAQ,CAAC,eAAe,C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E,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5D;;;OAGG;IACH,KAAK,IAAI,IAAI,CAAC;CACf;AAiBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,cAAc,CAsoB7E"}
@@ -141,34 +141,12 @@ export declare class UnreadableIndexFileError extends Error {
141
141
  /**
142
142
  * Raised when a vector meets an index built by a different embedder.
143
143
  *
144
- * **This is the refusal that keeps the store honest.** Cosine similarity between
145
- * two different embedding spaces is not a weak signal — it is not a signal at
146
- * all, and it comes back as a confident number in the same 0-to-1 range as a
147
- * real one. There is no threshold that separates them, and nothing downstream
148
- * can tell them apart. So the mismatch is refused where it happens, on both
149
- * sides:
150
- *
151
- * - at **write**, so a second embedder's vectors never enter a namespace;
152
- * - at **query**, so a swapped embedder never scores against the old ones.
153
- *
154
- * The named fix is an explicit re-index — delete the namespace and build it
155
- * again with one embedder, or point the retriever at a different file. It is
156
- * never a fallback: silently ignoring the mismatch is the failure, and silently
157
- * re-embedding somebody's corpus is a bill they did not agree to.
158
- *
159
- * `problem` says which half is wrong. `'dimensions'` is arithmetically
160
- * impossible to score at all; `'model'` would score, and lie.
144
+ * Since 9.3.0 this is ONE class shared by every store that can make the check
145
+ * (`lib/embedderMismatch.ts`), re-exported here so the import path that has
146
+ * worked since 8.9.0 keeps working. A second class of the same name would make
147
+ * `instanceof` depend on which store threw.
161
148
  */
162
- export declare class EmbedderMismatchError extends Error {
163
- readonly code: "ERR_EMBEDDER_MISMATCH";
164
- /** The fingerprint the namespace was built with, `'<id>@<dims>'`. */
165
- readonly indexed: string;
166
- /** The fingerprint that just arrived. */
167
- readonly incoming: string;
168
- /** Which half disagrees. */
169
- readonly problem: 'dimensions' | 'model';
170
- constructor(namespace: string, indexed: string, incoming: string, problem: EmbedderMismatchError['problem'], operation: 'write to' | 'search');
171
- }
149
+ export { EmbedderMismatchError } from '../../lib/embedderMismatch.js';
172
150
  /** A durable vector store, plus the three things a file owns beyond the port. */
173
151
  export interface SqliteVectorStore extends MemoryStore {
174
152
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sqliteVector.d.ts","sourceRoot":"","sources":["../../../../src/adapters/memory/sqliteVector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,6BAA6B,CAAC;AAIrC,wDAAwD;AACxD,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,GAAG,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5C,GAAG,CAAC,GAAG,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5C,GAAG,CAAC,GAAG,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;CAC/C;AAED,mDAAmD;AACnD,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC;IAChD,KAAK,IAAI,IAAI,CAAC;CACf;AAED,uEAAuE;AACvE,MAAM,WAAW,sBAAsB;IACrC,KAAK,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAAC;CAC9C;AAID,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAC3C;AAID;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;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Q,KAAK;IACjD,QAAQ,CAAC,IAAI,8BAAwC;IACrD,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,gBAAgB,GAAG,cAAc,CAAC;gBAExD,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM;CAmBvF;AAED;;;;;;;GAOG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AA4CtE,iFAAiF;AACjF,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5D;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAAC;CACf;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CAqetF"}
@@ -90,6 +90,10 @@ export interface CloudwatchObservabilityOptions {
90
90
  /** Test injection — bypasses SDK lazy-require entirely. When set,
91
91
  * `region` / IAM are ignored. */
92
92
  readonly _client?: CloudWatchLikeClient;
93
+ /** @internal Test injection (9.4.0) — the AWS SDK module, so the real shim
94
+ * (`send(new Command(...))`) runs against a fake SDK and the command names
95
+ * it dispatches can be asserted. Ignored when `_client` is set. */
96
+ readonly _sdk?: CloudWatchSdkModule;
93
97
  }
94
98
  export interface CloudWatchLikeClient {
95
99
  putLogEvents(input: {
@@ -112,6 +116,22 @@ export interface CloudWatchLikeClient {
112
116
  logStreamName: string;
113
117
  }): Promise<unknown>;
114
118
  }
119
+ /**
120
+ * The slice of `@aws-sdk/client-cloudwatch-logs` this shim touches.
121
+ *
122
+ * Exported since 9.4.0 so `opts._sdk` can name it — which is what lets the
123
+ * shared command-name pin (test/adapters/aws/) assert the OPERATIONS this
124
+ * adapter dispatches without an AWS account or the peer dep installed. A
125
+ * `_client` double proves the batching; only an `_sdk` double can prove the
126
+ * adapter reaches for `PutLogEvents` and not something that does not exist.
127
+ */
128
+ export interface CloudWatchSdkModule {
129
+ readonly CloudWatchLogsClient?: new (config: {
130
+ region?: string;
131
+ }) => unknown;
132
+ readonly PutLogEventsCommand?: new (input: unknown) => unknown;
133
+ readonly CreateLogStreamCommand?: new (input: unknown) => unknown;
134
+ }
115
135
  /**
116
136
  * Internal: shared CloudWatch Logs base used by every adapter that
117
137
  * ships to CWL. `cloudwatchObservability` is the public generic
@@ -1 +1 @@
1
- {"version":3,"file":"cloudwatch.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/cloudwatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAMvE,MAAM,WAAW,8BAA8B;IAC7C,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;0DAOsD;IACtD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;;4BAKwB;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;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K,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;IAC7E,QAAQ,CAAC,mBAAmB,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IAC/D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACnE;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,8BAA8B,EACpC,YAAY,EAAE,MAAM,GACnB,qBAAqB,CAsOvB;AA4BD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,8BAA8B,GACnC,qBAAqB,CAEvB"}
@@ -94,11 +94,29 @@ export interface XrayObservabilityOptions {
94
94
  readonly onError?: (error: Error, event?: AgentfootprintEvent) => void;
95
95
  /** Test injection — bypasses SDK lazy-require entirely. */
96
96
  readonly _client?: XRayLikeClient;
97
+ /** @internal Test injection (9.4.0) — the AWS SDK module, so the real shim
98
+ * (`send(new Command(...))`) runs against a fake SDK and the command name it
99
+ * dispatches can be asserted. Ignored when `_client` is set. */
100
+ readonly _sdk?: XRaySdkModule;
97
101
  }
98
102
  export interface XRayLikeClient {
99
103
  putTraceSegments(input: {
100
104
  TraceSegmentDocuments: ReadonlyArray<string>;
101
105
  }): Promise<unknown>;
102
106
  }
107
+ /**
108
+ * The slice of `@aws-sdk/client-xray` this shim touches.
109
+ *
110
+ * Exported since 9.4.0 so `opts._sdk` can name it — which is what lets the
111
+ * shared command-name pin (test/adapters/aws/) assert that this adapter
112
+ * dispatches `PutTraceSegments` and nothing invented, without an AWS account
113
+ * or the peer dep installed.
114
+ */
115
+ export interface XRaySdkModule {
116
+ readonly XRayClient?: new (config: {
117
+ region?: string;
118
+ }) => unknown;
119
+ readonly PutTraceSegmentsCommand?: new (input: unknown) => unknown;
120
+ }
103
121
  export declare function xrayObservability(opts: XrayObservabilityOptions): ObservabilityStrategy;
104
122
  //# sourceMappingURL=xray.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xray.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/xray.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAMvE,MAAM,WAAW,wBAAwB;IACvC,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;iCAC6B;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;oDAEgD;IAChD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;0CAEsC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;yCACqC;IACrC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvE,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;CACnC;AAID,MAAM,WAAW,cAAc;IAC7B,gBAAgB,CAAC,KAAK,EAAE;QAAE,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7F;AA6BD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,qBAAqB,CA4ZvF"}
1
+ {"version":3,"file":"xray.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/xray.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;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