@caupulican/pi-adaptative 0.80.31 → 0.80.37

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/core/agent-session.d.ts.map +1 -1
  3. package/dist/core/agent-session.js +13 -1
  4. package/dist/core/agent-session.js.map +1 -1
  5. package/dist/core/extensions/loader.d.ts +18 -1
  6. package/dist/core/extensions/loader.d.ts.map +1 -1
  7. package/dist/core/extensions/loader.js +130 -17
  8. package/dist/core/extensions/loader.js.map +1 -1
  9. package/dist/core/extensions/types.d.ts +6 -0
  10. package/dist/core/extensions/types.d.ts.map +1 -1
  11. package/dist/core/extensions/types.js.map +1 -1
  12. package/dist/core/session-manager.d.ts +2 -0
  13. package/dist/core/session-manager.d.ts.map +1 -1
  14. package/dist/core/session-manager.js +6 -1
  15. package/dist/core/session-manager.js.map +1 -1
  16. package/dist/modes/interactive/components/footer.d.ts +3 -6
  17. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  18. package/dist/modes/interactive/components/footer.js +45 -21
  19. package/dist/modes/interactive/components/footer.js.map +1 -1
  20. package/dist/modes/interactive/interactive-mode.d.ts +24 -1
  21. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  22. package/dist/modes/interactive/interactive-mode.js +412 -96
  23. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  24. package/docs/extensions.md +24 -0
  25. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  26. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  27. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  28. package/examples/extensions/sandbox/package-lock.json +2 -2
  29. package/examples/extensions/sandbox/package.json +1 -1
  30. package/examples/extensions/with-deps/package-lock.json +2 -2
  31. package/examples/extensions/with-deps/package.json +1 -1
  32. package/npm-shrinkwrap.json +12 -12
  33. package/package.json +5 -5
@@ -2050,8 +2050,14 @@ export class AgentSession {
2050
2050
  })();
2051
2051
  },
2052
2052
  reload: () => {
2053
+ if (this.isStreaming) {
2054
+ return Promise.reject(new Error("ctx.reload() cannot run while the agent is streaming or a tool call is active. Wait for ctx.isIdle(), queue a follow-up /reload, or use an idle command/event handler so hot reload cannot destabilize the UI."));
2055
+ }
2056
+ if (this.isCompacting) {
2057
+ return Promise.reject(new Error("ctx.reload() cannot run during context compaction or branch summarization. Let compaction finish before reloading so the session tree and UI remain stable."));
2058
+ }
2053
2059
  const actions = this._extensionCommandContextActions;
2054
- if (this.isStreaming || !actions) {
2060
+ if (!actions) {
2055
2061
  return this.reload();
2056
2062
  }
2057
2063
  return actions.reload();
@@ -2249,6 +2255,12 @@ export class AgentSession {
2249
2255
  });
2250
2256
  }
2251
2257
  async reload() {
2258
+ if (this.isStreaming) {
2259
+ throw new Error("Cannot reload while the agent is streaming or a tool call is active");
2260
+ }
2261
+ if (this.isCompacting) {
2262
+ throw new Error("Cannot reload while context compaction or branch summarization is active");
2263
+ }
2252
2264
  const previousRunner = this._extensionRunner;
2253
2265
  const snapshot = this._createReloadRuntimeSnapshot();
2254
2266
  const activeToolNames = this.getActiveToolNames();