Skip to content

chore(agents): install shelltime hooks for agy and cursor - #361

Merged
AnnatarHe merged 1 commit into
mainfrom
chore/install-shelltime-hooks
Nov 27, 2026
Merged

AnnatarHe merged 1 commit into
mainfrom
chore/install-shelltime-hooks

Conversation

@AnnatarHe

@AnnatarHe AnnatarHe commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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-bot with what you need.

Install project-level ShellTime tracking hooks for Antigravity (.agents/hooks.json) and Cursor (.cursor/hooks.json).
@AnnatarHe
AnnatarHe merged commit 48a978b into main Nov 27, 2026
@AnnatarHe
AnnatarHe deleted the chore/install-shelltime-hooks branch November 27, 2026 17:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T17:13:29.265472Z 48aca6c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread .cursor/hooks.json
"version": 1,
"hooks": {
"beforeSubmitPrompt": [
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread .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 '{}'",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 88.02% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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