@anweat/dsh-browser 0.1.13-alpha.1 → 0.1.14-alpha.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 CHANGED
@@ -1,150 +1,147 @@
1
- {
2
- "name": "@anweat/dsh-browser",
3
- "version": "0.1.13-alpha.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
- "./client": {
15
- "types": "./lib/client/index.d.ts",
16
- "default": "./lib/client.js"
17
- },
18
- "./cordis.patch.yml": "./cordis.patch.yml",
19
- "./package.json": "./package.json"
20
- },
21
- "files": [
22
- "lib",
23
- "cordis.patch.yml",
24
- "README.md",
25
- "scripts",
26
- "LICENSE"
27
- ],
28
- "engines": {
29
- "node": "^22.19 || >=24"
30
- },
31
- "scripts": {
32
- "build": "node scripts/clean-lib.mjs && tsc -p tsconfig.json && tsdown",
33
- "typecheck": "tsc -p tsconfig.json --noEmit",
34
- "test": "node --test --experimental-transform-types test/*.test.ts",
35
- "test:client-bundle": "node scripts/check-client-bundle.mjs",
36
- "verify": "pnpm run typecheck && pnpm run build && pnpm test && pnpm run test:client-bundle",
37
- "prepublishOnly": "pnpm run verify",
38
- "prepare": "npm run build"
39
- },
40
- "peerDependencies": {
41
- "@deepseek-ai/cordis": "4.0.2",
42
- "@deepseek-ai/dsh-tools": "0.1.5-alpha.1",
43
- "@deepseek-ai/dsh-client-connection": "0.1.5-alpha.1",
44
- "@deepseek-ai/dsh-client-locale": "0.1.5-alpha.1",
45
- "@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
46
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
47
- "@deepseek-ai/dsh-client-ui-settings": "0.1.5-alpha.1",
48
- "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-alpha.1",
49
- "@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
50
- "@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
51
- "@deepseek-ai/schemastery": "3.18.2"
52
- },
53
- "peerDependenciesMeta": {
54
- "@deepseek-ai/cordis": {
55
- "optional": true
56
- },
57
- "@deepseek-ai/dsh-tools": {
58
- "optional": true
59
- },
60
- "@deepseek-ai/dsh-client-connection": {
61
- "optional": true
62
- },
63
- "@deepseek-ai/dsh-client-locale": {
64
- "optional": true
65
- },
66
- "@deepseek-ai/dsh-client-store": {
67
- "optional": true
68
- },
69
- "@deepseek-ai/dsh-client-ui-renderer": {
70
- "optional": true
71
- },
72
- "@deepseek-ai/dsh-client-ui-settings": {
73
- "optional": true
74
- },
75
- "@deepseek-ai/dsh-client-ui-settings-plugins": {
76
- "optional": true
77
- },
78
- "@deepseek-ai/dsh-client-ui-slots": {
79
- "optional": true
80
- },
81
- "@deepseek-ai/dsh-settings": {
82
- "optional": true
83
- },
84
- "@deepseek-ai/schemastery": {
85
- "optional": true
86
- }
87
- },
88
- "dependencies": {
89
- "@jackwener/opencli": "^1.8.6",
90
- "patchright": "^1.62.1",
91
- "playwright": "^1.60.0"
92
- },
93
- "devDependencies": {
94
- "@deepseek-ai/cordis": "4.0.2",
95
- "@deepseek-ai/dsh-agent": "0.1.5-alpha.1",
96
- "@deepseek-ai/dsh-code-runtime": "0.1.5-alpha.1",
97
- "@deepseek-ai/dsh-invariants": "0.1.5-alpha.1",
98
- "@deepseek-ai/dsh-llm": "0.1.5-alpha.1",
99
- "@deepseek-ai/dsh-scope": "0.1.5-alpha.1",
100
- "@deepseek-ai/dsh-session": "0.1.5-alpha.1",
101
- "@deepseek-ai/dsh-session-projection": "0.1.5-alpha.1",
102
- "@deepseek-ai/dsh-system-prompt": "0.1.5-alpha.1",
103
- "@deepseek-ai/dsh-user-approval": "0.1.5-alpha.1",
104
- "@deepseek-ai/dsh-tools": "0.1.5-alpha.1",
105
- "@deepseek-ai/dsh-client-connection": "0.1.5-alpha.1",
106
- "@deepseek-ai/dsh-client-locale": "0.1.5-alpha.1",
107
- "@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
108
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
109
- "@deepseek-ai/dsh-client-ui-settings": "0.1.5-alpha.1",
110
- "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-alpha.1",
111
- "@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
112
- "@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
113
- "@deepseek-ai/schemastery": "3.18.2",
114
- "@types/react": "~18.3.1",
115
- "@types/react-dom": "~18.3.1",
116
- "react": "^18.2.0",
117
- "react-dom": "18.2.0",
118
- "tsdown": "^0.22.2",
119
- "typescript": "^5.6.0",
120
- "@types/node": "^22.0.0"
121
- },
122
- "dsh": {
123
- "client": {
124
- "inject": [
125
- "@deepseek-ai/dsh-client-connection",
126
- "@deepseek-ai/dsh-client-locale",
127
- "@deepseek-ai/dsh-client-ui-renderer",
128
- "@deepseek-ai/dsh-client-ui-settings",
129
- "@deepseek-ai/dsh-client-ui-settings-plugins"
130
- ],
131
- "platform": "web"
132
- },
133
- "bundle": {
134
- "patch": "./cordis.patch.yml"
135
- }
136
- },
137
- "packageManager": "pnpm@11.7.0",
138
- "repository": {
139
- "type": "git",
140
- "url": "git+https://github.com/anweat/dsh-browser.git"
141
- },
142
- "keywords": [
143
- "dsh",
144
- "deepseek-harness",
145
- "plugin",
146
- "browser",
147
- "playwright",
148
- "opencli"
149
- ]
150
- }
1
+ {
2
+ "name": "@anweat/dsh-browser",
3
+ "version": "0.1.14-alpha.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
+ "./client": {
15
+ "types": "./lib/client/index.d.ts",
16
+ "default": "./lib/client.js"
17
+ },
18
+ "./cordis.patch.yml": "./cordis.patch.yml",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": [
22
+ "lib",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "scripts",
26
+ "LICENSE"
27
+ ],
28
+ "engines": {
29
+ "node": "^22.19 || >=24"
30
+ },
31
+ "peerDependencies": {
32
+ "@deepseek-ai/cordis": "4.0.2",
33
+ "@deepseek-ai/dsh-tools": "0.1.5-alpha.1",
34
+ "@deepseek-ai/dsh-client-connection": "0.1.5-alpha.1",
35
+ "@deepseek-ai/dsh-client-locale": "0.1.5-alpha.1",
36
+ "@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
37
+ "@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
38
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.5-alpha.1",
39
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-alpha.1",
40
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
41
+ "@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
42
+ "@deepseek-ai/schemastery": "3.18.2"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@deepseek-ai/cordis": {
46
+ "optional": true
47
+ },
48
+ "@deepseek-ai/dsh-tools": {
49
+ "optional": true
50
+ },
51
+ "@deepseek-ai/dsh-client-connection": {
52
+ "optional": true
53
+ },
54
+ "@deepseek-ai/dsh-client-locale": {
55
+ "optional": true
56
+ },
57
+ "@deepseek-ai/dsh-client-store": {
58
+ "optional": true
59
+ },
60
+ "@deepseek-ai/dsh-client-ui-renderer": {
61
+ "optional": true
62
+ },
63
+ "@deepseek-ai/dsh-client-ui-settings": {
64
+ "optional": true
65
+ },
66
+ "@deepseek-ai/dsh-client-ui-settings-plugins": {
67
+ "optional": true
68
+ },
69
+ "@deepseek-ai/dsh-client-ui-slots": {
70
+ "optional": true
71
+ },
72
+ "@deepseek-ai/dsh-settings": {
73
+ "optional": true
74
+ },
75
+ "@deepseek-ai/schemastery": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "dependencies": {
80
+ "@jackwener/opencli": "^1.8.6",
81
+ "patchright": "^1.62.1",
82
+ "playwright": "^1.60.0"
83
+ },
84
+ "devDependencies": {
85
+ "@deepseek-ai/cordis": "4.0.2",
86
+ "@deepseek-ai/dsh-agent": "0.1.5-alpha.1",
87
+ "@deepseek-ai/dsh-code-runtime": "0.1.5-alpha.1",
88
+ "@deepseek-ai/dsh-invariants": "0.1.5-alpha.1",
89
+ "@deepseek-ai/dsh-llm": "0.1.5-alpha.1",
90
+ "@deepseek-ai/dsh-scope": "0.1.5-alpha.1",
91
+ "@deepseek-ai/dsh-session": "0.1.5-alpha.1",
92
+ "@deepseek-ai/dsh-session-projection": "0.1.5-alpha.1",
93
+ "@deepseek-ai/dsh-system-prompt": "0.1.5-alpha.1",
94
+ "@deepseek-ai/dsh-user-approval": "0.1.5-alpha.1",
95
+ "@deepseek-ai/dsh-tools": "0.1.5-alpha.1",
96
+ "@deepseek-ai/dsh-client-connection": "0.1.5-alpha.1",
97
+ "@deepseek-ai/dsh-client-locale": "0.1.5-alpha.1",
98
+ "@deepseek-ai/dsh-client-store": "0.1.5-alpha.1",
99
+ "@deepseek-ai/dsh-client-ui-renderer": "0.1.5-alpha.1",
100
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.5-alpha.1",
101
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-alpha.1",
102
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.5-alpha.1",
103
+ "@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
104
+ "@deepseek-ai/schemastery": "3.18.2",
105
+ "@types/react": "~18.3.1",
106
+ "@types/react-dom": "~18.3.1",
107
+ "react": "^18.2.0",
108
+ "react-dom": "18.2.0",
109
+ "tsdown": "^0.22.2",
110
+ "typescript": "^5.6.0",
111
+ "@types/node": "^22.0.0"
112
+ },
113
+ "dsh": {
114
+ "client": {
115
+ "inject": [
116
+ "@deepseek-ai/dsh-client-connection",
117
+ "@deepseek-ai/dsh-client-locale",
118
+ "@deepseek-ai/dsh-client-ui-renderer",
119
+ "@deepseek-ai/dsh-client-ui-settings",
120
+ "@deepseek-ai/dsh-client-ui-settings-plugins"
121
+ ],
122
+ "platform": "web"
123
+ },
124
+ "bundle": {
125
+ "patch": "./cordis.patch.yml"
126
+ }
127
+ },
128
+ "repository": {
129
+ "type": "git",
130
+ "url": "git+https://github.com/anweat/dsh-browser.git"
131
+ },
132
+ "keywords": [
133
+ "dsh",
134
+ "deepseek-harness",
135
+ "plugin",
136
+ "browser",
137
+ "playwright",
138
+ "opencli"
139
+ ],
140
+ "scripts": {
141
+ "build": "node scripts/clean-lib.mjs && tsc -p tsconfig.json && tsdown",
142
+ "typecheck": "tsc -p tsconfig.json --noEmit",
143
+ "test": "node --test --experimental-transform-types test/*.test.ts",
144
+ "test:client-bundle": "node scripts/check-client-bundle.mjs",
145
+ "verify": "pnpm run typecheck && pnpm run build && pnpm test && pnpm run test:client-bundle"
146
+ }
147
+ }
@@ -1,15 +1,15 @@
1
- import assert from 'node:assert/strict'
2
- import { readFile } from 'node:fs/promises'
3
-
4
- const source = await readFile(new URL('../lib/client.js', import.meta.url), 'utf8')
5
- const sourceMap = JSON.parse(await readFile(new URL('../lib/client.js.map', import.meta.url), 'utf8'))
6
- const imports = [...source.matchAll(/\brequire\((['"])([^'"]+)\1\)/g)].map(match => match[2])
7
- const allowed = new Set(['react', 'react/jsx-runtime', 'react-dom', 'react-dom/client', '@deepseek-ai/cordis', '@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-ui-slots'])
8
- const forbidden = [...new Set(imports.filter(id => !allowed.has(id)))].sort()
9
-
10
- assert.deepEqual(forbidden, [], `client bundle contains unavailable imports: ${forbidden.join(', ')}`)
11
- assert.match(source, /settings\.plugin\.item/)
12
- assert.match(source, /dsh-browser/)
13
- assert.match(source, /Browser automation/)
14
- assert.equal('sourcesContent' in sourceMap, false, 'client source map must exclude source contents')
15
- console.log(`client bundle check passed (${[...new Set(imports)].length} module-table imports)`)
1
+ import assert from 'node:assert/strict'
2
+ import { readFile } from 'node:fs/promises'
3
+
4
+ const source = await readFile(new URL('../lib/client.js', import.meta.url), 'utf8')
5
+ const sourceMap = JSON.parse(await readFile(new URL('../lib/client.js.map', import.meta.url), 'utf8'))
6
+ const imports = [...source.matchAll(/\brequire\((['"])([^'"]+)\1\)/g)].map(match => match[2])
7
+ const allowed = new Set(['react', 'react/jsx-runtime', 'react-dom', 'react-dom/client', '@deepseek-ai/cordis', '@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-ui-slots'])
8
+ const forbidden = [...new Set(imports.filter(id => !allowed.has(id)))].sort()
9
+
10
+ assert.deepEqual(forbidden, [], `client bundle contains unavailable imports: ${forbidden.join(', ')}`)
11
+ assert.match(source, /settings\.plugin\.item/)
12
+ assert.match(source, /dsh-browser/)
13
+ assert.match(source, /Browser automation/)
14
+ assert.equal('sourcesContent' in sourceMap, false, 'client source map must exclude source contents')
15
+ console.log(`client bundle check passed (${[...new Set(imports)].length} module-table imports)`)
@@ -1,3 +1,3 @@
1
- import { rm } from 'node:fs/promises'
2
-
3
- await rm(new URL('../lib', import.meta.url), { recursive: true, force: true })
1
+ import { rm } from 'node:fs/promises'
2
+
3
+ await rm(new URL('../lib', import.meta.url), { recursive: true, force: true })
@@ -1,18 +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)
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)