@adhdev/daemon-core 0.9.82-rc.511 → 0.9.82-rc.513
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 +22 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/mesh/mesh-node-identity.ts +44 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-core",
|
|
3
|
-
"version": "0.9.82-rc.
|
|
3
|
+
"version": "0.9.82-rc.513",
|
|
4
4
|
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"author": "vilmire",
|
|
48
48
|
"license": "AGPL-3.0-or-later",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/mesh-shared": "0.9.82-rc.
|
|
51
|
-
"@adhdev/session-host-core": "0.9.82-rc.
|
|
50
|
+
"@adhdev/mesh-shared": "0.9.82-rc.513",
|
|
51
|
+
"@adhdev/session-host-core": "0.9.82-rc.513",
|
|
52
52
|
"@agentclientprotocol/sdk": "^0.16.1",
|
|
53
53
|
"ajv": "^8.20.0",
|
|
54
54
|
"ajv-formats": "^3.0.1",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import type { ProviderLoader } from '../providers/provider-loader.js';
|
|
15
|
-
import { detectCLI } from '../detection/cli-detector.js';
|
|
15
|
+
import { detectCLI, getCachedProviderVersions } from '../detection/cli-detector.js';
|
|
16
|
+
import { getDaemonBuildInfo } from '../build-info.js';
|
|
16
17
|
import { getGitRepoStatus } from '../git/git-status.js';
|
|
17
18
|
import { normalizeGitStatus as sharedNormalizeGitStatus, pickBestTransitGitStatus as sharedPickBestTransitGitStatus, summarizeGitShape as sharedSummarizeGitShape, normalizeMeshNodeId, daemonIdsEquivalent, meshWorkspacesEquivalent, sessionIdsEquivalent, withStatusProbeMarker } from '@adhdev/mesh-shared';
|
|
18
19
|
import { LOG } from '../logging/logger.js';
|
|
@@ -382,9 +383,20 @@ export function recordInlineMeshDirectGitTruth(
|
|
|
382
383
|
// envelope. These are best-effort observability (never routing), so the raw
|
|
383
384
|
// reported map is stamped onto dedicated node fields and overwritten by the next
|
|
384
385
|
// report — never merged with a stale value the way an operator override would be.
|
|
385
|
-
|
|
386
|
+
// For a remote member these ride the git_status envelope (git-commands.ts folds
|
|
387
|
+
// them in from getReporterProviderVersions). The local coordinator's own / worktree
|
|
388
|
+
// nodes probe getGitRepoStatus() directly, which bypasses handleGitCommand and so
|
|
389
|
+
// carries no reporter* versions — mirror the platform/arch self-heal above and read
|
|
390
|
+
// this daemon's own warm version cache directly, so the coordinator's self node gets
|
|
391
|
+
// the same provider/build chips a remote node does.
|
|
392
|
+
const reporterProviderVersions =
|
|
393
|
+
readProviderVersionsRecord(git.reporterProviderVersions)
|
|
394
|
+
?? (isLocalSource ? readLocalReporterProviderVersions() : null);
|
|
386
395
|
if (reporterProviderVersions) node.reportedProviderVersions = reporterProviderVersions;
|
|
387
|
-
const reporterDaemonBuildVersion =
|
|
396
|
+
const reporterDaemonBuildVersion =
|
|
397
|
+
(readStringValue(git.reporterDaemonBuildVersion)
|
|
398
|
+
?? (isLocalSource ? readLocalReporterDaemonBuildVersion() : null))
|
|
399
|
+
?? null;
|
|
388
400
|
if (reporterDaemonBuildVersion) node.reportedDaemonBuildVersion = reporterDaemonBuildVersion;
|
|
389
401
|
return {
|
|
390
402
|
reporterPlatform,
|
|
@@ -412,6 +424,35 @@ function readProviderVersionsRecord(value: unknown): Record<string, string> | nu
|
|
|
412
424
|
return Object.keys(out).length > 0 ? out : null;
|
|
413
425
|
}
|
|
414
426
|
|
|
427
|
+
/**
|
|
428
|
+
* This daemon's own provider-version map, read from the same warm cache the
|
|
429
|
+
* git_status envelope self-reports from (getReporterProviderVersions is wired to
|
|
430
|
+
* getCachedProviderVersions at boot). The local self/worktree probe path calls
|
|
431
|
+
* getGitRepoStatus() directly — bypassing handleGitCommand — so it never gets the
|
|
432
|
+
* reporter* envelope; reading the cache here is the local-source analogue of the
|
|
433
|
+
* process.platform/process.arch self-heal. Returns null on a cold cache so the
|
|
434
|
+
* stamp is skipped rather than clearing an existing value.
|
|
435
|
+
*/
|
|
436
|
+
function readLocalReporterProviderVersions(): Record<string, string> | null {
|
|
437
|
+
try {
|
|
438
|
+
return readProviderVersionsRecord(getCachedProviderVersions());
|
|
439
|
+
} catch {
|
|
440
|
+
return null;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/** This daemon's own build version (see readLocalReporterProviderVersions). */
|
|
445
|
+
function readLocalReporterDaemonBuildVersion(): string | null {
|
|
446
|
+
try {
|
|
447
|
+
const version = getDaemonBuildInfo().version;
|
|
448
|
+
return typeof version === 'string' && version.trim() && version !== 'unknown'
|
|
449
|
+
? version.trim()
|
|
450
|
+
: null;
|
|
451
|
+
} catch {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
415
456
|
/**
|
|
416
457
|
* Fill node.userOverrides.platform/arch from a live report, but never overwrite a
|
|
417
458
|
* value that is already present (an operator override or an earlier report). Used
|