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

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/lib/index.js CHANGED
@@ -3417,16 +3417,39 @@ function writeJson(res, status, body) {
3417
3417
  res.end(text);
3418
3418
  }
3419
3419
  //#endregion
3420
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js
3420
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-error@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1/node_modules/@deepseek-ai/dsh-error/lib/index.js
3421
+ /**
3422
+ * Harness error base with a stable machine-routable code and chained cause.
3423
+ * Package errors extend it so tool results and replay can retain failure class.
3424
+ * @module @deepseek-ai/dsh-error
3425
+ */
3426
+ /**
3427
+ * Base class for all harness errors. Carries a `code` (stable, programmatic —
3428
+ * e.g. `NO_ADAPTER`, `INVALID_ARGS`) distinct from the
3429
+ * human-readable `message`, and supports `cause` chaining via the standard
3430
+ * `ErrorOptions`. `name` defaults to the subclass constructor name.
3431
+ */
3432
+ var HarnessError = class extends Error {
3433
+ /** Stable machine-routable failure class (e.g. `RATE_LIMIT`); route on this, never by parsing `message`. */
3434
+ code;
3435
+ constructor(message, code, options) {
3436
+ super(message, options);
3437
+ this.code = code;
3438
+ this.name = new.target.name;
3439
+ }
3440
+ };
3441
+ //#endregion
3442
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1_@deeps_6153b0a06151bba505d5f32876686bf8/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js
3421
3443
  /** The one Remote failure class shared by owners, the Gateway, and consumers. */
3422
3444
  /**
3423
- * One Remote call failure: a real Error carrying its stable code and typed
3445
+ * One Remote call failure: a `HarnessError` carrying its stable code and typed
3424
3446
  * details. Owners throw it at the failure point; the Host Gateway encodes it
3425
3447
  * onto the wire unchanged; the Client face rebuilds an instance for the
3426
3448
  * `RemoteResult` error branch, so `throw result.error` keeps throw semantics.
3427
- * Discrimination is always by `code`, never by instanceof.
3449
+ * A tool body that throws it records `name: 'RemoteError'` and its Remote code
3450
+ * on `tool/result`. Discrimination is always by `code`, never by instanceof.
3428
3451
  */
3429
- var RemoteError = class extends Error {
3452
+ var RemoteError = class extends HarnessError {
3430
3453
  code;
3431
3454
  details;
3432
3455
  /** Structural marker: cross-realm/bundle identification never uses instanceof. */
@@ -3438,7 +3461,7 @@ var RemoteError = class extends Error {
3438
3461
  * @param options - standard Error options (`cause` survives in-process only).
3439
3462
  */
3440
3463
  constructor(code, message, details, options) {
3441
- super(message, options);
3464
+ super(message, code, options);
3442
3465
  this.code = code;
3443
3466
  this.details = details;
3444
3467
  this.name = "RemoteError";
@@ -3504,8 +3527,8 @@ var TypertRemoteService = class extends Service {
3504
3527
  * tree registers it on the root, where it outlives any one Service.
3505
3528
  */
3506
3529
  function provideInvocationAccessor(ctx) {
3507
- if (Object.hasOwn(ctx.root.reflect.props, "invocation")) return;
3508
- ctx.root.accessor("invocation", { get: () => void 0 });
3530
+ if (Object.hasOwn(ctx[Context.root].reflect.props, "invocation")) return;
3531
+ ctx[Context.root].accessor("invocation", { get: () => void 0 });
3509
3532
  }
3510
3533
  function Remote(methodExportOrOptions, context) {
3511
3534
  if (typeof methodExportOrOptions === "string") {
@@ -3599,7 +3622,7 @@ function validateName(subject, value) {
3599
3622
  if (!isTypertRemoteSegment(value)) throw new TypeError(`typert-protocol: ${subject} must contain only RPC endpoint segment characters`);
3600
3623
  }
3601
3624
  //#endregion
3602
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-util-values/lib/index.js
3625
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1/node_modules/@deepseek-ai/dsh-util-values/lib/index.js
3603
3626
  /**
3604
3627
  * Lazily scanned view of one JSON object's top-level fields, built from text
3605
3628
  * that may still be streaming or from an already parsed object. Nothing is
@@ -4418,7 +4441,7 @@ function deepFreeze(value) {
4418
4441
  return value;
4419
4442
  }
4420
4443
  //#endregion
4421
- //#region ../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.9.0/node_modules/@deepseek-ai/cosmokit/lib/index.js
4444
+ //#region ../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.10.0-alpha.1/node_modules/@deepseek-ai/cosmokit/lib/index.js
4422
4445
  /** Return true when a value is `null` or `undefined`. */
4423
4446
  function isNullable(value) {
4424
4447
  return value === null || value === void 0;
@@ -4672,7 +4695,7 @@ var Time;
4672
4695
  Time.template = template;
4673
4696
  })(Time || (Time = {}));
4674
4697
  //#endregion
4675
- //#region ../../node_modules/.pnpm/@deepseek-ai+schemastery@3.19.0/node_modules/@deepseek-ai/schemastery/lib/index.mjs
4698
+ //#region ../../node_modules/.pnpm/@deepseek-ai+schemastery@3.20.0-alpha.1/node_modules/@deepseek-ai/schemastery/lib/index.mjs
4676
4699
  const kSchema = Symbol.for("schemastery");
4677
4700
  const kValidationError = Symbol.for("ValidationError");
4678
4701
  globalThis.__schemastery_index__ ??= 0;
@@ -5305,41 +5328,11 @@ defineMethod("transform", [
5305
5328
  "preserve"
5306
5329
  ], ({ inner }, isInner) => inner.toString(isInner));
5307
5330
  //#endregion
5308
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-timeout/lib/index.js
5331
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1/node_modules/@deepseek-ai/dsh-timeout/lib/index.js
5309
5332
  /** Largest delay Node schedules without clamping it to one millisecond. */
5310
5333
  const MAX_TIMER_DELAY_MS = 2147483647;
5311
5334
  //#endregion
5312
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-error@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-error/lib/index.js
5313
- /**
5314
- * Harness error base with a stable machine-routable code and chained cause.
5315
- * Package errors extend it so tool results and replay can retain failure class.
5316
- * @module @deepseek-ai/dsh-error
5317
- */
5318
- /**
5319
- * Base class for all harness errors. Carries a `code` (stable, programmatic —
5320
- * e.g. `NO_ADAPTER`, `INVALID_ARGS`) distinct from the
5321
- * human-readable `message`, and supports `cause` chaining via the standard
5322
- * `ErrorOptions`. `name` defaults to the subclass constructor name.
5323
- */
5324
- var HarnessError = class extends Error {
5325
- /** Stable machine-routable failure class (e.g. `RATE_LIMIT`); route on this, never by parsing `message`. */
5326
- code;
5327
- constructor(message, code, options) {
5328
- super(message, options);
5329
- this.code = code;
5330
- this.name = new.target.name;
5331
- }
5332
- };
5333
- //#endregion
5334
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-llm@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0_@deepseek-ai+dsh-error@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0_/node_modules/@deepseek-ai/dsh-llm/lib/index.js
5335
- /**
5336
- * Detach and deep-freeze a message whose identity already exists.
5337
- * @param message - complete message, including its stable identity.
5338
- * @returns an immutable snapshot that preserves the identity.
5339
- */
5340
- function freezeMessage(message) {
5341
- return deepFreeze(structuredClone(message));
5342
- }
5335
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-llm@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1_@deepseek-ai+dsh-e_3734babba1c9d85ae3e99b1bc6b8c6ed/node_modules/@deepseek-ai/dsh-llm/lib/index.js
5343
5336
  /**
5344
5337
  * LLM failure codes and helpers over the shared Harness error base. The base
5345
5338
  * class lives in `@deepseek-ai/dsh-error` and is re-exported here, so both
@@ -5358,6 +5351,7 @@ const LLM_FAILURE_CODES = {
5358
5351
  ACCOUNT_TOKEN_INVALID: {},
5359
5352
  AUTH: {},
5360
5353
  CLIENT_UPGRADE_REQUIRED: {},
5354
+ CONTENT_REFUSED: {},
5361
5355
  CONTEXT_WINDOW_EXCEEDED: {},
5362
5356
  DISCOVERY_FAILED: {},
5363
5357
  DISCOVERY_UNSUPPORTED: {},
@@ -5421,6 +5415,14 @@ new RegExp(String.raw`(?:^|[^a-z0-9])context[\s_-](?:length|window)[\s_-]` + Str
5421
5415
  new RegExp(String.raw`\b(?:request|prompt|input|messages?)\s+(?:is\s+|are\s+)?` + String.raw`too\s+(?:large|long)\s+for\s+(?:(?:this|the)\s+)?` + String.raw`(?:model(?:'s)?\s+)?context(?:\s+window)?\b`, "i");
5422
5416
  new RegExp(String.raw`\b(?:input|prompt|request|messages?)\b.{0,40}` + String.raw`\b(?:exceed(?:s|ed)?|overflows?|is\s+larger\s+than)\b.{0,40}` + String.raw`\b(?:the\s+)?(?:model(?:'s)?\s+)?context(?:\s+(?:length|window))?\b`, "i");
5423
5417
  /**
5418
+ * Detach and deep-freeze a message whose identity already exists.
5419
+ * @param message - complete message, including its stable identity.
5420
+ * @returns an immutable snapshot that preserves the identity.
5421
+ */
5422
+ function freezeMessage(message) {
5423
+ return deepFreeze(structuredClone(message));
5424
+ }
5425
+ /**
5424
5426
  * Provider-owned request-retry policy configuration and resolution.
5425
5427
  *
5426
5428
  * Adapters expose one resolved policy per registered provider route; the
@@ -5614,10 +5616,11 @@ function failureSnapshot(value) {
5614
5616
  }
5615
5617
  /** Read an SDK error message without letting an accessor replace the primary failure. */
5616
5618
  function errorMessage(error) {
5619
+ let message;
5617
5620
  try {
5618
- const message = error.message;
5619
- if (typeof message === "string" && message.length > 0) return message;
5621
+ message = error.message;
5620
5622
  } catch (_sdkMessageGetter) {}
5623
+ if (typeof message === "string" && message.length > 0) return message;
5621
5624
  return "LLM adapter failed";
5622
5625
  }
5623
5626
  /** Trust only Harness-owned codes; third-party SDK codes are not our taxonomy. */
@@ -6227,7 +6230,7 @@ var LlmError = class LlmError extends HarnessError {
6227
6230
  * @param provider - registered provider route.
6228
6231
  * @param model - exact model id.
6229
6232
  * @param image - normalized image reference.
6230
- * @returns dimensions and byte target used by the adapter's request serializer.
6233
+ * @returns maximum dimensions and byte budgets used by the request serializer; readImageRequest returns the actual encoded dimensions.
6231
6234
  */
6232
6235
  imageRequestTarget(provider, model, image) {
6233
6236
  return this.registration(provider).adapter.imageRequestTarget(provider, model, image);
@@ -6600,7 +6603,7 @@ function detachDirectoryEntry(entry) {
6600
6603
  };
6601
6604
  }
6602
6605
  //#endregion
6603
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-tools@0.2.2-rc.3_c6df380a2007cdef080fa53578fb6f5f/node_modules/@deepseek-ai/dsh-tools/lib/shared-DGx6D7zk.js
6606
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-tools@0.2.3-alpha.2_fe5258332cf8d58c43bca084c938026e/node_modules/@deepseek-ai/dsh-tools/lib/shared-DGx6D7zk.js
6604
6607
  /** The selected provider is missing or unloaded; another provider must not take its calls. */
6605
6608
  var ToolExecutorUnavailableError = class extends HarnessError {
6606
6609
  constructor() {
@@ -7137,7 +7140,7 @@ var ToolActivationError = class extends HarnessError {
7137
7140
  }
7138
7141
  };
7139
7142
  //#endregion
7140
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-scope@0.2.2-rc.3_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-scope/lib/index.js
7143
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-scope@0.2.3-alpha.2_@deepseek-ai+cordis@4.2.0-alpha.1/node_modules/@deepseek-ai/dsh-scope/lib/index.js
7141
7144
  /**
7142
7145
  * Shared insertion-ordered storage and effect ownership for scope-aware registries.
7143
7146
  *
@@ -7390,7 +7393,7 @@ function scopeOf(ctx) {
7390
7393
  return ctx[kScope];
7391
7394
  }
7392
7395
  //#endregion
7393
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-tools@0.2.2-rc.3_c6df380a2007cdef080fa53578fb6f5f/node_modules/@deepseek-ai/dsh-tools/lib/index.js
7396
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-tools@0.2.3-alpha.2_fe5258332cf8d58c43bca084c938026e/node_modules/@deepseek-ai/dsh-tools/lib/index.js
7394
7397
  /** Unified JSON-value schema DSL, inference, compilation, and tool definition helpers. @module dsh-tools/schema */
7395
7398
  const ANNOTATION_KEYS = [
7396
7399
  "description",
@@ -7966,6 +7969,7 @@ var GuardLayer = class {
7966
7969
  /**
7967
7970
  * Provide the executor for the calling scope; an unscoped contribution is the deployment default.
7968
7971
  * Rendering any executor-owned section requires the viewing scope's selection to remain available.
7972
+ * Disposal retires its sections; a replacement's same-name sections supersede those notices.
7969
7973
  * @param executor - initialized provider owned by the contributing plugin.
7970
7974
  * @returns the effect disposer. Unloading leaves the selection unavailable until it is replaced.
7971
7975
  */
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.20",
4
+ "version": "0.4.22",
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.2-rc.3"
25
+ "dsh": ">=0.2.3-alpha.2"
26
26
  },
27
27
  "bundle": {
28
28
  "patch": "./cordis.patch.yml"
@@ -45,26 +45,26 @@
45
45
  "ws": "^8.18.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@deepseek-ai/dsh": ">=0.2.2-rc.3",
48
+ "@deepseek-ai/dsh": ">=0.2.3-alpha.2",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@deepseek-ai/cordis": "^4.1.0",
54
- "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.3",
55
- "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.3",
56
- "@deepseek-ai/dsh-client-store": "0.2.2-rc.3",
57
- "@deepseek-ai/dsh-client-ui-layout": "^0.2.2-rc.3",
58
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.3",
59
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-rc.3",
60
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.3",
61
- "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.3",
62
- "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.2-rc.3",
63
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.3",
64
- "@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.3",
65
- "@deepseek-ai/dsh-system-prompt": "^0.2.2-rc.3",
66
- "@deepseek-ai/dsh-tools": "^0.2.2-rc.3",
67
- "@deepseek-ai/schemastery": "^3.19.0",
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",
68
68
  "@types/node": "^22.20.0",
69
69
  "@types/react": "~18.3.1",
70
70
  "@types/react-dom": "^18.3.5",