@anweat/dsh-browser 0.1.1

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/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@anweat/dsh-browser",
3
+ "version": "0.1.1",
4
+ "description": "Self-contained browser runtime plugin for DeepSeek Harness (scoped @anweat) — bundles Playwright (chromium) and OpenCLI as plugin-local dependencies (with global-reuse fallback), exposes a `browser` service and interactive browser tools.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "lib/index.js",
8
+ "types": "lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./cordis.patch.yml": "./cordis.patch.yml",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "lib",
19
+ "cordis.patch.yml",
20
+ "README.md",
21
+ "scripts",
22
+ "LICENSE"
23
+ ],
24
+ "engines": {
25
+ "node": "^22.19 || >=24"
26
+ },
27
+ "peerDependencies": {
28
+ "@deepseek-ai/cordis": "^4.0.1"
29
+ },
30
+ "dependencies": {
31
+ "@deepseek-ai/schemastery": "^3.18.1",
32
+ "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
33
+ "@jackwener/opencli": "^1.8.6",
34
+ "playwright": "^1.60.0"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "^5.6.0",
38
+ "@types/node": "^22.0.0"
39
+ },
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ }
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/anweat/dsh-browser.git"
48
+ },
49
+ "scripts": {
50
+ "build": "tsc -p tsconfig.json"
51
+ }
52
+ }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ // Installs the Playwright browser(s) used by the dsh-browser plugin, using the
3
+ // playwright CLI from THIS plugin's node_modules (not the global install).
4
+ // Usage: node scripts/install-browser.mjs [chromium|msedge|...] (default chromium)
5
+ import { createRequire } from 'node:module'
6
+ import { fileURLToPath } from 'node:url'
7
+ import { spawnSync } from 'node:child_process'
8
+ import path from 'node:path'
9
+
10
+ const root = fileURLToPath(new URL('..', import.meta.url))
11
+ const req = createRequire(path.join(root, 'package.json'))
12
+ const cli = path.join(path.dirname(req.resolve('playwright/package.json')), 'cli.js')
13
+
14
+ const channels = process.argv.slice(2)
15
+ const targets = channels.length ? channels : ['chromium']
16
+ console.log('[dsh-browser] installing playwright browsers:', targets.join(', '))
17
+ const r = spawnSync(process.execPath, [cli, 'install', ...targets], { stdio: 'inherit', cwd: root })
18
+ process.exit(r.status ?? 1)