Skip to content

fix(hooks): emit PostToolUse additional context - #609

Open
KumamuKuma wants to merge 3 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/posttooluse-additional-context
Open

fix(hooks): emit PostToolUse additional context#609
KumamuKuma wants to merge 3 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/posttooluse-additional-context

Conversation

@KumamuKuma

Copy link
Copy Markdown
Contributor

Summary

  • extract the inline PostToolUse auto-update logic into a portable Node handler
  • emit hookSpecificOutput.additionalContext so the instruction reaches model context
  • preserve the existing Git-operation, config, graph, and .ua fallback guards
  • add regression coverage for successful triggers and silent failure paths

Context

Follow-up to #598. That PR fixed the hook input by reading the PostToolUse payload from stdin, but the handler still wrote a plain-text message to stdout. PostToolUse ignores plain stdout, so the commit-triggered auto-update instruction was never added to model context.

Validation

  • pnpm lint
  • pnpm --filter @understand-anything/core build
  • pnpm --filter @understand-anything/skill build
  • pnpm --filter understand-anything-viewer build
  • pnpm --filter @understand-anything/core test
  • pnpm test (new hook tests: 14/14)
  • Python helper suite: 95 tests, 1 skipped
  • git diff --check origin/main...HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant