diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d2f4ac..f12cf33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ permissions: jobs: check: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 20 steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04d71e8..9491971 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: release: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 25 steps: @@ -64,5 +64,10 @@ jobs: dist/streamdeckcodex-neo.streamDeckProfile \ dist/streamdeckcodex-xl.streamDeckProfile \ dist/streamdeckcodex-plus.streamDeckProfile \ + dist/streamdeckai-stream-deck.streamDeckProfile \ + dist/streamdeckai-mini.streamDeckProfile \ + dist/streamdeckai-neo.streamDeckProfile \ + dist/streamdeckai-xl.streamDeckProfile \ + dist/streamdeckai-plus.streamDeckProfile \ dist/SHA256SUMS.txt \ "${flags[@]}" diff --git a/.gitignore b/.gitignore index f6b4f89..65c408c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -node_modules/ +node_modules dist/ logs/ coverage/ diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index fb600c5..b9f255c 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -97,3 +97,19 @@ builds the plugin bundle, and invokes Elgato's validator. `npm run release:verify` adds dependency audits, documentation checks, packaging, and a read-only doctor report. Connected mutation QA is deliberately separate; see [QA.md](QA.md). + +## Desktop provider boundary + +`ProviderAction` routes all SDK events using per-action settings. `CodexProvider` +retains the established action/store/native stack and filters its refresh collection +to Codex-bound controls. `ClaudeProvider` uses the same bounded native invocation +transport with separate Claude selectors and identity checks. A shared queue prevents +menu transactions from overlapping; exact provider/window/session/environment identity +scopes previews and remembered Plan modes. Key release returns to the adapter that +received key down, even if the foreground app changes. + +Automatic bindings have no fallback when another app is foreground. Default legacy +settings bind to Codex. Provider badges are composed by the existing render cache, +so unchanged transports remain deduplicated. The profile builder derives a second +opt-in set with distinct identities and automatic provider settings from the same +canonical profile sources. No second profile contract is maintained. diff --git a/CHANGELOG.md b/CHANGELOG.md index 77b0bb8..cd18259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,90 @@ All notable changes to this project are documented here. +## 0.3.0-beta.3 — 2026-11-14 + +- Add three Google Antigravity keys that read its local language server (no + screen reading): Antigravity Left (each model group's weekly and five-hour + quota), Antigravity Context, and Antigravity Permissions (cycles the global + preset Review, Default, Turbo). +- Give Approval Mode the shared settings panel so a hand-placed key can be + switched to Claude Code, and draw the Claude permission mode as the key's + headline instead of a truncated caption. + +- Build five new opt-in Codex + Claude Master profiles with on-key page navigation + for every device, including Mini. Preserve the five Codex profile archives and + all existing hand-built bindings; remove unavailable Claude approvals and + session navigation from shared presets. +- Add verified Claude Local/SSH Send, Compact, Files, Side chat, Settings, Skills, + new-session and unsent workflow controls. Guard PTT release against app switches, + parent-process loss, and maximum hold time. +- Persist observed Claude weekly/Fable reset inventories in an account-scoped + cache across plugin restart; label saved readings CACHED. Retain old Codex + context only for its exact chat, with an explicit CACHED label. + +- Audit every published control against actual Codex and Claude Code surfaces on + the remote QA Mac; retain a per-control acceptance matrix and explicit gaps. +- Repair current Codex pane controls, folder sheets, unsaved-chat workflow drafts, + composer-owned Send, Compact focus, session navigation and UTC log rollover. +- Handle the composer-replacing Allow once / Deny approval footer with exact + visible ownership checks, preserving wrong-target protections. +- Handle Claude model-switch confirmations, Bypass dialog animation and collapsed + Context cards; preserve named dial scales and saved Action-dial selections. +- Remove redundant native parsing and enable production compiler optimization + to avoid successful app actions being reported as SDK timeouts. + +- Restore press toggles on fixed Codex Left/Context keys, and refresh Claude + Left/Context without unsupported/background alerts. Existing profile IDs and + settings remain valid. Add live key-down/key-up coverage in both apps. + +- Update to Stream Deck SDK 3.0.4, CLI 1.10.4, and current build/test dependencies; + adapt typed settings and key/dial guards for SDK 3's expanded action types. +- Match Codex model versions exactly when the picker offers several Sol/Terra/Luna + generations; ignore chat-title menus that happen to contain a model name. +- Recognize repeated accessibility labels for Codex Plan and Dictate controls, + and the recording strip that replaces the editor during push-to-talk. +- Bind current Codex/ChatGPT host activity to the running process and one uniquely + focused chat window; reject ambiguous multi-window/split views. Retain the older + renderer-specific targeting path for earlier desktops. +- Support Claude's combined model/effort picker, nested named effort choices, + usage-multiplier labels, and Fast labels on current models. Preserve the separate + Ultracode toggle while changing effort; retain the legacy slider path. +- Read context from Claude's Session Details card as well as the older Usage ring. +- Add fixed Codex/Claude Left and Context actions with one heading and provider colors. + Label the actual Claude quota period/bucket, mark background readings cached, and + discard a cached quota when a verified active session no longer exposes it. +- Keep Claude model/effort position bars after selection and cancel effort previews + when the model changes within the same session. +- Reuse Claude accessibility activation per process generation and regenerate + bundled icon paths and license metadata for the dependency update. +- Preserve action UUIDs, Codex defaults, and all ten opt-in/bundled device layouts. + +## 0.3.0-beta.2 — 2026-09-06 + +- Name Claude effort previews Low, Medium, High, Extra, Max and Ultracode; recognize + and verify Ultracode selection instead of reporting an unavailable effort control. +- Include Bypass in permission cycling and handle its exact first-use workspace + confirmation only after an explicit Bypass selection, with target checks. +- Restore Bypass from Plan. With no prior mode history, use Claude's marked default, + falling back to Manual when no default is exposed. +- Keep Fast's verified Opus model restriction unchanged. + +## 0.3.0-beta.1 — 2026-09-06 + +- Add per-action Codex / Claude Code / Follow active app bindings and app badges. +- Accept larger Desktop session metadata with bounded reads and reject locked desktops. +- Preserve existing Codex actions behind an adapter and isolate Claude targeting. +- Add verified Claude Local/SSH model, effort slider, permission cycle, Plan, + context, weekly usage, sidebar and Changes controls; Local also supports Browser. +- Add Fast for verified Opus 5 menus, including the filled active lightning bolt. +- Exclude Bypass from cycling because it opens an additional app confirmation. +- Reject Chat/Cowork, ambiguous composers, changed targets and background actions. +- Keep Cloud, approvals, new/send/stop, compact, workflows, navigation and PTT + unsupported in this preview. Physical Mini/Plus acceptance is pending. +- Add five opt-in shared profiles alongside the five unchanged Codex profiles. +- Stop automatically activating bundled profiles over a hand-built profile. +- Record upstream source/license research and environment-specific acceptance gates. + ## 0.2.5 — 2026-10-08 ### Fixed diff --git a/MARKETPLACE.md b/MARKETPLACE.md index 918acbd..9151d44 100644 --- a/MARKETPLACE.md +++ b/MARKETPLACE.md @@ -1,3 +1,9 @@ +> Claude integration prerelease: Local and SSH native controls are qualified. +> The candidate has not completed physical hardware acceptance and is not +> ready for Marketplace publication. Generated gallery images identify the Claude +> development preview and show established Codex examples. See the +> [capability matrix](docs/claude-integration-research.md). + # Elgato Marketplace readiness This checklist maps Codex Companion to Elgato's current official requirements. diff --git a/QA.md b/QA.md index f8c1d8b..acdd42d 100644 --- a/QA.md +++ b/QA.md @@ -130,3 +130,33 @@ Record connected evidence outside the repository while testing. A release note may summarize the verified device model, software versions, postconditions, and restoration result, but must not include device serials, task identifiers, private paths, Codex logs, or account data. + +## Claude development acceptance + +The Claude prerelease has passed native Local/SSH acceptance; physical hardware +acceptance remains pending before stable release. For further testing, use an idle +Code session with a recognizable project and empty draft. Validate +Local, SSH and Cloud separately. Record installed Claude version and supported +capabilities in the research matrix. Exercise duplicate titles, multiple windows, +side composers, app/session switches during dial preview, unchanged drafts after +picker changes, Plan restoration, and lack of fallback on Chat/Cowork or login window. +Verify a mixed hand-built Mini profile and a shared Plus profile; preserve the stable +installed plugin until the candidate is ready. Unsupported features must remain +labeled and must not send fallback hotkeys. Do not claim that fixture tests establish +live acceptance or ship while exact targeting is unverified. + +The repeatable native gate is `node scripts/qa-claude-controls.mjs +--environment=local --activate --exercise` (use `ssh` for SSH). The command verifies +and restores supported settings and omits private identifiers from its output. +See the research matrix for the exact live cases already completed. + +The complete Local and SSH replays passed on 2026-09-06 after fixing the metadata size limit; +see `docs/claude-integration-research.md`. Locked desktops must return `LOCKED` +without a Claude target. Physical Mini/Plus acceptance is still required before stable. + +For beta 2, verify named effort previews including Ultracode, a full five-mode cycle, +Bypass → Plan → Bypass, and a Plan exit with no plugin history. The permission-cycle +test includes Bypass and may accept Claude's first-use workspace confirmation; +Claude remembers that consent even after the test restores the original mode. +Also verify that a recreated composer after that specific confirmation is accepted +only if the original window/session and draft match. diff --git a/README.md b/README.md index 1830866..262dd33 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,83 @@ +> **v0.3.0-beta.3: current desktop and SDK compatibility preview.** Updated for +> Claude Desktop 5.11492.5, Codex/ChatGPT 26.1111.21308, and Stream Deck SDK 3.0.4. +> Physical Mini/Plus acceptance of this candidate is pending; stable v0.2.4 is unchanged. +> See the [research and capability matrix](docs/claude-integration-research.md). +> See the [November compatibility record](docs/desktop-compatibility-2026-11.md) and +> [complete sagan control audit](docs/sagan-control-audit-2026-11-14.md). +> +> Every action offers **Codex**, **Claude Code**, or **Follow active app**. +> Missing settings preserve Codex behavior. Opt-in `streamdeckai-*` profiles follow +> the foreground supported app and label each control; `streamdeckcodex-*` profiles +> retain their original bindings. Import the profile for your device explicitly. +> The plugin never switches or replaces a hand-built profile automatically. +> +> Claude targets the **Code** tab only. Claude controls require that app in front, +> including pinned Claude controls. Unsupported features show **UNSUPPORTED**, +> missing readings show **NO DATA**, and old observations show **STALE**. +> No hooks, API keys, credential extraction, or companion daemon are required. +> +> On Codex/ChatGPT 26.1111, controls currently require one unambiguous chat window. +> Multiple windows/split views or missing startup activity history show unavailable. +> See the November QA record for the exact targeting limits. + +| Claude capability | Local | SSH | Cloud | +| ---------------------------------------------------- | ----------- | ----------- | ----------- | +| Model / effort / permissions / Plan / Fast | Verified | Verified | Verified | +| Context / quota | Exposed UI | Exposed UI | Exposed UI | +| Sidebar / Changes / Browser / Files | Verified | Verified | Verified | +| Send / Compact / Settings / Skills / Side chat / PTT | Verified | Verified | Verified | +| New chat / workflow drafts in current workspace | Verified | Verified | Verified | +| Approval buttons / session navigation / New Project | Unavailable | Unavailable | Unavailable | + +Local, genuine SSH, and classic Cloud were qualified separately on sagan. +Cloud workflow creation requires its visible Environment card and a single +repository so the destination can be verified. The new draft uses the branch +selected in Claude’s new-session composer and remains unsent for review. + +Claude Code **Projects** have separate support: the model dial selects the models +actually offered by the project picker; the coordinator's effort is **Fixed**. +Claude Context shows **AUTO / COMPACTION** when the project explicitly reports +that behavior, and Claude Left reads its visible plan quota. Other Project +Project controls remain unavailable. Project model changes +verify the same project/window and unchanged draft before and after selection. + +Permission cycling includes every offered mode, including Bypass. Selecting Bypass +also confirms Claude's workspace-specific first-use dialog. Plan restores the last +observed non-Plan mode, including Bypass; without history it uses Claude's marked +Default, or Manual if no default is exposed. Current effort menus offer Low, Medium, +High, Extra and Max. Ultracode is now an independent toggle, preserved by effort +changes; older six-level sliders remain supported. Fast requires the actual offered +toggle and a verified state change; it never substitutes a different model. + +Use **Codex Left**, **Claude Left**, **Codex Context**, and **Claude Context** for +fixed-provider keys. Codex Left toggles capacity/reset credits on press; Codex +Context toggles percentage/token counts. Claude Left cycles allowance, weekly reset credits, and Fable reset credits. +Reset counts refresh from Claude Settings → Usage while visible and stay marked +CACHED afterward, including after plugin restarts. The cache is scoped to the signed-in account. OPEN USAGE means no balance has been observed yet. Claude +Context refreshes its exposed reading on press. Each +uses one readable heading and a provider color. Claude +quota reads the actual period and bucket exposed by Code; it does not imply an +account-wide percentage. Last readings remain visible in the background with +**CACHED** on Claude keys. An observed removal of a quota clears its old value. +Codex retains the last known context for the exact chat and marks old readings CACHED. +Keep Claude's Session Details visible for current Context-card readings; empty or +unexposed data is never represented as zero. These gaps do not alter Codex controls. + +Anthropic removed the five-hour limit for verified Ultra accounts; weekly and Fable +weekly limits remain. See [Ultra plan limits](https://support.claude.com/en/articles/17728952-what-is-the-ultra-plan). + # Stream Deck Codex Companion [![CI](https://github.com/twidtwid/streamdeckcodex/actions/workflows/ci.yml/badge.svg)](https://github.com/twidtwid/streamdeckcodex/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -Local Stream Deck controls for the Codex desktop app on macOS. It provides live +Local Stream Deck controls for Codex and Claude Code Desktop on macOS. It provides live chat status, commands, workflows, approval mode, usage, and context on keys. Each supported Stream Deck family gets a layout sized for its physical keys. Stream Deck + also gets four live dials. This is an unofficial community project. It is not affiliated with or endorsed -by OpenAI, Work Louder, Elgato, or Corsair, and it includes no proprietary +by OpenAI, Anthropic, Work Louder, Elgato, or Corsair, and it includes no proprietary OpenAI artwork or source. ![Stream Deck Codex Companion running on a Stream Deck +](assets/hardware/stream-deck-plus.jpg) @@ -23,7 +91,7 @@ OpenAI artwork or source. Requirements: - macOS 13 or newer -- [Codex desktop](https://openai.com/codex/) installed and signed in +- [Codex desktop](https://openai.com/codex/) or Claude Desktop installed and signed in - Stream Deck 7.1 or newer - Stream Deck, Stream Deck Mini, Stream Deck Neo, Stream Deck XL, or Stream Deck +; dials require Stream Deck + @@ -32,7 +100,7 @@ Requirements: [Releases](https://github.com/twidtwid/streamdeckcodex/releases) page. 2. Download `com.todd.streamdeckcodex.streamDeckPlugin` from the newest release. 3. Double-click the downloaded file and approve installation in Stream Deck. -4. Open Codex and select a chat. +4. Open Codex and select a chat, or select an existing Claude Code session and choose Claude Code in the action inspector. 5. In **System Settings → Privacy & Security → Accessibility**, grant access to **Elgato Stream Deck** and, when listed, its **trampoline_handler** helper. Stream Deck 7.5 launches plugin processes @@ -41,7 +109,7 @@ Requirements: No API key, account token, background service, or separate Codex CLI installation is required. -### Included profiles +### Included Codex profiles The editable profile for the connected model should install automatically. Stream Deck + opens on Agents & Sessions, followed by Live Controls, then the @@ -60,6 +128,22 @@ If no profile appears, download and open the matching release asset: | Stream Deck XL | `streamdeckcodex-xl.streamDeckProfile` | | Stream Deck + | `streamdeckcodex-plus.streamDeckProfile` | +For the opt-in shared profiles, replace `streamdeckcodex-` with `streamdeckai-` +in the asset names above. These are the new **Codex + Claude Master** profiles, +with separate Live controls, Workspace, and Workflow pages. Every page reserves +its last two keys for Previous and Next, including Mini. Plus keeps Workflows, +Actions, Model, and Effort on its four dials. The four quota/context keys remain +pinned to their named provider; other controls follow the foreground app. + +The masters omit Claude's unavailable approval buttons, session navigator, and +New Project. The Actions dial skips unavailable commands on the current surface. +Workflows insert a reviewable draft in the current folder or verified Cloud repository; they never submit it. +The five original Codex archives and existing hand-built profiles are preserved. +Master profiles have distinct identities and import separately; they never +replace or automatically switch an existing profile. + +The following layout descriptions describe the full Codex capabilities. + Live Controls contains FAST, Permissions, PTT, Quota, YEET, New Project, Compact, and Context. Agents & Sessions contains six live chat slots, New Chat, and Plan; the Agent Status action supports up to eight slots if you add keys. @@ -344,3 +428,8 @@ The current requirement-by-requirement release audit is in Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) first. + +When Claude has no observed exact reset count, a current account-matched local +status can show **Resets available**. This is a cached yes/no hint, not a weekly or +Fable count. Expired or mismatched status remains unknown. No Settings navigation +is needed for this fallback. diff --git a/assets/profile-navigation/next.png b/assets/profile-navigation/next.png new file mode 100644 index 0000000..cb3c935 Binary files /dev/null and b/assets/profile-navigation/next.png differ diff --git a/assets/profile-navigation/next.svg b/assets/profile-navigation/next.svg new file mode 100644 index 0000000..2436323 --- /dev/null +++ b/assets/profile-navigation/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/profile-navigation/previous.png b/assets/profile-navigation/previous.png new file mode 100644 index 0000000..7185fa5 Binary files /dev/null and b/assets/profile-navigation/previous.png differ diff --git a/assets/profile-navigation/previous.svg b/assets/profile-navigation/previous.svg new file mode 100644 index 0000000..997e169 --- /dev/null +++ b/assets/profile-navigation/previous.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/com.todd.streamdeckcodex.sdPlugin/imgs/actions/reasoning.svg b/com.todd.streamdeckcodex.sdPlugin/imgs/actions/reasoning.svg index db77880..a287375 100644 --- a/com.todd.streamdeckcodex.sdPlugin/imgs/actions/reasoning.svg +++ b/com.todd.streamdeckcodex.sdPlugin/imgs/actions/reasoning.svg @@ -1,3 +1,3 @@ - + diff --git a/com.todd.streamdeckcodex.sdPlugin/manifest.json b/com.todd.streamdeckcodex.sdPlugin/manifest.json index d9d6551..e15c24e 100644 --- a/com.todd.streamdeckcodex.sdPlugin/manifest.json +++ b/com.todd.streamdeckcodex.sdPlugin/manifest.json @@ -5,6 +5,7 @@ "Controllers": ["Keypad"], "Icon": "imgs/actions/command", "Name": "Approval Mode", + "PropertyInspectorPath": "ui/inspector.html", "States": [ { "Image": "imgs/actions/command", @@ -12,13 +13,13 @@ "TitleAlignment": "bottom" } ], - "Tooltip": "Cycle Ask for approval, Approve for me, Full Access, and Custom permissions.", + "Tooltip": "Cycle the selected app's offered permission modes. Claude includes Bypass and its workspace confirmation.", "UUID": "com.todd.streamdeckcodex.approval-mode" }, { "Controllers": ["Keypad"], "Icon": "imgs/actions/keycap", - "Name": "Codex Workflow Key", + "Name": "Workflow Key", "States": [ { "Image": "imgs/actions/command", @@ -26,7 +27,7 @@ "TitleAlignment": "bottom" } ], - "Tooltip": "Launch the explicitly labeled Codex command or workflow.", + "Tooltip": "Run the labeled command or workflow. Unsupported provider features show their status.", "UUID": "com.todd.streamdeckcodex.keycap", "VisibleInActionsList": false }, @@ -56,7 +57,7 @@ } }, "Icon": "imgs/actions/command", - "Name": "Codex Command", + "Name": "Command", "PropertyInspectorPath": "ui/inspector.html", "States": [ { @@ -98,7 +99,7 @@ "layout": "$B1", "TriggerDescription": { "Push": "Apply displayed model", - "Rotate": "Preview Luna, Terra, or Sol" + "Rotate": "Preview available models" } }, "Icon": "imgs/actions/model", @@ -109,7 +110,7 @@ "Image": "imgs/actions/model" } ], - "Tooltip": "Preview Luna, Terra, or Sol, then press to apply the displayed model.", + "Tooltip": "Preview available models for the selected app, then press to apply.", "UUID": "com.todd.streamdeckcodex.model" }, { @@ -130,7 +131,7 @@ "Image": "imgs/actions/reasoning" } ], - "Tooltip": "View and change the active Codex chat's reasoning effort.", + "Tooltip": "View and change the selected app session’s reasoning effort.", "UUID": "com.todd.streamdeckcodex.reasoning" }, { @@ -158,28 +159,121 @@ "Controllers": ["Keypad"], "Icon": "imgs/actions/usage", "Name": "Live Usage", + "PropertyInspectorPath": "ui/inspector.html", "States": [ { "Image": "imgs/actions/usage", "ShowTitle": false } ], - "Tooltip": "Display weekly Codex usage left; press to toggle banked resets left.", + "Tooltip": "Display available usage and identify the selected app and quota bucket.", "UUID": "com.todd.streamdeckcodex.usage" }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/usage", + "Name": "Codex Left", + "States": [ + { + "Image": "imgs/actions/usage", + "ShowTitle": false + } + ], + "Tooltip": "Display Codex weekly capacity. Press to switch between capacity left and resets available.", + "UUID": "com.todd.streamdeckcodex.codex-weekly" + }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/usage", + "Name": "Claude Left", + "States": [ + { + "Image": "imgs/actions/usage", + "ShowTitle": false + } + ], + "Tooltip": "Display the quota currently exposed by Claude Code, with its period and bucket. Press to cycle allowance, weekly resets, and Fable resets. Open Claude Settings > Usage to refresh reset counts. Background readings are marked cached; removed quotas show no data.", + "UUID": "com.todd.streamdeckcodex.claude-weekly" + }, { "Controllers": ["Keypad"], "Icon": "imgs/actions/context", "Name": "Live Context", + "PropertyInspectorPath": "ui/inspector.html", "States": [ { "Image": "imgs/actions/usage", "ShowTitle": false } ], - "Tooltip": "Display context left in the focused Codex chat; press to toggle used and maximum tokens.", + "Tooltip": "Display context left for the verified active session.", "UUID": "com.todd.streamdeckcodex.context" }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/context", + "Name": "Codex Context", + "States": [ + { + "Image": "imgs/actions/context", + "ShowTitle": false + } + ], + "Tooltip": "Display context left for the focused Codex task. Press to switch to token counts.", + "UUID": "com.todd.streamdeckcodex.codex-context" + }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/context", + "Name": "Claude Context", + "States": [ + { + "Image": "imgs/actions/context", + "ShowTitle": false + } + ], + "Tooltip": "Display the last context reading from the most recently verified Claude Code session. Press to refresh.", + "UUID": "com.todd.streamdeckcodex.claude-context" + }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/usage", + "Name": "Antigravity Left", + "States": [ + { + "Image": "imgs/actions/usage", + "ShowTitle": false + } + ], + "Tooltip": "Display the quota Antigravity reports for each model group. Press to step through the weekly and five-hour limits.", + "UUID": "com.todd.streamdeckcodex.antigravity-usage" + }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/context", + "Name": "Antigravity Context", + "States": [ + { + "Image": "imgs/actions/context", + "ShowTitle": false + } + ], + "Tooltip": "Display context left for the Antigravity conversation viewed most recently. Press to refresh.", + "UUID": "com.todd.streamdeckcodex.antigravity-context" + }, + { + "Controllers": ["Keypad"], + "Icon": "imgs/actions/command", + "Name": "Antigravity Permissions", + "States": [ + { + "Image": "imgs/actions/command", + "ShowTitle": false + } + ], + "Tooltip": "Cycle Antigravity's global permission preset: Review, Default, Turbo.", + "UUID": "com.todd.streamdeckcodex.antigravity-permissions" + }, { "Controllers": ["Keypad"], "Icon": "imgs/actions/context", @@ -199,12 +293,12 @@ "mac": ["com.openai.codex"] }, "Author": "Todd Dailey", - "Category": "Codex Companion", + "Category": "Codex + Claude Companion", "CategoryIcon": "imgs/category", "CodePath": "bin/plugin.js", - "Description": "Local Stream Deck controls for Codex on macOS, with live chat status, workflows, commands, usage, and context. Stream Deck + adds model, reasoning, and chat-navigation dials.", + "Description": "Independent Stream Deck companion for Codex and Claude Code Desktop. Claude controls are experimental and capability-gated.", "Icon": "imgs/plugin", - "Name": "Codex Companion", + "Name": "Codex + Claude Companion", "Nodejs": { "Version": "24" }, @@ -249,6 +343,41 @@ "DontAutoSwitchWhenInstalled": true, "Name": "streamdeckcodex-neo", "Readonly": false + }, + { + "AutoInstall": false, + "DeviceType": 0, + "DontAutoSwitchWhenInstalled": true, + "Name": "streamdeckai-stream-deck", + "Readonly": false + }, + { + "AutoInstall": false, + "DeviceType": 1, + "DontAutoSwitchWhenInstalled": true, + "Name": "streamdeckai-mini", + "Readonly": false + }, + { + "AutoInstall": false, + "DeviceType": 2, + "DontAutoSwitchWhenInstalled": true, + "Name": "streamdeckai-xl", + "Readonly": false + }, + { + "AutoInstall": false, + "DeviceType": 7, + "DontAutoSwitchWhenInstalled": true, + "Name": "streamdeckai-plus", + "Readonly": false + }, + { + "AutoInstall": false, + "DeviceType": 9, + "DontAutoSwitchWhenInstalled": true, + "Name": "streamdeckai-neo", + "Readonly": false } ], "SDKVersion": 3, @@ -258,5 +387,5 @@ "SupportURL": "https://github.com/twidtwid/streamdeckcodex/issues", "URL": "https://github.com/twidtwid/streamdeckcodex", "UUID": "com.todd.streamdeckcodex", - "Version": "0.2.5.0" + "Version": "0.3.0.3" } diff --git a/com.todd.streamdeckcodex.sdPlugin/scripts/ptt-guard.mjs b/com.todd.streamdeckcodex.sdPlugin/scripts/ptt-guard.mjs index 699bfd6..7ceaf3d 100644 --- a/com.todd.streamdeckcodex.sdPlugin/scripts/ptt-guard.mjs +++ b/com.todd.streamdeckcodex.sdPlugin/scripts/ptt-guard.mjs @@ -2,6 +2,9 @@ import { spawnSync } from "node:child_process"; const targetRunner = process.env.STREAMDECK_PTT_TARGET_RUNNER; const targetWitnessToken = process.env.STREAMDECK_PTT_WITNESS_TOKEN; +const claudeTarget = process.env.STREAMDECK_PTT_CLAUDE_TARGET + ? JSON.parse(process.env.STREAMDECK_PTT_CLAUDE_TARGET) + : undefined; const maxHoldMs = Math.max( 100, Number(process.env.STREAMDECK_PTT_MAX_HOLD_MS ?? 60_000), @@ -16,10 +19,24 @@ function runTargetControl(action, witnessToken) { if (!targetRunner) { throw new Error("Missing Codex accessibility control for push-to-talk."); } - const args = witnessToken ? [action, witnessToken] : [action]; + const args = claudeTarget + ? [ + "claude", + Buffer.from( + JSON.stringify({ + target: claudeTarget, + operation: + action === "dictation-start" ? "dictate" : "dictation-stop", + }), + ).toString("base64"), + ] + : witnessToken + ? [action, witnessToken] + : [action]; const result = spawnSync(targetRunner, args, { encoding: "utf8", windowsHide: true, + timeout: 12000, }); if (result.error) throw result.error; if (result.status !== 0) { @@ -28,6 +45,7 @@ function runTargetControl(action, witnessToken) { `Codex PTT ${action} exited with ${result.status ?? "unknown"}${detail}`, ); } + if (claudeTarget) return JSON.parse(result.stdout).providerState; } function processFailureDetail(result) { @@ -47,10 +65,21 @@ function processFailureDetail(result) { function release() { if (released) return; released = true; - runTargetControl("dictation-stop"); + const result = runTargetControl("dictation-stop"); + if (claudeTarget) + process.stdout.write(`CLAUDE_STOPPED ${JSON.stringify(result)}\n`); } function verifyTarget() { + if (claudeTarget) { + if ( + claudeTarget.provider !== "claude" || + !claudeTarget.sessionId || + !claudeTarget.windowId + ) + throw new Error("Invalid Claude recording target"); + return; // The Claude transaction verifies the full captured target before starting. + } if (!targetRunner && !targetWitnessToken) return; if (!targetRunner || !targetWitnessToken) { throw new Error("Incomplete exact-target witness for push-to-talk."); @@ -79,8 +108,10 @@ process.stdin.resume(); const timeout = setTimeout(stop, maxHoldMs); try { verifyTarget(); - runTargetControl("dictation-start", targetWitnessToken); - process.stdout.write("READY\n"); + const started = runTargetControl("dictation-start", targetWitnessToken); + process.stdout.write( + claudeTarget ? `CLAUDE_READY ${JSON.stringify(started)}\n` : "READY\n", + ); await stopped; } finally { clearTimeout(timeout); diff --git a/com.todd.streamdeckcodex.sdPlugin/streamdeckai-mini.streamDeckProfile b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-mini.streamDeckProfile new file mode 100644 index 0000000..7c0055f Binary files /dev/null and b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-mini.streamDeckProfile differ diff --git a/com.todd.streamdeckcodex.sdPlugin/streamdeckai-neo.streamDeckProfile b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-neo.streamDeckProfile new file mode 100644 index 0000000..04e4126 Binary files /dev/null and b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-neo.streamDeckProfile differ diff --git a/com.todd.streamdeckcodex.sdPlugin/streamdeckai-plus.streamDeckProfile b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-plus.streamDeckProfile new file mode 100644 index 0000000..24ea345 Binary files /dev/null and b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-plus.streamDeckProfile differ diff --git a/com.todd.streamdeckcodex.sdPlugin/streamdeckai-stream-deck.streamDeckProfile b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-stream-deck.streamDeckProfile new file mode 100644 index 0000000..27acbd5 Binary files /dev/null and b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-stream-deck.streamDeckProfile differ diff --git a/com.todd.streamdeckcodex.sdPlugin/streamdeckai-xl.streamDeckProfile b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-xl.streamDeckProfile new file mode 100644 index 0000000..9e32b51 Binary files /dev/null and b/com.todd.streamdeckcodex.sdPlugin/streamdeckai-xl.streamDeckProfile differ diff --git a/com.todd.streamdeckcodex.sdPlugin/ui/inspector.js b/com.todd.streamdeckcodex.sdPlugin/ui/inspector.js index a3570e4..91a96fa 100644 --- a/com.todd.streamdeckcodex.sdPlugin/ui/inspector.js +++ b/com.todd.streamdeckcodex.sdPlugin/ui/inspector.js @@ -44,6 +44,7 @@ ["side-chat", "Open Side chat"], ]; + const codexOnlyCommands = new Set(["accept", "reject"]); const workflowOptions = [ ["pr-review", "PR review"], ["debug", "Debug"], @@ -60,6 +61,11 @@ function select(name, label, values, fallback) { const current = settings[name] || fallback; + if (name === "commandId" && !values.some(([value]) => value === current)) + values = [ + [current, "Unavailable in Claude — choose a command"], + ...values, + ]; return `