@sanctuary-framework/mcp-server 1.1.3 → 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.cjs CHANGED
@@ -12730,7 +12730,7 @@ function renderDashboardV11Html(options = {}) {
12730
12730
  streamUrl,
12731
12731
  identityId,
12732
12732
  fortressId
12733
- });
12733
+ }).replace(/</g, "\\u003c");
12734
12734
  const clientBlock = embedClient ? `<script type="module">${getClientScript()}</script>` : `<!-- client script omitted by render option -->`;
12735
12735
  return `<!doctype html>
12736
12736
  <html lang="en">
@@ -12761,7 +12761,7 @@ function renderDashboardV11Html(options = {}) {
12761
12761
  <aside class="fortress" id="fortress"><p class="muted">Loading fortress column.</p></aside>
12762
12762
  </div>
12763
12763
  <div id="toast-host" aria-live="polite"></div>
12764
- <script id="dashboard-config" type="application/json">${escHtml2(config)}</script>
12764
+ <script id="dashboard-config" type="application/json">${config}</script>
12765
12765
  ${clientBlock}
12766
12766
  </body>
12767
12767
  </html>`;
@@ -27301,6 +27301,21 @@ var HubService = class {
27301
27301
  return this.inboxStore.size();
27302
27302
  }
27303
27303
  };
27304
+ function localAgentsFilePath(storagePath) {
27305
+ return path.join(storagePath, "state", "_hub", "local-agents.json");
27306
+ }
27307
+ function readPersistedLocalAgents(storagePath) {
27308
+ const filePath = localAgentsFilePath(storagePath);
27309
+ if (!fs.existsSync(filePath)) return [];
27310
+ try {
27311
+ const raw = fs.readFileSync(filePath, "utf8");
27312
+ const parsed = JSON.parse(raw);
27313
+ if (!parsed || !Array.isArray(parsed.agents)) return [];
27314
+ return parsed.agents;
27315
+ } catch {
27316
+ return [];
27317
+ }
27318
+ }
27304
27319
 
27305
27320
  // src/dashboard/v1_1/wiring.ts
27306
27321
  var CapabilityErrorAgentController = class {
@@ -27332,7 +27347,8 @@ var CapabilityErrorAgentController = class {
27332
27347
  }
27333
27348
  };
27334
27349
  function buildV11Bindings(inputs) {
27335
- const registry = new InMemoryLocalAgentRegistry([]);
27350
+ const seed = inputs.storagePath !== void 0 ? readPersistedLocalAgents(inputs.storagePath) : [];
27351
+ const registry = new InMemoryLocalAgentRegistry(seed);
27336
27352
  const hubService = new HubService({
27337
27353
  identityId: inputs.identityId,
27338
27354
  fortressId: inputs.fortressId,
@@ -29432,7 +29448,12 @@ Refusing to start the cocoon while the reset-history marker is unreadable.`
29432
29448
  buildV11Bindings({
29433
29449
  identityId: embeddedHubIdentityId,
29434
29450
  fortressId: fortressIdFromStoragePath(config.storage_path),
29435
- auditLog
29451
+ auditLog,
29452
+ // v1.1.5 (Finding Z): rehydrate the hub agent registry from
29453
+ // `<storagePath>/state/_hub/local-agents.json` so the embedded
29454
+ // dashboard surfaces wraps performed by prior `sanctuary wrap`
29455
+ // invocations against this same fortress.
29456
+ storagePath: config.storage_path
29436
29457
  })
29437
29458
  );
29438
29459
  await dashboard.start();