@medicine-wheel/narrative-cluster 0.12.0 → 0.13.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.
- package/dist/clusters.d.ts +1 -1
- package/dist/clusters.d.ts.map +1 -1
- package/dist/clusters.js +13 -6
- package/dist/clusters.js.map +1 -1
- package/package.json +2 -2
package/dist/clusters.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Input is the minimal `ClusterableEvent` shape, so any source (transcript,
|
|
7
7
|
* rushes, notes) flows through without a hard dependency on perception-layer.
|
|
8
8
|
*/
|
|
9
|
-
import type
|
|
9
|
+
import { type NarrativeBeat, type DirectionName } from '@medicine-wheel/ontology-core';
|
|
10
10
|
export type ClusterKind = 'shot-sequence' | 'sound-environment' | 'relational-moment';
|
|
11
11
|
/** The minimal input shape — decoupled from any specific producer. */
|
|
12
12
|
export interface ClusterableEvent {
|
package/dist/clusters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clusters.d.ts","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"clusters.d.ts","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEvG,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEtF,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;IACzB,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AA6BD,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAsB5E;AAED,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,aAAa,EAAE,CAiB7E"}
|
package/dist/clusters.js
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.clusterEvents = clusterEvents;
|
|
4
4
|
exports.clustersToBeats = clustersToBeats;
|
|
5
|
+
/**
|
|
6
|
+
* @medicine-wheel/narrative-cluster — Clusters
|
|
7
|
+
*
|
|
8
|
+
* The Narrative Cluster Processor as a reusable method: group witnessed events
|
|
9
|
+
* into cinematic clusters and turn them into direction-aligned NarrativeBeats.
|
|
10
|
+
* Input is the minimal `ClusterableEvent` shape, so any source (transcript,
|
|
11
|
+
* rushes, notes) flows through without a hard dependency on perception-layer.
|
|
12
|
+
*/
|
|
13
|
+
const ontology_core_1 = require("@medicine-wheel/ontology-core");
|
|
5
14
|
const KIND_FOR_EVENT = {
|
|
6
15
|
'shot-composition': 'shot-sequence',
|
|
7
16
|
'ambient-sound': 'sound-environment',
|
|
@@ -20,12 +29,10 @@ const THEME_FOR_KIND = {
|
|
|
20
29
|
'relational-moment': 'Relational moments — knowledge from relationship',
|
|
21
30
|
};
|
|
22
31
|
const CLUSTER_ORDER = ['shot-sequence', 'sound-environment', 'relational-moment'];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
north: 4,
|
|
28
|
-
};
|
|
32
|
+
// The direction→act table is the ontology's, not this package's. A third local
|
|
33
|
+
// copy lived here until 2026-09-13; see narrative-engine/beats.ts for why one
|
|
34
|
+
// clock is kept.
|
|
35
|
+
const ACT_FOR_DIRECTION = ontology_core_1.DIRECTION_ACTS;
|
|
29
36
|
/** Group events into cinematic clusters, preserving stream order within each. */
|
|
30
37
|
function clusterEvents(events) {
|
|
31
38
|
const buckets = new Map();
|
package/dist/clusters.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clusters.js","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"clusters.js","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":";;AAyDA,sCAsBC;AAGD,0CAiBC;AAnGD;;;;;;;GAOG;AACH,iEAAuG;AAqBvG,MAAM,cAAc,GAAgC;IAClD,kBAAkB,EAAE,eAAe;IACnC,eAAe,EAAE,mBAAmB;IACpC,mBAAmB,EAAE,mBAAmB;IACxC,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,mBAAmB;CAC1C,CAAC;AAEF,MAAM,kBAAkB,GAAuC;IAC7D,eAAe,EAAE,MAAM,EAAE,wBAAwB;IACjD,mBAAmB,EAAE,OAAO,EAAE,2BAA2B;IACzD,mBAAmB,EAAE,MAAM,EAAE,4BAA4B;CAC1D,CAAC;AAEF,MAAM,cAAc,GAAgC;IAClD,eAAe,EAAE,6CAA6C;IAC9D,mBAAmB,EAAE,4CAA4C;IACjE,mBAAmB,EAAE,kDAAkD;CACxE,CAAC;AAEF,MAAM,aAAa,GAAkB,CAAC,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;AAEjG,+EAA+E;AAC/E,8EAA8E;AAC9E,iBAAiB;AACjB,MAAM,iBAAiB,GAAkC,8BAAc,CAAC;AAExE,iFAAiF;AACjF,SAAgB,aAAa,CAAC,MAA0B;IACtD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC3D,KAAK,MAAM,EAAE,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,cAAc,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E,CAAC,CAAC;aACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,IAAI,CAAC,GAAG,CAAC;QACZ,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,GAAG;QACd,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;QACnC,iBAAiB,EAAE,EAAE;KACtB,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicine-wheel/narrative-cluster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Narrative Cluster Processor — turn witnessed perceptual events / rushes into thematic clusters, narrative beats, and a Film Edit Brief (EDL markers)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"directory": "src/narrative-cluster"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@medicine-wheel/ontology-core": "^0.
|
|
42
|
+
"@medicine-wheel/ontology-core": "^0.13.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.7.0"
|