---
name: hook-test-suite
version: 1.0.0
description: >
  Developer test plugin that exercises all 7 core hook types: cron,
  pre_conversation, post_conversation, pre_reflection, post_reflection,
  callable, and post_inbound_signals. Each hook verifies API reachability,
  writes a timestamped result to data/test-runs.jsonl, and produces the
  correct output shape. Use with `furoshiki plugins test-suite` to validate
  the plugin system end-to-end.
author: developer
active: false
hooks:
  - type: cron
    schedule: "*/30 * * * *"
    entry: scripts/hook.py
    timeout: 20
    description: "Periodic API health check"
  - type: pre_conversation
    entry: scripts/hook.py
    timeout: 10
    priority: 100
    description: "Verify API is reachable at conversation start"
  - type: post_conversation
    entry: scripts/hook.py
    timeout: 10
    description: "Log conversation end event"
  - type: pre_reflection
    entry: scripts/hook.py
    timeout: 10
    description: "Verify API before reflection"
  - type: post_reflection
    entry: scripts/hook.py
    timeout: 10
    description: "Log reflection completion"
  - type: callable
    name: hook_test_ping
    description: "Ping test: verify callable hook wiring. Returns {ok: true, hook: 'callable'}."
    when_to_use: "When running plugin test-suite or testing callable hook wiring."
    args_schema:
      type: object
      properties: {}
      required: []
    entry: scripts/hook.py
    timeout: 10
  - type: post_inbound_signals
    entry: scripts/hook.py
    timeout: 10
    priority: 100
    description: "Log post_inbound_signals event"
permissions:
  output_mind_queue: true
  llm: false
  network: false
  openrouter_web: false
---

# Hook Test Suite

Developer plugin that exercises all 7 core Furoshiki hook types in one package.

**This plugin should remain `active: false` in production.** Enable it temporarily
to run `furoshiki plugins test-suite` and verify the plugin pipeline end-to-end.

## How to use

```bash
# Install
cp -r examples/plugins/hook-test-suite ~/.furoshiki/plugins/

# Enable
sed -i 's/^active: false/active: true/' ~/.furoshiki/plugins/hook-test-suite/PLUGIN.md

# Reload and run the test suite
furoshiki plugins reload
furoshiki plugins test-suite

# View results
cat ~/.furoshiki/plugins/hook-test-suite/data/test-runs.jsonl

# Disable when done
sed -i 's/^active: true/active: false/' ~/.furoshiki/plugins/hook-test-suite/PLUGIN.md
furoshiki plugins reload
```

## What each hook verifies

| Hook | Check |
|------|-------|
| `cron` | API reachable, emits `mind_queue_item` via stdout |
| `pre_conversation` | Returns `{label, content, priority}` |
| `post_conversation` | Exits cleanly, logs run |
| `pre_reflection` | Returns `{label, content}` |
| `post_reflection` | Exits cleanly, logs run |
| `callable` | Returns `{ok: true, hook: "callable"}` |
| `post_inbound_signals` | Returns `{conversation_mode, prompt_addendum}` |

All hooks write a timestamped entry to `data/test-runs.jsonl` for inspection.
