@delta-infra/cli 1.1.26 → 1.1.27
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
|
@@ -282,7 +282,7 @@ delta-cli sandbox operation <request_id>
|
|
|
282
282
|
| `delta-cli sandbox run-bg <id> --command "..." [--timeout <秒>] [--wait] [--cancel-on-timeout] [--format sse\|json] [--json-result] [--summary/--no-summary] [--artifacts]` | 后台运行命令;不加 `--wait` 立即返回 `{execution_id, sandbox_id}`(`--format json` 时为统一结果对象,`finished=false`);加 `--wait` 通过 SSE 实时流跟随(默认透传原始 `data:` 帧);`--format json` 时只输出一个与 `sandbox run --format json` 相同结构的信封。**等待超时** → `error.type=timeout`、进程**非零退出**,`error.details` 保留 `sandbox_id`/`execution_id`/`remote_state`(`not_cancelled`/`cancelled`/`cancel_failed`)以便事后查询或取消;`remote_state=not_cancelled` 表示**只是本地停止等待,远端命令可能仍在运行**。默认不取消远端命令,加 `--cancel-on-timeout` 才会下发取消(取消失败时报 `cancel_failed`) |
|
|
283
283
|
| `delta-cli sandbox logs <id> --execution-id <eid> [--tail N --grep <pattern> --context N --max-bytes N]` | 查看后台日志;默认返回 `stderr_size + stderr_tail`(避免上下文爆炸);可用 `--tail/--grep` 过滤 |
|
|
284
284
|
| `delta-cli sandbox cancel <id> --execution-id <eid>` | 中断后台命令 |
|
|
285
|
-
| `delta-cli sandbox read <id> --path <path> [--output <本地路径>] [--tail N] [--grep <pattern>] [--offset N] [--limit N] [--context N] [--max-bytes N] [--parse-json]` | 读取容器内文件;`--output <path>` 保存到本地;`--tail/--grep` 过滤。**整份拷贝(不带 `--tail/--grep/--offset/--limit/--max-bytes`)走分块下载通道,字节精确**(二进制安全,响应含 `byte_exact:true`/`integrity:"sha256"`/`digest_verified`);带上述过滤参数时走文本通道(服务端按 UTF-8 解码,非法字节会被替换为 U+FFFD),此时响应含 `byte_exact:false`/`integrity:"text_decoded"` 且 stderr 给出警告——**二进制文件请用 `sandbox pull`
|
|
285
|
+
| `delta-cli sandbox read <id> --path <path> [--output <本地路径>] [--tail N] [--grep <pattern>] [--offset N] [--limit N] [--context N] [--max-bytes N] [--parse-json]` | 读取容器内文件;`--output <path>` 保存到本地;`--tail/--grep` 过滤。**整份拷贝(不带 `--tail/--grep/--offset/--limit/--max-bytes`)走分块下载通道,字节精确**(二进制安全,响应含 `byte_exact:true`/`integrity:"sha256"`/`digest_verified`);带上述过滤参数时走文本通道(服务端按 UTF-8 解码,非法字节会被替换为 U+FFFD),此时响应含 `byte_exact:false`/`integrity:"text_decoded"` 且 stderr 给出警告——**二进制文件请用 `sandbox pull` 拷贝**。**直接输出到 stdout 时**,若文件不是合法 UTF-8,`content` 是有损文本,精确原始字节放在 `content_base64`(base64 解码即为原文件),并标记 `byte_exact:true`;纯文本文件不返回该字段 |
|
|
286
286
|
| `delta-cli sandbox pull <id> --source <沙箱路径> --target <本地路径> [--pattern <glob>] [--concurrency N] [--no-resume] [--no-verify]` | 从沙箱拉取文件/目录到本地(mirror of `upload`,flag 方向相反:source=远程,target=本地)。**目录始终递归**(`--recursive` 已废弃,无需再加);走**分块下载**通道:二进制安全、端到端 **sha256** 校验(响应含 `digest_verified`)、**可断点续传**(`.delta.part`)、多文件/多块**并行**传输(`--concurrency`,默认 4),因此不受单条命令 300s 超时限制。服务端公开的上限随每次响应返回(`limits`):块大小 4 MiB(最大 16 MiB)、单文件最大 100 GiB、每块超时 120s、整文件摘要超时 600s。`--no-resume` 忽略残留的 `.delta.part`,`--no-verify` 跳过沙箱侧 sha256 比对 |
|
|
287
287
|
| `delta-cli sandbox write <id> --path <path> --source <本地路径>` | 写入文件。**二进制安全**:内容按 base64 传输,CLI 同时声明 `size`/`sha256`,服务端在落盘前核对,不匹配直接拒绝;响应含 `server_sha256`/`sha256`/`size`/`size_verified`。超过 32 MiB 的 `--source` 走流式上传通道,不整份读入内存 |
|
|
288
288
|
| `delta-cli sandbox write-multiple <id> --entry <远程路径>=<本地路径>` | 批量写入 |
|
package/checksums.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
7ea661fb3ded3ea488d109627f3ea77fc66338dbf3afea0d26e057dbb2c1fee9 delta-cli-darwin-amd64.tar.gz
|
|
2
|
+
d77d563f5afd01f9ba455eadae9364088593c9da85409a14478778683386c5d2 delta-cli-darwin-arm64.tar.gz
|
|
3
|
+
6cb42b875bb8ca6fccc0c644a734a07fb70f638946f5011c7be3f14e373eee80 delta-cli-linux-amd64.tar.gz
|
|
4
|
+
6e5cab67adedc7626f8580bf73d1368141165ae5aee6d475c601004ebdddc2c2 delta-cli-linux-arm64.tar.gz
|
|
5
|
+
7ee96731fd4d367e9fe83616295459b461a1885a34a8fc5744b100c1d815d9a0 delta-cli-windows-amd64.zip
|
package/package.json
CHANGED
|
@@ -174,7 +174,7 @@ The reason is that, after running a command, this skill reads `log_file` from th
|
|
|
174
174
|
| List active tunnels | `sandbox exposes <id>` — list the public tunnels currently active for this sandbox |
|
|
175
175
|
| Reclaim a tunnel | `sandbox dispose <id> --port N` — explicitly reclaim a single tunnel (stop frpc and release the public port); killing the sandbox also reclaims all its tunnels |
|
|
176
176
|
| **File operations** | |
|
|
177
|
-
| Read a file | `sandbox read <id> --path <path> [--output <local-path> --tail N --grep <pattern> --offset N --limit N --context N --max-bytes N --parse-json]` — **a full copy is byte-exact** (chunked download, sha256-verified); with `--tail`/`--grep`/`--offset`/`--limit` it uses the text channel and the envelope reports `byte_exact:false` — use `sandbox pull` for binary files |
|
|
177
|
+
| Read a file | `sandbox read <id> --path <path> [--output <local-path> --tail N --grep <pattern> --offset N --limit N --context N --max-bytes N --parse-json]` — **a full copy is byte-exact** (chunked download, sha256-verified); with `--tail`/`--grep`/`--offset`/`--limit` it uses the text channel and the envelope reports `byte_exact:false` — use `sandbox pull` for binary files. Printed inline, a non-UTF-8 file puts the **exact bytes** in `content_base64` (`content` is the lossy text) |
|
|
178
178
|
| Pull a file/directory | `sandbox pull <id> --source <sandbox-path> --target <local-path> [--pattern <glob>] [--concurrency N] [--no-resume] [--no-verify]` — pull a single file or **recursively** pull a directory (directories are always recursive), over the **chunked** path: binary-safe, sha256-verified, resumable and parallel (the reverse of upload: source=remote, target=local) |
|
|
179
179
|
| View the working directory | `sandbox working-directory <id>` (returns `data.path`, such as `/workspace/{user_id}/{sandbox_id}`) |
|
|
180
180
|
| Write a file | `sandbox write <id> --source <filename>` (without `--path`, writes to the working directory by default); **every sandbox-side path** — `--path`, the remote part of `write-multiple --entry`, `upload --target`, `pull --source`, `run`/`run-bg --log-file` — is prefixed with the working directory when relative, while an absolute path is used as given. The content is **binary-safe** (base64) and the server verifies the declared `size`/`sha256` before writing, so the response's `server_sha256`/`size_verified` can be compared with the local file |
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
| Command | Description |
|
|
40
40
|
|------|------|
|
|
41
|
-
| `sandbox read <id> --path <path> [--output <local-path>] [--tail N] [--grep <pattern>] [--offset N] [--limit N] [--context N] [--max-bytes N] [--parse-json]` | Read a file; returns `content` + `size` + `content_length`. `--output <path>` saves it locally; `--tail`/`--grep` filter the output. **A full copy (no `--tail`/`--grep`/`--offset`/`--limit`/`--max-bytes`) is byte-exact**: it goes through the chunked download path (binary-safe, sha256-verified — the envelope reports `byte_exact:true`, `integrity:"sha256"`, `digest_verified`). With any range filter it falls back to the text channel, where the server decodes as UTF-8 and replaces invalid bytes with U+FFFD; the envelope then reports `byte_exact:false` / `integrity:"text_decoded"` and a warning is printed to stderr. **Use `sandbox pull` to copy a binary file.** |
|
|
41
|
+
| `sandbox read <id> --path <path> [--output <local-path>] [--tail N] [--grep <pattern>] [--offset N] [--limit N] [--context N] [--max-bytes N] [--parse-json]` | Read a file; returns `content` + `size` + `content_length`. `--output <path>` saves it locally; `--tail`/`--grep` filter the output. **A full copy (no `--tail`/`--grep`/`--offset`/`--limit`/`--max-bytes`) is byte-exact**: it goes through the chunked download path (binary-safe, sha256-verified — the envelope reports `byte_exact:true`, `integrity:"sha256"`, `digest_verified`). With any range filter it falls back to the text channel, where the server decodes as UTF-8 and replaces invalid bytes with U+FFFD; the envelope then reports `byte_exact:false` / `integrity:"text_decoded"` and a warning is printed to stderr. **Use `sandbox pull` to copy a binary file.** When the result is printed inline and the file is not valid UTF-8, `content` is the lossy text and the **exact original bytes** are in `content_base64` (base64-decode it); the envelope is marked `byte_exact:true`. Text files carry no `content_base64`. |
|
|
42
42
|
| `sandbox working-directory <id>` | Get the sandbox's current working directory (absolute path `/workspace/{user_id}/{sandbox_id}`). |
|
|
43
43
|
| `sandbox write <id> [--path <path>] --source <filename>` | Write a file (recommended). If `--path` is omitted, write to the working directory (`<working-directory>/<filename>`); a relative `--path` is also resolved under the working directory. An absolute `--path` is used as-is (but the `/workspace/<filename>` root path is outside the OSS sync scope and is not recommended). **Binary-safe**: the content travels as base64 and the CLI declares its `size`/`sha256`, which the server verifies before writing (a mismatch is rejected). The response carries `server_sha256`/`sha256`/`size`/`size_verified`. |
|
|
44
44
|
| `sandbox write <id> --path <absolute-path> --data "..."` | Write a small amount of inline content (`--data` has no source filename, so `--path` must be specified explicitly). |
|