@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.
- package/dist/_vendor/kortix-shared.js +233 -130
- package/dist/_vendor/shared/code-language.d.ts +2 -2
- package/dist/_vendor/shared/html.d.ts +7 -0
- package/dist/_vendor/shared/index.d.ts +1 -0
- package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
- package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
- package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
- package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
- package/dist/_vendor/shared/utils/string.d.ts +6 -0
- package/dist/artifacts/artifact-session.js +4 -3
- package/dist/customize/agents/agent-page.js +5 -5
- package/dist/customize/agents/agent-status.js +1 -1
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/connectors/use-agent-access.d.ts +3 -3
- package/dist/customize/sections/connectors-view.js +50 -37
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
- package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
- package/dist/customize/sections/llm-provider/device-grant.js +27 -0
- package/dist/customize/sections/view/agent-editor.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +37 -6
- package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
- package/dist/customize/sections/view/secret-delivery.js +5 -4
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
- package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
- package/dist/files/project/api/runtime-files.d.ts +2 -2
- package/dist/files/project/api/runtime-files.js +2 -2
- package/dist/files/project/components/drive-explorer.js +1 -1
- package/dist/files/project/components/drive-grid-view.js +0 -1
- package/dist/files/project/components/drive-list-view.js +0 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/hooks/index.d.ts +1 -1
- package/dist/files/project/hooks/index.js +1 -1
- package/dist/files/project/hooks/use-server-health.d.ts +1 -1
- package/dist/files/project/hooks/use-server-health.js +1 -1
- package/dist/files/project/search/workspace-search-service.d.ts +1 -1
- package/dist/files/project/search/workspace-search-service.js +1 -1
- package/dist/files/runtime/hooks/index.d.ts +1 -1
- package/dist/files/runtime/hooks/index.js +1 -1
- package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
- package/dist/files/runtime/hooks/server-health-state.js +2 -2
- package/dist/files/runtime/hooks/system-dir.js +2 -2
- package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-content.js +1 -1
- package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-list.js +3 -3
- package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
- package/dist/files/runtime/hooks/use-server-health.js +3 -3
- package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
- package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
- package/dist/files/runtime/index.d.ts +2 -2
- package/dist/files/runtime/index.js +2 -2
- package/dist/files/runtime/path-utils.d.ts +1 -1
- package/dist/files/runtime/path-utils.js +1 -1
- package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
- package/dist/files/runtime/sandbox-explorer-source.js +1 -1
- package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
- package/dist/files/runtime/sandbox-file-explorer.js +2 -2
- package/dist/files/tree/components/file-tree-item.js +0 -1
- package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
- package/dist/files/tree/hooks/use-file-events.js +1 -1
- package/dist/i18n/en.d.ts +63 -1
- package/dist/i18n/en.js +79 -17
- package/dist/internal/files/file-read-retry.js +1 -1
- package/dist/internal/files/types.d.ts +2 -2
- package/dist/internal/files/types.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +33 -14
- package/dist/internal/goals/goal-meta.js +55 -13
- package/dist/internal/layout/nav-hover-card.d.ts +1 -1
- package/dist/internal/layout/nav-hover-card.js +1 -1
- package/dist/internal/layout/project-capability-nav.d.ts +1 -1
- package/dist/internal/layout/project-capability-nav.js +1 -1
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +18 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
- package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
- package/dist/internal/lib/delivered-but-disconnected.js +3 -5
- package/dist/internal/lib/error-handler.js +8 -3
- package/dist/internal/lib/pixel-mark.d.ts +4 -17
- package/dist/internal/lib/pixel-mark.js +5 -148
- package/dist/internal/lib/sounds.d.ts +4 -4
- package/dist/internal/lib/sounds.js +4 -4
- package/dist/internal/lib/use-project-feature-flags.js +3 -1
- package/dist/internal/stores/composer-prefill-store.js +4 -1
- package/dist/internal/stores/sound-store.d.ts +4 -4
- package/dist/internal/stores/sound-store.js +10 -0
- package/dist/markdown/code/shiki-highlighter.js +14 -5
- package/dist/markdown/file-links.js +12 -3
- package/dist/markdown/markdown-frontmatter.d.ts +6 -6
- package/dist/markdown/markdown-frontmatter.js +3 -3
- package/dist/primitives/button.js +2 -1
- package/dist/session/agents/held-messages.d.ts +1 -5
- package/dist/session/agents/held-messages.js +1 -21
- package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/composer-chat-input.d.ts +1 -1
- package/dist/session/composer/composer-chat-input.js +2 -2
- package/dist/session/composer/composer.js +16 -1
- package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
- package/dist/session/composer/hooks/use-file-search.js +16 -16
- package/dist/session/composer/menus/mention-controller.js +1 -3
- package/dist/session/composer/menus/space-mentions.d.ts +14 -4
- package/dist/session/composer/menus/space-mentions.js +17 -1
- package/dist/session/composer/use-instant-session-send.js +2 -2
- package/dist/session/header/session-goal-indicator.js +4 -4
- package/dist/session/panel/easy/plan-card.d.ts +2 -2
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/session-desktop.js +6 -0
- package/dist/session/panel/use-session-panel-state.js +2 -2
- package/dist/session/status/sandbox-loading-boundary.js +2 -2
- package/dist/session/status/session-terminal-state.d.ts +47 -0
- package/dist/session/status/session-terminal-state.js +56 -0
- package/dist/session/thread/plan-surface.d.ts +1 -1
- package/dist/session/thread/plan-surface.js +1 -1
- package/dist/session/thread/session-chat.d.ts +1 -1
- package/dist/session/thread/session-chat.js +88 -99
- package/dist/session/thread/stop-sequence.d.ts +51 -0
- package/dist/session/thread/stop-sequence.js +55 -0
- package/dist/session/thread/transcript.d.ts +2 -2
- package/dist/session/thread/transcript.js +2 -2
- package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
- package/dist/session/tool/tools/apply-patch-tool.js +1 -1
- package/dist/session/tool/tools/kortix-action-tool.js +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
- package/dist/session/tool/tools/multi-agent-tools.js +1 -1
- package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-kill-tool.js +1 -1
- package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
- package/dist/session/tool/tools/pty-read-tool.js +2 -2
- package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
- package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-write-tool.js +1 -1
- package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/todo-write-tool.js +1 -1
- package/dist/session/turn/peer-message-row.d.ts +1 -10
- package/dist/session/turn/peer-message-row.js +1 -18
- package/dist/session/turn/plan-anchor.d.ts +3 -3
- package/dist/session/turn/plan-anchor.js +3 -3
- package/dist/session/turn/plan-card.d.ts +7 -7
- package/dist/session/turn/plan-card.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/terminal/terminal-card-gate.d.ts +6 -3
- package/dist/terminal/terminal-card-gate.js +21 -4
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/review/review-center.d.ts +8 -2
- package/dist/workspace/review/review-center.js +44 -13
- package/dist/workspace/review/review-reducer.d.ts +7 -0
- package/dist/workspace/review/review-reducer.js +11 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
- package/dist/workspace/sidebar/project-nav-items.js +11 -12
- package/dist/workspace/spaces/principal-card.d.ts +3 -1
- package/dist/workspace/spaces/principal-card.js +3 -3
- package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
- package/dist/workspace/spaces/space-agent-ask.js +36 -0
- package/dist/workspace/spaces/space-details-dialog.js +1 -1
- package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
- package/dist/workspace/spaces/space-details-panel.js +62 -8
- package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
- package/dist/workspace/spaces/space-mention-source.js +12 -19
- package/dist/workspace/spaces/space-view.js +3 -2
- package/package.json +3 -3
- package/skills/kortix-ui/references/modules.md +1 -1
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
- 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
|
|
2450
|
-
const line = text.slice(lineStart,
|
|
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
|
|
2457
|
+
return lineEnd2 === -1 ? text.length : lineEnd2 + 1;
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
lineStart =
|
|
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
|
|
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,
|
|
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,
|
|
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
|
|
2874
|
-
if (close < 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
|
|
3021
|
-
const header = readSlackFollowUpHeader((
|
|
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 =
|
|
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
|
|
3043
|
-
if (
|
|
3044
|
-
const header = text.slice(0,
|
|
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(
|
|
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
|
|
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(
|
|
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
|
-
|
|
3898
|
-
var
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
]
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
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
|
|
3925
|
-
|
|
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
|
|
3928
|
-
|
|
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
|
|
3931
|
-
const
|
|
3932
|
-
|
|
3933
|
-
const
|
|
3934
|
-
const
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
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
|
|
3951
|
-
|
|
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
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
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
|
-
|
|
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 =
|
|
4086
|
-
const urlEnd =
|
|
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 =
|
|
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 =
|
|
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
|
|
4681
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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`.
|
|
8
|
-
*
|
|
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';
|
|
@@ -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
|
|
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
|
|
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`. */
|
|
@@ -16,3 +16,9 @@ export declare function truncateString(str?: string, maxLength?: number): string
|
|
|
16
16
|
* slug (`harness-reflector`) into a display name (`Harness-Reflector`).
|
|
17
17
|
*/
|
|
18
18
|
export declare function capitalizeWords(str: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Trim trailing slashes without a regex. `/\/+$/` against a long run of
|
|
21
|
+
* slashes backtracks polynomially, so a value that reaches an exported library
|
|
22
|
+
* function gets this linear scan instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare function stripTrailingSlashes(value: string): string;
|