- setup/container.ts: replace container build with npm run build:runners - setup/index.ts: rename step container → runners - setup/environment.ts: remove Docker/Apple Container detection - setup/service.ts: remove Docker group stale check, add nodeBin and npm-global to service PATH for codex CLI - setup/verify.ts: remove container runtime check - SKILL.md: rewrite for container-free setup, add Codex auth step
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
/**
|
|
* Step: runners — Build agent runners (no container needed).
|
|
* Agents run as direct host processes.
|
|
*/
|
|
import { execSync } from 'child_process';
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
import { logger } from '../src/logger.js';
|
|
import { emitStatus } from './status.js';
|
|
|
|
export async function run(_args: string[]): Promise<void> {
|
|
const projectRoot = process.cwd();
|
|
|
|
// Build agent runners
|
|
let buildOk = false;
|
|
logger.info('Building agent runners');
|
|
try {
|
|
execSync('npm run build:runners', {
|
|
cwd: projectRoot,
|
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
});
|
|
buildOk = true;
|
|
logger.info('Agent runners build succeeded');
|
|
} catch (err) {
|
|
logger.error({ err }, 'Agent runners build failed');
|
|
}
|
|
|
|
// Verify runner entry points exist
|
|
const agentRunner = path.join(
|
|
projectRoot,
|
|
'container',
|
|
'agent-runner',
|
|
'dist',
|
|
'index.js',
|
|
);
|
|
const codexRunner = path.join(
|
|
projectRoot,
|
|
'container',
|
|
'codex-runner',
|
|
'dist',
|
|
'index.js',
|
|
);
|
|
const agentRunnerOk = fs.existsSync(agentRunner);
|
|
const codexRunnerOk = fs.existsSync(codexRunner);
|
|
|
|
const status = buildOk && agentRunnerOk ? 'success' : 'failed';
|
|
|
|
emitStatus('SETUP_RUNNERS', {
|
|
BUILD_OK: buildOk,
|
|
AGENT_RUNNER: agentRunnerOk,
|
|
CODEX_RUNNER: codexRunnerOk,
|
|
STATUS: status,
|
|
LOG: 'logs/setup.log',
|
|
});
|
|
|
|
if (status === 'failed') process.exit(1);
|
|
}
|