Repository navigation
Embedding: run under an app's own identity, extension variants, release assets - #3
Merged
Merged
Conversation
…config Ports the favicon and group identity MT Code's copy of the extension had: every agent group is titled plainly (no client-id suffix) and told apart by a colour hashed from the client id, so a reconnecting agent keeps its colour. Agent tabs wear the pointer composited over a dimmed copy of the site's own favicon, both layers inlined as data URLs, and the page's original icon is recorded in the page so any tab that leaves the agent's hands (release, cleanup, ungrouped leftovers) gets it back. Adoption now uses that restore path, so `adopted` is a plain set; 0.4.0's persisted [id, favicon] pairs still load. The native-messaging host list and group title move into a marked block that scripts/build-extension.mjs rewrites, so an app that runs the server under its own identity can build a variant with its own host names, title, name and key; the script prints the resulting extension id.
…ll-native-host An app that ships the binary in its own bundle (MT Code does) needs it to stay out of a standalone install's way on the same machine. Both servers now resolve an identity at startup from `--profile <json|file>` (any position) or COMPUTER_USE_PROFILE, with COMPUTER_USE_SUPPORT_DIR, _BRIDGE_SOCKET, _ENV_PREFIX, _AGENT_CURSOR_NAME, _AGENT_CURSOR_BUNDLE_ID and _HISTORY_DIR overriding single fields: - name: moves the support dir, bridge socket and Windows pipe under it - envPrefix: tunables are read as <prefix>BROWSER etc. before COMPUTER_USE_* - agentCursorName / agentCursorBundleId: the overlay's .app, executable, window class and bundle id (and the hit-test skip that ignores it) - historyDir: default --root for computer-history - nativeHostNames / extensionIds / nativeHostDescription: what the new `install-native-host` subcommand registers `install-native-host` writes a wrapper that replays the profile into the relay Chrome starts, plus a host manifest per name in every Chrome/Chromium profile dir (the registry on Windows), rewriting nothing already current so an app can call it on every launch. `identity` prints the resolved values. With no profile everything is exactly as before: same paths, pipe name, overlay bundle id (TCC keys on it), host names and serverInfo `mt-desktop`.
release-assets.yml (workflow_dispatch against the draft release) builds Linux x64/arm64 tarballs and the extension zip, uploads them and rewrites SHA256SUMS.txt over every asset, so an embedding app can pin all of them. CI runs the build-extension test; install.ps1 points at the right target dir.
sheehanmunim
force-pushed
the
feat/embedding
branch
from
September 19, 2026 07:11
974e1c6 to
52ea329
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2 (0.4.0). Based on
feat/0.4.0-hardeningbecause #2 is not merged yet; once #2 lands, retarget this tomain.MT Code is moving from carrying its own copies of this server (Swift, Rust, extension) to shipping the munim-computer-use release binary. This PR adds what that needs, without changing anything for standalone users.
Identity (Swift + Rust, same keys)
Resolved at startup from
--profile <json|file>(any argument position) orCOMPUTER_USE_PROFILE;COMPUTER_USE_SUPPORT_DIR,_BRIDGE_SOCKET,_ENV_PREFIX,_AGENT_CURSOR_NAME,_AGENT_CURSOR_BUNDLE_ID,_HISTORY_DIRoverride single fields.nameenvPrefix<prefix>BROWSER,<prefix>AGENT_CURSOR, … beforeCOMPUTER_USE_*agentCursorName/agentCursorBundleId.app/executable/window class and bundle id, and the hit-test skiphistoryDir--rootforcomputer-historynativeHostNames/extensionIds/nativeHostDescriptioninstall-native-hostregistersNew subcommands:
install-native-host [--binary P](wrapper that replays the profile + a host manifest per name in every Chrome/Chromium profile dir, registry on Windows; idempotent), andidentity(prints the resolved values).Defaults are unchanged: same support dirs, bridge socket, pipe name, overlay bundle id
com.munimtech.computer-use.agent-cursor(TCC), native host names, serverInfomt-desktop. Unknown profile keys are ignored with a warning so an older binary tolerates a newer embedder.Extension
[id, favicon]pairs still load).scripts/build-extension.mjsbuilds a variant (hosts, title, name, key, version) and prints its extension id. The stock build keeps idkgdolgnijopbghhomnblabjkmjhnoage.Release assets
release-assets.yml(dispatch against the draft release) adds Linux x64/arm64 tarballs andmunim-computer-use-chrome-extension.zip, and rewritesSHA256SUMS.txtover all assets. MT Code pins those hashes.Verified
swift build -c release;identitydefault vs MT profile;install-native-hostinto a throwawayCFFIXED_USER_HOME(wrapper, profile.json, manifest contents); an MT-profile server bindsmtcode-desktop/bridge.sockand the generated wrapper connects to it while a default-identity relay does not;MTCODE_DESKTOP_BROWSER=0viaenvPrefixhides the 12 browser tools (30 → 18); bad profile exits 2.cargo test --locked78 passed; release build;identity+install-native-hostwith a test profile (pipecu-embed-test-bridge-<user>,.cmdwrapper, registry keys), then cleaned up.node chrome-extension/background.test.mjs(13),node scripts/build-extension.test.mjs(3),node scripts/check-tool-parity.mjs(30 tools, identical).Not released, tagged or published.
Aside:
com.munimtech.computer-use.desktopcontains a-, which Chrome's host-name rule does not allow, so that legacy host has probably never been reachable. Left as-is.