@kortix/ui 0.15.8 → 0.15.10

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 (199) hide show
  1. package/dist/_vendor/kortix-shared.js +75 -1
  2. package/dist/_vendor/shared/index.d.ts +1 -0
  3. package/dist/_vendor/shared/session/attachment-tile.d.ts +32 -0
  4. package/dist/_vendor/shared/session/stop-refusal.d.ts +15 -0
  5. package/dist/_vendor/shared/session/tool-row-text.d.ts +58 -0
  6. package/dist/_vendor/shared/session-delivery.d.ts +2 -0
  7. package/dist/access/access/access-dialog-share.js +12 -6
  8. package/dist/access/access/share-selection.d.ts +9 -0
  9. package/dist/access/access/share-selection.js +64 -0
  10. package/dist/customize/connectors/connector-identity.js +3 -3
  11. package/dist/customize/connectors/connectors-page.js +1 -1
  12. package/dist/customize/connectors/detail/app-page.js +2 -2
  13. package/dist/customize/connectors/detail/connector-accounts.d.ts +3 -1
  14. package/dist/customize/connectors/detail/connector-accounts.js +2 -2
  15. package/dist/customize/connectors/detail/connector-notice-view.d.ts +4 -0
  16. package/dist/customize/connectors/detail/connector-notice-view.js +4 -0
  17. package/dist/customize/connectors/detail/connector-notice.d.ts +31 -4
  18. package/dist/customize/connectors/detail/connector-notice.js +23 -4
  19. package/dist/customize/connectors/detail/connector-page.js +35 -10
  20. package/dist/customize/connectors/detail/connector-status.d.ts +12 -1
  21. package/dist/customize/connectors/detail/connector-status.js +11 -0
  22. package/dist/customize/connectors/detail/status-badge.d.ts +3 -3
  23. package/dist/customize/connectors/detail/status-badge.js +2 -1
  24. package/dist/customize/connectors/detail/use-connector-detail.js +10 -2
  25. package/dist/customize/connectors/detail/use-mcp-oauth-sign-in.d.ts +13 -0
  26. package/dist/customize/connectors/detail/use-mcp-oauth-sign-in.js +29 -0
  27. package/dist/customize/connectors/install/use-install.js +1 -1
  28. package/dist/customize/providers/provider-accordion.js +9 -8
  29. package/dist/customize/providers/provider-connect.d.ts +3 -3
  30. package/dist/customize/providers/provider-connect.js +10 -16
  31. package/dist/customize/providers/provider-sheet.js +13 -8
  32. package/dist/customize/sections/component/email-connect-form.js +4 -2
  33. package/dist/customize/sections/connector-connection-form.d.ts +0 -1
  34. package/dist/customize/sections/connector-connection-form.js +0 -9
  35. package/dist/customize/sections/connectors-view.d.ts +4 -1
  36. package/dist/customize/sections/connectors-view.js +42 -7
  37. package/dist/customize/sections/view/account-secret-resources-panel.d.ts +15 -0
  38. package/dist/customize/sections/view/account-secret-resources-panel.js +44 -5
  39. package/dist/customize/sections/view/review-center-connected.js +7 -3
  40. package/dist/customize/sections/view/secret-delivery.d.ts +9 -2
  41. package/dist/customize/sections/view/secret-delivery.js +14 -4
  42. package/dist/customize/sections/view/secrets-view.js +21 -5
  43. package/dist/customize/settings/tabs/workspace-keys.js +53 -11
  44. package/dist/customize/shared/feature-gate-screen.js +1 -1
  45. package/dist/customize/triggers/schedule/event-account-picker.js +1 -1
  46. package/dist/customize/triggers/schedule/schedule-builder.js +1 -1
  47. package/dist/customize/triggers/schedule/schedule-copy.js +4 -0
  48. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +14 -3
  49. package/dist/customize/triggers/schedule/then-fields.d.ts +3 -1
  50. package/dist/customize/triggers/schedule/then-fields.js +8 -4
  51. package/dist/customize/triggers/schedule/trigger-composer.js +1 -1
  52. package/dist/customize/triggers/schedule/trigger-list.d.ts +3 -1
  53. package/dist/customize/triggers/schedule/trigger-list.js +18 -2
  54. package/dist/customize/triggers/schedule/trigger-runs-logic.js +4 -2
  55. package/dist/customize/triggers/schedule/trigger-runs-panel.js +4 -1
  56. package/dist/customize/triggers/schedule/use-event-app-connect.js +2 -1
  57. package/dist/files/renderers/pptx-renderer.js +5 -20
  58. package/dist/files/renderers/presentation/FullScreenPresentationViewer.d.ts +3 -2
  59. package/dist/files/renderers/presentation/FullScreenPresentationViewer.js +23 -304
  60. package/dist/files/renderers/presentation/presentation-export-menu.d.ts +14 -0
  61. package/dist/files/renderers/presentation/presentation-export-menu.js +44 -0
  62. package/dist/files/renderers/presentation/presentation-utils.d.ts +1 -0
  63. package/dist/files/renderers/presentation/presentation-utils.js +4 -0
  64. package/dist/files/renderers/presentation/slide-iframe.d.ts +23 -0
  65. package/dist/files/renderers/presentation/slide-iframe.js +61 -0
  66. package/dist/files/renderers/presentation/use-presentation-metadata.d.ts +39 -0
  67. package/dist/files/renderers/presentation/use-presentation-metadata.js +137 -0
  68. package/dist/files/renderers/presentation/use-slide-navigation.d.ts +17 -0
  69. package/dist/files/renderers/presentation/use-slide-navigation.js +82 -0
  70. package/dist/files/renderers/shared/use-stage-fit-scale.d.ts +19 -0
  71. package/dist/files/renderers/shared/use-stage-fit-scale.js +41 -0
  72. package/dist/files/renderers/show-content-renderer.js +16 -11
  73. package/dist/files/renderers/xlsx/xlsx-renderer.d.ts +4 -13
  74. package/dist/files/renderers/xlsx/xlsx-renderer.js +6 -63
  75. package/dist/files/renderers/xlsx/xlsx-viewer.d.ts +4 -2
  76. package/dist/files/renderers/xlsx/xlsx-viewer.js +28 -34
  77. package/dist/files/viewer/file-content-renderer.js +1 -4
  78. package/dist/files/viewer/use-file-content-state.js +10 -9
  79. package/dist/i18n/en.d.ts +55 -7
  80. package/dist/i18n/en.js +59 -11
  81. package/dist/internal/billing/compute-pricing.d.ts +7 -1
  82. package/dist/internal/billing/compute-pricing.js +7 -1
  83. package/dist/internal/chrome/use-chrome-offered.d.ts +2 -1
  84. package/dist/internal/chrome/use-chrome-offered.js +4 -2
  85. package/dist/internal/hooks/connectors/invalidate-connections.d.ts +10 -0
  86. package/dist/internal/hooks/connectors/invalidate-connections.js +18 -0
  87. package/dist/internal/hooks/connectors/use-finish-sign-in.d.ts +13 -0
  88. package/dist/internal/hooks/connectors/use-finish-sign-in.js +33 -0
  89. package/dist/internal/hooks/connectors/use-pipedream-connect-member.js +6 -1
  90. package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +6 -1
  91. package/dist/internal/hooks/projects/use-new-project-session.d.ts +2 -0
  92. package/dist/internal/hooks/projects/use-new-project-session.js +4 -1
  93. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  94. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  95. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +2 -2
  96. package/dist/internal/lib/error-handler.js +33 -0
  97. package/dist/internal/lib/trigger-clock.d.ts +7 -2
  98. package/dist/internal/lib/trigger-clock.js +17 -3
  99. package/dist/internal/notifications/notification-inbox.d.ts +4 -10
  100. package/dist/internal/notifications/notification-inbox.js +8 -9
  101. package/dist/internal/stores/connector-gate-store.d.ts +3 -1
  102. package/dist/internal/stores/connector-gate-store.js +13 -3
  103. package/dist/internal/stores/upgrade-dialog-store.d.ts +4 -0
  104. package/dist/internal/stores/upgrade-dialog-store.js +2 -0
  105. package/dist/lib/routes.d.ts +4 -11
  106. package/dist/lib/routes.js +3 -5
  107. package/dist/lib/z-stack.d.ts +5 -1
  108. package/dist/lib/z-stack.js +12 -2
  109. package/dist/markdown/unified-markdown-utils.d.ts +7 -0
  110. package/dist/markdown/unified-markdown-utils.js +19 -0
  111. package/dist/markdown/unified-markdown.js +16 -3
  112. package/dist/primitives/alert-dialog.js +1 -1
  113. package/dist/primitives/dialog.js +3 -1
  114. package/dist/primitives/drawer.js +1 -1
  115. package/dist/primitives/modal.js +1 -1
  116. package/dist/primitives/preview-image.js +1 -1
  117. package/dist/primitives/sheet.js +1 -1
  118. package/dist/session/composer/ComposerCard.js +4 -2
  119. package/dist/session/composer/attachment-tile.d.ts +2 -26
  120. package/dist/session/composer/attachment-tile.js +3 -47
  121. package/dist/session/composer/composer-chat-input.d.ts +2 -1
  122. package/dist/session/composer/composer-chat-input.js +2 -2
  123. package/dist/session/composer/composer.d.ts +2 -0
  124. package/dist/session/composer/composer.js +5 -8
  125. package/dist/session/composer/draft/home-composer-focus-handoff.d.ts +7 -0
  126. package/dist/session/composer/draft/home-composer-focus-handoff.js +94 -0
  127. package/dist/session/composer/draft/use-composer-draft.d.ts +3 -1
  128. package/dist/session/composer/draft/use-composer-draft.js +22 -2
  129. package/dist/session/composer/editor/composer-editor.d.ts +4 -2
  130. package/dist/session/composer/editor/composer-editor.js +7 -3
  131. package/dist/session/composer/hooks/use-composer-focus.js +4 -2
  132. package/dist/session/index.d.ts +1 -0
  133. package/dist/session/index.js +1 -0
  134. package/dist/session/models/chatgpt-connection-button.js +5 -9
  135. package/dist/session/models/model-connection-gate.d.ts +2 -1
  136. package/dist/session/models/model-connection-gate.js +21 -5
  137. package/dist/session/models/model-connection-layout.d.ts +2 -0
  138. package/dist/session/models/model-connection-layout.js +4 -0
  139. package/dist/session/models/model-picker-panel.js +6 -2
  140. package/dist/session/models/model-selector.d.ts +1 -1
  141. package/dist/session/models/model-selector.js +9 -6
  142. package/dist/session/models/provider-key-action.d.ts +10 -0
  143. package/dist/session/models/provider-key-action.js +35 -0
  144. package/dist/session/models/provider-key-slot.d.ts +9 -0
  145. package/dist/session/models/provider-key-slot.js +19 -0
  146. package/dist/session/models/subscription-offer.d.ts +4 -0
  147. package/dist/session/models/subscription-offer.js +11 -3
  148. package/dist/session/overrides/session-overrides-toolbar.js +2 -4
  149. package/dist/session/prompts/ask-deck.d.ts +5 -1
  150. package/dist/session/prompts/ask-deck.js +15 -3
  151. package/dist/session/prompts/question-labels.d.ts +16 -0
  152. package/dist/session/prompts/question-labels.js +34 -0
  153. package/dist/session/prompts/question-prompt.js +6 -6
  154. package/dist/session/prompts/session-connect-prompt.d.ts +40 -0
  155. package/dist/session/prompts/session-connect-prompt.js +126 -0
  156. package/dist/session/status/provisioning-failure.d.ts +23 -2
  157. package/dist/session/status/provisioning-failure.js +53 -3
  158. package/dist/session/status/session-error-banner.d.ts +1 -1
  159. package/dist/session/status/session-error-banner.js +12 -4
  160. package/dist/session/status/stop-refusal.d.ts +6 -12
  161. package/dist/session/status/stop-refusal.js +6 -19
  162. package/dist/session/thread/agent-run-props.d.ts +19 -0
  163. package/dist/session/thread/agent-run-props.js +54 -0
  164. package/dist/session/thread/session-chat.js +34 -6
  165. package/dist/session/thread/transcript.d.ts +17 -1
  166. package/dist/session/thread/transcript.js +104 -16
  167. package/dist/session/tool/tools/bash-tool.d.ts +3 -52
  168. package/dist/session/tool/tools/bash-tool.js +3 -86
  169. package/dist/session/turn/answer-streaming.d.ts +21 -0
  170. package/dist/session/turn/answer-streaming.js +34 -0
  171. package/dist/session/turn/queued-prompt-bubbles.d.ts +5 -0
  172. package/dist/session/turn/queued-prompt-bubbles.js +12 -0
  173. package/dist/session/turn/turn-work-accordion.d.ts +3 -1
  174. package/dist/session/turn/turn-work-accordion.js +2 -2
  175. package/dist/styles.css +1 -1
  176. package/dist/test-utils/intl.d.ts +55 -7
  177. package/dist/workspace/home/first-chat.d.ts +7 -1
  178. package/dist/workspace/home/first-chat.js +12 -5
  179. package/dist/workspace/inbox/workspace-inbox.d.ts +6 -16
  180. package/dist/workspace/inbox/workspace-inbox.js +9 -51
  181. package/dist/workspace/layout/project-home.js +5 -11
  182. package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
  183. package/dist/workspace/layout/use-project-home-send.js +29 -15
  184. package/dist/workspace/new/advanced-fields.d.ts +4 -1
  185. package/dist/workspace/new/advanced-fields.js +2 -2
  186. package/dist/workspace/new/workspace-name.d.ts +9 -0
  187. package/dist/workspace/new/workspace-name.js +20 -0
  188. package/dist/workspace/projects/session-starter.d.ts +6 -4
  189. package/dist/workspace/projects/session-starter.js +8 -14
  190. package/dist/workspace/review/review-center.d.ts +6 -2
  191. package/dist/workspace/review/review-center.js +45 -25
  192. package/dist/workspace/sidebar/workspace-menu-model.d.ts +3 -5
  193. package/dist/workspace/sidebar/workspace-menu-model.js +1 -1
  194. package/package.json +3 -7
  195. package/skills/kortix-ui/references/modules.md +1 -1
  196. package/dist/customize/connectors/invalidate-connections.d.ts +0 -2
  197. package/dist/customize/connectors/invalidate-connections.js +0 -4
  198. package/dist/internal/notifications/use-inbox-summary.d.ts +0 -17
  199. package/dist/internal/notifications/use-inbox-summary.js +0 -28
@@ -132,10 +132,7 @@ export function FileContentRenderer({ filePath, showHeader = true, headerSlot, h
132
132
  !isSandboxWaking &&
133
133
  (sharedImagePath && !isNotFound ? (
134
134
  // An image never shows the read's raw error text (R38).
135
- _jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsx(ImageUnavailable, { onRetry: retrySharedImage }) })) : errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, findText: findText, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), !isLoading && !error && !isNotFound && fileCategory === 'xlsx' && (!bytesOnly || blobUrl) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, {
136
- // A bytes-only source hands the workbook over as a blob URL;
137
- // the renderer reads a sandbox path only for a session.
138
- filePath: bytesOnly ? blobUrl : filePath, fileName: fileName, className: "h-full", showDownload: false }, `xlsx-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && !isNotFound && fileCategory === 'sqlite' && (!bytesOnly || rawBlob) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(SqliteRenderer, { filePath: filePath, fileName: fileName, className: "h-full", readOnly: readOnly, ...(bytesOnly ? { bytes: rawBlob, onSave: saveThroughSource } : {}) }, `sqlite-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && csvAsTable && fileContent && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(CsvRenderer, { content: fileContent.content, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'video' && blobUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(VideoRenderer, { url: blobUrl, className: "h-full" }) })), isContentReady && fileCategory === 'audio' && blobUrl && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-5 p-8", children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-sm", children: _jsxs("svg", { className: "text-muted-foreground/40 h-6 w-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }) }), _jsx("p", { className: "text-muted-foreground/60 text-sm", children: fileName }), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm" })] })), isContentReady && fileCategory === 'pptx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PptxRenderer, { blob: rawBlob, binaryUrl: blobUrl, filePath: filePath, fileName: fileName, className: "h-full", onDownload: handleDownload }) })), isHtmlFile && isHtmlPreview && (_jsx(HtmlPreview, { path: toSandboxAbsolutePath(filePath), reloadKey: `${fetchRevision}-${reloadKey}`, fileName: fileName, pendingLabel: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line805JsxTextStartingPreviewServer') }, `html-preview-${filePath}`)), isHtmlFile && !isHtmlPreview && !isLoading && !error && fileContent?.type === 'text' && (_jsx(CodeEditor, { editorClassName: codeEditorEditorClassName, ...codeEditorProps, className: readOnly ? 'min-h-full' : 'h-full' }, `html-source-${filePath}-${discardKey}`)), !isLoading &&
135
+ _jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsx(ImageUnavailable, { onRetry: retrySharedImage }) })) : errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, findText: findText, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), isContentReady && fileCategory === 'xlsx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }, `xlsx-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && !isNotFound && fileCategory === 'sqlite' && (!bytesOnly || rawBlob) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(SqliteRenderer, { filePath: filePath, fileName: fileName, className: "h-full", readOnly: readOnly, ...(bytesOnly ? { bytes: rawBlob, onSave: saveThroughSource } : {}) }, `sqlite-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && csvAsTable && fileContent && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(CsvRenderer, { content: fileContent.content, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'video' && blobUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(VideoRenderer, { url: blobUrl, className: "h-full" }) })), isContentReady && fileCategory === 'audio' && blobUrl && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-5 p-8", children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-sm", children: _jsxs("svg", { className: "text-muted-foreground/40 h-6 w-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }) }), _jsx("p", { className: "text-muted-foreground/60 text-sm", children: fileName }), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm" })] })), isContentReady && fileCategory === 'pptx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PptxRenderer, { blob: rawBlob, binaryUrl: blobUrl, filePath: filePath, fileName: fileName, className: "h-full", onDownload: handleDownload }) })), isHtmlFile && isHtmlPreview && (_jsx(HtmlPreview, { path: toSandboxAbsolutePath(filePath), reloadKey: `${fetchRevision}-${reloadKey}`, fileName: fileName, pendingLabel: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line805JsxTextStartingPreviewServer') }, `html-preview-${filePath}`)), isHtmlFile && !isHtmlPreview && !isLoading && !error && fileContent?.type === 'text' && (_jsx(CodeEditor, { editorClassName: codeEditorEditorClassName, ...codeEditorProps, className: readOnly ? 'min-h-full' : 'h-full' }, `html-source-${filePath}-${discardKey}`)), !isLoading &&
139
136
  !error &&
140
137
  fileContent &&
141
138
  fileContent.type === 'binary' &&
@@ -12,7 +12,7 @@ import { getFileCategory, getLanguageFromExt } from './preview-policy.js';
12
12
  import { usePreviewFit } from './preview-fit.js';
13
13
  import { useContentRevision } from './use-content-revision.js';
14
14
  /** Categories that need a blob fetched via readFileAsBlob */
15
- const BLOB_CATEGORIES = ['docx', 'video', 'audio', 'pptx', 'zip'];
15
+ const BLOB_CATEGORIES = ['docx', 'video', 'audio', 'pptx', 'zip', 'xlsx'];
16
16
  function isImageMime(mimeType) {
17
17
  return !!mimeType && mimeType.startsWith('image/');
18
18
  }
@@ -66,9 +66,10 @@ export function useFileContentState({ filePath, onUnsavedChange, onSaved, readOn
66
66
  const sharedImageSha = useFileCaption(filePath)?.sha256;
67
67
  const sharedImage = (source.useSharedImage ?? noSharedImage)(sharedImagePath, sharedImageSha);
68
68
  const { data: fileContent, isLoading, error, refetch, dataUpdatedAt, } = useFileContent(isHeicImage || isZipArchive || sharedImagePath ? null : filePath);
69
- // The agent's turn end refetches this file. The xlsx and sqlite renderers
70
- // read their own bytes, so they remount only when the content really
71
- // changed (structural sharing keeps the reference otherwise). The HTML frame
69
+ // The agent's turn end refetches this file. The sqlite renderer still
70
+ // reads its own bytes, and the xlsx renderer re-parses the blob its parent
71
+ // passes, so both remount only when the content really changed
72
+ // (structural sharing keeps the reference otherwise). The HTML frame
72
73
  // reloads on every refetch: its stylesheets can change while its markup
73
74
  // does not. Neither moves on the first load.
74
75
  const contentRevision = useContentRevision(fileContent);
@@ -129,12 +130,12 @@ export function useFileContentState({ filePath, onUnsavedChange, onSaved, readOn
129
130
  const fileDiagnostics = useMemo(() => findDiagnosticsForFile(diagByFile, filePath), [diagByFile, filePath]);
130
131
  const fileDiagErrorCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 1).length ?? 0, [fileDiagnostics]);
131
132
  const fileDiagWarningCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 2).length ?? 0, [fileDiagnostics]);
132
- // Binary blob for DOCX, video, audio, PPTX — AND HEIC images.
133
+ // Binary blob for DOCX, video, audio, PPTX, XLSX — AND HEIC images.
133
134
  // PDFs intentionally use /file/content base64 so PdfRenderer can create a Blob URL from the string.
134
- // A bytes-only source (the project's Files) also serves the spreadsheet and
135
- // SQLite bytes: those renderers would otherwise read a sandbox path, and
136
- // there is no sandbox behind Files.
137
- const readsOwnBytes = fileCategory === 'xlsx' || fileCategory === 'sqlite';
135
+ // A bytes-only source (the project's Files) also serves the SQLite bytes:
136
+ // that renderer would otherwise read a sandbox path, and there is no
137
+ // sandbox behind Files.
138
+ const readsOwnBytes = fileCategory === 'sqlite';
138
139
  const blobPath = isBlobCategory(fileCategory) || isHeicImage || (source.bytesOnly && readsOwnBytes) ? filePath : null;
139
140
  const { blobUrl, blob: rawBlob, isLoading: binaryLoading, error: binaryError, } = useBinaryBlob(blobPath);
140
141
  const blobLoading = sharedImagePath ? sharedImage.loading : binaryLoading;
package/dist/i18n/en.d.ts CHANGED
@@ -98,6 +98,14 @@ declare const catalog: {
98
98
  access: string;
99
99
  actions: string;
100
100
  coolingDown: string;
101
+ keyVerified: string;
102
+ keyInvalid: string;
103
+ keyUnchecked: string;
104
+ checkKey: string;
105
+ savedVerified: string;
106
+ savedInvalid: string;
107
+ checkError: string;
108
+ openProviderInModels: string;
101
109
  member: string;
102
110
  members: string;
103
111
  actionsFor: string;
@@ -170,6 +178,9 @@ declare const catalog: {
170
178
  claudeReconnectDescription: string;
171
179
  claudeAccountLabelPlaceholder: string;
172
180
  claudeDeleteAccountConfirmTitle: string;
181
+ sharedOnlyYouDescription: string;
182
+ oauthOnlyYouDescription: string;
183
+ claudeOauthOnlyYouDescription: string;
173
184
  };
174
185
  secrets: {
175
186
  undecryptable: {
@@ -277,6 +288,7 @@ declare const catalog: {
277
288
  repositoryLabel: string;
278
289
  loadingOptions: string;
279
290
  managedUnavailable: string;
291
+ githubAfterCreate: string;
280
292
  installationUnreachable: string;
281
293
  reconnect: string;
282
294
  managedImportLabel: string;
@@ -784,10 +796,6 @@ declare const catalog: {
784
796
  name: string;
785
797
  description: string;
786
798
  };
787
- pooled_provider_secrets: {
788
- name: string;
789
- description: string;
790
- };
791
799
  reminders: {
792
800
  name: string;
793
801
  description: string;
@@ -1488,6 +1496,10 @@ declare const catalog: {
1488
1496
  connectModel: string;
1489
1497
  imagesUnsupported: string;
1490
1498
  imagesUnsupportedHint: string;
1499
+ noModelUpgradeReason: string;
1500
+ noModelKeyReason: string;
1501
+ noModelUpgradePlan: string;
1502
+ noModelAddProviderKey: string;
1491
1503
  };
1492
1504
  providerRecovery: {
1493
1505
  savedPrompt: string;
@@ -1545,6 +1557,7 @@ declare const catalog: {
1545
1557
  agentWorkingOnFor: string;
1546
1558
  somethingWrong: string;
1547
1559
  notSent: string;
1560
+ computerDisconnected: string;
1548
1561
  retry: string;
1549
1562
  resume: string;
1550
1563
  agentIsWorking: string;
@@ -2165,9 +2178,6 @@ declare const catalog: {
2165
2178
  };
2166
2179
  inbox: {
2167
2180
  title: string;
2168
- viewReview: string;
2169
- viewNotifications: string;
2170
- viewLabel: string;
2171
2181
  description: string;
2172
2182
  unreadLabel: string;
2173
2183
  unreadCount: string;
@@ -2693,6 +2703,8 @@ declare const catalog: {
2693
2703
  checkConnection: string;
2694
2704
  };
2695
2705
  i18nComplete: {
2706
+ noModelAddProviderKey: string;
2707
+ noModelUpgradePlan: string;
2696
2708
  text03217276a5f1: string;
2697
2709
  text0b6a47661327: string;
2698
2710
  text1a9030082a20: string;
@@ -6834,6 +6846,12 @@ declare const catalog: {
6834
6846
  noticeSignInTitle: string;
6835
6847
  noticeSignInBody: string;
6836
6848
  noticeSignInAction: string;
6849
+ noticeSignInAgainTitle: string;
6850
+ noticeSignInAgainBody: string;
6851
+ noticeNoToolsTitle: string;
6852
+ noticeNoToolsBody: string;
6853
+ noticeAddRoutesAction: string;
6854
+ statusNoTools: string;
6837
6855
  connectAccount: string;
6838
6856
  notSignedIn: string;
6839
6857
  credentialRejected: string;
@@ -7851,6 +7869,12 @@ declare const catalog: {
7851
7869
  triggerAutoPause: {
7852
7870
  title: string;
7853
7871
  description: string;
7872
+ billingTitle: string;
7873
+ billingDescription: string;
7874
+ modelTitle: string;
7875
+ modelDescription: string;
7876
+ listBilling: string;
7877
+ listModel: string;
7854
7878
  };
7855
7879
  featureGate: {
7856
7880
  enable: string;
@@ -9992,6 +10016,10 @@ declare const catalog: {
9992
10016
  actsAsAgent: string;
9993
10017
  actsAsBot: string;
9994
10018
  actsAsMeHint: string;
10019
+ worksIn: string;
10020
+ worksInAll: string;
10021
+ worksInAllHint: string;
10022
+ worksInWorkspace: string;
9995
10023
  actsAsAgentHint: string;
9996
10024
  actsAsBotHint: string;
9997
10025
  needsPermission: string;
@@ -10010,6 +10038,7 @@ declare const catalog: {
10010
10038
  rowBot: string;
10011
10039
  createdBy: string;
10012
10040
  createdDescription: string;
10041
+ createdPersonalDescription: string;
10013
10042
  accessFullHint: string;
10014
10043
  accessCustomHint: string;
10015
10044
  };
@@ -10083,5 +10112,24 @@ declare const catalog: {
10083
10112
  capWorkspace: string;
10084
10113
  capMember: string;
10085
10114
  };
10115
+ connectSignIn: {
10116
+ openSignIn: string;
10117
+ checkingTitle: string;
10118
+ checkingDescription: string;
10119
+ signInUnfinished: string;
10120
+ finishSignIn: string;
10121
+ signInFinished: string;
10122
+ cardHeadline: string;
10123
+ cardTitle: string;
10124
+ cardShared: string;
10125
+ cardPrivate: string;
10126
+ signingIn: string;
10127
+ connectedAs: string;
10128
+ connected: string;
10129
+ connect: string;
10130
+ cardFailed: string;
10131
+ blockedTitle: string;
10132
+ blockedDescription: string;
10133
+ };
10086
10134
  };
10087
10135
  export default catalog;
package/dist/i18n/en.js CHANGED
@@ -99,6 +99,14 @@ const catalog = {
99
99
  "access": "Access",
100
100
  "actions": "Actions",
101
101
  "coolingDown": "Cooling down",
102
+ "keyVerified": "Verified: {provider} accepted this key",
103
+ "keyInvalid": "{provider} refused this key: {message}",
104
+ "keyUnchecked": "Not verified: {message}",
105
+ "checkKey": "Check again",
106
+ "savedVerified": "Key saved and verified",
107
+ "savedInvalid": "Key saved, but {provider} refused it: {message}",
108
+ "checkError": "The key could not be checked",
109
+ "openProviderInModels": "Open {provider} in Models",
102
110
  "member": "member",
103
111
  "members": "members",
104
112
  "actionsFor": "Actions for {label}",
@@ -170,7 +178,10 @@ const catalog = {
170
178
  "claudeConnectFailed": "The Claude sign-in did not finish. Try again.",
171
179
  "claudeReconnectDescription": "Sign in with Claude again. The account keeps its name, access, and session selections.",
172
180
  "claudeAccountLabelPlaceholder": "e.g. My Claude account",
173
- "claudeDeleteAccountConfirmTitle": "Delete this Claude account for everyone?"
181
+ "claudeDeleteAccountConfirmTitle": "Delete this Claude account for everyone?",
182
+ "sharedOnlyYouDescription": "Add API keys, ChatGPT accounts and Claude accounts. Only you can use the ones you add. A workspace manager can share one. Choose which ones each session uses.",
183
+ "oauthOnlyYouDescription": "Use your ChatGPT Plus or Pro plan in this workspace. Only you can use the accounts you add.",
184
+ "claudeOauthOnlyYouDescription": "Use your Claude Pro or Max plan for Claude models in this workspace. Only you can use the accounts you add."
174
185
  },
175
186
  "secrets": {
176
187
  "undecryptable": {
@@ -278,6 +289,7 @@ const catalog = {
278
289
  "repositoryLabel": "Repository",
279
290
  "loadingOptions": "Loading repository options…",
280
291
  "managedUnavailable": "Kortix-managed repositories are not available on this instance. A platform admin sets this up in the admin console.",
292
+ "githubAfterCreate": "To use your own GitHub for later workspaces, connect it in Workspace settings › Git once this one exists.",
281
293
  "installationUnreachable": "This GitHub connection no longer works. Reconnect it to list repositories.",
282
294
  "reconnect": "Reconnect in Git settings",
283
295
  "managedImportLabel": "Import an existing managed repository",
@@ -785,10 +797,6 @@ const catalog = {
785
797
  "name": "Network-Enforced Secrets",
786
798
  "description": "Control which tools and destinations can receive workspace secrets."
787
799
  },
788
- "pooled_provider_secrets": {
789
- "name": "Pooled Provider Secrets",
790
- "description": "Members connect their own ChatGPT subscriptions and provider keys, share them when needed, and choose which ones each session uses."
791
- },
792
800
  "reminders": {
793
801
  "name": "Loops",
794
802
  "description": "Let agents and people schedule check-ins on a session, once or on repeat. Each fire re-prompts that session. Adds loops to the Triggers list, the session loop chip, and `kortix loop`."
@@ -1488,7 +1496,11 @@ const catalog = {
1488
1496
  "claudePlan": "Pro or Max plan",
1489
1497
  "connectModel": "Connect model",
1490
1498
  "imagesUnsupported": "{model} can’t read images",
1491
- "imagesUnsupportedHint": "remove them or pick another model"
1499
+ "imagesUnsupportedHint": "remove them or pick another model",
1500
+ "noModelUpgradeReason": "No model: upgrade to the Credits plan or add your own provider key.",
1501
+ "noModelKeyReason": "No model: add your own provider key.",
1502
+ "noModelUpgradePlan": "Upgrade plan",
1503
+ "noModelAddProviderKey": "Add provider key"
1492
1504
  },
1493
1505
  "providerRecovery": {
1494
1506
  "savedPrompt": "Saved prompt",
@@ -1546,6 +1558,7 @@ const catalog = {
1546
1558
  "agentWorkingOnFor": "is working on {task} · {time}",
1547
1559
  "somethingWrong": "Something went wrong",
1548
1560
  "notSent": "Not sent",
1561
+ "computerDisconnected": "This session's computer is disconnected.",
1549
1562
  "retry": "Retry",
1550
1563
  "resume": "Resume",
1551
1564
  "agentIsWorking": "{agent} is working",
@@ -2166,9 +2179,6 @@ const catalog = {
2166
2179
  },
2167
2180
  "inbox": {
2168
2181
  "title": "Inbox",
2169
- "viewReview": "Review",
2170
- "viewNotifications": "Notifications",
2171
- "viewLabel": "Inbox view",
2172
2182
  "description": "Updates about the sessions, triggers, and artifacts that concern you, from every workspace.",
2173
2183
  "unreadLabel": "Inbox: {count} unread",
2174
2184
  "unreadCount": "{count} unread",
@@ -2694,6 +2704,8 @@ const catalog = {
2694
2704
  "checkConnection": "Check your connection, then retry."
2695
2705
  },
2696
2706
  "i18nComplete": {
2707
+ "noModelAddProviderKey": "Add provider key",
2708
+ "noModelUpgradePlan": "Upgrade plan",
2697
2709
  "text03217276a5f1": "Balance {value0} credits",
2698
2710
  "text0b6a47661327": "Unknown owner",
2699
2711
  "text1a9030082a20": "Create skill",
@@ -6835,6 +6847,12 @@ const catalog = {
6835
6847
  "noticeSignInTitle": "Sign in to {name}",
6836
6848
  "noticeSignInBody": "Kortix added {name}. Finish signing in so agents can use its tools.",
6837
6849
  "noticeSignInAction": "Sign in",
6850
+ "noticeSignInAgainTitle": "Sign in to {name} again",
6851
+ "noticeSignInAgainBody": "Its sign-in expired or was revoked. Agents cannot use {name} until you sign in again.",
6852
+ "noticeNoToolsTitle": "{name} has no tools",
6853
+ "noticeNoToolsBody": "It has no routes, so agents have nothing to call. Add routes to its routes spec in Settings.",
6854
+ "noticeAddRoutesAction": "Add routes",
6855
+ "statusNoTools": "No tools",
6838
6856
  "connectAccount": "Connect",
6839
6857
  "notSignedIn": "Not signed in",
6840
6858
  "credentialRejected": "Credential rejected: replace it",
@@ -7851,7 +7869,13 @@ const catalog = {
7851
7869
  },
7852
7870
  "triggerAutoPause": {
7853
7871
  "title": "Paused automatically",
7854
- "description": "It stopped starting runs for the reason below. Fix the cause, then resume it."
7872
+ "description": "It stopped starting runs for the reason below. Fix the cause, then resume it.",
7873
+ "billingTitle": "Paused: out of credits",
7874
+ "billingDescription": "No run can be paid for, so it stopped starting runs. It resumes by itself a few minutes after the wallet is topped up.",
7875
+ "modelTitle": "Paused: no model to run on",
7876
+ "modelDescription": "Automations use only model keys and accounts shared with the whole workspace, and none is usable. It resumes by itself a few minutes after you add one in Models.",
7877
+ "listBilling": "No credits",
7878
+ "listModel": "No model"
7855
7879
  },
7856
7880
  "featureGate": {
7857
7881
  "enable": "Enable {name}",
@@ -9983,7 +10007,7 @@ const catalog = {
9983
10007
  "apiKeysDescription": "Keys for scripts, CI and integrations. A key acts as you, an agent or a bot. The rules every key follows are in Security.",
9984
10008
  "keys": {
9985
10009
  "title": "API keys",
9986
- "description": "Keys for scripts, CI and integrations. A key works in this workspace only and acts as you, an agent or a bot.",
10010
+ "description": "Keys for scripts, CI and integrations. A key acts as you, an agent or a bot; Works in sets which workspaces it reaches.",
9987
10011
  "newKey": "New key",
9988
10012
  "count": "{count, plural, one {# key} other {# keys}}",
9989
10013
  "emptyTitle": "No API keys",
@@ -9993,6 +10017,10 @@ const catalog = {
9993
10017
  "actsAsAgent": "An agent",
9994
10018
  "actsAsBot": "A bot",
9995
10019
  "actsAsMeHint": "Your role in this workspace. The key stops working when you leave.",
10020
+ "worksIn": "Works in",
10021
+ "worksInAll": "All my workspaces",
10022
+ "worksInAllHint": "Acts as you in every workspace of yours, with your full role. Manage it under Preferences → Personal keys.",
10023
+ "worksInWorkspace": "Only this workspace",
9996
10024
  "actsAsAgentHint": "Exactly what the agent may do in kortix.yaml. Its actions are audited as the agent, and the key keeps working when you leave.",
9997
10025
  "actsAsBotHint": "A bot for CI or an integration, with its own role. The key keeps working when you leave.",
9998
10026
  "needsPermission": "Needs the permission to manage credentials",
@@ -10011,6 +10039,7 @@ const catalog = {
10011
10039
  "rowBot": "Bot · {name}",
10012
10040
  "createdBy": "Created by {email}",
10013
10041
  "createdDescription": "{name} acts as {actsAs}. Kortix shows the key once: copy it now and store it as a secret.",
10042
+ "createdPersonalDescription": "{name} acts as you in every workspace of yours — manage it under Preferences → Personal keys. Kortix shows the key once: copy it now and store it as a secret.",
10014
10043
  "accessFullHint": "Everything the key's principal may do in this workspace.",
10015
10044
  "accessCustomHint": "Only the permissions you pick. Each one must be something the key's principal may do."
10016
10045
  },
@@ -10083,6 +10112,25 @@ const catalog = {
10083
10112
  "gatewayBudgets": {
10084
10113
  "capWorkspace": "Cap gateway spend for this workspace.",
10085
10114
  "capMember": "Cap gateway spend for {who}."
10115
+ },
10116
+ "connectSignIn": {
10117
+ "openSignIn": "Open {app} sign-in",
10118
+ "checkingTitle": "Finishing sign-in",
10119
+ "checkingDescription": "Kortix checks your {app} sign-in. This page updates by itself.",
10120
+ "signInUnfinished": "Sign-in not finished",
10121
+ "finishSignIn": "Finish sign-in",
10122
+ "signInFinished": "Sign-in finished",
10123
+ "cardHeadline": "Your agent needs you to sign in",
10124
+ "cardTitle": "Connect {app}",
10125
+ "cardShared": "Shared with the workspace",
10126
+ "cardPrivate": "Only you",
10127
+ "signingIn": "Finish signing in to {app} in the window that opened.",
10128
+ "connectedAs": "Connected as {account}",
10129
+ "connected": "Connected",
10130
+ "connect": "Connect",
10131
+ "cardFailed": "Could not connect {app}. Try again.",
10132
+ "blockedTitle": "Open {app} to sign in",
10133
+ "blockedDescription": "Your browser blocked the sign-in window. Open it with the button below. This page updates by itself."
10086
10134
  }
10087
10135
  };
10088
10136
  export default catalog;
@@ -39,8 +39,14 @@ export interface CreditTier {
39
39
  /** The tier ladder, smallest first. Mirrors `PLAN_PRESETS` in apps/api. */
40
40
  export declare const CREDIT_TIERS: readonly CreditTier[];
41
41
  export declare const CREDIT_TIER_GROUPS: readonly CreditTierGroup[];
42
- /** The tier a page opens on: the most popular one. */
42
+ /** The tier the marketing /pricing page opens on: the most popular one. */
43
43
  export declare const DEFAULT_TIER_USD: number;
44
+ /**
45
+ * The tier an in-app upgrade opens on for an account with no plan: the
46
+ * smallest one, the "From $50" price the Credits card names. Opening on a
47
+ * larger tier quotes a price the copy never mentioned.
48
+ */
49
+ export declare const ENTRY_TIER_USD: number;
44
50
  /** The ladder tier for an amount, or `undefined` for an amount off the ladder (a legacy plan). */
45
51
  export declare function tierForMonthlyUsd(monthlyUsd: number | null | undefined): CreditTier | undefined;
46
52
  /** Whether `monthlyUsd` is an amount the API accepts: a whole dollar in range. */
@@ -57,8 +57,14 @@ export const CREDIT_TIERS = [
57
57
  { monthlyUsd: 50_000, group: 'large' },
58
58
  ];
59
59
  export const CREDIT_TIER_GROUPS = ['small', 'growing', 'scale', 'large'];
60
- /** The tier a page opens on: the most popular one. */
60
+ /** The tier the marketing /pricing page opens on: the most popular one. */
61
61
  export const DEFAULT_TIER_USD = CREDIT_TIERS.find((tier) => tier.popular).monthlyUsd;
62
+ /**
63
+ * The tier an in-app upgrade opens on for an account with no plan: the
64
+ * smallest one, the "From $50" price the Credits card names. Opening on a
65
+ * larger tier quotes a price the copy never mentioned.
66
+ */
67
+ export const ENTRY_TIER_USD = CREDIT_TIERS[0].monthlyUsd;
62
68
  /** The ladder tier for an amount, or `undefined` for an amount off the ladder (a legacy plan). */
63
69
  export function tierForMonthlyUsd(monthlyUsd) {
64
70
  return CREDIT_TIERS.find((tier) => tier.monthlyUsd === monthlyUsd);
@@ -5,7 +5,8 @@
5
5
  * no sidebar row and no card in Apps and extensions. Off on every deployment
6
6
  * until launch: the probe below logged a 404 in the console on staging and
7
7
  * prod, where the API's KORTIX_CHROME_ENABLED is off. Set true to bring the
8
- * surfaces back where the API serves the routes.
8
+ * surfaces back where the API serves the routes. The value is
9
+ * `CHROME_LAUNCHED`, which the API and the CLI read too.
9
10
  */
10
11
  export declare const CHROME_UI_ENABLED = false;
11
12
  /**
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { listChromeConnections } from '@kortix/sdk';
3
3
  import { chromeKeys } from '@kortix/sdk/react';
4
+ import { CHROME_LAUNCHED } from '../../_vendor/kortix-shared.js';
4
5
  import { useQuery } from '@tanstack/react-query';
5
6
  /**
6
7
  * The web app's master switch for Kortix in Chrome. Off, no surface renders
@@ -8,9 +9,10 @@ import { useQuery } from '@tanstack/react-query';
8
9
  * no sidebar row and no card in Apps and extensions. Off on every deployment
9
10
  * until launch: the probe below logged a 404 in the console on staging and
10
11
  * prod, where the API's KORTIX_CHROME_ENABLED is off. Set true to bring the
11
- * surfaces back where the API serves the routes.
12
+ * surfaces back where the API serves the routes. The value is
13
+ * `CHROME_LAUNCHED`, which the API and the CLI read too.
12
14
  */
13
- export const CHROME_UI_ENABLED = false;
15
+ export const CHROME_UI_ENABLED = CHROME_LAUNCHED;
14
16
  /**
15
17
  * Whether this platform offers Kortix in Chrome at all. The API answers 404
16
18
  * on /v1/chrome/* where KORTIX_CHROME_ENABLED is off (staging, prod), so the
@@ -0,0 +1,10 @@
1
+ /** @internal Kortix apps only. No semver: it may change in any release. */
2
+ import type { QueryClient } from '@tanstack/react-query';
3
+ /**
4
+ * The query keys every connection read uses (`sections/connector-connection-form`
5
+ * read them here before the form's own need was the only one). The SDK's `qk`
6
+ * plus the ad-hoc keys the panels hand to their queries.
7
+ */
8
+ export declare function connectorConnectionQueryKeys(projectId: string): readonly [readonly ["kx", "project", string, "connectors"], readonly ["connections", string], readonly ["connections-all", string], readonly ["session-scope-catalog", string]];
9
+ /** Invalidate every connection read: an account row changed somewhere else. */
10
+ export declare function invalidateConnections(client: QueryClient, projectId: string): Promise<(void | undefined)[]>;
@@ -0,0 +1,18 @@
1
+ import { qk } from '@kortix/sdk/react';
2
+ /**
3
+ * The query keys every connection read uses (`sections/connector-connection-form`
4
+ * read them here before the form's own need was the only one). The SDK's `qk`
5
+ * plus the ad-hoc keys the panels hand to their queries.
6
+ */
7
+ export function connectorConnectionQueryKeys(projectId) {
8
+ return [
9
+ qk.project.connectors(projectId),
10
+ ['connections', projectId],
11
+ ['connections-all', projectId],
12
+ ['session-scope-catalog', projectId],
13
+ ];
14
+ }
15
+ /** Invalidate every connection read: an account row changed somewhere else. */
16
+ export function invalidateConnections(client, projectId) {
17
+ return Promise.all(connectorConnectionQueryKeys(projectId).map((queryKey) => client.invalidateQueries({ queryKey }).catch(() => undefined)));
18
+ }
@@ -0,0 +1,13 @@
1
+ /** @internal Kortix apps only. No semver: it may change in any release. */
2
+ import { type Connection } from '@kortix/sdk';
3
+ /**
4
+ * Finish the sign-in of one account whose sign-in started and never finished
5
+ * (an agent's link the person used outside Kortix, an abandoned window).
6
+ *
7
+ * The window opens inside the click. The first request asks the provider: a
8
+ * sign-in that already finished there is recorded and the window closes. Only
9
+ * an unfinished one goes on to a new sign-in page for the same account.
10
+ */
11
+ export declare function useFinishSignIn(projectId: string, slug: string, onConnected: () => void): import("@tanstack/react-query").UseMutationResult<{
12
+ connected: true;
13
+ }, Error, Pick<Connection, "owner_type" | "connection_id">, unknown>;
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ import { connectionSignInSteps } from '@kortix/sdk';
3
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
4
+ import { invalidateConnections } from './invalidate-connections.js';
5
+ import { useTranslations } from '../../../i18n/index.js';
6
+ import { errorToast, successToast } from '../../../primitives/toast.js';
7
+ import { runConnectLinkFlow } from './use-connect-link.js';
8
+ /**
9
+ * Finish the sign-in of one account whose sign-in started and never finished
10
+ * (an agent's link the person used outside Kortix, an abandoned window).
11
+ *
12
+ * The window opens inside the click. The first request asks the provider: a
13
+ * sign-in that already finished there is recorded and the window closes. Only
14
+ * an unfinished one goes on to a new sign-in page for the same account.
15
+ */
16
+ export function useFinishSignIn(projectId, slug, onConnected) {
17
+ const t = useTranslations('connectSignIn');
18
+ const queryClient = useQueryClient();
19
+ return useMutation({
20
+ mutationFn: async (account) => {
21
+ const steps = connectionSignInSteps(projectId, slug, account);
22
+ return runConnectLinkFlow(steps.start, steps.finalize);
23
+ },
24
+ onSuccess: () => {
25
+ successToast(t('signInFinished'));
26
+ onConnected();
27
+ },
28
+ onError: (error) => errorToast(error.message),
29
+ // Settled either way: a window closed before the provider answered still
30
+ // left the account row, and every list must show it without a reload.
31
+ onSettled: () => invalidateConnections(queryClient, projectId),
32
+ });
33
+ }
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import { useMutation } from '@tanstack/react-query';
2
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
3
+ import { invalidateConnections } from './invalidate-connections.js';
3
4
  import { useTranslations } from '../../../i18n/index.js';
4
5
  import { errorToast, successToast } from '../../../primitives/toast.js';
5
6
  import { runConnectLinkFlow } from './use-connect-link.js';
@@ -9,6 +10,7 @@ import { pipedreamConnectConnection, pipedreamFinalizeConnection, reconcileMembe
9
10
  */
10
11
  export function usePipedreamConnectMember(projectId, slug, onConnected) {
11
12
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
13
+ const queryClient = useQueryClient();
12
14
  return useMutation({
13
15
  mutationFn: async (input) => {
14
16
  let connectionId = null;
@@ -34,5 +36,8 @@ export function usePipedreamConnectMember(projectId, slug, onConnected) {
34
36
  onConnected();
35
37
  },
36
38
  onError: (err) => errorToast(err.message),
39
+ // Settled either way: a window closed before the provider answered still
40
+ // left the account row, and every list must show it without a reload.
41
+ onSettled: () => invalidateConnections(queryClient, projectId),
37
42
  });
38
43
  }
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import { useMutation } from '@tanstack/react-query';
2
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
3
+ import { invalidateConnections } from './invalidate-connections.js';
3
4
  import { useTranslations } from '../../../i18n/index.js';
4
5
  import { errorToast, successToast } from '../../../primitives/toast.js';
5
6
  import { runConnectLinkFlow } from './use-connect-link.js';
@@ -11,6 +12,7 @@ export { DEFAULT_PROJECT_CONNECTION_LABEL, isSharedDefaultConnectConflict, proje
11
12
  */
12
13
  export function usePipedreamConnectProject(projectId, slug, onConnected) {
13
14
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
15
+ const queryClient = useQueryClient();
14
16
  return useMutation({
15
17
  mutationFn: async (input) => {
16
18
  const steps = projectConnectSteps(projectId, slug, input?.label, sdkProjectConnectDeps, input?.beforeAuthorize);
@@ -24,5 +26,8 @@ export function usePipedreamConnectProject(projectId, slug, onConnected) {
24
26
  onConnected();
25
27
  },
26
28
  onError: (error) => errorToast(error.message),
29
+ // Settled either way: a window closed before the provider answered still
30
+ // left the account row, and every list must show it without a reload.
31
+ onSettled: () => invalidateConnections(queryClient, projectId),
27
32
  });
28
33
  }
@@ -53,6 +53,8 @@ export type NewProjectSessionOpts = {
53
53
  */
54
54
  onCreating?: (sessionId: string) => void;
55
55
  onError?: () => void;
56
+ /** Keep the submission pending while the connector gate owns its retry. */
57
+ deferConnectorRecovery?: boolean;
56
58
  scope?: SessionScopeCommit;
57
59
  create?: {
58
60
  sandbox_slug?: string;
@@ -192,6 +192,7 @@ export function useNewProjectSession(projectId) {
192
192
  projectId,
193
193
  connectorConnections,
194
194
  retry: () => startRef.current(opts),
195
+ onCancel: opts.deferConnectorRecovery ? opts.onError : undefined,
195
196
  });
196
197
  }
197
198
  else {
@@ -204,7 +205,9 @@ export function useNewProjectSession(projectId) {
204
205
  // No navigation happened, so release the claim now — the user stays
205
206
  // where they are and must be able to try again immediately.
206
207
  release();
207
- opts?.onError?.();
208
+ if (!(action === 'connect' && getRequiredConnectorConnections(err) && opts.deferConnectorRecovery)) {
209
+ opts?.onError?.();
210
+ }
208
211
  });
209
212
  }, [
210
213
  // `billingLoading` / `canRun` are deliberately absent: they are read
@@ -61,6 +61,6 @@ export declare function useSessionsAwaitingAnswer(projectId: string): ReadonlySe
61
61
  * What waits on the person in this workspace's Review: the review summary's
62
62
  * "needs you", plus the agents' questions and permission asks
63
63
  * (`useSessionAsks`). Connector approvals are already in the summary. The
64
- * Inbox's Review tab and the workspace menu's Inbox row show this number.
64
+ * sidebar's Review row (`project-spaces-nav`) shows this number.
65
65
  */
66
66
  export declare function useReviewNeedsYouCount(projectId: string): number;
@@ -97,7 +97,7 @@ export function useSessionsAwaitingAnswer(projectId) {
97
97
  * What waits on the person in this workspace's Review: the review summary's
98
98
  * "needs you", plus the agents' questions and permission asks
99
99
  * (`useSessionAsks`). Connector approvals are already in the summary. The
100
- * Inbox's Review tab and the workspace menu's Inbox row show this number.
100
+ * sidebar's Review row (`project-spaces-nav`) shows this number.
101
101
  */
102
102
  export function useReviewNeedsYouCount(projectId) {
103
103
  const reviewNeedsYou = useReviewSessionSummary(projectId, { enabled: !!projectId }).totalNeedsYou;