@qduc/term2 0.20.0 → 0.21.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 (424) hide show
  1. package/dist/agent.d.ts.map +1 -1
  2. package/dist/agent.js +146 -94
  3. package/dist/agent.js.map +1 -1
  4. package/dist/app.d.ts +1 -1
  5. package/dist/app.d.ts.map +1 -1
  6. package/dist/app.js +62 -36
  7. package/dist/app.js.map +1 -1
  8. package/dist/cli.js +113 -36
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/guarded-settings-command.d.ts.map +1 -1
  11. package/dist/commands/guarded-settings-command.js +33 -5
  12. package/dist/commands/guarded-settings-command.js.map +1 -1
  13. package/dist/commands/mode-commands.d.ts +17 -12
  14. package/dist/commands/mode-commands.d.ts.map +1 -1
  15. package/dist/commands/mode-commands.js +68 -44
  16. package/dist/commands/mode-commands.js.map +1 -1
  17. package/dist/components/input/ApplicationInputSurface.d.ts.map +1 -1
  18. package/dist/components/input/ApplicationInputSurface.js +4 -0
  19. package/dist/components/input/ApplicationInputSurface.js.map +1 -1
  20. package/dist/components/input/MenuSurface.d.ts.map +1 -1
  21. package/dist/components/input/MenuSurface.js +1 -0
  22. package/dist/components/input/MenuSurface.js.map +1 -1
  23. package/dist/components/input/ProfileMenuSession.d.ts +16 -0
  24. package/dist/components/input/ProfileMenuSession.d.ts.map +1 -0
  25. package/dist/components/input/ProfileMenuSession.js +64 -0
  26. package/dist/components/input/ProfileMenuSession.js.map +1 -0
  27. package/dist/components/input/determine-active-menu.d.ts +3 -0
  28. package/dist/components/input/determine-active-menu.d.ts.map +1 -1
  29. package/dist/components/input/determine-active-menu.js +6 -1
  30. package/dist/components/input/determine-active-menu.js.map +1 -1
  31. package/dist/components/input/menu-registry.d.ts.map +1 -1
  32. package/dist/components/input/menu-registry.js +2 -0
  33. package/dist/components/input/menu-registry.js.map +1 -1
  34. package/dist/components/input/menu-types.d.ts +4 -0
  35. package/dist/components/input/menu-types.d.ts.map +1 -1
  36. package/dist/components/input/triggers.d.ts +1 -0
  37. package/dist/components/input/triggers.d.ts.map +1 -1
  38. package/dist/components/input/triggers.js +26 -0
  39. package/dist/components/input/triggers.js.map +1 -1
  40. package/dist/components/layout/BackgroundTaskManager.d.ts.map +1 -1
  41. package/dist/components/layout/BackgroundTaskManager.js +6 -2
  42. package/dist/components/layout/BackgroundTaskManager.js.map +1 -1
  43. package/dist/components/layout/BackgroundTasksPanel.d.ts.map +1 -1
  44. package/dist/components/layout/BackgroundTasksPanel.js +16 -8
  45. package/dist/components/layout/BackgroundTasksPanel.js.map +1 -1
  46. package/dist/components/layout/Banner.d.ts.map +1 -1
  47. package/dist/components/layout/Banner.js +10 -5
  48. package/dist/components/layout/Banner.js.map +1 -1
  49. package/dist/components/layout/StatusBar.d.ts.map +1 -1
  50. package/dist/components/layout/StatusBar.js +25 -12
  51. package/dist/components/layout/StatusBar.js.map +1 -1
  52. package/dist/components/menu/ProfileSelectionMenu.d.ts +12 -0
  53. package/dist/components/menu/ProfileSelectionMenu.d.ts.map +1 -0
  54. package/dist/components/menu/ProfileSelectionMenu.js +48 -0
  55. package/dist/components/menu/ProfileSelectionMenu.js.map +1 -0
  56. package/dist/components/menu/ResumeSelectionMenu.d.ts.map +1 -1
  57. package/dist/components/menu/ResumeSelectionMenu.js +6 -14
  58. package/dist/components/menu/ResumeSelectionMenu.js.map +1 -1
  59. package/dist/components/message/ChatMessage.js +1 -1
  60. package/dist/components/message/ChatMessage.js.map +1 -1
  61. package/dist/components/message/MessageList.d.ts.map +1 -1
  62. package/dist/components/message/MessageList.js +15 -9
  63. package/dist/components/message/MessageList.js.map +1 -1
  64. package/dist/components/message/command-message-helpers.d.ts +5 -5
  65. package/dist/context/InputContext.d.ts +1 -1
  66. package/dist/context/InputContext.d.ts.map +1 -1
  67. package/dist/context/InputContext.js +8 -0
  68. package/dist/context/InputContext.js.map +1 -1
  69. package/dist/contracts/session-rollover.d.ts +9 -1
  70. package/dist/contracts/session-rollover.d.ts.map +1 -1
  71. package/dist/contracts/streamed-model-turn.d.ts +20 -2
  72. package/dist/contracts/streamed-model-turn.d.ts.map +1 -1
  73. package/dist/gateway/gateway.d.ts.map +1 -1
  74. package/dist/gateway/gateway.js +19 -23
  75. package/dist/gateway/gateway.js.map +1 -1
  76. package/dist/gateway/launcher-seam.d.ts.map +1 -1
  77. package/dist/gateway/launcher-seam.js +2 -19
  78. package/dist/gateway/launcher-seam.js.map +1 -1
  79. package/dist/gateway/settings-rpc.d.ts +1 -1
  80. package/dist/gateway/settings-rpc.d.ts.map +1 -1
  81. package/dist/gateway/settings-rpc.js +2 -0
  82. package/dist/gateway/settings-rpc.js.map +1 -1
  83. package/dist/hooks/settings-completion-config.d.ts.map +1 -1
  84. package/dist/hooks/settings-completion-config.js +25 -1
  85. package/dist/hooks/settings-completion-config.js.map +1 -1
  86. package/dist/hooks/use-app-commands.d.ts +3 -1
  87. package/dist/hooks/use-app-commands.d.ts.map +1 -1
  88. package/dist/hooks/use-app-commands.js +21 -14
  89. package/dist/hooks/use-app-commands.js.map +1 -1
  90. package/dist/hooks/use-conversation.d.ts +2 -2
  91. package/dist/hooks/use-conversation.d.ts.map +1 -1
  92. package/dist/hooks/use-conversation.js +1 -1
  93. package/dist/hooks/use-conversation.js.map +1 -1
  94. package/dist/hooks/use-handoff-flow.d.ts +1 -0
  95. package/dist/hooks/use-handoff-flow.d.ts.map +1 -1
  96. package/dist/hooks/use-handoff-flow.js +19 -12
  97. package/dist/hooks/use-handoff-flow.js.map +1 -1
  98. package/dist/hooks/use-profile-selection.d.ts +34 -0
  99. package/dist/hooks/use-profile-selection.d.ts.map +1 -0
  100. package/dist/hooks/use-profile-selection.js +103 -0
  101. package/dist/hooks/use-profile-selection.js.map +1 -0
  102. package/dist/hooks/use-resume-selection.d.ts +2 -0
  103. package/dist/hooks/use-resume-selection.d.ts.map +1 -1
  104. package/dist/hooks/use-resume-selection.js +11 -9
  105. package/dist/hooks/use-resume-selection.js.map +1 -1
  106. package/dist/hooks/use-settings-value-completion.d.ts.map +1 -1
  107. package/dist/hooks/use-settings-value-completion.js +16 -0
  108. package/dist/hooks/use-settings-value-completion.js.map +1 -1
  109. package/dist/hooks/use-skill-selection.d.ts +5 -3
  110. package/dist/hooks/use-skill-selection.d.ts.map +1 -1
  111. package/dist/hooks/use-skill-selection.js +8 -6
  112. package/dist/hooks/use-skill-selection.js.map +1 -1
  113. package/dist/lib/agent-client.d.ts.map +1 -1
  114. package/dist/lib/agent-client.js +50 -14
  115. package/dist/lib/agent-client.js.map +1 -1
  116. package/dist/lib/agent-configuration.d.ts.map +1 -1
  117. package/dist/lib/agent-configuration.js +1 -4
  118. package/dist/lib/agent-configuration.js.map +1 -1
  119. package/dist/lib/agent-factory.d.ts.map +1 -1
  120. package/dist/lib/agent-factory.js +63 -41
  121. package/dist/lib/agent-factory.js.map +1 -1
  122. package/dist/lib/harness-input-idle.d.ts +10 -0
  123. package/dist/lib/harness-input-idle.d.ts.map +1 -1
  124. package/dist/lib/harness-input-idle.js +47 -5
  125. package/dist/lib/harness-input-idle.js.map +1 -1
  126. package/dist/non-interactive.d.ts.map +1 -1
  127. package/dist/non-interactive.js +6 -6
  128. package/dist/non-interactive.js.map +1 -1
  129. package/dist/prompts/memory.md +1 -1
  130. package/dist/prompts/prefix-quality.test.ts +8 -5
  131. package/dist/prompts/prompt-constructor.d.ts +5 -6
  132. package/dist/prompts/prompt-constructor.d.ts.map +1 -1
  133. package/dist/prompts/prompt-constructor.js +15 -7
  134. package/dist/prompts/prompt-constructor.js.map +1 -1
  135. package/dist/prompts/prompt-constructor.test.ts +73 -48
  136. package/dist/prompts/prompt-constructor.ts +21 -13
  137. package/dist/prompts/session-browser.md +2 -0
  138. package/dist/prompts/shell-auto-approval.d.ts +2 -2
  139. package/dist/prompts/shell-auto-approval.d.ts.map +1 -1
  140. package/dist/prompts/shell-auto-approval.js +19 -16
  141. package/dist/prompts/shell-auto-approval.js.map +1 -1
  142. package/dist/prompts/shell-auto-approval.ts +19 -16
  143. package/dist/providers/aborted-stream-recorder.js +2 -1
  144. package/dist/providers/aborted-stream-recorder.js.map +1 -1
  145. package/dist/providers/ai-sdk-streamed-model.d.ts.map +1 -1
  146. package/dist/providers/ai-sdk-streamed-model.js +7 -0
  147. package/dist/providers/ai-sdk-streamed-model.js.map +1 -1
  148. package/dist/providers/codex-responses-model.d.ts.map +1 -1
  149. package/dist/providers/codex-responses-model.js +75 -14
  150. package/dist/providers/codex-responses-model.js.map +1 -1
  151. package/dist/providers/codex-turn-converter.d.ts.map +1 -1
  152. package/dist/providers/codex-turn-converter.js +21 -4
  153. package/dist/providers/codex-turn-converter.js.map +1 -1
  154. package/dist/providers/codex.provider.d.ts.map +1 -1
  155. package/dist/providers/codex.provider.js +1 -0
  156. package/dist/providers/codex.provider.js.map +1 -1
  157. package/dist/providers/fetch/logging-middleware.d.ts.map +1 -1
  158. package/dist/providers/fetch/logging-middleware.js +22 -2
  159. package/dist/providers/fetch/logging-middleware.js.map +1 -1
  160. package/dist/providers/openai-chat-completions-model.js +119 -50
  161. package/dist/providers/openai-chat-completions-model.js.map +1 -1
  162. package/dist/providers/openai-responses-model.d.ts.map +1 -1
  163. package/dist/providers/openai-responses-model.js +131 -15
  164. package/dist/providers/openai-responses-model.js.map +1 -1
  165. package/dist/providers/registry.d.ts +1 -1
  166. package/dist/providers/registry.d.ts.map +1 -1
  167. package/dist/providers/retrying-model.d.ts.map +1 -1
  168. package/dist/providers/retrying-model.js +11 -2
  169. package/dist/providers/retrying-model.js.map +1 -1
  170. package/dist/services/agent-runtime/application-run-loop.d.ts +3 -1
  171. package/dist/services/agent-runtime/application-run-loop.d.ts.map +1 -1
  172. package/dist/services/agent-runtime/application-run-loop.js +99 -19
  173. package/dist/services/agent-runtime/application-run-loop.js.map +1 -1
  174. package/dist/services/agent-runtime/context-compaction/context-milestone-reminder.d.ts +2 -3
  175. package/dist/services/agent-runtime/context-compaction/context-milestone-reminder.d.ts.map +1 -1
  176. package/dist/services/agent-runtime/context-compaction/context-milestone-reminder.js +18 -9
  177. package/dist/services/agent-runtime/context-compaction/context-milestone-reminder.js.map +1 -1
  178. package/dist/services/agent-runtime/generation-guard.d.ts +25 -1
  179. package/dist/services/agent-runtime/generation-guard.d.ts.map +1 -1
  180. package/dist/services/agent-runtime/generation-guard.js +105 -1
  181. package/dist/services/agent-runtime/generation-guard.js.map +1 -1
  182. package/dist/services/agent-stream.d.ts +2 -0
  183. package/dist/services/agent-stream.d.ts.map +1 -1
  184. package/dist/services/agent-stream.js.map +1 -1
  185. package/dist/services/approval/approval-decision-policy.js +2 -2
  186. package/dist/services/approval/approval-decision-policy.js.map +1 -1
  187. package/dist/services/approval/shell-auto-approval-evaluator.d.ts +5 -1
  188. package/dist/services/approval/shell-auto-approval-evaluator.d.ts.map +1 -1
  189. package/dist/services/approval/shell-auto-approval-evaluator.js +42 -18
  190. package/dist/services/approval/shell-auto-approval-evaluator.js.map +1 -1
  191. package/dist/services/approval/shell-auto-approval-resolver.d.ts +5 -0
  192. package/dist/services/approval/shell-auto-approval-resolver.d.ts.map +1 -1
  193. package/dist/services/approval/shell-auto-approval-resolver.js +117 -20
  194. package/dist/services/approval/shell-auto-approval-resolver.js.map +1 -1
  195. package/dist/services/approval/tool-approval-batch-coordinator.d.ts.map +1 -1
  196. package/dist/services/approval/tool-approval-batch-coordinator.js +20 -3
  197. package/dist/services/approval/tool-approval-batch-coordinator.js.map +1 -1
  198. package/dist/services/conversation/conversation-adapter.d.ts.map +1 -1
  199. package/dist/services/conversation/conversation-adapter.js +2 -9
  200. package/dist/services/conversation/conversation-adapter.js.map +1 -1
  201. package/dist/services/conversation/conversation-decoder.d.ts.map +1 -1
  202. package/dist/services/conversation/conversation-decoder.js +6 -2
  203. package/dist/services/conversation/conversation-decoder.js.map +1 -1
  204. package/dist/services/conversation/conversation-orchestrator.d.ts.map +1 -1
  205. package/dist/services/conversation/conversation-orchestrator.js +14 -1
  206. package/dist/services/conversation/conversation-orchestrator.js.map +1 -1
  207. package/dist/services/conversation/conversation-persistence.d.ts +30 -0
  208. package/dist/services/conversation/conversation-persistence.d.ts.map +1 -1
  209. package/dist/services/conversation/conversation-persistence.js +101 -7
  210. package/dist/services/conversation/conversation-persistence.js.map +1 -1
  211. package/dist/services/conversation/conversation-replay.d.ts +2 -0
  212. package/dist/services/conversation/conversation-replay.d.ts.map +1 -1
  213. package/dist/services/conversation/conversation-replay.js +71 -57
  214. package/dist/services/conversation/conversation-replay.js.map +1 -1
  215. package/dist/services/conversation/conversation-result-builder.d.ts.map +1 -1
  216. package/dist/services/conversation/conversation-result-builder.js +21 -4
  217. package/dist/services/conversation/conversation-result-builder.js.map +1 -1
  218. package/dist/services/conversation/conversation-service.d.ts +3 -2
  219. package/dist/services/conversation/conversation-service.d.ts.map +1 -1
  220. package/dist/services/conversation/conversation-service.js +36 -15
  221. package/dist/services/conversation/conversation-service.js.map +1 -1
  222. package/dist/services/conversation/session-browser.d.ts +6 -1
  223. package/dist/services/conversation/session-browser.d.ts.map +1 -1
  224. package/dist/services/conversation/session-browser.js +128 -18
  225. package/dist/services/conversation/session-browser.js.map +1 -1
  226. package/dist/services/handoff/handoff-session.d.ts +2 -0
  227. package/dist/services/handoff/handoff-session.d.ts.map +1 -1
  228. package/dist/services/handoff/handoff-session.js +19 -3
  229. package/dist/services/handoff/handoff-session.js.map +1 -1
  230. package/dist/services/logging/conversation-log-events.d.ts +30 -3
  231. package/dist/services/logging/conversation-log-events.d.ts.map +1 -1
  232. package/dist/services/logging/conversation-log-events.js +1 -4
  233. package/dist/services/logging/conversation-log-events.js.map +1 -1
  234. package/dist/services/logging/logging-service.d.ts +1 -0
  235. package/dist/services/logging/logging-service.d.ts.map +1 -1
  236. package/dist/services/logging/logging-service.js +5 -2
  237. package/dist/services/logging/logging-service.js.map +1 -1
  238. package/dist/services/logging/provider-traffic.d.ts +8 -1
  239. package/dist/services/logging/provider-traffic.d.ts.map +1 -1
  240. package/dist/services/logging/provider-traffic.js +105 -10
  241. package/dist/services/logging/provider-traffic.js.map +1 -1
  242. package/dist/services/memory/memory-capabilities.d.ts.map +1 -1
  243. package/dist/services/memory/memory-capabilities.js +17 -5
  244. package/dist/services/memory/memory-capabilities.js.map +1 -1
  245. package/dist/services/memory/memory-store.d.ts +17 -0
  246. package/dist/services/memory/memory-store.d.ts.map +1 -1
  247. package/dist/services/memory/memory-store.js +71 -26
  248. package/dist/services/memory/memory-store.js.map +1 -1
  249. package/dist/services/mode-notices.d.ts +12 -9
  250. package/dist/services/mode-notices.d.ts.map +1 -1
  251. package/dist/services/mode-notices.js +83 -54
  252. package/dist/services/mode-notices.js.map +1 -1
  253. package/dist/services/model-service.d.ts +22 -4
  254. package/dist/services/model-service.d.ts.map +1 -1
  255. package/dist/services/model-service.js +148 -1
  256. package/dist/services/model-service.js.map +1 -1
  257. package/dist/services/models/model-catalog-session.d.ts +6 -0
  258. package/dist/services/models/model-catalog-session.d.ts.map +1 -1
  259. package/dist/services/models/model-catalog-session.js +7 -3
  260. package/dist/services/models/model-catalog-session.js.map +1 -1
  261. package/dist/services/models/model-listing.d.ts +57 -0
  262. package/dist/services/models/model-listing.d.ts.map +1 -0
  263. package/dist/services/models/model-listing.js +96 -0
  264. package/dist/services/models/model-listing.js.map +1 -0
  265. package/dist/services/models/model-resolution.d.ts +88 -0
  266. package/dist/services/models/model-resolution.d.ts.map +1 -0
  267. package/dist/services/models/model-resolution.js +292 -0
  268. package/dist/services/models/model-resolution.js.map +1 -0
  269. package/dist/services/plan-mode-interceptor.d.ts.map +1 -1
  270. package/dist/services/plan-mode-interceptor.js +5 -6
  271. package/dist/services/plan-mode-interceptor.js.map +1 -1
  272. package/dist/services/profiles/active-profile.d.ts +5 -0
  273. package/dist/services/profiles/active-profile.d.ts.map +1 -0
  274. package/dist/services/profiles/active-profile.js +33 -0
  275. package/dist/services/profiles/active-profile.js.map +1 -0
  276. package/dist/services/profiles/index.d.ts +9 -0
  277. package/dist/services/profiles/index.d.ts.map +1 -0
  278. package/dist/services/profiles/index.js +9 -0
  279. package/dist/services/profiles/index.js.map +1 -0
  280. package/dist/services/profiles/labels.d.ts +7 -0
  281. package/dist/services/profiles/labels.d.ts.map +1 -0
  282. package/dist/services/profiles/labels.js +22 -0
  283. package/dist/services/profiles/labels.js.map +1 -0
  284. package/dist/services/profiles/legacy-adapter.d.ts +28 -0
  285. package/dist/services/profiles/legacy-adapter.d.ts.map +1 -0
  286. package/dist/services/profiles/legacy-adapter.js +69 -0
  287. package/dist/services/profiles/legacy-adapter.js.map +1 -0
  288. package/dist/services/profiles/profile-transition.d.ts +48 -0
  289. package/dist/services/profiles/profile-transition.d.ts.map +1 -0
  290. package/dist/services/profiles/profile-transition.js +109 -0
  291. package/dist/services/profiles/profile-transition.js.map +1 -0
  292. package/dist/services/profiles/registry.d.ts +17 -0
  293. package/dist/services/profiles/registry.d.ts.map +1 -0
  294. package/dist/services/profiles/registry.js +147 -0
  295. package/dist/services/profiles/registry.js.map +1 -0
  296. package/dist/services/profiles/resolver.d.ts +10 -0
  297. package/dist/services/profiles/resolver.d.ts.map +1 -0
  298. package/dist/services/profiles/resolver.js +573 -0
  299. package/dist/services/profiles/resolver.js.map +1 -0
  300. package/dist/services/profiles/schema.d.ts +960 -0
  301. package/dist/services/profiles/schema.d.ts.map +1 -0
  302. package/dist/services/profiles/schema.js +196 -0
  303. package/dist/services/profiles/schema.js.map +1 -0
  304. package/dist/services/profiles/types.d.ts +224 -0
  305. package/dist/services/profiles/types.d.ts.map +1 -0
  306. package/dist/services/profiles/types.js +9 -0
  307. package/dist/services/profiles/types.js.map +1 -0
  308. package/dist/services/retry/committed-tool-continuation.d.ts +5 -0
  309. package/dist/services/retry/committed-tool-continuation.d.ts.map +1 -1
  310. package/dist/services/retry/committed-tool-continuation.js +6 -3
  311. package/dist/services/retry/committed-tool-continuation.js.map +1 -1
  312. package/dist/services/retry/retry-classifier.d.ts.map +1 -1
  313. package/dist/services/retry/retry-classifier.js +13 -10
  314. package/dist/services/retry/retry-classifier.js.map +1 -1
  315. package/dist/services/retry/retry-error-classification.d.ts +7 -0
  316. package/dist/services/retry/retry-error-classification.d.ts.map +1 -1
  317. package/dist/services/retry/retry-error-classification.js +32 -9
  318. package/dist/services/retry/retry-error-classification.js.map +1 -1
  319. package/dist/services/runtime-setting-router.d.ts.map +1 -1
  320. package/dist/services/runtime-setting-router.js +76 -23
  321. package/dist/services/runtime-setting-router.js.map +1 -1
  322. package/dist/services/session/initial-turn-recovery-handler.js +4 -4
  323. package/dist/services/session/initial-turn-recovery-handler.js.map +1 -1
  324. package/dist/services/session/session-input-planner.d.ts.map +1 -1
  325. package/dist/services/session/session-input-planner.js +2 -9
  326. package/dist/services/session/session-input-planner.js.map +1 -1
  327. package/dist/services/session/session-manager.d.ts.map +1 -1
  328. package/dist/services/session/session-manager.js +4 -1
  329. package/dist/services/session/session-manager.js.map +1 -1
  330. package/dist/services/session-rollover/session-rollover-brief.d.ts +2 -1
  331. package/dist/services/session-rollover/session-rollover-brief.d.ts.map +1 -1
  332. package/dist/services/session-rollover/session-rollover-brief.js +5 -3
  333. package/dist/services/session-rollover/session-rollover-brief.js.map +1 -1
  334. package/dist/services/settings/settings-persistence.js +1 -1
  335. package/dist/services/settings/settings-persistence.js.map +1 -1
  336. package/dist/services/settings/settings-schema.d.ts +124 -15
  337. package/dist/services/settings/settings-schema.d.ts.map +1 -1
  338. package/dist/services/settings/settings-schema.js +110 -26
  339. package/dist/services/settings/settings-schema.js.map +1 -1
  340. package/dist/services/settings/settings-service.d.ts +3 -1
  341. package/dist/services/settings/settings-service.d.ts.map +1 -1
  342. package/dist/services/settings/settings-service.js +88 -91
  343. package/dist/services/settings/settings-service.js.map +1 -1
  344. package/dist/services/settings/settings-sources.d.ts.map +1 -1
  345. package/dist/services/settings/settings-sources.js +13 -0
  346. package/dist/services/settings/settings-sources.js.map +1 -1
  347. package/dist/services/settings/test-helpers/settings-consumer-inventory.d.ts +2 -2
  348. package/dist/services/settings/test-helpers/settings-consumer-inventory.d.ts.map +1 -1
  349. package/dist/services/settings/test-helpers/settings-consumer-inventory.js +15 -0
  350. package/dist/services/settings/test-helpers/settings-consumer-inventory.js.map +1 -1
  351. package/dist/services/subagents/mentor-runner.d.ts.map +1 -1
  352. package/dist/services/subagents/mentor-runner.js +5 -2
  353. package/dist/services/subagents/mentor-runner.js.map +1 -1
  354. package/dist/services/subagents/subagent-notification-store.d.ts +10 -2
  355. package/dist/services/subagents/subagent-notification-store.d.ts.map +1 -1
  356. package/dist/services/subagents/subagent-notification-store.js +10 -5
  357. package/dist/services/subagents/subagent-notification-store.js.map +1 -1
  358. package/dist/services/subagents/tool-policy.d.ts.map +1 -1
  359. package/dist/services/subagents/tool-policy.js +10 -15
  360. package/dist/services/subagents/tool-policy.js.map +1 -1
  361. package/dist/services/tool-toggles.d.ts +20 -0
  362. package/dist/services/tool-toggles.d.ts.map +1 -0
  363. package/dist/services/tool-toggles.js +115 -0
  364. package/dist/services/tool-toggles.js.map +1 -0
  365. package/dist/slash-commands.d.ts +3 -0
  366. package/dist/slash-commands.d.ts.map +1 -1
  367. package/dist/slash-commands.js.map +1 -1
  368. package/dist/tools/agent/configure-task-check-in.d.ts +2 -0
  369. package/dist/tools/agent/configure-task-check-in.d.ts.map +1 -1
  370. package/dist/tools/agent/configure-task-check-in.js +14 -6
  371. package/dist/tools/agent/configure-task-check-in.js.map +1 -1
  372. package/dist/tools/file/apply-patch.d.ts +2 -15
  373. package/dist/tools/file/apply-patch.d.ts.map +1 -1
  374. package/dist/tools/file/apply-patch.js +163 -98
  375. package/dist/tools/file/apply-patch.js.map +1 -1
  376. package/dist/tools/file/upstream-apply-patch.d.ts +31 -0
  377. package/dist/tools/file/upstream-apply-patch.d.ts.map +1 -0
  378. package/dist/tools/file/upstream-apply-patch.js +123 -0
  379. package/dist/tools/file/upstream-apply-patch.js.map +1 -0
  380. package/dist/tools/format-helpers.d.ts +2 -0
  381. package/dist/tools/format-helpers.d.ts.map +1 -1
  382. package/dist/tools/format-helpers.js.map +1 -1
  383. package/dist/tools/session-browser/session-browser-tools.d.ts.map +1 -1
  384. package/dist/tools/session-browser/session-browser-tools.js +11 -1
  385. package/dist/tools/session-browser/session-browser-tools.js.map +1 -1
  386. package/dist/tools/session-rollover/session-rollover-tool.d.ts.map +1 -1
  387. package/dist/tools/session-rollover/session-rollover-tool.js +10 -1
  388. package/dist/tools/session-rollover/session-rollover-tool.js.map +1 -1
  389. package/dist/tools/system/shell.d.ts.map +1 -1
  390. package/dist/tools/system/shell.js +8 -2
  391. package/dist/tools/system/shell.js.map +1 -1
  392. package/dist/tools/types.d.ts +15 -2
  393. package/dist/tools/types.d.ts.map +1 -1
  394. package/dist/tools/types.js.map +1 -1
  395. package/dist/utils/ai/token-usage.d.ts +7 -0
  396. package/dist/utils/ai/token-usage.d.ts.map +1 -1
  397. package/dist/utils/ai/token-usage.js +6 -2
  398. package/dist/utils/ai/token-usage.js.map +1 -1
  399. package/dist/utils/conversation/conversation-utils.d.ts.map +1 -1
  400. package/dist/utils/conversation/conversation-utils.js +40 -1
  401. package/dist/utils/conversation/conversation-utils.js.map +1 -1
  402. package/dist/utils/conversation/message-buffer.d.ts +16 -0
  403. package/dist/utils/conversation/message-buffer.d.ts.map +1 -1
  404. package/dist/utils/conversation/message-buffer.js +33 -0
  405. package/dist/utils/conversation/message-buffer.js.map +1 -1
  406. package/dist/utils/output/trim-tool-output.d.ts +1 -1
  407. package/dist/utils/output/trim-tool-output.d.ts.map +1 -1
  408. package/dist/utils/output/trim-tool-output.js +20 -0
  409. package/dist/utils/output/trim-tool-output.js.map +1 -1
  410. package/dist/utils/resume-list.d.ts +2 -0
  411. package/dist/utils/resume-list.d.ts.map +1 -1
  412. package/dist/utils/resume-list.js +7 -14
  413. package/dist/utils/resume-list.js.map +1 -1
  414. package/dist/utils/settings-command.d.ts.map +1 -1
  415. package/dist/utils/settings-command.js +95 -9
  416. package/dist/utils/settings-command.js.map +1 -1
  417. package/dist/utils/streaming/streaming-session-factory.d.ts.map +1 -1
  418. package/dist/utils/streaming/streaming-session-factory.js +12 -0
  419. package/dist/utils/streaming/streaming-session-factory.js.map +1 -1
  420. package/dist/utils/streaming/streaming-speed-tracker.d.ts +15 -0
  421. package/dist/utils/streaming/streaming-speed-tracker.d.ts.map +1 -1
  422. package/dist/utils/streaming/streaming-speed-tracker.js +18 -1
  423. package/dist/utils/streaming/streaming-speed-tracker.js.map +1 -1
  424. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../source/services/profiles/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,YAAY,CAAC;AA+FpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAS7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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zod';
2
+ const id = z.string().regex(/^[a-z][a-z0-9_-]*:[a-z0-9][a-z0-9_./-]*$/i, 'must be a namespaced ID');
3
+ const localId = z
4
+ .string()
5
+ .min(1)
6
+ .regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/);
7
+ const operation = z.enum(['replace', 'before', 'after', 'remove']);
8
+ const referenceSchema = z
9
+ .object({
10
+ use: id,
11
+ kind: z
12
+ .enum(['instructions', 'context', 'tools', 'enforcement', 'integrations', 'presentation', 'requirements'])
13
+ .optional(),
14
+ })
15
+ .strict();
16
+ const instructionEntrySchema = z
17
+ .object({
18
+ id: localId.optional(),
19
+ use: id.optional(),
20
+ content: z.string().optional(),
21
+ systemOwned: z.literal('model-family-base').optional(),
22
+ operation: operation.optional(),
23
+ })
24
+ .strict()
25
+ .refine((entry) => entry.operation === 'remove'
26
+ ? Boolean(entry.id) && !entry.use && !entry.content && !entry.systemOwned
27
+ : Number(Boolean(entry.use)) + Number(Boolean(entry.content)) + Number(Boolean(entry.systemOwned)) === 1, 'entry requires exactly one of use, content, or systemOwned (or an id for remove)');
28
+ const instructionsSchema = z
29
+ .object({
30
+ kind: z.literal('instructions'),
31
+ identity: instructionEntrySchema.optional(),
32
+ workflow: instructionEntrySchema.optional(),
33
+ guidance: z.array(instructionEntrySchema).optional(),
34
+ output: instructionEntrySchema.optional(),
35
+ })
36
+ .strict();
37
+ const contextSourceSchema = z
38
+ .object({
39
+ id: localId,
40
+ source: z.string().min(1),
41
+ enabled: z.boolean().optional(),
42
+ priority: z.number().finite().optional(),
43
+ limit: z.number().int().positive().optional(),
44
+ anchor: localId.optional(),
45
+ remove: z.boolean().optional(),
46
+ })
47
+ .strict();
48
+ const contextSchema = z
49
+ .object({
50
+ kind: z.literal('context'),
51
+ operation: z.enum(['merge', 'replace']).optional(),
52
+ sources: z.array(contextSourceSchema),
53
+ })
54
+ .strict();
55
+ const toolsSchema = z
56
+ .object({
57
+ kind: z.literal('tools'),
58
+ operation: z.enum(['merge', 'replace']).optional(),
59
+ include: z.array(localId).optional(),
60
+ exclude: z.array(localId).optional(),
61
+ })
62
+ .strict();
63
+ const enforcementSchema = z.object({ kind: z.literal('enforcement'), policies: z.array(id) }).strict();
64
+ const integrationReferenceSchema = z
65
+ .object({ use: id, required: z.boolean(), config: z.record(z.string(), z.unknown()).optional() })
66
+ .strict();
67
+ const integrationsSchema = z
68
+ .object({ kind: z.literal('integrations'), integrations: z.array(integrationReferenceSchema) })
69
+ .strict();
70
+ const presentationSchema = z
71
+ .object({
72
+ kind: z.literal('presentation'),
73
+ displayName: z.string().optional(),
74
+ description: z.string().optional(),
75
+ label: z.string().optional(),
76
+ color: z.string().optional(),
77
+ marker: z.string().optional(),
78
+ })
79
+ .strict();
80
+ const requirementSchema = z
81
+ .object({
82
+ kind: z.enum(['schema-version', 'term2-version', 'capability', 'integration', 'setting']),
83
+ value: z.string().min(1),
84
+ })
85
+ .strict();
86
+ const requirementsBlockSchema = z
87
+ .object({ kind: z.literal('requirements'), requirements: z.array(requirementSchema) })
88
+ .strict();
89
+ export const profileBlockSchema = z.union([
90
+ referenceSchema,
91
+ instructionsSchema,
92
+ contextSchema,
93
+ toolsSchema,
94
+ enforcementSchema,
95
+ integrationsSchema,
96
+ presentationSchema,
97
+ requirementsBlockSchema,
98
+ ]);
99
+ export const profileDefinitionSchema = z
100
+ .object({
101
+ schemaVersion: z.literal(1),
102
+ id: localId,
103
+ version: z.string().min(1),
104
+ name: z.string().min(1),
105
+ description: z.string().optional(),
106
+ extends: id.optional(),
107
+ blocks: z
108
+ .object({
109
+ instructions: profileBlockSchema.optional(),
110
+ context: profileBlockSchema.optional(),
111
+ tools: profileBlockSchema.optional(),
112
+ enforcement: profileBlockSchema.optional(),
113
+ integrations: profileBlockSchema.optional(),
114
+ presentation: profileBlockSchema.optional(),
115
+ requirements: profileBlockSchema.optional(),
116
+ })
117
+ .strict(),
118
+ requires: z.array(requirementSchema).optional(),
119
+ })
120
+ .strict();
121
+ export const enforcementPolicySchema = z
122
+ .object({
123
+ id,
124
+ kind: z.literal('enforcement'),
125
+ denials: z.array(localId),
126
+ conflicts: z.array(id).optional(),
127
+ handoffRestriction: z.string().optional(),
128
+ })
129
+ .strict();
130
+ export const integrationDefinitionSchema = z
131
+ .object({
132
+ id,
133
+ kind: z.literal('integrations'),
134
+ conflicts: z.array(id).optional(),
135
+ availableByDefault: z.boolean().optional(),
136
+ })
137
+ .strict();
138
+ export class ProfileValidationError extends Error {
139
+ issues;
140
+ constructor(message, issues = []) {
141
+ super(message);
142
+ this.name = 'ProfileValidationError';
143
+ this.issues = issues;
144
+ }
145
+ }
146
+ export function validateProfileDefinition(value) {
147
+ const result = profileDefinitionSchema.safeParse(value);
148
+ if (!result.success)
149
+ throw new ProfileValidationError(`Invalid Profile definition: ${result.error.message}`, result.error.issues);
150
+ return result.data;
151
+ }
152
+ export function validateRegisteredBlock(value) {
153
+ const result = z
154
+ .object({
155
+ id,
156
+ kind: z.enum(['instructions', 'context', 'tools', 'enforcement', 'integrations', 'presentation', 'requirements']),
157
+ definition: z.unknown(),
158
+ })
159
+ .strict()
160
+ .safeParse(value);
161
+ if (!result.success)
162
+ throw new ProfileValidationError(`Invalid registered block: ${result.error.message}`, result.error.issues);
163
+ const definitionSchema = z.union([
164
+ instructionsSchema,
165
+ contextSchema,
166
+ toolsSchema,
167
+ enforcementSchema,
168
+ integrationsSchema,
169
+ presentationSchema,
170
+ requirementsBlockSchema,
171
+ enforcementPolicySchema,
172
+ integrationDefinitionSchema,
173
+ ]);
174
+ const definitionResult = definitionSchema.safeParse(result.data.definition);
175
+ if (!definitionResult.success)
176
+ throw new ProfileValidationError(`Invalid registered block definition: ${definitionResult.error.message}`, definitionResult.error.issues);
177
+ if (definitionResult.data.kind !== result.data.kind)
178
+ throw new ProfileValidationError(`Registered block kind mismatch: expected ${result.data.kind}, got ${definitionResult.data.kind}`);
179
+ return { ...result.data, definition: definitionResult.data };
180
+ }
181
+ export function validatePolicy(value) {
182
+ const result = enforcementPolicySchema.safeParse(value);
183
+ if (!result.success)
184
+ throw new ProfileValidationError(`Invalid enforcement policy: ${result.error.message}`, result.error.issues);
185
+ return result.data;
186
+ }
187
+ export function validateIntegration(value) {
188
+ const result = integrationDefinitionSchema.safeParse(value);
189
+ if (!result.success)
190
+ throw new ProfileValidationError(`Invalid integration: ${result.error.message}`, result.error.issues);
191
+ return result.data;
192
+ }
193
+ export function isBlockReference(value) {
194
+ return 'use' in value && (!('kind' in value) || !('sources' in value));
195
+ }
196
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../source/services/profiles/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2CAA2C,EAAE,yBAAyB,CAAC,CAAC;AACpG,MAAM,OAAO,GAAG,CAAC;KACd,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACzC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEnE,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;SACzG,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,sBAAsB,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE;IACtB,GAAG,EAAE,EAAE,CAAC,QAAQ,EAAE;IAClB,OAAO,EAAE,CAAC,CAAC,MA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c;IAC3C,MAAM,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,CAAC,MAAM,CAAC,OAAO;QACjB,MAAM,IAAI,sBAAsB,CAAC,+BAA+B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/G,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,MAAM,MAAM,GAAG,2BAA2B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5D,IAAI,CAAC,MAAM,CAAC,OAAO;QACjB,MAAM,IAAI,sBAAsB,CAAC,wBAAwB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxG,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAmB;IAClD,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,224 @@
1
+ import type { z } from 'zod';
2
+ export type ProfileId = `builtin:${string}` | `user:${string}` | `project:${string}`;
3
+ export type BlockId = ProfileId;
4
+ export type BlockKind = 'instructions' | 'context' | 'tools' | 'enforcement' | 'integrations' | 'presentation' | 'requirements';
5
+ export interface BlockReference {
6
+ use: string;
7
+ /** Optional assertion which is checked against the registry entry. */
8
+ kind?: BlockKind;
9
+ }
10
+ export type InstructionContent = {
11
+ kind: 'model-family-base';
12
+ } | {
13
+ kind: 'markdown';
14
+ content: string;
15
+ };
16
+ export interface InstructionEntry {
17
+ id?: string;
18
+ use?: string;
19
+ content?: string;
20
+ systemOwned?: 'model-family-base';
21
+ operation?: 'replace' | 'before' | 'after' | 'remove';
22
+ }
23
+ export interface InstructionsBlock {
24
+ kind: 'instructions';
25
+ identity?: InstructionEntry;
26
+ workflow?: InstructionEntry;
27
+ guidance?: InstructionEntry[];
28
+ output?: InstructionEntry;
29
+ }
30
+ export interface ContextSource {
31
+ id: string;
32
+ source: string;
33
+ enabled?: boolean;
34
+ priority?: number;
35
+ limit?: number;
36
+ anchor?: string;
37
+ remove?: boolean;
38
+ }
39
+ export interface ContextBlock {
40
+ kind: 'context';
41
+ operation?: 'merge' | 'replace';
42
+ sources: ContextSource[];
43
+ }
44
+ export interface ToolsBlock {
45
+ kind: 'tools';
46
+ operation?: 'merge' | 'replace';
47
+ include?: string[];
48
+ exclude?: string[];
49
+ }
50
+ export interface EnforcementPolicyDefinition {
51
+ id: string;
52
+ kind: 'enforcement';
53
+ denials: string[];
54
+ conflicts?: string[];
55
+ handoffRestriction?: string;
56
+ }
57
+ export interface EnforcementBlock {
58
+ kind: 'enforcement';
59
+ policies: string[];
60
+ }
61
+ export interface IntegrationDefinition {
62
+ id: string;
63
+ kind: 'integrations';
64
+ conflicts?: string[];
65
+ /** Trusted registry metadata; Profile data itself remains declarative. */
66
+ availableByDefault?: boolean;
67
+ }
68
+ export interface IntegrationReference {
69
+ use: string;
70
+ required: boolean;
71
+ config?: Record<string, unknown>;
72
+ }
73
+ export interface IntegrationsBlock {
74
+ kind: 'integrations';
75
+ integrations: IntegrationReference[];
76
+ }
77
+ export interface PresentationBlock {
78
+ kind: 'presentation';
79
+ displayName?: string;
80
+ description?: string;
81
+ label?: string;
82
+ color?: string;
83
+ marker?: string;
84
+ }
85
+ export type RequirementKind = 'schema-version' | 'term2-version' | 'capability' | 'integration' | 'setting';
86
+ export interface Requirement {
87
+ kind: RequirementKind;
88
+ value: string;
89
+ }
90
+ export interface RequirementsBlock {
91
+ kind: 'requirements';
92
+ requirements: Requirement[];
93
+ }
94
+ export type ProfileBlock = InstructionsBlock | ContextBlock | ToolsBlock | EnforcementBlock | IntegrationsBlock | PresentationBlock | RequirementsBlock | BlockReference;
95
+ export interface ProfileBlocks {
96
+ instructions?: ProfileBlock;
97
+ context?: ProfileBlock;
98
+ tools?: ProfileBlock;
99
+ enforcement?: ProfileBlock;
100
+ integrations?: ProfileBlock;
101
+ presentation?: ProfileBlock;
102
+ requirements?: ProfileBlock;
103
+ }
104
+ export interface ProfileRegistry {
105
+ readonly profiles: ReadonlyMap<string, ProfileDefinition>;
106
+ readonly blocks: ReadonlyMap<string, RegisteredBlock>;
107
+ readonly policies: ReadonlyMap<string, EnforcementPolicyDefinition>;
108
+ readonly integrations: ReadonlyMap<string, IntegrationDefinition>;
109
+ }
110
+ export interface ProfileDefinition {
111
+ schemaVersion: 1;
112
+ id: string;
113
+ version: string;
114
+ name: string;
115
+ description?: string;
116
+ extends?: string;
117
+ blocks: ProfileBlocks;
118
+ requires?: Requirement[];
119
+ }
120
+ export interface RegisteredBlock {
121
+ id: string;
122
+ kind: BlockKind;
123
+ definition: ProfileBlock | EnforcementPolicyDefinition | IntegrationDefinition;
124
+ }
125
+ export interface ProfileProvenance {
126
+ namespace: 'builtin' | 'user' | 'project';
127
+ source: string;
128
+ }
129
+ export interface ResolvedInstructionEntry {
130
+ readonly id: string;
131
+ readonly content: InstructionContent;
132
+ }
133
+ export interface ResolvedInstructions {
134
+ readonly identity: InstructionContent;
135
+ readonly workflow?: InstructionContent;
136
+ readonly guidance: readonly ResolvedInstructionEntry[];
137
+ readonly output?: InstructionContent;
138
+ }
139
+ export interface ResolvedContextSource {
140
+ readonly id: string;
141
+ readonly source: string;
142
+ readonly enabled: boolean;
143
+ readonly priority: number;
144
+ readonly limit?: number;
145
+ }
146
+ export interface ResolvedContextPolicy {
147
+ readonly sources: readonly ResolvedContextSource[];
148
+ }
149
+ export interface ResolvedToolSurface {
150
+ readonly capabilities: ReadonlySet<string>;
151
+ }
152
+ export interface ResolvedEnforcementPolicy {
153
+ readonly policies: ReadonlySet<string>;
154
+ readonly denials: ReadonlySet<string>;
155
+ readonly handoffRestrictions: ReadonlySet<string>;
156
+ }
157
+ export interface ResolvedIntegration {
158
+ readonly id: string;
159
+ readonly required: boolean;
160
+ readonly config?: Readonly<Record<string, unknown>>;
161
+ readonly available: boolean;
162
+ }
163
+ export interface ResolvedPresentation {
164
+ readonly displayName?: string;
165
+ readonly description?: string;
166
+ readonly label?: string;
167
+ readonly color?: string;
168
+ readonly marker?: string;
169
+ }
170
+ export interface ResolvedRequirements {
171
+ readonly requirements: readonly Requirement[];
172
+ }
173
+ export interface ProfileAvailabilityDiagnostic {
174
+ readonly code: 'unavailable-integration' | 'unsatisfied-requirement';
175
+ readonly message: string;
176
+ readonly reference: string;
177
+ }
178
+ export interface ProfileAvailability {
179
+ readonly available: boolean;
180
+ readonly diagnostics: readonly ProfileAvailabilityDiagnostic[];
181
+ }
182
+ export interface ResolvedProfile {
183
+ readonly identity: {
184
+ readonly id: string;
185
+ readonly version: string;
186
+ readonly digest: string;
187
+ readonly provenance: ProfileProvenance;
188
+ readonly parentIds: readonly string[];
189
+ };
190
+ readonly instructions: ResolvedInstructions;
191
+ readonly context: ResolvedContextPolicy;
192
+ readonly tools: ResolvedToolSurface;
193
+ readonly enforcement: ResolvedEnforcementPolicy;
194
+ readonly integrations: ReadonlyMap<string, ResolvedIntegration>;
195
+ readonly presentation: ResolvedPresentation;
196
+ readonly requirements: ResolvedRequirements;
197
+ readonly availability: ProfileAvailability;
198
+ }
199
+ export interface ResolveOptions {
200
+ maxParentDepth?: number;
201
+ maxBlocks?: number;
202
+ availableCapabilities?: Iterable<string>;
203
+ availableIntegrations?: Iterable<string> | ReadonlyMap<string, boolean>;
204
+ availableSettings?: Iterable<string>;
205
+ term2Version?: string;
206
+ }
207
+ export interface ProfileResolutionDiagnostic {
208
+ readonly code: string;
209
+ readonly message: string;
210
+ readonly path?: string;
211
+ }
212
+ export declare class ProfileResolutionError extends Error {
213
+ readonly diagnostics: readonly ProfileResolutionDiagnostic[];
214
+ constructor(message: string, diagnostics?: readonly ProfileResolutionDiagnostic[]);
215
+ }
216
+ /** Kept local to this module so legacy consumers can migrate without a dependency cycle. */
217
+ export interface SavedAppMode {
218
+ mentorMode: boolean;
219
+ liteMode: boolean;
220
+ planMode: boolean;
221
+ orchestratorMode?: boolean;
222
+ }
223
+ export type ProfileSchema = z.ZodType<ProfileDefinition>;
224
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../source/services/profiles/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,MAAM,SAAS,GAAG,WAAW,MAAM,EAAE,GAAG,QAAQ,MAAM,EAAE,GAAG,WAAW,MAAM,EAAE,CAAC;AACrF,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAChC,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,SAAS,GACT,OAAO,GACP,aAAa,GACb,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvG,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;CACvD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,CAAC,EAAE,gBAAgB,CA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C,CAAC;IACzC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxE,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAE7D,YAAY,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,SAAS,2BAA2B,EAAO,EAIpF;CACF;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export class ProfileResolutionError extends Error {
2
+ diagnostics;
3
+ constructor(message, diagnostics = []) {
4
+ super(message);
5
+ this.name = 'ProfileResolutionError';
6
+ this.diagnostics = diagnostics;
7
+ }
8
+ }
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../source/services/profiles/types.ts"],"names":[],"mappings":"AAsPA,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACtC,WAAW,CAAyC;IAE7D,YAAY,OAAe,EAAE,WAAW,GAA2C,EAAE;QACnF,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF"}
@@ -1,4 +1,9 @@
1
1
  import type { ClassifiedFailure, CommittedToolContinuation } from './retry-contracts.js';
2
2
  export declare function isSettledCommittedToolContinuation(evidence: CommittedToolContinuation | undefined): boolean;
3
+ /**
4
+ * Chain recovery rebuilds from durable history instead of replaying committed
5
+ * work. Once every live-turn tool pair is settled, that is true for both a
6
+ * connection interruption and an explicit provider-state rejection.
7
+ */
3
8
  export declare function skipsAutomaticReplayClaim(failure: ClassifiedFailure, evidence: CommittedToolContinuation | undefined): boolean;
4
9
  //# sourceMappingURL=committed-tool-continuation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"committed-tool-continuation.d.ts","sourceRoot":"","sources":["../../../source/services/retry/committed-tool-continuation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAAG,OAAO,CAO3G;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAC9C,OAAO,CAMT"}
1
+ {"version":3,"file":"committed-tool-continuation.d.ts","sourceRoot":"","sources":["../../../source/services/retry/committed-tool-continuation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAAG,OAAO,CAO3G;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAC9C,OAAO,CAET"}
@@ -4,9 +4,12 @@ export function isSettledCommittedToolContinuation(evidence) {
4
4
  evidence.allToolsCompleted &&
5
5
  evidence.completedPairsPresentInHistory);
6
6
  }
7
+ /**
8
+ * Chain recovery rebuilds from durable history instead of replaying committed
9
+ * work. Once every live-turn tool pair is settled, that is true for both a
10
+ * connection interruption and an explicit provider-state rejection.
11
+ */
7
12
  export function skipsAutomaticReplayClaim(failure, evidence) {
8
- return (failure.kind === 'chain_recovery' &&
9
- failure.cause === 'connection_interrupted' &&
10
- isSettledCommittedToolContinuation(evidence));
13
+ return failure.kind === 'chain_recovery' && isSettledCommittedToolContinuation(evidence);
11
14
  }
12
15
  //# sourceMappingURL=committed-tool-continuation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"committed-tool-continuation.js","sourceRoot":"","sources":["../../../source/services/retry/committed-tool-continuation.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kCAAkC,CAAC,QAA+C;IAChG,OAAO,CACL,QAAQ,KAAK,SAAS;QACtB,QAAQ,CAAC,kBAAkB,GAAG,CAAC;QAC/B,QAAQ,CAAC,iBAAiB;QAC1B,QAAQ,CAAC,8BAA8B,CACxC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAA0B,EAC1B,QAA+C;IAE/C,OAAO,CACL,OAAO,CAAC,IAAI,KAAK,gBAAgB;QACjC,OAAO,CAAC,KAAK,KAAK,wBAAwB;QAC1C,kCAAkC,CAAC,QAAQ,CAAC,CAC7C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"committed-tool-continuation.js","sourceRoot":"","sources":["../../../source/services/retry/committed-tool-continuation.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kCAAkC,CAAC,QAA+C;IAChG,OAAO,CACL,QAAQ,KAAK,SAAS;QACtB,QAAQ,CAAC,kBAAkB,GAAG,CAAC;QAC/B,QAAQ,CAAC,iBAAiB;QAC1B,QAAQ,CAAC,8BAA8B,CACxC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAA0B,EAC1B,QAA+C;IAE/C,OAAO,OAAO,CAAC,IAAI,KAAK,gBAAgB,IAAI,kCAAkC,CAAC,QAAQ,CAAC,CAAC;AAC3F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"retry-classifier.d.ts","sourceRoot":"","sources":["../../../source/services/retry/retry-classifier.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGrF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAiB/E,qBAAa,sBAAsB;IACrB,OAAO,CAAC,WAAW;IAA2B,OAAO,CAAC,MAAM;IAAxE,YAAoB,WAAW,EAAE,uBAAuB,EAAU,MAAM,GAAE,MAAM,MAAoB,EAEnG;IAED,QAAQ,CAAC,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAqJ1D;CACF"}
1
+ {"version":3,"file":"retry-classifier.d.ts","sourceRoot":"","sources":["../../../source/services/retry/retry-classifier.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGrF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAuB/E,qBAAa,sBAAsB;IACrB,OAAO,CAAC,WAAW;IAA2B,OAAO,CAAC,MAAM;IAAxE,YAAoB,WAAW,EAAE,uBAAuB,EAAU,MAAM,GAAE,MAAM,MAAoB,EAEnG;IAED,QAAQ,CAAC,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAkJ1D;CACF"}
@@ -16,6 +16,10 @@ const computeTransientDelayMs = (attempt, random) => {
16
16
  const jitter = 0.9 + random() * 0.2;
17
17
  return Math.round(baseDelay * jitter);
18
18
  };
19
+ const isProviderStateRejection = (error) => isPreviousResponseNotFoundError(error) ||
20
+ isMissingServerToolOutputError(error) ||
21
+ isMissingChainedToolOutputError(error) ||
22
+ isOrphanedChainedToolOutputError(error);
19
23
  export class DefaultRetryClassifier {
20
24
  agentClient;
21
25
  random;
@@ -48,16 +52,18 @@ export class DefaultRetryClassifier {
48
52
  // treated that as "committed" and forced 'unrecoverable' on an otherwise
49
53
  // safely recoverable failure.
50
54
  //
51
- // Exception: a recoverable connection drop after every live-turn tool is
52
- // completed and already in reconciled history is not a replay. It severs
53
- // the dead chain and continues from those pairs. Open or unknown calls,
54
- // missing pairs, and committed text with no completed tools stay closed.
55
+ // Exception: a recoverable connection drop or provider state rejection
56
+ // after every live-turn tool is completed and already in reconciled history
57
+ // is not a replay. It severs the dead chain and continues from those pairs.
58
+ // Open or unknown calls, missing pairs, and committed text with no
59
+ // completed tools stay closed.
55
60
  if (context.hasCommittedOutput || (stream && streamHasCommittedOutput(stream))) {
56
61
  if (isSettledCommittedToolContinuation(context.committedToolContinuation)) {
57
62
  const connectionInterrupted = error instanceof UnsentWebSocketRequestError ||
58
63
  (error instanceof AmbiguousModelOutcomeError && isRecoverableIncompleteStreamClose(error)) ||
59
64
  isRecoverableIncompleteStreamClose(error);
60
- if (connectionInterrupted) {
65
+ const providerStateRejected = isProviderStateRejection(error);
66
+ if (connectionInterrupted || providerStateRejected) {
61
67
  const nextAttempt = retryCounts.transientRetryCount + 1;
62
68
  if (nextAttempt > maxTransientRetries) {
63
69
  return { kind: 'unrecoverable' };
@@ -66,7 +72,7 @@ export class DefaultRetryClassifier {
66
72
  kind: 'chain_recovery',
67
73
  attempt: nextAttempt,
68
74
  delayMs: computeTransientDelayMs(nextAttempt, this.random),
69
- cause: 'connection_interrupted',
75
+ cause: providerStateRejected ? 'provider_state_rejected' : 'connection_interrupted',
70
76
  };
71
77
  }
72
78
  }
@@ -101,10 +107,7 @@ export class DefaultRetryClassifier {
101
107
  if (error instanceof ConversationStateNoProgressError) {
102
108
  return { kind: 'unrecoverable' };
103
109
  }
104
- if (isPreviousResponseNotFoundError(error) ||
105
- isMissingServerToolOutputError(error) ||
106
- isMissingChainedToolOutputError(error) ||
107
- isOrphanedChainedToolOutputError(error)) {
110
+ if (isProviderStateRejection(error)) {
108
111
  const nextAttempt = retryCounts.transientRetryCount + 1;
109
112
  if (nextAttempt > maxTransientRetries) {
110
113
  return { kind: 'unrecoverable' };
@@ -1 +1 @@
1
- {"version":3,"file":"retry-classifier.js","sourceRoot":"","sources":["../../../source/services/retry/retry-classifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,kCAAkC,EAClC,yBAAyB,EACzB,yBAAyB,EACzB,sCAAsC,GACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,+BAA+B,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACtH,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AAEtF,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AACtC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC,MAAM,uBAAuB,GAAG,CAAC,OAAe,EAAE,MAAoB,EAAU,EAAE;IAChF,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,uBAAuB,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC5G,MAAM,MAA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;YACD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QACnC,CAAC;QAED,IAAI,sCAAsC,CAAC,KAAK,CAAC,EAAE,CAAC;YAClD,qEAAqE;YACrE,gEAAgE;YAChE,IAAI,WAAW,CAAC,uBAAuB,IAAI,wBAAwB,EAAE,CAAC;gBACpE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YACnC,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,QAAQ,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,yBAAyB,CAAC,KAAK,CAAC,CAAC,SAAS,IAAI,yBAAyB,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;YACzG,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,GAAG,CAAC,CAAC;YACxD,IAAI,WAAW,GAAG,mBAAmB,EAAE,CAAC;gBACtC,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,IAAI,uBAAuB,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3F,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACnC,CAAC;CACF"}
1
+ {"version":3,"file":"retry-classifier.js","sourceRoot":"","sources":["../../../source/services/retry/retry-classifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,kCAAkC,EAClC,yBAAyB,EACzB,yBAAyB,EACzB,sCAAsC,GACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM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AE,IAAI,EAAE,eAAe,EAAE,CAAC;YACnC,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,QAAQ,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,yBAAyB,CAAC,KAAK,CAAC,CAAC,SAAS,IAAI,yBAAyB,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;YACzG,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,GAAG,CAAC,CAAC;YACxD,IAAI,WAAW,GAAG,mBAAmB,EAAE,CAAC;gBACtC,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,IAAI,uBAAuB,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3F,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACnC,CAAC;CACF"}
@@ -27,6 +27,13 @@ export declare function isWebSocketConnectionLimitReachedError(error: unknown, s
27
27
  * from unrelated errors that happen to have `onSocketClose` in their stack.
28
28
  */
29
29
  export declare function isUndiciSocketCloseError(error: unknown): boolean;
30
+ /**
31
+ * Detects the fetch/undici body-abort spelling used by AI SDK providers. The
32
+ * useful network cause can be nested under an SDK wrapper, so walk only the
33
+ * standard cause/errors links and keep the message match exact enough not to
34
+ * turn arbitrary prose containing "terminated" into a retry.
35
+ */
36
+ export declare function isTerminatedError(error: unknown, seen?: Set<unknown>): boolean;
30
37
  export declare function isNetworkProtocolError(error: unknown, seen?: Set<unknown>): boolean;
31
38
  /**
32
39
  * Provider adapters refuse to invent a completion when the stream body ends
@@ -1 +1 @@
1
- {"version":3,"file":"retry-error-classification.d.ts","sourceRoot":"","sources":["../../../source/services/retry/retry-error-classification.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAqCF,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAsBlG;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAqBjG;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAgBzG;AA6DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAchE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAyGzF;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKvE;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kCAAkC,UAAW,OAAO,WAAW,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAG,OAQ3G,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,OAAO,WACL,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KACrC,0BAwBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,UAAW,OAAO,WAAW,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAG,OA4GlG,CAAC"}
1
+ {"version":3,"file":"retry-error-classification.d.ts","sourceRoot":"","sources":["../../../source/services/retry/retry-error-classification.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAqCF,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAsBlG;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAqBjG;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAgBzG;AA6DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAchE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAepF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,eAAqB,GAAG,OAAO,CAyGzF;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKvE;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kCAAkC,UAAW,OAAO,WAAW,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAG,OAQ3G,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,OAAO,WACL,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KACrC,0BAwBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,UAAW,OAAO,WAAW,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAG,OA0GlG,CAAC"}