@adhdev/daemon-core 0.9.82-rc.485 → 0.9.82-rc.487
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/git/git-status.d.ts +23 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +343 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +342 -55
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-queue-assignment.d.ts +4 -0
- package/dist/mesh/mesh-refine-gates.d.ts +29 -0
- package/dist/mesh/mesh-work-queue.d.ts +9 -0
- package/dist/repo-mesh-types.d.ts +18 -2
- package/dist/shared-types.d.ts +8 -0
- package/dist/status/snapshot.d.ts +1 -0
- package/package.json +3 -3
- package/src/commands/handler.ts +21 -1
- package/src/commands/high-family/mesh-coordinator-launch.ts +17 -1
- package/src/commands/high-family/mesh-status.ts +8 -0
- package/src/commands/med-family/cli-agent.ts +29 -0
- package/src/commands/router-refine.ts +27 -2
- package/src/git/git-status.ts +84 -29
- package/src/index.ts +1 -1
- package/src/mesh/coordinator-prompt.ts +4 -1
- package/src/mesh/mesh-queue-assignment.ts +164 -27
- package/src/mesh/mesh-refine-gates.ts +113 -7
- package/src/mesh/mesh-work-queue.ts +14 -0
- package/src/repo-mesh-types.ts +28 -3
- package/src/shared-types.ts +8 -0
- package/src/status/builders.ts +45 -2
- package/src/status/snapshot.ts +1 -1
package/src/status/builders.ts
CHANGED
|
@@ -34,6 +34,47 @@ import {
|
|
|
34
34
|
} from '../providers/open-panel-support.js';
|
|
35
35
|
import { TEXT_ONLY_MESSAGE_INPUT_SUPPORT } from '../providers/provider-input-support.js';
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* A coordinator-spawned worker session that mesh policy launched hidden. This is
|
|
39
|
+
* the daemon-side equivalent of the web `shouldAutoHideMeshConversation` predicate:
|
|
40
|
+
* these sessions should default to muted+hidden in the user dashboard (the user
|
|
41
|
+
* interacts through the ONE coordinator session, not each worker), while the
|
|
42
|
+
* coordinator↔worker mesh data/completion path (mesh-event-forwarding) is
|
|
43
|
+
* unaffected.
|
|
44
|
+
*/
|
|
45
|
+
function isCoordinatorSpawnedHiddenWorker(settings: Record<string, any> | undefined): boolean {
|
|
46
|
+
if (!settings) return false;
|
|
47
|
+
return settings.launchedByCoordinator === true
|
|
48
|
+
&& typeof settings.meshNodeFor === 'string'
|
|
49
|
+
&& settings.meshNodeFor.trim().length > 0
|
|
50
|
+
&& settings.spawnedSessionVisibility === 'hidden';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A session is surface-hidden (collapsed from the user's inbox/notifications) when
|
|
55
|
+
* mesh policy spawned it hidden, OR when a coordinator-spawned worker defaults
|
|
56
|
+
* hidden, OR when the user manually hid it (userHidden). userHidden === false is an
|
|
57
|
+
* explicit un-hide that overrides the policy/worker default until daemon restart.
|
|
58
|
+
*/
|
|
59
|
+
function resolveSurfaceHidden(settings: Record<string, any> | undefined): boolean {
|
|
60
|
+
if (!settings) return false;
|
|
61
|
+
if (settings.userHidden === true) return true;
|
|
62
|
+
if (settings.userHidden === false) return false;
|
|
63
|
+
return settings.spawnedSessionVisibility === 'hidden' || isCoordinatorSpawnedHiddenWorker(settings);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A session is muted (attention side-effects suppressed, but still shown in the
|
|
68
|
+
* list) when the user muted it, OR a coordinator-spawned worker defaults muted.
|
|
69
|
+
* userMuted === false is an explicit un-mute overriding the worker default.
|
|
70
|
+
*/
|
|
71
|
+
function resolveMuted(settings: Record<string, any> | undefined): boolean {
|
|
72
|
+
if (!settings) return false;
|
|
73
|
+
if (settings.userMuted === true) return true;
|
|
74
|
+
if (settings.userMuted === false) return false;
|
|
75
|
+
return isCoordinatorSpawnedHiddenWorker(settings);
|
|
76
|
+
}
|
|
77
|
+
|
|
37
78
|
export type SessionEntryProfile = 'full' | 'live' | 'metadata';
|
|
38
79
|
|
|
39
80
|
export interface SessionEntryBuildOptions {
|
|
@@ -342,7 +383,8 @@ function buildCliSession(state: CliProviderState, options: SessionEntryBuildOpti
|
|
|
342
383
|
settings: state.settings,
|
|
343
384
|
...(coordinator && { coordinator }),
|
|
344
385
|
...(meshQueueStats && { meshQueueStats }),
|
|
345
|
-
...(state.settings
|
|
386
|
+
...(resolveSurfaceHidden(state.settings) && { surfaceHidden: true }),
|
|
387
|
+
...(resolveMuted(state.settings) && { muted: true }),
|
|
346
388
|
};
|
|
347
389
|
}
|
|
348
390
|
|
|
@@ -384,7 +426,8 @@ function buildAcpSession(state: AcpProviderState, options: SessionEntryBuildOpti
|
|
|
384
426
|
settings: state.settings,
|
|
385
427
|
...(coordinator && { coordinator }),
|
|
386
428
|
...(meshQueueStats && { meshQueueStats }),
|
|
387
|
-
...(state.settings
|
|
429
|
+
...(resolveSurfaceHidden(state.settings) && { surfaceHidden: true }),
|
|
430
|
+
...(resolveMuted(state.settings) && { muted: true }),
|
|
388
431
|
};
|
|
389
432
|
}
|
|
390
433
|
|
package/src/status/snapshot.ts
CHANGED
|
@@ -130,7 +130,7 @@ function buildDetectedIdeInfos(
|
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
function buildAvailableProviders(
|
|
133
|
+
export function buildAvailableProviders(
|
|
134
134
|
providerLoader: StatusSnapshotOptions['providerLoader'],
|
|
135
135
|
): AvailableProviderInfo[] {
|
|
136
136
|
const providers: Array<{
|