@codex-infinity/pi-infinity 0.63.3 → 0.64.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 (71) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -2
  3. package/dist/core/agent-session.d.ts +5 -0
  4. package/dist/core/agent-session.d.ts.map +1 -1
  5. package/dist/core/agent-session.js +48 -34
  6. package/dist/core/agent-session.js.map +1 -1
  7. package/dist/core/extensions/runner.d.ts.map +1 -1
  8. package/dist/core/extensions/runner.js +1 -0
  9. package/dist/core/extensions/runner.js.map +1 -1
  10. package/dist/core/extensions/types.d.ts +4 -0
  11. package/dist/core/extensions/types.d.ts.map +1 -1
  12. package/dist/core/extensions/types.js.map +1 -1
  13. package/dist/core/keybindings.d.ts +10 -0
  14. package/dist/core/keybindings.d.ts.map +1 -1
  15. package/dist/core/keybindings.js +10 -0
  16. package/dist/core/keybindings.js.map +1 -1
  17. package/dist/core/model-registry.d.ts +3 -1
  18. package/dist/core/model-registry.d.ts.map +1 -1
  19. package/dist/core/model-registry.js +7 -1
  20. package/dist/core/model-registry.js.map +1 -1
  21. package/dist/core/sdk.d.ts +1 -1
  22. package/dist/core/sdk.d.ts.map +1 -1
  23. package/dist/core/sdk.js +2 -2
  24. package/dist/core/sdk.js.map +1 -1
  25. package/dist/core/session-manager.d.ts +3 -0
  26. package/dist/core/session-manager.d.ts.map +1 -1
  27. package/dist/core/session-manager.js +13 -6
  28. package/dist/core/session-manager.js.map +1 -1
  29. package/dist/core/tools/edit.d.ts.map +1 -1
  30. package/dist/core/tools/edit.js +15 -4
  31. package/dist/core/tools/edit.js.map +1 -1
  32. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  33. package/dist/core/tools/tool-definition-wrapper.js +2 -0
  34. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  35. package/dist/main.d.ts.map +1 -1
  36. package/dist/main.js +1 -1
  37. package/dist/main.js.map +1 -1
  38. package/dist/modes/interactive/components/assistant-message.d.ts +3 -1
  39. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  40. package/dist/modes/interactive/components/assistant-message.js +13 -3
  41. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  42. package/dist/modes/interactive/components/tree-selector.d.ts +4 -2
  43. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  44. package/dist/modes/interactive/components/tree-selector.js +48 -15
  45. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  46. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  47. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  48. package/dist/modes/interactive/interactive-mode.js +23 -3
  49. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  50. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  51. package/dist/modes/rpc/rpc-mode.js +3 -0
  52. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  53. package/docs/extensions.md +61 -0
  54. package/docs/json.md +5 -2
  55. package/docs/keybindings.md +2 -0
  56. package/docs/rpc.md +21 -7
  57. package/docs/sdk.md +20 -12
  58. package/docs/tree.md +5 -2
  59. package/examples/extensions/README.md +1 -0
  60. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  61. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  62. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  63. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  64. package/examples/extensions/hidden-thinking-label.ts +57 -0
  65. package/examples/extensions/with-deps/package-lock.json +2 -2
  66. package/examples/extensions/with-deps/package.json +1 -1
  67. package/examples/sdk/02-custom-model.ts +1 -1
  68. package/examples/sdk/09-api-keys-and-oauth.ts +3 -3
  69. package/examples/sdk/12-full-control.ts +1 -1
  70. package/examples/sdk/README.md +3 -3
  71. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ### Added
6
+
7
+ - Added label timestamps to the session tree with a `Shift+T` toggle in `/tree`, smart date formatting, and timestamp preservation through branching ([#2691](https://github.com/badlogic/pi-mono/pull/2691) by [@w-winter](https://github.com/w-winter))
8
+
9
+ ## [0.64.0] - 2026-03-29
10
+
11
+ ### New Features
12
+
13
+ - Extensions and SDK callers can attach a `prepareArguments` hook to any tool definition, letting them normalize or migrate raw model arguments before schema validation. The built-in `edit` tool uses this to transparently support sessions created with the old single-edit schema. See [docs/extensions.md](docs/extensions.md)
14
+ - Extensions can customize the collapsed thinking block label via `ctx.ui.setHiddenThinkingLabel()`. See [examples/extensions/hidden-thinking-label.ts](examples/extensions/hidden-thinking-label.ts) ([#2673](https://github.com/badlogic/pi-mono/issues/2673))
15
+
16
+ ### Breaking Changes
17
+
18
+ - `ModelRegistry` no longer has a public constructor. SDK callers and tests must use `ModelRegistry.create(authStorage, modelsJsonPath?)` for file-backed registries or `ModelRegistry.inMemory(authStorage)` for built-in-only registries. Direct `new ModelRegistry(...)` calls no longer compile.
19
+
20
+ ### Added
21
+
22
+ - Added `ToolDefinition.prepareArguments` hook to prepare raw tool call arguments before schema validation, enabling compatibility shims for resumed sessions with outdated tool schemas
23
+ - Built-in `edit` tool now uses `prepareArguments` to silently fold legacy top-level `oldText`/`newText` into `edits[]` when resuming old sessions
24
+ - Added `ctx.ui.setHiddenThinkingLabel()` so extensions can customize the collapsed thinking label in interactive mode, with a no-op in RPC mode and a runnable example extension in `examples/extensions/hidden-thinking-label.ts` ([#2673](https://github.com/badlogic/pi-mono/issues/2673))
25
+
26
+ ### Fixed
27
+
28
+ - Fixed extension-queued user messages to refresh the interactive pending-message list so messages submitted while a turn is active are no longer silently dropped ([#2674](https://github.com/badlogic/pi-mono/pull/2674) by [@mrexodia](https://github.com/mrexodia))
29
+ - Fixed monorepo `tsconfig.json` path mappings to resolve `@mariozechner/pi-ai` subpath exports to source files in development checkouts ([#2625](https://github.com/badlogic/pi-mono/pull/2625) by [@ferologics](https://github.com/ferologics))
30
+ - Fixed TUI cell size response handling to consume only exact `CSI 6 ; height ; width t` replies, so bare `Escape` is no longer swallowed while waiting for terminal image metadata ([#2661](https://github.com/badlogic/pi-mono/issues/2661))
31
+ - Fixed Kitty keyboard protocol keypad functional keys to normalize to logical digits, symbols, and navigation keys, so numpad input in terminals such as iTerm2 no longer inserts Private Use Area gibberish or gets ignored ([#2650](https://github.com/badlogic/pi-mono/issues/2650))
32
+
5
33
  ## [0.63.2] - 2026-03-29
6
34
 
7
35
  ### New Features
package/README.md CHANGED
@@ -226,7 +226,7 @@ pinf --fork <path> # Fork specific session file or ID into a new session
226
226
 
227
227
  - Search by typing, fold/unfold and jump between branches with Ctrl+←/Ctrl+→ or Alt+←/Alt+→, page with ←/→
228
228
  - Filter modes (Ctrl+O): default → no-tools → user-only → labeled-only → all
229
- - Press `l` to label entries as bookmarks
229
+ - Press Shift+L to label entries as bookmarks and Shift+T to toggle label timestamps
230
230
 
231
231
  **`/fork`** - Create a new session file from the current branch. Opens a selector, copies history up to the selected point, and places that message in the editor for modification.
232
232
 
@@ -395,7 +395,7 @@ import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "
395
395
  const { session } = await createAgentSession({
396
396
  sessionManager: SessionManager.inMemory(),
397
397
  authStorage: AuthStorage.create(),
398
- modelRegistry: new ModelRegistry(authStorage),
398
+ modelRegistry: ModelRegistry.create(authStorage),
399
399
  });
400
400
 
401
401
  await session.prompt("What files are in the current directory?");
@@ -38,6 +38,10 @@ export interface ParsedSkillBlock {
38
38
  export declare function parseSkillBlock(text: string): ParsedSkillBlock | null;
39
39
  /** Session-specific events that extend the core AgentEvent */
40
40
  export type AgentSessionEvent = AgentEvent | {
41
+ type: "queue_update";
42
+ steering: readonly string[];
43
+ followUp: readonly string[];
44
+ } | {
41
45
  type: "compaction_start";
42
46
  reason: "manual" | "threshold" | "overflow";
43
47
  } | {
@@ -199,6 +203,7 @@ export declare class AgentSession {
199
203
  private _installAgentToolHooks;
200
204
  /** Emit an event to all listeners */
201
205
  private _emit;
206
+ private _emitQueueUpdate;
202
207
  private _lastAssistantMessage;
203
208
  /** Internal handler for agent events - shared by subscribe and reconnect */
204
209
  private _handleAgentEvent;