kward 0.78.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +13 -2
- data/.github/workflows/pages.yml +1 -1
- data/CHANGELOG.md +82 -1
- data/Gemfile.lock +2 -2
- data/README.md +33 -38
- data/doc/agent-tools.md +10 -11
- data/doc/api.md +3 -3
- data/doc/authentication.md +79 -110
- data/doc/code-search.md +1 -1
- data/doc/composer.md +1 -1
- data/doc/configuration.md +136 -27
- data/doc/context-budgeting.md +6 -6
- data/doc/context-tools.md +2 -2
- data/doc/editor.md +7 -7
- data/doc/extensibility.md +9 -29
- data/doc/files.md +6 -6
- data/doc/getting-started.md +3 -3
- data/doc/git.md +8 -2
- data/doc/lifecycle-hooks.md +5 -4
- data/doc/local-models.md +130 -0
- data/doc/mcp.md +5 -5
- data/doc/permissions.md +15 -5
- data/doc/plugins.md +39 -4
- data/doc/prompt-templates.md +105 -0
- data/doc/providers.md +140 -0
- data/doc/releasing.md +11 -3
- data/doc/rpc.md +65 -31
- data/doc/sandboxing.md +142 -0
- data/doc/security.md +31 -10
- data/doc/session-management.md +2 -4
- data/doc/skills.md +10 -0
- data/doc/tabs.md +37 -0
- data/doc/telegram.md +138 -0
- data/doc/transports.md +209 -0
- data/doc/usage.md +11 -3
- data/doc/web-search.md +3 -3
- data/doc/workspace-tools.md +4 -4
- data/examples/plugins/stardate_footer.rb +10 -0
- data/examples/plugins/telegram/plugin.rb +39 -0
- data/examples/plugins/telegram/telegram_api.rb +136 -0
- data/examples/plugins/telegram/telegram_transport.rb +304 -0
- data/kward.gemspec +1 -1
- data/lib/kward/ansi.rb +1 -0
- data/lib/kward/auth/api_key_store.rb +99 -0
- data/lib/kward/cli/auth_commands.rb +72 -13
- data/lib/kward/cli/commands.rb +7 -0
- data/lib/kward/cli/doctor.rb +21 -0
- data/lib/kward/cli/git.rb +31 -8
- data/lib/kward/cli/plugins.rb +1 -0
- data/lib/kward/cli/prompt_interface.rb +7 -0
- data/lib/kward/cli/rendering.rb +6 -2
- data/lib/kward/cli/runtime_helpers.rb +4 -2
- data/lib/kward/cli/sessions.rb +1 -1
- data/lib/kward/cli/settings.rb +162 -36
- data/lib/kward/cli/slash_commands.rb +109 -1
- data/lib/kward/cli/tabs.rb +102 -37
- data/lib/kward/cli/transports.rb +67 -0
- data/lib/kward/cli/worktrees.rb +360 -0
- data/lib/kward/cli.rb +22 -1
- data/lib/kward/config_files.rb +106 -4
- data/lib/kward/conversation.rb +27 -8
- data/lib/kward/git_worktree_manager.rb +291 -0
- data/lib/kward/local_command_runner.rb +2 -2
- data/lib/kward/model/azure_openai_config.rb +54 -0
- data/lib/kward/model/catalog.rb +113 -0
- data/lib/kward/model/client.rb +364 -23
- data/lib/kward/model/model_info.rb +60 -1
- data/lib/kward/model/payloads.rb +64 -4
- data/lib/kward/model/provider_catalog.rb +114 -0
- data/lib/kward/model/sources.rb +70 -0
- data/lib/kward/model/stream_parser.rb +141 -39
- data/lib/kward/pan/index.html.erb +50 -0
- data/lib/kward/pan/server.rb +49 -2
- data/lib/kward/permissions/policy.rb +18 -4
- data/lib/kward/plugin_chat_runtime.rb +374 -0
- data/lib/kward/plugin_registry.rb +81 -8
- data/lib/kward/private_file.rb +9 -3
- data/lib/kward/prompt_interface/approval_prompt.rb +2 -0
- data/lib/kward/prompt_interface/composer_renderer.rb +1 -5
- data/lib/kward/prompt_interface/editor/auto_indent.rb +46 -0
- data/lib/kward/prompt_interface/editor/buffer.rb +18 -4
- data/lib/kward/prompt_interface/editor/controller.rb +43 -10
- data/lib/kward/prompt_interface/editor/modes/vibe.rb +2 -2
- data/lib/kward/prompt_interface/editor/renderer.rb +8 -8
- data/lib/kward/prompt_interface/editor/state.rb +3 -9
- data/lib/kward/prompt_interface/editor/syntax_highlighter.rb +184 -9
- data/lib/kward/prompt_interface/file_overlay.rb +2 -2
- data/lib/kward/prompt_interface/git_prompt.rb +7 -3
- data/lib/kward/prompt_interface/interactive/controller.rb +4 -4
- data/lib/kward/prompt_interface/interactive/renderer.rb +4 -1
- data/lib/kward/prompt_interface/interactive/state.rb +2 -2
- data/lib/kward/prompt_interface/project_browser.rb +25 -6
- data/lib/kward/prompt_interface/runtime_state.rb +22 -6
- data/lib/kward/prompt_interface/screen.rb +3 -0
- data/lib/kward/prompt_interface/selection_prompt.rb +7 -1
- data/lib/kward/prompt_interface/transcript_buffer.rb +24 -2
- data/lib/kward/prompt_interface.rb +71 -12
- data/lib/kward/prompts/commands.rb +3 -1
- data/lib/kward/prompts.rb +22 -10
- data/lib/kward/rpc/auth_manager.rb +112 -152
- data/lib/kward/rpc/config_manager.rb +46 -6
- data/lib/kward/rpc/plugin_chat_manager.rb +56 -194
- data/lib/kward/rpc/prompt_bridge.rb +8 -4
- data/lib/kward/rpc/redactor.rb +1 -1
- data/lib/kward/rpc/server.rb +102 -14
- data/lib/kward/rpc/session_manager.rb +151 -38
- data/lib/kward/sandbox/capabilities.rb +39 -0
- data/lib/kward/sandbox/command_runner.rb +28 -0
- data/lib/kward/sandbox/environment.rb +24 -0
- data/lib/kward/sandbox/linux_bubblewrap_runner.rb +71 -0
- data/lib/kward/sandbox/macos_seatbelt_runner.rb +96 -0
- data/lib/kward/sandbox/passthrough_runner.rb +13 -0
- data/lib/kward/sandbox/policy.rb +74 -0
- data/lib/kward/sandbox/runner_factory.rb +55 -0
- data/lib/kward/sandbox/unavailable_runner.rb +21 -0
- data/lib/kward/sandbox.rb +9 -0
- data/lib/kward/session_store.rb +110 -24
- data/lib/kward/skills/capture.rb +144 -0
- data/lib/kward/tab_driver.rb +6 -3
- data/lib/kward/tools/git_commit.rb +39 -0
- data/lib/kward/tools/registry.rb +26 -6
- data/lib/kward/tools/tool_call.rb +1 -0
- data/lib/kward/transport/gateway.rb +253 -0
- data/lib/kward/transport/host.rb +343 -0
- data/lib/kward/transport/manager.rb +179 -0
- data/lib/kward/transport/plugin_chat_gateway.rb +186 -0
- data/lib/kward/transport/runtime.rb +41 -0
- data/lib/kward/transport/store.rb +101 -0
- data/lib/kward/transport.rb +204 -0
- data/lib/kward/version.rb +1 -1
- data/lib/kward/workspace.rb +18 -3
- data/lib/kward/workspace_factory.rb +34 -0
- data/templates/default/fulldoc/html/js/kward.js +3 -0
- data/templates/default/kward_navigation.rb +8 -1
- data/templates/default/layout/html/setup.rb +5 -0
- metadata +41 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9128f608c2a864ad996598d285d4042758ea1bc1b3a76a1224984ef23129544
|
|
4
|
+
data.tar.gz: c9d718290398f95e1420e5e12225e43aaba6bf6c64c868fb6d175d5725aaf19d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b0e53fddfa2de055b11b6bbe0965496e2abc860162ed0888642bb353ae64e0e0fdbfbe14ed7412198c8c60583c1d55fd6d9cd7fec7a43eb37db456a494f5a1a
|
|
7
|
+
data.tar.gz: 2396aceedf67453422924616d92031160d3eee67ae448347d2f367a05d48a97d9ae39789b2100c3c47bdbc5925c85e4922146a50c72ee662d863f8ad597dacbd
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
strategy:
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
|
-
ruby-version: ['3.
|
|
19
|
+
ruby-version: ['3.4', 'ruby']
|
|
20
20
|
steps:
|
|
21
21
|
- name: Checkout
|
|
22
22
|
uses: actions/checkout@v4
|
|
@@ -27,11 +27,22 @@ jobs:
|
|
|
27
27
|
ruby-version: ${{ matrix.ruby-version }}
|
|
28
28
|
bundler-cache: true
|
|
29
29
|
|
|
30
|
+
- name: Install sandbox test dependency
|
|
31
|
+
run: sudo apt-get update && sudo apt-get install --yes bubblewrap
|
|
32
|
+
|
|
33
|
+
- name: Enable Bubblewrap namespaces
|
|
34
|
+
run: |
|
|
35
|
+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
36
|
+
sudo sysctl -w kernel.unprivileged_userns_clone=1
|
|
37
|
+
bwrap --ro-bind / / --unshare-net true
|
|
38
|
+
|
|
30
39
|
- name: Check syntax
|
|
31
40
|
run: find lib test -name '*.rb' -print0 | xargs -0 ruby -c
|
|
32
41
|
|
|
33
42
|
- name: Check runtime warnings
|
|
34
|
-
run: ruby -w -Ilib -e 'require "kward"'
|
|
43
|
+
run: bundle exec ruby -w -Ilib -e 'require "kward"'
|
|
35
44
|
|
|
36
45
|
- name: Run tests
|
|
46
|
+
env:
|
|
47
|
+
KWARD_RUN_BUBBLEWRAP_TESTS: "1"
|
|
37
48
|
run: bundle exec rake test
|
data/.github/workflows/pages.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,88 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Kward will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [0.80.0] - 2026-07-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added HTML/Ruby syntax highlighting and common-block auto-indentation for `.erb` files in the integrated editor.
|
|
10
|
+
- Added catalog-based API-key login and model selection for OpenAI, Anthropic, Azure OpenAI, Gemini, Cerebras, DeepSeek, Fireworks AI, Groq, Mistral, NVIDIA NIM, OpenRouter, Together AI, and xAI, with private credential storage and live/cached/curated model catalogs.
|
|
11
|
+
- Added native streaming runtimes for the OpenAI Responses API, Google Gemini, and Azure OpenAI, including tool calls, usage metadata, retries, cancellation, and secret redaction.
|
|
12
|
+
- Added RPC parity for provider/auth-method discovery, sanitized credential status, API-key login/logout, model refresh, and provider/model selection.
|
|
13
|
+
- Added a dedicated model-provider guide with the canonical provider list, runtime IDs, authentication, model configuration, discovery behavior, and limitations.
|
|
14
|
+
- Added a prompt-template guide, including template creation, slash-command expansion, and the starter templates installed by `kward init`.
|
|
15
|
+
- Added a Stardate footer plugin example for the interactive CLI.
|
|
16
|
+
- Added a general transport plugin API with normalized messages and events, persistent transport state, policy checks, managed lifecycle, foreground CLI commands, and RPC capability/status reporting.
|
|
17
|
+
- Added a first-party Telegram long-polling transport example with fixed-workspace routing, numeric allowlists, idempotent updates, message chunking, and interactive approval/question buttons.
|
|
18
|
+
- Added packaged plugin entrypoints under `~/.kward/plugins/*/plugin.rb` for multi-file trusted plugins.
|
|
19
|
+
- Added generic transport execution profiles and an isolated Telegram chat transport with no tools, plugin commands, memory, attachments, or interactions.
|
|
20
|
+
- Added a shared scoped plugin-chat runtime and `Transport::Host#plugin_chats` for explicitly transport-capable plugin chats, including actor context, event replay, cancellation, and separate transport/RPC access.
|
|
21
|
+
- Added transport-only plugin chats with `local: false`, keeping externally targeted plugin chats out of local tab opening and restoration.
|
|
22
|
+
- Added Git worktree bindings for normal interactive session tabs. `/tab worktree` can move a tab into a strict linked-worktree workspace after research, preserve its transcript, warn about dirty origin changes, and keep the branch available when explicitly detached.
|
|
23
|
+
- Added the active worktree `git_commit` model tool, allowing explicitly requested agent commits through the trusted host-side Git workflow without widening the shell sandbox.
|
|
24
|
+
- Added `/tab worktree merge` for explicitly merging a clean worktree branch into the branch checked out in its original workspace, plus `/tab worktree merge abort` for conflicted merges.
|
|
25
|
+
- Added `j`/`k` keyboard navigation to the `/files` project browser.
|
|
26
|
+
- Added `h`/`l` keyboard navigation for collapsing and expanding `/files` directories.
|
|
27
|
+
- Added `j`/`k` keyboard navigation to the `/git` changed-file overlay.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Avoided copying bounded transcript buffers into idle tab snapshots while preserving intentional full-conversation scrollback replay when those tabs are revisited.
|
|
32
|
+
- Kept the TUI transcript buffer under its existing limit while trimming to a safe low watermark instead of copying the full buffer after every appended character.
|
|
33
|
+
- Reduced integrated-editor layout work by caching line starts and calculating the cursor line once per rendered frame.
|
|
34
|
+
- Limited interactive plugin footer evaluation to its authoritative one-second refresh interval and reused the cached value between refreshes.
|
|
35
|
+
- Made interactive plugin canvases publish only complete frames submitted with `ui.render`, skip unpublished ticks, and follow terminal width changes.
|
|
36
|
+
- Avoided rebuilding and flushing the TUI composer when tab labels and selection have not changed.
|
|
37
|
+
- Reduced interactive streaming overhead by writing each labeled TUI delta in one synchronized prompt transaction.
|
|
38
|
+
- Highlighted the current editor line number in white while keeping the rest of the line-number gutter green.
|
|
39
|
+
- Made `/model` provider-aware with refresh, manual model IDs, capability-filtered defaults, Show all, and provider switching while preserving Codex, Copilot, OpenRouter, and local models.
|
|
40
|
+
- Kept direct OpenAI API credentials (`openai_api`) separate from ChatGPT/Codex OAuth so both can be configured at once.
|
|
41
|
+
- Azure OpenAI setup now validates HTTPS endpoints, deployment names, and API versions, and treats the configured deployment as the selectable model.
|
|
42
|
+
- Updated current documentation to describe Copilot and the JSON-RPC backend as supported features rather than experimental ones.
|
|
43
|
+
- Clarified the distinct roles of workspace guardrails, tool permissions, and command sandboxing.
|
|
44
|
+
- Reorganized the README documentation index and clarified generated Ruby API support boundaries.
|
|
45
|
+
- Added task-oriented navigation to the RPC and configuration references.
|
|
46
|
+
- Standardized MCP support and limitation wording across the user and RPC guides.
|
|
47
|
+
- Reframed the README introduction around Kward as an Agentic Development Environment (ADE) with opt-in safety controls.
|
|
48
|
+
- Moved the local-model setup guide to the generated documentation Integrate navigation.
|
|
49
|
+
- Added the Telegram transport deployment guide to the generated documentation navigation.
|
|
50
|
+
- Replaced implicit `/tab worktree` detachment with explicit `/tab worktree detach`; running `/tab worktree` again now leaves an active worktree enabled.
|
|
51
|
+
- Added workspace overrides for foreground transports via `kward transport run NAME WORKSPACE` and the global `--working-directory` option.
|
|
52
|
+
- The `/files` project-browser now uses full terminal height if there are enough files to fill that space
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- Prevented a stopped tab live-view thread from resuming against a newly active tab after a slow render.
|
|
57
|
+
- Kept `@`/`$` completion, `/files`, prompt history, and the integrated editor rooted in the active worktree tab instead of the original checkout.
|
|
58
|
+
- Fixed HTML and ERB editor highlighting so tag names, attributes, values, and tag fragments retain consistent colors across embedded Ruby expressions.
|
|
59
|
+
- Refreshed composer diff and context usage status immediately when switching session tabs.
|
|
60
|
+
- Prevented `/reload` from retaining stale prompt templates, so new and edited prompt files refresh slash-command completion and expansion.
|
|
61
|
+
- Prevented session-picker rename input from filtering the visible session list.
|
|
62
|
+
- Fixed session listing timestamps and ordering to ignore system-prompt and other metadata writes during session restoration.
|
|
63
|
+
|
|
64
|
+
## [0.79.0] - 2026-07-19
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- Added a Local OpenAI-compatible model provider for Ollama, LM Studio, and llama.cpp, including model discovery, streamed tool calls, configurable context windows, CLI/RPC model selection, and a local-model setup guide.
|
|
69
|
+
- Added replacement system-prompt files and an option to omit global principles for smaller-model prompt budgets.
|
|
70
|
+
- Added skill capture from saved session branches. Review model-generated personal `SKILL.md` drafts in the CLI or Pan, or use the equivalent RPC workflow before explicitly saving them.
|
|
71
|
+
- Added opt-in OS-enforced sandboxing for model-requested shell commands. macOS uses Seatbelt and Linux uses Bubblewrap when available; requested sandboxing fails closed when no supported backend can enforce it. The interactive `/sandbox` command reports and updates the global policy.
|
|
72
|
+
|
|
73
|
+
### Changed
|
|
74
|
+
|
|
75
|
+
- Clarified command-sandbox configuration, platform setup, and limits across the security, permissions, workspace-tools, RPC, and configuration guides.
|
|
76
|
+
- Sandboxed command workers now receive a sanitized environment with a private home and temporary directory; the macOS backend also blocks reads from common credential directories.
|
|
77
|
+
- Improved built-in tool guidance so agents use only tools advertised for the current turn and select code search, compacted-output retrieval, and structured clarification when appropriate.
|
|
78
|
+
- Raised the minimum supported Ruby version from 3.2 to 3.4.
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- Reject duplicate discovered tool names instead of silently replacing one MCP tool with another.
|
|
83
|
+
- Fixed an RPC race where follow-up input could queue instead of steering a turn immediately after it began.
|
|
84
|
+
- Prevented the RPC server from loading trusted Ruby plugins separately for plugin chats and workspace sessions, eliminating duplicate constant-definition warnings during startup.
|
|
85
|
+
- Prevented `/reload` and RPC runtime reloads from emitting duplicate constant-definition warnings for plugin-defined constants.
|
|
86
|
+
- Wrapped long side-by-side diff cells when editor soft wrap is enabled instead of clipping their contents.
|
|
6
87
|
|
|
7
88
|
## [0.78.0] - 2026-07-15
|
|
8
89
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
kward (0.
|
|
4
|
+
kward (0.80.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.
|
|
149
|
+
kward (0.80.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
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
# Kward
|
|
2
2
|
|
|
3
|
-
Kward is
|
|
3
|
+
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
4
|
|
|
5
|
-
|
|
5
|
+
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.
|
|
6
6
|
|
|
7
|
-
## Why
|
|
7
|
+
## Why Kward?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Software work rarely fits into one chat. A project can span days of research, implementation, debugging, review, and decisions worth keeping.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Kward treats that work as an ongoing workspace rather than a disposable conversation. You can resume earlier sessions, split work across tabs and Git worktrees, and keep project guidance close to the code. Optional permissions, command sandboxing, and workspace boundaries give you more control when a task needs it.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- Investigating bugs
|
|
15
|
-
- Reviewing changes
|
|
16
|
-
- Refactoring code
|
|
17
|
-
- Automating repetitive development tasks
|
|
18
|
-
- Building custom agent workflows through plugins
|
|
19
|
-
|
|
20
|
-
Examples:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
kward "Explain this project"
|
|
24
|
-
kward "Review this diff"
|
|
25
|
-
kward "Find performance problems in this codebase"
|
|
26
|
-
```
|
|
13
|
+
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.
|
|
27
14
|
|
|
28
15
|
## Install
|
|
29
16
|
|
|
@@ -52,55 +39,63 @@ kward "Explain this project" # run one prompt and exit
|
|
|
52
39
|
kward --working-directory ~/code/project "Explain this project"
|
|
53
40
|
```
|
|
54
41
|
|
|
55
|
-
From inside Kward, `/login`
|
|
42
|
+
From inside Kward, `/login` lets you choose API-key or subscription authentication across supported providers. `/model` then switches providers, refreshes model catalogs, or accepts a manual model/deployment ID. Direct OpenAI API credentials and ChatGPT/Codex OAuth can coexist.
|
|
56
43
|
|
|
57
|
-
See [Authentication](doc/authentication.md) for
|
|
44
|
+
See [Model providers](doc/providers.md) to choose a backend and [Authentication](doc/authentication.md) for credential storage and login flows.
|
|
58
45
|
|
|
59
|
-
##
|
|
46
|
+
## Common ways to use Kward
|
|
60
47
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
- Use optional memory, personas, prompt templates, and skills.
|
|
68
|
-
- Serve a JSON-RPC backend for trusted local UI clients.
|
|
48
|
+
- Explore an unfamiliar codebase and keep useful discoveries for later sessions.
|
|
49
|
+
- Investigate a bug, make a focused change, and run the related tests.
|
|
50
|
+
- Review a diff, inspect the surrounding code, and commit from the terminal UI.
|
|
51
|
+
- Work on several tasks at once with tabs, branches, and linked Git worktrees.
|
|
52
|
+
- Teach Kward your project conventions with `AGENTS.md`, skills, prompt templates, and optional memory.
|
|
53
|
+
- Add trusted local behavior through plugins, lifecycle hooks, MCP servers, transports, or JSON-RPC integrations.
|
|
69
54
|
|
|
70
55
|
## Documentation
|
|
71
56
|
|
|
72
|
-
|
|
57
|
+
New to Kward:
|
|
73
58
|
|
|
74
59
|
- [Getting started](doc/getting-started.md): first run, authentication choices, and basic commands.
|
|
75
60
|
- [Usage](doc/usage.md): interactive chat, slash commands, sessions, tools, images, and Pan mode.
|
|
76
61
|
- [Configuration](doc/configuration.md): config files, providers, models, web search, logging, and color output.
|
|
77
|
-
- [Authentication](doc/authentication.md):
|
|
62
|
+
- [Authentication](doc/authentication.md): multi-provider API keys, OpenAI/Anthropic subscription OAuth, Azure setup, and credential safety.
|
|
63
|
+
- [Model providers](doc/providers.md): compare providers and find their runtime IDs, model keys, environment variables, discovery behavior, and limitations.
|
|
64
|
+
|
|
65
|
+
Work safely:
|
|
66
|
+
|
|
78
67
|
- [Security and trust](doc/security.md): local permissions, external data flow, trusted extensions, and safe work in unfamiliar repositories.
|
|
79
68
|
- [Permissions](doc/permissions.md): opt-in tool approval, write scopes, policy rules, and current limits.
|
|
69
|
+
- [Command sandboxing](doc/sandboxing.md): opt-in OS-enforced boundaries for model-requested shell commands.
|
|
80
70
|
- [Troubleshooting](doc/troubleshooting.md): environment-specific install and runtime issues.
|
|
81
71
|
|
|
82
|
-
|
|
72
|
+
Everyday workflows:
|
|
83
73
|
|
|
84
74
|
- [Sessions](doc/session-management.md): resume, clone, fork, rewind, compact, and navigate saved work.
|
|
85
75
|
- [Interactive composer](doc/composer.md): use multiline input, completion, history, files, reasoning shortcuts, busy input, and images.
|
|
86
76
|
- [Tabs](doc/tabs.md): keep several conversations open and run work in another tab.
|
|
87
77
|
- [Project files](doc/files.md): browse, search, mention, open, and edit workspace files.
|
|
88
|
-
- [Integrated
|
|
78
|
+
- [Integrated editor](doc/editor.md): open files from the shell or composer, edit in-place, and choose editor keybindings.
|
|
89
79
|
- [Git](doc/git.md): review changes, use the diff viewer, stage files, and commit from the interactive TUI.
|
|
90
80
|
- [Shell](doc/shell.md): use `/shell`, the embedded Kward shell with aliases, completion, and per-tab state.
|
|
91
81
|
- [Memory](doc/memory.md): opt-in core, soft, and session memory.
|
|
92
82
|
- [Personas](doc/personas.md): configure Kward's tone and role by default, workspace, model, reasoning effort, time, and weekday.
|
|
93
83
|
- [Skills](doc/skills.md): add reusable instructions that load only for matching tasks.
|
|
84
|
+
- [Prompt templates](doc/prompt-templates.md): create reusable slash prompts and use the starter templates installed by `kward init`.
|
|
94
85
|
- [MCP servers](doc/mcp.md): connect trusted local Model Context Protocol tool servers.
|
|
95
86
|
- [Pan mode](doc/pan.md): use the mobile-friendly browser interface on a trusted local network.
|
|
87
|
+
- [Local models](doc/local-models.md): connect Ollama, LM Studio, or llama.cpp and use a minimal replacement prompt.
|
|
96
88
|
|
|
97
|
-
|
|
89
|
+
Extend and integrate:
|
|
98
90
|
|
|
99
|
-
- [Extensibility](doc/extensibility.md): `PRINCIPLES.md`, workspace `AGENTS.md`, skills, prompt templates, and extension
|
|
91
|
+
- [Extensibility](doc/extensibility.md): choose between `PRINCIPLES.md`, workspace `AGENTS.md`, skills, prompt templates, and other extension points.
|
|
100
92
|
- [Plugins](doc/plugins.md): trusted Ruby plugins for commands, footer UI, prompt context, transcript events, and RPC clients.
|
|
101
93
|
- [Lifecycle hooks](doc/lifecycle-hooks.md): deterministic runtime hooks for policy, approvals, automation, and command-hook integrations.
|
|
102
94
|
- [RPC protocol](doc/rpc.md): JSON-RPC backend mode for trusted local UI clients.
|
|
103
95
|
- [Releasing](doc/releasing.md): release checklist for RubyGems publishing.
|
|
96
|
+
|
|
97
|
+
Reference guides:
|
|
98
|
+
|
|
104
99
|
- [Agent tools](doc/agent-tools.md): overview of model-callable tools, token-saving behavior, and tool categories.
|
|
105
100
|
- [Workspace tools](doc/workspace-tools.md): local file, edit, and shell command tools.
|
|
106
101
|
- [Context budgeting](doc/context-budgeting.md): focused context gathering, budgeted reads, output compaction, and token-saving history.
|
|
@@ -108,9 +103,9 @@ Advanced:
|
|
|
108
103
|
- [Code search](doc/code-search.md): package lookup, GitHub repository cache, and external source reading for the code search agent tool.
|
|
109
104
|
- [Context tools](doc/context-tools.md): skills, compacted output retrieval, and structured clarification questions.
|
|
110
105
|
|
|
111
|
-
API
|
|
106
|
+
Generated Ruby API:
|
|
112
107
|
|
|
113
|
-
- [API reference](doc/api.md): generated Ruby API entry points, indexes, and
|
|
108
|
+
- [API reference](doc/api.md): generated Ruby API entry points, indexes, and supported API expectations.
|
|
114
109
|
|
|
115
110
|
## Development
|
|
116
111
|
|
data/doc/agent-tools.md
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Agent tools are the model-callable operations Kward uses to inspect projects, change files, run commands, search outside sources, and ask for clarification. Most users do not call these tools directly. You ask for an outcome in natural language, and Kward decides which tools are needed.
|
|
4
4
|
|
|
5
|
-
Tools
|
|
5
|
+
Tools also enforce important boundaries:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- full tool outputs are kept in the session record for later inspection.
|
|
7
|
+
- Kward validates every tool call before running it.
|
|
8
|
+
- Workspace tools stay inside the active workspace by default (see [Configuration](configuration.md) for the guardrail setting).
|
|
9
|
+
- File-changing tools require the file to be read first.
|
|
10
|
+
- Large outputs are bounded or compacted before they enter model context.
|
|
11
|
+
- Full tool outputs remain available in the session record for later inspection.
|
|
13
12
|
|
|
14
13
|
## Tool categories
|
|
15
14
|
|
|
@@ -22,7 +21,7 @@ Tools are part of Kward's safety and context-management boundary:
|
|
|
22
21
|
|
|
23
22
|
## How tools save tokens
|
|
24
23
|
|
|
25
|
-
Kward tries to
|
|
24
|
+
Kward tries to gather enough evidence without flooding the conversation. It usually starts with focused context tools, then moves from outlines and previews to exact ranges or full files only when needed:
|
|
26
25
|
|
|
27
26
|
- `read_file` reads bounded line ranges, supports continuation with `offset` and `limit`, and accepts explicit `preview`, `outline`, `range`, and `full` modes with optional per-call byte budgets.
|
|
28
27
|
- `context_for_task` builds a task-shaped bundle from ranked files, outlines, and matching excerpts within a caller-supplied byte budget.
|
|
@@ -32,13 +31,13 @@ Kward tries to keep tool context useful without flooding the model. The built-in
|
|
|
32
31
|
- Repeated identical tool output is replaced with a short reference instead of being sent again.
|
|
33
32
|
- Compacted outputs are stored as artifacts that can be reopened with `retrieve_tool_output`, including after resuming a saved session that contains the original tool execution record.
|
|
34
33
|
|
|
35
|
-
When
|
|
34
|
+
When output exceeds 12 KB, Kward keeps the most useful sections in context and stores the original output for later retrieval. The compacted result includes an artifact ID, so Kward can reopen an exact section without repeating the tool call. Error output under 8 KB stays intact so useful failure details are not lost.
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
See [Context budgeting](context-budgeting.md) for the full compaction strategy, limits, and token-saving workflow.
|
|
38
37
|
|
|
39
38
|
## How tools are exposed
|
|
40
39
|
|
|
41
|
-
`Kward::ToolRegistry` builds the available tool objects and the schemas advertised to the model. Some tools are always available in normal CLI/RPC sessions, while others depend on configuration or frontend capability:
|
|
40
|
+
`Kward::ToolRegistry` builds the available tool objects and the schemas advertised to the model. Kward instructs models to call only tools advertised for the current turn; a restricted RPC turn therefore receives schemas only for its selected set. Some tools are always available in normal CLI/RPC sessions, while others depend on configuration or frontend capability:
|
|
42
41
|
|
|
43
42
|
- web tools can be hidden with web search configuration,
|
|
44
43
|
- `read_skill` is advertised only when skills are available,
|
data/doc/api.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# API reference
|
|
2
2
|
|
|
3
|
-
Kward's generated Ruby API documentation is
|
|
3
|
+
Kward's generated Ruby API documentation is for contributors, plugin authors, tool authors, and people building RPC or editor integrations.
|
|
4
4
|
|
|
5
|
-
If you use Kward from the terminal, start with the [user guides](file.README.html#Documentation)
|
|
5
|
+
If you use Kward from the terminal, start with the [user guides](file.README.html#Documentation). This reference also includes internal classes and methods that may change. Treat the behavior described in the guides, the Plugin DSL, and the methods in the [RPC protocol](rpc.md) as Kward's supported public interfaces.
|
|
6
6
|
|
|
7
7
|
## Start here
|
|
8
8
|
|
|
@@ -84,7 +84,7 @@ The generated comments focus on these supported extension boundaries rather than
|
|
|
84
84
|
|
|
85
85
|
## Public API expectations
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
The generated reference is useful for understanding the codebase, but it does not make every class, method, or constructor a supported public API.
|
|
88
88
|
|
|
89
89
|
Prefer the documented guides for supported extension behavior. Use generated class and method pages when you need implementation detail, are contributing to Kward itself, or are coordinating a frontend integration with the current codebase.
|
|
90
90
|
|