Skip to content

[wrangler] Add Codex Micro daemon - #14846

Draft
elithrar wants to merge 3 commits into
mainfrom
codex/codex-micro
Draft

[wrangler] Add Codex Micro daemon#14846
elithrar wants to merge 3 commits into
mainfrom
codex/codex-micro

Conversation

@elithrar

Copy link
Copy Markdown
Contributor

NOT TO BE MERGED. JUST NEED A CI BUILD AND wrangler@<version> LINK FOR A SMALL DEMO

@changeset-bot

changeset-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6e7225e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ask-bonk ask-bonk Bot left a comment

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.

I'm Bonk, and I've done a quick review of your PR.

Adds a hidden wrangler --secret --{install,uninstall,run}-codex-daemon flow that installs a launchd/systemd service to watch a Codex Micro HID device and run mapped Wrangler commands.

I understand this is a demo branch not intended to merge, so most of this is informational. One concrete correctness bug and a couple of smaller notes below.

Ranked:

  1. (med) AG05 becomes a dead key if it is present in the keymap but resolves to no args (empty/whitespace value or a parse error). #ag05StopsAll is decided from the raw keymap, but applyKeymap can delete the AG05 command, leaving AG05 doing nothing (neither stop-all nor a command).
  2. (low) #confirmDeploy shares one confirmation window and consumes it even when the deploy command is already running (the confirm check runs before the already-active check), so an armed confirmation can be silently eaten by a press that only logs "already running".
  3. (low) findCodexMicro re-filters on productId/path after devicesAsync(vendorId, productId) already filtered on those — harmless but redundant.

Comment thread packages/wrangler/src/codex-micro/command-runner.ts Outdated
Comment thread packages/wrangler/src/codex-micro/command-runner.ts Outdated
@ask-bonk

ask-bonk Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review submitted successfully to PR #14846.

I reviewed the Codex Micro daemon changes and posted a batch review with one medium and two low-severity findings:

  1. (med) AG05 dead-key bug#ag05StopsAll is derived from the raw keymap while applyKeymap can delete the AG05 command (empty/whitespace value or parse error), leaving AG05 doing nothing. Posted a suggestion to derive the flag from the resolved commands.
  2. (low) Confirmation window consumed while command is already running — the confirm check precedes the already-active check, so an armed deploy confirmation can be silently eaten.
  3. (low) Redundant re-filter in findCodexMicro after devicesAsync already filters.

The rest (spawn without shell, XML/systemd value escaping, atomic writes, secret-flag gating, native-dep allowlist entries) looked sound for a demo branch.

github run

@pkg-pr-new

pkg-pr-new Bot commented Jul 25, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14846

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@14846

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14846

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14846

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14846

miniflare

npm i https://pkg.pr.new/miniflare@14846

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14846

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14846

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14846

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14846

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14846

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14846

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14846

wrangler

npm i https://pkg.pr.new/wrangler@14846

commit: 6e7225e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants