@vforsh/argus-watcher 0.1.6 → 0.1.8

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.
Files changed (55) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/cdp/text-filter.js.map +1 -1
  3. package/dist/http/routes/domSelectorRoute.d.ts +16 -0
  4. package/dist/http/routes/domSelectorRoute.d.ts.map +1 -0
  5. package/dist/http/routes/domSelectorRoute.js +31 -0
  6. package/dist/http/routes/domSelectorRoute.js.map +1 -0
  7. package/dist/http/routes/postDomClick.d.ts.map +1 -1
  8. package/dist/http/routes/postDomClick.js +2 -7
  9. package/dist/http/routes/postDomClick.js.map +1 -1
  10. package/dist/http/routes/postDomFocus.d.ts.map +1 -1
  11. package/dist/http/routes/postDomFocus.js +6 -17
  12. package/dist/http/routes/postDomFocus.js.map +1 -1
  13. package/dist/http/routes/postDomHover.d.ts.map +1 -1
  14. package/dist/http/routes/postDomHover.js +6 -17
  15. package/dist/http/routes/postDomHover.js.map +1 -1
  16. package/dist/http/routes/postDomInfo.d.ts.map +1 -1
  17. package/dist/http/routes/postDomInfo.js +6 -18
  18. package/dist/http/routes/postDomInfo.js.map +1 -1
  19. package/dist/http/routes/postDomRemove.d.ts.map +1 -1
  20. package/dist/http/routes/postDomRemove.js +6 -17
  21. package/dist/http/routes/postDomRemove.js.map +1 -1
  22. package/dist/http/routes/postDomTree.d.ts.map +1 -1
  23. package/dist/http/routes/postDomTree.js +6 -18
  24. package/dist/http/routes/postDomTree.js.map +1 -1
  25. package/dist/http/routes/postReload.d.ts.map +1 -1
  26. package/dist/http/routes/postReload.js +2 -1
  27. package/dist/http/routes/postReload.js.map +1 -1
  28. package/dist/http/server.d.ts +2 -0
  29. package/dist/http/server.d.ts.map +1 -1
  30. package/dist/http/server.js.map +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +3 -395
  34. package/dist/index.js.map +1 -1
  35. package/dist/sources/extension-delegating-session.d.ts +21 -0
  36. package/dist/sources/extension-delegating-session.d.ts.map +1 -0
  37. package/dist/sources/extension-delegating-session.js +62 -0
  38. package/dist/sources/extension-delegating-session.js.map +1 -0
  39. package/dist/sources/extension-frame-state.d.ts +28 -1
  40. package/dist/sources/extension-frame-state.d.ts.map +1 -1
  41. package/dist/sources/extension-frame-state.js +54 -2
  42. package/dist/sources/extension-frame-state.js.map +1 -1
  43. package/dist/sources/extension-session-events.d.ts +21 -0
  44. package/dist/sources/extension-session-events.d.ts.map +1 -0
  45. package/dist/sources/extension-session-events.js +103 -0
  46. package/dist/sources/extension-session-events.js.map +1 -0
  47. package/dist/sources/extension-source.d.ts +0 -4
  48. package/dist/sources/extension-source.d.ts.map +1 -1
  49. package/dist/sources/extension-source.js +74 -190
  50. package/dist/sources/extension-source.js.map +1 -1
  51. package/dist/startWatcherRuntime.d.ts +6 -0
  52. package/dist/startWatcherRuntime.d.ts.map +1 -0
  53. package/dist/startWatcherRuntime.js +414 -0
  54. package/dist/startWatcherRuntime.js.map +1 -0
  55. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,22 +1,6 @@
1
- import os from 'node:os';
2
- import path from 'node:path';
3
1
  import Emittery from 'emittery';
4
- import { LogBuffer } from './buffer/LogBuffer.js';
5
- import { NetBuffer } from './buffer/NetBuffer.js';
6
- import { startHttpServer } from './http/server.js';
7
- import { announceWatcher, removeWatcher, startRegistryHeartbeat, resolveUniqueWatcherId } from './registry/registry.js';
8
- import { WatcherFileLogger } from './fileLogs/WatcherFileLogger.js';
9
- import { buildIgnoreMatcher } from './cdp/ignoreList.js';
10
- import { createNetworkCapture } from './cdp/networkCapture.js';
11
- import { createTraceRecorder } from './cdp/tracing.js';
12
- import { createScreenshotter } from './cdp/screenshot.js';
13
- import { createRuntimeEditor } from './cdp/editor.js';
14
- import { createCdpSessionHandle } from './cdp/connection.js';
15
- import { createPageIndicatorController, validatePageIndicatorOptions, } from './cdp/pageIndicator.js';
16
- import { createEmulationController } from './emulation/EmulationController.js';
17
- import { createThrottleController } from './throttle/ThrottleController.js';
18
- import { createCdpSource } from './sources/cdp-source.js';
19
- import { createExtensionSource } from './sources/extension-source.js';
2
+ import { resolveUniqueWatcherId } from './registry/registry.js';
3
+ import { createWatcherHandle } from './startWatcherRuntime.js';
20
4
  /**
21
5
  * Start a watcher that connects to Chrome (via CDP or extension), buffers console logs, and exposes the HTTP API.
22
6
  * @param options - Configuration for binding, source mode, and buffering.
@@ -27,382 +11,6 @@ export const startWatcher = async (options) => {
27
11
  throw new Error('Watcher id is required');
28
12
  }
29
13
  const watcherId = await resolveUniqueWatcherId(options.id);
30
- const sourceMode = options.source ?? 'cdp';
31
- const host = options.host ?? '127.0.0.1';
32
- const port = options.port ?? 0;
33
- const chrome = options.chrome ?? { host: '127.0.0.1', port: 9222 };
34
- const bufferSize = options.bufferSize ?? 50_000;
35
- const netBufferSize = options.bufferSize ?? 50_000;
36
- const startedAt = Date.now();
37
- const ignoreMatcher = buildIgnoreMatcher(options.ignoreList);
38
- const stripUrlPrefixes = options.location?.stripUrlPrefixes;
39
- // Resolve artifacts configuration
40
- const artifactsBaseDir = resolveArtifactsBaseDir(options.artifacts?.base, watcherId);
41
- const logsEnabled = options.artifacts?.logs?.enabled === true;
42
- const logsDir = path.join(artifactsBaseDir, 'logs');
43
- const includeTimestamps = options.artifacts?.logs?.includeTimestamps ?? false;
44
- const maxFiles = resolveMaxFiles(options.artifacts?.logs?.maxFiles);
45
- // Network capture is opt-in (disabled by default) and supported in both direct CDP and extension mode.
46
- const netEnabled = options.net?.enabled === true;
47
- // Page console logging (default: minimal)
48
- const pageConsoleLogging = options.pageConsoleLogging ?? 'minimal';
49
- const events = new Emittery();
50
- const buffer = new LogBuffer(bufferSize);
51
- const netBuffer = netEnabled ? new NetBuffer(netBufferSize) : null;
52
- let closing = false;
53
- let readyForShutdown = false;
54
- let shutdownRequested = false;
55
- let closeOnce = null;
56
- let cdpStatus = { attached: false, target: null };
57
- const fileLogger = logsEnabled
58
- ? new WatcherFileLogger({
59
- watcherId,
60
- startedAt,
61
- logsDir,
62
- chrome: sourceMode === 'cdp' ? chrome : undefined,
63
- match: options.match,
64
- maxFiles,
65
- includeTimestamps,
66
- buildFilename: options.artifacts?.logs?.buildFilename,
67
- })
68
- : null;
69
- const record = {
70
- id: watcherId,
71
- host,
72
- port,
73
- pid: process.pid,
74
- cwd: process.cwd(),
75
- startedAt,
76
- updatedAt: Date.now(),
77
- match: sourceMode === 'cdp' ? options.match : undefined,
78
- chrome: sourceMode === 'cdp' ? chrome : undefined,
79
- includeTimestamps,
80
- source: sourceMode,
81
- };
82
- // Create session handle for CDP mode (used by network capture, tracing, etc.)
83
- const sessionHandle = createCdpSessionHandle();
84
- // Emulation controller (shared across CDP and extension modes)
85
- const emulationController = createEmulationController();
86
- // Throttle controller (CPU, network, cache — shared across CDP and extension modes)
87
- const throttleController = createThrottleController();
88
- const logToPageConsole = (message) => {
89
- if (pageConsoleLogging === 'none') {
90
- return;
91
- }
92
- if (!sourceHandle?.session.isAttached()) {
93
- return;
94
- }
95
- const fullMessage = `[ARGUS] ${watcherId} :: ${message}`;
96
- queueMicrotask(() => {
97
- sourceHandle?.session
98
- .sendAndWait('Runtime.evaluate', {
99
- expression: `console.log(${JSON.stringify(fullMessage)})`,
100
- silent: true,
101
- })
102
- .catch(() => { });
103
- });
104
- };
105
- validatePageIndicatorOptions(options.pageIndicator);
106
- const indicatorEnabled = options.pageIndicator?.enabled === true;
107
- let indicatorController = null;
108
- let indicatorAttachedAt = null;
109
- if (indicatorEnabled) {
110
- indicatorController = createPageIndicatorController(options.pageIndicator);
111
- }
112
- const updateCdpStatus = (status) => {
113
- const prevAttached = cdpStatus.attached;
114
- cdpStatus = status;
115
- if (status.attached && !prevAttached) {
116
- const url = status.target?.url ?? 'unknown';
117
- logToPageConsole(`attached (url=${url})`);
118
- void events.emit('cdpAttached', {
119
- ts: Date.now(),
120
- watcherId,
121
- target: status.target,
122
- });
123
- return;
124
- }
125
- if (!status.attached && prevAttached) {
126
- void events.emit('cdpDetached', {
127
- ts: Date.now(),
128
- watcherId,
129
- target: status.target,
130
- reason: status.reason ?? 'unknown',
131
- });
132
- }
133
- };
134
- const buildIndicatorInfo = (target) => ({
135
- watcherId,
136
- watcherHost: host,
137
- watcherPort: record.port,
138
- watcherPid: process.pid,
139
- targetTitle: target?.title ?? null,
140
- targetUrl: target?.url ?? null,
141
- attachedAt: indicatorAttachedAt ?? Date.now(),
142
- });
143
- const onIndicatorNavigation = (session, info) => {
144
- if (!indicatorController) {
145
- return;
146
- }
147
- indicatorController.onNavigation(session, buildIndicatorInfo({ title: null, url: info.url }));
148
- };
149
- const onIndicatorLoad = () => {
150
- indicatorController?.reinstall();
151
- };
152
- const getIndicatorSession = () => sourceHandle.pageSession ?? sourceHandle.session;
153
- const onIndicatorAttach = (session, target) => {
154
- if (!indicatorController) {
155
- return;
156
- }
157
- indicatorAttachedAt = Date.now();
158
- indicatorController.onAttach(session, {
159
- id: target.id,
160
- title: target.title,
161
- url: target.url,
162
- type: target.type ?? 'page',
163
- parentId: target.parentId ?? null,
164
- webSocketDebuggerUrl: '',
165
- }, buildIndicatorInfo({ title: target.title, url: target.url }));
166
- };
167
- const maybeInjectOnAttach = async (session, target) => {
168
- if (!options.inject?.script) {
169
- return;
170
- }
171
- if (!session.isAttached()) {
172
- return;
173
- }
174
- const trimmedScript = options.inject.script.trim();
175
- if (trimmedScript === '') {
176
- console.warn(`[Watcher] Inject script is empty for watcher ${record.id}. Skipping.`);
177
- return;
178
- }
179
- const attachedAt = Date.now();
180
- const exposeArgus = options.inject.exposeArgus ?? true;
181
- const argusPayload = exposeArgus
182
- ? {
183
- watcherId: record.id,
184
- watcherHost: record.host,
185
- watcherPort: record.port,
186
- watcherPid: record.pid,
187
- attachedAt,
188
- target: {
189
- title: target.title ?? null,
190
- url: target.url ?? null,
191
- type: target.type ?? 'page',
192
- parentId: target.parentId ?? null,
193
- },
194
- }
195
- : null;
196
- const expression = buildInjectExpression(trimmedScript, argusPayload);
197
- try {
198
- await session.sendAndWait('Page.addScriptToEvaluateOnNewDocument', { source: expression });
199
- }
200
- catch (error) {
201
- console.warn(`[Watcher] Failed to register inject script for watcher ${record.id}: ${formatError(error)}`);
202
- }
203
- try {
204
- await session.sendAndWait('Runtime.evaluate', { expression, silent: true });
205
- }
206
- catch (error) {
207
- console.warn(`[Watcher] Failed to run inject script for watcher ${record.id}: ${formatError(error)}`);
208
- }
209
- };
210
- const handleSourceLog = (event) => {
211
- buffer.add(event);
212
- fileLogger?.writeEvent(event);
213
- };
214
- const handlePageNavigation = (info) => {
215
- fileLogger?.rotate(info);
216
- onIndicatorNavigation(getIndicatorSession(), info);
217
- runtimeEditor?.reset();
218
- };
219
- const handlePageIntl = (info) => {
220
- fileLogger?.setPageIntl(info);
221
- };
222
- const handleSourceAttach = async (session, target) => {
223
- runtimeEditor?.rebind();
224
- await emulationController.onAttach(session);
225
- await throttleController.onAttach(session);
226
- await networkCapture?.onAttached();
227
- onIndicatorAttach(session, target);
228
- await maybeInjectOnAttach(session, target);
229
- };
230
- const handleTargetChanged = (session, target) => {
231
- onIndicatorAttach(session, target);
232
- };
233
- const handleSourceDetach = (reason) => {
234
- runtimeEditor?.rebind();
235
- networkCapture?.onDetached();
236
- indicatorController?.onDetach();
237
- if (reason != null) {
238
- traceRecorder.onDetached(reason);
239
- }
240
- };
241
- // Create the appropriate source based on mode
242
- let sourceHandle;
243
- let networkCapture = null;
244
- let traceRecorder;
245
- let screenshotter;
246
- let runtimeEditor;
247
- if (sourceMode === 'extension') {
248
- // Extension mode
249
- sourceHandle = createExtensionSource({
250
- events: {
251
- onLog: handleSourceLog,
252
- onStatus: updateCdpStatus,
253
- onPageNavigation: handlePageNavigation,
254
- onPageLoad: onIndicatorLoad,
255
- onPageIntl: handlePageIntl,
256
- onAttach: handleSourceAttach,
257
- onTargetChanged: handleTargetChanged,
258
- onDetach: () => {
259
- handleSourceDetach();
260
- },
261
- },
262
- watcherId,
263
- watcherHost: host,
264
- watcherPort: record.port,
265
- ignoreMatcher: ignoreMatcher ? (url) => ignoreMatcher.matches(url) : null,
266
- stripUrlPrefixes,
267
- });
268
- networkCapture = netBuffer ? createNetworkCapture({ session: sourceHandle.pageSession ?? sourceHandle.session, buffer: netBuffer }) : null;
269
- // Create trace/screenshot with proxy session
270
- traceRecorder = createTraceRecorder({ session: sourceHandle.session, artifactsDir: artifactsBaseDir });
271
- screenshotter = createScreenshotter({ session: sourceHandle.session, artifactsDir: artifactsBaseDir });
272
- runtimeEditor = createRuntimeEditor(sourceHandle.session);
273
- }
274
- else {
275
- // CDP mode
276
- networkCapture = netBuffer ? createNetworkCapture({ session: sessionHandle.session, buffer: netBuffer }) : null;
277
- traceRecorder = createTraceRecorder({ session: sessionHandle.session, artifactsDir: artifactsBaseDir });
278
- screenshotter = createScreenshotter({ session: sessionHandle.session, artifactsDir: artifactsBaseDir });
279
- runtimeEditor = createRuntimeEditor(sessionHandle.session);
280
- sourceHandle = createCdpSource({
281
- chrome,
282
- match: options.match,
283
- sessionHandle,
284
- events: {
285
- onLog: handleSourceLog,
286
- onStatus: updateCdpStatus,
287
- onPageNavigation: handlePageNavigation,
288
- onPageLoad: onIndicatorLoad,
289
- onPageIntl: handlePageIntl,
290
- onAttach: handleSourceAttach,
291
- onDetach: (reason) => {
292
- handleSourceDetach(reason);
293
- },
294
- },
295
- watcherId,
296
- ignoreMatcher: ignoreMatcher ? (url) => ignoreMatcher.matches(url) : null,
297
- stripUrlPrefixes,
298
- });
299
- }
300
- const server = await startHttpServer({
301
- host,
302
- port,
303
- buffer,
304
- netBuffer,
305
- getWatcher: () => record,
306
- getCdpStatus: () => cdpStatus,
307
- cdpSession: sourceHandle.session,
308
- traceRecorder,
309
- screenshotter,
310
- runtimeEditor,
311
- emulationController,
312
- throttleController,
313
- // Extension mode endpoints
314
- sourceHandle: sourceMode === 'extension' ? sourceHandle : undefined,
315
- onRequest: (event) => {
316
- if (pageConsoleLogging === 'full') {
317
- logToPageConsole(`http ${event.endpoint}`);
318
- }
319
- void events.emit('httpRequested', {
320
- ...event,
321
- watcherId,
322
- });
323
- },
324
- onShutdown: () => {
325
- if (!readyForShutdown || !closeOnce) {
326
- shutdownRequested = true;
327
- return;
328
- }
329
- void closeOnce();
330
- },
331
- });
332
- record.port = server.port;
333
- sourceHandle.syncWatcherInfo?.({
334
- watcherId,
335
- watcherHost: host,
336
- watcherPort: record.port,
337
- watcherPid: process.pid,
338
- });
339
- await announceWatcher(record);
340
- const heartbeat = startRegistryHeartbeat(() => record, options.heartbeatMs ?? 15_000);
341
- closeOnce = async () => {
342
- if (closing) {
343
- return;
344
- }
345
- closing = true;
346
- heartbeat.stop();
347
- indicatorController?.stop();
348
- if (cdpStatus.attached) {
349
- logToPageConsole('detached (reason=watcher_stopped)');
350
- }
351
- await sourceHandle.stop();
352
- await fileLogger?.close();
353
- traceRecorder.onDetached('watcher_stopped');
354
- await server.close();
355
- await removeWatcher(record.id);
356
- events.clearListeners();
357
- };
358
- readyForShutdown = true;
359
- if (shutdownRequested) {
360
- void closeOnce();
361
- }
362
- return {
363
- watcher: record,
364
- events,
365
- close: async () => {
366
- await closeOnce?.();
367
- },
368
- };
369
- };
370
- const resolveArtifactsBaseDir = (base, watcherId) => {
371
- if (base !== undefined && base !== null) {
372
- if (typeof base !== 'string' || base.trim() === '') {
373
- throw new Error('artifacts.base must be a non-empty string when provided');
374
- }
375
- return path.resolve(base);
376
- }
377
- return path.join(os.tmpdir(), 'argus', watcherId);
378
- };
379
- const resolveMaxFiles = (maxFiles) => {
380
- if (maxFiles === undefined) {
381
- return 5;
382
- }
383
- if (!Number.isInteger(maxFiles) || maxFiles < 1) {
384
- throw new Error('artifacts.logs.maxFiles must be an integer >= 1');
385
- }
386
- return maxFiles;
387
- };
388
- const buildInjectExpression = (script, argusPayload) => {
389
- const lines = ['(() => {'];
390
- if (argusPayload) {
391
- lines.push(`window.__ARGUS__ = ${JSON.stringify(argusPayload)};`);
392
- }
393
- lines.push(`const __argusScript = ${JSON.stringify(script)};`);
394
- lines.push('const __argusFn = new Function(__argusScript);');
395
- lines.push('__argusFn();');
396
- lines.push('})();');
397
- return lines.join('\n');
398
- };
399
- const formatError = (error) => {
400
- if (!error) {
401
- return 'Unknown error';
402
- }
403
- if (error instanceof Error) {
404
- return error.message;
405
- }
406
- return String(error);
14
+ return createWatcherHandle(options, watcherId);
407
15
  };
408
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AACvH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EACN,6BAA6B,EAC7B,4BAA4B,GAG5B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;A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AAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,KAAc,EAAU,EAAE;IAC9C,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,eAAe,CAAA;IACvB,CAAC;IACD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,OAAO,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACrB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AA6J9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,OAA4B,EAA0B,EAAE;IAC1F,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC1D,OAAO,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;AAC/C,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { ExtensionSession } from '../native-messaging/session-manager.js';
2
+ import type { CdpSessionHandle, CdpTargetContext } from '../cdp/connection.js';
3
+ export type DelegatingSessionController = {
4
+ rebind: () => void;
5
+ dispose: () => void;
6
+ };
7
+ type CreateDelegatingSessionOptions = {
8
+ getCurrentSession: () => ExtensionSession | null;
9
+ requireCurrentSession: () => ExtensionSession;
10
+ getTargetContext: () => CdpTargetContext;
11
+ mapParams?: (method: string, params?: Record<string, unknown>) => Record<string, unknown> | undefined;
12
+ };
13
+ /**
14
+ * Keep a stable session handle while the underlying extension tab attachment changes over time.
15
+ */
16
+ export declare const createDelegatingSession: (options: CreateDelegatingSessionOptions) => {
17
+ session: CdpSessionHandle;
18
+ controller: DelegatingSessionController;
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=extension-delegating-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-delegating-session.d.ts","sourceRoot":"","sources":["../../src/sources/extension-delegating-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAS9E,MAAM,MAAM,2BAA2B,GAAG;IACzC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,KAAK,8BAA8B,GAAG;IACrC,iBAAiB,EAAE,MAAM,gBAAgB,GAAG,IAAI,CAAA;IAChD,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;IAC7C,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;IACxC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CACrG,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,GACnC,SAAS,8BAA8B,KACrC;IAAE,OAAO,EAAE,gBAAgB,CAAC;IAAC,UAAU,EAAE,2BAA2B,CAAA;CAsDtE,CAAA"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Keep a stable session handle while the underlying extension tab attachment changes over time.
3
+ */
4
+ export const createDelegatingSession = (options) => {
5
+ const subscriptions = new Set();
6
+ const rebindSubscriptions = () => {
7
+ // Delegating sessions are created before a tab may be attached, so event listeners
8
+ // must follow the active extension session instead of binding once and going stale.
9
+ for (const subscription of subscriptions) {
10
+ subscription.unbind();
11
+ const currentSession = options.getCurrentSession();
12
+ if (!currentSession) {
13
+ continue;
14
+ }
15
+ subscription.off = currentSession.handle.onEvent(subscription.method, subscription.handler);
16
+ }
17
+ };
18
+ const disposeSubscriptions = () => {
19
+ for (const subscription of subscriptions) {
20
+ subscription.unbind();
21
+ }
22
+ subscriptions.clear();
23
+ };
24
+ const controller = {
25
+ rebind: rebindSubscriptions,
26
+ dispose: disposeSubscriptions,
27
+ };
28
+ const session = {
29
+ isAttached: () => options.getCurrentSession()?.handle.isAttached() ?? false,
30
+ sendAndWait: async (method, params, commandOptions) => {
31
+ const currentSession = options.requireCurrentSession();
32
+ const targetContext = options.getTargetContext();
33
+ const nextParams = options.mapParams ? options.mapParams(method, params) : params;
34
+ const nextOptions = targetContext.kind === 'frame' && targetContext.sessionId
35
+ ? { ...(commandOptions ?? {}), sessionId: targetContext.sessionId }
36
+ : commandOptions;
37
+ return currentSession.handle.sendAndWait(method, nextParams, nextOptions);
38
+ },
39
+ onEvent: (method, handler) => {
40
+ const subscription = createDelegatingEventSubscription(method, handler);
41
+ subscriptions.add(subscription);
42
+ controller.rebind();
43
+ return () => {
44
+ subscription.unbind();
45
+ subscriptions.delete(subscription);
46
+ };
47
+ },
48
+ getTargetContext: options.getTargetContext,
49
+ };
50
+ controller.rebind();
51
+ return { session, controller };
52
+ };
53
+ const createDelegatingEventSubscription = (method, handler) => ({
54
+ method,
55
+ handler,
56
+ off: null,
57
+ unbind() {
58
+ this.off?.();
59
+ this.off = null;
60
+ },
61
+ });
62
+ //# sourceMappingURL=extension-delegating-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-delegating-session.js","sourceRoot":"","sources":["../../src/sources/extension-delegating-session.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACtC,OAAuC,EACkC,EAAE;IAC3E,MAAM,aAAa,GAAG,IAAI,G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,aAAa,CAAC,SAAS;gBACxD,CAAC,CAAC,EAAE,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE;gBACnE,CAAC,CAAC,cAAc,CAAA;YAClB,OAAO,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAA;QAC1E,CAAC;QACD,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;YAC5B,MAAM,YAAY,GAAG,iCAAiC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;YACvE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;YAC/B,UAAU,CAAC,MAAM,EAAE,CAAA;YAEnB,OAAO,GAAG,EAAE;gBACX,YAAY,CAAC,MAAM,EAAE,CAAA;gBACrB,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;YACnC,CAAC,CAAA;QACF,CAAC;QACD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC1C,CAAA;IAED,UAAU,CAAC,MAAM,EAAE,CAAA;IACnB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,iCAAiC,GAAG,CAAC,MAAc,EAAE,OAAmD,EAA+B,EAAE,CAAC,CAAC;IAChJ,MAAM;IACN,OAAO;IACP,GAAG,EAAE,IAAI;IACT,MAAM;QACL,IAAI,CAAC,GAAG,EAAE,EAAE,CAAA;QACZ,IAAI,CAAC,GAAG,GAAG,IAAI,CAAA;IAChB,CAAC;CACD,CAAC,CAAA"}
@@ -8,6 +8,9 @@ type SessionSummary = {
8
8
  export type ExtensionFrameState = {
9
9
  topFrameId: string | null;
10
10
  requestedFrameId: string | null;
11
+ requestedFrameHint: RequestedFrameHint | null;
12
+ /** True once an active iframe disappears and we should report the page while waiting to rematch it safely. */
13
+ requestedFrameDetached: boolean;
11
14
  activeFrameId: string | null;
12
15
  activeAttachedAt: number | null;
13
16
  frames: Map<string, ExtensionFrame>;
@@ -21,6 +24,23 @@ export type ExtensionFrame = {
21
24
  title: string | null;
22
25
  sessionId: string | null;
23
26
  };
27
+ export type RequestedFrameHint = {
28
+ /**
29
+ * Exact iframe URL at the moment the user selected it.
30
+ * We intentionally fail closed if the next frame does not report the same URL,
31
+ * because rematching the wrong sibling iframe is worse than requiring a reselect.
32
+ */
33
+ url: string | null;
34
+ title: string | null;
35
+ };
36
+ export type RequestedTargetResolution = {
37
+ kind: 'page';
38
+ } | {
39
+ kind: 'pending';
40
+ } | {
41
+ kind: 'frame';
42
+ frameId: string;
43
+ };
24
44
  export type CdpFrameTreeNode = {
25
45
  frame?: {
26
46
  id?: string;
@@ -54,11 +74,18 @@ export declare const parseExecutionContext: (params: unknown) => {
54
74
  frameId: string | null;
55
75
  isDefault: boolean;
56
76
  } | null;
77
+ export declare const createRequestedFrameHint: (frame: ExtensionFrame | null | undefined) => RequestedFrameHint | null;
57
78
  /**
58
79
  * Selection is about the user's intended target, not whether every frame-scoped command is ready.
59
80
  * Once the watcher knows the frame exists we can switch the active target; commands that require
60
81
  * an execution context still guard that separately at execution time.
61
82
  */
62
- export declare const resolveRequestedFrameId: (state: ExtensionFrameState, requestedFrameId: string | null) => string | null;
83
+ export declare const resolveRequestedFrameId: (state: ExtensionFrameState, requestedFrameId: string | null, requestedFrameHint: RequestedFrameHint | null) => string | null;
84
+ /**
85
+ * Pending iframe selections have two valid states:
86
+ * - `pending`: the iframe has never become active in this attachment yet, so keep waiting silently.
87
+ * - `page`: the iframe was active and then disappeared, so report the page while we wait for a safe rematch.
88
+ */
89
+ export declare const resolveRequestedTarget: (state: ExtensionFrameState) => RequestedTargetResolution;
63
90
  export {};
64
91
  //# sourceMappingURL=extension-frame-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extension-frame-state.d.ts","sourceRoot":"","sources":["../../src/sources/extension-frame-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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