@kortix/ui 0.15.9 → 0.15.11

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 (202) hide show
  1. package/dist/_vendor/kortix-shared.js +467 -2
  2. package/dist/_vendor/shared/app-config.d.ts +6 -30
  3. package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
  4. package/dist/_vendor/shared/channel-header.d.ts +2 -1
  5. package/dist/_vendor/shared/connector-sections.d.ts +0 -25
  6. package/dist/_vendor/shared/file-tags.d.ts +2 -1
  7. package/dist/_vendor/shared/index.d.ts +1 -0
  8. package/dist/_vendor/shared/pasted-content.d.ts +0 -4
  9. package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
  10. package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
  11. package/dist/_vendor/shared/session/attachment-tile.d.ts +32 -0
  12. package/dist/_vendor/shared/session/stop-refusal.d.ts +15 -0
  13. package/dist/_vendor/shared/session/tool-row-text.d.ts +58 -0
  14. package/dist/_vendor/shared/session-delivery.d.ts +2 -0
  15. package/dist/customize/agents/agent-model-view.d.ts +11 -1
  16. package/dist/customize/agents/agent-model-view.js +12 -1
  17. package/dist/customize/agents/agent-page.js +19 -6
  18. package/dist/customize/agents/agent-tabs.d.ts +2 -0
  19. package/dist/customize/agents/agent-tabs.js +2 -0
  20. package/dist/customize/connectors/connectors-page.js +1 -1
  21. package/dist/customize/connectors/detail/connector-page.js +9 -4
  22. package/dist/customize/connectors/detail/connector-triggers.js +1 -1
  23. package/dist/customize/connectors/install/use-install.js +1 -1
  24. package/dist/customize/connectors/use-agent-access.d.ts +1 -0
  25. package/dist/customize/providers/provider-accordion.js +5 -5
  26. package/dist/customize/providers/provider-connect.d.ts +3 -3
  27. package/dist/customize/providers/provider-connect.js +8 -16
  28. package/dist/customize/providers/provider-sheet.js +4 -4
  29. package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
  30. package/dist/customize/sections/connector-connection-form.d.ts +0 -1
  31. package/dist/customize/sections/connector-connection-form.js +0 -9
  32. package/dist/customize/sections/view/review-center-connected.js +7 -3
  33. package/dist/customize/settings/tabs/workspace-keys.js +53 -11
  34. package/dist/customize/shared/feature-gate-screen.js +1 -1
  35. package/dist/customize/triggers/runtime-triggers.js +13 -2
  36. package/dist/customize/triggers/schedule/event-account-picker.js +1 -1
  37. package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
  38. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
  39. package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
  40. package/dist/customize/triggers/schedule/then-fields.js +23 -3
  41. package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
  42. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
  43. package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
  44. package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
  45. package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
  46. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
  47. package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
  48. package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
  49. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
  50. package/dist/customize/triggers/schedule/use-event-app-connect.js +2 -1
  51. package/dist/customize/triggers/schedule/when-event.js +1 -1
  52. package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
  53. package/dist/customize/triggers/schedule/when-schedule.js +16 -1
  54. package/dist/customize/triggers/schedule-view.js +4 -2
  55. package/dist/i18n/en.d.ts +56 -7
  56. package/dist/i18n/en.js +65 -16
  57. package/dist/internal/billing/compute-pricing.d.ts +7 -1
  58. package/dist/internal/billing/compute-pricing.js +7 -1
  59. package/dist/internal/hooks/connectors/invalidate-connections.d.ts +10 -0
  60. package/dist/internal/hooks/connectors/invalidate-connections.js +18 -0
  61. package/dist/internal/hooks/connectors/use-finish-sign-in.js +1 -1
  62. package/dist/internal/hooks/connectors/use-pipedream-connect-member.js +1 -1
  63. package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +1 -1
  64. package/dist/internal/hooks/projects/use-new-project-session.d.ts +2 -0
  65. package/dist/internal/hooks/projects/use-new-project-session.js +4 -1
  66. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  67. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  68. package/dist/internal/layout/project-settings-nav.d.ts +17 -0
  69. package/dist/internal/layout/project-settings-nav.js +24 -0
  70. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +2 -2
  71. package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
  72. package/dist/internal/lib/capability-tab-routes.js +11 -0
  73. package/dist/internal/notifications/notification-inbox.d.ts +4 -10
  74. package/dist/internal/notifications/notification-inbox.js +8 -9
  75. package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
  76. package/dist/internal/stores/composer-prefill-store.js +1 -0
  77. package/dist/internal/stores/connector-gate-store.d.ts +3 -1
  78. package/dist/internal/stores/connector-gate-store.js +13 -3
  79. package/dist/internal/stores/upgrade-dialog-store.d.ts +4 -0
  80. package/dist/internal/stores/upgrade-dialog-store.js +2 -0
  81. package/dist/lib/routes.d.ts +4 -11
  82. package/dist/lib/routes.js +3 -5
  83. package/dist/markdown/unified-markdown-utils.d.ts +7 -0
  84. package/dist/markdown/unified-markdown-utils.js +19 -0
  85. package/dist/markdown/unified-markdown.js +16 -3
  86. package/dist/primitives/alert-dialog.js +1 -1
  87. package/dist/primitives/dialog.js +3 -1
  88. package/dist/primitives/drawer.js +1 -1
  89. package/dist/primitives/modal.js +1 -1
  90. package/dist/primitives/preview-image.js +1 -1
  91. package/dist/primitives/sheet.js +1 -1
  92. package/dist/session/actions/session-label.js +2 -2
  93. package/dist/session/agents/agent-strip.d.ts +10 -5
  94. package/dist/session/agents/agent-strip.js +40 -12
  95. package/dist/session/agents/held-messages.d.ts +6 -2
  96. package/dist/session/agents/held-messages.js +6 -3
  97. package/dist/session/composer/ComposerCard.js +8 -3
  98. package/dist/session/composer/agent-selector.d.ts +2 -0
  99. package/dist/session/composer/agent-selector.js +5 -0
  100. package/dist/session/composer/attachment-tile.d.ts +2 -26
  101. package/dist/session/composer/attachment-tile.js +3 -47
  102. package/dist/session/composer/composer-chat-input.d.ts +3 -1
  103. package/dist/session/composer/composer-chat-input.js +2 -2
  104. package/dist/session/composer/composer-logic.d.ts +7 -0
  105. package/dist/session/composer/composer-logic.js +18 -0
  106. package/dist/session/composer/composer-reset.d.ts +8 -14
  107. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  108. package/dist/session/composer/composer-toolbar.js +3 -3
  109. package/dist/session/composer/composer.d.ts +9 -0
  110. package/dist/session/composer/composer.js +22 -11
  111. package/dist/session/composer/draft/home-composer-focus-handoff.d.ts +7 -0
  112. package/dist/session/composer/draft/home-composer-focus-handoff.js +94 -0
  113. package/dist/session/composer/draft/use-composer-draft.d.ts +3 -1
  114. package/dist/session/composer/draft/use-composer-draft.js +22 -2
  115. package/dist/session/composer/editor/composer-editor.d.ts +4 -2
  116. package/dist/session/composer/editor/composer-editor.js +13 -7
  117. package/dist/session/composer/hooks/use-composer-focus.js +4 -2
  118. package/dist/session/header/session-site-header.d.ts +3 -1
  119. package/dist/session/header/session-site-header.js +3 -2
  120. package/dist/session/index.d.ts +1 -0
  121. package/dist/session/index.js +1 -0
  122. package/dist/session/models/chatgpt-connection-button.js +5 -9
  123. package/dist/session/models/connect-model-step.d.ts +29 -0
  124. package/dist/session/models/connect-model-step.js +50 -0
  125. package/dist/session/models/model-connection-gate.d.ts +2 -1
  126. package/dist/session/models/model-connection-gate.js +6 -3
  127. package/dist/session/models/model-connection-layout.d.ts +2 -0
  128. package/dist/session/models/model-connection-layout.js +4 -0
  129. package/dist/session/models/model-selector.d.ts +1 -1
  130. package/dist/session/models/model-selector.js +9 -6
  131. package/dist/session/models/subscription-offer.d.ts +4 -0
  132. package/dist/session/models/subscription-offer.js +11 -3
  133. package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
  134. package/dist/session/models/use-workspace-model-gate.js +62 -0
  135. package/dist/session/models/workspace-model-gate.d.ts +46 -0
  136. package/dist/session/models/workspace-model-gate.js +66 -0
  137. package/dist/session/overrides/session-overrides-toolbar.js +2 -4
  138. package/dist/session/prompts/ask-deck.d.ts +5 -1
  139. package/dist/session/prompts/ask-deck.js +15 -3
  140. package/dist/session/prompts/question-labels.d.ts +16 -0
  141. package/dist/session/prompts/question-labels.js +34 -0
  142. package/dist/session/prompts/question-prompt.js +6 -6
  143. package/dist/session/prompts/session-connect-card.d.ts +63 -0
  144. package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
  145. package/dist/session/status/provisioning-failure.d.ts +23 -2
  146. package/dist/session/status/provisioning-failure.js +53 -3
  147. package/dist/session/status/stop-refusal.d.ts +6 -12
  148. package/dist/session/status/stop-refusal.js +6 -19
  149. package/dist/session/thread/agent-run-props.d.ts +19 -0
  150. package/dist/session/thread/agent-run-props.js +54 -0
  151. package/dist/session/thread/session-chat.js +317 -298
  152. package/dist/session/thread/transcript.d.ts +19 -2
  153. package/dist/session/thread/transcript.js +93 -25
  154. package/dist/session/tool/tool-part-renderer.js +7 -2
  155. package/dist/session/tool/tools/bash-tool.d.ts +3 -52
  156. package/dist/session/tool/tools/bash-tool.js +3 -86
  157. package/dist/session/tool/tools/kortix-action-tool.js +10 -2
  158. package/dist/session/turn/answer-streaming.d.ts +21 -0
  159. package/dist/session/turn/answer-streaming.js +34 -0
  160. package/dist/session/turn/queued-prompt-bubbles.d.ts +5 -0
  161. package/dist/session/turn/queued-prompt-bubbles.js +12 -0
  162. package/dist/session/turn/turn-viewport.d.ts +66 -10
  163. package/dist/session/turn/turn-viewport.js +92 -12
  164. package/dist/session/turn/turn-work-accordion.d.ts +3 -1
  165. package/dist/session/turn/turn-work-accordion.js +2 -2
  166. package/dist/session/turn/user-message.js +7 -5
  167. package/dist/styles.css +1 -1
  168. package/dist/test-utils/intl.d.ts +56 -7
  169. package/dist/workspace/admin/project-admin-dashboard.js +2 -4
  170. package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
  171. package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
  172. package/dist/workspace/home/first-chat.d.ts +7 -1
  173. package/dist/workspace/home/first-chat.js +12 -5
  174. package/dist/workspace/home/no-agent-home.d.ts +3 -1
  175. package/dist/workspace/home/no-agent-home.js +2 -2
  176. package/dist/workspace/inbox/workspace-inbox.d.ts +6 -16
  177. package/dist/workspace/inbox/workspace-inbox.js +9 -51
  178. package/dist/workspace/layout/project-home.js +17 -16
  179. package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
  180. package/dist/workspace/layout/use-project-home-send.js +29 -15
  181. package/dist/workspace/new/advanced-fields.d.ts +4 -1
  182. package/dist/workspace/new/advanced-fields.js +2 -2
  183. package/dist/workspace/new/workspace-name.d.ts +9 -0
  184. package/dist/workspace/new/workspace-name.js +20 -0
  185. package/dist/workspace/projects/session-starter.d.ts +6 -4
  186. package/dist/workspace/projects/session-starter.js +8 -14
  187. package/dist/workspace/review/review-center.d.ts +6 -2
  188. package/dist/workspace/review/review-center.js +45 -25
  189. package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
  190. package/dist/workspace/sidebar/session-grouping.js +1 -1
  191. package/dist/workspace/sidebar/workspace-menu-model.d.ts +3 -5
  192. package/dist/workspace/sidebar/workspace-menu-model.js +1 -1
  193. package/dist/workspace/spaces/space-details-panel.js +2 -2
  194. package/dist/workspace/spaces/space-triggers.js +2 -2
  195. package/dist/workspace/spaces/space-view.js +11 -5
  196. package/package.json +15 -7
  197. package/skills/kortix-ui/references/modules.md +1 -1
  198. package/dist/customize/connectors/invalidate-connections.d.ts +0 -2
  199. package/dist/customize/connectors/invalidate-connections.js +0 -4
  200. package/dist/internal/notifications/use-inbox-summary.d.ts +0 -17
  201. package/dist/internal/notifications/use-inbox-summary.js +0 -28
  202. package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
package/dist/i18n/en.js CHANGED
@@ -289,6 +289,7 @@ const catalog = {
289
289
  "repositoryLabel": "Repository",
290
290
  "loadingOptions": "Loading repository options…",
291
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.",
292
293
  "installationUnreachable": "This GitHub connection no longer works. Reconnect it to list repositories.",
293
294
  "reconnect": "Reconnect in Git settings",
294
295
  "managedImportLabel": "Import an existing managed repository",
@@ -796,10 +797,6 @@ const catalog = {
796
797
  "name": "Network-Enforced Secrets",
797
798
  "description": "Control which tools and destinations can receive workspace secrets."
798
799
  },
799
- "pooled_provider_secrets": {
800
- "name": "Pooled Provider Secrets",
801
- "description": "Members connect their own ChatGPT subscriptions and provider keys, share them when needed, and choose which ones each session uses."
802
- },
803
800
  "reminders": {
804
801
  "name": "Loops",
805
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`."
@@ -859,6 +856,10 @@ const catalog = {
859
856
  "spaces_proactive": {
860
857
  "name": "Spaces-Proactive",
861
858
  "description": "With Spaces on, a space can watch itself: turn on Proactive in its details, and an agent reads what happens there (finished threads, questions left open, people who join) and writes in the chat only when it matters: a result worth sharing, a decision you need to make, or something overdue. It can also start a thread that does the work. Optional daily brief at 9:00."
859
+ },
860
+ "program_agents": {
861
+ "name": "Program agents",
862
+ "description": "An agent that runs your code instead of a model. Give an agent `run: <command>` in kortix.yaml: each turn runs that command in the session's sandbox, with the agent's workspace, secrets and access. The message or trigger payload is the input, and what the command prints is the reply."
862
863
  }
863
864
  },
864
865
  "channelsSwitch": {
@@ -1230,7 +1231,7 @@ const catalog = {
1230
1231
  "email": "Email",
1231
1232
  "scheduled": "Scheduled",
1232
1233
  "webhook": "Webhook",
1233
- "event": "App event",
1234
+ "event": "Connector event",
1234
1235
  "manual": "Manual",
1235
1236
  "all": "All"
1236
1237
  },
@@ -1503,7 +1504,13 @@ const catalog = {
1503
1504
  "noModelUpgradeReason": "No model: upgrade to the Credits plan or add your own provider key.",
1504
1505
  "noModelKeyReason": "No model: add your own provider key.",
1505
1506
  "noModelUpgradePlan": "Upgrade plan",
1506
- "noModelAddProviderKey": "Add provider key"
1507
+ "noModelAddProviderKey": "Add provider key",
1508
+ "stepTitle": "Connect a model",
1509
+ "stepBody": "Agents in {workspace} need a model to answer. Connect your ChatGPT or Claude plan, or add a provider key.",
1510
+ "stepBodyUpgrade": "Agents in {workspace} need a model to answer. Connect your ChatGPT or Claude plan, add a provider key, or upgrade to the Credits plan for Kortix models.",
1511
+ "stepBodyMember": "Agents in {workspace} need a model to answer. Connect your own ChatGPT or Claude plan or provider key, or ask someone who manages this workspace to connect a model for everyone.",
1512
+ "stepThisWorkspace": "this workspace",
1513
+ "stepBack": "Back to workspaces"
1507
1514
  },
1508
1515
  "providerRecovery": {
1509
1516
  "savedPrompt": "Saved prompt",
@@ -1561,6 +1568,7 @@ const catalog = {
1561
1568
  "agentWorkingOnFor": "is working on {task} · {time}",
1562
1569
  "somethingWrong": "Something went wrong",
1563
1570
  "notSent": "Not sent",
1571
+ "computerDisconnected": "This session's computer is disconnected.",
1564
1572
  "retry": "Retry",
1565
1573
  "resume": "Resume",
1566
1574
  "agentIsWorking": "{agent} is working",
@@ -2181,9 +2189,6 @@ const catalog = {
2181
2189
  },
2182
2190
  "inbox": {
2183
2191
  "title": "Inbox",
2184
- "viewReview": "Review",
2185
- "viewNotifications": "Notifications",
2186
- "viewLabel": "Inbox view",
2187
2192
  "description": "Updates about the sessions, triggers, and artifacts that concern you, from every workspace.",
2188
2193
  "unreadLabel": "Inbox: {count} unread",
2189
2194
  "unreadCount": "{count} unread",
@@ -6214,7 +6219,16 @@ const catalog = {
6214
6219
  "text765a8cb04cf5": "LLM Hold Refund",
6215
6220
  "texta68ee4167406": "Proxy",
6216
6221
  "texta69c4dece144": "Storage",
6217
- "textab3aff8f7642": "Top-up Bonus"
6222
+ "textab3aff8f7642": "Top-up Bonus",
6223
+ "text30b9ce09f406": "Enter a period such as 15m, 1h or 1d, at least 1m.",
6224
+ "text28d33d2ad989": "Choose the App to call",
6225
+ "textd777d7805cfa": "Enter a path that starts with /",
6226
+ "text8043e69a8dd6": "Delete trigger",
6227
+ "textd6fa1626e3af": "Connector event created",
6228
+ "textccf59f978ef6": "No connector events here yet",
6229
+ "text82cbc4a4def0": "Connector events are not set up on this deployment, so no connector can send them yet.",
6230
+ "text458ceb31019b": "Connector event triggers",
6231
+ "text27ca9df9dbaa": "Connector event triggers are off"
6218
6232
  },
6219
6233
  "publicShareConfirm": {
6220
6234
  "title": "Create a public link?",
@@ -6605,6 +6619,8 @@ const catalog = {
6605
6619
  "llmEstimateLabel": "LLM estimate:"
6606
6620
  },
6607
6621
  "triggerComposer": {
6622
+ "programInputPlaceholder": "Empty: the program reads the trigger's payload as JSON",
6623
+ "programInputHelp": "This agent runs a program. It reads this text on stdin. Leave it empty to send the whole payload as JSON: the event, webhook body or schedule details, plus the trigger's static payload.",
6608
6624
  "every": "Every",
6609
6625
  "dayOfMonth": "Day of month",
6610
6626
  "details": "Details",
@@ -6642,7 +6658,16 @@ const catalog = {
6642
6658
  "crBranchHelp": "Runs when a change request merges into this branch, or into any branch when it is empty. The instruction can read <code>change_request.number</code>, <code>change_request.title</code> and <code>change_request.base_ref</code>.",
6643
6659
  "eventsOff": "Connector events are in beta and off for this workspace. Turn them on under Feature flags in Workspace admin.",
6644
6660
  "noApps": "No App in this workspace sends events yet. Deploy an App that POSTs to <code>KORTIX_APP_EVENTS_URL</code>, then pick it here.",
6645
- "openApps": "Open Apps"
6661
+ "openApps": "Open Apps",
6662
+ "thenLabel": "What a fire does",
6663
+ "thenAgent": "Run an agent",
6664
+ "thenApp": "Call an App",
6665
+ "targetPath": "Path",
6666
+ "targetMethod": "Method",
6667
+ "targetHelp": "Each fire wakes the App and sends the payload to this path. No agent runs.",
6668
+ "intervalLabel": "Repeats every",
6669
+ "intervalHelp": "A fixed period such as 15m, 1h or 1d.",
6670
+ "useCalendar": "Use a calendar schedule"
6646
6671
  },
6647
6672
  "gatewayAccess": {
6648
6673
  "heroTitle": "Use this workspace's models anywhere",
@@ -6915,7 +6940,7 @@ const catalog = {
6915
6940
  "infoRunsThrough": "Provider",
6916
6941
  "infoSignsInWith": "Signs in with",
6917
6942
  "infoCategory": "Category",
6918
- "infoAppEvents": "App events",
6943
+ "infoAppEvents": "Events",
6919
6944
  "infoAppEventsYes": "Supported",
6920
6945
  "authOAuth": "OAuth sign-in",
6921
6946
  "authApiKey": "API key",
@@ -7844,9 +7869,9 @@ const catalog = {
7844
7869
  },
7845
7870
  "automationsPause": {
7846
7871
  "groupTitle": "Triggers",
7847
- "groupDescription": "Schedules, loops, webhooks, app events and monitors in this workspace.",
7872
+ "groupDescription": "Schedules, loops, webhooks, connector events and App events in this workspace.",
7848
7873
  "label": "Pause all triggers",
7849
- "description": "Nothing in this workspace runs on its own: no schedule, loop, webhook, app event or monitor. Running a trigger by hand still works.",
7874
+ "description": "Nothing in this workspace runs on its own: no schedule, loop, webhook, connector event or App event. Running a trigger by hand still works.",
7850
7875
  "readOnlyDescription": "Only an owner or admin can pause or resume triggers.",
7851
7876
  "pausedSince": "Paused since {date}.",
7852
7877
  "pauseTitle": "Pause all triggers?",
@@ -8273,6 +8298,11 @@ const catalog = {
8273
8298
  }
8274
8299
  },
8275
8300
  "modelView": {
8301
+ "programTimeout": "Time limit",
8302
+ "programTimeoutHelp": "A run that takes longer is stopped and the turn fails. From 1s to 6h, such as 30m or 2h. Empty: 30m.",
8303
+ "programTitle": "Program",
8304
+ "programCommand": "Command",
8305
+ "programHelp": "Each turn runs this command in the session's sandbox instead of a model. The message arrives on stdin and in $KORTIX_EVENT_PATH. What it prints is the reply. A non-zero exit fails the turn.",
8276
8306
  "title": "Model",
8277
8307
  "help": "How this agent thinks.",
8278
8308
  "projectDefault": "Workspace default",
@@ -10012,7 +10042,7 @@ const catalog = {
10012
10042
  "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.",
10013
10043
  "keys": {
10014
10044
  "title": "API keys",
10015
- "description": "Keys for scripts, CI and integrations. A key works in this workspace only and acts as you, an agent or a bot.",
10045
+ "description": "Keys for scripts, CI and integrations. A key acts as you, an agent or a bot; Works in sets which workspaces it reaches.",
10016
10046
  "newKey": "New key",
10017
10047
  "count": "{count, plural, one {# key} other {# keys}}",
10018
10048
  "emptyTitle": "No API keys",
@@ -10022,6 +10052,10 @@ const catalog = {
10022
10052
  "actsAsAgent": "An agent",
10023
10053
  "actsAsBot": "A bot",
10024
10054
  "actsAsMeHint": "Your role in this workspace. The key stops working when you leave.",
10055
+ "worksIn": "Works in",
10056
+ "worksInAll": "All my workspaces",
10057
+ "worksInAllHint": "Acts as you in every workspace of yours, with your full role. Manage it under Preferences → Personal keys.",
10058
+ "worksInWorkspace": "Only this workspace",
10025
10059
  "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.",
10026
10060
  "actsAsBotHint": "A bot for CI or an integration, with its own role. The key keeps working when you leave.",
10027
10061
  "needsPermission": "Needs the permission to manage credentials",
@@ -10040,6 +10074,7 @@ const catalog = {
10040
10074
  "rowBot": "Bot · {name}",
10041
10075
  "createdBy": "Created by {email}",
10042
10076
  "createdDescription": "{name} acts as {actsAs}. Kortix shows the key once: copy it now and store it as a secret.",
10077
+ "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.",
10043
10078
  "accessFullHint": "Everything the key's principal may do in this workspace.",
10044
10079
  "accessCustomHint": "Only the permissions you pick. Each one must be something the key's principal may do."
10045
10080
  },
@@ -10130,7 +10165,21 @@ const catalog = {
10130
10165
  "connect": "Connect",
10131
10166
  "cardFailed": "Could not connect {app}. Try again.",
10132
10167
  "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."
10168
+ "blockedDescription": "Your browser blocked the sign-in window. Open it with the button below. This page updates by itself.",
10169
+ "doneTitle": "{app} connected",
10170
+ "doneTitleNoApp": "Connected",
10171
+ "doneDescription": "Your agent can use {app} now.",
10172
+ "doneClose": "You can close this tab.",
10173
+ "doneDeniedTitle": "Sign-in cancelled",
10174
+ "doneDeniedDescription": "You did not allow access on {app}. Start the sign-in again from Kortix to connect it.",
10175
+ "doneExpiredTitle": "This sign-in link expired",
10176
+ "doneExpiredDescription": "It was already used or is too old. Start the sign-in again from Kortix.",
10177
+ "doneFailedTitle": "{app} did not connect",
10178
+ "doneFailedTitleNoApp": "The sign-in did not finish",
10179
+ "doneFailedDescription": "Start the sign-in again from Kortix. If it fails again, send the code below to support.",
10180
+ "doneErrorCode": "Error code: {code}",
10181
+ "doneOpenKortix": "Open Kortix",
10182
+ "doneFallbackApp": "the app"
10134
10183
  }
10135
10184
  };
10136
10185
  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);
@@ -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
+ }
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { connectionSignInSteps } from '@kortix/sdk';
3
3
  import { useMutation, useQueryClient } from '@tanstack/react-query';
4
- import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
4
+ import { invalidateConnections } from './invalidate-connections.js';
5
5
  import { useTranslations } from '../../../i18n/index.js';
6
6
  import { errorToast, successToast } from '../../../primitives/toast.js';
7
7
  import { runConnectLinkFlow } from './use-connect-link.js';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useMutation, useQueryClient } from '@tanstack/react-query';
3
- import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
3
+ import { invalidateConnections } from './invalidate-connections.js';
4
4
  import { useTranslations } from '../../../i18n/index.js';
5
5
  import { errorToast, successToast } from '../../../primitives/toast.js';
6
6
  import { runConnectLinkFlow } from './use-connect-link.js';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useMutation, useQueryClient } from '@tanstack/react-query';
3
- import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
3
+ import { invalidateConnections } from './invalidate-connections.js';
4
4
  import { useTranslations } from '../../../i18n/index.js';
5
5
  import { errorToast, successToast } from '../../../primitives/toast.js';
6
6
  import { runConnectLinkFlow } from './use-connect-link.js';
@@ -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;
@@ -76,6 +76,23 @@ export interface CapabilityFlags {
76
76
  reminders: boolean | undefined;
77
77
  }
78
78
  export declare function capabilityAccess(caps: Record<string, CanResult>, flags: CapabilityFlags): CapabilityAccess;
79
+ /**
80
+ * The Workspace settings rule for one resource row (`/admin/<section>`): the
81
+ * caller holds Settings access (`project.settings.write`), unless the row is
82
+ * member-open, and the row's capability tab. The settings page and every link
83
+ * into a section read this, so a link never shows to a caller the page sends
84
+ * back to General.
85
+ */
86
+ export declare function adminResourceRowOpen(resource: {
87
+ capability: CapabilityTab['key'] | null;
88
+ memberOpen?: true;
89
+ }, projectRowsOpen: boolean, allowedTabs: ReadonlySet<string>): boolean;
90
+ /**
91
+ * True once the caller may open the Triggers section of Workspace settings
92
+ * (`admin/triggers`, kortix.yaml and runtime triggers, loops included). False
93
+ * while the probes load.
94
+ */
95
+ export declare function useTriggersPageOpen(projectId: string | undefined): boolean;
79
96
  export declare function useCapabilityAccess(projectId: string | undefined): CapabilityAccess;
80
97
  /**
81
98
  * The sidebar's Customize and file rows, decided together.
@@ -162,6 +162,30 @@ export function capabilityAccess(caps, flags) {
162
162
  (!tab.manage || tab.manage.some(allowed))).map((tab) => tab.key);
163
163
  return { settled, tabs };
164
164
  }
165
+ /**
166
+ * The Workspace settings rule for one resource row (`/admin/<section>`): the
167
+ * caller holds Settings access (`project.settings.write`), unless the row is
168
+ * member-open, and the row's capability tab. The settings page and every link
169
+ * into a section read this, so a link never shows to a caller the page sends
170
+ * back to General.
171
+ */
172
+ export function adminResourceRowOpen(resource, projectRowsOpen, allowedTabs) {
173
+ if (!projectRowsOpen && !resource.memberOpen)
174
+ return false;
175
+ return !resource.capability || allowedTabs.has(resource.capability);
176
+ }
177
+ /**
178
+ * True once the caller may open the Triggers section of Workspace settings
179
+ * (`admin/triggers`, kortix.yaml and runtime triggers, loops included). False
180
+ * while the probes load.
181
+ */
182
+ export function useTriggersPageOpen(projectId) {
183
+ const caps = useProjectPageCans(projectId);
184
+ // The flags only gate tabs the settings page does not gate (see `project-admin-dashboard.tsx`).
185
+ const access = capabilityAccess(caps, { drives: true, reminders: true });
186
+ const projectRowsOpen = caps[PROJECT_ACTIONS.PROJECT_SETTINGS_WRITE]?.allowed === true;
187
+ return access.settled && adminResourceRowOpen({ capability: 'triggers' }, projectRowsOpen, new Set(access.tabs));
188
+ }
165
189
  export function useCapabilityAccess(projectId) {
166
190
  const caps = useProjectPageCans(projectId);
167
191
  const drives = useFeatureFlag(projectId, 'drives');
@@ -284,8 +284,8 @@ function isRedeclaredInjectedIdentifierNoise(input) {
284
284
  }
285
285
  // Third-party tracking-pixel `Response.json()` noise. A marketing pixel
286
286
  // (observed: Vector, `https://cdn.vector.co/pixel.js`, loaded on the marketing
287
- // site by the visitor-identification vendor chain,
288
- // `apps/web/src/components/analytics/visitor-pixel.tsx`) fetches its own API
287
+ // site by a visitor-identification vendor chain; apps/web removed that vendor
288
+ // on 2026-11-12, but a host page can still load the same pixel) fetches its own API
289
289
  // (`https://api.vector.co/pixel/ip-info`) and calls `response.json()` without
290
290
  // checking `response.ok`. When the site's bot protection 403s the request with
291
291
  // an empty body, `Response.json()` rejects with the canonical DOM
@@ -127,6 +127,14 @@ export declare function reviewHref(projectId: string): string | null;
127
127
  * 2026-10-19, redirects here.
128
128
  */
129
129
  export declare function remindersHref(projectId: string): string | null;
130
+ /**
131
+ * One trigger on the Triggers page: `?id=<id>` opens it. The id is a
132
+ * kortix.yaml slug, or a runtime trigger's id (`reminder.<hex>`), whose row the
133
+ * page marks. Null when the host serves no Triggers page. A
134
+ * `/customize/triggers?id=` link went through the legacy redirect, which drops
135
+ * the query, so the trigger never opened.
136
+ */
137
+ export declare function triggerHref(projectId: string, triggerId: string): string | null;
130
138
  /**
131
139
  * One agent's page — the configuration of a single `agents.<name>` block,
132
140
  * routed rather than modal so it has a URL a person can be sent to. The name
@@ -144,6 +144,17 @@ export function reviewHref(projectId) {
144
144
  export function remindersHref(projectId) {
145
145
  return capabilityLinkHref(projectId, 'reminders');
146
146
  }
147
+ /**
148
+ * One trigger on the Triggers page: `?id=<id>` opens it. The id is a
149
+ * kortix.yaml slug, or a runtime trigger's id (`reminder.<hex>`), whose row the
150
+ * page marks. Null when the host serves no Triggers page. A
151
+ * `/customize/triggers?id=` link went through the legacy redirect, which drops
152
+ * the query, so the trigger never opened.
153
+ */
154
+ export function triggerHref(projectId, triggerId) {
155
+ const page = capabilityLinkHref(projectId, 'triggers');
156
+ return page ? `${page}?id=${encodeURIComponent(triggerId)}` : null;
157
+ }
147
158
  /**
148
159
  * One agent's page — the configuration of a single `agents.<name>` block,
149
160
  * routed rather than modal so it has a URL a person can be sent to. The name
@@ -15,15 +15,10 @@ export interface NotificationInboxViewProps {
15
15
  prompt: string | null;
16
16
  settings: InboxSettingsTarget;
17
17
  /**
18
- * The row above the page outside a project (the account pages' top bar).
19
- * Then the title is the column's heading. Absent: the project page header.
18
+ * The row above the page (the account pages' top bar). Then the title is
19
+ * the column's heading. Absent: the project page header.
20
20
  */
21
21
  header?: ReactNode;
22
- /**
23
- * Only the scrolling list, without the page frame and title: the workspace
24
- * Inbox draws its own header and the Review | Notifications tabs above it.
25
- */
26
- bare?: boolean;
27
22
  onOpenRow: (row: InboxNotification) => void;
28
23
  onMarkAllRead: () => void;
29
24
  onRetry: () => void;
@@ -36,7 +31,7 @@ export interface NotificationInboxViewProps {
36
31
  * footer. Inside a project the title is `ProjectPageHeader` (the Review,
37
32
  * Goals and Artifacts pages' header: it owns the desktop title-bar band).
38
33
  */
39
- export declare function NotificationInboxView({ rows, state, unreadCount, prompt, settings, header, bare, onOpenRow, onMarkAllRead, onRetry, onTurnOn, onDismissPrompt, }: NotificationInboxViewProps): import("react").JSX.Element;
34
+ export declare function NotificationInboxView({ rows, state, unreadCount, prompt, settings, header, onOpenRow, onMarkAllRead, onRetry, onTurnOn, onDismissPrompt, }: NotificationInboxViewProps): import("react").JSX.Element;
40
35
  /**
41
36
  * The Inbox page. Reads the inbox `NotificationHost` polls (one cache entry,
42
37
  * so the sidebar count and the page agree), and renders nothing while signed
@@ -44,8 +39,7 @@ export declare function NotificationInboxView({ rows, state, unreadCount, prompt
44
39
  * without it, "Notification settings" opens the project's Settings overlay.
45
40
  * `header` sits above the page (the account pages' top bar).
46
41
  */
47
- export declare function NotificationInbox({ settingsHref, header, bare, }: {
42
+ export declare function NotificationInbox({ settingsHref, header, }: {
48
43
  settingsHref?: string;
49
44
  header?: ReactNode;
50
- bare?: boolean;
51
45
  }): import("react").JSX.Element | null;
@@ -1,9 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
- * The Inbox (KRTX-1742): the person's notifications from every project, as a
5
- * page. The project sidebar's Inbox row opens it inside the project shell
6
- * (`uiRoutes().inbox`); `AccountTopBar` opens it on the account-level pages.
4
+ * The Inbox (KRTX-1742): the person's notifications from every workspace, as
5
+ * a page. Notifications span every workspace, so the page is person-level:
6
+ * the workspace menu's Inbox row and `AccountTopBar` open it (KRTX-4799
7
+ * moved it out of the workspace Inbox page, which holds only Review).
7
8
  *
8
9
  * A row opens its subject (its session, its Artifact, or the Loops or
9
10
  * Triggers page for an alert) and marks itself read. The tabs split what
@@ -59,16 +60,14 @@ const KIND_MARK = {
59
60
  * footer. Inside a project the title is `ProjectPageHeader` (the Review,
60
61
  * Goals and Artifacts pages' header: it owns the desktop title-bar band).
61
62
  */
62
- export function NotificationInboxView({ rows, state, unreadCount, prompt, settings, header, bare = false, onOpenRow, onMarkAllRead, onRetry, onTurnOn, onDismissPrompt, }) {
63
+ export function NotificationInboxView({ rows, state, unreadCount, prompt, settings, header, onOpenRow, onMarkAllRead, onRetry, onTurnOn, onDismissPrompt, }) {
63
64
  const t = useTranslations('notifications');
64
65
  const [tab, setTab] = useState('all');
65
66
  const visible = tabRows(rows, tab);
66
67
  const needsCount = tabUnreadCount(rows, 'needs');
67
68
  const doneCount = tabUnreadCount(rows, 'done');
68
69
  const settingsLabel = (_jsxs(_Fragment, { children: [_jsx(GearSixIcon, { className: "size-3.5 shrink-0" }), t('inbox.settings')] }));
69
- const list = (_jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("div", { className: cn('mx-auto flex w-full max-w-4xl flex-col gap-4 px-4 py-6 pb-20', !bare && 'md:px-8'), children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [header ? _jsx("h1", { className: "text-foreground text-xl font-medium text-balance", children: t('inbox.title') }) : null, _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: t('inbox.description') })] }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx(Tabs, { value: tab, onValueChange: (value) => setTab(value), children: _jsxs(TabsList, { variant: "secondary", size: "sm", children: [_jsxs(TabsTrigger, { value: "all", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabAll'), unreadCount > 0 ? _jsx(CountBadge, { count: unreadCount }) : null] }), _jsxs(TabsTrigger, { value: "needs", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabNeedsYou'), needsCount > 0 ? _jsx(CountBadge, { count: needsCount, tone: "waiting" }) : null] }), _jsxs(TabsTrigger, { value: "done", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabDone'), doneCount > 0 ? _jsx(CountBadge, { count: doneCount }) : null] })] }) }), unreadCount > 0 ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: onMarkAllRead, children: [_jsx(ChecksIcon, { className: "size-3.5 shrink-0" }), t('inbox.markAllRead')] })) : null] }), prompt ? (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertMedia, { children: _jsx(BellIcon, {}) }), _jsx(BannerAlertTitle, { children: prompt }), _jsx(BannerAlertActions, { children: _jsxs(ButtonGroup, { children: [_jsx(Button, { variant: "secondary", size: "xs", onClick: onTurnOn, children: t('inbox.turnOn') }), _jsx(Hint, { label: t('inbox.dismiss'), side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": t('inbox.dismiss'), onClick: onDismissPrompt, children: _jsx(XIcon, { className: "size-3.5 shrink-0" }) }) })] }) })] })) : null, state === 'loading' ? (_jsx("div", { className: "space-y-0.5", children: [0, 1, 2].map((index) => (_jsx(Skeleton, { className: "h-14 w-full rounded-lg" }, index))) })) : state === 'error' ? (_jsx(ErrorState, { size: "sm", title: t('inbox.loadError'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: t('inbox.retry') }) })) : visible.length === 0 ? (_jsx(EmptyState, { size: "sm", media: _jsx(EmptyArt, { icon: BellIcon }), title: tab === 'needs' && rows.length > 0 ? t('inbox.emptyNeedsYou') : t('inbox.empty'), description: tab === 'needs' && rows.length > 0 ? t('inbox.emptyNeedsYouDescription') : t('inbox.emptyDescription') })) : (_jsx("ul", { className: "space-y-0.5", children: visible.map((row) => (_jsx("li", { children: _jsx(InboxRow, { row: row, onOpen: () => onOpenRow(row) }) }, row.id))) })), _jsxs("div", { className: "flex flex-col gap-2 pt-2 sm:flex-row sm:items-center sm:justify-between", children: [_jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: t('inbox.emailOptIn') }), 'href' in settings ? (_jsx(Button, { asChild: true, variant: "outline", size: "sm", className: "gap-1.5 self-start sm:self-auto", children: _jsx(UiLink, { href: settings.href, children: settingsLabel }) })) : (_jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5 self-start sm:self-auto", onClick: settings.onOpen, children: settingsLabel }))] })] }) }));
70
- if (bare)
71
- return list;
70
+ const list = (_jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("div", { className: "mx-auto flex w-full max-w-4xl flex-col gap-4 px-4 py-6 pb-20 md:px-8", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [header ? _jsx("h1", { className: "text-foreground text-xl font-medium text-balance", children: t('inbox.title') }) : null, _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: t('inbox.description') })] }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx(Tabs, { value: tab, onValueChange: (value) => setTab(value), children: _jsxs(TabsList, { variant: "secondary", size: "sm", children: [_jsxs(TabsTrigger, { value: "all", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabAll'), unreadCount > 0 ? _jsx(CountBadge, { count: unreadCount }) : null] }), _jsxs(TabsTrigger, { value: "needs", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabNeedsYou'), needsCount > 0 ? _jsx(CountBadge, { count: needsCount, tone: "waiting" }) : null] }), _jsxs(TabsTrigger, { value: "done", className: "w-fit flex-none gap-1.5 px-2.5", children: [t('inbox.tabDone'), doneCount > 0 ? _jsx(CountBadge, { count: doneCount }) : null] })] }) }), unreadCount > 0 ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: onMarkAllRead, children: [_jsx(ChecksIcon, { className: "size-3.5 shrink-0" }), t('inbox.markAllRead')] })) : null] }), prompt ? (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertMedia, { children: _jsx(BellIcon, {}) }), _jsx(BannerAlertTitle, { children: prompt }), _jsx(BannerAlertActions, { children: _jsxs(ButtonGroup, { children: [_jsx(Button, { variant: "secondary", size: "xs", onClick: onTurnOn, children: t('inbox.turnOn') }), _jsx(Hint, { label: t('inbox.dismiss'), side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": t('inbox.dismiss'), onClick: onDismissPrompt, children: _jsx(XIcon, { className: "size-3.5 shrink-0" }) }) })] }) })] })) : null, state === 'loading' ? (_jsx("div", { className: "space-y-0.5", children: [0, 1, 2].map((index) => (_jsx(Skeleton, { className: "h-14 w-full rounded-lg" }, index))) })) : state === 'error' ? (_jsx(ErrorState, { size: "sm", title: t('inbox.loadError'), action: _jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: t('inbox.retry') }) })) : visible.length === 0 ? (_jsx(EmptyState, { size: "sm", media: _jsx(EmptyArt, { icon: BellIcon }), title: tab === 'needs' && rows.length > 0 ? t('inbox.emptyNeedsYou') : t('inbox.empty'), description: tab === 'needs' && rows.length > 0 ? t('inbox.emptyNeedsYouDescription') : t('inbox.emptyDescription') })) : (_jsx("ul", { className: "space-y-0.5", children: visible.map((row) => (_jsx("li", { children: _jsx(InboxRow, { row: row, onOpen: () => onOpenRow(row) }) }, row.id))) })), _jsxs("div", { className: "flex flex-col gap-2 pt-2 sm:flex-row sm:items-center sm:justify-between", children: [_jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: t('inbox.emailOptIn') }), 'href' in settings ? (_jsx(Button, { asChild: true, variant: "outline", size: "sm", className: "gap-1.5 self-start sm:self-auto", children: _jsx(UiLink, { href: settings.href, children: settingsLabel }) })) : (_jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5 self-start sm:self-auto", onClick: settings.onOpen, children: settingsLabel }))] })] }) }));
72
71
  return (
73
72
  // `h-svh`: nothing above this box has a definite height (as the Review page).
74
73
  _jsxs("div", { className: "flex h-svh min-h-0 flex-col overflow-hidden", children: [header ?? _jsx(ProjectPageHeader, { title: t('inbox.title') }), list] }));
@@ -88,7 +87,7 @@ function InboxRow({ row, onOpen }) {
88
87
  * without it, "Notification settings" opens the project's Settings overlay.
89
88
  * `header` sits above the page (the account pages' top bar).
90
89
  */
91
- export function NotificationInbox({ settingsHref, header, bare, }) {
90
+ export function NotificationInbox({ settingsHref, header, }) {
92
91
  const t = useTranslations('notifications');
93
92
  const viewerId = useUiViewerId();
94
93
  const inbox = useNotificationInbox({ userId: viewerId });
@@ -107,7 +106,7 @@ export function NotificationInbox({ settingsHref, header, bare, }) {
107
106
  !promptDismissed;
108
107
  return (_jsx(NotificationInboxView, { rows: inbox.data?.notifications ?? [], state: inbox.data ? 'ready' : inbox.isError ? 'error' : 'loading', unreadCount: inbox.unreadCount, prompt: offerTurnOn ? (webPushSupported() ? t('inbox.promptPush') : t('inbox.promptBackground')) : null, settings: settingsHref
109
108
  ? { href: settingsHref }
110
- : { onOpen: () => useSettingsPanelStore.getState().openSettings('sessions') }, header: header, bare: bare, onOpenRow: (row) => {
109
+ : { onOpen: () => useSettingsPanelStore.getState().openSettings('sessions') }, header: header, onOpenRow: (row) => {
111
110
  if (!row.read)
112
111
  inbox.markRead([row.id]).catch(() => { });
113
112
  }, onMarkAllRead: () => {
@@ -31,6 +31,13 @@ interface ComposerPrefill {
31
31
  files?: AttachedFile[];
32
32
  /** The agent, model and effort to select before it lands (desktop Quick Entry). */
33
33
  options?: SessionPromptOverrides;
34
+ /**
35
+ * Restore the saved draft first, then append this text to its end. Only
36
+ * keys typed before the home composer existed are stored this way
37
+ * (`apps/web/src/components/projects/use-home-typing-buffer.ts`). See
38
+ * `Composer` `prefill.restoreDraft`.
39
+ */
40
+ restoreDraft?: boolean;
34
41
  }
35
42
  type PrefillExtras = Omit<ComposerPrefill, 'text'>;
36
43
  interface ComposerPrefillState {
@@ -13,6 +13,7 @@ export const useComposerPrefillStore = create((set, get) => ({
13
13
  ...(extras?.submit ? { submit: extras.submit } : {}),
14
14
  ...(extras?.files?.length ? { files: extras.files } : {}),
15
15
  ...(extras?.options ? { options: extras.options } : {}),
16
+ ...(extras?.restoreDraft ? { restoreDraft: true } : {}),
16
17
  },
17
18
  },
18
19
  })),
@@ -20,8 +20,10 @@ interface ConnectorGateState {
20
20
  projectId: string;
21
21
  connectorConnections: ConnectorGateConnection[];
22
22
  retry: () => void;
23
+ onCancel?: () => void;
23
24
  }) => void;
24
- closeConnectorGate: () => void;
25
+ closeConnectorGate: (retrying?: boolean) => void;
26
+ onCancel?: () => void;
25
27
  }
26
28
  export declare const useConnectorGateStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConnectorGateState>>;
27
29
  export {};
@@ -1,9 +1,19 @@
1
1
  import { create } from 'zustand';
2
- export const useConnectorGateStore = create((set) => ({
2
+ export const useConnectorGateStore = create((set, get) => ({
3
3
  isOpen: false,
4
4
  projectId: null,
5
5
  connectorConnections: [],
6
6
  retry: null,
7
- openConnectorGate: ({ projectId, connectorConnections, retry }) => set({ isOpen: true, projectId, connectorConnections, retry }),
8
- closeConnectorGate: () => set({ isOpen: false, projectId: null, connectorConnections: [], retry: null }),
7
+ openConnectorGate: ({ projectId, connectorConnections, retry, onCancel }) => {
8
+ const previousCancel = get().onCancel;
9
+ set({ isOpen: true, projectId, connectorConnections, retry, onCancel });
10
+ if (previousCancel !== onCancel)
11
+ previousCancel?.();
12
+ },
13
+ closeConnectorGate: (retrying = false) => {
14
+ const cancel = get().onCancel;
15
+ set({ isOpen: false, projectId: null, connectorConnections: [], retry: null, onCancel: undefined });
16
+ if (!retrying)
17
+ cancel?.();
18
+ },
9
19
  }));
@@ -19,6 +19,10 @@ interface UpgradeDialogState {
19
19
  * its view and its copy from, so the gate that opened it and the modal can
20
20
  * never say opposite things about the same account. */
21
21
  billingState?: BillingState;
22
+ /** The Credits tier the person last picked in the dialog. Reopening the
23
+ * dialog keeps it, so it opens on the entry tier only until they pick. */
24
+ pickedMonthlyUsd?: number;
25
+ setPickedMonthlyUsd: (monthlyUsd: number) => void;
22
26
  openUpgradeDialog: (opts: {
23
27
  reason?: UpgradeReason;
24
28
  message?: string;