@kortix/ui 0.14.6 → 0.14.8

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 (186) hide show
  1. package/dist/_vendor/kortix-shared.js +490 -382
  2. package/dist/_vendor/shared/runtime-versions.d.ts +4 -0
  3. package/dist/access/access/access-dialog-share.js +4 -7
  4. package/dist/access/access/access-dialog.js +2 -1
  5. package/dist/access/access/principal-picker.js +6 -5
  6. package/dist/customize/agents/agent-authority-card.js +1 -2
  7. package/dist/customize/agents/agent-cover-card.d.ts +17 -0
  8. package/dist/customize/agents/agent-cover-card.js +13 -0
  9. package/dist/customize/agents/agent-detail-aside.js +15 -14
  10. package/dist/customize/agents/agent-drives-section.js +5 -6
  11. package/dist/customize/agents/agent-grant-pages.js +68 -70
  12. package/dist/customize/agents/agent-page.js +27 -19
  13. package/dist/customize/agents/agent-people-section.js +18 -17
  14. package/dist/customize/agents/agent-triggers-section.js +6 -5
  15. package/dist/customize/agents/agents-page.js +43 -49
  16. package/dist/customize/connectors/catalog/catalog-entry.d.ts +14 -0
  17. package/dist/customize/connectors/catalog/catalog-entry.js +18 -1
  18. package/dist/customize/connectors/catalog/connector-browse.d.ts +28 -0
  19. package/dist/customize/connectors/catalog/connector-browse.js +18 -5
  20. package/dist/customize/connectors/detail/app-page.js +19 -5
  21. package/dist/customize/connectors/detail/connector-modal.d.ts +10 -13
  22. package/dist/customize/connectors/detail/connector-modal.js +18 -101
  23. package/dist/customize/connectors/detail/connector-notice.js +6 -2
  24. package/dist/customize/connectors/detail/connector-page.d.ts +30 -0
  25. package/dist/customize/connectors/detail/connector-page.js +26 -13
  26. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +1 -0
  27. package/dist/customize/migrate-to-v2/migration-prompt.js +1 -0
  28. package/dist/customize/sections/llm-provider/custom-provider-form.js +24 -7
  29. package/dist/customize/sections/llm-provider/custom-provider-panel.js +44 -8
  30. package/dist/customize/sections/llm-provider/types.d.ts +3 -0
  31. package/dist/customize/sections/llm-provider/utils.js +2 -2
  32. package/dist/customize/sections/view/agent-editor-access-fields.d.ts +9 -16
  33. package/dist/customize/sections/view/agent-editor-access-fields.js +30 -30
  34. package/dist/customize/sections/view/agent-editor-basics-fields.js +3 -10
  35. package/dist/customize/sections/view/agent-editor-primitives.d.ts +28 -10
  36. package/dist/customize/sections/view/agent-editor-primitives.js +32 -19
  37. package/dist/customize/sections/view/agent-editor.js +3 -3
  38. package/dist/customize/sections/view/channels-view.js +2 -6
  39. package/dist/customize/sections/view/gateway/gateway-routing.js +3 -3
  40. package/dist/customize/sections/view/grant-mode-field.d.ts +2 -5
  41. package/dist/customize/sections/view/grant-mode-field.js +10 -18
  42. package/dist/customize/sections/view/permission-editor.js +11 -8
  43. package/dist/customize/sections/view/secrets-view.js +2 -1
  44. package/dist/customize/settings/tabs/general-tab.d.ts +9 -2
  45. package/dist/customize/settings/tabs/general-tab.js +33 -11
  46. package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +4 -0
  47. package/dist/customize/settings/tabs/transfer-workspace-dialog.js +82 -0
  48. package/dist/customize/shared/new-entity-menu.js +4 -1
  49. package/dist/customize/skills/skills-page.js +4 -5
  50. package/dist/customize/triggers/schedule/then-fields.js +1 -5
  51. package/dist/customize/triggers/schedule-view.js +4 -2
  52. package/dist/files/project/api/runtime-files.js +3 -2
  53. package/dist/files/project/file-source.js +18 -1
  54. package/dist/files/project/hooks/use-file-content.js +2 -0
  55. package/dist/files/viewer/file-header.js +1 -1
  56. package/dist/files/viewer/file-preview-modal.d.ts +1 -1
  57. package/dist/files/viewer/file-preview-modal.js +12 -2
  58. package/dist/files/viewer/file-source.d.ts +3 -1
  59. package/dist/files/viewer/use-file-content-state.js +26 -7
  60. package/dist/files/viewer/viewer-actions.js +2 -2
  61. package/dist/i18n/en.d.ts +393 -12
  62. package/dist/i18n/en.js +400 -19
  63. package/dist/internal/components/agent-mark.d.ts +38 -0
  64. package/dist/internal/components/agent-mark.js +38 -0
  65. package/dist/internal/files/types.d.ts +2 -0
  66. package/dist/internal/goals/goal-meta.d.ts +30 -0
  67. package/dist/internal/goals/goal-meta.js +55 -0
  68. package/dist/internal/lib/pixel-mark.d.ts +33 -0
  69. package/dist/internal/lib/pixel-mark.js +152 -0
  70. package/dist/internal/lib/query-client-singleton.d.ts +9 -3
  71. package/dist/internal/lib/query-client-singleton.js +18 -12
  72. package/dist/internal/lib/use-project-feature-flags.js +3 -3
  73. package/dist/internal/share/session-shares-modal.js +3 -7
  74. package/dist/internal/stores/kortix-computer-store.js +14 -2
  75. package/dist/internal/stores/session-hover-store.d.ts +32 -0
  76. package/dist/internal/stores/session-hover-store.js +38 -0
  77. package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
  78. package/dist/internal/stores/sidebar-nav-store.js +3 -1
  79. package/dist/lib/routes.d.ts +2 -0
  80. package/dist/lib/routes.js +1 -0
  81. package/dist/markdown/genui/components/inline.d.ts +1 -1
  82. package/dist/markdown/setup-links/app-credentials-form.d.ts +12 -0
  83. package/dist/markdown/setup-links/app-credentials-form.js +115 -0
  84. package/dist/markdown/setup-links/secret-intake-form.d.ts +10 -0
  85. package/dist/markdown/setup-links/secret-intake-form.js +1 -1
  86. package/dist/primitives/entity-avatar.d.ts +4 -1
  87. package/dist/primitives/entity-avatar.js +4 -2
  88. package/dist/primitives/settings-section-header.d.ts +1 -1
  89. package/dist/primitives/user-avatar.d.ts +3 -1
  90. package/dist/primitives/user-avatar.js +4 -2
  91. package/dist/providers/ui-provider.d.ts +1 -1
  92. package/dist/session/composer/agent-selector.d.ts +7 -1
  93. package/dist/session/composer/agent-selector.js +20 -10
  94. package/dist/session/composer/attachment-tile.d.ts +0 -2
  95. package/dist/session/composer/attachment-tile.js +0 -8
  96. package/dist/session/composer/clipboard-files.d.ts +2 -1
  97. package/dist/session/composer/composer-draft-recovery.d.ts +1 -2
  98. package/dist/session/composer/composer-draft-recovery.js +0 -13
  99. package/dist/session/composer/context-ring.d.ts +1 -1
  100. package/dist/session/composer/context-ring.js +2 -2
  101. package/dist/session/composer/context-usage.d.ts +8 -6
  102. package/dist/session/composer/context-usage.js +9 -7
  103. package/dist/session/composer/inbox-row-claims.d.ts +2 -2
  104. package/dist/session/composer/inbox-row-claims.js +1 -1
  105. package/dist/session/composer/queue-projection.d.ts +3 -2
  106. package/dist/session/composer/queued-prompt-edit.d.ts +1 -1
  107. package/dist/session/composer/reasoning-effort-selector.d.ts +2 -1
  108. package/dist/session/composer/session-composer-readiness.d.ts +7 -22
  109. package/dist/session/composer/session-composer-readiness.js +12 -40
  110. package/dist/session/composer/token-progress.d.ts +1 -1
  111. package/dist/session/composer/token-progress.js +6 -6
  112. package/dist/session/header/export-transcript-modal.d.ts +3 -2
  113. package/dist/session/header/export-transcript-modal.js +6 -3
  114. package/dist/session/header/session-goal-indicator.d.ts +1 -0
  115. package/dist/session/header/session-goal-indicator.js +41 -0
  116. package/dist/session/header/session-site-header.js +2 -1
  117. package/dist/session/models/model-selector.d.ts +3 -1
  118. package/dist/session/models/model-selector.js +3 -2
  119. package/dist/session/panel/easy/plan-card.d.ts +2 -0
  120. package/dist/session/panel/easy/plan-card.js +2 -0
  121. package/dist/session/panel/session-action-panel-column.js +11 -1
  122. package/dist/session/panel/session-audit-shared.d.ts +0 -4
  123. package/dist/session/panel/session-audit-shared.js +1 -1
  124. package/dist/session/panel/session-changes-shared.d.ts +2 -1
  125. package/dist/session/prompts/session-permission-prompt.js +6 -3
  126. package/dist/session/status/provisioning-failure.d.ts +2 -1
  127. package/dist/session/status/session-error-banner.js +8 -6
  128. package/dist/session/status/session-starting-loader.d.ts +24 -31
  129. package/dist/session/status/session-starting-loader.js +32 -81
  130. package/dist/session/thread/chat-minimap-items.d.ts +4 -4
  131. package/dist/session/thread/first-prompt-handover.d.ts +3 -2
  132. package/dist/session/thread/message-parsing.d.ts +3 -3
  133. package/dist/session/thread/plan-surface.d.ts +1 -0
  134. package/dist/session/thread/plan-surface.js +1 -0
  135. package/dist/session/thread/session-chat.js +5 -12
  136. package/dist/session/thread/session-context-metrics.d.ts +15 -0
  137. package/dist/session/thread/session-context-metrics.js +10 -1
  138. package/dist/session/thread/session-context-modal.d.ts +4 -2
  139. package/dist/session/thread/session-context-modal.js +16 -9
  140. package/dist/session/thread/session-history-scroll.d.ts +2 -1
  141. package/dist/session/thread/session-thread.js +1 -1
  142. package/dist/session/thread/transcript.d.ts +4 -0
  143. package/dist/session/thread/transcript.js +18 -5
  144. package/dist/session/thread/turn-share.d.ts +16 -0
  145. package/dist/session/thread/turn-share.js +162 -0
  146. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -0
  147. package/dist/session/tool/tools/apply-patch-tool.js +1 -0
  148. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -0
  149. package/dist/session/tool/tools/pty-kill-tool.js +1 -0
  150. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -0
  151. package/dist/session/tool/tools/pty-read-tool.js +2 -0
  152. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -0
  153. package/dist/session/tool/tools/pty-spawn-tool.js +1 -0
  154. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -0
  155. package/dist/session/tool/tools/pty-write-tool.js +1 -0
  156. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -0
  157. package/dist/session/tool/tools/todo-write-tool.js +1 -0
  158. package/dist/session/turn/message-author-label.js +6 -2
  159. package/dist/session/turn/plan-anchor.d.ts +3 -0
  160. package/dist/session/turn/plan-anchor.js +3 -0
  161. package/dist/session/turn/plan-card.d.ts +7 -0
  162. package/dist/session/turn/plan-card.js +7 -0
  163. package/dist/styles.css +1 -1
  164. package/dist/terminal/pty-connection.d.ts +5 -4
  165. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  166. package/dist/workspace/index.d.ts +1 -0
  167. package/dist/workspace/index.js +1 -0
  168. package/dist/workspace/saved-session-skeleton-shape.d.ts +4 -3
  169. package/dist/workspace/saved-session-skeleton.d.ts +5 -1
  170. package/dist/workspace/saved-session-skeleton.js +5 -4
  171. package/dist/workspace/session-workspace.js +4 -5
  172. package/dist/workspace/sidebar/footer/project-goals-nav.d.ts +6 -0
  173. package/dist/workspace/sidebar/footer/project-goals-nav.js +26 -0
  174. package/dist/workspace/sidebar/modal/session-embed-section.d.ts +25 -0
  175. package/dist/workspace/sidebar/modal/session-embed-section.js +71 -0
  176. package/dist/workspace/sidebar/modal/share-session-modal.js +2 -2
  177. package/dist/workspace/sidebar/nav-row-meta.js +14 -2
  178. package/dist/workspace/sidebar/project-nav-items.js +3 -0
  179. package/dist/workspace/sidebar/project-session-list.js +12 -3
  180. package/dist/workspace/sidebar/session-brief-hover-card.js +33 -9
  181. package/package.json +12 -4
  182. package/skills/kortix-ui/references/modules.md +2 -0
  183. package/dist/session/status/use-readiness-settling.d.ts +0 -18
  184. package/dist/session/status/use-readiness-settling.js +0 -43
  185. package/dist/workspace/sidebar/modal/session-public-link-section.d.ts +0 -13
  186. package/dist/workspace/sidebar/modal/session-public-link-section.js +0 -66
@@ -1,43 +0,0 @@
1
- 'use client';
2
- import { useEffect, useState } from 'react';
3
- /**
4
- * How long a freshly mounted session may say NOTHING about its runtime.
5
- *
6
- * Long enough to cover the first health probe + `GET .../turn` round trip on a
7
- * healthy session (both answer well inside a second locally and on dev), short
8
- * enough that a genuinely parked box still announces its wake promptly. The
9
- * cost of being wrong in one direction is a false "your session dropped" flash
10
- * on every page load; in the other, a real wake notice arrives ~1.5s later.
11
- */
12
- export const READINESS_SETTLE_MS = 1_500;
13
- /**
14
- * True while the runtime has not been contacted yet AND the mount is young.
15
- *
16
- * Feeds `sessionComposerReadiness({ settling })`, whose fallback would
17
- * otherwise assert "Waking this session up…" the instant a page loads — the
18
- * one claim nothing had checked. See that input's docstring.
19
- */
20
- export function useReadinessSettling(uncontacted, windowMs = READINESS_SETTLE_MS) {
21
- // The window is identified by WHEN it opened, and that instant is state, not a
22
- // ref: an earlier cut bumped a ref inside the effect and compared it during
23
- // render, so on the first render of each window the ref still held the
24
- // previous value, the hook answered "not settling", and the notice this hook
25
- // exists to suppress flashed anyway before the effect could run.
26
- const [openedAt, setOpenedAt] = useState(null);
27
- const [elapsedFor, setElapsedFor] = useState(null);
28
- useEffect(() => {
29
- if (!uncontacted) {
30
- setOpenedAt(null);
31
- return;
32
- }
33
- const startedAt = Date.now();
34
- setOpenedAt(startedAt);
35
- const timer = window.setTimeout(() => setElapsedFor(startedAt), windowMs);
36
- return () => window.clearTimeout(timer);
37
- }, [uncontacted, windowMs]);
38
- // Settling from the first render onward: `openedAt === null` means the effect
39
- // has not run yet, which is the very moment the flash used to happen.
40
- if (!uncontacted)
41
- return false;
42
- return openedAt === null || elapsedFor !== openedAt;
43
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * "Public link" in the Share dialog: a read-only, sign-in-free link to this
3
- * session's conversation. One live link per session (the API returns the
4
- * existing one on a second create), so the section shows either that link with
5
- * Copy and Revoke, or the one button that creates it.
6
- *
7
- * Mounted inside `ModalContent`, so the share list is read only while the
8
- * dialog is open.
9
- */
10
- export declare function SessionPublicLinkSection({ projectId, sessionId, }: {
11
- projectId: string;
12
- sessionId: string;
13
- }): import("react").JSX.Element;
@@ -1,66 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { PublicShareLinkConfirm } from '../../../internal/share/public-share-link-confirm.js';
4
- import { Button } from '../../../primitives/button.js';
5
- import { ConfirmDialog } from '../../../primitives/confirm-dialog.js';
6
- import Hint from '../../../primitives/hint.js';
7
- import { Label } from '../../../primitives/label.js';
8
- import Loading from '../../../primitives/loading.js';
9
- import { errorToast, successToast } from '../../../primitives/toast.js';
10
- import { usePublicShareLink } from '../../../internal/share/use-public-share-link.js';
11
- import { publicShareUrl, useRevokePublicShare, useSessionPublicShares, } from '../../../internal/share/use-session-public-shares.js';
12
- import { useTranslations } from '../../../i18n/index.js';
13
- import { findActiveTranscriptShare } from '@kortix/sdk';
14
- import { CheckIcon, CopyIcon, LinkSimpleIcon } from '@phosphor-icons/react';
15
- import { useEffect, useRef, useState } from 'react';
16
- // Module-level so `usePublicShareLink` sees one stable input object.
17
- const TRANSCRIPT_SHARE_INPUT = { transcript: true };
18
- /**
19
- * "Public link" in the Share dialog: a read-only, sign-in-free link to this
20
- * session's conversation. One live link per session (the API returns the
21
- * existing one on a second create), so the section shows either that link with
22
- * Copy and Revoke, or the one button that creates it.
23
- *
24
- * Mounted inside `ModalContent`, so the share list is read only while the
25
- * dialog is open.
26
- */
27
- export function SessionPublicLinkSection({ projectId, sessionId, }) {
28
- const t = useTranslations('hardcodedUi.publicTranscriptShare');
29
- const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
30
- const { shares, isLoading, isError } = useSessionPublicShares(projectId, sessionId);
31
- const link = usePublicShareLink({ projectId, sessionId, input: TRANSCRIPT_SHARE_INPUT });
32
- const { revoke, revokingId } = useRevokePublicShare(projectId, sessionId);
33
- const [confirmRevoke, setConfirmRevoke] = useState(false);
34
- const [copied, setCopied] = useState(false);
35
- const copiedTimer = useRef(null);
36
- useEffect(() => () => {
37
- if (copiedTimer.current)
38
- clearTimeout(copiedTimer.current);
39
- }, []);
40
- const active = findActiveTranscriptShare(shares);
41
- const url = active ? publicShareUrl(active.public_path) : null;
42
- const isRevoking = !!active && revokingId === active.share_id;
43
- const copy = async () => {
44
- if (!url)
45
- return;
46
- try {
47
- await navigator.clipboard.writeText(url);
48
- setCopied(true);
49
- successToast(tI18nComplete.raw('textd0f24de8dbc6'));
50
- if (copiedTimer.current)
51
- clearTimeout(copiedTimer.current);
52
- copiedTimer.current = setTimeout(() => setCopied(false), 2000);
53
- }
54
- catch {
55
- errorToast(tI18nComplete.raw('text167c96824acb'));
56
- }
57
- };
58
- return (_jsxs("section", { className: "space-y-2", "data-testid": "session-public-link", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: t('sectionTitle') }), _jsx("p", { className: "text-muted-foreground text-xs", children: t('sectionDescription') })] }), isLoading ? (_jsx("div", { className: "flex justify-center py-2", children: _jsx(Loading, { className: "size-4 shrink-0" }) })) : isError ? (
59
- // The list 403s for a member who is neither the session's creator nor
60
- // a project manager. "Create" would show a link state we cannot read.
61
- _jsx("p", { className: "text-muted-foreground text-xs", children: tI18nComplete.raw('text93bce1d8f18d') })) : active ? (_jsxs("div", { className: "bg-popover flex items-center gap-2 rounded-md border py-1 pr-1 pl-3", children: [_jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs", children: url }), _jsx(Hint, { label: copied ? tI18nComplete.raw('textd12860c21e78') : tI18nComplete.raw('textdbf362d4f210'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": tI18nComplete.raw('textdbf362d4f210'), disabled: !url, onClick: () => void copy(), children: copied ? (_jsx(CheckIcon, { className: "text-kortix-green size-4" })) : (_jsx(CopyIcon, { className: "size-4" })) }) }), _jsxs(Button, { variant: "ghost", size: "sm", disabled: isRevoking, onClick: () => setConfirmRevoke(true), children: [isRevoking ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, tI18nComplete.raw('text87e6d00bbf53')] })] })) : (_jsxs(Button, { variant: "outline", size: "sm", onClick: link.copyLink, disabled: !link.canShare || link.isPending, children: [link.isPending ? (_jsx(Loading, { className: "size-4 shrink-0" })) : (_jsx(LinkSimpleIcon, { className: "size-4 shrink-0" })), t('create')] })), _jsx(PublicShareLinkConfirm, { confirmation: link.confirmation }), _jsx(ConfirmDialog, { open: confirmRevoke, onOpenChange: setConfirmRevoke, title: tI18nComplete.raw('text3d3b295854fe'), description: t('revokeDescription'), confirmLabel: tI18nComplete.raw('text87e6d00bbf53'), confirmVariant: "destructive", onConfirm: () => {
62
- if (active)
63
- revoke(active.share_id);
64
- setConfirmRevoke(false);
65
- } })] }));
66
- }