feat: Agency plugin manifests + PostToolUse hook (Phase 1)#43
Merged
Conversation
Add Agency plugin support with: - agency.json: governance layer 4, developer-tools category - .mcp.json: stdio MCP server config for Agency hosts - hooks/hooks.json: PostToolUse hook declaration - hooks/post-tool-use.mjs: classify tool calls via lib/heuristics.mjs - .claude-plugin/plugin.json: add hooks reference, remove stale version Hook script uses lazy dynamic imports with pathToFileURL for Windows compatibility. Reads JSON from stdin, returns JSON on stdout — no console.log pollution (tested via subprocess). test/hooks.test.mjs adds 6 subprocess tests covering file edits, PR creation, unrecognized tools, malformed input, stdout purity, and camelCase payload compatibility. Updated package.json files array and release.yml required array for all new files. 183 tests passing (was 177). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- render: fall back to taskDescription when session summary is absent, fixing blank rows in work-log session activity table - hooks: add trailing newline to stdout, fix malformed-input test to send actual non-JSON bytes, add Phase 2 invariants to JSDoc - docs: add README runtime compatibility table (council requirement), update AGENTS.md architecture map + test counts (184), update cross-engine-spec with Phase Status + Phase 2 invariants, update testing-strategy.md with hooks coverage - CHANGELOG: add Agency manifests + session summary fix entries 184 tests passing, all council conditions addressed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of cross-engine support: adds Agency plugin manifests and a classification-only PostToolUse hook. Also fixes a bug where session activity rows in
work-log.mdrendered blank when the host didn't providefinalMessage.What's new
agency.json,.mcp.json,hooks/hooks.json— declares the extension to Agency-compatible hostshooks/post-tool-use.mjs— classifies tool calls (file edits, PR creation, git actions, brag requests) vialib/heuristics.mjs, returns{ continue: true, classification: {...} }to stdoutlib/render.mjsnow falls back torecord.taskDescriptionwhensummaryis absent, fixing blank rows in the session activity tableDesign decisions
docs/cross-engine-spec.mdto guide future work.Docs updated
Tests
test/hooks.test.mjs(6 subprocess tests) +test/render.test.mjstaskDescription fallback testChecklist
package.jsonfiles array updatedrelease.ymlrequired array updated