@moxt-ai/mobius 0.0.421 → 0.0.422
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/{chunk-LEXJNTEB.js → chunk-KZSWPDB2.js} +21 -15
- package/dist/{chunk-LEXJNTEB.js.map → chunk-KZSWPDB2.js.map} +2 -2
- package/dist/{chunk-6U2E3V2K.js → chunk-LYXXD335.js} +2 -2
- package/dist/{chunk-6U2E3V2K.js.map → chunk-LYXXD335.js.map} +1 -1
- package/dist/{cli-3N6O4CIO.js → cli-AT2J5IM3.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/engine/storage/installation/installation-files.d.ts +4 -1
- package/dist/engine/storage/installation/installation-files.d.ts.map +1 -1
- package/dist/engine/storage/installation/installation-files.js +13 -3
- package/dist/engine/storage/installation/installation-files.js.map +1 -1
- package/dist/engine.js +2 -2
- package/package.json +1 -1
- /package/dist/{cli-3N6O4CIO.js.map → cli-AT2J5IM3.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__export,
|
|
4
4
|
__using,
|
|
5
5
|
package_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LYXXD335.js";
|
|
7
7
|
|
|
8
8
|
// src/engine/runtime/relay/runtime-revocation.ts
|
|
9
9
|
var runtimeRevocationCloseCode = 1008;
|
|
@@ -22108,7 +22108,7 @@ function readFileChunks(path7, chunkBytes, signal) {
|
|
|
22108
22108
|
|
|
22109
22109
|
// src/engine/storage/installation/installation-files.ts
|
|
22110
22110
|
import { createHash, randomUUID } from "node:crypto";
|
|
22111
|
-
import { mkdir as mkdir2, open as open3, readdir as readdir2, rename, unlink, writeFile } from "node:fs/promises";
|
|
22111
|
+
import { link, mkdir as mkdir2, open as open3, readdir as readdir2, rename, rm, unlink, writeFile } from "node:fs/promises";
|
|
22112
22112
|
import { dirname, join } from "node:path";
|
|
22113
22113
|
|
|
22114
22114
|
// src/engine/util/node-error.ts
|
|
@@ -22167,7 +22167,13 @@ async function writeInstallationFile(path7, text2, signal) {
|
|
|
22167
22167
|
}
|
|
22168
22168
|
}
|
|
22169
22169
|
async function createInstallationFile(path7, text2) {
|
|
22170
|
-
|
|
22170
|
+
const temporaryPath = join(dirname(path7), `.${randomUUID()}.tmp`);
|
|
22171
|
+
try {
|
|
22172
|
+
await writeFile(temporaryPath, text2, { flag: "wx", mode: 384 });
|
|
22173
|
+
await link(temporaryPath, path7);
|
|
22174
|
+
} finally {
|
|
22175
|
+
await rm(temporaryPath, { force: true });
|
|
22176
|
+
}
|
|
22171
22177
|
}
|
|
22172
22178
|
async function listInstallationFiles(directory) {
|
|
22173
22179
|
return await readdir2(directory);
|
|
@@ -52686,7 +52692,7 @@ var JC = class {
|
|
|
52686
52692
|
function nm(e) {
|
|
52687
52693
|
return typeof e === "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
52688
52694
|
}
|
|
52689
|
-
var
|
|
52695
|
+
var rm3 = /* @__PURE__ */ Symbol("suppressControlResponse");
|
|
52690
52696
|
var Gy = class _Gy {
|
|
52691
52697
|
transport;
|
|
52692
52698
|
isSingleUserTurn;
|
|
@@ -52891,7 +52897,7 @@ var Gy = class _Gy {
|
|
|
52891
52897
|
try {
|
|
52892
52898
|
let n = await this.processControlRequest(e, t.signal);
|
|
52893
52899
|
if (this.cleanupPerformed) return;
|
|
52894
|
-
if (n ===
|
|
52900
|
+
if (n === rm3) return;
|
|
52895
52901
|
let r = { type: "control_response", response: { subtype: "success", request_id: e.request_id, response: n } };
|
|
52896
52902
|
await Promise.resolve(this.transport.write(me(r) + `
|
|
52897
52903
|
`));
|
|
@@ -52916,7 +52922,7 @@ var Gy = class _Gy {
|
|
|
52916
52922
|
if (e.request.subtype === "can_use_tool") {
|
|
52917
52923
|
if (!this.canUseTool) throw Error("canUseTool callback is not provided.");
|
|
52918
52924
|
let n = await this.canUseTool(e.request.tool_name, e.request.input, { signal: t, suggestions: e.request.permission_suggestions, blockedPath: e.request.blocked_path, decisionReason: e.request.decision_reason, title: e.request.title, displayName: e.request.display_name, description: e.request.description, toolUseID: e.request.tool_use_id, agentID: e.request.agent_id, requestId: e.request_id, ...e.request.matched_ask_rule && { matchedAskRule: { source: e.request.matched_ask_rule.source, toolName: e.request.matched_ask_rule.tool_name, ...e.request.matched_ask_rule.rule_content !== void 0 && { ruleContent: e.request.matched_ask_rule.rule_content } } } });
|
|
52919
|
-
if (n === null) return
|
|
52925
|
+
if (n === null) return rm3;
|
|
52920
52926
|
return { ...n, toolUseID: e.request.tool_use_id };
|
|
52921
52927
|
} else if (e.request.subtype === "hook_callback") return await this.handleHookCallbacks(e.request.callback_id, e.request.input, e.request.tool_use_id, t);
|
|
52922
52928
|
else if (e.request.subtype === "mcp_message") {
|
|
@@ -52931,17 +52937,17 @@ var Gy = class _Gy {
|
|
|
52931
52937
|
let n = e.request;
|
|
52932
52938
|
if (this.onElicitation) {
|
|
52933
52939
|
let r = await this.onElicitation({ serverName: n.mcp_server_name, message: n.message, mode: n.mode, url: n.url, elicitationId: n.elicitation_id, requestedSchema: n.requested_schema, title: n.title, displayName: n.display_name, description: n.description }, { signal: t, requestId: e.request_id });
|
|
52934
|
-
if (r === null) return
|
|
52940
|
+
if (r === null) return rm3;
|
|
52935
52941
|
return r;
|
|
52936
52942
|
}
|
|
52937
52943
|
return { action: "decline" };
|
|
52938
52944
|
} else if (e.request.subtype === "request_user_dialog") {
|
|
52939
52945
|
if (this.onUserDialog) {
|
|
52940
52946
|
let n = await this.onUserDialog({ dialogKind: e.request.dialog_kind, payload: e.request.payload, toolUseID: e.request.tool_use_id }, { signal: t, requestId: e.request_id });
|
|
52941
|
-
if (n === null) return
|
|
52947
|
+
if (n === null) return rm3;
|
|
52942
52948
|
return n;
|
|
52943
52949
|
}
|
|
52944
|
-
return ce(`[Query] No onUserDialog handler for request_user_dialog (kind=${e.request.dialog_kind}) \u2014 staying silent so a capable client (or the worker's park deadline) settles it`), Li("tengu_request_user_dialog_response_ignored", { shape: yi("auto_cancel") }),
|
|
52950
|
+
return ce(`[Query] No onUserDialog handler for request_user_dialog (kind=${e.request.dialog_kind}) \u2014 staying silent so a capable client (or the worker's park deadline) settles it`), Li("tengu_request_user_dialog_response_ignored", { shape: yi("auto_cancel") }), rm3;
|
|
52945
52951
|
} else if (e.request.subtype === "oauth_token_refresh") {
|
|
52946
52952
|
if (!this.getOAuthToken) throw Error("getOAuthToken callback is not provided.");
|
|
52947
52953
|
let n, r = await this.getOAuthToken({ signal: t, onDecline: (o) => {
|
|
@@ -93539,7 +93545,7 @@ import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
|
93539
93545
|
|
|
93540
93546
|
// src/engine/storage/files/scratch-directory.ts
|
|
93541
93547
|
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
93542
|
-
import { lstat as lstat4, mkdir as mkdir5, readdir as readdir6, readFile as readFile7, realpath as realpath7, rename as rename4, rm as
|
|
93548
|
+
import { lstat as lstat4, mkdir as mkdir5, readdir as readdir6, readFile as readFile7, realpath as realpath7, rename as rename4, rm as rm4, stat as stat6, utimes, writeFile as writeFile2 } from "node:fs/promises";
|
|
93543
93549
|
import { dirname as dirname11, join as join28 } from "node:path";
|
|
93544
93550
|
async function atomicWrite(path7, bytes, signal) {
|
|
93545
93551
|
const temporary = `${path7}.${randomUUID17()}.tmp`;
|
|
@@ -93548,7 +93554,7 @@ async function atomicWrite(path7, bytes, signal) {
|
|
|
93548
93554
|
signal.throwIfAborted();
|
|
93549
93555
|
await rename4(temporary, path7);
|
|
93550
93556
|
} finally {
|
|
93551
|
-
await
|
|
93557
|
+
await rm4(temporary, { force: true });
|
|
93552
93558
|
}
|
|
93553
93559
|
}
|
|
93554
93560
|
var ScratchDirectory = class {
|
|
@@ -93574,7 +93580,7 @@ var ScratchDirectory = class {
|
|
|
93574
93580
|
() => Date.now()
|
|
93575
93581
|
);
|
|
93576
93582
|
if (modified + leaseMilliseconds <= Date.now()) {
|
|
93577
|
-
await
|
|
93583
|
+
await rm4(path7, { force: true, recursive: true });
|
|
93578
93584
|
}
|
|
93579
93585
|
}
|
|
93580
93586
|
};
|
|
@@ -93588,7 +93594,7 @@ var ScratchDirectory = class {
|
|
|
93588
93594
|
return path7;
|
|
93589
93595
|
};
|
|
93590
93596
|
remove = async (path7) => {
|
|
93591
|
-
await
|
|
93597
|
+
await rm4(path7, { force: true });
|
|
93592
93598
|
};
|
|
93593
93599
|
/** The canonical path of a written file, or null when it is gone, is not a regular file, or escapes its directory. */
|
|
93594
93600
|
resolveFile = async (path7) => {
|
|
@@ -93610,7 +93616,7 @@ var ScratchDirectory = class {
|
|
|
93610
93616
|
return resolved === null ? null : new Uint8Array(await readFile7(resolved, { signal }));
|
|
93611
93617
|
};
|
|
93612
93618
|
removeAll = async () => {
|
|
93613
|
-
await
|
|
93619
|
+
await rm4(this.#root, { force: true, recursive: true });
|
|
93614
93620
|
};
|
|
93615
93621
|
};
|
|
93616
93622
|
|
|
@@ -97677,4 +97683,4 @@ export {
|
|
|
97677
97683
|
* MIT Licensed
|
|
97678
97684
|
*)
|
|
97679
97685
|
*/
|
|
97680
|
-
//# sourceMappingURL=chunk-
|
|
97686
|
+
//# sourceMappingURL=chunk-KZSWPDB2.js.map
|