feat: remove legacy OpenCode runtime

Cut product flows over to Coding/Pi and retain only the migration-owned v1 boundary. Promote supported native optional packages because electron-builder omitted pnpm transitive optional closure from the packaged ASAR.
This commit is contained in:
2026-08-24 12:17:43 +08:00
parent 61fede2b4d
commit 5a275b93a7
199 changed files with 1330 additions and 64725 deletions

View File

@@ -1,13 +1,8 @@
#!/usr/bin/env node
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { getPythonTarget, PYTHON_VERSION } from './bundled-python-manifest.mjs';
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
const PROJECT_ROOT = path.resolve(SCRIPT_DIR, '..');
function readOption(name) {
const prefix = `--${name}=`;
const inline = process.argv.find((value) => value.startsWith(prefix));
@@ -35,10 +30,8 @@ if (!targetId || !root) {
try {
const target = getPythonTarget(targetId);
const executable = path.resolve(root, target.executable);
const meowaCli = path.join(PROJECT_ROOT, '.opencode', 'skills', 'game-assets', 'meowart_api.py');
runProbe(executable, 'version', ['--version']);
runProbe(executable, 'stdlib', ['-c', "import json, pathlib, urllib.request; print('stdlib-ok')"]);
runProbe(executable, 'meowa-help', [meowaCli, '--help']);
process.stdout.write(`[python] ${targetId} verified for Python ${PYTHON_VERSION}\n`);
} catch (error) {
process.stderr.write(`[python] ${targetId} verification failed: ${error instanceof Error ? error.message : String(error)}\n`);