kward 0.84.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 (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +2 -2
  5. data/doc/agent-tools.md +13 -1
  6. data/doc/api.md +17 -2
  7. data/doc/composer.md +1 -1
  8. data/doc/configuration.md +27 -4
  9. data/doc/extensibility.md +2 -1
  10. data/doc/git.md +3 -1
  11. data/doc/pan.md +6 -0
  12. data/doc/permissions.md +4 -4
  13. data/doc/plugins.md +464 -15
  14. data/doc/rpc.md +154 -16
  15. data/doc/sandboxing.md +11 -5
  16. data/doc/security.md +7 -1
  17. data/doc/session-management.md +5 -4
  18. data/doc/tabs.md +6 -2
  19. data/doc/transports.md +15 -0
  20. data/doc/usage.md +4 -1
  21. data/doc/workspace-tools.md +9 -0
  22. data/examples/plugins/space_invaders.rb +1 -1
  23. data/examples/plugins/stardate_footer.rb +2 -2
  24. data/examples/plugins/telegram/plugin.rb +1 -1
  25. data/lib/kward/agent.rb +24 -11
  26. data/lib/kward/cli/compaction.rb +9 -3
  27. data/lib/kward/cli/plugins.rb +81 -12
  28. data/lib/kward/cli/prompt_interface.rb +25 -5
  29. data/lib/kward/cli/rendering.rb +3 -0
  30. data/lib/kward/cli/runtime_helpers.rb +121 -27
  31. data/lib/kward/cli/sessions.rb +9 -5
  32. data/lib/kward/cli/settings/menus.rb +745 -0
  33. data/lib/kward/cli/settings/model.rb +327 -0
  34. data/lib/kward/cli/settings.rb +6 -1055
  35. data/lib/kward/cli/slash_commands.rb +45 -4
  36. data/lib/kward/cli/tabs.rb +167 -27
  37. data/lib/kward/{cli_transcript_formatter.rb → cli/transcript_formatter.rb} +3 -3
  38. data/lib/kward/cli/worktrees.rb +65 -2
  39. data/lib/kward/cli.rb +26 -24
  40. data/lib/kward/compactor.rb +18 -7
  41. data/lib/kward/config/core.rb +389 -0
  42. data/lib/kward/config/extensions.rb +96 -0
  43. data/lib/kward/config/prompts.rb +313 -0
  44. data/lib/kward/config/settings.rb +250 -0
  45. data/lib/kward/config_files.rb +14 -1008
  46. data/lib/kward/conversation.rb +31 -2
  47. data/lib/kward/image_attachments.rb +1 -1
  48. data/lib/kward/model/client.rb +2 -2
  49. data/lib/kward/model/copilot_models.rb +2 -2
  50. data/lib/kward/model/model_info.rb +20 -3
  51. data/lib/kward/{openrouter_model_cache.rb → model/openrouter_model_cache.rb} +3 -3
  52. data/lib/kward/model/payloads.rb +12 -3
  53. data/lib/kward/model/typesafe_client.rb +78 -0
  54. data/lib/kward/pan/server.rb +10 -7
  55. data/lib/kward/permissions/policy.rb +6 -2
  56. data/lib/kward/plugin_registry.rb +2 -659
  57. data/lib/kward/plugins/actions.rb +453 -0
  58. data/lib/kward/plugins/chat_contract.rb +121 -0
  59. data/lib/kward/{plugin_chat_runtime.rb → plugins/chat_runtime.rb} +62 -18
  60. data/lib/kward/plugins/host.rb +232 -0
  61. data/lib/kward/plugins/registry.rb +1190 -0
  62. data/lib/kward/plugins/resources.rb +206 -0
  63. data/lib/kward/plugins/turn_request.rb +36 -0
  64. data/lib/kward/plugins/ui.rb +219 -0
  65. data/lib/kward/prompt_interface/composer_renderer.rb +1 -1
  66. data/lib/kward/prompt_interface/composer_state.rb +1 -1
  67. data/lib/kward/prompt_interface/editor/controller.rb +1 -1
  68. data/lib/kward/prompt_interface/editor/runner.rb +1 -1
  69. data/lib/kward/prompt_interface/editor/state.rb +1 -1
  70. data/lib/kward/prompt_interface/layout.rb +1 -1
  71. data/lib/kward/prompt_interface/overlay_renderer.rb +1 -1
  72. data/lib/kward/prompt_interface/plugin_ui_requests.rb +82 -0
  73. data/lib/kward/prompt_interface/runtime_state.rb +6 -1
  74. data/lib/kward/prompt_interface/screen.rb +9 -2
  75. data/lib/kward/prompt_interface.rb +60 -11
  76. data/lib/kward/prompts/commands.rb +2 -1
  77. data/lib/kward/{adaptive_pty_output_sink.rb → pty/adaptive_output_sink.rb} +1 -1
  78. data/lib/kward/{interactive_pty_runner.rb → pty/interactive_runner.rb} +2 -2
  79. data/lib/kward/{local_command_runner.rb → pty/local_command_runner.rb} +1 -1
  80. data/lib/kward/{local_pty_command_runner.rb → pty/local_pty_runner.rb} +3 -9
  81. data/lib/kward/{pty_output_sink.rb → pty/output_sink.rb} +9 -4
  82. data/lib/kward/{pty_transcript_normalizer.rb → pty/transcript_normalizer.rb} +1 -1
  83. data/lib/kward/rpc/plugin_chat_manager.rb +30 -10
  84. data/lib/kward/rpc/prompt_bridge.rb +25 -0
  85. data/lib/kward/rpc/server.rb +91 -12
  86. data/lib/kward/rpc/session_manager.rb +147 -44
  87. data/lib/kward/rpc/session_tree_rows.rb +2 -2
  88. data/lib/kward/rpc/tool_metadata.rb +1 -1
  89. data/lib/kward/sandbox/command_runner.rb +1 -1
  90. data/lib/kward/{session_catalog.rb → sessions/catalog.rb} +1 -1
  91. data/lib/kward/{session_store.rb → sessions/store.rb} +9 -9
  92. data/lib/kward/{session_tree_nodes.rb → sessions/tree_nodes.rb} +3 -3
  93. data/lib/kward/{session_tree_renderer.rb → sessions/tree_renderer.rb} +4 -4
  94. data/lib/kward/{session_tree_tool_display.rb → sessions/tree_tool_display.rb} +1 -1
  95. data/lib/kward/{kwsh.rb → shell/kwsh.rb} +3 -3
  96. data/lib/kward/{persistent_shell_session.rb → shell/persistent_session.rb} +3 -3
  97. data/lib/kward/{shell_prompt_session.rb → shell/prompt_session.rb} +1 -1
  98. data/lib/kward/skills/trust_store.rb +1 -1
  99. data/lib/kward/tabs/driver.rb +194 -0
  100. data/lib/kward/{tab_store.rb → tabs/store.rb} +2 -2
  101. data/lib/kward/{clipboard.rb → terminal/clipboard.rb} +1 -1
  102. data/lib/kward/{terminal_image_support.rb → terminal/image_support.rb} +1 -1
  103. data/lib/kward/tools/base.rb +18 -0
  104. data/lib/kward/tools/context_for_task.rb +15 -6
  105. data/lib/kward/tools/edit_file.rb +9 -6
  106. data/lib/kward/tools/git_commit.rb +13 -7
  107. data/lib/kward/tools/list_directory.rb +4 -4
  108. data/lib/kward/tools/plugin_tool.rb +41 -0
  109. data/lib/kward/tools/prepare_shell_command.rb +1 -1
  110. data/lib/kward/tools/read_file.rb +7 -6
  111. data/lib/kward/tools/registry.rb +96 -13
  112. data/lib/kward/tools/run_shell_command.rb +10 -8
  113. data/lib/kward/tools/search/code.rb +1 -1
  114. data/lib/kward/tools/summarize_file_structure.rb +5 -5
  115. data/lib/kward/tools/tool_call.rb +2 -1
  116. data/lib/kward/tools/typesafe_evaluate.rb +81 -0
  117. data/lib/kward/tools/workspace_targets.rb +58 -0
  118. data/lib/kward/tools/write_file.rb +9 -6
  119. data/lib/kward/{export_path.rb → transcripts/export_path.rb} +1 -1
  120. data/lib/kward/{markdown_transcript.rb → transcripts/markdown_transcript.rb} +2 -2
  121. data/lib/kward/transport/contracts.rb +200 -0
  122. data/lib/kward/transport/gateway.rb +79 -35
  123. data/lib/kward/transport/plugin_chat_gateway.rb +3 -2
  124. data/lib/kward/transport.rb +1 -200
  125. data/lib/kward/version.rb +1 -1
  126. data/lib/kward/{workspace_factory.rb → workspace/factory.rb} +2 -2
  127. data/lib/kward/{git_worktree_manager.rb → workspace/git_worktree_manager.rb} +28 -0
  128. data/lib/kward/{workspace.rb → workspace/workspace.rb} +3 -3
  129. data/templates/default/fulldoc/html/css/kward.css +125 -0
  130. data/templates/default/fulldoc/html/images/kward_screen_1.png +0 -0
  131. data/templates/default/fulldoc/html/setup.rb +1 -1
  132. data/templates/default/layout/html/layout.erb +16 -4
  133. metadata +67 -48
  134. data/lib/kward/tab_driver.rb +0 -90
  135. data/templates/default/fulldoc/html/images/kward_workflow.svg +0 -52
  136. /data/lib/kward/{editor_prompt.rb → cli/editor_prompt.rb} +0 -0
  137. /data/lib/kward/{editor_prompt_session.rb → cli/editor_prompt_session.rb} +0 -0
  138. /data/lib/kward/{diff_view_mode.rb → prompt_interface/editor/diff_view_mode.rb} +0 -0
  139. /data/lib/kward/{editor_mode.rb → prompt_interface/editor/editor_mode.rb} +0 -0
  140. /data/lib/kward/{markdown_code_block.rb → prompt_interface/editor/markdown_code_block.rb} +0 -0
  141. /data/lib/kward/{scratchpad_languages.rb → prompt_interface/editor/scratchpad_languages.rb} +0 -0
  142. /data/lib/kward/{scratchpad_runner.rb → prompt_interface/editor/scratchpad_runner.rb} +0 -0
  143. /data/lib/kward/{detached_run.rb → pty/detached_run.rb} +0 -0
  144. /data/lib/kward/{session_diff.rb → sessions/diff.rb} +0 -0
  145. /data/lib/kward/{session_naming.rb → sessions/naming.rb} +0 -0
  146. /data/lib/kward/{session_trash.rb → sessions/trash.rb} +0 -0
  147. /data/lib/kward/{kwshrc.rb → shell/kwshrc.rb} +0 -0
  148. /data/lib/kward/{shell_prompt.rb → shell/prompt.rb} +0 -0
  149. /data/lib/kward/{ansi.rb → terminal/ansi.rb} +0 -0
  150. /data/lib/kward/{terminal_keys.rb → terminal/keys.rb} +0 -0
  151. /data/lib/kward/{terminal_sequences.rb → terminal/sequences.rb} +0 -0
  152. /data/lib/kward/{terminal_text.rb → terminal/text.rb} +0 -0
  153. /data/lib/kward/{transcript_export.rb → transcripts/transcript_export.rb} +0 -0
  154. /data/lib/kward/{project_files.rb → workspace/files.rb} +0 -0
  155. /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: 10d9376091daae14fa22ee39099645cb78bbdb8ff8de89a5982ffe2929396d67
4
- data.tar.gz: 633ec7446e83664c18fcac2a12fcdf686dcc81cf21fc33cf73026186b4765540
3
+ metadata.gz: 6ab55d26a014211a33f370b7bdf8d42de5d46723471ac26abc7ab893e2c41391
4
+ data.tar.gz: 0a48ff5db83fe90318d252b817e6addcff3108bd51f8afd843785cc64aa13b02
5
5
  SHA512:
6
- metadata.gz: '01750111663180d8f89afe2e2bfc7e14ada0c5942621d0ac5cc74eddda07db81d164ea6b3c55fbb6d3082b9e76834cb74094807bba67ac1419f06c68453e595c'
7
- data.tar.gz: f4e8e96278bd737a4912461325381e63477d52a4a1710ea53b0c08ce7aeb2caba88a2662f1a8a8d24b8d7e339d745f1ece1816626c4f7e142aeac9e0cdd0cc15
6
+ metadata.gz: bf2be9c210d40d005736f385ea74c34158339e850b7bd1a2945174a85798fccd898cbd8ddeebc707559bc70028551706cc6dbafef6abf96632b74d4e7162aa65
7
+ data.tar.gz: aa45a82d92d3c42af471d633e5d83ee80d5131e51c855be07e050b8fef1e468e1d6be459e2ba1741ab762df2a4a7dac6bbce1e4e4cf43ed32bda8f4611c10aa8
data/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ 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
+
7
40
  ## [0.84.0] - 2026-08-30
8
41
 
9
42
  ### Added
@@ -32,6 +65,7 @@ All notable changes to Kward will be documented in this file.
32
65
  - Added unobtrusive elapsed-time feedback after two seconds, final turn duration in completion transitions, and provider-reported tool durations in result summaries.
33
66
  - Added stable `❯` user and `✦` assistant anchors to make transcript turn boundaries easier to scan without changing stored conversation content.
34
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.
35
69
  - Documentation checks now validate the curated public extension entry points without presenting aggregate internal-helper coverage as a product-quality metric.
36
70
  - The repository and documentation landing pages now use a focused coding-workflow visual, restrained project badges, and clearer product identity.
37
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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kward (0.84.0)
4
+ kward (0.85.0)
5
5
  base64
6
6
  nokogiri
7
7
  tiktoken_ruby
@@ -150,7 +150,7 @@ CHECKSUMS
150
150
  html-proofer (5.2.1) sha256=fdd958a7cbf9c3255fb96fe7cfc4e611f64e2706e469488a3326309ad007d2fd
151
151
  io-event (1.16.2) sha256=9f9cb0a96ea5c3850a672606c65f27bc96d7621399ef6196acbfe2be0cd1279c
152
152
  json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
153
- kward (0.84.0)
153
+ kward (0.85.0)
154
154
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
155
155
  metrics (0.15.0) sha256=61ded5bac95118e995b1bc9ed4a5f19bc9814928a312a85b200abbdac9039072
156
156
  minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
data/README.md CHANGED
@@ -25,7 +25,7 @@ Kward treats that work as an ongoing workspace rather than a disposable conversa
25
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.
26
26
 
27
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">
28
+ <img src="templates/default/fulldoc/html/images/kward_screen_1.png" width="1000" alt="Kward terminal interface screenshot">
29
29
  </p>
30
30
 
31
31
  ## Install
@@ -127,7 +127,7 @@ Generated Ruby API:
127
127
 
128
128
  ## Development
129
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).
130
+ Read [Contributing to Kward](https://github.com/kaiwood/kward/blob/main/CONTRIBUTING.md) before preparing a pull request.
131
131
 
132
132
  Run tests:
133
133
 
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
 
data/doc/composer.md CHANGED
@@ -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
 
data/doc/configuration.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Kward reads user configuration from `~/.kward/config.json` by default. Most users should start with `/settings`, `/login`, `/model`, or `/reasoning` inside Kward. Edit JSON directly when you need an advanced setting, an integration, or a reproducible configuration.
4
4
 
5
- On first start, Kward creates the file when it does not exist. The starter config records defaults for personas, memory, the composer, editor, overlays, web search, update checks, sessions, skills, MCP, and workspace guardrails. Provider-specific model defaults are added only when you choose a provider or model.
5
+ On first start, Kward creates the file when it does not exist. The starter config records defaults for personas, memory, the composer, editor, overlays, web search, update checks, sessions, skills, MCP, plugins, and workspace guardrails. Provider-specific model defaults are added only when you choose a provider or model.
6
6
 
7
7
  If `KWARD_CONFIG_PATH` is set, Kward uses that file and treats its directory as the config directory for prompts, skills, memory, logs, and caches.
8
8
 
@@ -50,6 +50,27 @@ Add trusted local Model Context Protocol servers under `mcpServers`:
50
50
 
51
51
  See [MCP servers](mcp.md) for setup, supported fields, and security notes.
52
52
 
53
+ ### Plugin configuration
54
+
55
+ Identified plugins read immutable configuration from the `plugins` object under
56
+ their stable ID:
57
+
58
+ ```json
59
+ {
60
+ "plugins": {
61
+ "com.example.issues": {
62
+ "endpoint": "https://issues.example.com"
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ Plugin-managed state is stored privately under `plugin_state/<plugin-id>` in the
69
+ active config directory. Credentials can come from private plugin config or the
70
+ plugin's documented environment variables; do not commit them to shared config
71
+ files. See [Plugins](plugins.md#Plugin_identity_and_host_services) for the host
72
+ API, secret lookup order, and storage example.
73
+
53
74
  ### Transport plugins
54
75
 
55
76
  Transport plugin settings live under `transports` and are scoped by the
@@ -275,6 +296,8 @@ Defaults:
275
296
  - Copilot: `gpt-5-mini`
276
297
  - Reasoning effort: `medium`
277
298
 
299
+ The OpenAI/Codex and Copilot model choices include `gpt-6-astra`. GPT-6 Astra has a 1,050,000-token context window and supports `low`, `medium`, `high`, `xhigh`, and `max` reasoning effort; it does not support `none`.
300
+
278
301
  The Anthropic model choices include `claude-fable-5`, `claude-opus-5`, and `claude-sonnet-5`. Fable and Opus availability depends on the logged-in account and organization. Selecting a model without access returns an Anthropic provider error. Kward keeps Sonnet 5 as its default because it supports both Pro and Max subscriptions; select Opus 5 explicitly when it is available on the account.
279
302
 
280
303
  The interactive `/model` picker reads cached OpenRouter models when available. Run `kward openrouter refresh` to fetch text-capable models available to the configured OpenRouter API key and cache them under `~/.kward/cache/openrouter_models.json`. Run `kward openrouter list` to inspect the cached model ids.
@@ -728,9 +751,9 @@ Available modes are:
728
751
 
729
752
  | Mode | Behavior |
730
753
  | --- | --- |
731
- | `ask` | Read-only tools run normally; file changes, shell commands, web tools, and MCP tools need approval. |
732
- | `workspace-write` | File changes within `write_scopes` run without approval; shell and network tools still need approval. |
733
- | `read-only` | Denies file changes, shell commands, web tools, and MCP tools. |
754
+ | `ask` | Read-only tools run normally; file changes, shell commands, web tools, MCP tools, and plugin tools need approval. |
755
+ | `workspace-write` | File changes within `write_scopes` run without approval; shell, network, MCP, and plugin tools still need approval. |
756
+ | `read-only` | Denies file changes, shell commands, web tools, MCP tools, and plugin tools. |
734
757
  | `deny-by-default` | Denies risky tools unless an `allow` rule matches. |
735
758
 
736
759
  `allow`, `ask`, and `deny` rules are arrays of objects matching `tool`, `path`, `host`, `command`, or `source`. Deny rules always take precedence, then ask, then allow. Use `write_scopes` to restrict writes in `workspace-write` mode:
data/doc/extensibility.md CHANGED
@@ -14,6 +14,7 @@ Start simple. Most users only need `PRINCIPLES.md`, workspace `AGENTS.md`, and m
14
14
  | Task-specific reusable instructions | skills |
15
15
  | Different tone or role | [personas](personas.md) |
16
16
  | Local Ruby behavior or integrations | plugins |
17
+ | Slash commands that run a turn with system-level instructions | [plugin model-turn requests](plugins.md) |
17
18
  | External messaging or event integration | transport plugins |
18
19
  | Deterministic runtime policy or automation | lifecycle hooks |
19
20
 
@@ -89,7 +90,7 @@ Hooks are deterministic automation and policy. They are not model instructions.
89
90
 
90
91
  Use plugins when text instructions are not enough and you need Ruby code to run locally.
91
92
 
92
- Plugins can add slash commands, prompt context, footer UI, transcript observers, RPC-visible commands, and external transports. Transport plugins can connect external conversations to normal Kward sessions or explicitly transport-capable plugin chats; they remain distinct from plugin-owned tabs.
93
+ Plugins can add legacy or schema-typed slash commands, namespaced typed RPC actions, model-callable tools, structured frontend-neutral UI, prompt context, footer UI, transcript observers, plugin-owned tabs, and external transports. Identified plugins also receive namespaced configuration, private durable storage, secret lookup, logging, lifecycle callbacks, cooperative background tasks, and managed cleanup through a shared host. Transport plugins can connect external conversations to normal Kward sessions or explicitly transport-capable plugin chats; they remain distinct from plugin-owned tabs.
93
94
 
94
95
  Use `kward transport list` and `kward transport status` to inspect registered transports. Run a foreground transport with `kward transport run NAME`.
95
96
 
data/doc/git.md CHANGED
@@ -111,7 +111,9 @@ If the working tree is clean when you run `/git`, the overlay shows `No uncommit
111
111
 
112
112
  When an active worktree tab receives an explicit request to commit, the agent can use the model-facing `git_commit` tool. It runs Git in the trusted host process so linked-worktree metadata can be updated without granting arbitrary shell commands write access to shared `.git` metadata.
113
113
 
114
- The tool requires a commit message and can receive an optional list of workspace-relative paths. If paths are omitted, all current changes in the active worktree are included. Generic `run_shell_command` Git commands remain sandboxed and cannot replace this operation. It is exposed only for active interactive worktree tabs; RPC sessions do not currently support worktree bindings.
114
+ The tool requires a commit message and can receive an optional list of paths relative to its selected worktree. It uses the active linked worktree by default. In an active worktree tab, `target: "origin"` selects the verified original repository worktree, allowing the same agent to finish a conflicted merge or commit explicitly requested origin changes without switching tabs. If paths are omitted, all current changes in the selected worktree are included.
115
+
116
+ Selecting `origin` does not add a separate approval prompt; the normal configured tool-permission policy applies exactly as it does for `active`. Generic `run_shell_command` Git commands remain sandboxed and cannot replace `git_commit`. The tool is exposed only for active interactive worktree tabs; RPC sessions do not currently support worktree bindings.
115
117
 
116
118
  ## Notes and limitations
117
119
 
data/doc/pan.md CHANGED
@@ -87,6 +87,12 @@ Press Return to send. Use Shift+Return for a new line. The composer grows with m
87
87
 
88
88
  Prompts are accepted while another turn is running. Pan puts them into a single queue and executes them sequentially. The status below the composer shows whether Kward is working and how many prompts remain queued.
89
89
 
90
+ Plugin slash commands that request model turns (such as `/iddqd`) are not
91
+ supported in Pan: its composer submits ordinary prompts, not plugin commands.
92
+ Use the interactive TUI or RPC `turns/start` for these commands. The `/transcript`
93
+ response reports `capabilities.pluginCommandTurns.supported: false` so browser
94
+ clients can make this limitation explicit.
95
+
90
96
  ## Work with sessions
91
97
 
92
98
  Pan saves conversations through the same workspace-scoped session store as the interactive CLI. The session sidebar shows up to 50 recent sessions with their title, modified time, and message count.
data/doc/permissions.md CHANGED
@@ -22,7 +22,7 @@ In `ask` mode, Kward allows ordinary read-only tools and asks before the agent:
22
22
  - writes or edits a workspace file,
23
23
  - runs `run_shell_command`,
24
24
  - searches or fetches content on the web,
25
- - calls an MCP tool.
25
+ - calls an MCP or model-callable plugin tool.
26
26
 
27
27
  When Kward needs approval in the interactive CLI, it shows the complete tool arguments in an overlay. For example, a write request includes the file path and content.
28
28
 
@@ -75,8 +75,8 @@ Set `permissions.mode` to one of these values:
75
75
 
76
76
  | Mode | Good for | Default behavior |
77
77
  | --- | --- | --- |
78
- | `ask` | Interactive supervised work | Asks before file changes, shell commands, web tools, and MCP tools. |
79
- | `workspace-write` | Routine edits in selected paths | Allows file changes in `write_scopes`; still asks before shell, web, and MCP tools. |
78
+ | `ask` | Interactive supervised work | Asks before file changes, shell commands, web tools, MCP tools, and plugin tools. |
79
+ | `workspace-write` | Routine edits in selected paths | Allows file changes in `write_scopes`; still asks before shell, web, MCP, and plugin tools. |
80
80
  | `read-only` | Code review and investigation | Denies risky tools by default. |
81
81
  | `deny-by-default` | Automation or tightly controlled runs | Denies risky tools unless an `allow` rule matches. |
82
82
 
@@ -110,7 +110,7 @@ Use `allow`, `ask`, and `deny` arrays to describe exceptions. A rule can match t
110
110
  - `path` — the file-tool path supplied by the model;
111
111
  - `command` — the requested shell command text;
112
112
  - `host` — the host in a `fetch_content` or `fetch_raw` URL;
113
- - `source` — currently useful for `mcp` tools.
113
+ - `source` — currently useful for `mcp` and `plugin` tools.
114
114
 
115
115
  Patterns support `*` within a path segment and `**` across directories. Rule matching is case-sensitive.
116
116