apex-code 0.0.1-alpha.8 → 0.0.1-alpha.9

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 (230) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/cli/args.d.ts +1 -0
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +29 -9
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/cli/file-processor.d.ts.map +1 -1
  7. package/dist/cli/file-processor.js +2 -1
  8. package/dist/cli/file-processor.js.map +1 -1
  9. package/dist/config.d.ts +3 -2
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +21 -13
  12. package/dist/config.js.map +1 -1
  13. package/dist/core/agent-session.d.ts +26 -7
  14. package/dist/core/agent-session.d.ts.map +1 -1
  15. package/dist/core/agent-session.js +163 -95
  16. package/dist/core/agent-session.js.map +1 -1
  17. package/dist/core/auth-storage.d.ts.map +1 -1
  18. package/dist/core/auth-storage.js +6 -7
  19. package/dist/core/auth-storage.js.map +1 -1
  20. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  21. package/dist/core/compaction/branch-summarization.js +3 -0
  22. package/dist/core/compaction/branch-summarization.js.map +1 -1
  23. package/dist/core/compaction/compaction.d.ts +4 -3
  24. package/dist/core/compaction/compaction.d.ts.map +1 -1
  25. package/dist/core/compaction/compaction.js +41 -32
  26. package/dist/core/compaction/compaction.js.map +1 -1
  27. package/dist/core/defaults.d.ts +1 -0
  28. package/dist/core/defaults.d.ts.map +1 -1
  29. package/dist/core/defaults.js +9 -0
  30. package/dist/core/defaults.js.map +1 -1
  31. package/dist/core/durable-state/sqlite.d.ts.map +1 -1
  32. package/dist/core/durable-state/sqlite.js +26 -2
  33. package/dist/core/durable-state/sqlite.js.map +1 -1
  34. package/dist/core/extensions/index.d.ts +2 -2
  35. package/dist/core/extensions/index.d.ts.map +1 -1
  36. package/dist/core/extensions/index.js +1 -1
  37. package/dist/core/extensions/index.js.map +1 -1
  38. package/dist/core/extensions/loader.d.ts.map +1 -1
  39. package/dist/core/extensions/loader.js +115 -48
  40. package/dist/core/extensions/loader.js.map +1 -1
  41. package/dist/core/extensions/types.d.ts +38 -9
  42. package/dist/core/extensions/types.d.ts.map +1 -1
  43. package/dist/core/extensions/types.js +3 -0
  44. package/dist/core/extensions/types.js.map +1 -1
  45. package/dist/core/footer-data-provider.d.ts +1 -1
  46. package/dist/core/footer-data-provider.d.ts.map +1 -1
  47. package/dist/core/footer-data-provider.js +1 -1
  48. package/dist/core/footer-data-provider.js.map +1 -1
  49. package/dist/core/keybindings.d.ts +20 -19
  50. package/dist/core/keybindings.d.ts.map +1 -1
  51. package/dist/core/keybindings.js +26 -5
  52. package/dist/core/keybindings.js.map +1 -1
  53. package/dist/core/model-config.d.ts +5 -0
  54. package/dist/core/model-config.d.ts.map +1 -1
  55. package/dist/core/model-config.js +3 -1
  56. package/dist/core/model-config.js.map +1 -1
  57. package/dist/core/model-resolver.d.ts +1 -0
  58. package/dist/core/model-resolver.d.ts.map +1 -1
  59. package/dist/core/model-resolver.js +14 -8
  60. package/dist/core/model-resolver.js.map +1 -1
  61. package/dist/core/models-store.d.ts.map +1 -1
  62. package/dist/core/models-store.js +2 -1
  63. package/dist/core/models-store.js.map +1 -1
  64. package/dist/core/package-manager.d.ts.map +1 -1
  65. package/dist/core/package-manager.js +22 -14
  66. package/dist/core/package-manager.js.map +1 -1
  67. package/dist/core/pi-manifest.d.ts.map +1 -1
  68. package/dist/core/pi-manifest.js +2 -1
  69. package/dist/core/pi-manifest.js.map +1 -1
  70. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  71. package/dist/core/remote-catalog-provider.js +2 -1
  72. package/dist/core/remote-catalog-provider.js.map +1 -1
  73. package/dist/core/resource-loader.d.ts.map +1 -1
  74. package/dist/core/resource-loader.js +3 -2
  75. package/dist/core/resource-loader.js.map +1 -1
  76. package/dist/core/sdk.d.ts +2 -2
  77. package/dist/core/sdk.d.ts.map +1 -1
  78. package/dist/core/sdk.js +10 -3
  79. package/dist/core/sdk.js.map +1 -1
  80. package/dist/core/session-export.d.ts +4 -0
  81. package/dist/core/session-export.d.ts.map +1 -0
  82. package/dist/core/session-export.js +32 -0
  83. package/dist/core/session-export.js.map +1 -0
  84. package/dist/core/session-manager.d.ts.map +1 -1
  85. package/dist/core/session-manager.js +2 -1
  86. package/dist/core/session-manager.js.map +1 -1
  87. package/dist/core/settings-diagnostics.d.ts +9 -0
  88. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  89. package/dist/core/settings-diagnostics.js +21 -0
  90. package/dist/core/settings-diagnostics.js.map +1 -0
  91. package/dist/core/settings-manager.d.ts +9 -0
  92. package/dist/core/settings-manager.d.ts.map +1 -1
  93. package/dist/core/settings-manager.js +53 -11
  94. package/dist/core/settings-manager.js.map +1 -1
  95. package/dist/core/skills.d.ts.map +1 -1
  96. package/dist/core/skills.js +51 -33
  97. package/dist/core/skills.js.map +1 -1
  98. package/dist/core/slash-commands.d.ts.map +1 -1
  99. package/dist/core/slash-commands.js +2 -1
  100. package/dist/core/slash-commands.js.map +1 -1
  101. package/dist/core/system-prompt.d.ts.map +1 -1
  102. package/dist/core/system-prompt.js +8 -2
  103. package/dist/core/system-prompt.js.map +1 -1
  104. package/dist/core/tools/bash.d.ts +14 -1
  105. package/dist/core/tools/bash.d.ts.map +1 -1
  106. package/dist/core/tools/bash.js +36 -20
  107. package/dist/core/tools/bash.js.map +1 -1
  108. package/dist/core/tools/edit-diff.d.ts +0 -5
  109. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  110. package/dist/core/tools/edit-diff.js +2 -5
  111. package/dist/core/tools/edit-diff.js.map +1 -1
  112. package/dist/core/tools/edit.d.ts.map +1 -1
  113. package/dist/core/tools/edit.js +20 -4
  114. package/dist/core/tools/edit.js.map +1 -1
  115. package/dist/core/tools/index.d.ts +4 -1
  116. package/dist/core/tools/index.d.ts.map +1 -1
  117. package/dist/core/tools/index.js +9 -0
  118. package/dist/core/tools/index.js.map +1 -1
  119. package/dist/core/tools/powershell.d.ts +16 -0
  120. package/dist/core/tools/powershell.d.ts.map +1 -0
  121. package/dist/core/tools/powershell.js +39 -0
  122. package/dist/core/tools/powershell.js.map +1 -0
  123. package/dist/core/trust-manager.d.ts.map +1 -1
  124. package/dist/core/trust-manager.js +2 -1
  125. package/dist/core/trust-manager.js.map +1 -1
  126. package/dist/extensions/llama/index.d.ts.map +1 -1
  127. package/dist/extensions/llama/index.js +2 -0
  128. package/dist/extensions/llama/index.js.map +1 -1
  129. package/dist/extensions/llama/provider.d.ts.map +1 -1
  130. package/dist/extensions/llama/provider.js +6 -2
  131. package/dist/extensions/llama/provider.js.map +1 -1
  132. package/dist/index.d.ts +5 -5
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +4 -4
  135. package/dist/index.js.map +1 -1
  136. package/dist/main.d.ts +4 -0
  137. package/dist/main.d.ts.map +1 -1
  138. package/dist/main.js +18 -15
  139. package/dist/main.js.map +1 -1
  140. package/dist/migrations.d.ts.map +1 -1
  141. package/dist/migrations.js +4 -3
  142. package/dist/migrations.js.map +1 -1
  143. package/dist/modes/interactive/components/model-selector.d.ts +10 -3
  144. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  145. package/dist/modes/interactive/components/model-selector.js +51 -9
  146. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  147. package/dist/modes/interactive/components/settings-selector.d.ts +7 -2
  148. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  149. package/dist/modes/interactive/components/settings-selector.js +118 -56
  150. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  151. package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  152. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  153. package/dist/modes/interactive/components/settings-submenu.js +165 -0
  154. package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  155. package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
  156. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  157. package/dist/modes/interactive/components/thinking-selector.js +74 -17
  158. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  159. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  160. package/dist/modes/interactive/external-editor.js +2 -1
  161. package/dist/modes/interactive/external-editor.js.map +1 -1
  162. package/dist/modes/interactive/interactive-mode.d.ts +11 -0
  163. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  164. package/dist/modes/interactive/interactive-mode.js +164 -17
  165. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  166. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  167. package/dist/modes/interactive/theme/theme.js +5 -4
  168. package/dist/modes/interactive/theme/theme.js.map +1 -1
  169. package/dist/modes/json-event.d.ts +16 -13
  170. package/dist/modes/json-event.d.ts.map +1 -1
  171. package/dist/modes/json-event.js +20 -6
  172. package/dist/modes/json-event.js.map +1 -1
  173. package/dist/package-manager-cli.d.ts +1 -0
  174. package/dist/package-manager-cli.d.ts.map +1 -1
  175. package/dist/package-manager-cli.js +197 -5
  176. package/dist/package-manager-cli.js.map +1 -1
  177. package/dist/utils/frontmatter.d.ts.map +1 -1
  178. package/dist/utils/frontmatter.js +2 -1
  179. package/dist/utils/frontmatter.js.map +1 -1
  180. package/dist/utils/management-http.d.ts +5 -3
  181. package/dist/utils/management-http.d.ts.map +1 -1
  182. package/dist/utils/management-http.js +14 -10
  183. package/dist/utils/management-http.js.map +1 -1
  184. package/dist/utils/shell.d.ts +3 -0
  185. package/dist/utils/shell.d.ts.map +1 -1
  186. package/dist/utils/shell.js +17 -5
  187. package/dist/utils/shell.js.map +1 -1
  188. package/dist/utils/syntax-highlight.d.ts +1 -0
  189. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  190. package/dist/utils/syntax-highlight.js +60 -1
  191. package/dist/utils/syntax-highlight.js.map +1 -1
  192. package/dist/utils/text.d.ts +8 -0
  193. package/dist/utils/text.d.ts.map +1 -0
  194. package/dist/utils/text.js +9 -0
  195. package/dist/utils/text.js.map +1 -0
  196. package/docs/compaction.md +15 -0
  197. package/docs/custom-provider.md +5 -2
  198. package/docs/extensions.md +17 -7
  199. package/docs/json.md +7 -2
  200. package/docs/keybindings.md +8 -8
  201. package/docs/llama-cpp.md +2 -0
  202. package/docs/models.md +8 -2
  203. package/docs/packages.md +2 -2
  204. package/docs/rpc.md +9 -3
  205. package/docs/sdk.md +7 -2
  206. package/docs/settings.md +11 -3
  207. package/docs/skills.md +4 -3
  208. package/docs/terminal-setup.md +11 -7
  209. package/docs/usage.md +6 -2
  210. package/docs/windows.md +24 -2
  211. package/examples/extensions/border-status-editor.ts +1 -1
  212. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  213. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  214. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  215. package/examples/extensions/git-checkpoint.ts +2 -2
  216. package/examples/extensions/gondolin/package-lock.json +2 -2
  217. package/examples/extensions/gondolin/package.json +1 -1
  218. package/examples/extensions/notify.ts +3 -1
  219. package/examples/extensions/sandbox/package-lock.json +2 -2
  220. package/examples/extensions/sandbox/package.json +1 -1
  221. package/examples/extensions/subagent/README.md +1 -1
  222. package/examples/extensions/subagent/index.ts +6 -1
  223. package/examples/extensions/titlebar-spinner.ts +1 -1
  224. package/examples/extensions/with-deps/package-lock.json +2 -2
  225. package/examples/extensions/with-deps/package.json +1 -1
  226. package/examples/rpc-extension-ui.ts +1 -1
  227. package/examples/sdk/06-extensions.ts +1 -1
  228. package/examples/sdk/README.md +1 -1
  229. package/npm-shrinkwrap.json +276 -390
  230. package/package.json +9 -11
package/docs/settings.md CHANGED
@@ -31,8 +31,8 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
31
31
  | `defaultModel` | string | - | Default model ID |
32
32
  | `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
33
33
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
34
- | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
35
- | `thinkingBudgets` | object | - | Custom token budgets per thinking level |
34
+ | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses and compaction or branch-summary usage |
35
+ | `thinkingBudgets` | object | - | Custom token budgets per thinking level. Anthropic, Google, and Bedrock use these natively. OpenAI-compatible models use them when `compat.thinkingTokenBudgetField` (or `supportsThinkingTokenBudget`) is set. |
36
36
 
37
37
  #### thinkingBudgets
38
38
 
@@ -248,7 +248,7 @@ Windows paths in JSON must use forward slashes or escaped backslashes:
248
248
  |---------|------|---------|-------------|
249
249
  | `defaultTools` | string[] | - | Built-in tools enabled initially. When omitted, Pi uses its standard defaults |
250
250
 
251
- `defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled:
251
+ `defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled. Available built-ins are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`:
252
252
 
253
253
  ```json
254
254
  {
@@ -256,6 +256,14 @@ Windows paths in JSON must use forward slashes or escaped backslashes:
256
256
  }
257
257
  ```
258
258
 
259
+ On Windows, select `powershell` instead of `bash`, or include both:
260
+
261
+ ```json
262
+ {
263
+ "defaultTools": ["read", "powershell", "edit", "write"]
264
+ }
265
+ ```
266
+
259
267
  An empty array starts with no built-in tools while preserving extension and SDK custom tools. `--tools` replaces this behavior with a strict allowlist for all tools, `--no-tools` disables all tools, and `--no-builtin-tools` disables the built-in defaults. `--exclude-tools` filters the resulting list. A project `defaultTools` array replaces the global array.
260
268
 
261
269
  ### Sessions
package/docs/skills.md CHANGED
@@ -43,9 +43,10 @@ Apex Code loads skills from:
43
43
  > whichever of these roots they resolve under.
44
44
 
45
45
  Discovery rules:
46
- - In `~/.apex-code/agent/skills/` and `.apex-code/skills/`, direct root `.md` files are discovered as individual skills
46
+ - In `~/.apex-code/agent/skills/` and `.apex-code/skills/`, direct root `.md` files are discovered as individual skills when they have valid skill frontmatter with a non-empty `description`
47
47
  - In all skill locations, directories containing `SKILL.md` are discovered recursively
48
- - In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored
48
+ - In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored, but nested `.md` files in grouping folders are discovered when they declare skill frontmatter
49
+ - Root Markdown files other than `SKILL.md` that do not look like skills are ignored silently
49
50
 
50
51
  Disable discovery with `--no-skills` (explicit `--skill` paths still load).
51
52
 
@@ -233,7 +234,7 @@ Apex Code validates skills against the Agent Skills standard. Most issues produc
233
234
 
234
235
  Unknown frontmatter fields are ignored.
235
236
 
236
- **Exception:** Skills with missing description are not loaded.
237
+ Declared skills with missing descriptions are not loaded. Malformed `SKILL.md` files and `SKILL.md` files without a description produce warnings and are not loaded. Other Markdown files without valid skill frontmatter are ignored.
237
238
 
238
239
  Name collisions (same name from different locations) warn and keep the first skill found.
239
240
 
@@ -120,7 +120,15 @@ Add to `keybindings.json`:
120
120
 
121
121
  ## Windows Terminal
122
122
 
123
- Add to `settings.json` (Ctrl+Shift+, or Settings Open JSON file) to forward the modified Enter keys Apex Code uses:
123
+ Apex Code uses Windows-style keybindings when running natively on Windows or in WSL:
124
+
125
+ - `Alt+V` pastes an image or clipboard text.
126
+ - `Ctrl+F` searches the transcript in fullscreen mode, and `Ctrl+Up`/`Ctrl+Down` jump between marked messages.
127
+ - `Alt+P` cycles to the previous model.
128
+ - `Ctrl+Z` undoes editing on native Windows; WSL uses `Alt+Z` so `Ctrl+Z` can suspend Apex Code.
129
+ - `Ctrl+Q` queues a follow-up message and `Alt+Q` restores queued messages.
130
+
131
+ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward `Shift+Enter` for inserting a new line:
124
132
 
125
133
  ```json
126
134
  {
@@ -128,10 +136,6 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
128
136
  {
129
137
  "command": { "action": "sendInput", "input": "\u001b[13;2u" },
130
138
  "keys": "shift+enter"
131
- },
132
- {
133
- "command": { "action": "sendInput", "input": "\u001b[13;3u" },
134
- "keys": "alt+enter"
135
139
  }
136
140
  ]
137
141
  }
@@ -139,9 +143,9 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
139
143
 
140
144
  - `Shift+Enter` inserts a new line.
141
145
  - Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents Apex Code from receiving `Alt+Enter` for follow-up queueing.
142
- - Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Apex Code instead.
146
+ - Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Apex Code instead, or configure Windows Terminal to send the key and bind `app.message.followUp` to `alt+enter` in Apex Code to use it instead of the `Ctrl+Q` default.
143
147
 
144
- If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
148
+ If you already have an `actions` array, add the object to it. Fully close and reopen Windows Terminal after changing its settings.
145
149
 
146
150
  ## xfce4-terminal, terminator
147
151
 
package/docs/usage.md CHANGED
@@ -142,7 +142,7 @@ If you use Apex Code for open source work and want to publish sessions for model
142
142
  ## CLI Reference
143
143
 
144
144
  ```bash
145
- apex-code [options] [@files...] [messages...]
145
+ apex-code [options] [--] [@files...] [messages...]
146
146
  ```
147
147
 
148
148
  ### Package Commands
@@ -215,7 +215,7 @@ cat README.md | apex-code -p "Summarize this text"
215
215
  | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
216
216
  | `--no-tools`, `-nt` | Disable all tools |
217
217
 
218
- Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
218
+ Built-in tools: `read`, `bash`, `powershell` (Windows), `edit`, `write`, `grep`, `find`, `ls`.
219
219
 
220
220
  ### Resource Options
221
221
 
@@ -248,6 +248,7 @@ apex-code --no-extensions -e ./my-extension.ts
248
248
  | `--verbose` | Force verbose startup |
249
249
  | `-a`, `--approve` | Trust project-local files for this run |
250
250
  | `-na`, `--no-approve` | Ignore project-local files for this run |
251
+ | `--` | Stop option parsing; remaining arguments are prompts or `@file` inputs |
251
252
  | `-h`, `--help` | Show help |
252
253
  | `-v`, `--version` | Show version |
253
254
 
@@ -274,6 +275,9 @@ apex-code "List all .ts files in src/"
274
275
  # Non-interactive
275
276
  apex-code -p "Summarize this codebase"
276
277
 
278
+ # Prompt beginning with a dash
279
+ pi -p -- "- Summarize these points"
280
+
277
281
  # Non-interactive with piped stdin
278
282
  cat README.md | apex-code -p "Summarize this text"
279
283
 
package/docs/windows.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Windows Setup
2
2
 
3
- Apex Code requires a bash shell on Windows. Checked locations (in order):
3
+ Apex Code uses Git Bash by default on Windows. Checked locations (in order):
4
4
 
5
5
  1. Custom path from `~/.apex-code/agent/settings.json`
6
6
  2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
@@ -8,7 +8,29 @@ Apex Code requires a bash shell on Windows. Checked locations (in order):
8
8
 
9
9
  For most users, [Git for Windows](https://git-scm.com/download/win) is sufficient.
10
10
 
11
- ## Custom Shell Path
11
+ ## PowerShell Tool
12
+
13
+ The optional `powershell` tool runs commands through `pwsh.exe` when available, otherwise Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
14
+
15
+ Use `defaultTools` to replace the model-facing `bash` tool:
16
+
17
+ ```json
18
+ {
19
+ "defaultTools": ["read", "powershell", "edit", "write"]
20
+ }
21
+ ```
22
+
23
+ Or enable both while comparing behavior:
24
+
25
+ ```json
26
+ {
27
+ "defaultTools": ["read", "bash", "powershell", "edit", "write"]
28
+ }
29
+ ```
30
+
31
+ The `!` and `!!` editor commands still use Bash.
32
+
33
+ ## Custom Bash Path
12
34
 
13
35
  ```json
14
36
  {
@@ -87,7 +87,7 @@ export default function (pi: ExtensionAPI) {
87
87
  activeTui?.requestRender();
88
88
  });
89
89
 
90
- pi.on("agent_end", () => {
90
+ pi.on("agent_settled", () => {
91
91
  isWorking = false;
92
92
  stopSpinner();
93
93
  activeTui?.requestRender();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "0.84.2",
3
+ "version": "0.84.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "0.84.2",
9
+ "version": "0.84.3",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.84.2",
4
+ "version": "0.84.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.84.2",
4
+ "version": "0.84.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -46,8 +46,8 @@ export default function (pi: ExtensionAPI) {
46
46
  }
47
47
  });
48
48
 
49
- pi.on("agent_end", async () => {
50
- // Clear checkpoints after agent completes
49
+ pi.on("agent_settled", async () => {
50
+ // Clear checkpoints after the full agent run completes
51
51
  checkpoints.clear();
52
52
  });
53
53
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "0.84.2",
3
+ "version": "0.84.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "0.84.2",
9
+ "version": "0.84.3",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.84.2",
4
+ "version": "0.84.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -49,7 +49,9 @@ function notify(title: string, body: string): void {
49
49
  }
50
50
 
51
51
  export default function (pi: ExtensionAPI) {
52
- pi.on("agent_end", async () => {
52
+ // `agent_end` fires after each low-level run; Pi may still retry, compact,
53
+ // or continue with queued follow-ups. Notify only after the full run settles.
54
+ pi.on("agent_settled", async () => {
53
55
  notify("Pi", "Ready for input");
54
56
  });
55
57
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.14.2",
9
+ "version": "1.14.3",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "^0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
3
  "private": true,
4
- "version": "1.14.2",
4
+ "version": "1.14.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -62,7 +62,7 @@ This tool executes a separate `pi` subprocess with a delegated system prompt and
62
62
 
63
63
  To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
64
64
 
65
- When running interactively, the tool prompts for confirmation before running project-local agents. Set `confirmProjectAgents: false` to disable.
65
+ When running interactively, the tool prompts for confirmation before running project-local agents in untrusted projects. Trusted projects skip the additional prompt. Set `confirmProjectAgents: false` to disable confirmation.
66
66
 
67
67
  ## Usage
68
68
 
@@ -511,7 +511,12 @@ export default function (pi: ExtensionAPI) {
511
511
  };
512
512
  }
513
513
 
514
- if ((agentScope === "project" || agentScope === "both") && confirmProjectAgents && ctx.hasUI) {
514
+ if (
515
+ (agentScope === "project" || agentScope === "both") &&
516
+ confirmProjectAgents &&
517
+ ctx.hasUI &&
518
+ !ctx.isProjectTrusted()
519
+ ) {
515
520
  const requestedAgentNames = new Set<string>();
516
521
  if (params.chain) for (const step of params.chain) requestedAgentNames.add(step.agent);
517
522
  if (params.tasks) for (const t of params.tasks) requestedAgentNames.add(t.agent);
@@ -48,7 +48,7 @@ export default function (pi: ExtensionAPI) {
48
48
  startAnimation(ctx);
49
49
  });
50
50
 
51
- pi.on("agent_end", async (_event, ctx) => {
51
+ pi.on("agent_settled", async (_event, ctx) => {
52
52
  stopAnimation(ctx);
53
53
  });
54
54
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "0.84.2",
3
+ "version": "0.84.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "0.84.2",
9
+ "version": "0.84.3",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.84.2",
4
+ "version": "0.84.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -576,7 +576,7 @@ async function main() {
576
576
  return;
577
577
  }
578
578
 
579
- if (data.type === "agent_end") {
579
+ if (data.type === "agent_settled") {
580
580
  isStreaming = false;
581
581
  hideLoading();
582
582
  outputLog.append("");
@@ -66,7 +66,7 @@ export default function (pi: ExtensionAPI) {
66
66
  });
67
67
 
68
68
  pi.on("agent_end", async (event) => {
69
- console.log(\`[Extension] Done, \${event.messages.length} messages\`);
69
+ console.log(\`[Extension] Low-level run ended, \${event.messages.length} messages\`);
70
70
  });
71
71
 
72
72
  // Register a custom tool
@@ -132,7 +132,7 @@ session.subscribe((event) => {
132
132
  case "tool_execution_end":
133
133
  console.log(`Result: ${event.result}`);
134
134
  break;
135
- case "agent_end":
135
+ case "agent_settled":
136
136
  console.log("Done");
137
137
  break;
138
138
  }