@sanctuary-framework/mcp-server 1.1.4 → 1.1.5

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.d.cts CHANGED
@@ -4474,7 +4474,7 @@ declare class HubService {
4474
4474
  }
4475
4475
 
4476
4476
  /**
4477
- * v1.1 Server Wiring (v1.1.1 hotfix)
4477
+ * v1.1 Server Wiring (v1.1.1 hotfix; agent-registry persistence in v1.1.5)
4478
4478
  *
4479
4479
  * v1.1.0 shipped the v1.1 module suite (dashboard / hub API / exit bundle
4480
4480
  * endpoints / coordination) but no entry-point server imported any of it.
@@ -4484,10 +4484,13 @@ declare class HubService {
4484
4484
  *
4485
4485
  * The wiring is deliberately minimal at v1.1.1:
4486
4486
  *
4487
- * - Local agent registry starts empty. v1.2 will populate it from
4488
- * `discoverTenants()` and the wrapped harness manifest. v1.1.1 ships
4489
- * the API surface so existing operator scripts can hit it; the data
4490
- * plane is the next conversation.
4487
+ * - Local agent registry starts empty by default. v1.1.5 (Finding Z)
4488
+ * adds an optional `storagePath` input that rehydrates the registry
4489
+ * from `<storagePath>/state/_hub/local-agents.json`, written by
4490
+ * `sanctuary wrap` for each successfully wrapped harness. Callers
4491
+ * that pass `storagePath` get the wrap-populated set; callers that
4492
+ * omit it (legacy) keep the empty-by-default behavior. Real
4493
+ * harness-discovery via `discoverTenants()` remains v1.2 work.
4491
4494
  * - Inbox sources return empty arrays. The privacy chokepoint already
4492
4495
  * emits audit events through PR #69 / PR #71; the inbox aggregator is
4493
4496
  * the v1.2 work to project those into operator cards.
package/dist/index.d.ts CHANGED
@@ -4474,7 +4474,7 @@ declare class HubService {
4474
4474
  }
4475
4475
 
4476
4476
  /**
4477
- * v1.1 Server Wiring (v1.1.1 hotfix)
4477
+ * v1.1 Server Wiring (v1.1.1 hotfix; agent-registry persistence in v1.1.5)
4478
4478
  *
4479
4479
  * v1.1.0 shipped the v1.1 module suite (dashboard / hub API / exit bundle
4480
4480
  * endpoints / coordination) but no entry-point server imported any of it.
@@ -4484,10 +4484,13 @@ declare class HubService {
4484
4484
  *
4485
4485
  * The wiring is deliberately minimal at v1.1.1:
4486
4486
  *
4487
- * - Local agent registry starts empty. v1.2 will populate it from
4488
- * `discoverTenants()` and the wrapped harness manifest. v1.1.1 ships
4489
- * the API surface so existing operator scripts can hit it; the data
4490
- * plane is the next conversation.
4487
+ * - Local agent registry starts empty by default. v1.1.5 (Finding Z)
4488
+ * adds an optional `storagePath` input that rehydrates the registry
4489
+ * from `<storagePath>/state/_hub/local-agents.json`, written by
4490
+ * `sanctuary wrap` for each successfully wrapped harness. Callers
4491
+ * that pass `storagePath` get the wrap-populated set; callers that
4492
+ * omit it (legacy) keep the empty-by-default behavior. Real
4493
+ * harness-discovery via `discoverTenants()` remains v1.2 work.
4491
4494
  * - Inbox sources return empty arrays. The privacy chokepoint already
4492
4495
  * emits audit events through PR #69 / PR #71; the inbox aggregator is
4493
4496
  * the v1.2 work to project those into operator cards.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprot
14
14
  import { createServer as createServer$2 } from 'http';
15
15
  import { createServer as createServer$1 } from 'https';
16
16
  import { exec, execSync, spawn } from 'child_process';
17
- import { statSync, existsSync, readFileSync } from 'fs';
17
+ import { existsSync, readFileSync, statSync } from 'fs';
18
18
  import { fileURLToPath } from 'url';
19
19
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
20
20
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
@@ -27298,6 +27298,21 @@ var HubService = class {
27298
27298
  return this.inboxStore.size();
27299
27299
  }
27300
27300
  };
27301
+ function localAgentsFilePath(storagePath) {
27302
+ return join(storagePath, "state", "_hub", "local-agents.json");
27303
+ }
27304
+ function readPersistedLocalAgents(storagePath) {
27305
+ const filePath = localAgentsFilePath(storagePath);
27306
+ if (!existsSync(filePath)) return [];
27307
+ try {
27308
+ const raw = readFileSync(filePath, "utf8");
27309
+ const parsed = JSON.parse(raw);
27310
+ if (!parsed || !Array.isArray(parsed.agents)) return [];
27311
+ return parsed.agents;
27312
+ } catch {
27313
+ return [];
27314
+ }
27315
+ }
27301
27316
 
27302
27317
  // src/dashboard/v1_1/wiring.ts
27303
27318
  var CapabilityErrorAgentController = class {
@@ -27329,7 +27344,8 @@ var CapabilityErrorAgentController = class {
27329
27344
  }
27330
27345
  };
27331
27346
  function buildV11Bindings(inputs) {
27332
- const registry = new InMemoryLocalAgentRegistry([]);
27347
+ const seed = inputs.storagePath !== void 0 ? readPersistedLocalAgents(inputs.storagePath) : [];
27348
+ const registry = new InMemoryLocalAgentRegistry(seed);
27333
27349
  const hubService = new HubService({
27334
27350
  identityId: inputs.identityId,
27335
27351
  fortressId: inputs.fortressId,
@@ -29429,7 +29445,12 @@ Refusing to start the cocoon while the reset-history marker is unreadable.`
29429
29445
  buildV11Bindings({
29430
29446
  identityId: embeddedHubIdentityId,
29431
29447
  fortressId: fortressIdFromStoragePath(config.storage_path),
29432
- auditLog
29448
+ auditLog,
29449
+ // v1.1.5 (Finding Z): rehydrate the hub agent registry from
29450
+ // `<storagePath>/state/_hub/local-agents.json` so the embedded
29451
+ // dashboard surfaces wraps performed by prior `sanctuary wrap`
29452
+ // invocations against this same fortress.
29453
+ storagePath: config.storage_path
29433
29454
  })
29434
29455
  );
29435
29456
  await dashboard.start();