adhdev 0.9.76-rc.23 → 0.9.76-rc.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +75 -15
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -93512,7 +93512,7 @@ var init_adhdev_daemon = __esm({
|
|
|
93512
93512
|
init_version();
|
|
93513
93513
|
init_src();
|
|
93514
93514
|
init_runtime_defaults();
|
|
93515
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
93515
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.24" });
|
|
93516
93516
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
93517
93517
|
localHttpServer = null;
|
|
93518
93518
|
localWss = null;
|
package/dist/index.js
CHANGED
|
@@ -62370,7 +62370,7 @@ var init_adhdev_daemon = __esm({
|
|
|
62370
62370
|
init_version();
|
|
62371
62371
|
init_src();
|
|
62372
62372
|
init_runtime_defaults();
|
|
62373
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
62373
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.24" });
|
|
62374
62374
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
62375
62375
|
localHttpServer = null;
|
|
62376
62376
|
localWss = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adhdev",
|
|
3
|
-
"version": "0.9.76-rc.
|
|
3
|
+
"version": "0.9.76-rc.24",
|
|
4
4
|
"description": "ADHDev — Agent Dashboard Hub for Dev. Remote-control AI coding agents from anywhere.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/daemon-core": "0.9.76-rc.
|
|
50
|
+
"@adhdev/daemon-core": "0.9.76-rc.24",
|
|
51
51
|
"@adhdev/ghostty-vt-node": "*",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"@xterm/addon-serialize": "^0.14.0",
|
|
@@ -2442,7 +2442,7 @@ var require_websocket = __commonJS({
|
|
|
2442
2442
|
var http3 = require("http");
|
|
2443
2443
|
var net3 = require("net");
|
|
2444
2444
|
var tls = require("tls");
|
|
2445
|
-
var { randomBytes, createHash } = require("crypto");
|
|
2445
|
+
var { randomBytes, createHash: createHash2 } = require("crypto");
|
|
2446
2446
|
var { Duplex, Readable: Readable3 } = require("stream");
|
|
2447
2447
|
var { URL: URL2 } = require("url");
|
|
2448
2448
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3102,7 +3102,7 @@ var require_websocket = __commonJS({
|
|
|
3102
3102
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
3103
3103
|
return;
|
|
3104
3104
|
}
|
|
3105
|
-
const digest =
|
|
3105
|
+
const digest = createHash2("sha1").update(key + GUID).digest("base64");
|
|
3106
3106
|
if (res.headers["sec-websocket-accept"] !== digest) {
|
|
3107
3107
|
abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
|
|
3108
3108
|
return;
|
|
@@ -3469,7 +3469,7 @@ var require_websocket_server = __commonJS({
|
|
|
3469
3469
|
var EventEmitter2 = require("events");
|
|
3470
3470
|
var http3 = require("http");
|
|
3471
3471
|
var { Duplex } = require("stream");
|
|
3472
|
-
var { createHash } = require("crypto");
|
|
3472
|
+
var { createHash: createHash2 } = require("crypto");
|
|
3473
3473
|
var extension = require_extension();
|
|
3474
3474
|
var PerMessageDeflate = require_permessage_deflate();
|
|
3475
3475
|
var subprotocol = require_subprotocol();
|
|
@@ -3770,7 +3770,7 @@ var require_websocket_server = __commonJS({
|
|
|
3770
3770
|
);
|
|
3771
3771
|
}
|
|
3772
3772
|
if (this._state > RUNNING) return abortHandshake(socket, 503);
|
|
3773
|
-
const digest =
|
|
3773
|
+
const digest = createHash2("sha1").update(key + GUID).digest("base64");
|
|
3774
3774
|
const headers = [
|
|
3775
3775
|
"HTTP/1.1 101 Switching Protocols",
|
|
3776
3776
|
"Upgrade: websocket",
|
|
@@ -27367,7 +27367,10 @@ async function gitCheckpoint2(workspace, message, includeUntracked) {
|
|
|
27367
27367
|
} catch (err) {
|
|
27368
27368
|
const output = (err?.stdout || "") + (err?.stderr || "");
|
|
27369
27369
|
if (/nothing to commit/i.test(output)) {
|
|
27370
|
-
throw new GitCommandError("
|
|
27370
|
+
throw new GitCommandError("nothing_to_commit", "Nothing to commit \u2014 working tree is clean.", {
|
|
27371
|
+
stdout: err?.stdout,
|
|
27372
|
+
stderr: err?.stderr
|
|
27373
|
+
});
|
|
27371
27374
|
}
|
|
27372
27375
|
throw err;
|
|
27373
27376
|
}
|
|
@@ -33411,6 +33414,29 @@ function colorize(color, text) {
|
|
|
33411
33414
|
const fn = chalkApi?.[color];
|
|
33412
33415
|
return typeof fn === "function" ? fn(text) : text;
|
|
33413
33416
|
}
|
|
33417
|
+
function hasCliArg(args, flag) {
|
|
33418
|
+
return args.some((arg) => arg === flag || arg.startsWith(`${flag}=`));
|
|
33419
|
+
}
|
|
33420
|
+
function ensureEmptyDelegatedMcpConfig(workspace) {
|
|
33421
|
+
const baseDir = path17.join(os13.tmpdir(), "adhdev-delegated-agent-empty-mcp");
|
|
33422
|
+
(0, import_fs8.mkdirSync)(baseDir, { recursive: true });
|
|
33423
|
+
const workspaceHash = crypto4.createHash("sha256").update(path17.resolve(workspace || os13.tmpdir())).digest("hex").slice(0, 16);
|
|
33424
|
+
const filePath = path17.join(baseDir, `${workspaceHash}.json`);
|
|
33425
|
+
(0, import_fs8.writeFileSync)(filePath, JSON.stringify({ mcpServers: {} }, null, 2), "utf-8");
|
|
33426
|
+
return filePath;
|
|
33427
|
+
}
|
|
33428
|
+
function buildCoordinatorDelegatedCliLaunchOptions(input) {
|
|
33429
|
+
const cliType = String(input.cliType || "").trim();
|
|
33430
|
+
const cliArgs = Array.isArray(input.cliArgs) ? [...input.cliArgs] : [];
|
|
33431
|
+
const env2 = { ...input.env || {}, ...COORDINATOR_DELEGATED_ENV_UNSETS };
|
|
33432
|
+
if (cliType === "hermes-cli" && !hasCliArg(cliArgs, "--ignore-user-config")) {
|
|
33433
|
+
cliArgs.unshift("--ignore-user-config");
|
|
33434
|
+
}
|
|
33435
|
+
if (cliType === "claude-cli" && !hasCliArg(cliArgs, "--mcp-config")) {
|
|
33436
|
+
cliArgs.unshift("--mcp-config", ensureEmptyDelegatedMcpConfig(input.workspace));
|
|
33437
|
+
}
|
|
33438
|
+
return { cliArgs, env: env2 };
|
|
33439
|
+
}
|
|
33414
33440
|
function isUuid(value) {
|
|
33415
33441
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
33416
33442
|
}
|
|
@@ -39701,7 +39727,7 @@ async function shutdownDaemonComponents(components) {
|
|
|
39701
39727
|
}
|
|
39702
39728
|
cdpManagers.clear();
|
|
39703
39729
|
}
|
|
39704
|
-
var path4, import_promises4, import_fs, import_child_process, import_util3, import_os, import_path, import_fs2, import_crypto2, import_fs3, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs4, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs5, import_path3, import_child_process4, import_fs6, import_os2, path8, import_child_process5, os22, path9, import_fs7, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path17, crypto4, import_fs8, import_child_process7, os12, path16, crypto3, fs6, import_module, import_stream2, import_child_process8, import_child_process9, net2, os15, path19, fs7, path18, os14, fs8, path20, os16, import_child_process10, import_fs9, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path21, fs10, fs11, path222, os20, import_child_process13, import_os3, http2, fs15, path26, fs12, path23, fs13, path24, fs14, path25, 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, init_mesh_config, coordinator_prompt_exports, TOOLS_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, 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, 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, EXTENSION_CATALOG, SessionRegistry;
|
|
39730
|
+
var path4, import_promises4, import_fs, import_child_process, import_util3, import_os, import_path, import_fs2, import_crypto2, import_fs3, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs4, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs5, import_path3, import_child_process4, import_fs6, import_os2, path8, import_child_process5, os22, path9, import_fs7, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path17, crypto4, import_fs8, import_child_process7, os12, path16, crypto3, fs6, import_module, import_stream2, import_child_process8, import_child_process9, net2, os15, path19, fs7, path18, os14, fs8, path20, os16, import_child_process10, import_fs9, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path21, fs10, fs11, path222, os20, import_child_process13, import_os3, http2, fs15, path26, fs12, path23, fs13, path24, fs14, path25, 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, init_mesh_config, coordinator_prompt_exports, TOOLS_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, 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, COORDINATOR_DELEGATED_ENV_UNSETS, 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, 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, EXTENSION_CATALOG, SessionRegistry;
|
|
39705
39731
|
var init_dist2 = __esm({
|
|
39706
39732
|
"../daemon-core/dist/index.mjs"() {
|
|
39707
39733
|
"use strict";
|
|
@@ -42570,6 +42596,7 @@ ${lastSnapshot}`;
|
|
|
42570
42596
|
"dirty_index_required",
|
|
42571
42597
|
"conflict",
|
|
42572
42598
|
"invalid_args",
|
|
42599
|
+
"nothing_to_commit",
|
|
42573
42600
|
"git_command_failed"
|
|
42574
42601
|
]);
|
|
42575
42602
|
defaultSnapshotStore = createGitSnapshotStore({
|
|
@@ -47019,10 +47046,26 @@ ${effect.notification.body || ""}`.trim();
|
|
|
47019
47046
|
}
|
|
47020
47047
|
mergeConversationMessages(parsedMessages) {
|
|
47021
47048
|
if (this.runtimeMessages.length === 0) return normalizeChatMessages(parsedMessages);
|
|
47022
|
-
|
|
47023
|
-
|
|
47024
|
-
|
|
47025
|
-
|
|
47049
|
+
const parsedEntries = parsedMessages.map((message, index) => ({
|
|
47050
|
+
message,
|
|
47051
|
+
index,
|
|
47052
|
+
source: "parsed"
|
|
47053
|
+
}));
|
|
47054
|
+
const runtimeEntries = this.runtimeMessages.map((entry, index) => ({
|
|
47055
|
+
message: entry.message,
|
|
47056
|
+
index: parsedMessages.length + index,
|
|
47057
|
+
source: "runtime"
|
|
47058
|
+
}));
|
|
47059
|
+
const getTime = (message) => {
|
|
47060
|
+
const value = typeof message.receivedAt === "number" ? message.receivedAt : typeof message.timestamp === "number" ? message.timestamp : 0;
|
|
47061
|
+
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
47062
|
+
};
|
|
47063
|
+
return normalizeChatMessages([...parsedEntries, ...runtimeEntries].sort((a, b) => {
|
|
47064
|
+
const aTime = getTime(a.message);
|
|
47065
|
+
const bTime = getTime(b.message);
|
|
47066
|
+
if (aTime && bTime && aTime !== bTime) return aTime - bTime;
|
|
47067
|
+
if (aTime && !bTime && a.source === "runtime" && b.source === "parsed") return -1;
|
|
47068
|
+
if (!aTime && bTime && a.source === "parsed" && b.source === "runtime") return 1;
|
|
47026
47069
|
return a.index - b.index;
|
|
47027
47070
|
}).map((entry) => entry.message));
|
|
47028
47071
|
}
|
|
@@ -48248,6 +48291,12 @@ ${rawInput}` : rawInput;
|
|
|
48248
48291
|
init_logger();
|
|
48249
48292
|
chalkModule = source_default;
|
|
48250
48293
|
chalkApi = typeof chalkModule.yellow === "function" ? chalkModule : chalkModule.default || null;
|
|
48294
|
+
COORDINATOR_DELEGATED_ENV_UNSETS = {
|
|
48295
|
+
ADHDEV_INLINE_MESH: "",
|
|
48296
|
+
ADHDEV_MCP_TRANSPORT: "",
|
|
48297
|
+
ADHDEV_MESH_ID: "",
|
|
48298
|
+
HERMES_EPHEMERAL_SYSTEM_PROMPT: ""
|
|
48299
|
+
};
|
|
48251
48300
|
DaemonCliManager = class {
|
|
48252
48301
|
adapters = /* @__PURE__ */ new Map();
|
|
48253
48302
|
deps;
|
|
@@ -48766,12 +48815,23 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
48766
48815
|
const dir = resolved.path;
|
|
48767
48816
|
const launchSource = resolved.source;
|
|
48768
48817
|
if (!cliType) throw new Error("cliType required");
|
|
48818
|
+
const settingsOverride = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
|
|
48819
|
+
const delegatedLaunch = settingsOverride?.launchedByCoordinator === true ? buildCoordinatorDelegatedCliLaunchOptions({
|
|
48820
|
+
cliType,
|
|
48821
|
+
workspace: dir,
|
|
48822
|
+
cliArgs: args?.cliArgs,
|
|
48823
|
+
env: args?.env
|
|
48824
|
+
}) : null;
|
|
48769
48825
|
const started = await this.startSession(
|
|
48770
48826
|
cliType,
|
|
48771
48827
|
dir,
|
|
48772
|
-
args?.cliArgs,
|
|
48828
|
+
delegatedLaunch ? delegatedLaunch.cliArgs : args?.cliArgs,
|
|
48773
48829
|
args?.initialModel,
|
|
48774
|
-
{
|
|
48830
|
+
{
|
|
48831
|
+
resumeSessionId: args?.resumeSessionId,
|
|
48832
|
+
settingsOverride,
|
|
48833
|
+
extraEnv: delegatedLaunch ? delegatedLaunch.env : args?.env
|
|
48834
|
+
}
|
|
48775
48835
|
);
|
|
48776
48836
|
return {
|
|
48777
48837
|
success: true,
|
|
@@ -51434,7 +51494,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51434
51494
|
workspace
|
|
51435
51495
|
};
|
|
51436
51496
|
}
|
|
51437
|
-
const { existsSync: existsSync23, readFileSync: readFileSync15, writeFileSync:
|
|
51497
|
+
const { existsSync: existsSync23, readFileSync: readFileSync15, writeFileSync: writeFileSync13, copyFileSync: copyFileSync3, mkdirSync: mkdirSync15 } = await import("fs");
|
|
51438
51498
|
const { dirname: dirname92 } = await import("path");
|
|
51439
51499
|
const mcpConfigPath = coordinatorSetup.configPath;
|
|
51440
51500
|
const hermesManualFallback = cliType === "hermes-cli" && configFormat === "hermes_config_yaml" ? createHermesManualMeshCoordinatorSetup(meshId, workspace) : null;
|
|
@@ -51458,7 +51518,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51458
51518
|
};
|
|
51459
51519
|
}
|
|
51460
51520
|
try {
|
|
51461
|
-
|
|
51521
|
+
mkdirSync15(dirname92(mcpConfigPath), { recursive: true });
|
|
51462
51522
|
} catch (error48) {
|
|
51463
51523
|
const message = `Could not prepare MCP config path for automatic setup: ${error48?.message || error48}`;
|
|
51464
51524
|
LOG.error("MeshCoordinator", message);
|
|
@@ -51490,7 +51550,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51490
51550
|
}
|
|
51491
51551
|
};
|
|
51492
51552
|
try {
|
|
51493
|
-
|
|
51553
|
+
writeFileSync13(mcpConfigPath, serializeMeshCoordinatorMcpConfig(mcpConfig, configFormat), "utf-8");
|
|
51494
51554
|
} catch (error48) {
|
|
51495
51555
|
const message = `Could not write MCP config for automatic setup: ${error48?.message || error48}`;
|
|
51496
51556
|
LOG.error("MeshCoordinator", message);
|