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