Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.26.1",
"version": "0.26.2",
"type": "module",
"bin": {
"spawn": "cli.js"
Expand Down
15 changes: 15 additions & 0 deletions packages/cli/src/shared/agent-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,12 @@ export async function startGateway(runner: CloudRunner): Promise<void> {

const wrapperB64 = Buffer.from(wrapperScript).toString("base64");
const unitB64 = Buffer.from(unitFile).toString("base64");
if (!/^[A-Za-z0-9+/=]+$/.test(wrapperB64)) {
throw new Error("Unexpected characters in base64 output");
}
if (!/^[A-Za-z0-9+/=]+$/.test(unitB64)) {
throw new Error("Unexpected characters in base64 output");
}

const script = [
"source ~/.spawnrc 2>/dev/null",
Expand Down Expand Up @@ -855,6 +861,15 @@ export async function setupAutoUpdate(runner: CloudRunner, agentName: string, up
const wrapperB64 = Buffer.from(wrapperScript).toString("base64");
const unitB64 = Buffer.from(unitFile).toString("base64");
const timerB64 = Buffer.from(timerFile).toString("base64");
if (!/^[A-Za-z0-9+/=]+$/.test(wrapperB64)) {
throw new Error("Unexpected characters in base64 output");
}
if (!/^[A-Za-z0-9+/=]+$/.test(unitB64)) {
throw new Error("Unexpected characters in base64 output");
}
if (!/^[A-Za-z0-9+/=]+$/.test(timerB64)) {
throw new Error("Unexpected characters in base64 output");
}

const script = [
"if ! command -v systemctl >/dev/null 2>&1; then exit 0; fi",
Expand Down
Loading