@knightcodeai/cli-linux-arm64 0.5.2 → 0.5.4

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,106 @@
1
1
  # @knightcodeai/cli
2
2
 
3
+ ## 0.5.4
4
+
5
+ ### Added
6
+
7
+ - 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.
8
+
9
+ - Added the relational algebra join operators to LaTeX rendering: `\bowtie`, `\Join`, `\ltimes`, `\rtimes`, `\leftouterjoin`, `\rightouterjoin` and `\fullouterjoin`.
10
+
11
+ - 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.
12
+
13
+ ### Changed
14
+
15
+ - 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.
16
+
17
+ - 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.
18
+
19
+ - 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`.
20
+
21
+ 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.
22
+
23
+ - 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.
24
+
25
+ - 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.
26
+
27
+ - 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`.
28
+
29
+ ### Fixed
30
+
31
+ - 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.
32
+
33
+ - 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.
34
+
35
+ - 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.
36
+
37
+ - 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.
38
+
39
+ - 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.
40
+
41
+ - 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.
42
+
43
+ - 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.
44
+
45
+ - 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.
46
+
47
+ - 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.
48
+
49
+ - 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.
50
+
51
+ - 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.
52
+
53
+ - 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".
54
+
55
+ - 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.
56
+
57
+ - Fixed the write tool reporting UTF-16 code-unit counts as byte counts by removing the misleading count from its result.
58
+
59
+ ## 0.5.3
60
+
61
+ ### Patch Changes
62
+
63
+ - 6ffe494: Run the auto-compaction threshold check between turns of an agent run, so a
64
+ tool batch that fills the context window is compacted before the next
65
+ assistant request instead of overflowing it.
66
+ - 6cfef9a: Add a `fullscreenCopyOnSelect` setting (default `true`). Turn it off and a
67
+ fullscreen mouse selection stays highlighted instead of being copied on mouse
68
+ release, and `Ctrl+X` copies the active selection rather than the last
69
+ assistant message.
70
+ - eb15117: Settle the running turn before an in-memory `/fork`, so the aborted assistant
71
+ message and its tool results are no longer appended to the freshly forked
72
+ session.
73
+ - 9a492f9: Merge Mistral streaming tool-call chunks by their `index`, so a call whose id
74
+ and name arrive only in the first chunk is no longer split into two tool
75
+ calls with truncated arguments. A name that arrives on a later chunk is
76
+ picked up rather than left empty.
77
+ - 766dbca: Match `NO_PROXY` entries against the root domain and its subdomains, and parse
78
+ IPv6 hosts and `host:port` entries correctly, so a bare `example.com` entry
79
+ also bypasses the proxy for `api.example.com` and `notexample.com` no longer
80
+ matches it. A bare `*` entry now bypasses everything even when listed
81
+ alongside other entries, and an entry with a malformed port is dropped rather
82
+ than widened into a host-wide bypass.
83
+ - 3ad5109: Add a `supportsMaxOutputTokens` compat flag for `openai-responses` models
84
+ (default `true`). Set it to `false` for a gateway that rejects
85
+ `max_output_tokens` and the parameter is omitted instead of failing the
86
+ request.
87
+ - 94e9d3b: Stop already-prepared tool calls from running when a parallel batch is aborted
88
+ during preflight, so cancelling at a permission prompt no longer lets the
89
+ remaining tools in that batch execute.
90
+ - 00c4a60: Ignore a failing SIGWINCH self-signal at terminal startup, so sandboxes whose
91
+ seccomp or LSM policy denies `kill(2)` no longer crash on launch. The
92
+ dimension refresh is skipped instead.
93
+ - c058c12: Tidy the tool call transcript block. The dark theme's `green` and `red` now hold
94
+ the pinned diff hexes, so the success bullet, `✓` marks, bash mode and markdown
95
+ code blocks match the diff colours instead of staying olive. Shell tool call
96
+ headers are clamped to a single line — a long command no longer wraps several
97
+ rows of quoted URL over the transcript — and the bash expand hint follows its
98
+ output rather than preceding it, matching every other tool renderer. Line
99
+ counts in the expand hints are pluralised.
100
+ - 743bca2: Detect Zed's integrated terminal so it gets truecolor and hyperlinks instead
101
+ of falling through to the conservative default, and document the Zed key
102
+ bindings needed for `Shift+Enter` and friends.
103
+
3
104
  ## 0.5.2
4
105
 
5
106
  ### Patch Changes
@@ -34,6 +34,8 @@ contextTokens > contextWindow - reserveTokens
34
34
 
35
35
  By default, `reserveTokens` is 16384 tokens (configurable in `~/.knightcode/agent/settings.json` or `<project-dir>/.knightcode/settings.json`). This leaves room for the LLM's response.
36
36
 
37
+ During a multi-turn agent run, KnightCode checks this threshold after tools finish and their results are appended, before starting the next assistant response. If the threshold is crossed, KnightCode compacts inside the same agent run and resumes with the summary and retained messages. It skips this between-turn check when the completed tool batch terminates the run and no queued message requires another response. KnightCode also checks the threshold before a new user prompt and after a low-level agent run ends.
38
+
37
39
  You can also trigger manually with `/compact [instructions]`, where optional instructions focus the summary.
38
40
 
39
41
  ### How It Works
@@ -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)`
@@ -157,7 +157,7 @@ This routing remains configurable through the ordinary action bindings. For exam
157
157
  | Keybinding id | Default | Description |
158
158
  |--------|---------|-------------|
159
159
  | `app.tools.expand` | `ctrl+o` | Collapse or expand tool output |
160
- | `app.message.copy` | `ctrl+x` | Copy the last assistant message, or the selected message in `/tree` |
160
+ | `app.message.copy` | `ctrl+x` | Copy the selected message in `/tree`; otherwise copy the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled, falling back to the last assistant message |
161
161
  | `app.message.followUp` | `alt+enter` (`ctrl+q` on Windows and WSL) | Queue follow-up message |
162
162
  | `app.message.dequeue` | `alt+up` (`alt+q` on Windows and WSL) | Restore queued messages to editor |
163
163
 
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());
@@ -69,6 +69,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
69
69
  | `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
70
70
  | `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
71
71
  | `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
72
+ | `fullscreenCopyOnSelect` | boolean | `true` | Automatically copy selected text in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection. Has no effect in regular TUI mode |
72
73
 
73
74
  For VS Code, include `--wait` so knightcode resumes after the editor exits:
74
75
 
@@ -132,7 +133,7 @@ Set `KNIGHTCODE_SKIP_VERSION_CHECK=1` to disable the KnightCode version update c
132
133
 
133
134
  | Setting | Type | Default | Description |
134
135
  |---------|------|---------|-------------|
135
- | `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 |
136
137
  | `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
137
138
 
138
139
  ### Retry
@@ -130,6 +130,21 @@ Add to `keybindings.json`:
130
130
  }
131
131
  ```
132
132
 
133
+ ## Zed (Integrated Terminal)
134
+
135
+ Add these key bindings to your Zed `keymap.json`:
136
+
137
+ ```json
138
+ {
139
+ "context": "Terminal",
140
+ "bindings": {
141
+ "shift-enter": ["terminal::SendText", "\u001b[13;2u"],
142
+ "ctrl--": ["terminal::SendText", "\u001b[45;5u"],
143
+ "ctrl-alt-]": ["terminal::SendText", "\u001b[93;7u"]
144
+ }
145
+ }
146
+ ```
147
+
133
148
  ## Windows Terminal
134
149
 
135
150
  KnightCode uses Windows-style keybindings when running natively on Windows or in WSL:
package/bin/docs/tui.md CHANGED
@@ -912,6 +912,7 @@ export default function (knightcode: ExtensionAPI) {
912
912
 
913
913
  - **Extend `CustomEditor`** (not base `Editor`) to get app keybindings (escape to abort, ctrl+d to exit, model switching, etc.)
914
914
  - **Call `super.handleInput(data)`** for keys you don't handle
915
+ - **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
916
  - **Factory pattern**: `setEditorComponent` receives a factory function that gets `tui`, `theme`, and `keybindings`
916
917
  - **Pass `undefined`** to restore the default editor: `ctx.ui.setEditorComponent(undefined)`
917
918
 
package/bin/docs/usage.md CHANGED
@@ -22,7 +22,7 @@ The editor can be replaced temporarily by built-in UI such as `/settings` or by
22
22
  | File reference | Type `@` to fuzzy-search project files |
23
23
  | Path completion | Press Tab to complete paths |
24
24
  | Multi-line input | Shift+Enter, or Ctrl+Enter on Windows Terminal |
25
- | Copy response | Ctrl+X copies the last assistant message; in `/tree`, it copies the selected message |
25
+ | Copy response | Ctrl+X copies the selected message in `/tree`; otherwise it copies the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled, falling back to the last assistant message |
26
26
  | Images | Paste with Ctrl+V, Alt+V on Windows, or drag into the terminal |
27
27
  | Shell command | `!command` runs and sends output to the model |
28
28
  | Hidden shell command | `!!command` runs without sending output to the model |
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.2",
3
+ "version": "0.5.4",
4
4
  "description": "KnightCode — a local, BYOK terminal coding agent powered by OpenRouter.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -38,11 +38,11 @@
38
38
  "test": "vitest --run"
39
39
  },
40
40
  "optionalDependencies": {
41
- "@knightcodeai/cli-linux-x64": "0.5.2",
42
- "@knightcodeai/cli-linux-arm64": "0.5.2",
43
- "@knightcodeai/cli-darwin-x64": "0.5.2",
44
- "@knightcodeai/cli-darwin-arm64": "0.5.2",
45
- "@knightcodeai/cli-win32-x64": "0.5.2",
41
+ "@knightcodeai/cli-linux-x64": "0.5.4",
42
+ "@knightcodeai/cli-linux-arm64": "0.5.4",
43
+ "@knightcodeai/cli-darwin-x64": "0.5.4",
44
+ "@knightcodeai/cli-darwin-arm64": "0.5.4",
45
+ "@knightcodeai/cli-win32-x64": "0.5.4",
46
46
  "@mariozechner/clipboard": "0.3.9"
47
47
  },
48
48
  "devDependencies": {
@@ -4,8 +4,8 @@
4
4
  "vars": {
5
5
  "cyan": "#00d7ff",
6
6
  "blue": "#5f87ff",
7
- "green": "#b5bd68",
8
- "red": "#cc6666",
7
+ "green": "#57ab5a",
8
+ "red": "#e5534b",
9
9
  "yellow": "#ffff00",
10
10
  "text": "#d4d4d4",
11
11
  "gray": "#808080",
@@ -58,8 +58,8 @@
58
58
  "mdHr": "gray",
59
59
  "mdListBullet": "accent",
60
60
 
61
- "toolDiffAdded": "#57ab5a",
62
- "toolDiffRemoved": "#e5534b",
61
+ "toolDiffAdded": "green",
62
+ "toolDiffRemoved": "red",
63
63
  "toolDiffContext": "gray",
64
64
 
65
65
  "syntaxComment": "#6A9955",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knightcodeai/cli-linux-arm64",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",