@mulmoclaude/mulmoscript-plugin 0.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/core/contract.d.ts +162 -0
- package/dist/core/contract.d.ts.map +1 -0
- package/dist/core/definition.d.ts +4 -0
- package/dist/core/definition.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/paths.d.ts +21 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/plugin.d.ts +44 -0
- package/dist/core/plugin.d.ts.map +1 -0
- package/dist/core/types.d.ts +29 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/validate.d.ts +27 -0
- package/dist/core/validate.d.ts.map +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/lang/de.d.ts +4 -0
- package/dist/lang/de.d.ts.map +1 -0
- package/dist/lang/en.d.ts +4 -0
- package/dist/lang/en.d.ts.map +1 -0
- package/dist/lang/es.d.ts +4 -0
- package/dist/lang/es.d.ts.map +1 -0
- package/dist/lang/fr.d.ts +4 -0
- package/dist/lang/fr.d.ts.map +1 -0
- package/dist/lang/index.d.ts +9 -0
- package/dist/lang/index.d.ts.map +1 -0
- package/dist/lang/ja.d.ts +4 -0
- package/dist/lang/ja.d.ts.map +1 -0
- package/dist/lang/ko.d.ts +4 -0
- package/dist/lang/ko.d.ts.map +1 -0
- package/dist/lang/messages.d.ts +36 -0
- package/dist/lang/messages.d.ts.map +1 -0
- package/dist/lang/ptBR.d.ts +4 -0
- package/dist/lang/ptBR.d.ts.map +1 -0
- package/dist/lang/zh.d.ts +4 -0
- package/dist/lang/zh.d.ts.map +1 -0
- package/dist/plugin-CtKUt8DX.cjs +451 -0
- package/dist/plugin-CtKUt8DX.cjs.map +1 -0
- package/dist/plugin-W1ppnyhR.js +380 -0
- package/dist/plugin-W1ppnyhR.js.map +1 -0
- package/dist/style.css +1635 -0
- package/dist/vue/Preview.vue.d.ts +9 -0
- package/dist/vue/Preview.vue.d.ts.map +1 -0
- package/dist/vue/View.vue.d.ts +13 -0
- package/dist/vue/View.vue.d.ts.map +1 -0
- package/dist/vue/helpers.d.ts +67 -0
- package/dist/vue/helpers.d.ts.map +1 -0
- package/dist/vue/hostAdapter.d.ts +16 -0
- package/dist/vue/hostAdapter.d.ts.map +1 -0
- package/dist/vue/index.d.ts +18 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/support.d.ts +15 -0
- package/dist/vue/support.d.ts.map +1 -0
- package/dist/vue/transport.d.ts +20 -0
- package/dist/vue/transport.d.ts.map +1 -0
- package/dist/vue.cjs +1984 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.js +1971 -0
- package/dist/vue.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/** One in-flight or per-beat generation notice, published on the plugin
|
|
2
|
+
* pubsub `generation` channel and returned by the `pendingGenerations`
|
|
3
|
+
* snapshot. Value strings mirror @mulmobridge/protocol's GENERATION_KINDS
|
|
4
|
+
* so MulmoClaude's host bridge maps 1:1 without a lookup table. */
|
|
5
|
+
export interface MulmoScriptGenerationEvent {
|
|
6
|
+
kind: "beatImage" | "beatAudio" | "characterImage" | "movie" | "pdf";
|
|
7
|
+
/** Wire `stories/…` path of the script the generation belongs to. */
|
|
8
|
+
filePath: string;
|
|
9
|
+
/** beatIndex (as string) for beat*, character key for characterImage, "" for movie/pdf. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** false = started, true = finished (reload the asset off disk). */
|
|
12
|
+
done: boolean;
|
|
13
|
+
/** Only set on done=true when the work failed. */
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Plugin pubsub event name the host publishes generation events on
|
|
17
|
+
* (full channel: `plugin:<scope>:generation`). */
|
|
18
|
+
export declare const GENERATION_EVENT = "generation";
|
|
19
|
+
interface BeatRef {
|
|
20
|
+
filePath: string;
|
|
21
|
+
beatIndex: number;
|
|
22
|
+
}
|
|
23
|
+
interface CharacterRef {
|
|
24
|
+
filePath: string;
|
|
25
|
+
key: string;
|
|
26
|
+
}
|
|
27
|
+
/** Session tag for hosts that surface per-session generation indicators
|
|
28
|
+
* (MulmoClaude's sidebar). Optional everywhere; hosts without sessions
|
|
29
|
+
* ignore it. */
|
|
30
|
+
interface SessionTag {
|
|
31
|
+
chatSessionId?: string;
|
|
32
|
+
}
|
|
33
|
+
export type MulmoScriptDispatchArgs = ({
|
|
34
|
+
kind: "save";
|
|
35
|
+
} & {
|
|
36
|
+
filePath?: string;
|
|
37
|
+
script?: unknown;
|
|
38
|
+
filename?: string;
|
|
39
|
+
}) | {
|
|
40
|
+
kind: "updateBeat";
|
|
41
|
+
filePath: string;
|
|
42
|
+
beatIndex: number;
|
|
43
|
+
beat: unknown;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "updateScript";
|
|
46
|
+
filePath: string;
|
|
47
|
+
script: unknown;
|
|
48
|
+
} | ({
|
|
49
|
+
kind: "beatImage";
|
|
50
|
+
} & BeatRef) | ({
|
|
51
|
+
kind: "beatAudio";
|
|
52
|
+
} & BeatRef) | ({
|
|
53
|
+
kind: "beatMovie";
|
|
54
|
+
} & BeatRef) | ({
|
|
55
|
+
kind: "renderBeat";
|
|
56
|
+
} & BeatRef & SessionTag & {
|
|
57
|
+
force?: boolean;
|
|
58
|
+
}) | ({
|
|
59
|
+
kind: "generateBeatAudio";
|
|
60
|
+
} & BeatRef & SessionTag & {
|
|
61
|
+
force?: boolean;
|
|
62
|
+
}) | ({
|
|
63
|
+
kind: "uploadBeatImage";
|
|
64
|
+
} & BeatRef & {
|
|
65
|
+
imageData: string;
|
|
66
|
+
}) | ({
|
|
67
|
+
kind: "characterImage";
|
|
68
|
+
} & CharacterRef) | ({
|
|
69
|
+
kind: "renderCharacter";
|
|
70
|
+
} & CharacterRef & SessionTag & {
|
|
71
|
+
force?: boolean;
|
|
72
|
+
}) | ({
|
|
73
|
+
kind: "uploadCharacterImage";
|
|
74
|
+
} & CharacterRef & {
|
|
75
|
+
imageData: string;
|
|
76
|
+
}) | ({
|
|
77
|
+
kind: "movieStatus";
|
|
78
|
+
} & {
|
|
79
|
+
filePath: string;
|
|
80
|
+
}) | ({
|
|
81
|
+
kind: "pdfStatus";
|
|
82
|
+
} & {
|
|
83
|
+
filePath: string;
|
|
84
|
+
}) | ({
|
|
85
|
+
kind: "generateMovie";
|
|
86
|
+
} & {
|
|
87
|
+
filePath: string;
|
|
88
|
+
} & SessionTag) | ({
|
|
89
|
+
kind: "generatePdf";
|
|
90
|
+
} & {
|
|
91
|
+
filePath: string;
|
|
92
|
+
} & SessionTag) | {
|
|
93
|
+
kind: "pendingGenerations";
|
|
94
|
+
filePath: string;
|
|
95
|
+
};
|
|
96
|
+
export type MulmoScriptDispatchKind = MulmoScriptDispatchArgs["kind"];
|
|
97
|
+
/** Failure half of every dispatch response. `code` mirrors the phase-1
|
|
98
|
+
* outcome codes so a host can log/telemetry on it; the View only reads
|
|
99
|
+
* `error`. */
|
|
100
|
+
export interface DispatchFailure {
|
|
101
|
+
ok: false;
|
|
102
|
+
code?: "bad_request" | "not_found" | "server_error";
|
|
103
|
+
error: string;
|
|
104
|
+
}
|
|
105
|
+
export type DispatchEnvelope<T> = ({
|
|
106
|
+
ok: true;
|
|
107
|
+
} & T) | DispatchFailure;
|
|
108
|
+
/** Maps a dispatch `kind` to its success payload so the View's transport
|
|
109
|
+
* can call `dispatch` without casts at every site. */
|
|
110
|
+
export interface MulmoScriptDispatchResult {
|
|
111
|
+
save: {
|
|
112
|
+
script: Record<string, unknown>;
|
|
113
|
+
filePath: string;
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
updateBeat: Record<string, never>;
|
|
117
|
+
updateScript: Record<string, never>;
|
|
118
|
+
beatImage: {
|
|
119
|
+
image: string | null;
|
|
120
|
+
};
|
|
121
|
+
beatAudio: {
|
|
122
|
+
audio: string | null;
|
|
123
|
+
};
|
|
124
|
+
beatMovie: {
|
|
125
|
+
moviePath: string | null;
|
|
126
|
+
};
|
|
127
|
+
renderBeat: {
|
|
128
|
+
image: string;
|
|
129
|
+
};
|
|
130
|
+
generateBeatAudio: {
|
|
131
|
+
audio: string;
|
|
132
|
+
};
|
|
133
|
+
uploadBeatImage: {
|
|
134
|
+
image: string;
|
|
135
|
+
};
|
|
136
|
+
characterImage: {
|
|
137
|
+
image: string | null;
|
|
138
|
+
};
|
|
139
|
+
renderCharacter: {
|
|
140
|
+
image: string;
|
|
141
|
+
};
|
|
142
|
+
uploadCharacterImage: {
|
|
143
|
+
image: string;
|
|
144
|
+
};
|
|
145
|
+
movieStatus: {
|
|
146
|
+
moviePath: string | null;
|
|
147
|
+
};
|
|
148
|
+
pdfStatus: {
|
|
149
|
+
pdfPath: string | null;
|
|
150
|
+
};
|
|
151
|
+
generateMovie: {
|
|
152
|
+
moviePath: string;
|
|
153
|
+
};
|
|
154
|
+
generatePdf: {
|
|
155
|
+
pdfPath: string;
|
|
156
|
+
};
|
|
157
|
+
pendingGenerations: {
|
|
158
|
+
pending: MulmoScriptGenerationEvent[];
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export {};
|
|
162
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +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,C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EAAE,CAAA;KAAE,CAAC;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/core/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,SAAS,uBAAuB,CAAC;AAM9C,eAAO,MAAM,eAAe,EAAE,cAgH7B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { MulmoScriptData, MulmoScriptExecuteContext, SaveMulmoScriptArgs } from "./types";
|
|
2
|
+
export { TOOL_NAME, TOOL_DEFINITION } from "./definition";
|
|
3
|
+
export { executeMulmoScript, executeMulmoScriptSave, executeUpdateBeat, executeUpdateScript, pluginCore, type MulmoScriptFailure, type SaveMulmoScriptOutcome, type UpdateMulmoScriptOutcome, } from "./plugin";
|
|
4
|
+
export { normalizeStoryPath, slugify, storyFilePath } from "./paths";
|
|
5
|
+
export { validateUpdateBeatBody, validateUpdateScriptBody, type ValidationResult } from "./validate";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Lowercase-hyphen slug, capped at MAX_SLUG_LEN, with leading/trailing
|
|
2
|
+
* hyphens stripped. Falls back to `fallback` for empty/undefined/non-ASCII
|
|
3
|
+
* input. Mirrors html-plugin's in-package slugify — deliberately simpler
|
|
4
|
+
* than the host's hash-fallback variant; the timestamp suffix appended by
|
|
5
|
+
* `storyFilePath` keeps these throwaway filenames collision-free. */
|
|
6
|
+
export declare function slugify(title: string | undefined, fallback?: string): string;
|
|
7
|
+
/** Build a fresh, collision-safe story path for a new script —
|
|
8
|
+
* `stories/<slug>-<epoch-ms>.json`, valid as both the FileOps-relative
|
|
9
|
+
* write path and the wire `filePath`. */
|
|
10
|
+
export declare function storyFilePath(slugSource: string, now?: Date): string;
|
|
11
|
+
/**
|
|
12
|
+
* Normalize a caller-supplied wire path to the canonical
|
|
13
|
+
* `stories/<rel>` form, or null when it can't be trusted. Accepts both the
|
|
14
|
+
* canonical `stories/foo.json` convention and bare `foo.json` (the host route
|
|
15
|
+
* historically allowed either). Rejects absolute paths, backslashes, and any
|
|
16
|
+
* empty / `.` / `..` segment — the lexical guard before every
|
|
17
|
+
* `files.artifacts` read/write (FileOps re-checks containment as
|
|
18
|
+
* defence-in-depth).
|
|
19
|
+
*/
|
|
20
|
+
export declare function normalizeStoryPath(filePath: string): string | null;
|
|
21
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/core/paths.ts"],"names":[],"mappings":"AAaA;;;;sEAIsE;AACtE,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,SAAU,GAAG,MAAM,CAW7E;AAED;;0CAE0C;AAC1C,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,CAEhF;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASlE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ToolPluginCore, ToolResult } from "gui-chat-protocol";
|
|
2
|
+
import type { MulmoScriptData, MulmoScriptExecuteContext, SaveMulmoScriptArgs } from "./types";
|
|
3
|
+
/** Failure half of every outcome below. `code` preserves the hosts'
|
|
4
|
+
* HTTP contract (bad_request → 400, not_found → 404) without the package
|
|
5
|
+
* knowing anything about HTTP. */
|
|
6
|
+
export interface MulmoScriptFailure {
|
|
7
|
+
ok: false;
|
|
8
|
+
code: "bad_request" | "not_found";
|
|
9
|
+
error: string;
|
|
10
|
+
}
|
|
11
|
+
export type SaveMulmoScriptOutcome = ({
|
|
12
|
+
ok: true;
|
|
13
|
+
message: string;
|
|
14
|
+
} & MulmoScriptData) | MulmoScriptFailure;
|
|
15
|
+
export type UpdateMulmoScriptOutcome = {
|
|
16
|
+
ok: true;
|
|
17
|
+
} | MulmoScriptFailure;
|
|
18
|
+
/**
|
|
19
|
+
* Unified save-or-reopen for the presentMulmoScript tool call. `script`
|
|
20
|
+
* (create new) and `filePath` (existing) are mutually exclusive. Never
|
|
21
|
+
* throws on bad input — validation failures come back as discriminated
|
|
22
|
+
* failures so host routes stay thin adapters. `autoGenerateMovie` is NOT
|
|
23
|
+
* handled here: movie generation needs host backends (mulmocast/ffmpeg),
|
|
24
|
+
* so hosts that support it trigger it from the returned `filePath`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function executeMulmoScriptSave(context: MulmoScriptExecuteContext, args: SaveMulmoScriptArgs, now?: Date): Promise<SaveMulmoScriptOutcome>;
|
|
27
|
+
/** Overwrite one beat of an existing script (the View's per-beat source
|
|
28
|
+
* editor). Validates the body shape + beat schema, bounds-checks the index
|
|
29
|
+
* against the script on disk, and writes the whole file back. */
|
|
30
|
+
export declare function executeUpdateBeat(context: MulmoScriptExecuteContext, body: unknown): Promise<UpdateMulmoScriptOutcome>;
|
|
31
|
+
/** Overwrite the whole script (the View's full-source editor / deck-editor
|
|
32
|
+
* auto-save). The body's `script` is schema-validated by
|
|
33
|
+
* `validateUpdateScriptBody` before the write. */
|
|
34
|
+
export declare function executeUpdateScript(context: MulmoScriptExecuteContext, body: unknown): Promise<UpdateMulmoScriptOutcome>;
|
|
35
|
+
/** ToolResult-shaped wrapper over `executeMulmoScriptSave` for runtime hosts
|
|
36
|
+
* (e.g. MulmoTerminal's package loader), where the tool call resolves to a
|
|
37
|
+
* ToolResult rather than an HTTP response. Failures are narrate-only
|
|
38
|
+
* (message, no data) so the agent can self-correct. */
|
|
39
|
+
export declare function executeMulmoScript(context: MulmoScriptExecuteContext, args: SaveMulmoScriptArgs): Promise<ToolResult<MulmoScriptData>>;
|
|
40
|
+
/** Non-Vue plugin core for runtime hosts that register the package directly.
|
|
41
|
+
* MulmoClaude consumes only TOOL_DEFINITION + the execute functions in its
|
|
42
|
+
* own routes, so it doesn't use this. */
|
|
43
|
+
export declare const pluginCore: ToolPluginCore<MulmoScriptData, MulmoScriptData, SaveMulmoScriptArgs>;
|
|
44
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/core/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpE,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/F;;mCAEmC;AACnC,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,KAAK,CAAC;IACV,IAAI,EAAE,aAAa,GAAG,WAAW,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAAC,GAAG,kBAAkB,CAAC;AAE5G,MAAM,MAAM,wBAAwB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG,kBAAkB,CAAC;AAgEzE;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,yBAAyB,EAClC,IAAI,EAAE,mBAAmB,EACzB,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,sBAAsB,CAAC,CAYjC;AAYD;;kEAEkE;AAClE,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAoB5H;AAED;;mDAEmD;AACnD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAU9H;AAED;;;wDAGwD;AACxD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAmB5I;AAED;;0CAE0C;AAC1C,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,eAAe,EAAE,eAAe,EAAE,mBAAmB,CAK5F,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { FileOps } from "gui-chat-protocol";
|
|
2
|
+
import type { MulmoScript } from "@mulmocast/types";
|
|
3
|
+
/** Tool-call arguments for presentMulmoScript. `script` (create new) and
|
|
4
|
+
* `filePath` (reopen existing) are mutually exclusive — provide exactly one.
|
|
5
|
+
* `filename` only applies to the create path; `autoGenerateMovie` is handled
|
|
6
|
+
* by hosts that have a movie backend (the package core ignores it). */
|
|
7
|
+
export interface SaveMulmoScriptArgs {
|
|
8
|
+
script?: unknown;
|
|
9
|
+
filename?: string;
|
|
10
|
+
filePath?: string;
|
|
11
|
+
autoGenerateMovie?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Result payload that drives the View. `filePath` is the historical
|
|
14
|
+
* `stories/<name>.json` wire form every mulmoScript endpoint keys on. */
|
|
15
|
+
export interface MulmoScriptData {
|
|
16
|
+
script: MulmoScript;
|
|
17
|
+
filePath: string;
|
|
18
|
+
}
|
|
19
|
+
/** Host capabilities the phase-1 core needs, delivered through the GENERIC
|
|
20
|
+
* gui-chat-protocol runtime — only `files.artifacts` (the shared,
|
|
21
|
+
* user-browsable output area rooted at `<workspace>/artifacts`). Save /
|
|
22
|
+
* reopen / update logic lives entirely in this package; heavy render
|
|
23
|
+
* backends (mulmocast, ffmpeg) stay host-side until phase 3. */
|
|
24
|
+
export interface MulmoScriptExecuteContext {
|
|
25
|
+
files: {
|
|
26
|
+
artifacts: FileOps;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;wEAGwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;0EAC0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;iEAIiE;AACjE,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ValidationResult<T> = {
|
|
2
|
+
ok: true;
|
|
3
|
+
value: T;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
error: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Validate the `update-script` request body. Returns the parsed,
|
|
10
|
+
* schema-conformant script on success, or a human-readable error
|
|
11
|
+
* suitable for sending back as a 400 response.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateUpdateScriptBody(body: unknown): ValidationResult<{
|
|
14
|
+
filePath: string;
|
|
15
|
+
script: unknown;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Validate the `update-beat` request body. `beatIndex` is allowed
|
|
19
|
+
* to be any non-negative integer; the handler still bounds-checks
|
|
20
|
+
* against the actual script length after reading the file.
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateUpdateBeatBody(body: unknown): ValidationResult<{
|
|
23
|
+
filePath: string;
|
|
24
|
+
beatIndex: number;
|
|
25
|
+
beat: unknown;
|
|
26
|
+
}>;
|
|
27
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/core/validate.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAuBxF;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAqBD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC,CA4BD"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_plugin = require("./plugin-CtKUt8DX.cjs");
|
|
3
|
+
exports.TOOL_DEFINITION = require_plugin.TOOL_DEFINITION;
|
|
4
|
+
exports.TOOL_NAME = require_plugin.TOOL_NAME;
|
|
5
|
+
exports.executeMulmoScript = require_plugin.executeMulmoScript;
|
|
6
|
+
exports.executeMulmoScriptSave = require_plugin.executeMulmoScriptSave;
|
|
7
|
+
exports.executeUpdateBeat = require_plugin.executeUpdateBeat;
|
|
8
|
+
exports.executeUpdateScript = require_plugin.executeUpdateScript;
|
|
9
|
+
exports.normalizeStoryPath = require_plugin.normalizeStoryPath;
|
|
10
|
+
exports.pluginCore = require_plugin.pluginCore;
|
|
11
|
+
exports.slugify = require_plugin.slugify;
|
|
12
|
+
exports.storyFilePath = require_plugin.storyFilePath;
|
|
13
|
+
exports.validateUpdateBeatBody = require_plugin.validateUpdateBeatBody;
|
|
14
|
+
exports.validateUpdateScriptBody = require_plugin.validateUpdateScriptBody;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as pluginCore, c as normalizeStoryPath, d as TOOL_DEFINITION, f as TOOL_NAME, i as executeUpdateScript, l as slugify, n as executeMulmoScriptSave, o as validateUpdateBeatBody, r as executeUpdateBeat, s as validateUpdateScriptBody, t as executeMulmoScript, u as storyFilePath } from "./plugin-W1ppnyhR.js";
|
|
2
|
+
export { TOOL_DEFINITION, TOOL_NAME, executeMulmoScript, executeMulmoScriptSave, executeUpdateBeat, executeUpdateScript, normalizeStoryPath, pluginCore, slugify, storyFilePath, validateUpdateBeatBody, validateUpdateScriptBody };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/lang/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/lang/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/lang/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/lang/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
import type { Messages } from "./messages";
|
|
3
|
+
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
4
|
+
* own translations (no host i18n dependency); it reads the locale off the
|
|
5
|
+
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
6
|
+
* Same pattern as @mulmoclaude/html-plugin. */
|
|
7
|
+
export declare function useT(): ComputedRef<Messages>;
|
|
8
|
+
export type { Messages };
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lang/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,EAAY,MAAM,KAAK,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoB3C;;;gDAGgD;AAChD,wBAAgB,IAAI,IAAI,WAAW,CAAC,QAAQ,CAAC,CAI5C;AAED,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../src/lang/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../src/lang/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Message bundle contract for the presentMulmoScript View. Ported from the
|
|
2
|
+
* host's `pluginMulmoScript.*` vue-i18n keys (plus `common.close` /
|
|
3
|
+
* `common.cancel`); interpolated / pluralized keys become functions. */
|
|
4
|
+
export interface Messages {
|
|
5
|
+
beatCount(count: number): string;
|
|
6
|
+
movie: string;
|
|
7
|
+
generating: string;
|
|
8
|
+
rendering: string;
|
|
9
|
+
saving: string;
|
|
10
|
+
update: string;
|
|
11
|
+
characters: string;
|
|
12
|
+
drop: string;
|
|
13
|
+
gen: string;
|
|
14
|
+
play: string;
|
|
15
|
+
stop: string;
|
|
16
|
+
playPresentation: string;
|
|
17
|
+
regenerateMovie: string;
|
|
18
|
+
movieGenerationFailed: string;
|
|
19
|
+
pdf: string;
|
|
20
|
+
regeneratePdf: string;
|
|
21
|
+
generatingPdf: string;
|
|
22
|
+
retry: string;
|
|
23
|
+
errPrefix: string;
|
|
24
|
+
noBeats: string;
|
|
25
|
+
editSource: string;
|
|
26
|
+
applyChanges: string;
|
|
27
|
+
generateAll: string;
|
|
28
|
+
orDropImage: string;
|
|
29
|
+
generate: string;
|
|
30
|
+
generateAudio: string;
|
|
31
|
+
saveErrorInvalidJson(error: string): string;
|
|
32
|
+
saveErrorSaveFailed(error: string): string;
|
|
33
|
+
close: string;
|
|
34
|
+
cancel: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/lang/messages.ts"],"names":[],"mappings":"AAAA;;yEAEyE;AACzE,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ptBR.d.ts","sourceRoot":"","sources":["../../src/lang/ptBR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,IAAI,EAAE,QA+BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../src/lang/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,EAAE,EAAE,QA+BT,CAAC;AAEF,eAAe,EAAE,CAAC"}
|