@moxt-ai/mobius 0.0.67 → 0.0.69

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/index.js CHANGED
@@ -32728,6 +32728,9 @@ var AcpProcessSession = class _AcpProcessSession {
32728
32728
  "authentication_required"
32729
32729
  );
32730
32730
  }
32731
+ if (error62 instanceof RequestError) {
32732
+ throw new AcpExecutionError(truncate3(error62.message, 500), { cause: error62 }, "acp_agent_error");
32733
+ }
32731
32734
  throw error62;
32732
32735
  }
32733
32736
  } finally {
@@ -40313,15 +40316,33 @@ async function resolveSessionDirectories(directories, bindingId, directoryId2, a
40313
40316
  }
40314
40317
  return new ResolvedSessionDirectories(cwd, additionalDirectories, additionalDirectoryEntries);
40315
40318
  }
40319
+ var OPENCODE_PROVIDER_SETTLEMENT_MILLISECONDS = 1e3;
40320
+ async function waitForAgentSettingsReadiness(agentId, signal, timer) {
40321
+ if (agentId !== "opencode") {
40322
+ return;
40323
+ }
40324
+ signal.throwIfAborted();
40325
+ await new Promise((resolve8) => {
40326
+ const readiness = timer.schedule(finish, OPENCODE_PROVIDER_SETTLEMENT_MILLISECONDS);
40327
+ function finish() {
40328
+ readiness.cancel();
40329
+ signal.removeEventListener("abort", finish);
40330
+ resolve8();
40331
+ }
40332
+ signal.addEventListener("abort", finish, { once: true });
40333
+ });
40334
+ signal.throwIfAborted();
40335
+ }
40316
40336
  function isUnavailableModel(cause, modelSettingId, requestedModel) {
40317
40337
  return cause instanceof AcpConfigurationValueUnavailableError && cause.configId === modelSettingId && cause.requestedValue === requestedModel;
40318
40338
  }
40319
40339
  function unsupportedModelIds(unsupportedModels) {
40320
40340
  return [...new Set(unsupportedModels.map((item) => item.requestedValue))];
40321
40341
  }
40322
- async function discoverAgentSettings(command, config2, directories, sessions, signal) {
40342
+ async function discoverAgentSettings(command, config2, directories, sessions, signal, timer) {
40323
40343
  const agent = config2.catalog.find(command.agentId);
40324
40344
  const cwd = await directories.resolve(config2.bindingId, "default", signal);
40345
+ await waitForAgentSettingsReadiness(agent.id, signal, timer);
40325
40346
  const baseSnapshot = await sessions.inspectAgentSettings({
40326
40347
  additionalDirectories: [],
40327
40348
  agent,
@@ -41617,7 +41638,8 @@ async function runRelayConnection(config2, directories, audit, sessions, install
41617
41638
  config2,
41618
41639
  directories,
41619
41640
  sessions,
41620
- operationSignal
41641
+ operationSignal,
41642
+ timer
41621
41643
  );
41622
41644
  for (const diagnostic of result.unsupportedModels) {
41623
41645
  const details = agentSettingsFailureDetails(command2.agentId, diagnostic);