Skip to content

Expand terminal agent support and harden status detection - #7

Draft
DanielOu1208 wants to merge 3 commits into
mainfrom
hooks
Draft

Expand terminal agent support and harden status detection#7
DanielOu1208 wants to merge 3 commits into
mainfrom
hooks

Conversation

@DanielOu1208

Copy link
Copy Markdown
Owner

Summary

  • add terminal-derived launcher, process identity, status detection, and icons for OpenCode, Cursor CLI, OMP, Pi, and Droid alongside Codex and Claude
  • keep the collapsed notch agent icon/status presentation working for manually typed agents as well as hover-launched agents
  • harden status freshness so old terminal text and old PTY output cannot override a new ready prompt or leak across a session restart
  • document all seven agents, the three-visible-launcher limit, embedded-terminal boundary, and third-party mark ownership

Root causes fixed

  • The five new status rules checked historical bottom-buffer activity before the current composer or authoritative OMP title.
  • Pi's current trust selector uses Project trust, Trust, and Do not trust, while the detector only recognized older wording.
  • Swift parsed OSC title events separately from libghostty, so title freshness could diverge from the terminal's accepted state and title copying was not byte-bounded.
  • PTY output queued for the main actor and coordinator output already buffered before a restart were not scoped to the current session generation.

The fix uses libghostty's native title-change callback, bounds title decoding to 1,024 bytes and 256 sanitized characters, rechecks PTY generation at delivery, and invalidates coordinator buffers by epoch on restart.

Validation

  • xcodebuild test -project GhostNotch.xcodeproj -scheme GhostNotch -destination 'platform=macOS'
  • xcodebuild analyze -project GhostNotch.xcodeproj -scheme GhostNotch -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO
  • unsigned Release build
  • python3 scripts/remove-agent-hooks.py --self-test
  • asset-catalog JSON parsing and SVG XML validation
  • git diff --check

ShellCheck reports the pre-existing SC2115 warning in the untouched scripts/build-ghostty-vt.sh; this PR does not alter that script.

Manual acceptance still pending

  • Codex and Claude live sessions
  • OpenCode permissions, interruption, relaunch, and exit
  • Cursor CLI command approval, interruption, relaunch, and exit
  • OMP title-state transitions, interruption, relaunch, and exit
  • Pi project trust, interruption, relaunch, and exit
  • Droid permissions, interruption, relaunch, and exit
  • collapsed and hover visuals for all seven icons on a notched Mac

Agent marks remain third-party property and are included only for product identification; their inclusion does not imply affiliation, sponsorship, or endorsement.

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