feat: publish codex retry gateway

This commit is contained in:
fleetingtime20026
2026-06-26 10:07:55 +08:00
commit 9cc6bc9b31
31 changed files with 4674 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env node
import {
DEFAULT_STATE_ROOT,
getGatewayStatePaths,
parseOptions,
startGateway,
} from "./admin-lib.mjs";
async function main() {
const options = parseOptions(process.argv, { booleanFlags: ["restart-if-running"] });
const stateRoot = options.stateRoot || DEFAULT_STATE_ROOT;
const paths = getGatewayStatePaths(stateRoot);
const message = await startGateway({
stateRoot,
configPath: options.configPath || paths.configPath,
logPath: options.logPath || paths.logPath,
restartIfRunning: Boolean(options.restartIfRunning),
});
process.stdout.write(`${message}\n`);
}
main().catch((error) => {
process.stderr.write(`${error?.stack || error}\n`);
process.exit(1);
});