grokbox 0.1.0-alpha.0 → 0.1.0-alpha.6
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 +13 -11
- package/README.zh-CN.md +187 -0
- package/dist/index.js +7 -4
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# grokbox
|
|
2
2
|
|
|
3
|
+
[English](./README.md) | [中文](./README.zh-CN.md)
|
|
4
|
+
|
|
3
5
|
Unofficial CLI and control plane for operating Grok Bot cloud computers from
|
|
4
6
|
inside or outside the box. The canonical command is `grokbox`; `gbox` is an
|
|
5
7
|
exact alias.
|
|
@@ -8,10 +10,10 @@ This project is not affiliated with or endorsed by Anysphere, Cursor, xAI, or
|
|
|
8
10
|
Grok Bot. Grok Bot, Cursor, and related names identify compatible products and
|
|
9
11
|
remain the property of their respective owners.
|
|
10
12
|
|
|
11
|
-
> **Alpha:** current
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
13
|
+
> **Alpha:** current source is `0.1.0-alpha.6`. npm `next` currently points to
|
|
14
|
+
> `0.1.0-alpha.5`; `0.0.1` remains `latest`. `v0.1.0-alpha.1` through
|
|
15
|
+
> `v0.1.0-alpha.4` exist as Git tags only. Prereleases publish only after
|
|
16
|
+
> release checks and explicitly scoped external acceptance.
|
|
15
17
|
|
|
16
18
|
## What it does
|
|
17
19
|
|
|
@@ -191,10 +193,7 @@ their accounts and environments.
|
|
|
191
193
|
|
|
192
194
|
```bash
|
|
193
195
|
bun install --frozen-lockfile
|
|
194
|
-
bun run
|
|
195
|
-
bun test
|
|
196
|
-
bun run verify:package
|
|
197
|
-
bun run release:check
|
|
196
|
+
bun run check
|
|
198
197
|
```
|
|
199
198
|
|
|
200
199
|
The package test builds and packs locally, installs into an isolated system
|
|
@@ -202,7 +201,10 @@ Trash fixture, verifies both aliases under Node, checks the exact package
|
|
|
202
201
|
allowlist, and confirms project and third-party licenses are present. The
|
|
203
202
|
release-candidate workflow builds a downloadable artifact only. Exact version
|
|
204
203
|
tags publish through the separate OIDC Trusted Publishing workflow with npm
|
|
205
|
-
provenance; prereleases use
|
|
204
|
+
provenance; prereleases use `next`, stable versions use `latest`, and a GitHub
|
|
205
|
+
Release is created only after registry readback succeeds. See the
|
|
206
|
+
[release runbook](docs/maintainers/release.md); local release commands only
|
|
207
|
+
precheck and push an immutable tag, never publish from the maintainer machine.
|
|
206
208
|
|
|
207
209
|
Real external validation is intentionally separate and requires explicitly
|
|
208
210
|
injected authorized targets. Set `GROKBOX_EXTERNAL_PACKAGE` to an exact registry
|
|
@@ -223,8 +225,8 @@ lease behavior, or destructive recovery.
|
|
|
223
225
|
- [Changelog](CHANGELOG.md)
|
|
224
226
|
|
|
225
227
|
Current behavior is owned by source and executable tests. Product and
|
|
226
|
-
architecture documents may describe accepted targets; roadmap and
|
|
227
|
-
|
|
228
|
+
architecture documents may describe accepted targets; roadmap entries and
|
|
229
|
+
GitHub issues do not prove delivery.
|
|
228
230
|
|
|
229
231
|
## License
|
|
230
232
|
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# grokbox
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | [中文](./README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
`grokbox` 是一个非官方 CLI 与控制面,用于从 Grok Bot 云电脑内部或外部进行操作。规范命令是 `grokbox`,`gbox` 是完全等价的别名。
|
|
6
|
+
|
|
7
|
+
本项目与 Anysphere、Cursor、xAI 或 Grok Bot 没有隶属或背书关系。Grok Bot、Cursor 及相关名称仅用于标识兼容产品,其权利归各自所有者。
|
|
8
|
+
|
|
9
|
+
> **Alpha:** 当前源码版本是 `0.1.0-alpha.6`。npm 的 `next` dist-tag 目前指向 `0.1.0-alpha.5`;`0.0.1` 仍是 `latest`。`v0.1.0-alpha.1` 到 `v0.1.0-alpha.4` 只存在于 Git tag。只有通过发布检查及明确范围的外部验收后,才会发布新的预发布版本。
|
|
10
|
+
|
|
11
|
+
## 它能做什么
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Profile -> 本机 daemon -> 本机 Grok Bot Gateway
|
|
15
|
+
-> 通过私有 Tailscale Serve 连接远端 daemon
|
|
16
|
+
-> 显式 direct-local 或 Gateway 兼容路径
|
|
17
|
+
-> 显式 Cursor Sandbox 或 quota 兼容适配器
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
已实现的命令族:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
init skills profile daemon doctor recover box quota
|
|
24
|
+
agents groups send history memory events is
|
|
25
|
+
fs exec jobs desktop
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
主要能力:
|
|
29
|
+
|
|
30
|
+
- 严格区分本机与远端 Profile,并分离不同凭据权威;
|
|
31
|
+
- 有限的 Unix socket/loopback daemon 与私有 Tailscale Serve 映射;
|
|
32
|
+
- Agent/Group 管理、消息发送、Transcript、Memory 和有界事件读取;
|
|
33
|
+
- 通过命名根目录治理文件读取与变更;
|
|
34
|
+
- 字面量结构化执行、持久 Job 和有界日志;
|
|
35
|
+
- 分层只读诊断与显式恢复;
|
|
36
|
+
- 可选的 Sandbox 生命周期、quota 与桌面兼容适配器。
|
|
37
|
+
|
|
38
|
+
Daemon 不提供通用 raw RPC 或任意 shell。仅有 Gateway 权限的 Profile 不会获得 host 文件系统或进程权限。
|
|
39
|
+
|
|
40
|
+
## 前置条件与平台支持
|
|
41
|
+
|
|
42
|
+
- 发布版 CLI 运行时需要 Node.js 20+。
|
|
43
|
+
- 源码开发与发布前源码 shim 需要 Bun 1.3.14。
|
|
44
|
+
- 需要一个你拥有或获准使用的 Grok Bot 云电脑。
|
|
45
|
+
- 远程 bootstrap/recovery 需要 Tailscale 与 BatchMode SSH;bootstrap 还需要本机 npm 或 Bun,以便重新打包已安装运行时并传输。
|
|
46
|
+
|
|
47
|
+
| 角色 | 支持或已测试平台 |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| 源码开发 | Linux 与 macOS |
|
|
50
|
+
| Node CLI | Linux 与 macOS |
|
|
51
|
+
| Box daemon、文件、Jobs、desktop | Linux |
|
|
52
|
+
| Keychain secret reference | macOS |
|
|
53
|
+
| Windows | 当前不支持,也未测试 |
|
|
54
|
+
|
|
55
|
+
## 五分钟源码快速开始
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone https://github.com/yoyooyooo/grokbox.git
|
|
59
|
+
cd grokbox
|
|
60
|
+
bun install --frozen-lockfile
|
|
61
|
+
bun run typecheck
|
|
62
|
+
bun run grokbox -- --help
|
|
63
|
+
bun run grokbox -- doctor
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`doctor` 是只读命令。它会分别报告各项边界,不会唤醒 Sandbox、修改 Tailscale Serve、启动 daemon 或轮换凭据。
|
|
67
|
+
|
|
68
|
+
在运行中的 Grok Bot box 内,没有 Profile 文件时,`default` Profile 会从 `/home/box/sand-data/gateway.json` 发现 loopback Gateway。若既没有本机 Gateway,也没有已配置 Profile,命令会安全失败。
|
|
69
|
+
|
|
70
|
+
## 安装
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install --global grokbox@next
|
|
74
|
+
grokbox --version
|
|
75
|
+
gbox --help
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
需要 Node.js 20 或更高版本。发布后的 package 不需要 Bun。
|
|
79
|
+
|
|
80
|
+
## 源码驱动的全局 shim
|
|
81
|
+
|
|
82
|
+
若要验证尚未发布的 checkout,可把 `grokbox` 和 `gbox` 安装到 `~/.local/bin`,并让它们通过 Bun 直接执行 TypeScript 入口:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
bun run shim:install
|
|
86
|
+
grokbox --version
|
|
87
|
+
gbox --help
|
|
88
|
+
grokbox doctor
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
安装器可幂等运行,以原子方式写入两个别名,拒绝覆盖无关命令,并从仓库外验证每个命令。它记录 checkout 与 Bun 的绝对路径,因此仓库或 Bun 可执行文件移动后需要重新运行。该路径用于验证本机真实源码,不替代 Node tarball 验证。
|
|
92
|
+
|
|
93
|
+
## 远程初始化
|
|
94
|
+
|
|
95
|
+
先发现和诊断,再显式执行特权 bootstrap:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
grokbox init remote --peer <tailnet-peer>
|
|
99
|
+
grokbox doctor --profile remote
|
|
100
|
+
|
|
101
|
+
# 安装或替换 grokbox daemon、轮换 daemon 凭据,并且只应用被记录的
|
|
102
|
+
# 私有 Serve 映射。需要 BatchMode SSH 与明确确认。
|
|
103
|
+
grokbox init remote --peer <tailnet-peer> --bootstrap --yes
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
读取 home 是单独的权限变化,不会由 bootstrap 隐式开启:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
grokbox init remote --peer <tailnet-peer> --bootstrap --admit-home-read --yes
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
启用 host 能力前,请审阅命名文件系统根目录和进程 allowlist。
|
|
113
|
+
|
|
114
|
+
## 常用安全探针
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
grokbox profile list --table
|
|
118
|
+
grokbox doctor
|
|
119
|
+
grokbox daemon status
|
|
120
|
+
grokbox agents list --table
|
|
121
|
+
grokbox groups list --table
|
|
122
|
+
grokbox history tail <target> --limit 20
|
|
123
|
+
grokbox memory list <agent>
|
|
124
|
+
grokbox fs stat workspace:/artifact.txt
|
|
125
|
+
grokbox jobs list --table
|
|
126
|
+
grokbox desktop status --table
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
变更命令需要显式 capability;破坏性操作还需要显式确认。`desktop prune run` 默认 dry-run;传入 `--yes` 后会调用上游 stop-window 路径,并删除该 fork 的 Chrome profile。
|
|
130
|
+
|
|
131
|
+
## 凭据
|
|
132
|
+
|
|
133
|
+
不要把 Gateway、daemon、Sandbox、quota、SSH 或 tailnet 凭据放进 argv、Issue、fixture、snapshot 或普通日志。
|
|
134
|
+
|
|
135
|
+
Secret reference 按用途区分:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
env:<NAME>
|
|
139
|
+
file:<absolute-path>
|
|
140
|
+
keychain:<service>/<account>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`file:` 必须指向当前 POSIX 用户拥有、group/other 无权限位的普通文件;拒绝符号链接。Profile 不保存 inline token。Gateway、daemon、Sandbox 与 quota 凭据是分离的 capability,不能互相替代。
|
|
144
|
+
|
|
145
|
+
## 实验性兼容表面
|
|
146
|
+
|
|
147
|
+
Grok Bot Gateway method、Cursor Sandbox RPC、Cursor Web quota endpoint 和 Grok Bot desktop 布局都不是上游公开 API,可能无预警失效,也不表示 provider 背书或授权。
|
|
148
|
+
|
|
149
|
+
尤其需要注意:
|
|
150
|
+
|
|
151
|
+
- 已观察到官方 Cursor OAuth 可读取 Sandbox 状态,但调用 `EnsureSandBox` 会收到 401;
|
|
152
|
+
- 无 App 唤醒及 24–72 小时 keeper 行为不是稳定承诺;
|
|
153
|
+
- quota 需要显式独立来源,并受来源本地账号绑定;
|
|
154
|
+
- desktop prune 依赖 Linux/布局,确认执行时具有破坏性。
|
|
155
|
+
|
|
156
|
+
使用这些表面前,请阅读[兼容性与上游边界](docs/compatibility.md)。用户需要自行遵守其账号和环境适用的条款与政策。
|
|
157
|
+
|
|
158
|
+
## 开发与验证
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
bun install --frozen-lockfile
|
|
162
|
+
bun run check
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Package 测试会在本机构建和打包,把产物安装到隔离的系统 Trash fixture,用 Node 验证两个别名,核对精确 package allowlist,并确认项目与第三方许可证存在。`Release candidate artifact` workflow 只生成可下载产物,不会发布。
|
|
166
|
+
|
|
167
|
+
只有精确版本 tag 才会触发独立的 OIDC Trusted Publishing workflow:预发布版本进入 npm `next`,稳定版本进入 `latest`;registry 版本、channel 与 provenance 回读成功后才创建 GitHub Release。详见[发布手册](docs/maintainers/release.md)。本机 release 命令只做预检与推送不可变 tag,不会从维护者机器发布 npm。
|
|
168
|
+
|
|
169
|
+
真实外部验证保持独立,并要求显式注入获授权的目标。设置 `GROKBOX_EXTERNAL_PACKAGE=grokbox@<version>`,可验证用户实际安装的精确 registry 版本,而不是本机 tarball。Fake-provider 或 local-real 结果不能证明 provider 授权、长期 lease 行为或破坏性恢复能力。
|
|
170
|
+
|
|
171
|
+
## 文档
|
|
172
|
+
|
|
173
|
+
- [文档地图](docs/README.md)
|
|
174
|
+
- [产品契约](docs/product-contract.md)
|
|
175
|
+
- [架构](docs/architecture.md)
|
|
176
|
+
- [兼容性边界](docs/compatibility.md)
|
|
177
|
+
- [上游集成事实](docs/upstream-integration.md)
|
|
178
|
+
- [安全策略](SECURITY.md)
|
|
179
|
+
- [支持](SUPPORT.md)
|
|
180
|
+
- [贡献指南](CONTRIBUTING.md)
|
|
181
|
+
- [变更日志](CHANGELOG.md)
|
|
182
|
+
|
|
183
|
+
当前行为由源码和可执行测试决定。产品与架构文档可能描述已接受目标;roadmap 和 GitHub Issue 不能证明功能已经交付。
|
|
184
|
+
|
|
185
|
+
## 许可证
|
|
186
|
+
|
|
187
|
+
MIT,见 [`LICENSE`](LICENSE)。发布包中的第三方归属见 [`THIRD_PARTY_NOTICES`](THIRD_PARTY_NOTICES)。
|
package/dist/index.js
CHANGED
|
@@ -3474,14 +3474,14 @@ import { fileURLToPath } from "node:url";
|
|
|
3474
3474
|
// package.json
|
|
3475
3475
|
var package_default = {
|
|
3476
3476
|
name: "grokbox",
|
|
3477
|
-
version: "0.1.0-alpha.
|
|
3477
|
+
version: "0.1.0-alpha.6",
|
|
3478
3478
|
packageManager: "bun@1.3.14",
|
|
3479
3479
|
description: "Unofficial CLI and control plane for Grok Bot cloud computers",
|
|
3480
3480
|
license: "MIT",
|
|
3481
3481
|
author: "grokbox contributors",
|
|
3482
3482
|
repository: {
|
|
3483
3483
|
type: "git",
|
|
3484
|
-
url: "
|
|
3484
|
+
url: "https://github.com/yoyooyooo/grokbox.git"
|
|
3485
3485
|
},
|
|
3486
3486
|
homepage: "https://github.com/yoyooyooo/grokbox#readme",
|
|
3487
3487
|
bugs: {
|
|
@@ -3524,7 +3524,10 @@ var package_default = {
|
|
|
3524
3524
|
test: "bun test",
|
|
3525
3525
|
typecheck: "tsc --noEmit -p tsconfig.json",
|
|
3526
3526
|
"verify:package": "bun test test/packaging.test.ts",
|
|
3527
|
-
|
|
3527
|
+
check: "bun run typecheck && bun test && bun run verify:package",
|
|
3528
|
+
"release:check": "bun run check",
|
|
3529
|
+
"release:precheck": "bun run scripts/release.ts --precheck",
|
|
3530
|
+
release: "bun run scripts/release.ts",
|
|
3528
3531
|
"verify:external": "node scripts/verify-external.mjs",
|
|
3529
3532
|
"observe:sandbox": "node scripts/observe-sandbox.mjs",
|
|
3530
3533
|
"experiment:sandbox-ssh-activity": "node scripts/experiment-sandbox-ssh-activity.mjs",
|
|
@@ -4596,7 +4599,7 @@ var EXAMPLES = [
|
|
|
4596
4599
|
"grokbox agents list --table",
|
|
4597
4600
|
"grokbox groups list --table",
|
|
4598
4601
|
'grokbox history search "deployment status" --limit 10',
|
|
4599
|
-
'grokbox send
|
|
4602
|
+
'grokbox send alpha --expect-kind agent --text "hello"',
|
|
4600
4603
|
"printf '%s' 'summarize the current blockers' | grokbox send ops --expect-kind group",
|
|
4601
4604
|
"grokbox history tail <agent-id> --limit 50",
|
|
4602
4605
|
"grokbox history thread <agent-id> --root <entry-id>",
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grokbox",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Unofficial CLI and control plane for Grok Bot cloud computers",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grokbox contributors",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "
|
|
10
|
+
"url": "https://github.com/yoyooyooo/grokbox.git"
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/yoyooyooo/grokbox#readme",
|
|
13
13
|
"bugs": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public",
|
|
41
|
-
"provenance":
|
|
41
|
+
"provenance": false
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --banner:js=\"import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);\" --outfile=dist/index.js",
|
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
"test": "bun test",
|
|
51
51
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
52
52
|
"verify:package": "bun test test/packaging.test.ts",
|
|
53
|
-
"
|
|
53
|
+
"check": "bun run typecheck && bun test && bun run verify:package",
|
|
54
|
+
"release:check": "bun run check",
|
|
55
|
+
"release:precheck": "bun run scripts/release.ts --precheck",
|
|
56
|
+
"release": "bun run scripts/release.ts",
|
|
54
57
|
"verify:external": "node scripts/verify-external.mjs",
|
|
55
58
|
"observe:sandbox": "node scripts/observe-sandbox.mjs",
|
|
56
59
|
"experiment:sandbox-ssh-activity": "node scripts/experiment-sandbox-ssh-activity.mjs",
|