@kortix/ui 0.15.9 → 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 (124) hide show
  1. package/dist/_vendor/kortix-shared.js +72 -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/customize/connectors/connectors-page.js +1 -1
  8. package/dist/customize/connectors/detail/connector-page.js +9 -4
  9. package/dist/customize/connectors/install/use-install.js +1 -1
  10. package/dist/customize/providers/provider-accordion.js +5 -5
  11. package/dist/customize/providers/provider-connect.d.ts +3 -3
  12. package/dist/customize/providers/provider-connect.js +8 -16
  13. package/dist/customize/providers/provider-sheet.js +4 -4
  14. package/dist/customize/sections/connector-connection-form.d.ts +0 -1
  15. package/dist/customize/sections/connector-connection-form.js +0 -9
  16. package/dist/customize/sections/view/review-center-connected.js +7 -3
  17. package/dist/customize/settings/tabs/workspace-keys.js +53 -11
  18. package/dist/customize/shared/feature-gate-screen.js +1 -1
  19. package/dist/customize/triggers/schedule/event-account-picker.js +1 -1
  20. package/dist/customize/triggers/schedule/use-event-app-connect.js +2 -1
  21. package/dist/i18n/en.d.ts +7 -7
  22. package/dist/i18n/en.js +8 -8
  23. package/dist/internal/billing/compute-pricing.d.ts +7 -1
  24. package/dist/internal/billing/compute-pricing.js +7 -1
  25. package/dist/internal/hooks/connectors/invalidate-connections.d.ts +10 -0
  26. package/dist/internal/hooks/connectors/invalidate-connections.js +18 -0
  27. package/dist/internal/hooks/connectors/use-finish-sign-in.js +1 -1
  28. package/dist/internal/hooks/connectors/use-pipedream-connect-member.js +1 -1
  29. package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +1 -1
  30. package/dist/internal/hooks/projects/use-new-project-session.d.ts +2 -0
  31. package/dist/internal/hooks/projects/use-new-project-session.js +4 -1
  32. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  33. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  34. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +2 -2
  35. package/dist/internal/notifications/notification-inbox.d.ts +4 -10
  36. package/dist/internal/notifications/notification-inbox.js +8 -9
  37. package/dist/internal/stores/connector-gate-store.d.ts +3 -1
  38. package/dist/internal/stores/connector-gate-store.js +13 -3
  39. package/dist/internal/stores/upgrade-dialog-store.d.ts +4 -0
  40. package/dist/internal/stores/upgrade-dialog-store.js +2 -0
  41. package/dist/lib/routes.d.ts +4 -11
  42. package/dist/lib/routes.js +3 -5
  43. package/dist/markdown/unified-markdown-utils.d.ts +7 -0
  44. package/dist/markdown/unified-markdown-utils.js +19 -0
  45. package/dist/markdown/unified-markdown.js +16 -3
  46. package/dist/primitives/alert-dialog.js +1 -1
  47. package/dist/primitives/dialog.js +3 -1
  48. package/dist/primitives/drawer.js +1 -1
  49. package/dist/primitives/modal.js +1 -1
  50. package/dist/primitives/preview-image.js +1 -1
  51. package/dist/primitives/sheet.js +1 -1
  52. package/dist/session/composer/ComposerCard.js +4 -2
  53. package/dist/session/composer/attachment-tile.d.ts +2 -26
  54. package/dist/session/composer/attachment-tile.js +3 -47
  55. package/dist/session/composer/composer-chat-input.d.ts +2 -1
  56. package/dist/session/composer/composer-chat-input.js +2 -2
  57. package/dist/session/composer/composer.d.ts +2 -0
  58. package/dist/session/composer/composer.js +5 -8
  59. package/dist/session/composer/draft/home-composer-focus-handoff.d.ts +7 -0
  60. package/dist/session/composer/draft/home-composer-focus-handoff.js +94 -0
  61. package/dist/session/composer/draft/use-composer-draft.d.ts +3 -1
  62. package/dist/session/composer/draft/use-composer-draft.js +22 -2
  63. package/dist/session/composer/editor/composer-editor.d.ts +4 -2
  64. package/dist/session/composer/editor/composer-editor.js +7 -3
  65. package/dist/session/composer/hooks/use-composer-focus.js +4 -2
  66. package/dist/session/index.d.ts +1 -0
  67. package/dist/session/index.js +1 -0
  68. package/dist/session/models/chatgpt-connection-button.js +5 -9
  69. package/dist/session/models/model-connection-gate.d.ts +2 -1
  70. package/dist/session/models/model-connection-gate.js +6 -3
  71. package/dist/session/models/model-connection-layout.d.ts +2 -0
  72. package/dist/session/models/model-connection-layout.js +4 -0
  73. package/dist/session/models/model-selector.d.ts +1 -1
  74. package/dist/session/models/model-selector.js +9 -6
  75. package/dist/session/models/subscription-offer.d.ts +4 -0
  76. package/dist/session/models/subscription-offer.js +11 -3
  77. package/dist/session/overrides/session-overrides-toolbar.js +2 -4
  78. package/dist/session/prompts/ask-deck.d.ts +5 -1
  79. package/dist/session/prompts/ask-deck.js +15 -3
  80. package/dist/session/prompts/question-labels.d.ts +16 -0
  81. package/dist/session/prompts/question-labels.js +34 -0
  82. package/dist/session/prompts/question-prompt.js +6 -6
  83. package/dist/session/status/provisioning-failure.d.ts +23 -2
  84. package/dist/session/status/provisioning-failure.js +53 -3
  85. package/dist/session/status/stop-refusal.d.ts +6 -12
  86. package/dist/session/status/stop-refusal.js +6 -19
  87. package/dist/session/thread/agent-run-props.d.ts +19 -0
  88. package/dist/session/thread/agent-run-props.js +54 -0
  89. package/dist/session/thread/session-chat.js +27 -4
  90. package/dist/session/thread/transcript.d.ts +17 -1
  91. package/dist/session/thread/transcript.js +87 -23
  92. package/dist/session/tool/tools/bash-tool.d.ts +3 -52
  93. package/dist/session/tool/tools/bash-tool.js +3 -86
  94. package/dist/session/turn/answer-streaming.d.ts +21 -0
  95. package/dist/session/turn/answer-streaming.js +34 -0
  96. package/dist/session/turn/queued-prompt-bubbles.d.ts +5 -0
  97. package/dist/session/turn/queued-prompt-bubbles.js +12 -0
  98. package/dist/session/turn/turn-work-accordion.d.ts +3 -1
  99. package/dist/session/turn/turn-work-accordion.js +2 -2
  100. package/dist/styles.css +1 -1
  101. package/dist/test-utils/intl.d.ts +7 -7
  102. package/dist/workspace/home/first-chat.d.ts +7 -1
  103. package/dist/workspace/home/first-chat.js +12 -5
  104. package/dist/workspace/inbox/workspace-inbox.d.ts +6 -16
  105. package/dist/workspace/inbox/workspace-inbox.js +9 -51
  106. package/dist/workspace/layout/project-home.js +5 -11
  107. package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
  108. package/dist/workspace/layout/use-project-home-send.js +29 -15
  109. package/dist/workspace/new/advanced-fields.d.ts +4 -1
  110. package/dist/workspace/new/advanced-fields.js +2 -2
  111. package/dist/workspace/new/workspace-name.d.ts +9 -0
  112. package/dist/workspace/new/workspace-name.js +20 -0
  113. package/dist/workspace/projects/session-starter.d.ts +6 -4
  114. package/dist/workspace/projects/session-starter.js +8 -14
  115. package/dist/workspace/review/review-center.d.ts +6 -2
  116. package/dist/workspace/review/review-center.js +45 -25
  117. package/dist/workspace/sidebar/workspace-menu-model.d.ts +3 -5
  118. package/dist/workspace/sidebar/workspace-menu-model.js +1 -1
  119. package/package.json +3 -7
  120. package/skills/kortix-ui/references/modules.md +1 -1
  121. package/dist/customize/connectors/invalidate-connections.d.ts +0 -2
  122. package/dist/customize/connectors/invalidate-connections.js +0 -4
  123. package/dist/internal/notifications/use-inbox-summary.d.ts +0 -17
  124. package/dist/internal/notifications/use-inbox-summary.js +0 -28
@@ -3502,6 +3502,9 @@ function spaceDriveFolders(kind, name, personalFolder, privateSpaceId = null) {
3502
3502
  return { files: `${personalFolder}/Agents/${name}`, memory: `${personalFolder}/Memory/${name}` };
3503
3503
  }
3504
3504
 
3505
+ // ../shared/src/session-delivery.ts
3506
+ var STALE_RUNTIME_DELIVERY_ERROR = "this session's computer cannot reach the API. Start a new session";
3507
+
3505
3508
  // ../shared/src/artifact-doc.ts
3506
3509
  var ARTIFACT_DOC_CSS = `
3507
3510
  .kx-doc{--s:var(--spacing,.23rem);color:var(--foreground);font-family:var(--font-sans);font-weight:400;font-size:var(--text-base,1rem);line-height:var(--leading-relaxed,1.625);
@@ -4302,6 +4305,73 @@ var PREVIEW_BUILDING_STATES = /* @__PURE__ */ new Set([
4302
4305
  ]);
4303
4306
  var PREVIEW_STATE_MESSAGE = "kortix:preview-state";
4304
4307
 
4308
+ // ../shared/src/session/attachment-tile.ts
4309
+ function attachmentExtension(filename, mime) {
4310
+ const dot = filename.lastIndexOf(".");
4311
+ if (dot > 0 && dot < filename.length - 1) {
4312
+ const ext = filename.slice(dot + 1).trim().toLowerCase();
4313
+ if (ext.length > 0 && ext.length <= 8 && !/\s/.test(ext)) return ext;
4314
+ }
4315
+ const subtype = (mime ?? "").split("/")[1]?.split(";")[0]?.trim().toLowerCase() ?? "";
4316
+ if (!subtype) return "";
4317
+ return subtype.split("+")[0].replace(/^x-/, "").split(".").pop() ?? "";
4318
+ }
4319
+ function isPreviewableImage(filename, mime) {
4320
+ if (attachmentExtension(filename, mime) === "svg") return false;
4321
+ return (mime ?? "").toLowerCase().startsWith("image/");
4322
+ }
4323
+ var LONG_NAME_THRESHOLD = 24;
4324
+ var NAME_TAIL_CHARS = 10;
4325
+ function splitFilenameForTile(name) {
4326
+ if (name.length <= LONG_NAME_THRESHOLD) return null;
4327
+ return { head: name.slice(0, -NAME_TAIL_CHARS), tail: name.slice(-NAME_TAIL_CHARS) };
4328
+ }
4329
+
4330
+ // ../shared/src/session/session-starter.ts
4331
+ function classifySessionStarter(session, viewerId) {
4332
+ const initiator = session.initiator ?? null;
4333
+ if (!initiator || initiator.type === "member") {
4334
+ const id = initiator?.id ?? session.created_by ?? null;
4335
+ const isViewer = Boolean(viewerId) && id === viewerId && (initiator?.id != null || session.is_owner !== false);
4336
+ return { type: "member", id, isViewer, label: initiator?.label || null };
4337
+ }
4338
+ return { type: initiator.type, id: initiator.id, isViewer: false, label: initiator.label || null };
4339
+ }
4340
+
4341
+ // ../shared/src/session/stop-refusal.ts
4342
+ var NOT_TURN_PROMPTER = "not_turn_prompter";
4343
+ function stopRefusalMessage(error, fallback) {
4344
+ if (!error || typeof error !== "object") return null;
4345
+ const { status, code, message } = error;
4346
+ if (code !== NOT_TURN_PROMPTER && status !== 403) return null;
4347
+ const text = typeof message === "string" ? message.trim() : "";
4348
+ return text || fallback || null;
4349
+ }
4350
+
4351
+ // ../shared/src/session/tool-row-text.ts
4352
+ var TITLE_MAX = 60;
4353
+ function bashRowTitle(description, failed) {
4354
+ if (failed) return "Command failed";
4355
+ const summary = typeof description === "string" ? description.replace(/\s+/g, " ").trim() : "";
4356
+ if (!summary) return "Ran command";
4357
+ const cased = /^[a-z]/.test(summary) ? summary[0].toUpperCase() + summary.slice(1) : summary;
4358
+ if (cased.length <= TITLE_MAX) return cased;
4359
+ return `${cased.slice(0, TITLE_MAX).trimEnd()}\u2026`;
4360
+ }
4361
+ function dedentCommand(raw) {
4362
+ const text = raw.replace(/^[\r\n]+/, "").trimEnd();
4363
+ if (!text) return "";
4364
+ const lines = text.split("\n");
4365
+ if (lines.length === 1) return lines[0].replace(/^[^\S\r\n]+/, "");
4366
+ let min = Infinity;
4367
+ for (const line of lines) {
4368
+ if (!line.trim()) continue;
4369
+ min = Math.min(min, /^[^\S\r\n]*/.exec(line)[0].length);
4370
+ }
4371
+ if (!min || min === Infinity) return text;
4372
+ return lines.map((line) => line.slice(min)).join("\n");
4373
+ }
4374
+
4305
4375
  // ../shared/src/tool-output/background-workers.ts
4306
4376
  var COLON2 = 58;
4307
4377
  function occurrences(text, needle, ignoreCase) {
@@ -5778,6 +5848,7 @@ var WORKSPACE_SETTINGS_SECTIONS = WORKSPACE_SETTINGS_GROUPS.flatMap(
5778
5848
  (group) => group.sections
5779
5849
  );
5780
5850
  var WORKSPACE_SETTINGS_SECTION_ALIASES = {
5851
+ "audit-log": "audit",
5781
5852
  access: "members",
5782
5853
  "access-projects": "members",
5783
5854
  settings: "security",
@@ -5805,4 +5876,4 @@ function parseWorkspaceSettingsSection(raw) {
5805
5876
  return Object.prototype.hasOwnProperty.call(WORKSPACE_SETTINGS_SECTION_ALIASES, value) ? WORKSPACE_SETTINGS_SECTION_ALIASES[value] : null;
5806
5877
  }
5807
5878
 
5808
- export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, CHROME_LAUNCHED, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, HUMAN_ONLY, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MERMAID_DIAGRAM_STARTERS, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, PIXEL_MARK_TONES, POLICY_SETS_UNSUPPORTED_PROVIDERS, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_GROUPS, SPACE_POST_SUMMARY, UNKNOWN_RATIO, UPLOAD_LIMITS, WORKSPACE_SETTINGS_GROUPS, agentDisplayName, appAdminsOnly, autoLinkUrls, avatarFill, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, channelPromptTail, confirmCommitted, countInSection, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, fixManifestText, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isChannelFileLabel, isChannelPlatform, isMermaidCode, isMyKortixAgentName, isProjectGlyphColor, isProjectGlyphName, isProjectGlyphPaletteColor, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, normalizeProjectGlyphColor, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parsePeerMessagePrompt, parseReminderPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, parseWorkspaceSettingsSection, passesPixelMarkGate, peerHandleLabel, pixelMark, policySetNameError, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, spaceDriveFolders, spaceSlug, splitPastedContent, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
5879
+ export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, CHROME_LAUNCHED, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, HUMAN_ONLY, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, LONG_NAME_THRESHOLD, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MERMAID_DIAGRAM_STARTERS, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, NAME_TAIL_CHARS, NOT_TURN_PROMPTER, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, PIXEL_MARK_TONES, POLICY_SETS_UNSUPPORTED_PROVIDERS, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_GROUPS, SPACE_POST_SUMMARY, STALE_RUNTIME_DELIVERY_ERROR, UNKNOWN_RATIO, UPLOAD_LIMITS, WORKSPACE_SETTINGS_GROUPS, agentDisplayName, appAdminsOnly, attachmentExtension, autoLinkUrls, avatarFill, bashRowTitle, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, channelPromptTail, classifySessionStarter, confirmCommitted, countInSection, dedentCommand, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, fixManifestText, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isChannelFileLabel, isChannelPlatform, isMermaidCode, isMyKortixAgentName, isPreviewableImage, isProjectGlyphColor, isProjectGlyphName, isProjectGlyphPaletteColor, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, normalizeProjectGlyphColor, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parsePeerMessagePrompt, parseReminderPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, parseWorkspaceSettingsSection, passesPixelMarkGate, peerHandleLabel, pixelMark, policySetNameError, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, spaceDriveFolders, spaceSlug, splitFilenameForTile, splitPastedContent, stopRefusalMessage, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
@@ -29,3 +29,4 @@ export * from './webhook-signing';
29
29
  export * from './pasted-content';
30
30
  export * from './space-slug';
31
31
  export * from './workspace-actions';
32
+ export * from './session-delivery';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The pure rules of an attachment tile. Both hosts
3
+ * (`packages/ui/src/session/composer/attachment-tile.tsx`,
4
+ * `apps/mobile/lib/session/attachment-tile.ts`) re-export these, so every
5
+ * fix lands once.
6
+ */
7
+ /** What the tile prints in the file's corner. Lowercase, from the name first
8
+ * and the MIME subtype second; empty when neither says anything. */
9
+ export declare function attachmentExtension(filename: string, mime?: string): string;
10
+ /**
11
+ * Which files the tile shows AS A PICTURE. Raster images only. An SVG is text
12
+ * that happens to draw — a logo file on a tile is a black blob at 100px, and
13
+ * its name is what tells it from the next logo file (Jay, 2026-09-06). It
14
+ * gets the named treatment, badge and all.
15
+ */
16
+ export declare function isPreviewableImage(filename: string, mime?: string): boolean;
17
+ /**
18
+ * How a name is laid out on the tile.
19
+ *
20
+ * A short name wraps over two lines as the browser sees fit. A long one is
21
+ * split: the first line is the head, ellipsized by CSS at the tile's edge, and
22
+ * the second line is the last ten characters verbatim — the part that carries
23
+ * the extension and tells `…-chatux.md` from `…-ux.md`. A single middle
24
+ * ellipsis in one string wrapped wherever the browser chose, and left a
25
+ * dangling hyphen at the end of line one (2026-09-06).
26
+ */
27
+ export declare const LONG_NAME_THRESHOLD = 24;
28
+ export declare const NAME_TAIL_CHARS = 10;
29
+ export declare function splitFilenameForTile(name: string): {
30
+ head: string;
31
+ tail: string;
32
+ } | null;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The stop-refusal guard. Both hosts (`packages/ui/src/session/status/stop-refusal.ts`,
3
+ * `apps/mobile/lib/session/turn-stop.ts`) re-export these, so every fix
4
+ * lands once.
5
+ */
6
+ /** The 403 `code` of a stop the server refused. */
7
+ export declare const NOT_TURN_PROMPTER = "not_turn_prompter";
8
+ /**
9
+ * The server's message when it refused a stop, else `fallback`; null for any
10
+ * other failure, so the caller keeps its "Couldn't stop" toast. A REST stop
11
+ * (the hold, "Stop and send") is an `ApiError` carrying the code. The runtime
12
+ * abort answers through the sandbox proxy, whose error keeps the status and
13
+ * the message but drops the body's `code`, so a 403 alone also counts.
14
+ */
15
+ export declare function stopRefusalMessage(error: unknown, fallback?: string): string | null;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The pure text rules of the `bash` tool row. Both hosts
3
+ * (`packages/ui/src/session/tool/tools/bash-tool.tsx`,
4
+ * `apps/mobile/lib/session/tools/files-bash.ts`) re-export these, so every
5
+ * fix lands once.
6
+ */
7
+ /**
8
+ * The words a settled row leads with.
9
+ *
10
+ * The bash tool's input carries a `description` — the one-line summary the
11
+ * model writes for its own call ("Install the workspace dependencies"). The
12
+ * SDK already reads it as this tool's subtitle (`core/turns/parts.ts`, case
13
+ * `'bash'`), so the row promotes a source it had been dropping rather than
14
+ * inventing one. A reader scanning a turn wants to know what a command was
15
+ * FOR, and `pnpm -w install --frozen-lockfile` answers that only if they read
16
+ * shell.
17
+ *
18
+ * Three rules, in order:
19
+ * - A failure keeps its verdict. "Command failed" is the one thing a friendly
20
+ * summary must never soften, so it outranks any description.
21
+ * - No description → exactly today's "Ran command". Nothing is ever derived
22
+ * from the command text: a classifier answering "Installed dependencies" to
23
+ * `npm i` would put a claim in the model's mouth that it never made.
24
+ * - Sentence case only lifts a lower-case opener. Lowering the rest would turn
25
+ * "Run CI on the release branch" into "Run ci on the release branch".
26
+ */
27
+ export declare function bashRowTitle(description: unknown, failed: boolean): string;
28
+ /**
29
+ * The command as the reader should see it: leading indent stripped, blank
30
+ * edges dropped.
31
+ *
32
+ * Commands arrive with incidental leading whitespace — a model quoting a
33
+ * command out of indented YAML/JSON sends ` agent-browser open …`. The
34
+ * trigger row hides it (a `truncate` span collapses spaces under normal
35
+ * white-space), but the card's `whitespace-pre-wrap` pane renders it verbatim,
36
+ * so the first line sits two characters deeper than its own wrapped
37
+ * continuation and the output below — an inverse hanging indent that reads as
38
+ * broken padding.
39
+ *
40
+ * Two rules, because a one-line command and a script are different documents:
41
+ *
42
+ * - **One line has no structure to protect**, so every leading blank is noise
43
+ * and all of it goes. This is the case a common-indent rule cannot be
44
+ * trusted with alone: it only strips what it can MEASURE, and the measure
45
+ * used to be `[ \t]` — so a command indented with a non-breaking space (or
46
+ * any other Unicode space; agents paste these out of rendered docs and
47
+ * spreadsheets) kept its indent and drew exactly the misalignment above.
48
+ * - **A script keeps its shape**: the COMMON indent goes, never a per-line
49
+ * trim, so nesting survives. Heredocs survive by construction — a non-`<<-`
50
+ * heredoc needs its terminator at column 0, which pins the common indent to
51
+ * 0 and makes this a no-op exactly where indentation is load-bearing.
52
+ *
53
+ * `[^\S\r\n]` is "whitespace that is not a line break", so both rules count
54
+ * every horizontal space character the Unicode table has, not just the two on
55
+ * a US keyboard. The trailing trim also stops a final `\n` from counting as a
56
+ * phantom `+1` line in the trigger.
57
+ */
58
+ export declare function dedentCommand(raw: string): string;
@@ -0,0 +1,2 @@
1
+ /** Persisted failure identifier. Keep stable when the translated UI copy changes. */
2
+ export declare const STALE_RUNTIME_DELIVERY_ERROR = "this session's computer cannot reach the API. Start a new session";
@@ -23,7 +23,7 @@ import { Skeleton } from '../../primitives/skeleton.js';
23
23
  import { SplitSheet, SplitSheetBody, SplitSheetContent, SplitSheetDescription, SplitSheetHeader, SplitSheetMain, SplitSheetTitle, } from '../../primitives/split-sheet.js';
24
24
  import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
25
25
  import { EmptyState } from '../../primitives/empty-state.js';
26
- import { connectorConnectionQueryKeys, } from '../sections/connector-connection-form.js';
26
+ import { connectorConnectionQueryKeys } from '../../internal/hooks/connectors/invalidate-connections.js';
27
27
  import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
28
28
  import { useProjectCan } from '../../internal/lib/use-project-can.js';
29
29
  import { ConnectorStatusBadge, ConnectorStatusLogo } from './connector-identity.js';
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { connectorConnectionQueryKeys } from '../../sections/connector-connection-form.js';
4
- import { invalidateConnections } from '../invalidate-connections.js';
3
+ import { connectorConnectionQueryKeys, invalidateConnections } from '../../../internal/hooks/connectors/invalidate-connections.js';
5
4
  import { ConnectorNoticeRow, NOTICE_BODY, NOTICE_TITLE, NoticeLogLine, } from './connector-notice-view.js';
6
5
  import { DetailPageShell, DETAIL_PAGE_COLUMN as PAGE_COLUMN } from './detail-page-shell.js';
7
- import { connectorAccountSignInStarted, getProjectDetail, listConnectors, syncConnectors, } from '@kortix/sdk';
6
+ import { connectorAccountNeedsSignIn, connectorAccountSignInStarted, getProjectDetail, listConnectors, syncConnectors, } from '@kortix/sdk';
8
7
  import { contract, FRESHNESS, qk, useProjectAccountId } from '@kortix/sdk/react';
9
8
  import { CaretLeftIcon, PlugIcon, PlusIcon } from '@phosphor-icons/react';
10
9
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
@@ -323,8 +322,14 @@ export function ConnectorDetailView({ projectId, connector, canWrite, onChanged,
323
322
  : [{ key: 'runs', label: t('infoRunsOver'), value: connectorRunsOver(connector.provider) }]),
324
323
  ];
325
324
  // The Accounts tab's own query; a channel has none, and the cell waits for it.
325
+ // It counts accounts an agent can use: a row whose sign-in never finished is
326
+ // listed in the tab, not counted here.
326
327
  if (!isChannel && connectionsQuery.isSuccess)
327
- stripCells.push({ key: 'accounts', label: t('stripAccounts'), value: String(accounts.length) });
328
+ stripCells.push({
329
+ key: 'accounts',
330
+ label: t('stripAccounts'),
331
+ value: String(accounts.filter((account) => !connectorAccountNeedsSignIn(account, connector)).length),
332
+ });
328
333
  stripCells.push({
329
334
  key: 'tools',
330
335
  label: t('stripTools'),
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { invalidateConnections } from '../invalidate-connections.js';
2
+ import { invalidateConnections } from '../../../internal/hooks/connectors/invalidate-connections.js';
3
3
  import { checkMcpServerSignIn, createConnector, getDiscoverConnector, } from '@kortix/sdk';
4
4
  import { useQueryClient } from '@tanstack/react-query';
5
5
  import { useUiRouter } from '../../../providers/ui-provider.js';
@@ -179,14 +179,14 @@ function ExpandedBody({ projectId, entry, status, keyConnected, canWrite, enable
179
179
  if (method === 'included' || (entry.envVars.length === 0 && !SUBSCRIPTION_BY_PROVIDER[entry.id])) {
180
180
  content = (_jsx(AccordionSubRow, { children: entry.hint }));
181
181
  }
182
- else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'openai') {
182
+ else if (pooled.accountId && entry.id === 'openai') {
183
183
  content = (_jsxs("div", { className: "border-border space-y-3 border-t py-3", children: [_jsx(SubscriptionUsageSection, { accountId: pooled.accountId, projectId: projectId, providerId: "codex", compact: true }), _jsx("p", { className: "text-foreground text-xs font-medium", children: tPooled('chatGptAccounts') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "codex", providerName: "ChatGPT Plus/Pro", envVar: "CODEX_AUTH_JSON", canWrite: true, oauth: { projectId, onConnected: () => undefined } }), _jsx(ChatGptSubscriptionConnect, { projectId: projectId, onConnected: () => undefined, legacyOnly: true, usageSlot: _jsx(LegacyChatGptUsage, { accountId: pooled.accountId, projectId: projectId }) }), _jsx("p", { className: "text-foreground pt-3 text-xs font-medium", children: tPooled('providerKeysFor', { provider: entry.label }) }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true })] }));
184
184
  }
185
- else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'anthropic') {
185
+ else if (pooled.accountId && entry.id === 'anthropic') {
186
186
  // Claude accounts, exactly as OpenAI lists ChatGPT accounts; Anthropic API keys below them.
187
187
  content = (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border space-y-3 border-t py-3", children: [_jsx(SubscriptionUsageSection, { accountId: pooled.accountId, projectId: projectId, providerId: "claude-agent", compact: true }), _jsx("p", { className: "text-foreground text-xs font-medium", children: tPooled('claudeAccounts') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "claude-agent", providerName: "Claude Pro/Max", envVar: "CLAUDE_CODE_OAUTH_TOKEN", canWrite: true, oauth: { projectId, onConnected: () => undefined, kind: 'claude' } })] }), _jsx("div", { className: "border-border border-t py-3", children: _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true }) })] }));
188
188
  }
189
- else if (pooled.pooledSecretsEnabled && pooled.accountId && supportsPooledProviderKey(entry)) {
189
+ else if (pooled.accountId && supportsPooledProviderKey(entry)) {
190
190
  content = (_jsxs(_Fragment, { children: [SUBSCRIPTION_BY_PROVIDER[entry.id] ? _jsx(SignInSubRows, { projectId: projectId, entry: entry, canWrite: canWrite }) : null, _jsx("div", { className: "border-border border-t py-3", children: _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true }) })] }));
191
191
  }
192
192
  else if (SUBSCRIPTION_BY_PROVIDER[entry.id]) {
@@ -281,7 +281,7 @@ export function ProviderAccordion({ projectId, canWrite = false, enabled = true,
281
281
  return null;
282
282
  const singleKey = entry.envVars.length === 1 &&
283
283
  !SUBSCRIPTION_BY_PROVIDER[entry.id] &&
284
- !(pooled.pooledSecretsEnabled && supportsPooledProviderKey(entry));
284
+ !supportsPooledProviderKey(entry);
285
285
  // A key saved through the form lands in the named store ("Workspace key").
286
286
  const keyConnected = connectedIds.has(entry.id) || pooled.pooledProviderIds.has(entry.id);
287
287
  if (addingId === row.id && singleKey && canWrite) {
@@ -319,7 +319,7 @@ export function ProviderAccordion({ projectId, canWrite = false, enabled = true,
319
319
  event.stopPropagation();
320
320
  setSearchOpen(false);
321
321
  }
322
- } }), _jsx(InputGroupSearchClear, { onClick: () => setSearch('') })] }) })) : null, pooled.pooledSecretsEnabled || !canWrite ? (pooled.pooledSecretsEnabled ? (_jsx(PooledProvidersNote, { projectId: projectId, className: "text-muted-foreground px-1 pb-2 text-xs text-pretty" })) : (_jsx("p", { className: "text-muted-foreground px-1 pb-2 text-xs text-pretty", children: t('readOnly') }))) : null, empty ? (_jsx(EmptyState, { size: "sm", title: t('noMatch', { query: search.trim() }) })) : (_jsxs(_Fragment, { children: [inUse.length > 0 ? (_jsx(AccordionGroupLabel, { label: `${t('inUse')} · ${inUse.length}`, action: searchOpen ? null : searchButton })) : null, inUse.map(renderRow), visibleAvailable.length > 0 ? (_jsx(AccordionGroupLabel, { label: t('available'), className: inUse.length > 0 ? 'pt-3.5' : undefined, action: inUse.length === 0 && !searchOpen ? searchButton : null })) : null, visibleAvailable.map(renderRow)] })), hiddenCount > 0 ? (_jsxs("div", { className: "flex items-center gap-2 px-1 pt-1", "data-provider-load-more": "", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setVisibleCount((shown) => shown + PROVIDER_PAGE_SIZE), children: t('showMore') }), _jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: t('shownOf', {
322
+ } }), _jsx(InputGroupSearchClear, { onClick: () => setSearch('') })] }) })) : null, _jsx(PooledProvidersNote, { projectId: projectId, className: "text-muted-foreground px-1 pb-2 text-xs text-pretty" }), empty ? (_jsx(EmptyState, { size: "sm", title: t('noMatch', { query: search.trim() }) })) : (_jsxs(_Fragment, { children: [inUse.length > 0 ? (_jsx(AccordionGroupLabel, { label: `${t('inUse')} · ${inUse.length}`, action: searchOpen ? null : searchButton })) : null, inUse.map(renderRow), visibleAvailable.length > 0 ? (_jsx(AccordionGroupLabel, { label: t('available'), className: inUse.length > 0 ? 'pt-3.5' : undefined, action: inUse.length === 0 && !searchOpen ? searchButton : null })) : null, visibleAvailable.map(renderRow)] })), hiddenCount > 0 ? (_jsxs("div", { className: "flex items-center gap-2 px-1 pt-1", "data-provider-load-more": "", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setVisibleCount((shown) => shown + PROVIDER_PAGE_SIZE), children: t('showMore') }), _jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: t('shownOf', {
323
323
  shown: inUse.length + visibleAvailable.length,
324
324
  total: inUse.length + available.length,
325
325
  }) })] })) : null] }));
@@ -69,7 +69,7 @@ export interface ProviderConnectViewProps {
69
69
  /** The provider open in the host's sheet, if any. */
70
70
  selectedId?: string | null;
71
71
  onSelect: (providerId: string) => void;
72
- /** One line above the list: read-only members and pooled-keys mode only. */
72
+ /** One line above the list: who the keys added here are shared with. */
73
73
  note?: string;
74
74
  className?: string;
75
75
  }
@@ -84,7 +84,6 @@ export declare function ProviderConnectView({ inUse, available, totalCount, hidd
84
84
  export declare function useManagedProvider(projectId: string | null): LlmProviderEntry;
85
85
  /** Provider ids that hold a usable pooled (account-level) key for this project. */
86
86
  export declare function usePooledProviderIds(projectId: string, enabled: boolean): {
87
- pooledSecretsEnabled: boolean;
88
87
  accountId: string | undefined;
89
88
  pooledProviderIds: Set<string | null>;
90
89
  isLoading: boolean;
@@ -94,6 +93,7 @@ export declare function usePooledProviderIds(projectId: string, enabled: boolean
94
93
  };
95
94
  export interface ProviderConnectProps {
96
95
  projectId: string;
96
+ /** @deprecated Unused: every member sees who the keys added here are shared with. */
97
97
  canWrite?: boolean;
98
98
  /** Set while this surface is visible; drives the underlying queries. */
99
99
  enabled?: boolean;
@@ -101,4 +101,4 @@ export interface ProviderConnectProps {
101
101
  onSelect: (providerId: string) => void;
102
102
  className?: string;
103
103
  }
104
- export declare function ProviderConnect({ projectId, canWrite, enabled, selectedId, onSelect, className, }: ProviderConnectProps): import("react").JSX.Element;
104
+ export declare function ProviderConnect({ projectId, enabled, selectedId, onSelect, className, }: ProviderConnectProps): import("react").JSX.Element;
@@ -35,7 +35,7 @@ import { LLM_PROVIDERS } from '../../internal/lib/llm-providers.js';
35
35
  import { cn } from '../../internal/lib/utils.js';
36
36
  import { PLATFORM_FEE_PERCENT } from '../../internal/billing/compute-pricing.js';
37
37
  import { FIRST_CLASS_PROVIDER_IDS, PROVIDER_SUBSCRIPTIONS, getProjectDetail, providerConnectMethod, providerConnectedVia, } from '@kortix/sdk';
38
- import { qk, useAccountSecretResources, useFeatureFlag, useModelAccess, useProjectModelPickerCatalog, } from '@kortix/sdk/react';
38
+ import { qk, useAccountSecretResources, useModelAccess, useProjectModelPickerCatalog, } from '@kortix/sdk/react';
39
39
  import { useQuery } from '@tanstack/react-query';
40
40
  import { useCanShareProviderAccounts } from '../sections/view/account-secret-resources-panel.js';
41
41
  import { SUBSCRIPTION_ROW, SubscriptionRowMeter, summarizeSubscriptions, useLiveSubscriptionUsages, useSubscriptionLogins, useSubscriptionRowSummary, } from '../sections/view/subscription-usage.js';
@@ -152,24 +152,21 @@ export function useManagedProvider(projectId) {
152
152
  }
153
153
  /** Provider ids that hold a usable pooled (account-level) key for this project. */
154
154
  export function usePooledProviderIds(projectId, enabled) {
155
- const pooledFlag = useFeatureFlag(enabled ? projectId : null, 'pooled_provider_secrets');
156
- const pooledSecretsEnabled = pooledFlag.enabled;
157
155
  const project = useQuery({
158
156
  queryKey: qk.project.detail(projectId),
159
157
  queryFn: () => getProjectDetail(projectId),
160
- enabled: enabled && pooledSecretsEnabled,
158
+ enabled,
161
159
  });
162
160
  const accountId = project.data?.project?.account_id;
163
- const pooledResources = useAccountSecretResources(enabled && pooledSecretsEnabled ? accountId : null, projectId);
161
+ const pooledResources = useAccountSecretResources(enabled ? accountId : null, projectId);
164
162
  const pooledProviderIds = useMemo(() => new Set((pooledResources.data?.secrets ?? [])
165
163
  .filter((secret) => secret.can_use && secret.active)
166
164
  .map((secret) => secret.provider_id)), [pooledResources.data]);
167
165
  return {
168
- pooledSecretsEnabled,
169
166
  accountId,
170
167
  pooledProviderIds,
171
- isLoading: pooledFlag.isLoading || (pooledSecretsEnabled && (project.isLoading || pooledResources.isLoading)),
172
- isError: pooledSecretsEnabled && (project.isError || pooledResources.isError),
168
+ isLoading: project.isLoading || pooledResources.isLoading,
169
+ isError: project.isError || pooledResources.isError,
173
170
  isFetching: project.isFetching || pooledResources.isFetching,
174
171
  refetch: () => {
175
172
  void project.refetch();
@@ -177,8 +174,7 @@ export function usePooledProviderIds(projectId, enabled) {
177
174
  },
178
175
  };
179
176
  }
180
- export function ProviderConnect({ projectId, canWrite = false, enabled = true, selectedId, onSelect, className, }) {
181
- const t = useTranslations('providerSheet');
177
+ export function ProviderConnect({ projectId, enabled = true, selectedId, onSelect, className, }) {
182
178
  const common = useTranslations('common');
183
179
  const tPooled = useTranslations('pooledSecrets');
184
180
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
@@ -189,7 +185,7 @@ export function ProviderConnect({ projectId, canWrite = false, enabled = true, s
189
185
  useLiveLlmProviderCatalog(projectId, enabled);
190
186
  const catalogRevision = useLlmProviderCatalogRevision();
191
187
  const { connectedProviders, providerStateLoading } = useConnectedProviders(projectId, enabled);
192
- const subscriptionAccountId = enabled && pooled.pooledSecretsEnabled ? pooled.accountId : null;
188
+ const subscriptionAccountId = enabled ? pooled.accountId : null;
193
189
  const subscriptions = useSubscriptionLogins(subscriptionAccountId, projectId);
194
190
  const liveUsage = useLiveSubscriptionUsages(subscriptionAccountId, projectId, subscriptions.logins);
195
191
  const rowSummary = useSubscriptionRowSummary();
@@ -260,9 +256,5 @@ export function ProviderConnect({ projectId, canWrite = false, enabled = true, s
260
256
  if (pooled.isError) {
261
257
  return (_jsx(ErrorState, { size: "sm", title: tPooled('loadError'), action: _jsx(Button, { size: "sm", variant: "secondary", disabled: pooled.isFetching, onClick: pooled.refetch, children: common('retry') }) }));
262
258
  }
263
- return (_jsx(ProviderConnectView, { inUse: inUse, available: visibleAvailable, totalCount: searchable.length, hiddenCount: available.length - visibleAvailable.length, onLoadMore: () => setVisibleCount((shown) => shown + PROVIDER_PAGE_SIZE), search: search, onSearchChange: setSearch, selectedId: selectedId, onSelect: onSelect, note: pooled.pooledSecretsEnabled
264
- ? tPooled(canShare ? 'sharedDescription' : 'sharedOnlyYouDescription')
265
- : canWrite
266
- ? undefined
267
- : t('readOnly'), className: className }));
259
+ return (_jsx(ProviderConnectView, { inUse: inUse, available: visibleAvailable, totalCount: searchable.length, hiddenCount: available.length - visibleAvailable.length, onLoadMore: () => setVisibleCount((shown) => shown + PROVIDER_PAGE_SIZE), search: search, onSearchChange: setSearch, selectedId: selectedId, onSelect: onSelect, note: tPooled(canShare ? 'sharedDescription' : 'sharedOnlyYouDescription'), className: className }));
268
260
  }
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
14
14
  * - **OpenAI and OpenCode Go** — two ways in. With nothing connected the sheet
15
15
  * asks which: a subscription sign-in (device code) or an API key. With
16
16
  * either connected it lists the connections and offers the other.
17
- * - **Pooled keys** (`pooled_provider_secrets`) — the account-level key
17
+ * - **Pooled keys** — the account-level key
18
18
  * manager, as before.
19
19
  *
20
20
  * Saving is a button, not a blur. The old list saved a field when focus left
@@ -294,14 +294,14 @@ export function ProviderSheet({ projectId, providerId, canWrite, enabled = true,
294
294
  if (method === 'included') {
295
295
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: entry.hint }), models] }));
296
296
  }
297
- else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'openai') {
297
+ else if (pooled.accountId && entry.id === 'openai') {
298
298
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsx(SubscriptionUsageSection, { accountId: pooled.accountId, projectId: projectId, providerId: "codex" }), _jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('chatGptAccounts') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tPooled(canShare ? 'oauthPrivateDescription' : 'oauthOnlyYouDescription') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "codex", providerName: "ChatGPT Plus/Pro", envVar: "CODEX_AUTH_JSON", canWrite: true, oauth: { projectId, onConnected: () => undefined } }), _jsx(ChatGptSubscriptionConnect, { projectId: projectId, onConnected: () => undefined, legacyOnly: true, usageSlot: _jsx(LegacyChatGptUsage, { accountId: pooled.accountId, projectId: projectId }) })] }), _jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('providerKeysFor', { provider: entry.label }) }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true })] }), models] }));
299
299
  }
300
- else if (pooled.pooledSecretsEnabled && pooled.accountId && entry.id === 'anthropic') {
300
+ else if (pooled.accountId && entry.id === 'anthropic') {
301
301
  // Claude accounts, exactly as OpenAI lists ChatGPT accounts; Anthropic API keys below them.
302
302
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsx(SubscriptionUsageSection, { accountId: pooled.accountId, projectId: projectId, providerId: "claude-agent" }), _jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('claudeAccounts') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tPooled(canShare ? 'claudeOauthPrivateDescription' : 'claudeOauthOnlyYouDescription') }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: "claude-agent", providerName: "Claude Pro/Max", envVar: "CLAUDE_CODE_OAUTH_TOKEN", canWrite: true, oauth: { projectId, onConnected: () => undefined, kind: 'claude' } })] }), _jsxs("div", { className: "space-y-3", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: tPooled('providerKeysFor', { provider: entry.label }) }), _jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true })] }), models] }));
303
303
  }
304
- else if (pooled.pooledSecretsEnabled && pooled.accountId && supportsPooledProviderKey(entry)) {
304
+ else if (pooled.accountId && supportsPooledProviderKey(entry)) {
305
305
  content = (_jsxs(SplitSheetBody, { className: "space-y-7", children: [_jsx(AccountSecretResourcesPanel, { accountId: pooled.accountId, projectId: projectId, providerId: entry.id, providerName: entry.label, envVar: entry.envVars[0], canWrite: true }), models] }));
306
306
  }
307
307
  else if (SUBSCRIPTION_BY_PROVIDER[entry.id]) {
@@ -16,7 +16,6 @@ export interface EasyConnectConnectionInput {
16
16
  }
17
17
  /** A connector's setup status. The rules live in `@kortix/sdk`. */
18
18
  export { connectorSetupStatus, isConnectorAuthChallenge as isAuthChallenge, type ConnectorSetupStatus, } from '@kortix/sdk';
19
- export declare function connectorConnectionQueryKeys(projectId: string): readonly [readonly ["kx", "project", string, "connectors"], readonly ["connections", string], readonly ["connections-all", string], readonly ["session-scope-catalog", string]];
20
19
  export declare function createOnlyConnectorDraft(draft: ConnectorDraftInput): ConnectorDraftInput;
21
20
  export declare function connectorSyncErrorForSlug(result: {
22
21
  sync?: ConnectorSyncResult;
@@ -1,15 +1,6 @@
1
- import { qk } from '@kortix/sdk/react';
2
1
  const MAX_CONNECTOR_SLUG_LENGTH = 128;
3
2
  /** A connector's setup status. The rules live in `@kortix/sdk`. */
4
3
  export { connectorSetupStatus, isConnectorAuthChallenge as isAuthChallenge, } from '@kortix/sdk';
5
- export function connectorConnectionQueryKeys(projectId) {
6
- return [
7
- qk.project.connectors(projectId),
8
- ['connections', projectId],
9
- ['connections-all', projectId],
10
- ['session-scope-catalog', projectId],
11
- ];
12
- }
13
4
  export function createOnlyConnectorDraft(draft) {
14
5
  return { ...draft, create_only: true };
15
6
  }
@@ -27,7 +27,7 @@ import { useEffect, useMemo, useState } from 'react';
27
27
  import { invalidateReviewInbox, useActReviewItem, useBulkActReviewItems, useResolveReviewApproval, useReviewItemById, useReviewItems, withFreshApprovalDetail, } from '../../../workspace/review/hooks/use-review-items.js';
28
28
  import { mapApiReviewItem } from '../../../workspace/review/map.js';
29
29
  import { connectorCallId, crChangeRequestId, isApprovalExpiredError, itemDeepLink, } from '../../../workspace/review/review-actions.js';
30
- import { AskDeck, DECK_KINDS } from '../../../session/prompts/ask-deck.js';
30
+ import { AskDeck, DECK_KINDS, deckOrder } from '../../../session/prompts/ask-deck.js';
31
31
  import { ReviewCenter } from '../../../workspace/review/review-center.js';
32
32
  import { REVIEW_VERDICT_ANNOUNCED } from '../../../workspace/review/review-reducer.js';
33
33
  /**
@@ -54,6 +54,10 @@ export function ReviewCenterConnected({ projectName }) {
54
54
  // sit beside rows that do wait, so the pane shows "Select an item" instead.
55
55
  // Same query as the deck's own: a cache hit, not a second request.
56
56
  const asks = useSessionAsks(projectId, { enabled: Boolean(projectId) });
57
+ const [selectedAskId, setSelectedAskId] = useState(null);
58
+ const [currentAskId, setCurrentAskId] = useState(null);
59
+ const [hiddenAskIds, setHiddenAskIds] = useState(() => new Set());
60
+ const deckAsks = deckOrder((asks.data?.asks ?? []).filter((ask) => DECK_KINDS.has(ask.kind)), [], hiddenAskIds);
57
61
  const deckShows = asks.isLoading || asks.isError || (asks.data?.asks ?? []).some((ask) => DECK_KINDS.has(ask.kind));
58
62
  const qc = useQueryClient();
59
63
  const router = useUiRouter();
@@ -277,12 +281,12 @@ export function ReviewCenterConnected({ projectName }) {
277
281
  // The effect above has already warmed this href.
278
282
  router.push(href);
279
283
  }
280
- return (_jsx(ReviewCenter, { needsYouDeck: projectId && deckShows
284
+ return (_jsx(ReviewCenter, { sessionAsks: deckAsks, selectedAskId: currentAskId, onSelectAsk: setSelectedAskId, needsYouDeck: projectId && deckShows
281
285
  ? ({ paused }) => (
282
286
  // `empty={null}`: in the 5 s Undo window after the last card,
283
287
  // the deck draws nothing (the inbox shows its own empty state)
284
288
  // rather than "Nothing waits on you" beside rows that do.
285
- _jsx(AskDeck, { projectId: projectId, onOpenSession: openSession, empty: null, paused: paused }))
289
+ _jsx(AskDeck, { projectId: projectId, onOpenSession: openSession, empty: null, paused: paused, onCurrentAskChange: setCurrentAskId, onHiddenAskIdsChange: setHiddenAskIds, selectedAskId: selectedAskId, onClearSelection: () => setSelectedAskId(null) }))
286
290
  : undefined, initialItems: items, segment: segment, onSegmentChange: setSegment, loadMore: hasNextPage
287
291
  ? {
288
292
  onLoadMore: () => void fetchNextPage(),