@kortix/ui 0.15.0 → 0.15.1

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 (173) hide show
  1. package/dist/_vendor/kortix-shared.js +233 -130
  2. package/dist/_vendor/shared/code-language.d.ts +2 -2
  3. package/dist/_vendor/shared/html.d.ts +7 -0
  4. package/dist/_vendor/shared/index.d.ts +1 -0
  5. package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
  6. package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
  7. package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
  8. package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
  9. package/dist/_vendor/shared/utils/string.d.ts +6 -0
  10. package/dist/artifacts/artifact-session.js +4 -3
  11. package/dist/customize/agents/agent-page.js +5 -5
  12. package/dist/customize/agents/agent-status.js +1 -1
  13. package/dist/customize/agents/agents-page.js +3 -3
  14. package/dist/customize/connectors/use-agent-access.d.ts +3 -3
  15. package/dist/customize/sections/connectors-view.js +50 -37
  16. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
  17. package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
  18. package/dist/customize/sections/llm-provider/device-grant.js +27 -0
  19. package/dist/customize/sections/view/agent-editor.d.ts +2 -2
  20. package/dist/customize/sections/view/agent-editor.js +2 -2
  21. package/dist/customize/sections/view/review-center-connected.js +37 -6
  22. package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
  23. package/dist/customize/sections/view/secret-delivery.js +5 -4
  24. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
  25. package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
  26. package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
  27. package/dist/files/project/api/runtime-files.d.ts +2 -2
  28. package/dist/files/project/api/runtime-files.js +2 -2
  29. package/dist/files/project/components/drive-explorer.js +1 -1
  30. package/dist/files/project/components/drive-grid-view.js +0 -1
  31. package/dist/files/project/components/drive-list-view.js +0 -1
  32. package/dist/files/project/components/file-explorer-page.js +1 -1
  33. package/dist/files/project/hooks/index.d.ts +1 -1
  34. package/dist/files/project/hooks/index.js +1 -1
  35. package/dist/files/project/hooks/use-server-health.d.ts +1 -1
  36. package/dist/files/project/hooks/use-server-health.js +1 -1
  37. package/dist/files/project/search/workspace-search-service.d.ts +1 -1
  38. package/dist/files/project/search/workspace-search-service.js +1 -1
  39. package/dist/files/runtime/hooks/index.d.ts +1 -1
  40. package/dist/files/runtime/hooks/index.js +1 -1
  41. package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
  42. package/dist/files/runtime/hooks/server-health-state.js +2 -2
  43. package/dist/files/runtime/hooks/system-dir.js +2 -2
  44. package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
  45. package/dist/files/runtime/hooks/use-file-content.js +1 -1
  46. package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
  47. package/dist/files/runtime/hooks/use-file-list.js +3 -3
  48. package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
  49. package/dist/files/runtime/hooks/use-server-health.js +3 -3
  50. package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
  51. package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
  52. package/dist/files/runtime/index.d.ts +2 -2
  53. package/dist/files/runtime/index.js +2 -2
  54. package/dist/files/runtime/path-utils.d.ts +1 -1
  55. package/dist/files/runtime/path-utils.js +1 -1
  56. package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
  57. package/dist/files/runtime/sandbox-explorer-source.js +1 -1
  58. package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
  59. package/dist/files/runtime/sandbox-file-explorer.js +2 -2
  60. package/dist/files/tree/components/file-tree-item.js +0 -1
  61. package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
  62. package/dist/files/tree/hooks/use-file-events.js +1 -1
  63. package/dist/i18n/en.d.ts +63 -1
  64. package/dist/i18n/en.js +79 -17
  65. package/dist/internal/files/file-read-retry.js +1 -1
  66. package/dist/internal/files/types.d.ts +2 -2
  67. package/dist/internal/files/types.js +2 -2
  68. package/dist/internal/goals/goal-meta.d.ts +33 -14
  69. package/dist/internal/goals/goal-meta.js +55 -13
  70. package/dist/internal/layout/nav-hover-card.d.ts +1 -1
  71. package/dist/internal/layout/nav-hover-card.js +1 -1
  72. package/dist/internal/layout/project-capability-nav.d.ts +1 -1
  73. package/dist/internal/layout/project-capability-nav.js +1 -1
  74. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  75. package/dist/internal/lib/browser-error-noise.js +1 -1
  76. package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
  77. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +18 -0
  78. package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
  79. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  80. package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
  81. package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
  82. package/dist/internal/lib/delivered-but-disconnected.js +3 -5
  83. package/dist/internal/lib/error-handler.js +8 -3
  84. package/dist/internal/lib/pixel-mark.d.ts +4 -17
  85. package/dist/internal/lib/pixel-mark.js +5 -148
  86. package/dist/internal/lib/sounds.d.ts +4 -4
  87. package/dist/internal/lib/sounds.js +4 -4
  88. package/dist/internal/lib/use-project-feature-flags.js +3 -1
  89. package/dist/internal/stores/composer-prefill-store.js +4 -1
  90. package/dist/internal/stores/sound-store.d.ts +4 -4
  91. package/dist/internal/stores/sound-store.js +10 -0
  92. package/dist/markdown/code/shiki-highlighter.js +14 -5
  93. package/dist/markdown/file-links.js +12 -3
  94. package/dist/markdown/markdown-frontmatter.d.ts +6 -6
  95. package/dist/markdown/markdown-frontmatter.js +3 -3
  96. package/dist/primitives/button.js +2 -1
  97. package/dist/session/agents/held-messages.d.ts +1 -5
  98. package/dist/session/agents/held-messages.js +1 -21
  99. package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
  100. package/dist/session/composer/ComposerAboveCard.js +2 -2
  101. package/dist/session/composer/composer-chat-input.d.ts +1 -1
  102. package/dist/session/composer/composer-chat-input.js +2 -2
  103. package/dist/session/composer/composer.js +16 -1
  104. package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
  105. package/dist/session/composer/hooks/use-file-search.js +16 -16
  106. package/dist/session/composer/menus/mention-controller.js +1 -3
  107. package/dist/session/composer/menus/space-mentions.d.ts +14 -4
  108. package/dist/session/composer/menus/space-mentions.js +17 -1
  109. package/dist/session/composer/use-instant-session-send.js +2 -2
  110. package/dist/session/header/session-goal-indicator.js +4 -4
  111. package/dist/session/panel/easy/plan-card.d.ts +2 -2
  112. package/dist/session/panel/easy/plan-card.js +2 -2
  113. package/dist/session/panel/session-desktop.js +6 -0
  114. package/dist/session/panel/use-session-panel-state.js +2 -2
  115. package/dist/session/status/sandbox-loading-boundary.js +2 -2
  116. package/dist/session/status/session-terminal-state.d.ts +47 -0
  117. package/dist/session/status/session-terminal-state.js +56 -0
  118. package/dist/session/thread/plan-surface.d.ts +1 -1
  119. package/dist/session/thread/plan-surface.js +1 -1
  120. package/dist/session/thread/session-chat.d.ts +1 -1
  121. package/dist/session/thread/session-chat.js +88 -99
  122. package/dist/session/thread/stop-sequence.d.ts +51 -0
  123. package/dist/session/thread/stop-sequence.js +55 -0
  124. package/dist/session/thread/transcript.d.ts +2 -2
  125. package/dist/session/thread/transcript.js +2 -2
  126. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
  127. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  128. package/dist/session/tool/tools/kortix-action-tool.js +1 -1
  129. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
  130. package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
  131. package/dist/session/tool/tools/multi-agent-tools.js +1 -1
  132. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
  133. package/dist/session/tool/tools/pty-kill-tool.js +1 -1
  134. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
  135. package/dist/session/tool/tools/pty-read-tool.js +2 -2
  136. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
  137. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  138. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
  139. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  140. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
  141. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  142. package/dist/session/turn/peer-message-row.d.ts +1 -10
  143. package/dist/session/turn/peer-message-row.js +1 -18
  144. package/dist/session/turn/plan-anchor.d.ts +3 -3
  145. package/dist/session/turn/plan-anchor.js +3 -3
  146. package/dist/session/turn/plan-card.d.ts +7 -7
  147. package/dist/session/turn/plan-card.js +7 -7
  148. package/dist/styles.css +1 -1
  149. package/dist/terminal/terminal-card-gate.d.ts +6 -3
  150. package/dist/terminal/terminal-card-gate.js +21 -4
  151. package/dist/workspace/index.d.ts +1 -1
  152. package/dist/workspace/index.js +1 -1
  153. package/dist/workspace/review/review-center.d.ts +8 -2
  154. package/dist/workspace/review/review-center.js +44 -13
  155. package/dist/workspace/review/review-reducer.d.ts +7 -0
  156. package/dist/workspace/review/review-reducer.js +11 -0
  157. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
  158. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
  159. package/dist/workspace/sidebar/project-nav-items.js +11 -12
  160. package/dist/workspace/spaces/principal-card.d.ts +3 -1
  161. package/dist/workspace/spaces/principal-card.js +3 -3
  162. package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
  163. package/dist/workspace/spaces/space-agent-ask.js +36 -0
  164. package/dist/workspace/spaces/space-details-dialog.js +1 -1
  165. package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
  166. package/dist/workspace/spaces/space-details-panel.js +62 -8
  167. package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
  168. package/dist/workspace/spaces/space-mention-source.js +12 -19
  169. package/dist/workspace/spaces/space-view.js +3 -2
  170. package/package.json +3 -3
  171. package/skills/kortix-ui/references/modules.md +1 -1
  172. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
  173. package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
@@ -4,8 +4,9 @@ import type { SpaceMentionSource } from '../../session/composer/menus/space-ment
4
4
  export declare function mentionSlug(name: string): string;
5
5
  /**
6
6
  * The `@` menu of a space's composers: its people (the viewer left out) and
7
- * its agents, then the project's other agents, which join the space when
8
- * mentioned (a channel the viewer may edit only). A person is mentioned by
7
+ * its agents, then the project's other agents (a channel only). Naming one of
8
+ * those never adds it: the router hands work only to the space's agents, and
9
+ * the composer asks after the send (`SpaceAgentAsk`). A person is mentioned by
9
10
  * email when the directory knows it, else by display name: the forms the
10
11
  * mention parser reads (`apps/api/src/projects/lib/space-posts.ts`).
11
12
  */
@@ -1,11 +1,11 @@
1
1
  'use client';
2
- import { useProjectConfig, useProjectSpaceMembers, useUpdateProjectSpace } from '@kortix/sdk/react';
3
- import { useMemo } from 'react';
2
+ import { useProjectConfig, useProjectSpaceMembers } from '@kortix/sdk/react';
3
+ import { createElement, useMemo } from 'react';
4
4
  import { useTranslations } from '../../i18n/index.js';
5
5
  import { useAccountMembers } from '../../internal/account-hub/use-account-members.js';
6
6
  import { useBillingAccountId } from '../../internal/stores/billing-account-context.js';
7
- import { errorToast, successToast } from '../../primitives/toast.js';
8
7
  import { useUiViewerId } from '../../providers/ui-provider.js';
8
+ import { SpaceAgentAsk } from './space-agent-ask.js';
9
9
  import { agentLabel } from './space-timeline.js';
10
10
  /** A display name as one `@` token, as the server reads it: `Ana Lima` → `ana-lima`. */
11
11
  export function mentionSlug(name) {
@@ -13,8 +13,9 @@ export function mentionSlug(name) {
13
13
  }
14
14
  /**
15
15
  * The `@` menu of a space's composers: its people (the viewer left out) and
16
- * its agents, then the project's other agents, which join the space when
17
- * mentioned (a channel the viewer may edit only). A person is mentioned by
16
+ * its agents, then the project's other agents (a channel only). Naming one of
17
+ * those never adds it: the router hands work only to the space's agents, and
18
+ * the composer asks after the send (`SpaceAgentAsk`). A person is mentioned by
18
19
  * email when the directory knows it, else by display name: the forms the
19
20
  * mention parser reads (`apps/api/src/projects/lib/space-posts.ts`).
20
21
  */
@@ -25,7 +26,6 @@ export function useSpaceMentionSource(projectId, space) {
25
26
  const channel = space?.kind === 'channel' ? space : null;
26
27
  const members = useProjectSpaceMembers(projectId, channel?.space_id);
27
28
  const directory = useAccountMembers(useBillingAccountId());
28
- const update = useUpdateProjectSpace(projectId);
29
29
  const roles = useTranslations('projectSelector.role');
30
30
  return useMemo(() => {
31
31
  if (!space)
@@ -49,7 +49,7 @@ export function useSpaceMentionSource(projectId, space) {
49
49
  const describe = (name) => configAgents.find((agent) => agent.name === name)?.description ?? null;
50
50
  const own = space.kind === 'dm' ? (space.dm_agent_name ? [space.dm_agent_name] : []) : (space.agents ?? []);
51
51
  // No agent list: the project's default answers here, so it reads as in the space.
52
- const projectDefault = config?.default_agent ?? config?.open_code_default_agent ?? null;
52
+ const projectDefault = config?.default_agent ?? null;
53
53
  const inSpace = own.length > 0 ? own : projectDefault ? [projectDefault] : [];
54
54
  const agents = [
55
55
  ...inSpace.map((name) => ({ name, label: agentLabel(name), description: describe(name), inSpace: true })),
@@ -57,22 +57,15 @@ export function useSpaceMentionSource(projectId, space) {
57
57
  .filter((agent) => !inSpace.includes(agent.name))
58
58
  .map((agent) => ({ name: agent.name, label: agentLabel(agent.name), description: agent.description, inSpace: false })),
59
59
  ];
60
- const name = space.name || space.slug || '';
61
- const canAddAgents = !!channel && channel.can_edit === true;
60
+ const name = `#${space.slug ?? space.name}`;
62
61
  return {
63
62
  people,
64
63
  agents,
65
64
  labels: { people: t('people'), agents: t('agents'), addToSpace: t('addToSpace', { space: name }) },
66
- onAddAgent: canAddAgents
67
- ? (agent) => {
68
- if ((channel.agents ?? []).includes(agent))
69
- return;
70
- update.mutate({ spaceId: channel.space_id, input: { agents: [...(channel.agents ?? []), agent] } }, {
71
- onSuccess: () => successToast(t('added', { agent: agentLabel(agent), space: name })),
72
- onError: () => errorToast(t('addFailed')),
73
- });
74
- }
65
+ // A DM is not editable: its agent is the only one, and no other is offered.
66
+ renderOutsideAsk: channel
67
+ ? (agent, done) => createElement(SpaceAgentAsk, { projectId, space: channel, agent, onDone: done })
75
68
  : undefined,
76
69
  };
77
- }, [space, channel, members.data, directory.data, viewerId, config, t, roles, update]);
70
+ }, [space, channel, members.data, directory.data, viewerId, config, t, roles, projectId]);
78
71
  }
@@ -53,6 +53,7 @@ import { agentLabel, liveReplyCount, replyRole, spaceRoster, threadIsWorking } f
53
53
  import { CHAT_TAB, openTabId } from './space-tab-list.js';
54
54
  import { AddTabMenu, StoredTabPanel, StoredTabTrigger, useSpaceTabs } from './space-tabs.js';
55
55
  import { SpaceTimeline, useSpaceThreads } from './space-timeline-view.js';
56
+ import { SessionDriveFilesScope } from '../../internal/files/session-drive-files.js';
56
57
  /** The search and filter keys of the Threads and Links tabs. */
57
58
  const TAB_FILTER_PARAMS = ['q', 'status', 'by', 'agent', 'active', 'pinned', 'added'];
58
59
  /** The query key of the open thread: it survives a reload and can be linked. */
@@ -406,7 +407,7 @@ function SpaceComposer({ projectId, space, onOpenThread, onAutoOpenThread, befor
406
407
  // A channel's agents lead its picker; the first one the project still offers starts a new thread.
407
408
  const visible = useVisibleAgents({ projectId });
408
409
  const projectConfig = useProjectConfig(projectId);
409
- const projectDefault = projectConfig?.default_agent ?? projectConfig?.open_code_default_agent ?? null;
410
+ const projectDefault = projectConfig?.default_agent ?? null;
410
411
  // A member with no agent grant still posts here with the channel's agents.
411
412
  const runnable = useMemo(() => channelRunnableAgents(space, projectDefault), [space, projectDefault]);
412
413
  const offered = useMemo(() => [...visible, ...runnable.filter((name) => !visible.some((a) => a.name === name)).map((name) => ({ name }))], [visible, runnable]);
@@ -487,7 +488,7 @@ function ThreadPanel({ projectId, sessionId, context, thread, agentFallback, onC
487
488
  // A talk-only thread: "Show work" opens its worker sessions.
488
489
  front: thread?.metadata?.kortix_front === true,
489
490
  }), [agentName, thread, t, messagesOnly, projectId]);
490
- return (_jsxs("aside", { "aria-label": t('threadTitle'), "data-thread-panel": "", className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 border-b px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: t('threadTitle') }), _jsx("button", { type: "button", onClick: onClose, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring min-w-0 truncate rounded-sm text-xs outline-none hover:underline focus-visible:ring-2", children: context })] }) }), fullHref ? (_jsx(Link, { href: fullHref, className: "text-muted-foreground hover:text-foreground shrink-0 px-2 text-xs", children: t('openFullSession') })) : null, _jsx(Hint, { label: t('closeThread'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('closeThread'), onClick: onClose, children: _jsx(Close, {}) }) })] }), replyCount && dividerOnTop ? (_jsxs("div", { className: "shrink-0 pt-3", children: [_jsx(RepliesDivider, { count: replyCount }), messagesOnly ? null : (_jsx(UsedMemoryChip, { projectId: projectId, sessionId: sessionId, ready: turnDone, className: "px-5" }))] })) : null, _jsx(TranscriptRowsContext.Provider, { value: rows, children: _jsx(AfterFirstPromptContext.Provider, { value: afterFirstPrompt, children: _jsx(ComposerAutoFocusContext.Provider, { value: !quietFocus, children: _jsx(SessionThread, { session: session, hideHeader: true, composerPlaceholder: t('replyPlaceholder'), className: "min-h-0 flex-1" }) }) }) })] }));
491
+ return (_jsxs("aside", { "aria-label": t('threadTitle'), "data-thread-panel": "", className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsx(SessionDriveFilesScope, { projectId: projectId, sessionId: sessionId }), _jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 border-b px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: t('threadTitle') }), _jsx("button", { type: "button", onClick: onClose, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring min-w-0 truncate rounded-sm text-xs outline-none hover:underline focus-visible:ring-2", children: context })] }) }), fullHref ? (_jsx(Link, { href: fullHref, className: "text-muted-foreground hover:text-foreground shrink-0 px-2 text-xs", children: t('openFullSession') })) : null, _jsx(Hint, { label: t('closeThread'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('closeThread'), onClick: onClose, children: _jsx(Close, {}) }) })] }), replyCount && dividerOnTop ? (_jsxs("div", { className: "shrink-0 pt-3", children: [_jsx(RepliesDivider, { count: replyCount }), messagesOnly ? null : (_jsx(UsedMemoryChip, { projectId: projectId, sessionId: sessionId, ready: turnDone, className: "px-5" }))] })) : null, _jsx(TranscriptRowsContext.Provider, { value: rows, children: _jsx(AfterFirstPromptContext.Provider, { value: afterFirstPrompt, children: _jsx(ComposerAutoFocusContext.Provider, { value: !quietFocus, children: _jsx(SessionThread, { session: session, hideHeader: true, composerPlaceholder: t('replyPlaceholder'), className: "min-h-0 flex-1" }) }) }) })] }));
491
492
  }
492
493
  /**
493
494
  * Where "Open full session" goes. A talk-only thread (`chat_front`, server
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/ui",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
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",
@@ -2189,7 +2189,7 @@
2189
2189
  "@extend-ai/react-docx": "^0.7.5",
2190
2190
  "@extend-ai/react-xlsx": "0.13.4",
2191
2191
  "@glideapps/glide-data-grid": "6.0.4-alpha24",
2192
- "@kortix/llm-catalog": "0.15.0",
2192
+ "@kortix/llm-catalog": "0.15.1",
2193
2193
  "@lezer/highlight": "1.2.3",
2194
2194
  "@paper-design/shaders-react": "^0.0.76",
2195
2195
  "@phosphor-icons/react": "2.1.10",
@@ -2288,7 +2288,7 @@
2288
2288
  "yaml": "^2.8.2"
2289
2289
  },
2290
2290
  "peerDependencies": {
2291
- "@kortix/sdk": "^0.15.0",
2291
+ "@kortix/sdk": "^0.15.1",
2292
2292
  "@tanstack/react-query": "^5.75.2",
2293
2293
  "@types/react": ">=18",
2294
2294
  "react": ">=19",
@@ -395,7 +395,7 @@ export function Sessions({ projectId }: { projectId: string }) {
395
395
  }
396
396
  ```
397
397
 
398
- Goals (behind the `goals` flag): `GoalStatusBadge` (a goal's status), `GoalHealthDot` (green running, orange needs attention, grey closed), `useGoalIssueText` (one sentence per health issue), `goalProgress` (met and total criteria), `goalOpenAsks` (asks waiting on a person), `goalNeedsYou` (an open ask or a health issue), `formatGoalTime` (the reminders time format), `goalHref` (the goal's page, or null), `useGoalClock` (the current time, re-read every 30 s), `goalNeedsAttention` (a health issue no person was asked about), `goalLastWake` (when the goal last woke), `goalAssignedTo` (the goal is for this person), `useGoalPerson` (who a goal is for, by name), `useStartGoal` (starts a goal: a session that writes GOAL.md), `goalPaused` (the goal is paused), `useGoalStateText` (a goal state's label), `goalIconState` and `goalStatusIconState` (the `GoalIconState` of a goal or a status), `GoalStatusIcon` (that state's icon), `GoalCriteriaProgress` (met criteria, optionally as a ring), `GoalPersonChip` (the person a goal is for).
398
+ Goals (behind the `goals` flag): `GoalStatusBadge` (a goal's status), `GoalHealthDot` (green running, orange needs attention, grey closed), `useGoalIssueText` (one sentence per health issue), `goalProgress` (met and total criteria), `goalOpenAsks` (asks waiting on a person), `goalNeedsYou` (an open ask or a health issue), `formatGoalTime` (the reminders time format), `goalHref` (the goal's page, or null), `useGoalClock` (the current time, re-read every 30 s), `goalNeedsAttention` (a health issue no person was asked about), `goalLastWake` (when the goal last woke), `goalAssignedTo` (the goal is for this person), `useGoalPerson` (who a goal is for, by name), `useStartGoal` (starts a goal: a session that writes GOAL.md), `goalPaused` (the goal is paused), `useGoalStateText` (a goal state's label), `goalIconState` and `goalStatusIconState` (the `GoalIconState` of a goal or a status), `GoalStatusIcon` (that state's icon), `GoalCriteriaProgress` (met criteria, optionally as a ring), `GoalPersonChip` (the person a goal is for), `goalNextWake` (when the goal wakes next, or null while paused or waiting), `useGoalBlockedNextStep` (the next step a person takes for a blocked goal), `goalCriteriaStatus` (criteria reported met, verified by the verifier, and the total).
399
399
 
400
400
  Channels and memory (behind the `chat` flag): `SpaceView` (`projectId`, `target`: a `SpaceTarget`, `{ kind: 'channel', slug }` or `{ kind: 'dm', agentName }`; `beforeSend`; `renderFolder` draws a `SpaceFolder`, one space's Files tab, whose entries are `SpaceFile`s; `isHtmlPath` says a tab's file opens as a page; `renderApps`) is a channel or DM page with its threads, files, memory, apps, links and triggers. `ChannelGlyph` (`visibility`) is `#` or a lock. `agentLabel` (`name`) is an agent's display name. `MemoryView` (`projectId`, `layerKey`: `company` or a space id, `place`) is one memory layer's pages; `CompanyMemoryPage` (`projectId`) is the project's Company memory. `useMemoryPageHref` (`projectId`) returns `(layer: MemoryLayerRef, pageId) => href | null`: the page's link, null when the host serves no such page.
401
401
 
@@ -1,63 +0,0 @@
1
- /**
2
- * The `data` of a multi-agent tool result, parsed defensively for its card body.
3
- *
4
- * The shapes are in `packages/api-contract/src/multi-agent.ts` (`PeerMessageSendResult`,
5
- * `ReachableAgents`, `SessionTask`). `@kortix/ui` does not depend on that package, so
6
- * only the fields a card draws are mirrored here, and every one is checked. A value
7
- * that does not parse is `null`: the card then draws its own rows, as every platform
8
- * card does.
9
- */
10
- export type PeerSendStatus = 'delivered' | 'held' | 'refused' | 'denied' | 'expired' | 'dropped';
11
- export type AgentBoardState = 'working' | 'needs_input' | 'idle' | 'completed' | 'failed' | 'stopped';
12
- export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed';
13
- export interface PeerSendSummary {
14
- status: PeerSendStatus;
15
- /** The receiver's handle, without `@`. */
16
- to: string | null;
17
- /** The message text the sender wrote. */
18
- message: string | null;
19
- summary: string | null;
20
- /** The sentence the API wrote for the sending agent ("Not sent: reviewer refuses messages."). */
21
- note: string | null;
22
- }
23
- export interface ReachableAgentRow {
24
- handle: string;
25
- sessionId: string;
26
- title: string | null;
27
- agentName: string | null;
28
- relation: string;
29
- state: AgentBoardState | null;
30
- canReceive: boolean;
31
- }
32
- /** `task_stop`: `StopChildResult` (apps/kortix-sandbox-agent-server/src/harness/pi/cloud-subagent.ts). */
33
- export interface StoppedChild {
34
- sessionId: string;
35
- handle: string | null;
36
- title: string | null;
37
- /** False: it had already ended, and nothing was stopped. */
38
- stopped: boolean;
39
- }
40
- export interface TeamTaskRow {
41
- seq: number;
42
- subject: string;
43
- status: TeamTaskStatus;
44
- owner: string | null;
45
- blockedBy: number[];
46
- blocked: boolean;
47
- }
48
- /** `send_message`: `PeerMessageSendResult`. */
49
- export declare function parsePeerSend(data: unknown): PeerSendSummary | null;
50
- /** `list_agents`: `ReachableAgents` (the asking session itself is left out). */
51
- export declare function parseReachable(data: unknown): ReachableAgentRow[] | null;
52
- /** `task_*`: one `SessionTask`, or `{ tasks: SessionTask[] }`. */
53
- export declare function parseTasks(data: unknown): TeamTaskRow[] | null;
54
- /** `task_stop`: the child it stopped, or null. */
55
- export declare function parseStoppedChild(data: unknown): StoppedChild | null;
56
- /**
57
- * True when a running call's input has the shape of pi's `task_*` tools
58
- * (apps/kortix-sandbox-agent-server/src/harness/pi/extensions/team-tasks.ts):
59
- * `task_create { subject, … }`, `task_get { seq }`, `task_update { seq, … }`.
60
- * The older plugin tools that share these names take neither. pi's
61
- * `task_list {}` has no input to tell: its output decides once it settles.
62
- */
63
- export declare function looksLikeTeamTaskInput(input: unknown): boolean;
@@ -1,118 +0,0 @@
1
- /**
2
- * The `data` of a multi-agent tool result, parsed defensively for its card body.
3
- *
4
- * The shapes are in `packages/api-contract/src/multi-agent.ts` (`PeerMessageSendResult`,
5
- * `ReachableAgents`, `SessionTask`). `@kortix/ui` does not depend on that package, so
6
- * only the fields a card draws are mirrored here, and every one is checked. A value
7
- * that does not parse is `null`: the card then draws its own rows, as every platform
8
- * card does.
9
- */
10
- const PEER_STATUSES = new Set(['delivered', 'held', 'refused', 'denied', 'expired', 'dropped']);
11
- const BOARD_STATES = new Set(['working', 'needs_input', 'idle', 'completed', 'failed', 'stopped']);
12
- const TASK_STATUSES = new Set(['pending', 'in_progress', 'completed']);
13
- /** A card body is a short list; a longer one is the tool's mistake, not a page to render. */
14
- const MAX_ROWS = 50;
15
- const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
16
- const text = (value) => (typeof value === 'string' && value.trim() ? value.trim() : null);
17
- const positiveInt = (value) => typeof value === 'number' && Number.isInteger(value) && value > 0 ? value : null;
18
- const handle = (value) => text(value)?.replace(/^@/, '') ?? null;
19
- /** `send_message`: `PeerMessageSendResult`. */
20
- export function parsePeerSend(data) {
21
- if (!isObject(data) || !PEER_STATUSES.has(data.status))
22
- return null;
23
- const message = isObject(data.message) ? data.message : null;
24
- const to = isObject(data.to) ? handle(data.to.handle) : null;
25
- return {
26
- status: data.status,
27
- to: to ?? (message ? handle(message.to_handle) : null),
28
- message: message ? text(message.message) : null,
29
- summary: message ? text(message.summary) : null,
30
- note: text(data.note),
31
- };
32
- }
33
- function agentRow(value) {
34
- if (!isObject(value))
35
- return null;
36
- const name = handle(value.handle);
37
- const sessionId = text(value.session_id);
38
- if (!name || !sessionId)
39
- return null;
40
- return {
41
- handle: name,
42
- sessionId,
43
- title: text(value.title),
44
- agentName: text(value.agent_name),
45
- relation: text(value.relation) ?? 'session',
46
- state: BOARD_STATES.has(value.state) ? value.state : null,
47
- canReceive: value.can_receive !== false,
48
- };
49
- }
50
- /** `list_agents`: `ReachableAgents` (the asking session itself is left out). */
51
- export function parseReachable(data) {
52
- if (!isObject(data) || !Array.isArray(data.agents))
53
- return null;
54
- const rows = [];
55
- for (const entry of data.agents.slice(0, MAX_ROWS)) {
56
- const row = agentRow(entry);
57
- if (row && row.relation !== 'self')
58
- rows.push(row);
59
- }
60
- return rows;
61
- }
62
- function taskRow(value) {
63
- if (!isObject(value))
64
- return null;
65
- const seq = positiveInt(value.seq);
66
- const subject = text(value.subject);
67
- if (seq === null || !subject || !TASK_STATUSES.has(value.status))
68
- return null;
69
- const blockedBy = Array.isArray(value.blocked_by)
70
- ? value.blocked_by.map(positiveInt).filter((n) => n !== null)
71
- : [];
72
- return {
73
- seq,
74
- subject,
75
- status: value.status,
76
- owner: handle(value.owner_handle),
77
- blockedBy,
78
- blocked: value.blocked === true,
79
- };
80
- }
81
- /** `task_*`: one `SessionTask`, or `{ tasks: SessionTask[] }`. */
82
- export function parseTasks(data) {
83
- if (!isObject(data))
84
- return null;
85
- if (Array.isArray(data.tasks)) {
86
- return data.tasks
87
- .slice(0, MAX_ROWS)
88
- .map(taskRow)
89
- .filter((row) => row !== null);
90
- }
91
- if (isObject(data.task)) {
92
- const row = taskRow(data.task);
93
- return row ? [row] : null;
94
- }
95
- const row = taskRow(data);
96
- return row ? [row] : null;
97
- }
98
- /** `task_stop`: the child it stopped, or null. */
99
- export function parseStoppedChild(data) {
100
- if (!isObject(data) || typeof data.stopped !== 'boolean')
101
- return null;
102
- const sessionId = text(data.sessionId);
103
- if (!sessionId)
104
- return null;
105
- return { sessionId, handle: handle(data.handle), title: text(data.title), stopped: data.stopped };
106
- }
107
- /**
108
- * True when a running call's input has the shape of pi's `task_*` tools
109
- * (apps/kortix-sandbox-agent-server/src/harness/pi/extensions/team-tasks.ts):
110
- * `task_create { subject, … }`, `task_get { seq }`, `task_update { seq, … }`.
111
- * The older plugin tools that share these names take neither. pi's
112
- * `task_list {}` has no input to tell: its output decides once it settles.
113
- */
114
- export function looksLikeTeamTaskInput(input) {
115
- if (!isObject(input))
116
- return false;
117
- return typeof input.subject === 'string' || typeof input.seq === 'number';
118
- }