@ulpi/browse 2.3.3 → 2.4.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/README.md +8 -2
- package/dist/browse.cjs +3445 -1636
- package/dist/lib.mjs +29504 -0
- package/dist/types/a11y.d.ts +32 -0
- package/dist/types/a11y.d.ts.map +1 -0
- package/dist/types/app/android/bridge.d.ts +41 -0
- package/dist/types/app/android/bridge.d.ts.map +1 -0
- package/dist/types/app/android/emulator.d.ts +32 -0
- package/dist/types/app/android/emulator.d.ts.map +1 -0
- package/dist/types/app/android/manager.d.ts +62 -0
- package/dist/types/app/android/manager.d.ts.map +1 -0
- package/dist/types/app/android/protocol.d.ts +162 -0
- package/dist/types/app/android/protocol.d.ts.map +1 -0
- package/dist/types/app/android/sim-service.d.ts +33 -0
- package/dist/types/app/android/sim-service.d.ts.map +1 -0
- package/dist/types/app/index.d.ts +15 -0
- package/dist/types/app/index.d.ts.map +1 -0
- package/dist/types/app/ios/bridge.d.ts +53 -0
- package/dist/types/app/ios/bridge.d.ts.map +1 -0
- package/dist/types/app/ios/controller.d.ts +131 -0
- package/dist/types/app/ios/controller.d.ts.map +1 -0
- package/dist/types/app/ios/manager.d.ts +96 -0
- package/dist/types/app/ios/manager.d.ts.map +1 -0
- package/dist/types/app/ios/protocol.d.ts +122 -0
- package/dist/types/app/ios/protocol.d.ts.map +1 -0
- package/dist/types/app/ios/sim-service.d.ts +37 -0
- package/dist/types/app/ios/sim-service.d.ts.map +1 -0
- package/dist/types/app/macos/bridge.d.ts +22 -0
- package/dist/types/app/macos/bridge.d.ts.map +1 -0
- package/dist/types/app/manager.d.ts +50 -0
- package/dist/types/app/manager.d.ts.map +1 -0
- package/dist/types/app/normalize.d.ts +27 -0
- package/dist/types/app/normalize.d.ts.map +1 -0
- package/dist/types/app/resolve-app.d.ts +31 -0
- package/dist/types/app/resolve-app.d.ts.map +1 -0
- package/dist/types/app/types.d.ts +77 -0
- package/dist/types/app/types.d.ts.map +1 -0
- package/dist/types/automation/action-context.d.ts +110 -0
- package/dist/types/automation/action-context.d.ts.map +1 -0
- package/dist/types/automation/command.d.ts +138 -0
- package/dist/types/automation/command.d.ts.map +1 -0
- package/dist/types/automation/events.d.ts +72 -0
- package/dist/types/automation/events.d.ts.map +1 -0
- package/dist/types/automation/executor.d.ts +39 -0
- package/dist/types/automation/executor.d.ts.map +1 -0
- package/dist/types/automation/index.d.ts +11 -0
- package/dist/types/automation/index.d.ts.map +1 -0
- package/dist/types/automation/registry.d.ts +38 -0
- package/dist/types/automation/registry.d.ts.map +1 -0
- package/dist/types/automation/rules.d.ts +52 -0
- package/dist/types/automation/rules.d.ts.map +1 -0
- package/dist/types/automation/target.d.ts +76 -0
- package/dist/types/automation/target.d.ts.map +1 -0
- package/dist/types/browser/consent.d.ts +13 -0
- package/dist/types/browser/consent.d.ts.map +1 -0
- package/dist/types/browser/cookie-import.d.ts +94 -0
- package/dist/types/browser/cookie-import.d.ts.map +1 -0
- package/dist/types/browser/detection.d.ts +22 -0
- package/dist/types/browser/detection.d.ts.map +1 -0
- package/dist/types/browser/emulation.d.ts +30 -0
- package/dist/types/browser/emulation.d.ts.map +1 -0
- package/dist/types/browser/events.d.ts +19 -0
- package/dist/types/browser/events.d.ts.map +1 -0
- package/dist/types/browser/index.d.ts +17 -0
- package/dist/types/browser/index.d.ts.map +1 -0
- package/dist/types/browser/macros.d.ts +9 -0
- package/dist/types/browser/macros.d.ts.map +1 -0
- package/dist/types/browser/manager.d.ts +272 -0
- package/dist/types/browser/manager.d.ts.map +1 -0
- package/dist/types/browser/png-compare.d.ts +36 -0
- package/dist/types/browser/png-compare.d.ts.map +1 -0
- package/dist/types/browser/profiles.d.ts +29 -0
- package/dist/types/browser/profiles.d.ts.map +1 -0
- package/dist/types/browser/react-devtools.d.ts +75 -0
- package/dist/types/browser/react-devtools.d.ts.map +1 -0
- package/dist/types/browser/readiness.d.ts +19 -0
- package/dist/types/browser/readiness.d.ts.map +1 -0
- package/dist/types/browser/refs.d.ts +70 -0
- package/dist/types/browser/refs.d.ts.map +1 -0
- package/dist/types/browser/serp.d.ts +16 -0
- package/dist/types/browser/serp.d.ts.map +1 -0
- package/dist/types/browser/snapshot-window.d.ts +31 -0
- package/dist/types/browser/snapshot-window.d.ts.map +1 -0
- package/dist/types/browser/snapshot.d.ts +41 -0
- package/dist/types/browser/snapshot.d.ts.map +1 -0
- package/dist/types/browser/tabs.d.ts +67 -0
- package/dist/types/browser/tabs.d.ts.map +1 -0
- package/dist/types/browser/target.d.ts +106 -0
- package/dist/types/browser/target.d.ts.map +1 -0
- package/dist/types/browser/youtube.d.ts +26 -0
- package/dist/types/browser/youtube.d.ts.map +1 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cloud/auth.d.ts +80 -0
- package/dist/types/cloud/auth.d.ts.map +1 -0
- package/dist/types/cloud/docker.d.ts +76 -0
- package/dist/types/cloud/docker.d.ts.map +1 -0
- package/dist/types/cloud/firecracker.d.ts +142 -0
- package/dist/types/cloud/firecracker.d.ts.map +1 -0
- package/dist/types/cloud/golden-snapshot.d.ts +122 -0
- package/dist/types/cloud/golden-snapshot.d.ts.map +1 -0
- package/dist/types/cloud/index.d.ts +26 -0
- package/dist/types/cloud/index.d.ts.map +1 -0
- package/dist/types/cloud/orchestrator-interface.d.ts +63 -0
- package/dist/types/cloud/orchestrator-interface.d.ts.map +1 -0
- package/dist/types/cloud/orchestrator.d.ts +58 -0
- package/dist/types/cloud/orchestrator.d.ts.map +1 -0
- package/dist/types/cloud/proxy.d.ts +34 -0
- package/dist/types/cloud/proxy.d.ts.map +1 -0
- package/dist/types/cloud/reaper.d.ts +49 -0
- package/dist/types/cloud/reaper.d.ts.map +1 -0
- package/dist/types/cloud/server.d.ts +19 -0
- package/dist/types/cloud/server.d.ts.map +1 -0
- package/dist/types/cloud/sessions.d.ts +85 -0
- package/dist/types/cloud/sessions.d.ts.map +1 -0
- package/dist/types/cloud/vm-orchestrator.d.ts +133 -0
- package/dist/types/cloud/vm-orchestrator.d.ts.map +1 -0
- package/dist/types/cloud/vm-warm-pool.d.ts +104 -0
- package/dist/types/cloud/vm-warm-pool.d.ts.map +1 -0
- package/dist/types/cloud/warm-pool.d.ts +85 -0
- package/dist/types/cloud/warm-pool.d.ts.map +1 -0
- package/dist/types/cloud/ws.d.ts +61 -0
- package/dist/types/cloud/ws.d.ts.map +1 -0
- package/dist/types/commands/meta/auth.d.ts +6 -0
- package/dist/types/commands/meta/auth.d.ts.map +1 -0
- package/dist/types/commands/meta/flows.d.ts +15 -0
- package/dist/types/commands/meta/flows.d.ts.map +1 -0
- package/dist/types/commands/meta/index.d.ts +14 -0
- package/dist/types/commands/meta/index.d.ts.map +1 -0
- package/dist/types/commands/meta/inspection.d.ts +7 -0
- package/dist/types/commands/meta/inspection.d.ts.map +1 -0
- package/dist/types/commands/meta/profile.d.ts +11 -0
- package/dist/types/commands/meta/profile.d.ts.map +1 -0
- package/dist/types/commands/meta/recording.d.ts +7 -0
- package/dist/types/commands/meta/recording.d.ts.map +1 -0
- package/dist/types/commands/meta/screenshots.d.ts +7 -0
- package/dist/types/commands/meta/screenshots.d.ts.map +1 -0
- package/dist/types/commands/meta/sessions.d.ts +7 -0
- package/dist/types/commands/meta/sessions.d.ts.map +1 -0
- package/dist/types/commands/meta/sim.d.ts +10 -0
- package/dist/types/commands/meta/sim.d.ts.map +1 -0
- package/dist/types/commands/meta/system.d.ts +8 -0
- package/dist/types/commands/meta/system.d.ts.map +1 -0
- package/dist/types/commands/meta/tabs.d.ts +6 -0
- package/dist/types/commands/meta/tabs.d.ts.map +1 -0
- package/dist/types/commands/meta/youtube.d.ts +7 -0
- package/dist/types/commands/meta/youtube.d.ts.map +1 -0
- package/dist/types/commands/read.d.ts +16 -0
- package/dist/types/commands/read.d.ts.map +1 -0
- package/dist/types/commands/write.d.ts +17 -0
- package/dist/types/commands/write.d.ts.map +1 -0
- package/dist/types/config.d.ts +101 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/constants.d.ts +36 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/detection/frameworks.d.ts +27 -0
- package/dist/types/detection/frameworks.d.ts.map +1 -0
- package/dist/types/detection/index.d.ts +64 -0
- package/dist/types/detection/index.d.ts.map +1 -0
- package/dist/types/detection/infrastructure.d.ts +82 -0
- package/dist/types/detection/infrastructure.d.ts.map +1 -0
- package/dist/types/detection/saas.d.ts +39 -0
- package/dist/types/detection/saas.d.ts.map +1 -0
- package/dist/types/enable.d.ts +10 -0
- package/dist/types/enable.d.ts.map +1 -0
- package/dist/types/engine/chrome.d.ts +45 -0
- package/dist/types/engine/chrome.d.ts.map +1 -0
- package/dist/types/engine/index.d.ts +9 -0
- package/dist/types/engine/index.d.ts.map +1 -0
- package/dist/types/engine/providers.d.ts +36 -0
- package/dist/types/engine/providers.d.ts.map +1 -0
- package/dist/types/engine/resolver.d.ts +36 -0
- package/dist/types/engine/resolver.d.ts.map +1 -0
- package/dist/types/expect.d.ts +68 -0
- package/dist/types/expect.d.ts.map +1 -0
- package/dist/types/export/index.d.ts +8 -0
- package/dist/types/export/index.d.ts.map +1 -0
- package/dist/types/export/record.d.ts +28 -0
- package/dist/types/export/record.d.ts.map +1 -0
- package/dist/types/export/replay.d.ts +9 -0
- package/dist/types/export/replay.d.ts.map +1 -0
- package/dist/types/flow-parser.d.ts +32 -0
- package/dist/types/flow-parser.d.ts.map +1 -0
- package/dist/types/install-skill.d.ts +8 -0
- package/dist/types/install-skill.d.ts.map +1 -0
- package/dist/types/lib.d.ts +27 -0
- package/dist/types/lib.d.ts.map +1 -0
- package/dist/types/mcp/index.d.ts +10 -0
- package/dist/types/mcp/index.d.ts.map +1 -0
- package/dist/types/mcp/server.d.ts +9 -0
- package/dist/types/mcp/server.d.ts.map +1 -0
- package/dist/types/mcp/tools/index.d.ts +36 -0
- package/dist/types/mcp/tools/index.d.ts.map +1 -0
- package/dist/types/network/buffers.d.ts +53 -0
- package/dist/types/network/buffers.d.ts.map +1 -0
- package/dist/types/network/har.d.ts +10 -0
- package/dist/types/network/har.d.ts.map +1 -0
- package/dist/types/network/index.d.ts +6 -0
- package/dist/types/network/index.d.ts.map +1 -0
- package/dist/types/perf-audit/diff.d.ts +43 -0
- package/dist/types/perf-audit/diff.d.ts.map +1 -0
- package/dist/types/perf-audit/dom-analysis.d.ts +74 -0
- package/dist/types/perf-audit/dom-analysis.d.ts.map +1 -0
- package/dist/types/perf-audit/formatter.d.ts +34 -0
- package/dist/types/perf-audit/formatter.d.ts.map +1 -0
- package/dist/types/perf-audit/index.d.ts +128 -0
- package/dist/types/perf-audit/index.d.ts.map +1 -0
- package/dist/types/perf-audit/persist.d.ts +40 -0
- package/dist/types/perf-audit/persist.d.ts.map +1 -0
- package/dist/types/perf-audit/recommendations.d.ts +18 -0
- package/dist/types/perf-audit/recommendations.d.ts.map +1 -0
- package/dist/types/perf-audit/resource-analyzer.d.ts +46 -0
- package/dist/types/perf-audit/resource-analyzer.d.ts.map +1 -0
- package/dist/types/perf-audit/web-vitals.d.ts +73 -0
- package/dist/types/perf-audit/web-vitals.d.ts.map +1 -0
- package/dist/types/proxy/index.d.ts +6 -0
- package/dist/types/proxy/index.d.ts.map +1 -0
- package/dist/types/proxy/pool.d.ts +44 -0
- package/dist/types/proxy/pool.d.ts.map +1 -0
- package/dist/types/proxy/providers.d.ts +32 -0
- package/dist/types/proxy/providers.d.ts.map +1 -0
- package/dist/types/sdk/client.d.ts +37 -0
- package/dist/types/sdk/client.d.ts.map +1 -0
- package/dist/types/sdk/index.d.ts +17 -0
- package/dist/types/sdk/index.d.ts.map +1 -0
- package/dist/types/sdk/session.d.ts +95 -0
- package/dist/types/sdk/session.d.ts.map +1 -0
- package/dist/types/sdk/transports/cloud.d.ts +89 -0
- package/dist/types/sdk/transports/cloud.d.ts.map +1 -0
- package/dist/types/sdk/transports/index.d.ts +3 -0
- package/dist/types/sdk/transports/index.d.ts.map +1 -0
- package/dist/types/sdk/transports/local.d.ts +56 -0
- package/dist/types/sdk/transports/local.d.ts.map +1 -0
- package/dist/types/sdk.d.ts +35 -0
- package/dist/types/sdk.d.ts.map +1 -0
- package/dist/types/security/auth-vault.d.ts +32 -0
- package/dist/types/security/auth-vault.d.ts.map +1 -0
- package/dist/types/security/domain-filter.d.ts +31 -0
- package/dist/types/security/domain-filter.d.ts.map +1 -0
- package/dist/types/security/index.d.ts +10 -0
- package/dist/types/security/index.d.ts.map +1 -0
- package/dist/types/security/policy.d.ts +20 -0
- package/dist/types/security/policy.d.ts.map +1 -0
- package/dist/types/security/sanitize.d.ts +6 -0
- package/dist/types/security/sanitize.d.ts.map +1 -0
- package/dist/types/server.d.ts +13 -0
- package/dist/types/server.d.ts.map +1 -0
- package/dist/types/session/concurrency.d.ts +28 -0
- package/dist/types/session/concurrency.d.ts.map +1 -0
- package/dist/types/session/encryption.d.ts +8 -0
- package/dist/types/session/encryption.d.ts.map +1 -0
- package/dist/types/session/index.d.ts +7 -0
- package/dist/types/session/index.d.ts.map +1 -0
- package/dist/types/session/manager.d.ts +110 -0
- package/dist/types/session/manager.d.ts.map +1 -0
- package/dist/types/session/persist.d.ts +87 -0
- package/dist/types/session/persist.d.ts.map +1 -0
- package/dist/types/session/tab-lock.d.ts +26 -0
- package/dist/types/session/tab-lock.d.ts.map +1 -0
- package/dist/types/session/target-factory.d.ts +88 -0
- package/dist/types/session/target-factory.d.ts.map +1 -0
- package/dist/types/sim-cli.d.ts +8 -0
- package/dist/types/sim-cli.d.ts.map +1 -0
- package/dist/types/types.d.ts +45 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/visual.d.ts +79 -0
- package/dist/types/visual.d.ts.map +1 -0
- package/package.json +22 -3
- package/skill/browse/SKILL.md +286 -0
- package/skill/{references → browse/references}/commands.md +203 -18
- package/skill/browse-aeo/SKILL.md +148 -0
- package/skill/browse-config/SKILL.md +200 -0
- package/skill/browse-geo/SKILL.md +225 -0
- package/skill/browse-qa/SKILL.md +143 -0
- package/skill/browse-seo/SKILL.md +188 -0
- package/skill/browse-stealth/SKILL.md +246 -0
- package/skill/SKILL.md +0 -496
- /package/skill/{references → browse/references}/guides.md +0 -0
- /package/skill/{references → browse/references}/permissions.md +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VM warm pool — pre-cloned paused VMs ready for near-instant claiming.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the container warm pool (which pre-starts containers and waits
|
|
5
|
+
* for health checks), the VM warm pool clones from the golden snapshot
|
|
6
|
+
* and immediately pauses the VMs. Claiming a VM is just a resume call
|
|
7
|
+
* — sub-100ms startup.
|
|
8
|
+
*
|
|
9
|
+
* Pool lifecycle:
|
|
10
|
+
* 1. startReplenishing() fills the pool to targetSize and keeps it full
|
|
11
|
+
* 2. claim() takes a paused VM from the pool (FIFO)
|
|
12
|
+
* 3. replenish() runs periodically and on-demand when pool drops below 50%
|
|
13
|
+
* 4. drain() stops all paused VMs and clears the pool
|
|
14
|
+
*
|
|
15
|
+
* Paused VMs consume memory but no CPU — much cheaper than running containers.
|
|
16
|
+
* The golden snapshot must be built before the pool can fill.
|
|
17
|
+
*
|
|
18
|
+
* All clones share the same auth token from the golden snapshot build.
|
|
19
|
+
* The caller (VmOrchestrator) is responsible for resuming the VM,
|
|
20
|
+
* setting up networking, and running health checks.
|
|
21
|
+
*/
|
|
22
|
+
import { FirecrackerClient } from './firecracker';
|
|
23
|
+
import { GoldenSnapshotManager } from './golden-snapshot';
|
|
24
|
+
export interface VmWarmPoolOptions {
|
|
25
|
+
/** Firecracker client */
|
|
26
|
+
firecracker: FirecrackerClient;
|
|
27
|
+
/** Golden snapshot manager (must be ready before pool can fill) */
|
|
28
|
+
golden: GoldenSnapshotManager;
|
|
29
|
+
/** Target pool size (default 10 -- VMs are cheap to hold paused) */
|
|
30
|
+
targetSize?: number;
|
|
31
|
+
/** Replenish check interval in ms (default 30000) */
|
|
32
|
+
replenishInterval?: number;
|
|
33
|
+
/** Browse server port in the VM (default 9400) */
|
|
34
|
+
browsePort?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface VmPoolEntry {
|
|
37
|
+
/** Firecracker VM ID */
|
|
38
|
+
vmId: string;
|
|
39
|
+
/** Auth token (set during golden build, same for all clones) */
|
|
40
|
+
token: string;
|
|
41
|
+
/** When this clone was created */
|
|
42
|
+
createdAt: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class VmWarmPool {
|
|
45
|
+
private firecracker;
|
|
46
|
+
private golden;
|
|
47
|
+
private targetSize;
|
|
48
|
+
private replenishInterval;
|
|
49
|
+
private browsePort;
|
|
50
|
+
private pool;
|
|
51
|
+
private replenishTimer;
|
|
52
|
+
private isReplenishing;
|
|
53
|
+
constructor(opts: VmWarmPoolOptions);
|
|
54
|
+
/**
|
|
55
|
+
* Claim a pre-cloned paused VM from the pool.
|
|
56
|
+
* Returns VM info or null if the pool is empty.
|
|
57
|
+
* Triggers background replenish if pool drops below 50% of target.
|
|
58
|
+
*
|
|
59
|
+
* The caller is responsible for:
|
|
60
|
+
* - Setting up the tap device / network for the VM
|
|
61
|
+
* - Resuming the VM via firecracker.resumeVm()
|
|
62
|
+
* - Waiting for the browse server health check
|
|
63
|
+
*/
|
|
64
|
+
claim(): VmPoolEntry | null;
|
|
65
|
+
/**
|
|
66
|
+
* Replenish the pool to target size.
|
|
67
|
+
* Clones VMs from the golden snapshot in parallel.
|
|
68
|
+
* Each clone is paused immediately after creation to save CPU.
|
|
69
|
+
*
|
|
70
|
+
* Skips if:
|
|
71
|
+
* - Already replenishing (guard against concurrent runs)
|
|
72
|
+
* - Golden snapshot is not ready
|
|
73
|
+
* - Pool is already at target size
|
|
74
|
+
*/
|
|
75
|
+
replenish(): Promise<void>;
|
|
76
|
+
/** Current number of paused VMs ready in the pool. */
|
|
77
|
+
size(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Drain the pool -- stop all paused VMs and clear the pool.
|
|
80
|
+
* Clears the replenish timer. All operations are best-effort.
|
|
81
|
+
*/
|
|
82
|
+
drain(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Start the periodic replenish timer.
|
|
85
|
+
* If the golden snapshot is not ready, logs a warning and returns
|
|
86
|
+
* without starting. Can be called again later when golden is ready.
|
|
87
|
+
* Fills the pool immediately on first successful call.
|
|
88
|
+
*/
|
|
89
|
+
startReplenishing(): void;
|
|
90
|
+
/** Stop the periodic replenish timer. */
|
|
91
|
+
stopReplenishing(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Create a single pool VM: clone from golden snapshot, then pause.
|
|
94
|
+
*
|
|
95
|
+
* golden.clone() calls restoreVm() which spawns a Firecracker process,
|
|
96
|
+
* loads the snapshot, and resumes the VM. We immediately pause it so
|
|
97
|
+
* it consumes memory but no CPU while waiting to be claimed.
|
|
98
|
+
*
|
|
99
|
+
* The auth token is shared across all clones since they all inherit
|
|
100
|
+
* the same browse server state from the golden snapshot.
|
|
101
|
+
*/
|
|
102
|
+
private createPoolVm;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=vm-warm-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm-warm-pool.d.ts","sourceRoot":"","sources":["../../../src/cloud/vm-warm-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAW1D,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,mEAAmE;IACnE,MAAM,EAAE,qBAAqB,CAAC;IAC9B,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,cAAc,CAAS;gBAEnB,IAAI,EAAE,iBAAiB;IAUnC;;;;;;;;;OASG;IACH,KAAK,IAAI,WAAW,GAAG,IAAI;IAkB3B;;;;;;;;;OASG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAiDhC,sDAAsD;IACtD,IAAI,IAAI,MAAM;IAId;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB5B;;;;;OAKG;IACH,iBAAiB,IAAI,IAAI;IA6BzB,yCAAyC;IACzC,gBAAgB,IAAI,IAAI;IASxB;;;;;;;;;OASG;YACW,YAAY;CAmB3B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warm container pool — pre-started containers ready for instant claiming.
|
|
3
|
+
*
|
|
4
|
+
* Maintains a pool of Docker containers that have already been started
|
|
5
|
+
* and passed health checks. When a session is provisioned, the orchestrator
|
|
6
|
+
* can claim a container from the pool instead of creating one from scratch,
|
|
7
|
+
* reducing session startup latency from ~5s to near-zero.
|
|
8
|
+
*
|
|
9
|
+
* Pool lifecycle:
|
|
10
|
+
* 1. startReplenishing() fills the pool to targetSize and keeps it full
|
|
11
|
+
* 2. claim() takes a container from the pool (FIFO)
|
|
12
|
+
* 3. replenish() runs periodically and on-demand when pool drops below 50%
|
|
13
|
+
* 4. drain() stops all pool containers and clears the pool
|
|
14
|
+
*
|
|
15
|
+
* Pool containers use a longer idle timeout (10 min) than session containers
|
|
16
|
+
* (5 min) to allow more time before self-exit while waiting to be claimed.
|
|
17
|
+
*/
|
|
18
|
+
import { DockerClient } from './docker';
|
|
19
|
+
export interface WarmPoolOptions {
|
|
20
|
+
/** Docker client instance */
|
|
21
|
+
docker: DockerClient;
|
|
22
|
+
/** Docker image name */
|
|
23
|
+
imageName: string;
|
|
24
|
+
/** Target pool size (default 5) */
|
|
25
|
+
targetSize?: number;
|
|
26
|
+
/** Replenish interval in ms (default 30000) */
|
|
27
|
+
replenishInterval?: number;
|
|
28
|
+
/** Memory limit per container in bytes (default 512MB) */
|
|
29
|
+
memoryLimit?: number;
|
|
30
|
+
/** CPU limit in nanoCPUs (default 500000000) */
|
|
31
|
+
cpuLimit?: number;
|
|
32
|
+
/** Health check timeout in ms (default 30000) */
|
|
33
|
+
healthTimeout?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PoolEntry {
|
|
36
|
+
containerId: string;
|
|
37
|
+
internalAddress: string;
|
|
38
|
+
token: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
}
|
|
41
|
+
export declare class WarmPool {
|
|
42
|
+
private docker;
|
|
43
|
+
private imageName;
|
|
44
|
+
private targetSize;
|
|
45
|
+
private replenishInterval;
|
|
46
|
+
private memoryLimit;
|
|
47
|
+
private cpuLimit;
|
|
48
|
+
private healthTimeout;
|
|
49
|
+
private pool;
|
|
50
|
+
private replenishTimer;
|
|
51
|
+
private isReplenishing;
|
|
52
|
+
constructor(opts: WarmPoolOptions);
|
|
53
|
+
/**
|
|
54
|
+
* Claim a pre-started container from the pool.
|
|
55
|
+
* Returns container info or null if the pool is empty.
|
|
56
|
+
* Triggers background replenish if pool drops below 50% of target.
|
|
57
|
+
*/
|
|
58
|
+
claim(): PoolEntry | null;
|
|
59
|
+
/**
|
|
60
|
+
* Replenish the pool to target size.
|
|
61
|
+
* Creates containers in parallel. Failures are logged but not thrown.
|
|
62
|
+
* Skips if already replenishing (guard against concurrent runs).
|
|
63
|
+
*/
|
|
64
|
+
replenish(): Promise<void>;
|
|
65
|
+
/** Current number of ready containers in the pool. */
|
|
66
|
+
size(): number;
|
|
67
|
+
/**
|
|
68
|
+
* Drain the pool — stop and remove all pool containers.
|
|
69
|
+
* Clears the replenish timer. Best-effort cleanup.
|
|
70
|
+
*/
|
|
71
|
+
drain(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Start the periodic replenish timer.
|
|
74
|
+
* Fills the pool immediately on first call.
|
|
75
|
+
*/
|
|
76
|
+
startReplenishing(): void;
|
|
77
|
+
/** Stop the periodic replenish timer. */
|
|
78
|
+
stopReplenishing(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Create a single pool container: generate token, create, start,
|
|
81
|
+
* wait for healthy, inspect for IP address.
|
|
82
|
+
*/
|
|
83
|
+
private createPoolContainer;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=warm-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warm-pool.d.ts","sourceRoot":"","sources":["../../../src/cloud/warm-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAexC,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,qBAAa,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,cAAc,CAAS;gBAEnB,IAAI,EAAE,eAAe;IAYjC;;;;OAIG;IACH,KAAK,IAAI,SAAS,GAAG,IAAI;IAkBzB;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BhC,sDAAsD;IACtD,IAAI,IAAI,MAAM;IAId;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B5B;;;OAGG;IACH,iBAAiB,IAAI,IAAI;IAiBzB,yCAAyC;IACzC,gBAAgB,IAAI,IAAI;IASxB;;;OAGG;YACW,mBAAmB;CA6BlC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud WebSocket — minimal RFC 6455 implementation for event streaming.
|
|
3
|
+
*
|
|
4
|
+
* Streams console/network events from SessionBuffers to connected clients
|
|
5
|
+
* in real time. Uses raw HTTP upgrade + frame encoding (no external deps).
|
|
6
|
+
*
|
|
7
|
+
* Compatible with Node.js 18+ (no native WebSocket server required).
|
|
8
|
+
*
|
|
9
|
+
* Protocol:
|
|
10
|
+
* GET /v1/sessions/:id/ws?token=<JWT>
|
|
11
|
+
* → 101 Switching Protocols
|
|
12
|
+
* → Server pushes JSON frames: { type, sessionId, data }
|
|
13
|
+
* → Client can send ping; server auto-responds pong
|
|
14
|
+
* → Server pings every PING_INTERVAL_MS; closes after MAX_MISSED_PONGS
|
|
15
|
+
*/
|
|
16
|
+
import type * as http from 'http';
|
|
17
|
+
import type { Duplex } from 'stream';
|
|
18
|
+
import type { SessionBuffers } from '../network/buffers';
|
|
19
|
+
export interface WsConnection {
|
|
20
|
+
/** Unique connection ID */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Tenant that owns this connection */
|
|
23
|
+
tenantId: string;
|
|
24
|
+
/** Session ID being observed */
|
|
25
|
+
sessionId: string;
|
|
26
|
+
/** Send a JSON-serializable message to the client */
|
|
27
|
+
send(data: string): void;
|
|
28
|
+
/** Close the connection with optional code and reason */
|
|
29
|
+
close(code?: number, reason?: string): void;
|
|
30
|
+
/** Whether the connection is still open */
|
|
31
|
+
readonly isOpen: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface HandleUpgradeOpts {
|
|
34
|
+
jwtSecret: Buffer;
|
|
35
|
+
getSessionBuffers: (tenantId: string, sessionId: string) => SessionBuffers | null;
|
|
36
|
+
}
|
|
37
|
+
interface WsSessionEvent {
|
|
38
|
+
type: 'session';
|
|
39
|
+
sessionId: string;
|
|
40
|
+
event: 'created' | 'terminated' | 'frozen' | 'resumed';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Broadcast a session lifecycle event to all WebSocket connections
|
|
44
|
+
* observing that session.
|
|
45
|
+
*/
|
|
46
|
+
export declare function broadcastSessionEvent(event: WsSessionEvent): void;
|
|
47
|
+
/**
|
|
48
|
+
* Handle an HTTP upgrade request for WebSocket connections.
|
|
49
|
+
*
|
|
50
|
+
* URL format: /v1/sessions/:id/ws?token=<JWT>
|
|
51
|
+
*
|
|
52
|
+
* Validates JWT, checks tenant connection limits, performs the WebSocket
|
|
53
|
+
* handshake, and subscribes the connection to session buffer events.
|
|
54
|
+
*/
|
|
55
|
+
export declare function handleUpgrade(req: http.IncomingMessage, socket: Duplex, _head: Buffer, opts: HandleUpgradeOpts): void;
|
|
56
|
+
/**
|
|
57
|
+
* Close all WebSocket connections. Called during server shutdown.
|
|
58
|
+
*/
|
|
59
|
+
export declare function closeAllConnections(): void;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=ws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../../src/cloud/ws.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAA0B,MAAM,oBAAoB,CAAC;AAkBjF,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yDAAyD;IACzD,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;CACnF;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;CACxD;AA2WD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAWjE;AAID;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,iBAAiB,GACtB,IAAI,CAgGN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth and cookie commands — auth, cookie-import
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
export declare function handleAuthCommand(command: string, args: string[], bm: BrowserTarget): Promise<string>;
|
|
6
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,MAAM,CAAC,CA8HjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent workflow commands — flow, retry, watch
|
|
3
|
+
*
|
|
4
|
+
* TASK-036: flow — Execute a YAML flow file step-by-step
|
|
5
|
+
* TASK-037: retry — Retry a command with backoff until a condition is met
|
|
6
|
+
* TASK-038: watch — Watch for DOM changes and execute a callback command
|
|
7
|
+
* TASK-041: flow save/run/list — Saved flows in .browse/flows/
|
|
8
|
+
* TASK-005: Routes flow sub-steps through executeCommand() pipeline
|
|
9
|
+
*/
|
|
10
|
+
import type { AutomationTarget } from '../../automation/target';
|
|
11
|
+
import type { CommandLifecycle } from '../../automation/events';
|
|
12
|
+
import type { Session } from '../../session/manager';
|
|
13
|
+
import type { SessionManager } from '../../session/manager';
|
|
14
|
+
export declare function handleFlowsCommand(command: string, args: string[], target: AutomationTarget, shutdown: () => Promise<void> | void, sessionManager?: SessionManager, currentSession?: Session, lifecycle?: CommandLifecycle): Promise<string>;
|
|
15
|
+
//# sourceMappingURL=flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/flows.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAwM5D,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EACpC,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,OAAO,EACxB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAmSjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meta command dispatcher — routes commands to focused handler modules.
|
|
3
|
+
*/
|
|
4
|
+
import type { AutomationTarget } from '../../automation/target';
|
|
5
|
+
import type { CommandLifecycle } from '../../automation/events';
|
|
6
|
+
import type { SessionManager, Session } from '../../session/manager';
|
|
7
|
+
export declare function handleMetaCommand(command: string, args: string[], target: AutomationTarget, shutdown: () => Promise<void> | void, sessionManager?: SessionManager, currentSession?: Session, lifecycle?: CommandLifecycle): Promise<string>;
|
|
8
|
+
import type { CommandRegistry } from '../../automation/command';
|
|
9
|
+
/**
|
|
10
|
+
* Register all meta command definitions in the registry.
|
|
11
|
+
* Called once during lazy initialization from ensureDefinitionsRegistered().
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerMetaDefinitions(registry: CommandRegistry): void;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAuCrE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EACpC,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,OAAO,EACxB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAsDjB;AAID,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAsCvE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspection and analysis commands — snapshot, snapshot-diff, diff, frame, find, inspect, detect, coverage, perf-audit
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
import type { Session } from '../../session/manager';
|
|
6
|
+
export declare function handleInspectionCommand(command: string, args: string[], bm: BrowserTarget, currentSession?: Session): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=inspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/inspection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAqCrD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,MAAM,CAAC,CA+rBjB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile, React DevTools, and Cloud Provider commands — profile, react-devtools, provider
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
export declare function handleProfileCommand(command: string, args: string[], bm: BrowserTarget): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* List camoufox profiles from <localDir>/camoufox-profiles/*.json.
|
|
8
|
+
* Exported so tests can call with a controlled directory.
|
|
9
|
+
*/
|
|
10
|
+
export declare function listCamoufoxProfiles(localDir: string): string;
|
|
11
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/profile.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,MAAM,CAAC,CA6IjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqB7D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recording commands — record, har, video
|
|
3
|
+
*/
|
|
4
|
+
import type { AutomationTarget } from '../../automation/target';
|
|
5
|
+
import type { Session } from '../../session/manager';
|
|
6
|
+
export declare function handleRecordingCommand(command: string, args: string[], target: AutomationTarget, currentSession?: Session): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=recording.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recording.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/recording.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAKrD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,gBAAgB,EACxB,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,MAAM,CAAC,CAqKjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screenshot and visual commands — screenshot, pdf, responsive, screenshot-diff
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
import type { Session } from '../../session/manager';
|
|
6
|
+
export declare function handleScreenshotsCommand(command: string, args: string[], bm: BrowserTarget, currentSession?: Session): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=screenshots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/screenshots.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAKrD,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,MAAM,CAAC,CAuMjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session management commands — sessions, session-close, state, handoff, resume
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
import type { SessionManager, Session } from '../../session/manager';
|
|
6
|
+
export declare function handleSessionsCommand(command: string, args: string[], bm: BrowserTarget, sessionManager?: SessionManager, currentSession?: Session): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/sessions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMrE,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,MAAM,CAAC,CAoKjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simulator meta command handler — thin wrapper over the shared sim services.
|
|
3
|
+
*
|
|
4
|
+
* This handler runs through the normal command pipeline (HTTP/MCP).
|
|
5
|
+
* It delegates all logic to src/app/{ios,android}/sim-service.ts.
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
8
|
+
import type { SessionManager, Session } from '../../session/manager';
|
|
9
|
+
export declare function handleSimCommand(command: string, args: string[], bm: BrowserTarget, shutdown?: () => Promise<void> | void, sessionManager?: SessionManager, currentSession?: Session): Promise<string>;
|
|
10
|
+
//# sourceMappingURL=sim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/sim.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErE,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EACrC,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,MAAM,CAAC,CA6DjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System/server commands — status, url, stop, restart, chain, doctor, upgrade
|
|
3
|
+
*/
|
|
4
|
+
import type { AutomationTarget } from '../../automation/target';
|
|
5
|
+
import type { CommandLifecycle } from '../../automation/events';
|
|
6
|
+
import type { SessionManager, Session } from '../../session/manager';
|
|
7
|
+
export declare function handleSystemCommand(command: string, args: string[], target: AutomationTarget, shutdown: () => Promise<void> | void, sessionManager?: SessionManager, currentSession?: Session, lifecycle?: CommandLifecycle): Promise<string>;
|
|
8
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/system.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EACpC,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,OAAO,EACxB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAiPjB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tab management commands — tabs, tab, newtab, closetab
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
5
|
+
export declare function handleTabsCommand(command: string, args: string[], bm: BrowserTarget): Promise<string>;
|
|
6
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/tabs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,MAAM,CAAC,CA+BjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YouTube transcript extraction command.
|
|
3
|
+
* Uses yt-dlp when available (fast), falls back to browser-based intercept.
|
|
4
|
+
*/
|
|
5
|
+
import type { BrowserTarget } from '../../browser/target';
|
|
6
|
+
export declare function handleYoutubeTranscript(args: string[], bm: BrowserTarget, proxyUrl?: string | null): Promise<string>;
|
|
7
|
+
//# sourceMappingURL=youtube.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../../../src/commands/meta/youtube.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC,MAAM,CAAC,CA0EjB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read commands — extract data from pages without side effects
|
|
3
|
+
*
|
|
4
|
+
* text, html, links, forms, accessibility, js, eval, css, attrs, state,
|
|
5
|
+
* console, network, cookies, storage, perf, schema, meta, headings
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserTarget } from '../browser/target';
|
|
8
|
+
import type { SessionBuffers } from '../network/buffers';
|
|
9
|
+
export declare function handleReadCommand(command: string, args: string[], bm: BrowserTarget, buffers?: SessionBuffers): Promise<string>;
|
|
10
|
+
import type { CommandRegistry } from '../automation/command';
|
|
11
|
+
/**
|
|
12
|
+
* Register all read command definitions in the registry.
|
|
13
|
+
* Called once during lazy initialization from ensureDefinitionsRegistered().
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerReadDefinitions(registry: CommandRegistry): void;
|
|
16
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/commands/read.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,CAqmBjB;AAMD,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AAE7E;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAuBvE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write commands — navigate and interact with pages (side effects)
|
|
3
|
+
*
|
|
4
|
+
* goto, back, forward, reload, click, dblclick, fill, select, hover,
|
|
5
|
+
* focus, check, uncheck, type, press, scroll, wait, viewport, cookie,
|
|
6
|
+
* header, useragent, drag, keydown, keyup
|
|
7
|
+
*/
|
|
8
|
+
import type { BrowserTarget } from '../browser/target';
|
|
9
|
+
import type { DomainFilter } from '../security/domain-filter';
|
|
10
|
+
export declare function handleWriteCommand(command: string, args: string[], bm: BrowserTarget, domainFilter?: DomainFilter | null): Promise<string>;
|
|
11
|
+
import type { CommandRegistry } from '../automation/command';
|
|
12
|
+
/**
|
|
13
|
+
* Register all write command definitions in the registry.
|
|
14
|
+
* Called once during lazy initialization from ensureDefinitionsRegistered().
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerWriteDefinitions(registry: CommandRegistry): void;
|
|
17
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/commands/write.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAuI9D,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,EACjB,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,GACjC,OAAO,CAAC,MAAM,CAAC,CAm7BjB;AAID,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AAE7E;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAgExE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config file loader — reads browse.json from project root.
|
|
3
|
+
* Config values serve as defaults — CLI flags and env vars override.
|
|
4
|
+
*/
|
|
5
|
+
export interface BrowseConfig {
|
|
6
|
+
session?: string;
|
|
7
|
+
json?: boolean;
|
|
8
|
+
contentBoundaries?: boolean;
|
|
9
|
+
allowedDomains?: string[];
|
|
10
|
+
idleTimeout?: number;
|
|
11
|
+
viewport?: string;
|
|
12
|
+
device?: string;
|
|
13
|
+
context?: boolean;
|
|
14
|
+
networkBodies?: boolean;
|
|
15
|
+
/** Default session ID — overrides BROWSE_SESSION env var */
|
|
16
|
+
defaultSession?: string;
|
|
17
|
+
/** Default context level ('off' | 'on' | 'full') */
|
|
18
|
+
defaultContext?: string;
|
|
19
|
+
/** Flow files to execute automatically on server startup */
|
|
20
|
+
startupFlows?: string[];
|
|
21
|
+
/** Extra directories to search for .browse/detections/*.json files */
|
|
22
|
+
detectionPaths?: string[];
|
|
23
|
+
/** Extra directories to search for rule files */
|
|
24
|
+
rulePaths?: string[];
|
|
25
|
+
/** Extra directories to search for flow YAML files */
|
|
26
|
+
flowPaths?: string[];
|
|
27
|
+
/** Maximum flow nesting depth (default: 10) */
|
|
28
|
+
maxFlowDepth?: number;
|
|
29
|
+
/** Auto-dismiss cookie/consent banners (default: false) */
|
|
30
|
+
consentDismiss?: boolean;
|
|
31
|
+
/** Force-click through overlays (default: false) */
|
|
32
|
+
clickForce?: boolean;
|
|
33
|
+
/** Wait for page readiness signals before commands (default: false) */
|
|
34
|
+
readiness?: boolean;
|
|
35
|
+
/** Enable SERP fast-path extraction (default: false) */
|
|
36
|
+
serpFastpath?: boolean;
|
|
37
|
+
/** Enable per-session command lock (default: true) */
|
|
38
|
+
commandLock?: boolean;
|
|
39
|
+
/** Tab inactivity timeout in ms (default: 1_800_000) */
|
|
40
|
+
tabInactivityMs?: number;
|
|
41
|
+
/** Camoufox browser runtime configuration */
|
|
42
|
+
camoufox?: CamoufoxConfig;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Find the project root by walking up from cwd looking for .git or .claude markers.
|
|
46
|
+
* Returns the absolute path to the project root, or null if not found.
|
|
47
|
+
*/
|
|
48
|
+
export declare function findProjectRoot(): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Load browse.json from the project root (directory containing .git or .claude).
|
|
51
|
+
* Returns empty config if file doesn't exist or is malformed.
|
|
52
|
+
*/
|
|
53
|
+
export declare function loadConfig(): BrowseConfig;
|
|
54
|
+
export interface CamoufoxConfig {
|
|
55
|
+
os?: string | string[];
|
|
56
|
+
blockImages?: boolean;
|
|
57
|
+
blockWebrtc?: boolean;
|
|
58
|
+
blockWebgl?: boolean;
|
|
59
|
+
disableCoop?: boolean;
|
|
60
|
+
geoip?: string | boolean;
|
|
61
|
+
humanize?: boolean | number;
|
|
62
|
+
locale?: string | string[];
|
|
63
|
+
addons?: string[];
|
|
64
|
+
fonts?: string[];
|
|
65
|
+
customFontsOnly?: boolean;
|
|
66
|
+
screen?: {
|
|
67
|
+
minWidth?: number;
|
|
68
|
+
maxWidth?: number;
|
|
69
|
+
minHeight?: number;
|
|
70
|
+
maxHeight?: number;
|
|
71
|
+
};
|
|
72
|
+
window?: [number, number];
|
|
73
|
+
fingerprint?: Record<string, unknown>;
|
|
74
|
+
ffVersion?: number;
|
|
75
|
+
headless?: boolean | 'virtual';
|
|
76
|
+
mainWorldEval?: boolean;
|
|
77
|
+
firefoxUserPrefs?: Record<string, unknown>;
|
|
78
|
+
proxy?: string | {
|
|
79
|
+
server: string;
|
|
80
|
+
username?: string;
|
|
81
|
+
password?: string;
|
|
82
|
+
};
|
|
83
|
+
enableCache?: boolean;
|
|
84
|
+
debug?: boolean;
|
|
85
|
+
excludeAddons?: string[];
|
|
86
|
+
executablePath?: string;
|
|
87
|
+
args?: string[];
|
|
88
|
+
env?: Record<string, string>;
|
|
89
|
+
virtualDisplay?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Map CamoufoxConfig (camelCase) keys to camoufox-js snake_case keys.
|
|
93
|
+
*/
|
|
94
|
+
export declare function mapCamoufoxConfig(config: CamoufoxConfig): Record<string, unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* Load camoufox config from browse.json + optional named profile.
|
|
97
|
+
* Profile selected via BROWSE_CAMOUFOX_PROFILE env var.
|
|
98
|
+
* Profile files live in <localDir>/camoufox-profiles/<name>.json.
|
|
99
|
+
*/
|
|
100
|
+
export declare function loadCamoufoxConfig(localDir?: string): CamoufoxConfig;
|
|
101
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const DEFAULTS: {
|
|
2
|
+
readonly PORT_RANGE_START: 9400;
|
|
3
|
+
readonly PORT_RANGE_END: 10400;
|
|
4
|
+
readonly IDLE_TIMEOUT_MS: number;
|
|
5
|
+
readonly COMMAND_TIMEOUT_MS: number;
|
|
6
|
+
readonly ACTION_TIMEOUT_MS: number;
|
|
7
|
+
readonly HEALTH_CHECK_TIMEOUT_MS: 2000;
|
|
8
|
+
readonly BUFFER_HIGH_WATER_MARK: 50000;
|
|
9
|
+
readonly BUFFER_FLUSH_INTERVAL_MS: 1000;
|
|
10
|
+
readonly NETWORK_SETTLE_MS: 5000;
|
|
11
|
+
readonly LOCK_STALE_THRESHOLD_MS: 15000;
|
|
12
|
+
readonly CHROME_DEBUG_PORT: 9222;
|
|
13
|
+
readonly CHROME_CDP_TIMEOUT_MS: 15000;
|
|
14
|
+
readonly PROXY_LAUNCH_RETRIES: 1;
|
|
15
|
+
readonly PROXY_LAUNCH_TIMEOUT_MS: 60000;
|
|
16
|
+
readonly PROXY_SESSION_DURATION_MINUTES: 10;
|
|
17
|
+
readonly PROXY_MAX_ROTATE_RETRIES: 3;
|
|
18
|
+
readonly TAB_INACTIVITY_MS: 1800000;
|
|
19
|
+
readonly TAB_REAP_INTERVAL_MS: 60000;
|
|
20
|
+
readonly COMMAND_LOCK_TIMEOUT_MS: 30000;
|
|
21
|
+
readonly MAX_CONCURRENT_PER_SESSION: 6;
|
|
22
|
+
readonly CONCURRENCY_QUEUE_TIMEOUT_MS: 30000;
|
|
23
|
+
readonly CONSENT_DISMISS: false;
|
|
24
|
+
readonly CLICK_FORCE: false;
|
|
25
|
+
readonly READINESS: false;
|
|
26
|
+
readonly SERP_FASTPATH: false;
|
|
27
|
+
readonly COMMAND_LOCK: true;
|
|
28
|
+
};
|
|
29
|
+
export declare const CLOUD_DEFAULTS: {
|
|
30
|
+
readonly PORT: 8400;
|
|
31
|
+
readonly HOST: "0.0.0.0";
|
|
32
|
+
readonly DB_PATH: ".browse/cloud.db";
|
|
33
|
+
readonly MAX_SESSIONS_PER_TENANT: 10;
|
|
34
|
+
readonly SESSION_IDLE_TIMEOUT_MS: number;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BX,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC"}
|