@kortix/ui 0.15.0 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/_vendor/kortix-shared.js +233 -130
  2. package/dist/_vendor/shared/code-language.d.ts +2 -2
  3. package/dist/_vendor/shared/html.d.ts +7 -0
  4. package/dist/_vendor/shared/index.d.ts +1 -2
  5. package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
  6. package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
  7. package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
  8. package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
  9. package/dist/_vendor/shared/utils/string.d.ts +6 -0
  10. package/dist/artifacts/artifact-frame.d.ts +0 -1
  11. package/dist/artifacts/artifact-frame.js +4 -10
  12. package/dist/artifacts/artifact-session.js +4 -7
  13. package/dist/artifacts/frame-policy.d.ts +1 -1
  14. package/dist/artifacts/frame-policy.js +2 -2
  15. package/dist/customize/agents/agent-page.js +5 -5
  16. package/dist/customize/agents/agent-status.js +1 -1
  17. package/dist/customize/agents/agents-page.js +3 -3
  18. package/dist/customize/connectors/use-agent-access.d.ts +3 -3
  19. package/dist/customize/sections/connectors-view.js +50 -37
  20. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
  21. package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
  22. package/dist/customize/sections/llm-provider/device-grant.js +27 -0
  23. package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
  24. package/dist/customize/sections/view/agent-editor.d.ts +2 -2
  25. package/dist/customize/sections/view/agent-editor.js +2 -2
  26. package/dist/customize/sections/view/review-center-connected.js +37 -6
  27. package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
  28. package/dist/customize/sections/view/secret-delivery.js +5 -4
  29. package/dist/customize/triggers/schedule/trigger-list.d.ts +2 -2
  30. package/dist/customize/triggers/schedule/trigger-list.js +12 -18
  31. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
  32. package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
  33. package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
  34. package/dist/files/project/api/runtime-files.d.ts +2 -2
  35. package/dist/files/project/api/runtime-files.js +2 -2
  36. package/dist/files/project/components/drive-explorer.js +1 -1
  37. package/dist/files/project/components/drive-grid-view.js +0 -1
  38. package/dist/files/project/components/drive-list-view.js +0 -1
  39. package/dist/files/project/components/file-explorer-page.js +1 -1
  40. package/dist/files/project/hooks/index.d.ts +1 -1
  41. package/dist/files/project/hooks/index.js +1 -1
  42. package/dist/files/project/hooks/use-server-health.d.ts +1 -1
  43. package/dist/files/project/hooks/use-server-health.js +1 -1
  44. package/dist/files/project/search/workspace-search-service.d.ts +1 -1
  45. package/dist/files/project/search/workspace-search-service.js +1 -1
  46. package/dist/files/runtime/hooks/index.d.ts +1 -1
  47. package/dist/files/runtime/hooks/index.js +1 -1
  48. package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
  49. package/dist/files/runtime/hooks/server-health-state.js +2 -2
  50. package/dist/files/runtime/hooks/system-dir.js +2 -2
  51. package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
  52. package/dist/files/runtime/hooks/use-file-content.js +1 -1
  53. package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
  54. package/dist/files/runtime/hooks/use-file-list.js +3 -3
  55. package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
  56. package/dist/files/runtime/hooks/use-server-health.js +3 -3
  57. package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
  58. package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
  59. package/dist/files/runtime/index.d.ts +2 -2
  60. package/dist/files/runtime/index.js +2 -2
  61. package/dist/files/runtime/path-utils.d.ts +1 -1
  62. package/dist/files/runtime/path-utils.js +1 -1
  63. package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
  64. package/dist/files/runtime/sandbox-explorer-source.js +1 -1
  65. package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
  66. package/dist/files/runtime/sandbox-file-explorer.js +2 -2
  67. package/dist/files/tree/components/file-tree-item.js +0 -1
  68. package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
  69. package/dist/files/tree/hooks/use-file-events.js +1 -1
  70. package/dist/i18n/en.d.ts +60 -175
  71. package/dist/i18n/en.js +71 -186
  72. package/dist/internal/components/agent-mark.js +6 -0
  73. package/dist/internal/components/clickable-path.d.ts +3 -0
  74. package/dist/internal/components/clickable-path.js +4 -1
  75. package/dist/internal/files/file-read-retry.js +1 -1
  76. package/dist/internal/files/types.d.ts +2 -2
  77. package/dist/internal/files/types.js +2 -2
  78. package/dist/internal/goals/goal-meta.d.ts +33 -14
  79. package/dist/internal/goals/goal-meta.js +55 -13
  80. package/dist/internal/layout/nav-hover-card.d.ts +1 -1
  81. package/dist/internal/layout/nav-hover-card.js +1 -1
  82. package/dist/internal/layout/project-capability-nav.d.ts +1 -1
  83. package/dist/internal/layout/project-capability-nav.js +1 -1
  84. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  85. package/dist/internal/lib/browser-error-noise.js +1 -1
  86. package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
  87. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +29 -0
  88. package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
  89. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  90. package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
  91. package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
  92. package/dist/internal/lib/delivered-but-disconnected.js +3 -5
  93. package/dist/internal/lib/error-handler.js +8 -3
  94. package/dist/internal/lib/pixel-mark.d.ts +4 -17
  95. package/dist/internal/lib/pixel-mark.js +5 -148
  96. package/dist/internal/lib/sounds.d.ts +4 -4
  97. package/dist/internal/lib/sounds.js +4 -4
  98. package/dist/internal/lib/trigger-clock.d.ts +5 -0
  99. package/dist/internal/lib/trigger-clock.js +15 -0
  100. package/dist/internal/lib/turn-broadcast.d.ts +0 -3
  101. package/dist/internal/lib/use-project-feature-flags.d.ts +2 -0
  102. package/dist/internal/lib/use-project-feature-flags.js +5 -5
  103. package/dist/internal/lib/web-notifications.d.ts +1 -8
  104. package/dist/internal/lib/web-notifications.js +12 -53
  105. package/dist/internal/notifications/notification-bell.d.ts +13 -33
  106. package/dist/internal/notifications/notification-bell.js +14 -117
  107. package/dist/internal/notifications/notification-inbox.d.ts +45 -0
  108. package/dist/internal/notifications/notification-inbox.js +119 -0
  109. package/dist/internal/notifications/notification-rows.d.ts +3 -4
  110. package/dist/internal/notifications/notification-rows.js +1 -4
  111. package/dist/internal/notifications/use-inbox-summary.d.ts +13 -0
  112. package/dist/internal/notifications/use-inbox-summary.js +22 -0
  113. package/dist/internal/notifications/web-push.d.ts +9 -10
  114. package/dist/internal/notifications/web-push.js +9 -10
  115. package/dist/internal/stores/composer-prefill-store.js +4 -1
  116. package/dist/internal/stores/sound-store.d.ts +4 -4
  117. package/dist/internal/stores/sound-store.js +10 -0
  118. package/dist/internal/stores/web-notification-store.d.ts +6 -9
  119. package/dist/internal/stores/web-notification-store.js +0 -4
  120. package/dist/lib/routes.d.ts +8 -0
  121. package/dist/lib/routes.js +4 -1
  122. package/dist/markdown/code/shiki-highlighter.js +14 -5
  123. package/dist/markdown/doc-editor/doc-menus.d.ts +1 -10
  124. package/dist/markdown/doc-editor/doc-menus.js +6 -69
  125. package/dist/markdown/file-links.js +33 -3
  126. package/dist/markdown/markdown-frontmatter.d.ts +6 -6
  127. package/dist/markdown/markdown-frontmatter.js +3 -3
  128. package/dist/primitives/button.d.ts +1 -1
  129. package/dist/primitives/button.js +2 -1
  130. package/dist/session/agents/held-messages.d.ts +1 -5
  131. package/dist/session/agents/held-messages.js +1 -21
  132. package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
  133. package/dist/session/composer/ComposerAboveCard.js +2 -2
  134. package/dist/session/composer/composer-chat-input.d.ts +1 -1
  135. package/dist/session/composer/composer-chat-input.js +2 -2
  136. package/dist/session/composer/composer.js +16 -1
  137. package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
  138. package/dist/session/composer/hooks/use-file-search.js +16 -16
  139. package/dist/session/composer/menus/mention-controller.js +1 -3
  140. package/dist/session/composer/menus/space-mentions.d.ts +14 -4
  141. package/dist/session/composer/menus/space-mentions.js +17 -1
  142. package/dist/session/composer/use-instant-session-send.js +2 -2
  143. package/dist/session/header/reminder-parts.d.ts +1 -1
  144. package/dist/session/header/session-goal-indicator.js +4 -4
  145. package/dist/session/header/session-site-header.js +2 -6
  146. package/dist/session/panel/easy/plan-card.d.ts +2 -2
  147. package/dist/session/panel/easy/plan-card.js +2 -2
  148. package/dist/session/panel/session-desktop.js +6 -0
  149. package/dist/session/panel/session-reminders-panel.js +4 -15
  150. package/dist/session/panel/use-session-panel-state.js +2 -2
  151. package/dist/session/status/sandbox-loading-boundary.js +2 -2
  152. package/dist/session/status/session-terminal-state.d.ts +47 -0
  153. package/dist/session/status/session-terminal-state.js +56 -0
  154. package/dist/session/thread/plan-surface.d.ts +1 -1
  155. package/dist/session/thread/plan-surface.js +1 -1
  156. package/dist/session/thread/session-chat.d.ts +1 -1
  157. package/dist/session/thread/session-chat.js +88 -99
  158. package/dist/session/thread/stop-sequence.d.ts +51 -0
  159. package/dist/session/thread/stop-sequence.js +55 -0
  160. package/dist/session/thread/transcript.d.ts +2 -2
  161. package/dist/session/thread/transcript.js +2 -2
  162. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
  163. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  164. package/dist/session/tool/tools/kortix-action-tool.js +1 -1
  165. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
  166. package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
  167. package/dist/session/tool/tools/multi-agent-tools.js +1 -1
  168. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
  169. package/dist/session/tool/tools/pty-kill-tool.js +1 -1
  170. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
  171. package/dist/session/tool/tools/pty-read-tool.js +2 -2
  172. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
  173. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  174. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
  175. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  176. package/dist/session/tool/tools/session-spawn-tool.js +7 -4
  177. package/dist/session/tool/tools/task-tool.js +18 -4
  178. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
  179. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  180. package/dist/session/turn/peer-message-row.d.ts +1 -10
  181. package/dist/session/turn/peer-message-row.js +1 -18
  182. package/dist/session/turn/plan-anchor.d.ts +3 -3
  183. package/dist/session/turn/plan-anchor.js +3 -3
  184. package/dist/session/turn/plan-card.d.ts +7 -7
  185. package/dist/session/turn/plan-card.js +7 -7
  186. package/dist/styles.css +1 -1
  187. package/dist/terminal/terminal-card-gate.d.ts +6 -3
  188. package/dist/terminal/terminal-card-gate.js +21 -4
  189. package/dist/workspace/home/access-requests-bell.d.ts +6 -9
  190. package/dist/workspace/home/access-requests-bell.js +8 -10
  191. package/dist/workspace/index.d.ts +1 -1
  192. package/dist/workspace/index.js +1 -1
  193. package/dist/workspace/layout/project-home.js +1 -2
  194. package/dist/workspace/review/review-center.d.ts +8 -2
  195. package/dist/workspace/review/review-center.js +44 -13
  196. package/dist/workspace/review/review-reducer.d.ts +7 -0
  197. package/dist/workspace/review/review-reducer.js +11 -0
  198. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
  199. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
  200. package/dist/workspace/sidebar/project-nav-items.js +11 -12
  201. package/dist/workspace/sidebar/project-sidebar.js +2 -6
  202. package/dist/workspace/spaces/principal-card.d.ts +3 -1
  203. package/dist/workspace/spaces/principal-card.js +3 -3
  204. package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
  205. package/dist/workspace/spaces/space-agent-ask.js +36 -0
  206. package/dist/workspace/spaces/space-details-dialog.js +1 -1
  207. package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
  208. package/dist/workspace/spaces/space-details-panel.js +62 -8
  209. package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
  210. package/dist/workspace/spaces/space-mention-source.js +12 -19
  211. package/dist/workspace/spaces/space-view.js +3 -2
  212. package/package.json +11 -7
  213. package/skills/kortix-ui/references/custom-dashboard.md +1 -1
  214. package/skills/kortix-ui/references/modules.md +1 -1
  215. package/dist/_vendor/shared/artifact-annotations.d.ts +0 -311
  216. package/dist/_vendor/shared/artifact-comments.d.ts +0 -155
  217. package/dist/internal/hooks/use-notification-center.d.ts +0 -50
  218. package/dist/internal/hooks/use-notification-center.js +0 -151
  219. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
  220. package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
@@ -22,6 +22,7 @@ import { AgentBusyRow, PendingPromptRows } from './thread-boot-rows.js';
22
22
  import { createPortal } from 'react-dom';
23
23
  import { AUTHOR_RETRY_DELAYS_MS, authorForTurn, awaitsAgent, missingAuthorKey, participantAuthor, resolveTranscriptAuthors, rewindableMessageIds, stoppedByName, viewerAuthor, } from '../turn/message-author.js';
24
24
  import { stopRefusalMessage } from '../status/stop-refusal.js';
25
+ import { createStopLatch, runStopSequence, stopLeftTurnRunning } from './stop-sequence.js';
25
26
  import { QueuedPromptList } from '../composer/queued-prompt-list.js';
26
27
  import { ComposerAutoFocusContext } from '../composer/composer-focus-context.js';
27
28
  import { ChatQueueLines } from '../composer/chat-queue-lines.js';
@@ -538,9 +539,8 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
538
539
  */
539
540
  const issueSessionCancel = useCallback(() => {
540
541
  // The stop's own receipt, taken before the cancel goes out and settled
541
- // when it is acknowledged. `applyOptimisticAbort` writes an idle status
542
- // frame, which invalidates the `/turn` query — and the read that comes
543
- // back still shows the turn, because the cancel needs ~1.6s to reach the
542
+ // when it is acknowledged. A `/turn` read issued inside the abort round
543
+ // trip still shows the turn, because the cancel needs ~1.6s to reach the
544
544
  // daemon. Without this the composer flipped Send back to Stop ~120ms after
545
545
  // the click and stayed there for the whole abort. See `AbortReceipt`.
546
546
  useSessionWorkingStore.getState().noteAbortReceipt(projectSessionId ?? '', Date.now());
@@ -570,7 +570,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
570
570
  const { data: projectSpaces } = useProjectSpaces(projectId, {
571
571
  enabled: !!projectId && !!projectSessionRow?.space_id,
572
572
  });
573
- const threadChannelAgents = useMemo(() => channelRunnableAgents(projectSpaces?.find((space) => space.space_id === projectSessionRow?.space_id), projectConfig?.default_agent ?? projectConfig?.open_code_default_agent), [projectSpaces, projectSessionRow?.space_id, projectConfig?.default_agent, projectConfig?.open_code_default_agent]);
573
+ const threadChannelAgents = useMemo(() => channelRunnableAgents(projectSpaces?.find((space) => space.space_id === projectSessionRow?.space_id), projectConfig?.default_agent), [projectSpaces, projectSessionRow?.space_id, projectConfig?.default_agent]);
574
574
  const agents = useMemo(() => withChannelAgents(rosterAgents, threadChannelAgents), [rosterAgents, threadChannelAgents]);
575
575
  // Edit-and-rewind only on the viewer's own message with nobody else's after it.
576
576
  const rewindable = useMemo(() => rewindableMessageIds(userMessageIds, transcriptAuthors.byMessage, viewerId, projectSessionRow?.created_by), [userMessageIds, transcriptAuthors.byMessage, viewerId, projectSessionRow?.created_by]);
@@ -584,7 +584,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
584
584
  config,
585
585
  sessionId,
586
586
  boundAgentName,
587
- defaultAgentName: projectConfig?.default_agent ?? projectConfig?.open_code_default_agent,
587
+ defaultAgentName: projectConfig?.default_agent,
588
588
  projectSession: projectSessionRow,
589
589
  lastPromptModel: latestPromptModel(messages),
590
590
  });
@@ -600,7 +600,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
600
600
  const composerAgent = resolveComposerAgent({
601
601
  agents,
602
602
  boundAgent: boundAgentName,
603
- defaultAgent: projectConfig?.default_agent ?? projectConfig?.open_code_default_agent,
603
+ defaultAgent: projectConfig?.default_agent,
604
604
  selectedAgent: local.agent.current?.name ?? null,
605
605
  });
606
606
  const composerAgentName = composerAgent.selected;
@@ -789,7 +789,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
789
789
  // every other session of the same agent, and was skipped whenever the
790
790
  // account had a default model.
791
791
  // A NEW user bubble in the transcript is a queue row that just landed —
792
- // OpenCode persisted a forwarded prompt. Re-read the inbox NOW so the row
792
+ // the runtime persisted a forwarded prompt. Re-read the inbox NOW so the row
793
793
  // leaves the strip in the same beat its bubble appears, instead of on the
794
794
  // next poll: the two were visible together for up to a poll interval.
795
795
  const newestUserBubbleId = lastUserMessage?.message_id;
@@ -841,7 +841,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
841
841
  // and send" — a send queues behind the turn.
842
842
  const canStop = sessionState?.canStop ?? true;
843
843
  // The one transcript-derived gate that survives, and the only one that
844
- // carries proof: during a provider 429 OpenCode stamps `info.error` with
844
+ // carries proof: during a provider 429 the runtime stamps `info.error` with
845
845
  // `data.isRetryable === true` and keeps writing the SAME assistant message,
846
846
  // while the status frame this tab holds can read non-busy for all of it. The
847
847
  // projection cannot substitute — a frame stamped after the last `/turn` read
@@ -879,18 +879,30 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
879
879
  // Short visual fade (300ms) — matches the reference's 260ms delay-hide.
880
880
  // Goes true immediately, stays visible briefly after going idle so the
881
881
  // UI doesn't flicker between agentic steps. NOT a 2s debounce.
882
- const [isBusy, setIsBusy] = useState(effectiveBusy);
882
+ const [debouncedBusy, setDebouncedBusy] = useState(effectiveBusy);
883
883
  const busyTimerRef = useRef(undefined);
884
884
  useEffect(() => {
885
885
  if (effectiveBusy) {
886
886
  clearTimeout(busyTimerRef.current);
887
- setIsBusy(true);
887
+ setDebouncedBusy(true);
888
888
  }
889
889
  else {
890
- busyTimerRef.current = setTimeout(() => setIsBusy(false), 300);
890
+ busyTimerRef.current = setTimeout(() => setDebouncedBusy(false), 300);
891
891
  }
892
892
  return () => clearTimeout(busyTimerRef.current);
893
893
  }, [effectiveBusy]);
894
+ // A Stop the server refused, or never confirmed (`timed-out`, `failed`).
895
+ // The abort receipt can hold `effectiveBusy` false for up to
896
+ // OPTIMISTIC_ABORT_MAX_MS while the turn runs, and Stop and Esc×3 are gated
897
+ // on `isBusy`. So the Stop control stays while the server still reports an
898
+ // open turn (`serverOpenTurnToken`), and clears when it reports none.
899
+ const [stopUnconfirmed, setStopUnconfirmed] = useState(false);
900
+ const serverHoldsTurn = working.serverOpenTurnToken !== null;
901
+ useEffect(() => {
902
+ if (stopUnconfirmed && !serverHoldsTurn)
903
+ setStopUnconfirmed(false);
904
+ }, [stopUnconfirmed, serverHoldsTurn]);
905
+ const isBusy = debouncedBusy || (stopUnconfirmed && serverHoldsTurn);
894
906
  // Read by `handleSend` for its ANCHORING decision only (a send into a running
895
907
  // turn must not yank the viewport). Refs, not the values: `handleSend` is a stable callback
896
908
  // that a dozen surfaces hold, and adding busy state to its deps would rebuild
@@ -1166,7 +1178,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
1166
1178
  undoLabel: tHardcodedUi.raw('i18nComplete.texta737e54996f8'),
1167
1179
  // The SAME `clientMessageId`, so an undo re-creates ONE row and a
1168
1180
  // double-click cannot create two. A FRESH wire id, because
1169
- // OpenCode orders by id and the original one was minted before the
1181
+ // the runtime orders by id and the original one was minted before the
1170
1182
  // turn that has been writing higher ids since. The parts and
1171
1183
  // overrides are the ORIGINALS, straight from the delete's own
1172
1184
  // response — see `createQueueUndoAction`.
@@ -1432,7 +1444,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
1432
1444
  /**
1433
1445
  * The runtime is parked on an answer only the user can give.
1434
1446
  *
1435
- * Both lists are already session-scoped above. Either one means OpenCode has
1447
+ * Both lists are already session-scoped above. Either one means the runtime has
1436
1448
  * stopped inside the turn and is blocked on a reply — the `question` tool, or
1437
1449
  * a tool asking for permission — so the turn row stays `active` and every
1438
1450
  * observer keeps reporting `working` with nothing to bound it but the reader.
@@ -2204,7 +2216,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2204
2216
  // ============================================================================
2205
2217
  // Billing: DISABLED — billing is handled server-side by the LLM gateway
2206
2218
  // (it deducts credits per LLM call).
2207
- // This frontend useEffect was causing double-billing once opencode.jsonc
2219
+ // This frontend useEffect was causing double-billing once the runtime config
2208
2220
  // got cost config and step-finish.cost became non-zero.
2209
2221
  // ============================================================================
2210
2222
  // No composer-draft side effect any more: the old flow prefilled the
@@ -2528,13 +2540,13 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2528
2540
  // actual response body still arrives via the sync store.
2529
2541
  //
2530
2542
  // Don't send part IDs. `ascendingId` encodes the HIGH bits of the id
2531
- // clock where opencode encodes the LOW 48 (see the warning on it in the
2543
+ // clock where the wire id encodes the LOW 48 (see the warning on it in the
2532
2544
  // SDK), so a client id of that shape sorts before EVERY server id: the
2533
2545
  // server's "has this prompt already been answered?" ordering check reads
2534
2546
  // a stale assistant reply as the answer and the turn never runs.
2535
2547
  //
2536
2548
  // The `messageID` is a different matter and IS sent — by the SDK, not
2537
- // from here. `promptOpenCodeMessage` mints it in opencode's own wire
2549
+ // from here. `promptRuntimeMessage` mints it in the Kortix message id
2538
2550
  // format and places it above everything already in this session's
2539
2551
  // transcript, which is what makes it safe; without one, two identical
2540
2552
  // prompts inside 60s hash to a single proxy delivery and the second is
@@ -2579,7 +2591,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2579
2591
  const selectedModel = sendOpts?.model ? sendOpts.model : null;
2580
2592
  // THE ONE SEND PATH: the server-side prompt inbox.
2581
2593
  //
2582
- // This used to POST straight into the sandbox's OpenCode server, and
2594
+ // This used to POST straight into the sandbox's runtime server, and
2583
2595
  // anything the user typed while the agent was busy went into a browser
2584
2596
  // queue instead — which meant a closed tab, a second device, or a crash
2585
2597
  // lost it silently, and two tabs on one session disagreed about what was
@@ -2589,7 +2601,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2589
2601
  // guess whether a turn is in flight.
2590
2602
  //
2591
2603
  // The WIRE id is minted here, by the SDK, and never by the control plane:
2592
- // OpenCode resolves "has this prompt already been answered?" by id ORDER,
2604
+ // The runtime resolves "has this prompt already been answered?" by id ORDER,
2593
2605
  // and only this process holds the transcript to place one against. It is
2594
2606
  // `messageID` above. `clientMessageId` is only the inbox idempotency key.
2595
2607
  // The prompt is out of this tab's hands the moment the row lands, so the
@@ -2611,9 +2623,9 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2611
2623
  // the two, and the server orders racing sends by THIS.
2612
2624
  clientSentAtMs: sentAtMs,
2613
2625
  overrides: {
2614
- // Pass the session's directory so opencode resolves project-scoped
2615
- // agents (.opencode/agent/*.md under the project) and applies them
2616
- // when the user picked a project agent from the picker.
2626
+ // Pass the session's directory so the runtime resolves project-scoped
2627
+ // agents and applies them when the user picked a project agent
2628
+ // from the picker.
2617
2629
  ...(session?.directory ? { directory: session.directory } : {}),
2618
2630
  ...(selectedAgent ? { agent: selectedAgent } : {}),
2619
2631
  ...(selectedModel ? { model: formatPromptModel(selectedModel) } : {}),
@@ -2647,7 +2659,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2647
2659
  if (keepsPainted)
2648
2660
  return { ok: false, cause, error: null };
2649
2661
  // Ask the INBOX, not the runtime. This prompt's home is a durable
2650
- // control-plane row; OpenCode's transcript cannot see it until the
2662
+ // control-plane row; the runtime's transcript cannot see it until the
2651
2663
  // admission gate delivers it, so a rehydrate always reports it
2652
2664
  // missing and the recovery used to delete the bubble on that answer —
2653
2665
  // while the row was already running. Reported from a live self-host:
@@ -2737,7 +2749,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2737
2749
  // "Changes" side panel's "Ask agent to open a change request" button) can
2738
2750
  // drive the agent through the SAME robust path the input uses — optimistic
2739
2751
  // message, SSE wiring, error propagation — instead of copying a prompt to the
2740
- // clipboard. Keyed by the OpenCode chat session id (`sessionId`).
2752
+ // clipboard. Keyed by the runtime chat session id (`sessionId`).
2741
2753
  const registerSender = useChatSendStore((s) => s.registerSender);
2742
2754
  const unregisterSender = useChatSendStore((s) => s.unregisterSender);
2743
2755
  useEffect(() => {
@@ -2848,82 +2860,59 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
2848
2860
  setEditSendPending(false);
2849
2861
  }
2850
2862
  }, [sessionState, promptInbox.prompts, promptInbox.remove, handleSend, tHardcodedUi]);
2863
+ // One Stop = one inbox hold + one abort. `runStopSequence` (stop-sequence.ts)
2864
+ // owns the order: with `sessionState` the SDK's `cancel()` holds the inbox
2865
+ // and aborts; without it the host holds, then aborts. `stopLatch` is the
2866
+ // synchronous double-Stop guard: a click, then Esc×3, then a click sends one
2867
+ // stop, not three. It stays closed until the abort settles.
2868
+ const [stopLatch] = useState(createStopLatch);
2851
2869
  const handleStop = useCallback(async () => {
2852
- // Guard against rapid clicks — ignore if an abort is already in flight
2853
- if (abortSession.isPending) {
2854
- console.log(`[handleStop] Ignoring - abort already in flight for session ${sessionId}`);
2855
- return;
2856
- }
2857
- // Stop means stop: a held command would otherwise start a new turn the
2858
- // moment this one ends.
2859
- setHeldCommands([]);
2860
- console.log(`[handleStop] Stopping session ${sessionId}`);
2861
- // Optimistically mark the session idle + patch an abort error onto the
2862
- // last assistant message (so the turn reads as stopped instantly — no
2863
- // waiting for the SSE session.error round-trip, and no error row in the
2864
- // gap: `TurnErrorDisplay` renders nothing for an abort). Also clear the
2865
- // busy debounce timer to bypass the 2s delay.
2866
- applyOptimisticAbort(sessionId);
2867
- clearTimeout(busyTimerRef.current);
2868
- setIsBusy(false);
2869
- // Stop means the send this tab was still waiting on is over too.
2870
- clearSendReceipt();
2871
- // Stopping means stop doing things, and that includes the queue. Without
2872
- // this the interrupt is followed a beat later by exactly the message the
2873
- // user was trying to get ahead of.
2874
- //
2875
- // ONE hold, on the server, because the queue is not in this tab any more.
2876
- // Pausing a browser drain left every OTHER tab's view of the queue running
2877
- // and never reached the server at all.
2878
- //
2879
- // AWAITED, and BEFORE the abort. A prompt is now forwarded to OpenCode the
2880
- // moment it is admitted, so at stop time the session's queue can hold rows
2881
- // that OpenCode already has. The abort drops OpenCode's in-memory queue,
2882
- // and the reaper then sees those messages unanswered and hands them back —
2883
- // due now — unless the hold has already marked them stop-paused. Ordering
2884
- // the two calls makes "the hold precedes the abort" a fact instead of an
2885
- // argument about reaper cadence. The user sees no delay: the optimistic
2886
- // paint above already ran, so only the network abort moves one hop later.
2887
- //
2888
- // BOUNDED, because the abort is now sequenced behind a network call and
2889
- // `holdSessionPrompts` carries no client timeout of its own. A stalled
2890
- // socket can hang for minutes, and every one of those is the agent still
2891
- // running, still calling tools and still spending tokens under a UI that
2892
- // says it stopped. Past the bound the abort goes out anyway and the hold
2893
- // finishes on its own — the ordering is a preference, the abort is not.
2894
- let refusal = null;
2895
- await Promise.race([
2896
- promptInbox.hold(true).catch((error) => {
2897
- // The server refused the stop: this viewer did not start the run and
2898
- // does not own or manage the session. The abort would be refused for
2899
- // the same reason, so none goes out; the run goes on.
2900
- refusal = stopRefusalMessage(error);
2901
- if (refusal)
2902
- return;
2903
- // Caught, never rethrown: a failed hold must not also cost the user
2904
- // their abort. The cost of that path is the one this ordering removes —
2905
- // a stopped prompt can still come back a reaper pass later.
2906
- //
2907
- // SURFACED, not swallowed. A failed hold means the queue is NOT paused,
2908
- // so a prompt the user pressed Stop to get ahead of can still be
2909
- // delivered a reaper pass later — silently. The user has to know the
2910
- // stop did not also pause the queue, and that pressing Stop again (or
2911
- // Resume/Send-now) is how they recover.
2912
- console.warn('[session-chat] failed to hold the prompt inbox on stop', error);
2913
- errorToast(tHardcodedUi.raw('i18nComplete.text57a524b52549'), {
2914
- description: tHardcodedUi.raw('i18nComplete.text45eca4a01ff2'),
2915
- });
2916
- }),
2917
- new Promise((resolve) => setTimeout(resolve, STOP_HOLD_DEADLINE_MS)),
2918
- ]);
2919
- if (refusal) {
2920
- errorToast(refusal);
2921
- setIsBusy(isBusyRef.current);
2870
+ if (stopLatch.inFlight)
2922
2871
  return;
2923
- }
2924
- issueSessionCancel();
2872
+ await stopLatch.run(async () => {
2873
+ // Stop means stop: a held command would otherwise start a new turn the
2874
+ // moment this one ends.
2875
+ setHeldCommands([]);
2876
+ // The composer reads idle at once; `stopUnconfirmed` brings Stop back
2877
+ // if the server never confirms the abort.
2878
+ clearTimeout(busyTimerRef.current);
2879
+ setDebouncedBusy(false);
2880
+ setStopUnconfirmed(false);
2881
+ // Why the hold goes out before the abort, and why it is bounded: a
2882
+ // prompt admitted mid-turn is already on the wire, the abort drops the
2883
+ // runtime's queue, and the reaper redelivers it unless the hold marked
2884
+ // it stop-paused first. A stalled hold must not delay the abort by more
2885
+ // than STOP_HOLD_DEADLINE_MS.
2886
+ const outcome = await runStopSequence({
2887
+ ...(sessionState ? { sdkCancel: issueSessionCancel } : {}),
2888
+ holdInbox: () => promptInbox.hold(true),
2889
+ fallbackCancel: issueSessionCancel,
2890
+ paintOptimisticAbort: () => {
2891
+ // "Interrupted" on the newest assistant message, before the
2892
+ // round trip. The SDK path paints it inside `cancel()`.
2893
+ applyOptimisticAbort(sessionId);
2894
+ clearSendReceipt();
2895
+ },
2896
+ refusalOf: stopRefusalMessage,
2897
+ onHoldFailed: (error) => {
2898
+ // The queue is NOT paused: a prompt the user stopped to get ahead
2899
+ // of can still go out. Say so; Stop again or Resume recovers.
2900
+ console.warn('[session-chat] failed to hold the prompt inbox on stop', error);
2901
+ errorToast(tHardcodedUi.raw('i18nComplete.text57a524b52549'), {
2902
+ description: tHardcodedUi.raw('i18nComplete.text45eca4a01ff2'),
2903
+ });
2904
+ },
2905
+ holdDeadlineMs: STOP_HOLD_DEADLINE_MS,
2906
+ });
2907
+ if (outcome.kind === 'refused')
2908
+ errorToast(outcome.message);
2909
+ // A refused, failed or timed-out stop leaves the turn running: keep
2910
+ // Stop and Esc×3 on screen while the server still holds the turn.
2911
+ if (stopLeftTurnRunning(outcome))
2912
+ setStopUnconfirmed(true);
2913
+ });
2925
2914
  // eslint-disable-next-line react-hooks/exhaustive-deps
2926
- }, [sessionId, abortSession, issueSessionCancel, promptInbox.hold]);
2915
+ }, [sessionId, sessionState, stopLatch, issueSessionCancel, promptInbox.hold]);
2927
2916
  // Release the Stop hold for the WHOLE queue at once. `hold(false)` un-pauses
2928
2917
  // every held row on the server (shared across tabs), and the hook clears the
2929
2918
  // paused state on the click (`releaseHeldPrompts`). `resumePending` disables
@@ -3119,7 +3108,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
3119
3108
  const handleCommandError = (err) => {
3120
3109
  // A command that was DELIVERED and then lost its connection is not a
3121
3110
  // failed command. `/command` blocks for the whole turn, so both proxy
3122
- // hops routinely stop waiting while opencode is still working — and the
3111
+ // hops routinely stop waiting while the runtime is still working — and the
3123
3112
  // request was already on the wire when they did. Clearing the session
3124
3113
  // to `idle` and painting an error here told the user their message had
3125
3114
  // not sent while the agent was actively answering it, and invited the
@@ -3305,7 +3294,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
3305
3294
  /**
3306
3295
  * Where this session's unsent draft is persisted.
3307
3296
  *
3308
- * `projectSessionId` — the KORTIX session id — not the OpenCode `sessionId`:
3297
+ * `projectSessionId` — the KORTIX session id — not the runtime `sessionId`:
3309
3298
  * it is the id the boot shell also keys on, so a draft typed in the instant
3310
3299
  * shell is still there after the crossfade into this component, and it is
3311
3300
  * the same id every other per-session handoff store uses
@@ -3496,7 +3485,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
3496
3485
  // `SessionComposerReadiness`.
3497
3486
  const runtimePhase = useRuntimePhase();
3498
3487
  // Covers the one gap `unreachable` can't: a sandbox proxy that keeps
3499
- // answering with a 503 (OpenCode wedged mid-boot) resets the probe's
3488
+ // answering with a 503 (a runtime wedged mid-boot) resets the probe's
3500
3489
  // failure counter every tick, so `unreachable` never fires no matter how
3501
3490
  // long it stays wedged. See `useRuntimeBootStalled`.
3502
3491
  const runtimeStalled = useRuntimeBootStalled();
@@ -0,0 +1,51 @@
1
+ import type { AbortSettlement } from '@kortix/sdk/react';
2
+ /**
3
+ * The order of one Stop, as data, so a test can count the requests.
4
+ *
5
+ * One Stop sends ONE inbox hold and ONE abort.
6
+ *
7
+ * - With a mounted `useSession` (`sdkCancel`), the SDK owns the whole stop:
8
+ * `cancelSessionTurn` → `stopWithReceipt` holds the inbox (bounded), paints
9
+ * the optimistic abort, and then aborts. The host must not hold first: that
10
+ * was a second hold request and up to 2 × 1.5 s before the abort left.
11
+ * - Without it (a child-session mount), the host does the same pairing
12
+ * itself: hold, bounded by `holdDeadlineMs`, then the raw abort.
13
+ *
14
+ * A refused hold (the viewer may not stop this turn) sends no abort: the abort
15
+ * would be refused for the same reason.
16
+ */
17
+ export type StopOutcome = {
18
+ kind: 'cancelled';
19
+ settlement: AbortSettlement;
20
+ } | {
21
+ kind: 'refused';
22
+ message: string;
23
+ };
24
+ export interface StopSequenceDeps {
25
+ /** `useSession().cancel` when the session hook is mounted. */
26
+ sdkCancel?: () => Promise<AbortSettlement>;
27
+ /** Fallback path only: hold the server-side prompt inbox. */
28
+ holdInbox: () => Promise<unknown>;
29
+ /** Fallback path only: the raw abort, settled (never rejects). */
30
+ fallbackCancel: () => Promise<AbortSettlement>;
31
+ /** Fallback path only: paint "Interrupted" and clear the send receipt. */
32
+ paintOptimisticAbort: () => void;
33
+ /** The refusal text for a hold error, or null when it is not a refusal. */
34
+ refusalOf: (error: unknown) => string | null;
35
+ /** A hold that failed for any other reason: the queue is not paused. */
36
+ onHoldFailed: (error: unknown) => void;
37
+ holdDeadlineMs: number;
38
+ }
39
+ export declare function runStopSequence(deps: StopSequenceDeps): Promise<StopOutcome>;
40
+ /**
41
+ * A synchronous latch: the second Stop while the first is still settling does
42
+ * nothing. A ref, not React Query's `isPending`: `isPending` turns true only
43
+ * after a re-render, and the SDK path never touched the host mutation at all,
44
+ * so Stop → Esc×3 → Stop sent three stops.
45
+ */
46
+ export declare function createStopLatch(): {
47
+ readonly inFlight: boolean;
48
+ run<T>(fn: () => Promise<T>): Promise<T | undefined>;
49
+ };
50
+ /** A stop the server did not confirm: the turn may still be running. */
51
+ export declare function stopLeftTurnRunning(outcome: StopOutcome | undefined): boolean;
@@ -0,0 +1,55 @@
1
+ export async function runStopSequence(deps) {
2
+ if (deps.sdkCancel) {
3
+ return { kind: 'cancelled', settlement: await deps.sdkCancel() };
4
+ }
5
+ deps.paintOptimisticAbort();
6
+ let refusal = null;
7
+ let timer;
8
+ await Promise.race([
9
+ deps.holdInbox().catch((error) => {
10
+ refusal = deps.refusalOf(error);
11
+ if (!refusal)
12
+ deps.onHoldFailed(error);
13
+ }),
14
+ new Promise((resolve) => {
15
+ timer = setTimeout(resolve, deps.holdDeadlineMs);
16
+ }),
17
+ ]);
18
+ clearTimeout(timer);
19
+ if (refusal)
20
+ return { kind: 'refused', message: refusal };
21
+ return { kind: 'cancelled', settlement: await deps.fallbackCancel() };
22
+ }
23
+ /**
24
+ * A synchronous latch: the second Stop while the first is still settling does
25
+ * nothing. A ref, not React Query's `isPending`: `isPending` turns true only
26
+ * after a re-render, and the SDK path never touched the host mutation at all,
27
+ * so Stop → Esc×3 → Stop sent three stops.
28
+ */
29
+ export function createStopLatch() {
30
+ let inFlight = false;
31
+ return {
32
+ get inFlight() {
33
+ return inFlight;
34
+ },
35
+ async run(fn) {
36
+ if (inFlight)
37
+ return undefined;
38
+ inFlight = true;
39
+ try {
40
+ return await fn();
41
+ }
42
+ finally {
43
+ inFlight = false;
44
+ }
45
+ },
46
+ };
47
+ }
48
+ /** A stop the server did not confirm: the turn may still be running. */
49
+ export function stopLeftTurnRunning(outcome) {
50
+ if (!outcome)
51
+ return false;
52
+ if (outcome.kind === 'refused')
53
+ return true;
54
+ return outcome.settlement.status === 'timed-out' || outcome.settlement.status === 'failed';
55
+ }
@@ -106,7 +106,7 @@ interface SessionTurnProps {
106
106
  sessionWorking: boolean;
107
107
  /**
108
108
  * This turn is the one the agent is on — see `resolveWorkingTurn`. It used
109
- * to be `isLast` by definition; a prompt queued mid-turn broke that: OpenCode
109
+ * to be `isLast` by definition; a prompt queued mid-turn broke that: the runtime
110
110
  * persists it as the last user message while the agent is still streaming
111
111
  * the turn before, so the shimmer sat under a bubble nobody had started and
112
112
  * the live turn looked settled.
@@ -137,7 +137,7 @@ interface SessionTurnProps {
137
137
  /**
138
138
  * A user message the agent has not reached yet — after the working turn,
139
139
  * with no assistant content. Drawn dimmed, like a queued prompt (it IS one:
140
- * the server forwarded it and OpenCode holds it until the next step), and
140
+ * the server forwarded it and the runtime holds it until the next step), and
141
141
  * it fades up to full opacity the moment the agent takes it.
142
142
  */
143
143
  pending: boolean;
@@ -438,7 +438,7 @@ function useTurnErrorState({ turn, turnOutcome }) {
438
438
  * renders nothing, hides what really went wrong. The identity is right here
439
439
  * on the message; read it
440
440
  * through the SDK's single `isAbortError` classifier, which recognizes both
441
- * real producers: the opencode wire's `MessageAbortedError` and the client's
441
+ * real producers: the runtime wire's `MessageAbortedError` and the client's
442
442
  * synthesized `AbortError` patch applied when the user hits Stop.
443
443
  */
444
444
  const turnErrorIsAbort = useMemo(() => deriveTurnErrorAbortState(turn).isAbort, [turn]);
@@ -996,7 +996,7 @@ function useTurnSegments({ blocks, answeredQuestionCallsById, shouldUseInlineCon
996
996
  // ============================================================================
997
997
  /**
998
998
  * Shell mode — a live shell tool replaces the whole turn scaffold.
999
- * @deprecated Renders an OpenCode shell turn (session.shell; pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode.
999
+ * @deprecated Renders an OpenCode shell turn (session.shell; pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
1000
1000
  */
1001
1001
  function TurnShellMode(props) {
1002
1002
  const { call, working, providers, errors, connectProviderOpen, onConnectProviderOpenChange, permissions, sessionId, disableToolNavigation, onPermissionReply, } = props;
@@ -1,3 +1,3 @@
1
1
  import type { ToolProps } from '../shared/types.js';
2
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
2
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
3
3
  export declare function ApplyPatchTool({ call, defaultOpen, forceOpen, locked }: ToolProps): import("react").JSX.Element;
@@ -20,7 +20,7 @@ const PATCH_ICON = {
20
20
  delete: FileMinusIcon,
21
21
  edit: PencilSimpleIcon,
22
22
  };
23
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
23
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
24
24
  export function ApplyPatchTool({ call, defaultOpen, forceOpen, locked }) {
25
25
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
26
26
  const patchTypeStyle = useLocalizedUiCatalog(PATCH_TYPE_STYLE);
@@ -16,7 +16,7 @@ import { UiLink } from '../../../providers/ui-provider.js';
16
16
  import { ArrowRightIcon, ArrowSquareOutIcon, CalendarDotsIcon, CaretRightIcon, ChartBarIcon, ChatsCircleIcon, CheckIcon, GitPullRequestIcon, SunDimIcon, HandPointingIcon, LockKeyIcon, PlugIcon, RobotIcon, UsersIcon, WarningIcon, } from '@phosphor-icons/react';
17
17
  import { useContext, useMemo } from 'react';
18
18
  import { MULTI_AGENT_ICON, multiAgentBody, PeerSendRow, runningKey } from './multi-agent-tool-bodies.js';
19
- import { parsePeerSend } from './multi-agent-tool-data.js';
19
+ import { parsePeerSend } from '@kortix/sdk';
20
20
  import { KORTIX_PLATFORM_TOOLS, isReadAction, kortixCardTool, kortixPlatformTool, multiAgentTool, parseKortixToolResult, } from './kortix-tool-card.js';
21
21
  const TOOL_META = {
22
22
  kortix_agents: { icon: RobotIcon, object: 'agents' },
@@ -2,7 +2,7 @@ import { AgentFace } from '../../agents/agent-surface.js';
2
2
  import { type Icon } from '@phosphor-icons/react';
3
3
  import { type ReactNode } from 'react';
4
4
  import type { KortixToolResult, MultiAgentTool } from './kortix-tool-card.js';
5
- import { type PeerSendSummary } from './multi-agent-tool-data.js';
5
+ import { type PeerSendSummary } from '@kortix/sdk';
6
6
  export declare const MULTI_AGENT_ICON: Record<MultiAgentTool, Icon>;
7
7
  /** The key under `multiAgent.tools.running` for a call still in flight. */
8
8
  export declare function runningKey(tool: MultiAgentTool): 'sending' | 'checkingAgents' | 'checkingTasks' | 'updatingTasks' | 'stopping';
@@ -14,7 +14,7 @@ import { AgentFace, AgentHandle, AgentRowBody, AgentRowScope, AgentStatus, Agent
14
14
  import { BasicTool } from '../shared/infrastructure.js';
15
15
  import { ArrowSquareOutIcon, ArrowUpRightIcon, ListChecksIcon, PaperPlaneTiltIcon, StopCircleIcon, UsersThreeIcon, } from '@phosphor-icons/react';
16
16
  import { useState } from 'react';
17
- import { parsePeerSend, parseReachable, parseStoppedChild, parseTasks, } from './multi-agent-tool-data.js';
17
+ import { parsePeerSend, parseReachable, parseStoppedChild, parseTasks, } from '@kortix/sdk';
18
18
  export const MULTI_AGENT_ICON = {
19
19
  send_message: PaperPlaneTiltIcon,
20
20
  list_agents: UsersThreeIcon,
@@ -6,7 +6,7 @@ import { AgentSpawnTool } from './agent-spawn-tool.js';
6
6
  import { AgentTaskUpdateTool } from './agent-task-update-tool.js';
7
7
  import { KortixActionTool } from './kortix-action-tool.js';
8
8
  import { parseKortixToolResult } from './kortix-tool-card.js';
9
- import { looksLikeTeamTaskInput } from './multi-agent-tool-data.js';
9
+ import { looksLikeTeamTaskInput } from '@kortix/sdk';
10
10
  import { TaskListTool } from './task-list-tool.js';
11
11
  /**
12
12
  * `task_create`, `task_list`, `task_get` and `task_update` name two tools: pi's
@@ -1,3 +1,3 @@
1
1
  import type { ToolProps } from '../shared/types.js';
2
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
2
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
3
3
  export declare function PtyKillTool({ call, defaultOpen, forceOpen, locked }: ToolProps): import("react").JSX.Element;
@@ -7,7 +7,7 @@ import { stripMarkupForToolOutput } from '../../../_vendor/kortix-shared.js';
7
7
  import { TerminalWindowIcon as Terminal } from '@phosphor-icons/react';
8
8
  import { useTranslations } from '../../../i18n/index.js';
9
9
  import { useMemo } from 'react';
10
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
10
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
11
11
  export function PtyKillTool({ call, defaultOpen, forceOpen, locked }) {
12
12
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
13
13
  const input = partInput(call);
@@ -12,12 +12,12 @@ import type { ToolProps } from '../shared/types.js';
12
12
  * actually appears, while re-creating inline the nested-scroll wheel trap the
13
13
  * comment further down records. Folding works on both surfaces: the tail stays
14
14
  * visible, the history is one click away, and no second scroller is created.
15
- * @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode.
15
+ * @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
16
16
  */
17
17
  export declare function splitTerminalBuffer(content: string): {
18
18
  earlier: string;
19
19
  tail: string;
20
20
  earlierCount: number;
21
21
  };
22
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
22
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
23
23
  export declare function PtyReadTool({ call, defaultOpen, forceOpen, locked }: ToolProps): import("react").JSX.Element;
@@ -32,7 +32,7 @@ const VISIBLE_TAIL_LINES = 24;
32
32
  * actually appears, while re-creating inline the nested-scroll wheel trap the
33
33
  * comment further down records. Folding works on both surfaces: the tail stays
34
34
  * visible, the history is one click away, and no second scroller is created.
35
- * @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode.
35
+ * @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
36
36
  */
37
37
  export function splitTerminalBuffer(content) {
38
38
  const lines = content ? content.split('\n') : [];
@@ -45,7 +45,7 @@ export function splitTerminalBuffer(content) {
45
45
  earlierCount: cut,
46
46
  };
47
47
  }
48
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
48
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
49
49
  export function PtyReadTool({ call, defaultOpen, forceOpen, locked }) {
50
50
  const tHardcodedUi = useTranslations('hardcodedUi');
51
51
  const input = partInput(call);
@@ -1,3 +1,3 @@
1
1
  import type { ToolProps } from '../shared/types.js';
2
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
2
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
3
3
  export declare function PtySpawnTool({ call, defaultOpen, forceOpen, locked }: ToolProps): import("react").JSX.Element;
@@ -10,7 +10,7 @@ import { ptySpawnedBody } from '../../../_vendor/kortix-shared.js';
10
10
  import { TerminalWindowIcon as Terminal } from '@phosphor-icons/react';
11
11
  import { useTranslations } from '../../../i18n/index.js';
12
12
  import { useMemo } from 'react';
13
- /** @deprecated Renders an OpenCode-only tool or todo list in an OpenCode session (pi has none). OpenCode is sunset (2026-10-23): no new code; delete with OpenCode. */
13
+ /** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
14
14
  export function PtySpawnTool({ call, defaultOpen, forceOpen, locked }) {
15
15
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
16
16
  const input = partInput(call);