@hyperspaceng/neural-coding-agent 0.63.2 → 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 (66) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +1 -1
  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 +13 -0
  6. package/dist/core/agent-session.js.map +1 -1
  7. package/dist/core/extensions/runner.d.ts +1 -0
  8. package/dist/core/extensions/runner.d.ts.map +1 -1
  9. package/dist/core/extensions/runner.js +4 -0
  10. package/dist/core/extensions/runner.js.map +1 -1
  11. package/dist/core/extensions/types.d.ts +7 -0
  12. package/dist/core/extensions/types.d.ts.map +1 -1
  13. package/dist/core/extensions/types.js.map +1 -1
  14. package/dist/core/model-registry.d.ts +3 -1
  15. package/dist/core/model-registry.d.ts.map +1 -1
  16. package/dist/core/model-registry.js +7 -1
  17. package/dist/core/model-registry.js.map +1 -1
  18. package/dist/core/sdk.d.ts +1 -1
  19. package/dist/core/sdk.d.ts.map +1 -1
  20. package/dist/core/sdk.js +1 -1
  21. package/dist/core/sdk.js.map +1 -1
  22. package/dist/core/tools/edit-diff.d.ts +3 -3
  23. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  24. package/dist/core/tools/edit-diff.js.map +1 -1
  25. package/dist/core/tools/edit.d.ts +7 -17
  26. package/dist/core/tools/edit.d.ts.map +1 -1
  27. package/dist/core/tools/edit.js +32 -103
  28. package/dist/core/tools/edit.js.map +1 -1
  29. package/dist/core/tools/index.d.ts +5 -10
  30. package/dist/core/tools/index.d.ts.map +1 -1
  31. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  32. package/dist/core/tools/tool-definition-wrapper.js +2 -0
  33. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  34. package/dist/main.d.ts.map +1 -1
  35. package/dist/main.js +1 -1
  36. package/dist/main.js.map +1 -1
  37. package/dist/modes/interactive/components/assistant-message.d.ts +3 -1
  38. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  39. package/dist/modes/interactive/components/assistant-message.js +14 -3
  40. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  41. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  42. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  43. package/dist/modes/interactive/interactive-mode.js +23 -2
  44. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  45. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  46. package/dist/modes/rpc/rpc-mode.js +3 -0
  47. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  48. package/docs/compaction.md +4 -2
  49. package/docs/extensions.md +94 -0
  50. package/docs/json.md +5 -2
  51. package/docs/rpc.md +21 -7
  52. package/docs/sdk.md +12 -9
  53. package/examples/extensions/README.md +1 -0
  54. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  55. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  56. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  57. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  58. package/examples/extensions/hidden-thinking-label.ts +57 -0
  59. package/examples/extensions/sandbox/index.ts +4 -0
  60. package/examples/extensions/with-deps/package-lock.json +2 -2
  61. package/examples/extensions/with-deps/package.json +1 -1
  62. package/examples/sdk/02-custom-model.ts +1 -1
  63. package/examples/sdk/09-api-keys-and-oauth.ts +3 -3
  64. package/examples/sdk/12-full-control.ts +1 -1
  65. package/examples/sdk/README.md +3 -3
  66. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,47 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.64.0] - 2026-03-29
6
+
7
+ ### New Features
8
+
9
+ - 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)
10
+ - 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))
11
+
12
+ ### Breaking Changes
13
+
14
+ - `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.
15
+
16
+ ### Added
17
+
18
+ - Added `ToolDefinition.prepareArguments` hook to prepare raw tool call arguments before schema validation, enabling compatibility shims for resumed sessions with outdated tool schemas
19
+ - Built-in `edit` tool now uses `prepareArguments` to silently fold legacy top-level `oldText`/`newText` into `edits[]` when resuming old sessions
20
+ - 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))
21
+
22
+ ### Fixed
23
+
24
+ - 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))
25
+ - 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))
26
+ - 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))
27
+ - 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))
28
+
29
+ ## [0.63.2] - 2026-03-29
30
+
31
+ ### New Features
32
+
33
+ - Extension handlers can now use `ctx.signal` to forward cancellation into nested model calls, `fetch()`, and other abort-aware work. See [docs/extensions.md#ctxsignal](docs/extensions.md#ctxsignal) ([#2660](https://github.com/badlogic/pi-mono/issues/2660))
34
+ - Built-in `edit` tool input now uses `edits[]` as the only replacement shape, reducing invalid tool calls caused by mixed single-edit and multi-edit schemas ([#2639](https://github.com/badlogic/pi-mono/issues/2639))
35
+ - Large multi-edit results no longer trigger full-screen redraws in the interactive TUI when the final diff is rendered ([#2664](https://github.com/badlogic/pi-mono/issues/2664))
36
+
37
+ ### Added
38
+
39
+ - Added `ctx.signal` to `ExtensionContext` and wired it to the active agent turn so extension handlers can forward cancellation into nested model calls, `fetch()`, and other abort-aware work ([#2660](https://github.com/badlogic/pi-mono/issues/2660))
40
+
41
+ ### Fixed
42
+
43
+ - Fixed built-in `edit` tool input to use `edits[]` as the only replacement shape, eliminating the mixed single-edit and multi-edit modes that caused repeated invalid tool calls and retries ([#2639](https://github.com/badlogic/pi-mono/issues/2639))
44
+ - Fixed edit tool TUI rendering to defer large multi-edit diffs to the settled result, avoiding full-screen redraws when the tool completes ([#2664](https://github.com/badlogic/pi-mono/issues/2664))
45
+
5
46
  ## [0.63.1] - 2026-03-27
6
47
 
7
48
  ### Added
package/README.md CHANGED
@@ -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
  } | {
@@ -193,6 +197,7 @@ export declare class AgentSession {
193
197
  private _installAgentToolHooks;
194
198
  /** Emit an event to all listeners */
195
199
  private _emit;
200
+ private _emitQueueUpdate;
196
201
  private _lastAssistantMessage;
197
202
  /** Internal handler for agent events - shared by subscribe and reconnect */
198
203
  private _handleAgentEvent;