sisyphi 1.0.7 → 1.0.8

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/dist/daemon.js CHANGED
@@ -1058,21 +1058,21 @@ function createAgentPlugin(cwd, sessionId, agentId, agentType, agentConfig) {
1058
1058
  }
1059
1059
  const hooksConfig = {
1060
1060
  PreToolUse: [
1061
- { matcher: "SendMessage", hook: { type: "command", command: "bash hooks/intercept-send-message.sh" } }
1061
+ { matcher: "SendMessage", hooks: [{ type: "command", command: "bash ${CLAUDE_PLUGIN_ROOT}/hooks/intercept-send-message.sh" }] }
1062
1062
  ],
1063
1063
  Stop: [
1064
- { hook: { type: "command", command: "bash hooks/require-submit.sh" } }
1064
+ { hooks: [{ type: "command", command: "bash ${CLAUDE_PLUGIN_ROOT}/hooks/require-submit.sh" }] }
1065
1065
  ]
1066
1066
  };
1067
1067
  const normalizedType = agentType?.replace(/^sisyphus:/, "") ?? "";
1068
1068
  if (normalizedType === "plan") {
1069
1069
  hooksConfig.UserPromptSubmit = [
1070
- { hook: { type: "command", command: "bash hooks/plan-user-prompt.sh" } }
1070
+ { hooks: [{ type: "command", command: "bash ${CLAUDE_PLUGIN_ROOT}/hooks/plan-user-prompt.sh" }] }
1071
1071
  ];
1072
1072
  copyFileSync2(`${srcHooks}/plan-user-prompt.sh`, `${base}/hooks/plan-user-prompt.sh`);
1073
1073
  } else if (normalizedType === "spec-draft") {
1074
1074
  hooksConfig.UserPromptSubmit = [
1075
- { hook: { type: "command", command: "bash hooks/spec-user-prompt.sh" } }
1075
+ { hooks: [{ type: "command", command: "bash ${CLAUDE_PLUGIN_ROOT}/hooks/spec-user-prompt.sh" }] }
1076
1076
  ];
1077
1077
  copyFileSync2(`${srcHooks}/spec-user-prompt.sh`, `${base}/hooks/spec-user-prompt.sh`);
1078
1078
  }
@@ -1320,14 +1320,17 @@ async function handleAgentSubmit(cwd, sessionId, agentId, report) {
1320
1320
  });
1321
1321
  const session = getSession(cwd, sessionId);
1322
1322
  const agent = session.agents.find((a) => a.id === agentId);
1323
+ const allDone = allAgentsDone(session);
1323
1324
  if (agent?.paneId) {
1324
1325
  unregisterAgentPane(sessionId, agentId);
1325
- try {
1326
- killPane(agent.paneId);
1327
- } catch {
1326
+ if (!allDone) {
1327
+ try {
1328
+ killPane(agent.paneId);
1329
+ } catch {
1330
+ }
1328
1331
  }
1329
1332
  }
1330
- return allAgentsDone(getSession(cwd, sessionId));
1333
+ return allDone;
1331
1334
  }
1332
1335
  async function handleAgentKilled(cwd, sessionId, agentId, reason) {
1333
1336
  unregisterAgentPane(sessionId, agentId);