@ai-agent-forge/agent-forge 0.88.1 → 0.88.2

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 (143) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/bundled-plugins/agent-loop-policy/agent-forge.json +1 -1
  3. package/bundled-plugins/agent-loop-policy/plugin.json +1 -1
  4. package/bundled-plugins/coding-tools/agent-forge.json +1 -1
  5. package/bundled-plugins/coding-tools/plugin.json +1 -1
  6. package/bundled-plugins/compaction-policy/agent-forge.json +1 -1
  7. package/bundled-plugins/compaction-policy/plugin.json +1 -1
  8. package/bundled-plugins/overflow-policy/agent-forge.json +1 -1
  9. package/bundled-plugins/overflow-policy/plugin.json +1 -1
  10. package/bundled-plugins/provider-failover/agent-forge.json +1 -1
  11. package/bundled-plugins/provider-failover/plugin.json +1 -1
  12. package/bundled-plugins/retry-policy/agent-forge.json +1 -1
  13. package/bundled-plugins/retry-policy/plugin.json +1 -1
  14. package/dist/bundle/.build-manifest.json +68 -58
  15. package/dist/bundle/chunks/{chunk-D3ARGZFR.js → chunk-44I47ACN.js} +3 -3
  16. package/dist/bundle/chunks/{chunk-Z72JWUZ4.js → chunk-6F5JWGKE.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-LZOEQITZ.js → chunk-HTC5K5SM.js} +56 -45
  18. package/dist/bundle/chunks/{chunk-AQLNTW2B.js → chunk-LSP24WNH.js} +8 -7
  19. package/dist/bundle/chunks/image-resize-worker.js +3 -3
  20. package/dist/bundle/chunks/{virtual-modules-WF6WRHP7.js → virtual-modules-MRXD3RWG.js} +1 -1
  21. package/dist/bundle/cli.js +1 -1
  22. package/dist/bundle/client.js +1 -1
  23. package/dist/bundle/index.js +1 -1
  24. package/dist/bundle/rpc-entry.js +1 -1
  25. package/dist/cli/plugin-command.d.ts.map +1 -1
  26. package/dist/cli/plugin-command.js +8 -2
  27. package/dist/cli/plugin-command.js.map +1 -1
  28. package/dist/core/agent-session-internal.d.ts +2 -0
  29. package/dist/core/agent-session-internal.d.ts.map +1 -1
  30. package/dist/core/agent-session-internal.js.map +1 -1
  31. package/dist/core/agent-session-services.d.ts +2 -0
  32. package/dist/core/agent-session-services.d.ts.map +1 -1
  33. package/dist/core/agent-session-services.js +1 -0
  34. package/dist/core/agent-session-services.js.map +1 -1
  35. package/dist/core/agent-session-store.d.ts.map +1 -1
  36. package/dist/core/agent-session-store.js +6 -1
  37. package/dist/core/agent-session-store.js.map +1 -1
  38. package/dist/core/agent-session-tools.d.ts.map +1 -1
  39. package/dist/core/agent-session-tools.js +13 -0
  40. package/dist/core/agent-session-tools.js.map +1 -1
  41. package/dist/core/agent-session.d.ts +24 -0
  42. package/dist/core/agent-session.d.ts.map +1 -1
  43. package/dist/core/agent-session.js +58 -4
  44. package/dist/core/agent-session.js.map +1 -1
  45. package/dist/core/i18n/locales/zh-cn/cli.d.ts.map +1 -1
  46. package/dist/core/i18n/locales/zh-cn/cli.js +2 -0
  47. package/dist/core/i18n/locales/zh-cn/cli.js.map +1 -1
  48. package/dist/core/i18n/locales/zh-cn/index.d.ts.map +1 -1
  49. package/dist/core/i18n/locales/zh-cn/index.js +2 -0
  50. package/dist/core/i18n/locales/zh-cn/index.js.map +1 -1
  51. package/dist/core/i18n/locales/zh-cn/interactive-mode.d.ts.map +1 -1
  52. package/dist/core/i18n/locales/zh-cn/interactive-mode.js +5 -0
  53. package/dist/core/i18n/locales/zh-cn/interactive-mode.js.map +1 -1
  54. package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts +7 -0
  55. package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts.map +1 -0
  56. package/dist/core/i18n/locales/zh-cn/session-cleanup.js +15 -0
  57. package/dist/core/i18n/locales/zh-cn/session-cleanup.js.map +1 -0
  58. package/dist/core/i18n/locales/zh-cn/slash-commands.d.ts.map +1 -1
  59. package/dist/core/i18n/locales/zh-cn/slash-commands.js +1 -0
  60. package/dist/core/i18n/locales/zh-cn/slash-commands.js.map +1 -1
  61. package/dist/core/sdk.d.ts.map +1 -1
  62. package/dist/core/sdk.js +24 -1
  63. package/dist/core/sdk.js.map +1 -1
  64. package/dist/core/session-cleanup.d.ts +49 -0
  65. package/dist/core/session-cleanup.d.ts.map +1 -0
  66. package/dist/core/session-cleanup.js +159 -0
  67. package/dist/core/session-cleanup.js.map +1 -0
  68. package/dist/core/session-index.d.ts +75 -0
  69. package/dist/core/session-index.d.ts.map +1 -0
  70. package/dist/core/session-index.js +455 -0
  71. package/dist/core/session-index.js.map +1 -0
  72. package/dist/core/session-manager.d.ts +9 -0
  73. package/dist/core/session-manager.d.ts.map +1 -1
  74. package/dist/core/session-manager.js +202 -47
  75. package/dist/core/session-manager.js.map +1 -1
  76. package/dist/core/slash-commands.d.ts.map +1 -1
  77. package/dist/core/slash-commands.js +5 -0
  78. package/dist/core/slash-commands.js.map +1 -1
  79. package/dist/core/system-prompt.d.ts.map +1 -1
  80. package/dist/core/system-prompt.js +12 -1
  81. package/dist/core/system-prompt.js.map +1 -1
  82. package/dist/core/tools/capability-mount.d.ts +40 -0
  83. package/dist/core/tools/capability-mount.d.ts.map +1 -0
  84. package/dist/core/tools/capability-mount.js +112 -0
  85. package/dist/core/tools/capability-mount.js.map +1 -0
  86. package/dist/main.d.ts.map +1 -1
  87. package/dist/main.js +1 -0
  88. package/dist/main.js.map +1 -1
  89. package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
  90. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  91. package/dist/modes/interactive/components/assistant-message.js +27 -5
  92. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  93. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  94. package/dist/modes/interactive/components/session-selector-search.js +5 -1
  95. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  96. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  97. package/dist/modes/interactive/components/session-selector.js +9 -0
  98. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  99. package/dist/modes/interactive/components/tool-execution.d.ts +17 -0
  100. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  101. package/dist/modes/interactive/components/tool-execution.js +43 -0
  102. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  103. package/dist/modes/interactive/components/tool-run-group.d.ts +44 -0
  104. package/dist/modes/interactive/components/tool-run-group.d.ts.map +1 -0
  105. package/dist/modes/interactive/components/tool-run-group.js +121 -0
  106. package/dist/modes/interactive/components/tool-run-group.js.map +1 -0
  107. package/dist/modes/interactive/interactive-commands.d.ts +2 -0
  108. package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
  109. package/dist/modes/interactive/interactive-commands.js +7 -0
  110. package/dist/modes/interactive/interactive-commands.js.map +1 -1
  111. package/dist/modes/interactive/interactive-mode.d.ts +18 -0
  112. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  113. package/dist/modes/interactive/interactive-mode.js +85 -3
  114. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  115. package/dist/plugins/ecosystem/cli.d.ts.map +1 -1
  116. package/dist/plugins/ecosystem/cli.js +6 -3
  117. package/dist/plugins/ecosystem/cli.js.map +1 -1
  118. package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts +7 -1
  119. package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts.map +1 -1
  120. package/dist/plugins/ecosystem/node-plugin-bootstrap.js +50 -3
  121. package/dist/plugins/ecosystem/node-plugin-bootstrap.js.map +1 -1
  122. package/dist/plugins/ecosystem/plugin-bootstrap.d.ts +28 -16
  123. package/dist/plugins/ecosystem/plugin-bootstrap.d.ts.map +1 -1
  124. package/dist/plugins/ecosystem/plugin-bootstrap.js +35 -33
  125. package/dist/plugins/ecosystem/plugin-bootstrap.js.map +1 -1
  126. package/dist/profile/plugin-profiles.d.ts +1 -1
  127. package/dist/profile/plugin-profiles.d.ts.map +1 -1
  128. package/dist/profile/plugin-profiles.js +18 -0
  129. package/dist/profile/plugin-profiles.js.map +1 -1
  130. package/dist/profiles/builtin-suites.d.ts +14 -4
  131. package/dist/profiles/builtin-suites.d.ts.map +1 -1
  132. package/dist/profiles/builtin-suites.js +20 -5
  133. package/dist/profiles/builtin-suites.js.map +1 -1
  134. package/docs/settings.md +354 -354
  135. package/docs/usage.md +292 -292
  136. package/examples/extensions/with-deps/package-lock.json +2 -2
  137. package/examples/extensions/with-deps/package.json +1 -1
  138. package/examples/extensions/with-deps/plugin.json +1 -1
  139. package/package.json +1 -1
  140. package/examples/extensions/mcp-stdio/index.d.ts +0 -64
  141. package/examples/extensions/mcp-stdio/index.d.ts.map +0 -1
  142. package/examples/extensions/mcp-stdio/index.js +0 -292
  143. package/examples/extensions/mcp-stdio/index.js.map +0 -1
package/docs/usage.md CHANGED
@@ -1,292 +1,292 @@
1
- # Using Agent Forge
2
-
3
- This page collects day-to-day usage details that do not fit on the quickstart page.
4
-
5
- ## Interactive Mode
6
-
7
- <p align="center"><img src="images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
8
-
9
- The interface has four main areas:
10
-
11
- - **Startup header** - shortcuts, loaded context files, prompt templates, skills, and themes
12
- - **Messages** - user messages, assistant responses, tool calls, tool results, notifications, and errors
13
- - **Editor** - where you type; border color indicates the current thinking level
14
- - **Footer** - working directory, session name, token/cache usage, cost, context usage, and current model. Totals include assistant responses, usage reported by tools, and summary generation.
15
-
16
- The editor can be replaced temporarily by built-in UI such as `/settings` or `/model`.
17
-
18
- ### Editor Features
19
-
20
- | Feature | How |
21
- |---------|-----|
22
- | File reference | Type `@` to fuzzy-search project files |
23
- | Path completion | Press Tab to complete paths |
24
- | Multi-line input | Shift+Enter, or Ctrl+Enter on Windows Terminal |
25
- | Copy response | Ctrl+X copies the selected message in `/tree`; otherwise it copies the last assistant message, or the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled |
26
- | Images | Paste with Ctrl+V, Alt+V on Windows, or drag into the terminal |
27
- | Shell command | `!command` runs and sends output to the model |
28
- | Hidden shell command | `!!command` runs without sending output to the model |
29
- | External editor | Ctrl+G opens `externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere |
30
-
31
- See [Keybindings](keybindings.md) for all shortcuts and customization.
32
-
33
- ## Slash Commands
34
-
35
- Type `/` in the editor to open command completion. Capability plugins can register custom commands, skills are available as `/skill:name`, and prompt templates expand via `/templatename`.
36
-
37
- | Command | Description |
38
- |---------|-------------|
39
- | `/login`, `/logout` | Manage OAuth or API-key credentials |
40
- | [`/llama`](llama-cpp.md) | Download, load, and unload llama.cpp router models |
41
- | `/model` | Switch models; Ctrl+S in the picker saves the startup default |
42
- | `/thinking` | Switch thinking level; Ctrl+S in the picker saves the startup default |
43
- | `/scoped-models` | Enable/disable models for model cycling (bindable, no default key) |
44
- | `/settings` | Theme, message delivery, transport, and other preferences |
45
- | `/resume` | Pick from previous sessions |
46
- | `/new` | Start a new session |
47
- | `/name <name>` | Set session display name |
48
- | `/session` | Show session file, ID, messages, tokens, and cost |
49
- | `/tree` | Jump to any point in the session and continue from there |
50
- | `/fork` | Create a new session from a previous user message |
51
- | `/clone` | Duplicate the current active branch into a new session |
52
- | `/compact [prompt]` | Manually compact context, optionally with custom instructions |
53
- | `/copy` | Copy last assistant message to clipboard |
54
- | `/export [file]` | Export session to HTML or JSONL |
55
- | `/import <file>` | Import and resume a session from a JSONL file |
56
- | `/share` | 由显式安装的 session-share 插件提供;核心不内置 |
57
- | `/reload` | Reload keybindings, skills, prompts, themes, and context files |
58
- | `/hotkeys` | Show all keyboard shortcuts |
59
- | `/changelog` | Display version history |
60
- | `/quit` | Quit Agent Forge |
61
-
62
- ## Message Queue
63
-
64
- You can submit messages while the agent is still working:
65
-
66
- - **Enter** queues a steering message, delivered after the current assistant turn finishes executing its tool calls.
67
- - **`/queue <text>`** queues a follow-up message, delivered after the agent finishes all work.
68
- - **Escape** aborts and restores queued messages to the editor.
69
- - **`/dequeue`** restores queued messages back to the editor.
70
- - **`/queue-list`** opens the queued-message manager (both queues): reorder entries with alt+up / alt+down, delete one with delete, recall one to the editor with enter, close with escape.
71
-
72
- Follow-up queueing and dequeue are command-only by default (their shipped keybinding defaults were cleared per the single-entry-point rule, 2026-10-01); bind `app.message.followUp` / `app.message.dequeue` in `keybindings.json` if you want keys (see [Keybindings](keybindings.md)).
73
-
74
- Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
75
-
76
- ## Sessions
77
-
78
- Sessions are saved automatically to `~/.agent-forge/agent/sessions/`, organized by working directory.
79
-
80
- ```bash
81
- agent-forge -c # Continue most recent session
82
- agent-forge -r # Browse and select a session
83
- agent-forge --no-session # Ephemeral mode; do not save
84
- agent-forge --name "my task" # Set session display name at startup
85
- agent-forge --session <path|id> # Use a specific session file or session ID
86
- agent-forge --fork <path|id> # Fork a session into a new session file
87
- ```
88
-
89
- Useful session commands:
90
-
91
- - `/session` shows the current session file and ID.
92
- - `/tree` navigates the in-file session tree and can summarize abandoned branches.
93
- - `/fork` creates a new session from an earlier user message.
94
- - `/clone` duplicates the current active branch into a new session file.
95
- - `/compact` summarizes older messages to free context.
96
-
97
- See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
98
-
99
- ## Context Files
100
-
101
- Agent Forge loads `AGENTS.md` or `CLAUDE.md` at startup from:
102
-
103
- - `~/.agent-forge/agent/AGENTS.md` for global instructions
104
- - parent directories, walking up from the current working directory
105
- - the current directory
106
-
107
- If a directory contains `AGENTS.override.md`, Agent Forge loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory. Context files from other directories still layer normally.
108
-
109
- Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
110
-
111
- ### System Prompt Files
112
-
113
- Replace the default system prompt with:
114
-
115
- - `.agent-forge/SYSTEM.md` for a project
116
- - `~/.agent-forge/agent/SYSTEM.md` globally
117
-
118
- Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
119
-
120
- ## Exporting and Sharing Sessions
121
-
122
- Use `/export [file]` to write a session to HTML.
123
-
124
- Install and configure the optional `session-share` plugin before using `/share`; the core does not provide a built-in sharing transport.
125
-
126
- If you publish sessions for model, prompt, tool, or evaluation research, choose a destination and publication workflow that match your own privacy requirements.
127
-
128
- ## CLI Reference
129
-
130
- ```bash
131
- agent-forge [options] [--] [@files...] [messages...]
132
- ```
133
-
134
- ### Package Commands
135
-
136
- ```bash
137
- agent-forge install <source> [-l] # Install package, -l for project-local
138
- agent-forge remove <source> [-l] # Remove package
139
- agent-forge uninstall <source> [-l] # Alias for remove
140
- agent-forge update [source|self|agent-forge] # Update Agent Forge or one package source
141
- agent-forge update --all # Update Agent Forge and packages; reconcile pinned git refs
142
- agent-forge update --packages # Update packages only; reconcile pinned git refs
143
- agent-forge update --models # Refresh model catalogs only
144
- agent-forge update --self # Update Agent Forge only
145
- agent-forge update --package <src> # Update one package
146
- agent-forge list # List installed packages
147
- agent-forge config # Enable/disable package resources
148
- ```
149
-
150
- These commands manage legacy packages. New capability plugins are discovered through `plugin.json`; see [Plugins](packages.md). To uninstall Agent Forge itself, see [Quickstart](quickstart.md#uninstall).
151
-
152
- See [Plugins](packages.md) for plugin sources and execution notes.
153
-
154
- ### Modes
155
-
156
- | Flag | Description |
157
- |------|-------------|
158
- | default | Interactive mode |
159
- | `-p`, `--print` | Print response and exit |
160
- | `--mode json` | Output all events as JSON lines; see [JSON mode](json.md) |
161
- | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
162
- | `--export <in> [out]` | Export a session to HTML |
163
-
164
- In print mode, Agent Forge also reads piped stdin and merges it into the initial prompt:
165
-
166
- ```bash
167
- cat README.md | agent-forge -p "Summarize this text"
168
- ```
169
-
170
- ### Model Options
171
-
172
- | Option | Description |
173
- |--------|-------------|
174
- | `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
175
- | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
176
- | `--api-key <key>` | API key, overriding environment variables |
177
- | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
178
- | `--models <patterns>` | Comma-separated patterns for model cycling (bindable, no default key) |
179
- | `--list-models [search]` | List available models |
180
-
181
- ### Session Options
182
-
183
- | Option | Description |
184
- |--------|-------------|
185
- | `-c`, `--continue` | Continue the most recent session |
186
- | `-r`, `--resume` | Browse and select a session |
187
- | `--session <path\|id>` | Use a specific session file or partial UUID |
188
- | `--fork <path\|id>` | Fork a session file or partial UUID into a new session |
189
- | `--session-dir <dir>` | Custom session storage directory |
190
- | `--no-session` | Ephemeral mode; do not save |
191
- | `--name <name>`, `-n <name>` | Set session display name at startup |
192
-
193
- ### Tool Options
194
-
195
- | Option | Description |
196
- |--------|-------------|
197
- | `--tools <list>`, `-t <list>` | Allowlist specific built-in, plugin, and custom tools |
198
- | `--exclude-tools <list>`, `-xt <list>` | Disable specific built-in, plugin, and custom tools |
199
- | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep plugin/custom tools enabled |
200
- | `--no-tools`, `-nt` | Disable all tools |
201
-
202
- Built-in tools: `read`, `bash`, `powershell` (Windows), `edit`, `write`, `grep`, `find`, `ls`.
203
-
204
- ### Resource Options
205
-
206
- | Option | Description |
207
- |--------|-------------|
208
- | `--skill <path>` | Load a skill; repeatable |
209
- | `--no-skills` | Disable skill discovery |
210
- | `--prompt-template <path>` | Load a prompt template; repeatable |
211
- | `--no-prompt-templates` | Disable prompt template discovery |
212
- | `--theme <path>` | Load a theme; repeatable |
213
- | `--no-themes` | Disable theme discovery |
214
- | `--no-context-files`, `-nc` | Disable `AGENTS.md` and `CLAUDE.md` discovery |
215
-
216
- Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
217
-
218
- ```bash
219
- agent-forge --no-skills --no-prompt-templates
220
- ```
221
-
222
- ### Other Options
223
-
224
- | Option | Description |
225
- |--------|-------------|
226
- | `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
227
- | `--append-system-prompt <text>` | Append to system prompt |
228
- | `--tui-mode <mode>` | TUI mode: `regular` (default) or experimental `fullscreen` |
229
- | `--use-theme <name[/name]>` | Set the initial interactive theme for this run without changing settings |
230
- | `--verbose` | Force verbose startup |
231
- | `--` | Stop option parsing; remaining arguments are prompts or `@file` inputs |
232
- | `-h`, `--help` | Show help |
233
- | `-v`, `--version` | Show version |
234
-
235
- In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, Agent Forge uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally. See [Terminal setup](terminal-setup.md) for terminal-specific settings and workarounds.
236
-
237
- Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions. **Fullscreen exit output** controls whether exiting fullscreen prints the final transcript or restores the previous screen and prints only the session resume hint.
238
-
239
- ### File Arguments
240
-
241
- Prefix files with `@` to include them in the message:
242
-
243
- ```bash
244
- agent-forge @prompt.md "Answer this"
245
- agent-forge -p @screenshot.png "What's in this image?"
246
- agent-forge @code.ts @test.ts "Review these files"
247
- ```
248
-
249
- ### Examples
250
-
251
- ```bash
252
- # Interactive with initial prompt
253
- agent-forge "List all .ts files in src/"
254
-
255
- # Non-interactive
256
- agent-forge -p "Summarize this codebase"
257
-
258
- # Prompt beginning with a dash
259
- agent-forge -p -- "- Summarize these points"
260
-
261
- # Non-interactive with piped stdin
262
- cat README.md | agent-forge -p "Summarize this text"
263
-
264
- # Named one-shot session
265
- agent-forge --name "release audit" -p "Audit this repository"
266
-
267
- # Different model
268
- agent-forge --provider openai --model gpt-4o "Help me refactor"
269
-
270
- # Model with provider prefix
271
- agent-forge --model openai/gpt-4o "Help me refactor"
272
-
273
- # Model with thinking level shorthand
274
- agent-forge --model sonnet:high "Solve this complex problem"
275
-
276
- # Limit model cycling
277
- agent-forge --models "claude-*,gpt-4o"
278
-
279
- # Read-only mode
280
- agent-forge --tools read,grep,find,ls -p "Review the code"
281
-
282
- # Disable one plugin or built-in tool while keeping the rest available
283
- agent-forge --exclude-tools ask_question
284
- ```
285
-
286
- ## Design Principles
287
-
288
- Agent Forge keeps the core small and pushes workflow-specific behavior into plugins, Skills, prompt templates, and external tools.
289
-
290
- It intentionally does not include MCP, multi-Agent workflows, approval policy, Plan mode, to-dos, or background bash as core business branches. MCP servers are configured through `mcp.json` ([MCP](mcp.md)); the rest are added through plugins or external tools such as containers and tmux.
291
-
292
- For the architectural rationale, see the repository [核心架构宪法](../../../docs/核心架构宪法.md).
1
+ # Using Agent Forge
2
+
3
+ This page collects day-to-day usage details that do not fit on the quickstart page.
4
+
5
+ ## Interactive Mode
6
+
7
+ <p align="center"><img src="images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
8
+
9
+ The interface has four main areas:
10
+
11
+ - **Startup header** - shortcuts, loaded context files, prompt templates, skills, and themes
12
+ - **Messages** - user messages, assistant responses, tool calls, tool results, notifications, and errors
13
+ - **Editor** - where you type; border color indicates the current thinking level
14
+ - **Footer** - working directory, session name, token/cache usage, cost, context usage, and current model. Totals include assistant responses, usage reported by tools, and summary generation.
15
+
16
+ The editor can be replaced temporarily by built-in UI such as `/settings` or `/model`.
17
+
18
+ ### Editor Features
19
+
20
+ | Feature | How |
21
+ |---------|-----|
22
+ | File reference | Type `@` to fuzzy-search project files |
23
+ | Path completion | Press Tab to complete paths |
24
+ | Multi-line input | Shift+Enter, or Ctrl+Enter on Windows Terminal |
25
+ | Copy response | Ctrl+X copies the selected message in `/tree`; otherwise it copies the last assistant message, or the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled |
26
+ | Images | Paste with Ctrl+V, Alt+V on Windows, or drag into the terminal |
27
+ | Shell command | `!command` runs and sends output to the model |
28
+ | Hidden shell command | `!!command` runs without sending output to the model |
29
+ | External editor | Ctrl+G opens `externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere |
30
+
31
+ See [Keybindings](keybindings.md) for all shortcuts and customization.
32
+
33
+ ## Slash Commands
34
+
35
+ Type `/` in the editor to open command completion. Capability plugins can register custom commands, skills are available as `/skill:name`, and prompt templates expand via `/templatename`.
36
+
37
+ | Command | Description |
38
+ |---------|-------------|
39
+ | `/login`, `/logout` | Manage OAuth or API-key credentials |
40
+ | [`/llama`](llama-cpp.md) | Download, load, and unload llama.cpp router models |
41
+ | `/model` | Switch models; Ctrl+S in the picker saves the startup default |
42
+ | `/thinking` | Switch thinking level; Ctrl+S in the picker saves the startup default |
43
+ | `/scoped-models` | Enable/disable models for model cycling (bindable, no default key) |
44
+ | `/settings` | Theme, message delivery, transport, and other preferences |
45
+ | `/resume` | Pick from previous sessions |
46
+ | `/new` | Start a new session |
47
+ | `/name <name>` | Set session display name |
48
+ | `/session` | Show session file, ID, messages, tokens, and cost |
49
+ | `/tree` | Jump to any point in the session and continue from there |
50
+ | `/fork` | Create a new session from a previous user message |
51
+ | `/clone` | Duplicate the current active branch into a new session |
52
+ | `/compact [prompt]` | Manually compact context, optionally with custom instructions |
53
+ | `/copy` | Copy last assistant message to clipboard |
54
+ | `/export [file]` | Export session to HTML or JSONL |
55
+ | `/import <file>` | Import and resume a session from a JSONL file |
56
+ | `/share` | 由显式安装的 session-share 插件提供;核心不内置 |
57
+ | `/reload` | Reload keybindings, skills, prompts, themes, and context files |
58
+ | `/hotkeys` | Show all keyboard shortcuts |
59
+ | `/changelog` | Display version history |
60
+ | `/quit` | Quit Agent Forge |
61
+
62
+ ## Message Queue
63
+
64
+ You can submit messages while the agent is still working:
65
+
66
+ - **Enter** queues a steering message, delivered after the current assistant turn finishes executing its tool calls.
67
+ - **`/queue <text>`** queues a follow-up message, delivered after the agent finishes all work.
68
+ - **Escape** aborts and restores queued messages to the editor.
69
+ - **`/dequeue`** restores queued messages back to the editor.
70
+ - **`/queue-list`** opens the queued-message manager (both queues): reorder entries with alt+up / alt+down, delete one with delete, recall one to the editor with enter, close with escape.
71
+
72
+ Follow-up queueing and dequeue are command-only by default (their shipped keybinding defaults were cleared per the single-entry-point rule, 2026-10-01); bind `app.message.followUp` / `app.message.dequeue` in `keybindings.json` if you want keys (see [Keybindings](keybindings.md)).
73
+
74
+ Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
75
+
76
+ ## Sessions
77
+
78
+ Sessions are saved automatically to `~/.agent-forge/agent/sessions/`, organized by working directory.
79
+
80
+ ```bash
81
+ agent-forge -c # Continue most recent session
82
+ agent-forge -r # Browse and select a session
83
+ agent-forge --no-session # Ephemeral mode; do not save
84
+ agent-forge --name "my task" # Set session display name at startup
85
+ agent-forge --session <path|id> # Use a specific session file or session ID
86
+ agent-forge --fork <path|id> # Fork a session into a new session file
87
+ ```
88
+
89
+ Useful session commands:
90
+
91
+ - `/session` shows the current session file and ID.
92
+ - `/tree` navigates the in-file session tree and can summarize abandoned branches.
93
+ - `/fork` creates a new session from an earlier user message.
94
+ - `/clone` duplicates the current active branch into a new session file.
95
+ - `/compact` summarizes older messages to free context.
96
+
97
+ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
98
+
99
+ ## Context Files
100
+
101
+ Agent Forge loads `AGENTS.md` or `CLAUDE.md` at startup from:
102
+
103
+ - `~/.agent-forge/agent/AGENTS.md` for global instructions
104
+ - parent directories, walking up from the current working directory
105
+ - the current directory
106
+
107
+ If a directory contains `AGENTS.override.md`, Agent Forge loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory. Context files from other directories still layer normally.
108
+
109
+ Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
110
+
111
+ ### System Prompt Files
112
+
113
+ Replace the default system prompt with:
114
+
115
+ - `.agent-forge/SYSTEM.md` for a project
116
+ - `~/.agent-forge/agent/SYSTEM.md` globally
117
+
118
+ Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
119
+
120
+ ## Exporting and Sharing Sessions
121
+
122
+ Use `/export [file]` to write a session to HTML.
123
+
124
+ Install and configure the optional `session-share` plugin before using `/share`; the core does not provide a built-in sharing transport.
125
+
126
+ If you publish sessions for model, prompt, tool, or evaluation research, choose a destination and publication workflow that match your own privacy requirements.
127
+
128
+ ## CLI Reference
129
+
130
+ ```bash
131
+ agent-forge [options] [--] [@files...] [messages...]
132
+ ```
133
+
134
+ ### Package Commands
135
+
136
+ ```bash
137
+ agent-forge install <source> [-l] # Install package, -l for project-local
138
+ agent-forge remove <source> [-l] # Remove package
139
+ agent-forge uninstall <source> [-l] # Alias for remove
140
+ agent-forge update [source|self|agent-forge] # Update Agent Forge or one package source
141
+ agent-forge update --all # Update Agent Forge and packages; reconcile pinned git refs
142
+ agent-forge update --packages # Update packages only; reconcile pinned git refs
143
+ agent-forge update --models # Refresh model catalogs only
144
+ agent-forge update --self # Update Agent Forge only
145
+ agent-forge update --package <src> # Update one package
146
+ agent-forge list # List installed packages
147
+ agent-forge config # Enable/disable package resources
148
+ ```
149
+
150
+ These commands manage legacy packages. New capability plugins are discovered through `plugin.json`; see [Plugins](packages.md). To uninstall Agent Forge itself, see [Quickstart](quickstart.md#uninstall).
151
+
152
+ See [Plugins](packages.md) for plugin sources and execution notes.
153
+
154
+ ### Modes
155
+
156
+ | Flag | Description |
157
+ |------|-------------|
158
+ | default | Interactive mode |
159
+ | `-p`, `--print` | Print response and exit |
160
+ | `--mode json` | Output all events as JSON lines; see [JSON mode](json.md) |
161
+ | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
162
+ | `--export <in> [out]` | Export a session to HTML |
163
+
164
+ In print mode, Agent Forge also reads piped stdin and merges it into the initial prompt:
165
+
166
+ ```bash
167
+ cat README.md | agent-forge -p "Summarize this text"
168
+ ```
169
+
170
+ ### Model Options
171
+
172
+ | Option | Description |
173
+ |--------|-------------|
174
+ | `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
175
+ | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
176
+ | `--api-key <key>` | API key, overriding environment variables |
177
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
178
+ | `--models <patterns>` | Comma-separated patterns for model cycling (bindable, no default key) |
179
+ | `--list-models [search]` | List available models |
180
+
181
+ ### Session Options
182
+
183
+ | Option | Description |
184
+ |--------|-------------|
185
+ | `-c`, `--continue` | Continue the most recent session |
186
+ | `-r`, `--resume` | Browse and select a session |
187
+ | `--session <path\|id>` | Use a specific session file or partial UUID |
188
+ | `--fork <path\|id>` | Fork a session file or partial UUID into a new session |
189
+ | `--session-dir <dir>` | Custom session storage directory |
190
+ | `--no-session` | Ephemeral mode; do not save |
191
+ | `--name <name>`, `-n <name>` | Set session display name at startup |
192
+
193
+ ### Tool Options
194
+
195
+ | Option | Description |
196
+ |--------|-------------|
197
+ | `--tools <list>`, `-t <list>` | Allowlist specific built-in, plugin, and custom tools |
198
+ | `--exclude-tools <list>`, `-xt <list>` | Disable specific built-in, plugin, and custom tools |
199
+ | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep plugin/custom tools enabled |
200
+ | `--no-tools`, `-nt` | Disable all tools |
201
+
202
+ Built-in tools: `read`, `bash`, `powershell` (Windows), `edit`, `write`, `grep`, `find`, `ls`.
203
+
204
+ ### Resource Options
205
+
206
+ | Option | Description |
207
+ |--------|-------------|
208
+ | `--skill <path>` | Load a skill; repeatable |
209
+ | `--no-skills` | Disable skill discovery |
210
+ | `--prompt-template <path>` | Load a prompt template; repeatable |
211
+ | `--no-prompt-templates` | Disable prompt template discovery |
212
+ | `--theme <path>` | Load a theme; repeatable |
213
+ | `--no-themes` | Disable theme discovery |
214
+ | `--no-context-files`, `-nc` | Disable `AGENTS.md` and `CLAUDE.md` discovery |
215
+
216
+ Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
217
+
218
+ ```bash
219
+ agent-forge --no-skills --no-prompt-templates
220
+ ```
221
+
222
+ ### Other Options
223
+
224
+ | Option | Description |
225
+ |--------|-------------|
226
+ | `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
227
+ | `--append-system-prompt <text>` | Append to system prompt |
228
+ | `--tui-mode <mode>` | TUI mode: `regular` (default) or experimental `fullscreen` |
229
+ | `--use-theme <name[/name]>` | Set the initial interactive theme for this run without changing settings |
230
+ | `--verbose` | Force verbose startup |
231
+ | `--` | Stop option parsing; remaining arguments are prompts or `@file` inputs |
232
+ | `-h`, `--help` | Show help |
233
+ | `-v`, `--version` | Show version |
234
+
235
+ In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, Agent Forge uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally. See [Terminal setup](terminal-setup.md) for terminal-specific settings and workarounds.
236
+
237
+ Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions. **Fullscreen exit output** controls whether exiting fullscreen prints the final transcript or restores the previous screen and prints only the session resume hint.
238
+
239
+ ### File Arguments
240
+
241
+ Prefix files with `@` to include them in the message:
242
+
243
+ ```bash
244
+ agent-forge @prompt.md "Answer this"
245
+ agent-forge -p @screenshot.png "What's in this image?"
246
+ agent-forge @code.ts @test.ts "Review these files"
247
+ ```
248
+
249
+ ### Examples
250
+
251
+ ```bash
252
+ # Interactive with initial prompt
253
+ agent-forge "List all .ts files in src/"
254
+
255
+ # Non-interactive
256
+ agent-forge -p "Summarize this codebase"
257
+
258
+ # Prompt beginning with a dash
259
+ agent-forge -p -- "- Summarize these points"
260
+
261
+ # Non-interactive with piped stdin
262
+ cat README.md | agent-forge -p "Summarize this text"
263
+
264
+ # Named one-shot session
265
+ agent-forge --name "release audit" -p "Audit this repository"
266
+
267
+ # Different model
268
+ agent-forge --provider openai --model gpt-4o "Help me refactor"
269
+
270
+ # Model with provider prefix
271
+ agent-forge --model openai/gpt-4o "Help me refactor"
272
+
273
+ # Model with thinking level shorthand
274
+ agent-forge --model sonnet:high "Solve this complex problem"
275
+
276
+ # Limit model cycling
277
+ agent-forge --models "claude-*,gpt-4o"
278
+
279
+ # Read-only mode
280
+ agent-forge --tools read,grep,find,ls -p "Review the code"
281
+
282
+ # Disable one plugin or built-in tool while keeping the rest available
283
+ agent-forge --exclude-tools ask_question
284
+ ```
285
+
286
+ ## Design Principles
287
+
288
+ Agent Forge keeps the core small and pushes workflow-specific behavior into plugins, Skills, prompt templates, and external tools.
289
+
290
+ It intentionally does not include MCP, multi-Agent workflows, approval policy, Plan mode, to-dos, or background bash as core business branches. MCP servers are configured through `mcp.json` ([MCP](mcp.md)); the rest are added through plugins or external tools such as containers and tmux.
291
+
292
+ For the architectural rationale, see the repository [核心架构宪法](../../../docs/核心架构宪法.md).
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "agent-forge-extension-with-deps",
3
- "version": "0.87.1",
3
+ "version": "0.87.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "agent-forge-extension-with-deps",
9
- "version": "0.87.1",
9
+ "version": "0.87.2",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agent-forge-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.87.1",
4
+ "version": "0.87.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "agent-forge.example.with-deps",
3
- "version": "0.87.1",
3
+ "version": "0.87.2",
4
4
  "hostVersion": ">=0.84.0",
5
5
  "apiVersion": "1-draft",
6
6
  "entry": "./index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-agent-forge/agent-forge",
3
- "version": "0.88.1",
3
+ "version": "0.88.2",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "agentForgeConfig": {