@adhdev/daemon-standalone 0.9.77-rc.46 → 0.9.77-rc.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +138 -9
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -26198,6 +26198,15 @@ function getMeshQueueStats(meshId) {
|
|
|
26198
26198
|
completed,
|
|
26199
26199
|
failed,
|
|
26200
26200
|
cancelled,
|
|
26201
|
+
activeCounts: {
|
|
26202
|
+
pending,
|
|
26203
|
+
assigned
|
|
26204
|
+
},
|
|
26205
|
+
historicalCounts: {
|
|
26206
|
+
completed,
|
|
26207
|
+
failed,
|
|
26208
|
+
cancelled
|
|
26209
|
+
},
|
|
26201
26210
|
activeAssignments: queue.filter((q) => q.status === "assigned").map((q) => ({
|
|
26202
26211
|
id: q.id,
|
|
26203
26212
|
nodeId: q.assignedNodeId,
|
|
@@ -41693,7 +41702,7 @@ async function shutdownDaemonComponents(components) {
|
|
|
41693
41702
|
}
|
|
41694
41703
|
cdpManagers.clear();
|
|
41695
41704
|
}
|
|
41696
|
-
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, import_fs6, import_path3, import_crypto4, import_events2, import_fs7, import_path4, import_crypto5, import_child_process2, os22, path8, import_fs8, fs2, path9, os32, os8, os9, path14, import_child_process3, os10, path15, os11, import_child_process4, import_fs9, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os4, path5, import_crypto6, path6, path7, import_fs10, import_path5, import_child_process5, import_fs11, import_os3, path10, os42, import_child_process6, http, crypto2, fs3, path11, os5, fs4, os6, path12, import_crypto7, fs5, path13, os7, os13, path18, crypto4, import_fs12, 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_crypto8, import_fs13, import_module2, os17, import_path6, os18, import_child_process11, import_child_process12, fs9, os19, path222, import_os4, import_path7, 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, SUBMODULE_WORKTREE_REMOVE_RE, 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, mesh_ledger_exports, LEDGER_DIR_NAME, MAX_FILE_SIZE_BYTES, RECENT_FAILURE_WINDOW_MS, meshLedgerEvents, init_mesh_ledger, mesh_work_queue_exports, init_mesh_work_queue, init_cli_detector, 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, mesh_events_exports, remoteIdleSessions, MAX_PENDING_EVENTS, pendingMeshCoordinatorEvents, MESH_COORDINATOR_EVENTS, EVENT_TO_LEDGER_KIND, autoLaunchInProgress, autoLaunchCooldownUntil, AUTO_LAUNCH_COOLDOWN_MS, init_mesh_events, 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, NO_FALLBACK_REASON, P2P_NEXT_ACTION, NON_P2P_NEXT_ACTION, P2pRelayFailureError, 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, COMPLETED_FINALIZATION_RETRY_MS, COMPLETED_FINALIZATION_MAX_WAIT_MS, 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, REFINE_VALIDATION_CATEGORIES, REFINE_VALIDATION_TIMEOUT_MS, REFINE_VALIDATION_OUTPUT_LIMIT_BYTES, REFINE_VALIDATION_SUMMARY_CHARS, REFINE_VALIDATION_MAX_COMMANDS, 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;
|
|
41705
|
+
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, import_fs6, import_path3, import_crypto4, import_events2, import_fs7, import_path4, import_crypto5, import_child_process2, os22, path8, import_fs8, fs2, path9, os32, os8, os9, path14, import_child_process3, os10, path15, os11, import_child_process4, import_fs9, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os4, path5, import_crypto6, path6, path7, import_fs10, import_path5, import_child_process5, import_fs11, import_os3, path10, os42, import_child_process6, http, crypto2, fs3, path11, os5, fs4, os6, path12, import_crypto7, fs5, path13, os7, os13, path18, crypto4, import_fs12, 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_crypto8, import_fs13, import_module2, os17, import_path6, os18, import_child_process11, import_child_process12, fs9, os19, path222, import_os4, import_path7, 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, SUBMODULE_WORKTREE_REMOVE_RE, 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, mesh_ledger_exports, LEDGER_DIR_NAME, MAX_FILE_SIZE_BYTES, RECENT_FAILURE_WINDOW_MS, meshLedgerEvents, init_mesh_ledger, mesh_work_queue_exports, ACTIVE_MESH_QUEUE_STATUSES, HISTORICAL_MESH_QUEUE_STATUSES, init_mesh_work_queue, init_cli_detector, 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, mesh_events_exports, remoteIdleSessions, MAX_PENDING_EVENTS, pendingMeshCoordinatorEvents, MESH_COORDINATOR_EVENTS, EVENT_TO_LEDGER_KIND, autoLaunchInProgress, autoLaunchCooldownUntil, AUTO_LAUNCH_COOLDOWN_MS, init_mesh_events, 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, NO_FALLBACK_REASON, P2P_NEXT_ACTION, NON_P2P_NEXT_ACTION, P2pRelayFailureError, 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, COMPLETED_FINALIZATION_RETRY_MS, COMPLETED_FINALIZATION_MAX_WAIT_MS, 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, REFINE_VALIDATION_CATEGORIES, REFINE_VALIDATION_TIMEOUT_MS, REFINE_VALIDATION_OUTPUT_LIMIT_BYTES, REFINE_VALIDATION_SUMMARY_CHARS, REFINE_VALIDATION_MAX_COMMANDS, 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;
|
|
41697
41706
|
var init_dist2 = __esm({
|
|
41698
41707
|
"../daemon-core/dist/index.mjs"() {
|
|
41699
41708
|
"use strict";
|
|
@@ -42038,6 +42047,8 @@ Follow these recovery rules:
|
|
|
42038
42047
|
});
|
|
42039
42048
|
mesh_work_queue_exports = {};
|
|
42040
42049
|
__export2(mesh_work_queue_exports, {
|
|
42050
|
+
ACTIVE_MESH_QUEUE_STATUSES: () => ACTIVE_MESH_QUEUE_STATUSES,
|
|
42051
|
+
HISTORICAL_MESH_QUEUE_STATUSES: () => HISTORICAL_MESH_QUEUE_STATUSES,
|
|
42041
42052
|
cancelTask: () => cancelTask,
|
|
42042
42053
|
claimNextTask: () => claimNextTask,
|
|
42043
42054
|
enqueueTask: () => enqueueTask,
|
|
@@ -42052,6 +42063,8 @@ Follow these recovery rules:
|
|
|
42052
42063
|
"src/mesh/mesh-work-queue.ts"() {
|
|
42053
42064
|
"use strict";
|
|
42054
42065
|
init_mesh_ledger();
|
|
42066
|
+
ACTIVE_MESH_QUEUE_STATUSES = ["pending", "assigned"];
|
|
42067
|
+
HISTORICAL_MESH_QUEUE_STATUSES = ["completed", "failed", "cancelled"];
|
|
42055
42068
|
}
|
|
42056
42069
|
});
|
|
42057
42070
|
init_cli_detector = __esm2({
|
|
@@ -54134,10 +54147,21 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
54134
54147
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
54135
54148
|
if (!meshId) return { success: false, error: "meshId required" };
|
|
54136
54149
|
try {
|
|
54137
|
-
const { getQueue: getQueue2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
54150
|
+
const { getMeshQueueStats: getMeshQueueStats2, getQueue: getQueue2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
54138
54151
|
const status = Array.isArray(args?.status) ? args.status.map((s) => typeof s === "string" ? s.trim() : "").filter(Boolean) : void 0;
|
|
54139
54152
|
const queue = getQueue2(meshId, { status });
|
|
54140
|
-
|
|
54153
|
+
const summary = getMeshQueueStats2(meshId);
|
|
54154
|
+
return {
|
|
54155
|
+
success: true,
|
|
54156
|
+
queue,
|
|
54157
|
+
summary,
|
|
54158
|
+
sourceOfTruth: {
|
|
54159
|
+
kind: "mesh_work_queue_file",
|
|
54160
|
+
activeStatuses: ["pending", "assigned"],
|
|
54161
|
+
historicalStatuses: ["completed", "failed", "cancelled"],
|
|
54162
|
+
notes: "pending/assigned are active work; completed/failed/cancelled are historical records."
|
|
54163
|
+
}
|
|
54164
|
+
};
|
|
54141
54165
|
} catch (e) {
|
|
54142
54166
|
return { success: false, error: e.message };
|
|
54143
54167
|
}
|
|
@@ -58579,6 +58603,7 @@ function readString(value) {
|
|
|
58579
58603
|
}
|
|
58580
58604
|
var DUPLICATE_DISPATCH_WINDOW_MS = 6e4;
|
|
58581
58605
|
var STALE_ASSIGNED_QUEUE_MS = 30 * 6e4;
|
|
58606
|
+
var OLD_HISTORICAL_QUEUE_RECORD_MS = 7 * 24 * 60 * 6e4;
|
|
58582
58607
|
var ACTIVE_QUEUE_STATUSES = /* @__PURE__ */ new Set(["pending", "assigned"]);
|
|
58583
58608
|
var HISTORICAL_QUEUE_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
|
|
58584
58609
|
async function refreshMeshFromDaemon(ctx) {
|
|
@@ -58799,6 +58824,74 @@ function buildQueueStatusSummary(queue) {
|
|
|
58799
58824
|
}
|
|
58800
58825
|
};
|
|
58801
58826
|
}
|
|
58827
|
+
function normalizeQueueViewMode(value) {
|
|
58828
|
+
return value === "active" || value === "historical" || value === "all" ? value : "all";
|
|
58829
|
+
}
|
|
58830
|
+
function sanitizeQueueStatusFilter(value) {
|
|
58831
|
+
if (!Array.isArray(value)) return void 0;
|
|
58832
|
+
const statuses = value.map((item) => typeof item === "string" ? item.trim() : "").filter((status) => ACTIVE_QUEUE_STATUSES.has(status) || HISTORICAL_QUEUE_STATUSES.has(status));
|
|
58833
|
+
return statuses.length ? Array.from(new Set(statuses)) : void 0;
|
|
58834
|
+
}
|
|
58835
|
+
function filterQueueForView(queue, view, statuses) {
|
|
58836
|
+
if (statuses?.length) {
|
|
58837
|
+
const allowed = new Set(statuses);
|
|
58838
|
+
return queue.filter((task) => allowed.has(String(task?.status || "")));
|
|
58839
|
+
}
|
|
58840
|
+
if (view === "active") return queue.filter((task) => ACTIVE_QUEUE_STATUSES.has(String(task?.status || "")));
|
|
58841
|
+
if (view === "historical") return queue.filter((task) => HISTORICAL_QUEUE_STATUSES.has(String(task?.status || "")));
|
|
58842
|
+
return queue;
|
|
58843
|
+
}
|
|
58844
|
+
function slimQueueTask(task) {
|
|
58845
|
+
return {
|
|
58846
|
+
id: task?.id,
|
|
58847
|
+
status: task?.status,
|
|
58848
|
+
assignedNodeId: task?.assignedNodeId,
|
|
58849
|
+
assignedSessionId: task?.assignedSessionId,
|
|
58850
|
+
targetNodeId: task?.targetNodeId,
|
|
58851
|
+
targetSessionId: task?.targetSessionId,
|
|
58852
|
+
updatedAt: task?.updatedAt,
|
|
58853
|
+
staleAssigned: task?.staleAssigned === true,
|
|
58854
|
+
staleReason: task?.staleReason
|
|
58855
|
+
};
|
|
58856
|
+
}
|
|
58857
|
+
function buildQueueMaintenanceReport(queue) {
|
|
58858
|
+
const now = Date.now();
|
|
58859
|
+
const staleAssignedTasks = queue.filter((task) => task?.status === "assigned" && task?.staleAssigned === true).map(slimQueueTask);
|
|
58860
|
+
const historicalTasks = queue.filter((task) => HISTORICAL_QUEUE_STATUSES.has(String(task?.status || "")));
|
|
58861
|
+
const oldHistoricalTasks = historicalTasks.filter((task) => {
|
|
58862
|
+
const updatedAt = new Date(task?.updatedAt).getTime();
|
|
58863
|
+
return Number.isFinite(updatedAt) && now - updatedAt >= OLD_HISTORICAL_QUEUE_RECORD_MS;
|
|
58864
|
+
}).map((task) => ({
|
|
58865
|
+
...slimQueueTask(task),
|
|
58866
|
+
cleanupClass: "old_historical_record",
|
|
58867
|
+
reason: "terminal queue record is older than the read-only maintenance threshold"
|
|
58868
|
+
}));
|
|
58869
|
+
const cleanupCandidates = [
|
|
58870
|
+
...staleAssignedTasks.map((task) => ({
|
|
58871
|
+
...task,
|
|
58872
|
+
cleanupClass: "stale_assigned",
|
|
58873
|
+
reason: typeof task.staleReason === "string" ? task.staleReason : "active assigned task does not match current live mesh node/session state",
|
|
58874
|
+
suggestedOperation: "operator_review_then_requeue_or_cancel"
|
|
58875
|
+
})),
|
|
58876
|
+
...oldHistoricalTasks.map((task) => ({
|
|
58877
|
+
...task,
|
|
58878
|
+
suggestedOperation: "operator_review_then_archive_or_keep"
|
|
58879
|
+
}))
|
|
58880
|
+
];
|
|
58881
|
+
return {
|
|
58882
|
+
readOnly: true,
|
|
58883
|
+
mutationPerformed: false,
|
|
58884
|
+
sourceOfTruth: "mesh_work_queue_file",
|
|
58885
|
+
staleAssignedDefinition: "Only active assigned queue rows are stale candidates, and only when the assigned node/session is absent from the current live mesh snapshot.",
|
|
58886
|
+
historicalDefinition: "completed/failed/cancelled rows are historical ledger records and never active assignments.",
|
|
58887
|
+
staleAssignedTasks,
|
|
58888
|
+
staleAssignedCount: staleAssignedTasks.length,
|
|
58889
|
+
historicalRecordCount: historicalTasks.length,
|
|
58890
|
+
oldHistoricalRecordCount: oldHistoricalTasks.length,
|
|
58891
|
+
cleanupCandidates,
|
|
58892
|
+
cleanupCandidateCount: cleanupCandidates.length
|
|
58893
|
+
};
|
|
58894
|
+
}
|
|
58802
58895
|
function annotateQueueStaleness(queue, mesh) {
|
|
58803
58896
|
const liveness = buildQueueLivenessIndex(mesh);
|
|
58804
58897
|
const now = Date.now();
|
|
@@ -59352,14 +59445,19 @@ var MESH_ENQUEUE_TASK_TOOL = {
|
|
|
59352
59445
|
};
|
|
59353
59446
|
var MESH_VIEW_QUEUE_TOOL = {
|
|
59354
59447
|
name: "mesh_view_queue",
|
|
59355
|
-
description: "View the
|
|
59448
|
+
description: "View the mesh work queue with source-of-truth active counts separated from historical completed/failed/cancelled records.",
|
|
59356
59449
|
inputSchema: {
|
|
59357
59450
|
type: "object",
|
|
59358
59451
|
properties: {
|
|
59359
59452
|
status: {
|
|
59360
59453
|
type: "array",
|
|
59361
59454
|
items: { type: "string" },
|
|
59362
|
-
description: "
|
|
59455
|
+
description: "Explicit row filter by task status: pending, assigned, completed, failed, cancelled. Source-of-truth counts remain unfiltered; visible* counts describe returned rows."
|
|
59456
|
+
},
|
|
59457
|
+
view: {
|
|
59458
|
+
type: "string",
|
|
59459
|
+
enum: ["all", "active", "historical"],
|
|
59460
|
+
description: "Optional row view. active returns pending/assigned rows, historical returns completed/failed/cancelled rows, all returns every persisted queue row. Defaults to all for compatibility."
|
|
59363
59461
|
}
|
|
59364
59462
|
}
|
|
59365
59463
|
}
|
|
@@ -59756,19 +59854,50 @@ async function meshEnqueueTask(ctx, args) {
|
|
|
59756
59854
|
}
|
|
59757
59855
|
async function meshViewQueue(ctx, args) {
|
|
59758
59856
|
try {
|
|
59759
|
-
const
|
|
59760
|
-
const
|
|
59761
|
-
const
|
|
59857
|
+
const statusFilter = sanitizeQueueStatusFilter(args.status);
|
|
59858
|
+
const view = normalizeQueueViewMode(args.view);
|
|
59859
|
+
const fullQueue = annotateQueueStaleness(getQueue(ctx.mesh.id), ctx.mesh);
|
|
59860
|
+
const queue = filterQueueForView(fullQueue, view, statusFilter);
|
|
59861
|
+
const summary = buildQueueStatusSummary(fullQueue);
|
|
59862
|
+
const visibleSummary = buildQueueStatusSummary(queue);
|
|
59863
|
+
const maintenance = buildQueueMaintenanceReport(fullQueue);
|
|
59864
|
+
const staleAssignedTasks = maintenance.staleAssignedTasks || [];
|
|
59865
|
+
const requestedHistoricalRows = queue.some((task) => HISTORICAL_QUEUE_STATUSES.has(String(task?.status || "")));
|
|
59762
59866
|
return JSON.stringify({
|
|
59763
59867
|
success: true,
|
|
59868
|
+
sourceOfTruth: {
|
|
59869
|
+
kind: "mesh_work_queue_file",
|
|
59870
|
+
activeStatuses: ["pending", "assigned"],
|
|
59871
|
+
historicalStatuses: ["completed", "failed", "cancelled"],
|
|
59872
|
+
notes: "pending/assigned are active work; completed/failed/cancelled are historical ledger records and never stale assignments."
|
|
59873
|
+
},
|
|
59874
|
+
filter: {
|
|
59875
|
+
view,
|
|
59876
|
+
statuses: statusFilter,
|
|
59877
|
+
filtered: Boolean(statusFilter?.length) || view !== "all"
|
|
59878
|
+
},
|
|
59764
59879
|
queue,
|
|
59880
|
+
visibleQueue: queue,
|
|
59881
|
+
visibleSummary,
|
|
59765
59882
|
summary,
|
|
59766
59883
|
activeCounts: summary.activeCounts,
|
|
59767
59884
|
historicalCounts: summary.historicalCounts,
|
|
59768
59885
|
activeCount: summary.activeCount,
|
|
59769
59886
|
historicalCount: summary.historicalCount,
|
|
59887
|
+
visibleActiveCounts: visibleSummary.activeCounts,
|
|
59888
|
+
visibleHistoricalCounts: visibleSummary.historicalCounts,
|
|
59889
|
+
visibleActiveCount: visibleSummary.activeCount,
|
|
59890
|
+
visibleHistoricalCount: visibleSummary.historicalCount,
|
|
59770
59891
|
staleAssignedTasks,
|
|
59771
|
-
staleAssignedCount:
|
|
59892
|
+
staleAssignedCount: maintenance.staleAssignedCount,
|
|
59893
|
+
queueMaintenance: maintenance,
|
|
59894
|
+
cleanupDryRun: maintenance,
|
|
59895
|
+
...view === "active" || statusFilter?.some((status) => ACTIVE_QUEUE_STATUSES.has(status)) ? {
|
|
59896
|
+
activeQueue: queue.filter((task) => ACTIVE_QUEUE_STATUSES.has(String(task?.status || "")))
|
|
59897
|
+
} : {},
|
|
59898
|
+
...view === "historical" || requestedHistoricalRows ? {
|
|
59899
|
+
historicalQueue: queue.filter((task) => HISTORICAL_QUEUE_STATUSES.has(String(task?.status || "")))
|
|
59900
|
+
} : {},
|
|
59772
59901
|
// Back-compat alias for callers already reading the first hardening payload.
|
|
59773
59902
|
staleAssignments: staleAssignedTasks
|
|
59774
59903
|
}, null, 2);
|