@remotehost/cli 1.0.0 → 2.0.0-beta.1

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
@@ -81,9 +81,69 @@ expiring read/send token. Add `--approve` to allow tool-approval answers or
81
81
  `remote mcp tokens` lists your tokens; `remote mcp revoke <id>` revokes one.
82
82
  Personal tokens require the updated API and agent-token database migration.
83
83
  They do not grant shell/file access or sandbox deletion. See
84
- [agent sessions](../../docs/agent-sessions.md) for rollout status and native
84
+ [agent sessions](../../docs/workspaces/agent-sessions.md) for rollout status and native
85
85
  terminal limitations.
86
86
 
87
+ ## Connections
88
+
89
+ Connect Claude and GitHub once, for yourself; every sandbox you start is then
90
+ signed in as you, and never holds the tokens:
91
+
92
+ ```sh
93
+ claude setup-token | remote connect claude # or: pbpaste | remote connect claude
94
+ remote connect github # enter the code it shows at GitHub
95
+ gh auth token | remote connect github --token-stdin # or a token you already have
96
+ remote connections # what is connected (--json)
97
+ remote disconnect claude
98
+ ```
99
+
100
+ A token is read from stdin only, never from an argument or the environment;
101
+ on a terminal it is asked for and not shown. The Settings page "Connections"
102
+ in the console does the same. `remote broker sandbox-key <host> <name>` is
103
+ for the sandbox tooling: it prints a sandbox's key on stdout and refuses to
104
+ when stdout is a terminal (`--revoke` revokes it).
105
+
106
+ ## Signing keys
107
+
108
+ An org's (or workspace's) Ed25519 key, held in Cloud KMS: its private half
109
+ never leaves it, and every signature is in the org's audit log.
110
+
111
+ ```sh
112
+ remote signing-key create release # you are granted use of it
113
+ remote signing-key grant release service_account <id> # a CI identity's API keys sign with it
114
+ remote signing-key grant release sandbox <user-id> --sandbox cloudflare/dev
115
+ remote signing-key list # keys, public keys, grants (--json)
116
+ git cat-file commit HEAD | remote signing-key sign release --namespace git > commit.sig
117
+ remote signing-key revoke release <grant-id>
118
+ remote signing-key delete release
119
+ ```
120
+
121
+ `sign` reads the message from stdin and prints only the signature: an SSH
122
+ signature (`ssh-keygen -Y sign`'s format, which `ssh-keygen -Y verify`
123
+ checks against the key's `ssh-ed25519` public key) by default, or raw
124
+ Ed25519 in base64 with `--format ed25519`. Inside a sandbox,
125
+ `--from-sandbox` signs as the sandbox with no sign-in: the fleet's egress
126
+ puts the sandbox's own identity on the request.
127
+
128
+ ## mTLS services
129
+
130
+ A service your workspace's machines reach with mutual TLS, though no
131
+ machine holds a client key: a machine dials `<name>.svc.internal:<port>` in
132
+ plain TCP, and the fleet re-originates the connection as mutual TLS with a
133
+ short-lived client certificate for the machine's owner, from the service's
134
+ own client CA in Cloud KMS.
135
+
136
+ ```sh
137
+ remote mtls-service create rbe --host rbe.example.com --port 8980 \
138
+ --server-ca buildbarn-ca.pem --client-dns-name untrusted.rbe.internal
139
+ remote mtls-service list # (--json)
140
+ remote mtls-service ca rbe > client-ca.pem # give this to the service to trust
141
+ remote mtls-service delete rbe
142
+ ```
143
+
144
+ The workspace is the org's default Internal one unless `--workspace` names
145
+ another.
146
+
87
147
  ## Configuration
88
148
 
89
149
  | variable | what it does |
@@ -7,276 +7,6 @@ copyright notices are reproduced here in full.
7
7
  This file is generated by `scripts/bundle.mjs` from the packages the bundle
8
8
  actually includes. Do not edit it by hand.
9
9
 
10
- ## @bufbuild/protobuf 2.14.0
11
-
12
- Licence: (Apache-2.0 AND BSD-3-Clause)
13
-
14
- ### Apache-2.0
15
-
16
- Reproduced from the SPDX licence list; @bufbuild/protobuf ships no licence file of its own.
17
-
18
- ```
19
- Apache License
20
- Version 2.0, January 2004
21
- http://www.apache.org/licenses/
22
-
23
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
24
-
25
- 1. Definitions.
26
-
27
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
28
-
29
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
30
-
31
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
32
-
33
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
34
-
35
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
36
-
37
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
38
-
39
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
42
-
43
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
44
-
45
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
46
-
47
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
48
-
49
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
50
-
51
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
52
-
53
- (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
54
-
55
- (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
56
-
57
- (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
58
-
59
- (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
60
-
61
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
62
-
63
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
64
-
65
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
66
-
67
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
68
-
69
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
70
-
71
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
72
-
73
- END OF TERMS AND CONDITIONS
74
-
75
- APPENDIX: How to apply the Apache License to your work.
76
-
77
- To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
78
-
79
- Copyright [yyyy] [name of copyright owner]
80
-
81
- Licensed under the Apache License, Version 2.0 (the "License");
82
- you may not use this file except in compliance with the License.
83
- You may obtain a copy of the License at
84
-
85
- http://www.apache.org/licenses/LICENSE-2.0
86
-
87
- Unless required by applicable law or agreed to in writing, software
88
- distributed under the License is distributed on an "AS IS" BASIS,
89
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90
- See the License for the specific language governing permissions and
91
- limitations under the License.
92
- ```
93
-
94
- ### BSD-3-Clause
95
-
96
- Reproduced from the SPDX licence list; @bufbuild/protobuf ships no licence file of its own.
97
-
98
- ```
99
- Copyright (c) <year> <owner>.
100
-
101
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
102
-
103
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
104
-
105
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
106
-
107
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
108
-
109
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
110
- ```
111
-
112
- ## @connectrpc/connect 2.1.2
113
-
114
- Licence: Apache-2.0
115
-
116
- ### Apache-2.0
117
-
118
- Reproduced from the SPDX licence list; @connectrpc/connect ships no licence file of its own.
119
-
120
- ```
121
- Apache License
122
- Version 2.0, January 2004
123
- http://www.apache.org/licenses/
124
-
125
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
126
-
127
- 1. Definitions.
128
-
129
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
130
-
131
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
132
-
133
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
134
-
135
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
136
-
137
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
138
-
139
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
140
-
141
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
142
-
143
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
144
-
145
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
146
-
147
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
148
-
149
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
150
-
151
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
152
-
153
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
154
-
155
- (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
156
-
157
- (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
158
-
159
- (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
160
-
161
- (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
162
-
163
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
164
-
165
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
166
-
167
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
168
-
169
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
170
-
171
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
172
-
173
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
174
-
175
- END OF TERMS AND CONDITIONS
176
-
177
- APPENDIX: How to apply the Apache License to your work.
178
-
179
- To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
180
-
181
- Copyright [yyyy] [name of copyright owner]
182
-
183
- Licensed under the Apache License, Version 2.0 (the "License");
184
- you may not use this file except in compliance with the License.
185
- You may obtain a copy of the License at
186
-
187
- http://www.apache.org/licenses/LICENSE-2.0
188
-
189
- Unless required by applicable law or agreed to in writing, software
190
- distributed under the License is distributed on an "AS IS" BASIS,
191
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192
- See the License for the specific language governing permissions and
193
- limitations under the License.
194
- ```
195
-
196
- ## @connectrpc/connect-node 2.1.2
197
-
198
- Licence: Apache-2.0
199
-
200
- ### Apache-2.0
201
-
202
- Reproduced from the SPDX licence list; @connectrpc/connect-node ships no licence file of its own.
203
-
204
- ```
205
- Apache License
206
- Version 2.0, January 2004
207
- http://www.apache.org/licenses/
208
-
209
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
210
-
211
- 1. Definitions.
212
-
213
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
214
-
215
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
216
-
217
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
218
-
219
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
220
-
221
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
222
-
223
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
224
-
225
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
226
-
227
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
228
-
229
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
230
-
231
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
232
-
233
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
234
-
235
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
236
-
237
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
238
-
239
- (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
240
-
241
- (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
242
-
243
- (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
244
-
245
- (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
246
-
247
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
248
-
249
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
250
-
251
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
252
-
253
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
254
-
255
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
256
-
257
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
258
-
259
- END OF TERMS AND CONDITIONS
260
-
261
- APPENDIX: How to apply the Apache License to your work.
262
-
263
- To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
264
-
265
- Copyright [yyyy] [name of copyright owner]
266
-
267
- Licensed under the Apache License, Version 2.0 (the "License");
268
- you may not use this file except in compliance with the License.
269
- You may obtain a copy of the License at
270
-
271
- http://www.apache.org/licenses/LICENSE-2.0
272
-
273
- Unless required by applicable law or agreed to in writing, software
274
- distributed under the License is distributed on an "AS IS" BASIS,
275
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
276
- See the License for the specific language governing permissions and
277
- limitations under the License.
278
- ```
279
-
280
10
  ## @modelcontextprotocol/sdk 1.30.0
281
11
 
282
12
  Licence: MIT
@@ -305,35 +35,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
305
35
  SOFTWARE.
306
36
  ```
307
37
 
308
- ## @xterm/headless 6.0.0
309
-
310
- Licence: MIT
311
-
312
- ### MIT
313
-
314
- Reproduced from the SPDX licence list; @xterm/headless ships no licence file of its own.
315
-
316
- ```
317
- MIT License
318
-
319
- Copyright (c) <year> <copyright holders>
320
-
321
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
322
- associated documentation files (the "Software"), to deal in the Software without restriction, including
323
- without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
324
- copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
325
- following conditions:
326
-
327
- The above copyright notice and this permission notice shall be included in all copies or substantial
328
- portions of the Software.
329
-
330
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
331
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
332
- EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
333
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
334
- USE OR OTHER DEALINGS IN THE SOFTWARE.
335
- ```
336
-
337
38
  ## ajv 8.20.0
338
39
 
339
40
  Licence: MIT
@@ -540,6 +241,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
540
241
  SOFTWARE.
541
242
  ```
542
243
 
244
+ ## picomatch 4.0.5
245
+
246
+ Licence: MIT
247
+
248
+ ```
249
+ The MIT License (MIT)
250
+
251
+ Copyright (c) 2017-present, Jon Schlinkert.
252
+
253
+ Permission is hereby granted, free of charge, to any person obtaining a copy
254
+ of this software and associated documentation files (the "Software"), to deal
255
+ in the Software without restriction, including without limitation the rights
256
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
257
+ copies of the Software, and to permit persons to whom the Software is
258
+ furnished to do so, subject to the following conditions:
259
+
260
+ The above copyright notice and this permission notice shall be included in
261
+ all copies or substantial portions of the Software.
262
+
263
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
264
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
265
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
266
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
267
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
268
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
269
+ THE SOFTWARE.
270
+ ```
271
+
543
272
  ## readdirp 4.1.2
544
273
 
545
274
  Licence: MIT
package/bin/remote.js ADDED
@@ -0,0 +1,156 @@
1
+ #!/usr/bin/env node
2
+ // The `remote` command of an npm installation (REM-6874). `remote` is a Rust
3
+ // program; npm installs it as one of four optional platform packages
4
+ // (@remotehost/cli-<darwin|linux>-<arm64|x64>, clients/remote/npm), and this
5
+ // file finds the one for this machine and runs it with the terminal
6
+ // inherited, exiting as it exits. Nothing is downloaded: a machine whose
7
+ // package is missing is told why.
8
+ //
9
+ // It tells the program three things through the environment:
10
+ // REMOTEHOST_LAUNCHER this file, which Claims' hooks run again
11
+ // REMOTEHOST_NODE_COMMANDS dist/node-commands.js, the one command that
12
+ // stays in Node (`remote claims`)
13
+ // REMOTEHOST_NODE the Node.js running this file, to run it with
14
+ //
15
+ // Plain JavaScript: it runs on the Node.js of whoever installed the package.
16
+
17
+ import { spawn } from "node:child_process";
18
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
19
+ import { createRequire } from "node:module";
20
+ import { constants } from "node:os";
21
+ import { dirname, join } from "node:path";
22
+ import { fileURLToPath } from "node:url";
23
+
24
+ const CLI_PACKAGE = "@remotehost/cli";
25
+
26
+ /** Node's `${process.platform}-${process.arch}` to the package that holds its program. */
27
+ export const PLATFORM_PACKAGES = {
28
+ "darwin-arm64": "@remotehost/cli-darwin-arm64",
29
+ "darwin-x64": "@remotehost/cli-darwin-x64",
30
+ "linux-x64": "@remotehost/cli-linux-x64",
31
+ "linux-arm64": "@remotehost/cli-linux-arm64",
32
+ };
33
+
34
+ const SUPPORTED = "macOS (arm64, x64) and Linux (arm64, x64)";
35
+
36
+ /**
37
+ * The program for this machine: { binary }, or { message } saying why there
38
+ * is none. `resolve` finds a module as require.resolve does, from this file.
39
+ */
40
+ export function findBinary({ platform, arch, resolve, exists = existsSync, nodeOnlyVersion }) {
41
+ const name = PLATFORM_PACKAGES[`${platform}-${arch}`];
42
+ if (!name) {
43
+ const older = nodeOnlyVersion
44
+ ? [
45
+ `The last version that runs wherever Node.js does is ${nodeOnlyVersion}:`,
46
+ ` npm install -g ${CLI_PACKAGE}@${nodeOnlyVersion}`,
47
+ ]
48
+ : [];
49
+ return {
50
+ message: [
51
+ `remote: ${CLI_PACKAGE} has no build for ${platform} ${arch}. It runs on ${SUPPORTED}.`,
52
+ ...older,
53
+ ].join("\n"),
54
+ };
55
+ }
56
+ let manifest;
57
+ try {
58
+ manifest = resolve(`${name}/package.json`);
59
+ } catch {
60
+ return {
61
+ message: [
62
+ `remote: ${name} is not installed. It holds the remote program for ${platform} ${arch}.`,
63
+ `It is an optional dependency of ${CLI_PACKAGE}, which npm leaves out under --omit=optional or --no-optional, or with omit=optional or optional=false in an .npmrc. Install again with it:`,
64
+ ` npm install -g ${CLI_PACKAGE} --include=optional`,
65
+ ].join("\n"),
66
+ };
67
+ }
68
+ const binary = join(dirname(manifest), "bin", "remote");
69
+ if (!exists(binary)) {
70
+ return {
71
+ message: [
72
+ `remote: ${name} is installed without its program (${binary} is missing). Install again:`,
73
+ ` npm install -g ${CLI_PACKAGE} --include=optional`,
74
+ ].join("\n"),
75
+ };
76
+ }
77
+ return { binary };
78
+ }
79
+
80
+ /** The program's environment: the caller's, and where this installation's Node parts are. */
81
+ export function childEnv(env, { launcher, node }) {
82
+ return {
83
+ ...env,
84
+ REMOTEHOST_LAUNCHER: launcher,
85
+ REMOTEHOST_NODE_COMMANDS: join(dirname(dirname(launcher)), "dist", "node-commands.js"),
86
+ REMOTEHOST_NODE: node,
87
+ };
88
+ }
89
+
90
+ /** The exit status a shell reports for a process a signal ended. */
91
+ export function signalStatus(signal) {
92
+ return 128 + (constants.signals[signal] ?? 0);
93
+ }
94
+
95
+ function nodeOnlyVersion(launcher) {
96
+ try {
97
+ const manifest = JSON.parse(readFileSync(join(dirname(dirname(launcher)), "package.json"), "utf8"));
98
+ const version = manifest.remotehostCli?.nodeOnlyVersion;
99
+ return typeof version === "string" ? version : undefined;
100
+ } catch {
101
+ return undefined;
102
+ }
103
+ }
104
+
105
+ function main() {
106
+ const launcher = realpathSync(fileURLToPath(import.meta.url));
107
+ const require = createRequire(launcher);
108
+ const found = findBinary({
109
+ platform: process.platform,
110
+ arch: process.arch,
111
+ resolve: (specifier) => require.resolve(specifier),
112
+ nodeOnlyVersion: nodeOnlyVersion(launcher),
113
+ });
114
+ if (!found.binary) {
115
+ console.error(found.message);
116
+ process.exit(1);
117
+ }
118
+
119
+ const child = spawn(found.binary, process.argv.slice(2), {
120
+ stdio: "inherit",
121
+ env: childEnv(process.env, { launcher, node: process.execPath }),
122
+ });
123
+
124
+ // Ctrl-C and Ctrl-\ reach the program from the terminal, which signals the
125
+ // whole foreground group: this process only has to outlive it. A signal
126
+ // sent to this process alone (a supervisor's SIGTERM, a closed session's
127
+ // SIGHUP) is passed on.
128
+ const ignored = ["SIGINT", "SIGQUIT"];
129
+ const forwarded = ["SIGTERM", "SIGHUP"];
130
+ const handlers = new Map();
131
+ for (const signal of ignored) handlers.set(signal, () => {});
132
+ for (const signal of forwarded) handlers.set(signal, () => child.kill(signal));
133
+ for (const [signal, handler] of handlers) process.on(signal, handler);
134
+
135
+ child.on("error", (error) => {
136
+ console.error(`remote: could not run ${found.binary}: ${error.message}`);
137
+ process.exit(1);
138
+ });
139
+ child.on("exit", (code, signal) => {
140
+ if (signal === null) process.exit(code ?? 1);
141
+ // End as the program ended, so a shell or a supervisor sees the signal.
142
+ for (const [name, handler] of handlers) process.off(name, handler);
143
+ process.exitCode = signalStatus(signal);
144
+ process.kill(process.pid, signal);
145
+ });
146
+ }
147
+
148
+ function invokedDirectly() {
149
+ try {
150
+ return realpathSync(process.argv[1] ?? "") === realpathSync(fileURLToPath(import.meta.url));
151
+ } catch {
152
+ return false;
153
+ }
154
+ }
155
+
156
+ if (invokedDirectly()) main();