@adhdev/daemon-standalone 0.9.76-rc.65 → 0.9.76-rc.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/public/index.html CHANGED
@@ -7,7 +7,7 @@
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-BKLsq7Tb.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-DfX3o5Ms.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-CLec0455.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-DftJ2WZr.css">
13
13
  </head>
@@ -25587,6 +25587,9 @@ function mergeMeshPolicy(base, patch) {
25587
25587
  if (!SESSION_CLEANUP_MODES.has(String(policy.sessionCleanupOnNodeRemove))) {
25588
25588
  policy.sessionCleanupOnNodeRemove = "preserve";
25589
25589
  }
25590
+ if (!SPAWNED_SESSION_VISIBILITY_MODES.has(String(policy.spawnedSessionVisibility))) {
25591
+ policy.spawnedSessionVisibility = "visible";
25592
+ }
25590
25593
  return policy;
25591
25594
  }
25592
25595
  function listMeshes() {
@@ -26078,13 +26081,25 @@ function loadNodePty() {
26078
26081
  return cachedPty;
26079
26082
  }
26080
26083
  function stripAnsi(str2) {
26081
- return str2.replace(/\x1B\][^\x07]*\x07/g, "").replace(/\x1B\][\s\S]*?\x1B\\/g, "").replace(/\x1B[P^_X][\s\S]*?(?:\x07|\x1B\\)/g, "").replace(/\x1B\[\d*[A-HJKSTfG]/g, " ").replace(/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g, "").replace(/ +/g, " ");
26084
+ return str2.replace(/\x1B\][^\x07]*(?:\x07|\x1B\\)/g, "").replace(/\x1B[P^_X][\s\S]*?(?:\x07|\x1B\\)/g, "").replace(/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g, "");
26085
+ }
26086
+ function parseCount(params, fallback = 1) {
26087
+ const first = Number(String(params || "").split(";")[0] || fallback);
26088
+ return Math.max(1, Number.isFinite(first) ? first : fallback);
26089
+ }
26090
+ function isCombiningMark(ch) {
26091
+ return /[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/.test(ch);
26092
+ }
26093
+ function isWideCodePoint(ch) {
26094
+ const cp = ch.codePointAt(0) || 0;
26095
+ return cp >= 4352 && (cp <= 4447 || cp === 9001 || cp === 9002 || cp >= 11904 && cp <= 42191 && cp !== 12351 || cp >= 44032 && cp <= 55203 || cp >= 63744 && cp <= 64255 || cp >= 65040 && cp <= 65049 || cp >= 65072 && cp <= 65135 || cp >= 65280 && cp <= 65376 || cp >= 65504 && cp <= 65510 || cp >= 127744 && cp <= 129791);
26082
26096
  }
26083
26097
  function stripTerminalNoise(str2) {
26084
- return String(str2 || "").replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g, "").replace(/(^|[\s([])(?:\??\d{1,4}(?:;\d{1,4})*[A-Za-z])(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:\[\??\d{1,4}(?:;\d{1,4})*[A-Za-z])(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:\d{1,4};\?)(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:\d+\$r[0-9;\" ]*[A-Za-z]?)(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:>\|[A-Za-z0-9_.:-]+(?:\([^)]*\))?)(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:[A-Z]\d(?:\s+[A-Z]\d)+)(?=$|[\s)\]])/g, "$1").replace(/(^|[\s([])(?:\d+;[^\s)\]]+)(?=$|[\s)\]])/g, "$1").replace(/\r+/g, "\n").replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").replace(/ {2,}/g, " ");
26098
+ return String(str2 || "").replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g, "").replace(/\r+/g, "\n").replace(/[ \t]+\n/g, "\n").replace(/\n{4,}/g, "\n\n\n");
26085
26099
  }
26086
26100
  function sanitizeTerminalText(str2) {
26087
- return stripTerminalNoise(stripAnsi(str2));
26101
+ const accumulator = new TerminalTranscriptAccumulator();
26102
+ return stripTerminalNoise(stripAnsi(accumulator.append(str2)));
26088
26103
  }
26089
26104
  function listCliScriptNames(scripts) {
26090
26105
  if (!scripts) return [];
@@ -35094,6 +35109,9 @@ function normalizeExistingPath(filePath) {
35094
35109
  function readNonEmptyString(value) {
35095
35110
  return typeof value === "string" && value.trim() ? value.trim() : "";
35096
35111
  }
35112
+ function isMeshCoordinatorEvent(eventName) {
35113
+ return typeof eventName === "string" && MESH_COORDINATOR_EVENTS.has(eventName);
35114
+ }
35097
35115
  function formatCompletionMetadata(event) {
35098
35116
  const parts = [
35099
35117
  readNonEmptyString(event.targetSessionId) ? `session_id=${readNonEmptyString(event.targetSessionId)}` : "",
@@ -35110,6 +35128,12 @@ function buildMeshSystemMessage(args) {
35110
35128
  if (args.event === "agent:waiting_approval") {
35111
35129
  return `[System] ${args.nodeLabel} is waiting for approval to proceed${metadata}. You may use mesh_read_chat and mesh_approve to handle it.`;
35112
35130
  }
35131
+ if (args.event === "agent:stopped") {
35132
+ return `[System] ${args.nodeLabel} has stopped${metadata}. Use mesh_read_chat once if you need to inspect its last output.`;
35133
+ }
35134
+ if (args.event === "monitor:long_generating") {
35135
+ return `[System] ${args.nodeLabel} has been generating for a long time${metadata}. Use mesh_read_chat once for a status check, but do not poll repeatedly.`;
35136
+ }
35113
35137
  return "";
35114
35138
  }
35115
35139
  function injectMeshSystemMessage(components, args) {
@@ -35135,7 +35159,7 @@ function injectMeshSystemMessage(components, args) {
35135
35159
  }
35136
35160
  function handleMeshForwardEvent(components, payload) {
35137
35161
  const eventName = readNonEmptyString(payload.event);
35138
- if (eventName !== "agent:generating_completed" && eventName !== "agent:waiting_approval") {
35162
+ if (!isMeshCoordinatorEvent(eventName)) {
35139
35163
  return { success: false, error: "unsupported mesh event" };
35140
35164
  }
35141
35165
  const meshId = readNonEmptyString(payload.meshId);
@@ -35156,7 +35180,7 @@ function handleMeshForwardEvent(components, payload) {
35156
35180
  }
35157
35181
  function setupMeshEventForwarding(components) {
35158
35182
  components.instanceManager.onEvent((event) => {
35159
- if (event.event !== "agent:generating_completed" && event.event !== "agent:waiting_approval") return;
35183
+ if (!isMeshCoordinatorEvent(event.event)) return;
35160
35184
  const instanceId = readNonEmptyString(event.instanceId);
35161
35185
  if (!instanceId) return;
35162
35186
  const sourceInstance = components.instanceManager.getInstance(instanceId);
@@ -40381,7 +40405,7 @@ async function shutdownDaemonComponents(components) {
40381
40405
  }
40382
40406
  cdpManagers.clear();
40383
40407
  }
40384
- var path4, import_promises4, import_fs3, import_child_process, import_util3, import_os2, import_path, import_fs4, import_crypto2, import_fs5, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs6, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs7, import_path3, import_child_process4, import_fs8, import_os3, path8, import_child_process5, os22, path9, import_fs9, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path18, crypto4, import_fs10, import_child_process7, os12, path16, crypto3, fs6, import_module, path17, import_stream2, import_child_process8, import_child_process9, net2, os15, path20, fs7, path19, os14, fs8, path21, os16, import_child_process10, import_crypto6, import_fs11, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path222, import_os4, import_path5, fs10, fs11, path23, os20, import_child_process13, import_os5, http2, fs15, path27, fs12, path24, fs13, path25, fs14, path26, os21, import_child_process14, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS2, DEFAULT_MESH_POLICY, init_repo_mesh_types, git_worktree_exports, execFileAsync2, WORKTREE_DIR_NAME, GIT_TIMEOUT_MS, GIT_MAX_BUFFER, init_git_worktree, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, SESSION_CLEANUP_MODES, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, TOOL_EXPOSURE_PREFLIGHT_SECTION, WORKFLOW_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, CHAT_MESSAGE_VISIBILITIES, CHAT_MESSAGE_TRANSCRIPT_VISIBILITIES, CHAT_MESSAGE_AUDIENCES, CHAT_MESSAGE_SOURCES, CHAT_MESSAGE_ACTIVITY_SOURCES, CHAT_MESSAGE_INTERNAL_SOURCES, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, EXPLICIT_HIDDEN_VISIBILITIES, EXPLICIT_VISIBLE_VISIBILITIES, HIDDEN_AUDIENCES, ACTIVITY_SOURCE_SET, INTERNAL_SOURCE_SET, 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, VALID_INPUT_MEDIA_TYPES, VALID_INPUT_STRATEGIES, TEXT_ONLY_MESSAGE_INPUT_SUPPORT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, HERMES_CLI_STARTING_SEND_SETTLE_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, IMAGE_MIME_EXTENSIONS, MATERIALIZED_IMAGE_MAX_AGE_MS, MATERIALIZED_IMAGE_CLEANUP_INTERVAL_MS, lastMaterializedImageCleanupAt, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, COORDINATOR_DELEGATED_ENV_UNSETS, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, VALID_INPUT_STRATEGIES2, 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, HERMES_CLI_TYPE, HERMES_MCP_CONFIG_PATH, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHANNEL_NPM_TAG, CHANNEL_SERVER_URL, 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, SessionHostCompatibilityError, EXTENSION_CATALOG, SessionRegistry;
40408
+ var path4, import_promises4, import_fs3, import_child_process, import_util3, import_os2, import_path, import_fs4, import_crypto2, import_fs5, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs6, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs7, import_path3, import_child_process4, import_fs8, import_os3, path8, import_child_process5, os22, path9, import_fs9, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path18, crypto4, import_fs10, import_child_process7, os12, path16, crypto3, fs6, import_module, path17, import_stream2, import_child_process8, import_child_process9, net2, os15, path20, fs7, path19, os14, fs8, path21, os16, import_child_process10, import_crypto6, import_fs11, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path222, import_os4, import_path5, fs10, fs11, path23, os20, import_child_process13, import_os5, http2, fs15, path27, fs12, path24, fs13, path25, fs14, path26, os21, import_child_process14, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS2, DEFAULT_MESH_POLICY, init_repo_mesh_types, git_worktree_exports, execFileAsync2, WORKTREE_DIR_NAME, GIT_TIMEOUT_MS, GIT_MAX_BUFFER, init_git_worktree, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, SESSION_CLEANUP_MODES, SPAWNED_SESSION_VISIBILITY_MODES, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, TOOL_EXPOSURE_PREFLIGHT_SECTION, WORKFLOW_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, TerminalTranscriptAccumulator, 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, CHAT_MESSAGE_VISIBILITIES, CHAT_MESSAGE_TRANSCRIPT_VISIBILITIES, CHAT_MESSAGE_AUDIENCES, CHAT_MESSAGE_SOURCES, CHAT_MESSAGE_ACTIVITY_SOURCES, CHAT_MESSAGE_INTERNAL_SOURCES, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, EXPLICIT_HIDDEN_VISIBILITIES, EXPLICIT_VISIBLE_VISIBILITIES, HIDDEN_AUDIENCES, ACTIVITY_SOURCE_SET, INTERNAL_SOURCE_SET, 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, VALID_INPUT_MEDIA_TYPES, VALID_INPUT_STRATEGIES, TEXT_ONLY_MESSAGE_INPUT_SUPPORT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, HERMES_CLI_STARTING_SEND_SETTLE_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, IMAGE_MIME_EXTENSIONS, MATERIALIZED_IMAGE_MAX_AGE_MS, MATERIALIZED_IMAGE_CLEANUP_INTERVAL_MS, lastMaterializedImageCleanupAt, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, COORDINATOR_DELEGATED_ENV_UNSETS, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, VALID_INPUT_STRATEGIES2, 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, HERMES_CLI_TYPE, HERMES_MCP_CONFIG_PATH, MESH_COORDINATOR_EVENTS, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHANNEL_NPM_TAG, CHANNEL_SERVER_URL, 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, SessionHostCompatibilityError, EXTENSION_CATALOG, SessionRegistry;
40385
40409
  var init_dist2 = __esm({
40386
40410
  "../daemon-core/dist/index.mjs"() {
40387
40411
  "use strict";
@@ -40544,6 +40568,7 @@ var init_dist2 = __esm({
40544
40568
  requireApprovalForDestructiveGit: true,
40545
40569
  dirtyWorkspaceBehavior: "warn",
40546
40570
  maxParallelTasks: 2,
40571
+ spawnedSessionVisibility: "visible",
40547
40572
  sessionCleanupOnNodeRemove: "preserve"
40548
40573
  };
40549
40574
  }
@@ -40627,6 +40652,7 @@ var init_dist2 = __esm({
40627
40652
  init_config();
40628
40653
  init_repo_mesh_types();
40629
40654
  SESSION_CLEANUP_MODES = /* @__PURE__ */ new Set(["preserve", "stop", "delete_stopped", "stop_and_delete"]);
40655
+ SPAWNED_SESSION_VISIBILITY_MODES = /* @__PURE__ */ new Set(["visible", "hidden"]);
40630
40656
  }
40631
40657
  });
40632
40658
  coordinator_prompt_exports = {};
@@ -40963,6 +40989,155 @@ Before doing any coordinator work, confirm that the actual callable tool list in
40963
40989
  "src/cli-adapters/provider-cli-shared.ts"() {
40964
40990
  "use strict";
40965
40991
  init_spawn_env();
40992
+ TerminalTranscriptAccumulator = class {
40993
+ lines = [[]];
40994
+ row = 0;
40995
+ col = 0;
40996
+ savedCursor = null;
40997
+ pendingEscape = "";
40998
+ append(data) {
40999
+ const input = this.pendingEscape + String(data || "");
41000
+ this.pendingEscape = "";
41001
+ for (let i = 0; i < input.length; i += 1) {
41002
+ let ch = input[i];
41003
+ if (ch === "\x1B") {
41004
+ const consumed = this.consumeEscape(input.slice(i));
41005
+ if (consumed === 0) {
41006
+ this.pendingEscape = input.slice(i);
41007
+ break;
41008
+ }
41009
+ i += consumed - 1;
41010
+ continue;
41011
+ }
41012
+ const cp = input.codePointAt(i);
41013
+ if (cp && cp > 65535) {
41014
+ ch = String.fromCodePoint(cp);
41015
+ i += 1;
41016
+ }
41017
+ this.writeControlOrChar(ch);
41018
+ }
41019
+ return this.getText();
41020
+ }
41021
+ reset() {
41022
+ this.lines = [[]];
41023
+ this.row = 0;
41024
+ this.col = 0;
41025
+ this.savedCursor = null;
41026
+ this.pendingEscape = "";
41027
+ }
41028
+ getText() {
41029
+ return this.lines.map((line) => line.join("").replace(/[ \t]+$/g, "")).join("\n");
41030
+ }
41031
+ ensureRow(row = this.row) {
41032
+ while (this.lines.length <= row) this.lines.push([]);
41033
+ }
41034
+ writeControlOrChar(ch) {
41035
+ if (ch === "\r") {
41036
+ this.col = 0;
41037
+ return;
41038
+ }
41039
+ if (ch === "\n") {
41040
+ this.row += 1;
41041
+ this.col = 0;
41042
+ this.ensureRow();
41043
+ return;
41044
+ }
41045
+ if (ch === "\b") {
41046
+ this.col = Math.max(0, this.col - 1);
41047
+ return;
41048
+ }
41049
+ if (ch < " " || ch === "\x7F") return;
41050
+ this.ensureRow();
41051
+ const line = this.lines[this.row];
41052
+ if (isCombiningMark(ch) && this.col > 0) {
41053
+ line[this.col - 1] = `${line[this.col - 1] || ""}${ch}`;
41054
+ return;
41055
+ }
41056
+ while (line.length < this.col) line.push(" ");
41057
+ line[this.col] = ch;
41058
+ this.col += isWideCodePoint(ch) ? 2 : 1;
41059
+ }
41060
+ consumeEscape(seq2) {
41061
+ if (seq2.length < 2) return 0;
41062
+ const next = seq2[1];
41063
+ if (next === "7") {
41064
+ this.savedCursor = { row: this.row, col: this.col };
41065
+ return 2;
41066
+ }
41067
+ if (next === "8") {
41068
+ if (this.savedCursor) {
41069
+ this.row = this.savedCursor.row;
41070
+ this.col = this.savedCursor.col;
41071
+ this.ensureRow();
41072
+ }
41073
+ return 2;
41074
+ }
41075
+ if (next === "]") {
41076
+ const bel = seq2.indexOf("\x07", 2);
41077
+ const st = seq2.indexOf("\x1B\\", 2);
41078
+ const end = bel >= 0 && (st < 0 || bel < st) ? bel + 1 : st >= 0 ? st + 2 : 0;
41079
+ return end;
41080
+ }
41081
+ if (next === "[") {
41082
+ const match = seq2.match(/^\x1B\[([0-?]*)([ -/]*)([@-~])/);
41083
+ if (!match) return seq2.length < 32 ? 0 : 1;
41084
+ this.applyCsi(match[1] || "", match[3]);
41085
+ return match[0].length;
41086
+ }
41087
+ if (/[P^_X]/.test(next)) {
41088
+ const bel = seq2.indexOf("\x07", 2);
41089
+ const st = seq2.indexOf("\x1B\\", 2);
41090
+ const end = bel >= 0 && (st < 0 || bel < st) ? bel + 1 : st >= 0 ? st + 2 : 0;
41091
+ return end;
41092
+ }
41093
+ return 2;
41094
+ }
41095
+ applyCsi(params, final) {
41096
+ const count = parseCount(params);
41097
+ this.ensureRow();
41098
+ if (final === "A") this.row = Math.max(0, this.row - count);
41099
+ else if (final === "B") this.row += count;
41100
+ else if (final === "C") this.col += count;
41101
+ else if (final === "D") this.col = Math.max(0, this.col - count);
41102
+ else if (final === "G") this.col = Math.max(0, count - 1);
41103
+ else if (final === "H" || final === "f") {
41104
+ const parts = String(params || "").split(";");
41105
+ this.row = Math.max(0, (Number(parts[0] || 1) || 1) - 1);
41106
+ this.col = Math.max(0, (Number(parts[1] || 1) || 1) - 1);
41107
+ } else if (final === "J") {
41108
+ const mode = Number(params || 0) || 0;
41109
+ if (mode === 2 || mode === 3) {
41110
+ this.lines = [[]];
41111
+ this.row = 0;
41112
+ this.col = 0;
41113
+ } else if (mode === 0) {
41114
+ this.lines[this.row] = this.lines[this.row].slice(0, this.col);
41115
+ this.lines.splice(this.row + 1);
41116
+ } else if (mode === 1) {
41117
+ for (let r = 0; r < this.row; r += 1) this.lines[r] = [];
41118
+ const line = this.lines[this.row];
41119
+ for (let c = 0; c <= Math.min(this.col, line.length - 1); c += 1) line[c] = " ";
41120
+ }
41121
+ } else if (final === "K") {
41122
+ const mode = Number(params || 0) || 0;
41123
+ const line = this.lines[this.row];
41124
+ if (mode === 2) this.lines[this.row] = [];
41125
+ else if (mode === 1) {
41126
+ for (let c = 0; c <= Math.min(this.col, line.length - 1); c += 1) line[c] = " ";
41127
+ } else {
41128
+ this.lines[this.row] = line.slice(0, this.col);
41129
+ }
41130
+ } else if (final === "s") {
41131
+ this.savedCursor = { row: this.row, col: this.col };
41132
+ } else if (final === "u") {
41133
+ if (this.savedCursor) {
41134
+ this.row = this.savedCursor.row;
41135
+ this.col = this.savedCursor.col;
41136
+ }
41137
+ }
41138
+ this.ensureRow();
41139
+ }
41140
+ };
40966
41141
  buildCliSpawnEnv = sanitizeSpawnEnv;
40967
41142
  }
40968
41143
  });
@@ -41102,8 +41277,10 @@ Before doing any coordinator work, confirm that the actual callable tool list in
41102
41277
  // ─── CLI Scripts (script-based parsing) ───
41103
41278
  cliScripts;
41104
41279
  runtimeSettings = {};
41105
- /** Full accumulated ANSI-stripped PTY output */
41280
+ /** Full accumulated rendered PTY transcript for parser/readback use */
41106
41281
  accumulatedBuffer = "";
41282
+ /** Stateful rendered transcript accumulator; raw debug remains in accumulatedRawBuffer. */
41283
+ transcriptAccumulator = new TerminalTranscriptAccumulator();
41107
41284
  /** Full accumulated raw PTY output (with ANSI) */
41108
41285
  accumulatedRawBuffer = "";
41109
41286
  /** Current visible terminal screen snapshot */
@@ -41169,6 +41346,7 @@ ${lastSnapshot}`;
41169
41346
  }
41170
41347
  resetTerminalScreen(rows, cols) {
41171
41348
  this.terminalScreen.reset(rows, cols);
41349
+ this.transcriptAccumulator.reset();
41172
41350
  this.lastScreenText = "";
41173
41351
  this.lastScreenSnapshot = "";
41174
41352
  this.lastScreenChangeAt = 0;
@@ -41427,6 +41605,7 @@ ${lastSnapshot}`;
41427
41605
  handleOutput(rawData) {
41428
41606
  this.terminalScreen.write(rawData);
41429
41607
  const cleanData = sanitizeTerminalText(rawData);
41608
+ const renderedTranscript = this.transcriptAccumulator.append(rawData);
41430
41609
  const now = Date.now();
41431
41610
  const shouldReadScreen = this.shouldReadTerminalScreenSnapshot(now);
41432
41611
  const screenText = shouldReadScreen ? this.readTerminalScreenText(now) : this.lastScreenText;
@@ -41467,13 +41646,14 @@ ${lastSnapshot}`;
41467
41646
  }
41468
41647
  }
41469
41648
  const prevRecentLen = this.recentOutputBuffer.length;
41470
- const prevAccumulatedLen = this.accumulatedBuffer.length;
41471
41649
  const prevAccumulatedRawLen = this.accumulatedRawBuffer.length;
41472
- this.recentOutputBuffer = appendBoundedText(this.recentOutputBuffer, cleanData, _ProviderCliAdapter.MAX_RECENT_OUTPUT_BUFFER);
41473
- this.accumulatedBuffer = appendBoundedText(this.accumulatedBuffer, cleanData, _ProviderCliAdapter.MAX_ACCUMULATED_BUFFER);
41650
+ const nextAccumulatedBuffer = renderedTranscript.length <= _ProviderCliAdapter.MAX_ACCUMULATED_BUFFER ? renderedTranscript : renderedTranscript.slice(-_ProviderCliAdapter.MAX_ACCUMULATED_BUFFER);
41651
+ const nextRecentOutputBuffer = nextAccumulatedBuffer.slice(-_ProviderCliAdapter.MAX_RECENT_OUTPUT_BUFFER);
41652
+ this.recentOutputBuffer = nextRecentOutputBuffer;
41653
+ this.accumulatedBuffer = nextAccumulatedBuffer;
41474
41654
  this.accumulatedRawBuffer = appendBoundedText(this.accumulatedRawBuffer, rawData, _ProviderCliAdapter.MAX_ACCUMULATED_BUFFER);
41475
- const droppedRecent = this.recordBoundedAppendDrop(prevRecentLen, cleanData.length, this.recentOutputBuffer.length);
41476
- const droppedClean = this.recordBoundedAppendDrop(prevAccumulatedLen, cleanData.length, this.accumulatedBuffer.length);
41655
+ const droppedRecent = Math.max(0, prevRecentLen - this.recentOutputBuffer.length);
41656
+ const droppedClean = Math.max(0, renderedTranscript.length - this.accumulatedBuffer.length);
41477
41657
  const droppedRaw = this.recordBoundedAppendDrop(prevAccumulatedRawLen, rawData.length, this.accumulatedRawBuffer.length);
41478
41658
  this.recentOutputDroppedChars += droppedRecent;
41479
41659
  this.accumulatedBufferDroppedChars += droppedClean;
@@ -51345,6 +51525,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
51345
51525
  HERMES_MCP_CONFIG_PATH = "~/.hermes/config.yaml";
51346
51526
  init_mesh_config();
51347
51527
  init_logger();
51528
+ MESH_COORDINATOR_EVENTS = /* @__PURE__ */ new Set([
51529
+ "agent:generating_completed",
51530
+ "agent:waiting_approval",
51531
+ "agent:stopped",
51532
+ "monitor:long_generating"
51533
+ ]);
51348
51534
  init_config();
51349
51535
  init_terminal_screen();
51350
51536
  init_logger();
@@ -56489,6 +56675,9 @@ function readProviderPriority(policy) {
56489
56675
  const raw = policy?.providerPriority;
56490
56676
  return Array.isArray(raw) ? raw.map((type2) => typeof type2 === "string" ? type2.trim() : "").filter(Boolean) : [];
56491
56677
  }
56678
+ function readSpawnedSessionVisibility(policy) {
56679
+ return policy?.spawnedSessionVisibility === "hidden" ? "hidden" : "visible";
56680
+ }
56492
56681
  function missingProviderPriorityMessage(nodeId) {
56493
56682
  return `Node '${nodeId}' has no providerPriority policy; pass type explicitly or configure node.policy.providerPriority`;
56494
56683
  }
@@ -56860,13 +57049,16 @@ async function meshLaunchSession(ctx, args) {
56860
57049
  }
56861
57050
  }
56862
57051
  const coordinatorNode = resolveCoordinatorNode(ctx);
57052
+ const coordinatorDaemonId = coordinatorNode?.daemonId || ctx.localDaemonId;
57053
+ const spawnedSessionVisibility = readSpawnedSessionVisibility(ctx.mesh.policy);
56863
57054
  const result = await commandForNode(ctx, node, "launch_cli", {
56864
57055
  cliType: resolvedProviderType,
56865
57056
  dir: node.workspace,
56866
57057
  settings: {
56867
57058
  meshNodeFor: ctx.mesh.id,
56868
57059
  meshNodeId: args.node_id,
56869
- ...coordinatorNode?.daemonId ? { meshCoordinatorDaemonId: coordinatorNode.daemonId } : {},
57060
+ spawnedSessionVisibility,
57061
+ ...coordinatorDaemonId ? { meshCoordinatorDaemonId: coordinatorDaemonId } : {},
56870
57062
  ...coordinatorNode?.id ? { meshCoordinatorNodeId: coordinatorNode.id } : {},
56871
57063
  launchedByCoordinator: true
56872
57064
  }
@@ -58503,6 +58695,7 @@ async function startMcpServer(opts) {
58503
58695
  requireApprovalForDestructiveGit: true,
58504
58696
  dirtyWorkspaceBehavior: "warn",
58505
58697
  maxParallelTasks: 2,
58698
+ spawnedSessionVisibility: "visible",
58506
58699
  ...policy
58507
58700
  },
58508
58701
  coordinator,