@moxt-ai/mobius 0.0.67 → 0.0.68
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 +22 -6
- package/dist/cli.js.map +3 -3
- package/dist/index.js +21 -2
- package/dist/index.js.map +3 -3
- package/dist/run-daemon.d.ts.map +1 -1
- package/dist/run-daemon.js +21 -2
- package/dist/run-daemon.js.map +1 -1
- package/dist/runtime.js +21 -2
- package/dist/runtime.js.map +3 -3
- package/package.json +1 -4
package/dist/index.js
CHANGED
|
@@ -40313,15 +40313,33 @@ async function resolveSessionDirectories(directories, bindingId, directoryId2, a
|
|
|
40313
40313
|
}
|
|
40314
40314
|
return new ResolvedSessionDirectories(cwd, additionalDirectories, additionalDirectoryEntries);
|
|
40315
40315
|
}
|
|
40316
|
+
var OPENCODE_PROVIDER_SETTLEMENT_MILLISECONDS = 1e3;
|
|
40317
|
+
async function waitForAgentSettingsReadiness(agentId, signal, timer) {
|
|
40318
|
+
if (agentId !== "opencode") {
|
|
40319
|
+
return;
|
|
40320
|
+
}
|
|
40321
|
+
signal.throwIfAborted();
|
|
40322
|
+
await new Promise((resolve8) => {
|
|
40323
|
+
const readiness = timer.schedule(finish, OPENCODE_PROVIDER_SETTLEMENT_MILLISECONDS);
|
|
40324
|
+
function finish() {
|
|
40325
|
+
readiness.cancel();
|
|
40326
|
+
signal.removeEventListener("abort", finish);
|
|
40327
|
+
resolve8();
|
|
40328
|
+
}
|
|
40329
|
+
signal.addEventListener("abort", finish, { once: true });
|
|
40330
|
+
});
|
|
40331
|
+
signal.throwIfAborted();
|
|
40332
|
+
}
|
|
40316
40333
|
function isUnavailableModel(cause, modelSettingId, requestedModel) {
|
|
40317
40334
|
return cause instanceof AcpConfigurationValueUnavailableError && cause.configId === modelSettingId && cause.requestedValue === requestedModel;
|
|
40318
40335
|
}
|
|
40319
40336
|
function unsupportedModelIds(unsupportedModels) {
|
|
40320
40337
|
return [...new Set(unsupportedModels.map((item) => item.requestedValue))];
|
|
40321
40338
|
}
|
|
40322
|
-
async function discoverAgentSettings(command, config2, directories, sessions, signal) {
|
|
40339
|
+
async function discoverAgentSettings(command, config2, directories, sessions, signal, timer) {
|
|
40323
40340
|
const agent = config2.catalog.find(command.agentId);
|
|
40324
40341
|
const cwd = await directories.resolve(config2.bindingId, "default", signal);
|
|
40342
|
+
await waitForAgentSettingsReadiness(agent.id, signal, timer);
|
|
40325
40343
|
const baseSnapshot = await sessions.inspectAgentSettings({
|
|
40326
40344
|
additionalDirectories: [],
|
|
40327
40345
|
agent,
|
|
@@ -41617,7 +41635,8 @@ async function runRelayConnection(config2, directories, audit, sessions, install
|
|
|
41617
41635
|
config2,
|
|
41618
41636
|
directories,
|
|
41619
41637
|
sessions,
|
|
41620
|
-
operationSignal
|
|
41638
|
+
operationSignal,
|
|
41639
|
+
timer
|
|
41621
41640
|
);
|
|
41622
41641
|
for (const diagnostic of result.unsupportedModels) {
|
|
41623
41642
|
const details = agentSettingsFailureDetails(command2.agentId, diagnostic);
|