@adhdev/daemon-core 0.9.82-rc.435 → 0.9.82-rc.437

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.435",
3
+ "version": "0.9.82-rc.437",
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",
@@ -46,7 +46,7 @@
46
46
  "author": "vilmire",
47
47
  "license": "AGPL-3.0-or-later",
48
48
  "dependencies": {
49
- "@adhdev/mesh-shared": "0.9.82-rc.435",
49
+ "@adhdev/mesh-shared": "0.9.82-rc.437",
50
50
  "@adhdev/session-host-core": "*",
51
51
  "@agentclientprotocol/sdk": "^0.16.1",
52
52
  "ajv": "^8.20.0",
@@ -82,10 +82,32 @@ export async function decideOssCloneSync(
82
82
  }
83
83
 
84
84
  export const meshCrudHandlers: Record<string, MedFamilyHandler> = {
85
- list_meshes: async (_ctx: MedFamilyContext, _args: any) => {
85
+ list_meshes: async (ctx: MedFamilyContext, _args: any) => {
86
86
  try {
87
87
  const { listMeshes } = await import('../../config/mesh-config.js');
88
- return { success: true, meshes: listMeshes() };
88
+ const meshes = listMeshes();
89
+ // HOST-MISSEED-CLOUD-SURFACE: surface the SAME resolved host pin that
90
+ // mesh_status synthesizes (resolveMeshHostStatus) onto each list entry's
91
+ // meshHost. The cloud dashboard's host banner reads hostPinned from the
92
+ // list_meshes payload (selectedMesh.meshHost), NOT from mesh_status — so
93
+ // without this a host mesh whose hostDaemonId was never persisted shows
94
+ // 'no host yet' even though the daemon resolves this daemon as host.
95
+ // resolveMeshHostStatus only synthesizes localDaemonId for role:'host'
96
+ // (member meshes keep hostDaemonId undefined), so member meshes are not
97
+ // polluted. localDaemonId mirrors mesh-status.ts; when absent, the resolver
98
+ // falls back to the raw persisted meshHost.
99
+ const localDaemonId = ctx?.deps?.statusInstanceId;
100
+ const meshesWithHost = Array.isArray(meshes)
101
+ ? meshes.map((mesh: any) => {
102
+ try {
103
+ return { ...mesh, meshHost: resolveMeshHostStatus(mesh, { localDaemonId }) };
104
+ } catch {
105
+ // Resolver failure on a single mesh must not drop the whole list.
106
+ return mesh;
107
+ }
108
+ })
109
+ : meshes;
110
+ return { success: true, meshes: meshesWithHost };
89
111
  } catch (e: any) {
90
112
  return { success: false, error: e.message };
91
113
  }