@kortix/ui 0.15.0 → 0.15.2

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 (220) 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 -2
  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-frame.d.ts +0 -1
  11. package/dist/artifacts/artifact-frame.js +4 -10
  12. package/dist/artifacts/artifact-session.js +4 -7
  13. package/dist/artifacts/frame-policy.d.ts +1 -1
  14. package/dist/artifacts/frame-policy.js +2 -2
  15. package/dist/customize/agents/agent-page.js +5 -5
  16. package/dist/customize/agents/agent-status.js +1 -1
  17. package/dist/customize/agents/agents-page.js +3 -3
  18. package/dist/customize/connectors/use-agent-access.d.ts +3 -3
  19. package/dist/customize/sections/connectors-view.js +50 -37
  20. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
  21. package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
  22. package/dist/customize/sections/llm-provider/device-grant.js +27 -0
  23. package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
  24. package/dist/customize/sections/view/agent-editor.d.ts +2 -2
  25. package/dist/customize/sections/view/agent-editor.js +2 -2
  26. package/dist/customize/sections/view/review-center-connected.js +37 -6
  27. package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
  28. package/dist/customize/sections/view/secret-delivery.js +5 -4
  29. package/dist/customize/triggers/schedule/trigger-list.d.ts +2 -2
  30. package/dist/customize/triggers/schedule/trigger-list.js +12 -18
  31. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
  32. package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
  33. package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
  34. package/dist/files/project/api/runtime-files.d.ts +2 -2
  35. package/dist/files/project/api/runtime-files.js +2 -2
  36. package/dist/files/project/components/drive-explorer.js +1 -1
  37. package/dist/files/project/components/drive-grid-view.js +0 -1
  38. package/dist/files/project/components/drive-list-view.js +0 -1
  39. package/dist/files/project/components/file-explorer-page.js +1 -1
  40. package/dist/files/project/hooks/index.d.ts +1 -1
  41. package/dist/files/project/hooks/index.js +1 -1
  42. package/dist/files/project/hooks/use-server-health.d.ts +1 -1
  43. package/dist/files/project/hooks/use-server-health.js +1 -1
  44. package/dist/files/project/search/workspace-search-service.d.ts +1 -1
  45. package/dist/files/project/search/workspace-search-service.js +1 -1
  46. package/dist/files/runtime/hooks/index.d.ts +1 -1
  47. package/dist/files/runtime/hooks/index.js +1 -1
  48. package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
  49. package/dist/files/runtime/hooks/server-health-state.js +2 -2
  50. package/dist/files/runtime/hooks/system-dir.js +2 -2
  51. package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
  52. package/dist/files/runtime/hooks/use-file-content.js +1 -1
  53. package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
  54. package/dist/files/runtime/hooks/use-file-list.js +3 -3
  55. package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
  56. package/dist/files/runtime/hooks/use-server-health.js +3 -3
  57. package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
  58. package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
  59. package/dist/files/runtime/index.d.ts +2 -2
  60. package/dist/files/runtime/index.js +2 -2
  61. package/dist/files/runtime/path-utils.d.ts +1 -1
  62. package/dist/files/runtime/path-utils.js +1 -1
  63. package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
  64. package/dist/files/runtime/sandbox-explorer-source.js +1 -1
  65. package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
  66. package/dist/files/runtime/sandbox-file-explorer.js +2 -2
  67. package/dist/files/tree/components/file-tree-item.js +0 -1
  68. package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
  69. package/dist/files/tree/hooks/use-file-events.js +1 -1
  70. package/dist/i18n/en.d.ts +60 -175
  71. package/dist/i18n/en.js +71 -186
  72. package/dist/internal/components/agent-mark.js +6 -0
  73. package/dist/internal/components/clickable-path.d.ts +3 -0
  74. package/dist/internal/components/clickable-path.js +4 -1
  75. package/dist/internal/files/file-read-retry.js +1 -1
  76. package/dist/internal/files/types.d.ts +2 -2
  77. package/dist/internal/files/types.js +2 -2
  78. package/dist/internal/goals/goal-meta.d.ts +33 -14
  79. package/dist/internal/goals/goal-meta.js +55 -13
  80. package/dist/internal/layout/nav-hover-card.d.ts +1 -1
  81. package/dist/internal/layout/nav-hover-card.js +1 -1
  82. package/dist/internal/layout/project-capability-nav.d.ts +1 -1
  83. package/dist/internal/layout/project-capability-nav.js +1 -1
  84. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  85. package/dist/internal/lib/browser-error-noise.js +1 -1
  86. package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
  87. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +29 -0
  88. package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
  89. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  90. package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
  91. package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
  92. package/dist/internal/lib/delivered-but-disconnected.js +3 -5
  93. package/dist/internal/lib/error-handler.js +8 -3
  94. package/dist/internal/lib/pixel-mark.d.ts +4 -17
  95. package/dist/internal/lib/pixel-mark.js +5 -148
  96. package/dist/internal/lib/sounds.d.ts +4 -4
  97. package/dist/internal/lib/sounds.js +4 -4
  98. package/dist/internal/lib/trigger-clock.d.ts +5 -0
  99. package/dist/internal/lib/trigger-clock.js +15 -0
  100. package/dist/internal/lib/turn-broadcast.d.ts +0 -3
  101. package/dist/internal/lib/use-project-feature-flags.d.ts +2 -0
  102. package/dist/internal/lib/use-project-feature-flags.js +5 -5
  103. package/dist/internal/lib/web-notifications.d.ts +1 -8
  104. package/dist/internal/lib/web-notifications.js +12 -53
  105. package/dist/internal/notifications/notification-bell.d.ts +13 -33
  106. package/dist/internal/notifications/notification-bell.js +14 -117
  107. package/dist/internal/notifications/notification-inbox.d.ts +45 -0
  108. package/dist/internal/notifications/notification-inbox.js +119 -0
  109. package/dist/internal/notifications/notification-rows.d.ts +3 -4
  110. package/dist/internal/notifications/notification-rows.js +1 -4
  111. package/dist/internal/notifications/use-inbox-summary.d.ts +13 -0
  112. package/dist/internal/notifications/use-inbox-summary.js +22 -0
  113. package/dist/internal/notifications/web-push.d.ts +9 -10
  114. package/dist/internal/notifications/web-push.js +9 -10
  115. package/dist/internal/stores/composer-prefill-store.js +4 -1
  116. package/dist/internal/stores/sound-store.d.ts +4 -4
  117. package/dist/internal/stores/sound-store.js +10 -0
  118. package/dist/internal/stores/web-notification-store.d.ts +6 -9
  119. package/dist/internal/stores/web-notification-store.js +0 -4
  120. package/dist/lib/routes.d.ts +8 -0
  121. package/dist/lib/routes.js +4 -1
  122. package/dist/markdown/code/shiki-highlighter.js +14 -5
  123. package/dist/markdown/doc-editor/doc-menus.d.ts +1 -10
  124. package/dist/markdown/doc-editor/doc-menus.js +6 -69
  125. package/dist/markdown/file-links.js +33 -3
  126. package/dist/markdown/markdown-frontmatter.d.ts +6 -6
  127. package/dist/markdown/markdown-frontmatter.js +3 -3
  128. package/dist/primitives/button.d.ts +1 -1
  129. package/dist/primitives/button.js +2 -1
  130. package/dist/session/agents/held-messages.d.ts +1 -5
  131. package/dist/session/agents/held-messages.js +1 -21
  132. package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
  133. package/dist/session/composer/ComposerAboveCard.js +2 -2
  134. package/dist/session/composer/composer-chat-input.d.ts +1 -1
  135. package/dist/session/composer/composer-chat-input.js +2 -2
  136. package/dist/session/composer/composer.js +16 -1
  137. package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
  138. package/dist/session/composer/hooks/use-file-search.js +16 -16
  139. package/dist/session/composer/menus/mention-controller.js +1 -3
  140. package/dist/session/composer/menus/space-mentions.d.ts +14 -4
  141. package/dist/session/composer/menus/space-mentions.js +17 -1
  142. package/dist/session/composer/use-instant-session-send.js +2 -2
  143. package/dist/session/header/reminder-parts.d.ts +1 -1
  144. package/dist/session/header/session-goal-indicator.js +4 -4
  145. package/dist/session/header/session-site-header.js +2 -6
  146. package/dist/session/panel/easy/plan-card.d.ts +2 -2
  147. package/dist/session/panel/easy/plan-card.js +2 -2
  148. package/dist/session/panel/session-desktop.js +6 -0
  149. package/dist/session/panel/session-reminders-panel.js +4 -15
  150. package/dist/session/panel/use-session-panel-state.js +2 -2
  151. package/dist/session/status/sandbox-loading-boundary.js +2 -2
  152. package/dist/session/status/session-terminal-state.d.ts +47 -0
  153. package/dist/session/status/session-terminal-state.js +56 -0
  154. package/dist/session/thread/plan-surface.d.ts +1 -1
  155. package/dist/session/thread/plan-surface.js +1 -1
  156. package/dist/session/thread/session-chat.d.ts +1 -1
  157. package/dist/session/thread/session-chat.js +88 -99
  158. package/dist/session/thread/stop-sequence.d.ts +51 -0
  159. package/dist/session/thread/stop-sequence.js +55 -0
  160. package/dist/session/thread/transcript.d.ts +2 -2
  161. package/dist/session/thread/transcript.js +2 -2
  162. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
  163. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  164. package/dist/session/tool/tools/kortix-action-tool.js +1 -1
  165. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
  166. package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
  167. package/dist/session/tool/tools/multi-agent-tools.js +1 -1
  168. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
  169. package/dist/session/tool/tools/pty-kill-tool.js +1 -1
  170. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
  171. package/dist/session/tool/tools/pty-read-tool.js +2 -2
  172. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
  173. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  174. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
  175. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  176. package/dist/session/tool/tools/session-spawn-tool.js +7 -4
  177. package/dist/session/tool/tools/task-tool.js +18 -4
  178. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
  179. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  180. package/dist/session/turn/peer-message-row.d.ts +1 -10
  181. package/dist/session/turn/peer-message-row.js +1 -18
  182. package/dist/session/turn/plan-anchor.d.ts +3 -3
  183. package/dist/session/turn/plan-anchor.js +3 -3
  184. package/dist/session/turn/plan-card.d.ts +7 -7
  185. package/dist/session/turn/plan-card.js +7 -7
  186. package/dist/styles.css +1 -1
  187. package/dist/terminal/terminal-card-gate.d.ts +6 -3
  188. package/dist/terminal/terminal-card-gate.js +21 -4
  189. package/dist/workspace/home/access-requests-bell.d.ts +6 -9
  190. package/dist/workspace/home/access-requests-bell.js +8 -10
  191. package/dist/workspace/index.d.ts +1 -1
  192. package/dist/workspace/index.js +1 -1
  193. package/dist/workspace/layout/project-home.js +1 -2
  194. package/dist/workspace/review/review-center.d.ts +8 -2
  195. package/dist/workspace/review/review-center.js +44 -13
  196. package/dist/workspace/review/review-reducer.d.ts +7 -0
  197. package/dist/workspace/review/review-reducer.js +11 -0
  198. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
  199. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
  200. package/dist/workspace/sidebar/project-nav-items.js +11 -12
  201. package/dist/workspace/sidebar/project-sidebar.js +2 -6
  202. package/dist/workspace/spaces/principal-card.d.ts +3 -1
  203. package/dist/workspace/spaces/principal-card.js +3 -3
  204. package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
  205. package/dist/workspace/spaces/space-agent-ask.js +36 -0
  206. package/dist/workspace/spaces/space-details-dialog.js +1 -1
  207. package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
  208. package/dist/workspace/spaces/space-details-panel.js +62 -8
  209. package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
  210. package/dist/workspace/spaces/space-mention-source.js +12 -19
  211. package/dist/workspace/spaces/space-view.js +3 -2
  212. package/package.json +11 -7
  213. package/skills/kortix-ui/references/custom-dashboard.md +1 -1
  214. package/skills/kortix-ui/references/modules.md +1 -1
  215. package/dist/_vendor/shared/artifact-annotations.d.ts +0 -311
  216. package/dist/_vendor/shared/artifact-comments.d.ts +0 -155
  217. package/dist/internal/hooks/use-notification-center.d.ts +0 -50
  218. package/dist/internal/hooks/use-notification-center.js +0 -151
  219. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
  220. package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
@@ -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
- }