Repository navigation
chore(agents): install shelltime hooks for agy and cursor - #361
Conversation
Install project-level ShellTime tracking hooks for Antigravity (.agents/hooks.json) and Cursor (.cursor/hooks.json).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| "version": 1, | ||
| "hooks": { | ||
| "beforeSubmitPrompt": [ | ||
| { |
There was a problem hiding this comment.
Nit (optional): This file is committed to a repository other people clone, so it registers ShellTime hooks for every contributor who opens the repo in Cursor and has shelltime and shelltime-daemon on PATH. They never ran shelltime cursor install. Their prompts, tool calls and responses in this repo then go to /api/v1/agent-hooks under their own token, subject to agentHooks.sendContent. Fix: if this is meant only for cloud agents or maintainers, say so in the PR description. Otherwise accept that contributors with the daemon installed are recorded by default. The same applies to .agents/hooks.json.
| "SessionStart": [ | ||
| { | ||
| "type": "command", | ||
| "command": "PATH=${PATH:+$PATH:}$HOME/.shelltime/bin:/opt/homebrew/bin:/usr/local/bin; command -v shelltime >/dev/null 2>&1 && command -v shelltime-daemon >/dev/null 2>&1 && out=$(shelltime hook-ingest --agent agy --event SessionStart --project) && printf '%s\\n' \"$out\" || echo '{}'", |
There was a problem hiding this comment.
Nit (optional): The hook entries carry "timeout": 15 here, while the Cursor entries in .cursor/hooks.json have none. The generator (projectHookCommand in model/agent_hooks_common.go and the Cursor installer) makes this difference, so it is not a bug in this PR. A Cursor hook that hangs, for example on a blocked daemon socket, then has no explicit bound, whereas hook-ingest only promises to answer the daemon within 50 ms. Fix: none needed in this PR. If you want a bound, add a timeout to the Cursor hook generator and regenerate the file.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Install project-level ShellTime tracking hooks for Antigravity (
.agents/hooks.json) and Cursor (.cursor/hooks.json).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.