@miadi/episodic-memory-schema 0.10.0 → 0.11.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.
package/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Types + JSON Schema for **episodic memory** — the durable session-to-session memory layer in the Miadi orchestration kit.
4
4
 
5
+ In the Miadi stack, this is the shared record format. An episode is the unit everything is
6
+ filed under, and this package defines its shapes: the authored `EpisodicMemory` a session
7
+ leaves behind, and the read-only observations, manifests and catalogs other packages build
8
+ from existing episode folders. It has no dependencies and touches no filesystem: callers read
9
+ the files and hand it what they read.
10
+
11
+ Most of the stack depends on it: `@miadi/inquiry-weave`, `passages`, `@miadi/capture`,
12
+ `@miadi/episode-capture`, `@miadi/transcription`, `@miadi/plan-insight` and
13
+ `@miadi/musical-composition-to-episode`.
14
+
5
15
  When a Storyweaver session closes, the Export Steward extracts an episodic-memory object and feeds it back to Miadi world memory. The next commission inherits what this one built.
6
16
 
7
17
  ---
@@ -35,7 +45,7 @@ EpisodicMemory
35
45
 
36
46
  ### Narrative layer is NCP-aligned
37
47
 
38
- The `narrative` layer mirrors the [Narrative Context Protocol](https://github.com/) two-layer model:
48
+ The `narrative` layer mirrors the Narrative Context Protocol (NCP) two-layer model:
39
49
 
40
50
  - **Subtext** — authorial intent: perspectives, players, storypoints, storybeats, dynamics
41
51
  - **Storytelling** — surface presentation: overviews, moments
@@ -52,7 +62,7 @@ An NCP-consuming agent can read the narrative layer directly. Episodic-memory ad
52
62
  ## Install
53
63
 
54
64
  ```bash
55
- pnpm add @miadi/episodic-memory-schema
65
+ npm i @miadi/episodic-memory-schema
56
66
  ```
57
67
 
58
68
  ## Usage
@@ -158,12 +168,25 @@ modifies source material.
158
168
 
159
169
  ---
160
170
 
171
+ ## Also in this package
172
+
173
+ - **Chronicle and story-library manifests.** `observeChronicleManifest`,
174
+ `EpisodeManifestEntry`, `chronicleEpisodeNodeId`, `linkEpisodeCaptures`;
175
+ `observeStoryLibrary`, `StoryManifestEntry`, `indexStoriesByEpisode`, `linkStoryForms`. They
176
+ shape a snapshot of the chronicle, or of a library of stories made from episodes, that the
177
+ caller hands in.
178
+ - **Episode captures.** `EpisodeCaptureRecord` and its parts: the descriptor of a recording
179
+ filed into an episode. `CaptureProvenance` is the provenance a capture carries.
180
+ - **Attention items.** The `attention.json` store an episode keeps for questions waiting on a
181
+ person (`ATTENTION_FILE`, schema `chronicle.attention.v1`).
182
+ - **Reviews held by an episode.** `parseReviewRef`, `readEpisodeReviews`, `reviewNodeId` and
183
+ `EpisodeReviewEntry` type a Miadi review inside `episode.yaml` (`reviews:`), with its
184
+ `review:<uuid>` node id. Pure: no fs, no fetch.
185
+
161
186
  ## Versioning
162
187
 
163
- - v0.2.0 (current) — compatibility-first observation adapters for composition manifests, parsed episode YAML, and descriptor-light directory snapshots
164
- - v0.1.1 — strict authored episodic-memory types and JSON Schema
165
- - The package release is `0.2.0`; the authored memory schema remains `episodic-memory.v1.0`
166
- - Schema version is encoded in the `schemaVersion` field, independently of the package version
188
+ The package version and the authored memory schema version move independently. The schema is
189
+ `episodic-memory.v1.0`, carried in the `schemaVersion` field.
167
190
 
168
191
  ---
169
192
 
@@ -176,7 +199,7 @@ modifies source material.
176
199
  | W3C PROV-DM | Source / agent / activity attribution |
177
200
  | OAIS reference model + FAIR (Wilkinson 2016) | Archival packaging frame |
178
201
  | HAWK (Cheng et al. 2025, arXiv:2507.04067) | 10-predicate evaluation rubric; versioned chapter-state audit trail |
179
- | Storyweaver foundations (`foundations/narrative-studies-and-digital-storytelling/`) | Domain integration |
202
+ | Storyweaver foundations (narrative studies and digital storytelling) | Domain integration |
180
203
 
181
204
  ## License
182
205
 
@@ -0,0 +1,95 @@
1
+ /**
2
+ * The chronicle REVIEW contract — a Miadi review held by an episode.
3
+ *
4
+ * A review lives in the Miadi Review service and has one public address,
5
+ * `<base>/review/<uuid>`. Episode 345 (`review-medicine-wheel-experiment.md`)
6
+ * set the practice this module types: the review is one reusable node on the
7
+ * wheel (`review:<uuid>`), each episode relates to it with an edge naming the
8
+ * contribution it expects, and the episode keeps its own record of which
9
+ * version it used. Earlier manifests cite a review as a reference string
10
+ * `miadi-review:<uuid>`; those are read as reviews too.
11
+ *
12
+ * Manifest shape (`episode.yaml`):
13
+ *
14
+ * reviews:
15
+ * - id: 1e1ba57a-9e30-41ea-8126-5735c3f344bd
16
+ * url: https://miadi-review-service.vercel.app/review/1e1ba57a-…
17
+ * title: Software Fundamentals in the Age of AI — Matt Pocock
18
+ * version: 2
19
+ * relation: discusses
20
+ * added: '2026-09-24T10:30:00.000Z'
21
+ * ceremony: <ceremony id>
22
+ * circle: <circle node id>
23
+ *
24
+ * Pure — no fs, no fetch. Reading and writing the file is the consumer's.
25
+ * Ref: jgwill/Miadi#630.
26
+ */
27
+ /** Where reviews are published when nothing else is configured. */
28
+ export declare const REVIEW_SERVICE_BASE_URL = "https://miadi-review-service.vercel.app";
29
+ /** The portable reference form Episode 345 wrote into `references:`. */
30
+ export declare const REVIEW_REFERENCE_PREFIX = "miadi-review:";
31
+ /** Wheel node ids for reviews: `review:<uuid>` (Episode 345). */
32
+ export declare const REVIEW_NODE_PREFIX = "review:";
33
+ /** The wheel metadata kind a review node carries. */
34
+ export declare const REVIEW_NODE_KIND = "miadi_review";
35
+ export declare function isReviewId(value: unknown): value is string;
36
+ export declare function reviewNodeId(id: string): string;
37
+ export declare function reviewReference(id: string): string;
38
+ export declare function reviewPageUrl(id: string, base?: string): string;
39
+ export declare function reviewJsonUrl(id: string, base?: string, version?: number): string;
40
+ export interface ReviewRef {
41
+ /** The review UUID, lower-case. */
42
+ id: string;
43
+ /** The canonical public page, `<base>/review/<id>`. */
44
+ url: string;
45
+ /** The service origin the reference was read against. */
46
+ base: string;
47
+ /** Set when the reference pinned one version (`?v=N`). */
48
+ version?: number;
49
+ }
50
+ /**
51
+ * Read a review reference. Accepts the public page URL, its `/json` or `/raw`
52
+ * form, `?v=N`, `miadi-review:<uuid>`, `review:<uuid>`, or a bare uuid. A URL
53
+ * is accepted only on the configured service origin, so a caller cannot make a
54
+ * server fetch an address of its choosing. Returns null for anything else.
55
+ */
56
+ export declare function parseReviewRef(input: unknown, options?: {
57
+ base?: string;
58
+ }): ReviewRef | null;
59
+ /** One review as an episode records it. */
60
+ export interface EpisodeReviewEntry {
61
+ /** The review UUID. */
62
+ id: string;
63
+ /** Canonical public page URL. */
64
+ url: string;
65
+ title?: string;
66
+ /** The review version this episode used. The review may have moved on since. */
67
+ version?: number;
68
+ /** The intended contribution, as the episode→review edge's relationship type. */
69
+ relation?: string;
70
+ /** ISO timestamp the review entered the episode. */
71
+ added?: string;
72
+ /** The ceremony held to discuss this review, once one opened. */
73
+ ceremony?: string;
74
+ /** The circle that ceremony was held in. */
75
+ circle?: string;
76
+ }
77
+ export interface ObservedEpisodeReview extends EpisodeReviewEntry {
78
+ /** `reviews` for a structured entry, `references` for an Episode 345 `miadi-review:<uuid>` citation. */
79
+ declared: "reviews" | "references";
80
+ }
81
+ /** The entry's keys in the order the manifest writes them. */
82
+ export declare const REVIEW_ENTRY_KEYS: readonly ["id", "url", "title", "version", "relation", "added", "ceremony", "circle"];
83
+ /** Tolerant reader for one `reviews:` item. Null when it names no review. */
84
+ export declare function toEpisodeReviewEntry(raw: unknown, options?: {
85
+ base?: string;
86
+ }): EpisodeReviewEntry | null;
87
+ /**
88
+ * Every review a parsed `episode.yaml` holds: the structured `reviews:` list
89
+ * first, then `miadi-review:<uuid>` citations in `references:` that the list
90
+ * does not already name. One entry per review id.
91
+ */
92
+ export declare function readEpisodeReviews(manifest: unknown, options?: {
93
+ base?: string;
94
+ }): ObservedEpisodeReview[];
95
+ //# sourceMappingURL=episode-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"episode-review.d.ts","sourceRoot":"","sources":["../src/episode-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,mEAAmE;AACnE,eAAO,MAAM,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AoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,wGAAwG;IACxG,QAAQ,EAAE,SAAS,GAAG,YAAY,CAAA;CACnC;AAMD,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,uFAAwF,CAAA;AAEtH,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,kBAAkB,GAAG,IAAI,CAuB7G;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,qBAAqB,EAAE,CAmB9G"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * The chronicle REVIEW contract — a Miadi review held by an episode.
3
+ *
4
+ * A review lives in the Miadi Review service and has one public address,
5
+ * `<base>/review/<uuid>`. Episode 345 (`review-medicine-wheel-experiment.md`)
6
+ * set the practice this module types: the review is one reusable node on the
7
+ * wheel (`review:<uuid>`), each episode relates to it with an edge naming the
8
+ * contribution it expects, and the episode keeps its own record of which
9
+ * version it used. Earlier manifests cite a review as a reference string
10
+ * `miadi-review:<uuid>`; those are read as reviews too.
11
+ *
12
+ * Manifest shape (`episode.yaml`):
13
+ *
14
+ * reviews:
15
+ * - id: 1e1ba57a-9e30-41ea-8126-5735c3f344bd
16
+ * url: https://miadi-review-service.vercel.app/review/1e1ba57a-…
17
+ * title: Software Fundamentals in the Age of AI — Matt Pocock
18
+ * version: 2
19
+ * relation: discusses
20
+ * added: '2026-09-24T10:30:00.000Z'
21
+ * ceremony: <ceremony id>
22
+ * circle: <circle node id>
23
+ *
24
+ * Pure — no fs, no fetch. Reading and writing the file is the consumer's.
25
+ * Ref: jgwill/Miadi#630.
26
+ */
27
+ /** Where reviews are published when nothing else is configured. */
28
+ export const REVIEW_SERVICE_BASE_URL = "https://miadi-review-service.vercel.app";
29
+ /** The portable reference form Episode 345 wrote into `references:`. */
30
+ export const REVIEW_REFERENCE_PREFIX = "miadi-review:";
31
+ /** Wheel node ids for reviews: `review:<uuid>` (Episode 345). */
32
+ export const REVIEW_NODE_PREFIX = "review:";
33
+ /** The wheel metadata kind a review node carries. */
34
+ export const REVIEW_NODE_KIND = "miadi_review";
35
+ /** The same UUID rule the review service applies to `/review/<id>`. */
36
+ const REVIEW_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
37
+ export function isReviewId(value) {
38
+ return typeof value === "string" && REVIEW_ID.test(value);
39
+ }
40
+ export function reviewNodeId(id) {
41
+ return `${REVIEW_NODE_PREFIX}${id.toLowerCase()}`;
42
+ }
43
+ export function reviewReference(id) {
44
+ return `${REVIEW_REFERENCE_PREFIX}${id.toLowerCase()}`;
45
+ }
46
+ export function reviewPageUrl(id, base = REVIEW_SERVICE_BASE_URL) {
47
+ return `${base.replace(/\/+$/, "")}/review/${id.toLowerCase()}`;
48
+ }
49
+ export function reviewJsonUrl(id, base = REVIEW_SERVICE_BASE_URL, version) {
50
+ return `${reviewPageUrl(id, base)}/json${version !== undefined ? `?v=${version}` : ""}`;
51
+ }
52
+ /**
53
+ * Read a review reference. Accepts the public page URL, its `/json` or `/raw`
54
+ * form, `?v=N`, `miadi-review:<uuid>`, `review:<uuid>`, or a bare uuid. A URL
55
+ * is accepted only on the configured service origin, so a caller cannot make a
56
+ * server fetch an address of its choosing. Returns null for anything else.
57
+ */
58
+ export function parseReviewRef(input, options = {}) {
59
+ const base = (options.base ?? REVIEW_SERVICE_BASE_URL).replace(/\/+$/, "");
60
+ if (typeof input !== "string")
61
+ return null;
62
+ const raw = input.trim();
63
+ if (!raw)
64
+ return null;
65
+ for (const prefix of ["", REVIEW_REFERENCE_PREFIX, REVIEW_NODE_PREFIX]) {
66
+ if (raw.toLowerCase().startsWith(prefix) && isReviewId(raw.slice(prefix.length))) {
67
+ const id = raw.slice(prefix.length).toLowerCase();
68
+ return { id, url: reviewPageUrl(id, base), base };
69
+ }
70
+ }
71
+ let url;
72
+ let origin;
73
+ try {
74
+ url = new URL(raw);
75
+ origin = new URL(base).origin;
76
+ }
77
+ catch {
78
+ return null;
79
+ }
80
+ if (url.origin !== origin)
81
+ return null;
82
+ const match = /^\/review\/([^/]+)(?:\/(?:json|raw))?\/?$/.exec(url.pathname);
83
+ if (!match || !isReviewId(match[1]))
84
+ return null;
85
+ const id = match[1].toLowerCase();
86
+ const pinned = Number(url.searchParams.get("v"));
87
+ return {
88
+ id,
89
+ url: reviewPageUrl(id, base),
90
+ base,
91
+ ...(Number.isSafeInteger(pinned) && pinned > 0 ? { version: pinned } : {}),
92
+ };
93
+ }
94
+ function text(value) {
95
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
96
+ }
97
+ /** The entry's keys in the order the manifest writes them. */
98
+ export const REVIEW_ENTRY_KEYS = ["id", "url", "title", "version", "relation", "added", "ceremony", "circle"];
99
+ /** Tolerant reader for one `reviews:` item. Null when it names no review. */
100
+ export function toEpisodeReviewEntry(raw, options = {}) {
101
+ if (typeof raw === "string") {
102
+ const ref = parseReviewRef(raw, options);
103
+ return ref ? { id: ref.id, url: ref.url, ...(ref.version !== undefined ? { version: ref.version } : {}) } : null;
104
+ }
105
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw))
106
+ return null;
107
+ const r = raw;
108
+ const ref = parseReviewRef(text(r.id) ?? text(r.url), options);
109
+ if (!ref)
110
+ return null;
111
+ const version = typeof r.version === "number" && Number.isSafeInteger(r.version) && r.version > 0 ? r.version : ref.version;
112
+ const added = r.added instanceof Date ? r.added.toISOString() : text(r.added);
113
+ const entry = { id: ref.id, url: text(r.url) ?? ref.url };
114
+ const title = text(r.title);
115
+ if (title)
116
+ entry.title = title;
117
+ if (version !== undefined)
118
+ entry.version = version;
119
+ const relation = text(r.relation);
120
+ if (relation)
121
+ entry.relation = relation;
122
+ if (added)
123
+ entry.added = added;
124
+ const ceremony = text(r.ceremony);
125
+ if (ceremony)
126
+ entry.ceremony = ceremony;
127
+ const circle = text(r.circle);
128
+ if (circle)
129
+ entry.circle = circle;
130
+ return entry;
131
+ }
132
+ /**
133
+ * Every review a parsed `episode.yaml` holds: the structured `reviews:` list
134
+ * first, then `miadi-review:<uuid>` citations in `references:` that the list
135
+ * does not already name. One entry per review id.
136
+ */
137
+ export function readEpisodeReviews(manifest, options = {}) {
138
+ if (typeof manifest !== "object" || manifest === null)
139
+ return [];
140
+ const m = manifest;
141
+ const out = [];
142
+ const seen = new Set();
143
+ for (const item of Array.isArray(m.reviews) ? m.reviews : []) {
144
+ const entry = toEpisodeReviewEntry(item, options);
145
+ if (!entry || seen.has(entry.id))
146
+ continue;
147
+ seen.add(entry.id);
148
+ out.push({ ...entry, declared: "reviews" });
149
+ }
150
+ for (const reference of Array.isArray(m.references) ? m.references : []) {
151
+ if (typeof reference !== "string" || !reference.trim().toLowerCase().startsWith(REVIEW_REFERENCE_PREFIX))
152
+ continue;
153
+ const ref = parseReviewRef(reference, options);
154
+ if (!ref || seen.has(ref.id))
155
+ continue;
156
+ seen.add(ref.id);
157
+ out.push({ id: ref.id, url: ref.url, declared: "references" });
158
+ }
159
+ return out;
160
+ }
161
+ //# sourceMappingURL=episode-review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"episode-review.js","sourceRoot":"","sources":["../src/episode-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yCAAyC,CAAA;AAEhF,wEAAwE;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAA;AAEtD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,uBAAuB,CAAC;YAAE,SAAQ;QAClH,MAAM,GAAG,GAAG,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QAC9C,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAQ;QACtC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAChB,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAA;IAChE,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -26,4 +26,10 @@ export type { StableArtifactIdInput } from "./adapters/common.js";
26
26
  */
27
27
  export { ATTENTION_FILE, ATTENTION_SCHEMA_VERSION, toAttentionItem, parseAttentionStore, serializeAttentionStore, } from "./attention.js";
28
28
  export type { AttentionItem, AttentionStore, ParsedAttentionStore, } from "./attention.js";
29
+ /**
30
+ * The chronicle REVIEW contract — a Miadi review held by an episode, in the
31
+ * shape Episode 345 set (jgwill/Miadi#630).
32
+ */
33
+ export { REVIEW_SERVICE_BASE_URL, REVIEW_REFERENCE_PREFIX, REVIEW_NODE_PREFIX, REVIEW_NODE_KIND, REVIEW_ENTRY_KEYS, isReviewId, reviewNodeId, reviewReference, reviewPageUrl, reviewJsonUrl, parseReviewRef, toEpisodeReviewEntry, readEpisodeReviews, } from "./episode-review.js";
34
+ export type { ReviewRef, EpisodeReviewEntry, ObservedEpisodeReview } from "./episode-review.js";
29
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA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nB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAEjE;;;GAGG;AACH,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AAEvB;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA"}
package/dist/index.js CHANGED
@@ -24,4 +24,9 @@ export { stableArtifactId, tryStableArtifactId, isStableArtifactId, captureStabl
24
24
  * jgwill/Miadi#615). One owner for the shape every surface renders.
25
25
  */
26
26
  export { ATTENTION_FILE, ATTENTION_SCHEMA_VERSION, toAttentionItem, parseAttentionStore, serializeAttentionStore, } from "./attention.js";
27
+ /**
28
+ * The chronicle REVIEW contract — a Miadi review held by an episode, in the
29
+ * shape Episode 345 set (jgwill/Miadi#630).
30
+ */
31
+ export { REVIEW_SERVICE_BASE_URL, REVIEW_REFERENCE_PREFIX, REVIEW_NODE_PREFIX, REVIEW_NODE_KIND, REVIEW_ENTRY_KEYS, isReviewId, reviewNodeId, reviewReference, reviewPageUrl, reviewJsonUrl, parseReviewRef, toEpisodeReviewEntry, readEpisodeReviews, } from "./episode-review.js";
27
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"A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ACjB,MAAM,sBAAsB,CAAA;AAG7B;;;GAGG;AACH,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,gBAAgB,CAAA;AAOvB;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,qBAAqB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miadi/episodic-memory-schema",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "TypeScript types and JSON Schema for episodic memory — the durable session-to-session memory layer in the Miadi orchestration kit. Narrative layer is NCP-aligned; provenance layer is W3C PROV-DM and OAIS-informed.",
5
5
  "keywords": [
6
6
  "miadi",