// SPEC: PJ2026-01060307 控制面模块化 draft-2026-06-25-p0. remote-python-sync module for scripts/src/platform-infra-sub2api-codex.ts.

import type { CodexPoolConfig, CodexPoolRuntimeTarget } from "./types";
import { remotePythonCoreScript } from "./remote-python-core";
import { remotePythonSentinelScript } from "./remote-python-sentinel";
import { remotePythonValidationScript } from "./remote-python-validation";
import { remotePythonSyncValidateScript } from "./remote-python-sync-validate";
import { remotePythonTraceScript } from "./remote-python-trace";
import { remotePythonSentinelProbeScript } from "./remote-python-sentinel-probe";
import { remotePythonProfitScript } from "./remote-python-profit";
import { remotePythonCreditsScript } from "./remote-python-credits";
import { remotePythonAnnouncementsScript } from "./remote-python-announcements";

export function remotePythonScript(mode: "sync" | "validate" | "trace" | "cleanup-probes" | "sentinel-probe" | "profit" | "credits" | "announcements", encodedPayload: string, pool: CodexPoolConfig, target: CodexPoolRuntimeTarget): string {
  return [
    remotePythonCoreScript(mode, encodedPayload, pool, target),
    remotePythonSentinelScript,
    remotePythonValidationScript,
    remotePythonSyncValidateScript,
    remotePythonTraceScript,
    remotePythonProfitScript,
    remotePythonCreditsScript,
    remotePythonAnnouncementsScript,
    remotePythonSentinelProbeScript,
  ].join("");
}
