@linxin666/dsh-client-ui-browser-view 0.4.22 → 0.4.23

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.
@@ -3,7 +3,7 @@
3
3
  * @module @linxin666/dsh-client-ui-browser-view/client/settings-card
4
4
  */
5
5
  import type { Context as ClientContext } from '@deepseek-ai/cordis';
6
- import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
6
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots/client';
7
7
  import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
8
8
  import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
9
9
  import { type CardActions, type CardShell, type FieldState } from './settings-form.ts';
@@ -1,4 +1,4 @@
1
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
1
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots/client';
2
2
  import type { PluginConfigViewProps } from '@deepseek-ai/dsh-client-ui-plugin-manager/client';
3
3
  /** Configuration-seat keys for standalone and aggregate bundle rows. */
4
4
  export declare const BROWSER_VIEW_CONFIG_KEYS: readonly ["@linxin666/dsh-client-ui-browser-view#ui-browser-view", "@linxin666/dsh-client-ui-browser-view#web-ui-browser-view"];
@@ -12,7 +12,7 @@
12
12
  * the other. It is deliberately not the shipped browser tab's artwork: this tab
13
13
  * is a different implementation and does not pass itself off as that one.
14
14
  */
15
- import type { IconProps } from '@deepseek-ai/dsh-client-ui-primitives';
15
+ import type { IconProps } from '@deepseek-ai/dsh-client-ui-primitives/client';
16
16
  /**
17
17
  * Render the guide glyph.
18
18
  * @param props - square edge in px (the guide passes 22 or 26) and a layout class.
@@ -30,7 +30,7 @@
30
30
  */
31
31
  import type { Context as ClientContext } from '@deepseek-ai/cordis';
32
32
  import { type BrowserViewKey } from './locales.ts';
33
- declare module '@deepseek-ai/dsh-client-ui-slots' {
33
+ declare module '@deepseek-ai/dsh-client-ui-slots/client' {
34
34
  interface LocaleNamespaceMap {
35
35
  /** Browser-view surface copy. */
36
36
  'browser-view': BrowserViewKey;
@@ -1,4 +1,4 @@
1
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
1
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots/client';
2
2
  import type { BrowserViewLiveTitleStore } from './live-title.ts';
3
3
  import { type BrowserViewSocket, type BrowserViewSocketHandlers } from './socket.ts';
4
4
  /** Page-side socket factory; tests inject a fake transport through it. */
@@ -1,4 +1,4 @@
1
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
1
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots/client';
2
2
  import type { BrowserViewLiveTitleStore } from './live-title.ts';
3
3
  /** Business face injected into the chip. */
4
4
  export interface BrowserViewTabTitleFace {
@@ -13,6 +13,10 @@
13
13
  * (`ctx.connection.authenticatedUrl`), which is what makes the retry possible
14
14
  * without this package depending on that SDK.
15
15
  *
16
+ * With the official remote-connection plugin mounted, the same 401 renders
17
+ * that plugin's localized sign-in page instead of the sentence; it is
18
+ * recognized by {@link LOGIN_PAGE_EXPRESSION}.
19
+ *
16
20
  * If DSH rewords the challenge, {@link AUTH_CHALLENGE_TEXT} simply stops
17
21
  * matching: the capability degrades to showing the authentication page exactly
18
22
  * as before, and no other site's page is ever mistaken for ours.
@@ -24,6 +28,17 @@
24
28
  * a document that has no body yet, and `innerText` needs one.
25
29
  */
26
30
  export declare const DOCUMENT_TEXT_EXPRESSION = "document.body ? document.body.innerText : ''";
31
+ /**
32
+ * Script that recognizes the sign-in page a Host serves at its root once the
33
+ * official remote-connection plugin is mounted ("Connect to this Host"). Its
34
+ * copy is localized and has no fixed sentence to match, so the page is read
35
+ * by structure instead: the `h1#title` heading plus at least one sign-in
36
+ * method, the token form or the device-pairing element. Rendering one without
37
+ * the other is possible when the operator disables a method, which is why
38
+ * either counts. Like the bare refusal, this shape is not unique on its own,
39
+ * so a caller must also know the page came from this host's own listener.
40
+ */
41
+ export declare const LOGIN_PAGE_EXPRESSION = "document.querySelector('h1#title') !== null && document.querySelector('form#token-form, dsh-device-pairing') !== null";
27
42
  /**
28
43
  * The host seam that turns one clean URL into the same URL carrying the
29
44
  * process launch token. Typed structurally: the connection SDK package is not
@@ -328,12 +328,13 @@ export declare class BrowserViewService implements BrowserViewBackend {
328
328
  */
329
329
  private authTicketUrl;
330
330
  /**
331
- * Whether the tab's current document is DSH's authentication page. Two
332
- * pages count: the token exchange's own sentence, and the bare
333
- * `unauthorized` a post-#8266 Host answers when route admission refuses the
334
- * site root before that exchange runs. The bare refusal is generic to every
335
- * local service, so it only counts when the requested URL names this host's
336
- * own listener.
331
+ * Whether the tab's current document is DSH's authentication page. Three
332
+ * pages count: the token exchange's own sentence, the bare `unauthorized` a
333
+ * post-#8266 Host answers when route admission refuses the site root before
334
+ * that exchange runs, and the "Connect to this Host" sign-in page the
335
+ * official remote-connection plugin renders at the root. The last two are
336
+ * generic to any local service, so they only count when the requested URL
337
+ * is the root of this host's own listener.
337
338
  * @param tabId - tab to read.
338
339
  * @param url - the URL the caller asked to open.
339
340
  * @returns true when the page body is the challenge.
@@ -44,9 +44,8 @@ export interface AuthenticatedUrlContext {
44
44
  emit?(subject: unknown, event: string, baseUrl: string, entries: EntryUrlCandidate[]): unknown;
45
45
  }
46
46
  /**
47
- * Resolve the host's authenticated entry URL for `url` across SDK cohorts:
48
- * legacy hosts expose `connection.authenticatedUrl(url)`, while peer-auth
49
- * hosts collect entry URLs via `ctx.emit(webServer, 'webserver/entry-url', url, entries)`.
47
+ * Resolve the host's authenticated entry URL for `url` via the official
48
+ * `webserver/entry-url` event (`ctx.emit(webServer, 'webserver/entry-url', url, entries)`).
50
49
  */
51
50
  export declare function resolveAuthenticatedUrl(ctx: AuthenticatedUrlContext, url: string): string | undefined;
52
51
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linxin666/dsh-client-ui-browser-view",
3
3
  "description": "Right-docked live browser view for the DSH Web GUI: a CDP-driven Chromium the agent operates, a screencast panel the user watches, and screenshots attached to every tool result.",
4
- "version": "0.4.22",
4
+ "version": "0.4.23",
5
5
  "icon": "icon.svg",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dsh": {
24
24
  "engines": {
25
- "dsh": ">=0.2.3-alpha.2"
25
+ "dsh": ">=0.2.3-alpha.4"
26
26
  },
27
27
  "bundle": {
28
28
  "patch": "./cordis.patch.yml"
@@ -45,33 +45,33 @@
45
45
  "ws": "^8.18.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@deepseek-ai/dsh": ">=0.2.3-alpha.2",
49
- "react": "^18.2.0",
50
- "react-dom": "^18.2.0"
48
+ "@deepseek-ai/dsh": ">=0.2.3-alpha.4",
49
+ "react": "^19.3.1",
50
+ "react-dom": "^19.3.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@deepseek-ai/cordis": "~4.2.0-alpha.1",
54
- "@deepseek-ai/dsh-api-remotes": "0.2.3-alpha.2",
55
- "@deepseek-ai/dsh-client-locale": "^0.2.3-alpha.2",
56
- "@deepseek-ai/dsh-client-store": "0.2.3-alpha.2",
57
- "@deepseek-ai/dsh-client-ui-layout": "^0.2.3-alpha.2",
58
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.3-alpha.2",
59
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.3-alpha.2",
60
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.3-alpha.2",
61
- "@deepseek-ai/dsh-client-ui-settings": "0.2.3-alpha.2",
62
- "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.3-alpha.2",
63
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.3-alpha.2",
64
- "@deepseek-ai/dsh-host-webserver": "^0.2.3-alpha.2",
65
- "@deepseek-ai/dsh-system-prompt": "^0.2.3-alpha.2",
66
- "@deepseek-ai/dsh-tools": "^0.2.3-alpha.2",
67
- "@deepseek-ai/schemastery": "~3.20.0-alpha.1",
53
+ "@deepseek-ai/cordis": "~4.2.0-alpha.3",
54
+ "@deepseek-ai/dsh-api-remotes": "0.2.3-alpha.4",
55
+ "@deepseek-ai/dsh-client-locale": "^0.2.3-alpha.4",
56
+ "@deepseek-ai/dsh-client-store": "0.2.3-alpha.4",
57
+ "@deepseek-ai/dsh-client-ui-layout": "^0.2.3-alpha.4",
58
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.3-alpha.4",
59
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.3-alpha.4",
60
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.3-alpha.4",
61
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.3-alpha.4",
62
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.3-alpha.4",
63
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.3-alpha.4",
64
+ "@deepseek-ai/dsh-host-webserver": "^0.2.3-alpha.4",
65
+ "@deepseek-ai/dsh-system-prompt": "^0.2.3-alpha.4",
66
+ "@deepseek-ai/dsh-tools": "^0.2.3-alpha.4",
67
+ "@deepseek-ai/schemastery": "~3.20.0-alpha.3",
68
68
  "@types/node": "^22.20.0",
69
- "@types/react": "~18.3.1",
70
- "@types/react-dom": "^18.3.5",
69
+ "@types/react": "~19.3.2",
70
+ "@types/react-dom": "~19.3.0",
71
71
  "@types/ws": "^8.5.13",
72
72
  "jsdom": "29.1.1",
73
- "react": "^18.3.1",
74
- "react-dom": "^18.3.1",
73
+ "react": "^19.3.1",
74
+ "react-dom": "^19.3.1",
75
75
  "tsdown": "0.22.2",
76
76
  "typescript": "~5.7.2",
77
77
  "vite-tsconfig-paths": "^6.1.1",