@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
@@ -2446,18 +2446,18 @@ function findFencedCodeEnd(text, start) {
2446
2446
  const markerLength = openingMatch[2].length;
2447
2447
  let lineStart = openingLineEnd === -1 ? text.length : openingLineEnd + 1;
2448
2448
  while (lineStart < text.length) {
2449
- const lineEnd3 = text.indexOf("\n", lineStart);
2450
- const line = text.slice(lineStart, lineEnd3 === -1 ? text.length : lineEnd3);
2449
+ const lineEnd2 = text.indexOf("\n", lineStart);
2450
+ const line = text.slice(lineStart, lineEnd2 === -1 ? text.length : lineEnd2);
2451
2451
  const indentLength = /^ {0,3}/.exec(line)?.[0].length ?? 0;
2452
2452
  const candidateStart = indentLength;
2453
2453
  if (line[candidateStart] === marker) {
2454
2454
  const candidateLength = countRun(line, candidateStart, marker);
2455
2455
  const remainder = line.slice(candidateStart + candidateLength);
2456
2456
  if (candidateLength >= markerLength && /^[\t ]*\r?$/.test(remainder)) {
2457
- return lineEnd3 === -1 ? text.length : lineEnd3 + 1;
2457
+ return lineEnd2 === -1 ? text.length : lineEnd2 + 1;
2458
2458
  }
2459
2459
  }
2460
- lineStart = lineEnd3 === -1 ? text.length : lineEnd3 + 1;
2460
+ lineStart = lineEnd2 === -1 ? text.length : lineEnd2 + 1;
2461
2461
  }
2462
2462
  return text.length;
2463
2463
  }
@@ -2567,12 +2567,12 @@ function hasReferenceDefinitionOutsideFences(markdown, definition) {
2567
2567
  let lineStart = 0;
2568
2568
  while (lineStart < markdown.length) {
2569
2569
  const newline = markdown.indexOf("\n", lineStart);
2570
- const lineEnd3 = newline === -1 ? markdown.length : newline;
2570
+ const lineEnd2 = newline === -1 ? markdown.length : newline;
2571
2571
  const next = newline === -1 ? markdown.length : newline + 1;
2572
2572
  const first = markdown[lineStart];
2573
2573
  if (marker !== null) {
2574
2574
  if (first === marker || first === " " || first === " ") {
2575
- const line = markdown.slice(lineStart, lineEnd3).replace(/\r$/, "");
2575
+ const line = markdown.slice(lineStart, lineEnd2).replace(/\r$/, "");
2576
2576
  const close = REGION_CLOSE.exec(line);
2577
2577
  if (close && close[1][0] === marker && close[1].length >= length) {
2578
2578
  marker = null;
@@ -2583,7 +2583,7 @@ function hasReferenceDefinitionOutsideFences(markdown, definition) {
2583
2583
  continue;
2584
2584
  }
2585
2585
  if (first === "`" || first === "~" || first === "$" || first === " " && !hasContainer) {
2586
- const line = markdown.slice(lineStart, lineEnd3).replace(/\r$/, "");
2586
+ const line = markdown.slice(lineStart, lineEnd2).replace(/\r$/, "");
2587
2587
  const open = FENCE_OPEN.exec(line) ?? MATH_OPEN.exec(line);
2588
2588
  if (open && !(open[1][0] === "`" && open[2].includes("`"))) {
2589
2589
  if (definition.test(markdown.slice(runStart, lineStart))) return true;
@@ -2636,19 +2636,94 @@ function isMermaidCode(language, code) {
2636
2636
  return false;
2637
2637
  }
2638
2638
 
2639
+ // ../shared/src/tool-output/scan.ts
2640
+ function isWhitespace2(code) {
2641
+ if (code === 32 || code >= 9 && code <= 13) return true;
2642
+ if (code < 160) return false;
2643
+ return code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288 || code === 65279;
2644
+ }
2645
+ function isLineTerminator(code) {
2646
+ return code === 10 || code === 13 || code === 8232 || code === 8233;
2647
+ }
2648
+ function lineEnd(text, from) {
2649
+ for (let i = from; i < text.length; i++) {
2650
+ if (isLineTerminator(text.charCodeAt(i))) return i;
2651
+ }
2652
+ return text.length;
2653
+ }
2654
+ function nextOf(text, characters) {
2655
+ let from = Number.POSITIVE_INFINITY;
2656
+ let found = -1;
2657
+ return (at) => {
2658
+ if (at >= from && (found === -1 || at <= found)) return found;
2659
+ from = at;
2660
+ found = -1;
2661
+ for (let i = at; i < text.length; i++) {
2662
+ if (characters.includes(text.charCodeAt(i))) {
2663
+ found = i;
2664
+ break;
2665
+ }
2666
+ }
2667
+ return found;
2668
+ };
2669
+ }
2670
+ function whitespaceEnd(text, from) {
2671
+ let i = from;
2672
+ while (i < text.length && isWhitespace2(text.charCodeAt(i))) i++;
2673
+ return i;
2674
+ }
2675
+ function isDigit(code) {
2676
+ return code >= 48 && code <= 57;
2677
+ }
2678
+ function isWordCharacter(code) {
2679
+ return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95;
2680
+ }
2681
+ function lineTables(line) {
2682
+ const n = line.length;
2683
+ const spaceEnd = new Int32Array(n + 2);
2684
+ const solidEnd = new Int32Array(n + 2);
2685
+ const wordEnd = new Int32Array(n + 2);
2686
+ const breakAt = new Int32Array(n + 2);
2687
+ for (const table of [spaceEnd, solidEnd, wordEnd, breakAt]) {
2688
+ table[n] = n;
2689
+ table[n + 1] = n + 1;
2690
+ }
2691
+ for (let i = n - 1; i >= 0; i--) {
2692
+ const code = line.charCodeAt(i);
2693
+ const space = isWhitespace2(code);
2694
+ spaceEnd[i] = space ? spaceEnd[i + 1] : i;
2695
+ solidEnd[i] = space ? i : solidEnd[i + 1];
2696
+ wordEnd[i] = isWordCharacter(code) ? wordEnd[i + 1] : i;
2697
+ breakAt[i] = isLineTerminator(code) ? i : breakAt[i + 1];
2698
+ }
2699
+ return { spaceEnd, solidEnd, wordEnd, breakAt };
2700
+ }
2701
+ function positionIndex(n, holds) {
2702
+ const after = new Int32Array(n + 2);
2703
+ const before = new Int32Array(n + 1);
2704
+ after[n + 1] = -1;
2705
+ for (let e = n; e >= 0; e--) after[e] = holds(e) ? e : after[e + 1];
2706
+ for (let e = 0; e <= n; e++) before[e] = holds(e) ? e : e > 0 ? before[e - 1] : -1;
2707
+ return { after, before };
2708
+ }
2709
+ function startsWithIgnoreCase(text, needle, at) {
2710
+ if (at < 0 || at + needle.length > text.length) return false;
2711
+ for (let i = 0; i < needle.length; i++) {
2712
+ let a = text.charCodeAt(at + i);
2713
+ let b2 = needle.charCodeAt(i);
2714
+ if (a >= 65 && a <= 90) a += 32;
2715
+ if (b2 >= 65 && b2 <= 90) b2 += 32;
2716
+ if (a !== b2) return false;
2717
+ }
2718
+ return true;
2719
+ }
2720
+
2639
2721
  // ../shared/src/tag-blocks.ts
2640
2722
  var GT = 62;
2641
2723
  var COLON = 58;
2642
2724
  var NEWLINE = 10;
2643
2725
  var WHITESPACE = /\s/;
2644
2726
  var WORD = /\w/;
2645
- function lineEnd(text, from) {
2646
- for (let i = from; i < text.length; i++) {
2647
- const code = text.charCodeAt(i);
2648
- if (code === 10 || code === 13 || code === 8232 || code === 8233) return i;
2649
- }
2650
- return text.length;
2651
- }
2652
2727
  function fold(code) {
2653
2728
  return code >= 65 && code <= 90 ? code + 32 : code;
2654
2729
  }
@@ -2870,8 +2945,8 @@ function parseReminderPrompt(rawText) {
2870
2945
  const head = HEAD.exec(rawText);
2871
2946
  if (!head) return void 0;
2872
2947
  const close = rawText.indexOf("]", head[0].length);
2873
- const lineEnd3 = rawText.indexOf("\n", head[0].length);
2874
- if (close < 0 || lineEnd3 >= 0 && lineEnd3 < close) return void 0;
2948
+ const lineEnd2 = rawText.indexOf("\n", head[0].length);
2949
+ if (close < 0 || lineEnd2 >= 0 && lineEnd2 < close) return void 0;
2875
2950
  return { id: head[1], recurring: head[2] === "recurring", prompt: rawText.slice(close + 1).trim() };
2876
2951
  }
2877
2952
 
@@ -3017,10 +3092,10 @@ function withoutSlackId(value) {
3017
3092
  return /^[A-Z][A-Z0-9]+$/.test(value.slice(at + 2, -1)) ? value.slice(0, at) : value;
3018
3093
  }
3019
3094
  function readSlackFollowUp(text) {
3020
- const lineEnd3 = text.indexOf("\n");
3021
- const header = readSlackFollowUpHeader((lineEnd3 < 0 ? text : text.slice(0, lineEnd3)).trimEnd());
3095
+ const lineEnd2 = text.indexOf("\n");
3096
+ const header = readSlackFollowUpHeader((lineEnd2 < 0 ? text : text.slice(0, lineEnd2)).trimEnd());
3022
3097
  if (!header) return void 0;
3023
- const rest = lineEnd3 < 0 ? "" : text.slice(lineEnd3 + 1);
3098
+ const rest = lineEnd2 < 0 ? "" : text.slice(lineEnd2 + 1);
3024
3099
  const blank = rest.search(/\r?\n\s*\r?\n/);
3025
3100
  const body = blank < 0 ? rest : rest.slice(blank);
3026
3101
  return {
@@ -3039,9 +3114,9 @@ var TELEGRAM_FIRST_HEADER = "You received a message on Telegram.";
3039
3114
  var TELEGRAM_FOLLOW_UP_HEADER = /^New Telegram message from (\S+) in the same chat:$/;
3040
3115
  var TELEGRAM_TAIL = "\n\nHow to answer:\n- Reply with the ";
3041
3116
  function readTelegramPrompt(text) {
3042
- const lineEnd3 = text.indexOf("\n");
3043
- if (lineEnd3 < 0) return void 0;
3044
- const header = text.slice(0, lineEnd3).trimEnd();
3117
+ const lineEnd2 = text.indexOf("\n");
3118
+ if (lineEnd2 < 0) return void 0;
3119
+ const header = text.slice(0, lineEnd2).trimEnd();
3045
3120
  const followUp = TELEGRAM_FOLLOW_UP_HEADER.exec(header);
3046
3121
  if (header !== TELEGRAM_FIRST_HEADER && !followUp) return void 0;
3047
3122
  const idLine = /^Message id:[^\n]*\n/m.exec(text);
@@ -3053,7 +3128,7 @@ function readTelegramPrompt(text) {
3053
3128
  return {
3054
3129
  platform: "Telegram",
3055
3130
  context: "",
3056
- userName: field(text.slice(lineEnd3, idLine.index), "From") || followUp?.[1] || "unknown",
3131
+ userName: field(text.slice(lineEnd2, idLine.index), "From") || followUp?.[1] || "unknown",
3057
3132
  messageText: text.slice(start, tail > start ? tail : text.length).trim(),
3058
3133
  followUp: followUp !== null
3059
3134
  };
@@ -3455,7 +3530,7 @@ function languageLabel(language) {
3455
3530
  // ../shared/src/connector-sections.ts
3456
3531
  var OTHER = "Other";
3457
3532
  var POPULAR_SECTION = "popular";
3458
- function foldCategory(value) {
3533
+ function fold2(value) {
3459
3534
  return value.toLowerCase().replace(/[^a-z0-9]/g, "");
3460
3535
  }
3461
3536
  var CURATED_SECTIONS = [
@@ -3661,7 +3736,7 @@ function sectionRank(key) {
3661
3736
  }
3662
3737
  function sectionKeyForCategory(raw) {
3663
3738
  const trimmed = raw.trim();
3664
- return CLAIMED_BY.get(foldCategory(trimmed)) ?? trimmed;
3739
+ return CLAIMED_BY.get(fold2(trimmed)) ?? trimmed;
3665
3740
  }
3666
3741
  function sectionTitle(key) {
3667
3742
  return CURATED_TITLE.get(key) ?? humanizeCategory(key);
@@ -3893,80 +3968,135 @@ var PIXEL_KORTIX_ROWS = [
3893
3968
  "## ## ##",
3894
3969
  "## ## ##"
3895
3970
  ];
3896
-
3897
- // ../shared/src/preview-state-page.ts
3898
- var PREVIEW_BUILDING_STATES = /* @__PURE__ */ new Set([
3899
- "starting",
3900
- "not-listening"
3901
- ]);
3902
- var PREVIEW_STATE_MESSAGE = "kortix:preview-state";
3903
-
3904
- // ../shared/src/tool-output/scan.ts
3905
- function isWhitespace2(code) {
3906
- if (code === 32 || code >= 9 && code <= 13) return true;
3907
- if (code < 160) return false;
3908
- return code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288 || code === 65279;
3909
- }
3910
- function isLineTerminator(code) {
3911
- return code === 10 || code === 13 || code === 8232 || code === 8233;
3912
- }
3913
- function lineEnd2(text, from) {
3914
- for (let i = from; i < text.length; i++) {
3915
- if (isLineTerminator(text.charCodeAt(i))) return i;
3916
- }
3917
- return text.length;
3918
- }
3919
- function whitespaceEnd(text, from) {
3920
- let i = from;
3921
- while (i < text.length && isWhitespace2(text.charCodeAt(i))) i++;
3922
- return i;
3971
+ var PIXEL_MARK_SIZE = 7;
3972
+ var HALF = 4;
3973
+ var MAX_ATTEMPTS = 256;
3974
+ var MASK = [
3975
+ [0.15, 0.3, 0.45, 0.55],
3976
+ [0.3, 0.5, 0.6, 0.7],
3977
+ [0.4, 0.6, 0.65, 0.7],
3978
+ [0.5, 0.65, 0.7, 0.75],
3979
+ [0.4, 0.55, 0.6, 0.65],
3980
+ [0.3, 0.45, 0.5, 0.5],
3981
+ [0.2, 0.35, 0.4, 0.35]
3982
+ ];
3983
+ var RESERVED_ROWS = { mykortix: PIXEL_KORTIX_ROWS, meta: PIXEL_KORTIX_ROWS };
3984
+ function fnv1a(input) {
3985
+ let h2 = 2166136261;
3986
+ for (let i = 0; i < input.length; i++) {
3987
+ h2 ^= input.charCodeAt(i);
3988
+ h2 = Math.imul(h2, 16777619);
3989
+ }
3990
+ return h2 >>> 0;
3991
+ }
3992
+ function mulberry32(seed) {
3993
+ let a = seed;
3994
+ return () => {
3995
+ a = a + 1831565813 | 0;
3996
+ let t = Math.imul(a ^ a >>> 15, 1 | a);
3997
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
3998
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
3999
+ };
3923
4000
  }
3924
- function isDigit(code) {
3925
- return code >= 48 && code <= 57;
4001
+ function draw(seed) {
4002
+ const rand = mulberry32(seed);
4003
+ return MASK.map((row) => {
4004
+ const half = row.map((p2) => rand() < p2);
4005
+ return [...half, half[2], half[1], half[0]];
4006
+ });
3926
4007
  }
3927
- function isWordCharacter(code) {
3928
- return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95;
4008
+ function largestComponent(grid) {
4009
+ const seen = grid.map((row) => row.map(() => false));
4010
+ let best = 0;
4011
+ for (let r = 0; r < PIXEL_MARK_SIZE; r++)
4012
+ for (let c = 0; c < PIXEL_MARK_SIZE; c++) {
4013
+ if (!grid[r][c] || seen[r][c]) continue;
4014
+ let size = 0;
4015
+ const stack = [[r, c]];
4016
+ seen[r][c] = true;
4017
+ while (stack.length) {
4018
+ const [y, x] = stack.pop();
4019
+ size++;
4020
+ for (const [ny, nx] of [[y + 1, x], [y - 1, x], [y, x + 1], [y, x - 1]]) {
4021
+ if (grid[ny]?.[nx] && !seen[ny][nx]) {
4022
+ seen[ny][nx] = true;
4023
+ stack.push([ny, nx]);
4024
+ }
4025
+ }
4026
+ }
4027
+ best = Math.max(best, size);
4028
+ }
4029
+ return best;
4030
+ }
4031
+ function hasIsolatedPixel(grid) {
4032
+ return grid.some(
4033
+ (row, r) => row.some((on, c) => {
4034
+ if (!on) return false;
4035
+ for (let dy = -1; dy <= 1; dy++)
4036
+ for (let dx = -1; dx <= 1; dx++) if ((dy || dx) && grid[r + dy]?.[c + dx]) return false;
4037
+ return true;
4038
+ })
4039
+ );
3929
4040
  }
3930
- function lineTables(line) {
3931
- const n = line.length;
3932
- const spaceEnd = new Int32Array(n + 2);
3933
- const solidEnd = new Int32Array(n + 2);
3934
- const wordEnd = new Int32Array(n + 2);
3935
- const breakAt = new Int32Array(n + 2);
3936
- for (const table of [spaceEnd, solidEnd, wordEnd, breakAt]) {
3937
- table[n] = n;
3938
- table[n + 1] = n + 1;
3939
- }
3940
- for (let i = n - 1; i >= 0; i--) {
3941
- const code = line.charCodeAt(i);
3942
- const space = isWhitespace2(code);
3943
- spaceEnd[i] = space ? spaceEnd[i + 1] : i;
3944
- solidEnd[i] = space ? i : solidEnd[i + 1];
3945
- wordEnd[i] = isWordCharacter(code) ? wordEnd[i + 1] : i;
3946
- breakAt[i] = isLineTerminator(code) ? i : breakAt[i + 1];
3947
- }
3948
- return { spaceEnd, solidEnd, wordEnd, breakAt };
4041
+ function passesPixelMarkGate(grid) {
4042
+ const filled = grid.flat().filter(Boolean).length;
4043
+ if (filled < 18 || filled > 30) return false;
4044
+ const rows = grid.filter((row) => row.some(Boolean)).length;
4045
+ const cols = grid[0].filter((_2, c) => grid.some((row) => row[c])).length;
4046
+ if (rows < 5 || cols < 5) return false;
4047
+ if (grid.filter((row) => row.every(Boolean)).length > 1) return false;
4048
+ if (grid.filter((row) => row[HALF - 1]).length < 3) return false;
4049
+ if (hasIsolatedPixel(grid)) return false;
4050
+ return largestComponent(grid) >= Math.ceil(filled * 0.85);
4051
+ }
4052
+ function toPath(grid) {
4053
+ let d = "";
4054
+ grid.forEach((row, y) => {
4055
+ for (let x = 0; x < row.length; ) {
4056
+ if (!row[x]) {
4057
+ x++;
4058
+ continue;
4059
+ }
4060
+ const start = x;
4061
+ while (x < row.length && row[x]) x++;
4062
+ d += `M${start} ${y}h${x - start}v1h-${x - start}z`;
4063
+ }
4064
+ });
4065
+ return d;
3949
4066
  }
3950
- function positionIndex(n, holds) {
3951
- const after = new Int32Array(n + 2);
3952
- const before = new Int32Array(n + 1);
3953
- after[n + 1] = -1;
3954
- for (let e = n; e >= 0; e--) after[e] = holds(e) ? e : after[e + 1];
3955
- for (let e = 0; e <= n; e++) before[e] = holds(e) ? e : e > 0 ? before[e - 1] : -1;
3956
- return { after, before };
4067
+ function rowsToPath(rows, cell) {
4068
+ return toPath(rows.map((row) => [...row].map((c) => c === cell)));
3957
4069
  }
3958
- function startsWithIgnoreCase(text, needle, at) {
3959
- if (at < 0 || at + needle.length > text.length) return false;
3960
- for (let i = 0; i < needle.length; i++) {
3961
- let a = text.charCodeAt(at + i);
3962
- let b2 = needle.charCodeAt(i);
3963
- if (a >= 65 && a <= 90) a += 32;
3964
- if (b2 >= 65 && b2 <= 90) b2 += 32;
3965
- if (a !== b2) return false;
4070
+ function pixelMarkShape(slug) {
4071
+ const rows = RESERVED_ROWS[slug];
4072
+ if (rows) {
4073
+ return {
4074
+ grid: rows.map((row) => [...row].map((c) => c !== " ")),
4075
+ path: rowsToPath(rows, "#"),
4076
+ ditherPath: rowsToPath(rows, "+"),
4077
+ width: rows[0].length,
4078
+ height: rows.length
4079
+ };
3966
4080
  }
3967
- return true;
4081
+ let grid = draw(fnv1a(slug));
4082
+ for (let attempt = 1; !passesPixelMarkGate(grid) && attempt < MAX_ATTEMPTS; attempt++)
4083
+ grid = draw(fnv1a(`${slug}:${attempt}`));
4084
+ return {
4085
+ grid,
4086
+ path: toPath(grid),
4087
+ ditherPath: "",
4088
+ width: PIXEL_MARK_SIZE,
4089
+ height: PIXEL_MARK_SIZE
4090
+ };
3968
4091
  }
3969
4092
 
4093
+ // ../shared/src/preview-state-page.ts
4094
+ var PREVIEW_BUILDING_STATES = /* @__PURE__ */ new Set([
4095
+ "starting",
4096
+ "not-listening"
4097
+ ]);
4098
+ var PREVIEW_STATE_MESSAGE = "kortix:preview-state";
4099
+
3970
4100
  // ../shared/src/tool-output/background-workers.ts
3971
4101
  var COLON2 = 58;
3972
4102
  function occurrences(text, needle, ignoreCase) {
@@ -4064,26 +4194,9 @@ var MD_SIGNALS = [
4064
4194
  function looksLikeMarkdown(text) {
4065
4195
  return MD_SIGNALS.some((re) => re.test(text)) || hasMarkdownLink(text) || hasOrderedListItem(text);
4066
4196
  }
4067
- function nextOfEither(text, a, b2) {
4068
- let from = Number.POSITIVE_INFINITY;
4069
- let found = -1;
4070
- return (at) => {
4071
- if (at >= from && (found === -1 || at <= found)) return found;
4072
- from = at;
4073
- found = -1;
4074
- for (let i = at; i < text.length; i++) {
4075
- const code = text.charCodeAt(i);
4076
- if (code === a || code === b2) {
4077
- found = i;
4078
- break;
4079
- }
4080
- }
4081
- return found;
4082
- };
4083
- }
4084
4197
  function hasMarkdownLink(text) {
4085
- const labelEnd = nextOfEither(text, 93, 10);
4086
- const urlEnd = nextOfEither(text, 41, 10);
4198
+ const labelEnd = nextOf(text, [93, 10]);
4199
+ const urlEnd = nextOf(text, [41, 10]);
4087
4200
  for (let open = text.indexOf("["); open !== -1; ) {
4088
4201
  const close = labelEnd(open + 1);
4089
4202
  if (close === -1) return false;
@@ -4542,7 +4655,7 @@ function blockEndsAt(text, at) {
4542
4655
  function textToBlockEnd(text, from) {
4543
4656
  const start = whitespaceEnd(text, from);
4544
4657
  if (start < text.length) {
4545
- const end = lineEnd2(text, start);
4658
+ const end = lineEnd(text, start);
4546
4659
  if (blockEndsAt(text, end)) return [start, end];
4547
4660
  } else if (start - 1 >= from && !isLineTerminator(text.charCodeAt(start - 1))) {
4548
4661
  return [start - 1, start];
@@ -4586,7 +4699,7 @@ function detailedBlocks(body) {
4586
4699
  }
4587
4700
  if (firstNewline === -1) return null;
4588
4701
  if (start < n && firstNewline <= start - 3) {
4589
- const end = lineEnd2(body, start);
4702
+ const end = lineEnd(body, start);
4590
4703
  const rest = afterContent(body, end);
4591
4704
  if (rest) return { content: [start, end], ...rest };
4592
4705
  }
@@ -4677,18 +4790,8 @@ function compactHits(body) {
4677
4790
  runEnd = i;
4678
4791
  return i;
4679
4792
  };
4680
- const next = (character) => {
4681
- let from2 = Number.POSITIVE_INFINITY;
4682
- let found = -1;
4683
- return (at) => {
4684
- if (at >= from2 && (found === -1 || at <= found)) return found;
4685
- from2 = at;
4686
- found = body.indexOf(character, at);
4687
- return found;
4688
- };
4689
- };
4690
- const nextOpen = next("[");
4691
- const nextClose = next("]");
4793
+ const nextOpen = nextOf(body, [BRACKET_OPEN2]);
4794
+ const nextClose = nextOf(body, [BRACKET_CLOSE]);
4692
4795
  let innerFor = -1;
4693
4796
  let innerOpen = -1;
4694
4797
  const idAt = (at) => {
@@ -4936,7 +5039,7 @@ function sectionHeaderAt(text, at) {
4936
5039
  let afterEquals = at + 2;
4937
5040
  while (text.charCodeAt(afterEquals) === EQUALS) afterEquals++;
4938
5041
  const titleStart = whitespaceEnd(text, afterEquals);
4939
- const lastStop = lineEnd2(text, titleStart);
5042
+ const lastStop = lineEnd(text, titleStart);
4940
5043
  let i = titleStart;
4941
5044
  while (i < lastStop) {
4942
5045
  const code = text.charCodeAt(i);
@@ -4987,7 +5090,7 @@ function toolsUsedLine(text) {
4987
5090
  else continue;
4988
5091
  const listStart = whitespaceEnd(text, at + label.length);
4989
5092
  if (listStart < text.length) {
4990
- const end = lineEnd2(text, listStart);
5093
+ const end = lineEnd(text, listStart);
4991
5094
  return { index, end, tools: text.slice(listStart, end) };
4992
5095
  }
4993
5096
  for (let last = text.length - 1; last >= at + label.length; last--) {
@@ -5089,7 +5192,7 @@ function endsTitle(text, from) {
5089
5192
  function titleAfter(text, from) {
5090
5193
  const start = whitespaceEnd(text, from);
5091
5194
  if (start < text.length) {
5092
- const lastEnd = lineEnd2(text, start);
5195
+ const lastEnd = lineEnd(text, start);
5093
5196
  let end = start + 1;
5094
5197
  while (end < lastEnd) {
5095
5198
  if (endsTitle(text, end)) return text.slice(start, end);
@@ -5170,7 +5273,7 @@ function conversationHeader(text) {
5170
5273
  }
5171
5274
  if (nextClose < inner + 1) nextClose = text.indexOf(close, inner + 1);
5172
5275
  if (nextClose === -1) return null;
5173
- const stop = lineEnd2(text, inner);
5276
+ const stop = lineEnd(text, inner);
5174
5277
  if (nextClose < stop)
5175
5278
  return { index: at, end: nextClose + close.length, inner: text.slice(inner, nextClose) };
5176
5279
  from = stop;
@@ -5306,7 +5409,7 @@ function withoutBaseDirectoryNote(text) {
5306
5409
  for (; ; ) {
5307
5410
  const note = text.indexOf(NOTE, from);
5308
5411
  if (note === -1) return text;
5309
- const end = lineEnd2(text, note);
5412
+ const end = lineEnd(text, note);
5310
5413
  if (nextPhrase < note + NOTE.length) nextPhrase = text.indexOf(PHRASE, note + NOTE.length);
5311
5414
  if (nextPhrase === -1) return text;
5312
5415
  if (nextPhrase < end) return text.slice(0, note) + text.slice(end);
@@ -5451,4 +5554,4 @@ function parseTriggerLines(output) {
5451
5554
  });
5452
5555
  }
5453
5556
 
5454
- export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, 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, 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, peerHandleLabel, 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 };
5557
+ export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, 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, appAdminsOnly, autoLinkUrls, avatarFill, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, channelPromptTail, confirmCommitted, countInSection, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, fixManifestText, fnv1a, 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, passesPixelMarkGate, peerHandleLabel, pixelMarkShape, 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 };
@@ -4,8 +4,8 @@
4
4
  * Two kinds live here and both cost the reader something:
5
5
  *
6
6
  * 1. Hints Shiki has no grammar *or* alias for — `golang`, `env`, `patch`,
7
- * `svg`, `psql`, `plaintext`. `ensureLangLoaded` throws on these, the catch
8
- * warns, and the block renders unhighlighted forever.
7
+ * `svg`, `psql`, `plaintext`. Without an alias the block renders
8
+ * unhighlighted forever.
9
9
  * 2. Hints Shiki resolves but only through its own alias table — `rs`, `kt`,
10
10
  * `c++`, `ps1`. Those highlight, but `highlightSync` gates on
11
11
  * `loadedLangs.has(lang)`, which is seeded from `PRELOAD_LANGS` verbatim, so
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The one HTML escaper. It escapes `& < > " '`, so its output is safe in
3
+ * element text and in single- or double-quoted attribute values. It does not
4
+ * make a value safe inside a `<script>` or `<style>` block, or in an unquoted
5
+ * attribute.
6
+ */
7
+ export declare function escapeHtml(str: string): string;
@@ -17,6 +17,7 @@ export * from './markdown-math';
17
17
  export * from './session-attachments';
18
18
  export * from './file-tags';
19
19
  export * from './tag-blocks';
20
+ export * from './html';
20
21
  export * from './trigger-event';
21
22
  export * from './reminder-prompt';
22
23
  export * from './peer-message-prompt';
@@ -27,5 +28,3 @@ export * from './chat-mention';
27
28
  export * from './webhook-signing';
28
29
  export * from './pasted-content';
29
30
  export * from './space-slug';
30
- export * from './artifact-comments';
31
- export * from './artifact-annotations';
@@ -9,3 +9,31 @@
9
9
  * are plain text, the same width, and symmetric on both axes.
10
10
  */
11
11
  export declare const PIXEL_KORTIX_ROWS: readonly ["## ## ##", "## ## ##", "+#+ ## +#+", " ##+ ## +## ", " ######## ", " ######## ", " ##+ ## +## ", "+#+ ## +#+", "## ## ##", "## ## ##"];
12
+ /**
13
+ * An agent's pixel mark: a 7×7 mirrored pixel figure derived from its slug.
14
+ *
15
+ * Same slug, same mark, on every surface and every device. Nothing is stored:
16
+ * the slug is hashed (FNV-1a), the hash seeds a PRNG (mulberry32), the PRNG
17
+ * fills the left half of the grid against a density mask, and the half is
18
+ * mirrored. A draw that fails the quality gate is redrawn from a salted seed,
19
+ * so retries stay deterministic. The tone comes from a second hash.
20
+ *
21
+ * This is the shape, one copy for every host: web (`@kortix/ui` `pixelMark`,
22
+ * which adds the tile tone) and mobile (`AgentPixelMark`, theme ink).
23
+ *
24
+ * Changing SIZE, MASK, the gate or PALETTES changes every agent's mark — the
25
+ * golden test in `pixel-mark.test.ts` exists to make that a deliberate act.
26
+ */
27
+ export declare const PIXEL_MARK_SIZE = 7;
28
+ type Grid = boolean[][];
29
+ export declare function fnv1a(input: string): number;
30
+ /** Readable at 14px, fills the frame, one connected body. */
31
+ export declare function passesPixelMarkGate(grid: Grid): boolean;
32
+ export declare function pixelMarkShape(slug: string): {
33
+ grid: boolean[][];
34
+ path: string;
35
+ ditherPath: string;
36
+ width: number;
37
+ height: number;
38
+ };
39
+ export {};
@@ -12,10 +12,8 @@ export type RuntimeVersions = {
12
12
  bun: string;
13
13
  bunSha256Amd64: string;
14
14
  bunSha256Arm64: string;
15
- /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode sunset". */
15
+ /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode is deleted". */
16
16
  opencode: string;
17
- /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode sunset". */
18
- opencodeSdk: string;
19
17
  agentBrowser: string;
20
18
  playwright: string;
21
19
  anydoc: string;
@@ -45,10 +43,8 @@ export declare const PYTHON_PACKAGE_FLOOR_IMPORTS: Record<string, string>;
45
43
  export declare const BUN_VERSION: string;
46
44
  export declare const BUN_SHA256_AMD64: string;
47
45
  export declare const BUN_SHA256_ARM64: string;
48
- /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode sunset". */
46
+ /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode is deleted". */
49
47
  export declare const OPENCODE_VERSION: string;
50
- /** @deprecated OpenCode only. OpenCode is sunset (2026-10-23): no new code. See apps/kortix-sandbox-agent-server/src/harness/README.md "OpenCode sunset". */
51
- export declare const OPENCODE_SDK_VERSION: string;
52
48
  export declare const OPENCODE_USER_AGENT: string;
53
49
  export declare const AGENT_BROWSER_VERSION: string;
54
50
  export declare const PLAYWRIGHT_VERSION: string;
@@ -7,9 +7,4 @@ export declare function withoutEdgeQuotes(text: string): string;
7
7
  * to the last extension in that run.
8
8
  */
9
9
  export declare function sandboxMediaPath(text: string, roots: readonly string[], kind: 'image' | 'video'): string | null;
10
- /**
11
- * The path without its trailing slashes, as `path.replace(/\/+$/, '')`. The
12
- * regex retried a slash run from every slash in it: 240k slashes inside a path
13
- * took seconds.
14
- */
15
- export declare function withoutTrailingSlashes(path: string): string;
10
+ export { stripTrailingSlashes as withoutTrailingSlashes } from '../utils/string';
@@ -4,6 +4,8 @@ export declare function isWhitespace(code: number): boolean;
4
4
  export declare function isLineTerminator(code: number): boolean;
5
5
  /** The first line terminator at or after `from`, or the length of the text. */
6
6
  export declare function lineEnd(text: string, from: number): number;
7
+ /** The first of `characters` at or after a position, remembered while the queries move forward. */
8
+ export declare function nextOf(text: string, characters: readonly number[]): (at: number) => number;
7
9
  /** The end of the run of regex `\s` characters that starts at `from`. */
8
10
  export declare function whitespaceEnd(text: string, from: number): number;
9
11
  /** A regex `\d` without the `u` flag: `0`–`9`. */