@seed-ship/mcp-ui-solid 2.3.0 → 2.5.0
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/components/ChatPrompt.cjs +271 -0
- package/dist/components/ChatPrompt.cjs.map +1 -0
- package/dist/components/ChatPrompt.d.ts +33 -0
- package/dist/components/ChatPrompt.d.ts.map +1 -0
- package/dist/components/ChatPrompt.js +271 -0
- package/dist/components/ChatPrompt.js.map +1 -0
- package/dist/hooks/useChatBus.cjs +28 -0
- package/dist/hooks/useChatBus.cjs.map +1 -0
- package/dist/hooks/useChatBus.d.ts +56 -0
- package/dist/hooks/useChatBus.d.ts.map +1 -0
- package/dist/hooks/useChatBus.js +28 -0
- package/dist/hooks/useChatBus.js.map +1 -0
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/services/chat-bus.cjs +118 -0
- package/dist/services/chat-bus.cjs.map +1 -0
- package/dist/services/chat-bus.d.ts +43 -0
- package/dist/services/chat-bus.d.ts.map +1 -0
- package/dist/services/chat-bus.js +118 -0
- package/dist/services/chat-bus.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/types/chat-bus.d.ts +286 -0
- package/dist/types/chat-bus.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/ChatPrompt.test.tsx +280 -0
- package/src/components/ChatPrompt.tsx +263 -0
- package/src/hooks/useChatBus.tsx +81 -0
- package/src/index.ts +34 -0
- package/src/services/chat-bus.test.ts +306 -0
- package/src/services/chat-bus.ts +183 -0
- package/src/services/index.ts +2 -0
- package/src/types/chat-bus.ts +320 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
function createEventEmitter() {
|
|
2
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
3
|
+
function createThrottled(fn, ms) {
|
|
4
|
+
let lastCall = 0;
|
|
5
|
+
let timer = null;
|
|
6
|
+
let lastArgs = null;
|
|
7
|
+
let cancelled = false;
|
|
8
|
+
const throttled = ((...args) => {
|
|
9
|
+
if (cancelled) return;
|
|
10
|
+
lastArgs = args;
|
|
11
|
+
const now = Date.now();
|
|
12
|
+
const remaining = ms - (now - lastCall);
|
|
13
|
+
if (remaining <= 0) {
|
|
14
|
+
if (timer) {
|
|
15
|
+
clearTimeout(timer);
|
|
16
|
+
timer = null;
|
|
17
|
+
}
|
|
18
|
+
lastCall = now;
|
|
19
|
+
fn(...args);
|
|
20
|
+
} else if (!timer) {
|
|
21
|
+
timer = setTimeout(() => {
|
|
22
|
+
lastCall = Date.now();
|
|
23
|
+
timer = null;
|
|
24
|
+
if (lastArgs && !cancelled) {
|
|
25
|
+
try {
|
|
26
|
+
fn(...lastArgs);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.error("[ChatBus] Error in throttled handler:", err);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, remaining);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
fn: throttled,
|
|
36
|
+
cancel: () => {
|
|
37
|
+
cancelled = true;
|
|
38
|
+
if (timer) {
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
timer = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
on(event, handler, options) {
|
|
47
|
+
if (!listeners.has(event)) {
|
|
48
|
+
listeners.set(event, /* @__PURE__ */ new Set());
|
|
49
|
+
}
|
|
50
|
+
const listener = { handler, options };
|
|
51
|
+
let throttleHandle = null;
|
|
52
|
+
if ((options == null ? void 0 : options.throttle) && options.throttle > 0) {
|
|
53
|
+
throttleHandle = createThrottled(handler, options.throttle);
|
|
54
|
+
listener.throttledHandler = throttleHandle.fn;
|
|
55
|
+
}
|
|
56
|
+
listeners.get(event).add(listener);
|
|
57
|
+
return () => {
|
|
58
|
+
var _a;
|
|
59
|
+
throttleHandle == null ? void 0 : throttleHandle.cancel();
|
|
60
|
+
(_a = listeners.get(event)) == null ? void 0 : _a.delete(listener);
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
emit(event, ...args) {
|
|
64
|
+
var _a;
|
|
65
|
+
const set = listeners.get(event);
|
|
66
|
+
if (!set) return;
|
|
67
|
+
for (const listener of set) {
|
|
68
|
+
if ((_a = listener.options) == null ? void 0 : _a.streamKey) {
|
|
69
|
+
let streamKeyArg;
|
|
70
|
+
for (const arg of args) {
|
|
71
|
+
if (arg && typeof arg === "object" && "streamKey" in arg) {
|
|
72
|
+
streamKeyArg = arg.streamKey;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (streamKeyArg !== void 0 && streamKeyArg !== listener.options.streamKey) continue;
|
|
77
|
+
}
|
|
78
|
+
const fn = listener.throttledHandler || listener.handler;
|
|
79
|
+
try {
|
|
80
|
+
fn(...args);
|
|
81
|
+
} catch (err) {
|
|
82
|
+
console.error(`[ChatBus] Error in ${event} handler:`, err);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
clear() {
|
|
87
|
+
listeners.clear();
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function createCommandHandler() {
|
|
92
|
+
const handlers = /* @__PURE__ */ new Map();
|
|
93
|
+
return {
|
|
94
|
+
handle(command, handler) {
|
|
95
|
+
handlers.set(command, handler);
|
|
96
|
+
},
|
|
97
|
+
exec(command, ...args) {
|
|
98
|
+
const handler = handlers.get(command);
|
|
99
|
+
if (!handler) {
|
|
100
|
+
console.warn(`[ChatBus] No handler registered for command: ${command}`);
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
return handler(...args);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function createChatBus() {
|
|
108
|
+
return {
|
|
109
|
+
events: createEventEmitter(),
|
|
110
|
+
commands: createCommandHandler()
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
createChatBus,
|
|
115
|
+
createCommandHandler,
|
|
116
|
+
createEventEmitter
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=chat-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-bus.js","sources":["../../src/services/chat-bus.ts"],"sourcesContent":["/**\n * Chat Bus — Event Emitter + Command Handler\n * v2.4.0: Core primitives for the chat event/command bus\n *\n * @experimental — This API may change without major bump until v2.5.0.\n */\n\nimport type {\n ChatEvents,\n ChatCommands,\n ChatEventEmitter,\n ChatCommandHandler,\n ChatBus,\n EventSubscribeOptions,\n} from '../types/chat-bus'\n\n// ─── Event Emitter ───────────────────────────────────────────\n\ninterface Listener<F extends (...args: any[]) => any> {\n handler: F\n options?: EventSubscribeOptions\n throttledHandler?: F\n}\n\n/**\n * Create a typed event emitter with throttle and streamKey filtering support.\n *\n * @experimental\n *\n * @example\n * const emitter = createEventEmitter<ChatEvents>()\n * const unsub = emitter.on('onToken', (event) => console.log(event.token), { throttle: 100 })\n * emitter.emit('onToken', { streamKey: 'abc', token: 'hello' })\n * unsub()\n */\nexport function createEventEmitter(): ChatEventEmitter {\n const listeners = new Map<string, Set<Listener<any>>>()\n\n interface ThrottledFn<F> {\n fn: F\n cancel: () => void\n }\n\n function createThrottled<F extends (...args: any[]) => void>(fn: F, ms: number): ThrottledFn<F> {\n let lastCall = 0\n let timer: ReturnType<typeof setTimeout> | null = null\n let lastArgs: any[] | null = null\n let cancelled = false\n\n const throttled = ((...args: any[]) => {\n if (cancelled) return\n lastArgs = args\n const now = Date.now()\n const remaining = ms - (now - lastCall)\n\n if (remaining <= 0) {\n if (timer) { clearTimeout(timer); timer = null }\n lastCall = now\n fn(...args)\n } else if (!timer) {\n timer = setTimeout(() => {\n lastCall = Date.now()\n timer = null\n if (lastArgs && !cancelled) {\n try { fn(...lastArgs) } catch (err) { console.error('[ChatBus] Error in throttled handler:', err) }\n }\n }, remaining)\n }\n }) as F\n\n return {\n fn: throttled,\n cancel: () => { cancelled = true; if (timer) { clearTimeout(timer); timer = null } },\n }\n }\n\n return {\n on(event, handler, options) {\n if (!listeners.has(event as string)) {\n listeners.set(event as string, new Set())\n }\n\n const listener: Listener<typeof handler> = { handler, options }\n\n // Apply throttle if requested\n let throttleHandle: ThrottledFn<typeof handler> | null = null\n if (options?.throttle && options.throttle > 0) {\n throttleHandle = createThrottled(handler, options.throttle)\n listener.throttledHandler = throttleHandle.fn\n }\n\n listeners.get(event as string)!.add(listener)\n\n // Return unsubscribe function — cancels pending throttle timers\n return () => {\n throttleHandle?.cancel()\n listeners.get(event as string)?.delete(listener)\n }\n },\n\n emit(event, ...args) {\n const set = listeners.get(event as string)\n if (!set) return\n\n for (const listener of set) {\n // StreamKey filtering: skip if listener wants a specific streamKey\n // For most events args[0] has streamKey; for onCustomEvent args[1] has it\n if (listener.options?.streamKey) {\n let streamKeyArg: unknown\n for (const arg of args) {\n if (arg && typeof arg === 'object' && 'streamKey' in (arg as any)) {\n streamKeyArg = (arg as any).streamKey\n break\n }\n }\n if (streamKeyArg !== undefined && streamKeyArg !== listener.options.streamKey) continue\n }\n\n const fn = listener.throttledHandler || listener.handler\n try {\n fn(...args)\n } catch (err) {\n console.error(`[ChatBus] Error in ${event as string} handler:`, err)\n }\n }\n },\n\n clear() {\n listeners.clear()\n },\n } as ChatEventEmitter\n}\n\n// ─── Command Handler ─────────────────────────────────────────\n\n/**\n * Create a typed command handler. The host app registers handlers,\n * agents execute commands.\n *\n * @experimental\n *\n * @example\n * const commands = createCommandHandler<ChatCommands>()\n * commands.handle('injectPrompt', (text) => setInputValue(text))\n * commands.exec('injectPrompt', 'Hello world')\n */\nexport function createCommandHandler(): ChatCommandHandler {\n const handlers = new Map<string, (...args: any[]) => any>()\n\n return {\n handle(command, handler) {\n handlers.set(command as string, handler)\n },\n\n exec(command, ...args) {\n const handler = handlers.get(command as string)\n if (!handler) {\n console.warn(`[ChatBus] No handler registered for command: ${command as string}`)\n return undefined as any\n }\n return handler(...args)\n },\n } as ChatCommandHandler\n}\n\n// ─── Chat Bus Factory ────────────────────────────────────────\n\n/**\n * Create a complete ChatBus with events + commands.\n *\n * @experimental\n *\n * @example\n * const bus = createChatBus()\n * bus.events.on('onStreamEnd', (event) => { ... })\n * bus.commands.handle('sendPrompt', (text) => { ... })\n */\nexport function createChatBus(): ChatBus {\n return {\n events: createEventEmitter(),\n commands: createCommandHandler(),\n }\n}\n"],"names":[],"mappings":"AAmCO,SAAS,qBAAuC;AACrD,QAAM,gCAAgB,IAAA;AAOtB,WAAS,gBAAoD,IAAO,IAA4B;AAC9F,QAAI,WAAW;AACf,QAAI,QAA8C;AAClD,QAAI,WAAyB;AAC7B,QAAI,YAAY;AAEhB,UAAM,aAAa,IAAI,SAAgB;AACrC,UAAI,UAAW;AACf,iBAAW;AACX,YAAM,MAAM,KAAK,IAAA;AACjB,YAAM,YAAY,MAAM,MAAM;AAE9B,UAAI,aAAa,GAAG;AAClB,YAAI,OAAO;AAAE,uBAAa,KAAK;AAAG,kBAAQ;AAAA,QAAK;AAC/C,mBAAW;AACX,WAAG,GAAG,IAAI;AAAA,MACZ,WAAW,CAAC,OAAO;AACjB,gBAAQ,WAAW,MAAM;AACvB,qBAAW,KAAK,IAAA;AAChB,kBAAQ;AACR,cAAI,YAAY,CAAC,WAAW;AAC1B,gBAAI;AAAE,iBAAG,GAAG,QAAQ;AAAA,YAAE,SAAS,KAAK;AAAE,sBAAQ,MAAM,yCAAyC,GAAG;AAAA,YAAE;AAAA,UACpG;AAAA,QACF,GAAG,SAAS;AAAA,MACd;AAAA,IACF;AAEA,WAAO;AAAA,MACL,IAAI;AAAA,MACJ,QAAQ,MAAM;AAAE,oBAAY;AAAM,YAAI,OAAO;AAAE,uBA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ErB,SAAO;AAAA,IACL,OAAO,SAAS,SAAS;AACvB,eAAS,IAAI,SAAmB,OAAO;AAAA,IACzC;AAAA,IAEA,KAAK,YAAY,MAAM;AACrB,YAAM,UAAU,SAAS,IAAI,OAAiB;AAC9C,UAAI,CAAC,SAAS;AACZ,gBAAQ,KAAK,gDAAgD,OAAiB,EAAE;AAChF,eAAO;AAAA,MACT;AACA,aAAO,QAAQ,GAAG,IAAI;AAAA,IACxB;AAAA,EAAA;AAEJ;AAcO,SAAS,gBAAyB;AACvC,SAAO;AAAA,IACL,QAAQ,mBAAA;AAAA,IACR,UAAU,qBAAA;AAAA,EAAqB;AAEnC;"}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { validateComponent, validateLayout, validateIframeDomain, getIframeSandbox, DEFAULT_RESOURCE_LIMITS, DEFAULT_IFRAME_DOMAINS, TRUSTED_IFRAME_DOMAINS, } from './validation';
|
|
7
7
|
export { ComponentRegistry } from './component-registry';
|
|
8
|
+
export { createEventEmitter, createCommandHandler, createChatBus } from './chat-bus';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Bus — Type Definitions
|
|
3
|
+
* v2.4.0: Event-driven chat toolkit for agent interactions
|
|
4
|
+
*
|
|
5
|
+
* @experimental — These types may change without major bump until stabilized in v2.5.0.
|
|
6
|
+
* See CHANGELOG for breaking changes on experimental types.
|
|
7
|
+
*/
|
|
8
|
+
import type { UIComponent, UILayout } from './index';
|
|
9
|
+
/**
|
|
10
|
+
* @experimental
|
|
11
|
+
* Base for all chat events — identifies the source stream (C2).
|
|
12
|
+
* Enables multi-stream support (Deposium supports 3 concurrent streams).
|
|
13
|
+
*/
|
|
14
|
+
export interface ChatEventBase {
|
|
15
|
+
/** Unique key identifying the active stream */
|
|
16
|
+
streamKey: string;
|
|
17
|
+
/** Conversation ID (if available) */
|
|
18
|
+
conversationId?: string;
|
|
19
|
+
/** Space/context ID */
|
|
20
|
+
spaceId?: string;
|
|
21
|
+
/** Correlation ID linking a sendPrompt command to its resulting stream (C6) */
|
|
22
|
+
correlationId?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @experimental
|
|
26
|
+
* Events emitted by the chat. The host app connects its SSE stream
|
|
27
|
+
* to these callbacks. Agents consume events to react.
|
|
28
|
+
*
|
|
29
|
+
* `onToken` is a hot path (C3) — subscribe with throttle option.
|
|
30
|
+
* Most agents only need `onStreamEnd`.
|
|
31
|
+
*/
|
|
32
|
+
export interface ChatEvents {
|
|
33
|
+
onToken: (event: ChatEventBase & {
|
|
34
|
+
token: string;
|
|
35
|
+
}) => void;
|
|
36
|
+
onStreamStart: (event: ChatEventBase) => void;
|
|
37
|
+
onStreamEnd: (event: ChatEventBase & {
|
|
38
|
+
metadata: StreamDoneMetadata;
|
|
39
|
+
}) => void;
|
|
40
|
+
onError: (event: ChatEventBase & {
|
|
41
|
+
error: ChatError;
|
|
42
|
+
}) => void;
|
|
43
|
+
onUILayout: (event: ChatEventBase & {
|
|
44
|
+
layout: UILayout;
|
|
45
|
+
}) => void;
|
|
46
|
+
onCitation: (event: ChatEventBase & {
|
|
47
|
+
citation: Citation;
|
|
48
|
+
}) => void;
|
|
49
|
+
onToolCall: (event: ChatEventBase & {
|
|
50
|
+
tool: ToolCallEvent;
|
|
51
|
+
}) => void;
|
|
52
|
+
onSuggestions: (event: ChatEventBase & {
|
|
53
|
+
items: string[];
|
|
54
|
+
}) => void;
|
|
55
|
+
onChatPromptResponse: (event: ChatEventBase & {
|
|
56
|
+
response: ChatPromptResponse;
|
|
57
|
+
}) => void;
|
|
58
|
+
onClarificationNeeded: (event: ChatEventBase & {
|
|
59
|
+
clarification: ClarificationEvent;
|
|
60
|
+
}) => void;
|
|
61
|
+
onAgentSwitch: (event: ChatEventBase & {
|
|
62
|
+
agent: AgentContext;
|
|
63
|
+
}) => void;
|
|
64
|
+
onBriefing: (event: ChatEventBase & {
|
|
65
|
+
briefing: BriefingEvent;
|
|
66
|
+
}) => void;
|
|
67
|
+
onCapabilityChange: (event: ChatEventBase & {
|
|
68
|
+
capabilities: string[];
|
|
69
|
+
}) => void;
|
|
70
|
+
onCustomEvent: (type: string, event: ChatEventBase & {
|
|
71
|
+
data: unknown;
|
|
72
|
+
}) => void;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @experimental
|
|
76
|
+
* Subscription options for event listeners (C3).
|
|
77
|
+
*/
|
|
78
|
+
export interface EventSubscribeOptions {
|
|
79
|
+
/** Throttle in ms — recommended 100ms for onToken */
|
|
80
|
+
throttle?: number;
|
|
81
|
+
/** Filter events by streamKey */
|
|
82
|
+
streamKey?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @experimental
|
|
86
|
+
* Commands that agents send to the chat. The host app implements
|
|
87
|
+
* these commands on its UI (maps to existing signals).
|
|
88
|
+
*/
|
|
89
|
+
export interface ChatCommands {
|
|
90
|
+
/** Fill the input field without sending */
|
|
91
|
+
injectPrompt: (text: string) => void;
|
|
92
|
+
/** Fill the input and send immediately. Returns correlationId (C6). */
|
|
93
|
+
sendPrompt: (text: string, metadata?: Record<string, unknown>) => string;
|
|
94
|
+
/** Append text to the current input value */
|
|
95
|
+
appendPrompt: (text: string) => void;
|
|
96
|
+
/** Show a ChatPrompt (choice, confirm, form) above the input (C4) */
|
|
97
|
+
showChatPrompt: (config: ChatPromptConfig, signal?: AbortSignal) => Promise<ChatPromptResponse>;
|
|
98
|
+
/** Dismiss the active ChatPrompt */
|
|
99
|
+
dismissChatPrompt: () => void;
|
|
100
|
+
/** Show suggestion chips */
|
|
101
|
+
showSuggestions: (items: SuggestionItem[]) => void;
|
|
102
|
+
/** Toggle a connector on/off */
|
|
103
|
+
toggleConnector: (connectorId: string, enabled: boolean) => void;
|
|
104
|
+
/** Change the chat mode */
|
|
105
|
+
setMode: (mode: string) => void;
|
|
106
|
+
/** Scroll to a specific message */
|
|
107
|
+
scrollToMessage: (messageId: string) => void;
|
|
108
|
+
/** Show a notification in the chat context */
|
|
109
|
+
notify: (message: string, type?: 'info' | 'success' | 'warning' | 'error') => void;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @experimental
|
|
113
|
+
* The combined events + commands bus.
|
|
114
|
+
*/
|
|
115
|
+
export interface ChatBus {
|
|
116
|
+
events: ChatEventEmitter;
|
|
117
|
+
commands: ChatCommandHandler;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* @experimental
|
|
121
|
+
* Typed event emitter for ChatEvents.
|
|
122
|
+
*/
|
|
123
|
+
export interface ChatEventEmitter {
|
|
124
|
+
/** Subscribe to an event */
|
|
125
|
+
on<K extends keyof ChatEvents>(event: K, handler: ChatEvents[K], options?: EventSubscribeOptions): () => void;
|
|
126
|
+
/** Emit an event to all subscribers */
|
|
127
|
+
emit<K extends keyof ChatEvents>(event: K, ...args: Parameters<ChatEvents[K]>): void;
|
|
128
|
+
/** Remove all listeners (cleanup) */
|
|
129
|
+
clear(): void;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @experimental
|
|
133
|
+
* Typed command handler for ChatCommands.
|
|
134
|
+
*/
|
|
135
|
+
export interface ChatCommandHandler {
|
|
136
|
+
/** Register a command handler (app-side) */
|
|
137
|
+
handle<K extends keyof ChatCommands>(command: K, handler: ChatCommands[K]): void;
|
|
138
|
+
/** Execute a command (agent-side) */
|
|
139
|
+
exec<K extends keyof ChatCommands>(command: K, ...args: Parameters<ChatCommands[K]>): ReturnType<ChatCommands[K]>;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @experimental
|
|
143
|
+
* Configuration for a ChatPrompt interaction.
|
|
144
|
+
*/
|
|
145
|
+
export interface ChatPromptConfig {
|
|
146
|
+
/** Prompt type */
|
|
147
|
+
type: 'choice' | 'confirm' | 'form' | 'select';
|
|
148
|
+
/** Title / question displayed */
|
|
149
|
+
title: string;
|
|
150
|
+
/** Type-specific configuration */
|
|
151
|
+
config: ChoicePromptConfig | ConfirmPromptConfig | FormPromptConfig | SelectPromptConfig;
|
|
152
|
+
}
|
|
153
|
+
export interface ChoicePromptConfig {
|
|
154
|
+
options: Array<{
|
|
155
|
+
value: string;
|
|
156
|
+
label: string;
|
|
157
|
+
icon?: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
}>;
|
|
160
|
+
layout?: 'horizontal' | 'vertical' | 'grid';
|
|
161
|
+
}
|
|
162
|
+
export interface ConfirmPromptConfig {
|
|
163
|
+
message?: string;
|
|
164
|
+
confirmLabel?: string;
|
|
165
|
+
cancelLabel?: string;
|
|
166
|
+
variant?: 'default' | 'danger';
|
|
167
|
+
}
|
|
168
|
+
export interface FormPromptConfig {
|
|
169
|
+
fields: Array<{
|
|
170
|
+
name: string;
|
|
171
|
+
label: string;
|
|
172
|
+
type: 'text' | 'number' | 'select' | 'textarea';
|
|
173
|
+
required?: boolean;
|
|
174
|
+
placeholder?: string;
|
|
175
|
+
options?: Array<{
|
|
176
|
+
label: string;
|
|
177
|
+
value: string;
|
|
178
|
+
}>;
|
|
179
|
+
}>;
|
|
180
|
+
submitLabel?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface SelectPromptConfig {
|
|
183
|
+
options: Array<{
|
|
184
|
+
value: string;
|
|
185
|
+
label: string;
|
|
186
|
+
group?: string;
|
|
187
|
+
}>;
|
|
188
|
+
placeholder?: string;
|
|
189
|
+
searchable?: boolean;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @experimental
|
|
193
|
+
* Structured response from a ChatPrompt.
|
|
194
|
+
*/
|
|
195
|
+
export interface ChatPromptResponse {
|
|
196
|
+
type: ChatPromptConfig['type'];
|
|
197
|
+
/** The selected value or form data */
|
|
198
|
+
value: string | Record<string, unknown>;
|
|
199
|
+
/** Human-readable label (for display in chat as user message) */
|
|
200
|
+
label: string;
|
|
201
|
+
/** Whether the user dismissed without answering */
|
|
202
|
+
dismissed?: boolean;
|
|
203
|
+
}
|
|
204
|
+
export interface SuggestionItem {
|
|
205
|
+
/** Text to inject when clicked */
|
|
206
|
+
text: string;
|
|
207
|
+
/** Display label (defaults to text) */
|
|
208
|
+
label?: string;
|
|
209
|
+
/** Icon */
|
|
210
|
+
icon?: string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @experimental
|
|
214
|
+
* Agent context — who is the active agent?
|
|
215
|
+
*/
|
|
216
|
+
export interface AgentContext {
|
|
217
|
+
id: string;
|
|
218
|
+
name: string;
|
|
219
|
+
persona?: string;
|
|
220
|
+
avatar?: string;
|
|
221
|
+
capabilities?: string[];
|
|
222
|
+
metadata?: Record<string, unknown>;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @experimental
|
|
226
|
+
* Briefing event — update the briefings tab.
|
|
227
|
+
*/
|
|
228
|
+
export interface BriefingEvent {
|
|
229
|
+
id: string;
|
|
230
|
+
action: 'create' | 'update' | 'complete' | 'archive';
|
|
231
|
+
title: string;
|
|
232
|
+
sections?: BriefingSection[];
|
|
233
|
+
status?: 'draft' | 'in_progress' | 'complete';
|
|
234
|
+
agent?: string;
|
|
235
|
+
components?: UIComponent[];
|
|
236
|
+
/** true = do not persist (tooltip, preview). false/absent = app decides storage. */
|
|
237
|
+
ephemeral?: boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface BriefingSection {
|
|
240
|
+
title: string;
|
|
241
|
+
content: string;
|
|
242
|
+
components?: UIComponent[];
|
|
243
|
+
}
|
|
244
|
+
export interface StreamDoneMetadata {
|
|
245
|
+
message_hash?: string;
|
|
246
|
+
intent?: string;
|
|
247
|
+
model?: string;
|
|
248
|
+
tokens?: {
|
|
249
|
+
input: number;
|
|
250
|
+
output: number;
|
|
251
|
+
};
|
|
252
|
+
cost_usd?: number;
|
|
253
|
+
suggestions?: string[];
|
|
254
|
+
extracted_charts?: unknown[];
|
|
255
|
+
timing_breakdown?: Record<string, number>;
|
|
256
|
+
[key: string]: unknown;
|
|
257
|
+
}
|
|
258
|
+
export interface ChatError {
|
|
259
|
+
message: string;
|
|
260
|
+
code?: string;
|
|
261
|
+
recoverable?: boolean;
|
|
262
|
+
}
|
|
263
|
+
export interface Citation {
|
|
264
|
+
page?: number;
|
|
265
|
+
document_id?: string;
|
|
266
|
+
document_name?: string;
|
|
267
|
+
snippet?: string;
|
|
268
|
+
score?: number;
|
|
269
|
+
}
|
|
270
|
+
export interface ToolCallEvent {
|
|
271
|
+
tool: string;
|
|
272
|
+
status: 'running' | 'completed' | 'failed';
|
|
273
|
+
params?: Record<string, unknown>;
|
|
274
|
+
results?: unknown;
|
|
275
|
+
duration_ms?: number;
|
|
276
|
+
}
|
|
277
|
+
export interface ClarificationEvent {
|
|
278
|
+
question: string;
|
|
279
|
+
options: Array<{
|
|
280
|
+
value: string;
|
|
281
|
+
label: string;
|
|
282
|
+
file_id?: number;
|
|
283
|
+
}>;
|
|
284
|
+
original_message?: string;
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=chat-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-bus.d.ts","sourceRoot":"","sources":["../../src/types/chat-bus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIpD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAID;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAEzB,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC3D,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC7C,WAAW,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,KAAK,IAAI,CAAA;IAC9E,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,KAAK,EAAE,SAAS,CAAA;KAAE,KAAK,IAAI,CAAA;IAG9D,UAAU,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,MAAM,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAA;IACjE,UAAU,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAA;IACnE,UAAU,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,IAAI,EAAE,aAAa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