feat: python scripting phase 0
This commit is contained in:
22
src/renderer/python/runtimeProtocol.ts
Normal file
22
src/renderer/python/runtimeProtocol.ts
Normal 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 };
|
||||
Reference in New Issue
Block a user