agentfootprint 7.22.0 → 7.22.1

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 (57) hide show
  1. package/dist/adapters/hosting/agentcore.js +68 -8
  2. package/dist/adapters/hosting/agentcore.js.map +1 -1
  3. package/dist/adapters/memory/agentcore.js +116 -11
  4. package/dist/adapters/memory/agentcore.js.map +1 -1
  5. package/dist/esm/adapters/hosting/agentcore.d.ts +34 -4
  6. package/dist/esm/adapters/hosting/agentcore.js +68 -8
  7. package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
  8. package/dist/esm/adapters/memory/agentcore.d.ts +59 -1
  9. package/dist/esm/adapters/memory/agentcore.js +114 -10
  10. package/dist/esm/adapters/memory/agentcore.js.map +1 -1
  11. package/dist/esm/hosting/envelope.d.ts +31 -2
  12. package/dist/esm/hosting/envelope.js +42 -7
  13. package/dist/esm/hosting/envelope.js.map +1 -1
  14. package/dist/esm/hosting/errors.d.ts +44 -1
  15. package/dist/esm/hosting/errors.js +81 -1
  16. package/dist/esm/hosting/errors.js.map +1 -1
  17. package/dist/esm/hosting/index.d.ts +5 -1
  18. package/dist/esm/hosting/index.js +5 -1
  19. package/dist/esm/hosting/index.js.map +1 -1
  20. package/dist/esm/hosting/standingAgent.d.ts +9 -0
  21. package/dist/esm/hosting/standingAgent.js +30 -9
  22. package/dist/esm/hosting/standingAgent.js.map +1 -1
  23. package/dist/esm/lib/storedPreview.d.ts +58 -0
  24. package/dist/esm/lib/storedPreview.js +97 -0
  25. package/dist/esm/lib/storedPreview.js.map +1 -0
  26. package/dist/esm/memory-providers.d.ts +1 -1
  27. package/dist/esm/memory-providers.js +1 -1
  28. package/dist/esm/memory-providers.js.map +1 -1
  29. package/dist/hosting/envelope.js +42 -7
  30. package/dist/hosting/envelope.js.map +1 -1
  31. package/dist/hosting/errors.js +83 -2
  32. package/dist/hosting/errors.js.map +1 -1
  33. package/dist/hosting/index.js +6 -1
  34. package/dist/hosting/index.js.map +1 -1
  35. package/dist/hosting/standingAgent.js +29 -8
  36. package/dist/hosting/standingAgent.js.map +1 -1
  37. package/dist/lib/storedPreview.js +102 -0
  38. package/dist/lib/storedPreview.js.map +1 -0
  39. package/dist/memory-providers.js +2 -1
  40. package/dist/memory-providers.js.map +1 -1
  41. package/dist/types/adapters/hosting/agentcore.d.ts +34 -4
  42. package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
  43. package/dist/types/adapters/memory/agentcore.d.ts +59 -1
  44. package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
  45. package/dist/types/hosting/envelope.d.ts +31 -2
  46. package/dist/types/hosting/envelope.d.ts.map +1 -1
  47. package/dist/types/hosting/errors.d.ts +44 -1
  48. package/dist/types/hosting/errors.d.ts.map +1 -1
  49. package/dist/types/hosting/index.d.ts +5 -1
  50. package/dist/types/hosting/index.d.ts.map +1 -1
  51. package/dist/types/hosting/standingAgent.d.ts +9 -0
  52. package/dist/types/hosting/standingAgent.d.ts.map +1 -1
  53. package/dist/types/lib/storedPreview.d.ts +59 -0
  54. package/dist/types/lib/storedPreview.d.ts.map +1 -0
  55. package/dist/types/memory-providers.d.ts +1 -1
  56. package/dist/types/memory-providers.d.ts.map +1 -1
  57. package/package.json +1 -1
@@ -47,9 +47,67 @@ import type { MemoryIdentity } from '../../memory/identity/index.js';
47
47
  export interface AgentCoreEvent {
48
48
  /** AgentCore server-assigned event id (needed to delete it). */
49
49
  readonly eventId: string;
50
- /** The MemoryEntry decoded from the event's blob payload (null if unparseable). */
50
+ /**
51
+ * The MemoryEntry decoded from the event's blob payload.
52
+ *
53
+ * `null` means the event carried **no blob at all** — nothing in it ever
54
+ * claimed to be one of this store's entries (AgentCore writes events of its
55
+ * own into the same log), so it is skipped as an absence.
56
+ *
57
+ * A blob that IS present and cannot be decoded never arrives here: it raises
58
+ * {@link UnreadableMemoryEntryError} at the decode step instead. An unreadable
59
+ * stored memory and an absent one are different facts, and only one of them is
60
+ * safe to answer with silence.
61
+ */
51
62
  readonly entry: MemoryEntry | null;
52
63
  }
64
+ /**
65
+ * Thrown when an event carries a blob that is **present but unreadable** where a
66
+ * `MemoryEntry` should be.
67
+ *
68
+ * The same law the session store inherits from `hosting/envelope`, applied to
69
+ * this port's own shape: an unreadable stored memory and an absent one are
70
+ * different facts, and only one of them is safe to answer with silence. A
71
+ * memory that exists and cannot be decoded, quietly skipped, is an agent that
72
+ * answers as if it were never told — indistinguishable from working, until
73
+ * somebody notices the assistant has forgotten a customer's address.
74
+ *
75
+ * ── Why the law lives HERE and not in a shared reader ────────────────────────
76
+ * `MemoryStore` has no envelope and no shared reading path — nothing on this
77
+ * port corresponds to `hosting`'s `readFormat`, the single choke point every
78
+ * session adapter reads through — so the refusal belongs at the one place raw
79
+ * bytes become an entry: this adapter's decode step. If a `MemoryStore` reading
80
+ * path ever grows such a choke point, the law moves there and this becomes a
81
+ * caller of it.
82
+ *
83
+ * ── Why this one QUOTES NOTHING, where the session refusal quotes a prefix ───
84
+ * Same discipline — "never the stored content" — and the same shared helper, but
85
+ * a different answer, because the two shapes differ in where content begins. A
86
+ * `CheckpointEnvelope` opens `{ format, data, savedAt }`, so a capped prefix is
87
+ * metadata. A `MemoryEntry` opens `{ id, value, … }`, so its SECOND field is the
88
+ * thing somebody asked the agent to remember, and even a short prefix would
89
+ * print it. `storedShape` therefore reports type, length, JSON-ness and the
90
+ * opening character and nothing else — still enough to recognise "an object
91
+ * stringified by something that was not JSON", which is the only diagnosis this
92
+ * message needs to support.
93
+ */
94
+ export declare class UnreadableMemoryEntryError extends TypeError {
95
+ readonly code: "ERR_UNREADABLE_MEMORY_ENTRY";
96
+ /** AgentCore's id for the event those bytes came from. */
97
+ readonly eventId: string;
98
+ /** The AgentCore session (this store's conversation) it was stored under. */
99
+ readonly sessionId: string;
100
+ /**
101
+ * What came back, described by SHAPE — type, length, JSON-ness, opening
102
+ * character. Never a quote: on this port the stored bytes are the memory.
103
+ */
104
+ readonly storedShape: string;
105
+ constructor(input: {
106
+ eventId: string;
107
+ sessionId: string;
108
+ stored: unknown;
109
+ });
110
+ }
53
111
  /**
54
112
  * Minimal, entry-semantic surface the store uses. The real implementation
55
113
  * (`createAgentCoreClient`) maps these onto `CreateEvent` / `ListEvents` /
@@ -41,6 +41,65 @@
41
41
  * in use. Emits: N/A (storage adapters don't emit).
42
42
  */
43
43
  import { lazyRequire } from '../../lib/lazyRequire.js';
44
+ import { describeStoredShape } from '../../lib/storedPreview.js';
45
+ /**
46
+ * Thrown when an event carries a blob that is **present but unreadable** where a
47
+ * `MemoryEntry` should be.
48
+ *
49
+ * The same law the session store inherits from `hosting/envelope`, applied to
50
+ * this port's own shape: an unreadable stored memory and an absent one are
51
+ * different facts, and only one of them is safe to answer with silence. A
52
+ * memory that exists and cannot be decoded, quietly skipped, is an agent that
53
+ * answers as if it were never told — indistinguishable from working, until
54
+ * somebody notices the assistant has forgotten a customer's address.
55
+ *
56
+ * ── Why the law lives HERE and not in a shared reader ────────────────────────
57
+ * `MemoryStore` has no envelope and no shared reading path — nothing on this
58
+ * port corresponds to `hosting`'s `readFormat`, the single choke point every
59
+ * session adapter reads through — so the refusal belongs at the one place raw
60
+ * bytes become an entry: this adapter's decode step. If a `MemoryStore` reading
61
+ * path ever grows such a choke point, the law moves there and this becomes a
62
+ * caller of it.
63
+ *
64
+ * ── Why this one QUOTES NOTHING, where the session refusal quotes a prefix ───
65
+ * Same discipline — "never the stored content" — and the same shared helper, but
66
+ * a different answer, because the two shapes differ in where content begins. A
67
+ * `CheckpointEnvelope` opens `{ format, data, savedAt }`, so a capped prefix is
68
+ * metadata. A `MemoryEntry` opens `{ id, value, … }`, so its SECOND field is the
69
+ * thing somebody asked the agent to remember, and even a short prefix would
70
+ * print it. `storedShape` therefore reports type, length, JSON-ness and the
71
+ * opening character and nothing else — still enough to recognise "an object
72
+ * stringified by something that was not JSON", which is the only diagnosis this
73
+ * message needs to support.
74
+ */
75
+ export class UnreadableMemoryEntryError extends TypeError {
76
+ code = 'ERR_UNREADABLE_MEMORY_ENTRY';
77
+ /** AgentCore's id for the event those bytes came from. */
78
+ eventId;
79
+ /** The AgentCore session (this store's conversation) it was stored under. */
80
+ sessionId;
81
+ /**
82
+ * What came back, described by SHAPE — type, length, JSON-ness, opening
83
+ * character. Never a quote: on this port the stored bytes are the memory.
84
+ */
85
+ storedShape;
86
+ constructor(input) {
87
+ const shape = describeStoredShape(input.stored);
88
+ super(`[memory] AgentCoreStore: event '${input.eventId}' in session '${input.sessionId}' holds ` +
89
+ `a STORED memory this adapter cannot read. An unreadable stored memory and an absent ` +
90
+ `one are different facts, and only one of them is safe to answer with silence — so ` +
91
+ `this refuses rather than handing back a shorter list that reads as "nothing was ` +
92
+ `remembered". What the store handed back is ${shape}; none of it is quoted here, ` +
93
+ `because on this port those bytes ARE the memory. Entries written before 7.22.1 were ` +
94
+ `stored as objects and come back as this service's own toString() rendering, which is ` +
95
+ `lossy and cannot be decoded: delete them, or point this store at a fresh memory ` +
96
+ `resource.`);
97
+ this.name = 'UnreadableMemoryEntryError';
98
+ this.eventId = input.eventId;
99
+ this.sessionId = input.sessionId;
100
+ this.storedShape = shape;
101
+ }
102
+ }
44
103
  const ID_MAX = 99;
45
104
  /** Build an AgentCore-safe id from arbitrary identity parts (`[A-Za-z0-9_-]`, bounded). */
46
105
  function safeId(prefix, raw) {
@@ -339,14 +398,48 @@ function fnv1a(s) {
339
398
  }
340
399
  return (h >>> 0).toString(36);
341
400
  }
342
- /** Pull the MemoryEntry out of an AgentCore event's `payload` (a single `blob` document). */
343
- function entryFromPayload(payload) {
401
+ /**
402
+ * Pull the MemoryEntry out of an AgentCore event's `payload` (a single `blob`
403
+ * document) — this adapter's ONE decode step, and therefore the only place that
404
+ * can tell "no entry here" apart from "an entry nobody can read".
405
+ *
406
+ * ── Why a string is the normal case ──────────────────────────────────────────
407
+ * Entries are written as JSON **text** (see `createEvent` below), so the blob
408
+ * comes back a string and is parsed here. Objects are still accepted: a
409
+ * caller-supplied `client` may hand back a real object, and refusing it would
410
+ * break a seam that never had this problem.
411
+ *
412
+ * Three outcomes, and the middle one is the fix:
413
+ * • no `blob` in any part → `null`. Nothing claimed to be an entry — AgentCore
414
+ * writes events of its own into the same log — so it is skipped.
415
+ * • a blob that cannot be decoded → **throws** {@link UnreadableMemoryEntryError}.
416
+ * Skipping it would shorten a `list()` by one and read as "that memory was
417
+ * never stored", which is the silent failure this release exists to end.
418
+ * • a decodable blob → the entry.
419
+ */
420
+ function entryFromPayload(payload, event) {
344
421
  if (!Array.isArray(payload))
345
422
  return null;
346
423
  for (const p of payload) {
347
- const blob = p?.blob;
348
- if (blob && typeof blob === 'object')
424
+ if (!p || typeof p !== 'object' || !('blob' in p))
425
+ continue;
426
+ const blob = p.blob;
427
+ // A part with no blob VALUE is not an entry either — keep looking.
428
+ if (blob === null || blob === undefined)
429
+ continue;
430
+ if (typeof blob === 'object')
349
431
  return blob;
432
+ if (typeof blob === 'string') {
433
+ try {
434
+ const parsed = JSON.parse(blob);
435
+ if (parsed !== null && typeof parsed === 'object')
436
+ return parsed;
437
+ }
438
+ catch {
439
+ /* fall through to the refusal, with the ORIGINAL bytes to describe */
440
+ }
441
+ }
442
+ throw new UnreadableMemoryEntryError({ ...event, stored: blob });
350
443
  }
351
444
  return null;
352
445
  }
@@ -382,13 +475,21 @@ function createAgentCoreClient(region, injected) {
382
475
  };
383
476
  return {
384
477
  async createEvent({ memoryId, actorId, sessionId, entry }) {
385
- // The entry is stored as a single `blob` document (PayloadType.blob = __DocumentType).
478
+ // The entry is stored as a single `blob` document (PayloadType.blob =
479
+ // __DocumentType), and it goes in as JSON TEXT, not as the object.
480
+ // Field-learned on the session store and true of every blob this service
481
+ // holds: hand it an object and it stores its own host language's
482
+ // `toString()` rendering — `{id=m-1, value={...}}` — and returns THAT
483
+ // string, which is not JSON and cannot be turned back into an entry. A
484
+ // `MemoryEntry` is defined as something a store can hold (the port's
485
+ // stores round-trip it through JSON already), so the encoding is ours to
486
+ // pick and the honest pick is the one whose bytes come back unchanged.
386
487
  await send(mod.CreateEventCommand, 'CreateEventCommand', {
387
488
  memoryId,
388
489
  actorId,
389
490
  sessionId,
390
491
  eventTimestamp: new Date(),
391
- payload: [{ blob: entry }],
492
+ payload: [{ blob: JSON.stringify(entry) }],
392
493
  });
393
494
  },
394
495
  async listEvents({ memoryId, actorId, sessionId, maxResults, nextToken }) {
@@ -400,10 +501,13 @@ function createAgentCoreClient(region, injected) {
400
501
  ...(maxResults !== undefined && { maxResults }),
401
502
  ...(nextToken !== undefined && { nextToken }),
402
503
  }));
403
- const events = (r?.events ?? []).map((ev) => ({
404
- eventId: ev.eventId ?? '',
405
- entry: entryFromPayload(ev.payload),
406
- }));
504
+ const events = (r?.events ?? []).map((ev) => {
505
+ const eventId = ev.eventId ?? '';
506
+ // A page containing one unreadable entry fails the READ. Returning the
507
+ // rest would be a list that is quietly one memory short, which is the
508
+ // shape of the failure nobody notices.
509
+ return { eventId, entry: entryFromPayload(ev.payload, { eventId, sessionId }) };
510
+ });
407
511
  return r?.nextToken ? { events, nextToken: r.nextToken } : { events };
408
512
  },
409
513
  async deleteEvent({ memoryId, actorId, sessionId, eventId }) {
@@ -1 +1 @@
1
- {"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../../../src/adapters/memory/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAYH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAwGvD,MAAM,MAAM,GAAG,EAAE,CAAC;AAElB,2FAA2F;AAC3F,SAAS,MAAM,CAAC,MAAc,EAAE,GAAW;IACzC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM;QAAE,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC;IACrE,wFAAwF;IACxF,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AC,gBAAgB,KAAK,SAAS,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC;oBACjF,GAAG,CAAC,OAAO,cAAc,KAAK,QAAQ,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;oBACxE,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;iBAC5E,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -19,6 +19,24 @@
19
19
  * while a person is still waiting on a question nobody mentioned. That is a
20
20
  * half-restore wearing a happy path, which is the exact failure the format field
21
21
  * exists to prevent.
22
+ *
23
+ * ── The same rule one step earlier: unreadable ≠ absent ──────────────────────
24
+ * A format nobody knows is one way a store can hand back something unusable.
25
+ * The other is bytes that are not an envelope at all — a store that kept its own
26
+ * encoding and gave back its host language's `toString()` of the object rather
27
+ * than the object, say. **An unreadable stored conversation and an absent one
28
+ * are different facts, and only one of them is safe to answer with a fresh
29
+ * start.** Absent is ordinary. Unreadable means a conversation EXISTS and this
30
+ * runtime cannot see it, and answering that with a fresh start is invisible from
31
+ * the outside — it looks exactly like a new user — until a deployment boundary
32
+ * hands somebody a blank slate where their conversation was.
33
+ *
34
+ * So {@link readFormat} — the ONE place a stored value is inspected, and
35
+ * therefore the place every reader and every store adapter inherits from —
36
+ * raises {@link UnreadableEnvelopeError} by name, with the session and a short
37
+ * prefix of what it found. Decoding is an adapter's business (only the adapter
38
+ * knows its transport's encoding); "these bytes are nobody's readable session"
39
+ * is everybody's, so it is refused here, once.
22
40
  */
23
41
  import { type AgentRunCheckpoint } from '../core/runCheckpoint.js';
24
42
  import type { CheckpointEnvelope, ConversationEnvelope, PausedRun, PausedRunEnvelope } from './types.js';
@@ -58,6 +76,10 @@ export declare function toPausedEnvelope(paused: PausedRun): PausedRunEnvelope;
58
76
  * else wrote, in a format this runtime may not know, and typing the parameter
59
77
  * as the happy shape would be assuming the very thing that needs checking.
60
78
  *
79
+ * @throws UnreadableEnvelopeError when what came back is present but is not an
80
+ * envelope at all — bytes a store kept in its own encoding, say. Never
81
+ * `undefined`: a conversation that exists and cannot be read is not the same
82
+ * fact as one that was never there.
61
83
  * @throws TypeError naming the format when it is one this runtime cannot read;
62
84
  * naming the missing field when the conversation inside is malformed; and
63
85
  * pointing at {@link readPausedRun} when the envelope holds a paused run,
@@ -82,13 +104,20 @@ export declare function readPausedRun(envelope: unknown): PausedRun;
82
104
  * produced them rather than whoever read them next; it has no business caring
83
105
  * whether the session inside is mid-conversation or mid-question.
84
106
  *
107
+ * Pass `sessionId` and the refusal names the conversation, which is what turns
108
+ * a log line into an incident somebody can act on. Pass it whenever you have it
109
+ * — a store always does.
110
+ *
111
+ * @throws UnreadableEnvelopeError when the stored value is present but is not an
112
+ * envelope at all. That is the case a store must NOT answer with `undefined`:
113
+ * see the module header.
85
114
  * @throws TypeError naming the format when this runtime cannot read it, or the
86
115
  * missing field when the payload is malformed.
87
116
  *
88
117
  * @example
89
118
  * async hydrate(sessionId) {
90
119
  * const stored = await myStore.get(sessionId);
91
- * return stored === undefined ? undefined : checkEnvelope(stored);
120
+ * return stored === undefined ? undefined : checkEnvelope(stored, sessionId);
92
121
  * }
93
122
  */
94
- export declare function checkEnvelope(envelope: unknown): CheckpointEnvelope;
123
+ export declare function checkEnvelope(envelope: unknown, sessionId?: string): CheckpointEnvelope;
@@ -19,7 +19,26 @@
19
19
  * while a person is still waiting on a question nobody mentioned. That is a
20
20
  * half-restore wearing a happy path, which is the exact failure the format field
21
21
  * exists to prevent.
22
+ *
23
+ * ── The same rule one step earlier: unreadable ≠ absent ──────────────────────
24
+ * A format nobody knows is one way a store can hand back something unusable.
25
+ * The other is bytes that are not an envelope at all — a store that kept its own
26
+ * encoding and gave back its host language's `toString()` of the object rather
27
+ * than the object, say. **An unreadable stored conversation and an absent one
28
+ * are different facts, and only one of them is safe to answer with a fresh
29
+ * start.** Absent is ordinary. Unreadable means a conversation EXISTS and this
30
+ * runtime cannot see it, and answering that with a fresh start is invisible from
31
+ * the outside — it looks exactly like a new user — until a deployment boundary
32
+ * hands somebody a blank slate where their conversation was.
33
+ *
34
+ * So {@link readFormat} — the ONE place a stored value is inspected, and
35
+ * therefore the place every reader and every store adapter inherits from —
36
+ * raises {@link UnreadableEnvelopeError} by name, with the session and a short
37
+ * prefix of what it found. Decoding is an adapter's business (only the adapter
38
+ * knows its transport's encoding); "these bytes are nobody's readable session"
39
+ * is everybody's, so it is refused here, once.
22
40
  */
41
+ import { UnreadableEnvelopeError } from './errors.js';
23
42
  import { validateCheckpoint } from '../core/runCheckpoint.js';
24
43
  /** Every format this runtime can read. Add, never redefine. */
25
44
  const KNOWN_FORMATS = ['conversation-v1', 'flowchart-v1'];
@@ -63,6 +82,10 @@ export function toPausedEnvelope(paused) {
63
82
  * else wrote, in a format this runtime may not know, and typing the parameter
64
83
  * as the happy shape would be assuming the very thing that needs checking.
65
84
  *
85
+ * @throws UnreadableEnvelopeError when what came back is present but is not an
86
+ * envelope at all — bytes a store kept in its own encoding, say. Never
87
+ * `undefined`: a conversation that exists and cannot be read is not the same
88
+ * fact as one that was never there.
66
89
  * @throws TypeError naming the format when it is one this runtime cannot read;
67
90
  * naming the missing field when the conversation inside is malformed; and
68
91
  * pointing at {@link readPausedRun} when the envelope holds a paused run,
@@ -101,17 +124,24 @@ export function readPausedRun(envelope) {
101
124
  * produced them rather than whoever read them next; it has no business caring
102
125
  * whether the session inside is mid-conversation or mid-question.
103
126
  *
127
+ * Pass `sessionId` and the refusal names the conversation, which is what turns
128
+ * a log line into an incident somebody can act on. Pass it whenever you have it
129
+ * — a store always does.
130
+ *
131
+ * @throws UnreadableEnvelopeError when the stored value is present but is not an
132
+ * envelope at all. That is the case a store must NOT answer with `undefined`:
133
+ * see the module header.
104
134
  * @throws TypeError naming the format when this runtime cannot read it, or the
105
135
  * missing field when the payload is malformed.
106
136
  *
107
137
  * @example
108
138
  * async hydrate(sessionId) {
109
139
  * const stored = await myStore.get(sessionId);
110
- * return stored === undefined ? undefined : checkEnvelope(stored);
140
+ * return stored === undefined ? undefined : checkEnvelope(stored, sessionId);
111
141
  * }
112
142
  */
113
- export function checkEnvelope(envelope) {
114
- if (readFormat(envelope) === 'flowchart-v1') {
143
+ export function checkEnvelope(envelope, sessionId) {
144
+ if (readFormat(envelope, sessionId) === 'flowchart-v1') {
115
145
  validatePausedRun(envelope.data);
116
146
  }
117
147
  else {
@@ -120,12 +150,17 @@ export function checkEnvelope(envelope) {
120
150
  return envelope;
121
151
  }
122
152
  /**
123
- * The one place a `format` is checked, so every refusal in this file says the
124
- * same thing in the same words.
153
+ * The one place a stored value is inspected, so every refusal in this file says
154
+ * the same thing in the same words — and so the "unreadable is not absent" law
155
+ * holds for every reader here and every store adapter that calls one, including
156
+ * ones nobody has written yet.
125
157
  */
126
- function readFormat(envelope) {
158
+ function readFormat(envelope, sessionId) {
127
159
  if (!envelope || typeof envelope !== 'object' || Array.isArray(envelope)) {
128
- throw new TypeError(`[hosting] stored session is not an envelope (got ${envelope === null ? 'null' : Array.isArray(envelope) ? 'an array' : typeof envelope}). Expected { format, data, savedAt } as written by toEnvelope() / toPausedEnvelope().`);
160
+ // Present but not an envelope. NOT `undefined`, NOT a fresh start: see the
161
+ // module header. Still a `TypeError` by ancestry, so an existing catch is
162
+ // unaffected — it just has a name and a session now.
163
+ throw new UnreadableEnvelopeError(envelope, sessionId);
129
164
  }
130
165
  const found = envelope.format;
131
166
  if (typeof found !== 'string' || !KNOWN_FORMATS.includes(found)) {
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../../src/hosting/envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,kBAAkB,EAA2B,MAAM,0BAA0B,CAAC;AAQvF,+DAA+D;AAC/D,M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AO,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACpD,MAAM,IAAI,SAAS,CACjB,+EAA+E;YAC7E,yEAAyE,CAC5E,CAAC;IACJ,CAAC;IACD,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO,GAAgB,CAAC;AAC1B,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * same words.
4
4
  *
5
5
  * A refusal that varies by adapter is a refusal nobody can write a test or a
6
- * runbook against. These five carry a stable `code`, name WHO refused, and say
6
+ * runbook against. These six carry a stable `code`, name WHO refused, and say
7
7
  * what the caller should do instead. Adapters map the codes onto whatever their
8
8
  * transport uses to say "no" — that mapping is the adapter's business and lives
9
9
  * in the adapter, never here.
@@ -110,6 +110,49 @@ export declare class NoPendingAskError extends Error {
110
110
  readonly sessionId: string;
111
111
  constructor(sessionId: string);
112
112
  }
113
+ /**
114
+ * Thrown when a store hands back something that is **present but unreadable**
115
+ * where a `CheckpointEnvelope` should be.
116
+ *
117
+ * The law, in the words of the field report that bought it:
118
+ *
119
+ * > *An unreadable stored conversation and an absent one are different facts,
120
+ * > and only one of them is safe to answer with a fresh start.*
121
+ *
122
+ * Absent is ordinary — a new session has no conversation, and answering it
123
+ * fresh is exactly right. Unreadable is not ordinary: a conversation EXISTS,
124
+ * somebody is in the middle of it, and starting fresh over the top of it looks
125
+ * identical to the happy path from the outside. Nobody finds that until a
126
+ * deployment boundary hands a user a stranger's blank slate. So this refuses,
127
+ * loudly, naming the session — the one thing a silent `undefined` could never
128
+ * do.
129
+ *
130
+ * It extends `TypeError` because that is what it always was: the refusal gained
131
+ * a name, a `code` and the session it is about, but a caller who was already
132
+ * catching a `TypeError` from a reader keeps working.
133
+ *
134
+ * `storedPreview` quotes at most 64 characters (`STORED_PREVIEW_LIMIT`, in
135
+ * `lib/storedPreview` — one cap, shared by every adapter that has to describe
136
+ * bytes it could not read) — enough to recognise a mangled encoding at a
137
+ * glance, never the conversation itself.
138
+ */
139
+ export declare class UnreadableEnvelopeError extends TypeError {
140
+ readonly code: "ERR_UNREADABLE_ENVELOPE";
141
+ /** The session those bytes were stored under, when the refuser knows it. */
142
+ readonly sessionId?: string;
143
+ /** A short, deliberately truncated rendering of what the store handed back. */
144
+ readonly storedPreview: string;
145
+ constructor(stored: unknown, sessionId?: string);
146
+ /**
147
+ * The same refusal, naming the session — for a reader that knew the bytes
148
+ * were unreadable but not whose conversation they were.
149
+ *
150
+ * Returns a copy rather than mutating: an error already thrown past somebody
151
+ * is a fact about a moment, and editing it under them is how two stack traces
152
+ * end up disagreeing about what happened.
153
+ */
154
+ withSession(sessionId: string): UnreadableEnvelopeError;
155
+ }
113
156
  /**
114
157
  * Assert that a host can do something, and throw a corrective error naming the
115
158
  * adapter when it cannot.
@@ -3,7 +3,7 @@
3
3
  * same words.
4
4
  *
5
5
  * A refusal that varies by adapter is a refusal nobody can write a test or a
6
- * runbook against. These five carry a stable `code`, name WHO refused, and say
6
+ * runbook against. These six carry a stable `code`, name WHO refused, and say
7
7
  * what the caller should do instead. Adapters map the codes onto whatever their
8
8
  * transport uses to say "no" — that mapping is the adapter's business and lives
9
9
  * in the adapter, never here.
@@ -17,6 +17,7 @@
17
17
  * `Error`: nothing branches on "I forgot to feature-detect", it just needs to
18
18
  * say so loudly and name the adapter it is talking about.
19
19
  */
20
+ import { previewStored } from '../lib/storedPreview.js';
20
21
  /**
21
22
  * Thrown when a request arrives at a host that is shutting down or shut down.
22
23
  *
@@ -167,6 +168,85 @@ export class NoPendingAskError extends Error {
167
168
  this.sessionId = sessionId;
168
169
  }
169
170
  }
171
+ /**
172
+ * An already-computed preview, so {@link UnreadableEnvelopeError.withSession}
173
+ * can copy a refusal without being handed the stored bytes a second time. Not
174
+ * exported: nothing outside this file should be able to hand-write a preview.
175
+ */
176
+ class StoredPreview {
177
+ text;
178
+ constructor(text) {
179
+ this.text = text;
180
+ }
181
+ }
182
+ /**
183
+ * Thrown when a store hands back something that is **present but unreadable**
184
+ * where a `CheckpointEnvelope` should be.
185
+ *
186
+ * The law, in the words of the field report that bought it:
187
+ *
188
+ * > *An unreadable stored conversation and an absent one are different facts,
189
+ * > and only one of them is safe to answer with a fresh start.*
190
+ *
191
+ * Absent is ordinary — a new session has no conversation, and answering it
192
+ * fresh is exactly right. Unreadable is not ordinary: a conversation EXISTS,
193
+ * somebody is in the middle of it, and starting fresh over the top of it looks
194
+ * identical to the happy path from the outside. Nobody finds that until a
195
+ * deployment boundary hands a user a stranger's blank slate. So this refuses,
196
+ * loudly, naming the session — the one thing a silent `undefined` could never
197
+ * do.
198
+ *
199
+ * It extends `TypeError` because that is what it always was: the refusal gained
200
+ * a name, a `code` and the session it is about, but a caller who was already
201
+ * catching a `TypeError` from a reader keeps working.
202
+ *
203
+ * `storedPreview` quotes at most 64 characters (`STORED_PREVIEW_LIMIT`, in
204
+ * `lib/storedPreview` — one cap, shared by every adapter that has to describe
205
+ * bytes it could not read) — enough to recognise a mangled encoding at a
206
+ * glance, never the conversation itself.
207
+ */
208
+ export class UnreadableEnvelopeError extends TypeError {
209
+ code = 'ERR_UNREADABLE_ENVELOPE';
210
+ /** The session those bytes were stored under, when the refuser knows it. */
211
+ sessionId;
212
+ /** A short, deliberately truncated rendering of what the store handed back. */
213
+ storedPreview;
214
+ constructor(stored, sessionId) {
215
+ const preview = stored instanceof StoredPreview ? stored.text : previewStored(stored);
216
+ super(`[hosting] ` +
217
+ (sessionId === undefined
218
+ ? `a stored session is present but unreadable`
219
+ : `session '${sessionId}' has a STORED conversation this runtime cannot read`) +
220
+ `. An unreadable stored conversation and an absent one are different facts, and ` +
221
+ `only one of them is safe to answer with a fresh start — so this refuses instead ` +
222
+ `of starting over on top of a conversation that exists. ` +
223
+ `What the store handed back looks like: ${preview}. ` +
224
+ `Only a short prefix is ever quoted here — the rest of those bytes is the ` +
225
+ `conversation. ` +
226
+ `Expected { format, data, savedAt } as written by toEnvelope() / toPausedEnvelope(). ` +
227
+ `A store that keeps its own encoding must decode back to that object before ` +
228
+ `handing it over.`);
229
+ this.name = 'UnreadableEnvelopeError';
230
+ if (sessionId !== undefined)
231
+ this.sessionId = sessionId;
232
+ this.storedPreview = preview;
233
+ }
234
+ /**
235
+ * The same refusal, naming the session — for a reader that knew the bytes
236
+ * were unreadable but not whose conversation they were.
237
+ *
238
+ * Returns a copy rather than mutating: an error already thrown past somebody
239
+ * is a fact about a moment, and editing it under them is how two stack traces
240
+ * end up disagreeing about what happened.
241
+ */
242
+ withSession(sessionId) {
243
+ if (this.sessionId !== undefined)
244
+ return this;
245
+ const named = new UnreadableEnvelopeError(new StoredPreview(this.storedPreview), sessionId);
246
+ named.cause = this;
247
+ return named;
248
+ }
249
+ }
170
250
  /**
171
251
  * Assert that a host can do something, and throw a corrective error naming the
172
252
  * adapter when it cannot.
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/hosting/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,IAAI,GAAG,iBAA0B,CAAC;IAC3C,6BAA6B;IACpB,QAAQ,CAAS;IAE1B,YAAY,QAAgB;QAC1B,KAAK,CACH,kBAAkB,QAAQ,sDAAsD;YAC9E,wFAAwF;YACxF,iDAAiD,CACpD,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,IAAI,GAAG,oBAA6B,CAAC;IAC9C,gDAAgD;IACvC,SAAS,CAAS;IAC3B,mEAAmE;IAC1D,WAAW,CAAU;IAE9B,YAAY,SAAiB,EAAE,WAAoB;QACjD,KAAK,CACH,sBAAsB,SAAS,+BAA+B;YAC5D,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,WAAW,I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