kward 0.83.0 → 0.84.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +68 -15
- data/CONTRIBUTING.md +74 -0
- data/Gemfile.lock +8 -2
- data/README.md +21 -1
- data/Rakefile +46 -2
- data/SECURITY.md +31 -0
- data/doc/api.md +4 -0
- data/doc/composer.md +1 -1
- data/doc/configuration.md +68 -21
- data/doc/editor.md +28 -13
- data/doc/files.md +8 -4
- data/doc/getting-started.md +3 -0
- data/doc/pan.md +19 -15
- data/doc/platform-support.md +48 -0
- data/doc/security.md +3 -2
- data/doc/shell.md +62 -45
- data/doc/troubleshooting.md +12 -2
- data/doc/usage.md +5 -5
- data/kward.gemspec +5 -4
- data/lib/kward/agent.rb +6 -3
- data/lib/kward/ansi.rb +110 -10
- data/lib/kward/cli/auth_commands.rb +34 -13
- data/lib/kward/cli/commands.rb +83 -62
- data/lib/kward/cli/doctor.rb +39 -17
- data/lib/kward/cli/hook_commands.rb +22 -12
- data/lib/kward/cli/interactive_turn.rb +48 -7
- data/lib/kward/cli/project_skills_commands.rb +8 -4
- data/lib/kward/cli/prompt_interface.rb +27 -0
- data/lib/kward/cli/rendering.rb +15 -9
- data/lib/kward/cli/runtime_helpers.rb +118 -55
- data/lib/kward/cli/slash_commands.rb +12 -14
- data/lib/kward/cli/tabs.rb +83 -12
- data/lib/kward/cli/tool_summaries.rb +14 -0
- data/lib/kward/cli.rb +45 -7
- data/lib/kward/cli_transcript_formatter.rb +11 -4
- data/lib/kward/config_files.rb +82 -68
- data/lib/kward/detached_run.rb +44 -0
- data/lib/kward/interactive_pty_runner.rb +102 -28
- data/lib/kward/{ekwsh.rb → kwsh.rb} +35 -16
- data/lib/kward/kwshrc.rb +233 -0
- data/lib/kward/markdown_code_block.rb +136 -0
- data/lib/kward/model/client.rb +34 -22
- data/lib/kward/model/provider_catalog.rb +5 -0
- data/lib/kward/model/stream_parser.rb +20 -4
- data/lib/kward/pan/index.html.erb +3 -3
- data/lib/kward/pan/server.rb +23 -3
- data/lib/kward/persistent_shell_session.rb +119 -26
- data/lib/kward/project_files.rb +2 -2
- data/lib/kward/prompt_interface/composer_renderer.rb +44 -40
- data/lib/kward/prompt_interface/composer_state.rb +33 -24
- data/lib/kward/prompt_interface/editor/auto_indent.rb +24 -22
- data/lib/kward/prompt_interface/editor/controller.rb +30 -33
- data/lib/kward/prompt_interface/editor/endwise.rb +13 -4
- data/lib/kward/prompt_interface/editor/modes/vibe.rb +289 -44
- data/lib/kward/prompt_interface/editor/renderer.rb +108 -6
- data/lib/kward/prompt_interface/editor/runner.rb +362 -0
- data/lib/kward/prompt_interface/editor/runner_state.rb +78 -0
- data/lib/kward/prompt_interface/editor/state.rb +10 -10
- data/lib/kward/prompt_interface/editor/syntax_highlighter.rb +68 -6
- data/lib/kward/prompt_interface/editor/vibe_state.rb +3 -3
- data/lib/kward/prompt_interface/file_overlay.rb +71 -15
- data/lib/kward/prompt_interface/key_handler.rb +67 -0
- data/lib/kward/prompt_interface/overlay_renderer.rb +7 -5
- data/lib/kward/prompt_interface/project_browser.rb +415 -14
- data/lib/kward/prompt_interface/runtime_state.rb +50 -1
- data/lib/kward/prompt_interface/screen.rb +2 -2
- data/lib/kward/prompt_interface/selection_prompt.rb +3 -1
- data/lib/kward/prompt_interface/slash_overlay.rb +19 -4
- data/lib/kward/prompt_interface/transcript_renderer.rb +12 -7
- data/lib/kward/prompt_interface.rb +93 -18
- data/lib/kward/prompts/commands.rb +1 -1
- data/lib/kward/prompts.rb +1 -1
- data/lib/kward/pty_output_sink.rb +47 -0
- data/lib/kward/rpc/transcript_normalizer.rb +7 -3
- data/lib/kward/scratchpad_languages.rb +74 -0
- data/lib/kward/scratchpad_runner.rb +155 -29
- data/lib/kward/shell_prompt.rb +2 -0
- data/lib/kward/terminal_keys.rb +12 -0
- data/lib/kward/terminal_text.rb +121 -0
- data/lib/kward/text_matcher.rb +18 -0
- data/lib/kward/tools/open_editor.rb +41 -0
- data/lib/kward/tools/registry.rb +13 -4
- data/lib/kward/tools/tool_call.rb +2 -1
- data/lib/kward/version.rb +1 -1
- data/templates/default/fulldoc/html/css/kward.css +0 -125
- data/templates/default/fulldoc/html/images/kward_workflow.svg +52 -0
- data/templates/default/fulldoc/html/setup.rb +1 -1
- data/templates/default/kward_navigation.rb +1 -0
- data/templates/default/layout/html/footer.erb +10 -0
- data/templates/default/layout/html/headers.erb +23 -0
- data/templates/default/layout/html/layout.erb +6 -18
- data/templates/default/layout/html/setup.rb +41 -2
- metadata +36 -8
- data/templates/default/fulldoc/html/images/kward_screen_1.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10d9376091daae14fa22ee39099645cb78bbdb8ff8de89a5982ffe2929396d67
|
|
4
|
+
data.tar.gz: 633ec7446e83664c18fcac2a12fcdf686dcc81cf21fc33cf73026186b4765540
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '01750111663180d8f89afe2e2bfc7e14ada0c5942621d0ac5cc74eddda07db81d164ea6b3c55fbb6d3082b9e76834cb74094807bba67ac1419f06c68453e595c'
|
|
7
|
+
data.tar.gz: f4e8e96278bd737a4912461325381e63477d52a4a1710ea53b0c08ce7aeb2caba88a2662f1a8a8d24b8d7e339d745f1ece1816626c4f7e142aeac9e0cdd0cc15
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,57 @@ All notable changes to Kward will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.84.0] - 2026-08-30
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added security reporting, contribution and conduct policies, structured issue and pull-request templates, and an explicit macOS/Linux/WSL/Windows support matrix.
|
|
12
|
+
- Added Vibe multi-cursor editing with `Ctrl+D` occurrence selection from normal, insert, and characterwise visual modes, plus visual-mode `I`/`A` cursors at each selected line boundary.
|
|
13
|
+
- Added `script/benchmark_composer` for repeatable draft-layout, history-search, and file-completion performance measurements.
|
|
14
|
+
- Added Vibe visual and cursor-aware `:run` support plus `:run all` for executing runnable Markdown fenced language blocks and inserting or replacing their formatted `<output>` fields.
|
|
15
|
+
- Added configurable editor runners under `editor.runners`, with Node, TypeScript, Python, Shell, Lua, Julia, Elixir, Crystal, Go, and Swift buffer execution alongside Ruby.
|
|
16
|
+
- Added Vibe visual-mode `Ctrl+h`/`Ctrl+j`/`Ctrl+k`/`Ctrl+l` shortcuts to outdent, move down, move up, and indent selected lines while keeping visual mode active.
|
|
17
|
+
- Added a live `source`/`.` shell builtin that applies declarative aliases and exports to the running `/shell` session without restarting Kward.
|
|
18
|
+
- Added shell-agent provider, model, and reasoning-effort settings under `shell.agent`, editor-agent provider settings under `editor.agent`, and environment overrides for transient-agent provider selection.
|
|
19
|
+
- Added shell-style `kwshrc` configuration files at `~/.kward/kwshrc` and `~/.kwshrc`, with ordered `alias`, `export`, and declarative `source` support.
|
|
20
|
+
- Added the `open_editor` agent tool so interactive sessions, including explicit `/shell` `?` prompts, can open a requested workspace file in Kward's built-in editor.
|
|
21
|
+
- Extended `/scratchpad` to open all 26 built-in syntax-highlighted languages through canonical names or familiar file-extension shortcuts, with `/scratchpad help` for discovery.
|
|
22
|
+
- Added nested syntax highlighting, auto-indentation, and endwise behavior for recognized language tags inside fenced code blocks in Markdown editor buffers.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Smoothed interactive response streaming by pacing buffered provider events and rendering safe text before incomplete inline Markdown instead of delaying whole lines.
|
|
27
|
+
- Replaced the busy Braille spinner with a calmer four-frame activity pulse in the interactive composer.
|
|
28
|
+
- Added brief success, failure, and cancellation transitions to the interactive composer when an agent turn finishes.
|
|
29
|
+
- Standardized terminal accents by meaning: cyan for agent activity, green for success, amber for caution, red for failure, purple for tools, and gray for metadata.
|
|
30
|
+
- Added a brief, visual-only response-arrival flourish when the first assistant output reaches the interactive composer.
|
|
31
|
+
- Made the composer activity label follow real turn states such as thinking, reasoning, responding, retrying, and the currently running tool.
|
|
32
|
+
- Added unobtrusive elapsed-time feedback after two seconds, final turn duration in completion transitions, and provider-reported tool durations in result summaries.
|
|
33
|
+
- Added stable `❯` user and `✦` assistant anchors to make transcript turn boundaries easier to scan without changing stored conversation content.
|
|
34
|
+
- Added persistent background-tab status colors for running work, unread output, successful detached commands, questions, and failures without changing tab label widths.
|
|
35
|
+
- Documentation checks now validate the curated public extension entry points without presenting aggregate internal-helper coverage as a product-quality metric.
|
|
36
|
+
- The repository and documentation landing pages now use a focused coding-workflow visual, restrained project badges, and clearer product identity.
|
|
37
|
+
- Updated RubyGems positioning and metadata to describe Kward's supported product surfaces and direct users to the documentation site while keeping source and issue links on GitHub.
|
|
38
|
+
- Refined the documentation homepage with a concrete static message, direct getting-started navigation, branded browser and social metadata, canonical URLs, and a quieter generated-docs footer.
|
|
39
|
+
- The composer now highlights `/` command and `@` file discovery, and the startup screen gives actionable guidance when no model provider is connected.
|
|
40
|
+
- Grouped and aligned top-level help, condensed credential status with an opt-in `--all` view, and standardized doctor, hooks, and project-skill diagnostics with actionable summaries and exit statuses.
|
|
41
|
+
- Pan now binds to `127.0.0.1` by default, accepts `KWARD_PAN_PASSWORD`, and warns whenever it is explicitly exposed over plain HTTP on a non-loopback address.
|
|
42
|
+
- Vibe visual selections can now be used as line ranges for `:` commands, including `:s` substitutions and `:run` scratchpad execution.
|
|
43
|
+
- Ruby scratchpad runs now preserve the source buffer and show captured output in a scrollable, cancellable lower-half output pane instead of appending it after `__END__`; mouse drag selection and `Ctrl+C`/`Cmd+C`/Vibe `y` copy clean output without pane borders.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Restored Codex commentary as visible reasoning output during streaming and session replay instead of showing only the provider's short reasoning-summary headline.
|
|
48
|
+
- Kept expected Git discovery failures, PTY fixtures, and release subprocess output inside their owning tests so successful suite and CI logs remain quiet.
|
|
49
|
+
- Replaced one-shot authentication and runtime backtraces with concise, actionable CLI errors while retaining opt-in debug backtraces through `KWARD_DEBUG=1`.
|
|
50
|
+
- Fixed composer cursor movement, deletion, wrapping, truncation, and border alignment for wide and multi-codepoint Unicode graphemes.
|
|
51
|
+
- Reduced composer latency for long drafts, large file and slash-command lists, and prompt histories by eliminating repeated layout work, discovering project paths outside rendering, and reusing search results.
|
|
52
|
+
- Fixed tab switching during shell commands so tab shortcuts take priority without aborting the command; detached commands continue in the originating tab's background and report their output when complete.
|
|
53
|
+
|
|
54
|
+
### Removed
|
|
55
|
+
|
|
56
|
+
- Removed legacy `kwsh.yml` shell configuration; shell aliases and exports now use the shell-style `kwshrc` files.
|
|
57
|
+
|
|
7
58
|
## [0.83.0] - 2026-08-28
|
|
8
59
|
|
|
9
60
|
### Added
|
|
@@ -14,6 +65,8 @@ All notable changes to Kward will be documented in this file.
|
|
|
14
65
|
- Added current-buffer word completion to the integrated editor, with repeated Tab presses cycling nearby matches and existing smart indentation retained when no match exists.
|
|
15
66
|
- Added Claude Opus 5 to the Anthropic model picker with its 1M context window and high-reasoning metadata.
|
|
16
67
|
- Added an `i` toggle to the `/files` browser for showing Git-ignored files, which remain hidden by default.
|
|
68
|
+
- Added `f`, `d`, and `r` actions to the `/files` browser for creating files, creating directories, and renaming entries from the composer prompt.
|
|
69
|
+
- Added Backspace deletion to the `/files` browser with confirmation and an additional confirmation before recursively deleting non-empty directories.
|
|
17
70
|
|
|
18
71
|
### Changed
|
|
19
72
|
|
|
@@ -73,7 +126,7 @@ All notable changes to Kward will be documented in this file.
|
|
|
73
126
|
- Displayed packaged plugins with their folder name in the startup plugin list, such as `folder/plugin.rb`.
|
|
74
127
|
- Added a frozen composer display for line-oriented Git PTY commands while preserving the full-terminal handoff for full-screen programs.
|
|
75
128
|
- Changed external `/shell` commands and one-shot `!command` input to use interactive PTY terminal handoff by default, while retaining `pty` and `/pty` for compatibility.
|
|
76
|
-
- Made aliases configured in `
|
|
129
|
+
- Made aliases configured in `kwshrc` available to leading-`!` execution and command completion.
|
|
77
130
|
- Removed interactive PTY start and exit-status messages while retaining the submitted command echo.
|
|
78
131
|
- Changed shell and leading-`!` completion so the candidate list appears in an interactive overlay while repeated Tab presses cycle through candidates in the composer.
|
|
79
132
|
- Removed the `Tab` and `Shift+Tab` reasoning-effort shortcuts so the composer keeps its normal completion behavior.
|
|
@@ -328,27 +381,27 @@ All notable changes to Kward will be documented in this file.
|
|
|
328
381
|
- Added `/queue open <id>` to open a queued worker's session for review or follow-up.
|
|
329
382
|
- Added `/diff` to open the chronological file changes recorded in the current session in the integrated diff viewer.
|
|
330
383
|
- Added `/scratchpad [text|markdown|ruby]` for opening unsaved editor buffers, including Vibe `:w filename` save-as support and Ruby `:run`/Modern `Ctrl+R` output written after `__END__`.
|
|
331
|
-
- Added `/pty <command>` and the `
|
|
332
|
-
- Added minimal PTY execution for external `
|
|
333
|
-
- Added Ctrl+C cancellation for running `
|
|
334
|
-
- Added quoted path completion and cached `$PATH` executable completion for `
|
|
335
|
-
- Added streaming `
|
|
336
|
-
- Added separate workspace-scoped `
|
|
384
|
+
- Added `/pty <command>` and the `kwsh` `pty <command>` built-in for explicit interactive PTY passthrough sessions, enabling terminal-owned tools such as pagers to run from Kward.
|
|
385
|
+
- Added minimal PTY execution for external `kwsh` commands so terminal-aware tools can detect a TTY and terminal width.
|
|
386
|
+
- Added Ctrl+C cancellation for running `kwsh` commands and preserved tab-switch actions while shell commands are active.
|
|
387
|
+
- Added quoted path completion and cached `$PATH` executable completion for `kwsh`.
|
|
388
|
+
- Added streaming `kwsh` command output in the TUI transcript while commands run.
|
|
389
|
+
- Added separate workspace-scoped `kwsh` command history so embedded shell input no longer shares normal prompt history.
|
|
337
390
|
- Added structured RPC `runtime/updateSetting` `defaultModel` values so clients can send provider and model separately while keeping the existing string format.
|
|
338
391
|
|
|
339
392
|
### Changed
|
|
340
393
|
|
|
341
|
-
- Changed PTY-backed `
|
|
342
|
-
- Changed `
|
|
343
|
-
- Improved `
|
|
344
|
-
- Changed `
|
|
394
|
+
- Changed PTY-backed `kwsh` commands to refresh terminal window size while running so long-lived commands can adapt to resizes.
|
|
395
|
+
- Changed `kwsh` to default `GIT_PAGER` to `cat`, while preserving user-provided values, so Git commands do not unexpectedly enter an interactive pager under PTY execution.
|
|
396
|
+
- Improved `kwsh` POSIX-oriented built-ins, including `exit [status]`, stricter `cd`/`pwd`, `export NAME`, assignment persistence, `unalias`, and shared alias-name validation.
|
|
397
|
+
- Changed `kwsh` configuration to prefer a POSIX `/bin/sh` default shell and validate runtime settings for command timeout, output cap, and shell history size.
|
|
345
398
|
|
|
346
399
|
### Fixed
|
|
347
400
|
|
|
348
|
-
- Normalized ordinary PTY line endings in `
|
|
349
|
-
- Added `
|
|
401
|
+
- Normalized ordinary PTY line endings in `kwsh` command output so transcripts avoid stray carriage returns.
|
|
402
|
+
- Added `kwsh` timeout and output-limit enforcement for external commands using the shared local command runner.
|
|
350
403
|
- Consolidated workspace shell command execution on a shared local command runner with timeout, cancellation, bounded capture, and optional streaming support.
|
|
351
|
-
- Fixed `
|
|
404
|
+
- Fixed `kwsh` shell output sanitization so unsafe terminal controls are stripped before command output is shown while SGR color is preserved.
|
|
352
405
|
- Split Vibe editor insert/readline key handling into a focused mixin without changing editor behavior.
|
|
353
406
|
- Consolidated compaction message-field reads through the shared message access helper.
|
|
354
407
|
- Consolidated RPC transcript tool metadata normalization with tool event metadata so tool names, args, diffs, and changed files stay aligned.
|
|
@@ -370,7 +423,7 @@ All notable changes to Kward will be documented in this file.
|
|
|
370
423
|
|
|
371
424
|
- Added a built-in editor that can be opened from the TUI with `$` or directly from the CLI with `kward edit <filename>`, with modern, Emacs-style, and Vibe editing modes.
|
|
372
425
|
- Added richer editor workflows including syntax highlighting, undo/redo, auto-indent, soft wrap, mouse support, multi-cursor editing, relative line numbers, and an expanded Vim-like Vibe mode with visual selections, text objects, registers, marks, macros, substitution, and Ruby navigation.
|
|
373
|
-
- Added `/shell`, an embedded Kward shell (`
|
|
426
|
+
- Added `/shell`, an embedded Kward shell (`kwsh`) for running workspace commands without leaving the TUI, including command/path completion, safe color output, optional global `kwshrc` configuration, and rbenv shim autodetection.
|
|
374
427
|
- Added `/files`, a searchable project file browser that can open files in the editor and remembers cursor and folder expansion state per workspace.
|
|
375
428
|
- Added persistent TUI tabs for session-backed conversations, plus tab commands, shortcuts, status colors, and restoration across restarts.
|
|
376
429
|
- Added `/git` workflows for reviewing changes, viewing diffs, staging or unstaging files, and writing commit messages from inside the TUI.
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributing to Kward
|
|
2
|
+
|
|
3
|
+
Thank you for helping improve Kward. Small, focused changes with clear tests are the easiest to review and release.
|
|
4
|
+
|
|
5
|
+
## Before you start
|
|
6
|
+
|
|
7
|
+
- Search existing issues and pull requests for related work.
|
|
8
|
+
- Open an issue before a large feature, new dependency, protocol change, or broad restructuring.
|
|
9
|
+
- Report security concerns privately through [the security policy](SECURITY.md), not in a public issue.
|
|
10
|
+
|
|
11
|
+
## Set up the project
|
|
12
|
+
|
|
13
|
+
Kward requires Ruby 3.4 or newer.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/kaiwood/kward.git
|
|
17
|
+
cd kward
|
|
18
|
+
bundle install
|
|
19
|
+
bundle exec rake test
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Run the CLI from the checkout with:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
ruby lib/main.rb
|
|
26
|
+
ruby lib/main.rb "Explain this project"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
See [Platform support](doc/platform-support.md) for operating-system and terminal expectations.
|
|
30
|
+
|
|
31
|
+
## Make a change
|
|
32
|
+
|
|
33
|
+
1. Keep the patch limited to one problem.
|
|
34
|
+
2. Follow the existing Ruby style and ownership boundaries.
|
|
35
|
+
3. Add focused Minitest coverage for behavior changes.
|
|
36
|
+
4. Update user documentation when commands, configuration, tools, protocols, or workflows change.
|
|
37
|
+
5. Add user-facing changes to the `[Unreleased]` section of `CHANGELOG.md`.
|
|
38
|
+
|
|
39
|
+
Avoid unrelated refactors, formatting-only churn, generated-file commits, and new dependencies unless they are necessary for the change.
|
|
40
|
+
|
|
41
|
+
## Verify the change
|
|
42
|
+
|
|
43
|
+
Run the smallest relevant test first, then the full suite before opening a pull request:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ruby -Itest test/test_cli.rb
|
|
47
|
+
bundle exec rake test
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For documentation changes, also run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bundle exec rake docs:check
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The release preflight combines tests, documentation checks, package validation, and release metadata checks:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bundle exec rake release:preflight
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Release preflight expects the current version and tag state to be ready for a release, so contributors normally do not need to run it for ordinary pull requests.
|
|
63
|
+
|
|
64
|
+
## Open a pull request
|
|
65
|
+
|
|
66
|
+
Describe:
|
|
67
|
+
|
|
68
|
+
- the user-visible problem;
|
|
69
|
+
- the chosen solution;
|
|
70
|
+
- tests and checks run;
|
|
71
|
+
- security, compatibility, or documentation implications;
|
|
72
|
+
- screenshots for visible UI changes.
|
|
73
|
+
|
|
74
|
+
A pull request should be understandable one commit at a time. Maintainers may ask for commits to be combined or reorganized before merge when that makes the final history clearer.
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
kward (0.
|
|
4
|
+
kward (0.84.0)
|
|
5
5
|
base64
|
|
6
6
|
nokogiri
|
|
7
7
|
tiktoken_ruby
|
|
@@ -9,6 +9,7 @@ PATH
|
|
|
9
9
|
tty-prompt
|
|
10
10
|
tty-reader
|
|
11
11
|
tty-screen
|
|
12
|
+
unicode-display_width
|
|
12
13
|
|
|
13
14
|
GEM
|
|
14
15
|
remote: https://rubygems.org/
|
|
@@ -104,6 +105,9 @@ GEM
|
|
|
104
105
|
tty-screen (0.8.2)
|
|
105
106
|
typhoeus (1.6.0)
|
|
106
107
|
ethon (>= 0.18.0)
|
|
108
|
+
unicode-display_width (3.2.0)
|
|
109
|
+
unicode-emoji (~> 4.1)
|
|
110
|
+
unicode-emoji (4.2.0)
|
|
107
111
|
webrick (1.9.2)
|
|
108
112
|
wisper (2.0.1)
|
|
109
113
|
yard (0.9.44)
|
|
@@ -146,7 +150,7 @@ CHECKSUMS
|
|
|
146
150
|
html-proofer (5.2.1) sha256=fdd958a7cbf9c3255fb96fe7cfc4e611f64e2706e469488a3326309ad007d2fd
|
|
147
151
|
io-event (1.16.2) sha256=9f9cb0a96ea5c3850a672606c65f27bc96d7621399ef6196acbfe2be0cd1279c
|
|
148
152
|
json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
|
|
149
|
-
kward (0.
|
|
153
|
+
kward (0.84.0)
|
|
150
154
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
151
155
|
metrics (0.15.0) sha256=61ded5bac95118e995b1bc9ed4a5f19bc9814928a312a85b200abbdac9039072
|
|
152
156
|
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
|
@@ -174,6 +178,8 @@ CHECKSUMS
|
|
|
174
178
|
tty-reader (0.9.0) sha256=c62972c985c0b1566f0e56743b6a7882f979d3dc32ff491ed490a076f899c2b1
|
|
175
179
|
tty-screen (0.8.2) sha256=c090652115beae764336c28802d633f204fb84da93c6a968aa5d8e319e819b50
|
|
176
180
|
typhoeus (1.6.0) sha256=bacc41c23e379547e29801dc235cd1699b70b955a1ba3d32b2b877aa844c331d
|
|
181
|
+
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
182
|
+
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
177
183
|
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
|
|
178
184
|
wisper (2.0.1) sha256=ce17bc5c3a166f241a2e6613848b025c8146fce2defba505920c1d1f3f88fae6
|
|
179
185
|
yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
|
data/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="templates/default/fulldoc/html/images/kward_logo.png" width="150" alt="Kward logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Kward
|
|
2
6
|
|
|
7
|
+
<p align="center"><strong>An extensible Ruby coding agent for your terminal.</strong></p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/kaiwood/kward/actions/workflows/ci.yml"><img src="https://github.com/kaiwood/kward/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
|
|
11
|
+
<a href="https://rubygems.org/gems/kward"><img src="https://badge.fury.io/rb/kward.svg" alt="RubyGems version"></a>
|
|
12
|
+
<a href="https://kaiwood.github.io/kward/"><img src="https://img.shields.io/badge/docs-kaiwood.github.io-9caf35" alt="Documentation"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
3
15
|
Kward is a coding agent for your terminal. It can inspect and edit a project, run commands, research problems, and save your work in sessions you can resume later.
|
|
4
16
|
|
|
5
17
|
Use Kward from the terminal, its local browser interface, or a trusted JSON-RPC client. It works with ChatGPT/Codex and Claude subscriptions, hosted model APIs, GitHub Copilot, OpenRouter, and local servers such as Ollama, LM Studio, and llama.cpp.
|
|
@@ -12,6 +24,10 @@ Kward treats that work as an ongoing workspace rather than a disposable conversa
|
|
|
12
24
|
|
|
13
25
|
Start with a normal coding conversation. If your workflow grows, you can add memory, reusable prompts and skills, local plugins, lifecycle hooks, MCP servers, transports, or a custom RPC client.
|
|
14
26
|
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="templates/default/fulldoc/html/images/kward_workflow.svg" width="1000" alt="Kward completing a focused coding change and test run">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
15
31
|
## Install
|
|
16
32
|
|
|
17
33
|
Install Kward from RubyGems:
|
|
@@ -65,6 +81,8 @@ New to Kward:
|
|
|
65
81
|
Work safely:
|
|
66
82
|
|
|
67
83
|
- [Security and trust](doc/security.md): local permissions, external data flow, trusted extensions, and safe work in unfamiliar repositories.
|
|
84
|
+
- [Security policy](https://github.com/kaiwood/kward/blob/main/SECURITY.md): privately report suspected vulnerabilities and understand supported security-fix versions.
|
|
85
|
+
- [Platform support](doc/platform-support.md): macOS, Linux, WSL, native Windows, terminal, and sandbox support expectations.
|
|
68
86
|
- [Permissions](doc/permissions.md): opt-in tool approval, write scopes, policy rules, and current limits.
|
|
69
87
|
- [Command sandboxing](doc/sandboxing.md): opt-in OS-enforced boundaries for model-requested shell commands.
|
|
70
88
|
- [Troubleshooting](doc/troubleshooting.md): environment-specific install and runtime issues.
|
|
@@ -83,7 +101,7 @@ Everyday workflows:
|
|
|
83
101
|
- [Skills](doc/skills.md): add reusable instructions that load only for matching tasks.
|
|
84
102
|
- [Prompt templates](doc/prompt-templates.md): create reusable slash prompts and use the starter templates installed by `kward init`.
|
|
85
103
|
- [MCP servers](doc/mcp.md): connect trusted local Model Context Protocol tool servers.
|
|
86
|
-
- [Pan mode](doc/pan.md): use the mobile-friendly browser interface
|
|
104
|
+
- [Pan mode](doc/pan.md): use the mobile-friendly local browser interface or explicitly expose it to a trusted LAN.
|
|
87
105
|
- [Local models](doc/local-models.md): connect Ollama, LM Studio, or llama.cpp and use a minimal replacement prompt.
|
|
88
106
|
|
|
89
107
|
Extend and integrate:
|
|
@@ -109,6 +127,8 @@ Generated Ruby API:
|
|
|
109
127
|
|
|
110
128
|
## Development
|
|
111
129
|
|
|
130
|
+
Read [Contributing to Kward](https://github.com/kaiwood/kward/blob/main/CONTRIBUTING.md) before preparing a pull request. Participation is governed by the [Code of conduct](https://github.com/kaiwood/kward/blob/main/CODE_OF_CONDUCT.md).
|
|
131
|
+
|
|
112
132
|
Run tests:
|
|
113
133
|
|
|
114
134
|
```bash
|
data/Rakefile
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
2
|
require "fileutils"
|
|
3
|
+
Warning[:experimental] = false if Warning.respond_to?(:[]=)
|
|
3
4
|
require "html-proofer"
|
|
4
5
|
require "open3"
|
|
5
6
|
require "rdoc/task"
|
|
7
|
+
require "rbconfig"
|
|
6
8
|
require "rubygems/package"
|
|
7
9
|
require "webrick"
|
|
8
10
|
require "yard"
|
|
@@ -65,6 +67,44 @@ def verify_packaged_gem(gem_name)
|
|
|
65
67
|
files
|
|
66
68
|
end
|
|
67
69
|
|
|
70
|
+
def verify_docs_branding
|
|
71
|
+
homepage = File.read("_yardoc/index.html")
|
|
72
|
+
required = [
|
|
73
|
+
"<title>Kward — Ruby Coding Agent for Your Terminal</title>",
|
|
74
|
+
'<meta name="description"',
|
|
75
|
+
'<link rel="canonical" href="https://kaiwood.github.io/kward/">',
|
|
76
|
+
'<link rel="icon" type="image/png"',
|
|
77
|
+
'href="file.getting-started.html">Get Started'
|
|
78
|
+
]
|
|
79
|
+
missing = required.reject { |content| homepage.include?(content) }
|
|
80
|
+
abort("Generated documentation is missing branded homepage metadata: #{missing.join(", ")}") if missing.any?
|
|
81
|
+
|
|
82
|
+
getting_started = File.read("_yardoc/file.getting-started.html")
|
|
83
|
+
guide_required = [
|
|
84
|
+
"<title>Getting started | Kward Docs</title>",
|
|
85
|
+
'<link rel="canonical" href="https://kaiwood.github.io/kward/file.getting-started.html">'
|
|
86
|
+
]
|
|
87
|
+
missing = guide_required.reject { |content| getting_started.include?(content) }
|
|
88
|
+
abort("Generated guide metadata is incorrect: #{missing.join(", ")}") if missing.any?
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def verify_public_api_docs
|
|
92
|
+
api_page = File.read("_yardoc/file.api.html")
|
|
93
|
+
required_links = [
|
|
94
|
+
"Kward.html#plugin-class_method",
|
|
95
|
+
"Kward/PluginRegistry/DSL.html",
|
|
96
|
+
"Kward/PluginRegistry/Context.html",
|
|
97
|
+
"Kward/Tools/Base.html",
|
|
98
|
+
"Kward/ToolRegistry.html",
|
|
99
|
+
"Kward/RPC/Server.html",
|
|
100
|
+
"Kward/Prompts.html",
|
|
101
|
+
"Kward/Skills/Registry.html",
|
|
102
|
+
"Kward/ConfigFiles.html"
|
|
103
|
+
]
|
|
104
|
+
missing = required_links.reject { |link| api_page.include?(%(href="#{link}")) }
|
|
105
|
+
abort("Generated public API landing page is missing supported entry points: #{missing.join(", ")}") if missing.any?
|
|
106
|
+
end
|
|
107
|
+
|
|
68
108
|
def rewrite_yard_markdown_links
|
|
69
109
|
guide_names = Dir.glob("doc/*.md").map { |path| File.basename(path, ".md") }
|
|
70
110
|
|
|
@@ -87,7 +127,8 @@ task default: :test
|
|
|
87
127
|
|
|
88
128
|
desc "Run the full test suite"
|
|
89
129
|
task :test do
|
|
90
|
-
ruby "-Itest", "-e", 'Dir["test/**/test_*.rb"].sort.each { |file| require_relative file }'
|
|
130
|
+
success = system(RbConfig.ruby, "-Itest", "-e", 'Dir["test/**/test_*.rb"].sort.each { |file| require_relative file }')
|
|
131
|
+
abort("Test suite failed") unless success
|
|
91
132
|
end
|
|
92
133
|
|
|
93
134
|
RDoc::Task.new do |rdoc|
|
|
@@ -102,7 +143,8 @@ YARD::Rake::YardocTask.new do |yard|
|
|
|
102
143
|
"--readme", "README.md",
|
|
103
144
|
"--output-dir", "_yardoc",
|
|
104
145
|
"--markup", "markdown",
|
|
105
|
-
"--template-path", "templates"
|
|
146
|
+
"--template-path", "templates",
|
|
147
|
+
"--no-stats"
|
|
106
148
|
]
|
|
107
149
|
end
|
|
108
150
|
|
|
@@ -183,5 +225,7 @@ namespace :docs do
|
|
|
183
225
|
}
|
|
184
226
|
|
|
185
227
|
HTMLProofer.check_directory("_yardoc", options).run
|
|
228
|
+
verify_docs_branding
|
|
229
|
+
verify_public_api_docs
|
|
186
230
|
end
|
|
187
231
|
end
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Kward can read files, edit workspaces, run commands, call external providers, and load trusted local extensions. Security reports are taken seriously, especially when they involve credential exposure, workspace-boundary bypasses, command execution, authentication, or remote access.
|
|
4
|
+
|
|
5
|
+
## Supported versions
|
|
6
|
+
|
|
7
|
+
Security fixes are made against the latest released version and the `main` branch. Upgrade to the newest Kward release before reporting behavior that may already have been fixed.
|
|
8
|
+
|
|
9
|
+
## Report a vulnerability privately
|
|
10
|
+
|
|
11
|
+
Do not open a public issue for a suspected vulnerability.
|
|
12
|
+
|
|
13
|
+
Use GitHub's private vulnerability reporting form:
|
|
14
|
+
|
|
15
|
+
<https://github.com/kaiwood/kward/security/advisories/new>
|
|
16
|
+
|
|
17
|
+
Include, when available:
|
|
18
|
+
|
|
19
|
+
- the affected Kward version and platform;
|
|
20
|
+
- a concise description of the impact;
|
|
21
|
+
- reproducible steps or a minimal proof of concept;
|
|
22
|
+
- the expected security boundary;
|
|
23
|
+
- any suggested mitigation.
|
|
24
|
+
|
|
25
|
+
Do not include real API keys, OAuth tokens, customer data, private repository content, or other secrets. Use clearly fake fixtures and redact local paths when they are not relevant.
|
|
26
|
+
|
|
27
|
+
The maintainer will aim to acknowledge a complete report within seven days, validate its impact, coordinate a fix, and agree on disclosure timing. Complex reports may take longer to investigate.
|
|
28
|
+
|
|
29
|
+
## Security model
|
|
30
|
+
|
|
31
|
+
Before reporting expected behavior as a vulnerability, review [Security and trust](doc/security.md), [Permissions](doc/permissions.md), and [Command sandboxing](doc/sandboxing.md). Kward's host process, user-directed shell features, and trusted extensions normally run with the current user's permissions; workspace guardrails and command-worker sandboxing have narrower documented boundaries.
|
data/doc/api.md
CHANGED
|
@@ -82,6 +82,10 @@ Generated entry points:
|
|
|
82
82
|
|
|
83
83
|
The generated comments focus on these supported extension boundaries rather than trying to make every internal orchestration helper public. When a generated method lacks guide coverage, treat it as internal unless the page explicitly marks it as a public API.
|
|
84
84
|
|
|
85
|
+
## Documentation checks
|
|
86
|
+
|
|
87
|
+
`bundle exec rake docs:check` validates links, images, scripts, branded metadata, guide canonical URLs, and the curated plugin, tool, RPC, prompt, skill, and configuration entry points listed above. The generated site intentionally includes implementation detail for contributors, so aggregate documentation coverage across every internal constant and helper is not used as a release-quality signal.
|
|
88
|
+
|
|
85
89
|
## Public API expectations
|
|
86
90
|
|
|
87
91
|
The generated reference is useful for understanding the codebase, but it does not make every class, method, or constructor a supported public API.
|
data/doc/composer.md
CHANGED
|
@@ -28,7 +28,7 @@ The composer supports familiar line-editing keys:
|
|
|
28
28
|
|
|
29
29
|
| Key | Action |
|
|
30
30
|
| --- | --- |
|
|
31
|
-
| `Left` / `Right` | Move by character |
|
|
31
|
+
| `Left` / `Right` | Move by visible character (Unicode grapheme) |
|
|
32
32
|
| `Home` / `Ctrl+A` | Move to the start of the current line |
|
|
33
33
|
| `End` / `Ctrl+E` | Move to the end of the current line |
|
|
34
34
|
| `Ctrl+B` / `Ctrl+F` | Move left or right |
|
data/doc/configuration.md
CHANGED
|
@@ -128,7 +128,7 @@ By default, Kward stores user data under `~/.kward`. Common files and directorie
|
|
|
128
128
|
~/.kward/anthropic_auth.json
|
|
129
129
|
~/.kward/github_auth.json
|
|
130
130
|
~/.kward/PRINCIPLES.md
|
|
131
|
-
~/.kward/
|
|
131
|
+
~/.kward/kwshrc
|
|
132
132
|
~/.kward/prompts/
|
|
133
133
|
~/.kward/skills/
|
|
134
134
|
~/.kward/plugins/
|
|
@@ -169,24 +169,51 @@ Project-local hooks can also live in `.kward/hooks.json`, but Kward loads them o
|
|
|
169
169
|
|
|
170
170
|
## Embedded shell config
|
|
171
171
|
|
|
172
|
-
The embedded Kward shell (`/shell`, internally `
|
|
172
|
+
The embedded Kward shell (`/shell`, internally `kwsh`) reads the shell-style rc files `~/.kward/kwshrc` and `~/.kwshrc`, in that order. When `KWARD_CONFIG_PATH` is set, the first path is beside that config file instead. Later rc entries override earlier aliases and exported variables.
|
|
173
173
|
|
|
174
|
-
Example:
|
|
174
|
+
Example rc file:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
alias ll='ls -la'
|
|
178
|
+
alias gs="git status --short"
|
|
179
|
+
export BUNDLE_WITHOUT=production
|
|
180
|
+
export PATH="$HOME/bin:$PATH"
|
|
181
|
+
source ~/.kward/kwsh-aliases
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Only declarative `alias`, `export`, and `source` (or `.`) directives are handled. `source` parses the referenced file without executing it, resolving relative paths from the containing rc file. Other shell scripting is ignored for now.
|
|
185
|
+
|
|
186
|
+
### Shell-agent model
|
|
187
|
+
|
|
188
|
+
The transient shell assistant normally follows the active conversation's model and reasoning effort. Override those defaults in the main JSON configuration:
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"shell": {
|
|
193
|
+
"agent": {
|
|
194
|
+
"provider": "openrouter",
|
|
195
|
+
"model": "openai/gpt-5.6-sol",
|
|
196
|
+
"reasoning_effort": "none"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
175
201
|
|
|
176
|
-
|
|
177
|
-
env:
|
|
178
|
-
FORCE_COLOR: "1"
|
|
179
|
-
CLICOLOR_FORCE: "1"
|
|
202
|
+
The optional `provider` selects a different backend for the transient shell assistant. Use the lowercase configuration IDs listed in [Model providers](providers.md). When it is omitted, the shell assistant follows the active conversation's provider, model, and reasoning effort. If a provider is explicitly configured without a model or reasoning effort, Kward uses that provider's defaults rather than inheriting values from the active conversation.
|
|
180
203
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
204
|
+
Environment variables take precedence over the JSON settings:
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
export KWSH_PROVIDER="openrouter"
|
|
208
|
+
export KWSH_MODE="openai/gpt-5.6-sol"
|
|
209
|
+
export KWSH_REASONING="none"
|
|
185
210
|
```
|
|
186
211
|
|
|
187
|
-
`
|
|
212
|
+
`KWSH_PROVIDER` selects the shell-agent provider, `KWSH_MODE` selects its model, and `KWSH_REASONING` selects its reasoning effort. Empty values are ignored.
|
|
213
|
+
|
|
214
|
+
`export` values are applied when shell mode starts, after Kward's conservative color defaults, and are also available to leading-`!` commands. Keys must be valid environment-variable names; invalid keys are ignored. Values support shell quoting and simple `$VAR`/`${VAR}` expansion. `/shell` keeps one persistent local interactive shell process per tab.
|
|
188
215
|
|
|
189
|
-
`
|
|
216
|
+
`alias` entries expand the first word of a command once. For example, `alias ll='ls -la'` makes `ll lib` run `ls -la lib`. Configured aliases are available both inside `/shell` and after the normal composer's `!` prefix, including command-name Tab completion. Built-in shell commands such as `cd`, `pwd`, `export`, `unset`, `alias`, `capture`, `clear`, `pty`, and `exit` take precedence over aliases inside `/shell`. External commands receive an interactive PTY by default. Prefix a submitted line with `?` inside `/shell` to ask the transient shell assistant about the current command output or state. An alias value can begin with `capture` when its `/shell` output should use the configured timeout, output limit, and transcript sanitization. Leading-`!` alias invocations are always interactive, so Kward removes a leading `capture` or legacy `pty` mode marker from the expanded alias before execution. Run `alias` inside `kwsh` to list configured aliases. Aliases created at runtime with that built-in belong only to the current `/shell` session and are not available to `!command` input.
|
|
190
217
|
|
|
191
218
|
## Provider and model settings
|
|
192
219
|
|
|
@@ -236,7 +263,7 @@ Model settings:
|
|
|
236
263
|
|
|
237
264
|
`model` is a legacy generic fallback. Provider-specific values take precedence. Catalog providers use `<runtime-id>_model`; for example, direct OpenAI uses `openai_api_model`, Gemini uses `gemini_model`, and Groq uses `groq_model`. Codex keeps `openai_model`. `reasoning_effort` and `thinking_level` are generic reasoning settings. `thinking_level` is an alias for `reasoning_effort` honored by all providers. For each provider, Kward resolves reasoning in this order: the provider-specific key (for example `openai_reasoning_effort`), then the generic `reasoning_effort`, then `thinking_level`, then the default `medium`. `openai_reasoning_effort`, `anthropic_reasoning_effort`, `openrouter_reasoning_effort`, and `copilot_reasoning_effort` are provider-specific forms.
|
|
238
265
|
|
|
239
|
-
|
|
266
|
+
OpenAI-hosted models do not expose their raw reasoning tokens. Kward displays the reasoning summaries and visible Codex commentary they provide. Set `codex_show_raw_reasoning` to `true` only for a backend that emits raw Codex `reasoning_text`; it defaults to `false` because raw reasoning can include internal or unstable model output.
|
|
240
267
|
|
|
241
268
|
`stream_idle_timeout_seconds` limits how long a streamed Codex, Anthropic, or Local response may go without receiving data. It defaults to `120`; set a positive value to override it. When the provider is silent longer than this limit, Kward closes the request and applies its normal transient-network retry behavior.
|
|
242
269
|
|
|
@@ -399,14 +426,15 @@ Vibe `:prompt` uses a dedicated transient editor agent. Configure its model and
|
|
|
399
426
|
{
|
|
400
427
|
"editor": {
|
|
401
428
|
"agent": {
|
|
402
|
-
"
|
|
429
|
+
"provider": "anthropic",
|
|
430
|
+
"model": "claude-sonnet-5",
|
|
403
431
|
"reasoning_effort": "medium"
|
|
404
432
|
}
|
|
405
433
|
}
|
|
406
434
|
}
|
|
407
435
|
```
|
|
408
436
|
|
|
409
|
-
|
|
437
|
+
The optional `provider` selects a different backend for the transient editor assistant. Use the lowercase configuration IDs listed in [Model providers](providers.md). When it is omitted, the editor assistant follows the active tab's provider, model, and reasoning effort. `KWARD_EDITOR_PROVIDER` can override the JSON provider for one-off runs. If a provider is explicitly configured without a model or reasoning effort, Kward uses that provider's defaults rather than inheriting values from the active tab. Editor-agent prompts and tool activity are kept out of the normal transcript and session history; the editor remains visible with a spinner while the transient turn runs.
|
|
410
438
|
|
|
411
439
|
The integrated Git and session diff viewers support unified and side-by-side layouts:
|
|
412
440
|
|
|
@@ -420,6 +448,27 @@ The integrated Git and session diff viewers support unified and side-by-side lay
|
|
|
420
448
|
|
|
421
449
|
`diff_view` can be `auto`, `unified`, or `side_by_side`. In `auto` mode, Kward uses side-by-side output when the terminal is at least 120 columns wide and unified output in narrower terminals. Change it with `/settings` → Interface → Diff view.
|
|
422
450
|
|
|
451
|
+
### Editor runners
|
|
452
|
+
|
|
453
|
+
The editor can run the current in-memory buffer for supported scratchpad languages and normal files. It never saves a normal file automatically before running. Configure runner binaries under `editor.runners`; omitted entries use the built-in defaults.
|
|
454
|
+
|
|
455
|
+
```json
|
|
456
|
+
{
|
|
457
|
+
"editor": {
|
|
458
|
+
"runners": {
|
|
459
|
+
"node": { "binary": "node" },
|
|
460
|
+
"python": { "binary": ".venv/bin/python" },
|
|
461
|
+
"shell": { "binary": "/bin/bash" },
|
|
462
|
+
"go": { "binary": "/usr/local/go/bin/go" }
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
`binary` may be an executable name resolved through `PATH`, an absolute path, or a relative path resolved from the active workspace. JavaScript and TypeScript use the `node` runner. TypeScript `.ts` buffers require a Node version with built-in TypeScript support; Node strips erasable types but does not type-check the buffer or read `tsconfig.json`. Node's built-in support does not run `.tsx` buffers. Runner processes execute directly without a shell.
|
|
469
|
+
|
|
470
|
+
The initial runnable languages are Ruby, JavaScript, TypeScript, Python, Shell, Lua, Julia, Elixir, Crystal, Go, and Swift. Other highlighted languages remain editor-only until they have a suitable execution model.
|
|
471
|
+
|
|
423
472
|
The editor includes syntax highlighting, automatic indentation, and matching-pair insertion for common languages. Unknown file types and color-disabled terminals use plain text. See [Integrated editor](editor.md#What_the_editor_supports) for the supported languages and detailed editing behavior.
|
|
424
473
|
|
|
425
474
|
Auto-indent and matching-pair insertion are enabled by default. To disable either feature:
|
|
@@ -532,22 +581,20 @@ Manual `/compact [instructions]` works even when auto-compaction is disabled.
|
|
|
532
581
|
|
|
533
582
|
## Pan mode
|
|
534
583
|
|
|
535
|
-
`kward pan` starts a
|
|
584
|
+
`kward pan` starts a local web UI and requires HTTP Basic Auth. Configure credentials before starting it:
|
|
536
585
|
|
|
537
586
|
```json
|
|
538
587
|
{
|
|
539
588
|
"pan_mode": {
|
|
540
|
-
"host": "0.0.0.0",
|
|
541
|
-
"port": 8765,
|
|
542
589
|
"username": "kward",
|
|
543
590
|
"password": "choose-a-private-password"
|
|
544
591
|
}
|
|
545
592
|
}
|
|
546
593
|
```
|
|
547
594
|
|
|
548
|
-
`host` defaults to `
|
|
595
|
+
`host` defaults to `127.0.0.1` and `port` defaults to `8765`. Set `host` to `0.0.0.0` only when you intentionally want access from another device on a trusted LAN. Kward prints a warning for every non-loopback binding because Pan uses plain HTTP without TLS.
|
|
549
596
|
|
|
550
|
-
|
|
597
|
+
Kward fails to start Pan unless `username` and either `password` or the `KWARD_PAN_PASSWORD` environment variable are configured. Config-file credentials are stored in plaintext; use a unique password and do not share the file. Pan exposes the agent's file, shell, web, and configured extension tools to anyone who can connect and authenticate. See [Pan mode](pan.md) for the full browser workflow, session behavior, security guidance, and limitations.
|
|
551
598
|
|
|
552
599
|
## Web search
|
|
553
600
|
|