@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,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snapshot command — accessibility tree with ref-based element selection
|
|
3
|
+
*
|
|
4
|
+
* Architecture (Locator map — no DOM mutation):
|
|
5
|
+
* 1. page.locator(scope).ariaSnapshot() → YAML-like accessibility tree
|
|
6
|
+
* 2. Parse tree, assign refs @e1, @e2, ...
|
|
7
|
+
* 3. Build Playwright Locator for each ref (getByRole + nth)
|
|
8
|
+
* 4. Store Map<string, Locator> on BrowserManager
|
|
9
|
+
* 5. Return compact text output with refs prepended
|
|
10
|
+
*
|
|
11
|
+
* Cursor-interactive detection (-C flag):
|
|
12
|
+
* After the normal ARIA snapshot, scans the DOM for elements that are
|
|
13
|
+
* clickable but invisible to the accessibility tree — divs with
|
|
14
|
+
* cursor:pointer, onclick, tabindex, role, or data-action attributes.
|
|
15
|
+
* These get refs and locators just like ARIA elements, so "click @e15"
|
|
16
|
+
* works seamlessly.
|
|
17
|
+
*
|
|
18
|
+
* Later: "click @e3" → look up Locator → locator.click()
|
|
19
|
+
*/
|
|
20
|
+
import type { BrowserTarget } from './target';
|
|
21
|
+
export interface SnapshotOptions {
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
full?: boolean;
|
|
24
|
+
compact?: boolean;
|
|
25
|
+
viewport?: boolean;
|
|
26
|
+
depth?: number;
|
|
27
|
+
selector?: string;
|
|
28
|
+
cursor?: boolean;
|
|
29
|
+
offset?: number;
|
|
30
|
+
maxChars?: number;
|
|
31
|
+
serp?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parse CLI args into SnapshotOptions
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseSnapshotArgs(args: string[]): SnapshotOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Take an accessibility snapshot and build the ref map.
|
|
39
|
+
*/
|
|
40
|
+
export declare function handleSnapshot(args: string[], bm: BrowserTarget): Promise<string>;
|
|
41
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/browser/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAU9C,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAsBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe,CAkDjE;AA+ND;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,MAAM,CAAC,CAyNjB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TabManager — owns tab state (pages Map, activeTabId, nextTabId).
|
|
3
|
+
*
|
|
4
|
+
* BrowserManager delegates all tab lifecycle operations here and reads
|
|
5
|
+
* activeTabId / pages from this class for its own logic.
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserContext, Page } from 'playwright';
|
|
8
|
+
export type TabEntry = {
|
|
9
|
+
id: number;
|
|
10
|
+
url: string;
|
|
11
|
+
title: string;
|
|
12
|
+
active: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare class TabManager {
|
|
15
|
+
private pages;
|
|
16
|
+
private _activeTabId;
|
|
17
|
+
private nextTabId;
|
|
18
|
+
get activeTabId(): number;
|
|
19
|
+
set activeTabId(id: number);
|
|
20
|
+
getPages(): Map<number, Page>;
|
|
21
|
+
getPage(): Page;
|
|
22
|
+
getPageById(id: number): Page | undefined;
|
|
23
|
+
hasTab(id: number): boolean;
|
|
24
|
+
getTabCount(): number;
|
|
25
|
+
getActiveTabId(): number;
|
|
26
|
+
getTabList(): TabEntry[];
|
|
27
|
+
getTabListWithTitles(): Promise<TabEntry[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new tab on the given context. Navigates to `url` if provided.
|
|
30
|
+
* Throws if navigation fails (page is NOT committed to the map on failure).
|
|
31
|
+
* Calls `wireEvents(page)` before navigating so all events are captured.
|
|
32
|
+
*/
|
|
33
|
+
newTab(context: BrowserContext, wireEvents: (page: Page) => void, url?: string): Promise<number>;
|
|
34
|
+
/**
|
|
35
|
+
* Close a tab. If the closed tab was active, activates the most-recently-opened
|
|
36
|
+
* remaining tab. If no tabs remain, creates a blank new tab.
|
|
37
|
+
* Returns the ID of the closed tab.
|
|
38
|
+
*/
|
|
39
|
+
closeTab(context: BrowserContext, wireEvents: (page: Page) => void, id?: number): Promise<number>;
|
|
40
|
+
switchTab(id: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* Register an externally-created page (e.g. from an existing browser context).
|
|
43
|
+
* Used during launchWithBrowser(reuseContext) and launchPersistent.
|
|
44
|
+
*/
|
|
45
|
+
registerPage(page: Page, wireEvents: (page: Page) => void): number;
|
|
46
|
+
/**
|
|
47
|
+
* Remove all pages from the map without closing them (used during context swap in
|
|
48
|
+
* recreateContext / handoff / resume where pages are closed separately).
|
|
49
|
+
*/
|
|
50
|
+
clearPages(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Reset the ID counter and clear pages — called when swapping to a new context.
|
|
53
|
+
*/
|
|
54
|
+
reset(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Reverse-lookup: find the tab ID that owns a given Page.
|
|
57
|
+
* Returns undefined if the page isn't committed yet.
|
|
58
|
+
*/
|
|
59
|
+
getTabIdForPage(page: Page): number | undefined;
|
|
60
|
+
/** Snapshot the current tab→url mapping (used by recreateContext / saveState). */
|
|
61
|
+
snapshotTabUrls(): Array<{
|
|
62
|
+
id: number;
|
|
63
|
+
url: string;
|
|
64
|
+
active: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/browser/tabs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAEnF,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,SAAS,CAAa;IAI9B,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,WAAW,CAAC,EAAE,EAAE,MAAM,EAEzB;IAED,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;IAI7B,OAAO,IAAI,IAAI;IAMf,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAIzC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI3B,WAAW,IAAI,MAAM;IAIrB,cAAc,IAAI,MAAM;IAIxB,UAAU,IAAI,QAAQ,EAAE;IAalB,oBAAoB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAejD;;;;OAIG;IACG,MAAM,CACV,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,EAChC,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC;IAoBlB;;;;OAIG;IACG,QAAQ,CACZ,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,EAChC,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC;IAoBlB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAK3B;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,MAAM;IAQlE;;;OAGG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS;IAO/C,kFAAkF;IAClF,eAAe,IAAI,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;CAOvE"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrowserTarget — the explicit capability interface for browser commands.
|
|
3
|
+
*
|
|
4
|
+
* Handlers import this interface instead of the BrowserManager class.
|
|
5
|
+
* This is the typed boundary the plan contract requires: "browser-only
|
|
6
|
+
* behavior is isolated behind explicit capability interfaces."
|
|
7
|
+
*
|
|
8
|
+
* When AppTarget arrives (v2.0), commands that accept BrowserTarget are
|
|
9
|
+
* explicitly browser-only, while target-neutral commands accept AutomationTarget.
|
|
10
|
+
*/
|
|
11
|
+
import type { Page, BrowserContext, Frame, FrameLocator, Locator } from 'playwright';
|
|
12
|
+
import type { AutomationTarget } from '../automation/target';
|
|
13
|
+
import type { SessionBuffers } from '../network/buffers';
|
|
14
|
+
import type { DomainFilter } from '../security/domain-filter';
|
|
15
|
+
import type { HarRecording } from '../network/har';
|
|
16
|
+
import type { CoverageEntry, DeviceDescriptor } from './manager';
|
|
17
|
+
/**
|
|
18
|
+
* The 43 methods that command handlers actually call on the browser target.
|
|
19
|
+
* Extracted from grep across src/commands/ and src/automation/action-context.ts.
|
|
20
|
+
*/
|
|
21
|
+
export interface BrowserTarget extends AutomationTarget {
|
|
22
|
+
getPage(): Page;
|
|
23
|
+
getPageById(id: number): Page | undefined;
|
|
24
|
+
getContext(): BrowserContext | null;
|
|
25
|
+
getBuffers(): SessionBuffers;
|
|
26
|
+
getCurrentUrl(): string;
|
|
27
|
+
getActiveFrameSelector(): string | null;
|
|
28
|
+
getFrameContext(): Promise<Frame | null>;
|
|
29
|
+
getLocatorRoot(): Page | FrameLocator;
|
|
30
|
+
setFrame(selector: string): void;
|
|
31
|
+
resetFrame(): void;
|
|
32
|
+
resolveRef(selector: string): {
|
|
33
|
+
locator: Locator;
|
|
34
|
+
} | {
|
|
35
|
+
selector: string;
|
|
36
|
+
};
|
|
37
|
+
setRefMap(refs: Map<string, Locator>): void;
|
|
38
|
+
newTab(url?: string): Promise<number>;
|
|
39
|
+
closeTab(id?: number): Promise<void>;
|
|
40
|
+
switchTab(id: number): void;
|
|
41
|
+
getActiveTabId(): number;
|
|
42
|
+
hasTab(id: number): boolean;
|
|
43
|
+
getTabCount(): number;
|
|
44
|
+
getTabListWithTitles(): Promise<Array<{
|
|
45
|
+
id: number;
|
|
46
|
+
url: string;
|
|
47
|
+
title: string;
|
|
48
|
+
active: boolean;
|
|
49
|
+
}>>;
|
|
50
|
+
setViewport(width: number, height: number): Promise<void>;
|
|
51
|
+
emulateDevice(device: DeviceDescriptor | null): Promise<void>;
|
|
52
|
+
setExtraHeader(name: string, value: string): Promise<void>;
|
|
53
|
+
getUserAgent(): string | null;
|
|
54
|
+
setUserAgent(ua: string): void;
|
|
55
|
+
applyUserAgent(): Promise<void>;
|
|
56
|
+
getLastDialog(): {
|
|
57
|
+
type: string;
|
|
58
|
+
message: string;
|
|
59
|
+
defaultValue?: string;
|
|
60
|
+
} | null;
|
|
61
|
+
setAutoDialogAction(action: 'accept' | 'dismiss', promptValue?: string): void;
|
|
62
|
+
isOffline(): boolean;
|
|
63
|
+
setOffline(value: boolean): Promise<void>;
|
|
64
|
+
getUserRoutes(): Array<{
|
|
65
|
+
pattern: string;
|
|
66
|
+
action: 'block' | 'fulfill';
|
|
67
|
+
status?: number;
|
|
68
|
+
body?: string;
|
|
69
|
+
}>;
|
|
70
|
+
addUserRoute(pattern: string, action: 'block' | 'fulfill', status?: number, body?: string): void;
|
|
71
|
+
clearUserRoutes(): void;
|
|
72
|
+
setDomainFilter(filter: DomainFilter): void;
|
|
73
|
+
setInitScript(script: string): void;
|
|
74
|
+
getInitScript(): string | null;
|
|
75
|
+
getLastMutationAge(): Promise<number>;
|
|
76
|
+
getLastSnapshot(): string | null;
|
|
77
|
+
getLastSnapshotOpts(): string[];
|
|
78
|
+
setLastSnapshot(text: string, opts?: string[]): void;
|
|
79
|
+
startHarRecording(): void;
|
|
80
|
+
stopHarRecording(): HarRecording | null;
|
|
81
|
+
startVideoRecording(dir: string): Promise<void>;
|
|
82
|
+
stopVideoRecording(): Promise<{
|
|
83
|
+
dir: string;
|
|
84
|
+
startedAt: number;
|
|
85
|
+
paths: string[];
|
|
86
|
+
} | null>;
|
|
87
|
+
getVideoRecording(): {
|
|
88
|
+
dir: string;
|
|
89
|
+
startedAt: number;
|
|
90
|
+
} | null;
|
|
91
|
+
startCoverage(): Promise<void>;
|
|
92
|
+
stopCoverage(): Promise<{
|
|
93
|
+
js: CoverageEntry[];
|
|
94
|
+
css: CoverageEntry[];
|
|
95
|
+
}>;
|
|
96
|
+
handoff(message: string, useChromium?: boolean): Promise<string>;
|
|
97
|
+
resume(): Promise<string>;
|
|
98
|
+
setCaptureNetworkBodies(enabled: boolean): void;
|
|
99
|
+
getCaptureNetworkBodies(): boolean;
|
|
100
|
+
getReactDevToolsEnabled(): boolean;
|
|
101
|
+
setReactDevToolsEnabled(enabled: boolean): void;
|
|
102
|
+
resetFailures(): void;
|
|
103
|
+
incrementFailures(): void;
|
|
104
|
+
getFailureHint(): string | null;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../src/browser/target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IAErD,OAAO,IAAI,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,UAAU,IAAI,cAAc,GAAG,IAAI,CAAC;IACpC,UAAU,IAAI,cAAc,CAAC;IAC7B,aAAa,IAAI,MAAM,CAAC;IAGxB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAAC;IACxC,eAAe,IAAI,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACzC,cAAc,IAAI,IAAI,GAAG,YAAY,CAAC;IACtC,QA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O,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAC1F,iBAAiB,IAAI;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAG/D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,YAAY,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,aAAa,EAAE,CAAC;QAAC,GAAG,EAAE,aAAa,EAAE,CAAA;KAAE,CAAC,CAAC;IAGvE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAG1B,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD,uBAAuB,IAAI,OAAO,CAAC;IAGnC,uBAAuB,IAAI,OAAO,CAAC;IACnC,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAGhD,aAAa,IAAI,IAAI,CAAC;IACtB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,cAAc,IAAI,MAAM,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YouTube transcript extraction — yt-dlp detection and caption format parsers.
|
|
3
|
+
* yt-dlp is optional: detected at runtime, never required.
|
|
4
|
+
*/
|
|
5
|
+
/** Detect yt-dlp binary. Checks common locations. */
|
|
6
|
+
export declare function detectYtDlp(): Promise<string | null>;
|
|
7
|
+
/** Check if yt-dlp is available. */
|
|
8
|
+
export declare function hasYtDlp(): boolean;
|
|
9
|
+
/** Extract video ID from YouTube URL. */
|
|
10
|
+
export declare function extractVideoId(url: string): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch transcript via yt-dlp subprocess.
|
|
13
|
+
* Returns formatted transcript text or null on failure.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ytDlpTranscript(url: string, lang?: string, proxyUrl?: string | null): Promise<{
|
|
16
|
+
text: string;
|
|
17
|
+
title: string;
|
|
18
|
+
language: string;
|
|
19
|
+
} | null>;
|
|
20
|
+
/** Parse YouTube JSON3 caption format -> timestamped text. */
|
|
21
|
+
export declare function parseJson3(content: string): string | null;
|
|
22
|
+
/** Parse WebVTT caption format -> timestamped text. */
|
|
23
|
+
export declare function parseVtt(content: string): string | null;
|
|
24
|
+
/** Parse TTML/XML caption format -> text. */
|
|
25
|
+
export declare function parseXml(content: string): string | null;
|
|
26
|
+
//# sourceMappingURL=youtube.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../../src/browser/youtube.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,qDAAqD;AACrD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmB1D;AAED,oCAAoC;AACpC,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,yCAAyC;AACzC,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKzD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,SAAO,EACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CA6CnE;AAED,8DAA8D;AAC9D,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsBzD;AAED,uDAAuD;AACvD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyBvD;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYvD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* browse CLI — thin wrapper that talks to the persistent server
|
|
3
|
+
*
|
|
4
|
+
* Flow:
|
|
5
|
+
* 1. Read /tmp/browse-server.json for port + token
|
|
6
|
+
* 2. If missing or stale PID → start server in background
|
|
7
|
+
* 3. Health check
|
|
8
|
+
* 4. Send command via HTTP POST
|
|
9
|
+
* 5. Print response to stdout (or stderr for errors)
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveServerScript(env?: Record<string, string | undefined>, metaDir?: string): string;
|
|
12
|
+
export declare const SAFE_TO_RETRY: Set<string>;
|
|
13
|
+
export declare function main(): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwFH,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,OAAO,GAAE,MAAsB,GAC9B,MAAM,CAwBR;AAwSD,eAAO,MAAM,aAAa,aASxB,CAAC;AAkJH,wBAAsB,IAAI,kBAqZzB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud auth — API key vault (SQLite + SHA-256) and JWT (HS256, native crypto).
|
|
3
|
+
*
|
|
4
|
+
* ApiKeyVault stores API keys as SHA-256 hashes in a SQLite database.
|
|
5
|
+
* Keys are prefixed with `brw_` and only visible at creation time.
|
|
6
|
+
* Validation uses crypto.timingSafeEqual to prevent timing attacks.
|
|
7
|
+
*
|
|
8
|
+
* JWT functions use native Node.js crypto (HS256) with 15-minute expiry.
|
|
9
|
+
* No external JWT library required.
|
|
10
|
+
*/
|
|
11
|
+
export interface ApiKeyRecord {
|
|
12
|
+
id: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
permissions: string;
|
|
16
|
+
maxSessions: number;
|
|
17
|
+
maxConcurrent: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ApiKeyListEntry {
|
|
20
|
+
id: string;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
revoked: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateKeyResult {
|
|
27
|
+
key: string;
|
|
28
|
+
id: string;
|
|
29
|
+
}
|
|
30
|
+
interface JwtPayload {
|
|
31
|
+
tenantId: string;
|
|
32
|
+
permissions: string;
|
|
33
|
+
maxSessions?: number;
|
|
34
|
+
maxConcurrent?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare function hashApiKey(rawKey: string): string;
|
|
37
|
+
export declare class ApiKeyVault {
|
|
38
|
+
private db;
|
|
39
|
+
constructor(dbPath: string);
|
|
40
|
+
/**
|
|
41
|
+
* Create a new API key for a tenant.
|
|
42
|
+
* Returns the raw key (only time it is visible) and the key ID.
|
|
43
|
+
*/
|
|
44
|
+
create(tenantId: string, name: string): CreateKeyResult;
|
|
45
|
+
/**
|
|
46
|
+
* Validate a raw API key. Returns tenant info or null if invalid/revoked.
|
|
47
|
+
* Uses timing-safe comparison to prevent timing attacks.
|
|
48
|
+
*/
|
|
49
|
+
validate(rawKey: string): ApiKeyRecord | null;
|
|
50
|
+
/**
|
|
51
|
+
* Revoke an API key by ID. Sets revokedAt timestamp.
|
|
52
|
+
*/
|
|
53
|
+
revoke(id: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* List all API keys (no secrets exposed).
|
|
56
|
+
*/
|
|
57
|
+
list(): ApiKeyListEntry[];
|
|
58
|
+
/**
|
|
59
|
+
* Close the database connection.
|
|
60
|
+
*/
|
|
61
|
+
close(): void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Create a JWT with HS256 signing.
|
|
65
|
+
* Payload includes tenantId, permissions, iat, and exp (15-minute expiry).
|
|
66
|
+
*/
|
|
67
|
+
export declare function createJwt(payload: JwtPayload, secret: Buffer): string;
|
|
68
|
+
/**
|
|
69
|
+
* Validate a JWT token. Returns the payload or null if invalid/expired.
|
|
70
|
+
* Uses timing-safe comparison for signature verification.
|
|
71
|
+
*/
|
|
72
|
+
export declare function validateJwt(token: string, secret: Buffer): JwtPayload | null;
|
|
73
|
+
/**
|
|
74
|
+
* Resolve the JWT signing secret.
|
|
75
|
+
* Reads from BROWSE_CLOUD_JWT_SECRET env var (64-char hex = 32 bytes)
|
|
76
|
+
* or auto-generates and stores at <localDir>/.cloud-jwt-key.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveJwtSecret(localDir: string): Buffer;
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/cloud/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAoBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD;AAkBD,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAe;gBAEb,MAAM,EAAE,MAAM;IAU1B;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe;IAgBvD;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAsC7C;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxB;;OAEG;IACH,IAAI,IAAI,eAAe,EAAE;IAsBzB;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAID;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAoBrE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAwC5E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoBzD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docker Engine API client — minimal HTTP client for container lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* Talks to the Docker daemon via Unix socket (default) or TCP.
|
|
5
|
+
* Uses native Node.js `http`/`https` modules only -- no external deps.
|
|
6
|
+
*
|
|
7
|
+
* Supports DOCKER_HOST env var:
|
|
8
|
+
* unix:///var/run/docker.sock (Unix socket, default)
|
|
9
|
+
* tcp://localhost:2375 (TCP, plain HTTP)
|
|
10
|
+
* tcp+tls://localhost:2376 (TCP, HTTPS -- not yet implemented)
|
|
11
|
+
*
|
|
12
|
+
* All API paths are prefixed with /v1.43/ (Docker Engine API v1.43).
|
|
13
|
+
*/
|
|
14
|
+
export interface ContainerCreateOptions {
|
|
15
|
+
image: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
env?: string[];
|
|
18
|
+
labels?: Record<string, string>;
|
|
19
|
+
memory?: number;
|
|
20
|
+
nanoCpus?: number;
|
|
21
|
+
networkMode?: string;
|
|
22
|
+
healthCheck?: {
|
|
23
|
+
test: string[];
|
|
24
|
+
interval?: number;
|
|
25
|
+
timeout?: number;
|
|
26
|
+
retries?: number;
|
|
27
|
+
startPeriod?: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface ContainerInfo {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
state: 'created' | 'running' | 'paused' | 'restarting' | 'removing' | 'exited' | 'dead';
|
|
34
|
+
status: string;
|
|
35
|
+
ipAddress: string;
|
|
36
|
+
ports: Array<{
|
|
37
|
+
privatePort: number;
|
|
38
|
+
publicPort?: number;
|
|
39
|
+
}>;
|
|
40
|
+
labels: Record<string, string>;
|
|
41
|
+
health?: 'starting' | 'healthy' | 'unhealthy' | 'none';
|
|
42
|
+
}
|
|
43
|
+
export interface DockerClientOptions {
|
|
44
|
+
/** Unix socket path (default: /var/run/docker.sock) or TCP URL */
|
|
45
|
+
socketPath?: string;
|
|
46
|
+
/** TCP host (alternative to socketPath, e.g. 'http://localhost:2375') */
|
|
47
|
+
host?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare class DockerApiError extends Error {
|
|
50
|
+
statusCode: number;
|
|
51
|
+
constructor(statusCode: number, message: string);
|
|
52
|
+
}
|
|
53
|
+
export declare class DockerClient {
|
|
54
|
+
private transport;
|
|
55
|
+
constructor(opts?: DockerClientOptions);
|
|
56
|
+
/** Create a container. Returns the container ID. */
|
|
57
|
+
create(opts: ContainerCreateOptions): Promise<string>;
|
|
58
|
+
/** Start a stopped container. */
|
|
59
|
+
start(id: string): Promise<void>;
|
|
60
|
+
/** Stop a running container. */
|
|
61
|
+
stop(id: string, timeout?: number): Promise<void>;
|
|
62
|
+
/** Remove a container. */
|
|
63
|
+
remove(id: string, force?: boolean): Promise<void>;
|
|
64
|
+
/** Inspect a container and return a normalized ContainerInfo. */
|
|
65
|
+
inspect(id: string): Promise<ContainerInfo>;
|
|
66
|
+
/** List containers matching a label key=value. */
|
|
67
|
+
listByLabel(key: string, value: string): Promise<ContainerInfo[]>;
|
|
68
|
+
/** Poll inspect() until health === 'healthy' or timeout. */
|
|
69
|
+
waitForHealthy(id: string, timeoutMs?: number): Promise<ContainerInfo>;
|
|
70
|
+
/** Commit a container to a new image. Returns the new image ID. */
|
|
71
|
+
commit(containerId: string, repo: string, tag: string): Promise<string>;
|
|
72
|
+
/** Check if the Docker daemon is reachable. */
|
|
73
|
+
ping(): Promise<boolean>;
|
|
74
|
+
private request;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=docker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/cloud/docker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,QAAQ,CAAC,EA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IAInD,0BAA0B;IACpB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,iEAAiE;IAC3D,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKjD,kDAAkD;IAC5C,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAOvE,4DAA4D;IACtD,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,SAAQ,GAAG,OAAO,CAAC,aAAa,CAAC;IAwB3E,mEAAmE;IAC7D,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM7E,+CAA+C;IACzC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAW9B,OAAO,CAAC,OAAO;CAuEhB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Firecracker microVM API client — minimal HTTP client for VM lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* Firecracker exposes a REST API over a Unix socket (one per VM).
|
|
5
|
+
* Socket path: {socketDir}/firecracker-{vmId}.sock
|
|
6
|
+
*
|
|
7
|
+
* Uses native Node.js `http` module with `socketPath` option — no external deps.
|
|
8
|
+
*
|
|
9
|
+
* API reference: https://github.com/firecracker-microvm/firecracker/blob/main/src/api_server/swagger/firecracker.yaml
|
|
10
|
+
*
|
|
11
|
+
* Key Firecracker API conventions:
|
|
12
|
+
* - Configuration endpoints use PUT (not POST)
|
|
13
|
+
* - VM must be configured before starting (boot source, drives, etc.)
|
|
14
|
+
* - Snapshot/restore requires the VM to be paused first
|
|
15
|
+
* - Each Firecracker process manages exactly one microVM
|
|
16
|
+
*/
|
|
17
|
+
export interface VmConfig {
|
|
18
|
+
/** vCPU count (default 1) */
|
|
19
|
+
vcpuCount?: number;
|
|
20
|
+
/** Memory size in MB (default 512) */
|
|
21
|
+
memSizeMb?: number;
|
|
22
|
+
/** Path to vmlinux kernel binary */
|
|
23
|
+
kernelPath: string;
|
|
24
|
+
/** Kernel boot arguments */
|
|
25
|
+
bootArgs?: string;
|
|
26
|
+
/** Path to rootfs ext4 image */
|
|
27
|
+
rootfsPath: string;
|
|
28
|
+
/** Whether rootfs is read-only (default true — use overlay for writes) */
|
|
29
|
+
rootfsReadOnly?: boolean;
|
|
30
|
+
/** Network interface config */
|
|
31
|
+
network?: {
|
|
32
|
+
/** Host tap device name */
|
|
33
|
+
tapDevice: string;
|
|
34
|
+
/** Guest MAC address (auto-generated if not provided) */
|
|
35
|
+
macAddress?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface FirecrackerClientOptions {
|
|
39
|
+
/** Directory for Firecracker sockets (default /tmp) */
|
|
40
|
+
socketDir?: string;
|
|
41
|
+
/** Path to Firecracker binary (default: 'firecracker' on PATH) */
|
|
42
|
+
firecrackerBin?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class FirecrackerApiError extends Error {
|
|
45
|
+
statusCode: number;
|
|
46
|
+
vmId: string;
|
|
47
|
+
constructor(statusCode: number, message: string, vmId: string);
|
|
48
|
+
}
|
|
49
|
+
export declare class FirecrackerClient {
|
|
50
|
+
private socketDir;
|
|
51
|
+
private firecrackerBin;
|
|
52
|
+
private processes;
|
|
53
|
+
constructor(opts?: FirecrackerClientOptions);
|
|
54
|
+
/**
|
|
55
|
+
* Check if /dev/kvm exists and is accessible (read + write).
|
|
56
|
+
* Returns true on Linux with KVM, false on macOS/Windows/Linux-without-KVM.
|
|
57
|
+
*/
|
|
58
|
+
checkKvm(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Create and configure a microVM (does not start it).
|
|
61
|
+
*
|
|
62
|
+
* Spawns a new Firecracker process, waits for the API socket,
|
|
63
|
+
* then configures the VM via REST API calls.
|
|
64
|
+
*/
|
|
65
|
+
createVm(vmId: string, config: VmConfig): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Start a configured VM (issues InstanceStart action).
|
|
68
|
+
* The VM must already be created via createVm().
|
|
69
|
+
*/
|
|
70
|
+
startVm(vmId: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Pause a running VM.
|
|
73
|
+
*/
|
|
74
|
+
pauseVm(vmId: string): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Resume a paused VM.
|
|
77
|
+
*/
|
|
78
|
+
resumeVm(vmId: string): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Create a full snapshot of a paused VM.
|
|
81
|
+
*
|
|
82
|
+
* Caller must pause the VM first — Firecracker requires this.
|
|
83
|
+
* Creates both a VM state file and a memory file.
|
|
84
|
+
*
|
|
85
|
+
* @param vmId - ID of the (paused) VM
|
|
86
|
+
* @param snapshotPath - Where to write the VM state snapshot
|
|
87
|
+
* @param memPath - Where to write the memory file
|
|
88
|
+
*/
|
|
89
|
+
snapshotVm(vmId: string, snapshotPath: string, memPath: string): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Restore a VM from a snapshot.
|
|
92
|
+
*
|
|
93
|
+
* Spawns a NEW Firecracker process, loads the snapshot, and resumes.
|
|
94
|
+
* Any existing Firecracker process for this vmId is stopped first.
|
|
95
|
+
*
|
|
96
|
+
* @param vmId - ID for the restored VM
|
|
97
|
+
* @param snapshotPath - Path to the VM state snapshot file
|
|
98
|
+
* @param memPath - Path to the memory file
|
|
99
|
+
*/
|
|
100
|
+
restoreVm(vmId: string, snapshotPath: string, memPath: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Stop a VM and clean up its resources.
|
|
103
|
+
*
|
|
104
|
+
* Sends SIGTERM, waits up to 5s, then SIGKILL if still running.
|
|
105
|
+
* Cleans up the socket file and removes the process from tracking.
|
|
106
|
+
*/
|
|
107
|
+
stopVm(vmId: string): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Get VM info from the Firecracker API.
|
|
110
|
+
*
|
|
111
|
+
* Returns the VM state or null if the socket doesn't exist
|
|
112
|
+
* (meaning the VM is not running or doesn't exist).
|
|
113
|
+
*/
|
|
114
|
+
getVmInfo(vmId: string): Promise<{
|
|
115
|
+
state: string;
|
|
116
|
+
} | null>;
|
|
117
|
+
/** Compute the socket path for a given VM ID. */
|
|
118
|
+
private socketPath;
|
|
119
|
+
/**
|
|
120
|
+
* Send an HTTP request over the Unix socket for a specific VM.
|
|
121
|
+
*
|
|
122
|
+
* Follows the same pattern as DockerClient's private request method
|
|
123
|
+
* but always uses a Unix socket (one per VM).
|
|
124
|
+
*/
|
|
125
|
+
private apiRequest;
|
|
126
|
+
/**
|
|
127
|
+
* Poll for a Unix socket file to appear on disk.
|
|
128
|
+
*
|
|
129
|
+
* Firecracker creates the socket after the process starts — there's
|
|
130
|
+
* a brief window where the socket doesn't exist yet.
|
|
131
|
+
*/
|
|
132
|
+
private waitForSocket;
|
|
133
|
+
/**
|
|
134
|
+
* Send SIGTERM, wait up to STOP_TIMEOUT_MS, then SIGKILL if still alive.
|
|
135
|
+
*/
|
|
136
|
+
private gracefulKill;
|
|
137
|
+
/** Kill a process immediately (used during cleanup on spawn failure). */
|
|
138
|
+
private killProcess;
|
|
139
|
+
/** Remove a socket file if it exists. */
|
|
140
|
+
private cleanupSocket;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=firecracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firecracker.d.ts","sourceRoot":"","sources":["../../../src/cloud/firecracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmBH,MAAM,WAAW,QAAQ;IACvB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC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