sisyphi 1.0.7 → 1.0.9
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 +22 -14
- package/dist/daemon.js.map +1 -1
- package/dist/templates/agent-plugin/hooks/CLAUDE.md +57 -0
- package/dist/templates/agent-plugin/hooks/debug-user-prompt.sh +15 -0
- package/dist/templates/agent-plugin/hooks/hooks.json +12 -8
- package/dist/templates/agent-plugin/hooks/operator-user-prompt.sh +14 -0
- package/dist/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -4
- package/dist/templates/agent-plugin/hooks/review-plan-user-prompt.sh +16 -0
- package/dist/templates/agent-plugin/hooks/review-user-prompt.sh +16 -0
- package/dist/templates/agent-plugin/hooks/spec-user-prompt.sh +1 -4
- package/dist/templates/agent-plugin/hooks/test-spec-user-prompt.sh +14 -0
- package/dist/templates/companion-plugin/hooks/hooks.json +6 -4
- package/dist/templates/orchestrator-base.md +9 -9
- package/dist/templates/orchestrator-impl.md +14 -8
- package/dist/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +26 -12
- package/package.json +1 -1
- package/templates/agent-plugin/hooks/CLAUDE.md +57 -0
- package/templates/agent-plugin/hooks/debug-user-prompt.sh +15 -0
- package/templates/agent-plugin/hooks/hooks.json +12 -8
- package/templates/agent-plugin/hooks/operator-user-prompt.sh +14 -0
- package/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -4
- package/templates/agent-plugin/hooks/review-plan-user-prompt.sh +16 -0
- package/templates/agent-plugin/hooks/review-user-prompt.sh +16 -0
- package/templates/agent-plugin/hooks/spec-user-prompt.sh +1 -4
- package/templates/agent-plugin/hooks/test-spec-user-prompt.sh +14 -0
- package/templates/companion-plugin/hooks/hooks.json +6 -4
- package/templates/orchestrator-base.md +9 -9
- package/templates/orchestrator-impl.md +14 -8
- package/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +26 -12
package/dist/daemon.js
CHANGED
|
@@ -1058,23 +1058,28 @@ 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
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1068
|
+
const userPromptHooks = {
|
|
1069
|
+
"plan": "plan-user-prompt.sh",
|
|
1070
|
+
"spec-draft": "spec-user-prompt.sh",
|
|
1071
|
+
"review": "review-user-prompt.sh",
|
|
1072
|
+
"review-plan": "review-plan-user-prompt.sh",
|
|
1073
|
+
"debug": "debug-user-prompt.sh",
|
|
1074
|
+
"operator": "operator-user-prompt.sh",
|
|
1075
|
+
"test-spec": "test-spec-user-prompt.sh"
|
|
1076
|
+
};
|
|
1077
|
+
const hookScript = userPromptHooks[normalizedType];
|
|
1078
|
+
if (hookScript) {
|
|
1074
1079
|
hooksConfig.UserPromptSubmit = [
|
|
1075
|
-
{
|
|
1080
|
+
{ hooks: [{ type: "command", command: `bash \${CLAUDE_PLUGIN_ROOT}/hooks/${hookScript}` }] }
|
|
1076
1081
|
];
|
|
1077
|
-
copyFileSync2(`${srcHooks}
|
|
1082
|
+
copyFileSync2(`${srcHooks}/${hookScript}`, `${base}/hooks/${hookScript}`);
|
|
1078
1083
|
}
|
|
1079
1084
|
writeFileSync4(`${base}/hooks/hooks.json`, JSON.stringify({ hooks: hooksConfig }, null, 2), "utf-8");
|
|
1080
1085
|
return base;
|
|
@@ -1320,14 +1325,17 @@ async function handleAgentSubmit(cwd, sessionId, agentId, report) {
|
|
|
1320
1325
|
});
|
|
1321
1326
|
const session = getSession(cwd, sessionId);
|
|
1322
1327
|
const agent = session.agents.find((a) => a.id === agentId);
|
|
1328
|
+
const allDone = allAgentsDone(session);
|
|
1323
1329
|
if (agent?.paneId) {
|
|
1324
1330
|
unregisterAgentPane(sessionId, agentId);
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1331
|
+
if (!allDone) {
|
|
1332
|
+
try {
|
|
1333
|
+
killPane(agent.paneId);
|
|
1334
|
+
} catch {
|
|
1335
|
+
}
|
|
1328
1336
|
}
|
|
1329
1337
|
}
|
|
1330
|
-
return
|
|
1338
|
+
return allDone;
|
|
1331
1339
|
}
|
|
1332
1340
|
async function handleAgentKilled(cwd, sessionId, agentId, reason) {
|
|
1333
1341
|
unregisterAgentPane(sessionId, agentId);
|