dsh-browser-cdp 1.7.11 → 1.9.6
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/CHANGELOG.de.md +350 -0
- package/CHANGELOG.es.md +350 -0
- package/CHANGELOG.fr.md +350 -0
- package/CHANGELOG.it.md +350 -0
- package/CHANGELOG.md +966 -0
- package/CHANGELOG.ru.md +350 -0
- package/README.md +56 -19
- package/bin/cdp-cast-worker.mjs +223 -2
- package/bin/cdp-render-worker.mjs +57 -4
- package/dsh-plugin.json +2 -2
- package/lib/client.js +936 -36
- package/lib/index.js +1747 -386
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +26 -12
- package/runtime/ego-linux/src/chrome.mjs +66 -6
- package/runtime/ego-linux/src/paths.mjs +14 -6
package/locale/de.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Agent-Browser",
|
|
4
|
+
"description": "Sichtbarer Agent-Browser für DSH: steuert das mitgelieferte ego-konforme Chromium über CDP, kann einen laufenden Chrome/Edge/Brave anbinden oder über egolite, Tabbit und Lightpanda routen; 34 strukturierte bcdp_*-Tools, von denen standardmäßig nur bcdp_status resident bleibt; Echtzeit-Beobachtungspanel mit Direkteingabe; Nicht-CDP-Kanäle gleichen Frames im 3-Sekunden-Takt."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/en.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Agent Browser",
|
|
4
|
+
"description": "A visible agent browser for DSH: drives the vendored ego-compatible Chromium over CDP, can attach to a running Chrome/Edge/Brave, and can route through egolite, Tabbit or Lightpanda; 34 structured bcdp_* tools, with only bcdp_status resident by default; realtime watch panel with direct input, and non-CDP channels sync frames by 3s polling."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/es.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Navegador agent",
|
|
4
|
+
"description": "Navegador agent visible para DSH: maneja el Chromium ego-compatible vendido via CDP, puede conectarse a un Chrome/Edge/Brave en marcha y enrutar por egolite, Tabbit o Lightpanda; 34 herramientas bcdp_* estructuradas, con solo bcdp_status activo por defecto; panel de observación en tiempo real con entrada directa, y los canales no-CDP sincronizan fotogramas por sondeo de 3 s."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/fr.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Navigateur agent",
|
|
4
|
+
"description": "Navigateur agent visible dans DSH : pilote le Chromium ego-compatible vendu via CDP, peut se connecter à un Chrome/Edge/Brave en cours d'exécution ou passer par egolite, Tabbit et Lightpanda ; 34 outils bcdp_* structurés, seul bcdp_status reste résident par défaut ; panneau d'observation en temps réel avec saisie directe ; les canaux non-CDP synchronisent les images toutes les 3 s."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/it.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Browser agent",
|
|
4
|
+
"description": "Browser agent visible per DSH: gestisce il Chromium ego-compatible vendato via CDP, puo collegarsi a un Chrome/Edge/Brave in运行 o instradare tramite egolite, Tabbit o Lightpanda; 34 tool bcdp_* strutturati, con solo bcdp_status activo por defecto; pannello di osservazione in tempo reale con input diretto, e i canali non-CDP sincronizzano i frame con polling di 3 s."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/ja.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "エージェントブラウザ",
|
|
4
|
+
"description": "表示可能な agent ブラウザ(DSH):同梱された ego 対応 Chromium を CDP で操作し、実行中の Chrome/Edge/Brave にも接続でき、egolite・Tabbit・Lightpanda 経由も使用できる。34 の構造化 bcdp_* ツール、既定で常駐は bcdp_status だけ。リアルタイム監視パネルはクリック・スクロール・IME 直接入力に対応し、非 CDP 経路は 3 秒ポーリングで映像を同期する。"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/ko.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "에이전트 브라우저",
|
|
4
|
+
"description": "DSH용 화면에 보이는 에이전트 브라우저: 동봉된 ego 호환 Chromium을 CDP로 조작하고, 실행 중인 Chrome/Edge/Brave에 연결하거나 egolite·Tabbit·Lightpanda 경로도 쓸 수 있다. 34개의 구조화된 bcdp_* 도구, 기본값에서는 bcdp_status 하나만 상주한다. 실시간 관찰 패널은 클릭·스크롤·IME 직접 입력을 지원하고, 비CDP 경로는 3초 폴링으로 화면을 동기화한다."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/ru.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Agent-браузер",
|
|
4
|
+
"description": "Видимый agent-браузер для DSH: управляет ego-совместимым Chromium через CDP, может подключаться к запущенному Chrome/Edge/Brave и может работать через egolite, Tabbit или Lightpanda; 34 инструментов bcdp_*, по умолчанию живёт только bcdp_status; панель осмотра в реальном времени с прямой подачей; не-CDP каналы получают кадр по 3-секундному опросу."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "dsh-browser-cdp:
|
|
3
|
+
"version": "1.9.6",
|
|
4
|
+
"description": "dsh-browser-cdp: visible agent browser for DSH — drives the vendored ego-compatible Chromium over CDP, and can also attach to a running Chrome/Edge/Brave or route through egolite, Tabbit and Lightpanda backends. 35 structured bcdp_* tools; only bcdp_status stays resident by default (lazy injection, −91.9% schema per turn for non-browser sessions). Realtime watch panel with direct click/scroll/IME input, element picks quoted into the composer, human-verification notices; non-CDP channels sync frames by 3s polling. Web shell: floating watch ball without dsh-better-sidebar, sidebar tab with it. Headless/TUI hosts: tools-only. [DSH 0.1.7-rc.1 ~ 0.2.2-rc.1 (exact rc enumeration): declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.5-rc.3 use the 0.17.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./lib/index.js",
|
|
9
9
|
"./client": "./lib/client.js",
|
|
10
|
+
"./locale/*.json": "./locale/*.json",
|
|
10
11
|
"./dsh-plugin.json": "./dsh-plugin.json",
|
|
11
12
|
"./package.json": "./package.json"
|
|
12
13
|
},
|
|
@@ -14,14 +15,27 @@
|
|
|
14
15
|
"lib/",
|
|
15
16
|
"bin/",
|
|
16
17
|
"runtime/",
|
|
18
|
+
"locale/",
|
|
17
19
|
"cordis.patch.yml",
|
|
18
20
|
"dsh-plugin.json",
|
|
21
|
+
"README.md",
|
|
22
|
+
"README.de.md",
|
|
23
|
+
"README.es.md",
|
|
24
|
+
"README.fr.md",
|
|
25
|
+
"README.it.md",
|
|
26
|
+
"README.ru.md",
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"CHANGELOG.de.md",
|
|
29
|
+
"CHANGELOG.es.md",
|
|
30
|
+
"CHANGELOG.fr.md",
|
|
31
|
+
"CHANGELOG.it.md",
|
|
32
|
+
"CHANGELOG.ru.md",
|
|
19
33
|
"THIRD_PARTY_NOTICES.md",
|
|
20
34
|
"!**/*.map"
|
|
21
35
|
],
|
|
22
36
|
"dsh": {
|
|
23
37
|
"engines": {
|
|
24
|
-
"dsh": ">=0.1.7-rc.1 <0.3.0"
|
|
38
|
+
"dsh": ">=0.1.7-rc.1 <0.3.0-0"
|
|
25
39
|
},
|
|
26
40
|
"bundle": {
|
|
27
41
|
"patch": "./cordis.patch.yml"
|
|
@@ -56,12 +70,12 @@
|
|
|
56
70
|
"@deepseek-ai/schemastery": "^3.18.4"
|
|
57
71
|
},
|
|
58
72
|
"peerDependencies": {
|
|
59
|
-
"@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.3.0",
|
|
60
|
-
"@deepseek-ai/dsh-client-store": ">=0.1.7-rc.1 <0.3.0",
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.7-rc.1 <0.3.0",
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.3.0",
|
|
63
|
-
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.3.0",
|
|
64
|
-
"@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.3.0",
|
|
73
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.3.0-0",
|
|
74
|
+
"@deepseek-ai/dsh-client-store": ">=0.1.7-rc.1 <0.3.0-0",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.7-rc.1 <0.3.0-0",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.3.0-0",
|
|
77
|
+
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.3.0-0",
|
|
78
|
+
"@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.3.0-0",
|
|
65
79
|
"react": "^18.2.0"
|
|
66
80
|
},
|
|
67
81
|
"peerDependenciesMeta": {
|
|
@@ -90,12 +104,12 @@
|
|
|
90
104
|
"@deepseek-ai/dsh-agent": "^0.2.1-rc.3",
|
|
91
105
|
"@deepseek-ai/dsh-llm": "^0.2.1-rc.3",
|
|
92
106
|
"@deepseek-ai/dsh-ptc-runtime": "^0.2.1-rc.3",
|
|
93
|
-
"@deepseek-ai/dsh-sandbox": "0.2.1-rc.3",
|
|
107
|
+
"@deepseek-ai/dsh-sandbox": "^0.2.1-rc.3",
|
|
94
108
|
"@deepseek-ai/dsh-sandbox-policy": "^0.2.1-rc.3",
|
|
95
109
|
"@deepseek-ai/dsh-scope": "^0.2.1-rc.3",
|
|
96
110
|
"@deepseek-ai/dsh-session": "^0.2.1-rc.3",
|
|
97
111
|
"@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.3",
|
|
98
|
-
"@deepseek-ai/dsh-tools": "0.
|
|
112
|
+
"@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.3.0-0",
|
|
99
113
|
"@deepseek-ai/dsh-user-approval": "^0.2.1-rc.3",
|
|
100
114
|
"@deepseek-ai/dsh-working-directory": "^0.2.1-rc.3",
|
|
101
115
|
"@types/node": "^22.20.1",
|
|
@@ -109,7 +123,7 @@
|
|
|
109
123
|
},
|
|
110
124
|
"engines": {
|
|
111
125
|
"node": ">=22",
|
|
112
|
-
"dsh": "0.1.7-rc.1
|
|
126
|
+
"dsh": ">=0.1.7-rc.1 <0.3.0-0"
|
|
113
127
|
},
|
|
114
128
|
"license": "MIT",
|
|
115
129
|
"repository": {
|
|
@@ -68,6 +68,14 @@ const LAUNCH_FLAGS = [
|
|
|
68
68
|
// without first going through useSpace+ensureRealTab; the structured tools
|
|
69
69
|
// all do, so it no longer applies.
|
|
70
70
|
"--no-startup-window",
|
|
71
|
+
// macOS Chrome 156 has been observed keeping the cookie jar in memory while
|
|
72
|
+
// leaving Default/Cookies empty (#93). `--use-mock-keychain` lets Chrome use
|
|
73
|
+
// its test keychain instead of the login keychain; opt-in only, because it
|
|
74
|
+
// weakens at-rest protection. The plugin's `chromeArgs` setting can pass this
|
|
75
|
+
// too; the env var keeps the diagnostic reproducible without editing config.
|
|
76
|
+
...(process.platform === "darwin" && process.env.EGO_LINUX_USE_MOCK_KEYCHAIN === "1"
|
|
77
|
+
? ["--use-mock-keychain"]
|
|
78
|
+
: []),
|
|
71
79
|
];
|
|
72
80
|
|
|
73
81
|
// ── user-defined extra Chrome args (mirrors lib/config.js) ──────────────────
|
|
@@ -158,6 +166,45 @@ async function exists(path) {
|
|
|
158
166
|
}
|
|
159
167
|
}
|
|
160
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Platform installation paths that PATH lookup cannot find (#95).
|
|
171
|
+
*
|
|
172
|
+
* macOS browsers live inside `.app` bundles; Windows installs under Program
|
|
173
|
+
* Files/LocalAppData. These paths are only checked after `which`/`where`
|
|
174
|
+
* misses, so a PATH-provided binary still wins.
|
|
175
|
+
*/
|
|
176
|
+
function installPathCandidates() {
|
|
177
|
+
const out = [];
|
|
178
|
+
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
179
|
+
if (process.platform === "darwin") {
|
|
180
|
+
const bundles = [
|
|
181
|
+
["Google Chrome", "Google Chrome"],
|
|
182
|
+
["Chromium", "Chromium"],
|
|
183
|
+
["Microsoft Edge", "Microsoft Edge"],
|
|
184
|
+
["Brave Browser", "Brave Browser"],
|
|
185
|
+
["Tungsten Edge", "Tungsten Edge"],
|
|
186
|
+
];
|
|
187
|
+
for (const base of ["/Applications", ...(home ? [join(home, "Applications")] : [])]) {
|
|
188
|
+
for (const [bundle, binary] of bundles) {
|
|
189
|
+
out.push(join(base, `${bundle}.app`, "Contents", "MacOS", binary));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
} else if (process.platform === "win32") {
|
|
193
|
+
const roots = [
|
|
194
|
+
process.env.PROGRAMFILES,
|
|
195
|
+
process.env["PROGRAMFILES(X86)"],
|
|
196
|
+
process.env.LOCALAPPDATA,
|
|
197
|
+
].filter(Boolean);
|
|
198
|
+
const relatives = [
|
|
199
|
+
["Google", "Chrome", "Application", "chrome.exe"],
|
|
200
|
+
["Microsoft", "Edge", "Application", "msedge.exe"],
|
|
201
|
+
["BraveSoftware", "Brave-Browser", "Application", "brave.exe"],
|
|
202
|
+
];
|
|
203
|
+
for (const root of roots) for (const rel of relatives) out.push(join(root, ...rel));
|
|
204
|
+
}
|
|
205
|
+
return out;
|
|
206
|
+
}
|
|
207
|
+
|
|
161
208
|
async function resolveBinary() {
|
|
162
209
|
for (const candidate of BINARY_CANDIDATES) {
|
|
163
210
|
if (isAbsolute(candidate)) {
|
|
@@ -167,6 +214,12 @@ async function resolveBinary() {
|
|
|
167
214
|
const found = await which(candidate);
|
|
168
215
|
if (found) return found;
|
|
169
216
|
}
|
|
217
|
+
// PATH lookup missed everywhere (macOS Chrome is never on PATH; Windows
|
|
218
|
+
// installs may not be either). Fall back to well-known install locations
|
|
219
|
+
// before giving up (#95).
|
|
220
|
+
for (const candidate of installPathCandidates()) {
|
|
221
|
+
if (await exists(candidate)) return candidate;
|
|
222
|
+
}
|
|
170
223
|
throw new Error(
|
|
171
224
|
`no Chrome/Chromium binary found (tried: ${BINARY_CANDIDATES.join(", ")}). ` +
|
|
172
225
|
`Set EGO_LINUX_CHROME to an absolute path.`,
|
|
@@ -577,12 +630,19 @@ async function spawnXvfb(num) {
|
|
|
577
630
|
* displays are ours to terminate.
|
|
578
631
|
*/
|
|
579
632
|
export async function ensureXDisplay({ ignoreEnvDisplay = false } = {}) {
|
|
580
|
-
// Windows
|
|
581
|
-
// directly (the v0.4.0 Windows adaptation
|
|
582
|
-
// the headed path alive without ever
|
|
583
|
-
// start failed with "no X display ...
|
|
584
|
-
|
|
585
|
-
|
|
633
|
+
// Windows and macOS have a desktop session and no X server: Chrome opens a
|
|
634
|
+
// real window directly (the v0.4.0 Windows adaptation, and the same shape on
|
|
635
|
+
// macOS). Returning a pseudo display keeps the headed path alive without ever
|
|
636
|
+
// touching Xvfb (issue: post-merge cold start failed with "no X display ...
|
|
637
|
+
// no Xvfb binary on PATH").
|
|
638
|
+
//
|
|
639
|
+
// macOS is the same shape as Windows here: the GUI is Aqua/Quartz, $DISPLAY is
|
|
640
|
+
// never exported, Xvfb does not exist in that ecosystem, and Chrome draws
|
|
641
|
+
// through Cocoa/WindowServer rather than X11 (#65). The pseudo value is
|
|
642
|
+
// harmless — DISPLAY is only handed to the child inside spawnAndAwait(), and
|
|
643
|
+
// Chrome never reads it on darwin.
|
|
644
|
+
if (process.platform === "win32" || process.platform === "darwin") {
|
|
645
|
+
return { display: process.env.DISPLAY || `${process.platform}-desktop`, pid: null, launched: false };
|
|
586
646
|
}
|
|
587
647
|
if (!ignoreEnvDisplay && (await displayUsable(process.env.DISPLAY))) {
|
|
588
648
|
return { display: process.env.DISPLAY, pid: null, launched: false };
|
|
@@ -3,6 +3,7 @@ import { join } from "node:path";
|
|
|
3
3
|
|
|
4
4
|
const HOME = homedir();
|
|
5
5
|
const IS_WIN = process.platform === "win32";
|
|
6
|
+
const IS_MAC = process.platform === "darwin";
|
|
6
7
|
|
|
7
8
|
/** Persistent browser profile — the Linux stand-in for the ego lite app's profile. */
|
|
8
9
|
export const DATA_DIR = IS_WIN
|
|
@@ -27,9 +28,16 @@ export const CHROME_CONFIG_CANDIDATES = IS_WIN
|
|
|
27
28
|
join(process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)", "Google", "Chrome", "User Data"),
|
|
28
29
|
join(process.env.LOCALAPPDATA || join(HOME, "AppData", "Local"), "Microsoft", "Edge", "User Data"),
|
|
29
30
|
]
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
: IS_MAC
|
|
32
|
+
? [
|
|
33
|
+
join(HOME, "Library", "Application Support", "Google", "Chrome"),
|
|
34
|
+
join(HOME, "Library", "Application Support", "Chromium"),
|
|
35
|
+
join(HOME, "Library", "Application Support", "Microsoft Edge"),
|
|
36
|
+
join(HOME, "Library", "Application Support", "BraveSoftware", "Brave-Browser"),
|
|
37
|
+
]
|
|
38
|
+
: [
|
|
39
|
+
join(HOME, ".config", "google-chrome"),
|
|
40
|
+
join(HOME, ".config", "chromium"),
|
|
41
|
+
join(HOME, ".config", "microsoft-edge"),
|
|
42
|
+
join(HOME, ".config", "BraveSoftware", "Brave-Browser"),
|
|
43
|
+
];
|