Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Godogen: workspace init finds Node, so a new harness works on a machine without one

deeba9b2ef3b896
diff --git a/store/agents/godogen/harness.json b/store/agents/godogen/harness.json
index cc78d6ed1..57de5c633 100644
--- a/store/agents/godogen/harness.json
+++ b/store/agents/godogen/harness.json
@@ -9,7 +9,7 @@
"workspace": {
"template": "template",
"marker": "studio.json",
- "init": "toolchain/init-workspace.mjs"
+ "init": "toolchain/init-workspace.sh"
},
"agent": {
"instructions": "AGENTS.md",
diff --git a/store/agents/godogen/toolchain/init-workspace.sh b/store/agents/godogen/toolchain/init-workspace.sh
new file mode 100755
index 000000000..451e73b64
--- /dev/null
+++ b/store/agents/godogen/toolchain/init-workspace.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Runs once in a fresh workspace (cwd = the workspace); the work is init-workspace.mjs. The daemon runs
+# this through a login shell whose PATH may hold no node at all — the normal case on a machine Harness
+# set up itself — and a `#!/usr/bin/env node` script there dies with "env: node: No such file or
+# directory", leaving a workspace with no node_modules for the viewer. runtimes.sh finds this machine's
+# Node 22.12+, or Harness's own.
+set -euo pipefail
+here="$(cd "$(dirname "$0")" && pwd)"
+# shellcheck source=runtimes.sh
+. "$here/runtimes.sh"
+harness_node 22.12 || exit 1
+exec node "$here/init-workspace.mjs" "$@"