@moxt-ai/mobius 0.0.283 → 0.0.285
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/acp/protocol/session-capabilities.d.ts.map +1 -1
- package/dist/acp/protocol/session-capabilities.js +1 -3
- package/dist/acp/protocol/session-capabilities.js.map +1 -1
- package/dist/cli.js +47 -65
- package/dist/cli.js.map +4 -4
- package/dist/daemon/lifecycle/worker-process.d.ts +0 -1
- package/dist/daemon/lifecycle/worker-process.d.ts.map +1 -1
- package/dist/daemon/lifecycle/worker-process.js +1 -3
- package/dist/daemon/lifecycle/worker-process.js.map +1 -1
- package/dist/daemon/pairing/pair-local-machine.d.ts.map +1 -1
- package/dist/daemon/pairing/pair-local-machine.js +1 -3
- package/dist/daemon/pairing/pair-local-machine.js.map +1 -1
- package/dist/daemon/upgrades/package.d.ts.map +1 -1
- package/dist/daemon/upgrades/package.js +7 -1
- package/dist/daemon/upgrades/package.js.map +1 -1
- package/dist/runtime.js +87 -103
- package/dist/runtime.js.map +4 -4
- package/dist/session/live/agent-session.d.ts +0 -4
- package/dist/session/live/agent-session.d.ts.map +1 -1
- package/dist/session/live/agent-session.js +0 -12
- package/dist/session/live/agent-session.js.map +1 -1
- package/dist/session/native/native-chat-agent.d.ts +0 -1
- package/dist/session/native/native-chat-agent.d.ts.map +1 -1
- package/dist/session/native/native-chat-agent.js +0 -3
- package/dist/session/native/native-chat-agent.js.map +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-capabilities.d.ts","sourceRoot":"","sources":["../../../src/acp/protocol/session-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"session-capabilities.d.ts","sourceRoot":"","sources":["../../../src/acp/protocol/session-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAWxE,wBAAgB,8BAA8B,IAAI,mBAAmB,CAgBpE;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,GAAG,mBAAmB,CAmB7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-capabilities.js","sourceRoot":"","sources":["../../../src/acp/protocol/session-capabilities.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-capabilities.js","sourceRoot":"","sources":["../../../src/acp/protocol/session-capabilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,SAAS,iBAAiB,CAAC,KAAc,EAAE,QAAgB,EAAE,QAAgB;IACzE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC1C,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,qBAAqB,EAAE,KAAK;QAC5B,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;QACpB,qBAAqB,EAAE,KAAK;QAC5B,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,KAAK;QACf,mBAAmB,EAAE,KAAK;KAC7B,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,WAA+B;IACpE,MAAM,YAAY,GAAG,WAAW,CAAC,iBAAiB,IAAI,EAAE,CAAC;IACzD,MAAM,OAAO,GAAG,YAAY,CAAC,mBAAmB,CAAC;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,kBAAkB,CAAC;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,qBAAqB,EAAE,OAAO,EAAE,qBAAqB,IAAI,IAAI;QAC7D,WAAW,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI;QACnC,YAAY,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI;QACpC,aAAa,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;QACtC,qBAAqB,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI;QACvD,WAAW,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI;QACnC,YAAY,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI;QACnC,WAAW,EAAE,YAAY,CAAC,WAAW,KAAK,IAAI;QAC9C,cAAc,EAAE,iBAAiB,CAAC,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC;QACrF,aAAa,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,WAAW,CAAC;QACjF,aAAa,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;QACtC,QAAQ,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC;QACvE,mBAAmB,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI;KAC7C,CAAC,CAAC;AACP,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -5398,7 +5398,7 @@ var program = new Command();
|
|
|
5398
5398
|
// package.json
|
|
5399
5399
|
var package_default = {
|
|
5400
5400
|
name: "@moxt-ai/mobius",
|
|
5401
|
-
version: "0.0.
|
|
5401
|
+
version: "0.0.285",
|
|
5402
5402
|
description: "Mobius CLI for pairing and running local AI agent services.",
|
|
5403
5403
|
type: "module",
|
|
5404
5404
|
bin: {
|
|
@@ -5452,6 +5452,8 @@ var package_default = {
|
|
|
5452
5452
|
"test:controlled": "vitest run tests/sessions tests/runtime --maxWorkers=4",
|
|
5453
5453
|
"pretest:agents": "tsc --project src/acp/harness/claude/upstream/tsconfig.json && tsc --project src/acp/harness/pi/upstream/tsconfig.json",
|
|
5454
5454
|
"test:agents": "vitest run tests/agents --maxWorkers=2",
|
|
5455
|
+
"pretest:npm-compatibility": "tsc --project src/acp/harness/claude/upstream/tsconfig.json && tsc --project src/acp/harness/pi/upstream/tsconfig.json",
|
|
5456
|
+
"test:npm-compatibility": "vitest run tests/runtime/daemon-upgrade.integration.test.ts tests/runtime/daemon-upgrade-command.integration.test.ts",
|
|
5455
5457
|
"pretest:pressure": "tsc --project src/acp/harness/claude/upstream/tsconfig.json && tsc --project src/acp/harness/pi/upstream/tsconfig.json",
|
|
5456
5458
|
"test:pressure": "node tests/pressure/concurrent-sessions.mjs"
|
|
5457
5459
|
},
|
|
@@ -78083,10 +78085,26 @@ async function resolveLaunchFiles(entry, executable) {
|
|
|
78083
78085
|
return { entry: resolvedEntry, executable: resolvedExecutable };
|
|
78084
78086
|
}
|
|
78085
78087
|
|
|
78086
|
-
// src/
|
|
78088
|
+
// src/util/value-utils.ts
|
|
78089
|
+
function truncate2(value, maximumLength) {
|
|
78090
|
+
return value.length <= maximumLength ? value : `${value.slice(0, Math.max(0, maximumLength - 1))}\u2026`;
|
|
78091
|
+
}
|
|
78087
78092
|
function isRecord3(value) {
|
|
78088
78093
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
78089
78094
|
}
|
|
78095
|
+
function readString2(value, fallback = "") {
|
|
78096
|
+
return typeof value === "string" ? value : fallback;
|
|
78097
|
+
}
|
|
78098
|
+
function arraysEqual(left, right) {
|
|
78099
|
+
return left.length === right.length && left.every((value, index2) => value === right[index2]);
|
|
78100
|
+
}
|
|
78101
|
+
function recordsEqual(left, right) {
|
|
78102
|
+
const leftEntries = Object.entries(left);
|
|
78103
|
+
const rightEntries = Object.entries(right);
|
|
78104
|
+
return leftEntries.length === rightEntries.length && leftEntries.every(([name2, value]) => right[name2] === value);
|
|
78105
|
+
}
|
|
78106
|
+
|
|
78107
|
+
// src/acp/protocol/session-capabilities.ts
|
|
78090
78108
|
function hasTrueChildField(value, childKey, fieldKey) {
|
|
78091
78109
|
if (!isRecord3(value)) {
|
|
78092
78110
|
return false;
|
|
@@ -79999,9 +80017,6 @@ var PairingClientError = class extends Error {
|
|
|
79999
80017
|
this.name = "PairingClientError";
|
|
80000
80018
|
}
|
|
80001
80019
|
};
|
|
80002
|
-
function isRecord6(value) {
|
|
80003
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
80004
|
-
}
|
|
80005
80020
|
function hasExactKeys2(value, expectedKeys) {
|
|
80006
80021
|
const keys = Object.keys(value);
|
|
80007
80022
|
return keys.length === expectedKeys.length && expectedKeys.every((key) => Object.hasOwn(value, key));
|
|
@@ -80108,9 +80123,9 @@ async function readJsonResponse(response) {
|
|
|
80108
80123
|
}
|
|
80109
80124
|
}
|
|
80110
80125
|
function readRelayError(value) {
|
|
80111
|
-
if (
|
|
80126
|
+
if (isRecord3(value)) {
|
|
80112
80127
|
const error62 = value["error"];
|
|
80113
|
-
if (
|
|
80128
|
+
if (isRecord3(error62)) {
|
|
80114
80129
|
const code = error62["code"];
|
|
80115
80130
|
const message = error62["message"];
|
|
80116
80131
|
if (typeof code === "string" && typeof message === "string") {
|
|
@@ -80121,7 +80136,7 @@ function readRelayError(value) {
|
|
|
80121
80136
|
return new PairingClientError("pairing_failed", "The relay could not pair this machine");
|
|
80122
80137
|
}
|
|
80123
80138
|
function decodePairingResponse(value, credentialField, expectedKeys) {
|
|
80124
|
-
if (!
|
|
80139
|
+
if (!isRecord3(value) || !hasExactKeys2(value, expectedKeys)) {
|
|
80125
80140
|
throw new PairingClientError("invalid_relay_response", "The relay returned an invalid pairing response");
|
|
80126
80141
|
}
|
|
80127
80142
|
const appId = value["appId"];
|
|
@@ -80813,9 +80828,6 @@ function currentWorkerLaunch(version2) {
|
|
|
80813
80828
|
version: version2
|
|
80814
80829
|
};
|
|
80815
80830
|
}
|
|
80816
|
-
function isRecord7(value) {
|
|
80817
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
80818
|
-
}
|
|
80819
80831
|
async function decodeWorkerLaunch(value) {
|
|
80820
80832
|
const { entry, executable, version: version2 } = workerLaunch.parse(value);
|
|
80821
80833
|
if (!isAbsolute13(entry) || !isAbsolute13(executable)) {
|
|
@@ -80873,7 +80885,7 @@ var WorkerProcess = class {
|
|
|
80873
80885
|
this.#drained.resolve();
|
|
80874
80886
|
});
|
|
80875
80887
|
this.#child.on("message", (value) => {
|
|
80876
|
-
if (
|
|
80888
|
+
if (isRecord3(value) && value["kind"] === "worker-ready") {
|
|
80877
80889
|
if (value["version"] !== launch.version) {
|
|
80878
80890
|
this.#started.reject(
|
|
80879
80891
|
new WorkerStartupError(
|
|
@@ -82395,7 +82407,7 @@ var toolImageSchema = external_exports.union([
|
|
|
82395
82407
|
file: external_exports.object({ base64: external_exports.string(), type: external_exports.string() })
|
|
82396
82408
|
}).transform(({ file: file2 }) => ({ type: "image", data: file2.base64, mimeType: file2.type }))
|
|
82397
82409
|
]);
|
|
82398
|
-
function
|
|
82410
|
+
function isRecord6(value) {
|
|
82399
82411
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
82400
82412
|
}
|
|
82401
82413
|
var AcpContentExternalizer = class {
|
|
@@ -82502,13 +82514,13 @@ var AcpContentExternalizer = class {
|
|
|
82502
82514
|
}
|
|
82503
82515
|
return result2;
|
|
82504
82516
|
}
|
|
82505
|
-
if (!
|
|
82517
|
+
if (!isRecord6(value)) {
|
|
82506
82518
|
return value;
|
|
82507
82519
|
}
|
|
82508
82520
|
const image = toolImageSchema.safeParse(value);
|
|
82509
82521
|
if (image.success && image.data.data.length > 0) {
|
|
82510
82522
|
const prepared = await this.#content(sessionId, image.data, signal);
|
|
82511
|
-
if (
|
|
82523
|
+
if (isRecord6(prepared.event) && typeof prepared.event["imageKey"] === "string") {
|
|
82512
82524
|
images.set(prepared.event["imageKey"], prepared);
|
|
82513
82525
|
} else {
|
|
82514
82526
|
images.set(`unavailable:${images.size}`, prepared);
|
|
@@ -82539,7 +82551,7 @@ var AcpContentExternalizer = class {
|
|
|
82539
82551
|
const prepared = await this.#content(sessionId, content, signal);
|
|
82540
82552
|
agentContent.push({ ...item, content: prepared.agent });
|
|
82541
82553
|
eventContent.push({ ...item, content: prepared.event });
|
|
82542
|
-
if (
|
|
82554
|
+
if (isRecord6(prepared.event) && typeof prepared.event["imageKey"] === "string") {
|
|
82543
82555
|
images.delete(prepared.event["imageKey"]);
|
|
82544
82556
|
}
|
|
82545
82557
|
}
|
|
@@ -88625,34 +88637,13 @@ function buildPromptContent(options, capabilities) {
|
|
|
88625
88637
|
// src/acp/connection/agent-connection.ts
|
|
88626
88638
|
import { spawn as spawn9 } from "node:child_process";
|
|
88627
88639
|
import { ndJsonStream as ndJsonStream3, RequestError as RequestError8 } from "@agentclientprotocol/sdk";
|
|
88628
|
-
|
|
88629
|
-
// src/util/value-utils.ts
|
|
88630
|
-
function truncate2(value, maximumLength) {
|
|
88631
|
-
return value.length <= maximumLength ? value : `${value.slice(0, Math.max(0, maximumLength - 1))}\u2026`;
|
|
88632
|
-
}
|
|
88633
|
-
function isRecord9(value) {
|
|
88634
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
88635
|
-
}
|
|
88636
|
-
function readString2(value, fallback = "") {
|
|
88637
|
-
return typeof value === "string" ? value : fallback;
|
|
88638
|
-
}
|
|
88639
|
-
function arraysEqual(left, right) {
|
|
88640
|
-
return left.length === right.length && left.every((value, index2) => value === right[index2]);
|
|
88641
|
-
}
|
|
88642
|
-
function recordsEqual(left, right) {
|
|
88643
|
-
const leftEntries = Object.entries(left);
|
|
88644
|
-
const rightEntries = Object.entries(right);
|
|
88645
|
-
return leftEntries.length === rightEntries.length && leftEntries.every(([name2, value]) => right[name2] === value);
|
|
88646
|
-
}
|
|
88647
|
-
|
|
88648
|
-
// src/acp/connection/agent-connection.ts
|
|
88649
88640
|
function requestErrorMessage(error62) {
|
|
88650
88641
|
const fallback = truncate2(error62.message, 500);
|
|
88651
|
-
if (error62.message !== "Internal error" || !
|
|
88642
|
+
if (error62.message !== "Internal error" || !isRecord3(error62.data)) {
|
|
88652
88643
|
return fallback;
|
|
88653
88644
|
}
|
|
88654
88645
|
const agentError = error62.data["error"];
|
|
88655
|
-
if (
|
|
88646
|
+
if (isRecord3(agentError)) {
|
|
88656
88647
|
const message = agentError["message"];
|
|
88657
88648
|
if (typeof message === "string" && message.length > 0) {
|
|
88658
88649
|
return truncate2(message, 500);
|
|
@@ -88959,7 +88950,7 @@ var SessionConfigProtocolError = class extends Error {
|
|
|
88959
88950
|
this.name = "SessionConfigProtocolError";
|
|
88960
88951
|
}
|
|
88961
88952
|
};
|
|
88962
|
-
function
|
|
88953
|
+
function isRecord7(value) {
|
|
88963
88954
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
88964
88955
|
}
|
|
88965
88956
|
function readString3(value, fallback = "") {
|
|
@@ -88990,7 +88981,7 @@ function normalizeConfigValues(value) {
|
|
|
88990
88981
|
}
|
|
88991
88982
|
const normalized = [];
|
|
88992
88983
|
for (const entry of value) {
|
|
88993
|
-
if (!
|
|
88984
|
+
if (!isRecord7(entry)) {
|
|
88994
88985
|
continue;
|
|
88995
88986
|
}
|
|
88996
88987
|
const groupedOptions = entry["options"];
|
|
@@ -88998,7 +88989,7 @@ function normalizeConfigValues(value) {
|
|
|
88998
88989
|
const groupId = readString3(entry["group"]);
|
|
88999
88990
|
const groupName = readString3(entry["name"]);
|
|
89000
88991
|
for (const groupedOption of groupedOptions) {
|
|
89001
|
-
if (
|
|
88992
|
+
if (isRecord7(groupedOption)) {
|
|
89002
88993
|
const normalizedValue = normalizeConfigValue(groupedOption, groupId, groupName);
|
|
89003
88994
|
if (normalizedValue !== void 0) {
|
|
89004
88995
|
normalized.push(normalizedValue);
|
|
@@ -89023,7 +89014,7 @@ function normalizeConfigOptions(value, modes) {
|
|
|
89023
89014
|
const normalized = [];
|
|
89024
89015
|
if (Array.isArray(value)) {
|
|
89025
89016
|
for (const option of value) {
|
|
89026
|
-
if (!
|
|
89017
|
+
if (!isRecord7(option)) {
|
|
89027
89018
|
continue;
|
|
89028
89019
|
}
|
|
89029
89020
|
const id = truncate3(readString3(option["id"]), 128);
|
|
@@ -89063,12 +89054,12 @@ function normalizeConfigOptions(value, modes) {
|
|
|
89063
89054
|
}
|
|
89064
89055
|
}
|
|
89065
89056
|
}
|
|
89066
|
-
if (
|
|
89057
|
+
if (isRecord7(modes)) {
|
|
89067
89058
|
const values = [];
|
|
89068
89059
|
const availableModes = modes["availableModes"];
|
|
89069
89060
|
if (Array.isArray(availableModes)) {
|
|
89070
89061
|
for (const mode of availableModes) {
|
|
89071
|
-
if (!
|
|
89062
|
+
if (!isRecord7(mode)) {
|
|
89072
89063
|
continue;
|
|
89073
89064
|
}
|
|
89074
89065
|
const id = truncate3(readString3(mode["id"]), 500);
|
|
@@ -89101,7 +89092,7 @@ function normalizeConfigOptions(value, modes) {
|
|
|
89101
89092
|
return normalized.slice(0, MAXIMUM_CONFIG_OPTIONS);
|
|
89102
89093
|
}
|
|
89103
89094
|
function normalizeStandardLifecycle(response) {
|
|
89104
|
-
const lifecycle =
|
|
89095
|
+
const lifecycle = isRecord7(response) ? response : {};
|
|
89105
89096
|
return normalizeConfigOptions(lifecycle["configOptions"], lifecycle["modes"]);
|
|
89106
89097
|
}
|
|
89107
89098
|
function replaceStandardConfigOptions(current, value) {
|
|
@@ -89143,7 +89134,7 @@ var StandardSessionConfigProtocol = class {
|
|
|
89143
89134
|
"ACP agent exited while changing session configuration",
|
|
89144
89135
|
change.signal
|
|
89145
89136
|
);
|
|
89146
|
-
if (!
|
|
89137
|
+
if (!isRecord7(response) || !Array.isArray(response["configOptions"])) {
|
|
89147
89138
|
throw new SessionConfigProtocolError("The Agent returned an invalid session configuration response");
|
|
89148
89139
|
}
|
|
89149
89140
|
return replaceStandardConfigOptions(current, response["configOptions"]);
|
|
@@ -89240,7 +89231,7 @@ function normalizeElicitationOptions(schema) {
|
|
|
89240
89231
|
const oneOf = schema["oneOf"];
|
|
89241
89232
|
if (Array.isArray(oneOf)) {
|
|
89242
89233
|
for (const option of oneOf) {
|
|
89243
|
-
if (
|
|
89234
|
+
if (isRecord3(option) && typeof option["const"] === "string") {
|
|
89244
89235
|
normalized.push({
|
|
89245
89236
|
description: truncate2(readString2(option["description"]), 500),
|
|
89246
89237
|
label: truncate2(readString2(option["title"], option["const"]), 255),
|
|
@@ -89260,7 +89251,7 @@ function normalizeElicitationOptions(schema) {
|
|
|
89260
89251
|
return normalized.slice(0, 200);
|
|
89261
89252
|
}
|
|
89262
89253
|
const items = schema["items"];
|
|
89263
|
-
if (!
|
|
89254
|
+
if (!isRecord3(items)) {
|
|
89264
89255
|
return normalized;
|
|
89265
89256
|
}
|
|
89266
89257
|
const anyOf = items["anyOf"];
|
|
@@ -89273,7 +89264,7 @@ function numericString(value) {
|
|
|
89273
89264
|
return typeof value === "number" && Number.isFinite(value) ? value.toString() : "";
|
|
89274
89265
|
}
|
|
89275
89266
|
function normalizeElicitationFields(requestedSchema) {
|
|
89276
|
-
if (!
|
|
89267
|
+
if (!isRecord3(requestedSchema) || !isRecord3(requestedSchema["properties"])) {
|
|
89277
89268
|
return [];
|
|
89278
89269
|
}
|
|
89279
89270
|
const properties = requestedSchema["properties"];
|
|
@@ -89283,7 +89274,7 @@ function normalizeElicitationFields(requestedSchema) {
|
|
|
89283
89274
|
);
|
|
89284
89275
|
const normalized = [];
|
|
89285
89276
|
for (const [name2, property] of Object.entries(properties)) {
|
|
89286
|
-
if (!
|
|
89277
|
+
if (!isRecord3(property)) {
|
|
89287
89278
|
continue;
|
|
89288
89279
|
}
|
|
89289
89280
|
const type = elicitationFieldType(property["type"]);
|
|
@@ -89374,7 +89365,7 @@ function validateElicitationContent(encoded, requestedSchema) {
|
|
|
89374
89365
|
"invalid_elicitation_response"
|
|
89375
89366
|
);
|
|
89376
89367
|
}
|
|
89377
|
-
if (!
|
|
89368
|
+
if (!isRecord3(decoded) || !isRecord3(requestedSchema) || !isRecord3(requestedSchema["properties"])) {
|
|
89378
89369
|
throw new AcpExecutionError(
|
|
89379
89370
|
"Elicitation response does not match the requested form",
|
|
89380
89371
|
{},
|
|
@@ -89394,7 +89385,7 @@ function validateElicitationContent(encoded, requestedSchema) {
|
|
|
89394
89385
|
const validated = {};
|
|
89395
89386
|
for (const [name2, value] of Object.entries(decoded)) {
|
|
89396
89387
|
const property = properties[name2];
|
|
89397
|
-
if (!
|
|
89388
|
+
if (!isRecord3(property)) {
|
|
89398
89389
|
throw new AcpExecutionError(
|
|
89399
89390
|
`Elicitation field ${name2} was not requested`,
|
|
89400
89391
|
{},
|
|
@@ -90222,7 +90213,6 @@ var AgentSession = class _AgentSession {
|
|
|
90222
90213
|
#sessionConfigurations = new SessionConfigurations();
|
|
90223
90214
|
#nativeHistoryOwnership = { kind: "unbound" };
|
|
90224
90215
|
#prompted = false;
|
|
90225
|
-
#nativePrompt = null;
|
|
90226
90216
|
#sessionLoad = { kind: "not-requested" };
|
|
90227
90217
|
#restored = false;
|
|
90228
90218
|
#sessionTitle = null;
|
|
@@ -90660,11 +90650,6 @@ var AgentSession = class _AgentSession {
|
|
|
90660
90650
|
return this.#configOptions;
|
|
90661
90651
|
};
|
|
90662
90652
|
buildPrompt = (options) => buildPromptContent(options, this.#capabilities);
|
|
90663
|
-
nativeHistoryTurn = () => {
|
|
90664
|
-
const prompt = this.#nativePrompt;
|
|
90665
|
-
const nativeTurnId = this.#connection.inProcessAgent?.nativeTurnId?.() ?? null;
|
|
90666
|
-
return prompt === null || nativeTurnId === null || nativeTurnId === prompt.previousTurnId ? null : { commandId: prompt.commandId, nativeTurnId };
|
|
90667
|
-
};
|
|
90668
90653
|
prompt = async (options) => {
|
|
90669
90654
|
if (this.#turn.running) {
|
|
90670
90655
|
throw new AcpExecutionError("Another prompt is already running in this conversation", {}, "session_busy");
|
|
@@ -90710,10 +90695,6 @@ var AgentSession = class _AgentSession {
|
|
|
90710
90695
|
type: "lifecycle-metadata"
|
|
90711
90696
|
});
|
|
90712
90697
|
}
|
|
90713
|
-
this.#nativePrompt = {
|
|
90714
|
-
commandId: options.commandId,
|
|
90715
|
-
previousTurnId: this.#connection.inProcessAgent?.nativeTurnId?.() ?? null
|
|
90716
|
-
};
|
|
90717
90698
|
try {
|
|
90718
90699
|
const response = await this.race(
|
|
90719
90700
|
this.#connection.connection.agent.request(
|
|
@@ -90810,7 +90791,7 @@ var AgentSession = class _AgentSession {
|
|
|
90810
90791
|
"ACP agent exited during steering",
|
|
90811
90792
|
options.signal
|
|
90812
90793
|
);
|
|
90813
|
-
if (!
|
|
90794
|
+
if (!isRecord3(response)) {
|
|
90814
90795
|
throw new AcpExecutionError(
|
|
90815
90796
|
"ACP agent returned an invalid steering response",
|
|
90816
90797
|
{},
|
|
@@ -96858,6 +96839,7 @@ async function installDaemonReleaseVersion(version2, signal) {
|
|
|
96858
96839
|
);
|
|
96859
96840
|
}
|
|
96860
96841
|
}
|
|
96842
|
+
var npmViewVersionSchema = external_exports.union([runtimeUpgradeVersionSchema, external_exports.tuple([runtimeUpgradeVersionSchema])]).transform((value) => typeof value === "string" ? value : value[0]);
|
|
96861
96843
|
async function findNewDaemonReleaseVersion(currentVersion, signal) {
|
|
96862
96844
|
const npm = await findExecutableOnPath("npm", process.env);
|
|
96863
96845
|
if (npm === null) {
|
|
@@ -96873,7 +96855,7 @@ async function findNewDaemonReleaseVersion(currentVersion, signal) {
|
|
|
96873
96855
|
timeoutMilliseconds: 3e4,
|
|
96874
96856
|
outputLimitBytes: 4096
|
|
96875
96857
|
});
|
|
96876
|
-
const version2 =
|
|
96858
|
+
const version2 = npmViewVersionSchema.parse(JSON.parse(result.stdout));
|
|
96877
96859
|
return (0, import_semver.gt)(version2, currentVersion) ? version2 : null;
|
|
96878
96860
|
} catch (cause) {
|
|
96879
96861
|
signal.throwIfAborted();
|