@vaclav-synacek/pi-coding-agent-termux 0.46.0 → 0.47.0-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 (91) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -327
  3. package/dist/core/agent-session.d.ts +11 -3
  4. package/dist/core/agent-session.d.ts.map +1 -1
  5. package/dist/core/agent-session.js +81 -14
  6. package/dist/core/agent-session.js.map +1 -1
  7. package/dist/core/export-html/ansi-to-html.d.ts +22 -0
  8. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  9. package/dist/core/export-html/ansi-to-html.js +249 -0
  10. package/dist/core/export-html/ansi-to-html.js.map +1 -0
  11. package/dist/core/export-html/index.d.ts +17 -0
  12. package/dist/core/export-html/index.d.ts.map +1 -1
  13. package/dist/core/export-html/index.js +52 -23
  14. package/dist/core/export-html/index.js.map +1 -1
  15. package/dist/core/export-html/template.css +0 -33
  16. package/dist/core/export-html/template.js +171 -18
  17. package/dist/core/export-html/tool-renderer.d.ts +35 -0
  18. package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  19. package/dist/core/export-html/tool-renderer.js +57 -0
  20. package/dist/core/export-html/tool-renderer.js.map +1 -0
  21. package/dist/core/extensions/index.d.ts +1 -1
  22. package/dist/core/extensions/index.d.ts.map +1 -1
  23. package/dist/core/extensions/index.js.map +1 -1
  24. package/dist/core/extensions/runner.d.ts +5 -1
  25. package/dist/core/extensions/runner.d.ts.map +1 -1
  26. package/dist/core/extensions/runner.js +41 -0
  27. package/dist/core/extensions/runner.js.map +1 -1
  28. package/dist/core/extensions/types.d.ts +24 -1
  29. package/dist/core/extensions/types.d.ts.map +1 -1
  30. package/dist/core/extensions/types.js.map +1 -1
  31. package/dist/core/prompt-templates.d.ts.map +1 -1
  32. package/dist/core/prompt-templates.js +4 -27
  33. package/dist/core/prompt-templates.js.map +1 -1
  34. package/dist/core/skills.d.ts.map +1 -1
  35. package/dist/core/skills.js +6 -37
  36. package/dist/core/skills.js.map +1 -1
  37. package/dist/core/system-prompt.d.ts.map +1 -1
  38. package/dist/core/system-prompt.js +19 -14
  39. package/dist/core/system-prompt.js.map +1 -1
  40. package/dist/core/tools/path-utils.d.ts +1 -0
  41. package/dist/core/tools/path-utils.d.ts.map +1 -1
  42. package/dist/core/tools/path-utils.js +7 -0
  43. package/dist/core/tools/path-utils.js.map +1 -1
  44. package/dist/core/tools/read.d.ts.map +1 -1
  45. package/dist/core/tools/read.js +13 -2
  46. package/dist/core/tools/read.js.map +1 -1
  47. package/dist/index.d.ts +2 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +1 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/main.d.ts.map +1 -1
  52. package/dist/main.js +32 -0
  53. package/dist/main.js.map +1 -1
  54. package/dist/modes/interactive/components/custom-editor.d.ts +2 -2
  55. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  56. package/dist/modes/interactive/components/custom-editor.js +2 -2
  57. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  58. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  59. package/dist/modes/interactive/components/extension-editor.js +1 -1
  60. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  61. package/dist/modes/interactive/components/tree-selector.d.ts +7 -0
  62. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  63. package/dist/modes/interactive/components/tree-selector.js +140 -4
  64. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  65. package/dist/modes/interactive/interactive-mode.d.ts +0 -1
  66. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  67. package/dist/modes/interactive/interactive-mode.js +4 -29
  68. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  69. package/dist/modes/print-mode.d.ts.map +1 -1
  70. package/dist/modes/print-mode.js +1 -1
  71. package/dist/modes/print-mode.js.map +1 -1
  72. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  73. package/dist/modes/rpc/rpc-mode.js +1 -0
  74. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  75. package/dist/utils/frontmatter.d.ts +8 -0
  76. package/dist/utils/frontmatter.d.ts.map +1 -0
  77. package/dist/utils/frontmatter.js +26 -0
  78. package/dist/utils/frontmatter.js.map +1 -0
  79. package/docs/extensions.md +51 -0
  80. package/docs/rpc.md +15 -15
  81. package/docs/tui.md +26 -0
  82. package/examples/extensions/input-transform.ts +43 -0
  83. package/examples/extensions/modal-editor.ts +1 -1
  84. package/examples/extensions/overlay-test.ts +8 -3
  85. package/examples/extensions/question.ts +1 -1
  86. package/examples/extensions/questionnaire.ts +1 -1
  87. package/examples/extensions/rainbow-editor.ts +1 -8
  88. package/examples/extensions/subagent/agents.ts +3 -32
  89. package/examples/extensions/with-deps/package-lock.json +2 -2
  90. package/examples/extensions/with-deps/package.json +1 -1
  91. package/package.json +6 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.47.0] - 2026-01-16
4
+
5
+ ### Breaking Changes
6
+
7
+ - Extensions using `Editor` directly must now pass `TUI` as the first constructor argument: `new Editor(tui, theme)`. The `tui` parameter is available in extension factory functions. ([#732](https://github.com/badlogic/pi-mono/issues/732))
8
+
9
+ ### Added
10
+
11
+ - **OpenAI Codex official support**: Full compatibility with OpenAI's Codex CLI models (`gpt-5.1`, `gpt-5.2`, `gpt-5.1-codex-mini`, `gpt-5.2-codex`). Features include static system prompt for OpenAI allowlisting, prompt caching via session ID, and reasoning signature retention across turns. Set `OPENAI_API_KEY` and use `--provider openai-codex` or select a Codex model. ([#737](https://github.com/badlogic/pi-mono/pull/737))
12
+ - `pi-internal://` URL scheme in read tool for accessing internal documentation. The model can read files from the coding-agent package (README, docs, examples) to learn about extending pi.
13
+ - New `input` event in extension system for intercepting, transforming, or handling user input before the agent processes it. Supports three result types: `continue` (pass through), `transform` (modify text/images), `handled` (respond without LLM). Handlers chain transforms and short-circuit on handled. ([#761](https://github.com/badlogic/pi-mono/pull/761) by [@nicobailon](https://github.com/nicobailon))
14
+ - Extension example: `input-transform.ts` demonstrating input interception patterns (quick mode, instant commands, source routing) ([#761](https://github.com/badlogic/pi-mono/pull/761) by [@nicobailon](https://github.com/nicobailon))
15
+ - Custom tool HTML export: extensions with `renderCall`/`renderResult` now render in `/share` and `/export` output with ANSI-to-HTML color conversion ([#702](https://github.com/badlogic/pi-mono/pull/702) by [@aliou](https://github.com/aliou))
16
+ - Direct filter shortcuts in Tree mode: Ctrl+D (default), Ctrl+T (no-tools), Ctrl+U (user-only), Ctrl+L (labeled-only), Ctrl+A (all) ([#747](https://github.com/badlogic/pi-mono/pull/747) by [@kaofelix](https://github.com/kaofelix))
17
+
18
+ ### Changed
19
+
20
+ - Skill commands (`/skill:name`) are now expanded in AgentSession instead of interactive mode. This enables skill commands in RPC and print modes, and allows the `input` event to intercept `/skill:name` before expansion.
21
+
22
+ ### Fixed
23
+
24
+ - Editor no longer corrupts terminal display when loading large prompts via `setEditorText`. Content now scrolls vertically with indicators showing lines above/below the viewport. ([#732](https://github.com/badlogic/pi-mono/issues/732))
25
+ - Piped stdin now works correctly: `echo foo | pi` is equivalent to `pi -p foo`. When stdin is piped, print mode is automatically enabled since interactive mode requires a TTY ([#708](https://github.com/badlogic/pi-mono/issues/708))
26
+ - Session tree now preserves branch connectors and indentation when filters hide intermediate entries so descendants attach to the nearest visible ancestor and sibling branches align. Fixed in both TUI and HTML export ([#739](https://github.com/badlogic/pi-mono/pull/739) by [@w-winter](https://github.com/w-winter))
27
+ - Added `upstream connect`, `connection refused`, and `reset before headers` patterns to auto-retry error detection ([#733](https://github.com/badlogic/pi-mono/issues/733))
28
+ - Multi-line YAML frontmatter in skills and prompt templates now parses correctly. Centralized frontmatter parsing using the `yaml` library. ([#728](https://github.com/badlogic/pi-mono/pull/728) by [@richardgill](https://github.com/richardgill))
29
+ - `ctx.shutdown()` now waits for pending UI renders to complete before exiting, ensuring notifications and final output are visible ([#756](https://github.com/badlogic/pi-mono/issues/756))
30
+ - OpenAI Codex provider now retries on transient errors (429, 5xx, connection failures) with exponential backoff ([#733](https://github.com/badlogic/pi-mono/issues/733))
31
+
3
32
  ## [0.46.0] - 2026-01-15
4
33
 
5
34
  ### Fixed
package/README.md CHANGED
@@ -12,330 +12,4 @@ This repository maintains a Termux-compatible fork of pi-coding-agent. The port
12
12
  npm install -g @vaclav-synacek/pi-coding-agent-termux
13
13
  ```
14
14
 
15
- Or build from source (on a development machine):
16
-
17
- ```bash
18
- git clone https://github.com/VaclavSynacek/pi-coding-agent-termux.git
19
- cd pi-coding-agent-termux
20
- npm install
21
- npm run build
22
- cd packages/coding-agent
23
- npm pack
24
- # Transfer the .tgz file to Termux and install it
25
- ```
26
-
27
- On Termux:
28
- ```bash
29
- npm install -g /path/to/vaclav-synacek-pi-coding-agent-termux-0.45.7.tgz
30
- ```
31
-
32
- **Note**: Building on Termux is not supported because the build tool (`tsgo`) doesn't have ARM64 binaries. Build on a regular machine and transfer the package, or install directly from npm.
33
-
34
- For clipboard support, install Termux:API:
35
-
36
- ```bash
37
- pkg install termux-api
38
- ```
39
-
40
- ## Functional Changes in this Port
41
-
42
- This port modifies the upstream pi-coding-agent to work on Termux by:
43
-
44
- ### 1. Clipboard Integration
45
- - **Changed**: `@mariozechner/clipboard` made optional (native bindings incompatible with Termux)
46
- - **Added**: Termux clipboard support via `termux-clipboard-set` and `termux-clipboard-get` commands
47
- - **Behavior**: Text clipboard works via Termux:API; image clipboard operations are disabled on Termux
48
- - **Files modified**:
49
- - `packages/coding-agent/src/utils/clipboard.ts`
50
- - `packages/coding-agent/src/utils/clipboard-image.ts`
51
- - `packages/coding-agent/package.json` (clipboard moved to optionalDependencies)
52
-
53
- ### 2. Image Processing
54
- - **Changed**: Uses `wasm-vips` for image processing
55
- - **Note**: Upstream v0.45.7+ migrated from `photon-node` to `wasm-vips` which is WebAssembly-based
56
- - **Behavior**: Image resizing and conversion work correctly (wasm-vips is platform-independent)
57
- - **Files modified**: None required - wasm-vips works on all platforms including Termux
58
-
59
- ### 3. Update Notification
60
- - **Changed**: Version check and update notification system
61
- - **Behavior**: Checks for updates against `@vaclav-synacek/pi-coding-agent-termux` on npm (instead of upstream package)
62
- - **Display**: Shows correct command: `npm install -g @vaclav-synacek/pi-coding-agent-termux`
63
- - **Files modified**:
64
- - `packages/coding-agent/src/modes/interactive/interactive-mode.ts` (npm registry URL and install command)
65
-
66
- ### 4. Optional Dependencies
67
- - **Changed**: `canvas` moved to optionalDependencies in `packages/ai/package.json`
68
- - **Reason**: Canvas cannot build on Termux (requires pixman-1), but is only used for ai tests
69
- - **Behavior**: npm install succeeds on Termux even if canvas build fails
70
- - **Files modified**: `packages/ai/package.json`
71
-
72
- ### 5. TypeScript Target
73
- - **Changed**: `tsconfig.base.json` target set to ES2024
74
- - **Reason**: Support for regex `v` flag (required by some dependencies)
75
- - **Files modified**: `tsconfig.base.json`
76
-
77
- ## Repository Structure & Maintenance
78
-
79
- This repository follows a structured branching strategy to track upstream releases while maintaining Termux-specific patches:
80
-
81
- ### Branches
82
-
83
- - **`master`** - The main Termux port branch
84
- - Contains Termux-specific modifications applied on top of upstream
85
- - Rebased onto new upstream versions when they are released
86
- - Force-pushed after each rebase (history is rewritten)
87
-
88
- - **`upstream`** - Clean upstream tracking branch
89
- - Mirrors `https://github.com/badlogic/pi-mono.git` main branch
90
- - Used as the base for rebasing master
91
- - Never contains Termux-specific changes
92
- - Helps maintain transparency about what's changed in the port
93
-
94
- ### Tags
95
-
96
- Tags follow the naming convention: `v{UPSTREAM_VERSION}-{PORT_REVISION}`
97
-
98
- Examples:
99
- - `v0.45.7-0` - First Termux port of upstream v0.45.7
100
- - `v0.45.7-1` - Second Termux port of upstream v0.45.7 (port bugfix)
101
- - `v0.46.0-0` - First Termux port of upstream v0.46.0
102
-
103
- **Tags are immutable** - once published to npm, a tag is never changed or deleted. This preserves the complete version history.
104
-
105
- ### Remotes
106
-
107
- - `origin` - This repository (`VaclavSynacek/pi-coding-agent-termux`)
108
- - `upstream` - Upstream repository (`badlogic/pi-mono`)
109
-
110
- ## Maintenance Workflow
111
-
112
- ### When a New Upstream Version is Released
113
-
114
- Example: Upstream releases `v0.46.0`
115
-
116
- 1. **Update upstream branch**
117
- ```bash
118
- git checkout upstream
119
- git fetch upstream
120
- git merge upstream/main # or git reset --hard upstream/main
121
- git push origin upstream
122
- ```
123
-
124
- 2. **Rebase master onto new upstream version**
125
- ```bash
126
- git checkout master
127
- git rebase v0.46.0 # rebase onto the upstream tag
128
- ```
129
-
130
- 3. **Resolve conflicts**
131
- - Fix any rebase conflicts in Termux-specific patches
132
- - Pay special attention to files listed in "Functional Changes" section above
133
- - Ensure patches still apply cleanly and make sense
134
-
135
- 4. **Test thoroughly**
136
- - Build the project: `npm install && npm run build`
137
- - Test on actual Termux device
138
- - Verify clipboard operations (with Termux:API installed)
139
- - Test that image operations degrade gracefully
140
- - Check that all core features work
141
-
142
- 5. **Update package.json version**
143
- ```bash
144
- cd packages/coding-agent
145
- # Update version to match upstream (e.g., "0.46.0")
146
- ```
147
-
148
- 6. **Create immutable release tag**
149
- ```bash
150
- git tag -a v0.46.0-0 -m "Termux port of upstream v0.46.0"
151
- git push origin v0.46.0-0
152
- ```
153
-
154
- 7. **Publish to npm**
155
- ```bash
156
- cd packages/coding-agent
157
- npm publish
158
- ```
159
-
160
- 8. **Push rebased master**
161
- ```bash
162
- git push origin master --force-with-lease
163
- ```
164
-
165
- ### When Port Needs a Bugfix (Without Upstream Change)
166
-
167
- Example: Fix a bug in the Termux port of v0.46.0
168
-
169
- 1. **Make fixes on master branch**
170
- ```bash
171
- git checkout master
172
- # Make your fixes
173
- git commit -m "fix: describe the port-specific fix"
174
- ```
175
-
176
- 2. **Update package.json version** (increment port revision)
177
- ```bash
178
- cd packages/coding-agent
179
- # Version stays "0.46.0" (or use "0.46.0-termux.1" if needed)
180
- ```
181
-
182
- 3. **Create new port revision tag**
183
- ```bash
184
- git tag -a v0.46.0-1 -m "Termux port of upstream v0.46.0 (bugfix)"
185
- git push origin v0.46.0-1
186
- ```
187
-
188
- 4. **Publish to npm**
189
- ```bash
190
- cd packages/coding-agent
191
- npm publish
192
- ```
193
-
194
- 5. **Push master**
195
- ```bash
196
- git push origin master
197
- ```
198
-
199
- ### Initial Setup (Already Done)
200
-
201
- This was the initial setup of this repository:
202
-
203
- 1. Created new repository
204
- 2. Added upstream remote: `git remote add upstream https://github.com/badlogic/pi-mono.git`
205
- 3. Fetched upstream: `git fetch upstream --tags`
206
- 4. Created `upstream` branch: `git checkout -b upstream upstream/main`
207
- 5. Created `master` branch from upstream v0.45.7: `git checkout -b master v0.45.7`
208
- 6. Applied Termux patches as focused commits
209
- 7. Tagged first release: `v0.45.7-0`
210
-
211
- ## Termux Port Commits
212
-
213
- The Termux port consists of these focused commits (applied on top of upstream):
214
-
215
- 1. **docs: Add comprehensive Termux port README** - Complete documentation and maintenance instructions
216
- 2. **feat: Update TypeScript target to ES2024** - Enable modern JavaScript features
217
- 3. **feat: Make @mariozechner/clipboard optional for Termux compatibility** - Optional require() for clipboard
218
- 4. **feat: Add Termux clipboard support** - Integration with termux-clipboard-set/get
219
- 5. **feat: Make @mariozechner/clipboard optional dependency** - Move to optionalDependencies in package.json
220
- 6. **feat: Update version check to use Termux port package** - Point to @vaclav-synacek/pi-coding-agent-termux
221
- 7. **feat: Update package.json for Termux port** - Package name and metadata
222
- 8. **feat: Make canvas optional dependency in ai package** - Allow clean build on Termux
223
- 9. **chore: Remove package-lock.json** - Platform-independent dependency resolution
224
-
225
- ## Commit Strategy for Rebasing
226
-
227
- To make rebasing easier, Termux-specific changes are organized as **minimal, focused commits**:
228
-
229
- - One commit per logical change
230
- - Clear commit messages explaining why the change is needed for Termux
231
- - Avoid mixing unrelated changes
232
- - Keep patches as small as possible while maintaining functionality
233
-
234
- This approach ensures that when rebasing onto new upstream versions, conflicts are:
235
- - Easier to understand and resolve
236
- - Less likely to occur
237
- - Clearly attributable to specific Termux requirements
238
-
239
- ## Development Notes
240
-
241
- ### Building (Development Machine Required)
242
-
243
- **Important**: Building requires `tsgo` which doesn't have Android ARM64 binaries. Build on a regular development machine (Linux/macOS/Windows).
244
-
245
- This is a monorepo. To build all packages:
246
-
247
- ```bash
248
- # From repository root (on development machine)
249
- npm install
250
- npm run build
251
- ```
252
-
253
- To build only the coding-agent package:
254
-
255
- ```bash
256
- cd packages/coding-agent
257
- npm run build
258
- ```
259
-
260
- **For Termux deployment**: Build on a development machine, then either:
261
- 1. Publish to npm and install from there
262
- 2. Use `npm pack` to create a .tgz file and transfer it to Termux
263
-
264
- **Note**: The optional dependency `canvas` (in packages/ai) may fail to build due to missing native libraries (pixman-1). This is expected and harmless - npm will skip it and continue. Canvas is only used for ai package tests.
265
-
266
- ### Testing on Termux
267
-
268
- 1. Install Termux from F-Droid
269
- 2. Install dependencies:
270
- ```bash
271
- pkg update && pkg install git nodejs-lts
272
- pkg install termux-api # For clipboard support
273
- ```
274
- 3. Install the package:
275
- ```bash
276
- npm install -g @vaclav-synacek/pi-coding-agent-termux
277
- ```
278
- 4. Run: `pi`
279
-
280
- **For development/testing unreleased changes**: Build on a development machine, create a tarball with `npm pack`, transfer to Termux, and install with `npm install -g /path/to/package.tgz`.
281
-
282
- ### Comparison with Upstream
283
-
284
- To see all Termux-specific changes:
285
-
286
- ```bash
287
- git diff upstream master
288
- ```
289
-
290
- To see changes in a specific file:
291
-
292
- ```bash
293
- git diff upstream master packages/coding-agent/src/utils/clipboard.ts
294
- ```
295
-
296
- ## Publishing to npm
297
-
298
- The package is published as `@vaclav-synacek/pi-coding-agent-termux` on npm.
299
-
300
- **Publishing steps:**
301
-
302
- ```bash
303
- cd packages/coding-agent
304
- npm publish
305
- ```
306
-
307
- **Key package.json fields:**
308
- - `name`: `@vaclav-synacek/pi-coding-agent-termux` (different from upstream to avoid conflicts)
309
- - `version`: Matches upstream version (e.g., `0.46.0`)
310
- - `description`: "Termux port of pi-coding-agent - Coding agent CLI with read, bash, edit, write tools and session management"
311
- - `repository`: Points to this repository (`VaclavSynacek/pi-coding-agent-termux`)
312
- - `homepage`: https://github.com/VaclavSynacek/pi-coding-agent-termux#readme
313
-
314
- ## Why This Approach?
315
-
316
- This maintenance strategy provides:
317
-
318
- 1. **Clean separation** - Clear distinction between upstream code and Termux patches
319
- 2. **Easy updates** - Rebasing makes it straightforward to adopt new upstream features
320
- 3. **Version history** - Immutable tags preserve every published version
321
- 4. **Transparency** - Easy to see exactly what's different from upstream
322
- 5. **Maintainability** - Future maintainers can understand the port structure
323
- 6. **No upstream dependency** - Port can continue indefinitely without upstream acceptance
324
-
325
- ## Contributing
326
-
327
- When contributing Termux-specific changes:
328
-
329
- 1. Fork this repository
330
- 2. Create a feature branch from `master`
331
- 3. Make focused commits with clear messages
332
- 4. Test on actual Termux device
333
- 5. Submit pull request
334
-
335
- For general pi-coding-agent features/bugs, contribute to the [upstream repository](https://github.com/badlogic/pi-mono) instead.
336
-
337
- ## License
338
-
339
- Same as upstream: MIT License
340
-
341
- See [LICENSE](LICENSE) file for details.
15
+ **For full documentation, maintenance workflow, and technical details, see the [main repository README](https://github.com/VaclavSynacek/pi-coding-agent-termux#readme).**
@@ -16,7 +16,7 @@ import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLe
16
16
  import type { ImageContent, Model, TextContent } from "@mariozechner/pi-ai";
17
17
  import { type BashResult } from "./bash-executor.js";
18
18
  import { type CompactionResult } from "./compaction/index.js";
19
- import type { ExtensionRunner } from "./extensions/index.js";
19
+ import type { ExtensionRunner, InputSource } from "./extensions/index.js";
20
20
  import type { CustomMessage } from "./messages.js";
21
21
  import type { ModelRegistry } from "./model-registry.js";
22
22
  import { type PromptTemplate } from "./prompt-templates.js";
@@ -80,6 +80,8 @@ export interface PromptOptions {
80
80
  images?: ImageContent[];
81
81
  /** When streaming, how to queue the message: "steer" (interrupt) or "followUp" (wait). Required if streaming. */
82
82
  streamingBehavior?: "steer" | "followUp";
83
+ /** Source of input for extension input event handlers. Defaults to "interactive". */
84
+ source?: InputSource;
83
85
  }
84
86
  /** Result from cycleModel() */
85
87
  export interface ModelCycleResult {
@@ -239,17 +241,23 @@ export declare class AgentSession {
239
241
  */
240
242
  prompt(text: string, options?: PromptOptions): Promise<void>;
241
243
  private _tryExecuteExtensionCommand;
244
+ /**
245
+ * Expand skill commands (/skill:name args) to their full content.
246
+ * Returns the expanded text, or the original text if not a skill command or skill not found.
247
+ * Emits errors via extension runner if file read fails.
248
+ */
249
+ private _expandSkillCommand;
242
250
  /**
243
251
  * Queue a steering message to interrupt the agent mid-run.
244
252
  * Delivered after current tool execution, skips remaining tools.
245
- * Expands file-based prompt templates. Errors on extension commands.
253
+ * Expands skill commands and prompt templates. Errors on extension commands.
246
254
  * @throws Error if text is an extension command
247
255
  */
248
256
  steer(text: string): Promise<void>;
249
257
  /**
250
258
  * Queue a follow-up message to be processed after the agent finishes.
251
259
  * Delivered only when agent has no more tool calls or steering messages.
252
- * Expands file-based prompt templates. Errors on extension commands.
260
+ * Expands skill commands and prompt templates. Errors on extension commands.
253
261
  * @throws Error if text is an extension command
254
262
  */
255
263
  followUp(text: string): Promise<void>;