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 +11 -8
- package/dist/daemon.js.map +1 -1
- package/dist/templates/agent-plugin/hooks/CLAUDE.md +57 -0
- package/dist/templates/agent-plugin/hooks/hooks.json +12 -8
- package/dist/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -4
- package/dist/templates/agent-plugin/hooks/spec-user-prompt.sh +1 -4
- package/dist/templates/companion-plugin/hooks/hooks.json +6 -4
- package/package.json +1 -1
- package/templates/agent-plugin/hooks/CLAUDE.md +57 -0
- package/templates/agent-plugin/hooks/hooks.json +12 -8
- package/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -4
- package/templates/agent-plugin/hooks/spec-user-prompt.sh +1 -4
- package/templates/companion-plugin/hooks/hooks.json +6 -4
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",
|
|
1061
|
+
{ matcher: "SendMessage", hooks: [{ type: "command", command: "bash ${CLAUDE_PLUGIN_ROOT}/hooks/intercept-send-message.sh" }] }
|
|
1062
1062
|
],
|
|
1063
1063
|
Stop: [
|
|
1064
|
-
{
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1326
|
+
if (!allDone) {
|
|
1327
|
+
try {
|
|
1328
|
+
killPane(agent.paneId);
|
|
1329
|
+
} catch {
|
|
1330
|
+
}
|
|
1328
1331
|
}
|
|
1329
1332
|
}
|
|
1330
|
-
return
|
|
1333
|
+
return allDone;
|
|
1331
1334
|
}
|
|
1332
1335
|
async function handleAgentKilled(cwd, sessionId, agentId, reason) {
|
|
1333
1336
|
unregisterAgentPane(sessionId, agentId);
|