@co0ontty/wand 4.63.0 → 4.64.0-beta.g3402a64
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/build-info.d.ts +18 -0
- package/dist/build-info.js +13 -0
- package/dist/build-info.json +4 -4
- package/dist/config.js +6 -11
- package/dist/env-utils.d.ts +5 -0
- package/dist/env-utils.js +4 -0
- package/dist/git-quick-commit.js +7 -11
- package/dist/ios-ota.js +8 -29
- package/dist/layout-tree.d.ts +6 -0
- package/dist/layout-tree.js +9 -0
- package/dist/missions.js +2 -2
- package/dist/models.js +2 -5
- package/dist/path-repair.js +2 -1
- package/dist/process-manager.js +10 -20
- package/dist/provider-cli-updater.js +3 -6
- package/dist/pty-shell-launch.js +3 -5
- package/dist/server-app-connect.js +11 -46
- package/dist/server-github-routes.js +12 -11
- package/dist/server-local-preview-routes.js +6 -1
- package/dist/server-request.d.ts +4 -2
- package/dist/server-request.js +25 -4
- package/dist/server-session-routes.js +14 -78
- package/dist/server-settings-routes.d.ts +2 -6
- package/dist/server-settings-routes.js +3 -8
- package/dist/server-task-routes.d.ts +9 -6
- package/dist/server-task-routes.js +50 -43
- package/dist/server-update-routes.d.ts +2 -5
- package/dist/server-update-routes.js +42 -9
- package/dist/server-workspace-routes.js +4 -12
- package/dist/server.js +33 -99
- package/dist/session-ai-context.js +6 -38
- package/dist/session-provider.d.ts +16 -0
- package/dist/session-provider.js +49 -0
- package/dist/session-registry.d.ts +10 -0
- package/dist/session-registry.js +41 -14
- package/dist/session-topic.js +3 -11
- package/dist/shell-quote.d.ts +9 -0
- package/dist/shell-quote.js +13 -0
- package/dist/signal-utils.d.ts +10 -0
- package/dist/signal-utils.js +38 -0
- package/dist/storage.js +17 -55
- package/dist/structured-client-protocol.js +4 -8
- package/dist/structured-codex-protocol.js +1 -6
- package/dist/structured-content.d.ts +2 -0
- package/dist/structured-content.js +6 -0
- package/dist/structured-exec-host.d.ts +0 -2
- package/dist/structured-exec-host.js +2 -11
- package/dist/structured-exec-pump.js +2 -12
- package/dist/structured-grok-adapter.js +1 -5
- package/dist/structured-opencode-adapter.js +1 -5
- package/dist/structured-pi-adapter.js +9 -11
- package/dist/structured-provider-common.d.ts +11 -3
- package/dist/structured-provider-common.js +16 -23
- package/dist/structured-qoder-adapter.js +3 -8
- package/dist/structured-session-manager.js +6 -17
- package/dist/task-title.js +4 -12
- package/dist/task-types.d.ts +23 -1
- package/dist/task-types.js +26 -0
- package/dist/terminal-daemon-protocol.d.ts +0 -6
- package/dist/terminal-daemon-server.js +1 -9
- package/dist/text-utils.d.ts +7 -0
- package/dist/text-utils.js +15 -0
- package/dist/tui/attach.js +17 -93
- package/dist/tui/commands.d.ts +2 -0
- package/dist/tui/commands.js +3 -2
- package/dist/tui/index.js +28 -115
- package/dist/tui/runtime-utils.d.ts +7 -0
- package/dist/tui/runtime-utils.js +33 -0
- package/dist/tui/service-actions.d.ts +31 -0
- package/dist/tui/service-actions.js +86 -0
- package/dist/tui/snapshot.js +1 -8
- package/dist/update-helper.js +6 -35
- package/dist/web-ui/content/scripts.js +397 -497
- package/dist/web-ui/content/styles.css +1 -1
- package/dist/web-ui/content/tailwind.css +7210 -0
- package/dist/web-ui/embedded-assets.js +2 -2
- package/dist/web-ui/index.js +3 -3
- package/dist/web-ui/provider-identity.d.ts +4 -0
- package/dist/web-ui/provider-identity.js +9 -0
- package/dist/web-ui/styles.js +24 -7
- package/dist/workspace-binding.d.ts +2 -0
- package/dist/workspace-binding.js +4 -3
- package/package.json +9 -12
package/dist/update-helper.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { spawn, spawnSync } from "node:child_process";
|
|
2
|
-
import { chmodSync, existsSync, mkdtempSync,
|
|
2
|
+
import { chmodSync, existsSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { readServiceEntrypoint } from "./tui/commands.js";
|
|
7
8
|
import { resolveGlobalWandBin } from "./npm-update-utils.js";
|
|
8
|
-
|
|
9
|
-
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
10
|
-
}
|
|
11
|
-
function shellArray(values) {
|
|
12
|
-
return values.map((value) => shellQuote(value)).join(" ");
|
|
13
|
-
}
|
|
9
|
+
import { shellQuote, shellQuoteAll } from "./shell-quote.js";
|
|
14
10
|
function resolveBashPath() {
|
|
15
11
|
return existsSync("/bin/bash") ? "/bin/bash" : "bash";
|
|
16
12
|
}
|
|
@@ -92,34 +88,9 @@ export function isStableServiceEntrypoint(entrypoint, stableBin) {
|
|
|
92
88
|
return false;
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
|
-
function readManagedServiceEntrypoint(scope) {
|
|
96
|
-
if (process.platform === "darwin") {
|
|
97
|
-
const plist = scope === "system"
|
|
98
|
-
? "/Library/LaunchDaemons/com.wand.web.plist"
|
|
99
|
-
: path.join(os.homedir(), "Library/LaunchAgents/com.wand.web.plist");
|
|
100
|
-
const result = spawnSync("plutil", ["-extract", "ProgramArguments.1", "raw", "-o", "-", plist], { encoding: "utf8", timeout: 5_000 });
|
|
101
|
-
return result.status === 0 ? (result.stdout || "").trim() || null : null;
|
|
102
|
-
}
|
|
103
|
-
if (process.platform === "linux") {
|
|
104
|
-
const unit = scope === "system"
|
|
105
|
-
? "/etc/systemd/system/wand.service"
|
|
106
|
-
: path.join(os.homedir(), ".config/systemd/user/wand.service");
|
|
107
|
-
try {
|
|
108
|
-
const execStart = readFileSync(unit, "utf8").split("\n").find((line) => line.startsWith("ExecStart="));
|
|
109
|
-
if (!execStart)
|
|
110
|
-
return null;
|
|
111
|
-
const tokens = execStart.slice("ExecStart=".length).trim().split(/\s+/);
|
|
112
|
-
return tokens[1] || null;
|
|
113
|
-
}
|
|
114
|
-
catch {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
91
|
function managedServiceUpdatePreflight(scope) {
|
|
121
92
|
const stableBin = resolveGlobalWandBin();
|
|
122
|
-
const entrypoint =
|
|
93
|
+
const entrypoint = readServiceEntrypoint(scope);
|
|
123
94
|
if (isStableServiceEntrypoint(entrypoint, stableBin))
|
|
124
95
|
return { ok: true };
|
|
125
96
|
const command = scope === "system"
|
|
@@ -176,7 +147,7 @@ export function buildDetachedUpdateHelperScript(opts, logPath, serviceScope, upd
|
|
|
176
147
|
if (updateUtilsPath.endsWith(".ts") && nodeLoaderArgs.length === 0) {
|
|
177
148
|
throw new Error("本地 TypeScript 更新 helper 无法解析 tsx loader,请先运行 npm install。");
|
|
178
149
|
}
|
|
179
|
-
const nodeLoaderCommand = nodeLoaderArgs.length > 0 ? `${
|
|
150
|
+
const nodeLoaderCommand = nodeLoaderArgs.length > 0 ? `${shellQuoteAll(nodeLoaderArgs)} ` : "";
|
|
180
151
|
return `#!/usr/bin/env bash
|
|
181
152
|
set -euo pipefail
|
|
182
153
|
LOG=${shellQuote(logPath)}
|
|
@@ -197,7 +168,7 @@ NODE_BIN=${shellQuote(process.execPath)}
|
|
|
197
168
|
UPDATE_UTILS=${shellQuote(updateUtilsPath)}
|
|
198
169
|
GLOBAL_CLI_PATH_FILE=${shellQuote(`${logPath}.cli-path`)}
|
|
199
170
|
WORKING_DIRECTORY=${shellQuote(opts.cwd)}
|
|
200
|
-
CLI_ARGS=(${
|
|
171
|
+
CLI_ARGS=(${shellQuoteAll(opts.cliArgs)})
|
|
201
172
|
GLOBAL_CLI=""
|
|
202
173
|
PARENT_EXITED=0
|
|
203
174
|
|