@mulmoclaude/mulmoscript-plugin 3.1.0 → 4.1.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/contract-BhN3yKJC.cjs +36 -0
- package/dist/contract-BhN3yKJC.cjs.map +1 -0
- package/dist/contract-CIt1ZAtt.js +19 -0
- package/dist/contract-CIt1ZAtt.js.map +1 -0
- package/dist/core/contract.d.ts +24 -0
- package/dist/core/contract.d.ts.map +1 -1
- package/dist/server/dispatch.d.ts.map +1 -1
- package/dist/server/ops.d.ts +1 -0
- package/dist/server/ops.d.ts.map +1 -1
- package/dist/server/types.d.ts +6 -1
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server.cjs +18 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +18 -2
- package/dist/server.js.map +1 -1
- package/dist/style.css +119 -19
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue/composables/useDeckEditor.d.ts +1 -0
- package/dist/vue/composables/useDeckEditor.d.ts.map +1 -1
- package/dist/vue/helpers.d.ts +2 -2
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/transport.d.ts +3 -0
- package/dist/vue/transport.d.ts.map +1 -1
- package/dist/vue/viewTypes.d.ts +1 -1
- package/dist/vue/viewTypes.d.ts.map +1 -1
- package/dist/vue.cjs +73 -14
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +73 -14
- package/dist/vue.js.map +1 -1
- package/package.json +4 -2
- package/dist/contract-DxKVCRQk.cjs +0 -13
- package/dist/contract-DxKVCRQk.cjs.map +0 -1
- package/dist/contract-vY0niHkh.js +0 -8
- package/dist/contract-vY0niHkh.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/core/contract.ts
|
|
2
|
+
/** Plugin pubsub event name the host publishes generation events on
|
|
3
|
+
* (full channel: `plugin:<scope>:generation`). */
|
|
4
|
+
var GENERATION_EVENT = "generation";
|
|
5
|
+
/** Plugin pubsub event name for "this script changed on disk"
|
|
6
|
+
* (full channel: `plugin:<scope>:scriptChanged`). */
|
|
7
|
+
var SCRIPT_CHANGED_EVENT = "scriptChanged";
|
|
8
|
+
/**
|
|
9
|
+
* Whether a View watching `watching` should reload because of `event`.
|
|
10
|
+
*
|
|
11
|
+
* A pure rule rather than a condition inside the subscriber, because the case that matters is
|
|
12
|
+
* the one that is invisible when it is wrong: a View acting on the echo of its own write
|
|
13
|
+
* rebuilds the element the caret is in, on every keystroke.
|
|
14
|
+
*/
|
|
15
|
+
var shouldReloadForScriptChange = (event, watching, ownOrigin) => watching !== "" && event.filePath === watching && event.origin !== ownOrigin;
|
|
16
|
+
//#endregion
|
|
17
|
+
Object.defineProperty(exports, "GENERATION_EVENT", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return GENERATION_EVENT;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "SCRIPT_CHANGED_EVENT", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return SCRIPT_CHANGED_EVENT;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "shouldReloadForScriptChange", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function() {
|
|
32
|
+
return shouldReloadForScriptChange;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=contract-BhN3yKJC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-BhN3yKJC.cjs","names":[],"sources":["../src/core/contract.ts"],"sourcesContent":["// Host-agnostic dispatch envelope for the presentMulmoScript View. The Vue\n// View is decoupled from any one host's REST surface: it calls\n// `useRuntime().dispatch({ kind, … })`, the host routes that to its\n// mulmoScript dispatch handler, and every response is an `{ ok: … }`\n// envelope so failures travel as data (no HTTP-status coupling, no\n// \"dispatch failed (500)\" prefixes in user-facing errors).\n//\n// Long-running generation (movie / PDF) is a single long-held dispatch that\n// resolves when the pipeline finishes; per-beat progress arrives on the\n// plugin pubsub channel (`GENERATION_EVENT`) instead of an SSE stream, which\n// also covers generations started elsewhere (background autoGenerateMovie,\n// another tab, the agent).\n\n/** One in-flight or per-beat generation notice, published on the plugin\n * pubsub `generation` channel and returned by the `pendingGenerations`\n * snapshot. Value strings mirror @mulmobridge/protocol's GENERATION_KINDS\n * so MulmoClaude's host bridge maps 1:1 without a lookup table. */\nexport interface MulmoScriptGenerationEvent {\n kind: \"beatImage\" | \"beatAudio\" | \"characterImage\" | \"movie\" | \"pdf\";\n /** Wire `stories/…` path of the script the generation belongs to. */\n filePath: string;\n /** beatIndex (as string) for beat*, character key for characterImage, \"\" for movie/pdf. */\n key: string;\n /** false = started, true = finished (reload the asset off disk). */\n done: boolean;\n /** Only set on done=true when the work failed. */\n error?: string;\n}\n\n/** Plugin pubsub event name the host publishes generation events on\n * (full channel: `plugin:<scope>:generation`). */\nexport const GENERATION_EVENT = \"generation\";\n\n/** Plugin pubsub event name for \"this script changed on disk\"\n * (full channel: `plugin:<scope>:scriptChanged`). */\nexport const SCRIPT_CHANGED_EVENT = \"scriptChanged\";\n\n/**\n * A script was written — by the agent, or by another View.\n *\n * `origin` is who wrote it. A View passes its own id on every write and ignores the echo of\n * its own: without that, a keystroke would round-trip through the server and reload the very\n * element the caret is in. An agent write carries no origin, so every View reloads.\n */\nexport interface MulmoScriptChangedEvent {\n filePath: string;\n origin?: string;\n}\n\n/**\n * Whether a View watching `watching` should reload because of `event`.\n *\n * A pure rule rather than a condition inside the subscriber, because the case that matters is\n * the one that is invisible when it is wrong: a View acting on the echo of its own write\n * rebuilds the element the caret is in, on every keystroke.\n */\nexport const shouldReloadForScriptChange = (event: MulmoScriptChangedEvent, watching: string, ownOrigin: string): boolean =>\n watching !== \"\" && event.filePath === watching && event.origin !== ownOrigin;\n\ninterface BeatRef {\n filePath: string;\n beatIndex: number;\n}\n\ninterface CharacterRef {\n filePath: string;\n key: string;\n}\n\n/** Session tag for hosts that surface per-session generation indicators\n * (MulmoClaude's sidebar). Optional everywhere; hosts without sessions\n * ignore it. */\ninterface SessionTag {\n chatSessionId?: string | undefined;\n}\n\nexport type MulmoScriptDispatchArgs =\n | ({ kind: \"save\" } & { filePath?: string; script?: unknown; filename?: string })\n | { kind: \"updateBeat\"; filePath: string; beatIndex: number; beat: unknown; origin?: string }\n | { kind: \"updateScript\"; filePath: string; script: unknown; origin?: string }\n | ({ kind: \"beatImage\" } & BeatRef)\n | ({ kind: \"beatAudio\" } & BeatRef)\n | ({ kind: \"beatMovie\" } & BeatRef)\n | ({ kind: \"renderBeat\" } & BeatRef & SessionTag & { force?: boolean })\n | ({ kind: \"generateBeatAudio\" } & BeatRef & SessionTag & { force?: boolean })\n | ({ kind: \"uploadBeatImage\" } & BeatRef & { imageData: string })\n | ({ kind: \"characterImage\" } & CharacterRef)\n | ({ kind: \"renderCharacter\" } & CharacterRef & SessionTag & { force?: boolean })\n | ({ kind: \"uploadCharacterImage\" } & CharacterRef & { imageData: string })\n | ({ kind: \"movieStatus\" } & { filePath: string })\n | ({ kind: \"pdfStatus\" } & { filePath: string })\n | ({ kind: \"generateMovie\" } & { filePath: string } & SessionTag)\n | ({ kind: \"generatePdf\" } & { filePath: string } & SessionTag)\n | { kind: \"pendingGenerations\"; filePath: string };\n\nexport type MulmoScriptDispatchKind = MulmoScriptDispatchArgs[\"kind\"];\n\n/** Failure half of every dispatch response. `code` mirrors the phase-1\n * outcome codes so a host can log/telemetry on it; the View only reads\n * `error`. */\nexport interface DispatchFailure {\n ok: false;\n code?: \"bad_request\" | \"not_found\" | \"server_error\";\n error: string;\n}\n\nexport type DispatchEnvelope<T> = ({ ok: true } & T) | DispatchFailure;\n\n/** Maps a dispatch `kind` to its success payload so the View's transport\n * can call `dispatch` without casts at every site. */\nexport interface MulmoScriptDispatchResult {\n save: { script: Record<string, unknown>; filePath: string; message: string };\n updateBeat: Record<string, never>;\n updateScript: Record<string, never>;\n beatImage: { image: string | null };\n beatAudio: { audio: string | null };\n beatMovie: { moviePath: string | null };\n renderBeat: { image: string };\n generateBeatAudio: { audio: string };\n uploadBeatImage: { image: string };\n characterImage: { image: string | null };\n renderCharacter: { image: string };\n uploadCharacterImage: { image: string };\n movieStatus: { moviePath: string | null };\n pdfStatus: { pdfPath: string | null };\n generateMovie: { moviePath: string };\n generatePdf: { pdfPath: string };\n pendingGenerations: { pending: MulmoScriptGenerationEvent[] };\n}\n"],"mappings":";;;AA+BA,IAAa,mBAAmB;;;AAIhC,IAAa,uBAAuB;;;;;;;;AAqBpC,IAAa,+BAA+B,OAAgC,UAAkB,cAC5F,aAAa,MAAM,MAAM,aAAa,YAAY,MAAM,WAAW"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/core/contract.ts
|
|
2
|
+
/** Plugin pubsub event name the host publishes generation events on
|
|
3
|
+
* (full channel: `plugin:<scope>:generation`). */
|
|
4
|
+
var GENERATION_EVENT = "generation";
|
|
5
|
+
/** Plugin pubsub event name for "this script changed on disk"
|
|
6
|
+
* (full channel: `plugin:<scope>:scriptChanged`). */
|
|
7
|
+
var SCRIPT_CHANGED_EVENT = "scriptChanged";
|
|
8
|
+
/**
|
|
9
|
+
* Whether a View watching `watching` should reload because of `event`.
|
|
10
|
+
*
|
|
11
|
+
* A pure rule rather than a condition inside the subscriber, because the case that matters is
|
|
12
|
+
* the one that is invisible when it is wrong: a View acting on the echo of its own write
|
|
13
|
+
* rebuilds the element the caret is in, on every keystroke.
|
|
14
|
+
*/
|
|
15
|
+
var shouldReloadForScriptChange = (event, watching, ownOrigin) => watching !== "" && event.filePath === watching && event.origin !== ownOrigin;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { SCRIPT_CHANGED_EVENT as n, shouldReloadForScriptChange as r, GENERATION_EVENT as t };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=contract-CIt1ZAtt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-CIt1ZAtt.js","names":[],"sources":["../src/core/contract.ts"],"sourcesContent":["// Host-agnostic dispatch envelope for the presentMulmoScript View. The Vue\n// View is decoupled from any one host's REST surface: it calls\n// `useRuntime().dispatch({ kind, … })`, the host routes that to its\n// mulmoScript dispatch handler, and every response is an `{ ok: … }`\n// envelope so failures travel as data (no HTTP-status coupling, no\n// \"dispatch failed (500)\" prefixes in user-facing errors).\n//\n// Long-running generation (movie / PDF) is a single long-held dispatch that\n// resolves when the pipeline finishes; per-beat progress arrives on the\n// plugin pubsub channel (`GENERATION_EVENT`) instead of an SSE stream, which\n// also covers generations started elsewhere (background autoGenerateMovie,\n// another tab, the agent).\n\n/** One in-flight or per-beat generation notice, published on the plugin\n * pubsub `generation` channel and returned by the `pendingGenerations`\n * snapshot. Value strings mirror @mulmobridge/protocol's GENERATION_KINDS\n * so MulmoClaude's host bridge maps 1:1 without a lookup table. */\nexport interface MulmoScriptGenerationEvent {\n kind: \"beatImage\" | \"beatAudio\" | \"characterImage\" | \"movie\" | \"pdf\";\n /** Wire `stories/…` path of the script the generation belongs to. */\n filePath: string;\n /** beatIndex (as string) for beat*, character key for characterImage, \"\" for movie/pdf. */\n key: string;\n /** false = started, true = finished (reload the asset off disk). */\n done: boolean;\n /** Only set on done=true when the work failed. */\n error?: string;\n}\n\n/** Plugin pubsub event name the host publishes generation events on\n * (full channel: `plugin:<scope>:generation`). */\nexport const GENERATION_EVENT = \"generation\";\n\n/** Plugin pubsub event name for \"this script changed on disk\"\n * (full channel: `plugin:<scope>:scriptChanged`). */\nexport const SCRIPT_CHANGED_EVENT = \"scriptChanged\";\n\n/**\n * A script was written — by the agent, or by another View.\n *\n * `origin` is who wrote it. A View passes its own id on every write and ignores the echo of\n * its own: without that, a keystroke would round-trip through the server and reload the very\n * element the caret is in. An agent write carries no origin, so every View reloads.\n */\nexport interface MulmoScriptChangedEvent {\n filePath: string;\n origin?: string;\n}\n\n/**\n * Whether a View watching `watching` should reload because of `event`.\n *\n * A pure rule rather than a condition inside the subscriber, because the case that matters is\n * the one that is invisible when it is wrong: a View acting on the echo of its own write\n * rebuilds the element the caret is in, on every keystroke.\n */\nexport const shouldReloadForScriptChange = (event: MulmoScriptChangedEvent, watching: string, ownOrigin: string): boolean =>\n watching !== \"\" && event.filePath === watching && event.origin !== ownOrigin;\n\ninterface BeatRef {\n filePath: string;\n beatIndex: number;\n}\n\ninterface CharacterRef {\n filePath: string;\n key: string;\n}\n\n/** Session tag for hosts that surface per-session generation indicators\n * (MulmoClaude's sidebar). Optional everywhere; hosts without sessions\n * ignore it. */\ninterface SessionTag {\n chatSessionId?: string | undefined;\n}\n\nexport type MulmoScriptDispatchArgs =\n | ({ kind: \"save\" } & { filePath?: string; script?: unknown; filename?: string })\n | { kind: \"updateBeat\"; filePath: string; beatIndex: number; beat: unknown; origin?: string }\n | { kind: \"updateScript\"; filePath: string; script: unknown; origin?: string }\n | ({ kind: \"beatImage\" } & BeatRef)\n | ({ kind: \"beatAudio\" } & BeatRef)\n | ({ kind: \"beatMovie\" } & BeatRef)\n | ({ kind: \"renderBeat\" } & BeatRef & SessionTag & { force?: boolean })\n | ({ kind: \"generateBeatAudio\" } & BeatRef & SessionTag & { force?: boolean })\n | ({ kind: \"uploadBeatImage\" } & BeatRef & { imageData: string })\n | ({ kind: \"characterImage\" } & CharacterRef)\n | ({ kind: \"renderCharacter\" } & CharacterRef & SessionTag & { force?: boolean })\n | ({ kind: \"uploadCharacterImage\" } & CharacterRef & { imageData: string })\n | ({ kind: \"movieStatus\" } & { filePath: string })\n | ({ kind: \"pdfStatus\" } & { filePath: string })\n | ({ kind: \"generateMovie\" } & { filePath: string } & SessionTag)\n | ({ kind: \"generatePdf\" } & { filePath: string } & SessionTag)\n | { kind: \"pendingGenerations\"; filePath: string };\n\nexport type MulmoScriptDispatchKind = MulmoScriptDispatchArgs[\"kind\"];\n\n/** Failure half of every dispatch response. `code` mirrors the phase-1\n * outcome codes so a host can log/telemetry on it; the View only reads\n * `error`. */\nexport interface DispatchFailure {\n ok: false;\n code?: \"bad_request\" | \"not_found\" | \"server_error\";\n error: string;\n}\n\nexport type DispatchEnvelope<T> = ({ ok: true } & T) | DispatchFailure;\n\n/** Maps a dispatch `kind` to its success payload so the View's transport\n * can call `dispatch` without casts at every site. */\nexport interface MulmoScriptDispatchResult {\n save: { script: Record<string, unknown>; filePath: string; message: string };\n updateBeat: Record<string, never>;\n updateScript: Record<string, never>;\n beatImage: { image: string | null };\n beatAudio: { audio: string | null };\n beatMovie: { moviePath: string | null };\n renderBeat: { image: string };\n generateBeatAudio: { audio: string };\n uploadBeatImage: { image: string };\n characterImage: { image: string | null };\n renderCharacter: { image: string };\n uploadCharacterImage: { image: string };\n movieStatus: { moviePath: string | null };\n pdfStatus: { pdfPath: string | null };\n generateMovie: { moviePath: string };\n generatePdf: { pdfPath: string };\n pendingGenerations: { pending: MulmoScriptGenerationEvent[] };\n}\n"],"mappings":";;;AA+BA,IAAa,mBAAmB;;;AAIhC,IAAa,uBAAuB;;;;;;;;AAqBpC,IAAa,+BAA+B,OAAgC,UAAkB,cAC5F,aAAa,MAAM,MAAM,aAAa,YAAY,MAAM,WAAW"}
|
package/dist/core/contract.d.ts
CHANGED
|
@@ -16,6 +16,28 @@ export interface MulmoScriptGenerationEvent {
|
|
|
16
16
|
/** Plugin pubsub event name the host publishes generation events on
|
|
17
17
|
* (full channel: `plugin:<scope>:generation`). */
|
|
18
18
|
export declare const GENERATION_EVENT = "generation";
|
|
19
|
+
/** Plugin pubsub event name for "this script changed on disk"
|
|
20
|
+
* (full channel: `plugin:<scope>:scriptChanged`). */
|
|
21
|
+
export declare const SCRIPT_CHANGED_EVENT = "scriptChanged";
|
|
22
|
+
/**
|
|
23
|
+
* A script was written — by the agent, or by another View.
|
|
24
|
+
*
|
|
25
|
+
* `origin` is who wrote it. A View passes its own id on every write and ignores the echo of
|
|
26
|
+
* its own: without that, a keystroke would round-trip through the server and reload the very
|
|
27
|
+
* element the caret is in. An agent write carries no origin, so every View reloads.
|
|
28
|
+
*/
|
|
29
|
+
export interface MulmoScriptChangedEvent {
|
|
30
|
+
filePath: string;
|
|
31
|
+
origin?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Whether a View watching `watching` should reload because of `event`.
|
|
35
|
+
*
|
|
36
|
+
* A pure rule rather than a condition inside the subscriber, because the case that matters is
|
|
37
|
+
* the one that is invisible when it is wrong: a View acting on the echo of its own write
|
|
38
|
+
* rebuilds the element the caret is in, on every keystroke.
|
|
39
|
+
*/
|
|
40
|
+
export declare const shouldReloadForScriptChange: (event: MulmoScriptChangedEvent, watching: string, ownOrigin: string) => boolean;
|
|
19
41
|
interface BeatRef {
|
|
20
42
|
filePath: string;
|
|
21
43
|
beatIndex: number;
|
|
@@ -41,10 +63,12 @@ export type MulmoScriptDispatchArgs = ({
|
|
|
41
63
|
filePath: string;
|
|
42
64
|
beatIndex: number;
|
|
43
65
|
beat: unknown;
|
|
66
|
+
origin?: string;
|
|
44
67
|
} | {
|
|
45
68
|
kind: "updateScript";
|
|
46
69
|
filePath: string;
|
|
47
70
|
script: unknown;
|
|
71
|
+
origin?: string;
|
|
48
72
|
} | ({
|
|
49
73
|
kind: "beatImage";
|
|
50
74
|
} & BeatRef) | ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/core/contract.ts"],"names":[],"mappings":"AAaA;;;oEAGoE;AACpE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;IACrE,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,2FAA2F;IAC3F,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,EAAE,OAAO,CAAC;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;m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C,aAAa,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,WAAW,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,kBAAkB,EAAE;QAAE,OAAO,EAAE,0BAA0B,EAAE,CAAA;KAAE,CAAC;CAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/server/dispatch.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAqElD,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,oBAAoB,GAAG,0BAA0B,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/server/dispatch.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAqElD,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,oBAAoB,GAAG,0BAA0B,CA2FtG"}
|
package/dist/server/ops.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare function createMulmoScriptServerOps(backend: MulmoScriptServerBac
|
|
|
50
50
|
context: StoryContext;
|
|
51
51
|
}) => Promise<OpResult<T>>, deps?: RunStoryOpDeps) => Promise<OpResult<T>>;
|
|
52
52
|
publishGeneration: (chatSessionId: string | undefined, kind: GenerationKind, filePath: string, key: string, finished: boolean, error?: string) => void;
|
|
53
|
+
publishScriptChanged: (filePath: string, origin?: string) => void;
|
|
53
54
|
pendingGenerations: (filePath: string) => MulmoScriptGenerationEvent[];
|
|
54
55
|
beatImageOp: (filePath: string, beatIndex: number) => Promise<OpResult<{
|
|
55
56
|
image: string | null;
|
package/dist/server/ops.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/server/ops.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,SAAS,EAAyB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAMnE,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EAExB,SAAS,EACT,QAAQ,EACR,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,KAAK,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;AAKzD,eAAO,MAAM,QAAQ,EAAG,OAAgB,CAAC;AACzC,eAAO,MAAM,QAAQ,EAAG,IAAa,CAAC;AAmBtC,wBAAsB,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,GAAG,SAAS,CAAC,CAa1H;AAGD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;AAEjF,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpF,YAAY,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;CACjG;AAED,MAAM,WAAW,iBAAiB,CAAC,CAA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,aAAa,MAAM,KAAG,OAAO,CAAC,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;uCAW9E,MAAM,OAAO,MAAM,aAAa,MAAM,KAAG,OAAO,CAAC,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;;;2CA6BzE,MAAM,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,KAAG,OAAO,CAAC,qBAAqB,CAAC;gCA0JxG,YAAY,mBAAmB,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,KAAG,OAAO,CAAC,mBAAmB,CAAC;gCAnHzF,MAAM,iBAAiB,MAAM,GAAG,SAAS,KAAG,OAAO,CAAC,QAAQ,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;8BA0ItF,MAAM,iBAAiB,MAAM,GAAG,SAAS,KAAG,OAAO,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;mDAzGnE,MAAM,gBAAgB,MAAM,iBAAiB,MAAM,GAAG,SAAS,KAAG,IAAI;EA2K7H;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MinimalLogger } from "@mulmoclaude/common";
|
|
2
2
|
import type { FileOps } from "gui-chat-protocol";
|
|
3
|
-
import type { MulmoScriptGenerationEvent } from "../core/contract";
|
|
3
|
+
import type { MulmoScriptChangedEvent, MulmoScriptGenerationEvent } from "../core/contract";
|
|
4
4
|
export interface OpFailure {
|
|
5
5
|
ok: false;
|
|
6
6
|
/** REST adapter mapping: bad_request→400, not_found→404,
|
|
@@ -73,6 +73,11 @@ export interface MulmoScriptServerBackend {
|
|
|
73
73
|
* session. The package keeps the in-flight snapshot itself.
|
|
74
74
|
*/
|
|
75
75
|
onGenerationEvent?: (chatSessionId: string | undefined, event: MulmoScriptGenerationEvent) => void;
|
|
76
|
+
/**
|
|
77
|
+
* A script was written. Every open View reloads from disk, which is what makes an agent's
|
|
78
|
+
* edit appear without the user reopening the canvas.
|
|
79
|
+
*/
|
|
80
|
+
onScriptChanged?: (event: MulmoScriptChangedEvent) => void;
|
|
76
81
|
log?: MulmoScriptServerLog;
|
|
77
82
|
}
|
|
78
83
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE5F,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,KAAK,CAAC;IACV;6CACyC;IACzC,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;IACnE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,GAAG,CAAC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AMG;IACH,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnG;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC3D,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC5B"}
|
package/dist/server.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
24
|
const require_plugin = require("./plugin-BLp8tSYt.cjs");
|
|
25
|
-
const require_contract = require("./contract-
|
|
25
|
+
const require_contract = require("./contract-BhN3yKJC.cjs");
|
|
26
26
|
let fs = require("fs");
|
|
27
27
|
let path = require("path");
|
|
28
28
|
path = __toESM(path, 1);
|
|
@@ -319,6 +319,19 @@ function createMulmoScriptServerOps(backend) {
|
|
|
319
319
|
};
|
|
320
320
|
backend.onGenerationEvent?.(chatSessionId, event);
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Tell every open View that this script was written.
|
|
324
|
+
*
|
|
325
|
+
* `origin` is the writer. A View passes its own id so it can ignore the echo of its own
|
|
326
|
+
* save — reloading there would rebuild the element the caret is in, mid-keystroke. A write
|
|
327
|
+
* from the agent carries no origin, so everyone reloads.
|
|
328
|
+
*/
|
|
329
|
+
function publishScriptChanged(filePath, origin) {
|
|
330
|
+
backend.onScriptChanged?.({
|
|
331
|
+
filePath: canonicalWirePath(filePath),
|
|
332
|
+
...origin === void 0 ? {} : { origin }
|
|
333
|
+
});
|
|
334
|
+
}
|
|
322
335
|
/** Snapshot of generations currently in flight for one script — the
|
|
323
336
|
* View's mount-time catch-up, filtered to its wire `filePath`. */
|
|
324
337
|
function pendingGenerations(filePath) {
|
|
@@ -766,6 +779,7 @@ function createMulmoScriptServerOps(backend) {
|
|
|
766
779
|
ffmpegGuard,
|
|
767
780
|
runStoryOp,
|
|
768
781
|
publishGeneration,
|
|
782
|
+
publishScriptChanged,
|
|
769
783
|
pendingGenerations,
|
|
770
784
|
beatImageOp,
|
|
771
785
|
beatAudioOp,
|
|
@@ -882,7 +896,9 @@ function createMulmoScriptDispatchHandler(ops) {
|
|
|
882
896
|
const guard = ops.guardStoryWirePath(args.filePath);
|
|
883
897
|
if (guard) return fromOpFailure(guard);
|
|
884
898
|
const outcome = kind === "updateBeat" ? await require_plugin.executeUpdateBeat(executeContext, args) : await require_plugin.executeUpdateScript(executeContext, args);
|
|
885
|
-
|
|
899
|
+
if (!outcome.ok) return fromPackageFailure(outcome);
|
|
900
|
+
ops.publishScriptChanged(str(args.filePath) ?? "", str(args.origin));
|
|
901
|
+
return { ok: true };
|
|
886
902
|
}
|
|
887
903
|
const STATUS_OPS = {
|
|
888
904
|
movieStatus: ops.movieStatusOp,
|