@caupulican/pi-adaptative 0.80.51 → 0.80.52

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.
@@ -2114,6 +2114,15 @@ export class AgentSession {
2114
2114
  },
2115
2115
  });
2116
2116
  }
2117
+ /**
2118
+ * Resolve the active resource-profile tool allow/block filter from current settings.
2119
+ * Mirrors the construction-time derivation (settingsManager.getResourceProfileFilter("tools"))
2120
+ * so reload() can re-apply it after a live settings/profile edit.
2121
+ */
2122
+ _deriveToolProfileFilter() {
2123
+ const filter = this.settingsManager.getResourceProfileFilter("tools");
2124
+ return { allow: filter.allow ?? [], block: filter.block ?? [] };
2125
+ }
2117
2126
  _refreshToolRegistry(options) {
2118
2127
  const previousRegistryNames = new Set(this._toolRegistry.keys());
2119
2128
  const previousActiveToolNames = this.getActiveToolNames();
@@ -2309,6 +2318,12 @@ export class AgentSession {
2309
2318
  let newRunner;
2310
2319
  try {
2311
2320
  await this.settingsManager.reload();
2321
+ // Re-derive the resource-profile tool filter from the freshly reloaded settings.
2322
+ // Unlike skills/prompts/themes (which re-filter through the resource loader on every
2323
+ // reload), the tool filter is held on the session, so without this a live edit to the
2324
+ // active profile's tools allow/block — or switching the active profile — would not
2325
+ // apply on /reload and allowed tools would stay missing.
2326
+ this._toolProfileFilter = this._deriveToolProfileFilter();
2312
2327
  await this._resourceLoader.reload({ failOnExtensionErrors: true, deferExtensionDispose: true });
2313
2328
  resetApiProviders();
2314
2329
  this._buildRuntime({