@alwith/module-computer 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,14 +5,15 @@ Computer access using cmux-cua 0.7.1, pinned to commit
5
5
  `alwith-cmux-host-v2` contract on macOS ARM64, Windows x64 and Linux x64.
6
6
  macOS uses the Codex profile; Windows and Linux use the native window profile. The TypeScript entry
7
7
  composes MCP descriptors from native authority without storing conversations.
8
- It returns a generation revision so clients can refresh existing threads when
9
- the host's grant changes. New, resumed and forked threads receive the same tools
10
- when the application grant is enabled.
8
+ Its stable attachment descriptor is independent of Driver readiness and application
9
+ execution authority. New, resumed and forked threads receive the same discoverable
10
+ tool contract; the application grant is checked only when a computer tool executes.
11
11
 
12
12
  The Rust host owns one embedded Driver child and a private transport. Its logical
13
13
  lease key is chosen by the consumer: U uses one application lease shared by every
14
14
  conversation. Individual thread cancellation or window hiding does not revoke
15
- this lease. Disabling computer use stops the child and invalidates every proxy.
15
+ this lease. Disabling computer use stops the child and revokes every native execution connection
16
+ while leaving MCP discovery available.
16
17
  Hosts must shut down on application exit and connection loss. Launch directly
17
18
  from the signed application for macOS permission attribution.
18
19
 
@@ -39,7 +40,7 @@ Run `bun run test`, `bun run build`, and `bun run test:rust` in this directory.
39
40
  The gateway binds an MCP connection token to the returned session
40
41
  ID. It serializes tool access with a FIFO lease held until Runtime turn completion.
41
42
  Cancellation drains an outstanding native action before handoff; transport failure
42
- requires the host to stop the Driver before resetting the gateway. Consumers must
43
+ requires the host to stop the Driver before releasing native execution ownership. Consumers must
43
44
  forward Runtime run-state snapshots, including sessions awaiting input. Codex may restart an MCP
44
45
  process with its existing session descriptor. The gateway drains any dispatched action and closes
45
46
  the previous transport before accepting the replacement, which must discover its tools again.
@@ -66,7 +67,7 @@ each session-bound tool call. Driver `start_session` is idempotent while active
66
67
  ended session, so a long-lived MCP connection cannot remain stuck on a tombstone.
67
68
  A failed declaration prevents the requested tool from being dispatched. User tool
68
69
  failures are returned unchanged and are never replayed. Application reconnection
69
- still replaces the driver generation and invalidates all old proxy connections.
70
+ replaces the Driver generation and its execution connections while retaining MCP attachment identity.
70
71
 
71
72
  On macOS, the agent receives the ten app-oriented cmux tools unchanged. Observe
72
73
  with `get_app_state`, use its grounded indices or coordinates, then refresh after
@@ -104,3 +105,25 @@ that show computer UI, and call commands through `@alwith/module-computer/comman
104
105
  application forwards Runtime run states with `Computer::sync_running`, calls `Computer::release`
105
106
  when Runtime or Codex exits, awaits `Computer::shutdown` in its exit sequence and calls
106
107
  `Computer::kill_on_exit` last.
108
+
109
+ ## Conversation-independent MCP attachments
110
+
111
+ The application grant defaults to disabled. Every conversation can attach the same
112
+ computer MCP contract while execution is disabled. Attachment identity lasts for the
113
+ MCP conversation attachment; Driver generations and their private credentials are
114
+ internal to the native gateway. Opening, replaying, or sending a conversation must
115
+ not wait for computer permission checks or Driver readiness.
116
+
117
+ The gateway answers discovery without a running control daemon. macOS uses the
118
+ Driver's permission-free Codex bootstrap registry; Windows x64 and Linux x64 use
119
+ its pure `dump-docs --type mcp` registry export. Tool names, descriptions, schemas,
120
+ and action annotations come from that executable rather than application copies.
121
+ Metadata discovery neither captures the desktop nor starts a control daemon.
122
+
123
+ Only computer calls acquire desktop ownership, check the current application grant
124
+ and system permissions, and open an execution transport for the current Driver.
125
+ Disabling access revokes execution admission before stopping every native Driver
126
+ connection. Reconnection replaces those internal transports and credentials without
127
+ closing the agent-facing MCP attachment. Failed calls return MCP tool errors; they
128
+ do not fail conversation admission or replay. Unknown action outcomes are never
129
+ replayed. A new observation is required after recovery.
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ export interface ComputerMcpServer {
27
27
  }>;
28
28
  }
29
29
  export declare const COMPUTER_SERVER_NAME = "alwith_computer";
30
- export declare const COMPUTER_INSTRUCTIONS = "Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. If the connection fails or is revoked, stop and report the connection error; never substitute cua_repl, shell automation or another computer channel. Ask the user to retry the message after reconnecting in U.";
30
+ export declare const COMPUTER_INSTRUCTIONS = "Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. Computer access is disabled until the user enables it in the application. If a computer call fails or access is revoked, stop computer actions and report the tool error; ordinary conversation can continue. Never replay an action whose outcome is unknown; never substitute cua_repl, shell automation or another computer channel. Ask the user to enable or reconnect computer access in the application when computer actions are needed.";
31
31
  export declare function computerContext(resolve: () => Promise<ComputerConnection | null>): Promise<{
32
32
  mcpServers: ComputerMcpServer[];
33
33
  appendSystemPrompt?: string;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var r="alwith_computer",o="Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. If the connection fails or is revoked, stop and report the connection error; never substitute cua_repl, shell automation or another computer channel. Ask the user to retry the message after reconnecting in U.";async function s(t){let e=await t();if(!e)return{mcpServers:[],revision:"disabled"};return{mcpServers:[{type:"stdio",name:"alwith_computer",command:e.command,args:[...e.args],env:e.env.map((n)=>({...n}))}],revision:e.generation,appendSystemPrompt:"Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. If the connection fails or is revoked, stop and report the connection error; never substitute cua_repl, shell automation or another computer channel. Ask the user to retry the message after reconnecting in U."}}export{o as COMPUTER_INSTRUCTIONS,r as COMPUTER_SERVER_NAME,s as computerContext};
1
+ var r="alwith_computer",o="Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. Computer access is disabled until the user enables it in the application. If a computer call fails or access is revoked, stop computer actions and report the tool error; ordinary conversation can continue. Never replay an action whose outcome is unknown; never substitute cua_repl, shell automation or another computer channel. Ask the user to enable or reconnect computer access in the application when computer actions are needed.";async function s(t){let e=await t();if(!e)return{mcpServers:[],revision:"disabled"};return{mcpServers:[{type:"stdio",name:"alwith_computer",command:e.command,args:[...e.args],env:e.env.map((n)=>({...n}))}],revision:e.generation,appendSystemPrompt:"Computer actions must use the private MCP server named alwith_computer. Discover its tools before acting. When get_app_state is available, use the app-oriented tools: get_app_state starts app use and returns its key-window screenshot and accessibility tree; act using that app identity and the returned element indices or screenshot coordinates. Stable grounded actions can follow without another snapshot; refresh after navigation, layout changes, modal transitions or an action error, and verify the completed sequence. Actions report dispatch, not verified completion. Otherwise, read skill://cua-driver/SKILL.md from alwith_computer and use its window-oriented tools and element tokens. The host handles conversation ownership, queuing and preview. Respect driver refusals and explicit input delivery modes. Computer access is disabled until the user enables it in the application. If a computer call fails or access is revoked, stop computer actions and report the tool error; ordinary conversation can continue. Never replay an action whose outcome is unknown; never substitute cua_repl, shell automation or another computer channel. Ask the user to enable or reconnect computer access in the application when computer actions are needed."}}export{o as COMPUTER_INSTRUCTIONS,r as COMPUTER_SERVER_NAME,s as computerContext};
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "module": "computer",
3
- "contract": 1,
3
+ "contract": 2,
4
4
  "abi": 1,
5
5
  "target": "aarch64-apple-darwin",
6
6
  "binary": "libalwith_native_computer.dylib",
7
- "sha256": "be4b98278e2dfbf8b934ab5fa6d12fca1a98a581cedad7f6e4a61835e126e481"
7
+ "sha256": "8fff2ffe55e105c8e636a5aaa3efa720f5cd5a4f6b92f3a4097d608e22d961d0"
8
8
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "module": "computer",
3
- "contract": 1,
3
+ "contract": 2,
4
4
  "abi": 1,
5
5
  "target": "x86_64-unknown-linux-gnu",
6
6
  "binary": "libalwith_native_computer.so",
7
- "sha256": "f0ebe723db77576e2f1fce79ed0f7b8faac7fb01351f39d09888f006568cdf35"
7
+ "sha256": "80bc1714db343c0a008231689451b85a6e32c1c2719376a3b30e0b5a55af8ff7"
8
8
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "module": "computer",
3
- "contract": 1,
3
+ "contract": 2,
4
4
  "abi": 1,
5
5
  "target": "x86_64-pc-windows-msvc",
6
6
  "binary": "alwith_native_computer.dll",
7
- "sha256": "332081cf57c3d361c684f84b3f3b19e707ae2f065333b74892422335c4506607"
7
+ "sha256": "d88597de45c9fefed07fbb489d87c172bbae7234cc51133249092b8177c2b3f3"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwith/module-computer",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "files": [