@runko/sandbox-cloudflare 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_protocol = require("./protocol-BXejIk9L.cjs");
2
+ const require_protocol = require("./protocol-D2yl5XDr.cjs");
3
3
  let _runko_virtual_fs = require("@runko/virtual-fs");
4
4
  require("zod");
5
5
  //#region src/index.ts
6
6
  /**
7
7
  * `.`:Cloudflare Sandbox 网关的纯 fetch 客户端(任意 Node ≥20 进程)——`cloudflareWorkspace(opts)`
8
- * 返回 `RunkoFS & RunkoExec`,供 `createSession({ workspace })` 一次注入(docs/tech/core-sdk.md §4.5a 模式 A)。
8
+ * 返回 `RunkoFS & RunkoExec`,供 `createSession({ workspace })` 一次注入(docs/logic/engine/tech/core-sdk.md §4.5a 模式 A)。
9
9
  * 本文件与 `./worker`(`src/worker.ts`)通过 `src/protocol.ts` 的 zod schema 共用同一份 wire 契约;
10
10
  * 不 import `@cloudflare/sandbox`——这一侧只说 HTTP,不知道也不需要知道对面跑的是不是真沙盒。
11
11
  */
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { _ as readdirResponseSchema, a as SANDBOX_ID_HEADER, b as statResponseSchema, d as globResponseSchema, h as readResponseSchema, l as execStreamEventSchema, o as errorBodySchema, p as okResponseSchema, r as ENDPOINTS, t as AUTH_HEADER } from "./protocol-Dj8Yv54w.js";
1
+ import { _ as readdirResponseSchema, a as SANDBOX_ID_HEADER, b as statResponseSchema, d as globResponseSchema, h as readResponseSchema, l as execStreamEventSchema, o as errorBodySchema, p as okResponseSchema, r as ENDPOINTS, t as AUTH_HEADER } from "./protocol-ywoFC_oN.js";
2
2
  import { DirectoryNotEmptyError, NotFoundError, normalizePath } from "@runko/virtual-fs";
3
3
  import "zod";
4
4
  //#region src/index.ts
5
5
  /**
6
6
  * `.`:Cloudflare Sandbox 网关的纯 fetch 客户端(任意 Node ≥20 进程)——`cloudflareWorkspace(opts)`
7
- * 返回 `RunkoFS & RunkoExec`,供 `createSession({ workspace })` 一次注入(docs/tech/core-sdk.md §4.5a 模式 A)。
7
+ * 返回 `RunkoFS & RunkoExec`,供 `createSession({ workspace })` 一次注入(docs/logic/engine/tech/core-sdk.md §4.5a 模式 A)。
8
8
  * 本文件与 `./worker`(`src/worker.ts`)通过 `src/protocol.ts` 的 zod schema 共用同一份 wire 契约;
9
9
  * 不 import `@cloudflare/sandbox`——这一侧只说 HTTP,不知道也不需要知道对面跑的是不是真沙盒。
10
10
  */
@@ -1,7 +1,7 @@
1
1
  let zod = require("zod");
2
2
  //#region src/protocol.ts
3
3
  /**
4
- * `@runko/sandbox-cloudflare` 网关协议(tech-spec 见 docs/tech/sandbox.md
4
+ * `@runko/sandbox-cloudflare` 网关协议(tech-spec 见 docs/host/contract/tech/sandbox.md
5
5
  * §8.3):`.`(客户端)与 `./worker`(网关)两端共用同一份 zod schema——schema 是
6
6
  * wire 契约的唯一事实来源,两端各自 `parse()` 校验后再消费,任何一端改了字段形状
7
7
  * 都会在另一端的 parse() 上炸出来,而不是悄悄读到 `undefined`。
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  //#region src/protocol.ts
3
3
  /**
4
- * `@runko/sandbox-cloudflare` 网关协议(tech-spec 见 docs/tech/sandbox.md
4
+ * `@runko/sandbox-cloudflare` 网关协议(tech-spec 见 docs/host/contract/tech/sandbox.md
5
5
  * §8.3):`.`(客户端)与 `./worker`(网关)两端共用同一份 zod schema——schema 是
6
6
  * wire 契约的唯一事实来源,两端各自 `parse()` 校验后再消费,任何一端改了字段形状
7
7
  * 都会在另一端的 parse() 上炸出来,而不是悄悄读到 `undefined`。
package/dist/worker.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_protocol = require("./protocol-BXejIk9L.cjs");
2
+ const require_protocol = require("./protocol-D2yl5XDr.cjs");
3
3
  let _runko_virtual_fs = require("@runko/virtual-fs");
4
4
  require("zod");
5
5
  //#region src/worker.ts
@@ -7,7 +7,7 @@ require("zod");
7
7
  * `./worker`:Cloudflare Sandbox 网关(部署在宿主自己的 wrangler 项目里)。
8
8
  * 把 `src/protocol.ts` 的八个端点翻译成对注入的 `CfSandboxLike` 的调用——本文件
9
9
  * **零 `@cloudflare/sandbox` import**(该包加载依赖 `cloudflare:workers` 内置模块,
10
- * Node 下不可加载,见 docs/tech/sandbox.md §8.2/§4"包本体零
10
+ * Node 下不可加载,见 docs/host/contract/tech/sandbox.md §8.2/§4"包本体零
11
11
  * cloudflare import"):`CfSandboxLike` 是以该包 0.12.3 版本 `ISandbox` d.ts 为
12
12
  * 蓝本手写的结构化最小子集,真实装配(`getSandbox(env.Sandbox, id)` 返回值天然
13
13
  * 结构兼容本接口)留给宿主项目经 `createSandboxGateway({ getSandbox })` 注入。
package/dist/worker.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as execRequestSchema, f as mkdirRequestSchema, g as readdirRequestSchema, i as NDJSON_CONTENT_TYPE, m as readRequestSchema, r as ENDPOINTS, s as execExitEventSchema, u as globRequestSchema, v as rmRequestSchema, x as writeRequestSchema, y as statRequestSchema } from "./protocol-Dj8Yv54w.js";
1
+ import { c as execRequestSchema, f as mkdirRequestSchema, g as readdirRequestSchema, i as NDJSON_CONTENT_TYPE, m as readRequestSchema, r as ENDPOINTS, s as execExitEventSchema, u as globRequestSchema, v as rmRequestSchema, x as writeRequestSchema, y as statRequestSchema } from "./protocol-ywoFC_oN.js";
2
2
  import { basename, dirname, matchesGlob, normalizePath } from "@runko/virtual-fs";
3
3
  import "zod";
4
4
  //#region src/worker.ts
@@ -6,7 +6,7 @@ import "zod";
6
6
  * `./worker`:Cloudflare Sandbox 网关(部署在宿主自己的 wrangler 项目里)。
7
7
  * 把 `src/protocol.ts` 的八个端点翻译成对注入的 `CfSandboxLike` 的调用——本文件
8
8
  * **零 `@cloudflare/sandbox` import**(该包加载依赖 `cloudflare:workers` 内置模块,
9
- * Node 下不可加载,见 docs/tech/sandbox.md §8.2/§4"包本体零
9
+ * Node 下不可加载,见 docs/host/contract/tech/sandbox.md §8.2/§4"包本体零
10
10
  * cloudflare import"):`CfSandboxLike` 是以该包 0.12.3 版本 `ISandbox` d.ts 为
11
11
  * 蓝本手写的结构化最小子集,真实装配(`getSandbox(env.Sandbox, id)` 返回值天然
12
12
  * 结构兼容本接口)留给宿主项目经 `createSandboxGateway({ getSandbox })` 注入。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runko/sandbox-cloudflare",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "RunkoFS & RunkoExec 同源工作区:适配 Cloudflare Sandbox(网关形态——`.` 纯 fetch 客户端跑在任意 Node,`./worker` 网关部署在宿主 wrangler 项目)",
5
5
  "type": "module",
6
6
  "license": "ISC",
@@ -45,24 +45,24 @@
45
45
  "files": [
46
46
  "dist"
47
47
  ],
48
+ "dependencies": {
49
+ "zod": "^4.4.3",
50
+ "@runko/virtual-fs": "^0.1.3",
51
+ "@runko/core": "^0.2.0"
52
+ },
53
+ "devDependencies": {
54
+ "@cloudflare/sandbox": "^0.12.3",
55
+ "@types/node": "^24.13.3",
56
+ "ai": "^7.0.20",
57
+ "tsdown": "^0.22.4",
58
+ "typescript": "^7.0.2",
59
+ "vitest": "^4.1.10"
60
+ },
48
61
  "scripts": {
49
62
  "build": "tsdown",
50
63
  "typecheck": "tsc --noEmit",
51
64
  "lint": "eslint . --report-unused-disable-directives --max-warnings 0",
52
65
  "lint:fix": "eslint . --fix",
53
66
  "test": "vitest run"
54
- },
55
- "dependencies": {
56
- "@runko/core": "^0.1.1",
57
- "@runko/virtual-fs": "^0.1.1",
58
- "zod": "catalog:"
59
- },
60
- "devDependencies": {
61
- "@cloudflare/sandbox": "catalog:",
62
- "@types/node": "catalog:",
63
- "ai": "catalog:",
64
- "tsdown": "catalog:",
65
- "typescript": "catalog:",
66
- "vitest": "catalog:"
67
67
  }
68
- }
68
+ }