agentfootprint 7.27.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/AGENTS.md +10 -10
  2. package/README.md +32 -7
  3. package/ai-instructions/claude-code/SKILL.md +2 -2
  4. package/ai-instructions/clinerules +1 -1
  5. package/ai-instructions/copilot-instructions.md +1 -1
  6. package/ai-instructions/cursor/agentfootprint.md +1 -1
  7. package/ai-instructions/kiro/agentfootprint.md +1 -1
  8. package/ai-instructions/windsurfrules +1 -1
  9. package/dist/core/agent/AgentBuilder.js +45 -11
  10. package/dist/core/agent/AgentBuilder.js.map +1 -1
  11. package/dist/core/agent/watch.js +39 -0
  12. package/dist/core/agent/watch.js.map +1 -0
  13. package/dist/debug/finders.js +4 -0
  14. package/dist/debug/finders.js.map +1 -1
  15. package/dist/debug.js +4 -0
  16. package/dist/debug.js.map +1 -1
  17. package/dist/doors/context.js +34 -0
  18. package/dist/doors/context.js.map +1 -0
  19. package/dist/doors/hosting.js +32 -0
  20. package/dist/doors/hosting.js.map +1 -0
  21. package/dist/doors/memory.js +36 -0
  22. package/dist/doors/memory.js.map +1 -0
  23. package/dist/doors/observe.js +52 -0
  24. package/dist/doors/observe.js.map +1 -0
  25. package/dist/doors/providers.js +43 -0
  26. package/dist/doors/providers.js.map +1 -0
  27. package/dist/doors/resilience.js +61 -0
  28. package/dist/doors/resilience.js.map +1 -0
  29. package/dist/doors/security.js +39 -0
  30. package/dist/doors/security.js.map +1 -0
  31. package/dist/embedders/index.js.map +1 -1
  32. package/dist/esm/core/agent/AgentBuilder.d.ts +37 -7
  33. package/dist/esm/core/agent/AgentBuilder.js +45 -11
  34. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  35. package/dist/esm/core/agent/watch.d.ts +59 -0
  36. package/dist/esm/core/agent/watch.js +38 -0
  37. package/dist/esm/core/agent/watch.js.map +1 -0
  38. package/dist/esm/debug/finders.d.ts +4 -0
  39. package/dist/esm/debug/finders.js +4 -0
  40. package/dist/esm/debug/finders.js.map +1 -1
  41. package/dist/esm/debug.d.ts +4 -0
  42. package/dist/esm/debug.js +4 -0
  43. package/dist/esm/debug.js.map +1 -1
  44. package/dist/esm/doors/context.d.ts +17 -0
  45. package/dist/esm/doors/context.js +18 -0
  46. package/dist/esm/doors/context.js.map +1 -0
  47. package/dist/esm/doors/hosting.d.ts +15 -0
  48. package/dist/esm/doors/hosting.js +16 -0
  49. package/dist/esm/doors/hosting.js.map +1 -0
  50. package/dist/esm/doors/memory.d.ts +19 -0
  51. package/dist/esm/doors/memory.js +20 -0
  52. package/dist/esm/doors/memory.js.map +1 -0
  53. package/dist/esm/doors/observe.d.ts +35 -0
  54. package/dist/esm/doors/observe.js +36 -0
  55. package/dist/esm/doors/observe.js.map +1 -0
  56. package/dist/esm/doors/providers.d.ts +26 -0
  57. package/dist/esm/doors/providers.js +27 -0
  58. package/dist/esm/doors/providers.js.map +1 -0
  59. package/dist/esm/doors/resilience.d.ts +37 -0
  60. package/dist/esm/doors/resilience.js +39 -0
  61. package/dist/esm/doors/resilience.js.map +1 -0
  62. package/dist/esm/doors/security.d.ts +22 -0
  63. package/dist/esm/doors/security.js +23 -0
  64. package/dist/esm/doors/security.js.map +1 -0
  65. package/dist/esm/embedders/index.d.ts +4 -0
  66. package/dist/esm/embedders/index.js.map +1 -1
  67. package/dist/esm/hosting/index.d.ts +9 -0
  68. package/dist/esm/hosting/index.js +8 -0
  69. package/dist/esm/hosting/index.js.map +1 -1
  70. package/dist/esm/hosting/memorySessions.d.ts +3 -0
  71. package/dist/esm/hosting/memorySessions.js +3 -0
  72. package/dist/esm/hosting/memorySessions.js.map +1 -1
  73. package/dist/esm/hosting/sqliteSessions.d.ts +211 -0
  74. package/dist/esm/hosting/sqliteSessions.js +370 -0
  75. package/dist/esm/hosting/sqliteSessions.js.map +1 -0
  76. package/dist/esm/hosting-providers.d.ts +4 -0
  77. package/dist/esm/hosting-providers.js +4 -0
  78. package/dist/esm/hosting-providers.js.map +1 -1
  79. package/dist/esm/identity.d.ts +4 -0
  80. package/dist/esm/identity.js +4 -0
  81. package/dist/esm/identity.js.map +1 -1
  82. package/dist/esm/index.d.ts +1 -0
  83. package/dist/esm/index.js.map +1 -1
  84. package/dist/esm/injection-engine.d.ts +4 -0
  85. package/dist/esm/injection-engine.js +4 -0
  86. package/dist/esm/injection-engine.js.map +1 -1
  87. package/dist/esm/llm-providers.d.ts +4 -0
  88. package/dist/esm/llm-providers.js +4 -0
  89. package/dist/esm/llm-providers.js.map +1 -1
  90. package/dist/esm/locales/index.d.ts +4 -0
  91. package/dist/esm/locales/index.js +4 -0
  92. package/dist/esm/locales/index.js.map +1 -1
  93. package/dist/esm/memory-providers.d.ts +4 -0
  94. package/dist/esm/memory-providers.js +4 -0
  95. package/dist/esm/memory-providers.js.map +1 -1
  96. package/dist/esm/observability/contextError/finders/index.d.ts +4 -0
  97. package/dist/esm/observability/contextError/finders/index.js.map +1 -1
  98. package/dist/esm/observability-providers.d.ts +4 -0
  99. package/dist/esm/observability-providers.js +4 -0
  100. package/dist/esm/observability-providers.js.map +1 -1
  101. package/dist/esm/reliability/index.d.ts +8 -0
  102. package/dist/esm/reliability/index.js +8 -0
  103. package/dist/esm/reliability/index.js.map +1 -1
  104. package/dist/esm/status.d.ts +4 -0
  105. package/dist/esm/status.js +4 -0
  106. package/dist/esm/status.js.map +1 -1
  107. package/dist/esm/strategies/index.d.ts +4 -0
  108. package/dist/esm/strategies/index.js +4 -0
  109. package/dist/esm/strategies/index.js.map +1 -1
  110. package/dist/esm/stream.d.ts +4 -0
  111. package/dist/esm/stream.js +4 -0
  112. package/dist/esm/stream.js.map +1 -1
  113. package/dist/esm/thinking/index.d.ts +4 -0
  114. package/dist/esm/thinking/index.js +4 -0
  115. package/dist/esm/thinking/index.js.map +1 -1
  116. package/dist/esm/tool-providers/index.d.ts +4 -0
  117. package/dist/esm/tool-providers/index.js +4 -0
  118. package/dist/esm/tool-providers/index.js.map +1 -1
  119. package/dist/hosting/index.js +12 -1
  120. package/dist/hosting/index.js.map +1 -1
  121. package/dist/hosting/memorySessions.js +3 -0
  122. package/dist/hosting/memorySessions.js.map +1 -1
  123. package/dist/hosting/sqliteSessions.js +376 -0
  124. package/dist/hosting/sqliteSessions.js.map +1 -0
  125. package/dist/hosting-providers.js +4 -0
  126. package/dist/hosting-providers.js.map +1 -1
  127. package/dist/identity.js +4 -0
  128. package/dist/identity.js.map +1 -1
  129. package/dist/index.js.map +1 -1
  130. package/dist/injection-engine.js +4 -0
  131. package/dist/injection-engine.js.map +1 -1
  132. package/dist/llm-providers.js +4 -0
  133. package/dist/llm-providers.js.map +1 -1
  134. package/dist/locales/index.js +4 -0
  135. package/dist/locales/index.js.map +1 -1
  136. package/dist/memory-providers.js +4 -0
  137. package/dist/memory-providers.js.map +1 -1
  138. package/dist/observability/contextError/finders/index.js.map +1 -1
  139. package/dist/observability-providers.js +4 -0
  140. package/dist/observability-providers.js.map +1 -1
  141. package/dist/reliability/index.js +8 -0
  142. package/dist/reliability/index.js.map +1 -1
  143. package/dist/status.js +4 -0
  144. package/dist/status.js.map +1 -1
  145. package/dist/strategies/index.js +4 -0
  146. package/dist/strategies/index.js.map +1 -1
  147. package/dist/stream.js +4 -0
  148. package/dist/stream.js.map +1 -1
  149. package/dist/thinking/index.js +4 -0
  150. package/dist/thinking/index.js.map +1 -1
  151. package/dist/tool-providers/index.js +4 -0
  152. package/dist/tool-providers/index.js.map +1 -1
  153. package/dist/types/core/agent/AgentBuilder.d.ts +37 -7
  154. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  155. package/dist/types/core/agent/watch.d.ts +60 -0
  156. package/dist/types/core/agent/watch.d.ts.map +1 -0
  157. package/dist/types/debug/finders.d.ts +4 -0
  158. package/dist/types/debug/finders.d.ts.map +1 -1
  159. package/dist/types/debug.d.ts +4 -0
  160. package/dist/types/debug.d.ts.map +1 -1
  161. package/dist/types/doors/context.d.ts +18 -0
  162. package/dist/types/doors/context.d.ts.map +1 -0
  163. package/dist/types/doors/hosting.d.ts +16 -0
  164. package/dist/types/doors/hosting.d.ts.map +1 -0
  165. package/dist/types/doors/memory.d.ts +20 -0
  166. package/dist/types/doors/memory.d.ts.map +1 -0
  167. package/dist/types/doors/observe.d.ts +36 -0
  168. package/dist/types/doors/observe.d.ts.map +1 -0
  169. package/dist/types/doors/providers.d.ts +27 -0
  170. package/dist/types/doors/providers.d.ts.map +1 -0
  171. package/dist/types/doors/resilience.d.ts +38 -0
  172. package/dist/types/doors/resilience.d.ts.map +1 -0
  173. package/dist/types/doors/security.d.ts +23 -0
  174. package/dist/types/doors/security.d.ts.map +1 -0
  175. package/dist/types/embedders/index.d.ts +4 -0
  176. package/dist/types/embedders/index.d.ts.map +1 -1
  177. package/dist/types/hosting/index.d.ts +9 -0
  178. package/dist/types/hosting/index.d.ts.map +1 -1
  179. package/dist/types/hosting/memorySessions.d.ts +3 -0
  180. package/dist/types/hosting/memorySessions.d.ts.map +1 -1
  181. package/dist/types/hosting/sqliteSessions.d.ts +212 -0
  182. package/dist/types/hosting/sqliteSessions.d.ts.map +1 -0
  183. package/dist/types/hosting-providers.d.ts +4 -0
  184. package/dist/types/hosting-providers.d.ts.map +1 -1
  185. package/dist/types/identity.d.ts +4 -0
  186. package/dist/types/identity.d.ts.map +1 -1
  187. package/dist/types/index.d.ts +1 -0
  188. package/dist/types/index.d.ts.map +1 -1
  189. package/dist/types/injection-engine.d.ts +4 -0
  190. package/dist/types/injection-engine.d.ts.map +1 -1
  191. package/dist/types/llm-providers.d.ts +4 -0
  192. package/dist/types/llm-providers.d.ts.map +1 -1
  193. package/dist/types/locales/index.d.ts +4 -0
  194. package/dist/types/locales/index.d.ts.map +1 -1
  195. package/dist/types/memory-providers.d.ts +4 -0
  196. package/dist/types/memory-providers.d.ts.map +1 -1
  197. package/dist/types/observability/contextError/finders/index.d.ts +4 -0
  198. package/dist/types/observability/contextError/finders/index.d.ts.map +1 -1
  199. package/dist/types/observability-providers.d.ts +4 -0
  200. package/dist/types/observability-providers.d.ts.map +1 -1
  201. package/dist/types/reliability/index.d.ts +8 -0
  202. package/dist/types/reliability/index.d.ts.map +1 -1
  203. package/dist/types/status.d.ts +4 -0
  204. package/dist/types/status.d.ts.map +1 -1
  205. package/dist/types/strategies/index.d.ts +4 -0
  206. package/dist/types/strategies/index.d.ts.map +1 -1
  207. package/dist/types/stream.d.ts +4 -0
  208. package/dist/types/stream.d.ts.map +1 -1
  209. package/dist/types/thinking/index.d.ts +4 -0
  210. package/dist/types/thinking/index.d.ts.map +1 -1
  211. package/dist/types/tool-providers/index.d.ts +4 -0
  212. package/dist/types/tool-providers/index.d.ts.map +1 -1
  213. package/package.json +182 -155
@@ -0,0 +1,376 @@
1
+ "use strict";
2
+ /**
3
+ * hosting/sqliteSessions — conversations in a file, so a restart is not an
4
+ * amnesia event.
5
+ *
6
+ * `memorySessions()` keeps conversations in a `Map` and says what that costs in
7
+ * its own docstring: restart the process and every conversation is gone. Until
8
+ * now the next step up was "bring a Redis", and the step between those two —
9
+ * *one machine, one file, nothing to install* — was a store every consumer had
10
+ * to write for themselves. This is that store.
11
+ *
12
+ * A paused run was in the same position from the other direction. `agent.run()`
13
+ * hands back a checkpoint that is documented as JSON you can keep anywhere, and
14
+ * "anywhere" was the whole of the offer: the library named a shape and left the
15
+ * keeping to you. Both halves land in the same table here, because
16
+ * {@link CheckpointEnvelope} was already a union of the two and a session store
17
+ * has no business caring which one it is holding.
18
+ *
19
+ * ── What this is, said plainly ──────────────────────────────────────────────
20
+ * **One process on one machine, writing one file.** That is the whole claim,
21
+ * and it is worth stating as a ceiling rather than leaving it to be discovered:
22
+ *
23
+ * • It survives a restart, a crash, a deploy — anything that ends the process
24
+ * and leaves the disk alone.
25
+ * • It is NOT a distributed store. Two machines do not share a session by
26
+ * both opening this file over a network filesystem, and nothing here tries
27
+ * to make that work.
28
+ * • WAL lets readers and one writer run at once, and **one writer at a time
29
+ * is the ceiling** — a second writer waits for the lock up to
30
+ * `busyTimeoutMs` and then fails loudly rather than queueing forever.
31
+ * Several processes on one box is fine at that scale; a fleet is not what
32
+ * this is.
33
+ *
34
+ * When you outgrow it you swap the one argument to `standingAgent`, which is
35
+ * the entire point of the port.
36
+ *
37
+ * ── Zero dependencies, and the version floor that buys ──────────────────────
38
+ * SQLite is *inside Node* — `node:sqlite`, no install, no native build, no
39
+ * peer dependency. The price is a version floor this package does not otherwise
40
+ * have: the module ships with Node 22.5 and newer. Rather than raise `engines`
41
+ * for one optional adapter and break every consumer on Node 20, the module is
42
+ * loaded when you actually construct a store, and its absence is refused by
43
+ * name with the version you are on and what to do about it — see
44
+ * {@link SqliteUnavailableError}. There is deliberately **no fallback to
45
+ * memory**: a store that silently forgot everything on restart is
46
+ * indistinguishable, from the outside, from a brand-new user.
47
+ *
48
+ * ── The two laws it inherits rather than re-implements ──────────────────────
49
+ * `checkEnvelope` is called on the way out AND on the way in, so an envelope
50
+ * whose `format` this runtime does not know is refused by name, and a stored
51
+ * session that is PRESENT but unreadable is refused by name too. Only a session
52
+ * that was never written hydrates as `undefined`. Validating on the way in as
53
+ * well is the cheap half of that promise: a row this store could not read back
54
+ * never gets written in the first place.
55
+ */
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.sqliteSessions = exports.UnreadableSessionFileError = exports.SqliteUnavailableError = void 0;
58
+ const envelope_js_1 = require("./envelope.js");
59
+ const errors_js_1 = require("./errors.js");
60
+ const lazyRequire_js_1 = require("../lib/lazyRequire.js");
61
+ // ─── The refusals ────────────────────────────────────────────────────
62
+ /**
63
+ * Raised when `node:sqlite` is not available in the running Node.
64
+ *
65
+ * Node 20 does not have the module at all; Node 22.5 through 22.12 have it
66
+ * behind `--experimental-sqlite`; Node 22.13+ and 23.4+ have it as-is (still
67
+ * marked experimental by Node, which is why it prints a warning on first use).
68
+ *
69
+ * The refusal names the version you are on and the three ways out, because
70
+ * "cannot find module 'node:sqlite'" out of a library's guts tells you what
71
+ * broke and nothing about what to do.
72
+ */
73
+ class SqliteUnavailableError extends Error {
74
+ code = 'ERR_SQLITE_UNAVAILABLE';
75
+ /** The Node version this process is running. */
76
+ nodeVersion;
77
+ constructor(nodeVersion, reason) {
78
+ super(`[hosting] sqliteSessions() needs Node's built-in 'node:sqlite' module, and this ` +
79
+ `process (Node ${nodeVersion}) does not have it (${reason}). ` +
80
+ `That module ships with Node 22.5 and newer: on Node 22.13+ (and 23.4+) it is ` +
81
+ `available as-is, and on Node 22.5–22.12 it is behind --experimental-sqlite. ` +
82
+ `So: upgrade Node, add that flag, or use memorySessions() — which keeps ` +
83
+ `conversations in a Map and loses them on restart, and says so in its name. ` +
84
+ `This refuses rather than falling back to memory on your behalf: a store that ` +
85
+ `silently forgot every conversation on restart looks, from the outside, exactly ` +
86
+ `like a brand-new user.`);
87
+ this.name = 'SqliteUnavailableError';
88
+ this.nodeVersion = nodeVersion;
89
+ }
90
+ }
91
+ exports.SqliteUnavailableError = SqliteUnavailableError;
92
+ /**
93
+ * Raised when the file exists but this runtime cannot use it as a session
94
+ * store.
95
+ *
96
+ * The same law {@link UnreadableEnvelopeError} states for one stored value,
97
+ * one level up: **an unreadable store and an empty one are different facts, and
98
+ * only one of them is safe to answer with a fresh start.** A store that opened
99
+ * a corrupt file as an empty database would hand every returning user a blank
100
+ * slate and log nothing.
101
+ *
102
+ * `problem` is the fact to branch on — the three cases need different actions:
103
+ *
104
+ * - `'cannot-open'` — not a SQLite database, or not readable (permissions, a
105
+ * directory, a truncated file).
106
+ * - `'not-our-schema'` — a database whose `agent_sessions` table is somebody
107
+ * else's table of that name. Point the store at its own file.
108
+ * - `'newer-schema'` — written by a newer agentfootprint than this one. Same
109
+ * answer the envelope `format` field gives: refuse, never half-read.
110
+ */
111
+ class UnreadableSessionFileError extends Error {
112
+ code = 'ERR_UNREADABLE_SESSION_FILE';
113
+ /** The file that was refused. */
114
+ file;
115
+ /** Which of the three cases this is. */
116
+ problem;
117
+ constructor(file, problem, detail) {
118
+ super(`[hosting] the session store at '${file}' cannot be used: ${detail} ` +
119
+ `An unreadable store and an empty one are different facts, and only one of them ` +
120
+ `is safe to answer with a fresh start — so this refuses rather than quietly ` +
121
+ `beginning every conversation again on top of a file that already exists. ` +
122
+ (problem === 'newer-schema'
123
+ ? `A store written by a newer agentfootprint needs a runtime that knows that ` +
124
+ `schema; roll forward, or point this one at its own file.`
125
+ : problem === 'not-our-schema'
126
+ ? `Give the store a file of its own rather than sharing one with tables of ` +
127
+ `the same name.`
128
+ : `Check the path and its permissions, or move the file aside to start a ` + `new one.`));
129
+ this.name = 'UnreadableSessionFileError';
130
+ this.file = file;
131
+ this.problem = problem;
132
+ }
133
+ }
134
+ exports.UnreadableSessionFileError = UnreadableSessionFileError;
135
+ // ─── The schema ──────────────────────────────────────────────────────
136
+ /**
137
+ * What this runtime writes. Bumped only for a change an older reader could not
138
+ * survive — and an older reader meeting a newer number refuses by name rather
139
+ * than reading what it half-understands, which is the same rule the envelope's
140
+ * `format` field follows.
141
+ */
142
+ const SCHEMA_VERSION = 1;
143
+ const SESSIONS_TABLE = 'agent_sessions';
144
+ const META_TABLE = 'agent_store_meta';
145
+ /**
146
+ * `format` and `saved_at` are COLUMNS as well as fields inside the JSON, and
147
+ * that redundancy is deliberate: it makes the file answer "which sessions are
148
+ * waiting on a person, and since when?" from the `sqlite3` command line during
149
+ * an incident, without a JSON parser and without this library. A store you
150
+ * cannot inspect with the tools already on the box is a store you debug by
151
+ * guessing.
152
+ */
153
+ const SESSIONS_COLUMNS = ['session_id', 'format', 'saved_at', 'envelope'];
154
+ // ─── The store ───────────────────────────────────────────────────────
155
+ /**
156
+ * A session store in one SQLite file — the battery-included place to keep a
157
+ * conversation, or a run that stopped to ask a person something, so that a
158
+ * restart does not lose it.
159
+ *
160
+ * @throws SqliteUnavailableError when the running Node has no `node:sqlite`.
161
+ * @throws UnreadableSessionFileError when the file exists but cannot be used —
162
+ * never answered with an empty store.
163
+ *
164
+ * @example A standing agent whose conversations survive a restart
165
+ * import { standingAgent, nodeHost, sqliteSessions } from 'agentfootprint/hosting';
166
+ *
167
+ * const handle = await standingAgent({
168
+ * agent,
169
+ * sessions: sqliteSessions({ file: './sessions.db' }),
170
+ * host: nodeHost({ port: 8080 }),
171
+ * });
172
+ *
173
+ * @example Keeping a paused run yourself, without the composer
174
+ * const sessions = sqliteSessions({ file: './sessions.db' });
175
+ * const out = await agent.run({ message });
176
+ * if (isPaused(out)) {
177
+ * await sessions.persist(sessionId, toPausedEnvelope({
178
+ * checkpoint: out.checkpoint,
179
+ * conversation: agent.checkpoint()!,
180
+ * pending: { pauseData: out.pauseData },
181
+ * }));
182
+ * }
183
+ * // …a deploy later, in a new process:
184
+ * const paused = readPausedRun(await sessions.hydrate(sessionId));
185
+ * const answer = await agent.resume(paused.checkpoint, decision);
186
+ */
187
+ function sqliteSessions(options) {
188
+ const { file, busyTimeoutMs = 5000 } = options;
189
+ if (file === ':memory:' || file.trim() === '') {
190
+ throw new TypeError(`[hosting] sqliteSessions({ file: '${file}' }) is not a durable store. ` +
191
+ `':memory:' looks like a file and keeps nothing across a restart, which is the ` +
192
+ `one thing this adapter exists to do. Use memorySessions() when an in-process ` +
193
+ `store is what you want — it says so in its name — or give this one a real path.`);
194
+ }
195
+ const DatabaseSync = options._sqlite ?? loadSqlite();
196
+ ensureParentDirectory(file);
197
+ let db;
198
+ try {
199
+ db = new DatabaseSync(file);
200
+ }
201
+ catch (err) {
202
+ throw new UnreadableSessionFileError(file, 'cannot-open', `${describe(err)}.`);
203
+ }
204
+ let journalMode;
205
+ try {
206
+ journalMode = applyPragmas(db, busyTimeoutMs);
207
+ ensureSchema(db, file);
208
+ }
209
+ catch (err) {
210
+ db.close();
211
+ if (err instanceof UnreadableSessionFileError)
212
+ throw err;
213
+ throw new UnreadableSessionFileError(file, 'cannot-open', `${describe(err)}.`);
214
+ }
215
+ const insert = db.prepare(`INSERT INTO ${SESSIONS_TABLE} (session_id, format, saved_at, envelope) VALUES (?, ?, ?, ?) ` +
216
+ `ON CONFLICT(session_id) DO UPDATE SET format = excluded.format, ` +
217
+ `saved_at = excluded.saved_at, envelope = excluded.envelope`);
218
+ const select = db.prepare(`SELECT envelope FROM ${SESSIONS_TABLE} WHERE session_id = ?`);
219
+ const remove = db.prepare(`DELETE FROM ${SESSIONS_TABLE} WHERE session_id = ?`);
220
+ let closed = false;
221
+ const open = (verb) => {
222
+ if (closed) {
223
+ throw new Error(`[hosting] the sqliteSessions store at '${file}' is closed, so it cannot ${verb}. ` +
224
+ `close() is final by design — reopening the file behind you would hide a ` +
225
+ `shutdown-ordering bug rather than surface it. Build a new store if you need ` +
226
+ `one after closing this.`);
227
+ }
228
+ };
229
+ // The three port methods are `async` so that every refusal in them arrives
230
+ // as a REJECTION. A method that returns a promise on the happy path and
231
+ // throws synchronously on the sad one is a method whose callers need two
232
+ // error handlers, and the one they forget is the one that fires at 3am.
233
+ return {
234
+ journalMode,
235
+ // eslint-disable-next-line @typescript-eslint/require-await
236
+ async hydrate(sessionId) {
237
+ open('hydrate a session');
238
+ const row = select.get(sessionId);
239
+ if (row === undefined)
240
+ return undefined;
241
+ const stored = row.envelope;
242
+ if (typeof stored !== 'string') {
243
+ // A row exists and its payload is not even text. Present, unreadable —
244
+ // and specifically NOT `undefined`.
245
+ throw new errors_js_1.UnreadableEnvelopeError(stored, sessionId);
246
+ }
247
+ let parsed;
248
+ try {
249
+ parsed = JSON.parse(stored);
250
+ }
251
+ catch {
252
+ // Bytes written by something that was not this store. Same fact, same
253
+ // refusal: a conversation EXISTS here and this runtime cannot see it.
254
+ throw new errors_js_1.UnreadableEnvelopeError(stored, sessionId);
255
+ }
256
+ // Validate HERE as well as in the composer, so the refusal points at the
257
+ // store that produced the bytes rather than at whoever read them next.
258
+ return (0, envelope_js_1.checkEnvelope)(parsed, sessionId);
259
+ },
260
+ // eslint-disable-next-line @typescript-eslint/require-await
261
+ async persist(sessionId, envelope) {
262
+ open('persist a session');
263
+ // Checked on the way IN as well as out: a row this store could not read
264
+ // back is a row it has no business writing.
265
+ const checked = (0, envelope_js_1.checkEnvelope)(envelope, sessionId);
266
+ insert.run(sessionId, checked.format, checked.savedAt, JSON.stringify(checked));
267
+ },
268
+ // eslint-disable-next-line @typescript-eslint/require-await
269
+ async forget(sessionId) {
270
+ open('forget a session');
271
+ remove.run(sessionId);
272
+ },
273
+ close() {
274
+ if (closed)
275
+ return;
276
+ closed = true;
277
+ db.close();
278
+ },
279
+ };
280
+ }
281
+ exports.sqliteSessions = sqliteSessions;
282
+ // ─── Internals ───────────────────────────────────────────────────────
283
+ /**
284
+ * Load `node:sqlite`, or refuse by name.
285
+ *
286
+ * `lazyRequire` keeps the specifier away from bundler static analysis, so
287
+ * importing `agentfootprint/hosting` costs nothing for the consumers — the vast
288
+ * majority — who never construct one of these.
289
+ */
290
+ function loadSqlite() {
291
+ try {
292
+ const mod = (0, lazyRequire_js_1.lazyRequire)('node:sqlite');
293
+ if (typeof mod?.DatabaseSync !== 'function') {
294
+ throw new Error('the module loaded but has no DatabaseSync');
295
+ }
296
+ return mod.DatabaseSync;
297
+ }
298
+ catch (err) {
299
+ throw new SqliteUnavailableError(nodeVersion(), describe(err));
300
+ }
301
+ }
302
+ /** The version string, without assuming `process` exists. */
303
+ function nodeVersion() {
304
+ return typeof process !== 'undefined' && typeof process.version === 'string'
305
+ ? process.version
306
+ : 'unknown';
307
+ }
308
+ /**
309
+ * Create the file's directory if it is missing — "no infrastructure" should not
310
+ * mean "except for one `mkdir`". A failure here is left to the open call, which
311
+ * reports it with the path in the same words as every other open failure.
312
+ */
313
+ function ensureParentDirectory(file) {
314
+ try {
315
+ const { mkdirSync } = (0, lazyRequire_js_1.lazyRequire)('node:fs');
316
+ const { dirname } = (0, lazyRequire_js_1.lazyRequire)('node:path');
317
+ mkdirSync(dirname(file), { recursive: true });
318
+ }
319
+ catch {
320
+ /* Reported by the open below, with the path and the real reason. */
321
+ }
322
+ }
323
+ /**
324
+ * Set the file up for concurrent use and report what it actually got.
325
+ *
326
+ * `journal_mode` is the first statement executed on purpose: it is the point at
327
+ * which SQLite reads the file header, so "this is not a database" surfaces here,
328
+ * at construction, where the caller can still do something about it — rather
329
+ * than on the first request of the night.
330
+ */
331
+ function applyPragmas(db, busyTimeoutMs) {
332
+ const row = db.prepare('PRAGMA journal_mode = WAL').get();
333
+ // A pragma takes a literal, not a bound parameter, so the number is coerced
334
+ // to one before it reaches the statement rather than trusted to be one.
335
+ const waitMs = Number.isFinite(busyTimeoutMs) ? Math.max(0, Math.floor(busyTimeoutMs)) : 5000;
336
+ db.exec(`PRAGMA busy_timeout = ${waitMs}`);
337
+ // NORMAL, not FULL: with WAL that is durable across a process crash — which
338
+ // is what this store promises — and it does not pay a disk sync per turn.
339
+ // A power cut can still cost the most recent commits; a fleet-grade store is
340
+ // the answer to that, not a pragma.
341
+ db.exec('PRAGMA synchronous = NORMAL');
342
+ return typeof row?.journal_mode === 'string' ? row.journal_mode : 'unknown';
343
+ }
344
+ /** Create the two tables if they are missing, and refuse a file that is not ours. */
345
+ function ensureSchema(db, file) {
346
+ db.exec(`CREATE TABLE IF NOT EXISTS ${SESSIONS_TABLE} (` +
347
+ `session_id TEXT PRIMARY KEY, format TEXT NOT NULL, ` +
348
+ `saved_at INTEGER NOT NULL, envelope TEXT NOT NULL) STRICT`);
349
+ db.exec(`CREATE TABLE IF NOT EXISTS ${META_TABLE} (key TEXT PRIMARY KEY, value TEXT NOT NULL) STRICT`);
350
+ // `CREATE TABLE IF NOT EXISTS` succeeds against somebody else's table of the
351
+ // same name, and the failure would otherwise arrive as a confusing constraint
352
+ // error on the first write.
353
+ const columns = db.prepare(`PRAGMA table_info('${SESSIONS_TABLE}')`).all().map((c) => String(c.name));
354
+ const missing = SESSIONS_COLUMNS.filter((name) => !columns.includes(name));
355
+ if (missing.length > 0) {
356
+ throw new UnreadableSessionFileError(file, 'not-our-schema', `it has a '${SESSIONS_TABLE}' table that is not this store's ` +
357
+ `(missing ${missing.join(', ')}; found ${columns.join(', ') || 'nothing'}).`);
358
+ }
359
+ const stored = db
360
+ .prepare(`SELECT value FROM ${META_TABLE} WHERE key = 'schema_version'`)
361
+ .get();
362
+ if (stored === undefined) {
363
+ db.prepare(`INSERT INTO ${META_TABLE} (key, value) VALUES ('schema_version', ?)`).run(String(SCHEMA_VERSION));
364
+ return;
365
+ }
366
+ const found = Number(stored.value);
367
+ if (!Number.isFinite(found) || found > SCHEMA_VERSION) {
368
+ throw new UnreadableSessionFileError(file, 'newer-schema', `it was written with schema version ${String(stored.value)} and this runtime ` +
369
+ `reads version ${SCHEMA_VERSION}.`);
370
+ }
371
+ }
372
+ /** One sentence about a thrown thing, for a message that has to stay readable. */
373
+ function describe(err) {
374
+ return err instanceof Error ? err.message : String(err);
375
+ }
376
+ //# sourceMappingURL=sqliteSessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqliteSessions.js","sourceRoot":"","sources":["../../src/hosting/sqliteSessions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;;;AAEH,+CAA8C;AAC9C,2CAAsD;AACtD,0DAAoD;AA2FpD,wEAAwE;AAExE;;;;;;;;;;GAUG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IACtC,IAAI,GAAG,wBAAiC,CAAC;IAClD,gDAAgD;IACvC,WAAW,CAAS;IAE7B,YAAY,WAAmB,EAAE,MAAc;QAC7C,KAAK,CACH,kFAAkF;YAChF,iBAAiB,WAAW,uBAAuB,MAAM,KAAK;YAC9D,+EAA+E;YAC/E,8EAA8E;YAC9E,yEAAyE;YACzE,6EAA6E;YAC7E,+EAA+E;YAC/E,iFAAiF;YACjF,wBAAwB,CAC3B,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF;AApBD,wDAoBC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,0BAA2B,SAAQ,KA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+51,10 @@
51
51
  * sessions: agentCoreSessions({ store: 'session-storage' }),
52
52
  * });
53
53
  * process.on('SIGTERM', () => void handle.close());
54
+ *
55
+ * @deprecated Since 8.0.0 — import from `agentfootprint/hosting` instead.
56
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
57
+ * here is the same symbol on the new door, not a copy.
54
58
  */
55
59
  Object.defineProperty(exports, "__esModule", { value: true });
56
60
  exports.DEFAULT_SESSION_STORAGE_PATH = exports.agentCoreSessions = exports.readAgentCoreConversation = exports.agentCoreRuntimeWire = exports.agentCoreRuntimeHost = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"hosting-providers.js","sourceRoot":"","sources":["../src/hosting-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;;;AAEH,gEAMyC;AALvC,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AACpB,yHAAA,yBAAyB,OAAA;AACzB,iHAAA,iBAAiB,OAAA;AACjB,4HAAA,4BAA4B,OAAA"}
1
+ {"version":3,"file":"hosting-providers.js","sourceRoot":"","sources":["../src/hosting-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;;;AAEH,gEAMyC;AALvC,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AACpB,yHAAA,yBAAyB,OAAA;AACzB,iHAAA,iBAAiB,OAAA;AACjB,4HAAA,4BAA4B,OAAA"}
package/dist/identity.js CHANGED
@@ -23,6 +23,10 @@
23
23
  * callGitHub({ headers: r.credential.toHeaders() }); // universal applicator
24
24
  * }
25
25
  * ```
26
+ *
27
+ * @deprecated Since 8.0.0 — import from `agentfootprint/security` instead.
28
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
29
+ * here is the same symbol on the new door, not a copy.
26
30
  */
27
31
  Object.defineProperty(exports, "__esModule", { value: true });
28
32
  exports.agentCoreIdentity = exports.withCredentialRetry = exports.staticTokens = exports.headers = exports.basic = exports.apiKey = exports.bearer = exports.unconfiguredCredentialProvider = exports.isCredentialIssued = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;AAWH,gDAAyF;AAAhF,8GAAA,kBAAkB,OAAA;AAAE,0HAAA,8BAA8B,OAAA;AAC3D,gDAS6B;AAR3B,kGAAA,MAAM,OAAA;AACN,kGAAA,MAAM,OAAA;AACN,iGAAA,KAAK,OAAA;AACL,mGAAA,OAAO,OAAA;AAMT,8DAAoF;AAA3E,+GAAA,YAAY,OAAA;AACrB,4EAG2C;AAFzC,6HAAA,mBAAmB,OAAA;AAGrB,iEAK0C;AAJxC,iHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAWH,gDAAyF;AAAhF,8GAAA,kBAAkB,OAAA;AAAE,0HAAA,8BAA8B,OAAA;AAC3D,gDAS6B;AAR3B,kGAAA,MAAM,OAAA;AACN,kGAAA,MAAM,OAAA;AACN,iGAAA,KAAK,OAAA;AACL,mGAAA,OAAO,OAAA;AAMT,8DAAoF;AAA3E,+GAAA,YAAY,OAAA;AACrB,4EAG2C;AAFzC,6HAAA,mBAAmB,OAAA;AAGrB,iEAK0C;AAJxC,iHAAA,iBAAiB,OAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;AAEH,oEAAoE;AACpE,8DAA8D;AAC9D,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,sDAAsD;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iGAAA,KAAK,OAAA;AAQP,2BAA2B;AAC3B,8EAA8E;AAC9E,wEAAwE;AACxE,mEAAmE;AACnE,qEAAqE;AACrE,EAAE;AACF,kEAAkE;AAClE,qEAAqE;AACrE,wEAAwE;AACxE,gEAAgE;AAChE,gEAAgE;AAChE,6CAA6C;AAC7C,EAAE;AACF,2FAA2F;AAC3F,wFAAwF;AAExF,sEAK0C;AAJxC,oHAAA,eAAe,OAAA;AAMjB,+DAA+D;AAE/D,oEAAoE;AACpE,gEAAgE;AAEhE,qEAAqE;AACrE,0DAA0D;AAC1D,sDAAoC;AAEpC,uEAAuE;AACvE,uEAAuE;AACvE,oEAAoE;AACpE,sEAAsE;AACtE,8CAA8C;AAE9C,wEAAwE;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,+CAM4B;AAL1B,qGAAA,SAAS,OAAA;AAET,0GAAA,cAAc,OAAA;AAKhB,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,8DAA8D;AAC9D,wEAAwE;AACxE,gDAAgD;AAChD,wEAAwE;AACxE,gEAAgE;AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  /**
3
3
  * agentfootprint/injection-engine — public re-export for the InjectionEngine subsystem.
4
+ *
5
+ * @deprecated Since 8.0.0 — import from `agentfootprint/context` instead.
6
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
7
+ * here is the same symbol on the new door, not a copy.
4
8
  */
5
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"injection-engine.js","sourceRoot":"","sources":["../src/injection-engine.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,kEAAgD"}
1
+ {"version":3,"file":"injection-engine.js","sourceRoot":"","sources":["../src/injection-engine.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;AAEH,kEAAgD"}
@@ -23,6 +23,10 @@
23
23
  *
24
24
  * @example
25
25
  * import { mock, AnthropicProvider } from 'agentfootprint/llm-providers';
26
+ *
27
+ * @deprecated Since 8.0.0 — import from `agentfootprint/providers` instead.
28
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
29
+ * here is the same symbol on the new door, not a copy.
26
30
  */
27
31
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
28
32
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"llm-providers.js","sourceRoot":"","sources":["../src/llm-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;AAEH,iDAA+B"}
1
+ {"version":3,"file":"llm-providers.js","sourceRoot":"","sources":["../src/llm-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;;;;;;;;;;;;;;AAEH,iDAA+B"}
@@ -59,6 +59,10 @@
59
59
  * const myCatalog = composeMessages(defaultCommentaryMessages, customOverrides);
60
60
  * validateMessages(myCatalog, Object.keys(defaultCommentaryMessages));
61
61
  * // throws on first missing OR empty key — fail-fast at boot
62
+ *
63
+ * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
64
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
65
+ * here is the same symbol on the new door, not a copy.
62
66
  */
63
67
  Object.defineProperty(exports, "__esModule", { value: true });
64
68
  exports.validateMessages = exports.composeMessages = exports.defaultStatusTemplates = exports.defaultThinkingMessages = exports.defaultCommentaryMessages = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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import { RedisStore, AgentCoreStore } from 'agentfootprint/memory-providers';
35
+ *
36
+ * @deprecated Since 8.0.0 — import from `agentfootprint/memory` instead.
37
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
38
+ * here is the same symbol on the new door, not a copy.
35
39
  */
36
40
  Object.defineProperty(exports, "__esModule", { value: true });
37
41
  exports.BedrockAgentMemory = exports.UnreadableMemoryEntryError = exports.AgentCoreStore = exports.RedisStore = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"memory-providers.js","sourceRoot":"","sources":["../src/memory-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;AAEH,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,uDAKoC;AAJlC,sGAAA,UAAU,OAAA;AAMZ,+DAOwC;AANtC,8GAAA,cAAc,OAAA;AACd,0HAAA,0BAA0B,OAAA;AAO5B,8EAA8E;AAC9E,yEAAyE;AACzE,iFAKiD;AAJ/C,2HAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"memory-providers.js","sourceRoot":"","sources":["../src/memory-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;;AAEH,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,uDAKoC;AAJlC,sGAAA,UAAU,OAAA;AAMZ,+DAOwC;AANtC,8GAAA,cAAc,OAAA;AACd,0HAAA,0BAA0B,OAAA;AAO5B,8EAA8E;AAC9E,yEAAyE;AACzE,iFAKiD;AAJ/C,2HAAA,kBAAkB,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/observability/contextError/finders/index.ts"],"names":[],"mappings":";;;AA2BA,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,yDAAsE;AAA7D,mHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/observability/contextError/finders/index.ts"],"names":[],"mappings":";;;AA+BA,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,yDAAsE;AAA7D,mHAAA,cAAc,OAAA"}
@@ -38,6 +38,10 @@
38
38
  * and `otelObservability` covers the Datadog use case. We'll ship a
39
39
  * dedicated `dd-trace`-based adapter only if real-world feedback
40
40
  * demands the native Datadog APM client.
41
+ *
42
+ * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
43
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
44
+ * here is the same symbol on the new door, not a copy.
41
45
  */
42
46
  Object.defineProperty(exports, "__esModule", { value: true });
43
47
  exports.CANONICAL_JSON_VERSION = exports.canonicalJson = exports.AUDIT_ZERO_HASH = exports.AUDIT_GENESIS_EVENT_TYPE = exports.AUDIT_BUNDLE_FORMAT = exports.verifyAuditBundle = exports.auditExport = exports.otelObservability = exports.xrayObservability = exports.cloudwatchObservability = exports.agentcoreObservability = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../src/observability-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;;;AAEH,sEAG+C;AAF7C,sHAAA,sBAAsB,OAAA;AAGxB,wEAGgD;AAF9C,wHAAA,uBAAuB,OAAA;AAGzB,4DAI0C;AAHxC,4GAAA,iBAAiB,OAAA;AAInB,4DAS0C;AARxC,4GAAA,iBAAiB,OAAA;AASnB,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,8DAY2C;AAXzC,uGAAA,WAAW,OAAA;AACX,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,2GAAA,eAAe,OAAA;AAQjB,2DAA+E;AAAtE,iHAAA,aAAa,OAAA;AAAE,0HAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../src/observability-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;;;AAEH,sEAG+C;AAF7C,sHAAA,sBAAsB,OAAA;AAGxB,wEAGgD;AAF9C,wHAAA,uBAAuB,OAAA;AAGzB,4DAI0C;AAHxC,4GAAA,iBAAiB,OAAA;AAInB,4DAS0C;AARxC,4GAAA,iBAAiB,OAAA;AASnB,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,8DAY2C;AAXzC,uGAAA,WAAW,OAAA;AACX,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,2GAAA,eAAe,OAAA;AAQjB,2DAA+E;AAAtE,iHAAA,aAAa,OAAA;AAAE,0HAAA,sBAAsB,OAAA"}
@@ -28,6 +28,14 @@
28
28
  * }
29
29
  * }
30
30
  * ```
31
+ *
32
+ * `CircuitOpenError` is the one name that does NOT move: the gate throws a
33
+ * different class than the provider decorator does, so this path stays the
34
+ * only home for it. Everything else here is also on the new door.
35
+ *
36
+ * @deprecated Since 8.0.0 — import from `agentfootprint/resilience` instead.
37
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
38
+ * here is the same symbol on the new door, not a copy.
31
39
  */
32
40
  Object.defineProperty(exports, "__esModule", { value: true });
33
41
  exports.defaultStuckLoopRule = exports.lastNValidationErrorsMatch = exports.ValidationFailure = exports.initialBreakerState = exports.CircuitOpenError = exports.ReliabilityFailFastError = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reliability/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAYH,uCAAsD;AAA7C,oHAAA,wBAAwB,OAAA;AAEjC,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,yDAK6B;AAJ3B,qHAAA,gBAAgB,OAAA;AAChB,wHAAA,mBAAmB,OAAA;AAKrB,wEAAwE;AACxE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,mEAAmE;AACnE,wFAIsD;AAHpD,4HAAA,iBAAiB,OAAA;AACjB,qIAAA,0BAA0B,OAAA;AAC1B,+HAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reliability/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;;AAYH,uCAAsD;AAA7C,oHAAA,wBAAwB,OAAA;AAEjC,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,yDAK6B;AAJ3B,qHAAA,gBAAgB,OAAA;AAChB,wHAAA,mBAAmB,OAAA;AAKrB,wEAAwE;AACxE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,mEAAmE;AACnE,wFAIsD;AAHpD,4HAAA,iBAAiB,OAAA;AACjB,qIAAA,0BAA0B,OAAA;AAC1B,+HAAA,oBAAoB,OAAA"}
package/dist/status.js CHANGED
@@ -51,6 +51,10 @@
51
51
  * └──────────┘
52
52
  *
53
53
  * (null) run done / between calls → bubble hidden
54
+ *
55
+ * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
56
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
57
+ * here is the same symbol on the new door, not a copy.
54
58
  */
55
59
  Object.defineProperty(exports, "__esModule", { value: true });
56
60
  exports.renderStatusLine = exports.selectStatus = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;;;AAEH,sEAAsE;AACtE,2EAA2E;AAC3E,iEAAiE;AACjE,0FAO6D;AAN3D,kHAAA,YAAY,OAAA;AACZ,sHAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;;;AAEH,sEAAsE;AACtE,2EAA2E;AAC3E,iEAAiE;AACjE,0FAO6D;AAN3D,kHAAA,YAAY,OAAA;AACZ,sHAAA,gBAAgB,OAAA"}
@@ -30,6 +30,10 @@
30
30
  * so consumers who never call a particular factory don't have to
31
31
  * install that SDK. Peer-deps are declared in package.json with
32
32
  * `peerDependenciesMeta.{name}.optional = true`.
33
+ *
34
+ * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
35
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
36
+ * here is the same symbol on the new door, not a copy.
33
37
  */
34
38
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
35
39
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,sDAAoC;AACpC,2CAAiG;AAAxF,kHAAA,oBAAoB,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,yGAAA,WAAW,OAAA;AAC1E,yCAOqB;AANnB,wHAAA,2BAA2B,OAAA;AAC3B,+GAAA,kBAAkB,OAAA;AAClB,qHAAA,wBAAwB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,sDAAoC;AACpC,2CAAiG;AAAxF,kHAAA,oBAAoB,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,yGAAA,WAAW,OAAA;AAC1E,yCAOqB;AANnB,wHAAA,2BAA2B,OAAA;AAC3B,+GAAA,kBAAkB,OAAA;AAClB,qHAAA,wBAAwB,OAAA"}
package/dist/stream.js CHANGED
@@ -8,6 +8,10 @@
8
8
  * framework that accepts an async iterable response body
9
9
  * (Fetch Response, Express res.write, Hono streaming, etc.).
10
10
  * Emits: N/A — observes only.
11
+ *
12
+ * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
13
+ * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
14
+ * here is the same symbol on the new door, not a copy.
11
15
  */
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  exports.encodeSSE = exports.SSEFormatter = exports.toSSE = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAsDH;;;GAGG;AACI,KAAK,SAAS,CAAC,CAAC,KAAK,CAC1B,MAA6B,EAC7B,UAAwB,EAAE;IAE1B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC;IACxC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAG,OAAO,CAA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