@kortix/ui 0.14.17 → 0.14.19
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/README.md +2 -2
- package/dist/_vendor/kortix-shared.js +38 -2
- package/dist/_vendor/shared/channel-descriptors.d.ts +20 -1
- package/dist/_vendor/shared/channel-message.d.ts +1 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +1 -1
- package/dist/_vendor/shared/space-slug.d.ts +3 -4
- package/dist/_vendor/shared/utils/ambiguous-write.d.ts +3 -3
- package/dist/customize/agents/agent-instructions.d.ts +8 -0
- package/dist/customize/agents/agent-instructions.js +38 -12
- package/dist/customize/agents/agent-overview.d.ts +6 -3
- package/dist/customize/agents/agent-overview.js +8 -2
- package/dist/customize/agents/agent-page-chrome.d.ts +45 -27
- package/dist/customize/agents/agent-page-chrome.js +60 -37
- package/dist/customize/agents/agent-page.js +88 -99
- package/dist/customize/agents/agent-tabs.d.ts +15 -14
- package/dist/customize/agents/agent-tabs.js +19 -16
- package/dist/customize/agents/agents-page.js +8 -6
- package/dist/customize/connectors/detail/account-info.js +1 -1
- package/dist/customize/project-settings/project-admin-sections.d.ts +6 -2
- package/dist/customize/project-settings/project-admin-sections.js +5 -3
- package/dist/customize/project-settings/project-settings-sections.js +1 -1
- package/dist/customize/sections/component/channel-access-panel.js +16 -0
- package/dist/customize/sections/component/channel-mocks.d.ts +5 -0
- package/dist/customize/sections/component/channel-mocks.js +14 -2
- package/dist/customize/sections/component/discord-channel-row.d.ts +6 -0
- package/dist/customize/sections/component/discord-channel-row.js +48 -0
- package/dist/customize/sections/gateway-access-tab.js +1 -1
- package/dist/customize/sections/view/channels-view.js +18 -1
- package/dist/customize/sections/view/git-view.js +2 -2
- package/dist/customize/sections/view/secret-delivery.js +1 -1
- package/dist/customize/sections/view/secrets-view.js +1 -1
- package/dist/customize/settings/rail.js +2 -2
- package/dist/customize/settings/tabs/experimental-tab.d.ts +2 -2
- package/dist/customize/settings/tabs/experimental-tab.js +2 -2
- package/dist/customize/settings/tabs/general-tab.js +5 -4
- package/dist/customize/shared/capability-library.js +19 -22
- package/dist/customize/shared/customize-tab-bar.d.ts +1 -2
- package/dist/customize/shared/customize-tab-bar.js +10 -11
- package/dist/files/project/components/drive-create-dialog.js +3 -3
- package/dist/i18n/en.d.ts +51 -4
- package/dist/i18n/en.js +66 -19
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +1 -1
- package/dist/internal/branding/branding-provider.d.ts +15 -4
- package/dist/internal/branding/branding-provider.js +12 -7
- package/dist/internal/connector-logo/connector-logo.js +2 -0
- package/dist/internal/connector-logo/connector-mark-files.js +1 -0
- package/dist/internal/hooks/channels/use-channels-installations.d.ts +7 -2
- package/dist/internal/hooks/channels/use-channels-installations.js +31 -1
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +6 -14
- package/dist/internal/hooks/projects/use-new-project-session.js +12 -97
- package/dist/internal/hooks/use-notification-center.d.ts +11 -8
- package/dist/internal/hooks/use-notification-center.js +22 -10
- package/dist/internal/icons/discord.d.ts +9 -0
- package/dist/internal/icons/discord.js +9 -0
- package/dist/internal/layout/connect-mcp-modal.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
- package/dist/internal/lib/error-handler.js +1 -1
- package/dist/internal/lib/use-project-feature-flags.js +5 -3
- package/dist/markdown/markdown-frontmatter.d.ts +0 -3
- package/dist/markdown/markdown-frontmatter.js +45 -5
- package/dist/session/actions/project-session-list-helpers.d.ts +4 -14
- package/dist/session/actions/project-session-list-helpers.js +5 -16
- package/dist/session/actions/session-label.d.ts +5 -9
- package/dist/session/actions/session-label.js +6 -10
- package/dist/session/participants/session-participants.d.ts +7 -5
- package/dist/session/participants/session-participants.js +11 -7
- package/dist/session/status/provisioning-failure.d.ts +4 -5
- package/dist/session/status/provisioning-failure.js +4 -5
- package/dist/session/thread/optimistic-turn.js +11 -2
- package/dist/session/thread/session-chat.js +73 -25
- package/dist/session/thread/transcript.d.ts +9 -0
- package/dist/session/thread/transcript.js +44 -5
- package/dist/session/tool/tools/channel-send-card.js +1 -0
- package/dist/session/turn/channel-brand.js +4 -0
- package/dist/session/turn/message-author.d.ts +13 -8
- package/dist/session/turn/message-author.js +34 -16
- package/dist/session/turn/peer-message-row.js +24 -6
- package/dist/session/turn/user-message.js +1 -1
- package/dist/session/voice/call-audio.d.ts +32 -0
- package/dist/session/voice/call-audio.js +146 -0
- package/dist/session/voice/screen-share.d.ts +24 -0
- package/dist/session/voice/screen-share.js +75 -0
- package/dist/session/voice/use-voice-call.d.ts +15 -0
- package/dist/session/voice/use-voice-call.js +220 -0
- package/dist/session/voice/voice-call-bar.d.ts +4 -0
- package/dist/session/voice/voice-call-bar.js +39 -0
- package/dist/session/voice/voice-call-state.d.ts +96 -0
- package/dist/session/voice/voice-call-state.js +103 -0
- package/dist/session/voice/voice-call-store.d.ts +12 -0
- package/dist/session/voice/voice-call-store.js +10 -0
- package/dist/session/voice/voice-call-url.d.ts +24 -0
- package/dist/session/voice/voice-call-url.js +33 -0
- package/dist/session/voice/voice-call.d.ts +15 -0
- package/dist/session/voice/voice-call.js +54 -0
- package/dist/styles.css +1 -1
- package/dist/workspace/admin/project-admin-dashboard.js +9 -4
- package/dist/workspace/layout/project-home.js +13 -14
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +1 -1
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +4 -3
- package/dist/workspace/sidebar/project-session-list.js +1 -0
- package/dist/workspace/sidebar/session-filter-menu.js +1 -0
- package/dist/workspace/sidebar/session-grouping.d.ts +4 -0
- package/dist/workspace/sidebar/session-grouping.js +2 -0
- package/dist/workspace/sidebar/session-source-icons.js +2 -0
- package/dist/workspace/space/space-page.js +2 -2
- package/package.json +9 -9
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/custom-dashboard.md +1 -1
- package/dist/customize/agents/agent-section-rail.d.ts +0 -21
- package/dist/customize/agents/agent-section-rail.js +0 -23
- package/dist/internal/hooks/projects/use-warm-project-session.d.ts +0 -270
- package/dist/internal/hooks/projects/use-warm-project-session.js +0 -362
- package/dist/internal/hooks/projects/warm-session-seed.d.ts +0 -66
- package/dist/internal/hooks/projects/warm-session-seed.js +0 -80
- package/dist/internal/hooks/projects/warm-session-taken-registry.d.ts +0 -61
- package/dist/internal/hooks/projects/warm-session-taken-registry.js +0 -141
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-tab registry of warm-session ids this BROWSER has already taken.
|
|
3
|
-
*
|
|
4
|
-
* Why it exists: the server deliberately reuses one warm session per user per
|
|
5
|
-
* project (`apps/api/src/projects/routes/warm-sessions.ts`), so every tab the
|
|
6
|
-
* user has open on a project holds the SAME session id in its in-memory ready
|
|
7
|
-
* store (`use-warm-project-session.ts`). The moment one tab takes it for a
|
|
8
|
-
* send, every other tab's held copy silently points at a session that now has
|
|
9
|
-
* a conversation in it — and a later send from one of those tabs would land a
|
|
10
|
-
* new prompt inside that old conversation. The in-memory `takenSessionIds`
|
|
11
|
-
* defense (JAY-596/T20) cannot see across tabs; this registry is the shared
|
|
12
|
-
* half of it.
|
|
13
|
-
*
|
|
14
|
-
* localStorage is the medium because it is the only synchronous cross-tab
|
|
15
|
-
* channel: `takeWarmSessionEntry` must stay network-free and synchronous, so
|
|
16
|
-
* the staleness check has to be a sync read. The `storage` event doubles as
|
|
17
|
-
* the push channel — it fires in every OTHER tab on write, letting them drop
|
|
18
|
-
* a now-stale ready entry and replenish while the user is still present.
|
|
19
|
-
*
|
|
20
|
-
* Scope and limits: per-browser only. Two different browsers/devices of the
|
|
21
|
-
* same user can still race a take; that window is the seconds between one
|
|
22
|
-
* device's take and the server's own marker drop at `/start`, versus the
|
|
23
|
-
* minutes-to-hours a stale tab used to hold. Entries are pruned by age and
|
|
24
|
-
* count because the server never re-offers a session once its warm marker
|
|
25
|
-
* drops (~1s after a take), so old entries protect nothing.
|
|
26
|
-
*/
|
|
27
|
-
export const WARM_TAKEN_STORAGE_KEY = 'kortix:warm-session-taken:v1';
|
|
28
|
-
/** Drop entries older than this — the server-side marker drop makes a taken id
|
|
29
|
-
* unofferable within seconds, so a day is generous. */
|
|
30
|
-
const ENTRY_TTL_MS = 24 * 60 * 60 * 1000;
|
|
31
|
-
/** Hard cap so a pathological loop can never bloat the payload. */
|
|
32
|
-
const MAX_ENTRIES = 64;
|
|
33
|
-
function parseEntries(raw) {
|
|
34
|
-
if (!raw)
|
|
35
|
-
return [];
|
|
36
|
-
try {
|
|
37
|
-
const parsed = JSON.parse(raw);
|
|
38
|
-
if (!Array.isArray(parsed))
|
|
39
|
-
return [];
|
|
40
|
-
return parsed.filter((entry) => Array.isArray(entry) && typeof entry[0] === 'string' && typeof entry[1] === 'number');
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function pruneEntries(entries, nowMs) {
|
|
47
|
-
const fresh = entries.filter(([, at]) => nowMs - at < ENTRY_TTL_MS);
|
|
48
|
-
fresh.sort((a, b) => a[1] - b[1]);
|
|
49
|
-
return fresh.slice(-MAX_ENTRIES);
|
|
50
|
-
}
|
|
51
|
-
export function createWarmTakenRegistry(storage, now = Date.now) {
|
|
52
|
-
// Mirror of everything THIS registry recorded, so a missing or throwing
|
|
53
|
-
// storage degrades to exactly the old per-tab behavior instead of breaking.
|
|
54
|
-
const memory = new Set();
|
|
55
|
-
const read = () => {
|
|
56
|
-
if (!storage)
|
|
57
|
-
return [];
|
|
58
|
-
try {
|
|
59
|
-
return parseEntries(storage.getItem(WARM_TAKEN_STORAGE_KEY));
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return {
|
|
66
|
-
has(sessionId) {
|
|
67
|
-
if (memory.has(sessionId))
|
|
68
|
-
return true;
|
|
69
|
-
return read().some(([id]) => id === sessionId);
|
|
70
|
-
},
|
|
71
|
-
record(sessionId) {
|
|
72
|
-
memory.add(sessionId);
|
|
73
|
-
if (!storage)
|
|
74
|
-
return;
|
|
75
|
-
try {
|
|
76
|
-
const entries = read().filter(([id]) => id !== sessionId);
|
|
77
|
-
entries.push([sessionId, now()]);
|
|
78
|
-
storage.setItem(WARM_TAKEN_STORAGE_KEY, JSON.stringify(pruneEntries(entries, now())));
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
// Quota/privacy-mode failures leave the in-memory mirror as the
|
|
82
|
-
// defense — same coverage the app had before this registry existed.
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* The ids a `storage` event ADDED to the registry — i.e. the takes some OTHER
|
|
89
|
-
* tab just made. Pure so the event wiring stays a one-liner and this logic is
|
|
90
|
-
* testable without a window.
|
|
91
|
-
*/
|
|
92
|
-
export function takenIdsAddedByStorageEvent(event) {
|
|
93
|
-
if (event.key !== WARM_TAKEN_STORAGE_KEY)
|
|
94
|
-
return [];
|
|
95
|
-
const before = new Set(parseEntries(event.oldValue).map(([id]) => id));
|
|
96
|
-
const added = [];
|
|
97
|
-
for (const [id] of parseEntries(event.newValue)) {
|
|
98
|
-
if (!before.has(id))
|
|
99
|
-
added.push(id);
|
|
100
|
-
}
|
|
101
|
-
return added;
|
|
102
|
-
}
|
|
103
|
-
function safeLocalStorage() {
|
|
104
|
-
if (typeof window === 'undefined')
|
|
105
|
-
return null;
|
|
106
|
-
try {
|
|
107
|
-
return window.localStorage;
|
|
108
|
-
}
|
|
109
|
-
catch {
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
let appRegistry = createWarmTakenRegistry(safeLocalStorage());
|
|
114
|
-
/** The app-wide registry every real caller shares. */
|
|
115
|
-
export const warmTakenRegistry = {
|
|
116
|
-
has: (sessionId) => appRegistry.has(sessionId),
|
|
117
|
-
record: (sessionId) => appRegistry.record(sessionId),
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Test hook: drop the app-wide registry's in-memory mirror. bun runs every
|
|
121
|
-
* suite in one process, so without this a take recorded by one test leaks
|
|
122
|
-
* into the next — the same reason the warm-session store is reset in
|
|
123
|
-
* `beforeEach`. Production code never calls it.
|
|
124
|
-
*/
|
|
125
|
-
export function resetWarmTakenRegistry() {
|
|
126
|
-
appRegistry = createWarmTakenRegistry(safeLocalStorage());
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Notify `listener` of every warm-session take made by ANOTHER tab. Returns an
|
|
130
|
-
* unsubscribe. A no-op outside a browser (SSR, tests).
|
|
131
|
-
*/
|
|
132
|
-
export function subscribeToExternalWarmTakes(listener) {
|
|
133
|
-
if (typeof window === 'undefined')
|
|
134
|
-
return () => { };
|
|
135
|
-
const onStorage = (event) => {
|
|
136
|
-
for (const id of takenIdsAddedByStorageEvent(event))
|
|
137
|
-
listener(id);
|
|
138
|
-
};
|
|
139
|
-
window.addEventListener('storage', onStorage);
|
|
140
|
-
return () => window.removeEventListener('storage', onStorage);
|
|
141
|
-
}
|