@knightcodeai/cli-darwin-x64 0.5.3 → 0.6.0

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/bin/CHANGELOG.md CHANGED
@@ -1,5 +1,84 @@
1
1
  # @knightcodeai/cli
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Added
6
+
7
+ - Added per-turn thinking effort preservation for Claude models, so a conversation whose turns were answered at different effort levels no longer replays as if every turn used the current one.
8
+
9
+ ### Changed
10
+
11
+ - Changed the agent engine to a lane-owned durable architecture, rebuilding the harness, session, protocol, client and server layers in one pass.
12
+ - Added `@knightcode/chord`, the application composition runtime (services, replicated state, RPC, plugins) the harness, protocol, client and server now build on.
13
+ - Changed the harness runtime to a lane-owned drive: durable execution primitives, an effect gate, hooks, restore, and a mutation line replace the earlier operation-task/procedure runtime, and the transitional `runtime2` and `restore` layers are gone.
14
+ - Changed the session layer to bound values and lists with a commit/fork/mutation-line model, storage and repository conformance suites, and session benchmarks; the SQLite backend follows it.
15
+ - Changed the protocol, client and server to Chord-routed services: a single `protocol.ts`, a hosted harness manager, server identities, session directories, draining, and the wrong-server/session-not-found error set replace the earlier RPC schemas and live-session manager.
16
+ - Changed the experimental CLI to durable server and client commands, with `--provider`, `--model`, `-e`, `--continue`, `--resume`, `--server-id` and `--session-dir`, dropping the local demo runtime and session-worker process.
17
+ - Changed built-in tool rendering to load from `core/tools/renderers/`, so a process that only displays tool output no longer pulls in the execution path; the KnightCode tool-output style (`Read(...)`, `Search(...)`, `Update(...)`, collapsed one-line summaries) moved with it.
18
+ - Added click-to-expand on tool results, wired through the gutter shell so the bullet and continuation-marker layout keeps working.
19
+ - Fixed the reserved fork namespace guard, which tested for a stale prefix and so never matched a `knightcode.` namespace.
20
+ - Fixed Windows portability across the session, socket and CLI-spawning suites: `node --import` now receives a file URL, session tests resolve their workspace paths, and the Unix-socket suites are skipped where the platform cannot bind them.
21
+
22
+ ### Fixed
23
+
24
+ - Fixed `knightcode config` ignoring the `showHardwareCursor` and `clearOnShrink` terminal settings.
25
+
26
+ ## 0.5.4
27
+
28
+ ### Added
29
+
30
+ - Added an entries argument to `SessionManager.inMemory()`, so an SDK embedder can resume a session held outside the filesystem — in a database, say — without writing it to a temporary `.jsonl` file first.
31
+
32
+ - Added the relational algebra join operators to LaTeX rendering: `\bowtie`, `\Join`, `\ltimes`, `\rtimes`, `\leftouterjoin`, `\rightouterjoin` and `\fullouterjoin`.
33
+
34
+ - Added a `vllmPriority` compat flag for custom `openai-completions` providers. Set it on a model and requests carry a top-level `priority` field, which a vLLM server running with `--scheduling-policy priority` uses to order work; lower values are served first. Unset by default, so nothing changes for providers that do not want it.
35
+
36
+ ### Changed
37
+
38
+ - Changed the branch summary output cap from 2048 to 4096 tokens, clamped to the model's own limit, so summaries of long branches are no longer cut off mid-sentence.
39
+
40
+ - Changed the Cloudflare AI Gateway binding transport to pass requests straight to the Workers AI binding's `fetch` rather than translating them into universal-endpoint calls. `createGatewayBindingFetch` is replaced by `createAiBindingFetch(env.AI)`, which supports every method, non-JSON bodies and streaming request bodies instead of rejecting them.
41
+
42
+ - Changed the bundled model catalog to a fresh regeneration from models.dev. GitHub Copilot drops eight models that the provider no longer serves (`claude-opus-4.5`, `claude-opus-4.6`, `claude-sonnet-4`, `claude-sonnet-4.5`, `gemini-3.1-pro-preview`, `gpt-4.1`, `gpt-5.2`, `gpt-5.2-codex`) and gains `claude-fable-5.1` and `gemini-3.8-flash`. This regeneration is also what activates the Copilot Fable 5 routing fix, which changed only the generator and so never reached the committed data. Baseten gains `zai-org/GLM-5.3-Fast`, Cloudflare AI Gateway gains `claude-fable-5.1`, and OpenCode Go gains `omen-alpha`.
43
+
44
+ Removals only take effect through regenerated data: the remote catalog overlay merges by id and can add or update models, but never removes them, so a model that disappears upstream keeps appearing until the bundled catalog is refreshed.
45
+
46
+ - Changed the selectors in `/thinking`, `/model`, `/scoped-models`, `/trust` and per-model thinking settings to keep the active option marked while browsing, by moving the marker into a fixed column ahead of the label. `/scoped-models` now uses the same per-item toggle as the rest, strikes through models that are no longer available, and no longer collapses to a single model when the first one is toggled off.
47
+
48
+ - Changed the theme settings selectors to keep the configured theme marked while browsing, matching the other selectors. Both the fixed-theme list and the light/dark lists behind Automatic now show the marker in a fixed column.
49
+
50
+ - Changed the streaming working indicator to render in the editor's top border instead of on its own row above it, so the editor no longer shifts up and down as a turn starts and finishes. It picks up the editor's border colour, which already tracks the thinking level. Custom editors from extensions keep the standalone row unless they opt in with `embedWorkingStatus`.
51
+
52
+ ### Fixed
53
+
54
+ - Fixed aborting a session leaving an in-progress compaction or branch summary running. Escape during `/compact`, or an RPC `abort`, now cancels it and waits for the session to actually be idle before returning.
55
+
56
+ - Fixed Baseten's GLM-5.2 and GLM-5.2-Fast being advertised as accepting images. The catalog reports image input for them but the endpoints are text-only, so attaching an image produced a provider error instead of being caught up front.
57
+
58
+ - Fixed a Codex response being dropped when the server closed the stream without a blank line after the final event. The last frame is now processed at EOF instead of being discarded with the buffer.
59
+
60
+ - Fixed GitHub Copilot Claude Fable models being served through the OpenAI completions adapter, which dropped the selected reasoning level. They now route through the Anthropic Messages adapter like the other Claude 4.x and 5.x models on that provider.
61
+
62
+ - Fixed Fireworks GLM models other than GLM-5.2 being served through the Anthropic-compatible endpoint, which does not accept them. Every `glm-` model on Fireworks now uses the OpenAI completions endpoint, so GLM-5.3 and GLM-5.3 Flash work.
63
+
64
+ - Fixed forking a compacted session losing the messages after the compaction boundary when that boundary pointed at a label. Labels are dropped from the forked path, which left the boundary pointing at an entry that no longer existed.
65
+
66
+ - Fixed importing a session file silently overwriting a stored session that happened to have the same filename. The import is now written alongside it under a numbered name.
67
+
68
+ - Fixed a proxied request hanging when the server closed the stream without sending a terminal event, and a final event that arrived without a trailing newline being dropped. The first now surfaces as an error, the second is processed.
69
+
70
+ - Fixed proxied plain-HTTP provider requests hanging after a tool call by tunneling them with CONNECT again, restoring the behaviour Undici changed in 8.7.
71
+
72
+ - Fixed Qwen3.8 Flash offering the wrong thinking levels on the Qwen Token Plan providers: it advertised high and max, which it does not accept, instead of low, medium and xhigh. It is also now listed on the Individual plan, where it is available.
73
+
74
+ - Fixed the built-in tools ignoring the working directory supplied on the extension context. `read`, `write`, `edit`, `ls`, `find`, `grep` and the shell tool resolved relative paths against the directory captured when the tool was created, so a caller running a tool against a different directory operated in the session's directory instead of its own.
75
+
76
+ - Fixed `fd` and `ripgrep` failing to download behind shared egress IPs, where the anonymous GitHub API rate limit is permanently exhausted. The latest release is now resolved from the release page redirect, which costs no API quota. A failed download also reports the underlying network error instead of a bare "fetch failed".
77
+
78
+ - Fixed `knightcode update` reporting every install as a standalone binary. `bin/knightcode` spawns the compiled binary out of `node_modules`, so install detection now classifies a binary by where it sits rather than by how it was built, and moves the running executable aside on Windows so npm can replace it.
79
+
80
+ - Fixed the write tool reporting UTF-16 code-unit counts as byte counts by removing the misleading count from its result.
81
+
3
82
  ## 0.5.3
4
83
 
5
84
  ### Patch Changes
@@ -81,6 +81,8 @@ These variables are read by KnightCode itself:
81
81
  | `KNIGHTCODE_CODING_AGENT_DIR` | Override the config directory; default is `~/.knightcode/agent` |
82
82
  | `KNIGHTCODE_CODING_AGENT_SESSION_DIR` | Override session storage; overridden by `--session-dir` |
83
83
  | `KNIGHTCODE_PACKAGE_DIR` | Override the package directory, useful for Nix/Guix store paths |
84
+ | `KNIGHTCODE_SERVER_DIR` | Override the experimental server profile and socket directory; default is `~/.knightcode/server` |
85
+ | `KNIGHTCODE_SERVER_ID` | Select the logical experimental server ID when `--server-id` is omitted |
84
86
  | `KNIGHTCODE_OFFLINE` | Disable startup network operations, including update checks, package updates, and install/update telemetry |
85
87
  | `KNIGHTCODE_SKIP_VERSION_CHECK` | Disable the `knightcode.dev` latest-version request |
86
88
  | `KNIGHTCODE_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no` |
@@ -1703,21 +1703,23 @@ Typical `sourceInfo.source` values:
1703
1703
 
1704
1704
  ### knightcode.setModel(model)
1705
1705
 
1706
- Set the current model. Returns `false` if no API key is available for the model. See [models.md](models.md) for configuring custom models.
1706
+ Set the model for the current session. The change is recorded in session history and restored when that session is resumed, but it does not change the configured `defaultProvider` or `defaultModel` used by new sessions. Returns `false` if authentication is not configured for the model's provider. See [models.md](models.md) for configuring custom models.
1707
1707
 
1708
1708
  ```typescript
1709
1709
  const model = ctx.modelRegistry.find("anthropic", "claude-sonnet-4-5");
1710
1710
  if (model) {
1711
1711
  const success = await knightcode.setModel(model);
1712
1712
  if (!success) {
1713
- ctx.ui.notify("No API key for this model", "error");
1713
+ ctx.ui.notify("Authentication is not configured for this model's provider", "error");
1714
1714
  }
1715
1715
  }
1716
1716
  ```
1717
1717
 
1718
1718
  ### knightcode.getThinkingLevel() / knightcode.setThinkingLevel(level)
1719
1719
 
1720
- Get or set the thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). Changes emit `thinking_level_select`.
1720
+ Get the current thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). Changes emit `thinking_level_select`.
1721
+
1722
+ `knightcode.setThinkingLevel()` changes the thinking level for the current session. The change is recorded in session history and restored when that session is resumed, but it does not change the configured default used by new sessions.
1721
1723
 
1722
1724
  ```typescript
1723
1725
  const current = knightcode.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"
@@ -2827,6 +2829,7 @@ export default function (knightcode: ExtensionAPI) {
2827
2829
  **Key points:**
2828
2830
  - Extend `CustomEditor` (not base `Editor`) to get app keybindings (escape to abort, ctrl+d, model switching)
2829
2831
  - Call `super.handleInput(data)` for keys you don't handle
2832
+ - Custom editors keep the standalone working row by default. Pass `{ embedWorkingStatus: true }` as the fourth `CustomEditor` constructor argument to use the built-in editor-border spinner instead.
2830
2833
  - Factory receives `tui`, `theme`, and `keybindings` from the app
2831
2834
  - Use `ctx.ui.getEditorComponent()` before `setEditorComponent()` to wrap the previously configured custom editor
2832
2835
  - Pass `undefined` to restore default: `ctx.ui.setEditorComponent(undefined)`
@@ -86,10 +86,12 @@ The dedicated history actions always change history entries, regardless of the c
86
86
 
87
87
  ### TUI Fullscreen Viewport
88
88
 
89
- These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content. See [Terminal setup](terminal-setup.md) for terminal-specific mouse and trackpad behavior.
89
+ These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content. While the transcript is scrolled up, a clickable "Jump to latest message" label on its bottom row shows the `tui.altScreen.bottom` shortcut. See [Terminal setup](terminal-setup.md) for terminal-specific mouse and trackpad behavior.
90
90
 
91
91
  Fullscreen transcript bindings take precedence over editor bindings. The default unmodified navigation keys therefore control the transcript in fullscreen mode, while their `ctrl` variants continue to control the editor. Outside fullscreen mode, both variants control the editor.
92
92
 
93
+ The transcript search panel shows the configured previous/next shortcuts and clickable arrow controls. Press `tui.altScreen.search` again, or use `tui.altScreen.searchClose`, to close it.
94
+
93
95
  | Key | Default mode | Fullscreen mode |
94
96
  |-----|--------------|-----------------|
95
97
  | `home`, `end` | Editor | Transcript |
@@ -394,6 +394,8 @@ By default knightcode sends per-tool `eager_input_streaming: true`. If a proxy o
394
394
 
395
395
  Some Anthropic models require adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) instead of the legacy budget-based thinking payload. Built-in models set this automatically. For custom providers or aliases that route to those models, set `forceAdaptiveThinking` to `true`.
396
396
 
397
+ Claude models with per-turn effort support use `supportsMidConvoEffort`. KnightCode then persists each response's provider effort, reconstructs effort-only system messages on later requests, and sends thinking binding controls with `prefix_mismatch_behavior: "drop_block"` to avoid stale signed-thinking prefixes causing persistent 400 responses. Set this only for the exact supported Claude model on a faithful Anthropic Messages transport; do not enable it for APIs that merely imitate the Messages shape.
398
+
397
399
  Some Anthropic-compatible providers emit thinking blocks with empty signatures and still expect them on replay. Set `allowEmptySignature` to `true` only for those providers; real Anthropic rejects empty thinking signatures.
398
400
 
399
401
  Built-in Anthropic models enable `supportsStrictTools` in their model metadata. Custom Anthropic-compatible models must set it to `true` when their endpoint accepts strict JSON-schema tool definitions.
@@ -430,6 +432,7 @@ Built-in Anthropic models enable `supportsStrictTools` in their model metadata.
430
432
  | `sendSessionAffinityHeaders` | Whether to send `x-session-affinity` from the session id when caching is enabled. Default: auto-detected for known providers. |
431
433
  | `supportsCacheControlOnTools` | Whether the provider accepts Anthropic-style `cache_control` markers on tool definitions. Default: `true`. |
432
434
  | `forceAdaptiveThinking` | Whether to send adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) for this model. Built-in adaptive models set this automatically. Default: `false`. |
435
+ | `supportsMidConvoEffort` | Whether the exact Claude model transport supports per-turn effort system messages and thinking binding controls. KnightCode persists native effort levels and always sends `drop_block` when enabled. Default: `false`. |
433
436
  | `allowEmptySignature` | Whether to replay empty thinking signatures as `signature: ""` instead of converting thinking to text. Default: `false`. |
434
437
  | `supportsStrictTools` | Whether the provider accepts strict JSON-schema tool definitions. Default: `false`; built-in Anthropic models enable it in generated metadata. |
435
438
 
package/bin/docs/rpc.md CHANGED
@@ -123,7 +123,7 @@ See [set_follow_up_mode](#set_follow_up_mode) for controlling how follow-up mess
123
123
 
124
124
  #### abort
125
125
 
126
- Abort the current agent operation.
126
+ Abort the current operation and wait for the session to become idle before responding.
127
127
 
128
128
  ```json
129
129
  {"type": "abort"}
package/bin/docs/sdk.md CHANGED
@@ -788,6 +788,11 @@ const { session: opened } = await createAgentSession({
788
788
  sessionManager: SessionManager.open("/path/to/session.jsonl"),
789
789
  });
790
790
 
791
+ // Resume a session kept outside the filesystem, e.g. in a database
792
+ const { session: restored } = await createAgentSession({
793
+ sessionManager: SessionManager.inMemory(process.cwd(), { id: sessionId }, entries),
794
+ });
795
+
791
796
  // List sessions
792
797
  const currentProjectSessions = await SessionManager.list(process.cwd());
793
798
  const allSessions = await SessionManager.listAll(process.cwd());
@@ -32,7 +32,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
32
32
  | `defaultThinkingLevel` | string | - | Startup thinking level (saved with Ctrl+S in `/thinking`, or edited manually): `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
33
33
  | `modelThinkingLevels` | object | - | Per-model startup thinking levels keyed by `"provider/modelId"`; configure from `/settings` → Default thinking level per model or edit manually |
34
34
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
35
- | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses and compaction or branch-summary usage |
35
+ | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses, compaction or branch-summary usage, and provider recovery diagnostics such as dropped Anthropic thinking blocks |
36
36
  | `thinkingBudgets` | object | - | Custom token budgets per thinking level. Anthropic, Google, and Bedrock use these natively. OpenAI-compatible models use them when `compat.thinkingTokenBudgetField` (or `supportsThinkingTokenBudget`) is set. |
37
37
 
38
38
  #### thinkingBudgets
@@ -57,7 +57,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
57
57
  | `quietStartup` | boolean | `false` | Hide startup header |
58
58
  | `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
59
59
  | `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
60
- | `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
60
+ | `enableInstallTelemetry` | boolean | `true` | Send the anonymous install/update ping and selected provider attribution headers. This does not control update checks |
61
61
  | `enableAnalytics` | boolean | `false` | Opt-in analytics data sharing. Currently only asked for during the experimental first-time setup (`KNIGHTCODE_EXPERIMENTAL=1`) |
62
62
  | `trackingId` | string | - | Analytics tracking identifier, generated when `enableAnalytics` is turned on |
63
63
  | `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
@@ -81,7 +81,7 @@ For VS Code, include `--wait` so knightcode resumes after the editor exits:
81
81
 
82
82
  ### Telemetry and update checks
83
83
 
84
- `enableInstallTelemetry` only controls the anonymous install/update ping to `https://knightcode.raghavseth.in/api/report-install`. Opting out of telemetry does not disable update checks; KnightCode can still fetch `https://knightcode.raghavseth.in/api/latest-version` to look for the latest version.
84
+ `enableInstallTelemetry` controls the anonymous install/update ping to `https://knightcode.raghavseth.in/api/report-install` and KnightCode attribution headers for OpenRouter, NVIDIA NIM, and Cloudflare provider requests. Opting out disables both. It does not disable update checks; KnightCode can still fetch `https://knightcode.raghavseth.in/api/latest-version` to look for the latest version.
85
85
 
86
86
  Set `KNIGHTCODE_SKIP_VERSION_CHECK=1` to disable the KnightCode version update check. Use `--offline` or `KNIGHTCODE_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
87
87
 
@@ -133,7 +133,7 @@ Set `KNIGHTCODE_SKIP_VERSION_CHECK=1` to disable the KnightCode version update c
133
133
 
134
134
  | Setting | Type | Default | Description |
135
135
  |---------|------|---------|-------------|
136
- | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved for branch summarization |
136
+ | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when selecting branch history; output is capped at 4096 tokens |
137
137
  | `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
138
138
 
139
139
  ### Retry
@@ -66,7 +66,7 @@ For project-level Claude Code skills, add to `.knightcode/settings.json`:
66
66
 
67
67
  1. At startup, knightcode scans skill locations and extracts names and descriptions
68
68
  2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
69
- 3. When a task matches, the agent uses `read`, or a shell tool when `read` is unavailable, to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
69
+ 3. When a task matches, the agent uses `read`, or `bash` when `read` is unavailable, to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
70
70
  4. The agent follows the instructions, using relative paths to reference scripts and assets
71
71
 
72
72
  This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
package/bin/docs/tui.md CHANGED
@@ -14,6 +14,7 @@ All components implement:
14
14
  interface Component {
15
15
  render(width: number): string[];
16
16
  handleInput?(data: string): void;
17
+ handleMouse?(event: TuiMouseEvent): TuiMouseEventResult | undefined;
17
18
  wantsKeyRelease?: boolean;
18
19
  invalidate(): void;
19
20
  }
@@ -23,6 +24,7 @@ interface Component {
23
24
  |--------|-------------|
24
25
  | `render(width)` | Return array of strings (one per line). Each line **must not exceed `width`**. |
25
26
  | `handleInput?(data)` | Receive keyboard input when component has focus. |
27
+ | `handleMouse?(event)` | Receive normalized pointer input in fullscreen mode. |
26
28
  | `wantsKeyRelease?` | If true, component receives key release events (Kitty protocol). Default: false. |
27
29
  | `invalidate()` | Clear cached render state. Called on theme changes. |
28
30
 
@@ -52,7 +54,7 @@ When a `Focusable` component has focus, TUI:
52
54
  3. Positions the hardware terminal cursor at that location
53
55
  4. Shows the hardware cursor only when `showHardwareCursor` is enabled
54
56
 
55
- The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `KNIGHTCODE_HARDWARE_CURSOR=1`. The `Editor` and `Input` built-in components already implement this interface.
57
+ The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with the renderer's `showHardwareCursor` constructor argument or `setShowHardwareCursor(true)`. KnightCode also maps `KNIGHTCODE_HARDWARE_CURSOR=1` to this setting before it creates its renderer. The `Editor` and `Input` built-in components already implement this interface.
56
58
 
57
59
  ### Container Components with Embedded Inputs
58
60
 
@@ -307,6 +309,22 @@ handleInput(data: string) {
307
309
  - With modifiers: `Key.ctrl("c")`, `Key.shift("tab")`, `Key.alt("left")`, `Key.ctrlShift("p")`
308
310
  - String format also works: `"enter"`, `"ctrl+c"`, `"shift+tab"`, `"ctrl+shift+p"`
309
311
 
312
+ ## Mouse Input
313
+
314
+ Fullscreen mode routes normalized press, release, click, move, drag, and wheel events to components and overlays. Return `{ handled: true }` to suppress default behavior, `capture: true` to retain drag/release ownership, `focus: true` to request keyboard focus, and `render: true` when a hover or release visibly changes the component. Press, click, drag, and wheel render by default; no-op move/release events do not.
315
+
316
+ ```typescript
317
+ import { MouseRegion } from "@knightcode/tui";
318
+
319
+ const clickable = new MouseRegion(content, (event) => {
320
+ if (event.type !== "click" || event.button !== "left") return undefined;
321
+ expanded = !expanded;
322
+ return { handled: true };
323
+ });
324
+ ```
325
+
326
+ Unhandled wheel input scrolls the nearest `ScrollView`; unhandled primary-button drags retain transcript selection. OSC 8 links take precedence over parent click regions. `Input`, `Editor`, `SelectList`, and `SettingsList` include fullscreen mouse behavior. Regular mode does not capture mouse input because the terminal owns its scrollback.
327
+
310
328
  ## Line Width
311
329
 
312
330
  **Critical:** Each line from `render()` must not exceed the `width` parameter.
@@ -912,6 +930,7 @@ export default function (knightcode: ExtensionAPI) {
912
930
 
913
931
  - **Extend `CustomEditor`** (not base `Editor`) to get app keybindings (escape to abort, ctrl+d to exit, model switching, etc.)
914
932
  - **Call `super.handleInput(data)`** for keys you don't handle
933
+ - **Working status**: custom editors keep the standalone working row by default. Pass `{ embedWorkingStatus: true }` as the fourth `CustomEditor` constructor argument to use the built-in editor-border spinner instead.
915
934
  - **Factory pattern**: `setEditorComponent` receives a factory function that gets `tui`, `theme`, and `keybindings`
916
935
  - **Pass `undefined`** to restore the default editor: `ctx.ui.setEditorComponent(undefined)`
917
936
 
package/bin/knightcode CHANGED
Binary file
package/bin/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knightcodeai/cli",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "KnightCode — a local, BYOK terminal coding agent powered by OpenRouter.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -20,7 +20,6 @@
20
20
  "exports": {
21
21
  ".": "./src/index.ts",
22
22
  "./rpc-entry": "./src/rpc-entry.ts",
23
- "./client": "./src/client/index.ts",
24
23
  "./package.json": "./package.json",
25
24
  "./*": "./src/*.ts"
26
25
  },
@@ -38,11 +37,11 @@
38
37
  "test": "vitest --run"
39
38
  },
40
39
  "optionalDependencies": {
41
- "@knightcodeai/cli-linux-x64": "0.5.3",
42
- "@knightcodeai/cli-linux-arm64": "0.5.3",
43
- "@knightcodeai/cli-darwin-x64": "0.5.3",
44
- "@knightcodeai/cli-darwin-arm64": "0.5.3",
45
- "@knightcodeai/cli-win32-x64": "0.5.3",
40
+ "@knightcodeai/cli-linux-x64": "0.6.0",
41
+ "@knightcodeai/cli-linux-arm64": "0.6.0",
42
+ "@knightcodeai/cli-darwin-x64": "0.6.0",
43
+ "@knightcodeai/cli-darwin-arm64": "0.6.0",
44
+ "@knightcodeai/cli-win32-x64": "0.6.0",
46
45
  "@mariozechner/clipboard": "0.3.9"
47
46
  },
48
47
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knightcodeai/cli-darwin-x64",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",