feat: python scripting phase 0

This commit is contained in:
2026-02-22 21:29:16 +01:00
parent d7c97f4d85
commit ce050f98c3
12 changed files with 895 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
import type { MacroContextV1, MacroResultV1 } from './abiV1';
export type PythonWorkerRequest =
| {
type: 'run';
requestId: string;
code: string;
}
| {
type: 'renderMacroV1';
requestId: string;
code: string;
context: MacroContextV1;
};
export type PythonWorkerMessage =
| { type: 'ready' }
| { type: 'error'; error: string }
| { type: 'stdout'; requestId: string; chunk: string }
| { type: 'runResult'; requestId: string; result: string }
| { type: 'macroResult'; requestId: string; result: MacroResultV1 }
| { type: 'runError'; requestId: string; error: string };