kward 0.67.1 → 0.69.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 (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pages.yml +48 -0
  3. data/.yardopts +1 -0
  4. data/CHANGELOG.md +54 -0
  5. data/Gemfile.lock +8 -2
  6. data/README.md +37 -30
  7. data/Rakefile +14 -1
  8. data/doc/authentication.md +84 -43
  9. data/doc/code-search.md +55 -28
  10. data/doc/configuration.md +27 -2
  11. data/doc/extensibility.md +90 -129
  12. data/doc/getting-started.md +53 -57
  13. data/doc/memory.md +51 -118
  14. data/doc/personas.md +417 -0
  15. data/doc/plugins.md +55 -99
  16. data/doc/releasing.md +10 -9
  17. data/doc/rpc.md +7 -7
  18. data/doc/usage.md +125 -141
  19. data/doc/web-search.md +80 -14
  20. data/exe/kward +2 -0
  21. data/kward.gemspec +4 -0
  22. data/lib/kward/agent.rb +30 -3
  23. data/lib/kward/ansi.rb +3 -0
  24. data/lib/kward/auth/anthropic_oauth.rb +291 -0
  25. data/lib/kward/auth/file.rb +2 -0
  26. data/lib/kward/auth/github_oauth.rb +3 -0
  27. data/lib/kward/auth/openai_oauth.rb +4 -0
  28. data/lib/kward/auth/openrouter_api_key.rb +2 -0
  29. data/lib/kward/cancellation.rb +3 -0
  30. data/lib/kward/cli/auth_commands.rb +82 -0
  31. data/lib/kward/cli/commands.rb +229 -0
  32. data/lib/kward/cli/compaction.rb +25 -0
  33. data/lib/kward/cli/doctor.rb +121 -0
  34. data/lib/kward/cli/interactive_turn.rb +227 -0
  35. data/lib/kward/cli/memory_commands.rb +133 -0
  36. data/lib/kward/cli/plugins.rb +112 -0
  37. data/lib/kward/cli/prompt_interface.rb +134 -0
  38. data/lib/kward/cli/rendering.rb +378 -0
  39. data/lib/kward/cli/runtime_helpers.rb +170 -0
  40. data/lib/kward/cli/sessions.rb +376 -0
  41. data/lib/kward/cli/settings.rb +669 -0
  42. data/lib/kward/cli/slash_commands.rb +114 -0
  43. data/lib/kward/cli/stats.rb +64 -0
  44. data/lib/kward/cli/sysprompt.rb +57 -0
  45. data/lib/kward/cli/tool_summaries.rb +157 -0
  46. data/lib/kward/cli.rb +52 -2792
  47. data/lib/kward/cli_transcript_formatter.rb +40 -12
  48. data/lib/kward/clipboard.rb +1 -0
  49. data/lib/kward/compaction/file_operation_tracker.rb +3 -0
  50. data/lib/kward/compactor.rb +31 -9
  51. data/lib/kward/config_files.rb +78 -34
  52. data/lib/kward/conversation.rb +110 -13
  53. data/lib/kward/events.rb +2 -0
  54. data/lib/kward/export_path.rb +2 -0
  55. data/lib/kward/image_attachments.rb +2 -0
  56. data/lib/kward/markdown_transcript.rb +2 -0
  57. data/lib/kward/memory/manager.rb +144 -14
  58. data/lib/kward/message_access.rb +29 -2
  59. data/lib/kward/message_text.rb +45 -0
  60. data/lib/kward/model/chat_invocation.rb +2 -0
  61. data/lib/kward/model/client.rb +295 -77
  62. data/lib/kward/model/context_overflow.rb +2 -0
  63. data/lib/kward/model/context_usage.rb +14 -10
  64. data/lib/kward/model/model_info.rb +160 -4
  65. data/lib/kward/model/payloads.rb +254 -22
  66. data/lib/kward/model/retry_message.rb +2 -0
  67. data/lib/kward/model/stream_parser.rb +387 -25
  68. data/lib/kward/pan/server.rb +3 -1
  69. data/lib/kward/plugin_registry.rb +12 -0
  70. data/lib/kward/private_file.rb +2 -0
  71. data/lib/kward/prompt_interface/banner.rb +3 -0
  72. data/lib/kward/prompt_interface/composer_controller.rb +262 -0
  73. data/lib/kward/prompt_interface/composer_renderer.rb +172 -0
  74. data/lib/kward/prompt_interface/composer_state.rb +221 -0
  75. data/lib/kward/prompt_interface/key_handler.rb +365 -0
  76. data/lib/kward/prompt_interface/layout.rb +31 -0
  77. data/lib/kward/prompt_interface/overlay_renderer.rb +111 -0
  78. data/lib/kward/prompt_interface/prompt_renderer.rb +91 -0
  79. data/lib/kward/prompt_interface/question_prompt.rb +328 -0
  80. data/lib/kward/prompt_interface/runtime_state.rb +59 -0
  81. data/lib/kward/prompt_interface/screen.rb +186 -0
  82. data/lib/kward/prompt_interface/selection_prompt.rb +242 -0
  83. data/lib/kward/prompt_interface/slash_overlay.rb +102 -0
  84. data/lib/kward/prompt_interface/stream_state.rb +65 -0
  85. data/lib/kward/prompt_interface/transcript_buffer.rb +85 -0
  86. data/lib/kward/prompt_interface/transcript_renderer.rb +151 -0
  87. data/lib/kward/prompt_interface.rb +69 -1832
  88. data/lib/kward/prompts/commands.rb +2 -0
  89. data/lib/kward/prompts/templates.rb +3 -0
  90. data/lib/kward/prompts.rb +63 -7
  91. data/lib/kward/question_contract.rb +66 -0
  92. data/lib/kward/resources/avatar_kward_logo.rb +2 -0
  93. data/lib/kward/resources/pixel_logo.rb +2 -0
  94. data/lib/kward/rpc/attachment_normalizer.rb +60 -0
  95. data/lib/kward/rpc/auth_manager.rb +65 -11
  96. data/lib/kward/rpc/config_manager.rb +11 -0
  97. data/lib/kward/rpc/prompt_bridge.rb +5 -26
  98. data/lib/kward/rpc/redactor.rb +3 -0
  99. data/lib/kward/rpc/runtime_payloads.rb +4 -1
  100. data/lib/kward/rpc/server.rb +43 -11
  101. data/lib/kward/rpc/session_manager.rb +139 -347
  102. data/lib/kward/rpc/session_metrics.rb +68 -0
  103. data/lib/kward/rpc/session_tree.rb +48 -0
  104. data/lib/kward/rpc/session_tree_rows.rb +208 -0
  105. data/lib/kward/rpc/tool_event_normalizer.rb +3 -0
  106. data/lib/kward/rpc/tool_metadata.rb +3 -0
  107. data/lib/kward/rpc/transcript_normalizer.rb +50 -0
  108. data/lib/kward/rpc/transport.rb +3 -0
  109. data/lib/kward/session_diff.rb +2 -0
  110. data/lib/kward/session_store.rb +154 -25
  111. data/lib/kward/session_trash.rb +1 -0
  112. data/lib/kward/session_tree_renderer.rb +8 -41
  113. data/lib/kward/session_tree_tool_display.rb +56 -0
  114. data/lib/kward/skills/registry.rb +3 -0
  115. data/lib/kward/starter_pack_installer.rb +3 -2
  116. data/lib/kward/steering.rb +2 -0
  117. data/lib/kward/telemetry/logger.rb +3 -0
  118. data/lib/kward/telemetry/stats.rb +3 -0
  119. data/lib/kward/tools/ask_user_question.rb +20 -32
  120. data/lib/kward/tools/base.rb +8 -0
  121. data/lib/kward/tools/code_search.rb +5 -0
  122. data/lib/kward/tools/edit_file.rb +5 -0
  123. data/lib/kward/tools/fetch_content.rb +41 -0
  124. data/lib/kward/tools/fetch_raw.rb +40 -0
  125. data/lib/kward/tools/list_directory.rb +5 -0
  126. data/lib/kward/tools/read_file.rb +5 -0
  127. data/lib/kward/tools/read_skill.rb +5 -0
  128. data/lib/kward/tools/registry.rb +42 -4
  129. data/lib/kward/tools/run_shell_command.rb +5 -0
  130. data/lib/kward/tools/search/code.rb +7 -0
  131. data/lib/kward/tools/search/web.rb +20 -17
  132. data/lib/kward/tools/search/web_fetch.rb +202 -0
  133. data/lib/kward/tools/tool_call.rb +27 -5
  134. data/lib/kward/tools/web_search.rb +7 -1
  135. data/lib/kward/tools/write_file.rb +5 -0
  136. data/lib/kward/transcript_export.rb +2 -0
  137. data/lib/kward/version.rb +2 -1
  138. data/lib/kward/workspace.rb +45 -5
  139. data/templates/default/fulldoc/html/css/kward.css +1501 -0
  140. data/templates/default/fulldoc/html/images/kward_logo.png +0 -0
  141. data/templates/default/fulldoc/html/js/kward.js +296 -0
  142. data/templates/default/fulldoc/html/setup.rb +8 -0
  143. data/templates/default/layout/html/breadcrumb.erb +11 -0
  144. data/templates/default/layout/html/layout.erb +141 -0
  145. data/templates/default/layout/html/setup.rb +139 -0
  146. metadata +56 -1
data/doc/plugins.md CHANGED
@@ -1,18 +1,25 @@
1
1
  # Plugins
2
2
 
3
- Plugins are Kward's trusted local extension system. They let you add project or personal workflow features without changing Kward itself.
3
+ Plugins are trusted local Ruby extensions for Kward. Use them when you need behavior that prompts, skills, or instructions cannot provide.
4
4
 
5
- A plugin can:
5
+ Good plugin use cases:
6
6
 
7
- - add interactive slash commands,
8
- - expose commands through the RPC backend,
9
- - render a custom terminal footer,
10
- - inject concise prompt context into future model requests,
11
- - observe live transcript events such as assistant output, tool calls, and retries.
7
+ - add a slash command for a personal workflow,
8
+ - show project/session status in the terminal footer,
9
+ - add concise local context to prompts,
10
+ - log or observe transcript events,
11
+ - expose local commands to an RPC client.
12
12
 
13
- Plugins are plain Ruby files. They run inside the Kward process with your local user permissions, so install only plugins you trust.
13
+ Plugins run inside the Kward process with your user permissions. Install only plugins you trust.
14
14
 
15
- Use a prompt template when reusable text is enough. Use a skill when you need reusable instructions. Use a plugin when you need local Ruby behavior, file or network integration, custom commands, or transcript observers.
15
+ ## When to use a plugin
16
+
17
+ | Need | Better choice |
18
+ | --- | --- |
19
+ | Reusable prompt text | prompt template |
20
+ | Reusable model instructions | skill |
21
+ | Repository rules | `AGENTS.md` |
22
+ | Local Ruby code or integration | plugin |
16
23
 
17
24
  ## Where plugins live
18
25
 
@@ -22,9 +29,7 @@ Kward loads top-level Ruby files from:
22
29
  ~/.kward/plugins/*.rb
23
30
  ```
24
31
 
25
- Plugins are intentionally **not** loaded from the current workspace, from a project repository, or from a custom `KWARD_CONFIG_PATH` directory. This keeps plugin loading tied to the local user account rather than to whatever project Kward is currently inspecting.
26
-
27
- If a legacy plugin directory exists beside a custom config path, Kward warns and ignores it.
32
+ Plugins are not loaded from the current workspace or a custom `KWARD_CONFIG_PATH` directory. This prevents a project checkout from silently adding executable Ruby code to Kward.
28
33
 
29
34
  ## A first plugin
30
35
 
@@ -34,12 +39,12 @@ Create the plugin directory:
34
39
  mkdir -p ~/.kward/plugins
35
40
  ```
36
41
 
37
- Then create `~/.kward/plugins/hello.rb`:
42
+ Create `~/.kward/plugins/hello.rb`:
38
43
 
39
44
  ```ruby
40
45
  Kward.plugin do |plugin|
41
46
  plugin.command "hello", description: "Say hello", argument_hint: "[name]" do |args, ctx|
42
- name = args.strip.empty? ? "captain" : args.strip
47
+ name = args.strip.empty? ? "there" : args.strip
43
48
  ctx.say("Hello, #{name}.")
44
49
  end
45
50
  end
@@ -51,41 +56,28 @@ Start Kward and run:
51
56
  /hello Kai
52
57
  ```
53
58
 
54
- Plugin commands appear in interactive slash completion and in RPC command listings.
55
-
56
- ## Slash commands
59
+ ## Add a slash command
57
60
 
58
- Register a command with `plugin.command`:
61
+ Use plugin commands for local actions that should not call the model.
59
62
 
60
63
  ```ruby
61
64
  Kward.plugin do |plugin|
62
65
  plugin.command "session-info", description: "Show session details" do |_args, ctx|
63
66
  ctx.say("Session: #{ctx.session_name || ctx.session_id || 'unnamed'}")
64
- ctx.say("Path: #{ctx.session_path || 'not saved'}")
65
67
  ctx.say("Workspace: #{ctx.workspace_root}")
66
68
  end
67
69
  end
68
70
  ```
69
71
 
70
- Command names:
71
-
72
- - do not include the leading `/`,
73
- - must start with a letter or number,
74
- - may contain letters, numbers, `_`, and `-`,
75
- - cannot replace built-in commands or prompt-template commands.
76
-
77
- If a plugin command conflicts with a reserved or duplicate command, Kward skips it and prints a warning.
72
+ Command names do not include `/`. They must start with a letter or number and may contain letters, numbers, `_`, and `-`.
78
73
 
79
- Command handlers receive:
74
+ A plugin command cannot replace a built-in command or prompt-template command.
80
75
 
81
- - `args`: the raw text after the command name,
82
- - `ctx`: a plugin context object.
76
+ ## Add prompt context
83
77
 
84
- Use `ctx.say(message)` for user-visible output.
78
+ Prompt context is short text injected into future model requests.
85
79
 
86
- ## Prompt context
87
-
88
- Plugins can add concise context to future system prompts:
80
+ Use it for stable facts the model should know, not for large files or secrets.
89
81
 
90
82
  ```ruby
91
83
  Kward.plugin do |plugin|
@@ -97,37 +89,29 @@ Kward.plugin do |plugin|
97
89
  end
98
90
  ```
99
91
 
100
- Prompt context is injected after personas and before skills/workspace instructions. Keep it short and stable. Long or noisy prompt context will be sent repeatedly to the model and can reduce useful context space.
101
-
102
- If plugin state changes and the active conversation should rebuild its system message, call:
92
+ If plugin state changes and Kward should rebuild the active system message, call:
103
93
 
104
94
  ```ruby
105
95
  ctx.refresh_system_message!
106
96
  ```
107
97
 
108
- from a command or event handler.
98
+ ## Add a footer
109
99
 
110
- ## Custom footer
111
-
112
- A plugin can render one custom footer for the terminal UI:
100
+ A footer can show compact local status in the terminal UI:
113
101
 
114
102
  ```ruby
115
103
  Kward.plugin do |plugin|
116
104
  plugin.footer do |ctx|
117
- name = ctx.session_name || "unnamed"
118
- messages = ctx.transcript.messages.length
119
- "#{name} • #{messages} messages"
105
+ "#{ctx.session_name || 'unnamed'} • #{ctx.transcript.messages.length} messages"
120
106
  end
121
107
  end
122
108
  ```
123
109
 
124
- Only one footer renderer is active. If multiple plugins register footers, the later one replaces the earlier one and Kward prints a warning.
110
+ Only one footer is active. If multiple plugins register footers, the later one replaces the earlier one and Kward prints a warning.
125
111
 
126
- Footer errors are caught and printed as warnings so they do not break the session.
112
+ ## Observe transcript events
127
113
 
128
- ## Transcript events
129
-
130
- Plugins can observe live transcript stream events:
114
+ Use transcript events when you need to log or react to live activity:
131
115
 
132
116
  ```ruby
133
117
  Kward.plugin do |plugin|
@@ -141,7 +125,9 @@ Kward.plugin do |plugin|
141
125
  end
142
126
  ```
143
127
 
144
- Supported event types include:
128
+ Event payloads are read-only copies. Handler errors are caught and printed as warnings.
129
+
130
+ Common event types include:
145
131
 
146
132
  - `reasoning_delta`
147
133
  - `assistant_delta`
@@ -152,28 +138,24 @@ Supported event types include:
152
138
  - `tool_result`
153
139
  - `answer`
154
140
 
155
- Event payloads are deep-frozen copies. Treat them as read-only.
156
-
157
- Transcript-event handler errors are caught and printed as warnings.
158
-
159
- ## Plugin context API
141
+ ## Plugin context
160
142
 
161
- Plugin handlers receive a `ctx` object with:
143
+ Handlers receive a `ctx` object. Common methods:
162
144
 
163
- - `ctx.args` - raw command arguments for contexts that have them.
164
- - `ctx.workspace_root` - active workspace path.
165
- - `ctx.transcript.messages` - deep-frozen copy of active conversation messages.
166
- - `ctx.say(message)` - emit output to the active frontend when available.
167
- - `ctx.session_id` - current persisted session ID when available.
168
- - `ctx.session_name` - current session name when available.
169
- - `ctx.session_path` - current session file path when available.
170
- - `ctx.refresh_system_message!` - rebuild the active conversation system message.
145
+ - `ctx.workspace_root`
146
+ - `ctx.args`
147
+ - `ctx.say(message)`
148
+ - `ctx.transcript.messages`
149
+ - `ctx.session_id`
150
+ - `ctx.session_name`
151
+ - `ctx.session_path`
152
+ - `ctx.refresh_system_message!`
171
153
 
172
- The transcript is read-only by design. Plugins should use Kward APIs exposed through the context rather than mutating conversation internals.
154
+ The transcript is read-only. Use context methods instead of mutating Kward internals.
173
155
 
174
156
  ## RPC support
175
157
 
176
- Plugins are available to both the CLI and the experimental RPC backend.
158
+ Plugins are available in the CLI and experimental RPC backend.
177
159
 
178
160
  RPC clients can:
179
161
 
@@ -181,43 +163,17 @@ RPC clients can:
181
163
  - run plugin commands through `commands/run`,
182
164
  - run plugin slash commands through `turns/start` input such as `/hello Kai`.
183
165
 
184
- When a plugin command is run as a turn, Kward emits command output through normal turn events without calling the model.
166
+ Plugin command output is emitted through normal turn events without calling the model.
185
167
 
186
- ## Security model
168
+ ## Security
187
169
 
188
- Plugins are trusted local Ruby code. A plugin can read and write files, run commands, make network requests, and access process environment variables just like any Ruby code running as your user.
170
+ Plugins are local Ruby code. They can read files, write files, run commands, make network requests, and read environment variables as your user.
189
171
 
190
172
  Recommended practices:
191
173
 
192
174
  - Install plugins only from sources you trust.
193
175
  - Keep plugins in your personal `~/.kward/plugins` directory.
194
- - Do not place secrets directly in plugin files if they will be shared.
195
- - Prefer user-specific config or environment variables for credentials.
196
- - Keep prompt context concise and avoid injecting secrets into model prompts.
197
- - Be careful when writing transcript observers that persist conversation content.
198
-
199
- ## Complete example
200
-
201
- ```ruby
202
- Kward.plugin do |plugin|
203
- plugin.command "last-message", description: "Show transcript size" do |_args, ctx|
204
- ctx.say("Messages: #{ctx.transcript.messages.length}")
205
- end
206
-
207
- plugin.footer do |ctx|
208
- "#{ctx.session_name || 'unnamed'} • #{ctx.transcript.messages.length} messages"
209
- end
210
-
211
- plugin.prompt_context do |_ctx|
212
- "Project background: prefer small, focused changes."
213
- end
214
-
215
- plugin.on_transcript_event do |event, ctx|
216
- next unless event.type == "assistant_delta"
217
-
218
- File.open(File.join(ctx.workspace_root, ".assistant-stream.log"), "a") do |file|
219
- file.write(event.payload[:delta])
220
- end
221
- end
222
- end
223
- ```
176
+ - Do not put secrets in shared plugin files.
177
+ - Prefer environment variables or private config for credentials.
178
+ - Keep prompt context short and never inject secrets into model prompts.
179
+ - Be careful with transcript observers that persist conversation content.
data/doc/releasing.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Releasing Kward
2
2
 
3
- Release steps that can be completed before publishing:
3
+ Release steps before publishing:
4
4
 
5
5
  1. Update `CHANGELOG.md` for the version.
6
6
  2. Update `Kward::VERSION` in `lib/kward/version.rb`.
@@ -14,9 +14,11 @@ Release steps that can be completed before publishing:
14
14
 
15
15
  ```bash
16
16
  bundle exec rake rdoc
17
- bundle exec yard doc
17
+ bundle exec rake docs:build
18
18
  ```
19
19
 
20
+ Pushes to `main` deploy the generated YARD site to GitHub Pages.
21
+
20
22
  5. Build the gem locally:
21
23
 
22
24
  ```bash
@@ -26,11 +28,10 @@ Release steps that can be completed before publishing:
26
28
  6. Inspect the packaged files and confirm no local config, sessions, logs, or secrets are included.
27
29
  7. Install the built gem locally and smoke test the `kward` executable.
28
30
 
29
- RubyGems setup before the first public release:
31
+ Publish the built gem from the release checkout:
32
+
33
+ ```bash
34
+ gem push kward-VERSION.gem
35
+ ```
30
36
 
31
- 1. Create or sign in to a RubyGems.org account.
32
- 2. Enable multi-factor authentication for the account.
33
- 3. Confirm the `kward` gem name is available.
34
- 4. Add final homepage, source code, changelog, documentation, and bug tracker metadata to `kward.gemspec` once the public repository URLs are final.
35
- 5. Prefer RubyGems trusted publishing for automated releases so long-lived API keys do not need to be stored in CI secrets.
36
- 6. Push the built gem or publish through the trusted publishing workflow.
37
+ RubyGems MFA is required for publishing. Prefer RubyGems trusted publishing for automated releases if CI publishing is added later, so long-lived API keys do not need to be stored in CI secrets.
data/doc/rpc.md CHANGED
@@ -59,7 +59,7 @@ Detailed capability fields include:
59
59
  - `models`: model/reasoning RPC methods, explicit OpenRouter catalog listing, exposed model fields, and no scoped model support.
60
60
  - `runtime`: supported state/stats methods with message-count stats and OpenAI/Codex context usage. Cumulative token and cost stats are not computed.
61
61
  - `runtimeSettings`: live `runtime/updateSetting` support for `defaultModel` and `defaultThinkingLevel`, plus `runtime/reload`.
62
- - `auth`: Tauren auth provider format, OpenAI OAuth, OpenRouter API-key login, and provider logout for stored credentials.
62
+ - `auth`: Tauren auth provider format, OpenAI and Anthropic OAuth, OpenRouter API-key login, and provider logout for stored credentials.
63
63
  - `memory`: opt-in structured memory support, interactive prompt injection only, JSON/JSONL local storage, and dedicated `memory/*` methods.
64
64
  - `commands`: supported `commands/list` capability for prompt, skill, and plugin command sources, plus plugin execution through `commands/run` or plugin slash turns.
65
65
  - `startupResources`: supported startup resource listing for context, skills, prompts, and plugins.
@@ -554,7 +554,7 @@ Params:
554
554
 
555
555
  - `sessionId`: active RPC session ID.
556
556
 
557
- Returns stable startup sections for configured context (`AGENTS.md`), skills, prompt templates, and plugin slash commands.
557
+ Returns stable startup sections for configured context (`PRINCIPLES.md`, or legacy `AGENTS.md`), skills, prompt templates, and plugin slash commands.
558
558
 
559
559
  ### `prompts/list`
560
560
 
@@ -589,11 +589,11 @@ Updates config, including secret values, and returns a redacted config object. T
589
589
 
590
590
  ### `auth/status`
591
591
 
592
- Returns whether OpenAI OAuth, OpenAI access token env, and OpenRouter API key env/config are available.
592
+ Returns whether OpenAI OAuth, Anthropic OAuth, OpenAI access token env, and OpenRouter API key env/config are available.
593
593
 
594
594
  ### `auth/providers`
595
595
 
596
- Returns Tauren-compatible provider cards for OpenAI OAuth and OpenRouter API-key auth. Provider cards report whether credentials are configured, whether they came from stored config or environment variables, and whether stored credentials can be removed.
596
+ Returns Tauren-compatible provider cards for OpenAI OAuth, Anthropic OAuth, OpenRouter API-key auth, and GitHub/Copilot status. Provider cards report whether credentials are configured, whether they came from stored config or environment variables, and whether stored credentials can be removed.
597
597
 
598
598
  ### `auth/loginWithApiKey`
599
599
 
@@ -608,7 +608,7 @@ Stores the API key with `0600` file permissions, refreshes client config, and re
608
608
 
609
609
  Params:
610
610
 
611
- - `providerId`: `openai` or `openrouter`.
611
+ - `providerId`: `openai`, `anthropic`, or `openrouter`.
612
612
 
613
613
  Removes stored credentials only. Environment variables remain active and are still reported by `auth/providers`.
614
614
 
@@ -616,10 +616,10 @@ Removes stored credentials only. Environment variables remain active and are sti
616
616
 
617
617
  Params:
618
618
 
619
- - `providerId`: currently `openai`.
619
+ - `providerId`: currently `openai` or `anthropic`.
620
620
  - `timeoutSeconds`: optional callback wait timeout.
621
621
 
622
- Provider-scoped wrapper around the OpenAI OAuth flow. The result includes `providerId`, `loginId`, `authorizationUrl`, `redirectUri`, and `status`.
622
+ Provider-scoped wrapper around the OpenAI or Anthropic OAuth flow. The result includes `providerId`, `loginId`, `authorizationUrl`, `redirectUri`, and `status`.
623
623
 
624
624
  ### `auth/startOpenAILogin`
625
625