@caupulican/pi-adaptative 0.80.85 → 0.80.86
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/CHANGELOG.md +11 -1
- package/dist/core/agent-session.d.ts +17 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +71 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +3 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +3 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [0.80.86] - 2026-06-29
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- Added dynamic token estimation checks for model context windows, warning the user if the base configuration (system prompt and tools) uses more than 70% of the context window.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed adaptive scaling of compaction parameters (`reserveTokens` and `keepRecentTokens`) for models with small context windows to avoid immediate auto-compaction loops.
|
|
10
|
+
- Fixed a scope redeclaration issue with `activeProfileNames` in the resource loader.
|
|
11
|
+
|
|
2
12
|
|
|
3
13
|
## [0.80.85] - 2026-06-29
|
|
4
14
|
|
|
@@ -50,6 +50,9 @@ export type AgentSessionEvent = Exclude<AgentEvent, {
|
|
|
50
50
|
} | {
|
|
51
51
|
type: "thinking_level_changed";
|
|
52
52
|
level: ThinkingLevel;
|
|
53
|
+
} | {
|
|
54
|
+
type: "warning";
|
|
55
|
+
message: string;
|
|
53
56
|
} | {
|
|
54
57
|
type: "compaction_end";
|
|
55
58
|
reason: "manual" | "threshold" | "overflow";
|
|
@@ -285,6 +288,7 @@ export declare class AgentSession {
|
|
|
285
288
|
private _activeModelRouterIntent?;
|
|
286
289
|
private _modelRouterSessionBuffer?;
|
|
287
290
|
private _modelRouterEscalationRequested;
|
|
291
|
+
private _isModelRouterRetry;
|
|
288
292
|
private _lastModelRouterDecision?;
|
|
289
293
|
private _lastModelRouterSkipReason?;
|
|
290
294
|
private _lastModelRouterIntent?;
|
|
@@ -661,6 +665,19 @@ export declare class AgentSession {
|
|
|
661
665
|
* Cancel in-progress branch summarization.
|
|
662
666
|
*/
|
|
663
667
|
abortBranchSummary(): void;
|
|
668
|
+
/**
|
|
669
|
+
* Check if compaction is needed and run it.
|
|
670
|
+
* Called after agent_end and before prompt submission.
|
|
671
|
+
*
|
|
672
|
+
* Two cases:
|
|
673
|
+
* 1. Overflow: LLM returned context overflow error, remove error message from agent state, compact, auto-retry
|
|
674
|
+
* 2. Threshold: Context over threshold, compact, NO auto-retry (user continues manually)
|
|
675
|
+
*
|
|
676
|
+
* @param assistantMessage The assistant message to check
|
|
677
|
+
* @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
|
|
678
|
+
*/
|
|
679
|
+
private _getAdaptedCompactionSettings;
|
|
680
|
+
private _checkContextWindowUsageWarning;
|
|
664
681
|
private _checkCompaction;
|
|
665
682
|
private _runAutoCompaction;
|
|
666
683
|
/**
|