@moxt-ai/mobius 0.0.100 → 0.0.101
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/cli.js +52 -26
- package/dist/cli.js.map +2 -2
- package/dist/index.js +51 -25
- package/dist/index.js.map +2 -2
- package/dist/run-daemon.d.ts.map +1 -1
- package/dist/run-daemon.js +52 -25
- package/dist/run-daemon.js.map +1 -1
- package/dist/runtime.js +51 -25
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36951,7 +36951,24 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
36951
36951
|
const existing = [...agentSettingsDiscoveries.values()].find(
|
|
36952
36952
|
(request) => request.agentId === command2.agentId && !request.controller.signal.aborted
|
|
36953
36953
|
);
|
|
36954
|
-
if (agentSettingsDiscoveries.
|
|
36954
|
+
if ([...agentSettingsDiscoveries.values()].some(
|
|
36955
|
+
(request) => request.requestIds.has(command2.requestId)
|
|
36956
|
+
)) {
|
|
36957
|
+
if (socket.readyState === WebSocket5.OPEN) {
|
|
36958
|
+
send(socket, {
|
|
36959
|
+
code: "agent_settings_discovery_busy",
|
|
36960
|
+
kind: AGENT_SETTINGS_DISCOVERY_FAILED_KIND,
|
|
36961
|
+
message: "This settings discovery request is already running",
|
|
36962
|
+
requestId: command2.requestId
|
|
36963
|
+
});
|
|
36964
|
+
}
|
|
36965
|
+
return;
|
|
36966
|
+
}
|
|
36967
|
+
if (existing !== void 0 && existing.model === command2.model && existing.requestIds.size < 16) {
|
|
36968
|
+
existing.requestIds.add(command2.requestId);
|
|
36969
|
+
return;
|
|
36970
|
+
}
|
|
36971
|
+
if (existing !== void 0) {
|
|
36955
36972
|
if (socket.readyState === WebSocket5.OPEN) {
|
|
36956
36973
|
send(socket, {
|
|
36957
36974
|
code: "agent_settings_discovery_busy",
|
|
@@ -36974,6 +36991,7 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
36974
36991
|
return;
|
|
36975
36992
|
}
|
|
36976
36993
|
const controller = new AbortController();
|
|
36994
|
+
const requestIds = /* @__PURE__ */ new Set([command2.requestId]);
|
|
36977
36995
|
const operationSignal = AbortSignal.any([connectionController.signal, controller.signal]);
|
|
36978
36996
|
const timeout = timer.schedule(
|
|
36979
36997
|
() => controller.abort(
|
|
@@ -37012,17 +37030,19 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
37012
37030
|
`
|
|
37013
37031
|
);
|
|
37014
37032
|
}
|
|
37015
|
-
|
|
37016
|
-
|
|
37017
|
-
|
|
37018
|
-
|
|
37019
|
-
|
|
37020
|
-
|
|
37021
|
-
|
|
37022
|
-
|
|
37023
|
-
|
|
37024
|
-
|
|
37025
|
-
|
|
37033
|
+
for (const requestId of requestIds) {
|
|
37034
|
+
audit.record({
|
|
37035
|
+
commandId: requestId,
|
|
37036
|
+
details: {
|
|
37037
|
+
agentId: command2.agentId,
|
|
37038
|
+
unsupportedModelCount: result.unsupportedModels.length.toString()
|
|
37039
|
+
},
|
|
37040
|
+
event: "agent_settings_discovered",
|
|
37041
|
+
sessionId: `agent-settings:${command2.agentId}`
|
|
37042
|
+
});
|
|
37043
|
+
if (socket.readyState === WebSocket5.OPEN) {
|
|
37044
|
+
send(socket, { ...result.event, requestId });
|
|
37045
|
+
}
|
|
37026
37046
|
}
|
|
37027
37047
|
} catch (error62) {
|
|
37028
37048
|
const failure2 = operationSignal.aborted ? controller.signal.reason ?? new AcpExecutionError(
|
|
@@ -37031,12 +37051,14 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
37031
37051
|
"agent_settings_discovery_cancelled"
|
|
37032
37052
|
) : error62;
|
|
37033
37053
|
const details = agentSettingsFailureDetails(command2.agentId, failure2);
|
|
37034
|
-
|
|
37035
|
-
|
|
37036
|
-
|
|
37037
|
-
|
|
37038
|
-
|
|
37039
|
-
|
|
37054
|
+
for (const requestId of requestIds) {
|
|
37055
|
+
audit.record({
|
|
37056
|
+
commandId: requestId,
|
|
37057
|
+
details,
|
|
37058
|
+
event: "agent_settings_discovery_failed",
|
|
37059
|
+
sessionId: `agent-settings:${command2.agentId}`
|
|
37060
|
+
});
|
|
37061
|
+
}
|
|
37040
37062
|
diagnostics.daemonDiagnostic(
|
|
37041
37063
|
"agent_settings_discovery_failed",
|
|
37042
37064
|
command2.requestId,
|
|
@@ -37050,12 +37072,14 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
37050
37072
|
);
|
|
37051
37073
|
}
|
|
37052
37074
|
if (socket.readyState === WebSocket5.OPEN) {
|
|
37053
|
-
|
|
37054
|
-
|
|
37055
|
-
|
|
37056
|
-
|
|
37057
|
-
|
|
37058
|
-
|
|
37075
|
+
for (const requestId of requestIds) {
|
|
37076
|
+
send(socket, {
|
|
37077
|
+
code: operationErrorCode(failure2),
|
|
37078
|
+
kind: AGENT_SETTINGS_DISCOVERY_FAILED_KIND,
|
|
37079
|
+
message: operationErrorMessage(failure2),
|
|
37080
|
+
requestId
|
|
37081
|
+
});
|
|
37082
|
+
}
|
|
37059
37083
|
}
|
|
37060
37084
|
} finally {
|
|
37061
37085
|
timeout.cancel();
|
|
@@ -37064,6 +37088,8 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
37064
37088
|
})();
|
|
37065
37089
|
agentSettingsDiscoveries.set(command2.requestId, {
|
|
37066
37090
|
agentId: command2.agentId,
|
|
37091
|
+
model: command2.model,
|
|
37092
|
+
requestIds,
|
|
37067
37093
|
completion,
|
|
37068
37094
|
controller
|
|
37069
37095
|
});
|
|
@@ -37147,7 +37173,7 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
37147
37173
|
const previous = [...nativeRequests.values()].filter(
|
|
37148
37174
|
(request) => request.agentId === command2.agentId
|
|
37149
37175
|
);
|
|
37150
|
-
if (nativeRequests.has(command2.requestId) || nativeRequests.size >= 4 || previous.some((request) => !request.controller.signal.aborted)) {
|
|
37176
|
+
if (nativeRequests.has(command2.requestId) || nativeRequests.size >= 4 || command2.action !== "linked-history" && previous.some((request) => !request.controller.signal.aborted)) {
|
|
37151
37177
|
reportOperationFailure(
|
|
37152
37178
|
socket,
|
|
37153
37179
|
command2.requestId,
|