local-browser-bridge 0.1.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 +724 -0
- package/dist/package.json +61 -0
- package/dist/src/browser/chrome.d.ts +19 -0
- package/dist/src/browser/chrome.js +778 -0
- package/dist/src/browser/index.d.ts +3 -0
- package/dist/src/browser/index.js +25 -0
- package/dist/src/browser/safari.d.ts +41 -0
- package/dist/src/browser/safari.js +827 -0
- package/dist/src/browser-attach-ux-helper.d.ts +39 -0
- package/dist/src/browser-attach-ux-helper.js +157 -0
- package/dist/src/capabilities.d.ts +3 -0
- package/dist/src/capabilities.js +182 -0
- package/dist/src/chrome-relay-error-helper.d.ts +19 -0
- package/dist/src/chrome-relay-error-helper.js +78 -0
- package/dist/src/chrome-relay-helper-cli.d.ts +2 -0
- package/dist/src/chrome-relay-helper-cli.js +97 -0
- package/dist/src/chrome-relay-helper.d.ts +29 -0
- package/dist/src/chrome-relay-helper.js +151 -0
- package/dist/src/chrome-relay-state.d.ts +23 -0
- package/dist/src/chrome-relay-state.js +108 -0
- package/dist/src/claude-code.d.ts +20 -0
- package/dist/src/claude-code.js +66 -0
- package/dist/src/cli-reference-adapter.d.ts +13 -0
- package/dist/src/cli-reference-adapter.js +48 -0
- package/dist/src/cli.d.ts +3 -0
- package/dist/src/cli.js +200 -0
- package/dist/src/codex.d.ts +17 -0
- package/dist/src/codex.js +25 -0
- package/dist/src/connection-ux.d.ts +61 -0
- package/dist/src/connection-ux.js +256 -0
- package/dist/src/errors.d.ts +12 -0
- package/dist/src/errors.js +58 -0
- package/dist/src/http-reference-adapter.d.ts +34 -0
- package/dist/src/http-reference-adapter.js +61 -0
- package/dist/src/http.d.ts +3 -0
- package/dist/src/http.js +161 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +43 -0
- package/dist/src/mcp-stdio.d.ts +2 -0
- package/dist/src/mcp-stdio.js +10 -0
- package/dist/src/mcp.d.ts +25 -0
- package/dist/src/mcp.js +483 -0
- package/dist/src/reference-adapter.d.ts +32 -0
- package/dist/src/reference-adapter.js +42 -0
- package/dist/src/service/attach-service.d.ts +28 -0
- package/dist/src/service/attach-service.js +272 -0
- package/dist/src/session-metadata.d.ts +4 -0
- package/dist/src/session-metadata.js +88 -0
- package/dist/src/store/session-store.d.ts +14 -0
- package/dist/src/store/session-store.js +52 -0
- package/dist/src/target.d.ts +9 -0
- package/dist/src/target.js +61 -0
- package/dist/src/types.d.ts +397 -0
- package/dist/src/types.js +2 -0
- package/dist/tests/attach-service.test.d.ts +1 -0
- package/dist/tests/attach-service.test.js +1367 -0
- package/dist/tests/browser-attach-ux-helper.test.d.ts +1 -0
- package/dist/tests/browser-attach-ux-helper.test.js +139 -0
- package/dist/tests/chrome-relay-error-helper.test.d.ts +1 -0
- package/dist/tests/chrome-relay-error-helper.test.js +67 -0
- package/dist/tests/chrome-relay-helper.test.d.ts +1 -0
- package/dist/tests/chrome-relay-helper.test.js +142 -0
- package/dist/tests/chrome-relay-state-schema.test.d.ts +1 -0
- package/dist/tests/chrome-relay-state-schema.test.js +96 -0
- package/dist/tests/claude-code-wrapper.test.d.ts +1 -0
- package/dist/tests/claude-code-wrapper.test.js +170 -0
- package/dist/tests/codex.test.d.ts +1 -0
- package/dist/tests/codex.test.js +210 -0
- package/dist/tests/demo-client-smoke.test.d.ts +1 -0
- package/dist/tests/demo-client-smoke.test.js +405 -0
- package/dist/tests/docs-fixtures.test.d.ts +1 -0
- package/dist/tests/docs-fixtures.test.js +255 -0
- package/dist/tests/doctor-connect-wrapper.test.d.ts +1 -0
- package/dist/tests/doctor-connect-wrapper.test.js +62 -0
- package/dist/tests/fixtures/doctor-connect-cli-stub.d.ts +1 -0
- package/dist/tests/fixtures/doctor-connect-cli-stub.js +93 -0
- package/dist/tests/fixtures/public-root-cli-stub.d.ts +210 -0
- package/dist/tests/fixtures/public-root-cli-stub.js +143 -0
- package/dist/tests/fixtures/public-root-consumer.js +67 -0
- package/dist/tests/mcp.test.d.ts +1 -0
- package/dist/tests/mcp.test.js +345 -0
- package/dist/tests/public-consumer-helpers.test.d.ts +1 -0
- package/dist/tests/public-consumer-helpers.test.js +33 -0
- package/dist/tests/public-package-git-consumption.test.d.ts +1 -0
- package/dist/tests/public-package-git-consumption.test.js +56 -0
- package/dist/tests/public-root-consumer-smoke.test.d.ts +1 -0
- package/dist/tests/public-root-consumer-smoke.test.js +214 -0
- package/dist/tests/reference-adapter.test.d.ts +1 -0
- package/dist/tests/reference-adapter.test.js +220 -0
- package/dist/tests/transport-reference-adapters.test.d.ts +1 -0
- package/dist/tests/transport-reference-adapters.test.js +214 -0
- package/package.json +61 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "local-browser-bridge",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Reusable local browser bridge with CLI and local HTTP API, starting with Safari on macOS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"main": "./dist/src/index.js",
|
|
9
|
+
"types": "./dist/src/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/src/index.d.ts",
|
|
13
|
+
"require": "./dist/src/index.js",
|
|
14
|
+
"default": "./dist/src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./mcp": {
|
|
17
|
+
"types": "./dist/src/mcp.d.ts",
|
|
18
|
+
"require": "./dist/src/mcp.js",
|
|
19
|
+
"default": "./dist/src/mcp.js"
|
|
20
|
+
},
|
|
21
|
+
"./codex": {
|
|
22
|
+
"types": "./dist/src/codex.d.ts",
|
|
23
|
+
"require": "./dist/src/codex.js",
|
|
24
|
+
"default": "./dist/src/codex.js"
|
|
25
|
+
},
|
|
26
|
+
"./browser-attach-ux-helper": {
|
|
27
|
+
"types": "./dist/src/browser-attach-ux-helper.d.ts",
|
|
28
|
+
"require": "./dist/src/browser-attach-ux-helper.js",
|
|
29
|
+
"default": "./dist/src/browser-attach-ux-helper.js"
|
|
30
|
+
},
|
|
31
|
+
"./chrome-relay-error-helper": {
|
|
32
|
+
"types": "./dist/src/chrome-relay-error-helper.d.ts",
|
|
33
|
+
"require": "./dist/src/chrome-relay-error-helper.js",
|
|
34
|
+
"default": "./dist/src/chrome-relay-error-helper.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist/**/*",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"bin": {
|
|
42
|
+
"local-browser-bridge": "dist/src/cli.js",
|
|
43
|
+
"local-browser-bridge-mcp": "dist/src/mcp-stdio.js",
|
|
44
|
+
"safari-attach-tool": "dist/src/cli.js",
|
|
45
|
+
"local-browser-bridge-chrome-relay": "dist/src/chrome-relay-helper-cli.js"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc -p tsconfig.json",
|
|
49
|
+
"clean": "rm -rf dist .tmp-tests",
|
|
50
|
+
"prepare": "npm run build",
|
|
51
|
+
"test": "npm run build && node --test dist/tests/**/*.test.js",
|
|
52
|
+
"cli": "node dist/src/cli.js",
|
|
53
|
+
"mcp": "node dist/src/mcp-stdio.js",
|
|
54
|
+
"serve": "node dist/src/cli.js serve",
|
|
55
|
+
"relay-helper": "node dist/src/chrome-relay-helper-cli.js"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/node": "^24.6.0",
|
|
59
|
+
"typescript": "^5.9.3"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AttachmentSession, BrowserAdapter, BrowserDiagnostics, BrowserSessionAction, BrowserTabTarget, SessionActionResult, TabMetadata } from "../types";
|
|
2
|
+
interface ChromeRelayAttachResolution {
|
|
3
|
+
tab: TabMetadata;
|
|
4
|
+
trustedAt?: string;
|
|
5
|
+
resumable?: boolean;
|
|
6
|
+
expiresAt?: string;
|
|
7
|
+
resumeRequiresUserGesture?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveChromeRelayAttach(target: BrowserTabTarget): Promise<ChromeRelayAttachResolution>;
|
|
10
|
+
export declare function resumeChromeRelaySession(session: AttachmentSession): Promise<import("../types").ResumedSession>;
|
|
11
|
+
export declare class ChromeAdapter implements BrowserAdapter {
|
|
12
|
+
readonly browser: "chrome";
|
|
13
|
+
private listInspectableTabs;
|
|
14
|
+
listTabs(): Promise<TabMetadata[]>;
|
|
15
|
+
resolveTab(target: BrowserTabTarget): Promise<TabMetadata>;
|
|
16
|
+
performSessionAction(action: BrowserSessionAction): Promise<SessionActionResult>;
|
|
17
|
+
getDiagnostics(): Promise<BrowserDiagnostics>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|