kward 0.83.0 → 0.85.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.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +102 -15
  3. data/CONTRIBUTING.md +74 -0
  4. data/Gemfile.lock +8 -2
  5. data/README.md +21 -1
  6. data/Rakefile +46 -2
  7. data/SECURITY.md +31 -0
  8. data/doc/agent-tools.md +13 -1
  9. data/doc/api.md +21 -2
  10. data/doc/composer.md +2 -2
  11. data/doc/configuration.md +95 -25
  12. data/doc/editor.md +28 -13
  13. data/doc/extensibility.md +2 -1
  14. data/doc/files.md +8 -4
  15. data/doc/getting-started.md +3 -0
  16. data/doc/git.md +3 -1
  17. data/doc/pan.md +25 -15
  18. data/doc/permissions.md +4 -4
  19. data/doc/platform-support.md +48 -0
  20. data/doc/plugins.md +464 -15
  21. data/doc/rpc.md +154 -16
  22. data/doc/sandboxing.md +11 -5
  23. data/doc/security.md +10 -3
  24. data/doc/session-management.md +5 -4
  25. data/doc/shell.md +62 -45
  26. data/doc/tabs.md +6 -2
  27. data/doc/transports.md +15 -0
  28. data/doc/troubleshooting.md +12 -2
  29. data/doc/usage.md +9 -6
  30. data/doc/workspace-tools.md +9 -0
  31. data/examples/plugins/space_invaders.rb +1 -1
  32. data/examples/plugins/stardate_footer.rb +2 -2
  33. data/examples/plugins/telegram/plugin.rb +1 -1
  34. data/kward.gemspec +5 -4
  35. data/lib/kward/agent.rb +30 -14
  36. data/lib/kward/cli/auth_commands.rb +34 -13
  37. data/lib/kward/cli/commands.rb +83 -62
  38. data/lib/kward/cli/compaction.rb +9 -3
  39. data/lib/kward/cli/doctor.rb +39 -17
  40. data/lib/kward/cli/hook_commands.rb +22 -12
  41. data/lib/kward/cli/interactive_turn.rb +48 -7
  42. data/lib/kward/cli/plugins.rb +81 -12
  43. data/lib/kward/cli/project_skills_commands.rb +8 -4
  44. data/lib/kward/cli/prompt_interface.rb +52 -5
  45. data/lib/kward/cli/rendering.rb +18 -9
  46. data/lib/kward/cli/runtime_helpers.rb +228 -71
  47. data/lib/kward/cli/sessions.rb +9 -5
  48. data/lib/kward/cli/settings/menus.rb +745 -0
  49. data/lib/kward/cli/settings/model.rb +327 -0
  50. data/lib/kward/cli/settings.rb +6 -1055
  51. data/lib/kward/cli/slash_commands.rb +56 -17
  52. data/lib/kward/cli/tabs.rb +244 -33
  53. data/lib/kward/cli/tool_summaries.rb +14 -0
  54. data/lib/kward/{cli_transcript_formatter.rb → cli/transcript_formatter.rb} +14 -7
  55. data/lib/kward/cli/worktrees.rb +65 -2
  56. data/lib/kward/cli.rb +70 -30
  57. data/lib/kward/compactor.rb +18 -7
  58. data/lib/kward/config/core.rb +389 -0
  59. data/lib/kward/config/extensions.rb +96 -0
  60. data/lib/kward/config/prompts.rb +313 -0
  61. data/lib/kward/config/settings.rb +250 -0
  62. data/lib/kward/config_files.rb +14 -994
  63. data/lib/kward/conversation.rb +31 -2
  64. data/lib/kward/image_attachments.rb +1 -1
  65. data/lib/kward/model/client.rb +36 -24
  66. data/lib/kward/model/copilot_models.rb +2 -2
  67. data/lib/kward/model/model_info.rb +20 -3
  68. data/lib/kward/{openrouter_model_cache.rb → model/openrouter_model_cache.rb} +3 -3
  69. data/lib/kward/model/payloads.rb +12 -3
  70. data/lib/kward/model/provider_catalog.rb +5 -0
  71. data/lib/kward/model/stream_parser.rb +20 -4
  72. data/lib/kward/model/typesafe_client.rb +78 -0
  73. data/lib/kward/pan/index.html.erb +3 -3
  74. data/lib/kward/pan/server.rb +33 -10
  75. data/lib/kward/permissions/policy.rb +6 -2
  76. data/lib/kward/plugin_registry.rb +2 -659
  77. data/lib/kward/plugins/actions.rb +453 -0
  78. data/lib/kward/plugins/chat_contract.rb +121 -0
  79. data/lib/kward/{plugin_chat_runtime.rb → plugins/chat_runtime.rb} +62 -18
  80. data/lib/kward/plugins/host.rb +232 -0
  81. data/lib/kward/plugins/registry.rb +1190 -0
  82. data/lib/kward/plugins/resources.rb +206 -0
  83. data/lib/kward/plugins/turn_request.rb +36 -0
  84. data/lib/kward/plugins/ui.rb +219 -0
  85. data/lib/kward/prompt_interface/composer_renderer.rb +44 -40
  86. data/lib/kward/prompt_interface/composer_state.rb +33 -24
  87. data/lib/kward/prompt_interface/editor/auto_indent.rb +24 -22
  88. data/lib/kward/prompt_interface/editor/controller.rb +30 -33
  89. data/lib/kward/prompt_interface/editor/endwise.rb +13 -4
  90. data/lib/kward/prompt_interface/editor/markdown_code_block.rb +136 -0
  91. data/lib/kward/prompt_interface/editor/modes/vibe.rb +289 -44
  92. data/lib/kward/prompt_interface/editor/renderer.rb +108 -6
  93. data/lib/kward/prompt_interface/editor/runner.rb +362 -0
  94. data/lib/kward/prompt_interface/editor/runner_state.rb +78 -0
  95. data/lib/kward/prompt_interface/editor/scratchpad_languages.rb +74 -0
  96. data/lib/kward/prompt_interface/editor/scratchpad_runner.rb +182 -0
  97. data/lib/kward/prompt_interface/editor/state.rb +11 -11
  98. data/lib/kward/prompt_interface/editor/syntax_highlighter.rb +68 -6
  99. data/lib/kward/prompt_interface/editor/vibe_state.rb +3 -3
  100. data/lib/kward/prompt_interface/file_overlay.rb +71 -15
  101. data/lib/kward/prompt_interface/key_handler.rb +67 -0
  102. data/lib/kward/prompt_interface/layout.rb +1 -1
  103. data/lib/kward/prompt_interface/overlay_renderer.rb +7 -5
  104. data/lib/kward/prompt_interface/plugin_ui_requests.rb +82 -0
  105. data/lib/kward/prompt_interface/project_browser.rb +415 -14
  106. data/lib/kward/prompt_interface/runtime_state.rb +56 -2
  107. data/lib/kward/prompt_interface/screen.rb +11 -4
  108. data/lib/kward/prompt_interface/selection_prompt.rb +3 -1
  109. data/lib/kward/prompt_interface/slash_overlay.rb +19 -4
  110. data/lib/kward/prompt_interface/transcript_renderer.rb +12 -7
  111. data/lib/kward/prompt_interface.rb +151 -27
  112. data/lib/kward/prompts/commands.rb +3 -2
  113. data/lib/kward/prompts.rb +1 -1
  114. data/lib/kward/{adaptive_pty_output_sink.rb → pty/adaptive_output_sink.rb} +1 -1
  115. data/lib/kward/pty/detached_run.rb +44 -0
  116. data/lib/kward/{interactive_pty_runner.rb → pty/interactive_runner.rb} +104 -30
  117. data/lib/kward/{local_command_runner.rb → pty/local_command_runner.rb} +1 -1
  118. data/lib/kward/{local_pty_command_runner.rb → pty/local_pty_runner.rb} +3 -9
  119. data/lib/kward/{pty_output_sink.rb → pty/output_sink.rb} +52 -0
  120. data/lib/kward/{pty_transcript_normalizer.rb → pty/transcript_normalizer.rb} +1 -1
  121. data/lib/kward/rpc/plugin_chat_manager.rb +30 -10
  122. data/lib/kward/rpc/prompt_bridge.rb +25 -0
  123. data/lib/kward/rpc/server.rb +91 -12
  124. data/lib/kward/rpc/session_manager.rb +147 -44
  125. data/lib/kward/rpc/session_tree_rows.rb +2 -2
  126. data/lib/kward/rpc/tool_metadata.rb +1 -1
  127. data/lib/kward/rpc/transcript_normalizer.rb +7 -3
  128. data/lib/kward/sandbox/command_runner.rb +1 -1
  129. data/lib/kward/{session_catalog.rb → sessions/catalog.rb} +1 -1
  130. data/lib/kward/{session_store.rb → sessions/store.rb} +9 -9
  131. data/lib/kward/{session_tree_nodes.rb → sessions/tree_nodes.rb} +3 -3
  132. data/lib/kward/{session_tree_renderer.rb → sessions/tree_renderer.rb} +4 -4
  133. data/lib/kward/{session_tree_tool_display.rb → sessions/tree_tool_display.rb} +1 -1
  134. data/lib/kward/{ekwsh.rb → shell/kwsh.rb} +38 -19
  135. data/lib/kward/shell/kwshrc.rb +233 -0
  136. data/lib/kward/{persistent_shell_session.rb → shell/persistent_session.rb} +121 -28
  137. data/lib/kward/{shell_prompt.rb → shell/prompt.rb} +2 -0
  138. data/lib/kward/{shell_prompt_session.rb → shell/prompt_session.rb} +1 -1
  139. data/lib/kward/skills/trust_store.rb +1 -1
  140. data/lib/kward/tabs/driver.rb +194 -0
  141. data/lib/kward/{tab_store.rb → tabs/store.rb} +2 -2
  142. data/lib/kward/{ansi.rb → terminal/ansi.rb} +110 -10
  143. data/lib/kward/{clipboard.rb → terminal/clipboard.rb} +1 -1
  144. data/lib/kward/{terminal_image_support.rb → terminal/image_support.rb} +1 -1
  145. data/lib/kward/{terminal_keys.rb → terminal/keys.rb} +12 -0
  146. data/lib/kward/terminal/text.rb +121 -0
  147. data/lib/kward/text_matcher.rb +18 -0
  148. data/lib/kward/tools/base.rb +18 -0
  149. data/lib/kward/tools/context_for_task.rb +15 -6
  150. data/lib/kward/tools/edit_file.rb +9 -6
  151. data/lib/kward/tools/git_commit.rb +13 -7
  152. data/lib/kward/tools/list_directory.rb +4 -4
  153. data/lib/kward/tools/open_editor.rb +41 -0
  154. data/lib/kward/tools/plugin_tool.rb +41 -0
  155. data/lib/kward/tools/prepare_shell_command.rb +1 -1
  156. data/lib/kward/tools/read_file.rb +7 -6
  157. data/lib/kward/tools/registry.rb +109 -17
  158. data/lib/kward/tools/run_shell_command.rb +10 -8
  159. data/lib/kward/tools/search/code.rb +1 -1
  160. data/lib/kward/tools/summarize_file_structure.rb +5 -5
  161. data/lib/kward/tools/tool_call.rb +3 -1
  162. data/lib/kward/tools/typesafe_evaluate.rb +81 -0
  163. data/lib/kward/tools/workspace_targets.rb +58 -0
  164. data/lib/kward/tools/write_file.rb +9 -6
  165. data/lib/kward/{export_path.rb → transcripts/export_path.rb} +1 -1
  166. data/lib/kward/{markdown_transcript.rb → transcripts/markdown_transcript.rb} +2 -2
  167. data/lib/kward/transport/contracts.rb +200 -0
  168. data/lib/kward/transport/gateway.rb +79 -35
  169. data/lib/kward/transport/plugin_chat_gateway.rb +3 -2
  170. data/lib/kward/transport.rb +1 -200
  171. data/lib/kward/version.rb +1 -1
  172. data/lib/kward/{workspace_factory.rb → workspace/factory.rb} +2 -2
  173. data/lib/kward/{project_files.rb → workspace/files.rb} +2 -2
  174. data/lib/kward/{git_worktree_manager.rb → workspace/git_worktree_manager.rb} +28 -0
  175. data/lib/kward/{workspace.rb → workspace/workspace.rb} +3 -3
  176. data/templates/default/kward_navigation.rb +1 -0
  177. data/templates/default/layout/html/footer.erb +10 -0
  178. data/templates/default/layout/html/headers.erb +23 -0
  179. data/templates/default/layout/html/layout.erb +2 -2
  180. data/templates/default/layout/html/setup.rb +41 -2
  181. metadata +94 -47
  182. data/lib/kward/scratchpad_runner.rb +0 -56
  183. data/lib/kward/tab_driver.rb +0 -90
  184. /data/lib/kward/{editor_prompt.rb → cli/editor_prompt.rb} +0 -0
  185. /data/lib/kward/{editor_prompt_session.rb → cli/editor_prompt_session.rb} +0 -0
  186. /data/lib/kward/{diff_view_mode.rb → prompt_interface/editor/diff_view_mode.rb} +0 -0
  187. /data/lib/kward/{editor_mode.rb → prompt_interface/editor/editor_mode.rb} +0 -0
  188. /data/lib/kward/{session_diff.rb → sessions/diff.rb} +0 -0
  189. /data/lib/kward/{session_naming.rb → sessions/naming.rb} +0 -0
  190. /data/lib/kward/{session_trash.rb → sessions/trash.rb} +0 -0
  191. /data/lib/kward/{terminal_sequences.rb → terminal/sequences.rb} +0 -0
  192. /data/lib/kward/{transcript_export.rb → transcripts/transcript_export.rb} +0 -0
  193. /data/lib/kward/{path_guard.rb → workspace/path_guard.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 678c9e9bb188e6c3d065dfde6b97c9ec5c31b29b178b40d69b0397b5200eb2a8
4
- data.tar.gz: 3e09cb3d11ff6018ecc75e3eb31e8745e72e534dba7a4c3711a488451d353fcc
3
+ metadata.gz: 6ab55d26a014211a33f370b7bdf8d42de5d46723471ac26abc7ab893e2c41391
4
+ data.tar.gz: 0a48ff5db83fe90318d252b817e6addcff3108bd51f8afd843785cc64aa13b02
5
5
  SHA512:
6
- metadata.gz: 7f4247a32300deff0906c95c10d7312aa6303108956596f16d9f2c6d2d4fc444b5ef377751f47dbd2157b041710d855c44a981a1a22f8a562c79203afe8b65ed
7
- data.tar.gz: d93d09126d221c05d7ef0e931f46ccfaa4a84450e6eb5695dbea653d8b9de99bb27bc7fb070b323c74160477fd328f0be3cd972d544b45e3ea90ffbeb79cb087
6
+ metadata.gz: bf2be9c210d40d005736f385ea74c34158339e850b7bd1a2945174a85798fccd898cbd8ddeebc707559bc70028551706cc6dbafef6abf96632b74d4e7162aa65
7
+ data.tar.gz: aa45a82d92d3c42af471d633e5d83ee80d5131e51c855be07e050b8fef1e468e1d6be459e2ba1741ab762df2a4a7dac6bbce1e4e4cf43ed32bda8f4611c10aa8
data/CHANGELOG.md CHANGED
@@ -4,6 +4,91 @@ All notable changes to Kward will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.85.0] - 2026-10-05
8
+
9
+ ### Added
10
+
11
+ - Added the opt-in `typesafe_evaluate` tool backed by TypeSafe's Jev structured-decision API for `noul`, `choice`, and `score` evaluations, with bounded input and normal tool permissions.
12
+ - Added `ctx.request_turn(system: text)` for plugin commands to run the active session model with turn-scoped system instructions, normal tools and cancellation, TUI/RPC/transport execution, persisted invocation history, and explicit capability reporting for unsupported contexts.
13
+ - Added GPT-6 Astra to the OpenAI, Codex, and Copilot model choices with its 1,050,000-token context metadata and model-specific reasoning limits.
14
+ - Added GPT-6.1 Sol and GPT-6 Luna to the OpenAI model choices with their 1,050,000-token context metadata and model-specific reasoning limits.
15
+ - Added verified `active` and `origin` targets to core agent workspace tools in linked worktree tabs, plus same-tab merge conflict resolution and continuation commands, allowing the agent to inspect, resolve, test, and complete original-worktree merges without switching tabs or requiring target-specific authorization.
16
+ - Added a versioned plugin-chat contract with declared attachment, steering, and transcript-paging capabilities; scoped chat configuration/storage/secrets/logging; surface and scope context; persistent local scope IDs; RPC capability discovery; and driver validation while preserving legacy plugin tabs.
17
+ - Added composable plugin footer status with stable segment IDs, display ordering, width-aware priority removal, isolated render failures, structured RPC segments and tooltips, and backward-compatible `plugin.footer` contributions.
18
+ - Added identified-plugin start, reload, and shutdown callbacks; plugin- and tab-owned cooperative background tasks; idempotent managed cleanup; bounded shutdown waits; and optional plugin-tab driver cleanup.
19
+ - Added typed plugin commands with JSON Schema validation, shell-style flags and declared positional arguments, structured frontend/RPC results, cancellation context, and legacy raw-string compatibility, plus identified-plugin actions with namespaced RPC discovery and execution.
20
+ - Added structured frontend-neutral plugin UI for questions, selections, confirmations, text input, progress, and notifications, with TUI rendering, RPC capability negotiation and request/answer notifications, transport interaction routing, bounded validation, cancellation, and fail-closed fallbacks.
21
+ - Added stable plugin identity metadata and a shared plugin host with namespaced configuration, private durable storage, secret lookup, logging, API compatibility checks, and sanitized RPC discovery.
22
+ - Added model-callable plugin tools with strict JSON schemas, cancellation context, normal permission and lifecycle-hook enforcement, execution-profile filtering, RPC discovery, and tool-output compaction.
23
+ - Added `/name` to rename the active session and tab together, including while the tab's agent is running.
24
+
25
+ ### Changed
26
+
27
+ - Grouped session, shell, PTY, terminal, workspace, plugin, tab, transcript, editor, and model implementations under domain folders and removed the old internal require paths.
28
+
29
+ ### Fixed
30
+
31
+ - Fixed plugin system-turn instructions being folded into the old conversation's preamble instead of appearing as a new ordered message; Codex uses its supported `developer` input role, while direct OpenAI uses `system`.
32
+ - Fixed plugin system-turn commands such as `/iddqd` crashing in the TUI image renderer; system instructions render as plain text without attachment parsing.
33
+ - Fixed the documentation homepage’s `Get Started` link so it opens the getting-started guide.
34
+ - Fixed the interactive composer leaving the final streamed transcript line too close to its top border.
35
+ - Fixed `/compact` completion output and cancellation so work remains owned by its originating tab instead of rendering into whichever tab is active.
36
+ - Fixed detached `/shell` commands losing output across tab switches by retaining pre-detach output and streaming buffered output when the originating tab is active again.
37
+ - Fixed interactive PTY handoff cleanup so preserved keyboard protocol state is reasserted only after a child reset and remains balanced when Kward exits.
38
+ - Fixed `/rewind` and session-tree navigation detaching active worktree tabs by reloading their conversations against the original workspace instead of the linked worktree.
39
+
40
+ ## [0.84.0] - 2026-08-30
41
+
42
+ ### Added
43
+
44
+ - Added security reporting, contribution and conduct policies, structured issue and pull-request templates, and an explicit macOS/Linux/WSL/Windows support matrix.
45
+ - 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.
46
+ - Added `script/benchmark_composer` for repeatable draft-layout, history-search, and file-completion performance measurements.
47
+ - 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.
48
+ - Added configurable editor runners under `editor.runners`, with Node, TypeScript, Python, Shell, Lua, Julia, Elixir, Crystal, Go, and Swift buffer execution alongside Ruby.
49
+ - 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.
50
+ - Added a live `source`/`.` shell builtin that applies declarative aliases and exports to the running `/shell` session without restarting Kward.
51
+ - 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.
52
+ - Added shell-style `kwshrc` configuration files at `~/.kward/kwshrc` and `~/.kwshrc`, with ordered `alias`, `export`, and declarative `source` support.
53
+ - 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.
54
+ - Extended `/scratchpad` to open all 26 built-in syntax-highlighted languages through canonical names or familiar file-extension shortcuts, with `/scratchpad help` for discovery.
55
+ - Added nested syntax highlighting, auto-indentation, and endwise behavior for recognized language tags inside fenced code blocks in Markdown editor buffers.
56
+
57
+ ### Changed
58
+
59
+ - Smoothed interactive response streaming by pacing buffered provider events and rendering safe text before incomplete inline Markdown instead of delaying whole lines.
60
+ - Replaced the busy Braille spinner with a calmer four-frame activity pulse in the interactive composer.
61
+ - Added brief success, failure, and cancellation transitions to the interactive composer when an agent turn finishes.
62
+ - 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.
63
+ - Added a brief, visual-only response-arrival flourish when the first assistant output reaches the interactive composer.
64
+ - Made the composer activity label follow real turn states such as thinking, reasoning, responding, retrying, and the currently running tool.
65
+ - Added unobtrusive elapsed-time feedback after two seconds, final turn duration in completion transitions, and provider-reported tool durations in result summaries.
66
+ - Added stable `❯` user and `✦` assistant anchors to make transcript turn boundaries easier to scan without changing stored conversation content.
67
+ - Added persistent background-tab status colors for running work, unread output, successful detached commands, questions, and failures without changing tab label widths.
68
+ - Restored green for ready tabs with unread output.
69
+ - Documentation checks now validate the curated public extension entry points without presenting aggregate internal-helper coverage as a product-quality metric.
70
+ - The repository and documentation landing pages now use a focused coding-workflow visual, restrained project badges, and clearer product identity.
71
+ - 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.
72
+ - 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.
73
+ - The composer now highlights `/` command and `@` file discovery, and the startup screen gives actionable guidance when no model provider is connected.
74
+ - 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.
75
+ - 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.
76
+ - Vibe visual selections can now be used as line ranges for `:` commands, including `:s` substitutions and `:run` scratchpad execution.
77
+ - 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.
78
+
79
+ ### Fixed
80
+
81
+ - Restored Codex commentary as visible reasoning output during streaming and session replay instead of showing only the provider's short reasoning-summary headline.
82
+ - Kept expected Git discovery failures, PTY fixtures, and release subprocess output inside their owning tests so successful suite and CI logs remain quiet.
83
+ - Replaced one-shot authentication and runtime backtraces with concise, actionable CLI errors while retaining opt-in debug backtraces through `KWARD_DEBUG=1`.
84
+ - Fixed composer cursor movement, deletion, wrapping, truncation, and border alignment for wide and multi-codepoint Unicode graphemes.
85
+ - 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.
86
+ - 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.
87
+
88
+ ### Removed
89
+
90
+ - Removed legacy `kwsh.yml` shell configuration; shell aliases and exports now use the shell-style `kwshrc` files.
91
+
7
92
  ## [0.83.0] - 2026-08-28
8
93
 
9
94
  ### Added
@@ -14,6 +99,8 @@ All notable changes to Kward will be documented in this file.
14
99
  - 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
100
  - Added Claude Opus 5 to the Anthropic model picker with its 1M context window and high-reasoning metadata.
16
101
  - Added an `i` toggle to the `/files` browser for showing Git-ignored files, which remain hidden by default.
102
+ - Added `f`, `d`, and `r` actions to the `/files` browser for creating files, creating directories, and renaming entries from the composer prompt.
103
+ - Added Backspace deletion to the `/files` browser with confirmation and an additional confirmation before recursively deleting non-empty directories.
17
104
 
18
105
  ### Changed
19
106
 
@@ -73,7 +160,7 @@ All notable changes to Kward will be documented in this file.
73
160
  - Displayed packaged plugins with their folder name in the startup plugin list, such as `folder/plugin.rb`.
74
161
  - Added a frozen composer display for line-oriented Git PTY commands while preserving the full-terminal handoff for full-screen programs.
75
162
  - 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 `ekwsh.yml` available to leading-`!` execution and command completion.
163
+ - Made aliases configured in `kwshrc` available to leading-`!` execution and command completion.
77
164
  - Removed interactive PTY start and exit-status messages while retaining the submitted command echo.
78
165
  - 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
166
  - Removed the `Tab` and `Shift+Tab` reasoning-effort shortcuts so the composer keeps its normal completion behavior.
@@ -328,27 +415,27 @@ All notable changes to Kward will be documented in this file.
328
415
  - Added `/queue open <id>` to open a queued worker's session for review or follow-up.
329
416
  - Added `/diff` to open the chronological file changes recorded in the current session in the integrated diff viewer.
330
417
  - 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 `ekwsh` `pty <command>` built-in for explicit interactive PTY passthrough sessions, enabling terminal-owned tools such as pagers to run from Kward.
332
- - Added minimal PTY execution for external `ekwsh` commands so terminal-aware tools can detect a TTY and terminal width.
333
- - Added Ctrl+C cancellation for running `ekwsh` commands and preserved tab-switch actions while shell commands are active.
334
- - Added quoted path completion and cached `$PATH` executable completion for `ekwsh`.
335
- - Added streaming `ekwsh` command output in the TUI transcript while commands run.
336
- - Added separate workspace-scoped `ekwsh` command history so embedded shell input no longer shares normal prompt history.
418
+ - 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.
419
+ - Added minimal PTY execution for external `kwsh` commands so terminal-aware tools can detect a TTY and terminal width.
420
+ - Added Ctrl+C cancellation for running `kwsh` commands and preserved tab-switch actions while shell commands are active.
421
+ - Added quoted path completion and cached `$PATH` executable completion for `kwsh`.
422
+ - Added streaming `kwsh` command output in the TUI transcript while commands run.
423
+ - Added separate workspace-scoped `kwsh` command history so embedded shell input no longer shares normal prompt history.
337
424
  - Added structured RPC `runtime/updateSetting` `defaultModel` values so clients can send provider and model separately while keeping the existing string format.
338
425
 
339
426
  ### Changed
340
427
 
341
- - Changed PTY-backed `ekwsh` commands to refresh terminal window size while running so long-lived commands can adapt to resizes.
342
- - Changed `ekwsh` to default `GIT_PAGER` to `cat`, while preserving user-provided values, so Git commands do not unexpectedly enter an interactive pager under PTY execution.
343
- - Improved `ekwsh` POSIX-oriented built-ins, including `exit [status]`, stricter `cd`/`pwd`, `export NAME`, assignment persistence, `unalias`, and shared alias-name validation.
344
- - Changed `ekwsh` configuration to prefer a POSIX `/bin/sh` default shell and validate runtime settings for command timeout, output cap, and shell history size.
428
+ - Changed PTY-backed `kwsh` commands to refresh terminal window size while running so long-lived commands can adapt to resizes.
429
+ - 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.
430
+ - Improved `kwsh` POSIX-oriented built-ins, including `exit [status]`, stricter `cd`/`pwd`, `export NAME`, assignment persistence, `unalias`, and shared alias-name validation.
431
+ - 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
432
 
346
433
  ### Fixed
347
434
 
348
- - Normalized ordinary PTY line endings in `ekwsh` command output so transcripts avoid stray carriage returns.
349
- - Added `ekwsh` timeout and output-limit enforcement for external commands using the shared local command runner.
435
+ - Normalized ordinary PTY line endings in `kwsh` command output so transcripts avoid stray carriage returns.
436
+ - Added `kwsh` timeout and output-limit enforcement for external commands using the shared local command runner.
350
437
  - Consolidated workspace shell command execution on a shared local command runner with timeout, cancellation, bounded capture, and optional streaming support.
351
- - Fixed `ekwsh` shell output sanitization so unsafe terminal controls are stripped before command output is shown while SGR color is preserved.
438
+ - Fixed `kwsh` shell output sanitization so unsafe terminal controls are stripped before command output is shown while SGR color is preserved.
352
439
  - Split Vibe editor insert/readline key handling into a focused mixin without changing editor behavior.
353
440
  - Consolidated compaction message-field reads through the shared message access helper.
354
441
  - Consolidated RPC transcript tool metadata normalization with tool event metadata so tool names, args, diffs, and changed files stay aligned.
@@ -370,7 +457,7 @@ All notable changes to Kward will be documented in this file.
370
457
 
371
458
  - 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
459
  - 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 (`ekwsh`) for running workspace commands without leaving the TUI, including command/path completion, safe color output, optional global `ekwsh.yml` configuration, and rbenv shim autodetection.
460
+ - 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
461
  - Added `/files`, a searchable project file browser that can open files in the editor and remembers cursor and folder expansion state per workspace.
375
462
  - Added persistent TUI tabs for session-backed conversations, plus tab commands, shortcuts, status colors, and restoration across restarts.
376
463
  - 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.83.0)
4
+ kward (0.85.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.83.0)
153
+ kward (0.85.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_screen_1.png" width="1000" alt="Kward terminal interface screenshot">
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 on a trusted local network.
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.
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/agent-tools.md CHANGED
@@ -19,6 +19,8 @@ Tools also enforce important boundaries:
19
19
  | Web tools | `web_search`, `fetch_content`, `fetch_raw` | [Web search](web-search.md) |
20
20
  | Code search | `code_search` | [Code search](code-search.md) |
21
21
  | Context and interaction tools | `read_skill`, `retrieve_tool_output`, `ask_user_question` | [Context tools](context-tools.md) |
22
+ | Decision tools | `typesafe_evaluate` when `TYPESAFE_API_KEY` is configured | [TypeSafe](#TypeSafe_evaluation) |
23
+ | Plugin tools | Trusted local integrations registered by installed plugins | [Plugins](plugins.md#Add_a_model_callable_tool) |
22
24
 
23
25
  ## How tools save tokens
24
26
 
@@ -42,7 +44,17 @@ See [Context budgeting](context-budgeting.md) for the full compaction strategy,
42
44
 
43
45
  - web tools can be hidden with web search configuration,
44
46
  - `read_skill` is advertised only when skills are available,
45
- - `ask_user_question` is advertised only when the frontend can display structured questions.
47
+ - `ask_user_question` is advertised only when the frontend can display structured questions,
48
+ - `typesafe_evaluate` is advertised only in normal turns when `TYPESAFE_API_KEY` is configured,
49
+ - plugin tools are advertised in normal agent turns and remain subject to execution profiles and permission policy.
50
+
51
+ ### TypeSafe evaluation
52
+
53
+ Set `TYPESAFE_API_KEY` to enable the opt-in `typesafe_evaluate` tool. It sends explicitly supplied state and typed questions to TypeSafe's `jev-latest` model and returns structured answers, probabilities, confidence, and usage. It is intended for classification, scoring, routing, and verification; it is not a chat model and does not generate assistant text.
54
+
55
+ The tool supports TypeSafe's `noul`, `choice`, and `score` question types. State is bounded to 100,000 bytes and question count to 100. Treat state as third-party data: do not include secrets or personal information unless sending it to TypeSafe is intentional. Requests remain subject to Kward's normal tool permissions and hooks.
56
+
57
+ See the [TypeSafe API reference](https://docs.typesafe.ai/api) for question and answer details.
46
58
 
47
59
  When `write_file` or `edit_file` changes an `AGENTS.md` file in the workspace root, Kward automatically rebuilds the system message so the model picks up the new instructions without a restart.
48
60
 
data/doc/api.md CHANGED
@@ -15,7 +15,12 @@ If you use Kward from the terminal, start with the [user guides](file.README.htm
15
15
 
16
16
  ### Plugin authors
17
17
 
18
- Use plugins when you need trusted local Ruby code for slash commands, prompt context, footer UI, transcript events, or RPC-visible commands.
18
+ Use plugins when you need trusted local Ruby code for typed commands and actions, model-callable tools, prompt context, footer UI, transcript events, plugin-owned chats, or external transports.
19
+
20
+ Session commands can stage a host-owned model response with
21
+ `ctx.request_turn(system: text)`; check `ctx.turn_requests_supported?` before
22
+ offering this on an unknown frontend. Instructions are scoped to that turn,
23
+ while normal tools, hooks, cancellation, and session history remain host-owned.
19
24
 
20
25
  Read first:
21
26
 
@@ -28,6 +33,16 @@ Generated entry points:
28
33
  - [`Kward::PluginRegistry`](Kward/PluginRegistry.html)
29
34
  - [`Kward::PluginRegistry::DSL`](Kward/PluginRegistry/DSL.html)
30
35
  - [`Kward::PluginRegistry::Context`](Kward/PluginRegistry/Context.html)
36
+ - [`Kward::PluginCommand`](Kward/PluginCommand.html)
37
+ - [`Kward::PluginAction`](Kward/PluginAction.html)
38
+ - [`Kward::PluginResult`](Kward/PluginResult.html)
39
+ - [`Kward::PluginHost`](Kward/PluginHost.html)
40
+ - [`Kward::PluginStore`](Kward/PluginStore.html)
41
+ - [`Kward::PluginScopedStore`](Kward/PluginScopedStore.html)
42
+ - [`Kward::PluginChatCapabilities`](Kward/PluginChatCapabilities.html)
43
+ - [`Kward::PluginTask`](Kward/PluginTask.html)
44
+ - [`Kward::PluginDisposable`](Kward/PluginDisposable.html)
45
+ - [`Kward::PluginTabHost`](Kward/PluginTabHost.html)
31
46
 
32
47
  ### Tool authors and contributors
33
48
 
@@ -45,7 +60,7 @@ Generated entry points:
45
60
  - [`Kward::Tools::Base`](Kward/Tools/Base.html)
46
61
  - [`Kward::ToolRegistry`](Kward/ToolRegistry.html)
47
62
 
48
- These pages document the schema and dispatch contract used by built-in tools. Kward does not yet provide a plugin DSL for registering arbitrary model-callable tools; contributors add them through the built-in registry and keep schemas, validation, docs, and tests aligned.
63
+ These pages document the schema and dispatch contract used by built-in tools. Plugin authors can register model-callable tools through `PluginRegistry::DSL#tool`; those tools use the same permission, lifecycle-hook, execution-profile, and output-compaction path.
49
64
 
50
65
  ### RPC and frontend authors
51
66
 
@@ -82,6 +97,10 @@ Generated entry points:
82
97
 
83
98
  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
99
 
100
+ ## Documentation checks
101
+
102
+ `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.
103
+
85
104
  ## Public API expectations
86
105
 
87
106
  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 |
@@ -197,7 +197,7 @@ The composer area can include:
197
197
  - approximate context-window usage,
198
198
  - provider, model, and reasoning effort,
199
199
  - a tab bar plus queued or steered input counts,
200
- - an optional plugin footer.
200
+ - composable status contributions from installed plugins.
201
201
 
202
202
  Context usage is an estimate, not provider billing. Use `/status` for more session and compaction detail.
203
203