Skip to content

feat: add native plugin and hook sync#138

Open
talvaknin744 wants to merge 3 commits intorunkids:mainfrom
talvaknin744:main
Open

feat: add native plugin and hook sync#138
talvaknin744 wants to merge 3 commits intorunkids:mainfrom
talvaknin744:main

Conversation

@talvaknin744
Copy link
Copy Markdown

Summary

  • add first-class native plugins and hooks source/sync flows for Claude and Codex
  • keep plugin and hook reporting target-aware in status, diff, doctor, and sync --all
  • tighten sandbox verification state prep so only referenced hook scripts and selected native plugin installs are copied

Behavior Notes

  • hook import localizes both direct script commands and interpreter-plus-script commands
  • when a local script path cannot be isolated, import keeps the command verbatim and records a warning
  • unsupported Codex hook events are warned and skipped instead of failing the whole sync
  • hooks sync --target all keeps successful rows plus warning/no-op rows such as no codex hooks defined
  • plugin translation supports generated target manifests, Claude install vs update detection, Codex cache/config resolution, and ambiguous short-name hard failure with use full ref

Verification

  • make fmt
  • make fmt-check
  • make lint
  • make build
  • make check
  • make test-redteam
  • ./scripts/test_docker.sh
  • ./scripts/test_docker_online.sh passed locally; token/private-repo cases were skipped without GITHUB_TOKEN
  • cd website && npm run build
  • explicit sandbox verification of:
    • plugins import/list/sync
    • hooks import/list/sync
    • status --json
    • diff --json
    • doctor --json
    • sync --all --json
    • Claude install/update flow via stub claude binary

Additional Note

  • this also includes the sparse-checkout fallback fix needed to restore a green make check

Refs #133

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces native integrations for Claude and Codex through new plugin and hook management systems, including CLI commands for listing, importing, and syncing these resources. The changes update core commands like status, diff, and sync --all to support these integrations and provide comprehensive documentation and testing utilities. Feedback focuses on improving robustness and performance, specifically addressing silent error handling in configuration discovery, inefficient JSON and file I/O operations, and fragile string parsing or TOML editing logic that could lead to panics or incorrect behavior.

Comment thread internal/hooks/hooks.go
Comment thread internal/hooks/hooks.go
Comment thread internal/hooks/hooks.go Outdated
Comment thread internal/hooks/hooks.go
Comment thread internal/plugins/plugins.go Outdated
Comment thread internal/tooling/fs.go
Comment thread internal/tooling/fs.go
@runkids
Copy link
Copy Markdown
Owner

runkids commented Apr 22, 2026

Thanks for the PR! I'll take a closer look and try it out.

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.

2 participants