dsh-starlite 0.1.0-alpha.0 → 0.1.0-alpha.2

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 CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  用动作和气泡陪伴你的 DSH 工作。**安装一个插件,启动 DSH 即默认使用微光**,无需另装软件或手动导入资源。
4
4
 
5
- Alpha `0.1.0-alpha.0`,需要 Windows 11 x64、WebView2,以及官方 Windows 桌面版、Windows 原生 CLI/Web 或 WSL2 DSH。
5
+ Alpha `0.1.0-alpha.2`,需要 Windows 11 x64、WebView2,以及官方 Windows 桌面版、Windows 原生 CLI/Web 或 WSL2 DSH。
6
+
7
+ [先看模型效果](https://starcried.github.io/)(桌面浏览器,无需安装;工作状态与问答需安装插件)。
8
+
9
+ **快速开始**:[自己安装](#安装与启动) · [让 Agent 安装](#让-agent-帮你)
6
10
 
7
11
  ## 安装与启动
8
12
 
@@ -19,6 +23,29 @@ dsh --profile web
19
23
 
20
24
  **使用微光即表示同意其独立许可;不同意请在模型列表选择「不显示模型」。** 模型卡片可切换模型或查看许可,「添加 VRM 模型」直接选择文件,详细要求可点「查看导入说明」;设置自动保存。当前仅支持 VRM,Inochi2D 导入和显示已停用。
21
25
 
26
+ ## 让 Agent 帮你
27
+
28
+ 把下面这段发给能操作本机的 Agent,它会按[安装指南](https://github.com/StarCried/starlite-dsh/blob/main/docs/user-guide.md)识别环境并完成安装:
29
+
30
+ ```text
31
+ 请阅读 https://github.com/StarCried/starlite-dsh/blob/main/docs/user-guide.md
32
+ 为我正在使用的 DeepSeek Harness 安装 npm 已发布的 dsh-starlite@alpha。
33
+ 先识别 Windows 桌面版、Windows CLI/Web 或 WSL2 及实际 profile,使用对应安装入口。
34
+ 保留模型和偏好,不升级 DSH、不另开第二个 Host。
35
+ 完成不调用付费模型 API 的本地检查,告诉我如何启动和打开设置。
36
+ ```
37
+
38
+ <details>
39
+ <summary>只想先了解用法?复制这个提示词</summary>
40
+
41
+ ```text
42
+ 请阅读 https://github.com/StarCried/starlite-dsh/blob/main/docs/user-guide.md
43
+ 结合我的 DSH 安装方式,简要说明如何启动、升级、换模型和设置气泡。
44
+ 这次只解释,不安装或修改配置。
45
+ ```
46
+
47
+ </details>
48
+
22
49
  ## 日常使用
23
50
 
24
51
  单击模型回应并查看费用;双击在桌面应用或浏览器打开当前会话,无会话时打开 DSH;拖动身体移动桌宠。右键或托盘打开设置。工作气泡可选精简/详细模式,普通问题可直接在气泡里选择或输入。
@@ -29,6 +56,6 @@ dsh --profile web
29
56
 
30
57
  [安装、升级与卸载](https://github.com/StarCried/starlite-dsh/blob/main/docs/user-guide.md) · [换模型与动作](https://github.com/StarCried/starlite-dsh/blob/main/docs/model-import.md) · [气泡、费用与隐私](https://github.com/StarCried/starlite-dsh/blob/main/docs/companion-interactions.md)
31
58
 
32
- 自己的标准人形 VRM 需要有效的人形映射和眨眼表达,无动作时自动使用自带基础待机;模型内的动作会自动列出供映射。桌宠准备、下载或兼容性检查失败时,DSH 仍可正常运行。API Key、用户提示、工具参数/结果和真实会话 ID 不发送给桌宠。桌面版关闭主窗口只隐藏界面,须从 DSH 托盘退出才停止 Host。
59
+ 自己的标准人形 VRM 需要有效的人形映射,无动作时自动使用自带基础待机;眨眼和眼球跟随是可选能力,缺少时仍可使用。模型内的动作会自动列出供映射;模型卡片可移除不用的模型,源文件保留,重启不重新添加。桌宠准备、下载或兼容性检查失败时,DSH 仍可正常运行。API Key、用户提示、工具参数/结果和真实会话 ID 不发送给桌宠。桌面版关闭主窗口只隐藏界面,须从 DSH 托盘退出才停止 Host。
33
60
 
34
61
  程序 BSD-2-Clause;默认待机随程序提供,来源见开发文档。微光及其其他动作独立授权,不打包在 npm 插件内。Windows 程序目前未签名。
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "platform": "windows-x64",
5
5
  "executable": {
6
6
  "file": "dsh-inochi2d-pet.exe",
7
- "sha256": "cd1727051a6ad9faf0250b2877ee93a8772bb262829c3a01015f2138ca282b76",
8
- "bytes": 11451392
7
+ "sha256": "ba429f395ca855cf6b47ea611876ed038c7a231021d46e7a7e02fdf36f49c711",
8
+ "bytes": 11785728
9
9
  },
10
10
  "defaultModel": {
11
11
  "title": "微光v3.0",
package/dist/index.js CHANGED
@@ -13,6 +13,22 @@ var __export = (target, all) => {
13
13
  __defProp(target, name2, { get: all[name2], enumerable: true });
14
14
  };
15
15
 
16
+ // src/startup-error.ts
17
+ var DshStartupError;
18
+ var init_startup_error = __esm({
19
+ "src/startup-error.ts"() {
20
+ "use strict";
21
+ DshStartupError = class extends Error {
22
+ constructor(code) {
23
+ super(code === "unsupported-platform" ? "StarLite for DSH requires Windows 11 x64, either directly or through WSL2 x64 on that Windows host. Other platforms and architectures are unsupported; DSH will continue without the companion." : "StarLite for DSH is disabled because this DSH build does not provide the required plugin API. Update DSH and StarLite to compatible versions; DSH will continue without the companion.");
24
+ this.code = code;
25
+ this.name = "DshStartupError";
26
+ }
27
+ code;
28
+ };
29
+ }
30
+ });
31
+
16
32
  // ../protocol/src/billing.ts
17
33
  function parseBillingSnapshot(value) {
18
34
  const root = record(value);
@@ -1105,7 +1121,7 @@ async function shouldAcquireDefaultModel(path) {
1105
1121
  if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
1106
1122
  if (!("schemaVersion" in value)) return false;
1107
1123
  if (value.schemaVersion === 4) {
1108
- return "activeModelId" in value && typeof value.activeModelId === "string" && value.activeModelId.length > 0 && value.activeModelId.length <= 128 && !/[\p{Cc}]/u.test(value.activeModelId);
1124
+ return "activeModelId" in value && value.activeModelId === "weiguang-default";
1109
1125
  }
1110
1126
  if (![1, 2, 3].includes(value.schemaVersion)) return false;
1111
1127
  const preferences = "preferences" in value ? value.preferences : void 0;
@@ -2489,11 +2505,11 @@ __export(adapter_exports, {
2489
2505
  import { randomUUID as randomUUID6 } from "node:crypto";
2490
2506
  async function startDshAdapter(context, dependencies = {}) {
2491
2507
  if (!context || typeof context.on !== "function") {
2492
- throw new Error("incompatible DSH context: event subscription is unavailable");
2508
+ throw new DshStartupError("incompatible-api");
2493
2509
  }
2494
2510
  const host = (dependencies.host ?? detectCompanionHost)();
2495
2511
  if (!host) {
2496
- throw new Error("StarLite requires a Windows x64 or WSL2 x64 DSH Host");
2512
+ throw new DshStartupError("unsupported-platform");
2497
2513
  }
2498
2514
  const navigator = createDshNavigator(context, dependencies.openBrowser);
2499
2515
  const aggregator = new DshStateAggregator();
@@ -2631,8 +2647,12 @@ async function startDshAdapter(context, dependencies = {}) {
2631
2647
  };
2632
2648
  }
2633
2649
  function subscribeRequired(context, disposers, event, listener, options) {
2634
- const result = context.on(event, listener, options);
2635
- if (typeof result === "function") disposers.push(result);
2650
+ try {
2651
+ const result = context.on(event, listener, options);
2652
+ if (typeof result === "function") disposers.push(result);
2653
+ } catch {
2654
+ throw new DshStartupError("incompatible-api");
2655
+ }
2636
2656
  }
2637
2657
  function subscribeOptional(context, disposers, event, listener) {
2638
2658
  try {
@@ -2661,10 +2681,12 @@ var init_adapter = __esm({
2661
2681
  init_billing2();
2662
2682
  init_questions();
2663
2683
  init_navigation();
2684
+ init_startup_error();
2664
2685
  }
2665
2686
  });
2666
2687
 
2667
2688
  // src/index.ts
2689
+ init_startup_error();
2668
2690
  var name = "dsh-starlite";
2669
2691
  async function apply(context) {
2670
2692
  try {
@@ -2673,9 +2695,9 @@ async function apply(context) {
2673
2695
  return async () => {
2674
2696
  await dispose();
2675
2697
  };
2676
- } catch {
2698
+ } catch (error) {
2677
2699
  context.logger?.warn?.(
2678
- "StarLite for DSH is disabled because this DSH build is incompatible or the bridge could not start."
2700
+ error instanceof DshStartupError ? error.message : "StarLite for DSH could not start its local status bridge. Restart DSH and check the StarLite installation; DSH will continue without the companion."
2679
2701
  );
2680
2702
  return async () => void 0;
2681
2703
  }