@adhdev/daemon-core 0.9.82-rc.460 → 0.9.82-rc.462
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/config/mesh-config.d.ts +7 -0
- package/dist/detection/cli-detector.d.ts +17 -0
- package/dist/git/git-commands.d.ts +14 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +567 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +565 -27
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-events-pending.d.ts +75 -1
- package/dist/mesh/mesh-events.d.ts +2 -2
- package/dist/mesh/mesh-node-identity.d.ts +4 -0
- package/dist/mesh/mesh-reconcile-loop.d.ts +12 -0
- package/dist/mesh/mesh-runtime-store.d.ts +17 -0
- package/dist/providers/approval-utils.d.ts +1 -0
- package/dist/repo-mesh-types.d.ts +111 -0
- package/package.json +3 -3
- package/src/boot/daemon-lifecycle.ts +15 -2
- package/src/commands/high-family/mesh-events.ts +14 -1
- package/src/commands/high-family/mesh-status.ts +29 -2
- package/src/config/mesh-config.ts +13 -0
- package/src/detection/cli-detector.ts +66 -0
- package/src/git/git-commands.ts +35 -2
- package/src/index.ts +1 -1
- package/src/mesh/coordinator-prompt.ts +19 -1
- package/src/mesh/mesh-event-forwarding.ts +19 -1
- package/src/mesh/mesh-events-pending.ts +465 -5
- package/src/mesh/mesh-events.ts +5 -0
- package/src/mesh/mesh-node-identity.ts +77 -6
- package/src/mesh/mesh-reconcile-loop.ts +74 -1
- package/src/mesh/mesh-runtime-store.ts +30 -0
- package/src/providers/approval-utils.ts +1 -1
- package/src/providers/cli-provider-instance.ts +24 -12
- package/src/repo-mesh-types.ts +111 -0
|
@@ -134,6 +134,13 @@ export declare function updateNode(meshId: string, nodeId: string, opts: {
|
|
|
134
134
|
* git_status envelope. Persisted so the friendly label survives across
|
|
135
135
|
* coordinator restarts (mirrors reportedPlatform/reportedArch). */
|
|
136
136
|
reportedMachineNickname?: string;
|
|
137
|
+
/** Owning daemon's self-reported provider CLI/ACP versions + build version,
|
|
138
|
+
* carried on the git_status envelope. Persisted distinctly from userOverrides
|
|
139
|
+
* (auto-detected observability, not operator intent), mirroring the
|
|
140
|
+
* reportedPlatform/reportedArch self-heal so the value survives restarts and
|
|
141
|
+
* is overwritten by the next report. */
|
|
142
|
+
reportedProviderVersions?: Record<string, string>;
|
|
143
|
+
reportedDaemonBuildVersion?: string;
|
|
137
144
|
}): LocalMeshNodeEntry | undefined;
|
|
138
145
|
/**
|
|
139
146
|
* Validate + normalize a panel config before persisting. Mirrors the node-config
|
|
@@ -29,3 +29,20 @@ export declare function detectCLIs(providerLoader?: ProviderLoader, options?: {
|
|
|
29
29
|
export declare function detectCLI(cliId: string, providerLoader?: ProviderLoader, options?: {
|
|
30
30
|
includeVersion?: boolean;
|
|
31
31
|
}): Promise<CLIInfo | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Fold a detected CLIInfo[] into the `{ providerId: version }` map surfaced as a
|
|
34
|
+
* node's providerVersions (see RepoMeshNodeCapabilities.providerVersions). Only
|
|
35
|
+
* installed providers that produced a parseable version string are included, so a
|
|
36
|
+
* missing entry means "not installed or version unknown" — never a fabricated value.
|
|
37
|
+
* Pure/deterministic: the same detection input always yields the same map, which is
|
|
38
|
+
* what the git_status envelope carries and the mesh_status skew check compares.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildProviderVersions(detected: CLIInfo[]): Record<string, string>;
|
|
41
|
+
/**
|
|
42
|
+
* Return the current cached provider-versions map for this daemon, triggering a
|
|
43
|
+
* lazy background refresh when the snapshot is stale/cold. Never blocks: returns
|
|
44
|
+
* whatever is currently cached (an empty object before the first refresh lands).
|
|
45
|
+
* This is the source the git_status envelope reads to self-report a node's
|
|
46
|
+
* provider versions to the mesh coordinator.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getCachedProviderVersions(providerLoader?: ProviderLoader): Record<string, string>;
|
|
@@ -112,6 +112,17 @@ export interface GitCommandServices {
|
|
|
112
112
|
branch?: string;
|
|
113
113
|
setUpstream?: boolean;
|
|
114
114
|
}) => Promise<GitPushResult>;
|
|
115
|
+
/**
|
|
116
|
+
* Best-effort, non-blocking source of this daemon's detected provider CLI/ACP
|
|
117
|
+
* versions (keyed by provider id) + its build version, folded onto the git_status
|
|
118
|
+
* envelope so a mesh coordinator can self-heal each node's providerVersions the
|
|
119
|
+
* same way it does platform/arch. Wired at daemon boot from the cached CLI
|
|
120
|
+
* detection snapshot; omitted (⇒ versions not reported) when unavailable.
|
|
121
|
+
*/
|
|
122
|
+
getReporterProviderVersions?: () => {
|
|
123
|
+
providerVersions?: Record<string, string>;
|
|
124
|
+
daemonBuildVersion?: string;
|
|
125
|
+
};
|
|
115
126
|
}
|
|
116
127
|
type GitCommandFailure = {
|
|
117
128
|
success: false;
|
|
@@ -124,6 +135,8 @@ type GitCommandSuccess = {
|
|
|
124
135
|
reporterPlatform?: string;
|
|
125
136
|
reporterArch?: string;
|
|
126
137
|
reporterMachineNickname?: string;
|
|
138
|
+
reporterProviderVersions?: Record<string, string>;
|
|
139
|
+
reporterDaemonBuildVersion?: string;
|
|
127
140
|
} | {
|
|
128
141
|
success: true;
|
|
129
142
|
diffSummary: GitDiffSummary;
|
|
@@ -160,7 +173,7 @@ type GitCommandSuccess = {
|
|
|
160
173
|
push: GitPushResult;
|
|
161
174
|
};
|
|
162
175
|
export type GitCommandResult = GitCommandSuccess | GitCommandFailure;
|
|
163
|
-
export declare function createDefaultGitCommandServices(): GitCommandServices;
|
|
176
|
+
export declare function createDefaultGitCommandServices(overrides?: Pick<GitCommandServices, 'getReporterProviderVersions'>): GitCommandServices;
|
|
164
177
|
export declare function isGitCommandName(command: string): command is GitCommandName;
|
|
165
178
|
export declare function handleGitCommand(command: GitCommandName, args: any, services?: GitCommandServices): Promise<GitCommandResult>;
|
|
166
179
|
export declare function handleGitCommand(command: string, args: any, services?: GitCommandServices): Promise<GitCommandResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export type { MeshMagiActivityStatus, MeshMagiActivitySummary, MeshMagiActivityS
|
|
|
67
67
|
export { buildMeshSchedulingRuntime } from './mesh/mesh-scheduling-runtime.js';
|
|
68
68
|
export type { MeshSchedulingRuntime, MeshNodeSchedulingRuntime, MeshNodeProviderSchedulingRuntime } from './mesh/mesh-scheduling-runtime.js';
|
|
69
69
|
export { buildMeshHostRequiredFailure, createDefaultMeshHostMetadata, isMeshHostOwner, normalizeMeshDaemonRole, requireMeshHostQueueOwner, resolveMeshHostStatus } from './mesh/mesh-host-ownership.js';
|
|
70
|
-
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent, reconcileDirectDispatchCompletionFromTranscript } from './mesh/mesh-events.js';
|
|
70
|
+
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent, serializeV2EnvelopeToWire, readV2EnvelopeFromWire, reconcileDirectDispatchCompletionFromTranscript } from './mesh/mesh-events.js';
|
|
71
71
|
export type { PendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
72
72
|
export { resolveMeshSurfacedSessionPreview, readMeshCompletionSummary, isWeakCompletionEvidence } from './mesh/mesh-events-utils.js';
|
|
73
73
|
export { resolveDeliveryDecision, createSessionDelivery, updateSessionDeliveryStatus, getActiveSessionDeliveries, markSessionDeliveriesTerminal, recordCompletionConflict, getRecentCompletionConflicts } from './mesh/mesh-delivery-policy.js';
|