@bastani/atomic 0.8.26-alpha.9 → 0.8.27-alpha.1

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 (37) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +18 -0
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/CHANGELOG.md +22 -0
  5. package/dist/builtin/mcp/package.json +1 -1
  6. package/dist/builtin/subagents/CHANGELOG.md +27 -0
  7. package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
  8. package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
  9. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
  10. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
  11. package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
  12. package/dist/builtin/subagents/package.json +1 -1
  13. package/dist/builtin/web-access/CHANGELOG.md +18 -0
  14. package/dist/builtin/web-access/package.json +1 -1
  15. package/dist/builtin/workflows/CHANGELOG.md +34 -0
  16. package/dist/builtin/workflows/package.json +1 -1
  17. package/dist/core/agent-session.d.ts.map +1 -1
  18. package/dist/core/agent-session.js +4 -2
  19. package/dist/core/agent-session.js.map +1 -1
  20. package/dist/core/compaction/context-compaction.d.ts +124 -11
  21. package/dist/core/compaction/context-compaction.d.ts.map +1 -1
  22. package/dist/core/compaction/context-compaction.js +1056 -81
  23. package/dist/core/compaction/context-compaction.js.map +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/docs/compaction.md +120 -37
  29. package/docs/extensions.md +4 -4
  30. package/docs/json.md +1 -1
  31. package/docs/rpc.md +4 -4
  32. package/docs/sdk.md +2 -0
  33. package/docs/session-format.md +1 -1
  34. package/docs/sessions.md +1 -1
  35. package/docs/settings.md +1 -1
  36. package/docs/usage.md +2 -2
  37. package/package.json +1 -1
@@ -1485,11 +1485,12 @@ export class AgentSession {
1485
1485
  }
1486
1486
  const pathEntries = this.sessionManager.getBranch();
1487
1487
  const settings = this.settingsManager.getCompactionSettings();
1488
- const preparation = prepareContextCompaction(pathEntries, settings);
1488
+ const mode = options.mode ?? "standard";
1489
+ const preparation = prepareContextCompaction(pathEntries, settings, { mode });
1489
1490
  if (!preparation) {
1490
1491
  return undefined;
1491
1492
  }
1492
- const validated = await runContextCompact(preparation, this.model, options.apiKey, options.headers, options.abortController.signal, this.thinkingLevel);
1493
+ const validated = await runContextCompact(preparation, this.model, options.apiKey, options.headers, options.abortController.signal, this.thinkingLevel, mode);
1493
1494
  if (options.abortController.signal.aborted) {
1494
1495
  throw new Error("Compaction cancelled");
1495
1496
  }
@@ -1769,6 +1770,7 @@ export class AgentSession {
1769
1770
  headers: authResult.headers,
1770
1771
  abortController: this._autoCompactionAbortController,
1771
1772
  backupLabel: reason === "overflow" ? "overflow-auto-compact" : "auto-compact",
1773
+ mode: reason === "overflow" ? "critical_overflow" : "standard",
1772
1774
  });
1773
1775
  if (!result) {
1774
1776
  this._emit({