import type { NodeAutomationStorageUploadResult } from '@cicctencent/agent-core'; import { ProcessCodeSandbox } from '../sandbox/process-code-sandbox.js'; import { BaseRuntimeRunner, RuntimePayload } from './runtime-runner-base.js'; export interface PythonAutomationRuntimeOptions { baseDir?: string; } export declare class PythonAutomationRuntimeRunner extends BaseRuntimeRunner { constructor(options?: PythonAutomationRuntimeOptions); getLanguage(): string; protected getExtraEnv(): Record; /** * 沙箱 init 后准备:把 data/_shared/work/python 软链到运行目录 _scripts/work/python, * 使任务代码 `from work.python import sb` 可加载公共运行时(sys.path 注入 _shared), * 与 Node 端 `require('@work/prelude')` 对称(见 work-automation 主规格「prelude-runtime-unification」)。 * 不再内联/注入 _sb.py:公共运行时唯一源为 data/_shared/work/python 命名空间包。 */ protected prepareSandbox(sandbox: ProcessCodeSandbox, _payload: RuntimePayload): Promise; /** * Python 的错误标记通过 print() 输出到 stdout(非 stderr), * 因此覆盖 parseRuntimeError 从 stdout 解析。 */ protected parseRuntimeError(stdout: string, _stderr: string): { message: string | null; storageArtifacts: NodeAutomationStorageUploadResult[]; }; buildBootstrapScript(payload: RuntimePayload): string; } export declare function getPythonAutomationRuntimeRunner(): PythonAutomationRuntimeRunner; //# sourceMappingURL=python-task-runtime.d.ts.map