Skip to content

Add Command Code lifecycle hook plugin support#176

Merged
SDSLeon merged 1 commit into
masterfrom
lightcode/bright-jaguar-09fe578f
Jun 14, 2026
Merged

Add Command Code lifecycle hook plugin support#176
SDSLeon merged 1 commit into
masterfrom
lightcode/bright-jaguar-09fe578f

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 14, 2026

Copy link
Copy Markdown
Owner
  • Add a packaged Command Code hook plugin and installer so Lightcode can receive lifecycle events from the CLI.
  • Forward PreToolUse, PostToolUse, and Stop into Lightcode intents to keep thread status aligned with Command Code sessions.
  • Harden hook delivery for CLIs that strip secret env vars, and set working optimistically on submit when the hook plugin is active so status updates feel immediate.
  • Refine Command Code terminal-state detection and add coverage for plugin staging, intent mapping, and status heuristics.

- package and stage the Command Code plugin assets
- install lifecycle hooks and map hook events to Lightcode intents
- propagate a denylist-safe hook nonce and set optimistic working on submit
- refresh Command Code terminal heuristics and add install/intent tests
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
lightcode-landing Skipped Skipped Jun 14, 2026 8:34pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1eadbdb2f5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +363 to +364
if (existing !== null || existsSync(settingsPath)) {
writeHooksJsonFile(settingsPath, removeCommandCodeHooks(existing));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid overwriting malformed Command Code settings on uninstall

When ~/.commandcode/settings.json exists but is invalid JSON, parseExistingHooksJson() returns null, this condition still enters because existsSync(settingsPath) is true, and removeCommandCodeHooks(null) writes {} back to the file. That means a user who clicks uninstall while their settings file is temporarily malformed loses all existing Command Code settings instead of leaving the file untouched or reporting the parse failure.

Useful? React with 👍 / 👎.

@SDSLeon SDSLeon merged commit 712cde4 into master Jun 14, 2026
6 checks passed
@SDSLeon SDSLeon deleted the lightcode/bright-jaguar-09fe578f branch June 14, 2026 20:39
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