@mulmoclaude/mulmoscript-plugin 0.1.0 → 0.2.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/dist/contract-DxKVCRQk.cjs +13 -0
- package/dist/contract-DxKVCRQk.cjs.map +1 -0
- package/dist/contract-vY0niHkh.js +8 -0
- package/dist/contract-vY0niHkh.js.map +1 -0
- package/dist/core/paths.d.ts +11 -6
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{plugin-W1ppnyhR.js → plugin-BQyzxkui.js} +17 -10
- package/dist/plugin-BQyzxkui.js.map +1 -0
- package/dist/{plugin-CtKUt8DX.cjs → plugin-Bi986Wga.cjs} +17 -10
- package/dist/plugin-Bi986Wga.cjs.map +1 -0
- package/dist/server/dispatch.d.ts +10 -0
- package/dist/server/dispatch.d.ts.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/mulmoErrorCapture.d.ts +29 -0
- package/dist/server/mulmoErrorCapture.d.ts.map +1 -0
- package/dist/server/ops.d.ts +101 -0
- package/dist/server/ops.d.ts.map +1 -0
- package/dist/server/support.d.ts +9 -0
- package/dist/server/support.d.ts.map +1 -0
- package/dist/server/types.d.ts +74 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server.cjs +1006 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.js +969 -0
- package/dist/server.js.map +1 -0
- package/dist/style.css +87 -0
- package/dist/vue.cjs +4 -8
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +2 -6
- package/dist/vue.js.map +1 -1
- package/package.json +10 -2
- package/dist/plugin-CtKUt8DX.cjs.map +0 -1
- package/dist/plugin-W1ppnyhR.js.map +0 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { FileOps } from "gui-chat-protocol";
|
|
2
|
+
import type { MulmoScriptGenerationEvent } from "../core/contract";
|
|
3
|
+
export interface OpFailure {
|
|
4
|
+
ok: false;
|
|
5
|
+
/** REST adapter mapping: bad_request→400, not_found→404,
|
|
6
|
+
* unavailable→503, server_error→500. */
|
|
7
|
+
code: "bad_request" | "not_found" | "server_error" | "unavailable";
|
|
8
|
+
error: string;
|
|
9
|
+
}
|
|
10
|
+
export type OpResult<T> = ({
|
|
11
|
+
ok: true;
|
|
12
|
+
} & T) | OpFailure;
|
|
13
|
+
export interface GenerateOpArgs {
|
|
14
|
+
filePath: string;
|
|
15
|
+
beatIndex?: number;
|
|
16
|
+
key?: string;
|
|
17
|
+
force?: boolean;
|
|
18
|
+
chatSessionId?: string;
|
|
19
|
+
}
|
|
20
|
+
export type MovieGenerationResult = {
|
|
21
|
+
ok: true;
|
|
22
|
+
outputPath: string;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
export type PdfGenerationResult = {
|
|
28
|
+
ok: true;
|
|
29
|
+
outputPath: string;
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
error: string;
|
|
33
|
+
};
|
|
34
|
+
export interface MovieProgressEvent {
|
|
35
|
+
kind: "image" | "audio";
|
|
36
|
+
beatIndex: number;
|
|
37
|
+
}
|
|
38
|
+
/** Host logger; every entry is already namespaced to mulmoScript by the
|
|
39
|
+
* package, so hosts just bind their own prefix/transport. */
|
|
40
|
+
export interface MulmoScriptServerLog {
|
|
41
|
+
info: (message: string, data?: Record<string, unknown>) => void;
|
|
42
|
+
warn: (message: string, data?: Record<string, unknown>) => void;
|
|
43
|
+
error: (message: string, data?: Record<string, unknown>) => void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Host capabilities the server ops run against. Only genuinely
|
|
47
|
+
* host-specific transport lives here — the mulmocast orchestration, path
|
|
48
|
+
* containment, and generation-state tracking are all in-package.
|
|
49
|
+
*/
|
|
50
|
+
export interface MulmoScriptServerBackend {
|
|
51
|
+
/** Absolute path of the stories directory (`<workspace>/artifacts/stories`).
|
|
52
|
+
* May not exist yet — the ops lazily create + realpath it. */
|
|
53
|
+
storiesDir: string;
|
|
54
|
+
/** Shared artifacts FileOps (rooted at `<workspace>/artifacts`) for the
|
|
55
|
+
* save / reopen / update dispatch kinds (phase-1 core executes). */
|
|
56
|
+
artifacts: FileOps;
|
|
57
|
+
/** Atomic file write (tmp alongside destination + rename; parent dirs
|
|
58
|
+
* created). Hosts inject their hardened implementation. */
|
|
59
|
+
writeFileAtomic: (absolutePath: string, data: string | Uint8Array) => Promise<void>;
|
|
60
|
+
/** ffmpeg availability probe. `false` blocks render/movie/PDF ops with a
|
|
61
|
+
* clear message; `true`/`undefined` proceeds (a boot probe may not have
|
|
62
|
+
* completed yet — never block on the startup window). */
|
|
63
|
+
isFfmpegAvailable?: () => boolean | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Generation fan-out (session channels, UI pubsub). Called on EDGE
|
|
66
|
+
* transitions only — first start / last finish of concurrent same-key
|
|
67
|
+
* runs — plus the finish-only per-beat pulses from the movie/PDF
|
|
68
|
+
* pipelines. `chatSessionId` is undefined for callers outside a chat
|
|
69
|
+
* session. The package keeps the in-flight snapshot itself.
|
|
70
|
+
*/
|
|
71
|
+
onGenerationEvent?: (chatSessionId: string | undefined, event: MulmoScriptGenerationEvent) => void;
|
|
72
|
+
log?: MulmoScriptServerLog;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,KAAK,CAAC;IACV;6CACyC;IACzC,IAAI,EAAE,aAAa,GAAG,WAAW,GA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