@kortix/ui 0.15.10 → 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 (93) hide show
  1. package/dist/_vendor/kortix-shared.js +396 -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/pasted-content.d.ts +0 -4
  8. package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
  9. package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
  10. package/dist/customize/agents/agent-model-view.d.ts +11 -1
  11. package/dist/customize/agents/agent-model-view.js +12 -1
  12. package/dist/customize/agents/agent-page.js +19 -6
  13. package/dist/customize/agents/agent-tabs.d.ts +2 -0
  14. package/dist/customize/agents/agent-tabs.js +2 -0
  15. package/dist/customize/connectors/detail/connector-triggers.js +1 -1
  16. package/dist/customize/connectors/use-agent-access.d.ts +1 -0
  17. package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
  18. package/dist/customize/triggers/runtime-triggers.js +13 -2
  19. package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
  20. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
  21. package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
  22. package/dist/customize/triggers/schedule/then-fields.js +23 -3
  23. package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
  24. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
  25. package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
  26. package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
  27. package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
  28. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
  29. package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
  30. package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
  31. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
  32. package/dist/customize/triggers/schedule/when-event.js +1 -1
  33. package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
  34. package/dist/customize/triggers/schedule/when-schedule.js +16 -1
  35. package/dist/customize/triggers/schedule-view.js +4 -2
  36. package/dist/i18n/en.d.ts +49 -0
  37. package/dist/i18n/en.js +57 -8
  38. package/dist/internal/layout/project-settings-nav.d.ts +17 -0
  39. package/dist/internal/layout/project-settings-nav.js +24 -0
  40. package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
  41. package/dist/internal/lib/capability-tab-routes.js +11 -0
  42. package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
  43. package/dist/internal/stores/composer-prefill-store.js +1 -0
  44. package/dist/session/actions/session-label.js +2 -2
  45. package/dist/session/agents/agent-strip.d.ts +10 -5
  46. package/dist/session/agents/agent-strip.js +40 -12
  47. package/dist/session/agents/held-messages.d.ts +6 -2
  48. package/dist/session/agents/held-messages.js +6 -3
  49. package/dist/session/composer/ComposerCard.js +4 -1
  50. package/dist/session/composer/agent-selector.d.ts +2 -0
  51. package/dist/session/composer/agent-selector.js +5 -0
  52. package/dist/session/composer/composer-chat-input.d.ts +1 -0
  53. package/dist/session/composer/composer-logic.d.ts +7 -0
  54. package/dist/session/composer/composer-logic.js +18 -0
  55. package/dist/session/composer/composer-reset.d.ts +8 -14
  56. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  57. package/dist/session/composer/composer-toolbar.js +3 -3
  58. package/dist/session/composer/composer.d.ts +7 -0
  59. package/dist/session/composer/composer.js +17 -3
  60. package/dist/session/composer/editor/composer-editor.js +6 -4
  61. package/dist/session/header/session-site-header.d.ts +3 -1
  62. package/dist/session/header/session-site-header.js +3 -2
  63. package/dist/session/models/connect-model-step.d.ts +29 -0
  64. package/dist/session/models/connect-model-step.js +50 -0
  65. package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
  66. package/dist/session/models/use-workspace-model-gate.js +62 -0
  67. package/dist/session/models/workspace-model-gate.d.ts +46 -0
  68. package/dist/session/models/workspace-model-gate.js +66 -0
  69. package/dist/session/prompts/session-connect-card.d.ts +63 -0
  70. package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
  71. package/dist/session/thread/session-chat.js +294 -298
  72. package/dist/session/thread/transcript.d.ts +2 -1
  73. package/dist/session/thread/transcript.js +7 -3
  74. package/dist/session/tool/tool-part-renderer.js +7 -2
  75. package/dist/session/tool/tools/kortix-action-tool.js +10 -2
  76. package/dist/session/turn/turn-viewport.d.ts +66 -10
  77. package/dist/session/turn/turn-viewport.js +92 -12
  78. package/dist/session/turn/user-message.js +7 -5
  79. package/dist/styles.css +1 -1
  80. package/dist/test-utils/intl.d.ts +49 -0
  81. package/dist/workspace/admin/project-admin-dashboard.js +2 -4
  82. package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
  83. package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
  84. package/dist/workspace/home/no-agent-home.d.ts +3 -1
  85. package/dist/workspace/home/no-agent-home.js +2 -2
  86. package/dist/workspace/layout/project-home.js +16 -9
  87. package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
  88. package/dist/workspace/sidebar/session-grouping.js +1 -1
  89. package/dist/workspace/spaces/space-details-panel.js +2 -2
  90. package/dist/workspace/spaces/space-triggers.js +2 -2
  91. package/dist/workspace/spaces/space-view.js +11 -5
  92. package/package.json +15 -3
  93. package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
@@ -865,6 +865,10 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
865
865
  name: string;
866
866
  description: string;
867
867
  };
868
+ program_agents: {
869
+ name: string;
870
+ description: string;
871
+ };
868
872
  };
869
873
  channelsSwitch: {
870
874
  onTitle: string;
@@ -1509,6 +1513,12 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
1509
1513
  noModelKeyReason: string;
1510
1514
  noModelUpgradePlan: string;
1511
1515
  noModelAddProviderKey: string;
1516
+ stepTitle: string;
1517
+ stepBody: string;
1518
+ stepBodyUpgrade: string;
1519
+ stepBodyMember: string;
1520
+ stepThisWorkspace: string;
1521
+ stepBack: string;
1512
1522
  };
1513
1523
  providerRecovery: {
1514
1524
  savedPrompt: string;
@@ -6218,6 +6228,15 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
6218
6228
  texta68ee4167406: string;
6219
6229
  texta69c4dece144: string;
6220
6230
  textab3aff8f7642: string;
6231
+ text30b9ce09f406: string;
6232
+ text28d33d2ad989: string;
6233
+ textd777d7805cfa: string;
6234
+ text8043e69a8dd6: string;
6235
+ textd6fa1626e3af: string;
6236
+ textccf59f978ef6: string;
6237
+ text82cbc4a4def0: string;
6238
+ text458ceb31019b: string;
6239
+ text27ca9df9dbaa: string;
6221
6240
  };
6222
6241
  publicShareConfirm: {
6223
6242
  title: string;
@@ -6608,6 +6627,8 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
6608
6627
  llmEstimateLabel: string;
6609
6628
  };
6610
6629
  triggerComposer: {
6630
+ programInputPlaceholder: string;
6631
+ programInputHelp: string;
6611
6632
  every: string;
6612
6633
  dayOfMonth: string;
6613
6634
  details: string;
@@ -6646,6 +6667,15 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
6646
6667
  eventsOff: string;
6647
6668
  noApps: string;
6648
6669
  openApps: string;
6670
+ thenLabel: string;
6671
+ thenAgent: string;
6672
+ thenApp: string;
6673
+ targetPath: string;
6674
+ targetMethod: string;
6675
+ targetHelp: string;
6676
+ intervalLabel: string;
6677
+ intervalHelp: string;
6678
+ useCalendar: string;
6649
6679
  };
6650
6680
  gatewayAccess: {
6651
6681
  heroTitle: string;
@@ -8276,6 +8306,11 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
8276
8306
  };
8277
8307
  };
8278
8308
  modelView: {
8309
+ programTimeout: string;
8310
+ programTimeoutHelp: string;
8311
+ programTitle: string;
8312
+ programCommand: string;
8313
+ programHelp: string;
8279
8314
  title: string;
8280
8315
  help: string;
8281
8316
  projectDefault: string;
@@ -10139,6 +10174,20 @@ export declare const testUiTranslator: import("use-intl")._Translator<{
10139
10174
  cardFailed: string;
10140
10175
  blockedTitle: string;
10141
10176
  blockedDescription: string;
10177
+ doneTitle: string;
10178
+ doneTitleNoApp: string;
10179
+ doneDescription: string;
10180
+ doneClose: string;
10181
+ doneDeniedTitle: string;
10182
+ doneDeniedDescription: string;
10183
+ doneExpiredTitle: string;
10184
+ doneExpiredDescription: string;
10185
+ doneFailedTitle: string;
10186
+ doneFailedTitleNoApp: string;
10187
+ doneFailedDescription: string;
10188
+ doneErrorCode: string;
10189
+ doneOpenKortix: string;
10190
+ doneFallbackApp: string;
10142
10191
  };
10143
10192
  }, "hardcodedUi.i18nComplete">;
10144
10193
  export declare function IntlTestProvider({ children, locale, timeZone, messages, fallback, ...rest }: Partial<IntlConfig> & {
@@ -53,7 +53,7 @@ import { useAccountHubAccess } from '../../internal/account-hub/use-account-hub-
53
53
  import { useAccountsList } from '../../internal/hooks/account/use-accounts-list.js';
54
54
  import { useIsMobile } from '../../internal/hooks/index.js';
55
55
  import { RAIL_HORIZONTAL_ROW_CLASS, RAIL_ROW_CLASS, RailGroup, SETTINGS_SIDEBAR_WIDTH_PX, } from '../../internal/components/nav-rail.js';
56
- import { capabilityAccess } from '../../internal/layout/project-settings-nav.js';
56
+ import { adminResourceRowOpen, capabilityAccess } from '../../internal/layout/project-settings-nav.js';
57
57
  import { SettingsNavProvider } from '../../internal/layout/settings-nav-context.js';
58
58
  import { withStaleChunkRecovery } from '../../internal/lib/chunk-reload.js';
59
59
  import { CUSTOMIZE_SECTION_GATE_ACTIONS, isCustomizeSectionVisible, PROJECT_ACTIONS, } from '../../internal/lib/project-actions.js';
@@ -219,12 +219,10 @@ export function ProjectAdminDashboard({ projectId, section, content, hostSection
219
219
  }
220
220
  if (isProjectAdminResource(key)) {
221
221
  const resource = PROJECT_ADMIN_RESOURCES.find((r) => r.key === key);
222
- if (!resource || (!projectRowsOpen && !resource.memberOpen))
222
+ if (!resource || !adminResourceRowOpen(resource, projectRowsOpen, allowed))
223
223
  return null;
224
224
  if (resource.host && !hostSections[resource.key])
225
225
  return null;
226
- if (resource.capability && !allowed.has(resource.capability))
227
- return null;
228
226
  if (resource.flag === 'drives' && !drivesOn)
229
227
  return null;
230
228
  return {
@@ -2,14 +2,9 @@
2
2
  * The prompt a person copies into their own coding agent (Claude Code, Codex,
3
3
  * Cursor) to set up a repository they linked to Kortix that has no agents.
4
4
  *
5
- * Kortix never writes to a linked repository. The person's agent writes
6
- * `kortix.yaml` in their clone, validates it and pushes it; the project then
7
- * reads it from the branch. The prompt names the repository and the branch so
8
- * the push lands where the project reads.
9
- *
10
- * English on purpose: an agent reads it, not the person. The same steps are
11
- * in the docs (`developers.mdx`, "Set up an existing repository"); keep them in
12
- * step.
5
+ * Kortix never writes to a linked repository. The person's agent follows the
6
+ * served setup guide (`@kortix/shared/setup-guide`, https://kortix.com/setup.md)
7
+ * and pushes `kortix.yaml` to the branch the workspace reads.
13
8
  */
14
9
  export declare const EXISTING_REPO_DOCS_URL = "https://kortix.com/docs/developers#set-up-an-existing-repository";
15
10
  export declare function existingRepoSetupPrompt(input: {
@@ -17,6 +12,8 @@ export declare function existingRepoSetupPrompt(input: {
17
12
  repository: string | null | undefined;
18
13
  /** The branch the project reads `kortix.yaml` from. */
19
14
  branch: string | null | undefined;
15
+ /** The project's page in the web app (`dashboard_url`): its origin serves the guide this prompt names. */
16
+ dashboardUrl?: string | null;
20
17
  }): string;
21
18
  /** `owner/name` from a GitHub clone URL, else the URL without `.git`. */
22
19
  export declare function repositoryLabel(repoUrl: string | null | undefined): string | null;
@@ -1,52 +1,26 @@
1
+ import { setupPrompt, setupTarget } from '../../_vendor/kortix-shared.js';
1
2
  /**
2
3
  * The prompt a person copies into their own coding agent (Claude Code, Codex,
3
4
  * Cursor) to set up a repository they linked to Kortix that has no agents.
4
5
  *
5
- * Kortix never writes to a linked repository. The person's agent writes
6
- * `kortix.yaml` in their clone, validates it and pushes it; the project then
7
- * reads it from the branch. The prompt names the repository and the branch so
8
- * the push lands where the project reads.
9
- *
10
- * English on purpose: an agent reads it, not the person. The same steps are
11
- * in the docs (`developers.mdx`, "Set up an existing repository"); keep them in
12
- * step.
6
+ * Kortix never writes to a linked repository. The person's agent follows the
7
+ * served setup guide (`@kortix/shared/setup-guide`, https://kortix.com/setup.md)
8
+ * and pushes `kortix.yaml` to the branch the workspace reads.
13
9
  */
14
10
  export const EXISTING_REPO_DOCS_URL = 'https://kortix.com/docs/developers#set-up-an-existing-repository';
15
11
  export function existingRepoSetupPrompt(input) {
16
- const repository = input.repository?.trim() || 'this repository';
17
- const branch = input.branch?.trim() || 'the default branch';
18
- return `Set up ${repository} for Kortix. Kortix reads \`kortix.yaml\` from the \`${branch}\` branch. The reference is ${EXISTING_REPO_DOCS_URL}.
19
-
20
- 1. If the \`kortix\` command is missing, install it: \`curl -fsSL https://kortix.com/install | bash\`.
21
- 2. Create \`kortix.yaml\` at the repository root with this content:
22
-
23
- \`\`\`yaml
24
- # yaml-language-server: $schema=https://kortix.com/schema/kortix.schema.json
25
- project:
26
- name: "<the repository name>"
27
- builtin_agents:
28
- my_kortix: true
29
- default_agent: mykortix
30
- skills: {}
31
- agents:
32
- worker:
33
- description: "General-purpose worker: coding, research, writing, ops and data work."
34
- mode: primary
35
- permission: allow
36
- prompt: "Your session starts with an empty /workspace. Run \`kortix workspaces clone\` to get this repository, then read AGENTS.md or CLAUDE.md when it exists."
37
- tools: "*"
38
- skills: "*"
39
- connectors: "*"
40
- secrets: "*"
41
- kortix_permissions: "*"
42
- \`\`\`
43
-
44
- 3. Keep the agent setup this repository already has. Do not move, copy or edit those files.
45
- - For each \`.claude/agents/<name>.md\`, add an agent \`<name>\` with \`prompt_file: .claude/agents/<name>.md\`, the \`description\` from its frontmatter, \`mode: primary\`, \`tools: "*"\` and \`kortix_permissions: [workspace.gitops.read]\`, so it can clone the repository.
46
- - For each folder that holds a \`SKILL.md\` (\`.agents/skills/<name>\`, \`.claude/skills/<name>\`, \`skills/<name>\`), add \`<name>: <folder>\` under \`skills:\`. Skip a name that starts with \`kortix-\`.
47
- 4. Run \`kortix validate\`. Fix every error it prints and run it again until it exits 0.
48
- 5. Commit only \`kortix.yaml\` with the message "chore: add kortix.yaml" and push it to \`${branch}\`.
49
- 6. Reply with the agents and skills you declared.`;
12
+ return setupPrompt({ repository: input.repository, branch: input.branch }, setupTarget(webOrigin(input.dashboardUrl)));
13
+ }
14
+ /** The origin of a web-app URL; undefined when absent or not a URL (the prompt then names production). */
15
+ function webOrigin(url) {
16
+ if (!url)
17
+ return undefined;
18
+ try {
19
+ return new URL(url).origin;
20
+ }
21
+ catch {
22
+ return undefined;
23
+ }
50
24
  }
51
25
  /** `owner/name` from a GitHub clone URL, else the URL without `.git`. */
52
26
  export function repositoryLabel(repoUrl) {
@@ -18,8 +18,10 @@ export type NoAgentReason = 'setup' | 'noAccess' | 'empty';
18
18
  * `noAccess` and `empty` carry no button: the viewer cannot act here, and
19
19
  * "New agent" already sits in the sidebar.
20
20
  */
21
- export declare function NoAgentHome({ reason, repoUrl, branch, }: {
21
+ export declare function NoAgentHome({ reason, repoUrl, branch, dashboardUrl, }: {
22
22
  reason: NoAgentReason;
23
23
  repoUrl: string | null | undefined;
24
24
  branch: string | null | undefined;
25
+ /** The project's web page (`dashboard_url`): the copied prompt names this deployment's guide. */
26
+ dashboardUrl?: string | null;
25
27
  }): import("react").JSX.Element;
@@ -23,7 +23,7 @@ import { EXISTING_REPO_DOCS_URL, existingRepoSetupPrompt, repositoryLabel } from
23
23
  * `noAccess` and `empty` carry no button: the viewer cannot act here, and
24
24
  * "New agent" already sits in the sidebar.
25
25
  */
26
- export function NoAgentHome({ reason, repoUrl, branch, }) {
26
+ export function NoAgentHome({ reason, repoUrl, branch, dashboardUrl, }) {
27
27
  const t = useTranslations('noAgentHome');
28
28
  const [copied, setCopied] = useState(false);
29
29
  useEffect(() => {
@@ -33,7 +33,7 @@ export function NoAgentHome({ reason, repoUrl, branch, }) {
33
33
  return () => clearTimeout(timer);
34
34
  }, [copied]);
35
35
  const copyPrompt = async () => {
36
- const prompt = existingRepoSetupPrompt({ repository: repositoryLabel(repoUrl), branch });
36
+ const prompt = existingRepoSetupPrompt({ repository: repositoryLabel(repoUrl), branch, dashboardUrl });
37
37
  if (await copyToClipboard(prompt))
38
38
  setCopied(true);
39
39
  else
@@ -244,13 +244,19 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
244
244
  useEffect(() => {
245
245
  if (!pendingPrefill)
246
246
  return;
247
- consumePrefill(projectId);
247
+ // Apply what `consume` returns, never the render-time snapshot: the
248
+ // typing buffer may have dropped the entry since this render (another
249
+ // account signed in on the tab), and a dropped entry must not land.
250
+ const taken = consumePrefill(projectId);
251
+ if (!taken)
252
+ return;
248
253
  setPrefill({
249
- text: pendingPrefill.text,
254
+ text: taken.text,
250
255
  id: Date.now(),
251
- submit: pendingPrefill.submit,
252
- files: pendingPrefill.files,
253
- options: pendingPrefill.options,
256
+ submit: taken.submit,
257
+ files: taken.files,
258
+ options: taken.options,
259
+ restoreDraft: taken.restoreDraft,
254
260
  });
255
261
  }, [pendingPrefill, projectId, consumePrefill]);
256
262
  const handleCommand = useCallback((cmd, args, options) => {
@@ -277,9 +283,10 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
277
283
  }
278
284
  : undefined;
279
285
  const composer = (_jsx(ComposerChatInput, { onSend: handleSend, onCommand: handleCommand, projectId: projectId, draftScope: draftScope, draftHandoffScope: onSend ? undefined : defaultSend.draftHandoffScope,
280
- // Keep accepting keystrokes while creation runs. A second Enter is
281
- // recovered as a draft and handed to the same session on navigation.
282
- isSending: creating, disabled: onSend ? creating : false, clearOnSend: onSend ? false : 'text-only', autoFocus: true,
286
+ // While the create runs, the sent message stays in the composer, locked,
287
+ // with the spinner in the send slot. The session page then draws it as
288
+ // the first turn. A refused send unlocks the same text for a retry.
289
+ isSending: creating, disabled: creating, clearOnSend: false, autoFocus: true,
283
290
  // Desktop: a hero composer floating mid-page has no column for a second
284
291
  // rail to align to, so the attach/agent/context controls ride on the
285
292
  // toolbar itself, ahead of the model selector, and the `/` menu opens
@@ -295,5 +302,5 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
295
302
  return (
296
303
  // A file dropped anywhere on the page attaches to the composer, as on a
297
304
  // session page.
298
- _jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo }), firstChatPending || !onboarded || noAgent || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), _jsx("div", { className: "relative z-10 mx-auto w-full max-w-2xl px-4 pt-14 empty:hidden", children: _jsx(SplitNoticeBanner, { workspaceId: projectId }) }), noAgentReason ? (_jsx(NoAgentHome, { reason: noAgentReason, repoUrl: projectRowQuery.data?.repo_url, branch: projectRowQuery.data?.default_branch })) : firstChat ? (_jsx(FirstChat, { projectId: projectId, composer: composer })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
305
+ _jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo }), firstChatPending || !onboarded || noAgent || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), _jsx("div", { className: "relative z-10 mx-auto w-full max-w-2xl px-4 pt-14 empty:hidden", children: _jsx(SplitNoticeBanner, { workspaceId: projectId }) }), noAgentReason ? (_jsx(NoAgentHome, { reason: noAgentReason, repoUrl: projectRowQuery.data?.repo_url, branch: projectRowQuery.data?.default_branch, dashboardUrl: projectRowQuery.data?.dashboard_url })) : firstChat ? (_jsx(FirstChat, { projectId: projectId, composer: composer })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
299
306
  }
@@ -61,7 +61,7 @@ export declare const SESSION_SECTIONS: {
61
61
  };
62
62
  readonly event: {
63
63
  readonly key: "section.event";
64
- readonly label: "App event";
64
+ readonly label: "Connector event";
65
65
  };
66
66
  readonly manual: {
67
67
  readonly key: "section.manual";
@@ -14,7 +14,7 @@ export const SESSION_SECTIONS = {
14
14
  email: { key: 'section.email', label: 'Email' },
15
15
  schedule: { key: 'section.scheduled', label: 'Scheduled' },
16
16
  webhook: { key: 'section.webhook', label: 'Webhook' },
17
- event: { key: 'section.event', label: 'App event' },
17
+ event: { key: 'section.event', label: 'Connector event' },
18
18
  manual: { key: 'section.manual', label: 'Manual' },
19
19
  all: { key: 'section.all', label: 'All' },
20
20
  };
@@ -10,7 +10,7 @@ import { useTriggerControls } from '../../customize/triggers/schedule/trigger-co
10
10
  import { useTranslations } from '../../i18n/index.js';
11
11
  import { Close } from '../../icons/close.js';
12
12
  import { AgentMark } from '../../internal/components/agent-mark.js';
13
- import { uiRoutes } from '../../lib/routes.js';
13
+ import { triggerHref } from '../../internal/lib/capability-tab-routes.js';
14
14
  import { Button } from '../../primitives/button.js';
15
15
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from '../../primitives/dropdown-menu.js';
16
16
  import Hint from '../../primitives/hint.js';
@@ -139,7 +139,7 @@ function RoutinesSection({ projectId, space }) {
139
139
  setCreating(false);
140
140
  void queryClient.invalidateQueries({ queryKey: qk.project.triggers(projectId) });
141
141
  } })] })) : null;
142
- return (_jsxs(Section, { title: t('routines'), add: add, children: [routines.map((trigger) => (_jsx(Row, { avatar: _jsx(LightningIcon, { className: "text-muted-foreground size-4" }), name: triggerName(trigger), tag: describeWhen(trigger), href: uiRoutes().customize(projectId, `triggers?id=${encodeURIComponent(trigger.slug)}`) }, trigger.slug))), privateChannel && routines.length === 0 ? (_jsx("li", { className: "text-muted-foreground px-2 py-1 text-xs text-pretty", children: t('routinesPrivate') })) : null] }));
142
+ return (_jsxs(Section, { title: t('routines'), add: add, children: [routines.map((trigger) => (_jsx(Row, { avatar: _jsx(LightningIcon, { className: "text-muted-foreground size-4" }), name: triggerName(trigger), tag: describeWhen(trigger), href: triggerHref(projectId, trigger.slug) }, trigger.slug))), privateChannel && routines.length === 0 ? (_jsx("li", { className: "text-muted-foreground px-2 py-1 text-xs text-pretty", children: t('routinesPrivate') })) : null] }));
143
143
  }
144
144
  /** The browser's IANA zone, for the daily brief; UTC when it has none. */
145
145
  function browserTimeZone() {
@@ -10,7 +10,7 @@ import { TriggerComposer } from '../../customize/triggers/schedule/trigger-compo
10
10
  import { lastRunLabel } from '../../internal/lib/trigger-clock.js';
11
11
  import { TriggerTile } from '../../customize/triggers/schedule/trigger-tile.js';
12
12
  import { useLocale, useTranslations } from '../../i18n/index.js';
13
- import { uiRoutes } from '../../lib/routes.js';
13
+ import { triggerHref } from '../../internal/lib/capability-tab-routes.js';
14
14
  import { Button } from '../../primitives/button.js';
15
15
  import { EmptyArt } from '../../primitives/empty-art.js';
16
16
  import { EmptyState } from '../../primitives/empty-state.js';
@@ -64,7 +64,7 @@ function TriggerRow({ projectId, trigger, projectPaused, canUpdate, onToggle, })
64
64
  const subtitle = triggerSubtitle(name, describeWhen(trigger), trigger.prompt_template);
65
65
  // An auto-paused trigger is off until resumed: turning it on sends `enabled: true`, which resumes it.
66
66
  const active = trigger.enabled && !trigger.auto_paused_at;
67
- const href = uiRoutes().customize(projectId, `triggers?id=${encodeURIComponent(trigger.slug)}`);
67
+ const href = triggerHref(projectId, trigger.slug);
68
68
  const toggle = (enabled) => {
69
69
  setPending(true);
70
70
  onToggle(enabled)
@@ -390,13 +390,19 @@ function SpaceComposer({ projectId, space, onOpenThread, onAutoOpenThread, befor
390
390
  useEffect(() => {
391
391
  if (!pendingPrefill)
392
392
  return;
393
- consumePrefill(projectId);
393
+ // Apply what `consume` returns, never the render-time snapshot: the
394
+ // typing buffer may have dropped the entry since this render (another
395
+ // account signed in on the tab), and a dropped entry must not land.
396
+ const taken = consumePrefill(projectId);
397
+ if (!taken)
398
+ return;
394
399
  setPrefill({
395
- text: pendingPrefill.text,
400
+ text: taken.text,
396
401
  id: Date.now(),
397
- submit: pendingPrefill.submit,
398
- files: pendingPrefill.files,
399
- options: pendingPrefill.options,
402
+ submit: taken.submit,
403
+ files: taken.files,
404
+ options: taken.options,
405
+ restoreDraft: taken.restoreDraft,
400
406
  });
401
407
  }, [pendingPrefill, projectId, consumePrefill]);
402
408
  const onCommand = useCallback((command, args, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/ui",
3
- "version": "0.15.10",
3
+ "version": "0.15.11",
4
4
  "description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",
@@ -1003,6 +1003,10 @@
1003
1003
  "types": "./dist/internal/icons/claude.d.ts",
1004
1004
  "import": "./dist/internal/icons/claude.js"
1005
1005
  },
1006
+ "./internal/icons/codex": {
1007
+ "types": "./dist/internal/icons/codex.d.ts",
1008
+ "import": "./dist/internal/icons/codex.js"
1009
+ },
1006
1010
  "./internal/icons/discord": {
1007
1011
  "types": "./dist/internal/icons/discord.d.ts",
1008
1012
  "import": "./dist/internal/icons/discord.js"
@@ -1657,6 +1661,10 @@
1657
1661
  "types": "./dist/session/models/ask-owner-for-credits-button.d.ts",
1658
1662
  "import": "./dist/session/models/ask-owner-for-credits-button.js"
1659
1663
  },
1664
+ "./session/models/connect-model-step": {
1665
+ "types": "./dist/session/models/connect-model-step.d.ts",
1666
+ "import": "./dist/session/models/connect-model-step.js"
1667
+ },
1660
1668
  "./session/models/model-grouping": {
1661
1669
  "types": "./dist/session/models/model-grouping.d.ts",
1662
1670
  "import": "./dist/session/models/model-grouping.js"
@@ -1669,6 +1677,10 @@
1669
1677
  "types": "./dist/session/models/model-selector.d.ts",
1670
1678
  "import": "./dist/session/models/model-selector.js"
1671
1679
  },
1680
+ "./session/models/use-workspace-model-gate": {
1681
+ "types": "./dist/session/models/use-workspace-model-gate.d.ts",
1682
+ "import": "./dist/session/models/use-workspace-model-gate.js"
1683
+ },
1672
1684
  "./session/panel/audit/audit-credential-label": {
1673
1685
  "types": "./dist/session/panel/audit/audit-credential-label.d.ts",
1674
1686
  "import": "./dist/session/panel/audit/audit-credential-label.js"
@@ -2198,7 +2210,7 @@
2198
2210
  "@extend-ai/react-docx": "^0.7.5",
2199
2211
  "@extend-ai/react-xlsx": "0.13.4",
2200
2212
  "@glideapps/glide-data-grid": "6.0.4-alpha24",
2201
- "@kortix/llm-catalog": "0.15.10",
2213
+ "@kortix/llm-catalog": "0.15.11",
2202
2214
  "@lezer/highlight": "1.2.3",
2203
2215
  "@paper-design/shaders-react": "^0.0.76",
2204
2216
  "@phosphor-icons/react": "2.1.10",
@@ -2273,7 +2285,7 @@
2273
2285
  "zustand": "^5.0.3"
2274
2286
  },
2275
2287
  "peerDependencies": {
2276
- "@kortix/sdk": "^0.15.10",
2288
+ "@kortix/sdk": "^0.15.11",
2277
2289
  "@tanstack/react-query": "^5.75.2",
2278
2290
  "@types/react": ">=18",
2279
2291
  "react": ">=19",
@@ -1,40 +0,0 @@
1
- /**
2
- * In-session Connect card, docked above the composer beside
3
- * `SessionApprovalPrompt` and `SessionAccessPrompt`.
4
- *
5
- * An agent runs `kortix connectors connect <app>` and stops: the sign-in it
6
- * started is a raw provider link, and nothing in Kortix finished the
7
- * connection when the person came back (2026-11-11). The API records which
8
- * session asked on the account row (`requesting_session_id`); this card reads
9
- * those rows (`listSessionConnectRequests`) and finishes each one through
10
- * `connectionSignInSteps`: the window opens inside the click, the first request
11
- * records a sign-in that already finished at the provider, and only an
12
- * unfinished one goes to a new sign-in page. Finalize tells the session that
13
- * asked, so the agent continues on its own.
14
- *
15
- * Shown: every request still to sign in, and each one that connected while
16
- * this page was open ("Connected as …"). A request that was connected before
17
- * the page loaded is history and stays hidden.
18
- */
19
- import { type SessionConnectRequest } from '@kortix/sdk';
20
- /** Stable id of one request: its account row, or the connector on an older server. */
21
- export declare function sessionConnectRequestKey(request: SessionConnectRequest): string;
22
- /**
23
- * The requests on screen: every pending one, plus those that connected after
24
- * `seenPending` first saw them pending. Pure; exported for tests.
25
- */
26
- export declare function sessionConnectRequestsOnScreen(requests: readonly SessionConnectRequest[], seenPending: ReadonlySet<string>): SessionConnectRequest[];
27
- export declare function SessionConnectPrompt({ projectId, sessionId, busy, onDockedChange, }: {
28
- projectId: string;
29
- sessionId: string;
30
- /** The agent is running: poll faster, and read again when it stops. */
31
- busy: boolean;
32
- /** True while a card is on screen: the composer docks onto it. */
33
- onDockedChange?: (docked: boolean) => void;
34
- }): import("react").JSX.Element | null;
35
- /** The card itself: one row per request. */
36
- export declare function SessionConnectNotice({ requests, projectId, onSettled, }: {
37
- requests: readonly SessionConnectRequest[];
38
- projectId: string;
39
- onSettled: () => void;
40
- }): import("react").JSX.Element;