@sanctuary-framework/mcp-server 1.1.5 → 1.1.6

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
@@ -26874,6 +26874,13 @@ var HubService = class {
26874
26874
  nowIso() {
26875
26875
  return this.now().toISOString();
26876
26876
  }
26877
+ refreshPersistedLocalAgents() {
26878
+ const readPersistedLocalAgents2 = this.deps.readPersistedLocalAgents;
26879
+ if (!readPersistedLocalAgents2) return;
26880
+ for (const record of readPersistedLocalAgents2()) {
26881
+ this.deps.agentRegistry.put(record);
26882
+ }
26883
+ }
26877
26884
  // ── Inbox ───────────────────────────────────────────────────────────
26878
26885
  listInbox() {
26879
26886
  const items = aggregateInbox(this.deps.inboxSources, this.inboxStore);
@@ -26885,6 +26892,7 @@ var HubService = class {
26885
26892
  }
26886
26893
  // ── Agents ──────────────────────────────────────────────────────────
26887
26894
  listAgents(filter) {
26895
+ this.refreshPersistedLocalAgents();
26888
26896
  const safeFilter = {
26889
26897
  ...filter ?? {},
26890
26898
  identity_id: this.deps.identityId
@@ -27349,10 +27357,13 @@ var CapabilityErrorAgentController = class {
27349
27357
  function buildV11Bindings(inputs) {
27350
27358
  const seed = inputs.storagePath !== void 0 ? readPersistedLocalAgents(inputs.storagePath) : [];
27351
27359
  const registry = new InMemoryLocalAgentRegistry(seed);
27360
+ const storagePath = inputs.storagePath;
27361
+ const readPersisted = storagePath !== void 0 ? () => readPersistedLocalAgents(storagePath) : void 0;
27352
27362
  const hubService = new HubService({
27353
27363
  identityId: inputs.identityId,
27354
27364
  fortressId: inputs.fortressId,
27355
27365
  agentRegistry: registry,
27366
+ ...readPersisted ? { readPersistedLocalAgents: readPersisted } : {},
27356
27367
  inboxSources: {
27357
27368
  listPendingApprovals: () => [],
27358
27369
  listRecentBlockedEgress: () => [],