@blinq_ai/widget 0.1.0 → 0.1.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.
- package/README.md +12 -4
- package/dist/blinq-widget.iife.global.js +1923 -997
- package/dist/blinq-widget.iife.global.js.map +1 -1
- package/dist/browser.cjs +1580 -796
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +3 -2
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +168 -1114
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-2BSH3PRA.js → chunk-DQF42RXH.js} +1884 -145
- package/dist/chunk-DQF42RXH.js.map +1 -0
- package/dist/cli.js +122 -14
- package/dist/index.cjs +1886 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -108
- package/dist/index.d.ts +96 -108
- package/dist/index.js +11 -1
- package/dist/widget-core-D0ZdQY2E.d.cts +253 -0
- package/dist/widget-core-D0ZdQY2E.d.ts +253 -0
- package/package.json +3 -2
- package/dist/chunk-2BSH3PRA.js.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
interface ActionableElementHint {
|
|
2
|
+
type: "button" | "link" | "input" | "textarea" | "submit";
|
|
3
|
+
label?: string;
|
|
4
|
+
selector: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
form_selector?: string;
|
|
8
|
+
context_text?: string;
|
|
9
|
+
input_type?: string;
|
|
10
|
+
}
|
|
11
|
+
type SemanticToolKind = "add-item" | "delete-item" | "toggle-item" | "clear-completed" | "open-link" | "submit-form" | "activate-element";
|
|
12
|
+
interface SemanticToolDescriptor {
|
|
13
|
+
name: string;
|
|
14
|
+
kind: SemanticToolKind;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
target_summary: string;
|
|
18
|
+
keywords: string[];
|
|
19
|
+
input_schema?: Record<string, unknown>;
|
|
20
|
+
default_arguments?: Record<string, unknown>;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface PageFormDescriptor {
|
|
24
|
+
selector: string;
|
|
25
|
+
title: string;
|
|
26
|
+
context_text?: string;
|
|
27
|
+
field_selector?: string;
|
|
28
|
+
field_label?: string;
|
|
29
|
+
submit_selector?: string;
|
|
30
|
+
submit_label?: string;
|
|
31
|
+
}
|
|
32
|
+
interface PageListItemActionDescriptor {
|
|
33
|
+
kind: "delete-item" | "toggle-item" | "open-link";
|
|
34
|
+
selector?: string;
|
|
35
|
+
href?: string;
|
|
36
|
+
label: string;
|
|
37
|
+
target_summary: string;
|
|
38
|
+
}
|
|
39
|
+
interface PageListItemDescriptor {
|
|
40
|
+
selector: string;
|
|
41
|
+
title: string;
|
|
42
|
+
context_text: string;
|
|
43
|
+
actions: PageListItemActionDescriptor[];
|
|
44
|
+
}
|
|
45
|
+
interface PageGraph {
|
|
46
|
+
forms: PageFormDescriptor[];
|
|
47
|
+
list_items: PageListItemDescriptor[];
|
|
48
|
+
standalone_actions: ActionableElementHint[];
|
|
49
|
+
}
|
|
50
|
+
interface NormalizedPageContext {
|
|
51
|
+
url: string;
|
|
52
|
+
title: string;
|
|
53
|
+
selection: string;
|
|
54
|
+
visible_text: string;
|
|
55
|
+
actionable_elements: ActionableElementHint[];
|
|
56
|
+
page_graph: PageGraph;
|
|
57
|
+
semantic_tools: SemanticToolDescriptor[];
|
|
58
|
+
}
|
|
59
|
+
declare function collectNormalizedPageContext(): NormalizedPageContext;
|
|
60
|
+
|
|
61
|
+
type RuntimeMode = "native-webmcp-active" | "blinq-page-tools-active" | "read-only-fallback";
|
|
62
|
+
interface ToolCapability {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
read_only: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface ActionPolicy {
|
|
68
|
+
actions_enabled: boolean;
|
|
69
|
+
action_mode: "guide_only" | "execute_with_confirmation";
|
|
70
|
+
pointer_overlay_enabled: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface RuntimeCapability {
|
|
73
|
+
mode: RuntimeMode;
|
|
74
|
+
native_webmcp_supported: boolean;
|
|
75
|
+
embedded_page_tools_supported: boolean;
|
|
76
|
+
write_requires_confirmation: boolean;
|
|
77
|
+
tool_capabilities: ToolCapability[];
|
|
78
|
+
action_policy: ActionPolicy;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface ToolExecutionRequest {
|
|
82
|
+
tool_name: string;
|
|
83
|
+
display_name?: string;
|
|
84
|
+
target_summary?: string;
|
|
85
|
+
requires_confirmation?: boolean;
|
|
86
|
+
arguments: Record<string, unknown>;
|
|
87
|
+
}
|
|
88
|
+
interface ToolExecutionOutcome {
|
|
89
|
+
status: "success" | "cancelled" | "error";
|
|
90
|
+
result?: Record<string, unknown>;
|
|
91
|
+
error?: string;
|
|
92
|
+
}
|
|
93
|
+
interface PageHighlightTarget {
|
|
94
|
+
selector: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
}
|
|
97
|
+
interface HighlightTargetsOptions {
|
|
98
|
+
durationMs?: number;
|
|
99
|
+
interaction?: "explain" | "execute";
|
|
100
|
+
}
|
|
101
|
+
type ConfirmationHandler = (request: {
|
|
102
|
+
displayName: string;
|
|
103
|
+
targetSummary: string;
|
|
104
|
+
arguments: Record<string, unknown>;
|
|
105
|
+
}) => Promise<boolean>;
|
|
106
|
+
declare function detectNativeWebMcpSupport(): boolean;
|
|
107
|
+
declare class PageToolRegistry {
|
|
108
|
+
private readonly confirmationHandler;
|
|
109
|
+
private readonly tools;
|
|
110
|
+
private readonly nativeRegistrations;
|
|
111
|
+
private latestPageContext;
|
|
112
|
+
private nativeToolsActive;
|
|
113
|
+
private highlightLayer;
|
|
114
|
+
private highlightTimer;
|
|
115
|
+
private actionPolicy;
|
|
116
|
+
constructor(confirmationHandler: ConfirmationHandler);
|
|
117
|
+
setActionPolicy(nextPolicy?: Partial<ActionPolicy>): void;
|
|
118
|
+
private buildBaseTools;
|
|
119
|
+
private refreshToolCatalog;
|
|
120
|
+
private onMutatingToolSuccess;
|
|
121
|
+
collectPageContext(): NormalizedPageContext;
|
|
122
|
+
getToolCapabilities(): ToolCapability[];
|
|
123
|
+
clearHighlights(): void;
|
|
124
|
+
private ensureHighlightLayer;
|
|
125
|
+
private ensureHighlightStyle;
|
|
126
|
+
highlightTargets(targets: PageHighlightTarget[], options?: HighlightTargetsOptions): boolean;
|
|
127
|
+
private isToolAllowed;
|
|
128
|
+
private previewToolRequest;
|
|
129
|
+
canExecuteWriteTools(): boolean;
|
|
130
|
+
executeTool(request: ToolExecutionRequest): Promise<ToolExecutionOutcome>;
|
|
131
|
+
unregisterNativeTools(): void;
|
|
132
|
+
registerNativeTools(): Promise<boolean>;
|
|
133
|
+
destroy(): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface BlinqWidgetInitOptions {
|
|
137
|
+
publicToken: string;
|
|
138
|
+
apiBaseUrl?: string;
|
|
139
|
+
mcpEndpoint?: string;
|
|
140
|
+
mount?: string | HTMLElement;
|
|
141
|
+
}
|
|
142
|
+
type BlinqWidgetConfigFile = BlinqWidgetInitOptions;
|
|
143
|
+
interface BlinqWidgetRuntimeStatus extends RuntimeCapability {
|
|
144
|
+
message: string;
|
|
145
|
+
}
|
|
146
|
+
declare class BlinqWidget {
|
|
147
|
+
private readonly options;
|
|
148
|
+
private readonly apiBaseUrl;
|
|
149
|
+
private sessionId;
|
|
150
|
+
private sessionToken;
|
|
151
|
+
private widgetConfig;
|
|
152
|
+
private runtimeStatus;
|
|
153
|
+
private registry;
|
|
154
|
+
private root;
|
|
155
|
+
private reactRoot;
|
|
156
|
+
private voiceController;
|
|
157
|
+
private history;
|
|
158
|
+
private items;
|
|
159
|
+
private minimized;
|
|
160
|
+
private isSending;
|
|
161
|
+
private inputValue;
|
|
162
|
+
private statusText;
|
|
163
|
+
private voiceSupported;
|
|
164
|
+
private voiceListening;
|
|
165
|
+
private voiceWaveform;
|
|
166
|
+
private voiceDurationMs;
|
|
167
|
+
private voiceStartedAt;
|
|
168
|
+
private lastVoiceSampleAt;
|
|
169
|
+
private confirmResolve;
|
|
170
|
+
private confirmItemId;
|
|
171
|
+
private activeRun;
|
|
172
|
+
private activeGuide;
|
|
173
|
+
private pendingAssistantIndicator;
|
|
174
|
+
private executedToolCounts;
|
|
175
|
+
private lastAutoResumeKey;
|
|
176
|
+
private readonly shellHandlers;
|
|
177
|
+
constructor(options: BlinqWidgetInitOptions);
|
|
178
|
+
private currentActionPolicy;
|
|
179
|
+
init(): Promise<this>;
|
|
180
|
+
getRuntimeStatus(): BlinqWidgetRuntimeStatus | null;
|
|
181
|
+
destroy(): void;
|
|
182
|
+
private currentState;
|
|
183
|
+
private renderReactApp;
|
|
184
|
+
private startSession;
|
|
185
|
+
private render;
|
|
186
|
+
private preferredSpeechLanguage;
|
|
187
|
+
private setupVoiceInput;
|
|
188
|
+
private syncVoiceState;
|
|
189
|
+
private startVoiceVisualization;
|
|
190
|
+
private resetVoiceVisualization;
|
|
191
|
+
private updateVoiceVisualization;
|
|
192
|
+
private submitComposerMessage;
|
|
193
|
+
private toggleVoiceInput;
|
|
194
|
+
private minimizedStorageKey;
|
|
195
|
+
private sessionStorageKey;
|
|
196
|
+
private restoreStoredSessionId;
|
|
197
|
+
private persistSessionId;
|
|
198
|
+
private restoreMinimizedState;
|
|
199
|
+
private persistMinimizedState;
|
|
200
|
+
private setMinimized;
|
|
201
|
+
private historyStorageKey;
|
|
202
|
+
private restoreHistory;
|
|
203
|
+
private persistHistory;
|
|
204
|
+
private rememberMessage;
|
|
205
|
+
private recentHistoryForRequest;
|
|
206
|
+
private restoreConversationView;
|
|
207
|
+
private normalizeGuideStep;
|
|
208
|
+
private normalizeGuidePayload;
|
|
209
|
+
private setGuideState;
|
|
210
|
+
private currentGuideStep;
|
|
211
|
+
private syncGuideHighlight;
|
|
212
|
+
private updateActionState;
|
|
213
|
+
private planItemId;
|
|
214
|
+
private upsertPlanItem;
|
|
215
|
+
private removeEmptyMessage;
|
|
216
|
+
private resolveConfirmation;
|
|
217
|
+
private confirmToolExecution;
|
|
218
|
+
private syncRuntimeStatus;
|
|
219
|
+
private setStatus;
|
|
220
|
+
private guideRequest;
|
|
221
|
+
private startGuide;
|
|
222
|
+
private advanceGuide;
|
|
223
|
+
private dismissGuide;
|
|
224
|
+
private completeGuide;
|
|
225
|
+
private runGuideStep;
|
|
226
|
+
private healGuideStep;
|
|
227
|
+
private appendMessage;
|
|
228
|
+
private updateMessage;
|
|
229
|
+
private latestAssistantMessage;
|
|
230
|
+
private finalizeAssistantMessage;
|
|
231
|
+
private showThinkingIndicator;
|
|
232
|
+
private hideThinkingIndicator;
|
|
233
|
+
private currentPageContext;
|
|
234
|
+
private currentRoute;
|
|
235
|
+
private normalizedUserPlanDecision;
|
|
236
|
+
private shouldAutoResumeActiveRun;
|
|
237
|
+
private handleToolRequest;
|
|
238
|
+
private streamChatStep;
|
|
239
|
+
sendMessage(message: string): Promise<string>;
|
|
240
|
+
private continueActiveRun;
|
|
241
|
+
respondToPlan(approved: boolean, options?: {
|
|
242
|
+
appendAssistantMessage?: boolean;
|
|
243
|
+
manageSendingState?: boolean;
|
|
244
|
+
}): Promise<string>;
|
|
245
|
+
endSession(): Promise<void>;
|
|
246
|
+
}
|
|
247
|
+
declare function init(options: BlinqWidgetInitOptions): Promise<BlinqWidget>;
|
|
248
|
+
declare function initFromConfig(config: BlinqWidgetConfigFile | {
|
|
249
|
+
default: BlinqWidgetConfigFile;
|
|
250
|
+
}): Promise<BlinqWidget>;
|
|
251
|
+
declare function createBlinqWidget(options: BlinqWidgetInitOptions): Promise<BlinqWidget>;
|
|
252
|
+
|
|
253
|
+
export { type ActionPolicy as A, BlinqWidget as B, type PageHighlightTarget as P, type RuntimeCapability as R, type BlinqWidgetConfigFile as a, type BlinqWidgetInitOptions as b, type BlinqWidgetRuntimeStatus as c, PageToolRegistry as d, collectNormalizedPageContext as e, createBlinqWidget as f, detectNativeWebMcpSupport as g, initFromConfig as h, init as i };
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
interface ActionableElementHint {
|
|
2
|
+
type: "button" | "link" | "input" | "textarea" | "submit";
|
|
3
|
+
label?: string;
|
|
4
|
+
selector: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
form_selector?: string;
|
|
8
|
+
context_text?: string;
|
|
9
|
+
input_type?: string;
|
|
10
|
+
}
|
|
11
|
+
type SemanticToolKind = "add-item" | "delete-item" | "toggle-item" | "clear-completed" | "open-link" | "submit-form" | "activate-element";
|
|
12
|
+
interface SemanticToolDescriptor {
|
|
13
|
+
name: string;
|
|
14
|
+
kind: SemanticToolKind;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
target_summary: string;
|
|
18
|
+
keywords: string[];
|
|
19
|
+
input_schema?: Record<string, unknown>;
|
|
20
|
+
default_arguments?: Record<string, unknown>;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface PageFormDescriptor {
|
|
24
|
+
selector: string;
|
|
25
|
+
title: string;
|
|
26
|
+
context_text?: string;
|
|
27
|
+
field_selector?: string;
|
|
28
|
+
field_label?: string;
|
|
29
|
+
submit_selector?: string;
|
|
30
|
+
submit_label?: string;
|
|
31
|
+
}
|
|
32
|
+
interface PageListItemActionDescriptor {
|
|
33
|
+
kind: "delete-item" | "toggle-item" | "open-link";
|
|
34
|
+
selector?: string;
|
|
35
|
+
href?: string;
|
|
36
|
+
label: string;
|
|
37
|
+
target_summary: string;
|
|
38
|
+
}
|
|
39
|
+
interface PageListItemDescriptor {
|
|
40
|
+
selector: string;
|
|
41
|
+
title: string;
|
|
42
|
+
context_text: string;
|
|
43
|
+
actions: PageListItemActionDescriptor[];
|
|
44
|
+
}
|
|
45
|
+
interface PageGraph {
|
|
46
|
+
forms: PageFormDescriptor[];
|
|
47
|
+
list_items: PageListItemDescriptor[];
|
|
48
|
+
standalone_actions: ActionableElementHint[];
|
|
49
|
+
}
|
|
50
|
+
interface NormalizedPageContext {
|
|
51
|
+
url: string;
|
|
52
|
+
title: string;
|
|
53
|
+
selection: string;
|
|
54
|
+
visible_text: string;
|
|
55
|
+
actionable_elements: ActionableElementHint[];
|
|
56
|
+
page_graph: PageGraph;
|
|
57
|
+
semantic_tools: SemanticToolDescriptor[];
|
|
58
|
+
}
|
|
59
|
+
declare function collectNormalizedPageContext(): NormalizedPageContext;
|
|
60
|
+
|
|
61
|
+
type RuntimeMode = "native-webmcp-active" | "blinq-page-tools-active" | "read-only-fallback";
|
|
62
|
+
interface ToolCapability {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
read_only: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface ActionPolicy {
|
|
68
|
+
actions_enabled: boolean;
|
|
69
|
+
action_mode: "guide_only" | "execute_with_confirmation";
|
|
70
|
+
pointer_overlay_enabled: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface RuntimeCapability {
|
|
73
|
+
mode: RuntimeMode;
|
|
74
|
+
native_webmcp_supported: boolean;
|
|
75
|
+
embedded_page_tools_supported: boolean;
|
|
76
|
+
write_requires_confirmation: boolean;
|
|
77
|
+
tool_capabilities: ToolCapability[];
|
|
78
|
+
action_policy: ActionPolicy;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface ToolExecutionRequest {
|
|
82
|
+
tool_name: string;
|
|
83
|
+
display_name?: string;
|
|
84
|
+
target_summary?: string;
|
|
85
|
+
requires_confirmation?: boolean;
|
|
86
|
+
arguments: Record<string, unknown>;
|
|
87
|
+
}
|
|
88
|
+
interface ToolExecutionOutcome {
|
|
89
|
+
status: "success" | "cancelled" | "error";
|
|
90
|
+
result?: Record<string, unknown>;
|
|
91
|
+
error?: string;
|
|
92
|
+
}
|
|
93
|
+
interface PageHighlightTarget {
|
|
94
|
+
selector: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
}
|
|
97
|
+
interface HighlightTargetsOptions {
|
|
98
|
+
durationMs?: number;
|
|
99
|
+
interaction?: "explain" | "execute";
|
|
100
|
+
}
|
|
101
|
+
type ConfirmationHandler = (request: {
|
|
102
|
+
displayName: string;
|
|
103
|
+
targetSummary: string;
|
|
104
|
+
arguments: Record<string, unknown>;
|
|
105
|
+
}) => Promise<boolean>;
|
|
106
|
+
declare function detectNativeWebMcpSupport(): boolean;
|
|
107
|
+
declare class PageToolRegistry {
|
|
108
|
+
private readonly confirmationHandler;
|
|
109
|
+
private readonly tools;
|
|
110
|
+
private readonly nativeRegistrations;
|
|
111
|
+
private latestPageContext;
|
|
112
|
+
private nativeToolsActive;
|
|
113
|
+
private highlightLayer;
|
|
114
|
+
private highlightTimer;
|
|
115
|
+
private actionPolicy;
|
|
116
|
+
constructor(confirmationHandler: ConfirmationHandler);
|
|
117
|
+
setActionPolicy(nextPolicy?: Partial<ActionPolicy>): void;
|
|
118
|
+
private buildBaseTools;
|
|
119
|
+
private refreshToolCatalog;
|
|
120
|
+
private onMutatingToolSuccess;
|
|
121
|
+
collectPageContext(): NormalizedPageContext;
|
|
122
|
+
getToolCapabilities(): ToolCapability[];
|
|
123
|
+
clearHighlights(): void;
|
|
124
|
+
private ensureHighlightLayer;
|
|
125
|
+
private ensureHighlightStyle;
|
|
126
|
+
highlightTargets(targets: PageHighlightTarget[], options?: HighlightTargetsOptions): boolean;
|
|
127
|
+
private isToolAllowed;
|
|
128
|
+
private previewToolRequest;
|
|
129
|
+
canExecuteWriteTools(): boolean;
|
|
130
|
+
executeTool(request: ToolExecutionRequest): Promise<ToolExecutionOutcome>;
|
|
131
|
+
unregisterNativeTools(): void;
|
|
132
|
+
registerNativeTools(): Promise<boolean>;
|
|
133
|
+
destroy(): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface BlinqWidgetInitOptions {
|
|
137
|
+
publicToken: string;
|
|
138
|
+
apiBaseUrl?: string;
|
|
139
|
+
mcpEndpoint?: string;
|
|
140
|
+
mount?: string | HTMLElement;
|
|
141
|
+
}
|
|
142
|
+
type BlinqWidgetConfigFile = BlinqWidgetInitOptions;
|
|
143
|
+
interface BlinqWidgetRuntimeStatus extends RuntimeCapability {
|
|
144
|
+
message: string;
|
|
145
|
+
}
|
|
146
|
+
declare class BlinqWidget {
|
|
147
|
+
private readonly options;
|
|
148
|
+
private readonly apiBaseUrl;
|
|
149
|
+
private sessionId;
|
|
150
|
+
private sessionToken;
|
|
151
|
+
private widgetConfig;
|
|
152
|
+
private runtimeStatus;
|
|
153
|
+
private registry;
|
|
154
|
+
private root;
|
|
155
|
+
private reactRoot;
|
|
156
|
+
private voiceController;
|
|
157
|
+
private history;
|
|
158
|
+
private items;
|
|
159
|
+
private minimized;
|
|
160
|
+
private isSending;
|
|
161
|
+
private inputValue;
|
|
162
|
+
private statusText;
|
|
163
|
+
private voiceSupported;
|
|
164
|
+
private voiceListening;
|
|
165
|
+
private voiceWaveform;
|
|
166
|
+
private voiceDurationMs;
|
|
167
|
+
private voiceStartedAt;
|
|
168
|
+
private lastVoiceSampleAt;
|
|
169
|
+
private confirmResolve;
|
|
170
|
+
private confirmItemId;
|
|
171
|
+
private activeRun;
|
|
172
|
+
private activeGuide;
|
|
173
|
+
private pendingAssistantIndicator;
|
|
174
|
+
private executedToolCounts;
|
|
175
|
+
private lastAutoResumeKey;
|
|
176
|
+
private readonly shellHandlers;
|
|
177
|
+
constructor(options: BlinqWidgetInitOptions);
|
|
178
|
+
private currentActionPolicy;
|
|
179
|
+
init(): Promise<this>;
|
|
180
|
+
getRuntimeStatus(): BlinqWidgetRuntimeStatus | null;
|
|
181
|
+
destroy(): void;
|
|
182
|
+
private currentState;
|
|
183
|
+
private renderReactApp;
|
|
184
|
+
private startSession;
|
|
185
|
+
private render;
|
|
186
|
+
private preferredSpeechLanguage;
|
|
187
|
+
private setupVoiceInput;
|
|
188
|
+
private syncVoiceState;
|
|
189
|
+
private startVoiceVisualization;
|
|
190
|
+
private resetVoiceVisualization;
|
|
191
|
+
private updateVoiceVisualization;
|
|
192
|
+
private submitComposerMessage;
|
|
193
|
+
private toggleVoiceInput;
|
|
194
|
+
private minimizedStorageKey;
|
|
195
|
+
private sessionStorageKey;
|
|
196
|
+
private restoreStoredSessionId;
|
|
197
|
+
private persistSessionId;
|
|
198
|
+
private restoreMinimizedState;
|
|
199
|
+
private persistMinimizedState;
|
|
200
|
+
private setMinimized;
|
|
201
|
+
private historyStorageKey;
|
|
202
|
+
private restoreHistory;
|
|
203
|
+
private persistHistory;
|
|
204
|
+
private rememberMessage;
|
|
205
|
+
private recentHistoryForRequest;
|
|
206
|
+
private restoreConversationView;
|
|
207
|
+
private normalizeGuideStep;
|
|
208
|
+
private normalizeGuidePayload;
|
|
209
|
+
private setGuideState;
|
|
210
|
+
private currentGuideStep;
|
|
211
|
+
private syncGuideHighlight;
|
|
212
|
+
private updateActionState;
|
|
213
|
+
private planItemId;
|
|
214
|
+
private upsertPlanItem;
|
|
215
|
+
private removeEmptyMessage;
|
|
216
|
+
private resolveConfirmation;
|
|
217
|
+
private confirmToolExecution;
|
|
218
|
+
private syncRuntimeStatus;
|
|
219
|
+
private setStatus;
|
|
220
|
+
private guideRequest;
|
|
221
|
+
private startGuide;
|
|
222
|
+
private advanceGuide;
|
|
223
|
+
private dismissGuide;
|
|
224
|
+
private completeGuide;
|
|
225
|
+
private runGuideStep;
|
|
226
|
+
private healGuideStep;
|
|
227
|
+
private appendMessage;
|
|
228
|
+
private updateMessage;
|
|
229
|
+
private latestAssistantMessage;
|
|
230
|
+
private finalizeAssistantMessage;
|
|
231
|
+
private showThinkingIndicator;
|
|
232
|
+
private hideThinkingIndicator;
|
|
233
|
+
private currentPageContext;
|
|
234
|
+
private currentRoute;
|
|
235
|
+
private normalizedUserPlanDecision;
|
|
236
|
+
private shouldAutoResumeActiveRun;
|
|
237
|
+
private handleToolRequest;
|
|
238
|
+
private streamChatStep;
|
|
239
|
+
sendMessage(message: string): Promise<string>;
|
|
240
|
+
private continueActiveRun;
|
|
241
|
+
respondToPlan(approved: boolean, options?: {
|
|
242
|
+
appendAssistantMessage?: boolean;
|
|
243
|
+
manageSendingState?: boolean;
|
|
244
|
+
}): Promise<string>;
|
|
245
|
+
endSession(): Promise<void>;
|
|
246
|
+
}
|
|
247
|
+
declare function init(options: BlinqWidgetInitOptions): Promise<BlinqWidget>;
|
|
248
|
+
declare function initFromConfig(config: BlinqWidgetConfigFile | {
|
|
249
|
+
default: BlinqWidgetConfigFile;
|
|
250
|
+
}): Promise<BlinqWidget>;
|
|
251
|
+
declare function createBlinqWidget(options: BlinqWidgetInitOptions): Promise<BlinqWidget>;
|
|
252
|
+
|
|
253
|
+
export { type ActionPolicy as A, BlinqWidget as B, type PageHighlightTarget as P, type RuntimeCapability as R, type BlinqWidgetConfigFile as a, type BlinqWidgetInitOptions as b, type BlinqWidgetRuntimeStatus as c, PageToolRegistry as d, collectNormalizedPageContext as e, createBlinqWidget as f, detectNativeWebMcpSupport as g, initFromConfig as h, init as i };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blinq_ai/widget",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Blinq AI browser widget, SDK, and CLI.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
|
-
"
|
|
30
|
+
"widget": "dist/cli.js"
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@assistant-ui/react": "^0.12.23",
|
|
47
|
+
"lucide-react": "^1.7.0",
|
|
47
48
|
"react": "19.2.4",
|
|
48
49
|
"react-dom": "19.2.4"
|
|
49
50
|
},
|