open-walnut 0.6.6 → 0.6.7
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.json +3 -3
- package/dist/cli-fast.js +27 -2
- package/dist/cli.js +2674 -1377
- package/dist/daemon-binaries/acp-worker.js.version +1 -1
- package/dist/daemon-binaries/dtach-linux-x64 +0 -0
- package/dist/integrations/mail/index.js +2 -2
- package/dist/web/server.js +2639 -1367
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/cli-fast.js
CHANGED
|
@@ -14,8 +14,8 @@ import path from "path";
|
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
function getVersion() {
|
|
16
16
|
if (cachedVersion) return cachedVersion;
|
|
17
|
-
if ("0.6.
|
|
18
|
-
cachedVersion = "0.6.
|
|
17
|
+
if ("0.6.7") {
|
|
18
|
+
cachedVersion = "0.6.7";
|
|
19
19
|
versionKnown = true;
|
|
20
20
|
return cachedVersion;
|
|
21
21
|
}
|
|
@@ -7852,6 +7852,7 @@ __export(wn_cli_exports, {
|
|
|
7852
7852
|
WAIT_MAX_TIMEOUT_SECS: () => WAIT_MAX_TIMEOUT_SECS,
|
|
7853
7853
|
WAIT_POLL_INTERVAL_MS: () => WAIT_POLL_INTERVAL_MS,
|
|
7854
7854
|
WALNUT_CLI_TIMEOUT_MS: () => WALNUT_CLI_TIMEOUT_MS,
|
|
7855
|
+
callHostDaemonTool: () => callHostDaemonTool,
|
|
7855
7856
|
errorToExitCode: () => errorToExitCode,
|
|
7856
7857
|
evaluateWaitResult: () => evaluateWaitResult,
|
|
7857
7858
|
fetchHubOps: () => fetchHubOps,
|
|
@@ -8072,6 +8073,17 @@ async function fetchHubOps(env = process.env, name) {
|
|
|
8072
8073
|
return null;
|
|
8073
8074
|
}
|
|
8074
8075
|
}
|
|
8076
|
+
async function callHostDaemonTool(name, args2, env = process.env) {
|
|
8077
|
+
const socket = (env.WALNUT_AGENT_SOCKET ?? "").trim();
|
|
8078
|
+
const sid = (env.WALNUT_SESSION_ID ?? "").trim();
|
|
8079
|
+
if (!socket || !sid || !probeSocket(socket)?.isSocket) return null;
|
|
8080
|
+
try {
|
|
8081
|
+
return await requestOverSocket(socket, { v: 1, op: "tools.call", sid, args: { name, args: args2 } });
|
|
8082
|
+
} catch (err) {
|
|
8083
|
+
if (err instanceof WalnutCliTimeoutError) return { ok: false, error: { code: "hub_timeout", message: err.message } };
|
|
8084
|
+
return null;
|
|
8085
|
+
}
|
|
8086
|
+
}
|
|
8075
8087
|
async function writeStdout(text2) {
|
|
8076
8088
|
await new Promise((resolve) => {
|
|
8077
8089
|
let done = false;
|
|
@@ -8795,6 +8807,19 @@ async function runTools(args2, globals2) {
|
|
|
8795
8807
|
}
|
|
8796
8808
|
parsed = args3.args;
|
|
8797
8809
|
}
|
|
8810
|
+
if (name === "task_send" || name === "session_send") {
|
|
8811
|
+
const { callHostDaemonTool: callHostDaemonTool2, formatErrorLines: formatErrorLines2, errorToExitCode: errorToExitCode2 } = await Promise.resolve().then(() => (init_wn_cli(), wn_cli_exports));
|
|
8812
|
+
const resp = await callHostDaemonTool2(name, parsed);
|
|
8813
|
+
if (resp && !(resp.ok === false && (resp.error.code === "hub_unreachable" || resp.error.code === "unknown_caller"))) {
|
|
8814
|
+
if (resp.ok) {
|
|
8815
|
+
console.log(JSON.stringify(resp.result, null, 2));
|
|
8816
|
+
return;
|
|
8817
|
+
}
|
|
8818
|
+
console.error(formatErrorLines2(resp.error).join("\n"));
|
|
8819
|
+
process.exitCode = errorToExitCode2(resp.error.code);
|
|
8820
|
+
return;
|
|
8821
|
+
}
|
|
8822
|
+
}
|
|
8798
8823
|
const { LOCAL_ORIGIN: LOCAL_ORIGIN2 } = await Promise.resolve().then(() => (init_caller_origin(), caller_origin_exports));
|
|
8799
8824
|
const r = await executeOp2(name, parsed, { origin: LOCAL_ORIGIN2 });
|
|
8800
8825
|
if (!r.ok && r.unreachable) {
|