@dyyz1993/pi-coding-agent 0.70.3 → 0.70.5

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 (43) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/core/agent-session.d.ts +4 -0
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +60 -14
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/compaction/compaction.d.ts +1 -0
  7. package/dist/core/compaction/compaction.d.ts.map +1 -1
  8. package/dist/core/compaction/compaction.js.map +1 -1
  9. package/dist/core/defaults.d.ts +1 -0
  10. package/dist/core/defaults.d.ts.map +1 -1
  11. package/dist/core/defaults.js +5 -0
  12. package/dist/core/defaults.js.map +1 -1
  13. package/dist/core/extensions/types.d.ts +4 -0
  14. package/dist/core/extensions/types.d.ts.map +1 -1
  15. package/dist/core/extensions/types.js.map +1 -1
  16. package/dist/core/model-resolver.d.ts +4 -1
  17. package/dist/core/model-resolver.d.ts.map +1 -1
  18. package/dist/core/model-resolver.js +51 -7
  19. package/dist/core/model-resolver.js.map +1 -1
  20. package/dist/core/settings-manager.d.ts +2 -0
  21. package/dist/core/settings-manager.d.ts.map +1 -1
  22. package/dist/core/settings-manager.js +4 -0
  23. package/dist/core/settings-manager.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/dist/main.d.ts.map +1 -1
  29. package/dist/main.js +17 -2
  30. package/dist/main.js.map +1 -1
  31. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  32. package/dist/modes/interactive/interactive-mode.js +14 -1
  33. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  34. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  35. package/dist/modes/rpc/rpc-mode.js +17 -2
  36. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  37. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  38. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  39. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  40. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  41. package/examples/extensions/with-deps/package-lock.json +2 -2
  42. package/examples/extensions/with-deps/package.json +1 -1
  43. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.70.5] - 2026-05-05
4
+
5
+ ### Fixed
6
+
7
+ - Fixed `getContextUsage()` returning pre-compaction token counts after session compaction — fallback now skips stale usage from messages before the compaction boundary
8
+ - Added `tokensAfter` to `CompactionResult` so `compaction_end` events carry accurate post-compaction token counts
9
+
10
+ ## [0.70.4] - 2026-05-05
11
+
12
+ ### Fixed
13
+
14
+ - Fixed `getContextUsage()` returning `tokens: null` after compaction instead of falling back to `estimateContextTokens` estimate
15
+
3
16
  ## [0.70.2] - 2026-05-05
4
17
 
5
18
  ### Added
@@ -201,6 +201,7 @@ export declare class AgentSession {
201
201
  private _sessionAbortController;
202
202
  private _backgroundTasks;
203
203
  private _modelRegistry;
204
+ private _tierModels;
204
205
  private _toolRegistry;
205
206
  private _toolDefinitions;
206
207
  private _toolPromptSnippets;
@@ -262,6 +263,8 @@ export declare class AgentSession {
262
263
  get state(): AgentState;
263
264
  /** Current model (may be undefined if not yet selected) */
264
265
  get model(): Model<any> | undefined;
266
+ getTierModels(): Record<string, string>;
267
+ setTierModels(mapping: Record<string, string>): void;
265
268
  /** Current thinking level */
266
269
  get thinkingLevel(): ThinkingLevel;
267
270
  set toolCallVariables(vars: Record<string, string> | undefined);
@@ -491,6 +494,7 @@ export declare class AgentSession {
491
494
  private _applyExtensionBindings;
492
495
  private _refreshCurrentModelFromRegistry;
493
496
  private _bindExtensionCore;
497
+ private _resolveOptionalModel;
494
498
  callLLM(options: CallLLMOptions): Promise<string>;
495
499
  callLLMStructured<T extends TSchema>(options: CallLLMStructuredOptions & {
496
500
  schema: T;