@clueprint/mcp 1.1.2 → 1.1.4

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/server/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * AI Browser DevTools MCP Server
4
- * Entry point
5
- */
6
- export {};
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG"}
package/server/index.js DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- /**
4
- * AI Browser DevTools MCP Server
5
- * Entry point
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const server_js_1 = require("./server.js");
9
- // Start the server
10
- (0, server_js_1.createMCPServer)().catch((error) => {
11
- console.error('[MCP] Failed to start server:', error);
12
- process.exit(1);
13
- });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;;GAGG;;AAEH,2CAA8C;AAE9C,mBAAmB;AACnB,IAAA,2BAAe,GAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAChC,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * MCP Server Implementation
3
- */
4
- /**
5
- * Create and start the MCP server
6
- */
7
- export declare function createMCPServer(): Promise<void>;
8
- //# sourceMappingURL=server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0YH;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA8FrD"}
package/server/server.js DELETED
@@ -1,417 +0,0 @@
1
- "use strict";
2
- /**
3
- * MCP Server Implementation
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createMCPServer = createMCPServer;
7
- const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
8
- const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
9
- const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
10
- const websocket_js_1 = require("./websocket.js");
11
- const format_js_1 = require("./analysis/format.js");
12
- // Tool definitions
13
- const TOOLS = [
14
- {
15
- name: 'inspect',
16
- description: 'Get detailed information about what the user selected in the browser — either a single element (via Option+Click) or a region (via Cmd+Shift+Drag). Auto-detects the selection type. Call when the user says "clueprint inspect", mentions selecting/inspecting an element, or clicking on something in the browser.',
17
- inputSchema: {
18
- type: 'object',
19
- properties: {
20
- includeScreenshot: {
21
- type: 'boolean',
22
- default: false,
23
- description: 'Include a screenshot (always included for region selections)',
24
- },
25
- cssDetail: {
26
- type: 'number',
27
- enum: [0, 1, 2, 3],
28
- default: 1,
29
- description: 'CSS detail level for element selections: 0=none, 1=layout+visual, 2=+typography, 3=full computed',
30
- },
31
- },
32
- },
33
- },
34
- {
35
- name: 'audit',
36
- description: 'Get current page diagnostics including console errors, network failures, performance metrics, and accessibility issues. Call when the user says "clueprint audit", asks what\'s wrong with the page, or wants a health/error check.',
37
- inputSchema: {
38
- type: 'object',
39
- properties: {
40
- includeWarnings: {
41
- type: 'boolean',
42
- default: false,
43
- description: 'Include warnings, not just errors',
44
- },
45
- includePerformance: {
46
- type: 'boolean',
47
- default: true,
48
- description: 'Include performance metrics (LCP, CLS)',
49
- },
50
- },
51
- },
52
- },
53
- {
54
- name: 'start_flow_recording',
55
- description: 'Start recording user actions, network requests, and errors in the browser. User will perform actions then stop recording. Call when user wants to show you a sequence of steps or reproduce a bug.',
56
- inputSchema: {
57
- type: 'object',
58
- properties: {},
59
- },
60
- },
61
- {
62
- name: 'stop_flow_recording',
63
- description: 'Stop the current flow recording and return the captured timeline of events, network requests, and errors.',
64
- inputSchema: {
65
- type: 'object',
66
- properties: {
67
- includeSuccessfulRequests: {
68
- type: 'boolean',
69
- default: false,
70
- description: 'Include successful (2xx) network requests',
71
- },
72
- },
73
- },
74
- },
75
- {
76
- name: 'recording',
77
- description: 'Get the most recent flow recording. Call when the user says "clueprint recording" or asks about what was recorded.',
78
- inputSchema: {
79
- type: 'object',
80
- properties: {},
81
- },
82
- },
83
- {
84
- name: 'activity',
85
- description: 'Get the last 30 seconds of browser activity from the background capture buffer. The user must have background capture enabled in the browser widget. Returns a timeline of user interactions, network requests, and errors without needing to start/stop a recording.',
86
- inputSchema: {
87
- type: 'object',
88
- properties: {
89
- includeSuccessfulRequests: {
90
- type: 'boolean',
91
- default: false,
92
- description: 'Include successful (2xx) network requests in the output',
93
- },
94
- },
95
- },
96
- },
97
- {
98
- name: 'snapshot_dom',
99
- description: 'Take a snapshot of the current DOM state for later comparison. Returns a snapshot ID.',
100
- inputSchema: {
101
- type: 'object',
102
- properties: {
103
- selector: {
104
- type: 'string',
105
- description: 'Optional CSS selector to snapshot a subtree instead of full page',
106
- },
107
- },
108
- },
109
- },
110
- {
111
- name: 'diff_dom_snapshots',
112
- description: 'Compare two DOM snapshots to see what changed (classes, sizes, styles). Useful for debugging dynamic content.',
113
- inputSchema: {
114
- type: 'object',
115
- properties: {
116
- before: {
117
- type: 'string',
118
- description: 'ID of the "before" snapshot',
119
- },
120
- after: {
121
- type: 'string',
122
- description: 'ID of the "after" snapshot',
123
- },
124
- },
125
- required: ['before', 'after'],
126
- },
127
- },
128
- ];
129
- // Prompt definitions
130
- const PROMPTS = [
131
- {
132
- name: 'inspect',
133
- description: 'Analyze the element or region selected in the browser',
134
- },
135
- {
136
- name: 'audit',
137
- description: 'Check the current page for errors, network failures, and performance issues',
138
- },
139
- {
140
- name: 'recording',
141
- description: 'Get and analyze the most recent flow recording from the browser',
142
- },
143
- ];
144
- /**
145
- * Create error response
146
- */
147
- function errorResponse(message) {
148
- return {
149
- content: [{ type: 'text', text: `Error: ${message}` }],
150
- isError: true,
151
- };
152
- }
153
- /**
154
- * Create text response
155
- */
156
- function textResponse(text, screenshot) {
157
- const content = [
158
- { type: 'text', text },
159
- ];
160
- if (screenshot) {
161
- // Remove data URL prefix if present
162
- const base64Data = screenshot.replace(/^data:image\/[a-z]+;base64,/, '');
163
- content.push({
164
- type: 'image',
165
- data: base64Data,
166
- mimeType: 'image/jpeg',
167
- });
168
- }
169
- return { content };
170
- }
171
- /**
172
- * Handle tool calls
173
- */
174
- async function handleToolCall(name, args) {
175
- // Check extension connection first
176
- if (!(0, websocket_js_1.isExtensionConnected)()) {
177
- return errorResponse('Browser extension not connected. Please ensure:\n' +
178
- '1. AI Browser DevTools extension is installed in Chrome\n' +
179
- '2. The extension popup shows "MCP: Connected"\n' +
180
- '3. Refresh the page if just installed');
181
- }
182
- switch (name) {
183
- case 'inspect': {
184
- const selection = (0, websocket_js_1.getCurrentSelection)();
185
- if (!selection) {
186
- return errorResponse('Nothing selected. To select:\n' +
187
- '1. Hold Option (Alt on Windows) and click any element, or\n' +
188
- '2. Use Cmd+Shift+Drag to select a region\n' +
189
- '3. Then say "clueprint inspect"');
190
- }
191
- if (selection.mode === 'free-select') {
192
- const capture = selection;
193
- const report = (0, format_js_1.formatRegionReport)(capture);
194
- return textResponse(report, capture.screenshot);
195
- }
196
- const capture = selection;
197
- const report = (0, format_js_1.formatElementReport)(capture);
198
- // Check selection age
199
- const ageMs = Date.now() - capture.timestamp;
200
- let warning = '';
201
- if (ageMs > 60000) {
202
- warning = `\n\n⚠️ Selection is ${Math.round(ageMs / 1000)}s old. The page may have changed. Select again for fresh data.`;
203
- }
204
- const includeScreenshot = args.includeScreenshot;
205
- return textResponse(report + warning, includeScreenshot ? capture.screenshot : undefined);
206
- }
207
- case 'audit': {
208
- try {
209
- const diagnostics = await (0, websocket_js_1.requestDiagnostics)();
210
- const report = (0, format_js_1.formatDiagnosticsReport)(diagnostics);
211
- return textResponse(report);
212
- }
213
- catch (error) {
214
- return errorResponse(`Failed to get diagnostics: ${error}`);
215
- }
216
- }
217
- case 'start_flow_recording': {
218
- if ((0, websocket_js_1.isRecordingActive)()) {
219
- return errorResponse('Recording is already in progress. Stop it first with stop_flow_recording.');
220
- }
221
- try {
222
- await (0, websocket_js_1.startRecording)();
223
- return textResponse('Recording started! Now:\n' +
224
- '1. Perform the actions you want to capture in the browser\n' +
225
- '2. End by selecting the problem element (Option+Click)\n' +
226
- '3. Tell me "stop recording" when done');
227
- }
228
- catch (error) {
229
- return errorResponse(`Failed to start recording: ${error}`);
230
- }
231
- }
232
- case 'stop_flow_recording': {
233
- if (!(0, websocket_js_1.isRecordingActive)()) {
234
- const existing = (0, websocket_js_1.getCurrentRecording)();
235
- if (existing) {
236
- const report = (0, format_js_1.formatFlowReport)(existing);
237
- return textResponse(report);
238
- }
239
- return errorResponse('No recording in progress. Start one with start_flow_recording.');
240
- }
241
- try {
242
- const recording = await (0, websocket_js_1.stopRecording)();
243
- const report = (0, format_js_1.formatFlowReport)(recording);
244
- return textResponse(report);
245
- }
246
- catch (error) {
247
- return errorResponse(`Failed to stop recording: ${error}`);
248
- }
249
- }
250
- case 'recording': {
251
- const recording = (0, websocket_js_1.getCurrentRecording)();
252
- if (!recording) {
253
- if ((0, websocket_js_1.isRecordingActive)()) {
254
- return errorResponse('Recording is still in progress. Stop it first with stop_flow_recording.');
255
- }
256
- return errorResponse('No recording available. Start one with start_flow_recording.');
257
- }
258
- const report = (0, format_js_1.formatFlowReport)(recording);
259
- return textResponse(report);
260
- }
261
- case 'activity': {
262
- try {
263
- const recording = await (0, websocket_js_1.requestRecentActivity)();
264
- if (!recording) {
265
- return errorResponse('No recent activity available. Possible reasons:\n' +
266
- '1. Background capture is not enabled (click the record button in the floating widget to enable it)\n' +
267
- '2. No user activity has occurred in the last 30 seconds');
268
- }
269
- const report = (0, format_js_1.formatFlowReport)(recording);
270
- return textResponse(report);
271
- }
272
- catch (error) {
273
- return errorResponse(`Failed to get recent activity: ${error}`);
274
- }
275
- }
276
- case 'snapshot_dom': {
277
- try {
278
- const selector = args.selector;
279
- const snapshot = await (0, websocket_js_1.requestSnapshot)(selector);
280
- return textResponse(`DOM snapshot taken.\n` +
281
- `ID: ${snapshot.id}\n` +
282
- `Elements: ${snapshot.elements.size}\n` +
283
- `URL: ${snapshot.url}\n\n` +
284
- `Use this ID with diff_dom_snapshots to compare changes.`);
285
- }
286
- catch (error) {
287
- return errorResponse(`Failed to take snapshot: ${error}`);
288
- }
289
- }
290
- case 'diff_dom_snapshots': {
291
- const before = args.before;
292
- const after = args.after;
293
- if (!before || !after) {
294
- return errorResponse('Both "before" and "after" snapshot IDs are required.');
295
- }
296
- try {
297
- const diff = await (0, websocket_js_1.requestDiff)(before, after);
298
- if ('error' in diff) {
299
- return errorResponse(diff.error);
300
- }
301
- const lines = [];
302
- lines.push(`DOM DIFF: ${before} → ${after}`);
303
- lines.push('━'.repeat(40));
304
- lines.push(`Changes: ${diff.changes.length}`);
305
- lines.push('');
306
- for (const change of diff.changes.slice(0, 20)) {
307
- const emoji = change.type === 'added' ? '➕' : change.type === 'removed' ? '➖' : '🔄';
308
- lines.push(`${emoji} ${change.type.toUpperCase()}: ${change.selector}`);
309
- if (change.changes) {
310
- if (change.changes.classes) {
311
- if (change.changes.classes.added.length) {
312
- lines.push(` + classes: ${change.changes.classes.added.join(', ')}`);
313
- }
314
- if (change.changes.classes.removed.length) {
315
- lines.push(` - classes: ${change.changes.classes.removed.join(', ')}`);
316
- }
317
- }
318
- if (change.changes.size) {
319
- lines.push(` size: ${change.changes.size.before.width}×${change.changes.size.before.height} → ${change.changes.size.after.width}×${change.changes.size.after.height}`);
320
- }
321
- }
322
- }
323
- return textResponse(lines.join('\n'));
324
- }
325
- catch (error) {
326
- return errorResponse(`Failed to diff snapshots: ${error}`);
327
- }
328
- }
329
- default:
330
- return errorResponse(`Unknown tool: ${name}`);
331
- }
332
- }
333
- /**
334
- * Create and start the MCP server
335
- */
336
- async function createMCPServer() {
337
- // Start WebSocket server for extension communication
338
- const wsServer = await (0, websocket_js_1.createWebSocketServer)();
339
- if (wsServer) {
340
- console.error('[MCP] WebSocket server started successfully');
341
- }
342
- else {
343
- console.error('[MCP] Running without WebSocket server - extension connection not available');
344
- }
345
- // Create MCP server
346
- const server = new index_js_1.Server({
347
- name: 'clueprint',
348
- version: '0.1.0',
349
- }, {
350
- capabilities: {
351
- tools: {},
352
- prompts: {},
353
- },
354
- });
355
- // Handle list tools request
356
- server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
357
- return { tools: TOOLS };
358
- });
359
- // Handle tool calls
360
- server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
361
- const { name, arguments: args } = request.params;
362
- return handleToolCall(name, args);
363
- });
364
- // Handle list prompts request
365
- server.setRequestHandler(types_js_1.ListPromptsRequestSchema, async () => {
366
- return { prompts: PROMPTS };
367
- });
368
- // Handle get prompt request
369
- server.setRequestHandler(types_js_1.GetPromptRequestSchema, async (request) => {
370
- const { name } = request.params;
371
- switch (name) {
372
- case 'inspect':
373
- return {
374
- messages: [
375
- {
376
- role: 'user',
377
- content: {
378
- type: 'text',
379
- text: 'I selected something in the browser. Use the inspect tool to get details about my selection (it auto-detects element vs region). Describe what was selected and any issues you notice.',
380
- },
381
- },
382
- ],
383
- };
384
- case 'audit':
385
- return {
386
- messages: [
387
- {
388
- role: 'user',
389
- content: {
390
- type: 'text',
391
- text: 'Run a page audit using the audit tool (include warnings). Report any console errors, network failures, performance issues, or accessibility problems found on the current page.',
392
- },
393
- },
394
- ],
395
- };
396
- case 'recording':
397
- return {
398
- messages: [
399
- {
400
- role: 'user',
401
- content: {
402
- type: 'text',
403
- text: 'Get the most recent flow recording using the recording tool and analyze it. Summarize what actions were captured, any errors that occurred, and highlight anything notable.',
404
- },
405
- },
406
- ],
407
- };
408
- default:
409
- throw new Error(`Unknown prompt: ${name}`);
410
- }
411
- });
412
- // Connect to stdio transport
413
- const transport = new stdio_js_1.StdioServerTransport();
414
- await server.connect(transport);
415
- console.error('[MCP] Server started and connected to stdio');
416
- }
417
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA6YH,0CA8FC;AAzeD,wEAAmE;AACnE,wEAAiF;AACjF,iEAK4C;AAE5C,iDAYwB;AAExB,oDAK8B;AAI9B,mBAAmB;AACnB,MAAM,KAAK,GAAG;IACZ;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,sTAAsT;QACnU,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,iBAAiB,EAAE;oBACjB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,8DAA8D;iBAC5E;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBAClB,OAAO,EAAE,CAAC;oBACV,WAAW,EAAE,kGAAkG;iBAChH;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,qOAAqO;QAClP,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,eAAe,EAAE;oBACf,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,mCAAmC;iBACjD;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,IAAI;oBACb,WAAW,EAAE,wCAAwC;iBACtD;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,oMAAoM;QACjN,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAA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AAI,EAAE,wLAAwL;6BAC/L;yBACF;qBACF;iBACF,CAAC;YAEJ,KAAK,OAAO;gBACV,OAAO;oBACL,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAe;4BACrB,OAAO,EAAE;gCACP,IAAI,EAAE,MAAe;gCACrB,IAAI,EAAE,iLAAiL;6BACxL;yBACF;qBACF;iBACF,CAAC;YAEJ,KAAK,WAAW;gBACd,OAAO;oBACL,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAe;4BACrB,OAAO,EAAE;gCACP,IAAI,EAAE,MAAe;gCACrB,IAAI,EAAE,6KAA6K;6BACpL;yBACF;qBACF;iBACF,CAAC;YAEJ;gBACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,6BAA6B;IAC7B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;AAC/D,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Shared state across MCP server instances via filesystem
3
- * This allows multiple MCP processes to share the same browser state
4
- */
5
- import type { InspectCapture, FreeSelectCapture, FlowRecording } from './types/index.js';
6
- export declare function saveSelection(selection: InspectCapture | FreeSelectCapture | null): void;
7
- export declare function loadSelection(): InspectCapture | FreeSelectCapture | null;
8
- export declare function saveRecording(recording: FlowRecording | null): void;
9
- export declare function loadRecording(): FlowRecording | null;
10
- export declare function saveRecordingState(isRecording: boolean): void;
11
- export declare function loadRecordingState(): boolean;
12
- export declare function saveConnectionState(connected: boolean): void;
13
- export declare function loadConnectionState(): boolean;
14
- //# sourceMappingURL=shared-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-state.d.ts","sourceRoot":"","sources":["../src/shared-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAazF,wBAAgB,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAUxF;AAED,wBAAgB,aAAa,IAAI,cAAc,GAAG,iBAAiB,GAAG,IAAI,CAWzE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAUnE;AAED,wBAAgB,aAAa,IAAI,aAAa,GAAG,IAAI,CAWpD;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAM7D;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAY5C;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAS5D;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAiB7C"}
@@ -1,131 +0,0 @@
1
- "use strict";
2
- /**
3
- * Shared state across MCP server instances via filesystem
4
- * This allows multiple MCP processes to share the same browser state
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.saveSelection = saveSelection;
8
- exports.loadSelection = loadSelection;
9
- exports.saveRecording = saveRecording;
10
- exports.loadRecording = loadRecording;
11
- exports.saveRecordingState = saveRecordingState;
12
- exports.loadRecordingState = loadRecordingState;
13
- exports.saveConnectionState = saveConnectionState;
14
- exports.loadConnectionState = loadConnectionState;
15
- const fs_1 = require("fs");
16
- const os_1 = require("os");
17
- const path_1 = require("path");
18
- const STATE_DIR = (0, path_1.join)((0, os_1.tmpdir)(), 'clueprint');
19
- const SELECTION_FILE = (0, path_1.join)(STATE_DIR, 'current-selection.json');
20
- const RECORDING_FILE = (0, path_1.join)(STATE_DIR, 'current-recording.json');
21
- const RECORDING_STATE_FILE = (0, path_1.join)(STATE_DIR, 'is-recording.json');
22
- const CONNECTION_STATE_FILE = (0, path_1.join)(STATE_DIR, 'connection.json');
23
- // Ensure state directory exists
24
- if (!(0, fs_1.existsSync)(STATE_DIR)) {
25
- (0, fs_1.mkdirSync)(STATE_DIR, { recursive: true });
26
- }
27
- function saveSelection(selection) {
28
- try {
29
- if (selection === null) {
30
- (0, fs_1.writeFileSync)(SELECTION_FILE, JSON.stringify(null));
31
- }
32
- else {
33
- (0, fs_1.writeFileSync)(SELECTION_FILE, JSON.stringify(selection));
34
- }
35
- }
36
- catch (error) {
37
- console.error('[SharedState] Failed to save selection:', error);
38
- }
39
- }
40
- function loadSelection() {
41
- try {
42
- if (!(0, fs_1.existsSync)(SELECTION_FILE)) {
43
- return null;
44
- }
45
- const data = (0, fs_1.readFileSync)(SELECTION_FILE, 'utf-8');
46
- return JSON.parse(data);
47
- }
48
- catch (error) {
49
- console.error('[SharedState] Failed to load selection:', error);
50
- return null;
51
- }
52
- }
53
- function saveRecording(recording) {
54
- try {
55
- if (recording === null) {
56
- (0, fs_1.writeFileSync)(RECORDING_FILE, JSON.stringify(null));
57
- }
58
- else {
59
- (0, fs_1.writeFileSync)(RECORDING_FILE, JSON.stringify(recording));
60
- }
61
- }
62
- catch (error) {
63
- console.error('[SharedState] Failed to save recording:', error);
64
- }
65
- }
66
- function loadRecording() {
67
- try {
68
- if (!(0, fs_1.existsSync)(RECORDING_FILE)) {
69
- return null;
70
- }
71
- const data = (0, fs_1.readFileSync)(RECORDING_FILE, 'utf-8');
72
- return JSON.parse(data);
73
- }
74
- catch (error) {
75
- console.error('[SharedState] Failed to load recording:', error);
76
- return null;
77
- }
78
- }
79
- function saveRecordingState(isRecording) {
80
- try {
81
- (0, fs_1.writeFileSync)(RECORDING_STATE_FILE, JSON.stringify({ isRecording }));
82
- }
83
- catch (error) {
84
- console.error('[SharedState] Failed to save recording state:', error);
85
- }
86
- }
87
- function loadRecordingState() {
88
- try {
89
- if (!(0, fs_1.existsSync)(RECORDING_STATE_FILE)) {
90
- return false;
91
- }
92
- const data = (0, fs_1.readFileSync)(RECORDING_STATE_FILE, 'utf-8');
93
- const state = JSON.parse(data);
94
- return state.isRecording || false;
95
- }
96
- catch (error) {
97
- console.error('[SharedState] Failed to load recording state:', error);
98
- return false;
99
- }
100
- }
101
- function saveConnectionState(connected) {
102
- try {
103
- (0, fs_1.writeFileSync)(CONNECTION_STATE_FILE, JSON.stringify({
104
- connected,
105
- timestamp: Date.now()
106
- }));
107
- }
108
- catch (error) {
109
- console.error('[SharedState] Failed to save connection state:', error);
110
- }
111
- }
112
- function loadConnectionState() {
113
- try {
114
- if (!(0, fs_1.existsSync)(CONNECTION_STATE_FILE)) {
115
- return false;
116
- }
117
- const data = (0, fs_1.readFileSync)(CONNECTION_STATE_FILE, 'utf-8');
118
- const state = JSON.parse(data);
119
- // Consider stale if older than 60 seconds (missed heartbeats)
120
- const age = Date.now() - (state.timestamp || 0);
121
- if (age > 60000) {
122
- return false;
123
- }
124
- return state.connected || false;
125
- }
126
- catch (error) {
127
- console.error('[SharedState] Failed to load connection state:', error);
128
- return false;
129
- }
130
- }
131
- //# sourceMappingURL=shared-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-state.js","sourceRoot":"","sources":["../src/shared-state.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAkBH,sCAUC;AAED,sCAWC;AAED,sCAUC;AAED,sCAWC;AAED,gDAMC;AAED,gDAYC;AAED,kDASC;AAED,kDAiBC;AApHD,2BAAwE;AACxE,2BAA4B;AAC5B,+BAA4B;AAG5B,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,WAAW,CAAC,CAAC;AAC9C,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC;AACjE,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC;AACjE,MAAM,oBAAoB,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAClE,MAAM,qBAAqB,GAAG,IA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