test-agent-hooks

Solid

Exercise a real agent hook turn that drives Zedra Running, WaitingApproval, and Completed state.

AI & Automation 152 stars 15 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Agent Hooks Exercise a real agent turn and confirm its hooks drive Zedra state and Delta notifications. Installs nothing and does not send synthetic hooks. Argument: `$1` is the provider under test: `codex`, `opencode`, or `pi`. If omitted, use the agent currently running this skill. ## Prerequisites - Zedra daemon running in this repo. - The provider CLI on PATH. - Launch the agent from a **Zedra terminal** so `ZEDRA_TERMINAL_ID` is set; Delta notifications require it. - Provider hooks installed (`zedra agent hook install --provider <provider>` writes them): - `codex`: `.codex/hooks.json` must register `UserPromptSubmit`, `PermissionRequest`, `PostToolUse`, and `Stop` hooks that call the Zedra hook script. - `opencode`: `.opencode/plugins/zedra.js` in this repo, or the global `~/.config/opencode/plugins/zedra-agent-hooks.js`. - `pi`: `~/.pi/agent/extensions/zedra-agent-hooks.ts`. ## Hook → state `codex` (Claude-style hook events): | Event | Expected Zedra state | |-------|----------------------| | `UserPromptSubmit` | Running | | `PermissionRequest` | WaitingApproval | | `PostToolUse` | Running | | `Stop` | Completed | `opencode` (native plugin events): | Event | Expected Zedra state | |-------|----------------------| | `session.status` (busy/retry) | Running | | `permission.asked` | WaitingApproval | | `permission.replied` | Running | | `session.idle` | Completed | `pi` (extension normalizes native events to Claude-style names): | Event | Expected Ze...

Details

Author
tanlethanh
Repository
tanlethanh/zedra
Created
6 months ago
Last Updated
3 days ago
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

ref-sp-agents-hooks

Author agent lifecycle hooks that run deterministic shell commands at session, prompt, tool, and stop events across Claude Code, GitHub Copilot CLI, VS Code, and Gemini CLI. Use when: creating or editing a hook, choosing a lifecycle event, writing a hook script that reads stdin JSON and returns an allow/deny/context decision, making a hook portable across agents, or debugging why a hook does not fire or block.

0 Updated 4 days ago
swiftpostlabs
AI & Automation Listed

claude-code-hooks

Claude Code hook system — all 25 event types, payloads, matchers, state machine, and integration patterns for agent monitoring

3 Updated today
kookr-ai
Testing & QA Listed

agentforce-test

Write, run, and analyze structured test suites for Agentforce agents. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric selection, or custom evaluations; interprets test results or diagnoses test failures; asks about batch testing, regression suites, or CI/CD test integration. DO NOT TRIGGER when: user creates, modifies, previews, or debugs .agent files (use agentforce-generate); deploys or publishes agents; writes Agent Script code; uses sf agent preview for development iteration; analyzes production session traces (use agentforce-observe); requests OWASP, security, or red-team testing (use agentforce-secure).

93 Updated today
SalesforceAIResearch