kward 0.74.0 → 0.76.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +4 -2
  5. data/Rakefile +18 -0
  6. data/doc/configuration.md +75 -10
  7. data/doc/extensibility.md +6 -19
  8. data/doc/getting-started.md +1 -1
  9. data/doc/lifecycle-hooks.md +424 -0
  10. data/doc/memory.md +1 -1
  11. data/doc/personas.md +2 -2
  12. data/doc/plugins.md +2 -1
  13. data/doc/releasing.md +7 -15
  14. data/doc/rpc.md +111 -16
  15. data/doc/session-management.md +9 -9
  16. data/doc/skills.md +199 -0
  17. data/doc/usage.md +7 -7
  18. data/lib/kward/agent.rb +77 -22
  19. data/lib/kward/auth/anthropic_oauth.rb +5 -87
  20. data/lib/kward/auth/oauth_helpers.rb +105 -0
  21. data/lib/kward/auth/openai_oauth.rb +4 -86
  22. data/lib/kward/cli/commands.rb +9 -2
  23. data/lib/kward/cli/compaction.rb +7 -0
  24. data/lib/kward/cli/git.rb +30 -3
  25. data/lib/kward/cli/hook_commands.rb +258 -0
  26. data/lib/kward/cli/interactive_turn.rb +3 -0
  27. data/lib/kward/cli/memory_commands.rb +1 -5
  28. data/lib/kward/cli/plugins.rb +41 -1
  29. data/lib/kward/cli/prompt_interface.rb +28 -7
  30. data/lib/kward/cli/rendering.rb +8 -4
  31. data/lib/kward/cli/runtime_helpers.rb +44 -5
  32. data/lib/kward/cli/sessions.rb +13 -0
  33. data/lib/kward/cli/settings.rb +226 -152
  34. data/lib/kward/cli/slash_commands.rb +81 -42
  35. data/lib/kward/cli/tabs.rb +26 -6
  36. data/lib/kward/cli.rb +26 -3
  37. data/lib/kward/cli_transcript_formatter.rb +21 -18
  38. data/lib/kward/compaction/token_estimator.rb +112 -0
  39. data/lib/kward/compactor.rb +42 -116
  40. data/lib/kward/config_files.rb +120 -25
  41. data/lib/kward/deep_copy.rb +42 -0
  42. data/lib/kward/diff_view_mode.rb +36 -0
  43. data/lib/kward/events.rb +2 -0
  44. data/lib/kward/export_path.rb +2 -6
  45. data/lib/kward/frontmatter.rb +43 -0
  46. data/lib/kward/hooks/audit_log.rb +121 -0
  47. data/lib/kward/hooks/catalog.rb +110 -0
  48. data/lib/kward/hooks/command_handler.rb +66 -0
  49. data/lib/kward/hooks/config_loader.rb +104 -0
  50. data/lib/kward/hooks/decision.rb +102 -0
  51. data/lib/kward/hooks/event.rb +60 -0
  52. data/lib/kward/hooks/http_handler.rb +72 -0
  53. data/lib/kward/hooks/manager.rb +158 -0
  54. data/lib/kward/hooks/matcher.rb +75 -0
  55. data/lib/kward/hooks.rb +16 -0
  56. data/lib/kward/markdown_transcript.rb +4 -3
  57. data/lib/kward/mcp/client.rb +1 -1
  58. data/lib/kward/mcp/server_config.rb +7 -3
  59. data/lib/kward/mcp/stdio_transport.rb +7 -1
  60. data/lib/kward/memory/turn_context.rb +19 -0
  61. data/lib/kward/message_access.rb +2 -2
  62. data/lib/kward/message_text.rb +19 -0
  63. data/lib/kward/model/client.rb +23 -52
  64. data/lib/kward/model/context_usage.rb +10 -4
  65. data/lib/kward/model/copilot_models.rb +44 -0
  66. data/lib/kward/model/model_info.rb +38 -5
  67. data/lib/kward/model/payloads.rb +15 -17
  68. data/lib/kward/model/stream_parser.rb +183 -18
  69. data/lib/kward/pan/index.html.erb +1 -0
  70. data/lib/kward/pan/server.rb +53 -2
  71. data/lib/kward/path_guard.rb +13 -0
  72. data/lib/kward/plugin_registry.rb +88 -25
  73. data/lib/kward/prompt_interface/editor/controller.rb +60 -1
  74. data/lib/kward/prompt_interface/editor/renderer.rb +11 -0
  75. data/lib/kward/prompt_interface/editor/state.rb +5 -1
  76. data/lib/kward/prompt_interface/selection_prompt.rb +26 -6
  77. data/lib/kward/prompt_interface/transcript_renderer.rb +1 -1
  78. data/lib/kward/prompt_interface.rb +4 -1
  79. data/lib/kward/prompts/commands.rb +3 -3
  80. data/lib/kward/prompts.rb +7 -7
  81. data/lib/kward/rpc/mcp_status.rb +50 -0
  82. data/lib/kward/rpc/prompt_bridge.rb +38 -4
  83. data/lib/kward/rpc/runtime_payloads.rb +1 -1
  84. data/lib/kward/rpc/server.rb +95 -15
  85. data/lib/kward/rpc/session_manager.rb +260 -33
  86. data/lib/kward/rpc/session_metrics.rb +1 -1
  87. data/lib/kward/rpc/session_tree_rows.rb +13 -64
  88. data/lib/kward/rpc/tool_event_normalizer.rb +16 -2
  89. data/lib/kward/rpc/transcript_normalizer.rb +19 -20
  90. data/lib/kward/rpc/turn_context.rb +109 -0
  91. data/lib/kward/session_store.rb +6 -20
  92. data/lib/kward/session_tree_nodes.rb +98 -18
  93. data/lib/kward/session_tree_renderer.rb +6 -61
  94. data/lib/kward/skills/registry.rb +109 -17
  95. data/lib/kward/tools/mcp_tool.rb +4 -0
  96. data/lib/kward/tools/read_skill.rb +9 -4
  97. data/lib/kward/tools/registry.rb +266 -8
  98. data/lib/kward/tools/search/code.rb +4 -22
  99. data/lib/kward/tools/search/web.rb +28 -2
  100. data/lib/kward/update_check.rb +122 -0
  101. data/lib/kward/version.rb +1 -1
  102. data/lib/kward/workers/manager.rb +43 -3
  103. data/lib/kward/workspace.rb +3 -1
  104. data/templates/default/fulldoc/html/css/kward.css +22 -0
  105. data/templates/default/fulldoc/html/js/kward.js +2 -0
  106. data/templates/default/kward_navigation.rb +4 -2
  107. data/templates/default/layout/html/setup.rb +2 -0
  108. metadata +25 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2f648e16f1d5c7187e428b30ecc2d5945f067c5decf98d1db46c51e1974a7d6
4
- data.tar.gz: 5acbd39bd18701659c3699a80f6a660ae5bc85c8366083ee7aa3ec184dc93706
3
+ metadata.gz: bd9108129c3abd1aebeb3d1adb3e9011fbaf4e96c60a4f2ff55505497ff4fd0c
4
+ data.tar.gz: 14177ca73389b1e2df9239706f20b879d22322ec89e72f31a81aa573915b0b91
5
5
  SHA512:
6
- metadata.gz: 92de6ca9d486d9bc95d6c36d5bffa2bc591ad18b9dbf499aba14dc349c6f6f8492869b78788e7370a38b0e90067326a0678c0e3efb1a552b12604ab8db55d15d
7
- data.tar.gz: 97f901a2f5992b34d6e3a75d92137518e6b16471ae66b73455cbbccfba740a480045271cac670d82d2920ceb61a48c4ecd2b83ae3de7d97b8bdecb8b284e658c
6
+ metadata.gz: 787448090be2990a36e9d6d5c1911ce3bc5f6031f7c946a6d5d3edde3b78a43742227df6257d64c04e15def86a579e91366db602187200f1c08d241ae705d3b4
7
+ data.tar.gz: 9a18e14824b3f38d2d1e030adf706629a4e797cd49a8aa1c23786fb53d174e4e81a3d1462c6e7a15de4efa1df517f0aaed7eba89fab1d94f162ba066fff59743
data/CHANGELOG.md CHANGED
@@ -4,6 +4,51 @@ All notable changes to Kward will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.76.0] - 2026-07-10
8
+
9
+ ### Added
10
+
11
+ - Added GPT-5.6 Sol, Terra, and Luna to the OpenAI/Codex model choices and made GPT-5.6 Sol the default OpenAI/Codex model.
12
+ - Added Claude Sonnet 5 and Fable 5 to the Anthropic model choices and made Claude Sonnet 5 the default Anthropic model.
13
+
14
+ ### Fixed
15
+
16
+ - Fixed Codex reasoning summaries so separate summary messages render as separate blocks with one empty line between transcript blocks.
17
+ - Fixed interactive update notices so stale checks refresh before the startup banner and new configs expose the `updates.check` setting.
18
+
19
+ ## [0.75.0] - 2026-07-09
20
+
21
+ ### Added
22
+
23
+ - Added `rake release:preflight` to run release checks, build docs, build the gem, and print packaged files.
24
+ - Added cached RubyGems update notices on the fresh interactive startup screen.
25
+ - Added an Interface `/settings` option for choosing the integrated diff viewer mode: auto, unified, or side-by-side.
26
+ - Added lifecycle hooks for deterministic runtime policy and automation, including Ruby plugin hooks, command hooks configured in `config.json`, tool/shell/file/turn/model events, and allow/deny/ask/modify/warn decisions.
27
+ - Added Agent Skills interoperability across `~/.agents/skills`, project `.agents/skills`, Kward-native skill directories, explicit `/skill` activation, RPC skill commands, resource listing, and compaction preservation for activated skills.
28
+ - Added RPC MCP/tool discovery metadata, session-aware `tools/list`, `mcp/status`, and initialize capability reporting for MCP discovery.
29
+
30
+ ### Changed
31
+
32
+ - Changed code search to share the web/fetch HTTP adapter for package and GitHub lookups.
33
+ - Changed OpenAI and Anthropic OAuth flows to share browser callback and token helper mechanics.
34
+ - Changed context token counting to reuse loaded tokenizer encodings per model.
35
+ - Changed RPC capability format names from Tauren-specific identifiers to Kward-neutral identifiers.
36
+ - Changed `/settings` to require only picker support, with live overlay redraw remaining optional for overlay-specific settings.
37
+ - Changed new default configs to include explicit overlay and web-search defaults while preserving existing behavior for partial configs.
38
+ - Changed interactive `/settings` menus to return to the last changed option instead of resetting to the first settings screen.
39
+ - Changed the saved session picker slash command from `/sessions` to `/session`, kept `/resume` as an alias, and replaced `/name` with `/session name`.
40
+ - Changed session picker search to use Tab, and Tab again returns to the list without clearing the current search text.
41
+
42
+ ### Fixed
43
+
44
+ - Fixed RPC memory auto-summary so completed RPC turns learn memories when memory and auto-summary are enabled.
45
+ - Fixed worker lifecycle hooks so create/start blocking decisions stop worker jobs before they run.
46
+ - Fixed RPC plugin reloads so existing sessions rebuild their agent, tool registry, and lifecycle hook runtime.
47
+ - Fixed streamed Codex reasoning whitespace so repeated blank lines collapse to a single empty line.
48
+ - Fixed default persona spelling in new configs and the documented Anthropic default model.
49
+ - Fixed context-usage estimates for restored sessions whose provider differs from the current client default.
50
+ - Fixed project skill discovery to use the active conversation workspace instead of the process working directory.
51
+
7
52
  ## [0.74.0] - 2026-06-30
8
53
 
9
54
  ### Added
@@ -16,6 +61,8 @@ All notable changes to Kward will be documented in this file.
16
61
 
17
62
  ### Fixed
18
63
 
64
+ - Fixed tab switching while busy local commands such as `/compact` are running, including restoring the busy spinner when returning to the tab.
65
+ - Fixed repeated compaction for compacted sessions that continue growing after later turns.
19
66
  - Fixed editor undo/redo so selections do not become sticky after restoring buffer contents.
20
67
  - Fixed busy composer slash commands so they are blocked instead of being queued or sent as in-flight steering.
21
68
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kward (0.74.0)
4
+ kward (0.76.0)
5
5
  base64
6
6
  nokogiri
7
7
  tiktoken_ruby
@@ -146,7 +146,7 @@ CHECKSUMS
146
146
  html-proofer (5.2.1) sha256=fdd958a7cbf9c3255fb96fe7cfc4e611f64e2706e469488a3326309ad007d2fd
147
147
  io-event (1.16.2) sha256=9f9cb0a96ea5c3850a672606c65f27bc96d7621399ef6196acbfe2be0cd1279c
148
148
  json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
149
- kward (0.74.0)
149
+ kward (0.76.0)
150
150
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
151
151
  metrics (0.15.0) sha256=61ded5bac95118e995b1bc9ed4a5f19bc9814928a312a85b200abbdac9039072
152
152
  minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
data/README.md CHANGED
@@ -48,6 +48,7 @@ kward # start an interactive chat
48
48
  kward help # show available commands and examples
49
49
  /login # from inside Kward: sign in or save provider credentials
50
50
  kward login # from your shell: sign in or save provider credentials
51
+ kward hooks doctor # inspect lifecycle hook setup
51
52
  kward "Explain this project" # run one prompt and exit
52
53
  kward --working-directory ~/code/project "Explain this project"
53
54
  ```
@@ -63,7 +64,7 @@ See [Authentication](doc/authentication.md) for more details about sign-in optio
63
64
  - Save, resume, clone, compact, and export sessions.
64
65
  - Extend the Agent with trusted Ruby plugins for custom commands, footer UI, prompt context, and transcript-event observers.
65
66
  - Use optional memory, personas, prompt templates, and skills.
66
- - Serve an experimental JSON-RPC backend for UI clients.
67
+ - Serve a JSON-RPC backend for trusted local UI clients.
67
68
 
68
69
  ## Documentation
69
70
 
@@ -88,7 +89,8 @@ Advanced:
88
89
 
89
90
  - [Extensibility](doc/extensibility.md): `PRINCIPLES.md`, workspace `AGENTS.md`, skills, prompt templates, and extension choices.
90
91
  - [Plugins](doc/plugins.md): trusted Ruby plugins for commands, footer UI, prompt context, transcript events, and RPC clients.
91
- - [RPC protocol](doc/rpc.md): experimental JSON-RPC backend mode for UI clients.
92
+ - [Lifecycle hooks](doc/lifecycle-hooks.md): deterministic runtime hooks for policy, approvals, automation, and command-hook integrations.
93
+ - [RPC protocol](doc/rpc.md): JSON-RPC backend mode for trusted local UI clients.
92
94
  - [Releasing](doc/releasing.md): release checklist for RubyGems publishing.
93
95
  - [Agent tools](doc/agent-tools.md): overview of model-callable tools, token-saving behavior, and tool categories.
94
96
  - [Workspace tools](doc/workspace-tools.md): local file, edit, and shell command tools.
data/Rakefile CHANGED
@@ -1,8 +1,10 @@
1
1
  require "fileutils"
2
2
  require "html-proofer"
3
3
  require "rdoc/task"
4
+ require "rubygems/package"
4
5
  require "webrick"
5
6
  require "yard"
7
+ require_relative "lib/kward/version"
6
8
  require "yard/rake/yardoc_task"
7
9
 
8
10
  DOCS_WATCH_GLOBS = [
@@ -26,6 +28,11 @@ def rebuild_docs
26
28
  system({ "DOCS_SERVE_REBUILD" => "1" }, "bundle", "exec", "rake", "docs:build") || abort("Documentation rebuild failed")
27
29
  end
28
30
 
31
+ def packaged_gem_files(gem_name)
32
+ gem = Gem::Package.new(gem_name)
33
+ gem.spec.files.sort
34
+ end
35
+
29
36
  def rewrite_yard_markdown_links
30
37
  guide_names = Dir.glob("doc/*.md").map { |path| File.basename(path, ".md") }
31
38
 
@@ -46,6 +53,7 @@ end
46
53
 
47
54
  task default: :test
48
55
 
56
+ desc "Run the full test suite"
49
57
  task :test do
50
58
  ruby "-Itest", "-e", 'Dir["test/**/test_*.rb"].sort.each { |file| require_relative file }'
51
59
  end
@@ -66,6 +74,16 @@ YARD::Rake::YardocTask.new do |yard|
66
74
  ]
67
75
  end
68
76
 
77
+ namespace :release do
78
+ desc "Run release checks and build a local gem"
79
+ task preflight: [:test, "docs:check"] do
80
+ gem_name = "kward-#{Kward::VERSION}.gem"
81
+ FileUtils.rm_f(gem_name)
82
+ sh "gem", "build", "kward.gemspec"
83
+ puts packaged_gem_files(gem_name)
84
+ end
85
+ end
86
+
69
87
  namespace :docs do
70
88
  desc "Serve the built YARD documentation site locally and rebuild on changes"
71
89
  task serve: :build do
data/doc/configuration.md CHANGED
@@ -9,7 +9,7 @@ Small examples:
9
9
  ```json
10
10
  {
11
11
  "provider": "openrouter",
12
- "openrouter_model": "openai/gpt-5.5"
12
+ "openrouter_model": "openai/gpt-5.6-sol"
13
13
  }
14
14
  ```
15
15
 
@@ -26,6 +26,26 @@ Small examples:
26
26
 
27
27
  See [MCP servers](mcp.md) for connecting local Model Context Protocol servers such as Safari's browser automation server.
28
28
 
29
+ ```json
30
+ {
31
+ "skills": {
32
+ "trust_project": true
33
+ }
34
+ }
35
+ ```
36
+
37
+ By default, Kward loads user-level skills but skips project-level skills from the workspace. Set `skills.trust_project` to `true`, or use `/settings` → `Tools & Search` → `Trust project skills`, when you trust the repository's `.kward/skills` or `.agents/skills` directories. See [Skills](skills.md) for skill locations and examples.
38
+
39
+ ```json
40
+ {
41
+ "updates": {
42
+ "check": true
43
+ }
44
+ }
45
+ ```
46
+
47
+ Kward checks RubyGems for newer `kward` versions on the interactive startup screen. Results are cached under `~/.kward/cache/update_check.json` so startup does not hit RubyGems every time. Set `updates.check` to `false`, or set `KWARD_DISABLE_UPDATE_CHECK=1`, to disable the check.
48
+
29
49
  ```json
30
50
  {
31
51
  "memory": {
@@ -52,6 +72,31 @@ By default, Kward stores user data under `~/.kward`:
52
72
 
53
73
  When `KWARD_CONFIG_PATH=/path/to/config.json` is set, most config-related files live beside that file instead. User plugins are the exception: they are loaded only from `~/.kward/plugins`. See [Plugins](plugins.md) for writing and loading user plugins.
54
74
 
75
+ ## Lifecycle hooks
76
+
77
+ Configure command or HTTP lifecycle hooks with a top-level `hooks` object. Each key is an event name and each value is an array of hook entries. Command hooks receive event JSON on stdin and return decision JSON on stdout. HTTP hooks receive event JSON by `POST` and return decision JSON in the response body.
78
+
79
+ ```json
80
+ {
81
+ "hooks": {
82
+ "shell_command_before": [
83
+ {
84
+ "id": "block-release",
85
+ "type": "command",
86
+ "command": "~/.kward/hooks/block-release.rb",
87
+ "timeout_seconds": 5,
88
+ "failure_policy": "deny",
89
+ "match": { "command_regex": "\\bgem push\\b" }
90
+ }
91
+ ]
92
+ }
93
+ }
94
+ ```
95
+
96
+ Use `failure_policy` (`allow`, `warn`, `deny`, or `ask`) to decide what happens if the hook command fails, times out, or returns invalid JSON.
97
+
98
+ Project-local hooks can also live in `.kward/hooks.json`, but Kward loads them only after you explicitly run `/hooks trust` in that workspace. Trust is tied to the file digest, so changes require re-trusting. See [Lifecycle hooks](lifecycle-hooks.md) for events, decisions, selectors, plugin hooks, command-hook protocol, workspace trust, and security notes.
99
+
55
100
  ## Embedded shell config
56
101
 
57
102
  The embedded Kward shell (`/shell`, internally `ekwsh`) reads optional global settings from `~/.kward/ekwsh.yml` or, when `KWARD_CONFIG_PATH` is set, from `ekwsh.yml` beside that config file.
@@ -96,10 +141,10 @@ Model settings:
96
141
 
97
142
  ```json
98
143
  {
99
- "model": "gpt-5.5",
100
- "openai_model": "gpt-5.5",
101
- "openrouter_model": "openai/gpt-5.5",
102
- "anthropic_model": "claude-sonnet-4-5",
144
+ "model": "gpt-5.6-sol",
145
+ "openai_model": "gpt-5.6-sol",
146
+ "openrouter_model": "openai/gpt-5.6-sol",
147
+ "anthropic_model": "claude-sonnet-5",
103
148
  "copilot_model": "gpt-5-mini",
104
149
  "reasoning_effort": "medium",
105
150
  "openai_reasoning_effort": "medium",
@@ -112,14 +157,18 @@ Model settings:
112
157
 
113
158
  `model` is a generic setting for the active provider. Provider-specific values such as `openai_model`, `anthropic_model`, `openrouter_model`, and `copilot_model` take precedence for their provider. `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.
114
159
 
160
+ Set `codex_show_raw_reasoning` to `true` to display raw Codex `reasoning_text` when the API does not provide reasoning summary text. It defaults to `false`; raw reasoning can include internal or unstable model output, so enable it only when you explicitly want to inspect that stream.
161
+
115
162
  Defaults:
116
163
 
117
- - OpenAI/Codex: `gpt-5.5`
118
- - OpenRouter: `openai/gpt-5.5`
119
- - Anthropic: `claude-sonnet-4-5`
164
+ - OpenAI/Codex: `gpt-5.6-sol`
165
+ - OpenRouter: `openai/gpt-5.6-sol`
166
+ - Anthropic: `claude-sonnet-5`
120
167
  - Copilot: `gpt-5-mini`
121
168
  - Reasoning effort: `medium`
122
169
 
170
+ The Anthropic model choices include `claude-fable-5`, but Fable availability depends on the logged-in account and organization. Selecting it without access returns an Anthropic provider error.
171
+
123
172
  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.
124
173
 
125
174
  ## Environment overrides
@@ -170,7 +219,7 @@ Use environment variables for temporary or local-only secrets when possible. If
170
219
 
171
220
  ## Overlay settings
172
221
 
173
- Overlay settings control terminal picker/card layout:
222
+ Overlay settings control terminal picker/card layout. New default configs include this section, and partial existing configs use the same defaults for missing keys:
174
223
 
175
224
  ```json
176
225
  {
@@ -185,6 +234,22 @@ Overlay settings control terminal picker/card layout:
185
234
 
186
235
  You can change these interactively with `/settings`.
187
236
 
237
+ ## Web search settings
238
+
239
+ New default configs enable web search with the automatic provider order:
240
+
241
+ ```json
242
+ {
243
+ "web_search": {
244
+ "enabled": true,
245
+ "provider": "auto",
246
+ "allow_model_providers": false
247
+ }
248
+ }
249
+ ```
250
+
251
+ Existing configs without `web_search` keep the same behavior: web search is enabled, the provider is `auto`, and model-provider fallbacks are disabled unless explicitly enabled.
252
+
188
253
  ## Composer settings
189
254
 
190
255
  The busy composer shows a short Ctrl+C cancellation hint by default. To hide it:
@@ -290,7 +355,7 @@ Interactive CLI and RPC clients start fresh by default. To automatically resume
290
355
  }
291
356
  ```
292
357
 
293
- The `/sessions` command, `/resume` alias, and RPC `sessions/resume` work regardless of this automatic resume setting.
358
+ The `/session` command, `/resume` alias, and RPC `sessions/resume` work regardless of this automatic resume setting.
294
359
 
295
360
  ## Memory
296
361
 
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
+ | Deterministic runtime policy or automation | lifecycle hooks |
17
18
 
18
19
  Install the starter pack for a useful starting point:
19
20
 
@@ -97,29 +98,15 @@ Prompt templates are best for reusable text. They do not run local code.
97
98
 
98
99
  ## Skills
99
100
 
100
- Use skills for reusable instructions that should only be loaded for certain tasks.
101
+ Use skills for reusable instructions that should only be loaded for certain tasks, such as testing, release checks, or code review workflows.
101
102
 
102
- Create:
103
-
104
- ```text
105
- ~/.kward/skills/testing/SKILL.md
106
- ```
107
-
108
- Example:
103
+ Kward supports Agent Skills in user and project directories, including the shared `.agents/skills` convention. See [Skills](skills.md) for the full guide, including setup, explicit `/skill` activation, bundled files, project trust, and troubleshooting.
109
104
 
110
- ```markdown
111
- ---
112
- name: testing
113
- description: Use when adding or changing tests.
114
- ---
115
-
116
- Prefer focused tests near the changed behavior.
117
- Do not weaken assertions to make tests pass.
118
- ```
105
+ ## Lifecycle hooks
119
106
 
120
- Skills are listed to the model by name and description. When a task matches a skill, the model calls the `read_skill` tool to load the full `SKILL.md` instructions before proceeding.
107
+ Use [lifecycle hooks](lifecycle-hooks.md) when something must happen at a specific runtime point: before a shell command, around model requests, after a file change, or before a tool call. Hooks can allow, deny, ask for approval, modify supported payloads, or warn. They are available from trusted Ruby plugins and from command hooks configured in `config.json`.
121
108
 
122
- Skills can also contain additional files alongside `SKILL.md`. The model can read them through `read_skill` with a relative `path` argument (for example, `path: examples.md`). Files must stay inside the skill folder; paths outside are rejected.
109
+ Hooks are deterministic automation and policy. They are not model instructions.
123
110
 
124
111
  ## Plugins
125
112
 
@@ -118,7 +118,7 @@ Inside interactive Kward:
118
118
  /login sign in or save provider credentials
119
119
  /model choose a model
120
120
  /status show session and context status
121
- /sessions open the saved sessions picker
121
+ /session open the saved sessions picker
122
122
  /rewind revisit an earlier prompt
123
123
  /export notes.md export the transcript
124
124
  /compact summarize older context when a chat gets long