@moxxy/cli 0.50.1 → 0.50.3

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.
Files changed (2) hide show
  1. package/dist/bin.js +259 -46
  2. package/package.json +2 -2
package/dist/bin.js CHANGED
@@ -5,7 +5,7 @@ import * as fs43 from 'fs';
5
5
  import fs43__default, { promises, readFileSync, existsSync, statSync, readdirSync, mkdirSync, writeFileSync, realpathSync, unlinkSync, createReadStream, lstatSync, constants as constants$1, watch as watch$1 } from 'fs';
6
6
  import * as path3 from 'path';
7
7
  import path3__default, { dirname, join, posix, resolve, relative, sep, isAbsolute } from 'path';
8
- import { utf8Locale, ensurePrivateDir, moxxyHome, pruneStaleTempFiles, moxxyPath, hasProxy, installEgressProxy, readProxyEnv, writeFileAtomic, ensurePrivateFile, killTree as killTree$1, liveChannelStatus, spawnDedicatedChannel, stopDedicatedChannel, clearChannelStatus, findExecutable, PRIVATE_FILE_MODE, resolveOsPrincipal, redactProxyUrl, resolveExecutableTarget, spawnExecutableTarget, listLiveChannelStatuses, rotateChannelToken, writeSignedNetworkCacheAtomic, CrossProcessFireLock, fetchNpmLatest, writeChannelStatus, withFileLock, writeBoundedNetworkCacheAtomicSync, writeBoundedDataCacheAtomic, readRequestBody, bearerTokenMatches } from '@moxxy/sdk/server';
8
+ import { utf8Locale, ensurePrivateDir, moxxyHome, pruneStaleTempFiles, moxxyPath, hasProxy, installEgressProxy, readProxyEnv, writeFileAtomic, ensurePrivateFile, killTree as killTree$1, liveChannelStatus, spawnDedicatedChannel, stopDedicatedChannel, clearChannelStatus, findExecutable, PRIVATE_FILE_MODE, withFileLock, resolveOsPrincipal, redactProxyUrl, resolveExecutableTarget, spawnExecutableTarget, listLiveChannelStatuses, rotateChannelToken, writeSignedNetworkCacheAtomic, CrossProcessFireLock, fetchNpmLatest, writeChannelStatus, writeBoundedNetworkCacheAtomicSync, writeBoundedDataCacheAtomic, readRequestBody, bearerTokenMatches } from '@moxxy/sdk/server';
9
9
  import { spawn, spawnSync, execFile } from 'child_process';
10
10
  import { fileURLToPath, pathToFileURL } from 'url';
11
11
  import { MoxxyError, createMutex, defineChannel, definePlugin, defineViewRenderer, DEFAULT_VIEW_TAGS, defineTunnelProvider, defineAuditExporter, defineAuditSink, z as z$1, withAgentConduct, questionAnswersSchema, defineTool, defineEmbedder, defineMode, asPluginId, computerControlSnapshotSchema, createDeferredPermissionResolver, isSafeViewUrl, redactSecrets, questionAnswerDisplay, describeQuestionAnswers, searchConversation, conversationTurns, asTurnId, waitFor, unfinishedWorkCheckpoint, unfinishedStepCheckpoint, runReactLoop, defineCompactor, abortError, activeCompactionRanges, defineCacheStrategy, runManualCompaction, assertDefined, defineWorkflowExecutor, MOXXY_PCM16_24KHZ_MIME, isAgentNoReplyEvent, AGENT_NO_REPLY_TEXT, accountLimitOfEvent, isFileDiffDisplay, questionAnswerLines, stepListProgress, startingModel, fileDiffFromText, findAttachment, listAttachments, summarizeWithProvider, toolResultBytes, isSelectableMode, summarizeSessionTokensFromEvents, summarizeTokensByModel, getInstallHint, toDiffRows, diffGutterNo, fileDiffVerb, fileDiffSummary, openQuestionsFromEvents, emptyDraft, questionAnswersProblem, draftAnswers, computeElisionState, toolResultStubbed, toolResultStubText, conversationalStubbed, conversationalStub, chooseOption, typeOwnAnswer, isFirstPartyPackage, REDACTED_PLACEHOLDER, isSecretKey, addModelTotals, skillFrontmatterSchema, asSkillId, parseFrontmatter, denyByDefaultResolver, createCallbackResolver, createAllowListResolver, countNodes, autoAllowResolver, SESSION_SOURCES, startChannelWith, EXIT_AFTER_PAIR_FLAG, renderFrontmatter, envShareNameSchema, formatPrincipal, aggregateCapabilitySpecs, hostCredentialName, verifyEd25519, mentionedSkills, skillAttachment, withoutTools, toolsForMode, moxxyPackageSchema, auditActionOf, asToolCallId, dispatchToolCall, matchLoadableTools, defineSecretProvider, encodeLoginAuthUrl, redactSecretText, encodeLoginPrompt, defineCommand, ISOLATION_RANK, sleepWithAbort, asSessionId, migrateModeName, autoApproveFromEvents, AUTO_APPROVE_SUBTYPE, AUTO_APPROVE_PLUGIN_ID, autoApproveFromAgent, autoApproveRecorded, agentActivityRecord, withRecordedContextWindows, recordedContextWindows, parseFrontmatterFile, createJsonFileStore, eventForClient, autoApproveSwitch, computerControlCommandSchema, historyPageForClient, readAttachmentChunk, computerApprovalFocusSchema, workflowApprovalItemsSchema, evaluateToolRule, asEventId, QUESTION_ASKED, questionCloseNote, QUESTION_RESOLVED, QUESTION_CLOSED_NEW_MESSAGE as QUESTION_CLOSED_NEW_MESSAGE$1, questionRecord as questionRecord$1, QUESTION_PLUGIN_ID } from '@moxxy/sdk';
@@ -10283,7 +10283,7 @@ var require_jiti = __commonJS({
10283
10283
  function V() {
10284
10284
  return 10 !== n4.getToken() ? (k(3, [], [2, 5]), false) : (P3(false), 6 === n4.getToken() ? (I3(":"), T3(), U3() || k(4, [], [2, 5])) : k(5, [], [2, 5]), a3.pop(), true);
10285
10285
  }
10286
- function z68() {
10286
+ function z69() {
10287
10287
  l3(), T3();
10288
10288
  let e4 = false;
10289
10289
  for (; 2 !== n4.getToken() && 17 !== n4.getToken(); ) {
@@ -10310,14 +10310,14 @@ var require_jiti = __commonJS({
10310
10310
  case 3:
10311
10311
  return G();
10312
10312
  case 1:
10313
- return z68();
10313
+ return z69();
10314
10314
  case 10:
10315
10315
  return P3(true);
10316
10316
  default:
10317
10317
  return J();
10318
10318
  }
10319
10319
  }
10320
- return r2(T3, "scanNext"), r2(k, "handleError"), r2(P3, "parseString"), r2(J, "parseLiteral"), r2(V, "parseProperty"), r2(z68, "parseObject"), r2(G, "parseArray"), r2(U3, "parseValue"), T3(), 17 === n4.getToken() ? !!i4.allowEmptyContent || (k(4, [], []), false) : U3() ? (17 !== n4.getToken() && k(9, [], []), true) : (k(4, [], []), false);
10320
+ return r2(T3, "scanNext"), r2(k, "handleError"), r2(P3, "parseString"), r2(J, "parseLiteral"), r2(V, "parseProperty"), r2(z69, "parseObject"), r2(G, "parseArray"), r2(U3, "parseValue"), T3(), 17 === n4.getToken() ? !!i4.allowEmptyContent || (k(4, [], []), false) : U3() ? (17 !== n4.getToken() && k(9, [], []), true) : (k(4, [], []), false);
10321
10321
  }
10322
10322
  new Array(W2).fill(0).map((e3, t4) => "\n" + " ".repeat(t4)), new Array(W2).fill(0).map((e3, t4) => "\r" + " ".repeat(t4)), new Array(W2).fill(0).map((e3, t4) => "\r\n" + " ".repeat(t4)), new Array(W2).fill(0).map((e3, t4) => "\n" + " ".repeat(t4)), new Array(W2).fill(0).map((e3, t4) => "\r" + " ".repeat(t4)), new Array(W2).fill(0).map((e3, t4) => "\r\n" + " ".repeat(t4)), (function(e3) {
10323
10323
  e3.DEFAULT = { allowTrailingComma: false };
@@ -40035,10 +40035,10 @@ var require_react_production_min = __commonJS({
40035
40035
  var w = /* @__PURE__ */ Symbol.for("react.suspense");
40036
40036
  var x2 = /* @__PURE__ */ Symbol.for("react.memo");
40037
40037
  var y2 = /* @__PURE__ */ Symbol.for("react.lazy");
40038
- var z68 = Symbol.iterator;
40038
+ var z69 = Symbol.iterator;
40039
40039
  function A2(a2) {
40040
40040
  if (null === a2 || "object" !== typeof a2) return null;
40041
- a2 = z68 && a2[z68] || a2["@@iterator"];
40041
+ a2 = z69 && a2[z69] || a2["@@iterator"];
40042
40042
  return "function" === typeof a2 ? a2 : null;
40043
40043
  }
40044
40044
  var B = { isMounted: function() {
@@ -42845,7 +42845,7 @@ var init_yoga_wasm_base64_esm = __esm({
42845
42845
  h2.noExitRuntime || true;
42846
42846
  "object" != typeof WebAssembly && x2("no native wasm support detected");
42847
42847
  var fa, ha = false;
42848
- function z68(a2, b3, c3) {
42848
+ function z69(a2, b3, c3) {
42849
42849
  c3 = b3 + c3;
42850
42850
  for (var d = ""; !(b3 >= c3); ) {
42851
42851
  var e = a2[b3++];
@@ -43495,7 +43495,7 @@ var init_yoga_wasm_base64_esm = __esm({
43495
43495
  return b3;
43496
43496
  }, Jb = {
43497
43497
  l: function(a2, b3, c3, d) {
43498
- x2("Assertion failed: " + (a2 ? z68(A2, a2) : "") + ", at: " + [b3 ? b3 ? z68(A2, b3) : "" : "unknown filename", c3, d ? d ? z68(A2, d) : "" : "unknown function"]);
43498
+ x2("Assertion failed: " + (a2 ? z69(A2, a2) : "") + ", at: " + [b3 ? b3 ? z69(A2, b3) : "" : "unknown filename", c3, d ? d ? z69(A2, d) : "" : "unknown function"]);
43499
43499
  },
43500
43500
  q: function(a2, b3, c3) {
43501
43501
  a2 = N(a2);
@@ -43748,7 +43748,7 @@ var init_yoga_wasm_base64_esm = __esm({
43748
43748
  if (c3) for (var g2 = f2, k = 0; k <= e; ++k) {
43749
43749
  var m3 = f2 + k;
43750
43750
  if (k == e || 0 == A2[m3]) {
43751
- g2 = g2 ? z68(A2, g2, m3 - g2) : "";
43751
+ g2 = g2 ? z69(A2, g2, m3 - g2) : "";
43752
43752
  if (void 0 === l2) var l2 = g2;
43753
43753
  else l2 += String.fromCharCode(0), l2 += g2;
43754
43754
  g2 = m3 + 1;
@@ -43945,7 +43945,7 @@ var init_yoga_wasm_base64_esm = __esm({
43945
43945
  b3 += 8;
43946
43946
  for (var m3 = 0; m3 < k; m3++) {
43947
43947
  var l2 = A2[g2 + m3], n3 = Fb[a2];
43948
- 0 === l2 || 10 === l2 ? ((1 === a2 ? ea : v)(z68(n3, 0)), n3.length = 0) : n3.push(l2);
43948
+ 0 === l2 || 10 === l2 ? ((1 === a2 ? ea : v)(z69(n3, 0)), n3.length = 0) : n3.push(l2);
43949
43949
  }
43950
43950
  e += k;
43951
43951
  }
@@ -44433,7 +44433,7 @@ var require_scheduler_production_min = __commonJS({
44433
44433
  var u5 = 1;
44434
44434
  var v = null;
44435
44435
  var y2 = 3;
44436
- var z68 = false;
44436
+ var z69 = false;
44437
44437
  var A2 = false;
44438
44438
  var B = false;
44439
44439
  var D = "function" === typeof setTimeout ? setTimeout : null;
@@ -44460,7 +44460,7 @@ var require_scheduler_production_min = __commonJS({
44460
44460
  function J(a2, b3) {
44461
44461
  A2 = false;
44462
44462
  B && (B = false, E2(L), L = -1);
44463
- z68 = true;
44463
+ z69 = true;
44464
44464
  var c3 = y2;
44465
44465
  try {
44466
44466
  G(b3);
@@ -44484,7 +44484,7 @@ var require_scheduler_production_min = __commonJS({
44484
44484
  }
44485
44485
  return w;
44486
44486
  } finally {
44487
- v = null, y2 = c3, z68 = false;
44487
+ v = null, y2 = c3, z69 = false;
44488
44488
  }
44489
44489
  }
44490
44490
  var N = false;
@@ -44541,7 +44541,7 @@ var require_scheduler_production_min = __commonJS({
44541
44541
  a2.callback = null;
44542
44542
  };
44543
44543
  exports.unstable_continueExecution = function() {
44544
- A2 || z68 || (A2 = true, I2(J));
44544
+ A2 || z69 || (A2 = true, I2(J));
44545
44545
  };
44546
44546
  exports.unstable_forceFrameRate = function(a2) {
44547
44547
  0 > a2 || 125 < a2 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P3 = 0 < a2 ? Math.floor(1e3 / a2) : 5;
@@ -44614,7 +44614,7 @@ var require_scheduler_production_min = __commonJS({
44614
44614
  }
44615
44615
  e = c3 + e;
44616
44616
  a2 = { id: u5++, callback: b3, priorityLevel: a2, startTime: c3, expirationTime: e, sortIndex: -1 };
44617
- c3 > d ? (a2.sortIndex = c3, f2(t2, a2), null === h2(r2) && a2 === h2(t2) && (B ? (E2(L), L = -1) : B = true, K2(H, c3 - d))) : (a2.sortIndex = e, f2(r2, a2), A2 || z68 || (A2 = true, I2(J)));
44617
+ c3 > d ? (a2.sortIndex = c3, f2(t2, a2), null === h2(r2) && a2 === h2(t2) && (B ? (E2(L), L = -1) : B = true, K2(H, c3 - d))) : (a2.sortIndex = e, f2(r2, a2), A2 || z69 || (A2 = true, I2(J)));
44618
44618
  return a2;
44619
44619
  };
44620
44620
  exports.unstable_shouldYield = M2;
@@ -45371,7 +45371,7 @@ var require_react_reconciler_production_min = __commonJS({
45371
45371
  gc[hc] = a2.current;
45372
45372
  a2.current = b3;
45373
45373
  }
45374
- var jc = {}, x2 = ic(jc), z68 = ic(false), kc = jc;
45374
+ var jc = {}, x2 = ic(jc), z69 = ic(false), kc = jc;
45375
45375
  function mc(a2, b3) {
45376
45376
  var c3 = a2.type.contextTypes;
45377
45377
  if (!c3) return jc;
@@ -45387,13 +45387,13 @@ var require_react_reconciler_production_min = __commonJS({
45387
45387
  return null !== a2 && void 0 !== a2;
45388
45388
  }
45389
45389
  function nc() {
45390
- q(z68);
45390
+ q(z69);
45391
45391
  q(x2);
45392
45392
  }
45393
45393
  function oc(a2, b3, c3) {
45394
45394
  if (x2.current !== jc) throw Error(n3(168));
45395
45395
  v(x2, b3);
45396
- v(z68, c3);
45396
+ v(z69, c3);
45397
45397
  }
45398
45398
  function pc(a2, b3, c3) {
45399
45399
  var d = a2.stateNode;
@@ -45407,14 +45407,14 @@ var require_react_reconciler_production_min = __commonJS({
45407
45407
  a2 = (a2 = a2.stateNode) && a2.__reactInternalMemoizedMergedChildContext || jc;
45408
45408
  kc = x2.current;
45409
45409
  v(x2, a2);
45410
- v(z68, z68.current);
45410
+ v(z69, z69.current);
45411
45411
  return true;
45412
45412
  }
45413
45413
  function rc(a2, b3, c3) {
45414
45414
  var d = a2.stateNode;
45415
45415
  if (!d) throw Error(n3(169));
45416
- c3 ? (a2 = pc(a2, b3, kc), d.__reactInternalMemoizedMergedChildContext = a2, q(z68), q(x2), v(x2, a2)) : q(z68);
45417
- v(z68, c3);
45416
+ c3 ? (a2 = pc(a2, b3, kc), d.__reactInternalMemoizedMergedChildContext = a2, q(z69), q(x2), v(x2, a2)) : q(z69);
45417
+ v(z69, c3);
45418
45418
  }
45419
45419
  var tc = Math.clz32 ? Math.clz32 : sc, uc = Math.log, vc = Math.LN2;
45420
45420
  function sc(a2) {
@@ -47012,7 +47012,7 @@ var require_react_reconciler_production_min = __commonJS({
47012
47012
  g2.state = p3;
47013
47013
  ke(b3, d, g2, e);
47014
47014
  k = b3.memoizedState;
47015
- h2 !== d || p3 !== k || z68.current || de ? ("function" === typeof m3 && (yf(b3, c3, m3, d), k = b3.memoizedState), (h2 = de || Af(b3, c3, h2, d, p3, k, l2)) ? (r2 || "function" !== typeof g2.UNSAFE_componentWillMount && "function" !== typeof g2.componentWillMount || ("function" === typeof g2.componentWillMount && g2.componentWillMount(), "function" === typeof g2.UNSAFE_componentWillMount && g2.UNSAFE_componentWillMount()), "function" === typeof g2.componentDidMount && (b3.flags |= 4194308)) : ("function" === typeof g2.componentDidMount && (b3.flags |= 4194308), b3.memoizedProps = d, b3.memoizedState = k), g2.props = d, g2.state = k, g2.context = l2, d = h2) : ("function" === typeof g2.componentDidMount && (b3.flags |= 4194308), d = false);
47015
+ h2 !== d || p3 !== k || z69.current || de ? ("function" === typeof m3 && (yf(b3, c3, m3, d), k = b3.memoizedState), (h2 = de || Af(b3, c3, h2, d, p3, k, l2)) ? (r2 || "function" !== typeof g2.UNSAFE_componentWillMount && "function" !== typeof g2.componentWillMount || ("function" === typeof g2.componentWillMount && g2.componentWillMount(), "function" === typeof g2.UNSAFE_componentWillMount && g2.UNSAFE_componentWillMount()), "function" === typeof g2.componentDidMount && (b3.flags |= 4194308)) : ("function" === typeof g2.componentDidMount && (b3.flags |= 4194308), b3.memoizedProps = d, b3.memoizedState = k), g2.props = d, g2.state = k, g2.context = l2, d = h2) : ("function" === typeof g2.componentDidMount && (b3.flags |= 4194308), d = false);
47016
47016
  } else {
47017
47017
  g2 = b3.stateNode;
47018
47018
  fe(a2, b3);
@@ -47030,7 +47030,7 @@ var require_react_reconciler_production_min = __commonJS({
47030
47030
  g2.state = p3;
47031
47031
  ke(b3, d, g2, e);
47032
47032
  var w = b3.memoizedState;
47033
- h2 !== r2 || p3 !== w || z68.current || de ? ("function" === typeof B && (yf(b3, c3, B, d), w = b3.memoizedState), (l2 = de || Af(b3, c3, l2, d, p3, w, k) || false) ? (m3 || "function" !== typeof g2.UNSAFE_componentWillUpdate && "function" !== typeof g2.componentWillUpdate || ("function" === typeof g2.componentWillUpdate && g2.componentWillUpdate(d, w, k), "function" === typeof g2.UNSAFE_componentWillUpdate && g2.UNSAFE_componentWillUpdate(d, w, k)), "function" === typeof g2.componentDidUpdate && (b3.flags |= 4), "function" === typeof g2.getSnapshotBeforeUpdate && (b3.flags |= 1024)) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 1024), b3.memoizedProps = d, b3.memoizedState = w), g2.props = d, g2.state = w, g2.context = k, d = l2) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 1024), d = false);
47033
+ h2 !== r2 || p3 !== w || z69.current || de ? ("function" === typeof B && (yf(b3, c3, B, d), w = b3.memoizedState), (l2 = de || Af(b3, c3, l2, d, p3, w, k) || false) ? (m3 || "function" !== typeof g2.UNSAFE_componentWillUpdate && "function" !== typeof g2.componentWillUpdate || ("function" === typeof g2.componentWillUpdate && g2.componentWillUpdate(d, w, k), "function" === typeof g2.UNSAFE_componentWillUpdate && g2.UNSAFE_componentWillUpdate(d, w, k)), "function" === typeof g2.componentDidUpdate && (b3.flags |= 4), "function" === typeof g2.getSnapshotBeforeUpdate && (b3.flags |= 1024)) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 1024), b3.memoizedProps = d, b3.memoizedState = w), g2.props = d, g2.state = w, g2.context = k, d = l2) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && p3 === a2.memoizedState || (b3.flags |= 1024), d = false);
47034
47034
  }
47035
47035
  return dg(a2, b3, c3, d, f2, e);
47036
47036
  }
@@ -47499,7 +47499,7 @@ var require_react_reconciler_production_min = __commonJS({
47499
47499
  case 3:
47500
47500
  c3 = b3.stateNode;
47501
47501
  te();
47502
- q(z68);
47502
+ q(z69);
47503
47503
  q(x2);
47504
47504
  ye();
47505
47505
  c3.pendingContext && (c3.context = c3.pendingContext, c3.pendingContext = null);
@@ -47642,7 +47642,7 @@ var require_react_reconciler_production_min = __commonJS({
47642
47642
  case 1:
47643
47643
  return A2(b3.type) && nc(), a2 = b3.flags, a2 & 65536 ? (b3.flags = a2 & -65537 | 128, b3) : null;
47644
47644
  case 3:
47645
- return te(), q(z68), q(x2), ye(), a2 = b3.flags, 0 !== (a2 & 65536) && 0 === (a2 & 128) ? (b3.flags = a2 & -65537 | 128, b3) : null;
47645
+ return te(), q(z69), q(x2), ye(), a2 = b3.flags, 0 !== (a2 & 65536) && 0 === (a2 & 128) ? (b3.flags = a2 & -65537 | 128, b3) : null;
47646
47646
  case 5:
47647
47647
  return ve(b3), null;
47648
47648
  case 13:
@@ -48697,7 +48697,7 @@ var require_react_reconciler_production_min = __commonJS({
48697
48697
  break;
48698
48698
  case 3:
48699
48699
  te();
48700
- q(z68);
48700
+ q(z69);
48701
48701
  q(x2);
48702
48702
  ye();
48703
48703
  break;
@@ -49174,7 +49174,7 @@ var require_react_reconciler_production_min = __commonJS({
49174
49174
  }
49175
49175
  var ai;
49176
49176
  ai = function(a2, b3, c3) {
49177
- if (null !== a2) if (a2.memoizedProps !== b3.pendingProps || z68.current) G = true;
49177
+ if (null !== a2) if (a2.memoizedProps !== b3.pendingProps || z69.current) G = true;
49178
49178
  else {
49179
49179
  if (0 === (a2.lanes & c3) && 0 === (b3.flags & 128)) return G = false, sg(a2, b3, c3);
49180
49180
  G = 0 !== (a2.flags & 131072) ? true : false;
@@ -49283,7 +49283,7 @@ var require_react_reconciler_production_min = __commonJS({
49283
49283
  g2 = e.value;
49284
49284
  Vd(b3, d, g2);
49285
49285
  if (null !== f2) if (Vc(f2.value, g2)) {
49286
- if (f2.children === e.children && !z68.current) {
49286
+ if (f2.children === e.children && !z69.current) {
49287
49287
  b3 = Tf(a2, b3, c3);
49288
49288
  break a;
49289
49289
  }
@@ -76685,13 +76685,13 @@ async function writeMcpConfig(cfg) {
76685
76685
  await writeFileAtomic(mcpConfigPath(), JSON.stringify(cfg, null, 2) + "\n");
76686
76686
  }
76687
76687
  async function mutateMcpConfig(fn) {
76688
- return configMutex2.run(async () => {
76688
+ return configMutex2.run(() => withFileLock(mcpConfigPath(), async () => {
76689
76689
  const cfg = await readMcpConfig();
76690
76690
  const { next, result } = await fn(cfg);
76691
76691
  if (next !== cfg)
76692
76692
  await writeMcpConfig(next);
76693
76693
  return result;
76694
- });
76694
+ }));
76695
76695
  }
76696
76696
  async function setServerDisabled(name, disabled) {
76697
76697
  return mutateMcpConfig((cfg) => {
@@ -84757,9 +84757,9 @@ async function readProvidersConfig(configPath) {
84757
84757
  const items = await loadProviderItems({});
84758
84758
  const providers = [];
84759
84759
  for (const [name, item] of Object.entries(items)) {
84760
- const stored = itemToStored(name, item);
84761
- if (stored)
84762
- providers.push(stored);
84760
+ const stored2 = itemToStored(name, item);
84761
+ if (stored2)
84762
+ providers.push(stored2);
84763
84763
  }
84764
84764
  return { providers };
84765
84765
  }
@@ -88399,6 +88399,10 @@ async function setupSessionWithConfig(opts) {
88399
88399
  const config = await resolveConfigPlaceholders(rawConfig, vault, logger);
88400
88400
  await applyEgressSettings(config);
88401
88401
  const disabledPackages = new Set(disabledPackageNames(config));
88402
+ if (opts.disableBackgroundDaemons) {
88403
+ disabledPackages.add("@moxxy/plugin-scheduler");
88404
+ disabledPackages.add("@moxxy/plugin-webhooks");
88405
+ }
88402
88406
  let sessionRef;
88403
88407
  const secretResolver = buildSecretResolver(() => sessionRef, vault, opts.cwd);
88404
88408
  const policy = await loadPolicyBundles(config.policy?.bundles ?? []);
@@ -89821,10 +89825,10 @@ function surfaceInputWithinCap(m3) {
89821
89825
  return true;
89822
89826
  return JSON.stringify(m3).length <= MAX_SURFACE_INPUT_BYTES;
89823
89827
  }
89824
- var RUNNER_PROTOCOL_VERSION, MIN_COMPATIBLE_PROTOCOL_VERSION, RunnerMethod, RunnerNotification, attachmentSchema, principalSchema, attachParamsSchema, runTurnParamsSchema, abortParamsSchema, setResolverParamsSchema, shareEnvParamsSchema, questionAnswerParamsSchema, modeSetActiveParamsSchema, sessionSetReasoningParamsSchema, sessionSetFastParamsSchema, MAX_HISTORY_PAGE_LIMIT, sessionLoadHistoryParamsSchema, sessionReadAttachmentParamsSchema, MAX_RECORDED_EXCHANGE_CHARS, recordedText, sessionRecordExchangeParamsSchema, sessionSetAutoApproveParamsSchema, sessionStopBackgroundWorkParamsSchema, providerSetActiveParamsSchema, providerCloseAgentSessionsParamsSchema, providerSetEnabledParamsSchema, providerConfigureParamsSchema, permissionAddAllowParamsSchema, commandRunParamsSchema, MAX_TRANSCRIBE_AUDIO_B64_BYTES, MAX_SYNTHESIZE_TEXT_BYTES, MEDIA_DESCRIPTOR_MAX, transcribeParamsSchema, synthesizeParamsSchema, cancelSynthesizeParamsSchema, mcpEnableAndAttachParamsSchema, mcpDetachParamsSchema, workflowSetEnabledParamsSchema, workflowRunParamsSchema, workflowValidateDraftParamsSchema, workflowSaveParamsSchema, workflowGetRunParamsSchema, workflowResumeParamsSchema, surfaceOpenParamsSchema, MAX_SURFACE_INPUT_BYTES, surfaceInputParamsSchema, surfaceResizeParamsSchema, surfaceCloseParamsSchema;
89828
+ var RUNNER_PROTOCOL_VERSION, MIN_COMPATIBLE_PROTOCOL_VERSION, RunnerMethod, RunnerNotification, attachmentSchema, principalSchema, attachParamsSchema, runTurnParamsSchema, abortParamsSchema, setResolverParamsSchema, shareEnvParamsSchema, questionAnswerParamsSchema, modeSetActiveParamsSchema, sessionSetReasoningParamsSchema, sessionSetFastParamsSchema, MAX_HISTORY_PAGE_LIMIT, sessionLoadHistoryParamsSchema, sessionReadAttachmentParamsSchema, MAX_RECORDED_EXCHANGE_CHARS, recordedText, sessionRecordExchangeParamsSchema, sessionSetAutoApproveParamsSchema, sessionStopBackgroundWorkParamsSchema, providerSetActiveParamsSchema, providerCloseAgentSessionsParamsSchema, providerSetEnabledParamsSchema, providerConfigureParamsSchema, permissionAddAllowParamsSchema, commandRunParamsSchema, MAX_TRANSCRIBE_AUDIO_B64_BYTES, MAX_SYNTHESIZE_TEXT_BYTES, MEDIA_DESCRIPTOR_MAX, transcribeParamsSchema, synthesizeParamsSchema, cancelSynthesizeParamsSchema, mcpEnableAndAttachParamsSchema, mcpNamedEntrySchema, mcpSourceParamsSchema, mcpStrings, mcpAddServerParamsSchema, mcpDetachParamsSchema, workflowSetEnabledParamsSchema, workflowRunParamsSchema, workflowValidateDraftParamsSchema, workflowSaveParamsSchema, workflowGetRunParamsSchema, workflowResumeParamsSchema, surfaceOpenParamsSchema, MAX_SURFACE_INPUT_BYTES, surfaceInputParamsSchema, surfaceResizeParamsSchema, surfaceCloseParamsSchema;
89825
89829
  var init_protocol2 = __esm({
89826
89830
  "../runner/dist/protocol.js"() {
89827
- RUNNER_PROTOCOL_VERSION = 36;
89831
+ RUNNER_PROTOCOL_VERSION = 37;
89828
89832
  MIN_COMPATIBLE_PROTOCOL_VERSION = 1;
89829
89833
  RunnerMethod = {
89830
89834
  /** client->server: handshake; returns the initial info snapshot. */
@@ -89915,6 +89919,14 @@ var init_protocol2 = __esm({
89915
89919
  McpEnableAndAttach: "mcp.enableAndAttach",
89916
89920
  /** client->server: detach an MCP server. */
89917
89921
  McpDetach: "mcp.detach",
89922
+ /** client->server: the chat's agent's own MCP servers that Moxxy also has, and which copy new chats use (null: no such agent). */
89923
+ McpSources: "mcp.sources",
89924
+ /** client->server: pick Moxxy's copy or the agent's own of one MCP server for new chats with any agent. */
89925
+ McpSetSource: "mcp.setSource",
89926
+ /** client->server: connect to a saved Moxxy MCP entry once and count its tools. */
89927
+ McpTestServer: "mcp.testServer",
89928
+ /** client->server: add an MCP server the person entered (secrets as `${vault:NAME}`): test it, save it, make its tools callable. */
89929
+ McpAddServer: "mcp.addServer",
89918
89930
  /** client->server: list all workflows registered on the runner. */
89919
89931
  WorkflowList: "workflow.list",
89920
89932
  /** client->server: enable/disable a workflow. */
@@ -90105,6 +90117,21 @@ var init_protocol2 = __esm({
90105
90117
  requestId: z.string().min(1).max(128).regex(/^[A-Za-z0-9-]+$/)
90106
90118
  });
90107
90119
  mcpEnableAndAttachParamsSchema = z.object({ name: z.string() });
90120
+ mcpNamedEntrySchema = z.object({ name: z.string().min(1).max(256) });
90121
+ mcpSourceParamsSchema = mcpNamedEntrySchema.extend({ source: z.enum(["agent", "moxxy"]) });
90122
+ mcpStrings = z.record(z.string().max(8192)).refine((map) => Object.keys(map).length <= 64, "too many entries");
90123
+ mcpAddServerParamsSchema = z.object({
90124
+ entry: z.object({
90125
+ name: z.string().min(1).max(60),
90126
+ kind: z.enum(["stdio", "http", "sse"]),
90127
+ command: z.string().min(1).max(4096).optional(),
90128
+ args: z.array(z.string().max(8192)).max(256).optional(),
90129
+ env: mcpStrings.optional(),
90130
+ cwd: z.string().max(4096).optional(),
90131
+ url: z.string().max(4096).optional(),
90132
+ headers: mcpStrings.optional()
90133
+ })
90134
+ });
90108
90135
  mcpDetachParamsSchema = z.object({ name: z.string() });
90109
90136
  workflowSetEnabledParamsSchema = z.object({
90110
90137
  name: z.string(),
@@ -90604,6 +90631,42 @@ async function handleMcpDetach(ctx, raw) {
90604
90631
  throw new Error("mcp admin not available on this runner");
90605
90632
  return admin.detach(params.name);
90606
90633
  }
90634
+ function activeSources(ctx) {
90635
+ const active = ctx.session.providers.getActiveName();
90636
+ return ctx.session.providers.list().find((provider) => provider.name === active)?.mcpSources;
90637
+ }
90638
+ async function handleMcpSources(ctx) {
90639
+ const sources = activeSources(ctx);
90640
+ const admin = ctx.session.mcpAdmin;
90641
+ if (!sources || !admin)
90642
+ return null;
90643
+ const names = (await admin.listServers()).map((server) => server.name);
90644
+ const { session } = ctx;
90645
+ const choices = await sources.list({ cwd: session.cwd, names, tools: session.tools.list(), sessionId: session.id });
90646
+ return { agent: sources.agent, choices };
90647
+ }
90648
+ async function handleMcpSetSource(ctx, raw) {
90649
+ const { name, source } = mcpSourceParamsSchema.parse(raw);
90650
+ const sources = activeSources(ctx);
90651
+ if (!sources)
90652
+ throw new Error("This chat\u2019s agent has no MCP servers of its own: the choice is unavailable.");
90653
+ await sources.set(name, source);
90654
+ return {};
90655
+ }
90656
+ async function handleMcpTestServer(ctx, raw) {
90657
+ const { name } = mcpNamedEntrySchema.parse(raw);
90658
+ const admin = ctx.session.mcpAdmin;
90659
+ if (!admin?.testServer)
90660
+ throw new Error("MCP connection test unavailable.");
90661
+ return admin.testServer(name);
90662
+ }
90663
+ async function handleMcpAddServer(ctx, raw) {
90664
+ const { entry } = mcpAddServerParamsSchema.parse(raw);
90665
+ const admin = ctx.session.mcpAdmin;
90666
+ if (!admin?.addServer)
90667
+ throw new Error("Adding an MCP server is unavailable.");
90668
+ return admin.addServer(entry);
90669
+ }
90607
90670
  var init_mcp_handlers = __esm({
90608
90671
  "../runner/dist/handlers/mcp-handlers.js"() {
90609
90672
  init_protocol2();
@@ -90909,6 +90972,10 @@ var init_server2 = __esm({
90909
90972
  peer.handle(RunnerMethod.CancelSynthesize, (raw) => handleCancelSynthesize(raw));
90910
90973
  peer.handle(RunnerMethod.McpListServers, () => handleMcpListServers(ctx));
90911
90974
  peer.handle(RunnerMethod.McpEnableAndAttach, (raw) => handleMcpEnableAndAttach(ctx, raw));
90975
+ peer.handle(RunnerMethod.McpSources, () => handleMcpSources(ctx));
90976
+ peer.handle(RunnerMethod.McpSetSource, (raw) => handleMcpSetSource(ctx, raw));
90977
+ peer.handle(RunnerMethod.McpTestServer, (raw) => handleMcpTestServer(ctx, raw));
90978
+ peer.handle(RunnerMethod.McpAddServer, (raw) => handleMcpAddServer(ctx, raw));
90912
90979
  peer.handle(RunnerMethod.McpDetach, (raw) => handleMcpDetach(ctx, raw));
90913
90980
  peer.handle(RunnerMethod.WorkflowList, () => handleWorkflowList(ctx));
90914
90981
  peer.handle(RunnerMethod.WorkflowSetEnabled, (raw) => handleWorkflowSetEnabled(ctx, raw));
@@ -91599,6 +91666,22 @@ var init_permissions = __esm({
91599
91666
  function makeMcpAdminView(ctx) {
91600
91667
  const { peer } = ctx;
91601
91668
  return {
91669
+ sources: () => {
91670
+ ctx.requireServerProtocol(37, "MCP source selection");
91671
+ return peer.request(RunnerMethod.McpSources);
91672
+ },
91673
+ setSource: async (name, source) => {
91674
+ ctx.requireServerProtocol(37, "MCP source selection");
91675
+ await peer.request(RunnerMethod.McpSetSource, { name, source });
91676
+ },
91677
+ testServer: (name) => {
91678
+ ctx.requireServerProtocol(37, "MCP connection test");
91679
+ return peer.request(RunnerMethod.McpTestServer, { name });
91680
+ },
91681
+ addServer: (entry) => {
91682
+ ctx.requireServerProtocol(37, "Adding an MCP server");
91683
+ return peer.request(RunnerMethod.McpAddServer, { entry });
91684
+ },
91602
91685
  listServers: () => peer.request(RunnerMethod.McpListServers),
91603
91686
  enableAndAttach: (name) => peer.request(RunnerMethod.McpEnableAndAttach, { name }),
91604
91687
  detach: (name) => peer.request(RunnerMethod.McpDetach, { name })
@@ -93747,11 +93830,13 @@ async function runServeStatus(except, all) {
93747
93830
  return 0;
93748
93831
  }
93749
93832
  async function runServeForeground(argv, except, all) {
93750
- const stickySessionId = process.env["MOXXY_SESSION_ID"]?.trim();
93833
+ const transient = process.env["MOXXY_TRANSIENT_RUNNER"] === "1";
93834
+ const stickySessionId = transient ? void 0 : process.env["MOXXY_SESSION_ID"]?.trim();
93751
93835
  const setup = await bootSessionWithConfig(argv, {
93752
93836
  skipKeyPrompt: true,
93753
93837
  tolerateNoProvider: true,
93754
- ...stickySessionId ? { sessionId: stickySessionId } : {}
93838
+ ...stickySessionId ? { sessionId: stickySessionId } : {},
93839
+ ...transient ? { disableSessionPersistence: true, disableBackgroundDaemons: true } : {}
93755
93840
  });
93756
93841
  const { session, vault, config, scheduler, webhooks } = setup;
93757
93842
  const setupHandle = { scheduler, webhooks };
@@ -93809,7 +93894,7 @@ async function runServeForeground(argv, except, all) {
93809
93894
  const webHandle = await coAttachWebSurface({ primary: "serve", session, vault, config });
93810
93895
  if (webHandle) started.push({ name: "web", handle: webHandle });
93811
93896
  }
93812
- const runningBackground = BACKGROUND_UNITS.filter((u5) => !except.has(u5.id)).map((u5) => u5.id);
93897
+ const runningBackground = transient ? [] : BACKGROUND_UNITS.filter((u5) => !except.has(u5.id)).map((u5) => u5.id);
93813
93898
  printStartupSummary({
93814
93899
  started: started.map((s) => s.name),
93815
93900
  failed,
@@ -94887,6 +94972,12 @@ var init_moxxy_tools = __esm({
94887
94972
  init_tool_catalog();
94888
94973
  }
94889
94974
  });
94975
+ var init_mcp_sources = __esm({
94976
+ "../agent-connection-kit/dist/mcp-sources.js"() {
94977
+ init_moxxy_tools();
94978
+ z$1.object({ items: z$1.array(z$1.object({ id: z$1.string() })) });
94979
+ }
94980
+ });
94890
94981
  var init_lines = __esm({
94891
94982
  "../agent-connection-kit/dist/lines.js"() {
94892
94983
  }
@@ -95069,6 +95160,9 @@ var init_agent_versions_blocked2 = __esm({
95069
95160
  BUNDLED_BLOCKED_AGENT_VERSIONS = parseBlockedAgentVersions(agent_versions_blocked_default) ?? {};
95070
95161
  }
95071
95162
  });
95163
+ function downloadInstaller(url, shell) {
95164
+ return `script=$(curl -fsSL '${url}') && printf '%s\\n' "$script" | ${shell}`;
95165
+ }
95072
95166
  function codexWindowsPrograms(arch) {
95073
95167
  const build2 = CODEX_WINDOWS_BUILDS[arch];
95074
95168
  if (!build2)
@@ -95541,8 +95635,34 @@ function installInvocation(desc, platform2 = process.platform) {
95541
95635
  }
95542
95636
  async function runAgentCliAction(desc, action, opts = {}) {
95543
95637
  const platform2 = opts.platform ?? process.platform;
95544
- if (action === "update")
95545
- return updateAgentCli(desc, opts, platform2);
95638
+ const printed = [];
95639
+ const log2 = opts.logFile ? startRunLog(opts.logFile, desc, action) : void 0;
95640
+ const watched = {
95641
+ ...opts,
95642
+ onLine: (line) => {
95643
+ if (action === "install") {
95644
+ printed.push(line);
95645
+ if (printed.length > DIAGNOSTIC_LINES)
95646
+ printed.shift();
95647
+ }
95648
+ log2?.line(line);
95649
+ opts.onLine?.(line);
95650
+ }
95651
+ };
95652
+ try {
95653
+ const result = action === "update" ? await updateAgentCli(desc, watched, platform2) : await installAgentCli(desc, watched, platform2, printed);
95654
+ log2?.line(`Result: ${result.ok ? "done" : "failed"} \u2014 ${result.message}`);
95655
+ if (result.details)
95656
+ log2?.line(`Details: ${result.details}`);
95657
+ return result;
95658
+ } finally {
95659
+ await log2?.close();
95660
+ }
95661
+ }
95662
+ function installStopped(desc, hint) {
95663
+ return `${desc.name}'s installer stopped before it finished. ${hint ?? "Try again in a moment."}`;
95664
+ }
95665
+ async function installAgentCli(desc, opts, platform2, printed) {
95546
95666
  const { command, args } = installInvocation(desc, platform2);
95547
95667
  const child = spawn(command, [...args], {
95548
95668
  env: { ...process.env, ...desc.installEnv },
@@ -95550,7 +95670,78 @@ async function runAgentCliAction(desc, action, opts = {}) {
95550
95670
  detached: platform2 !== "win32",
95551
95671
  windowsHide: true
95552
95672
  });
95553
- return watch(child, opts, "the installer");
95673
+ const result = await watch(child, opts, "the installer");
95674
+ if (!result.ok) {
95675
+ if (result.message === STOPPED)
95676
+ return result;
95677
+ const hint = installFailureHint([...printed, result.message]);
95678
+ return {
95679
+ ok: false,
95680
+ message: /^curl: \(\d+\)/.test(result.message) ? `Couldn't download ${desc.name}. ${hint ?? "Try again in a moment."}` : installStopped(desc, hint),
95681
+ details: installFailureDetails(printed, result.message)
95682
+ };
95683
+ }
95684
+ return await installLeftACopy(desc, opts) ? result : { ok: false, message: installLeftNothing(desc, platform2) };
95685
+ }
95686
+ async function installLeftACopy(desc, opts) {
95687
+ for (let attempt = 1; ; attempt += 1) {
95688
+ if (findAgentCli(desc, opts))
95689
+ return true;
95690
+ if (attempt === VERSION_TRIES)
95691
+ return false;
95692
+ await setTimeout$1(opts.versionRetryMs ?? VERSION_RETRY_MS);
95693
+ }
95694
+ }
95695
+ function installLeftNothing(desc, platform2 = process.platform) {
95696
+ const history = platform2 === "win32" ? "Windows Security \u2192 Protection history" : "its history";
95697
+ return `${desc.name}'s installer finished, but ${desc.name} is not on this computer afterwards. Antivirus software sometimes removes a program it has just installed: look in ${history}, allow ${desc.name}, and try again.`;
95698
+ }
95699
+ function installFailureHint(printed) {
95700
+ const text3 = printed.join("\n");
95701
+ return INSTALL_FAILURES.find((failure) => failure.seen.test(text3))?.hint ?? null;
95702
+ }
95703
+ function installFailureDetails(printed, last) {
95704
+ const end = printed.lastIndexOf(last);
95705
+ if (POWERSHELL_ERROR_ID.test(last)) {
95706
+ for (let i2 = end - 1; i2 >= 0; i2--) {
95707
+ const line = printed[i2];
95708
+ if (!line || POWERSHELL_ERROR_ID.test(line))
95709
+ break;
95710
+ const target = /^\+\s*CategoryInfo\s*:\s*ObjectNotFound:\s*\((.+):String\)\s*\[\],\s*CommandNotFoundException$/i.exec(line);
95711
+ if (target && /:\s*CommandNotFoundException$/i.test(last)) {
95712
+ return `The installer could not find the command '${target[1]}'.`;
95713
+ }
95714
+ if (/^[^+\s]\S*\s+:\s+\S/.test(line))
95715
+ return line;
95716
+ }
95717
+ } else if (NPM_LOG_FOOTER.test(last)) {
95718
+ for (let i2 = end - 1; i2 >= 0; i2--) {
95719
+ const line = printed[i2];
95720
+ if (!line || NPM_LOG_FOOTER.test(line))
95721
+ break;
95722
+ if (/^npm (?:error|ERR!)\s+\S/i.test(line))
95723
+ return line;
95724
+ }
95725
+ }
95726
+ return last;
95727
+ }
95728
+ function startRunLog(file, desc, action) {
95729
+ const stream2 = new PassThrough();
95730
+ const saved = writeFileAtomic(file, stream2).catch(() => {
95731
+ stream2.destroy();
95732
+ });
95733
+ stream2.write(`Moxxy \xB7 ${action} ${desc.name} (${desc.command}) \xB7 ${(/* @__PURE__ */ new Date()).toISOString()}
95734
+ `);
95735
+ return {
95736
+ line(text3) {
95737
+ if (!stream2.destroyed)
95738
+ stream2.write(text3 + "\n");
95739
+ },
95740
+ close() {
95741
+ stream2.end();
95742
+ return saved;
95743
+ }
95744
+ };
95554
95745
  }
95555
95746
  async function updateAgentCli(desc, opts, platform2) {
95556
95747
  const found = findAgentCli(desc, opts);
@@ -95681,7 +95872,7 @@ function watch(child, opts, runIt) {
95681
95872
  killTree$1(child, "SIGTERM");
95682
95873
  finish({ ok: false, message });
95683
95874
  };
95684
- const stop = () => end("Stopped.");
95875
+ const stop = () => end(STOPPED);
95685
95876
  let silence;
95686
95877
  const heard = () => {
95687
95878
  clearTimeout(silence);
@@ -95729,7 +95920,7 @@ function watch(child, opts, runIt) {
95729
95920
  });
95730
95921
  });
95731
95922
  }
95732
- var CLAUDE_CLI, CODEX_WINDOWS_BUILDS, CODEX_CLI, OPENCODE_CLI, AGENT_CLIS, PATH_FALLBACK_ENV, PACKAGE_TOOLS, MISE_PATH, WINDOWS_NATIVE, WINDOWS_SHIMS, SHIM_TARGET, HOUR_MS3, SOURCE_TIMEOUT_MS, cacheChanges, UPDATER_STDIO, VERSION_TRIES, VERSION_RETRY_MS, SILENCE_LIMIT_MS, ASKS_TO_CONFIRM, ANSI, PERCENT;
95923
+ var CLAUDE_CLI, CODEX_WINDOWS_BUILDS, CODEX_CLI, OPENCODE_CLI, AGENT_CLIS, PATH_FALLBACK_ENV, PACKAGE_TOOLS, MISE_PATH, WINDOWS_NATIVE, WINDOWS_SHIMS, SHIM_TARGET, HOUR_MS3, SOURCE_TIMEOUT_MS, cacheChanges, INSTALL_FAILURES, POWERSHELL_ERROR_ID, NPM_LOG_FOOTER, DIAGNOSTIC_LINES, STOPPED, UPDATER_STDIO, VERSION_TRIES, VERSION_RETRY_MS, SILENCE_LIMIT_MS, ASKS_TO_CONFIRM, ANSI, PERCENT;
95733
95924
  var init_agent_cli2 = __esm({
95734
95925
  "../agent-connection-kit/dist/agent-cli.js"() {
95735
95926
  init_cli_version();
@@ -95747,7 +95938,7 @@ var init_agent_cli2 = __esm({
95747
95938
  setting: "autoUpdatesChannel",
95748
95939
  fallback: "latest"
95749
95940
  },
95750
- install: { posix: "curl -fsSL https://claude.ai/install.sh | bash", windows: "irm https://claude.ai/install.ps1 | iex" },
95941
+ install: { posix: downloadInstaller("https://claude.ai/install.sh", "bash"), windows: "irm https://claude.ai/install.ps1 | iex" },
95751
95942
  installDirs: [".local/bin"],
95752
95943
  windowsShim: { entry: "node_modules/@anthropic-ai/claude-code/cli.js", runs: "node" }
95753
95944
  };
@@ -95763,7 +95954,7 @@ var init_agent_cli2 = __esm({
95763
95954
  minimumVersion: "0.155.1",
95764
95955
  updateArgs: ["update"],
95765
95956
  install: {
95766
- posix: "curl -fsSL https://chatgpt.com/codex/install.sh | sh",
95957
+ posix: downloadInstaller("https://chatgpt.com/codex/install.sh", "sh"),
95767
95958
  windows: "irm https://chatgpt.com/codex/install.ps1 | iex"
95768
95959
  },
95769
95960
  // install.ps1 puts it in %LOCALAPPDATA%\Programs\OpenAI\Codex\bin.
@@ -95783,7 +95974,7 @@ var init_agent_cli2 = __esm({
95783
95974
  // OpenCode 1's `upgrade` stays on 1; `--major` replaces it with OpenCode 2 the way it was installed.
95784
95975
  majorUpdateArgs: ["upgrade", "--major"],
95785
95976
  // OpenCode's install script is POSIX only; on Windows it ships through npm. `/install` still installs OpenCode 1.
95786
- install: { posix: "curl -fsSL https://opencode.ai/v2/install | bash", windows: "npm install -g @opencode/cli" },
95977
+ install: { posix: downloadInstaller("https://opencode.ai/v2/install", "bash"), windows: "npm install -g @opencode/cli" },
95787
95978
  installDirs: [".opencode/bin"],
95788
95979
  // OpenCode 2 is published as @opencode/cli; OpenCode 1 as opencode-ai.
95789
95980
  windowsShim: {
@@ -95822,6 +96013,25 @@ var init_agent_cli2 = __esm({
95822
96013
  HOUR_MS3 = 60 * 6e4;
95823
96014
  SOURCE_TIMEOUT_MS = 2e4;
95824
96015
  cacheChanges = /* @__PURE__ */ new Map();
96016
+ INSTALL_FAILURES = [
96017
+ { seen: /\bENOSPC\b|not enough space|no space left/i, hint: "Free some disk space and try again." },
96018
+ {
96019
+ seen: /CERT_|SSL\/TLS|certificate|SELF_SIGNED/i,
96020
+ hint: "Check the computer's date and time. A school or work network can also block the download."
96021
+ },
96022
+ {
96023
+ seen: /curl: \((?:5|6|7|28)\)|could not (?:be )?resolved?|\bENOTFOUND\b|\bEAI_AGAIN\b|getaddrinfo|\bETIMEDOUT\b|\bECONNREFUSED\b|\bECONNRESET\b|unable to connect to the remote server|network is unreachable|no such host is known/i,
96024
+ hint: "Check the internet connection and try again."
96025
+ },
96026
+ {
96027
+ seen: /\bEACCES\b|\bEPERM\b|access (?:to the path .*)?is denied|permission denied|operation not permitted/i,
96028
+ hint: "This account may not be allowed to install programs here. Ask the computer's administrator."
96029
+ }
96030
+ ];
96031
+ POWERSHELL_ERROR_ID = /^\+\s*FullyQualifiedErrorId\s*:/i;
96032
+ NPM_LOG_FOOTER = /^npm (?:error|ERR!)\s+A complete log of this run can be found in:/i;
96033
+ DIAGNOSTIC_LINES = 2e3;
96034
+ STOPPED = "Stopped.";
95825
96035
  UPDATER_STDIO = ["ignore", "pipe", "pipe"];
95826
96036
  VERSION_TRIES = 3;
95827
96037
  VERSION_RETRY_MS = 2e3;
@@ -95865,6 +96075,7 @@ var init_dist34 = __esm({
95865
96075
  "../agent-connection-kit/dist/index.js"() {
95866
96076
  init_mcp_server();
95867
96077
  init_agent_skills();
96078
+ init_mcp_sources();
95868
96079
  init_moxxy_tools();
95869
96080
  init_json_rpc();
95870
96081
  init_lines();
@@ -95942,6 +96153,8 @@ async function runAgentsCommand(argv, deps = {}) {
95942
96153
  });
95943
96154
  if (!result.ok) {
95944
96155
  err(`${desc.name}: ${result.message}
96156
+ `);
96157
+ if (result.details) err(`${colors.dim(result.details)}
95945
96158
  `);
95946
96159
  return 1;
95947
96160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moxxy/cli",
3
- "version": "0.50.1",
3
+ "version": "0.50.3",
4
4
  "description": "moxxy command-line agent: TUI, one-shot prompts, setup, services, and API-key or installed-CLI subscription providers.",
5
5
  "keywords": [
6
6
  "moxxy",
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "undici": "^8.12.2",
51
51
  "zod": "^4.6.7",
52
- "@moxxy/sdk": "0.50.1"
52
+ "@moxxy/sdk": "0.50.3"
53
53
  },
54
54
  "optionalDependencies": {
55
55
  "@napi-rs/keyring": "^2.1.2"