@anweat/dsh-browser 0.1.6 → 0.1.8
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 +306 -229
- package/cordis.patch.yml +26 -15
- package/lib/approval-policy.d.ts +2 -1
- package/lib/approval-policy.js +46 -1
- package/lib/approval-policy.js.map +1 -1
- package/lib/browser-service.d.ts +69 -19
- package/lib/browser-service.js +231 -64
- package/lib/browser-service.js.map +1 -1
- package/lib/client/SettingsCard.d.ts +2 -0
- package/lib/client/SettingsCard.js +21 -0
- package/lib/client/SettingsCard.js.map +1 -0
- package/lib/client/context-types.d.ts +8 -0
- package/lib/client/context-types.js +2 -0
- package/lib/client/context-types.js.map +1 -0
- package/lib/client/form.d.ts +62 -0
- package/lib/client/form.js +198 -0
- package/lib/client/form.js.map +1 -0
- package/lib/client/index.d.ts +16 -0
- package/lib/client/index.js +18 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/locales.d.ts +58 -0
- package/lib/client/locales.js +55 -0
- package/lib/client/locales.js.map +1 -0
- package/lib/client/settings-namespace.d.ts +2 -0
- package/lib/client/settings-namespace.js +3 -0
- package/lib/client/settings-namespace.js.map +1 -0
- package/lib/client/styles.d.ts +37 -0
- package/lib/client/styles.js +25 -0
- package/lib/client/styles.js.map +1 -0
- package/lib/client.js +753 -0
- package/lib/client.js.map +1 -0
- package/lib/config.d.ts +14 -0
- package/lib/config.js +25 -0
- package/lib/config.js.map +1 -1
- package/lib/deps.d.ts +7 -1
- package/lib/deps.js +22 -6
- package/lib/deps.js.map +1 -1
- package/lib/freedom.d.ts +8 -0
- package/lib/freedom.js +52 -0
- package/lib/freedom.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +19 -6
- package/lib/index.js.map +1 -1
- package/lib/opencli-catalog.d.ts +21 -0
- package/lib/opencli-catalog.js +49 -0
- package/lib/opencli-catalog.js.map +1 -0
- package/lib/scripts.js +27 -27
- package/lib/tools.js +111 -22
- package/lib/tools.js.map +1 -1
- package/lib/usage-policy.d.ts +49 -0
- package/lib/usage-policy.js +171 -0
- package/lib/usage-policy.js.map +1 -0
- package/package.json +133 -78
- package/scripts/check-client-bundle.mjs +15 -0
- package/scripts/clean-lib.mjs +3 -0
package/package.json
CHANGED
|
@@ -1,78 +1,133 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@anweat/dsh-browser",
|
|
3
|
-
"version": "0.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
|
-
"./
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@deepseek-ai/
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@deepseek-ai/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"@
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"@deepseek-ai/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"opencli"
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@anweat/dsh-browser",
|
|
3
|
+
"version": "0.1.8",
|
|
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.1",
|
|
33
|
+
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.1-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
|
|
41
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"@deepseek-ai/cordis": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"@deepseek-ai/dsh-tools": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@deepseek-ai/dsh-client-connection": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@deepseek-ai/dsh-client-runtime": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"@deepseek-ai/dsh-settings": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@deepseek-ai/schemastery": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@jackwener/opencli": "^1.8.6",
|
|
77
|
+
"patchright": "^1.62.1",
|
|
78
|
+
"playwright": "^1.60.0"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
82
|
+
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
|
|
90
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
91
|
+
"@types/react": "~18.3.1",
|
|
92
|
+
"@types/react-dom": "~18.3.1",
|
|
93
|
+
"react": "^18.2.0",
|
|
94
|
+
"react-dom": "18.2.0",
|
|
95
|
+
"tsdown": "^0.22.2",
|
|
96
|
+
"typescript": "^5.6.0",
|
|
97
|
+
"@types/node": "^22.0.0"
|
|
98
|
+
},
|
|
99
|
+
"dsh": {
|
|
100
|
+
"client": {
|
|
101
|
+
"inject": [
|
|
102
|
+
"@deepseek-ai/dsh-client-connection",
|
|
103
|
+
"@deepseek-ai/dsh-client-locale",
|
|
104
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins"
|
|
107
|
+
],
|
|
108
|
+
"platform": "web"
|
|
109
|
+
},
|
|
110
|
+
"bundle": {
|
|
111
|
+
"patch": "./cordis.patch.yml"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"repository": {
|
|
115
|
+
"type": "git",
|
|
116
|
+
"url": "git+https://github.com/anweat/dsh-browser.git"
|
|
117
|
+
},
|
|
118
|
+
"keywords": [
|
|
119
|
+
"dsh",
|
|
120
|
+
"deepseek-harness",
|
|
121
|
+
"plugin",
|
|
122
|
+
"browser",
|
|
123
|
+
"playwright",
|
|
124
|
+
"opencli"
|
|
125
|
+
],
|
|
126
|
+
"scripts": {
|
|
127
|
+
"build": "node scripts/clean-lib.mjs && tsc -p tsconfig.json && tsdown",
|
|
128
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
129
|
+
"test": "node --test --experimental-transform-types test/*.test.ts",
|
|
130
|
+
"test:client-bundle": "node scripts/check-client-bundle.mjs",
|
|
131
|
+
"verify": "pnpm run typecheck && pnpm run build && pnpm test && pnpm run test:client-bundle"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +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-runtime/client', '@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)`)
|