sisyphi 1.1.33 → 1.1.34

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.
@@ -1,6 +1,7 @@
1
- - No static `hooks.json` — `src/daemon/agent.ts` generates it per-agent at spawn time. Script edits are invisible to running agents; **respawn required**.
2
- - `{type}-user-prompt.sh` naming does **not** auto-register. Must add to hardcoded `userPromptHooks` map in `src/daemon/agent.ts` or the script is never copied. Only `require-submit.sh`, `intercept-send-message.sh`, and `register-bg-task.sh` copy unconditionally. `userPromptHooks` only covers `UserPromptSubmit` — `plan-validate.sh` is the sole example of a PreToolUse hook, registered via a separate special-case block in `agent.ts`; new PreToolUse hooks for specific agent types need the same treatment.
3
- - `interactive: true` in agent frontmatter suppresses `require-submit.sh` from the Stop phase.
1
+ - The bundled `hooks.json` here is the **manifest** the daemon merges it with project (`.sisyphus/agent-plugin/hooks/hooks.json`) and user (`~/.sisyphus/agent-plugin/hooks/hooks.json`) layers at spawn time, then writes the merged result into the per-agent plugin dir. Script edits are invisible to running agents; **respawn required**.
2
+ - New hooks register declaratively: add a manifest entry with `agentTypes: [...]` (or `["all"]`) and the script gets copied automatically. No `src/daemon/agent.ts` edits needed for new agent-type-specific hooks. The merge logic lives in `src/daemon/extensions.ts` (`mergeHookManifests`, `collectReferencedHookScripts`).
3
+ - A bundled hook script is only copied into a spawned agent's plugin dir if the merged manifest references it for that agent type — scripts whose entries filter out (e.g. `plan-validate.sh` for a `review` agent) are skipped. Higher layers can suppress a bundled script by basename via `"disable": ["script.sh"]` at the manifest's top level.
4
+ - `interactive: true` in agent frontmatter triggers `condition: "non-interactive"` filtering — entries with that condition (currently the bundled `require-submit.sh` Stop hook) are dropped from the merged manifest for interactive agents.
4
5
  - Scripts receive no `{{placeholder}}` substitution — placeholders appear as literal text, unlike `.md` templates.
5
6
  - Prompt hooks (`userPrompt`, `systemPrompt`) write raw text to stdout. Pre-tool hooks (e.g. `intercept-send-message.sh`) write `{"decision":"block","reason":"..."}` or exit 0 — wrong format silently does nothing.
6
7
  - Claude Code invokes hooks unconditionally, not only in sisyphus sessions. Guard: `if [ -z "$SISYPHUS_SESSION_ID" ]; then exit 0; fi`. Stop hooks also need `$SISYPHUS_AGENT_ID`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sisyphi",
3
- "version": "1.1.33",
3
+ "version": "1.1.34",
4
4
  "description": "tmux-integrated orchestration daemon for Claude Code multi-agent workflows",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,7 @@
1
- - No static `hooks.json` — `src/daemon/agent.ts` generates it per-agent at spawn time. Script edits are invisible to running agents; **respawn required**.
2
- - `{type}-user-prompt.sh` naming does **not** auto-register. Must add to hardcoded `userPromptHooks` map in `src/daemon/agent.ts` or the script is never copied. Only `require-submit.sh`, `intercept-send-message.sh`, and `register-bg-task.sh` copy unconditionally. `userPromptHooks` only covers `UserPromptSubmit` — `plan-validate.sh` is the sole example of a PreToolUse hook, registered via a separate special-case block in `agent.ts`; new PreToolUse hooks for specific agent types need the same treatment.
3
- - `interactive: true` in agent frontmatter suppresses `require-submit.sh` from the Stop phase.
1
+ - The bundled `hooks.json` here is the **manifest** the daemon merges it with project (`.sisyphus/agent-plugin/hooks/hooks.json`) and user (`~/.sisyphus/agent-plugin/hooks/hooks.json`) layers at spawn time, then writes the merged result into the per-agent plugin dir. Script edits are invisible to running agents; **respawn required**.
2
+ - New hooks register declaratively: add a manifest entry with `agentTypes: [...]` (or `["all"]`) and the script gets copied automatically. No `src/daemon/agent.ts` edits needed for new agent-type-specific hooks. The merge logic lives in `src/daemon/extensions.ts` (`mergeHookManifests`, `collectReferencedHookScripts`).
3
+ - A bundled hook script is only copied into a spawned agent's plugin dir if the merged manifest references it for that agent type — scripts whose entries filter out (e.g. `plan-validate.sh` for a `review` agent) are skipped. Higher layers can suppress a bundled script by basename via `"disable": ["script.sh"]` at the manifest's top level.
4
+ - `interactive: true` in agent frontmatter triggers `condition: "non-interactive"` filtering — entries with that condition (currently the bundled `require-submit.sh` Stop hook) are dropped from the merged manifest for interactive agents.
4
5
  - Scripts receive no `{{placeholder}}` substitution — placeholders appear as literal text, unlike `.md` templates.
5
6
  - Prompt hooks (`userPrompt`, `systemPrompt`) write raw text to stdout. Pre-tool hooks (e.g. `intercept-send-message.sh`) write `{"decision":"block","reason":"..."}` or exit 0 — wrong format silently does nothing.
6
7
  - Claude Code invokes hooks unconditionally, not only in sisyphus sessions. Guard: `if [ -z "$SISYPHUS_SESSION_ID" ]; then exit 0; fi`. Stop hooks also need `$SISYPHUS_AGENT_ID`.