@knightcodeai/cli-darwin-x64 0.5.4 → 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 +23 -0
- package/bin/docs/environment-variables.md +2 -0
- package/bin/docs/keybindings.md +3 -1
- package/bin/docs/models.md +3 -0
- package/bin/docs/settings.md +3 -3
- package/bin/docs/skills.md +1 -1
- package/bin/docs/tui.md +19 -1
- package/bin/knightcode +0 -0
- package/bin/package.json +6 -7
- package/package.json +1 -1
package/bin/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
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
|
+
|
|
3
26
|
## 0.5.4
|
|
4
27
|
|
|
5
28
|
### Added
|
|
@@ -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` |
|
package/bin/docs/keybindings.md
CHANGED
|
@@ -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 |
|
package/bin/docs/models.md
CHANGED
|
@@ -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/settings.md
CHANGED
|
@@ -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
|
|
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
|
|
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`
|
|
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
|
|
package/bin/docs/skills.md
CHANGED
|
@@ -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
|
|
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
|
|
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.
|
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.
|
|
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.
|
|
42
|
-
"@knightcodeai/cli-linux-arm64": "0.
|
|
43
|
-
"@knightcodeai/cli-darwin-x64": "0.
|
|
44
|
-
"@knightcodeai/cli-darwin-arm64": "0.
|
|
45
|
-
"@knightcodeai/cli-win32-x64": "0.
|
|
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": {
|