@bastani/atomic 0.9.76 → 0.9.77

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 (183) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +26 -0
  3. package/dist/builtin/intercom/broker/broker.ts +153 -6
  4. package/dist/builtin/intercom/broker/client.ts +85 -3
  5. package/dist/builtin/intercom/broker/departed-children.ts +471 -0
  6. package/dist/builtin/intercom/broker/recipient-gone-errors.ts +280 -0
  7. package/dist/builtin/intercom/broker/restoring-recipients.ts +108 -7
  8. package/dist/builtin/intercom/broker/send-handler.ts +42 -0
  9. package/dist/builtin/intercom/broker/workflow-stage-aliases.ts +69 -0
  10. package/dist/builtin/intercom/index.bundle.mjs +374 -129
  11. package/dist/builtin/intercom/package.json +2 -2
  12. package/dist/builtin/intercom/types.ts +30 -1
  13. package/dist/builtin/mcp/package.json +1 -1
  14. package/dist/builtin/subagents/CHANGELOG.md +30 -0
  15. package/dist/builtin/subagents/README.md +1 -1
  16. package/dist/builtin/subagents/package.json +3 -3
  17. package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
  18. package/dist/builtin/subagents/src/extension/index.bundle.mjs +64 -4
  19. package/dist/builtin/web-access/package.json +2 -2
  20. package/dist/builtin/workflows/CHANGELOG.md +28 -0
  21. package/dist/builtin/workflows/README.md +1 -1
  22. package/dist/builtin/workflows/package.json +2 -2
  23. package/dist/builtin/workflows/skills/impeccable/SKILL.md +3 -3
  24. package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -1
  25. package/dist/builtin/workflows/skills/impeccable/scripts/engine-checksums.txt +5 -5
  26. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +71 -56
  27. package/dist/builtin/workflows/src/extension/index.bundle.mjs +315 -112
  28. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +168 -9
  29. package/dist/builtin/workflows/src/index.js +168 -9
  30. package/dist/builtin/workflows/src/local-worker-entry.mjs +168 -9
  31. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  32. package/dist/core/agent-session-compaction.js +2 -1
  33. package/dist/core/agent-session-compaction.js.map +1 -1
  34. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  35. package/dist/core/agent-session-extension-bindings.js +2 -0
  36. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  37. package/dist/core/agent-session-methods.d.ts +1 -0
  38. package/dist/core/agent-session-methods.d.ts.map +1 -1
  39. package/dist/core/agent-session-methods.js.map +1 -1
  40. package/dist/core/agent-session-state.d.ts.map +1 -1
  41. package/dist/core/agent-session-state.js +7 -2
  42. package/dist/core/agent-session-state.js.map +1 -1
  43. package/dist/core/agent-session-tasks.d.ts +6 -0
  44. package/dist/core/agent-session-tasks.d.ts.map +1 -1
  45. package/dist/core/agent-session-tasks.js +13 -25
  46. package/dist/core/agent-session-tasks.js.map +1 -1
  47. package/dist/core/agent-session-types.d.ts +2 -0
  48. package/dist/core/agent-session-types.d.ts.map +1 -1
  49. package/dist/core/agent-session-types.js.map +1 -1
  50. package/dist/core/agent-session.d.ts +1 -0
  51. package/dist/core/agent-session.d.ts.map +1 -1
  52. package/dist/core/agent-session.js +2 -0
  53. package/dist/core/agent-session.js.map +1 -1
  54. package/dist/core/extensions/loader-rollback.d.ts.map +1 -1
  55. package/dist/core/extensions/loader-rollback.js +1 -0
  56. package/dist/core/extensions/loader-rollback.js.map +1 -1
  57. package/dist/core/extensions/runner-context.d.ts +3 -3
  58. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  59. package/dist/core/extensions/runner-context.js +2 -1
  60. package/dist/core/extensions/runner-context.js.map +1 -1
  61. package/dist/core/extensions/runner.d.ts +9 -0
  62. package/dist/core/extensions/runner.d.ts.map +1 -1
  63. package/dist/core/extensions/runner.js +16 -1
  64. package/dist/core/extensions/runner.js.map +1 -1
  65. package/dist/core/sdk-types.d.ts +5 -0
  66. package/dist/core/sdk-types.d.ts.map +1 -1
  67. package/dist/core/sdk-types.js.map +1 -1
  68. package/dist/core/sdk.d.ts.map +1 -1
  69. package/dist/core/sdk.js +8 -1
  70. package/dist/core/sdk.js.map +1 -1
  71. package/dist/core/system-prompt.d.ts +6 -0
  72. package/dist/core/system-prompt.d.ts.map +1 -1
  73. package/dist/core/system-prompt.js +26 -18
  74. package/dist/core/system-prompt.js.map +1 -1
  75. package/dist/core/tasks/agent-adapter.js +2 -2
  76. package/dist/core/tasks/agent-adapter.js.map +1 -1
  77. package/dist/core/tasks/cancel-reason.d.ts +20 -0
  78. package/dist/core/tasks/cancel-reason.d.ts.map +1 -0
  79. package/dist/core/tasks/cancel-reason.js +47 -0
  80. package/dist/core/tasks/cancel-reason.js.map +1 -0
  81. package/dist/core/tasks/child-command-owner.d.ts +1 -1
  82. package/dist/core/tasks/child-command-owner.d.ts.map +1 -1
  83. package/dist/core/tasks/child-command-owner.js +22 -0
  84. package/dist/core/tasks/child-command-owner.js.map +1 -1
  85. package/dist/core/tasks/completion-message.d.ts +11 -0
  86. package/dist/core/tasks/completion-message.d.ts.map +1 -0
  87. package/dist/core/tasks/completion-message.js +30 -0
  88. package/dist/core/tasks/completion-message.js.map +1 -0
  89. package/dist/core/tasks/completion.d.ts +2 -0
  90. package/dist/core/tasks/completion.d.ts.map +1 -1
  91. package/dist/core/tasks/completion.js +30 -14
  92. package/dist/core/tasks/completion.js.map +1 -1
  93. package/dist/core/tasks/contracts.d.ts +4 -0
  94. package/dist/core/tasks/contracts.d.ts.map +1 -1
  95. package/dist/core/tasks/contracts.js.map +1 -1
  96. package/dist/core/tasks/supervisor.d.ts +29 -3
  97. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  98. package/dist/core/tasks/supervisor.js +48 -25
  99. package/dist/core/tasks/supervisor.js.map +1 -1
  100. package/dist/core/tasks/task-view-source.d.ts +6 -0
  101. package/dist/core/tasks/task-view-source.d.ts.map +1 -1
  102. package/dist/core/tasks/task-view-source.js +49 -0
  103. package/dist/core/tasks/task-view-source.js.map +1 -1
  104. package/dist/core/tools/bash-pty-native.d.ts +6 -1
  105. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  106. package/dist/core/tools/bash-pty-native.js +5 -1
  107. package/dist/core/tools/bash-pty-native.js.map +1 -1
  108. package/dist/core/tools/bash.d.ts +5 -0
  109. package/dist/core/tools/bash.d.ts.map +1 -1
  110. package/dist/core/tools/bash.js +14 -5
  111. package/dist/core/tools/bash.js.map +1 -1
  112. package/dist/core/tools/history-protocol.d.ts +15 -1
  113. package/dist/core/tools/history-protocol.d.ts.map +1 -1
  114. package/dist/core/tools/history-protocol.js +9 -7
  115. package/dist/core/tools/history-protocol.js.map +1 -1
  116. package/dist/core/tools/shell-task-status.d.ts.map +1 -1
  117. package/dist/core/tools/shell-task-status.js +3 -13
  118. package/dist/core/tools/shell-task-status.js.map +1 -1
  119. package/dist/core/workflow-stage-admission.d.ts +2 -0
  120. package/dist/core/workflow-stage-admission.d.ts.map +1 -1
  121. package/dist/core/workflow-stage-admission.js +36 -6
  122. package/dist/core/workflow-stage-admission.js.map +1 -1
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +2 -2
  126. package/dist/index.js.map +1 -1
  127. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  128. package/dist/modes/interactive/components/chat-session-host-rendering.js +12 -8
  129. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  130. package/dist/modes/interactive/components/chat-session-host-state.d.ts +2 -0
  131. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  132. package/dist/modes/interactive/components/chat-session-host-state.js +2 -0
  133. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  134. package/dist/modes/interactive/components/chat-session-host-types.d.ts +6 -0
  135. package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
  136. package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
  137. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  138. package/dist/modes/interactive/components/chat-session-host.js +5 -2
  139. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  140. package/dist/modes/interactive/components/footer.d.ts +8 -5
  141. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  142. package/dist/modes/interactive/components/footer.js +5 -2
  143. package/dist/modes/interactive/components/footer.js.map +1 -1
  144. package/dist/modes/interactive/components/index.d.ts +1 -0
  145. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  146. package/dist/modes/interactive/components/index.js +1 -0
  147. package/dist/modes/interactive/components/index.js.map +1 -1
  148. package/dist/modes/interactive/components/input-label.d.ts +29 -0
  149. package/dist/modes/interactive/components/input-label.d.ts.map +1 -0
  150. package/dist/modes/interactive/components/input-label.js +75 -0
  151. package/dist/modes/interactive/components/input-label.js.map +1 -0
  152. package/dist/modes/interactive/components/task-inspector.d.ts +4 -1
  153. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
  154. package/dist/modes/interactive/components/task-inspector.js +6 -2
  155. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  156. package/dist/modes/interactive/components/task-transcript-page.d.ts +12 -1
  157. package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
  158. package/dist/modes/interactive/components/task-transcript-page.js +63 -6
  159. package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
  160. package/dist/modes/interactive/interactive-input-handling.js +1 -0
  161. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  162. package/dist/modes/interactive/interactive-slash-commands.js +1 -0
  163. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  164. package/dist/modes/interactive-engine/engine-session-stats.d.ts +1 -1
  165. package/dist/modes/interactive-engine/engine-session-stats.d.ts.map +1 -1
  166. package/dist/modes/interactive-engine/engine-session-stats.js.map +1 -1
  167. package/dist/modes/rpc/task-ui-bridge.d.ts +2 -2
  168. package/dist/modes/rpc/task-ui-bridge.d.ts.map +1 -1
  169. package/dist/modes/rpc/task-ui-bridge.js +2 -0
  170. package/dist/modes/rpc/task-ui-bridge.js.map +1 -1
  171. package/docs/background-tasks.md +14 -1
  172. package/docs/getting-started/first-session.md +1 -1
  173. package/docs/intercom/operations.md +4 -2
  174. package/docs/intercom/reference.md +18 -1
  175. package/docs/llama-cpp.md +1 -1
  176. package/docs/sessions.md +1 -1
  177. package/docs/subagents.md +5 -1
  178. package/docs/tools.md +1 -1
  179. package/docs/usage.md +1 -12
  180. package/docs/workflows/operations.md +3 -1
  181. package/docs/workflows/verification.md +1 -8
  182. package/npm-shrinkwrap.json +83 -98
  183. package/package.json +6 -6
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AAWpD,OAAO,EAEN,6BAA6B,EAC7B,wCAAwC,GACxC,MAAM,qCAAqC,CAAC;AAW7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACN,sBAAsB,EAEtB,gBAAgB,EAEhB,iBAAiB,EACjB,sBAAsB,EAEtB,aAAa,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AACxF,cAAc,yBAAyB,CAAC;AACxC,kGAAkG;AAClG,OAAO,EAEN,6BAA6B,EAC7B,yBAAyB,EAEzB,oBAAoB,GACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AACtH,OAAO,EACN,oBAAoB,EACpB,kCAAkC,EAClC,kBAAkB,EAClB,yBAAyB,EACzB,g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mB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAE3B,wBAAwB,EAExB,gBAAgB,EAMhB,uBAAuB,GAEvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAGN,YAAY,EAIZ,UAAU,EACV,cAAc,GAEd,MAAM,0BAA0B,CAAC","sourcesContent":["export type { ExtensionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport * from \"./core/event-subscriptions/index.js\";\nexport type { ExecuteToolOptions, ExtensionToolContext } from \"./core/extensions/context-types.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport {\n\ttype ExtensionContextEffectPhase,\n\tpublishExtensionContextEffect,\n\tregisterExtensionContextRetirementEffect,\n} from \"./core/extensions/runner-context.ts\";\nexport type {\n\tDetachableCallPredicate,\n\tToolAnnotations,\n\tToolExposure,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n} from \"./core/extensions/tool-types.ts\";\nexport { resolveRestoredModelReference } from \"./core/model-resolver-initial.ts\";\nexport * from \"./core/resume/index.ts\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { resolveSessionStore } from \"./core/session-storage.js\";\nexport {\n\tassertSessionBlobStore,\n\ttype BlobCopyOptions,\n\tcopySessionBlobs,\n\ttype MissingBlobReporter,\n\tsessionBlobHashes,\n\tTOOL_OUTPUT_ENTRY_TYPE,\n\ttype ToolOutputReference,\n\ttoolOutputUrl,\n} from \"./core/session-tool-output.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\nexport * from \"./core/storage/index.js\";\n// Outside the storage barrel: workflow durability setup imports that barrel in every test worker.\nexport {\n\ttype ProcessStorageChoice,\n\tprocessSharedStorageSelection,\n\tprocessStorageEnvironment,\n\ttype StorageDomain,\n\tselectProcessStorage,\n} from \"./core/storage/process-selection.js\";\nexport { JsonlSessionStore } from \"./core/storage/session/jsonl-session-store.js\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport {\n\tisRetryableTaskError,\n\tisTaskCleanupAdmissionTimeoutError,\n\tisTaskCleanupError,\n\trehydrateTaskCleanupError,\n\tTaskCleanupAdmissionTimeoutError,\n\ttype TaskCleanupAdmissionTiming,\n\tTaskCleanupError,\n\ttype TaskCleanupErrorCode,\n\ttype TaskCleanupFailure,\n\ttype TaskCleanupPhase,\n} from \"./core/tasks/cleanup-error.js\";\nexport { ranOnModelLine } from \"./core/tasks/completion.js\";\nexport type {\n\tAgentIntent,\n\tCleanup,\n\tOperationId,\n\tResourceFailure,\n\tTaskId,\n\tTaskRecord,\n\tTaskResult,\n\tWaitPolicy,\n} from \"./core/tasks/contracts.js\";\nexport {\n\tFINISHED_TASK_RETENTION,\n\tfindTaskEvictedError,\n\tisTaskEvictedError,\n\trehydrateTaskEvictedError,\n\tTaskEvictedError,\n\ttype TaskEvictedErrorCode,\n\ttype TaskEvictedErrorFields,\n} from \"./core/tasks/eviction-error.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport {\n\tDEFAULT_TASK_HEARTBEAT_MS,\n\tMIN_TASK_HEARTBEAT_MS,\n\tTASK_HEARTBEAT_MESSAGE_TYPE,\n\ttype TaskHeartbeatDetails,\n\tvalidateTaskHeartbeatMs,\n} from \"./core/tasks/heartbeat-notice.js\";\nexport {\n\tfindTaskMessageError,\n\tisRetryableTaskMessageError,\n\tisTaskMessageError,\n\tisTaskMessageTimeoutError,\n\trehydrateTaskMessageError,\n\ttype SerializedTaskMessageError,\n\tTaskMessageError,\n\ttype TaskMessageErrorCode,\n\ttype TaskMessageErrorFields,\n\tTaskMessageTimeoutError,\n\ttype TaskMessageTimeoutErrorFields,\n\ttype TaskMessageTimeoutPhase,\n} from \"./core/tasks/message-error.js\";\nexport {\n\tbindOwnerTaskStore,\n\tgetOwnerTaskStore,\n\tOwnerTaskStore,\n\ttype TaskActivity,\n\twatchOwnerTaskStoreBinding,\n} from \"./core/tasks/owner-store.js\";\nexport {\n\townerTaskViewSource,\n\ttype TaskDetailText,\n\ttype TaskOutputView,\n\ttype TaskTranscriptFollow,\n\ttype TaskTranscriptView,\n\ttype TaskViewResult,\n\ttype TaskViewSource,\n} from \"./core/tasks/task-view-source.js\";\nexport { formatReadLineRange, formatToolCallWithArgs } from \"./core/tools/render-utils.ts\";\nexport {\n\tcreateTranscript,\n\ttype Transcript,\n\ttype TranscriptOptions,\n\ttype TranscriptPart,\n\ttype TranscriptTextPart,\n\ttype TranscriptThinkingPart,\n\ttype TranscriptToolCallPart,\n\ttype TranscriptToolResult,\n\ttype TranscriptToolResultFormat,\n} from \"./core/transcript.js\";\nexport * from \"./core/worktree-snapshot/index.ts\";\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.js\";\nexport {\n\ttype CodemodeToolDetails,\n\ttype CodemodeToolOptions,\n\tcreateCodemodeDescription,\n\tcreateCodemodeTool,\n\tcreateCodemodeToolDefinition,\n} from \"./extensions/codemode/tool.js\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.js\";\nexport { createToolSearchToolDefinition, type ToolSearchToolOptions } from \"./extensions/tool-search/tool.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n\n// Core session management\n\n// GitHub Copilot request failures, typed at the provider; see docs/providers.md.\nexport {\n\tclassifyGitHubCopilotFailure,\n\tdescribeGitHubCopilotModel,\n\tdeserializeGitHubCopilotError,\n\tfindGitHubCopilotError,\n\tGITHUB_COPILOT_ERROR_DIAGNOSTIC,\n\tGitHubCopilotAuthenticationError,\n\tGitHubCopilotContentFilterError,\n\tGitHubCopilotEmptyResponseError,\n\tGitHubCopilotError,\n\ttype GitHubCopilotErrorCode,\n\ttype GitHubCopilotErrorContext,\n\ttype GitHubCopilotErrorFields,\n\ttype GitHubCopilotErrorName,\n\ttype GitHubCopilotFailureContext,\n\tGitHubCopilotInvalidRequestError,\n\ttype GitHubCopilotInvalidRequestReason,\n\ttype GitHubCopilotModelCapabilities,\n\tGitHubCopilotModelUnavailableError,\n\ttype GitHubCopilotModelUnavailableReason,\n\tGitHubCopilotPromptTooLargeError,\n\tGitHubCopilotQuotaExhaustedError,\n\tGitHubCopilotRateLimitError,\n\tGitHubCopilotServiceUnavailableError,\n\tGitHubCopilotStreamEndedEarlyError,\n\ttype GitHubCopilotStreamSnapshot,\n\ttype GitHubCopilotUnrecognizedReason,\n\tGitHubCopilotUnrecognizedResponseError,\n\tgetGitHubCopilotError,\n\tisGitHubCopilotAuthenticationError,\n\tisGitHubCopilotContentFilterError,\n\tisGitHubCopilotEmptyResponseError,\n\tisGitHubCopilotError,\n\tisGitHubCopilotInvalidRequestError,\n\tisGitHubCopilotModelUnavailableError,\n\tisGitHubCopilotPromptTooLargeError,\n\tisGitHubCopilotQuotaExhaustedError,\n\tisGitHubCopilotRateLimitError,\n\tisGitHubCopilotServiceUnavailableError,\n\tisGitHubCopilotStreamEndedEarlyError,\n\tisGitHubCopilotUnrecognizedResponseError,\n\tisRetryableGitHubCopilotError,\n\ttype SerializedGitHubCopilotError,\n\tserializeGitHubCopilotError,\n} from \"@bastani/pi-ai\";\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentRehydrateError,\n\ttype AgentRehydrateErrorCode,\n\ttype AgentRehydrateErrorFields,\n\tAgentReleaseConfigError,\n\ttype AgentReleaseConfigSource,\n\ttype AgentSessionActivity,\n\tisAgentRehydrateError,\n\tisAgentReleaseConfigError,\n\tisLocalOnlySessionStorage,\n\tisRetryableAgentRehydrateError,\n\trehydrateAgentRehydrateError,\n\ttype SerializedAgentErrorCause,\n\ttype SerializedAgentRehydrateError,\n\tserializeAgentRehydrateError,\n\tTEAM_JOIN_COMMAND,\n} from \"./core/agent-rehydrate-errors.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionCompactOptions,\n\ttype SessionRecoveryReport,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\nexport { AgentSessionBusyError, isAgentSessionBusyError } from \"./core/agent-session-busy-error.ts\";\nexport type {\n\tDetachedCallFailure,\n\tDetachedCallFailureCause,\n\tDetachedToolCall,\n\tDetachedToolResult,\n\tToolDetachmentPolicy,\n} from \"./core/agent-session-detached-tools.ts\";\nexport { markToolCallReadyForDetachment, toolCallNeedsDetachmentHandoff } from \"./core/agent-session-detached-tools.ts\";\nexport type { ReleasedAgentSession, ReleaseWhenIdleOptions } from \"./core/agent-session-release.ts\";\nexport {\n\ttype AgentWake,\n\ttype AgentWakeClock,\n\tAgentWakeDispatcher,\n\ttype AgentWakeDispatcherOptions,\n\ttype AgentWakeDispatcherStats,\n\ttype AgentWakeFailureListener,\n\ttype AgentWakeHandler,\n\ttype AgentWakeHandlerOptions,\n\ttype AgentWakeKind,\n\ttype AgentWakeTimer,\n\tagentWakeDispatcher,\n\twakeKeyNamespace,\n} from \"./core/agent-wake-dispatcher.ts\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport type { CompactionCacheMiss } from \"./core/cache-stats.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\nexport {\n\tBACKGROUND_COMPACTION_RESULT_TYPE,\n\ttype BackgroundCompactionResultRecord,\n\ttype BackgroundCompactionState,\n\ttype BackgroundCompactionStatus,\n\ttype CompactionReadyWake,\n\ttype CompactionWakeDispatcher,\n\tDEFAULT_BACKGROUND_COMPACTION_THRESHOLD_PERCENT,\n\trehydrateBackgroundCompactionState,\n\ttype SerializedBackgroundCompactionState,\n\tserializeBackgroundCompactionState,\n} from \"./core/compaction/background-compaction.ts\";\nexport {\n\tBackgroundCompactionCommitError,\n\tBackgroundCompactionConfigError,\n\ttype BackgroundCompactionConfigReason,\n\ttype BackgroundCompactionConfigSource,\n\tBackgroundCompactionDiscardedError,\n\ttype BackgroundCompactionDiscardReason,\n\tBackgroundCompactionError,\n\ttype BackgroundCompactionErrorCode,\n\ttype BackgroundCompactionErrorFields,\n\tBackgroundCompactionNotCompactableError,\n\tBackgroundCompactionPersistError,\n\ttype BackgroundCompactionPhase,\n\tBackgroundCompactionPlanningError,\n\tisBackgroundCompactionCommitError,\n\tisBackgroundCompactionConfigError,\n\tisBackgroundCompactionDiscardedError,\n\tisBackgroundCompactionError,\n\tisBackgroundCompactionNotCompactableError,\n\tisBackgroundCompactionPersistError,\n\tisBackgroundCompactionPlanningError,\n\tisRetryableBackgroundCompactionError,\n\tisSerializedBackgroundCompactionError,\n\trehydrateBackgroundCompactionError,\n\ttype SerializedBackgroundCompactionError,\n\tserializeBackgroundCompactionError,\n} from \"./core/compaction/background-compaction-errors.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\ttype PolicyRefusalPhase,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\ttype SidecarDirectory,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport {\n\tappendDebugRecord,\n\tDEBUG_AREA_VARIABLES,\n\ttype DebugArea,\n\ttype DebugFields,\n\ttype DebugValue,\n\tgetDebugLogFailure,\n\tisDebugEnabled,\n\treportDebug,\n} from \"./core/debug.ts\";\nexport {\n\tDebugConfigError,\n\ttype DebugConfigErrorFields,\n\tDebugError,\n\ttype DebugErrorCode,\n\tDebugLogUnwritableError,\n\ttype DebugSettingSource,\n\tisDebugConfigError,\n\tisDebugError,\n\tisDebugLogUnwritableError,\n\trehydrateDebugError,\n\ttype SerializedDebugError,\n\tserializeDebugError,\n} from \"./core/debug-errors.ts\";\nexport { onDebugSettingChange, setDebugSetting } from \"./core/debug-setting.ts\";\nexport * from \"./core/decision/index.js\";\nexport type {\n\tErrorFieldValue,\n\tSerializedErrorCause,\n\tSerializedTypedError,\n} from \"./core/error-contract.ts\";\nexport { redactUrlCredentials } from \"./core/error-contract.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport {\n\tAutoRoutingInferenceError,\n\ttype ModelRoute,\n\ttype ModelRoutingContext,\n\ttype RoutingInferenceBounds,\n\trouteExecutionModel,\n} from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tExtensionStartupError,\n\ttype ExtensionStartupFailure,\n\tisExtensionStartupFailure,\n\tisTransientExtensionStartupFailure,\n} from \"./core/extension-startup-failure.ts\";\n// Run modes for programmatic SDK usage\nexport { noOpUIContext } from \"./core/extensions/runner-ui.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tANTHROPIC_FAST_MODE_MODEL_IDS,\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\tFAST_MODEL_SPEED,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesAnthropicFastMode,\n\tusesOpenAIFastServiceTier,\n\tusesXaiFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tIntercomBrokerError,\n\ttype IntercomBrokerErrorCode,\n\ttype IntercomBrokerErrorFields,\n\ttype IntercomBrokerErrorFieldValue,\n\ttype IntercomBrokerErrorOptions,\n\ttype IntercomBrokerProtocolCode,\n\tIntercomBrokerProtocolError,\n\ttype IntercomBrokerProtocolFields,\n\ttype IntercomBrokerStopTimeoutCode,\n\tIntercomBrokerStopTimeoutError,\n\ttype IntercomBrokerStopTimeoutFields,\n\ttype IntercomBrokerStopTimeoutPhase,\n\ttype IntercomBrokerSuccessorTimeoutCode,\n\tIntercomBrokerSuccessorTimeoutError,\n\ttype IntercomBrokerSuccessorTimeoutFields,\n\ttype IntercomBrokerSuccessorTimeoutPhase,\n\ttype IntercomBrokerUpgradeCode,\n\tIntercomBrokerUpgradeError,\n\ttype IntercomBrokerUpgradeFields,\n\ttype IntercomBrokerUpgradePhase,\n\tisIntercomBrokerError,\n\tisIntercomBrokerProtocolError,\n\tisIntercomBrokerStopTimeoutError,\n\tisIntercomBrokerSuccessorTimeoutError,\n\tisIntercomBrokerUpgradeError,\n\tisRetryableIntercomBrokerError,\n\trehydrateIntercomBrokerError,\n\ttype SerializedIntercomBrokerError,\n\tserializeIntercomBrokerError,\n} from \"./core/intercom-broker-error.ts\";\nexport {\n\tisProjectGroupError,\n\tProjectGroupError,\n\ttype ProjectGroupErrorCode,\n} from \"./core/intercom-project-group-error.ts\";\nexport {\n\tIntercomRoutingChangedError,\n\tIntercomRoutingError,\n\ttype IntercomRoutingErrorCode,\n\tIntercomRoutingMismatchError,\n\ttype IntercomRoutingMismatchReason,\n\ttype IntercomRoutingPhase,\n\tIntercomRoutingTimeoutError,\n\tIntercomRoutingUnavailableError,\n\ttype IntercomRoutingUnavailableReason,\n\tisIntercomRoutingChangedError,\n\tisIntercomRoutingError,\n\tisIntercomRoutingMismatchError,\n\tisIntercomRoutingTimeoutError,\n\tisIntercomRoutingUnavailableError,\n\tisRetryableIntercomRoutingError,\n} from \"./core/intercom-routing-error.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { matchesMcpDirectToolSelection } from \"./core/mcp-child-policy.ts\";\nexport {\n\ttype McpExposure,\n\ttype McpOAuthConfig,\n\ttype McpServerConfig,\n\ttype McpServerContribution,\n\tmcpNamespace,\n\tvalidateMcpServerConfig,\n} from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureOptions,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tisUnrecognizedModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\tformatModelLabel,\n\tformatModelReferenceLabel,\n\tMODEL_LABEL_SEPARATOR,\n\ttype ModelLabelOptions,\n\ttype ModelLabelSubject,\n} from \"./core/model-label.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n\tsetsProviders,\n} from \"./core/model-routing-constraints.js\";\nexport { reportModelRoutingDebug } from \"./core/model-routing-debug.js\";\nexport {\n\tDIFFICULTY_LEVELS,\n\ttype Difficulty,\n\tMISTAKE_COST_LEVELS,\n\ttype MistakeCost,\n\tmergeTaskNeeds,\n\tparseTaskNeeds,\n\ttype TaskNeeds,\n\tTaskNeedsSchema,\n\tWORK_KINDS,\n\ttype WorkKind,\n} from \"./core/model-routing-needs.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedMcpServer,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport {\n\tapplyProviderRateLimitObservation,\n\tconfigureProviderRequestBudget,\n\tisProviderRateLimit,\n\tmodelIdForModel,\n\tobserveProviderRateLimits,\n\ttype ProviderRateLimitObservation,\n\ttype ProviderRateLimitSnapshot,\n\ttype ProviderRequestBudget,\n\tproviderCooldownMs,\n\tproviderIdForModel,\n\tproviderRateLimitObservations,\n\tproviderRateLimitSnapshot,\n\tproviderRetryHint,\n\tproviderUnavailableMs,\n\trecordProviderRateLimit,\n} from \"./core/provider-rate-limits.js\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport {\n\tisLongStreamCut,\n\tLONG_STREAM_CUT_MS,\n\tMAX_LONG_STREAM_CUT_RETRIES,\n\tnextRetryDecision,\n\ttype RetryDecision,\n\ttype RetryPolicySettings,\n} from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\ttype ResourceAdmission,\n\ttype ResourceAdmissionRequest,\n\ttype ResourcePermit,\n\ttype ResourceProcessIdentity,\n\ttype SessionStorageOption,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n\twithResourceAdmission,\n} from \"./core/sdk.ts\";\nexport {\n\tisMissingSessionCwdError,\n\tisSerializedMissingSessionCwdError,\n\tMissingSessionCwdError,\n\ttype MissingSessionCwdErrorCode,\n\ttype MissingSessionCwdFields,\n\trehydrateMissingSessionCwdError,\n\ttype SerializedMissingSessionCwdError,\n\ttype SessionCwdIssue,\n\tserializeMissingSessionCwdError,\n} from \"./core/session-cwd.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetDefaultSessionDirPath,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\ttype ModelFallbackRecord,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\tSessionEntryError,\n\ttype SessionHeader,\n\tSessionIdError,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionProjection,\n\ttype SessionSummaryEntry,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n\ttype WorktreeRestoreHostWarning,\n\ttype WorktreeSnapshotEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport {\n\tfindSessionStartError,\n\tisRetryableSessionStartError,\n\tisSessionStartConfigError,\n\tisSessionStartError,\n\tisSessionStartTimeoutError,\n\tMAX_SESSION_START_TIMEOUT_MS,\n\tparseSessionStartTimeoutMs,\n\trehydrateSessionStartError,\n\ttype SerializedSessionStartCause,\n\ttype SerializedSessionStartError,\n\tSessionStartConfigError,\n\ttype SessionStartConfigReason,\n\ttype SessionStartConfigSource,\n\tSessionStartError,\n\ttype SessionStartErrorCode,\n\ttype SessionStartEventLoopSample,\n\ttype SessionStartFailureCause,\n\ttype SessionStartFields,\n\ttype SessionStartFieldValue,\n\ttype SessionStartPhase,\n\ttype SessionStartStep,\n\ttype SessionStartStepTiming,\n\ttype SessionStartTimeoutDetails,\n\tSessionStartTimeoutError,\n\tserializeSessionStartError,\n} from \"./core/session-start-errors.ts\";\nexport {\n\tformatWorktreeRestoreNotice,\n\tformatWorktreeRestoreWarning,\n\tmapRestoredPath,\n\topenSessionInWorktree,\n\ttype ResumeSessionWorktreeOptions,\n\tresumeSessionWorktree,\n\ttype SessionWorktreeResume,\n} from \"./core/session-worktree-snapshots.ts\";\nexport type { DefaultProjectTrust, QuietStartup } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype ModelRoutingSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype Settings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tgenerateStructuredOutput,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport {\n\tdeserializeToolDetachmentError,\n\tfindToolDetachmentError,\n\tisToolDetachmentError,\n\tMAX_TOOL_DETACHMENT_AFTER_MS,\n\ttype SerializedToolDetachmentError,\n\ttype SerializedToolDetachmentErrorCause,\n\tToolDetachmentError,\n\ttype ToolDetachmentErrorCode,\n\ttype ToolDetachmentErrorFields,\n} from \"./core/tool-detachment-errors.ts\";\nexport {\n\tformatToolStatus,\n\ttype ToolSelectionSource,\n\ttype ToolSelectionStatus,\n\ttype ToolStatus,\n\ttype ToolStatusFormatStyle,\n\ttype ToolStatusReport,\n\ttype UnavailableToolStatus,\n} from \"./core/tool-status.js\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tEditInputError,\n\ttype EditInputErrorCode,\n\tEditMatchError,\n\ttype EditMatchErrorCode,\n\ttype EditOperations,\n\tEditTargetError,\n\ttype EditTargetErrorCode,\n\ttype EditToolDetails,\n\tEditToolError,\n\ttype EditToolErrorCode,\n\ttype EditToolErrorFields,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\tFileToolAbortedError,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\tisEditInputError,\n\tisEditMatchError,\n\tisEditTargetError,\n\tisEditToolError,\n\tisFileToolAbortedError,\n\tisWriteSelectorError,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\trehydrateEditToolError,\n\trehydrateWriteSelectorError,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype SerializedFileToolError,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\tserializeFileToolError,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\tWriteSelectorError,\n\ttype WriteSelectorErrorCode,\n\ttype WriteSelectorErrorFields,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.js\";\nexport {\n\tisShellTimeoutError,\n\tisShellToolError,\n\trehydrateShellToolError,\n\ttype ShellExitBeforeTimeout,\n\tShellTimeoutError,\n\ttype ShellTimeoutPhase,\n\tShellToolError,\n\ttype ShellToolErrorCode,\n} from \"./core/tools/shell-errors.ts\";\nexport {\n\tisTaskToolError,\n\trehydrateTaskToolError,\n\ttype SerializedTaskToolError,\n\tTaskToolError,\n\ttype TaskToolErrorFields,\n\ttype TaskToolFailureCode,\n} from \"./core/tools/shell-task-status.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport { parkWorkflowStageForRelease } from \"./core/workflow-stage-admission.ts\";\n// Workspace bindings (#3109)\nexport {\n\ttype AcquireWorkspaceWriterLeaseOptions,\n\tacquireWorkspaceWriterLease,\n\tassertWorkspace,\n\tattachCleanupCause,\n\ttype BoundWorkspace,\n\tbindSessionWorkspace,\n\tfindWorkspaceError,\n\tinheritWorkspace,\n\tisBoundWorkspace,\n\tisRetryableWorkspaceError,\n\tisWorkspace,\n\tisWorkspaceBindingError,\n\tisWorkspaceConfigError,\n\tisWorkspaceError,\n\tisWorkspacePublicationError,\n\tisWorkspaceRestoreError,\n\tisWorkspaceSandboxError,\n\tisWorkspaceTimeoutError,\n\ttype PublishedPullRequest,\n\ttype PublishPullRequestOptions,\n\tpublishPullRequest,\n\ttype ResolveWorkspaceOptions,\n\ttype RestoreWorkspaceOptions,\n\trehydrateWorkspaceError,\n\tresolveWorkspace,\n\trestoreWorkspace,\n\ttype SerializedWorkspaceError,\n\tserializeWorkspaceError,\n\tWORKSPACE_BINDING_ENTRY_TYPE,\n\ttype Workspace,\n\ttype WorkspaceBinding,\n\tWorkspaceBindingError,\n\ttype WorkspaceBindingErrorCode,\n\ttype WorkspaceBindingErrorReason,\n\ttype WorkspaceChangeSet,\n\ttype WorkspaceChangeSetOptions,\n\tWorkspaceConfigError,\n\ttype WorkspaceConfigErrorCode,\n\ttype WorkspaceConfigErrorReason,\n\ttype WorkspaceConfigSource,\n\ttype WorkspaceDiffStat,\n\tWorkspaceError,\n\ttype WorkspaceErrorCode,\n\ttype WorkspaceErrorFields,\n\ttype WorkspaceErrorFieldValue,\n\ttype WorkspaceGitPhase,\n\ttype WorkspaceOptions,\n\tWorkspacePublicationError,\n\ttype WorkspacePublicationErrorCode,\n\ttype WorkspacePublicationErrorReason,\n\tWorkspaceRestoreError,\n\ttype WorkspaceRestoreErrorCode,\n\ttype WorkspaceRestoreErrorReason,\n\ttype WorkspaceSandbox,\n\tWorkspaceSandboxError,\n\ttype WorkspaceSandboxErrorCode,\n\tWorkspaceTimeoutError,\n\ttype WorkspaceTimeoutErrorCode,\n\ttype WorkspaceWriterLease,\n\ttype WorkspaceWriterLeaseHolder,\n\ttype WorktreeBinding,\n\tworkspace,\n\tworkspaceChangeSet,\n\tworkspaceSessionCwd,\n} from \"./core/workspace/index.ts\";\nexport {\n\tfindLlamaServerError,\n\tisLlamaServerError,\n\tisLlamaServerRequestError,\n\tisLlamaServerUnreachableError,\n\tisRetryableLlamaServerError,\n\tLlamaServerError,\n\ttype LlamaServerErrorCode,\n\tLlamaServerRequestError,\n\tLlamaServerUnreachableError,\n\trehydrateLlamaServerError,\n} from \"./extensions/llama/errors.ts\";\nexport {\n\ttype LoadedMcpConfig,\n\ttype McpServerConfigPatch,\n\ttype McpServerEntry,\n\tupdateMcpServerConfig,\n} from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions } from \"./extensions/mcp/index.js\";\nexport { McpOAuthCredentialStore } from \"./extensions/mcp/oauth.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tisStartupBenchmarkConfigError,\n\tisStartupBenchmarkError,\n\trehydrateStartupBenchmarkError,\n\tStartupBenchmarkConfigError,\n\tStartupBenchmarkError,\n\ttype StartupBenchmarkErrorCode,\n\ttype StartupBenchmarkUnsupportedMode,\n} from \"./main-startup-benchmark.js\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\ttype ChatSessionViewportSettings,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\ttype ScrollableComponentViewportOptions,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionCommandCatalog,\n\tgetSessionSkillCommands,\n\ttype PendingSessionCommandCatalog,\n\ttype SessionCommandCatalog,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment, spawnProcess } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport {\n\tfindGitProvisionError,\n\tGIT_MINIMUM_VERSION,\n\ttype GitInstallPhase,\n\ttype GitProvisionConfigCode,\n\tGitProvisionConfigError,\n\ttype GitProvisionConfigFields,\n\tGitProvisionError,\n\ttype GitProvisionErrorCode,\n\ttype GitProvisionFields,\n\ttype GitProvisionJsonValue,\n\ttype GitProvisionPhase,\n\ttype GitProvisionTimeoutCode,\n\tGitProvisionTimeoutError,\n\ttype GitProvisionTimeoutFields,\n\ttype GitRejectedSystemGit,\n\ttype GitUnavailableCode,\n\tGitUnavailableError,\n\ttype GitUnavailableFields,\n\ttype GitUnsupportedPlatformReason,\n\tisGitProvisionConfigError,\n\tisGitProvisionError,\n\tisGitProvisionTimeoutError,\n\tisGitUnavailableError,\n\tisRetryableGitProvisionError,\n\trehydrateGitProvisionError,\n\ttype SerializedGitProvisionError,\n} from \"./utils/git-errors.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport {\n\tisManagedToolDownloadError,\n\tisManagedToolError,\n\tisManagedToolTimeoutError,\n\tisRetryableManagedToolError,\n\ttype ManagedToolDownloadCode,\n\tManagedToolDownloadError,\n\ttype ManagedToolDownloadFields,\n\tManagedToolError,\n\ttype ManagedToolErrorCode,\n\ttype ManagedToolErrorFields,\n\ttype ManagedToolName,\n\ttype ManagedToolRequestPhase,\n\ttype ManagedToolTimeoutCode,\n\tManagedToolTimeoutError,\n\ttype ManagedToolTimeoutFields,\n} from \"./utils/managed-tool-errors.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\nexport {\n\ttype GitToolStatus,\n\ttype GitUpdateStatus,\n\tgetGitStatus,\n\ttype ResolvedGit,\n\ttype ResolvedGitSource,\n\ttype ResolveGitOptions,\n\tresolveGit,\n\tresolveGitSync,\n\ttype ToolStatus as ManagedToolStatus,\n} from \"./utils/tools-manager.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AAWpD,OAAO,EAEN,6BAA6B,EAC7B,wCAAwC,GACxC,MAAM,qCAAqC,CAAC;AAW7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACN,sBAAsB,EAEtB,gBAAgB,EAEhB,iBAAiB,EACjB,sBAAsB,EAEtB,aAAa,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AACxF,cAAc,yBAAyB,CAAC;AACxC,kGAAkG;AAClG,OAAO,EAEN,6BAA6B,EAC7B,yBAAyB,EAEzB,oBAAoB,GACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AACtH,OAAO,EACN,oBAAoB,EACpB,kCAAkC,EAClC,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,EAEhC,gBAAgB,GAIhB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,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AAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAE3B,wBAAwB,EAExB,gBAAgB,EAMhB,uBAAuB,GAEvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAGN,YAAY,EAIZ,UAAU,EACV,cAAc,GAEd,MAAM,0BAA0B,CAAC","sourcesContent":["export type { ExtensionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport * from \"./core/event-subscriptions/index.js\";\nexport type { ExecuteToolOptions, ExtensionToolContext } from \"./core/extensions/context-types.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport {\n\ttype ExtensionContextEffectPhase,\n\tpublishExtensionContextEffect,\n\tregisterExtensionContextRetirementEffect,\n} from \"./core/extensions/runner-context.ts\";\nexport type {\n\tDetachableCallPredicate,\n\tToolAnnotations,\n\tToolExposure,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n} from \"./core/extensions/tool-types.ts\";\nexport { resolveRestoredModelReference } from \"./core/model-resolver-initial.ts\";\nexport * from \"./core/resume/index.ts\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { resolveSessionStore } from \"./core/session-storage.js\";\nexport {\n\tassertSessionBlobStore,\n\ttype BlobCopyOptions,\n\tcopySessionBlobs,\n\ttype MissingBlobReporter,\n\tsessionBlobHashes,\n\tTOOL_OUTPUT_ENTRY_TYPE,\n\ttype ToolOutputReference,\n\ttoolOutputUrl,\n} from \"./core/session-tool-output.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\nexport * from \"./core/storage/index.js\";\n// Outside the storage barrel: workflow durability setup imports that barrel in every test worker.\nexport {\n\ttype ProcessStorageChoice,\n\tprocessSharedStorageSelection,\n\tprocessStorageEnvironment,\n\ttype StorageDomain,\n\tselectProcessStorage,\n} from \"./core/storage/process-selection.js\";\nexport { JsonlSessionStore } from \"./core/storage/session/jsonl-session-store.js\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport {\n\tisRetryableTaskError,\n\tisTaskCleanupAdmissionTimeoutError,\n\tisTaskCleanupError,\n\trehydrateTaskCleanupError,\n\tTaskCleanupAdmissionTimeoutError,\n\ttype TaskCleanupAdmissionTiming,\n\tTaskCleanupError,\n\ttype TaskCleanupErrorCode,\n\ttype TaskCleanupFailure,\n\ttype TaskCleanupPhase,\n} from \"./core/tasks/cleanup-error.js\";\nexport { ranOnModelLine } from \"./core/tasks/completion.js\";\nexport type {\n\tAgentIntent,\n\tCleanup,\n\tOperationId,\n\tResourceFailure,\n\tTaskId,\n\tTaskRecord,\n\tTaskResult,\n\tWaitPolicy,\n} from \"./core/tasks/contracts.js\";\nexport {\n\tFINISHED_TASK_RETENTION,\n\tfindTaskEvictedError,\n\tisTaskEvictedError,\n\trehydrateTaskEvictedError,\n\tTaskEvictedError,\n\ttype TaskEvictedErrorCode,\n\ttype TaskEvictedErrorFields,\n} from \"./core/tasks/eviction-error.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport {\n\tDEFAULT_TASK_HEARTBEAT_MS,\n\tMIN_TASK_HEARTBEAT_MS,\n\tTASK_HEARTBEAT_MESSAGE_TYPE,\n\ttype TaskHeartbeatDetails,\n\tvalidateTaskHeartbeatMs,\n} from \"./core/tasks/heartbeat-notice.js\";\nexport {\n\tfindTaskMessageError,\n\tisRetryableTaskMessageError,\n\tisTaskMessageError,\n\tisTaskMessageTimeoutError,\n\trehydrateTaskMessageError,\n\ttype SerializedTaskMessageError,\n\tTaskMessageError,\n\ttype TaskMessageErrorCode,\n\ttype TaskMessageErrorFields,\n\tTaskMessageTimeoutError,\n\ttype TaskMessageTimeoutErrorFields,\n\ttype TaskMessageTimeoutPhase,\n} from \"./core/tasks/message-error.js\";\nexport {\n\tbindOwnerTaskStore,\n\tgetOwnerTaskStore,\n\tOwnerTaskStore,\n\ttype TaskActivity,\n\twatchOwnerTaskStoreBinding,\n} from \"./core/tasks/owner-store.js\";\nexport {\n\townerTaskViewSource,\n\ttype TaskDetailText,\n\ttype TaskOutputView,\n\ttype TaskTranscriptFollow,\n\ttype TaskTranscriptView,\n\ttype TaskViewResult,\n\ttype TaskViewSource,\n} from \"./core/tasks/task-view-source.js\";\nexport { formatReadLineRange, formatToolCallWithArgs } from \"./core/tools/render-utils.ts\";\nexport {\n\tcreateTranscript,\n\ttype Transcript,\n\ttype TranscriptOptions,\n\ttype TranscriptPart,\n\ttype TranscriptTextPart,\n\ttype TranscriptThinkingPart,\n\ttype TranscriptToolCallPart,\n\ttype TranscriptToolResult,\n\ttype TranscriptToolResultFormat,\n} from \"./core/transcript.js\";\nexport * from \"./core/worktree-snapshot/index.ts\";\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.js\";\nexport {\n\ttype CodemodeToolDetails,\n\ttype CodemodeToolOptions,\n\tcreateCodemodeDescription,\n\tcreateCodemodeTool,\n\tcreateCodemodeToolDefinition,\n} from \"./extensions/codemode/tool.js\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.js\";\nexport { createToolSearchToolDefinition, type ToolSearchToolOptions } from \"./extensions/tool-search/tool.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n\n// Core session management\n\n// GitHub Copilot request failures, typed at the provider; see docs/providers.md.\nexport {\n\tclassifyGitHubCopilotFailure,\n\tdescribeGitHubCopilotModel,\n\tdeserializeGitHubCopilotError,\n\tfindGitHubCopilotError,\n\tGITHUB_COPILOT_ERROR_DIAGNOSTIC,\n\tGitHubCopilotAuthenticationError,\n\tGitHubCopilotContentFilterError,\n\tGitHubCopilotEmptyResponseError,\n\tGitHubCopilotError,\n\ttype GitHubCopilotErrorCode,\n\ttype GitHubCopilotErrorContext,\n\ttype GitHubCopilotErrorFields,\n\ttype GitHubCopilotErrorName,\n\ttype GitHubCopilotFailureContext,\n\tGitHubCopilotInvalidRequestError,\n\ttype GitHubCopilotInvalidRequestReason,\n\ttype GitHubCopilotModelCapabilities,\n\tGitHubCopilotModelUnavailableError,\n\ttype GitHubCopilotModelUnavailableReason,\n\tGitHubCopilotPromptTooLargeError,\n\tGitHubCopilotQuotaExhaustedError,\n\tGitHubCopilotRateLimitError,\n\tGitHubCopilotServiceUnavailableError,\n\tGitHubCopilotStreamEndedEarlyError,\n\ttype GitHubCopilotStreamSnapshot,\n\ttype GitHubCopilotUnrecognizedReason,\n\tGitHubCopilotUnrecognizedResponseError,\n\tgetGitHubCopilotError,\n\tisGitHubCopilotAuthenticationError,\n\tisGitHubCopilotContentFilterError,\n\tisGitHubCopilotEmptyResponseError,\n\tisGitHubCopilotError,\n\tisGitHubCopilotInvalidRequestError,\n\tisGitHubCopilotModelUnavailableError,\n\tisGitHubCopilotPromptTooLargeError,\n\tisGitHubCopilotQuotaExhaustedError,\n\tisGitHubCopilotRateLimitError,\n\tisGitHubCopilotServiceUnavailableError,\n\tisGitHubCopilotStreamEndedEarlyError,\n\tisGitHubCopilotUnrecognizedResponseError,\n\tisRetryableGitHubCopilotError,\n\ttype SerializedGitHubCopilotError,\n\tserializeGitHubCopilotError,\n} from \"@bastani/pi-ai\";\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentRehydrateError,\n\ttype AgentRehydrateErrorCode,\n\ttype AgentRehydrateErrorFields,\n\tAgentReleaseConfigError,\n\ttype AgentReleaseConfigSource,\n\ttype AgentSessionActivity,\n\tisAgentRehydrateError,\n\tisAgentReleaseConfigError,\n\tisLocalOnlySessionStorage,\n\tisRetryableAgentRehydrateError,\n\trehydrateAgentRehydrateError,\n\ttype SerializedAgentErrorCause,\n\ttype SerializedAgentRehydrateError,\n\tserializeAgentRehydrateError,\n\tTEAM_JOIN_COMMAND,\n} from \"./core/agent-rehydrate-errors.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionCompactOptions,\n\ttype SessionRecoveryReport,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\nexport { AgentSessionBusyError, isAgentSessionBusyError } from \"./core/agent-session-busy-error.ts\";\nexport type {\n\tDetachedCallFailure,\n\tDetachedCallFailureCause,\n\tDetachedToolCall,\n\tDetachedToolResult,\n\tToolDetachmentPolicy,\n} from \"./core/agent-session-detached-tools.ts\";\nexport { markToolCallReadyForDetachment, toolCallNeedsDetachmentHandoff } from \"./core/agent-session-detached-tools.ts\";\nexport type { ReleasedAgentSession, ReleaseWhenIdleOptions } from \"./core/agent-session-release.ts\";\nexport {\n\ttype AgentWake,\n\ttype AgentWakeClock,\n\tAgentWakeDispatcher,\n\ttype AgentWakeDispatcherOptions,\n\ttype AgentWakeDispatcherStats,\n\ttype AgentWakeFailureListener,\n\ttype AgentWakeHandler,\n\ttype AgentWakeHandlerOptions,\n\ttype AgentWakeKind,\n\ttype AgentWakeTimer,\n\tagentWakeDispatcher,\n\twakeKeyNamespace,\n} from \"./core/agent-wake-dispatcher.ts\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport type { CompactionCacheMiss } from \"./core/cache-stats.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\nexport {\n\tBACKGROUND_COMPACTION_RESULT_TYPE,\n\ttype BackgroundCompactionResultRecord,\n\ttype BackgroundCompactionState,\n\ttype BackgroundCompactionStatus,\n\ttype CompactionReadyWake,\n\ttype CompactionWakeDispatcher,\n\tDEFAULT_BACKGROUND_COMPACTION_THRESHOLD_PERCENT,\n\trehydrateBackgroundCompactionState,\n\ttype SerializedBackgroundCompactionState,\n\tserializeBackgroundCompactionState,\n} from \"./core/compaction/background-compaction.ts\";\nexport {\n\tBackgroundCompactionCommitError,\n\tBackgroundCompactionConfigError,\n\ttype BackgroundCompactionConfigReason,\n\ttype BackgroundCompactionConfigSource,\n\tBackgroundCompactionDiscardedError,\n\ttype BackgroundCompactionDiscardReason,\n\tBackgroundCompactionError,\n\ttype BackgroundCompactionErrorCode,\n\ttype BackgroundCompactionErrorFields,\n\tBackgroundCompactionNotCompactableError,\n\tBackgroundCompactionPersistError,\n\ttype BackgroundCompactionPhase,\n\tBackgroundCompactionPlanningError,\n\tisBackgroundCompactionCommitError,\n\tisBackgroundCompactionConfigError,\n\tisBackgroundCompactionDiscardedError,\n\tisBackgroundCompactionError,\n\tisBackgroundCompactionNotCompactableError,\n\tisBackgroundCompactionPersistError,\n\tisBackgroundCompactionPlanningError,\n\tisRetryableBackgroundCompactionError,\n\tisSerializedBackgroundCompactionError,\n\trehydrateBackgroundCompactionError,\n\ttype SerializedBackgroundCompactionError,\n\tserializeBackgroundCompactionError,\n} from \"./core/compaction/background-compaction-errors.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\ttype PolicyRefusalPhase,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\ttype SidecarDirectory,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport {\n\tappendDebugRecord,\n\tDEBUG_AREA_VARIABLES,\n\ttype DebugArea,\n\ttype DebugFields,\n\ttype DebugValue,\n\tgetDebugLogFailure,\n\tisDebugEnabled,\n\treportDebug,\n} from \"./core/debug.ts\";\nexport {\n\tDebugConfigError,\n\ttype DebugConfigErrorFields,\n\tDebugError,\n\ttype DebugErrorCode,\n\tDebugLogUnwritableError,\n\ttype DebugSettingSource,\n\tisDebugConfigError,\n\tisDebugError,\n\tisDebugLogUnwritableError,\n\trehydrateDebugError,\n\ttype SerializedDebugError,\n\tserializeDebugError,\n} from \"./core/debug-errors.ts\";\nexport { onDebugSettingChange, setDebugSetting } from \"./core/debug-setting.ts\";\nexport * from \"./core/decision/index.js\";\nexport type {\n\tErrorFieldValue,\n\tSerializedErrorCause,\n\tSerializedTypedError,\n} from \"./core/error-contract.ts\";\nexport { redactUrlCredentials } from \"./core/error-contract.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport {\n\tAutoRoutingInferenceError,\n\ttype ModelRoute,\n\ttype ModelRoutingContext,\n\ttype RoutingInferenceBounds,\n\trouteExecutionModel,\n} from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tExtensionStartupError,\n\ttype ExtensionStartupFailure,\n\tisExtensionStartupFailure,\n\tisTransientExtensionStartupFailure,\n} from \"./core/extension-startup-failure.ts\";\n// Run modes for programmatic SDK usage\nexport { noOpUIContext } from \"./core/extensions/runner-ui.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tANTHROPIC_FAST_MODE_MODEL_IDS,\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\tFAST_MODEL_SPEED,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesAnthropicFastMode,\n\tusesOpenAIFastServiceTier,\n\tusesXaiFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tIntercomBrokerError,\n\ttype IntercomBrokerErrorCode,\n\ttype IntercomBrokerErrorFields,\n\ttype IntercomBrokerErrorFieldValue,\n\ttype IntercomBrokerErrorOptions,\n\ttype IntercomBrokerProtocolCode,\n\tIntercomBrokerProtocolError,\n\ttype IntercomBrokerProtocolFields,\n\ttype IntercomBrokerStopTimeoutCode,\n\tIntercomBrokerStopTimeoutError,\n\ttype IntercomBrokerStopTimeoutFields,\n\ttype IntercomBrokerStopTimeoutPhase,\n\ttype IntercomBrokerSuccessorTimeoutCode,\n\tIntercomBrokerSuccessorTimeoutError,\n\ttype IntercomBrokerSuccessorTimeoutFields,\n\ttype IntercomBrokerSuccessorTimeoutPhase,\n\ttype IntercomBrokerUpgradeCode,\n\tIntercomBrokerUpgradeError,\n\ttype IntercomBrokerUpgradeFields,\n\ttype IntercomBrokerUpgradePhase,\n\tisIntercomBrokerError,\n\tisIntercomBrokerProtocolError,\n\tisIntercomBrokerStopTimeoutError,\n\tisIntercomBrokerSuccessorTimeoutError,\n\tisIntercomBrokerUpgradeError,\n\tisRetryableIntercomBrokerError,\n\trehydrateIntercomBrokerError,\n\ttype SerializedIntercomBrokerError,\n\tserializeIntercomBrokerError,\n} from \"./core/intercom-broker-error.ts\";\nexport {\n\tisProjectGroupError,\n\tProjectGroupError,\n\ttype ProjectGroupErrorCode,\n} from \"./core/intercom-project-group-error.ts\";\nexport {\n\tIntercomRoutingChangedError,\n\tIntercomRoutingError,\n\ttype IntercomRoutingErrorCode,\n\tIntercomRoutingMismatchError,\n\ttype IntercomRoutingMismatchReason,\n\ttype IntercomRoutingPhase,\n\tIntercomRoutingTimeoutError,\n\tIntercomRoutingUnavailableError,\n\ttype IntercomRoutingUnavailableReason,\n\tisIntercomRoutingChangedError,\n\tisIntercomRoutingError,\n\tisIntercomRoutingMismatchError,\n\tisIntercomRoutingTimeoutError,\n\tisIntercomRoutingUnavailableError,\n\tisRetryableIntercomRoutingError,\n} from \"./core/intercom-routing-error.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { matchesMcpDirectToolSelection } from \"./core/mcp-child-policy.ts\";\nexport {\n\ttype McpExposure,\n\ttype McpOAuthConfig,\n\ttype McpServerConfig,\n\ttype McpServerContribution,\n\tmcpNamespace,\n\tvalidateMcpServerConfig,\n} from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureOptions,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tisUnrecognizedModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\tformatModelLabel,\n\tformatModelReferenceLabel,\n\tMODEL_LABEL_SEPARATOR,\n\ttype ModelLabelOptions,\n\ttype ModelLabelSubject,\n} from \"./core/model-label.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n\tsetsProviders,\n} from \"./core/model-routing-constraints.js\";\nexport { reportModelRoutingDebug } from \"./core/model-routing-debug.js\";\nexport {\n\tDIFFICULTY_LEVELS,\n\ttype Difficulty,\n\tMISTAKE_COST_LEVELS,\n\ttype MistakeCost,\n\tmergeTaskNeeds,\n\tparseTaskNeeds,\n\ttype TaskNeeds,\n\tTaskNeedsSchema,\n\tWORK_KINDS,\n\ttype WorkKind,\n} from \"./core/model-routing-needs.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedMcpServer,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport {\n\tapplyProviderRateLimitObservation,\n\tconfigureProviderRequestBudget,\n\tisProviderRateLimit,\n\tmodelIdForModel,\n\tobserveProviderRateLimits,\n\ttype ProviderRateLimitObservation,\n\ttype ProviderRateLimitSnapshot,\n\ttype ProviderRequestBudget,\n\tproviderCooldownMs,\n\tproviderIdForModel,\n\tproviderRateLimitObservations,\n\tproviderRateLimitSnapshot,\n\tproviderRetryHint,\n\tproviderUnavailableMs,\n\trecordProviderRateLimit,\n} from \"./core/provider-rate-limits.js\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport {\n\tisLongStreamCut,\n\tLONG_STREAM_CUT_MS,\n\tMAX_LONG_STREAM_CUT_RETRIES,\n\tnextRetryDecision,\n\ttype RetryDecision,\n\ttype RetryPolicySettings,\n} from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\ttype ResourceAdmission,\n\ttype ResourceAdmissionRequest,\n\ttype ResourcePermit,\n\ttype ResourceProcessIdentity,\n\ttype SessionStorageOption,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n\twithResourceAdmission,\n} from \"./core/sdk.ts\";\nexport {\n\tisMissingSessionCwdError,\n\tisSerializedMissingSessionCwdError,\n\tMissingSessionCwdError,\n\ttype MissingSessionCwdErrorCode,\n\ttype MissingSessionCwdFields,\n\trehydrateMissingSessionCwdError,\n\ttype SerializedMissingSessionCwdError,\n\ttype SessionCwdIssue,\n\tserializeMissingSessionCwdError,\n} from \"./core/session-cwd.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetDefaultSessionDirPath,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\ttype ModelFallbackRecord,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\tSessionEntryError,\n\ttype SessionHeader,\n\tSessionIdError,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionProjection,\n\ttype SessionSummaryEntry,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n\ttype WorktreeRestoreHostWarning,\n\ttype WorktreeSnapshotEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport {\n\tfindSessionStartError,\n\tisRetryableSessionStartError,\n\tisSessionStartConfigError,\n\tisSessionStartError,\n\tisSessionStartTimeoutError,\n\tMAX_SESSION_START_TIMEOUT_MS,\n\tparseSessionStartTimeoutMs,\n\trehydrateSessionStartError,\n\ttype SerializedSessionStartCause,\n\ttype SerializedSessionStartError,\n\tSessionStartConfigError,\n\ttype SessionStartConfigReason,\n\ttype SessionStartConfigSource,\n\tSessionStartError,\n\ttype SessionStartErrorCode,\n\ttype SessionStartEventLoopSample,\n\ttype SessionStartFailureCause,\n\ttype SessionStartFields,\n\ttype SessionStartFieldValue,\n\ttype SessionStartPhase,\n\ttype SessionStartStep,\n\ttype SessionStartStepTiming,\n\ttype SessionStartTimeoutDetails,\n\tSessionStartTimeoutError,\n\tserializeSessionStartError,\n} from \"./core/session-start-errors.ts\";\nexport {\n\tformatWorktreeRestoreNotice,\n\tformatWorktreeRestoreWarning,\n\tmapRestoredPath,\n\topenSessionInWorktree,\n\ttype ResumeSessionWorktreeOptions,\n\tresumeSessionWorktree,\n\ttype SessionWorktreeResume,\n} from \"./core/session-worktree-snapshots.ts\";\nexport type { DefaultProjectTrust, QuietStartup } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype ModelRoutingSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype Settings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tgenerateStructuredOutput,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport {\n\tdeserializeToolDetachmentError,\n\tfindToolDetachmentError,\n\tisToolDetachmentError,\n\tMAX_TOOL_DETACHMENT_AFTER_MS,\n\ttype SerializedToolDetachmentError,\n\ttype SerializedToolDetachmentErrorCause,\n\tToolDetachmentError,\n\ttype ToolDetachmentErrorCode,\n\ttype ToolDetachmentErrorFields,\n} from \"./core/tool-detachment-errors.ts\";\nexport {\n\tformatToolStatus,\n\ttype ToolSelectionSource,\n\ttype ToolSelectionStatus,\n\ttype ToolStatus,\n\ttype ToolStatusFormatStyle,\n\ttype ToolStatusReport,\n\ttype UnavailableToolStatus,\n} from \"./core/tool-status.js\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tEditInputError,\n\ttype EditInputErrorCode,\n\tEditMatchError,\n\ttype EditMatchErrorCode,\n\ttype EditOperations,\n\tEditTargetError,\n\ttype EditTargetErrorCode,\n\ttype EditToolDetails,\n\tEditToolError,\n\ttype EditToolErrorCode,\n\ttype EditToolErrorFields,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\tFileToolAbortedError,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\tisEditInputError,\n\tisEditMatchError,\n\tisEditTargetError,\n\tisEditToolError,\n\tisFileToolAbortedError,\n\tisWriteSelectorError,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\trehydrateEditToolError,\n\trehydrateWriteSelectorError,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype SerializedFileToolError,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\tserializeFileToolError,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\tWriteSelectorError,\n\ttype WriteSelectorErrorCode,\n\ttype WriteSelectorErrorFields,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.js\";\nexport {\n\tisShellTimeoutError,\n\tisShellToolError,\n\trehydrateShellToolError,\n\ttype ShellExitBeforeTimeout,\n\tShellTimeoutError,\n\ttype ShellTimeoutPhase,\n\tShellToolError,\n\ttype ShellToolErrorCode,\n} from \"./core/tools/shell-errors.ts\";\nexport {\n\tisTaskToolError,\n\trehydrateTaskToolError,\n\ttype SerializedTaskToolError,\n\tTaskToolError,\n\ttype TaskToolErrorFields,\n\ttype TaskToolFailureCode,\n} from \"./core/tools/shell-task-status.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport { parkWorkflowStageForRelease } from \"./core/workflow-stage-admission.ts\";\n// Workspace bindings (#3109)\nexport {\n\ttype AcquireWorkspaceWriterLeaseOptions,\n\tacquireWorkspaceWriterLease,\n\tassertWorkspace,\n\tattachCleanupCause,\n\ttype BoundWorkspace,\n\tbindSessionWorkspace,\n\tfindWorkspaceError,\n\tinheritWorkspace,\n\tisBoundWorkspace,\n\tisRetryableWorkspaceError,\n\tisWorkspace,\n\tisWorkspaceBindingError,\n\tisWorkspaceConfigError,\n\tisWorkspaceError,\n\tisWorkspacePublicationError,\n\tisWorkspaceRestoreError,\n\tisWorkspaceSandboxError,\n\tisWorkspaceTimeoutError,\n\ttype PublishedPullRequest,\n\ttype PublishPullRequestOptions,\n\tpublishPullRequest,\n\ttype ResolveWorkspaceOptions,\n\ttype RestoreWorkspaceOptions,\n\trehydrateWorkspaceError,\n\tresolveWorkspace,\n\trestoreWorkspace,\n\ttype SerializedWorkspaceError,\n\tserializeWorkspaceError,\n\tWORKSPACE_BINDING_ENTRY_TYPE,\n\ttype Workspace,\n\ttype WorkspaceBinding,\n\tWorkspaceBindingError,\n\ttype WorkspaceBindingErrorCode,\n\ttype WorkspaceBindingErrorReason,\n\ttype WorkspaceChangeSet,\n\ttype WorkspaceChangeSetOptions,\n\tWorkspaceConfigError,\n\ttype WorkspaceConfigErrorCode,\n\ttype WorkspaceConfigErrorReason,\n\ttype WorkspaceConfigSource,\n\ttype WorkspaceDiffStat,\n\tWorkspaceError,\n\ttype WorkspaceErrorCode,\n\ttype WorkspaceErrorFields,\n\ttype WorkspaceErrorFieldValue,\n\ttype WorkspaceGitPhase,\n\ttype WorkspaceOptions,\n\tWorkspacePublicationError,\n\ttype WorkspacePublicationErrorCode,\n\ttype WorkspacePublicationErrorReason,\n\tWorkspaceRestoreError,\n\ttype WorkspaceRestoreErrorCode,\n\ttype WorkspaceRestoreErrorReason,\n\ttype WorkspaceSandbox,\n\tWorkspaceSandboxError,\n\ttype WorkspaceSandboxErrorCode,\n\tWorkspaceTimeoutError,\n\ttype WorkspaceTimeoutErrorCode,\n\ttype WorkspaceWriterLease,\n\ttype WorkspaceWriterLeaseHolder,\n\ttype WorktreeBinding,\n\tworkspace,\n\tworkspaceChangeSet,\n\tworkspaceSessionCwd,\n} from \"./core/workspace/index.ts\";\nexport {\n\tfindLlamaServerError,\n\tisLlamaServerError,\n\tisLlamaServerRequestError,\n\tisLlamaServerUnreachableError,\n\tisRetryableLlamaServerError,\n\tLlamaServerError,\n\ttype LlamaServerErrorCode,\n\tLlamaServerRequestError,\n\tLlamaServerUnreachableError,\n\trehydrateLlamaServerError,\n} from \"./extensions/llama/errors.ts\";\nexport {\n\ttype LoadedMcpConfig,\n\ttype McpServerConfigPatch,\n\ttype McpServerEntry,\n\tupdateMcpServerConfig,\n} from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions } from \"./extensions/mcp/index.js\";\nexport { McpOAuthCredentialStore } from \"./extensions/mcp/oauth.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tisStartupBenchmarkConfigError,\n\tisStartupBenchmarkError,\n\trehydrateStartupBenchmarkError,\n\tStartupBenchmarkConfigError,\n\tStartupBenchmarkError,\n\ttype StartupBenchmarkErrorCode,\n\ttype StartupBenchmarkUnsupportedMode,\n} from \"./main-startup-benchmark.js\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tapplyInputLabelToEditorTopRule,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tbuildInputLabel,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\ttype ChatSessionViewportSettings,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tINPUT_LABEL_MIN_COLUMNS,\n\ttype InputLabel,\n\ttype InputLabelKind,\n\ttype InputLabelStyle,\n\tinputLabelMarker,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\truleOpenColor,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\ttype ScrollableComponentViewportOptions,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionCommandCatalog,\n\tgetSessionSkillCommands,\n\ttype PendingSessionCommandCatalog,\n\ttype SessionCommandCatalog,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment, spawnProcess } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport {\n\tfindGitProvisionError,\n\tGIT_MINIMUM_VERSION,\n\ttype GitInstallPhase,\n\ttype GitProvisionConfigCode,\n\tGitProvisionConfigError,\n\ttype GitProvisionConfigFields,\n\tGitProvisionError,\n\ttype GitProvisionErrorCode,\n\ttype GitProvisionFields,\n\ttype GitProvisionJsonValue,\n\ttype GitProvisionPhase,\n\ttype GitProvisionTimeoutCode,\n\tGitProvisionTimeoutError,\n\ttype GitProvisionTimeoutFields,\n\ttype GitRejectedSystemGit,\n\ttype GitUnavailableCode,\n\tGitUnavailableError,\n\ttype GitUnavailableFields,\n\ttype GitUnsupportedPlatformReason,\n\tisGitProvisionConfigError,\n\tisGitProvisionError,\n\tisGitProvisionTimeoutError,\n\tisGitUnavailableError,\n\tisRetryableGitProvisionError,\n\trehydrateGitProvisionError,\n\ttype SerializedGitProvisionError,\n} from \"./utils/git-errors.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport {\n\tisManagedToolDownloadError,\n\tisManagedToolError,\n\tisManagedToolTimeoutError,\n\tisRetryableManagedToolError,\n\ttype ManagedToolDownloadCode,\n\tManagedToolDownloadError,\n\ttype ManagedToolDownloadFields,\n\tManagedToolError,\n\ttype ManagedToolErrorCode,\n\ttype ManagedToolErrorFields,\n\ttype ManagedToolName,\n\ttype ManagedToolRequestPhase,\n\ttype ManagedToolTimeoutCode,\n\tManagedToolTimeoutError,\n\ttype ManagedToolTimeoutFields,\n} from \"./utils/managed-tool-errors.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\nexport {\n\ttype GitToolStatus,\n\ttype GitUpdateStatus,\n\tgetGitStatus,\n\ttype ResolvedGit,\n\ttype ResolvedGitSource,\n\ttype ResolveGitOptions,\n\tresolveGit,\n\tresolveGitSync,\n\ttype ToolStatus as ManagedToolStatus,\n} from \"./utils/tools-manager.ts\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-host-rendering.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAyD,MAAM,wBAAwB,CAAC;AAQ/G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAIpE,wBAAgB,qBAAqB,CAAC,WAAW,SAAS,uBAAuB,EAChF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACZ,MAAM,EAAE,CAaV;AAED,wBAAgB,gCAAgC,CAAC,WAAW,SAAS,uBAAuB,EAC3F,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,MAAM,EAAE,CAqBV;AAED,wBAAgB,8BAA8B,CAAC,WAAW,SAAS,uBAAuB,EACzF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,MAAM,EAAE,CA0BV;AAED,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,uBAAuB,EACjF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,MAAM,EAAE,CAIV;AAED,wBAAgB,uBAAuB,CAAC,WAAW,SAAS,uBAAuB,EAClF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,GACd,MAAM,EAAE,CAwBV;AAED,wBAAgB,uBAAuB,CAAC,WAAW,SAAS,uBAAuB,EAClF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,EACb,gBAAgB,UAAQ,GACtB,MAAM,EAAE,CAqBV;AAED,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,uBAAuB,EACjF,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,GACtC,SAAS,CAgBX;AAED,wBAAgB,kBAAkB,CAAC,WAAW,SAAS,uBAAuB,EAC7E,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,MAAM,CASR"}
1
+ {"version":3,"file":"chat-session-host-rendering.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAyD,MAAM,wBAAwB,CAAC;AAQ/G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAIpE,wBAAgB,qBAAqB,CAAC,WAAW,SAAS,uBAAuB,EAChF,KAAK,EAAE,o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
  }).render(width);
70
70
  }
71
71
  export function renderChatSessionUsage(state, width) {
72
- const agentSession = state.getAgentSession?.();
73
- if (!agentSession)
72
+ const session = state.getAgentSession?.() ?? state.getChatBoxSession?.();
73
+ if (!session)
74
74
  return [];
75
- return new UsageMeterComponent(agentSession).render(width);
75
+ return new UsageMeterComponent(session).render(width);
76
76
  }
77
77
  export function renderChatSessionEditor(state, width, focused) {
78
78
  const disabled = state.isDisabled?.() === true;
@@ -104,14 +104,18 @@ export function renderChatSessionFooter(state, width, navigationActive = false)
104
104
  if (state.disposed)
105
105
  return [];
106
106
  const agentSession = state.getAgentSession?.();
107
- state.footerNavigationActive = navigationActive;
108
- if (agentSession && state.footerData) {
109
- state.footer ??= new FooterComponent(agentSession, state.footerData, {
107
+ const session = agentSession ?? state.getChatBoxSession?.();
108
+ // A chat that does not own its session cannot interrupt it, so its footer never offers "esc to interrupt".
109
+ state.footerNavigationActive = navigationActive || agentSession === undefined;
110
+ if (session && state.footerData) {
111
+ state.footer ??= new FooterComponent(session, state.footerData, {
110
112
  dim: (text) => state.style.dim(text),
111
113
  muted: (text) => state.style.textMuted(text),
112
114
  warning: (text) => state.style.accent(text),
113
- }, () => state.footerNavigationActive);
114
- state.footer.setSession(agentSession);
115
+ }, () => state.footerNavigationActive,
116
+ // A task's session has no task store of its own: its footer counts the tasks the host shows for it.
117
+ agentSession === undefined ? () => state.getTaskSource?.()?.backgroundTasks ?? [] : undefined);
118
+ state.footer.setSession(session);
115
119
  return state.footer.render(width);
116
120
  }
117
121
  state.footer?.dispose();
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-host-rendering.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,IAAI,EAAY,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC/G,OAAO,EAGN,sBAAsB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBA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\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\trenderChatMessageEntry,\n} from \"./chat-message-renderer.ts\";\nimport { setEditorBorderColor, setEditorFocused, setEditorPlaceholder } from \"./chat-session-host-editor.ts\";\nimport { isChatSessionStreaming } from \"./chat-session-host-runtime.ts\";\nimport type { ChatSessionHostState } from \"./chat-session-host-state.ts\";\nimport type { ChatSessionHostEntry } from \"./chat-session-host-types.ts\";\nimport { cacheKey, isChatMessageEntry, stripAnsi, tailStreamingText } from \"./chat-session-host-utils.ts\";\nimport type { ChatTranscriptEntryLike } from \"./chat-transcript.js\";\nimport { FooterComponent, UsageMeterComponent } from \"./footer.ts\";\nimport { WorkingStatusComponent } from \"./working-status.ts\";\n\nexport function renderChatSessionBody<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tbudget: number,\n): string[] {\n\tconst components: Component[] = [];\n\tstate.transcriptRenderSettingsKey = chatRenderSettingsCacheKey(state);\n\tif (state.transcript.length > 0) {\n\t\tcomponents.push(state.transcriptComponent);\n\t}\n\tif (state.statusMessage && !state.compacting) {\n\t\tcomponents.push(new Spacer(1));\n\t\tcomponents.push(new Text(state.style.dim(state.statusMessage), 2, 0));\n\t}\n\tstate.bodyViewport.setVisibleRows(budget);\n\tstate.bodyViewport.setComponents(components);\n\treturn state.bodyViewport.render(width);\n}\n\nexport function renderChatSessionPendingMessages<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tif (\n\t\tstate.pendingSteeringMessages.length === 0 &&\n\t\tstate.pendingFollowUpMessages.length === 0 &&\n\t\tstate.compactionQueuedMessages.length === 0\n\t) {\n\t\treturn [];\n\t}\n\tconst lines = [state.style.blank(width)];\n\tfor (const message of state.pendingSteeringMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Steering\", message));\n\t}\n\tfor (const message of state.pendingFollowUpMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Follow-up\", message));\n\t}\n\tfor (const message of state.compactionQueuedMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Queued\", message.text));\n\t}\n\tconst hint = state.getActionKeyDisplay?.(\"app.message.dequeue\") ?? \"alt+up\";\n\tlines.push(...new Text(state.style.dim(`↳ ${hint} to edit all queued messages`), 1, 0).render(width));\n\treturn lines;\n}\n\nexport function renderChatSessionWorkingStatus<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tif (!isChatSessionStreaming(state)) return [];\n\tif (state.statusMessage && !state.compacting) return [];\n\tconst palette = state.style.workingIndicatorPalette;\n\tconst useCallerStyling =\n\t\t!palette && state.style.workingIndicatorUseGlobalTheme !== true && process.env.NO_COLOR === undefined;\n\tif (state.compacting) {\n\t\tconst cancelHint = `(${state.getActionKeyDisplay?.(\"app.interrupt\") ?? \"esc\"} Cancel)`;\n\t\treturn new WorkingStatusComponent({\n\t\t\tframe: state.workingFrame,\n\t\t\tmessage: `${state.statusMessage || \"Compacting context...\"} ${cancelHint}`,\n\t\t\tpalette,\n\t\t\tspinnerColor: useCallerStyling ? (text) => state.style.accent(text) : undefined,\n\t\t\tspinnerBoldColor: useCallerStyling ? (text) => state.style.accentBold(text) : undefined,\n\t\t\tmessageColor: (text) => state.style.textMuted(text),\n\t\t}).render(width);\n\t}\n\tif (!state.workingLifecycleActive) return [];\n\treturn new WorkingStatusComponent({\n\t\tframe: state.workingFrame,\n\t\tmessage: state.workingMessage ?? \"Working...\",\n\t\tpalette,\n\t\tspinnerColor: useCallerStyling ? (text) => state.style.accent(text) : undefined,\n\t\tspinnerBoldColor: useCallerStyling ? (text) => state.style.accentBold(text) : undefined,\n\t\tmessageColor: (text) => state.style.textMuted(text),\n\t}).render(width);\n}\n\nexport function renderChatSessionUsage<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tconst agentSession = state.getAgentSession?.();\n\tif (!agentSession) return [];\n\treturn new UsageMeterComponent(agentSession).render(width);\n}\n\nexport function renderChatSessionEditor<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tfocused: boolean,\n): string[] {\n\tconst disabled = state.isDisabled?.() === true;\n\tconst agentSession = state.getAgentSession?.();\n\tconst ruleHex = state.style.editorRuleColor(disabled, agentSession, {\n\t\tisBashMode: state.isBashMode,\n\t});\n\tif (!disabled && state.editor) {\n\t\tsetEditorFocused(state.editor, focused);\n\t\tsetEditorPlaceholder(state.editor, undefined);\n\t\tsetEditorBorderColor(state.editor, (text) => state.style.rule(ruleHex, text));\n\t\treturn state.editor.render(width);\n\t}\n\tif (state.editor) setEditorFocused(state.editor, false);\n\tconst rule = state.style.rule(ruleHex, \"─\".repeat(width));\n\tconst available = Math.max(1, width - 3);\n\tconst value = state.inputBuffer\n\t\t? state.style.text(truncateToWidth(state.inputBuffer, available)) + state.style.cursor()\n\t\t: disabled\n\t\t\t? \"\"\n\t\t\t: state.style.cursor();\n\tconst left = `${state.style.accentBold(\"❯\")} ${value}`;\n\tconst gap = Math.max(0, width - visibleWidth(stripAnsi(left)));\n\tconst body = left + \" \".repeat(gap);\n\treturn [rule, body, rule];\n}\n\nexport function renderChatSessionFooter<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tnavigationActive = false,\n): string[] {\n\tif (state.disposed) return [];\n\tconst agentSession = state.getAgentSession?.();\n\tstate.footerNavigationActive = navigationActive;\n\tif (agentSession && state.footerData) {\n\t\tstate.footer ??= new FooterComponent(\n\t\t\tagentSession,\n\t\t\tstate.footerData,\n\t\t\t{\n\t\t\t\tdim: (text) => state.style.dim(text),\n\t\t\t\tmuted: (text) => state.style.textMuted(text),\n\t\t\t\twarning: (text) => state.style.accent(text),\n\t\t\t},\n\t\t\t() => state.footerNavigationActive,\n\t\t);\n\t\tstate.footer.setSession(agentSession);\n\t\treturn state.footer.render(width);\n\t}\n\tstate.footer?.dispose();\n\tstate.footer = undefined;\n\treturn [];\n}\n\nexport function renderChatSessionEntry<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n): Component {\n\tif (state.extraEntries.includes(entry as TExtraEntry)) {\n\t\treturn state.renderExtraEntry?.(entry as TExtraEntry) ?? new Text(\"\", 0, 0);\n\t}\n\tif (isChatMessageEntry(entry)) {\n\t\tconst isStreaming = isChatSessionStreaming(state) && state.liveChat.isStreamingAssistantEntry(entry);\n\t\tconst options = chatMessageRenderOptions(state, isStreaming);\n\t\treturn renderChatMessageEntry(\n\t\t\tstreamingWindowedEntry(state, entry, isStreaming),\n\t\t\tentry.kind === \"tool\" ? { ...options, ui: entryTui(state, entry) } : options,\n\t\t);\n\t}\n\tif (!state.renderExtraEntry) {\n\t\treturn new Text(\"\", 0, 0);\n\t}\n\treturn state.renderExtraEntry(entry);\n}\n\nexport function transcriptCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n\tindex: number,\n): string {\n\treturn cacheKey([\n\t\tstate.transcriptRenderSettingsKey,\n\t\tindex,\n\t\tentry.role,\n\t\trenderIdentityKey(state, entry),\n\t\tentryContentCacheKey(state, entry),\n\t\tstate.entryRevisions.get(entry) ?? 0,\n\t]);\n}\n\nfunction streamingWindowedEntry<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatMessageEntry,\n\tisStreaming: boolean,\n): ChatMessageEntry {\n\tif (!isStreaming || !state.streamingTailWindowEnabled || state.bodyViewport.getScrollFromBottom() !== 0) {\n\t\treturn entry;\n\t}\n\tif (entry.kind !== \"assistant\") return entry;\n\tconst content = entry.message.content.map((item) => {\n\t\tif (item.type === \"text\") return { ...item, text: tailStreamingText(item.text) };\n\t\tif (item.type === \"thinking\") return { ...item, thinking: tailStreamingText(item.thinking) };\n\t\treturn item;\n\t});\n\treturn { ...entry, message: { ...entry.message, content } };\n}\n\nfunction chatMessageRenderOptions<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tisStreaming: boolean,\n): ChatMessageRenderOptions {\n\tconst inherited = state.getChatRenderSettings?.();\n\treturn {\n\t\t...inherited,\n\t\tui: toolTui(state),\n\t\tcwd: state.getCwd?.() ?? state.getAgentSession?.()?.sessionManager.getCwd() ?? process.cwd(),\n\t\tmarkdownTheme: inherited?.markdownTheme ?? state.getMarkdownTheme?.(),\n\t\tisStreaming,\n\t\tshowImages: inherited?.showImages ?? true,\n\t};\n}\n\nfunction entryTui<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatMessageEntry,\n): Pick<TUI, \"requestRender\"> {\n\treturn {\n\t\trequestRender: () => {\n\t\t\tstate.entryRevisions.set(entry, (state.entryRevisions.get(entry) ?? 0) + 1);\n\t\t\tstate.requestRender?.();\n\t\t},\n\t};\n}\n\nfunction toolTui<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n): Pick<TUI, \"requestRender\"> {\n\treturn { requestRender: () => state.requestRender?.() };\n}\n\nfunction chatRenderSettingsCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n): string {\n\tconst inherited = state.getChatRenderSettings?.();\n\tconst markdownTransformersKey =\n\t\tinherited?.markdownTransformers?.map((transformer) => renderIdentityKey(state, transformer)).join(\",\") ?? \"\";\n\treturn cacheKey([\n\t\t\"settings\",\n\t\tinherited?.hideThinkingBlock === true,\n\t\tinherited?.hiddenThinkingLabel ?? \"\",\n\t\tinherited?.toolOutputExpanded === true,\n\t\tinherited?.showImages !== false,\n\t\tinherited?.imageWidthCells ?? null,\n\t\tinherited?.outputPad ?? null,\n\t\tinherited?.renderLatex !== false,\n\t\tmarkdownTransformersKey,\n\t\tstate.getCwd?.() ?? state.getAgentSession?.()?.sessionManager.getCwd() ?? process.cwd(),\n\t\tstate.bodyViewport.getScrollFromBottom() === 0,\n\t\tisChatSessionStreaming(state),\n\t]);\n}\n\nfunction entryContentCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n): string {\n\tif (!isChatMessageEntry(entry)) return cacheKey([\"extra\"]);\n\tswitch (entry.kind) {\n\t\tcase \"task\":\n\t\t\treturn cacheKey([\"task\", renderIdentityKey(state, entry.task), entry.duplicate]);\n\t\tcase \"assistant\":\n\t\t\treturn cacheKey([\"assistant\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"tool\":\n\t\t\treturn cacheKey([\n\t\t\t\t\"tool\",\n\t\t\t\tentry.toolCallId,\n\t\t\t\tentry.toolName,\n\t\t\t\tentry.isPartial === true,\n\t\t\t\tentry.result === undefined ? null : renderIdentityKey(state, entry.result),\n\t\t\t]);\n\t\tcase \"bashExecution\":\n\t\t\treturn cacheKey([\n\t\t\t\t\"bashExecution\",\n\t\t\t\tentry.isPartial === true,\n\t\t\t\tentry.message.command,\n\t\t\t\tentry.message.output,\n\t\t\t\tentry.message.exitCode ?? null,\n\t\t\t\tentry.message.cancelled,\n\t\t\t\tentry.message.truncated,\n\t\t\t\tentry.message.fullOutputPath ?? null,\n\t\t\t]);\n\t\tcase \"user\":\n\t\t\treturn cacheKey([\"user\", entry.text]);\n\t\tcase \"custom\":\n\t\t\treturn cacheKey([\"custom\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"branchSummary\":\n\t\t\treturn cacheKey([\"branchSummary\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"system\":\n\t\t\treturn cacheKey([\"system\", entry.text]);\n\t}\n}\n\nfunction renderIdentityKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tvalue: object,\n): string {\n\tconst existing = state.renderIdentityIds.get(value);\n\tif (existing !== undefined) return String(existing);\n\tconst id = state.nextRenderIdentityId;\n\tstate.nextRenderIdentityId += 1;\n\tstate.renderIdentityIds.set(value, id);\n\treturn String(id);\n}\n\nfunction pendingMessageLine<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tlabel: \"Steering\" | \"Follow-up\" | \"Queued\",\n\tmessage: string,\n): string[] {\n\tconst text = `${label}: ${message}`;\n\treturn new Text(state.style.dim(truncateToWidth(text, Math.max(1, width - 2))), 1, 0).render(width);\n}\n"]}
1
+ {"version":3,"file":"chat-session-host-rendering.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,IAAI,EAAY,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC/G,OAAO,EAGN,sBAAsB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAE1G,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,UAAU,qBAAqB,CACpC,KAAwC,EACxC,KAAa,EACb,MAAc;IAEd,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,KAAK,CAAC,2BAA2B,GAAG,0BAA0B,CAAC,KA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B,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7E,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CACzB,KAAwC,EACxC,KAAa;IAEb,MAAM,QAAQ,GAAG,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;IACpD,MAAM,EAAE,GAAG,KAAK,CAAC,oBAAoB,CAAC;IACtC,KAAK,CAAC,oBAAoB,IAAI,CAAC,CAAC;IAChC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,kBAAkB,CAC1B,KAAwC,EACxC,KAAa,EACb,KAA0C,EAC1C,OAAe;IAEf,MAAM,IAAI,GAAG,GAAG,KAAK,KAAK,OAAO,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrG,CAAC","sourcesContent":["import { type Component, Spacer, Text, type TUI, truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\nimport {\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\trenderChatMessageEntry,\n} from \"./chat-message-renderer.ts\";\nimport { setEditorBorderColor, setEditorFocused, setEditorPlaceholder } from \"./chat-session-host-editor.ts\";\nimport { isChatSessionStreaming } from \"./chat-session-host-runtime.ts\";\nimport type { ChatSessionHostState } from \"./chat-session-host-state.ts\";\nimport type { ChatSessionHostEntry } from \"./chat-session-host-types.ts\";\nimport { cacheKey, isChatMessageEntry, stripAnsi, tailStreamingText } from \"./chat-session-host-utils.ts\";\nimport type { ChatTranscriptEntryLike } from \"./chat-transcript.js\";\nimport { FooterComponent, UsageMeterComponent } from \"./footer.ts\";\nimport { WorkingStatusComponent } from \"./working-status.ts\";\n\nexport function renderChatSessionBody<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tbudget: number,\n): string[] {\n\tconst components: Component[] = [];\n\tstate.transcriptRenderSettingsKey = chatRenderSettingsCacheKey(state);\n\tif (state.transcript.length > 0) {\n\t\tcomponents.push(state.transcriptComponent);\n\t}\n\tif (state.statusMessage && !state.compacting) {\n\t\tcomponents.push(new Spacer(1));\n\t\tcomponents.push(new Text(state.style.dim(state.statusMessage), 2, 0));\n\t}\n\tstate.bodyViewport.setVisibleRows(budget);\n\tstate.bodyViewport.setComponents(components);\n\treturn state.bodyViewport.render(width);\n}\n\nexport function renderChatSessionPendingMessages<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tif (\n\t\tstate.pendingSteeringMessages.length === 0 &&\n\t\tstate.pendingFollowUpMessages.length === 0 &&\n\t\tstate.compactionQueuedMessages.length === 0\n\t) {\n\t\treturn [];\n\t}\n\tconst lines = [state.style.blank(width)];\n\tfor (const message of state.pendingSteeringMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Steering\", message));\n\t}\n\tfor (const message of state.pendingFollowUpMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Follow-up\", message));\n\t}\n\tfor (const message of state.compactionQueuedMessages) {\n\t\tlines.push(...pendingMessageLine(state, width, \"Queued\", message.text));\n\t}\n\tconst hint = state.getActionKeyDisplay?.(\"app.message.dequeue\") ?? \"alt+up\";\n\tlines.push(...new Text(state.style.dim(`↳ ${hint} to edit all queued messages`), 1, 0).render(width));\n\treturn lines;\n}\n\nexport function renderChatSessionWorkingStatus<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tif (!isChatSessionStreaming(state)) return [];\n\tif (state.statusMessage && !state.compacting) return [];\n\tconst palette = state.style.workingIndicatorPalette;\n\tconst useCallerStyling =\n\t\t!palette && state.style.workingIndicatorUseGlobalTheme !== true && process.env.NO_COLOR === undefined;\n\tif (state.compacting) {\n\t\tconst cancelHint = `(${state.getActionKeyDisplay?.(\"app.interrupt\") ?? \"esc\"} Cancel)`;\n\t\treturn new WorkingStatusComponent({\n\t\t\tframe: state.workingFrame,\n\t\t\tmessage: `${state.statusMessage || \"Compacting context...\"} ${cancelHint}`,\n\t\t\tpalette,\n\t\t\tspinnerColor: useCallerStyling ? (text) => state.style.accent(text) : undefined,\n\t\t\tspinnerBoldColor: useCallerStyling ? (text) => state.style.accentBold(text) : undefined,\n\t\t\tmessageColor: (text) => state.style.textMuted(text),\n\t\t}).render(width);\n\t}\n\tif (!state.workingLifecycleActive) return [];\n\treturn new WorkingStatusComponent({\n\t\tframe: state.workingFrame,\n\t\tmessage: state.workingMessage ?? \"Working...\",\n\t\tpalette,\n\t\tspinnerColor: useCallerStyling ? (text) => state.style.accent(text) : undefined,\n\t\tspinnerBoldColor: useCallerStyling ? (text) => state.style.accentBold(text) : undefined,\n\t\tmessageColor: (text) => state.style.textMuted(text),\n\t}).render(width);\n}\n\nexport function renderChatSessionUsage<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n): string[] {\n\tconst session = state.getAgentSession?.() ?? state.getChatBoxSession?.();\n\tif (!session) return [];\n\treturn new UsageMeterComponent(session).render(width);\n}\n\nexport function renderChatSessionEditor<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tfocused: boolean,\n): string[] {\n\tconst disabled = state.isDisabled?.() === true;\n\tconst agentSession = state.getAgentSession?.();\n\tconst ruleHex = state.style.editorRuleColor(disabled, agentSession, {\n\t\tisBashMode: state.isBashMode,\n\t});\n\tif (!disabled && state.editor) {\n\t\tsetEditorFocused(state.editor, focused);\n\t\tsetEditorPlaceholder(state.editor, undefined);\n\t\tsetEditorBorderColor(state.editor, (text) => state.style.rule(ruleHex, text));\n\t\treturn state.editor.render(width);\n\t}\n\tif (state.editor) setEditorFocused(state.editor, false);\n\tconst rule = state.style.rule(ruleHex, \"─\".repeat(width));\n\tconst available = Math.max(1, width - 3);\n\tconst value = state.inputBuffer\n\t\t? state.style.text(truncateToWidth(state.inputBuffer, available)) + state.style.cursor()\n\t\t: disabled\n\t\t\t? \"\"\n\t\t\t: state.style.cursor();\n\tconst left = `${state.style.accentBold(\"❯\")} ${value}`;\n\tconst gap = Math.max(0, width - visibleWidth(stripAnsi(left)));\n\tconst body = left + \" \".repeat(gap);\n\treturn [rule, body, rule];\n}\n\nexport function renderChatSessionFooter<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tnavigationActive = false,\n): string[] {\n\tif (state.disposed) return [];\n\tconst agentSession = state.getAgentSession?.();\n\tconst session = agentSession ?? state.getChatBoxSession?.();\n\t// A chat that does not own its session cannot interrupt it, so its footer never offers \"esc to interrupt\".\n\tstate.footerNavigationActive = navigationActive || agentSession === undefined;\n\tif (session && state.footerData) {\n\t\tstate.footer ??= new FooterComponent(\n\t\t\tsession,\n\t\t\tstate.footerData,\n\t\t\t{\n\t\t\t\tdim: (text) => state.style.dim(text),\n\t\t\t\tmuted: (text) => state.style.textMuted(text),\n\t\t\t\twarning: (text) => state.style.accent(text),\n\t\t\t},\n\t\t\t() => state.footerNavigationActive,\n\t\t\t// A task's session has no task store of its own: its footer counts the tasks the host shows for it.\n\t\t\tagentSession === undefined ? () => state.getTaskSource?.()?.backgroundTasks ?? [] : undefined,\n\t\t);\n\t\tstate.footer.setSession(session);\n\t\treturn state.footer.render(width);\n\t}\n\tstate.footer?.dispose();\n\tstate.footer = undefined;\n\treturn [];\n}\n\nexport function renderChatSessionEntry<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n): Component {\n\tif (state.extraEntries.includes(entry as TExtraEntry)) {\n\t\treturn state.renderExtraEntry?.(entry as TExtraEntry) ?? new Text(\"\", 0, 0);\n\t}\n\tif (isChatMessageEntry(entry)) {\n\t\tconst isStreaming = isChatSessionStreaming(state) && state.liveChat.isStreamingAssistantEntry(entry);\n\t\tconst options = chatMessageRenderOptions(state, isStreaming);\n\t\treturn renderChatMessageEntry(\n\t\t\tstreamingWindowedEntry(state, entry, isStreaming),\n\t\t\tentry.kind === \"tool\" ? { ...options, ui: entryTui(state, entry) } : options,\n\t\t);\n\t}\n\tif (!state.renderExtraEntry) {\n\t\treturn new Text(\"\", 0, 0);\n\t}\n\treturn state.renderExtraEntry(entry);\n}\n\nexport function transcriptCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n\tindex: number,\n): string {\n\treturn cacheKey([\n\t\tstate.transcriptRenderSettingsKey,\n\t\tindex,\n\t\tentry.role,\n\t\trenderIdentityKey(state, entry),\n\t\tentryContentCacheKey(state, entry),\n\t\tstate.entryRevisions.get(entry) ?? 0,\n\t]);\n}\n\nfunction streamingWindowedEntry<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatMessageEntry,\n\tisStreaming: boolean,\n): ChatMessageEntry {\n\tif (!isStreaming || !state.streamingTailWindowEnabled || state.bodyViewport.getScrollFromBottom() !== 0) {\n\t\treturn entry;\n\t}\n\tif (entry.kind !== \"assistant\") return entry;\n\tconst content = entry.message.content.map((item) => {\n\t\tif (item.type === \"text\") return { ...item, text: tailStreamingText(item.text) };\n\t\tif (item.type === \"thinking\") return { ...item, thinking: tailStreamingText(item.thinking) };\n\t\treturn item;\n\t});\n\treturn { ...entry, message: { ...entry.message, content } };\n}\n\nfunction chatMessageRenderOptions<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tisStreaming: boolean,\n): ChatMessageRenderOptions {\n\tconst inherited = state.getChatRenderSettings?.();\n\treturn {\n\t\t...inherited,\n\t\tui: toolTui(state),\n\t\tcwd: state.getCwd?.() ?? state.getAgentSession?.()?.sessionManager.getCwd() ?? process.cwd(),\n\t\tmarkdownTheme: inherited?.markdownTheme ?? state.getMarkdownTheme?.(),\n\t\tisStreaming,\n\t\tshowImages: inherited?.showImages ?? true,\n\t};\n}\n\nfunction entryTui<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatMessageEntry,\n): Pick<TUI, \"requestRender\"> {\n\treturn {\n\t\trequestRender: () => {\n\t\t\tstate.entryRevisions.set(entry, (state.entryRevisions.get(entry) ?? 0) + 1);\n\t\t\tstate.requestRender?.();\n\t\t},\n\t};\n}\n\nfunction toolTui<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n): Pick<TUI, \"requestRender\"> {\n\treturn { requestRender: () => state.requestRender?.() };\n}\n\nfunction chatRenderSettingsCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n): string {\n\tconst inherited = state.getChatRenderSettings?.();\n\tconst markdownTransformersKey =\n\t\tinherited?.markdownTransformers?.map((transformer) => renderIdentityKey(state, transformer)).join(\",\") ?? \"\";\n\treturn cacheKey([\n\t\t\"settings\",\n\t\tinherited?.hideThinkingBlock === true,\n\t\tinherited?.hiddenThinkingLabel ?? \"\",\n\t\tinherited?.toolOutputExpanded === true,\n\t\tinherited?.showImages !== false,\n\t\tinherited?.imageWidthCells ?? null,\n\t\tinherited?.outputPad ?? null,\n\t\tinherited?.renderLatex !== false,\n\t\tmarkdownTransformersKey,\n\t\tstate.getCwd?.() ?? state.getAgentSession?.()?.sessionManager.getCwd() ?? process.cwd(),\n\t\tstate.bodyViewport.getScrollFromBottom() === 0,\n\t\tisChatSessionStreaming(state),\n\t]);\n}\n\nfunction entryContentCacheKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tentry: ChatSessionHostEntry<TExtraEntry>,\n): string {\n\tif (!isChatMessageEntry(entry)) return cacheKey([\"extra\"]);\n\tswitch (entry.kind) {\n\t\tcase \"task\":\n\t\t\treturn cacheKey([\"task\", renderIdentityKey(state, entry.task), entry.duplicate]);\n\t\tcase \"assistant\":\n\t\t\treturn cacheKey([\"assistant\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"tool\":\n\t\t\treturn cacheKey([\n\t\t\t\t\"tool\",\n\t\t\t\tentry.toolCallId,\n\t\t\t\tentry.toolName,\n\t\t\t\tentry.isPartial === true,\n\t\t\t\tentry.result === undefined ? null : renderIdentityKey(state, entry.result),\n\t\t\t]);\n\t\tcase \"bashExecution\":\n\t\t\treturn cacheKey([\n\t\t\t\t\"bashExecution\",\n\t\t\t\tentry.isPartial === true,\n\t\t\t\tentry.message.command,\n\t\t\t\tentry.message.output,\n\t\t\t\tentry.message.exitCode ?? null,\n\t\t\t\tentry.message.cancelled,\n\t\t\t\tentry.message.truncated,\n\t\t\t\tentry.message.fullOutputPath ?? null,\n\t\t\t]);\n\t\tcase \"user\":\n\t\t\treturn cacheKey([\"user\", entry.text]);\n\t\tcase \"custom\":\n\t\t\treturn cacheKey([\"custom\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"branchSummary\":\n\t\t\treturn cacheKey([\"branchSummary\", renderIdentityKey(state, entry.message)]);\n\t\tcase \"system\":\n\t\t\treturn cacheKey([\"system\", entry.text]);\n\t}\n}\n\nfunction renderIdentityKey<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\tvalue: object,\n): string {\n\tconst existing = state.renderIdentityIds.get(value);\n\tif (existing !== undefined) return String(existing);\n\tconst id = state.nextRenderIdentityId;\n\tstate.nextRenderIdentityId += 1;\n\tstate.renderIdentityIds.set(value, id);\n\treturn String(id);\n}\n\nfunction pendingMessageLine<TExtraEntry extends ChatTranscriptEntryLike>(\n\tstate: ChatSessionHostState<TExtraEntry>,\n\twidth: number,\n\tlabel: \"Steering\" | \"Follow-up\" | \"Queued\",\n\tmessage: string,\n): string[] {\n\tconst text = `${label}: ${message}`;\n\treturn new Text(state.style.dim(truncateToWidth(text, Math.max(1, width - 2))), 1, 0).render(width);\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import type { Component, EditorComponent, MarkdownTheme, TUI } from "@earendil-works/pi-tui";
2
2
  import type { AgentSession } from "../../../core/agent-session.js";
3
3
  import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.ts";
4
+ import type { ChatBoxSession } from "../../../core/tasks/supervisor.js";
4
5
  import type { TaskViewSource } from "../../../core/tasks/task-view-source.js";
5
6
  import { LiveChatEntriesController } from "./chat-message-renderer.ts";
6
7
  import type { ChatSessionHostCommands, ChatSessionHostEntry, ChatSessionHostOpts, ChatSessionHostStyle, ChatSessionSubmitMode } from "./chat-session-host-types.ts";
@@ -15,6 +16,7 @@ export declare class ChatSessionHostState<TExtraEntry extends ChatTranscriptEntr
15
16
  readonly commands: ChatSessionHostCommands;
16
17
  readonly requestRender: (() => void) | undefined;
17
18
  readonly getAgentSession: (() => AgentSession | undefined) | undefined;
19
+ readonly getChatBoxSession: (() => ChatBoxSession | undefined) | undefined;
18
20
  readonly getSessionMessages: (() => AgentSession["messages"] | undefined) | undefined;
19
21
  readonly getTaskSource: (() => TaskViewSource | undefined) | undefined;
20
22
  readonly isStreamingOverride: (() => boolean) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-host-state.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAE9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EACX,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,2BAA2B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,WAAW,6BAA6B,CAAC,WAAW,SAAS,uBAAuB;IACzF,WAAW,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC;IAC/G,kBAAkB,EAAE,CACnB,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,EACxC,KAAK,EAAE,MAAM,KACT,MAAM,CAAC;CACZ;AAED,qBAAa,oBAAoB,CAAC,WAAW,SAAS,uBAAuB,GAAG,KAAK;IACpF,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,QAAQ,CAAC,aAAa,EAAE,CAAC,MAA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,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,GAAG,SAAS,CAAC;IAC3D,mBAAmB,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CAAC;IAC/D,YAAY,EAAE,2BAA2B,CAAC;IAC1C,mBAAmB,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC;IAChF,2BAA2B,SAAM;IACjC,iBAAiB,0BAAiC;IAClD,oHAAoH;IACpH,cAAc,0BAAiC;IAC/C,oBAAoB,SAAK;IACzB,QAAQ,EAAE,yBAAyB,CAAC;IACpC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;IACpC,6BAA6B,sBAA6B;IAC1D;;;;;;OAMG;IACH,0BAA0B,UAAQ;IAElC,YAAY,IAAI,EAAE,mBAAmB,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,6BAA6B,CAAC,WAAW,CAAC,EAuCxG;CACD"}
1
+ {"version":3,"file":"chat-session-host-state.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAE9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EACX,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,2BAA2B,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AS,EAAE,6BAA6B,CAAC,WAAW,CAAC,EAwCxG;CACD"}
@@ -8,6 +8,7 @@ export class ChatSessionHostState {
8
8
  commands;
9
9
  requestRender;
10
10
  getAgentSession;
11
+ getChatBoxSession;
11
12
  getSessionMessages;
12
13
  getTaskSource;
13
14
  isStreamingOverride;
@@ -91,6 +92,7 @@ export class ChatSessionHostState {
91
92
  });
92
93
  this.requestRender = opts.requestRender;
93
94
  this.getAgentSession = opts.getAgentSession;
95
+ this.getChatBoxSession = opts.getChatBoxSession;
94
96
  this.getSessionMessages = opts.getSessionMessages;
95
97
  this.getTaskSource = opts.getTaskSource;
96
98
  this.isStreamingOverride = opts.isStreaming;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-host-state.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-state.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAQvE,OAAO,EACN,uBAAuB,EAEvB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAW7E,MAAM,OAAO,oBAAoB;IACvB,KAAK,CAAuB;IAC5B,QAAQ,CAA0B;IAClC,aAAa,CAA2B;IACxC,eAAe,CAA+C;IAC9D,kBAAkB,CAA2D;IAC7E,aAAa,CAAiD;IAC9D,mBAAmB,CAA8B;IACjD,QAAQ,CAA8B;IACtC,UAAU,CAA8B;IACxC,qBAAqB,CAA8B;IACnD,WAAW,CAA0C;IACrD,UAAU,CAA0C;IACpD,OAAO,CAAyD;IAChE,mBAAmB,CAA2C;IAC9D,gBAAgB,CAAoC;IACpD,qBAAqB,CAA4D;IACjF,MAAM,CAA6B;IACnC,UAAU,CAAyC;IACnD,gBAAgB,CAAkD;IAClE,GA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EAAE,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7D,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import type { Component, EditorComponent, MarkdownTheme, TUI } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../../core/agent-session.js\";\nimport type { ReadonlyFooterDataProvider } from \"../../../core/footer-data-provider.ts\";\nimport type { TaskViewSource } from \"../../../core/tasks/task-view-source.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { LiveChatEntriesController } from \"./chat-message-renderer.ts\";\nimport type {\n\tChatSessionHostCommands,\n\tChatSessionHostEntry,\n\tChatSessionHostOpts,\n\tChatSessionHostStyle,\n\tChatSessionSubmitMode,\n} from \"./chat-session-host-types.ts\";\nimport {\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\tScrollableComponentViewport,\n} from \"./chat-transcript.js\";\nimport type { FooterComponent } from \"./footer.ts\";\nimport { keyText } from \"./keybinding-hints.js\";\nimport { TranscriptFollowIndicator } from \"./transcript-follow-indicator.ts\";\n\nexport interface ChatSessionHostStateCallbacks<TExtraEntry extends ChatTranscriptEntryLike> {\n\trenderEntry: (state: ChatSessionHostState<TExtraEntry>, entry: ChatSessionHostEntry<TExtraEntry>) => Component;\n\ttranscriptCacheKey: (\n\t\tstate: ChatSessionHostState<TExtraEntry>,\n\t\tentry: ChatSessionHostEntry<TExtraEntry>,\n\t\tindex: number,\n\t) => string;\n}\n\nexport class ChatSessionHostState<TExtraEntry extends ChatTranscriptEntryLike = never> {\n\treadonly style: ChatSessionHostStyle;\n\treadonly commands: ChatSessionHostCommands;\n\treadonly requestRender: (() => void) | undefined;\n\treadonly getAgentSession: (() => AgentSession | undefined) | undefined;\n\treadonly getSessionMessages: (() => AgentSession[\"messages\"] | undefined) | undefined;\n\treadonly getTaskSource: (() => TaskViewSource | undefined) | undefined;\n\treadonly isStreamingOverride: (() => boolean) | undefined;\n\treadonly isPaused: (() => boolean) | undefined;\n\treadonly isDisabled: (() => boolean) | undefined;\n\treadonly isBashRunningOverride: (() => boolean) | undefined;\n\treadonly showWarning: ((message: string) => void) | undefined;\n\treadonly showStatus: ((message: string) => void) | undefined;\n\treadonly actions: Record<string, () => void | Promise<void>> | undefined;\n\treadonly getActionKeyDisplay: ((action: string) => string) | undefined;\n\treadonly getMarkdownTheme: (() => MarkdownTheme) | undefined;\n\treadonly getChatRenderSettings: ChatSessionHostOpts<TExtraEntry>[\"getChatRenderSettings\"];\n\treadonly getCwd: (() => string) | undefined;\n\treadonly footerData: ReadonlyFooterDataProvider | undefined;\n\treadonly renderExtraEntry: ((entry: TExtraEntry) => Component) | undefined;\n\treadonly tui: TUI | undefined;\n\n\tfooter: FooterComponent | undefined;\n\tfooterNavigationActive = false;\n\tinputBuffer = \"\";\n\ttranscript: ChatSessionHostEntry<TExtraEntry>[] = [];\n\textraEntries: TExtraEntry[] = [];\n\tstatusMessage = \"\";\n\t/** Explicit diagnostics survive busy-state cleanup, but are not restored after later input. */\n\tlastWarningMessage: string | undefined;\n\tisBashMode = false;\n\tlocalBashRunning = false;\n\tsdkBusy = false;\n\t/** Escape interrupt plus asynchronous workflow pause acknowledgement. */\n\tinterruptSettlement: Promise<void> | undefined;\n\t/** Recorded pause failure consumed by the first submit after settlement. */\n\tinterruptFailureMessage: string | undefined;\n\tworkingMessage: string | undefined;\n\tworkingFrame = 0;\n\tworkingLifecycleActive: boolean;\n\tworkingLifecycleGeneration = 0;\n\timmediateEventRenderPending = false;\n\tdisposed = false;\n\tpendingSteeringMessages: readonly string[] = [];\n\tpendingFollowUpMessages: readonly string[] = [];\n\tcompactionQueuedMessages: readonly { text: string; mode: ChatSessionSubmitMode }[] = [];\n\t/** True while compaction-queued messages are being sent one at a time. */\n\tcompactionFlushPending = false;\n\t/** Resolves the pending compaction-queue prompt when its run starts. */\n\tcompactionPromptStarted: (() => void) | undefined;\n\tcompacting = false;\n\t/** Keeps input queued while automatic compaction hands off to a manual request. */\n\tmanualCompactionTakeoverPending = false;\n\tanimationTimer: ReturnType<typeof setInterval> | undefined;\n\trenderThrottleTimer: ReturnType<typeof setTimeout> | undefined;\n\tbodyViewport: ScrollableComponentViewport;\n\ttranscriptComponent: ChatTranscriptComponent<ChatSessionHostEntry<TExtraEntry>>;\n\ttranscriptRenderSettingsKey = \"\";\n\trenderIdentityIds = new WeakMap<object, number>();\n\t/** Bumped when a rendered entry redraws itself (a tool renderer's `invalidate`), so its cached rows are rebuilt. */\n\tentryRevisions = new WeakMap<object, number>();\n\tnextRenderIdentityId = 1;\n\tliveChat: LiveChatEntriesController;\n\teditor: EditorComponent | undefined;\n\toptimisticUserSignatureCounts = new Map<string, number>();\n\t/**\n\t * Whether an assistant entry still streaming into a sticky-bottom body is\n\t * rendered as its tail alone.\n\t *\n\t * On by default: while the reader is following a live stream, the rows far\n\t * above the cursor cost layout work nobody is reading.\n\t */\n\tstreamingTailWindowEnabled = true;\n\n\tconstructor(opts: ChatSessionHostOpts<TExtraEntry>, callbacks: ChatSessionHostStateCallbacks<TExtraEntry>) {\n\t\tthis.style = opts.style;\n\t\tthis.commands = opts.commands ?? {};\n\t\tthis.bodyViewport = new ScrollableComponentViewport(opts.keybindings, {\n\t\t\twheelScrollLines: () => this.getChatRenderSettings?.()?.fullscreenWheelScrollLines,\n\t\t\tscrollbar: () => this.getChatRenderSettings?.()?.fullscreenScrollbar,\n\t\t\tscrollbarThumbStyle: (text) => theme.bg(\"scrollbarThumb\", text),\n\t\t\tfollowIndicator: new TranscriptFollowIndicator({\n\t\t\t\tisFollowing: () => false,\n\t\t\t\tkeyLabel: () => followIndicatorKeyLabel(opts.keybindings),\n\t\t\t}),\n\t\t\trequestRender: () => this.requestRender?.(),\n\t\t\tonNearTop: () => opts.onNearTop?.(),\n\t\t});\n\t\tthis.requestRender = opts.requestRender;\n\t\tthis.getAgentSession = opts.getAgentSession;\n\t\tthis.getSessionMessages = opts.getSessionMessages;\n\t\tthis.getTaskSource = opts.getTaskSource;\n\t\tthis.isStreamingOverride = opts.isStreaming;\n\t\tthis.workingLifecycleActive = opts.isStreaming?.() === true;\n\t\tthis.isPaused = opts.isPaused;\n\t\tthis.isDisabled = opts.isDisabled;\n\t\tthis.isBashRunningOverride = opts.isBashRunning;\n\t\tthis.showWarning = opts.showWarning;\n\t\tthis.showStatus = opts.showStatus;\n\t\tthis.actions = opts.actions;\n\t\tthis.getActionKeyDisplay = opts.getActionKeyDisplay;\n\t\tthis.getMarkdownTheme = opts.getMarkdownTheme;\n\t\tthis.getChatRenderSettings = opts.getChatRenderSettings;\n\t\tthis.getCwd = opts.getCwd;\n\t\tthis.footerData = opts.footerData;\n\t\tthis.renderExtraEntry = opts.renderExtraEntry;\n\t\tthis.tui = opts.tui;\n\t\tthis.liveChat = new LiveChatEntriesController(this.transcript);\n\t\tthis.transcriptComponent = new ChatTranscriptComponent(\n\t\t\tthis.transcript,\n\t\t\t(entry) => callbacks.renderEntry(this, entry),\n\t\t\t(entry, index) => callbacks.transcriptCacheKey(this, entry, index),\n\t\t);\n\t}\n}\n\n/** The jump-to-latest label names the host's own `tui.altScreen.bottom` keys, falling back to the global ones. */\nfunction followIndicatorKeyLabel(keybindings: unknown): string {\n\tconst getKeys = (keybindings as { getKeys?: (action: \"tui.altScreen.bottom\") => readonly string[] } | undefined)\n\t\t?.getKeys;\n\treturn typeof getKeys === \"function\"\n\t\t? getKeys.call(keybindings, \"tui.altScreen.bottom\").join(\"/\")\n\t\t: keyText(\"tui.altScreen.bottom\");\n}\n"]}
1
+ {"version":3,"file":"chat-session-host-state.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-state.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAQvE,OAAO,EACN,uBAAuB,EAEvB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAA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G,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/D,IAAI,CAAC,mBAAmB,GAAG,IAAI,uBAAuB,CACrD,IAAI,CAAC,UAAU,EACf,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,EAC7C,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAClE,CAAC;IACH,CAAC;CACD;AAED,kHAAkH;AAClH,SAAS,uBAAuB,CAAC,WAAoB;IACpD,MAAM,OAAO,GAAI,WAA+F;QAC/G,EAAE,OAAO,CAAC;IACX,OAAO,OAAO,OAAO,KAAK,UAAU;QACnC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7D,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import type { Component, EditorComponent, MarkdownTheme, TUI } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../../core/agent-session.js\";\nimport type { ReadonlyFooterDataProvider } from \"../../../core/footer-data-provider.ts\";\nimport type { ChatBoxSession } from \"../../../core/tasks/supervisor.js\";\nimport type { TaskViewSource } from \"../../../core/tasks/task-view-source.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { LiveChatEntriesController } from \"./chat-message-renderer.ts\";\nimport type {\n\tChatSessionHostCommands,\n\tChatSessionHostEntry,\n\tChatSessionHostOpts,\n\tChatSessionHostStyle,\n\tChatSessionSubmitMode,\n} from \"./chat-session-host-types.ts\";\nimport {\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\tScrollableComponentViewport,\n} from \"./chat-transcript.js\";\nimport type { FooterComponent } from \"./footer.ts\";\nimport { keyText } from \"./keybinding-hints.js\";\nimport { TranscriptFollowIndicator } from \"./transcript-follow-indicator.ts\";\n\nexport interface ChatSessionHostStateCallbacks<TExtraEntry extends ChatTranscriptEntryLike> {\n\trenderEntry: (state: ChatSessionHostState<TExtraEntry>, entry: ChatSessionHostEntry<TExtraEntry>) => Component;\n\ttranscriptCacheKey: (\n\t\tstate: ChatSessionHostState<TExtraEntry>,\n\t\tentry: ChatSessionHostEntry<TExtraEntry>,\n\t\tindex: number,\n\t) => string;\n}\n\nexport class ChatSessionHostState<TExtraEntry extends ChatTranscriptEntryLike = never> {\n\treadonly style: ChatSessionHostStyle;\n\treadonly commands: ChatSessionHostCommands;\n\treadonly requestRender: (() => void) | undefined;\n\treadonly getAgentSession: (() => AgentSession | undefined) | undefined;\n\treadonly getChatBoxSession: (() => ChatBoxSession | undefined) | undefined;\n\treadonly getSessionMessages: (() => AgentSession[\"messages\"] | undefined) | undefined;\n\treadonly getTaskSource: (() => TaskViewSource | undefined) | undefined;\n\treadonly isStreamingOverride: (() => boolean) | undefined;\n\treadonly isPaused: (() => boolean) | undefined;\n\treadonly isDisabled: (() => boolean) | undefined;\n\treadonly isBashRunningOverride: (() => boolean) | undefined;\n\treadonly showWarning: ((message: string) => void) | undefined;\n\treadonly showStatus: ((message: string) => void) | undefined;\n\treadonly actions: Record<string, () => void | Promise<void>> | undefined;\n\treadonly getActionKeyDisplay: ((action: string) => string) | undefined;\n\treadonly getMarkdownTheme: (() => MarkdownTheme) | undefined;\n\treadonly getChatRenderSettings: ChatSessionHostOpts<TExtraEntry>[\"getChatRenderSettings\"];\n\treadonly getCwd: (() => string) | undefined;\n\treadonly footerData: ReadonlyFooterDataProvider | undefined;\n\treadonly renderExtraEntry: ((entry: TExtraEntry) => Component) | undefined;\n\treadonly tui: TUI | undefined;\n\n\tfooter: FooterComponent | undefined;\n\tfooterNavigationActive = false;\n\tinputBuffer = \"\";\n\ttranscript: ChatSessionHostEntry<TExtraEntry>[] = [];\n\textraEntries: TExtraEntry[] = [];\n\tstatusMessage = \"\";\n\t/** Explicit diagnostics survive busy-state cleanup, but are not restored after later input. */\n\tlastWarningMessage: string | undefined;\n\tisBashMode = false;\n\tlocalBashRunning = false;\n\tsdkBusy = false;\n\t/** Escape interrupt plus asynchronous workflow pause acknowledgement. */\n\tinterruptSettlement: Promise<void> | undefined;\n\t/** Recorded pause failure consumed by the first submit after settlement. */\n\tinterruptFailureMessage: string | undefined;\n\tworkingMessage: string | undefined;\n\tworkingFrame = 0;\n\tworkingLifecycleActive: boolean;\n\tworkingLifecycleGeneration = 0;\n\timmediateEventRenderPending = false;\n\tdisposed = false;\n\tpendingSteeringMessages: readonly string[] = [];\n\tpendingFollowUpMessages: readonly string[] = [];\n\tcompactionQueuedMessages: readonly { text: string; mode: ChatSessionSubmitMode }[] = [];\n\t/** True while compaction-queued messages are being sent one at a time. */\n\tcompactionFlushPending = false;\n\t/** Resolves the pending compaction-queue prompt when its run starts. */\n\tcompactionPromptStarted: (() => void) | undefined;\n\tcompacting = false;\n\t/** Keeps input queued while automatic compaction hands off to a manual request. */\n\tmanualCompactionTakeoverPending = false;\n\tanimationTimer: ReturnType<typeof setInterval> | undefined;\n\trenderThrottleTimer: ReturnType<typeof setTimeout> | undefined;\n\tbodyViewport: ScrollableComponentViewport;\n\ttranscriptComponent: ChatTranscriptComponent<ChatSessionHostEntry<TExtraEntry>>;\n\ttranscriptRenderSettingsKey = \"\";\n\trenderIdentityIds = new WeakMap<object, number>();\n\t/** Bumped when a rendered entry redraws itself (a tool renderer's `invalidate`), so its cached rows are rebuilt. */\n\tentryRevisions = new WeakMap<object, number>();\n\tnextRenderIdentityId = 1;\n\tliveChat: LiveChatEntriesController;\n\teditor: EditorComponent | undefined;\n\toptimisticUserSignatureCounts = new Map<string, number>();\n\t/**\n\t * Whether an assistant entry still streaming into a sticky-bottom body is\n\t * rendered as its tail alone.\n\t *\n\t * On by default: while the reader is following a live stream, the rows far\n\t * above the cursor cost layout work nobody is reading.\n\t */\n\tstreamingTailWindowEnabled = true;\n\n\tconstructor(opts: ChatSessionHostOpts<TExtraEntry>, callbacks: ChatSessionHostStateCallbacks<TExtraEntry>) {\n\t\tthis.style = opts.style;\n\t\tthis.commands = opts.commands ?? {};\n\t\tthis.bodyViewport = new ScrollableComponentViewport(opts.keybindings, {\n\t\t\twheelScrollLines: () => this.getChatRenderSettings?.()?.fullscreenWheelScrollLines,\n\t\t\tscrollbar: () => this.getChatRenderSettings?.()?.fullscreenScrollbar,\n\t\t\tscrollbarThumbStyle: (text) => theme.bg(\"scrollbarThumb\", text),\n\t\t\tfollowIndicator: new TranscriptFollowIndicator({\n\t\t\t\tisFollowing: () => false,\n\t\t\t\tkeyLabel: () => followIndicatorKeyLabel(opts.keybindings),\n\t\t\t}),\n\t\t\trequestRender: () => this.requestRender?.(),\n\t\t\tonNearTop: () => opts.onNearTop?.(),\n\t\t});\n\t\tthis.requestRender = opts.requestRender;\n\t\tthis.getAgentSession = opts.getAgentSession;\n\t\tthis.getChatBoxSession = opts.getChatBoxSession;\n\t\tthis.getSessionMessages = opts.getSessionMessages;\n\t\tthis.getTaskSource = opts.getTaskSource;\n\t\tthis.isStreamingOverride = opts.isStreaming;\n\t\tthis.workingLifecycleActive = opts.isStreaming?.() === true;\n\t\tthis.isPaused = opts.isPaused;\n\t\tthis.isDisabled = opts.isDisabled;\n\t\tthis.isBashRunningOverride = opts.isBashRunning;\n\t\tthis.showWarning = opts.showWarning;\n\t\tthis.showStatus = opts.showStatus;\n\t\tthis.actions = opts.actions;\n\t\tthis.getActionKeyDisplay = opts.getActionKeyDisplay;\n\t\tthis.getMarkdownTheme = opts.getMarkdownTheme;\n\t\tthis.getChatRenderSettings = opts.getChatRenderSettings;\n\t\tthis.getCwd = opts.getCwd;\n\t\tthis.footerData = opts.footerData;\n\t\tthis.renderExtraEntry = opts.renderExtraEntry;\n\t\tthis.tui = opts.tui;\n\t\tthis.liveChat = new LiveChatEntriesController(this.transcript);\n\t\tthis.transcriptComponent = new ChatTranscriptComponent(\n\t\t\tthis.transcript,\n\t\t\t(entry) => callbacks.renderEntry(this, entry),\n\t\t\t(entry, index) => callbacks.transcriptCacheKey(this, entry, index),\n\t\t);\n\t}\n}\n\n/** The jump-to-latest label names the host's own `tui.altScreen.bottom` keys, falling back to the global ones. */\nfunction followIndicatorKeyLabel(keybindings: unknown): string {\n\tconst getKeys = (keybindings as { getKeys?: (action: \"tui.altScreen.bottom\") => readonly string[] } | undefined)\n\t\t?.getKeys;\n\treturn typeof getKeys === \"function\"\n\t\t? getKeys.call(keybindings, \"tui.altScreen.bottom\").join(\"/\")\n\t\t: keyText(\"tui.altScreen.bottom\");\n}\n"]}
@@ -2,6 +2,7 @@ import type { Component, EditorComponent, EditorTheme, MarkdownTheme, ScrollView
2
2
  import type { AgentSession } from "../../../core/agent-session.js";
3
3
  import type { BashResult } from "../../../core/bash-executor.ts";
4
4
  import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.ts";
5
+ import type { ChatBoxSession } from "../../../core/tasks/supervisor.js";
5
6
  import type { TaskViewSource } from "../../../core/tasks/task-view-source.js";
6
7
  import type { ChatMessageEntry, ChatMessageRenderOptions } from "./chat-message-renderer.ts";
7
8
  import type { ChatTranscriptEntryLike } from "./chat-transcript.js";
@@ -72,6 +73,11 @@ export interface ChatSessionHostOpts<TExtraEntry extends ChatTranscriptEntryLike
72
73
  commands?: ChatSessionHostCommands;
73
74
  requestRender?: () => void;
74
75
  getAgentSession?: () => AgentSession | undefined;
76
+ /**
77
+ * The usage meter's and footer's session when `getAgentSession` has none: a task's live session, which the chat
78
+ * shows without owning it. It never makes the chat the session's host (no task owner, interrupt or compaction).
79
+ */
80
+ getChatBoxSession?: () => ChatBoxSession | undefined;
75
81
  /**
76
82
  * The session's messages when `getAgentSession` has no session in this process, such as a workflow
77
83
  * stage on a local worker: a compaction redraws the transcript from them.
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session-host-types.d.ts","sourceRoot":"","sources":["../../../../src/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AAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,gBAAgB,CAAC,EAAE,MAAM,aAAa,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,KAAK,eAAe,CAAC;IACxF,oBAAoB,CAAC,EAAE,OAAO,wBAAwB,EAAE,oBAAoB,CAAC;IAC7E,WAAW,EAAE,WAAW,CAAC;IACzB,qBAAqB,CAAC,EAAE,MACrB,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC,GAAG,2BAA2B,CAAC,GACrF,SAAS,CAAC;IACb,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC;CACrD;AAED,MAAM,MAAM,oBAAoB,CAAC,WAAW,SAAS,uBAAuB,GAAG,KAAK,IAAI,gBAAgB,GAAG,WAAW,CAAC;AAEvH,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"chat-session-host-types.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-session-host-types.ts"],"names":[],"mappings":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