@alwith/module-computer 0.0.0-stage → 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,94 @@
1
+ ALwith Developer and Redistribution License, Version 1.0
2
+ Copyright 2026 ALWITHAI PTE. LTD. All rights reserved, except as expressly granted below.
3
+
4
+ 1. Scope
5
+ This license applies only to ALWITHAI PTE. LTD.'s ("ALwith") own material in
6
+ the npm package accompanying this license (the "Software"). It is a proprietary
7
+ license, not an open-source license. Third-party material is governed by its
8
+ respective licenses, as described in THIRD_PARTY_NOTICES.md. No restriction here
9
+ reduces rights granted by those licenses or by mandatory applicable law.
10
+
11
+ 2. Permission to develop and distribute applications
12
+ Subject to this license, ALwith grants you a worldwide, non-exclusive, royalty-free
13
+ copyright license to use, reproduce, integrate and modify the supplied Software
14
+ to develop, test, host and operate your own applications, for personal,
15
+ internal business or commercial use. You may brand,
16
+ sell and distribute those applications, including the Software embedded in them,
17
+ to your customers and end users. No per-application registration, approval or
18
+ royalty is required by this software license.
19
+
20
+ You may bundle, minify, transform and otherwise adapt the supplied JavaScript,
21
+ styles and declarations for those applications. You may include the supplied
22
+ Software in an application source distribution when necessary to build or use
23
+ that application, provided it remains separately identified under this license.
24
+ You may combine it with separately licensed application code, including MPL-2.0
25
+ code, while complying with both licenses. Your own independent code remains yours;
26
+ this license does not require disclosure of your application source code.
27
+
28
+ Recipients may use the embedded Software to run the application and exercise the
29
+ permissions above under this same license. You may allow your contractors and
30
+ hosting providers to use it for those purposes. You must supply this license and
31
+ all applicable third-party notices with each redistribution (for example in an
32
+ included licenses directory or an accessible legal-notices page), identify your
33
+ modifications, and not impose terms that purport to change ALwith's license.
34
+
35
+ 3. Rights reserved
36
+ No right to ALwith's unpublished source code, private repositories, trademarks,
37
+ or separately distributed Runtime binaries, modules or services is granted here.
38
+ You may not relicense the Software as your own framework or redistribute it as
39
+ a standalone SDK/package for others, except for private development/build caches
40
+ used for applications permitted by Section 2. No restriction is imposed on
41
+ independently developed competing applications or on third-party licensed code.
42
+ You must not misrepresent authorship or imply ALwith endorses your application.
43
+
44
+ 4. Accounts and services
45
+ This license does not supply platform credentials, paid entitlements, hosting,
46
+ support, updates or a service-availability guarantee. Use of ALwith accounts,
47
+ pets, relay or other hosted services is separately subject to the applicable
48
+ service terms and authorization. Do not bypass service access controls or use
49
+ another person's credentials without authorization. Choosing or replacing an
50
+ authentication provider for your own application is not prohibited by this
51
+ software license. Distributing an Auth client does not authorize its recipients
52
+ to access another user's account, data or entitlements.
53
+
54
+ 5. Lawful use and independent responsibility
55
+ You must not use the Software to commit or knowingly facilitate unlawful acts.
56
+ You are responsible for your application's operation, permissions, business
57
+ practices, data processing, content and compliance with applicable law. You must
58
+ not make warranties or commitments on ALwith's behalf. ALwith does not endorse
59
+ your application merely because it uses the Software or connects to ALwith.
60
+ These allocations do not remove either party's own mandatory legal obligations.
61
+
62
+ 6. Disclaimer and limitation of liability
63
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED
64
+ "AS IS" AND "AS AVAILABLE", WITHOUT EXPRESS OR IMPLIED WARRANTIES, INCLUDING
65
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ACCURACY,
66
+ SECURITY OR UNINTERRUPTED OPERATION. AI OUTPUTS AND AUTOMATED ACTIONS MAY BE
67
+ INCORRECT OR HARMFUL; YOU MUST DETERMINE APPROPRIATE REVIEW AND SAFEGUARDS.
68
+
69
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, ALWITH AND ITS CONTRIBUTORS
70
+ ARE NOT LIABLE FOR DAMAGES ARISING FROM USE, MODIFICATION OR DISTRIBUTION OF
71
+ THE SOFTWARE, INCLUDING LOST PROFITS, LOST DATA, BUSINESS INTERRUPTION AND
72
+ INDIRECT OR CONSEQUENTIAL LOSS. NOTHING EXCLUDES OR LIMITS LIABILITY THAT
73
+ CANNOT LAWFULLY BE EXCLUDED OR LIMITED, INCLUDING APPLICABLE MANDATORY CONSUMER
74
+ RIGHTS AND LIABILITY FOR FRAUD, WILLFUL MISCONDUCT OR GROSS NEGLIGENCE WHERE
75
+ SUCH EXCLUSION OR LIMITATION IS PROHIBITED. THIS LICENSE DOES NOT EXCLUDE
76
+ CRIMINAL OR REGULATORY RESPONSIBILITY IMPOSED BY LAW.
77
+
78
+ 7. Duration and termination
79
+ The grant for this version continues while you comply with this license. If
80
+ ALwith gives written notice of a material breach, your rights terminate if you
81
+ do not cure it within 30 days; no cure period authorizes continuing unlawful
82
+ conduct. On termination, cease new use and distribution of ALwith's proprietary
83
+ Software except as required by law. Independently compliant recipients retain
84
+ their own grants. Sections concerning reserved rights, notices, disclaimers and
85
+ mandatory-law exceptions survive as applicable. Third-party licenses are not
86
+ terminated by this provision.
87
+
88
+ 8. Versions and severability
89
+ This license governs the accompanying version. A later license or publication
90
+ of source code does not retroactively replace this grant or revoke rights in
91
+ earlier lawfully obtained versions. Any additional open-source license must be
92
+ expressly identified by ALwith. If a provision is unenforceable, the remaining
93
+ provisions continue to the extent permitted by law. A separate written agreement
94
+ signed by you and ALwith may expressly override these terms for its stated scope.
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # Computer module
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Computer access using Cua Driver 0.36.0 (contract 0.8.0). The TypeScript entry
4
+ composes MCP descriptors from native authority without storing conversations.
5
+ It returns a generation revision so clients can refresh existing threads when
6
+ the host's grant changes. New, resumed and forked threads receive the same tools
7
+ when the application grant is enabled.
8
+
9
+ The Rust host owns one embedded Driver child and a private transport. Its logical
10
+ lease key is chosen by the consumer: U uses one application lease shared by every
11
+ conversation. Individual thread cancellation or window hiding does not revoke
12
+ this lease. Disabling computer use stops the child and invalidates every proxy.
13
+ Hosts must shut down on application exit and connection loss. Launch directly
14
+ from the signed application for macOS permission attribution.
15
+
16
+ macOS uses a Unix socket and requires Accessibility and Screen Recording.
17
+ Windows uses named pipes. Linux is not enabled. Permission covers the local
18
+ desktop, not an application allowlist. Elevated Windows apps may require OS
19
+ privileges the ordinary driver does not have. No UIAccess helper is installed.
20
+
21
+ `./artifacts` supplies pinned URLs and SHA-256 digests. Stage the executable,
22
+ distribute `licenses/`, and sign it with the application. The MCP proxy uses an
23
+ explicit embedded endpoint and cannot start a standalone daemon after revocation.
24
+
25
+ Run `bun run test`, `bun run build`, and `bun run test:rust` in this directory.
26
+
27
+ The optional Rust `gateway` binds an MCP connection token to the returned session
28
+ ID. It serializes tool access with a FIFO lease held until Runtime turn completion.
29
+ Cancellation drains an outstanding native action before handoff; transport failure
30
+ requires the host to stop the Driver before resetting the gateway. Consumers must
31
+ forward Runtime run-state snapshots, including sessions awaiting input.
32
+
33
+ `proxy/stdio.mjs` runs with Bun and bridges MCP over authenticated loopback TCP.
34
+ Stage it as an application resource. `preview::capture` independently captures the
35
+ owned window as a bounded JPEG without changing the Driver's grounding cache.
36
+ Consumers scope subscriptions to visible windows and discard stale target revisions.
37
+ Frames are ephemeral and are not a video recording or conversation storage.
@@ -0,0 +1,12 @@
1
+ # Third-party notices
2
+
3
+ This integration pins the separately distributed MIT-licensed Cua Driver 0.36.0.
4
+ Upstream: https://github.com/trycua/cua/tree/cua-driver-rs-v0.36.0/libs/cua-driver
5
+
6
+ Applications staging the executable must distribute the included upstream
7
+ `licenses/cua-driver-LICENSE.md` and `licenses/cua-driver-THIRD_PARTY_NOTICES.md`.
8
+ No Cua Spaces, VM, perception models, Node SDK or Windows UIAccess helper is shipped.
9
+
10
+ Window previews use XCap 0.9.8 (Apache-2.0), https://github.com/nashaofu/xcap.
11
+ Its license is included as `licenses/xcap-LICENSE`. JPEG encoding uses the
12
+ MIT-licensed `image` crate; base64 transport uses the MIT-licensed `base64` crate.
@@ -0,0 +1,36 @@
1
+ declare const _default: {
2
+ readonly version: "0.36.0";
3
+ readonly artifacts: {
4
+ readonly "aarch64-apple-darwin": {
5
+ readonly url: "https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-darwin-universal-binary.tar.gz";
6
+ readonly sha256: "584e44435a26f5aa90c2f0097242307efbd63e843fc3f61072147c1963b0e592";
7
+ readonly archive: "cua-driver-rs-0.36.0-darwin-universal-binary.tar.gz";
8
+ readonly executable: "cua-driver";
9
+ };
10
+ readonly "x86_64-unknown-linux-gnu": {
11
+ readonly url: "https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz";
12
+ readonly sha256: "05dae2160c86bdf4855c279d30898213d7a150edb1992b7470afdd69f0df4064";
13
+ readonly archive: "cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz";
14
+ readonly executable: "cua-driver";
15
+ };
16
+ readonly "aarch64-unknown-linux-gnu": {
17
+ readonly url: "https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-arm64-binary.tar.gz";
18
+ readonly sha256: "f64a33889605944a4e5af0e6036496137a25d6375f041d7c56e65c3be456aab2";
19
+ readonly archive: "cua-driver-rs-0.36.0-linux-arm64-binary.tar.gz";
20
+ readonly executable: "cua-driver";
21
+ };
22
+ readonly "x86_64-pc-windows-msvc": {
23
+ readonly url: "https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-windows-x86_64-binary.zip";
24
+ readonly sha256: "f8c47024b626f4e0e70f8428d2998df39e4879110c5722a29d5fd03e367353ad";
25
+ readonly archive: "cua-driver-rs-0.36.0-windows-x86_64-binary.zip";
26
+ readonly executable: "cua-driver.exe";
27
+ };
28
+ readonly "aarch64-pc-windows-msvc": {
29
+ readonly url: "https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-windows-arm64-binary.zip";
30
+ readonly sha256: "520ea584cf11c074bccc4fd2328e8f2b34ec43de9328d97afb7fd03f761b55ee";
31
+ readonly archive: "cua-driver-rs-0.36.0-windows-arm64-binary.zip";
32
+ readonly executable: "cua-driver.exe";
33
+ };
34
+ };
35
+ };
36
+ export default _default;
@@ -0,0 +1 @@
1
+ var a={version:"0.36.0",artifacts:{"aarch64-apple-darwin":{url:"https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-darwin-universal-binary.tar.gz",sha256:"584e44435a26f5aa90c2f0097242307efbd63e843fc3f61072147c1963b0e592",archive:"cua-driver-rs-0.36.0-darwin-universal-binary.tar.gz",executable:"cua-driver"},"x86_64-unknown-linux-gnu":{url:"https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz",sha256:"05dae2160c86bdf4855c279d30898213d7a150edb1992b7470afdd69f0df4064",archive:"cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz",executable:"cua-driver"},"aarch64-unknown-linux-gnu":{url:"https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-arm64-binary.tar.gz",sha256:"f64a33889605944a4e5af0e6036496137a25d6375f041d7c56e65c3be456aab2",archive:"cua-driver-rs-0.36.0-linux-arm64-binary.tar.gz",executable:"cua-driver"},"x86_64-pc-windows-msvc":{url:"https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-windows-x86_64-binary.zip",sha256:"f8c47024b626f4e0e70f8428d2998df39e4879110c5722a29d5fd03e367353ad",archive:"cua-driver-rs-0.36.0-windows-x86_64-binary.zip",executable:"cua-driver.exe"},"aarch64-pc-windows-msvc":{url:"https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-windows-arm64-binary.zip",sha256:"520ea584cf11c074bccc4fd2328e8f2b34ec43de9328d97afb7fd03f761b55ee",archive:"cua-driver-rs-0.36.0-windows-arm64-binary.zip",executable:"cua-driver.exe"}}};export{a as default};
@@ -0,0 +1,35 @@
1
+ export type SessionOperation = {
2
+ kind: "new";
3
+ } | {
4
+ kind: "resume";
5
+ sessionId: string;
6
+ } | {
7
+ kind: "fork";
8
+ sourceSessionId: string;
9
+ };
10
+ export interface ComputerConnection {
11
+ generation: string;
12
+ command: string;
13
+ args: string[];
14
+ env: Array<{
15
+ name: string;
16
+ value: string;
17
+ }>;
18
+ }
19
+ export interface ComputerMcpServer {
20
+ type: "stdio";
21
+ name: string;
22
+ command: string;
23
+ args: string[];
24
+ env: Array<{
25
+ name: string;
26
+ value: string;
27
+ }>;
28
+ }
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. This exact server name is also used for resource discovery; do not replace underscores or invent a server name. Before the first computer action, read skill://cua-driver/SKILL.md from alwith_computer. Discover its tools, observe the target window, act using the returned window identity and element tokens, then verify the resulting interface. The host handles conversation ownership, queuing and preview. Prefer background operations and respect driver refusals. 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.";
31
+ export declare function computerContext(resolve: () => Promise<ComputerConnection | null>): Promise<{
32
+ mcpServers: ComputerMcpServer[];
33
+ appendSystemPrompt?: string;
34
+ revision: string;
35
+ }>;
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ var n="alwith_computer",o="Computer actions must use the private MCP server named alwith_computer. This exact server name is also used for resource discovery; do not replace underscores or invent a server name. Before the first computer action, read skill://cua-driver/SKILL.md from alwith_computer. Discover its tools, observe the target window, act using the returned window identity and element tokens, then verify the resulting interface. The host handles conversation ownership, queuing and preview. Prefer background operations and respect driver refusals. 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(r){let e=await r();if(!e)return{mcpServers:[],revision:"disabled"};return{mcpServers:[{type:"stdio",name:"alwith_computer",command:e.command,args:[...e.args],env:e.env.map((t)=>({...t}))}],revision:e.generation,appendSystemPrompt:"Computer actions must use the private MCP server named alwith_computer. This exact server name is also used for resource discovery; do not replace underscores or invent a server name. Before the first computer action, read skill://cua-driver/SKILL.md from alwith_computer. Discover its tools, observe the target window, act using the returned window identity and element tokens, then verify the resulting interface. The host handles conversation ownership, queuing and preview. Prefer background operations and respect driver refusals. 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,n as COMPUTER_SERVER_NAME,s as computerContext};
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Alice Maz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Cua AI, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,41 @@
1
+ # Third-party notices
2
+
3
+ Parts of the Cua Driver Rust workspace are derived from, or embed, these
4
+ MIT-licensed projects. Each project's copyright notice is below, followed by the MIT
5
+ License text they share.
6
+
7
+ trope-cua's cursor motion is itself a port of Cua Driver's Swift cursor
8
+ implementation (`CursorMotionPath.swift`, `Bezier.swift` and the Dubins glide in
9
+ `AgentCursorRenderer.swift`, April 2026; MIT, Copyright (c) 2025 Cua AI, Inc.).
10
+ In `cursor-overlay`, the motion knobs, their defaults, the arc formula and the
11
+ Dubins glide originate in that Swift code; trope-cua is credited below only for
12
+ the items listed.
13
+
14
+ | Project | Copyright | Used in | What |
15
+ | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | [trope-cua](https://github.com/voctory/trope-cua) | Copyright (c) 2026 Victor Vannara | `crates/platform-windows` (`src/overlay.rs`, `src/input/`, `src/tools/impl_.rs`); `crates/cursor-overlay/src/motion.rs`, `crates/cursor-overlay/src/bezier.rs` (specific items only) | Windows cursor overlay, background input and layered pixel-click dispatch; in `cursor-overlay`, the `press_duration_ms` knob, the 80 ms dwell default, the former 20 s idle default, the `with_overrides` method shape and the cached 32-point arc-length helper |
17
+ | [Interface-Agent](https://github.com/francedot/Interface-Agent) | Copyright (c) 2024 Francesco Bonacci | `crates/platform-windows` (`src/uia/`, `src/win32/`, `src/tools/impl_.rs`) | Windows UI Automation tree walk, app and window enumeration, InvokePattern click and ValuePattern set-value |
18
+ | [yabai](https://github.com/koekeishiya/yabai) | Copyright (c) 2019 Åsmund Vikane | `crates/platform-macos/src/input/skylight.rs` (`activate_without_raise`) | The focus-without-raise SkyLight event-record sequence |
19
+ | [QuickJS-ng](https://github.com/quickjs-ng/quickjs) | Copyright (c) 2017-2026 Fabrice Bellard; (c) 2017-2024 Charlie Gordon; (c) 2023-2026 Ben Noordhuis; (c) 2023-2026 Saúl Ibarra Corretgé | `crates/cua-driver-core/src/script_tool/` (compiled in through rquickjs-sys) | The JavaScript engine behind the experimental `run_script` tool |
20
+ | [rquickjs](https://github.com/DelSkayn/rquickjs) | Copyright (c) 2020 Mees Delzenne; (c) 2025 Rquickjs Contributors | `crates/cua-driver-core/src/script_tool/` | Rust bindings to QuickJS-ng |
21
+ | [T3 Code](https://github.com/pingdotgg/t3code) | Copyright (c) 2026 T3 Tools Inc. | `crates/cua-driver-sdk/src/embedded.rs` (`allowed_environment_name`); `crates/platform-linux/src/wayland/shell_helper.rs` and `shell_helper/transport.rs`; `crates/platform-linux/src/wayland/libei.rs` (input acknowledgement); `crates/platform-linux/src/wayland/mod.rs` and `src/tools/impl_.rs` (GNOME window capture); `../wayland-helper/winrects@cua/` (`CaptureWindow`, `CaptureWindowPreview`) | Linux fixes ported from T3 Code's patch to Cua Driver 0.34.0 ([pingdotgg/t3code#16975](https://github.com/pingdotgg/t3code/pull/16975), `patches/cua-driver-linux/0.34.0.patch`): the `CUA_DRIVER_RS_ENABLE_WAYLAND` embedded-host pass-through, the persistent session-bus transport for the GNOME helper, waiting for EIS to acknowledge libei input, and per-window GNOME capture with compositor-side preview downscaling (helper API 9 and 10) |
22
+
23
+ ## MIT License
24
+
25
+ Permission is hereby granted, free of charge, to any person obtaining a copy
26
+ of this software and associated documentation files (the "Software"), to deal
27
+ in the Software without restriction, including without limitation the rights
28
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ copies of the Software, and to permit persons to whom the Software is
30
+ furnished to do so, subject to the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be included in all
33
+ copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any
4
+ person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the
6
+ Software without restriction, including without
7
+ limitation the rights to use, copy, modify, merge,
8
+ publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software
10
+ is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions
15
+ of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 nashaofu
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@alwith/module-computer",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "files": [
7
+ "dist",
8
+ "LICENSE",
9
+ "THIRD_PARTY_NOTICES.md",
10
+ "README.md",
11
+ "rust/Cargo.toml",
12
+ "rust/Cargo.lock",
13
+ "rust/src",
14
+ "licenses",
15
+ "proxy"
16
+ ],
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ },
22
+ "./artifacts": {
23
+ "types": "./dist/artifacts.d.ts",
24
+ "import": "./dist/artifacts.js"
25
+ }
26
+ },
27
+ "scripts": {
28
+ "build": "bun ../../scripts/build-npm.ts",
29
+ "prepack": "bun run build",
30
+ "test": "bun test src",
31
+ "typecheck": "tsc --noEmit",
32
+ "test:rust": "cargo test --manifest-path rust/Cargo.toml --lib"
33
+ }
34
+ }
@@ -0,0 +1,10 @@
1
+ // A byte-only stdio carrier. Authentication and all scheduling live in the native host.
2
+ import { connect } from 'node:net';
3
+ const [address, token] = process.argv.slice(2);
4
+ if (!address || !token || !/^127\.0\.0\.1:\d+$/.test(address)) throw new Error('Invalid computer gateway address');
5
+ const socket = connect({host:'127.0.0.1',port:Number(address.split(':')[1])});
6
+ socket.on('connect',()=>{socket.write(token+'\n');process.stdin.pipe(socket);socket.pipe(process.stdout);});
7
+ socket.on('error',()=>{process.exitCode=1;process.stdin.destroy();});
8
+ socket.on('close',()=>{process.stdin.destroy();});
9
+ process.stdin.on('end',()=>socket.destroy());
10
+ process.stdout.on('error',()=>socket.destroy());