@whyshu/argent 0.1.27 → 0.2.1

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
@@ -1,72 +1,23 @@
1
- # @whyshu/argent(启动器)
1
+ # @whyshu/argent(单插件)
2
2
 
3
- 一条命令启动**打包好的 dsh + Argent 插件/角色预设**,并管理本机 runner 常驻:
3
+ **一个 dsh bundle 同时服务 `dsh web` 与 DSH Desktop**(2026-11-07 由 `@whyshu/argent-web` + `@whyshu/argent-desktop` 合并)。
4
4
 
5
- ```bash
6
- npx -y @whyshu/argent login --server-url https://whyshu.com --phone <手机号> # 首跑登录(短信验证码,写 600 auth.json)
7
- npx -y @whyshu/argent pair --from-login --tenant ly-0001 # 用登录态签发 runner token(写 600 runner.json)
8
- npx -y @whyshu/argent web # 生成/复用 profile 并启动 dsh web(默认 http://127.0.0.1:3080)
9
- npx -y @whyshu/argent health # 版本/宿主/profile/端口/runner 配置自检
10
- npx -y @whyshu/argent setup # 只生成/更新 $DSH_HOME/profiles/argent,不启动
11
- npx -y @whyshu/argent service install # 生成 launchd(macOS)/ systemd(Linux)常驻 P4 runner
12
- ```
5
+ ## 职责
13
6
 
14
- - 启动器 **exact pin** `@deepseek-ai/dsh@0.2.1-rc.2`,避免混合版本事故;
15
- - profile 由启动器生成:bundles(base/web-app/argent-presets,可用 `--bundles a,b` 追加)+ 用户层 patch(默认角色 preset);
16
- - 发布包内置 `runner/argent-runner.mjs`,`service install` 可直接生成 launchd;
17
- - `setup` 会自动执行 `dsh plugin --profile argent install` 装配依赖(`--no-install` 可跳过);
18
- - 两种装配模式:本地仓库(`ARGENT_REPO`/`--repo`,插件用 `file:`)与**发布模式**(无本地 plugins/ 时用启动器 package.json 的 npm 版本);
19
- - 首跑写入 `$DSH_HOME/argent/runner.json`(600,含 serverUrl/tenantAppId/runnerToken);
20
- - ⛔ 凭据不进包、不进日志;发布与客户机重装由交付方执行。
7
+ - 问述代理 provider(`whyshu`,与官方 `deepseek-official` 并存;默认模型带 `inputModalities: ['text','image']`)
8
+ - 一键登录(设备码)与 `refresh_token` 自动续期(写 credentials,不落盘明文)
9
+ - MCP 网关(`engine.*` / `erp.*` / `ml.*`):插件自注册,不需要 profile patch 再挂 `mcp-argent-*`
10
+ - ERP 机器通道(办公室现场 / 机器命令 / SKU 流程):按「先到先得」租约,抢到 poller 才轮询,否则纯 UI
11
+ - 伞伞桌宠 / 积分面板:`/api/argent/health`、`/api/argent/account`,客户端 bundle 轮询
12
+ - 计费互斥甲:`ARGENT_MACHINE_TASK=1` 时代理请求带 `x-argent-source: machine-task`,
13
+ 服务端只记 `cost_audit`(0 积分);MCP 工具调用计量 `points: 0`(只统计/审计)
21
14
 
22
- 本地仓库联调:`ARGENT_REPO=/path/to/argent-dsh node launcher/bin/argent.mjs setup --dsh-home /tmp/x`
23
- (从仓库 `plugins/` 用 `file:` 装配;正式发布时改用 npm 依赖解析)。
15
+ ## 安装(UI 面板)
24
16
 
25
- > 客户机更新的唯一口径(禁止 SSH/EasyTier、runtime 与插件的边界、自动更新设计)见
26
- > [`docs/客户机更新通道-唯一口径.md`](../docs/客户机更新通道-唯一口径.md)。
17
+ DSH web / DSH Desktop 的 **Plugins 面板**安装 `@whyshu/argent@0.2.0`;更新 = 卸载后重装新版本。
18
+ CLI/headless 场景用 `dsh plugin`;启动器 `@whyshu/argent@0.1.x` 已退役,不再需要。
27
19
 
28
- ## 客户机更新(outbound npm 通道,2026-10-22)
20
+ ## 边界
29
21
 
30
- 不再使用 SSH / EasyTier / `/dl`。客户机只访问 npm registry:
31
-
32
- ```bash
33
- # 只检查(不写任何东西)
34
- npx -y @whyshu/argent@latest update check --json
35
-
36
- # 真正更新 runtime + profile 插件(必须 --yes)
37
- npx -y @whyshu/argent@latest update run --yes
38
-
39
- # 看计划 / 指定版本 / 国内镜像
40
- npx -y @whyshu/argent@latest update run --dry-run
41
- npx -y @whyshu/argent@latest update run --yes --to 0.1.12
42
- npx -y @whyshu/argent@latest update check --registry https://registry.npmmirror.com
43
- ```
44
-
45
- `update run` 会:
46
-
47
- 1. 读取 npm `@whyshu/argent` 的 `latest` 版本;
48
- 2. 备份 profile 的 `package.json` / patch / lock;
49
- 3. 用目标版本启动器执行 `runtime install`;
50
- 4. **原地更新现有 profile 的插件版本**(不重建 profile、不丢 bundles);
51
- 5. 用客户机**真实 dsh** 执行 `dsh plugin --profile argent install`;
52
- 6. 用真实 dsh 执行 `health --json` 验收;
53
- 7. 返回 `restartRequired: true`,由空闲窗口重启宿主。
54
-
55
- ⛔ dsh 版本不等于启动器 exact pin 时,`update run` 会在改任何文件前停止;先升级宿主。
56
-
57
- 失败不会静默:保留更新前 profile 清单备份,并打印分步重试命令。当前不做自动重启。
58
-
59
- ## 运行资产更新(npm 通道,2026-10-19)
60
-
61
- 客户机脚本/技能随 `@whyshu/argent` 的 runtime 依赖一起更新,不需要 `/dl/`:
62
-
63
- ```bash
64
- # 下载并物化最新 runtime + skills(默认写入 ~/.argent-dsh 与 $DSH_HOME/skills)
65
- npx -y @whyshu/argent@latest runtime install
66
-
67
- # 只查看当前 runtime 版本
68
- npx -y @whyshu/argent@latest runtime status
69
- ```
70
-
71
- `runtime install` 只覆盖 runtime 包内文件,客户凭据与 `.git` 不动;被覆盖文件备份到
72
- `~/.argent-dsh/.runtime-backup/<时间戳>/`。可用 `--target` / `--skills-target` 覆盖落点。
22
+ - 数据目录判据在内核 `core/lib/argent-datadir.mjs`;引擎目录 `ARGENT_ENGINE_DIR` → `argent.json#engineDir` → 常见路径。
23
+ - 单实例:同一台机器不要同时跑两个宿主(web + desktop)抢同一 ERP 命令队列;租约只做降级不做跨机互斥。
@@ -0,0 +1,6 @@
1
+ # Argent 单插件 bundle patch:web 与 DSH Desktop 共用同一行 insert。
2
+ # 客户端形态同为 web(Electron 包着 dsh web),宿主注入同为 webServer ⇒ 一个包适配两端。
3
+ # `name:` 必须是 npm 包名(与 package.json#name 一致);`id:` 保持裸 id。
4
+ - insert:
5
+ - id: argent
6
+ name: '@whyshu/argent'