@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/cli.cjs CHANGED
@@ -28139,6 +28139,13 @@ var init_hub_service = __esm({
28139
28139
  nowIso() {
28140
28140
  return this.now().toISOString();
28141
28141
  }
28142
+ refreshPersistedLocalAgents() {
28143
+ const readPersistedLocalAgents2 = this.deps.readPersistedLocalAgents;
28144
+ if (!readPersistedLocalAgents2) return;
28145
+ for (const record of readPersistedLocalAgents2()) {
28146
+ this.deps.agentRegistry.put(record);
28147
+ }
28148
+ }
28142
28149
  // ── Inbox ───────────────────────────────────────────────────────────
28143
28150
  listInbox() {
28144
28151
  const items = aggregateInbox(this.deps.inboxSources, this.inboxStore);
@@ -28150,6 +28157,7 @@ var init_hub_service = __esm({
28150
28157
  }
28151
28158
  // ── Agents ──────────────────────────────────────────────────────────
28152
28159
  listAgents(filter) {
28160
+ this.refreshPersistedLocalAgents();
28153
28161
  const safeFilter = {
28154
28162
  ...filter ?? {},
28155
28163
  identity_id: this.deps.identityId
@@ -28646,10 +28654,13 @@ var init_agent_registry_persistence = __esm({
28646
28654
  function buildV11Bindings(inputs) {
28647
28655
  const seed = inputs.storagePath !== void 0 ? readPersistedLocalAgents(inputs.storagePath) : [];
28648
28656
  const registry = new InMemoryLocalAgentRegistry(seed);
28657
+ const storagePath = inputs.storagePath;
28658
+ const readPersisted = storagePath !== void 0 ? () => readPersistedLocalAgents(storagePath) : void 0;
28649
28659
  const hubService = new HubService({
28650
28660
  identityId: inputs.identityId,
28651
28661
  fortressId: inputs.fortressId,
28652
28662
  agentRegistry: registry,
28663
+ ...readPersisted ? { readPersistedLocalAgents: readPersisted } : {},
28653
28664
  inboxSources: {
28654
28665
  listPendingApprovals: () => [],
28655
28666
  listRecentBlockedEgress: () => [],