@adhdev/daemon-standalone 0.9.73 → 0.9.75

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/public/index.html CHANGED
@@ -7,9 +7,9 @@
7
7
  <meta name="description" content="ADHDev self-hosted dashboard for controlling AI agents" />
8
8
  <link rel="icon" href="/otter-logo.png" />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-DehOXawT.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-QCRCggSl.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-CLec0455.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-CVquu5qt.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-CJ15gPBY.css">
13
13
  </head>
14
14
  <body>
15
15
  <!-- Apply theme immediately to prevent FOIT (Flash of Incorrect Theme) -->
@@ -22695,6 +22695,7 @@ function normalizeConfig(raw) {
22695
22695
  ideSettings: isPlainObject2(parsed.ideSettings) ? parsed.ideSettings : {},
22696
22696
  providerSourceMode: resolveProviderSourceMode(parsed.providerSourceMode, parsed.disableUpstream),
22697
22697
  providerDir: asOptionalString(parsed.providerDir),
22698
+ updateChannel: parsed.updateChannel === "preview" ? "preview" : "stable",
22698
22699
  terminalSizingMode: parsed.terminalSizingMode === "fit" ? "fit" : "measured"
22699
22700
  };
22700
22701
  }
@@ -31597,6 +31598,8 @@ function resolveAdhdevMcpEntryPath(explicitPath) {
31597
31598
  addCandidate((0, import_path4.resolve)(dir, "../vendor/mcp-server/index.js"));
31598
31599
  addCandidate((0, import_path4.resolve)(dir, "../../vendor/mcp-server/index.js"));
31599
31600
  addCandidate((0, import_path4.resolve)(dir, "../../../vendor/mcp-server/index.js"));
31601
+ addCandidate((0, import_path4.resolve)(dir, "../../mcp-server/dist/index.js"));
31602
+ addCandidate((0, import_path4.resolve)(dir, "../../../mcp-server/dist/index.js"));
31600
31603
  };
31601
31604
  addPackagedCandidates(process.argv[1]);
31602
31605
  for (const candidate of candidates) {
@@ -32255,6 +32258,16 @@ async function maybeRunDaemonUpgradeHelperFromEnv() {
32255
32258
  process.exit(1);
32256
32259
  }
32257
32260
  }
32261
+ function normalizeReleaseChannel(value) {
32262
+ if (typeof value !== "string") return null;
32263
+ const normalized = value.trim().toLowerCase();
32264
+ if (normalized === "stable" || normalized === "latest") return "stable";
32265
+ if (normalized === "preview" || normalized === "next") return "preview";
32266
+ return null;
32267
+ }
32268
+ function resolveUpgradeChannel(args) {
32269
+ return normalizeReleaseChannel(args?.channel) || normalizeReleaseChannel(args?.updatePolicy?.channel) || normalizeReleaseChannel(args?.npmTag) || normalizeReleaseChannel(loadConfig().updateChannel) || "stable";
32270
+ }
32258
32271
  function normalizeCommandSource(source) {
32259
32272
  switch (source) {
32260
32273
  case "ws":
@@ -36743,7 +36756,7 @@ async function shutdownDaemonComponents(components) {
36743
36756
  }
36744
36757
  cdpManagers.clear();
36745
36758
  }
36746
- var import_os, import_path, import_fs, import_crypto2, import_fs2, import_path2, import_crypto3, fs2, path9, os4, os8, os9, path13, import_child_process, os10, path14, os11, import_child_process2, import_fs3, import_promises4, path, import_util3, import_promises5, path22, path32, fs, os5, path4, import_crypto4, path5, path6, import_fs4, import_path3, import_child_process3, import_fs5, import_os2, path7, import_child_process4, os22, path8, import_fs6, os32, import_child_process5, http, crypto2, fs3, path10, os52, fs4, os6, path11, import_crypto5, fs5, path12, os7, os13, path16, crypto4, import_fs7, import_child_process6, os12, path15, crypto3, fs6, import_module, import_stream2, import_child_process7, import_child_process8, net2, os15, path18, fs7, path17, os14, fs8, path19, os16, import_fs8, import_module2, import_path4, os17, import_child_process9, import_child_process10, fs9, os18, path20, fs10, fs11, path21, os19, import_child_process11, import_os3, http2, fs15, path25, fs12, path222, fs13, path23, fs14, path24, os20, import_child_process12, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS, DEFAULT_MESH_POLICY, init_repo_mesh_types, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, WORKFLOW_SECTION, RULES_SECTION, init_coordinator_prompt, LEVEL_NUM, LEVEL_LABEL, currentLevel, LOG_DIR, MAX_LOG_SIZE, MAX_LOG_DAYS, currentDate, currentLogFile, writeCount, RING_BUFFER_SIZE, ringBuffer, origConsoleLog, origConsoleError, origConsoleWarn, LOG, interceptorInstalled, LOG_PATH, init_logger, NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, DEFAULT_CONFIG2, currentConfig, init_debug_config, DEFAULT_BINDING_CANDIDATES, cachedBinding, cachedBindingError, GhosttyVtTerminalBackend, init_ghostty_vt_backend, TerminalCtor, XtermTerminalBackend, init_xterm_backend, DEFAULT_SCROLLBACK, loggedTerminalBackends, TerminalScreen, init_terminal_screen, init_spawn_env, cachedPty, NodePtyRuntimeTransport, NodePtyTransportFactory, init_pty_transport, buildCliSpawnEnv, init_provider_cli_shared, init_provider_cli_parse, init_provider_cli_config, init_provider_cli_runtime, provider_cli_adapter_exports, ProviderCliAdapter, init_provider_cli_adapter, execFileAsync, DEFAULT_TIMEOUT_MS, DEFAULT_MAX_BUFFER, GitCommandError, DEFAULT_MAX_FILES, DEFAULT_MAX_BYTES, summarizeGitStatus, InMemoryGitSnapshotStore, DEFAULT_GIT_WORKSPACE_POLL_INTERVAL_MS, MIN_GIT_WORKSPACE_POLL_INTERVAL_MS, GitWorkspaceMonitor, GIT_COMMAND_NAMES, SNAPSHOT_REASONS, FAILURE_REASONS, defaultSnapshotStore, defaultGitCommandServices, BUSY_STATUSES, TERMINAL_STATUSES, TurnSnapshotTracker, MAX_WORKSPACES, MAX_ACTIVITY, MAX_SAVED_SESSIONS, DEFAULT_STATE, BUILTIN_IDE_DEFINITIONS, registeredIDEs, LIVE_LIFECYCLES, DEFAULT_ACTIVE_CHAT_POLL_STATUSES, DEFAULT_CHAT_TAIL_RECENT_MESSAGE_GRACE_MS, LIVE_RUNTIME_LIFECYCLES, DaemonCdpManager, CdpDomHandlers, DEFAULT_MONITOR_CONFIG, StatusMonitor, BUILTIN_CHAT_MESSAGE_KINDS, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, HISTORY_DIR, RETAIN_DAYS, SAVED_HISTORY_INDEX_VERSION, SAVED_HISTORY_INDEX_FILE, SAVED_HISTORY_INDEX_LOCK_SUFFIX, SAVED_HISTORY_INDEX_LOCK_WAIT_MS, SAVED_HISTORY_INDEX_LOCK_STALE_MS, SAVED_HISTORY_INDEX_LOCK_POLL_MS, SAVED_HISTORY_ROLLUP_THRESHOLD_BYTES, savedHistorySessionCache, savedHistoryFileSummaryCache, savedHistoryBackgroundRefresh, savedHistoryRollupInFlight, ChatHistoryWriter, IDE_PROVIDER_SESSION_CAPABILITIES_BASE, EXTENSION_PROVIDER_SESSION_CAPABILITIES_BASE, ExtensionProviderInstance, VALID_STATUSES, VALID_ROLES, VALID_BUBBLE_STATES, VALID_TURN_STATUSES, DEFAULT_APPROVAL_POSITIVE_HINTS, IdeProviderInstance, DEFAULT_CDP_SCAN_INTERVAL_MS, DEFAULT_CDP_DISCOVERY_INTERVAL_MS, DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS, DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS, DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS, MIN_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, DEFAULT_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, MIN_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_READY_TIMEOUT_MS, STANDALONE_CDP_SCAN_INTERVAL_MS, DaemonCdpScanner, DaemonCdpInitializer, WORKING_STATUSES, FULL_STATUS_ACTIVE_CHAT_OPTIONS, LIVE_STATUS_ACTIVE_CHAT_OPTIONS, STATUS_MODAL_MESSAGE_LIMIT, STATUS_MODAL_BUTTON_LIMIT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, VALID_INPUT_MEDIA_TYPES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, KNOWN_PROVIDER_FIELDS, VALUE_CONTROL_TYPES, ProviderLoader, _providerLoader, LOG_DIR2, MAX_FILE_SIZE, MAX_DAYS, SENSITIVE_KEYS, currentDate2, currentFile, writeCount2, SKIP_COMMANDS, DEFAULT_SERVER_NAME, DEFAULT_ADHDEV_MCP_COMMAND, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter, DaemonStatusReporter, DEFAULT_DAEMON_PORT, DAEMON_WS_PATH, ProviderStreamAdapter, DaemonAgentStreamManager, AgentStreamPoller, ProviderInstanceManager, ARCHIVE_PATH, MAX_ENTRIES_PER_PROVIDER, VersionArchive, DEV_SERVER_PORT, DevServer, SessionHostRuntimeTransport, SessionHostPtyTransportFactory, DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, STARTUP_TIMEOUT_MS, STARTUP_POLL_MS, EXTENSION_CATALOG, SessionRegistry;
36759
+ var import_os, import_path, import_fs, import_crypto2, import_fs2, import_path2, import_crypto3, fs2, path9, os4, os8, os9, path13, import_child_process, os10, path14, os11, import_child_process2, import_fs3, import_promises4, path, import_util3, import_promises5, path22, path32, fs, os5, path4, import_crypto4, path5, path6, import_fs4, import_path3, import_child_process3, import_fs5, import_os2, path7, import_child_process4, os22, path8, import_fs6, os32, import_child_process5, http, crypto2, fs3, path10, os52, fs4, os6, path11, import_crypto5, fs5, path12, os7, os13, path16, crypto4, import_fs7, import_child_process6, os12, path15, crypto3, fs6, import_module, import_stream2, import_child_process7, import_child_process8, net2, os15, path18, fs7, path17, os14, fs8, path19, os16, import_fs8, import_module2, import_path4, os17, import_child_process9, import_child_process10, fs9, os18, path20, fs10, fs11, path21, os19, import_child_process11, import_os3, http2, fs15, path25, fs12, path222, fs13, path23, fs14, path24, os20, import_child_process12, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS, DEFAULT_MESH_POLICY, init_repo_mesh_types, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, WORKFLOW_SECTION, RULES_SECTION, init_coordinator_prompt, LEVEL_NUM, LEVEL_LABEL, currentLevel, LOG_DIR, MAX_LOG_SIZE, MAX_LOG_DAYS, currentDate, currentLogFile, writeCount, RING_BUFFER_SIZE, ringBuffer, origConsoleLog, origConsoleError, origConsoleWarn, LOG, interceptorInstalled, LOG_PATH, init_logger, NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, DEFAULT_CONFIG2, currentConfig, init_debug_config, DEFAULT_BINDING_CANDIDATES, cachedBinding, cachedBindingError, GhosttyVtTerminalBackend, init_ghostty_vt_backend, TerminalCtor, XtermTerminalBackend, init_xterm_backend, DEFAULT_SCROLLBACK, loggedTerminalBackends, TerminalScreen, init_terminal_screen, init_spawn_env, cachedPty, NodePtyRuntimeTransport, NodePtyTransportFactory, init_pty_transport, buildCliSpawnEnv, init_provider_cli_shared, init_provider_cli_parse, init_provider_cli_config, init_provider_cli_runtime, provider_cli_adapter_exports, ProviderCliAdapter, init_provider_cli_adapter, execFileAsync, DEFAULT_TIMEOUT_MS, DEFAULT_MAX_BUFFER, GitCommandError, DEFAULT_MAX_FILES, DEFAULT_MAX_BYTES, summarizeGitStatus, InMemoryGitSnapshotStore, DEFAULT_GIT_WORKSPACE_POLL_INTERVAL_MS, MIN_GIT_WORKSPACE_POLL_INTERVAL_MS, GitWorkspaceMonitor, GIT_COMMAND_NAMES, SNAPSHOT_REASONS, FAILURE_REASONS, defaultSnapshotStore, defaultGitCommandServices, BUSY_STATUSES, TERMINAL_STATUSES, TurnSnapshotTracker, MAX_WORKSPACES, MAX_ACTIVITY, MAX_SAVED_SESSIONS, DEFAULT_STATE, BUILTIN_IDE_DEFINITIONS, registeredIDEs, LIVE_LIFECYCLES, DEFAULT_ACTIVE_CHAT_POLL_STATUSES, DEFAULT_CHAT_TAIL_RECENT_MESSAGE_GRACE_MS, LIVE_RUNTIME_LIFECYCLES, DaemonCdpManager, CdpDomHandlers, DEFAULT_MONITOR_CONFIG, StatusMonitor, BUILTIN_CHAT_MESSAGE_KINDS, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, HISTORY_DIR, RETAIN_DAYS, SAVED_HISTORY_INDEX_VERSION, SAVED_HISTORY_INDEX_FILE, SAVED_HISTORY_INDEX_LOCK_SUFFIX, SAVED_HISTORY_INDEX_LOCK_WAIT_MS, SAVED_HISTORY_INDEX_LOCK_STALE_MS, SAVED_HISTORY_INDEX_LOCK_POLL_MS, SAVED_HISTORY_ROLLUP_THRESHOLD_BYTES, savedHistorySessionCache, savedHistoryFileSummaryCache, savedHistoryBackgroundRefresh, savedHistoryRollupInFlight, ChatHistoryWriter, IDE_PROVIDER_SESSION_CAPABILITIES_BASE, EXTENSION_PROVIDER_SESSION_CAPABILITIES_BASE, ExtensionProviderInstance, VALID_STATUSES, VALID_ROLES, VALID_BUBBLE_STATES, VALID_TURN_STATUSES, DEFAULT_APPROVAL_POSITIVE_HINTS, IdeProviderInstance, DEFAULT_CDP_SCAN_INTERVAL_MS, DEFAULT_CDP_DISCOVERY_INTERVAL_MS, DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS, DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS, DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS, MIN_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, DEFAULT_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, MIN_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_READY_TIMEOUT_MS, STANDALONE_CDP_SCAN_INTERVAL_MS, DaemonCdpScanner, DaemonCdpInitializer, WORKING_STATUSES, FULL_STATUS_ACTIVE_CHAT_OPTIONS, LIVE_STATUS_ACTIVE_CHAT_OPTIONS, STATUS_MODAL_MESSAGE_LIMIT, STATUS_MODAL_BUTTON_LIMIT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, VALID_INPUT_MEDIA_TYPES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, KNOWN_PROVIDER_FIELDS, VALUE_CONTROL_TYPES, ProviderLoader, _providerLoader, LOG_DIR2, MAX_FILE_SIZE, MAX_DAYS, SENSITIVE_KEYS, currentDate2, currentFile, writeCount2, SKIP_COMMANDS, DEFAULT_SERVER_NAME, DEFAULT_ADHDEV_MCP_COMMAND, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHANNEL_NPM_TAG, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter, DaemonStatusReporter, DEFAULT_DAEMON_PORT, DAEMON_WS_PATH, ProviderStreamAdapter, DaemonAgentStreamManager, AgentStreamPoller, ProviderInstanceManager, ARCHIVE_PATH, MAX_ENTRIES_PER_PROVIDER, VersionArchive, DEV_SERVER_PORT, DevServer, SessionHostRuntimeTransport, SessionHostPtyTransportFactory, DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, STARTUP_TIMEOUT_MS, STARTUP_POLL_MS, EXTENSION_CATALOG, SessionRegistry;
36747
36760
  var init_dist2 = __esm({
36748
36761
  "../daemon-core/dist/index.mjs"() {
36749
36762
  "use strict";
@@ -36934,6 +36947,7 @@ var init_dist2 = __esm({
36934
36947
  machineProviders: {},
36935
36948
  ideSettings: {},
36936
36949
  providerSourceMode: "normal",
36950
+ updateChannel: "stable",
36937
36951
  terminalSizingMode: "measured"
36938
36952
  };
36939
36953
  MACHINE_ID_PREFIX = "mach_";
@@ -37481,6 +37495,13 @@ var init_dist2 = __esm({
37481
37495
  this.lastScreenSnapshotReadAt = now;
37482
37496
  return screenText;
37483
37497
  }
37498
+ getParseScreenText(screenText) {
37499
+ const currentSnapshot = normalizeScreenSnapshot(screenText);
37500
+ const lastSnapshot = this.lastScreenSnapshot;
37501
+ if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
37502
+ return `${screenText}
37503
+ ${lastSnapshot}`;
37504
+ }
37484
37505
  shouldReadTerminalScreenSnapshot(now) {
37485
37506
  if (!this.lastScreenText) return true;
37486
37507
  return now - this.lastScreenSnapshotReadAt >= _ProviderCliAdapter.SCREEN_SNAPSHOT_MIN_INTERVAL_MS;
@@ -38471,12 +38492,13 @@ var init_dist2 = __esm({
38471
38492
  }
38472
38493
  try {
38473
38494
  const screenText = this.terminalScreen.getText();
38495
+ const parseScreenText = this.getParseScreenText(screenText);
38474
38496
  const tail = this.recentOutputBuffer.slice(-500);
38475
38497
  const input = buildCliParseInput({
38476
38498
  accumulatedBuffer: this.accumulatedBuffer,
38477
38499
  accumulatedRawBuffer: this.accumulatedRawBuffer,
38478
38500
  recentOutputBuffer: this.recentOutputBuffer,
38479
- terminalScreenText: screenText,
38501
+ terminalScreenText: parseScreenText,
38480
38502
  baseMessages: [],
38481
38503
  partialResponse: this.responseBuffer,
38482
38504
  isWaitingForResponse: this.isWaitingForResponse,
@@ -38570,8 +38592,9 @@ var init_dist2 = __esm({
38570
38592
  */
38571
38593
  getScriptParsedStatus() {
38572
38594
  const screenText = this.readTerminalScreenText();
38595
+ const parseScreenText = this.getParseScreenText(screenText);
38573
38596
  const cached2 = this.parsedStatusCache;
38574
- if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.screenText === screenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
38597
+ if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.screenText === parseScreenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
38575
38598
  return cached2.result;
38576
38599
  }
38577
38600
  const parsed = this.runParseSession();
@@ -38599,7 +38622,7 @@ var init_dist2 = __esm({
38599
38622
  currentTurnScope: this.currentTurnScope,
38600
38623
  recentOutputBuffer: this.recentOutputBuffer,
38601
38624
  accumulatedBuffer: this.accumulatedBuffer,
38602
- screenText,
38625
+ screenText: parseScreenText,
38603
38626
  currentStatus: this.currentStatus,
38604
38627
  activeModal: this.activeModal,
38605
38628
  cliName: this.cliName,
@@ -38616,7 +38639,7 @@ var init_dist2 = __esm({
38616
38639
  accumulatedBuffer: this.accumulatedBuffer,
38617
38640
  accumulatedRawBuffer: this.accumulatedRawBuffer,
38618
38641
  recentOutputBuffer: this.recentOutputBuffer,
38619
- terminalScreenText: this.terminalScreen.getText(),
38642
+ terminalScreenText: this.getParseScreenText(this.terminalScreen.getText()),
38620
38643
  baseMessages: [],
38621
38644
  partialResponse: this.responseBuffer,
38622
38645
  isWaitingForResponse: this.isWaitingForResponse,
@@ -47502,6 +47525,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
47502
47525
  READ_DEBUG_ENABLED = process.argv.includes("--dev") || process.env.ADHDEV_READ_DEBUG === "1";
47503
47526
  recentReadDebugSignatureBySession = /* @__PURE__ */ new Map();
47504
47527
  UPGRADE_HELPER_ENV = "ADHDEV_DAEMON_UPGRADE_HELPER";
47528
+ CHANNEL_NPM_TAG = { stable: "latest", preview: "next" };
47505
47529
  CHAT_COMMANDS = [
47506
47530
  "send_chat",
47507
47531
  "new_chat",
@@ -47512,6 +47536,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
47512
47536
  READ_DEBUG_ENABLED2 = process.argv.includes("--dev") || process.env.ADHDEV_READ_DEBUG === "1";
47513
47537
  DaemonCommandRouter = class {
47514
47538
  deps;
47539
+ /** In-memory cache for cloud-originating meshes passed via inlineMesh.
47540
+ * Allows the MCP server to query mesh data via get_mesh even when
47541
+ * the mesh doesn't exist in the local meshes.json file. */
47542
+ inlineMeshCache = /* @__PURE__ */ new Map();
47515
47543
  constructor(deps) {
47516
47544
  this.deps = deps;
47517
47545
  }
@@ -48099,8 +48127,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
48099
48127
  const isStandalone = this.deps.packageName === "@adhdev/daemon-standalone" || process.argv[1]?.includes("daemon-standalone");
48100
48128
  const pkgName = isStandalone ? "@adhdev/daemon-standalone" : "adhdev";
48101
48129
  const npmSurface = resolveCurrentGlobalInstallSurface({ packageName: pkgName });
48102
- const latest = String(execNpmCommandSync(["view", pkgName, "version"], { encoding: "utf-8", timeout: 1e4 }, npmSurface)).trim();
48103
- LOG.info("Upgrade", `Latest ${pkgName}: v${latest}`);
48130
+ const channel = resolveUpgradeChannel(args);
48131
+ const npmTag = CHANNEL_NPM_TAG[channel];
48132
+ const latest = String(execNpmCommandSync(["view", `${pkgName}@${npmTag}`, "version"], { encoding: "utf-8", timeout: 1e4 }, npmSurface)).trim();
48133
+ LOG.info("Upgrade", `Latest ${pkgName}@${npmTag}: v${latest}`);
48104
48134
  let currentInstalled = null;
48105
48135
  try {
48106
48136
  const currentJson = String(execNpmCommandSync(["ls", "-g", pkgName, "--depth=0", "--json"], {
@@ -48114,8 +48144,8 @@ Run 'adhdev doctor' for detailed diagnostics.`
48114
48144
  }
48115
48145
  const runningVersion = typeof this.deps.statusVersion === "string" ? this.deps.statusVersion.trim().replace(/^v/, "") : null;
48116
48146
  if (currentInstalled === latest && runningVersion === latest) {
48117
- LOG.info("Upgrade", `Already on latest version v${latest}; skipping install`);
48118
- return { success: true, upgraded: false, alreadyLatest: true, version: latest };
48147
+ LOG.info("Upgrade", `Already on ${channel} channel version v${latest}; skipping install`);
48148
+ return { success: true, upgraded: false, alreadyLatest: true, version: latest, channel, npmTag };
48119
48149
  }
48120
48150
  if (currentInstalled === latest && runningVersion && runningVersion !== latest) {
48121
48151
  LOG.info("Upgrade", `Installed package is v${latest}, but running daemon is v${runningVersion}; scheduling restart`);
@@ -48128,12 +48158,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
48128
48158
  cwd: process.cwd(),
48129
48159
  sessionHostAppName: process.env.ADHDEV_SESSION_HOST_NAME || "adhdev"
48130
48160
  });
48131
- LOG.info("Upgrade", `Scheduled detached upgrade to v${latest}`);
48161
+ LOG.info("Upgrade", `Scheduled detached ${channel} upgrade to v${latest}`);
48132
48162
  setTimeout(() => {
48133
48163
  LOG.info("Upgrade", "Exiting daemon so detached upgrader can continue...");
48134
48164
  process.exit(0);
48135
48165
  }, 3e3);
48136
- return { success: true, upgraded: true, version: latest, restarting: true };
48166
+ return { success: true, upgraded: true, version: latest, restarting: true, channel, npmTag };
48137
48167
  } catch (e) {
48138
48168
  LOG.error("Upgrade", `Failed: ${e.message}`);
48139
48169
  return { success: false, error: e.message };
@@ -48160,11 +48190,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
48160
48190
  try {
48161
48191
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
48162
48192
  const mesh = getMesh3(meshId);
48163
- if (!mesh) return { success: false, error: "Mesh not found" };
48164
- return { success: true, mesh };
48165
- } catch (e) {
48166
- return { success: false, error: e.message };
48193
+ if (mesh) return { success: true, mesh };
48194
+ } catch {
48167
48195
  }
48196
+ const cached2 = this.inlineMeshCache.get(meshId);
48197
+ if (cached2) return { success: true, mesh: cached2 };
48198
+ return { success: false, error: "Mesh not found" };
48168
48199
  }
48169
48200
  case "create_mesh": {
48170
48201
  const name = typeof args?.name === "string" ? args.name.trim() : "";
@@ -48227,6 +48258,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
48227
48258
  let mesh;
48228
48259
  if (args?.inlineMesh && typeof args.inlineMesh === "object") {
48229
48260
  mesh = args.inlineMesh;
48261
+ this.inlineMeshCache.set(meshId, mesh);
48230
48262
  } else {
48231
48263
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
48232
48264
  mesh = getMesh3(meshId);
@@ -48295,14 +48327,20 @@ Run 'adhdev doctor' for detailed diagnostics.`
48295
48327
  } catch {
48296
48328
  }
48297
48329
  }
48330
+ const mcpServerEntry = {
48331
+ command: coordinatorSetup.mcpServer.command,
48332
+ args: coordinatorSetup.mcpServer.args
48333
+ };
48334
+ if (args?.inlineMesh) {
48335
+ mcpServerEntry.env = {
48336
+ ADHDEV_INLINE_MESH: JSON.stringify(mesh)
48337
+ };
48338
+ }
48298
48339
  const mcpConfig = {
48299
48340
  ...existingMcpConfig,
48300
48341
  mcpServers: {
48301
48342
  ...existingMcpConfig.mcpServers || {},
48302
- [coordinatorSetup.serverName]: {
48303
- command: coordinatorSetup.mcpServer.command,
48304
- args: coordinatorSetup.mcpServer.args
48305
- }
48343
+ [coordinatorSetup.serverName]: mcpServerEntry
48306
48344
  }
48307
48345
  };
48308
48346
  writeFileSync12(mcpConfigPath, JSON.stringify(mcpConfig, null, 2), "utf-8");
@@ -53358,7 +53396,17 @@ async function startMcpServer(opts) {
53358
53396
  const isLocal = opts.mode === "local";
53359
53397
  if (opts.meshId) {
53360
53398
  let mesh;
53361
- if (opts.mode === "cloud" && opts.apiKey) {
53399
+ if (!mesh && process.env.ADHDEV_INLINE_MESH) {
53400
+ try {
53401
+ mesh = JSON.parse(process.env.ADHDEV_INLINE_MESH);
53402
+ process.stderr.write(`[adhdev-mcp] Loaded mesh config from ADHDEV_INLINE_MESH env
53403
+ `);
53404
+ } catch (e) {
53405
+ process.stderr.write(`[adhdev-mcp] Failed to parse ADHDEV_INLINE_MESH: ${e.message}
53406
+ `);
53407
+ }
53408
+ }
53409
+ if (!mesh && opts.mode === "cloud" && opts.apiKey) {
53362
53410
  try {
53363
53411
  const base = opts.baseUrl || "https://api.adhf.dev";
53364
53412
  const res = await fetch(`${base}/api/v1/repo-meshes/${opts.meshId}`, {
@@ -53418,9 +53466,21 @@ async function startMcpServer(opts) {
53418
53466
  const { getMesh: getMesh2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
53419
53467
  mesh = getMesh2(opts.meshId);
53420
53468
  } catch (e) {
53421
- process.stderr.write(`[adhdev-mcp] Failed to load mesh config: ${e.message}
53469
+ process.stderr.write(`[adhdev-mcp] Local meshes.json lookup failed: ${e.message}
53470
+ `);
53471
+ }
53472
+ }
53473
+ if (!mesh && transport instanceof LocalTransport) {
53474
+ try {
53475
+ const result = await transport.command("get_mesh", { meshId: opts.meshId });
53476
+ if (result?.success && result.mesh) {
53477
+ mesh = result.mesh;
53478
+ process.stderr.write(`[adhdev-mcp] Loaded mesh config from daemon
53479
+ `);
53480
+ }
53481
+ } catch (e) {
53482
+ process.stderr.write(`[adhdev-mcp] Daemon mesh query failed: ${e.message}
53422
53483
  `);
53423
- process.exit(1);
53424
53484
  }
53425
53485
  }
53426
53486
  if (!mesh) {
@@ -53437,7 +53497,7 @@ async function startMcpServer(opts) {
53437
53497
  coordinatorPrompt = `You are a Repo Mesh Coordinator for "${mesh.name}" (${mesh.repoIdentity}). Use mesh_* tools to orchestrate work.`;
53438
53498
  }
53439
53499
  const server2 = new import_server.Server(
53440
- { name: "adhdev-mcp-server", version: "0.9.73" },
53500
+ { name: "adhdev-mcp-server", version: "0.9.75" },
53441
53501
  { capabilities: { tools: {}, resources: {} } }
53442
53502
  );
53443
53503
  const { ListResourcesRequestSchema, ReadResourceRequestSchema } = await import("@modelcontextprotocol/sdk/types.js");