@medicine-wheel/narrative-engine 0.5.1 → 0.5.3

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,12 @@
2
2
 
3
3
  Beat sequencing, arc validation, cadence patterns, and timeline building for the Medicine Wheel Developer Suite.
4
4
 
5
+ > [!WARNING]
6
+ > **Experimental alpha.** Part of the Medicine Wheel Developer Suite, which is
7
+ > under active development. APIs change between patch versions and all packages
8
+ > move in lockstep — pin exact versions. See
9
+ > [ALPHA.md](https://github.com/jgwill/medicine-wheel/blob/main/ALPHA.md).
10
+
5
11
  ## Install
6
12
 
7
13
  ```bash
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Beat Authoring — how a narrative beat comes into being.
3
+ *
4
+ * The rest of this package reasons *about* beats (sequence, cadence, arc,
5
+ * timeline). This module is where a beat is *made*: drafted, validated
6
+ * against the wheel's laws, bound to its cycle, and telescoped into
7
+ * sub-beats when a single moment turns out to hold several.
8
+ *
9
+ * Authoring lives here rather than in a producer package because creation
10
+ * and validation must not be separable — a beat born outside the laws is a
11
+ * beat the engine will later have to reject. Producers (narrative-cluster,
12
+ * perception-layer, github-ceremony, session-reader, prompt-decomposition)
13
+ * emit `BeatDraft`s; this module is the single door they all pass through.
14
+ *
15
+ * Pure functions only. Persistence is the caller's concern — pass the
16
+ * returned beat to storage-provider, data-store, or the MW server.
17
+ */
18
+ import type { NarrativeBeat, BeatOrigin, MedicineWheelCycle, DirectionName } from '@medicine-wheel/ontology-core';
19
+ /**
20
+ * What a producer supplies. Everything the wheel can infer — act, timestamp,
21
+ * id — is optional, so a hand-authored draft stays short and a machine-derived
22
+ * one stays honest about its provenance.
23
+ */
24
+ export interface BeatDraft {
25
+ direction: DirectionName;
26
+ title: string;
27
+ description: string;
28
+ prose?: string;
29
+ ceremonies?: string[];
30
+ learnings?: string[];
31
+ relations_honored?: string[];
32
+ /** Defaults to the act the direction belongs to. */
33
+ act?: number;
34
+ /** Defaults to now. Supply it when replaying a witnessed stream. */
35
+ timestamp?: string;
36
+ /** Defaults to a generated id. */
37
+ id?: string;
38
+ cycle_id?: string;
39
+ parent_beat_id?: string;
40
+ origin?: BeatOrigin;
41
+ }
42
+ export interface BeatDraftViolation {
43
+ field: string;
44
+ message: string;
45
+ severity: 'error' | 'warning';
46
+ }
47
+ export interface BeatDraftValidation {
48
+ valid: boolean;
49
+ violations: BeatDraftViolation[];
50
+ }
51
+ export interface CreateBeatOptions {
52
+ /** Supplies the id when the draft omits one. Defaults to a timestamp+random id. */
53
+ idFactory?: (draft: BeatDraft) => string;
54
+ /** Fills `origin` when the draft omits it. */
55
+ defaultOrigin?: BeatOrigin;
56
+ /** Reject rather than repair a draft whose act contradicts its direction. Default false. */
57
+ strictAct?: boolean;
58
+ }
59
+ /** The sunwise order: East opens, South grows, West reflects, North integrates. */
60
+ export declare const ACT_FOR_DIRECTION: Record<DirectionName, number>;
61
+ /** The act a direction naturally belongs to. */
62
+ export declare function actForDirection(direction: DirectionName): number;
63
+ /**
64
+ * Check a draft before it becomes a beat.
65
+ *
66
+ * Errors block creation. Warnings are recorded but let the beat through —
67
+ * a beat with no learnings is thin, not invalid, and the wheel would rather
68
+ * hold a thin record than lose the moment.
69
+ */
70
+ export declare function validateBeatDraft(draft: BeatDraft): BeatDraftValidation;
71
+ /**
72
+ * Turn a draft into a beat.
73
+ *
74
+ * Throws when the draft carries errors — a beat that fails the wheel's laws
75
+ * should never reach storage, because every reader downstream trusts that
76
+ * anything persisted was checked here.
77
+ */
78
+ export declare function createBeat(draft: BeatDraft, options?: CreateBeatOptions): NarrativeBeat;
79
+ /** Create several beats in one pass, preserving draft order. */
80
+ export declare function createBeats(drafts: BeatDraft[], options?: CreateBeatOptions): NarrativeBeat[];
81
+ export interface TelescopeResult {
82
+ /** The parent, with `sub_beats` now naming its children. */
83
+ parent: NarrativeBeat;
84
+ /** The children, each carrying `parent_beat_id` and the parent's cycle. */
85
+ subBeats: NarrativeBeat[];
86
+ }
87
+ /**
88
+ * Telescope a beat into sub-beats.
89
+ *
90
+ * The same move as telescoping an action step in a structural tension chart:
91
+ * a moment that read as one turns out to hold several, and the finer grain
92
+ * is recorded without losing the coarser one. The parent stays — it is the
93
+ * lens through which the children are read.
94
+ *
95
+ * Children inherit the parent's cycle and, unless a draft says otherwise,
96
+ * the parent's direction.
97
+ */
98
+ export declare function telescopeBeat(parent: NarrativeBeat, subDrafts: BeatDraft[], options?: CreateBeatOptions): TelescopeResult;
99
+ /** Depth of a beat below its root, walking `parent_beat_id` through the given set. */
100
+ export declare function beatDepth(beat: NarrativeBeat, allBeats: NarrativeBeat[]): number;
101
+ /** The chain from a beat up to its root, root first. */
102
+ export declare function beatLineage(beat: NarrativeBeat, allBeats: NarrativeBeat[]): NarrativeBeat[];
103
+ /** Beats with no parent — the top-level arc, unflattened by telescoping. */
104
+ export declare function rootBeats(beats: NarrativeBeat[]): NarrativeBeat[];
105
+ /** Direct children of a beat. */
106
+ export declare function childBeats(parentId: string, beats: NarrativeBeat[]): NarrativeBeat[];
107
+ /**
108
+ * Bind a beat to a cycle on both sides of the relation.
109
+ *
110
+ * A one-sided link is how arcs go wrong: the cycle lists beats that no
111
+ * longer point back, or a beat claims a cycle that never counted it. Both
112
+ * records are returned updated, and it is the caller's job to persist both.
113
+ */
114
+ export declare function attachBeatToCycle(beat: NarrativeBeat, cycle: MedicineWheelCycle): {
115
+ beat: NarrativeBeat;
116
+ cycle: MedicineWheelCycle;
117
+ };
118
+ /**
119
+ * Beats belonging to a cycle.
120
+ *
121
+ * Membership is read from either side, because beats recorded before cycles
122
+ * were bound carry no `cycle_id` and are only reachable through the cycle's
123
+ * own list. Reading one side alone silently drops half the arc.
124
+ */
125
+ export declare function beatsInCycle(cycle: MedicineWheelCycle, beats: NarrativeBeat[]): NarrativeBeat[];
126
+ /**
127
+ * Beats that belong to no cycle at all — neither claiming one nor claimed.
128
+ *
129
+ * These are the wheel's orphans: real moments that no arc will ever read.
130
+ * Surfacing them is the first step to adopting them.
131
+ */
132
+ export declare function orphanBeats(beats: NarrativeBeat[], cycles: MedicineWheelCycle[]): NarrativeBeat[];
133
+ //# sourceMappingURL=beats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beats.d.ts","sourceRoot":"","sources":["../src/beats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,+BAA+B,CAAC;AAIvC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,aAAa,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC;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EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAEpF;AAID;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,kBAAkB,GACxB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAOpD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAG/F;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,aAAa,EAAE,CAGjG"}
package/dist/beats.js ADDED
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ACT_FOR_DIRECTION = void 0;
4
+ exports.actForDirection = actForDirection;
5
+ exports.validateBeatDraft = validateBeatDraft;
6
+ exports.createBeat = createBeat;
7
+ exports.createBeats = createBeats;
8
+ exports.telescopeBeat = telescopeBeat;
9
+ exports.beatDepth = beatDepth;
10
+ exports.beatLineage = beatLineage;
11
+ exports.rootBeats = rootBeats;
12
+ exports.childBeats = childBeats;
13
+ exports.attachBeatToCycle = attachBeatToCycle;
14
+ exports.beatsInCycle = beatsInCycle;
15
+ exports.orphanBeats = orphanBeats;
16
+ // ─── Direction ↔ Act ──────────────────────────────────────────────
17
+ /** The sunwise order: East opens, South grows, West reflects, North integrates. */
18
+ exports.ACT_FOR_DIRECTION = {
19
+ east: 1,
20
+ south: 2,
21
+ west: 3,
22
+ north: 4,
23
+ };
24
+ /** The act a direction naturally belongs to. */
25
+ function actForDirection(direction) {
26
+ return exports.ACT_FOR_DIRECTION[direction] ?? 1;
27
+ }
28
+ // ─── Validation ───────────────────────────────────────────────────
29
+ const DIRECTIONS = ['east', 'south', 'west', 'north'];
30
+ /**
31
+ * Check a draft before it becomes a beat.
32
+ *
33
+ * Errors block creation. Warnings are recorded but let the beat through —
34
+ * a beat with no learnings is thin, not invalid, and the wheel would rather
35
+ * hold a thin record than lose the moment.
36
+ */
37
+ function validateBeatDraft(draft) {
38
+ const violations = [];
39
+ if (!draft.direction || !DIRECTIONS.includes(draft.direction)) {
40
+ violations.push({
41
+ field: 'direction',
42
+ message: `direction must be one of ${DIRECTIONS.join(', ')}`,
43
+ severity: 'error',
44
+ });
45
+ }
46
+ if (!draft.title || draft.title.trim().length === 0) {
47
+ violations.push({ field: 'title', message: 'title is required', severity: 'error' });
48
+ }
49
+ if (!draft.description || draft.description.trim().length === 0) {
50
+ violations.push({
51
+ field: 'description',
52
+ message: 'description is required — a beat with no account of what happened cannot be read back',
53
+ severity: 'error',
54
+ });
55
+ }
56
+ if (draft.act !== undefined && (!Number.isInteger(draft.act) || draft.act < 1 || draft.act > 4)) {
57
+ violations.push({ field: 'act', message: 'act must be an integer between 1 and 4', severity: 'error' });
58
+ }
59
+ if (draft.timestamp !== undefined && Number.isNaN(Date.parse(draft.timestamp))) {
60
+ violations.push({ field: 'timestamp', message: 'timestamp must be an ISO-8601 string', severity: 'error' });
61
+ }
62
+ if (draft.act !== undefined &&
63
+ draft.direction &&
64
+ DIRECTIONS.includes(draft.direction) &&
65
+ draft.act !== actForDirection(draft.direction)) {
66
+ violations.push({
67
+ field: 'act',
68
+ message: `act ${draft.act} does not match the ${draft.direction} direction (act ${actForDirection(draft.direction)})`,
69
+ severity: 'warning',
70
+ });
71
+ }
72
+ if (!draft.learnings || draft.learnings.length === 0) {
73
+ violations.push({
74
+ field: 'learnings',
75
+ message: 'no learnings recorded — the beat carries events but no knowledge forward',
76
+ severity: 'warning',
77
+ });
78
+ }
79
+ if (!draft.relations_honored || draft.relations_honored.length === 0) {
80
+ violations.push({
81
+ field: 'relations_honored',
82
+ message: 'no relations honored — relational accountability is unrecorded for this beat',
83
+ severity: 'warning',
84
+ });
85
+ }
86
+ return {
87
+ valid: !violations.some(v => v.severity === 'error'),
88
+ violations,
89
+ };
90
+ }
91
+ // ─── Creation ─────────────────────────────────────────────────────
92
+ function defaultId(draft) {
93
+ const dir = draft.direction ?? 'beat';
94
+ return `beat:${dir}:${Date.now()}:${Math.random().toString(36).slice(2, 8)}`;
95
+ }
96
+ /**
97
+ * Turn a draft into a beat.
98
+ *
99
+ * Throws when the draft carries errors — a beat that fails the wheel's laws
100
+ * should never reach storage, because every reader downstream trusts that
101
+ * anything persisted was checked here.
102
+ */
103
+ function createBeat(draft, options = {}) {
104
+ const validation = validateBeatDraft(draft);
105
+ if (!validation.valid) {
106
+ const errors = validation.violations
107
+ .filter(v => v.severity === 'error')
108
+ .map(v => `${v.field}: ${v.message}`)
109
+ .join('; ');
110
+ throw new Error(`Invalid beat draft — ${errors}`);
111
+ }
112
+ const naturalAct = actForDirection(draft.direction);
113
+ if (options.strictAct && draft.act !== undefined && draft.act !== naturalAct) {
114
+ throw new Error(`Invalid beat draft — act ${draft.act} contradicts the ${draft.direction} direction (act ${naturalAct})`);
115
+ }
116
+ const origin = draft.origin ?? options.defaultOrigin;
117
+ const beat = {
118
+ id: draft.id ?? (options.idFactory ? options.idFactory(draft) : defaultId(draft)),
119
+ direction: draft.direction,
120
+ title: draft.title.trim(),
121
+ description: draft.description.trim(),
122
+ ceremonies: draft.ceremonies ?? [],
123
+ learnings: draft.learnings ?? [],
124
+ timestamp: draft.timestamp ?? new Date().toISOString(),
125
+ act: draft.act ?? naturalAct,
126
+ relations_honored: draft.relations_honored ?? [],
127
+ };
128
+ if (draft.prose !== undefined)
129
+ beat.prose = draft.prose;
130
+ if (draft.cycle_id !== undefined)
131
+ beat.cycle_id = draft.cycle_id;
132
+ if (draft.parent_beat_id !== undefined)
133
+ beat.parent_beat_id = draft.parent_beat_id;
134
+ if (origin !== undefined)
135
+ beat.origin = origin;
136
+ return beat;
137
+ }
138
+ /** Create several beats in one pass, preserving draft order. */
139
+ function createBeats(drafts, options = {}) {
140
+ return drafts.map(draft => createBeat(draft, options));
141
+ }
142
+ /**
143
+ * Telescope a beat into sub-beats.
144
+ *
145
+ * The same move as telescoping an action step in a structural tension chart:
146
+ * a moment that read as one turns out to hold several, and the finer grain
147
+ * is recorded without losing the coarser one. The parent stays — it is the
148
+ * lens through which the children are read.
149
+ *
150
+ * Children inherit the parent's cycle and, unless a draft says otherwise,
151
+ * the parent's direction.
152
+ */
153
+ function telescopeBeat(parent, subDrafts, options = {}) {
154
+ if (subDrafts.length === 0) {
155
+ throw new Error('Cannot telescope a beat into zero sub-beats — supply at least one draft');
156
+ }
157
+ const subBeats = subDrafts.map(draft => createBeat({
158
+ ...draft,
159
+ direction: draft.direction ?? parent.direction,
160
+ parent_beat_id: parent.id,
161
+ cycle_id: draft.cycle_id ?? parent.cycle_id,
162
+ }, options));
163
+ const parentWithChildren = {
164
+ ...parent,
165
+ sub_beats: [...(parent.sub_beats ?? []), ...subBeats.map(b => b.id)],
166
+ };
167
+ return { parent: parentWithChildren, subBeats };
168
+ }
169
+ /** Depth of a beat below its root, walking `parent_beat_id` through the given set. */
170
+ function beatDepth(beat, allBeats) {
171
+ const byId = new Map(allBeats.map(b => [b.id, b]));
172
+ let depth = 0;
173
+ let current = beat;
174
+ const seen = new Set([beat.id]);
175
+ while (current.parent_beat_id) {
176
+ const parent = byId.get(current.parent_beat_id);
177
+ if (!parent || seen.has(parent.id))
178
+ break;
179
+ seen.add(parent.id);
180
+ current = parent;
181
+ depth += 1;
182
+ }
183
+ return depth;
184
+ }
185
+ /** The chain from a beat up to its root, root first. */
186
+ function beatLineage(beat, allBeats) {
187
+ const byId = new Map(allBeats.map(b => [b.id, b]));
188
+ const chain = [beat];
189
+ const seen = new Set([beat.id]);
190
+ let current = beat;
191
+ while (current.parent_beat_id) {
192
+ const parent = byId.get(current.parent_beat_id);
193
+ if (!parent || seen.has(parent.id))
194
+ break;
195
+ seen.add(parent.id);
196
+ chain.unshift(parent);
197
+ current = parent;
198
+ }
199
+ return chain;
200
+ }
201
+ /** Beats with no parent — the top-level arc, unflattened by telescoping. */
202
+ function rootBeats(beats) {
203
+ return beats.filter(b => !b.parent_beat_id);
204
+ }
205
+ /** Direct children of a beat. */
206
+ function childBeats(parentId, beats) {
207
+ return beats.filter(b => b.parent_beat_id === parentId);
208
+ }
209
+ // ─── Cycle membership ─────────────────────────────────────────────
210
+ /**
211
+ * Bind a beat to a cycle on both sides of the relation.
212
+ *
213
+ * A one-sided link is how arcs go wrong: the cycle lists beats that no
214
+ * longer point back, or a beat claims a cycle that never counted it. Both
215
+ * records are returned updated, and it is the caller's job to persist both.
216
+ */
217
+ function attachBeatToCycle(beat, cycle) {
218
+ const alreadyListed = cycle.beats.includes(beat.id);
219
+ return {
220
+ beat: { ...beat, cycle_id: cycle.id },
221
+ cycle: alreadyListed ? cycle : { ...cycle, beats: [...cycle.beats, beat.id] },
222
+ };
223
+ }
224
+ /**
225
+ * Beats belonging to a cycle.
226
+ *
227
+ * Membership is read from either side, because beats recorded before cycles
228
+ * were bound carry no `cycle_id` and are only reachable through the cycle's
229
+ * own list. Reading one side alone silently drops half the arc.
230
+ */
231
+ function beatsInCycle(cycle, beats) {
232
+ const listed = new Set(cycle.beats);
233
+ return beats.filter(b => b.cycle_id === cycle.id || listed.has(b.id));
234
+ }
235
+ /**
236
+ * Beats that belong to no cycle at all — neither claiming one nor claimed.
237
+ *
238
+ * These are the wheel's orphans: real moments that no arc will ever read.
239
+ * Surfacing them is the first step to adopting them.
240
+ */
241
+ function orphanBeats(beats, cycles) {
242
+ const claimed = new Set(cycles.flatMap(c => c.beats));
243
+ return beats.filter(b => !b.cycle_id && !claimed.has(b.id));
244
+ }
245
+ //# sourceMappingURL=beats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beats.js","sourceRoot":"","sources":["../src/beats.ts"],"names":[],"mappings":";;;AAiFA,0CAEC;AAaD,8CAgEC;AAgBD,gCAuCC;AAGD,kCAEC;AAsBD,sCA2BC;AAGD,8BAeC;AAGD,kCAeC;AAG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C,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,EAAE,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAsB,EAAE,MAA4B;IAC9E,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@
5
5
  * building for the Medicine Wheel Developer Suite.
6
6
  */
7
7
  export type { BeatPosition, BeatInsertResult, SequencerOptions, CadencePhase, CadencePattern, CadencePhaseRule, CadenceValidation, CadenceViolation, ArcCompleteness, ArcViolation, ArcValidationResult, TimelineAxis, TimelineEntry, TimelineData, TimelineGroup, TimelineOptions, CycleTransition, CycleProgress, EpistemicDepth, NarrativeTransformation, } from './types.js';
8
+ export type { BeatDraft, BeatDraftViolation, BeatDraftValidation, CreateBeatOptions, TelescopeResult, } from './beats.js';
9
+ export { ACT_FOR_DIRECTION, actForDirection, validateBeatDraft, createBeat, createBeats, telescopeBeat, beatDepth, beatLineage, rootBeats, childBeats, attachBeatToCycle, beatsInCycle, orphanBeats, } from './beats.js';
8
10
  export { sequenceBeats, insertBeat, beatsByDirection, nextDirection, currentAct, suggestNextBeat, spiralOrder, detectEpistemicDeepening, findTransformationPoints, } from './sequencer.js';
9
11
  export { STANDARD_CADENCE, LIGHT_CADENCE, currentPhase, directionToPhase, phaseToDirection, validateCadence, detectTransitions, } from './cadence.js';
10
12
  export { computeCompleteness, validateArc, isArcComplete, } from './arc.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,aAAa,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,QAAQ,GACT,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,aAAa,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,QAAQ,GACT,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -6,7 +6,21 @@
6
6
  * building for the Medicine Wheel Developer Suite.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.describeSun = exports.getCeremonyPhaseFraming = exports.generateDirectionObservation = exports.generateReciprocityObservation = exports.generateProvenanceNarrative = exports.updateCycleMetadata = exports.createCycle = exports.computeProgress = exports.extractTransitions = exports.actStrip = exports.buildTimeline = exports.isArcComplete = exports.validateArc = exports.computeCompleteness = exports.detectTransitions = exports.validateCadence = exports.phaseToDirection = exports.directionToPhase = exports.currentPhase = exports.LIGHT_CADENCE = exports.STANDARD_CADENCE = exports.findTransformationPoints = exports.detectEpistemicDeepening = exports.spiralOrder = exports.suggestNextBeat = exports.currentAct = exports.nextDirection = exports.beatsByDirection = exports.insertBeat = exports.sequenceBeats = void 0;
9
+ exports.describeSun = exports.getCeremonyPhaseFraming = exports.generateDirectionObservation = exports.generateReciprocityObservation = exports.generateProvenanceNarrative = exports.updateCycleMetadata = exports.createCycle = exports.computeProgress = exports.extractTransitions = exports.actStrip = exports.buildTimeline = exports.isArcComplete = exports.validateArc = exports.computeCompleteness = exports.detectTransitions = exports.validateCadence = exports.phaseToDirection = exports.directionToPhase = exports.currentPhase = exports.LIGHT_CADENCE = exports.STANDARD_CADENCE = exports.findTransformationPoints = exports.detectEpistemicDeepening = exports.spiralOrder = exports.suggestNextBeat = exports.currentAct = exports.nextDirection = exports.beatsByDirection = exports.insertBeat = exports.sequenceBeats = exports.orphanBeats = exports.beatsInCycle = exports.attachBeatToCycle = exports.childBeats = exports.rootBeats = exports.beatLineage = exports.beatDepth = exports.telescopeBeat = exports.createBeats = exports.createBeat = exports.validateBeatDraft = exports.actForDirection = exports.ACT_FOR_DIRECTION = void 0;
10
+ var beats_js_1 = require("./beats.js");
11
+ Object.defineProperty(exports, "ACT_FOR_DIRECTION", { enumerable: true, get: function () { return beats_js_1.ACT_FOR_DIRECTION; } });
12
+ Object.defineProperty(exports, "actForDirection", { enumerable: true, get: function () { return beats_js_1.actForDirection; } });
13
+ Object.defineProperty(exports, "validateBeatDraft", { enumerable: true, get: function () { return beats_js_1.validateBeatDraft; } });
14
+ Object.defineProperty(exports, "createBeat", { enumerable: true, get: function () { return beats_js_1.createBeat; } });
15
+ Object.defineProperty(exports, "createBeats", { enumerable: true, get: function () { return beats_js_1.createBeats; } });
16
+ Object.defineProperty(exports, "telescopeBeat", { enumerable: true, get: function () { return beats_js_1.telescopeBeat; } });
17
+ Object.defineProperty(exports, "beatDepth", { enumerable: true, get: function () { return beats_js_1.beatDepth; } });
18
+ Object.defineProperty(exports, "beatLineage", { enumerable: true, get: function () { return beats_js_1.beatLineage; } });
19
+ Object.defineProperty(exports, "rootBeats", { enumerable: true, get: function () { return beats_js_1.rootBeats; } });
20
+ Object.defineProperty(exports, "childBeats", { enumerable: true, get: function () { return beats_js_1.childBeats; } });
21
+ Object.defineProperty(exports, "attachBeatToCycle", { enumerable: true, get: function () { return beats_js_1.attachBeatToCycle; } });
22
+ Object.defineProperty(exports, "beatsInCycle", { enumerable: true, get: function () { return beats_js_1.beatsInCycle; } });
23
+ Object.defineProperty(exports, "orphanBeats", { enumerable: true, get: function () { return beats_js_1.orphanBeats; } });
10
24
  // Sequencer
11
25
  var sequencer_js_1 = require("./sequencer.js");
12
26
  Object.defineProperty(exports, "sequenceBeats", { enumerable: true, get: function () { return sequencer_js_1.sequenceBeats; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA0BH,YAAY;AACZ,+CAUwB;AATtB,6GAAA,aAAa,OAAA;AACb,0GAAA,UAAU,OAAA;AACV,gHAAA,gBAAgB,OAAA;AAChB,6GAAA,aAAa,OAAA;AACb,0GAAA,UAAU,OAAA;AACV,+GAAA,eAAe,OAAA;AACf,2GAAA,WAAW,OAAA;AACX,wHAAA,wBAAwB,OAAA;AACxB,wHAAA,wBAAwB,OAAA;AAG1B,UAAU;AACV,2CAQsB;AAPpB,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,8GAAA,gBAAgB,OAAA;AAChB,6GAAA,eAAe,OAA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8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,8GAAA,gBAAgB,OAAA;AAChB,6GAAA,eAAe,OAAA;AACf,+GAAA,iBAAiB,OAAA;AAGnB,iBAAiB;AACjB,mCAIkB;AAHhB,6GAAA,mBAAmB,OAAA;AACnB,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AAGf,WAAW;AACX,6CAGuB;AAFrB,4GAAA,aAAa,OAAA;AACb,uGAAA,QAAQ,OAAA;AAGV,gBAAgB;AAChB,uCAKoB;AAJlB,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,uGAAA,WAAW,OAAA;AACX,+GAAA,mBAAmB,OAAA;AAGrB,4BAA4B;AAC5B,yDAM6B;AAL3B,gIAAA,2BAA2B,OAAA;AAC3B,mIAAA,8BAA8B,OAAA;AAC9B,iIAAA,4BAA4B,OAAA;AAC5B,4HAAA,uBAAuB,OAAA;AACvB,gHAAA,WAAW,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicine-wheel/narrative-engine",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Beat sequencing, arc validation, and ceremonial cadence engine for the Medicine Wheel Developer Suite",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,8 +32,13 @@
32
32
  ],
33
33
  "author": "jgwill",
34
34
  "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/jgwill/medicine-wheel.git",
38
+ "directory": "src/narrative-engine"
39
+ },
35
40
  "dependencies": {
36
- "@medicine-wheel/ontology-core": "^0.5.1"
41
+ "@medicine-wheel/ontology-core": "^0.5.3"
37
42
  },
38
43
  "devDependencies": {
39
44
  "typescript": "^5.7.0"