symphony-box 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/init.js +14 -8
- package/package.json +2 -2
package/init.js
CHANGED
|
@@ -27,7 +27,7 @@ const REQUIRED_STATES = [
|
|
|
27
27
|
async function setupLinear(linearApiKey, projectName, onMissingStates) {
|
|
28
28
|
const data = await linearQuery(
|
|
29
29
|
linearApiKey,
|
|
30
|
-
`{ projects { nodes { name slugId teams { nodes { id } } } } }
|
|
30
|
+
`{ projects { nodes { name slugId teams { nodes { id } } } } }`,
|
|
31
31
|
);
|
|
32
32
|
const project = data.projects.nodes.find((p) => p.name === projectName);
|
|
33
33
|
if (!project) throw new Error(`Linear project "${projectName}" not found`);
|
|
@@ -36,7 +36,7 @@ async function setupLinear(linearApiKey, projectName, onMissingStates) {
|
|
|
36
36
|
|
|
37
37
|
const statesData = await linearQuery(
|
|
38
38
|
linearApiKey,
|
|
39
|
-
`{ workflowStates { nodes { name team { id } } } }
|
|
39
|
+
`{ workflowStates { nodes { name team { id } } } }`,
|
|
40
40
|
);
|
|
41
41
|
const existing = statesData.workflowStates.nodes
|
|
42
42
|
.filter((s) => s.team?.id === teamId)
|
|
@@ -60,7 +60,7 @@ async function setupLinear(linearApiKey, projectName, onMissingStates) {
|
|
|
60
60
|
type: "started",
|
|
61
61
|
color: state.color,
|
|
62
62
|
},
|
|
63
|
-
}
|
|
63
|
+
},
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -78,13 +78,13 @@ export async function run_init(
|
|
|
78
78
|
repoName,
|
|
79
79
|
linearProjectName,
|
|
80
80
|
},
|
|
81
|
-
{ onStep = () => {}, onMissingStates = async () => true } = {}
|
|
81
|
+
{ onStep = () => {}, onMissingStates = async () => true } = {},
|
|
82
82
|
) {
|
|
83
83
|
onStep("linear", "Checking Linear project and workflow states...");
|
|
84
84
|
const { slugId } = await setupLinear(
|
|
85
85
|
linearApiKey,
|
|
86
86
|
linearProjectName,
|
|
87
|
-
onMissingStates
|
|
87
|
+
onMissingStates,
|
|
88
88
|
);
|
|
89
89
|
|
|
90
90
|
onStep("workflow", `Building WORKFLOW.md (slug: ${slugId})...`);
|
|
@@ -100,7 +100,7 @@ export async function run_init(
|
|
|
100
100
|
|
|
101
101
|
onStep("deps", `Box ${box.id} — installing system dependencies...`);
|
|
102
102
|
await box.exec.command(
|
|
103
|
-
"sudo apk add --no-cache git github-cli build-base perl bison ncurses-dev openssl-dev libssh-dev unixodbc-dev libxml2-dev"
|
|
103
|
+
"sudo apk add --no-cache git github-cli build-base perl bison ncurses-dev openssl-dev libssh-dev unixodbc-dev libxml2-dev",
|
|
104
104
|
);
|
|
105
105
|
|
|
106
106
|
onStep("codex", "Installing Codex...");
|
|
@@ -123,15 +123,21 @@ export async function run_init(
|
|
|
123
123
|
onStep("build", "Cloning and building Symphony (~5 mins)...");
|
|
124
124
|
await box.exec.command(`git clone ${SYMPHONY_URL}`);
|
|
125
125
|
await box.exec.command(
|
|
126
|
-
`cd symphony/elixir && ${MISE} trust && ${MISE} install
|
|
126
|
+
`cd symphony/elixir && ${MISE} trust && ${MISE} install`,
|
|
127
127
|
);
|
|
128
128
|
await box.exec.command(`cd symphony/elixir && ${MISE} exec -- mix setup`);
|
|
129
129
|
await box.exec.command(`cd symphony/elixir && ${MISE} exec -- mix build`);
|
|
130
130
|
|
|
131
131
|
onStep("run", "Starting Symphony...");
|
|
132
132
|
const stream = await box.exec.stream(
|
|
133
|
-
`cd symphony/elixir && ${MISE} exec -- ./bin/symphony /workspace/home/${repoName}/WORKFLOW.md --i-understand-that-this-will-be-running-without-the-usual-guardrails
|
|
133
|
+
`cd symphony/elixir && ${MISE} exec -- ./bin/symphony /workspace/home/${repoName}/WORKFLOW.md --i-understand-that-this-will-be-running-without-the-usual-guardrails`,
|
|
134
134
|
);
|
|
135
135
|
|
|
136
|
+
// Ping the box to keep it alive
|
|
137
|
+
await box.schedule.exec({
|
|
138
|
+
cron: "0 */2 * * *",
|
|
139
|
+
command: ["sh", "-c", ":"],
|
|
140
|
+
});
|
|
141
|
+
|
|
136
142
|
return { boxId: box.id, stream };
|
|
137
143
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "symphony-box",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "CLI to set up Symphony (OpenAI Codex orchestrator) on an Upstash Box for a GitHub repo",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@clack/prompts": "^0.11.0",
|
|
33
|
-
"@upstash/box": "
|
|
33
|
+
"@upstash/box": "^0.1.30",
|
|
34
34
|
"chalk": "^5.4.1",
|
|
35
35
|
"commander": "^14.0.0"
|
|
36
36
|
}
|