downcity 1.1.362 → 1.1.364

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.
@@ -4,9 +4,13 @@
4
4
  * 关键点(中文)
5
5
  * - 只有 CLI 可根据当前宿主自动选择平台实现。
6
6
  * - 动态导入严格收敛在此模块,使非当前系统的 optional package 不会被解析或安装。
7
- * - Windows 当前选择实验 MXC adapter;未来更换默认实现只需修改本组合根。
7
+ * - Windows 默认保留 MXC;只有用户显式设置 DC_WINDOWS_SANDBOX=srt 时才启用 SRT Alpha。
8
8
  */
9
9
  import type { ShellSandboxAdapter } from "@downcity/shell";
10
+ /** Windows CLI 当前支持的 sandbox backend 选择。 */
11
+ export type WindowsSandboxSelection = "mxc" | "srt";
12
+ /** 解析 Windows sandbox 显式选择;未配置时继续使用 MXC。 */
13
+ export declare function resolve_windows_sandbox_selection(env?: NodeJS.ProcessEnv): WindowsSandboxSelection;
10
14
  /** 为当前 CLI 宿主创建唯一的平台 Sandbox Adapter。 */
11
15
  export declare function create_platform_sandbox(): Promise<ShellSandboxAdapter>;
12
16
  //# sourceMappingURL=PlatformSandbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformSandbox.d.ts","sourceRoot":"","sources":["../../../src/city/sandbox/PlatformSandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,yCAAyC;AACzC,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAc5E"}
1
+ {"version":3,"file":"PlatformSandbox.d.ts","sourceRoot":"","sources":["../../../src/city/sandbox/PlatformSandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,4CAA4C;AAC5C,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpD,4CAA4C;AAC5C,wBAAgB,iCAAiC,CAC/C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,uBAAuB,CAMzB;AAED,yCAAyC;AACzC,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAkB5E"}
@@ -4,8 +4,15 @@
4
4
  * 关键点(中文)
5
5
  * - 只有 CLI 可根据当前宿主自动选择平台实现。
6
6
  * - 动态导入严格收敛在此模块,使非当前系统的 optional package 不会被解析或安装。
7
- * - Windows 当前选择实验 MXC adapter;未来更换默认实现只需修改本组合根。
7
+ * - Windows 默认保留 MXC;只有用户显式设置 DC_WINDOWS_SANDBOX=srt 时才启用 SRT Alpha。
8
8
  */
9
+ /** 解析 Windows sandbox 显式选择;未配置时继续使用 MXC。 */
10
+ export function resolve_windows_sandbox_selection(env = process.env) {
11
+ const selection = String(env.DC_WINDOWS_SANDBOX || "mxc").trim().toLowerCase();
12
+ if (selection === "mxc" || selection === "srt")
13
+ return selection;
14
+ throw new Error(`Unsupported DC_WINDOWS_SANDBOX value: ${selection}. Expected mxc or srt.`);
15
+ }
9
16
  /** 为当前 CLI 宿主创建唯一的平台 Sandbox Adapter。 */
10
17
  export async function create_platform_sandbox() {
11
18
  if (process.platform === "darwin") {
@@ -17,6 +24,10 @@ export async function create_platform_sandbox() {
17
24
  return new LinuxBubblewrapSandbox();
18
25
  }
19
26
  if (process.platform === "win32") {
27
+ if (resolve_windows_sandbox_selection() === "srt") {
28
+ const { WindowsSrtSandbox } = await import("@downcity/sandbox-windows-srt");
29
+ return new WindowsSrtSandbox();
30
+ }
20
31
  const { WindowsMxcSandbox } = await import("@downcity/sandbox-windows-mxc");
21
32
  return new WindowsMxcSandbox();
22
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformSandbox.js","sourceRoot":"","sources":["../../../src/city/sandbox/PlatformSandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,yCAAyC;AACzC,MAAM,CAAC,KAAK,UA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EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;QACzE,OAAO,IAAI,oBAAoB,EAAE,CAAC;IACpC,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;QAC3E,OAAO,IAAI,sBAAsB,EAAE,CAAC;IACtC,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,IAAI,iCAAiC,EAAE,KAAK,KAAK,EAAE,CAAC;YAClD,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;YAC5E,OAAO,IAAI,iBAAiB,EAAE,CAAC;QACjC,CAAC;QACD,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAC5E,OAAO,IAAI,iBAAiB,EAAE,CAAC;IACjC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,qDAAqD,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC3F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "downcity",
3
- "version": "1.1.362",
3
+ "version": "1.1.364",
4
4
  "type": "module",
5
5
  "description": "Downcity CLI — unified City and Agent host management",
6
6
  "bin": {
@@ -23,12 +23,12 @@
23
23
  "@ai-sdk/openai": "^3.0.67",
24
24
  "@ai-sdk/openai-compatible": "^2.0.48",
25
25
  "@ai-sdk/xai": "^3.0.93",
26
- "@downcity/agent": "^1.1.285",
27
- "@downcity/city": "^0.2.218",
28
- "@downcity/plugins": "^1.0.214",
29
- "@downcity/server": "^0.1.113",
30
- "@downcity/shell": "^0.1.137",
31
- "@downcity/type": "0.1.163",
26
+ "@downcity/agent": "^1.1.287",
27
+ "@downcity/city": "^0.2.220",
28
+ "@downcity/plugins": "^1.0.216",
29
+ "@downcity/server": "^0.1.115",
30
+ "@downcity/shell": "^0.1.139",
31
+ "@downcity/type": "0.1.165",
32
32
  "@earendil-works/pi-tui": "^0.74.2",
33
33
  "@larksuiteoapi/node-sdk": "^1.66.0",
34
34
  "@openrouter/ai-sdk-provider": "^2.9.0",
@@ -52,9 +52,10 @@
52
52
  "cli-highlight": "^2.1.11"
53
53
  },
54
54
  "optionalDependencies": {
55
- "@downcity/sandbox-linux": "^0.1.1",
56
- "@downcity/sandbox-macos": "^0.1.1",
57
- "@downcity/sandbox-windows-mxc": "^0.1.1"
55
+ "@downcity/sandbox-linux": "^0.1.3",
56
+ "@downcity/sandbox-macos": "^0.1.3",
57
+ "@downcity/sandbox-windows-mxc": "^0.1.3",
58
+ "@downcity/sandbox-windows-srt": "^0.1.2"
58
59
  },
59
60
  "devDependencies": {
60
61
  "@types/better-sqlite3": "^7.6.13",