runcastle 1.0.12 → 1.0.13
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/bin/runcastle.js +8 -3
- package/index.js +8 -3
- package/package.json +1 -1
package/bin/runcastle.js
CHANGED
|
@@ -2740,7 +2740,7 @@ function resolveBurnWorkspaceMode(config2, platform = process.platform) {
|
|
|
2740
2740
|
return platform === "linux" ? "mounted" : "isolated";
|
|
2741
2741
|
return config2.burnWorkspace;
|
|
2742
2742
|
}
|
|
2743
|
-
function buildIsolatedSetupCommand(tempBranch, setupCommand) {
|
|
2743
|
+
function buildIsolatedSetupCommand(tempBranch, setupCommand, pm) {
|
|
2744
2744
|
const hookFile = `${ISOLATED_REPO_PATH}/.git/hooks/post-commit`;
|
|
2745
2745
|
const parts = [
|
|
2746
2746
|
`git config --global --add safe.directory '*'`,
|
|
@@ -2748,8 +2748,13 @@ function buildIsolatedSetupCommand(tempBranch, setupCommand) {
|
|
|
2748
2748
|
`printf '#!/bin/sh\\nunset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE\\ngit push --quiet origin HEAD:%s && exec git -C ${SANDBOX_WORKSPACE_PATH} reset --hard --quiet %s\\n' '${tempBranch}' '${tempBranch}' > ${hookFile}`,
|
|
2749
2749
|
`chmod +x ${hookFile}`
|
|
2750
2750
|
];
|
|
2751
|
+
if (pm === "pnpm" || pm === "yarn") {
|
|
2752
|
+
const shim = `$HOME/.local/bin/${pm}`;
|
|
2753
|
+
parts.push(`mkdir -p "$HOME/.local/bin"`, `printf '#!/bin/sh\\nexec corepack ${pm} "$@"\\n' > "${shim}"`, `chmod +x "${shim}"`);
|
|
2754
|
+
}
|
|
2751
2755
|
if (setupCommand)
|
|
2752
2756
|
parts.push(`cd ${ISOLATED_REPO_PATH} && ${setupCommand}`);
|
|
2757
|
+
parts.push(`git -C ${ISOLATED_REPO_PATH} config core.hooksPath ${ISOLATED_REPO_PATH}/.git/hooks`);
|
|
2753
2758
|
return parts.join(" && ");
|
|
2754
2759
|
}
|
|
2755
2760
|
function buildWorkspaceNotes(mode) {
|
|
@@ -2759,7 +2764,7 @@ function buildWorkspaceNotes(mode) {
|
|
|
2759
2764
|
return [
|
|
2760
2765
|
`Your working repository is \`${ISOLATED_REPO_PATH}\` \u2014 a clone on the container's fast native filesystem, with dependencies already installed. Do ALL work there: \`cd ${ISOLATED_REPO_PATH}\` first; every file you read, edit, test, and commit lives under it.`,
|
|
2761
2766
|
"",
|
|
2762
|
-
`The directory you start in (\`${SANDBOX_WORKSPACE_PATH}\`) is a slow mounted mirror used only to collect your commits \u2014 never edit files, install, or run tests there. Your commits sync back automatically (a post-commit hook pushes them); just commit as normal.`,
|
|
2767
|
+
`The directory you start in (\`${SANDBOX_WORKSPACE_PATH}\`) is a slow mounted mirror used only to collect your commits \u2014 never edit files, install, or run tests there. Your commits sync back automatically (a post-commit hook pushes them); just commit as normal. If you re-run the dependency install and it reconfigures git hooks (husky), run \`git -C ${ISOLATED_REPO_PATH} config core.hooksPath ${ISOLATED_REPO_PATH}/.git/hooks\` afterwards so the sync hook stays armed.`,
|
|
2763
2768
|
"",
|
|
2764
2769
|
`If you are blocked and write \`BLOCKED.md\`, write it at \`${ISOLATED_REPO_PATH}/BLOCKED.md\` AND copy it to \`${SANDBOX_WORKSPACE_PATH}/BLOCKED.md\` so the orchestrator can see it.`
|
|
2765
2770
|
].join(`
|
|
@@ -3077,7 +3082,7 @@ async function realExecuteTicketRun(ctx, ticket, config2, token, model, land, en
|
|
|
3077
3082
|
mounts.push(mount);
|
|
3078
3083
|
}
|
|
3079
3084
|
}
|
|
3080
|
-
const hookCommand = workspaceMode === "isolated" ? buildIsolatedSetupCommand(tempBranch, setupCommand) : setupCommand;
|
|
3085
|
+
const hookCommand = workspaceMode === "isolated" ? buildIsolatedSetupCommand(tempBranch, setupCommand, pm) : setupCommand;
|
|
3081
3086
|
if (hookCommand) {
|
|
3082
3087
|
ctx.emitEvent({
|
|
3083
3088
|
type: "burn.setup",
|
package/index.js
CHANGED
|
@@ -2739,7 +2739,7 @@ function resolveBurnWorkspaceMode(config2, platform = process.platform) {
|
|
|
2739
2739
|
return platform === "linux" ? "mounted" : "isolated";
|
|
2740
2740
|
return config2.burnWorkspace;
|
|
2741
2741
|
}
|
|
2742
|
-
function buildIsolatedSetupCommand(tempBranch, setupCommand) {
|
|
2742
|
+
function buildIsolatedSetupCommand(tempBranch, setupCommand, pm) {
|
|
2743
2743
|
const hookFile = `${ISOLATED_REPO_PATH}/.git/hooks/post-commit`;
|
|
2744
2744
|
const parts = [
|
|
2745
2745
|
`git config --global --add safe.directory '*'`,
|
|
@@ -2747,8 +2747,13 @@ function buildIsolatedSetupCommand(tempBranch, setupCommand) {
|
|
|
2747
2747
|
`printf '#!/bin/sh\\nunset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE\\ngit push --quiet origin HEAD:%s && exec git -C ${SANDBOX_WORKSPACE_PATH} reset --hard --quiet %s\\n' '${tempBranch}' '${tempBranch}' > ${hookFile}`,
|
|
2748
2748
|
`chmod +x ${hookFile}`
|
|
2749
2749
|
];
|
|
2750
|
+
if (pm === "pnpm" || pm === "yarn") {
|
|
2751
|
+
const shim = `$HOME/.local/bin/${pm}`;
|
|
2752
|
+
parts.push(`mkdir -p "$HOME/.local/bin"`, `printf '#!/bin/sh\\nexec corepack ${pm} "$@"\\n' > "${shim}"`, `chmod +x "${shim}"`);
|
|
2753
|
+
}
|
|
2750
2754
|
if (setupCommand)
|
|
2751
2755
|
parts.push(`cd ${ISOLATED_REPO_PATH} && ${setupCommand}`);
|
|
2756
|
+
parts.push(`git -C ${ISOLATED_REPO_PATH} config core.hooksPath ${ISOLATED_REPO_PATH}/.git/hooks`);
|
|
2752
2757
|
return parts.join(" && ");
|
|
2753
2758
|
}
|
|
2754
2759
|
function buildWorkspaceNotes(mode) {
|
|
@@ -2758,7 +2763,7 @@ function buildWorkspaceNotes(mode) {
|
|
|
2758
2763
|
return [
|
|
2759
2764
|
`Your working repository is \`${ISOLATED_REPO_PATH}\` \u2014 a clone on the container's fast native filesystem, with dependencies already installed. Do ALL work there: \`cd ${ISOLATED_REPO_PATH}\` first; every file you read, edit, test, and commit lives under it.`,
|
|
2760
2765
|
"",
|
|
2761
|
-
`The directory you start in (\`${SANDBOX_WORKSPACE_PATH}\`) is a slow mounted mirror used only to collect your commits \u2014 never edit files, install, or run tests there. Your commits sync back automatically (a post-commit hook pushes them); just commit as normal.`,
|
|
2766
|
+
`The directory you start in (\`${SANDBOX_WORKSPACE_PATH}\`) is a slow mounted mirror used only to collect your commits \u2014 never edit files, install, or run tests there. Your commits sync back automatically (a post-commit hook pushes them); just commit as normal. If you re-run the dependency install and it reconfigures git hooks (husky), run \`git -C ${ISOLATED_REPO_PATH} config core.hooksPath ${ISOLATED_REPO_PATH}/.git/hooks\` afterwards so the sync hook stays armed.`,
|
|
2762
2767
|
"",
|
|
2763
2768
|
`If you are blocked and write \`BLOCKED.md\`, write it at \`${ISOLATED_REPO_PATH}/BLOCKED.md\` AND copy it to \`${SANDBOX_WORKSPACE_PATH}/BLOCKED.md\` so the orchestrator can see it.`
|
|
2764
2769
|
].join(`
|
|
@@ -3076,7 +3081,7 @@ async function realExecuteTicketRun(ctx, ticket, config2, token, model, land, en
|
|
|
3076
3081
|
mounts.push(mount);
|
|
3077
3082
|
}
|
|
3078
3083
|
}
|
|
3079
|
-
const hookCommand = workspaceMode === "isolated" ? buildIsolatedSetupCommand(tempBranch, setupCommand) : setupCommand;
|
|
3084
|
+
const hookCommand = workspaceMode === "isolated" ? buildIsolatedSetupCommand(tempBranch, setupCommand, pm) : setupCommand;
|
|
3080
3085
|
if (hookCommand) {
|
|
3081
3086
|
ctx.emitEvent({
|
|
3082
3087
|
type: "burn.setup",
|