@caupulican/pi-adaptative 0.81.1 → 0.81.2
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 +3 -0
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +12 -7
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction-support.d.ts +9 -5
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +38 -27
- package/dist/core/compaction-support.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,3 +1,5 @@
|
|
|
1
|
+
## [0.81.2] - 2026-07-05
|
|
2
|
+
|
|
1
3
|
## [0.81.1] - 2026-07-05
|
|
2
4
|
|
|
3
5
|
### Added
|
|
@@ -57,6 +59,7 @@
|
|
|
57
59
|
- The residual autonomy/session/runtime clusters moved out of `agent-session.ts` into eight new `core/` collaborator classes, bringing the file under the 4,000-line cap (5,387 → 3,963): `reflection-controller.ts` (`ReflectionController` — the native end-of-loop reflection pass, the isolated-completion primitive, and the gated learning-apply/rollback path), `goal-loop-controller.ts` (`GoalLoopController` — the bounded goal auto-continuation loop), `session-analytics.ts` (`SessionAnalytics` — usage/cost/stats accounting, the /context window estimate, and HTML/JSONL export, owning the spawned-usage and daily-usage memo caches), `session-tree-navigator.ts` (`SessionTreeNavigator` — in-file branch switching + fork-selector reads), `model-selection-controller.ts` (`ModelSelectionController` — the manual model switch/cycle and thinking-level set/cycle/clamp, distinct from the per-turn `ModelRouterController`), `bash-execution-controller.ts` (`BashExecutionController` — the `/bash` path and its streaming-deferred pending-message queue), `profile-filter-controller.ts` (`ProfileFilterController` — resource-profile tool/extension gating and reload-time profile model re-apply), and `tool-gate-controller.ts` (`ToolGateController` — the agent `beforeToolCall`/`afterToolCall` hooks: router escalation, autonomy gating, extension tool hooks, and the untrusted-content output boundary). `AgentSession` constructs each with narrow lazy accessor deps and keeps same-signature public delegations at every call-in point, so callers, the constructor dep closures, and the drive loop are untouched (the `model`/`thinkingLevel` getters, the branch-summary abort controller read by `isCompacting`, and the bash-flush call sites all stay host-side). The drive loop (`_promptUnserialized`/`_handleAgentEvent`/`_handlePostAgentRun`), compaction, the retry bridge, and the extension-core wiring stay host-side. Bodies are verbatim; behavior is unchanged.
|
|
58
60
|
|
|
59
61
|
### Fixed
|
|
62
|
+
- Default compaction model selection now respects the Model Router cheap model when enabled, otherwise falls back to the active session model with low reasoning instead of picking the globally cheapest authed model (which could route summarization through `openrouter/auto`).
|
|
60
63
|
- `pi --version` resolved through the full application import graph (~1s to print a version string). A fast path in the CLI entry now answers `--version`/`-v` from already-loaded config (~150ms, −85%); any combined invocation still routes through the full parser unchanged.
|
|
61
64
|
- Auto-compaction could fail or skip invisibly: three bail paths (no model, summarizer auth failure, nothing to compact) ended with no result and no reason, and the TUI rendered nothing for that combination — indistinguishable from broken compaction. Every auto-compaction outcome now carries a `result`, an `errorMessage`, or a new `skipReason` on `compaction_end`, and the TUI renders all of them. The cheap summarizer model (#30) also falls back to the session model when its key resolution fails at request time instead of silently giving up.
|
|
62
65
|
- `pi --help` had regressed from ~160ms to ~400ms: `config.ts`'s `normalizePath` import (needed
|
|
@@ -455,6 +455,7 @@ export declare class AgentSession {
|
|
|
455
455
|
private _getCompactionRequestAuth;
|
|
456
456
|
private _resolveCompactionModelAndAuth;
|
|
457
457
|
private _resolveCompactionModel;
|
|
458
|
+
private _resolveCompactionThinkingLevel;
|
|
458
459
|
/**
|
|
459
460
|
* Install tool hooks once on the Agent instance.
|
|
460
461
|
*
|