@code-yeongyu/senpi 2026.9.25 → 2026.9.27-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 (230) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/bun-runtime.d.ts +18 -2
  3. package/dist/bun-runtime.d.ts.map +1 -1
  4. package/dist/bun-runtime.js +60 -8
  5. package/dist/bun-runtime.js.map +1 -1
  6. package/dist/bundle/chunks/{app-server-command-RB6QUPRI.js → app-server-command-ATWHNOOO.js} +1 -1
  7. package/dist/bundle/chunks/bun-extension-importer-R4HXF3GD.js +14 -0
  8. package/dist/bundle/chunks/chunk-2L26KPZ6.js +8 -0
  9. package/dist/bundle/chunks/{chunk-3WBSBDBX.js → chunk-3CC5ZOBV.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-OZCB6BP3.js → chunk-67BC7VZV.js} +4 -4
  11. package/dist/bundle/chunks/{chunk-JJ3NJZBD.js → chunk-6SLQ5HFO.js} +48 -45
  12. package/dist/bundle/chunks/{chunk-MKAM7IRH.js → chunk-6W2DB2GC.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-BSOJHK4W.js → chunk-7FXXRPB3.js} +2 -1
  14. package/dist/bundle/chunks/{chunk-Y54V65MS.js → chunk-HPY47AVX.js} +1 -1
  15. package/dist/bundle/chunks/{chunk-CLZVNQW3.js → chunk-LPFZGWG2.js} +1 -1
  16. package/dist/bundle/chunks/chunk-W3D3ZYDS.js +2 -0
  17. package/dist/bundle/chunks/{chunk-UBPMXBOJ.js → chunk-XKLR7C5B.js} +1 -1
  18. package/dist/bundle/chunks/{cli-main-KO53KYDN.js → cli-main-HOM6UH3H.js} +1 -1
  19. package/dist/bundle/chunks/{help-fast-path-ZGKPSDFO.js → help-fast-path-YGYHMV2W.js} +1 -1
  20. package/dist/bundle/chunks/{host-command-BMHJ4YUD.js → host-command-XXSAFWBW.js} +1 -1
  21. package/dist/bundle/chunks/{host-lifecycle-2GZAGSGW.js → host-lifecycle-GOMGJ25O.js} +1 -1
  22. package/dist/bundle/chunks/{interactive-host-runtime-YI75GFD5.js → interactive-host-runtime-IYCZWJGX.js} +1 -1
  23. package/dist/bundle/chunks/{interactive-mode-ABDNLJSI.js → interactive-mode-ZMO7YVYU.js} +1 -1
  24. package/dist/bundle/chunks/{multi-session-host-JV3MNWXZ.js → multi-session-host-CE3W6COI.js} +1 -1
  25. package/dist/bundle/chunks/{package-manager-cli-ZYYAVCXU.js → package-manager-cli-2PHRL2SX.js} +1 -1
  26. package/dist/bundle/chunks/{rpc-mode-Q2OUJURB.js → rpc-mode-WCETTMFV.js} +1 -1
  27. package/dist/bundle/chunks/session-worker.js +135 -131
  28. package/dist/bundle/cli.js +1 -1
  29. package/dist/bundle/index.js +1 -1
  30. package/dist/bundle/rpc-entry.js +1 -1
  31. package/dist/cli/args.d.ts +1 -0
  32. package/dist/cli/args.d.ts.map +1 -1
  33. package/dist/cli/args.js +4 -0
  34. package/dist/cli/args.js.map +1 -1
  35. package/dist/cli/cross-project-session.d.ts +22 -0
  36. package/dist/cli/cross-project-session.d.ts.map +1 -0
  37. package/dist/cli/cross-project-session.js +38 -0
  38. package/dist/cli/cross-project-session.js.map +1 -0
  39. package/dist/core/agent-session.d.ts.map +1 -1
  40. package/dist/core/agent-session.js +19 -5
  41. package/dist/core/agent-session.js.map +1 -1
  42. package/dist/core/dynamic-prompt/handoff.js +1 -1
  43. package/dist/core/dynamic-prompt/handoff.js.map +1 -1
  44. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  45. package/dist/core/extensions/builtin/index.js +2 -0
  46. package/dist/core/extensions/builtin/index.js.map +1 -1
  47. package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
  48. package/dist/core/extensions/builtin/permission-system/index.js +5 -2
  49. package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
  50. package/dist/core/extensions/builtin/permission-system/parsers.d.ts +5 -0
  51. package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
  52. package/dist/core/extensions/builtin/permission-system/parsers.js +13 -0
  53. package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
  54. package/dist/core/extensions/builtin/repository-identity.d.ts +6 -0
  55. package/dist/core/extensions/builtin/repository-identity.d.ts.map +1 -0
  56. package/dist/core/extensions/builtin/repository-identity.js +33 -0
  57. package/dist/core/extensions/builtin/repository-identity.js.map +1 -0
  58. package/dist/core/extensions/builtin/todotools/state.d.ts +1 -1
  59. package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
  60. package/dist/core/extensions/builtin/todotools/state.js +1 -1
  61. package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
  62. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.d.ts.map +1 -1
  63. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.js +3 -1
  64. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.js.map +1 -1
  65. package/dist/core/extensions/bun-extension-importer.d.ts.map +1 -1
  66. package/dist/core/extensions/bun-extension-importer.js +10 -4
  67. package/dist/core/extensions/bun-extension-importer.js.map +1 -1
  68. package/dist/core/extensions/bun-extension-registry.js +6 -5
  69. package/dist/core/extensions/bun-extension-registry.js.map +1 -1
  70. package/dist/core/extensions/index.d.ts +1 -1
  71. package/dist/core/extensions/index.d.ts.map +1 -1
  72. package/dist/core/extensions/index.js.map +1 -1
  73. package/dist/core/extensions/kernel-prelude.d.ts +13 -0
  74. package/dist/core/extensions/kernel-prelude.d.ts.map +1 -0
  75. package/dist/core/extensions/kernel-prelude.js +38 -0
  76. package/dist/core/extensions/kernel-prelude.js.map +1 -0
  77. package/dist/core/extensions/types.d.ts +44 -2
  78. package/dist/core/extensions/types.d.ts.map +1 -1
  79. package/dist/core/extensions/types.js.map +1 -1
  80. package/dist/core/messages.d.ts.map +1 -1
  81. package/dist/core/messages.js +4 -2
  82. package/dist/core/messages.js.map +1 -1
  83. package/dist/core/model-resolver.js +1 -1
  84. package/dist/core/model-resolver.js.map +1 -1
  85. package/dist/core/provider-rejected-images.d.ts +18 -0
  86. package/dist/core/provider-rejected-images.d.ts.map +1 -0
  87. package/dist/core/provider-rejected-images.js +107 -0
  88. package/dist/core/provider-rejected-images.js.map +1 -0
  89. package/dist/core/repository-identity.d.ts +18 -0
  90. package/dist/core/repository-identity.d.ts.map +1 -0
  91. package/dist/core/repository-identity.js +75 -0
  92. package/dist/core/repository-identity.js.map +1 -0
  93. package/dist/core/session-rebind.d.ts +17 -0
  94. package/dist/core/session-rebind.d.ts.map +1 -0
  95. package/dist/core/session-rebind.js +111 -0
  96. package/dist/core/session-rebind.js.map +1 -0
  97. package/dist/core/session-title-generator.d.ts.map +1 -1
  98. package/dist/core/session-title-generator.js +21 -3
  99. package/dist/core/session-title-generator.js.map +1 -1
  100. package/dist/core/session-title-reasoning.d.ts +14 -0
  101. package/dist/core/session-title-reasoning.d.ts.map +1 -0
  102. package/dist/core/session-title-reasoning.js +31 -0
  103. package/dist/core/session-title-reasoning.js.map +1 -0
  104. package/dist/core/tools/path-utils.d.ts.map +1 -1
  105. package/dist/core/tools/path-utils.js +13 -0
  106. package/dist/core/tools/path-utils.js.map +1 -1
  107. package/dist/index.d.ts +1 -1
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js.map +1 -1
  110. package/dist/main.d.ts +6 -0
  111. package/dist/main.d.ts.map +1 -1
  112. package/dist/main.js +100 -19
  113. package/dist/main.js.map +1 -1
  114. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  115. package/dist/modes/interactive/interactive-mode.js +2 -0
  116. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  117. package/dist/modes/interactive/runtime-notice-presenter.d.ts +8 -0
  118. package/dist/modes/interactive/runtime-notice-presenter.d.ts.map +1 -0
  119. package/dist/modes/interactive/runtime-notice-presenter.js +69 -0
  120. package/dist/modes/interactive/runtime-notice-presenter.js.map +1 -0
  121. package/dist/modes/interactive/runtime-notice.d.ts +50 -0
  122. package/dist/modes/interactive/runtime-notice.d.ts.map +1 -0
  123. package/dist/modes/interactive/runtime-notice.js +104 -0
  124. package/dist/modes/interactive/runtime-notice.js.map +1 -0
  125. package/docs/environment-variables.md +2 -0
  126. package/docs/extensions.md +27 -1
  127. package/docs/quickstart.md +7 -1
  128. package/docs/sessions.md +9 -0
  129. package/docs/usage.md +1 -0
  130. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +38 -0
  131. package/node_modules/@code-yeongyu/senpi-codemode/README.md +7 -0
  132. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  133. package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/protocol.ts +9 -0
  134. package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/schema-bridge.ts +2 -0
  135. package/node_modules/@code-yeongyu/senpi-codemode/src/extension/kernel-preludes.ts +30 -0
  136. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +15 -1
  137. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/context-manager.ts +1 -1
  138. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/local-module-loader.ts +16 -2
  139. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel.ts +6 -1
  140. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/prelude.py +15 -2
  141. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/transport.ts +7 -1
  142. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/kernel-prelude-plan.ts +19 -0
  143. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt-template.ts +2 -1
  144. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +4 -0
  145. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +11 -1
  146. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +1 -0
  147. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/run-eval-cell.ts +1 -0
  148. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +3 -1
  149. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  150. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  151. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  152. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  153. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  154. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  155. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  156. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  157. package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
  158. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  159. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  160. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  161. package/package.json +7 -22
  162. package/dist/bundle/chunks/bun-extension-importer-H4IJCWWQ.js +0 -14
  163. package/dist/bundle/chunks/chunk-34HMVB33.js +0 -2
  164. package/dist/bundle/chunks/chunk-SGYEOIOJ.js +0 -8
  165. package/node_modules/@code-yeongyu/senpi-desktop-engine/README.md +0 -31
  166. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.d.ts +0 -38
  167. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.d.ts.map +0 -1
  168. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.js +0 -117
  169. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.js.map +0 -1
  170. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.d.ts +0 -3
  171. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.d.ts.map +0 -1
  172. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.js +0 -3
  173. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.js.map +0 -1
  174. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.d.ts +0 -42
  175. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.d.ts.map +0 -1
  176. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.js +0 -79
  177. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.js.map +0 -1
  178. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/check-prebuild-fresh.mjs +0 -160
  179. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/index.d.ts +0 -20
  180. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/index.js +0 -23
  181. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/prebuilds/darwin-arm64/senpi-desktop-engine +0 -0
  182. package/node_modules/@code-yeongyu/senpi-desktop-engine/package.json +0 -53
  183. package/node_modules/@code-yeongyu/senpi-desktop-prelude/README.md +0 -20
  184. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.d.ts +0 -2
  185. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.d.ts.map +0 -1
  186. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.js +0 -2
  187. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.js.map +0 -1
  188. package/node_modules/@code-yeongyu/senpi-desktop-prelude/package.json +0 -44
  189. package/node_modules/@code-yeongyu/senpi-desktop-protocol/README.md +0 -20
  190. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.d.ts +0 -38
  191. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.d.ts.map +0 -1
  192. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.js +0 -2
  193. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.js.map +0 -1
  194. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.d.ts +0 -28
  195. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.d.ts.map +0 -1
  196. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.js +0 -102
  197. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.js.map +0 -1
  198. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.d.ts +0 -14
  199. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.d.ts.map +0 -1
  200. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.js +0 -71
  201. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.js.map +0 -1
  202. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.d.ts +0 -7
  203. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.d.ts.map +0 -1
  204. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.js +0 -4
  205. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.js.map +0 -1
  206. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.d.ts +0 -66
  207. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.d.ts.map +0 -1
  208. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.js +0 -8
  209. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.js.map +0 -1
  210. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.d.ts +0 -44
  211. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.d.ts.map +0 -1
  212. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.js +0 -2
  213. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.js.map +0 -1
  214. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.d.ts +0 -59
  215. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.d.ts.map +0 -1
  216. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.js +0 -2
  217. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.js.map +0 -1
  218. package/node_modules/@code-yeongyu/senpi-desktop-protocol/package.json +0 -45
  219. package/node_modules/@code-yeongyu/senpi-desktop-service/README.md +0 -27
  220. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.d.ts +0 -2
  221. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.d.ts.map +0 -1
  222. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.js +0 -2
  223. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.js.map +0 -1
  224. package/node_modules/@code-yeongyu/senpi-desktop-service/package.json +0 -44
  225. package/node_modules/@code-yeongyu/senpi-desktop-tool/README.md +0 -20
  226. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.d.ts +0 -2
  227. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.d.ts.map +0 -1
  228. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.js +0 -2
  229. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.js.map +0 -1
  230. package/node_modules/@code-yeongyu/senpi-desktop-tool/package.json +0 -44
@@ -60,6 +60,7 @@ import { CODEX_RESPONSES_API } from "./extensions/builtin/service-tier.js";
60
60
  import { deriveExtensionRegistrationId } from "./extensions/builtin/tool-search/engine/marker.js";
61
61
  import { getToolSearchService } from "./extensions/builtin/tool-search/service.js";
62
62
  import { ExecuteToolError, ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
63
+ import { projectKernelPrelude } from "./extensions/kernel-prelude.js";
63
64
  import { emitSessionShutdownEvent } from "./extensions/runner.js";
64
65
  import { normalizeToolExposure, RUNTIME_EXTENSION_PATH } from "./extensions/types.js";
65
66
  import { shouldWarnHighReasoning } from "./high-reasoning-warning.js";
@@ -70,6 +71,7 @@ import { getModelNarrowingPatterns, resolveModelScope } from "./model-resolver.j
70
71
  import { PROMPT_CACHE_SAFE_WAIT_ENV, resolvePromptCacheSafeWaitSeconds } from "./prompt-cache-budget.js";
71
72
  import { PromptCachePrefixBuilds } from "./prompt-cache-prefix-request.js";
72
73
  import { expandPromptTemplateWithMetadata } from "./prompt-templates.js";
74
+ import { rejectedImageSources } from "./provider-rejected-images.js";
73
75
  import { createProviderTimeoutRetryPlan, runBoundedRetryContinuation } from "./provider-timeout-retry.js";
74
76
  import { isBillingErrorMessage } from "./retry-fallback/billing.js";
75
77
  import { formatSelector } from "./retry-fallback/chains.js";
@@ -1677,6 +1679,12 @@ export class AgentSession {
1677
1679
  if (retryOutcome === "not-handled" && cursorQuotaRe && msg.errorMessage) {
1678
1680
  msg.errorMessage = `${msg.errorMessage} (likely provider usage/quota exhaustion: conversation is well below the model context window)`;
1679
1681
  }
1682
+ if (retryOutcome === "not-handled" && msg.stopReason === "error" && msg.errorMessage) {
1683
+ const rejectedImages = rejectedImageSources(this.agent.state.messages, msg);
1684
+ if (rejectedImages.length > 0) {
1685
+ msg.errorMessage = `${msg.errorMessage} (the rejected image from ${rejectedImages.join(", ")} is left out of later requests; send your next message to continue)`;
1686
+ }
1687
+ }
1680
1688
  if (retryOutcome === "not-handled" && this._retryAttempt > 0 && msg.errorMessage) {
1681
1689
  const attempt = this._retryAttempt;
1682
1690
  this._retryAttempt = 0;
@@ -2227,6 +2235,8 @@ export class AgentSession {
2227
2235
  description: definition.description,
2228
2236
  parameters: definition.parameters,
2229
2237
  promptGuidelines: definition.promptGuidelines,
2238
+ kernelPrelude: projectKernelPrelude(definition.name, definition.kernelPrelude),
2239
+ permissionParser: definition.permissionParser,
2230
2240
  sourceInfo,
2231
2241
  ...normalizeToolExposure(definition),
2232
2242
  }));
@@ -2439,6 +2449,7 @@ export class AgentSession {
2439
2449
  }
2440
2450
  const activeToolNamesChanged = validToolNames.length !== this.agent.state.tools.length ||
2441
2451
  validToolNames.some((name, index) => name !== this.agent.state.tools[index]?.name);
2452
+ const previousToolNames = new Set(this.agent.state.tools.map((tool) => tool.name));
2442
2453
  this.agent.state.tools = tools;
2443
2454
  for (const name of validToolNames) {
2444
2455
  if (!this._declaredToolNames.includes(name))
@@ -2456,6 +2467,11 @@ export class AgentSession {
2456
2467
  this._incrementMessageRevision();
2457
2468
  }
2458
2469
  }
2470
+ // senpi#2128: notification-only; the runner reports handler failures, so nothing awaits it.
2471
+ const activatedToolNames = validToolNames.filter((name) => !previousToolNames.has(name));
2472
+ if (activatedToolNames.length > 0 && this._extensionRunner?.hasHandlers("tool_activated")) {
2473
+ void this._extensionRunner.emit({ type: "tool_activated", toolNames: activatedToolNames });
2474
+ }
2459
2475
  }
2460
2476
  /**
2461
2477
  * senpi#2095: a model that accepts `allowed_tools` is declared every tool this session has
@@ -3322,11 +3338,9 @@ export class AgentSession {
3322
3338
  if (abortController.signal.aborted) {
3323
3339
  return;
3324
3340
  }
3325
- const message = error instanceof Error ? error.message : String(error);
3326
- this._extensionRunner.emitError({
3327
- extensionPath: RUNTIME_EXTENSION_PATH,
3328
- event: "session_title_generation",
3329
- error: message,
3341
+ // A missing title is cosmetic, so the failure stays out of the runtime-error surface.
3342
+ this._sessionLogger.debug("session_title_failed", {
3343
+ error: error instanceof Error ? error.message : String(error),
3330
3344
  });
3331
3345
  }
3332
3346
  finally {