@awiki/dsh-plugin 0.3.0-rc.2 → 0.3.0

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.
Files changed (42) hide show
  1. package/README.md +13 -13
  2. package/README.zh.md +12 -12
  3. package/THIRD_PARTY_NOTICES.md +0 -7
  4. package/lib/client.js +7288 -11380
  5. package/lib/client.js.map +1 -1
  6. package/lib/types/client/AwikiSettingsSection.d.ts +4 -18
  7. package/lib/types/client/AwikiSettingsSection.d.ts.map +1 -1
  8. package/lib/types/client/AwikiSettingsSection.js +7 -275
  9. package/lib/types/client/AwikiSettingsSection.js.map +1 -1
  10. package/lib/types/client/awiki-client-bridge.d.ts +18 -0
  11. package/lib/types/client/awiki-client-bridge.d.ts.map +1 -0
  12. package/lib/types/client/awiki-client-bridge.js +18 -0
  13. package/lib/types/client/awiki-client-bridge.js.map +1 -0
  14. package/lib/types/client/index.d.ts +3 -3
  15. package/lib/types/client/index.d.ts.map +1 -1
  16. package/lib/types/client/index.js +4 -46
  17. package/lib/types/client/index.js.map +1 -1
  18. package/lib/types/client/settings-locales.d.ts +2 -5
  19. package/lib/types/client/settings-locales.d.ts.map +1 -1
  20. package/lib/types/client/settings-locales.js +3 -189
  21. package/lib/types/client/settings-locales.js.map +1 -1
  22. package/package.json +57 -55
  23. package/lib/types/client/AwikiOnboarding.d.ts +0 -22
  24. package/lib/types/client/AwikiOnboarding.d.ts.map +0 -1
  25. package/lib/types/client/AwikiOnboarding.js +0 -107
  26. package/lib/types/client/AwikiOnboarding.js.map +0 -1
  27. package/lib/types/client/RechargeComingSoonDialog.d.ts +0 -11
  28. package/lib/types/client/RechargeComingSoonDialog.d.ts.map +0 -1
  29. package/lib/types/client/RechargeComingSoonDialog.js +0 -8
  30. package/lib/types/client/RechargeComingSoonDialog.js.map +0 -1
  31. package/lib/types/client/model-availability-controller.d.ts +0 -27
  32. package/lib/types/client/model-availability-controller.d.ts.map +0 -1
  33. package/lib/types/client/model-availability-controller.js +0 -111
  34. package/lib/types/client/model-availability-controller.js.map +0 -1
  35. package/lib/types/client/model-proxy-controller.d.ts +0 -45
  36. package/lib/types/client/model-proxy-controller.d.ts.map +0 -1
  37. package/lib/types/client/model-proxy-controller.js +0 -306
  38. package/lib/types/client/model-proxy-controller.js.map +0 -1
  39. package/lib/types/client/recharge-availability.d.ts +0 -6
  40. package/lib/types/client/recharge-availability.d.ts.map +0 -1
  41. package/lib/types/client/recharge-availability.js +0 -6
  42. package/lib/types/client/recharge-availability.js.map +0 -1
package/README.md CHANGED
@@ -27,8 +27,8 @@ TypeScript SDK `identity.json`; create a new Rust-backed identity after upgradin
27
27
  - User-triggered AI summaries for up to 50 recent or unread messages, kept only in runtime memory with explicit stale, retry, copy, and source-navigation states.
28
28
  - OTP identity access keeps the verification form visible and disables resend with a visible server-directed cooldown countdown. Handle classification happens before OTP delivery, so each attempt sends exactly one purpose-correct registration or recovery code.
29
29
  - When the separate `@awiki/dsh-model-proxy` package is installed, an AWiki-hosted DeepSeek choice appears before the official API-key onboarding step only when Harness has no usable model provider, with an explicit opt-in and an unchanged API-key escape path. New sessions do not show AWiki model or payment prompts after the official or another provider is usable.
30
- - The optional model-proxy package owns the Host-only short-token flow registering `awiki-deepseek` with `deepseek-v4-flash` and `deepseek-v4-pro`; Flash is recommended and credentials never enter the Browser.
31
- - Advanced AWiki settings are always available. Account & Recharge and Usage tabs appear only when `@awiki/dsh-model-proxy` is loaded, exposing explicit model state and calculated versus charged usage.
30
+ - The optional model-proxy package owns the Host short-token flow and every model-hosting Browser surface: onboarding plus Settings → Quick Recharge with Account & Recharge and Usage tabs. It registers `awiki-deepseek` with `deepseek-v4-flash` and `deepseek-v4-pro`; Flash is recommended and credentials never enter the Browser.
31
+ - AWiki identity, domain, and local-data settings remain in the main package. Installing only the main package does not register model opt-in, recharge, usage, or model onboarding UI.
32
32
  - A typed second confirmation in the Settings danger zone before permanently clearing local AWiki identity, key, token, registration-draft, and message-index state.
33
33
  - Five messaging Agent tools: identity status, conversations, history, approved text send, and approved attachment send.
34
34
  - Five on-demand mail Agent tools: mailbox account, inbox, plain-text read, approved mark-read, and approved plain-text send.
@@ -65,7 +65,7 @@ dsh plugin --profile web add @awiki/dsh-plugin@latest
65
65
  ```
66
66
 
67
67
  The main package no longer installs the AWiki-hosted model provider. Add the
68
- independently versioned Host-only package only when that capability is wanted:
68
+ independently versioned Model Proxy package only when that capability is wanted:
69
69
 
70
70
  ```bash
71
71
  dsh plugin --profile web add @awiki/dsh-model-proxy@latest
@@ -74,7 +74,7 @@ dsh plugin --profile web add @awiki/dsh-model-proxy@latest
74
74
  The profile installer both adds the package and activates its bundle layer. A
75
75
  plain `npm i @awiki/dsh-plugin` in a DSH project only installs the package; it
76
76
  does not activate the bundle, so the profile command remains the recommended
77
- installation path. This release line targets the `0.1.0-rc.7` package family
77
+ installation path. This release line targets the `0.1.0-rc.8` package family
78
78
  and pins every direct Host peer exactly, preventing npm from mixing prerelease
79
79
  families in a DSH root dependency tree.
80
80
 
@@ -129,11 +129,11 @@ The former runtime import `@awiki/dsh-plugin/model-proxy` has been removed. Use
129
129
  model onboarding, account/recharge, and usage entry points hidden while leaving
130
130
  AWiki Advanced settings functional.
131
131
 
132
- The current RC line uses `@awiki/dsh-plugin@0.3.0-rc.2` with
133
- `@awiki/dsh-model-proxy@0.1.0-rc.1`. The optional package requires main
134
- `^0.3.0-rc.1`, so
135
- it cannot be combined with a `0.2.x` main package that still inserted the old
136
- runtime by default.
132
+ The stable split-package line uses `@awiki/dsh-plugin@0.3.0`; the standalone
133
+ `@awiki/dsh-model-proxy@0.1.0` package requires main `^0.3.0`. This lower
134
+ bound is the first main package that provides the shared `awikiClient` Browser
135
+ bridge, and it also prevents combining the standalone package with a `0.2.x`
136
+ main package that still inserted the old runtime by default.
137
137
 
138
138
  The optional package owns these configuration variables:
139
139
 
@@ -144,7 +144,7 @@ The optional package owns these configuration variables:
144
144
  | `DSH_AWIKI_MODEL_MAX_TOKENS` | Maximum AWiki-hosted DeepSeek output | `8192` |
145
145
  | `DSH_AWIKI_MODEL_TOKEN_REFRESH_SKEW_SECONDS` | Early short-token refresh interval | `60` |
146
146
 
147
- AWiki-hosted DeepSeek is disabled by default. Only an explicit choice in onboarding or Settings → AWiki
147
+ AWiki-hosted DeepSeek is disabled by default. Only an explicit choice in onboarding or Settings → Quick Recharge
148
148
  Account & Recharge registers the `awiki-deepseek` route and selects Flash. Disabling restores the
149
149
  previous provider, model, and reasoning effort. A successful recharge refreshes the balance but
150
150
  never enables AWiki or changes the selected model automatically.
@@ -154,7 +154,7 @@ disabled it reports the development restriction without blocking an account whos
154
154
  `model_access_available` flag is true. Development bypass displays calculated and charged amounts
155
155
  separately, with zero charged; it does not invent a price when no price table is active.
156
156
  Public recharge creation also has a client release gate in
157
- `src/client/recharge-availability.ts`. The current RC line ships that gate open. Order creation still
157
+ `packages/dsh-model-proxy/src/client/recharge-availability.ts`. The current stable line ships that gate open. Order creation still
158
158
  requires the account response to report `payments_available=true`; otherwise the UI reports that
159
159
  payments are unavailable and sends no order RPC. The gate remains a single emergency rollback for
160
160
  the existing payment, polling, and cancellation flows.
@@ -169,7 +169,7 @@ failure leaves the existing payment action available, while a payment that wins
169
169
  the credited account instead of being reported as cancelled.
170
170
 
171
171
  The default Handle provider domain is `awiki.ai`. A local user can override it
172
- from Settings → AWiki → Advanced; DSH persists that choice in its settings document and
172
+ from Settings → AWiki; DSH persists that choice in its settings document and
173
173
  applies it after the next Harness restart. The setting affects future identity
174
174
  registration and completion of short Handles. It does not rewrite an already
175
175
  registered DID or Handle.
@@ -179,7 +179,7 @@ accepts only from loopback. This keeps an independently installed `@awiki/dsh-pl
179
179
  compatible with stock DSH releases without adding AWiki to a core settings
180
180
  allowlist; non-local browser origins cannot read or mutate the Host setting.
181
181
 
182
- Settings → AWiki → Advanced → Danger zone clears only this installation's local AWiki
182
+ Settings → AWiki → Danger zone clears only this installation's local AWiki
183
183
  state; it does not delete the server-side account or Handle. The dialog requires
184
184
  the displayed confirmation phrase. After success, the local DID keys, access
185
185
  token, registration draft, conversations, attachment index, and cached image previews cannot be
package/README.zh.md CHANGED
@@ -20,8 +20,8 @@ Rust 身份。
20
20
  - 用户点击后才生成的 AI 对话总结:最多处理 50 条最近或未读消息,按会话保留本次运行期缓存,并支持过期提示、重试、复制与跳转原消息。
21
21
  - OTP 身份入口会保留验证码输入表单,并按服务端返回的冷却时间显示重发倒计时、禁用提前重发;Handle 分流发生在发送前,因此每次只会发送一个用途正确的注册或恢复验证码。
22
22
  - 安装独立的 `@awiki/dsh-model-proxy` 后,仅在 Harness 没有任何可用模型时,首次引导才会在官方 API Key 步骤前提供 AWiki 托管模型选项;用户可以明确启用,也可以跳过并继续原版 API Key 流程。已经配置官方或其他 Provider 时,新会话不会显示 AWiki 模型或支付提示。
23
- - 可选 Model Proxy 包独占 Host 内部短期 Token `awiki-deepseek` Provider,提供 `deepseek-v4-flash` 和 `deepseek-v4-pro`,默认推荐 Flash;Token 不进入 Browser。
24
- - “高级设置”始终可用;只有加载 `@awiki/dsh-model-proxy` 后才显示“账户与充值”和“用量明细”,用于显式启停模型并查看计算费用和实际扣费。
23
+ - 可选 Model Proxy 包独占 Host 内部短期 Token 和全部模型托管界面:首次引导,以及“设置 快速充值”中的“账户与充值”“用量明细”。它提供 `deepseek-v4-flash` 和 `deepseek-v4-pro`,默认推荐 Flash;Token 不进入 Browser。
24
+ - AWiki 主包只保留身份、域名和本地数据设置。只安装主包时,不会注册模型启停、充值、用量或模型首次引导界面。
25
25
  - 在设置页危险区域中,经输入确认词的二次确认后,永久清空本机 AWiki 身份、密钥、令牌、注册草稿和消息索引。
26
26
  - 五个消息 Agent 工具:身份、会话、历史、需审批的文本发送和需审批的附件发送。
27
27
  - 五个按需邮件 Agent 工具:邮箱账户、收件箱、纯文本读取、需审批的标记已读和需审批的纯文本发送。
@@ -55,7 +55,7 @@ dsh plugin --profile web add @awiki/dsh-plugin@latest
55
55
  ```
56
56
 
57
57
  主包不再默认安装 AWiki 托管模型 Provider。仅在需要该能力时,另行安装独立版本的
58
- Host-only 包:
58
+ Model Proxy 包:
59
59
 
60
60
  ```bash
61
61
  dsh plugin --profile web add @awiki/dsh-model-proxy@latest
@@ -63,7 +63,7 @@ dsh plugin --profile web add @awiki/dsh-model-proxy@latest
63
63
 
64
64
  Profile 安装器会同时添加包并激活 bundle layer。在 DSH 项目根目录执行普通的
65
65
  `npm i @awiki/dsh-plugin` 只会安装依赖,不会激活 bundle,因此仍推荐使用上述
66
- Profile 命令。本发布线面向 `0.1.0-rc.7` 包族,并精确锁定所有直接 Host peer,
66
+ Profile 命令。本发布线面向 `0.1.0-rc.8` 包族,并精确锁定所有直接 Host peer,
67
67
  防止 npm 在 DSH 根依赖树中混用不同的预发布版本族。
68
68
 
69
69
  从 `0.2.0-rc.4` 起,`@awiki/dsh-plugin` 是唯一规范包名。原
@@ -112,10 +112,10 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
112
112
  `@awiki/dsh-plugin/model-proxy-contract`。只安装主包时,模型首次引导、账户/充值和
113
113
  用量入口保持隐藏,高级 AWiki 设置仍可正常使用。
114
114
 
115
- 当前 RC 版本为 `@awiki/dsh-plugin@0.3.0-rc.2`,可选包为
116
- `@awiki/dsh-model-proxy@0.1.0-rc.1`。可选包 peer 固定为主包
117
- `^0.3.0-rc.1`,避免与仍会
118
- 默认插入旧 runtime 的 `0.2.x` 主包组合后加载两个 Model Proxy。
115
+ 正式拆包版本为 `@awiki/dsh-plugin@0.3.0`;独立的
116
+ `@awiki/dsh-model-proxy@0.1.0` 要求主包 `^0.3.0`。这是首个提供共享
117
+ `awikiClient` Browser bridge 的主包版本,同时避免与仍会默认插入旧 runtime
118
+ 的 `0.2.x` 主包组合后加载两个 Model Proxy。
119
119
 
120
120
  以下环境变量归可选包所有:
121
121
 
@@ -126,14 +126,14 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
126
126
  | `DSH_AWIKI_MODEL_MAX_TOKENS` | AWiki 托管模型单次最大输出 | `8192` |
127
127
  | `DSH_AWIKI_MODEL_TOKEN_REFRESH_SKEW_SECONDS` | 短期 Token 提前刷新秒数 | `60` |
128
128
 
129
- 插件默认关闭 AWiki 托管模型。用户在首次引导或“设置 → AWiki → 账户与充值”明确启用后,
129
+ 插件默认关闭 AWiki 托管模型。用户在首次引导或“设置 → 快速充值 → 账户与充值”明确启用后,
130
130
  才注册 `awiki-deepseek` 路由并把 Flash 设为默认模型;停用时会恢复启用前的默认 Provider、
131
131
  模型和 reasoning effort。充值到账只刷新余额,不会自动启用 AWiki 或切换当前模型。
132
132
 
133
133
  设置页同时支持支付跳转和通企付 `ALI_QR` 二维码。支付功能关闭时会显示“开发环境暂未开放
134
134
  充值”,但只要账户响应中的 `model_access_available` 为真,仍可启用模型。开发绕过模式会
135
135
  展示计算费用和实际扣费的区别,实际扣费固定为 0;未激活价表时不显示臆造价格。
136
- 客户端充值发布门禁在当前 RC 中已打开。创建订单仍要求账户响应返回
136
+ 客户端充值发布门禁位于 `packages/dsh-model-proxy/src/client/recharge-availability.ts`,当前正式版中已打开。创建订单仍要求账户响应返回
137
137
  `payments_available=true`;否则界面会提示充值不可用且不发送订单 RPC。该门禁继续作为
138
138
  现有支付、轮询和取消流程的紧急回退开关。
139
139
  正式计费时,账户摘要不会显示内部的“计费模式”项。后端返回
@@ -144,7 +144,7 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
144
144
  关闭支付平台订单,再恢复金额输入框,并且不会自动创建替代订单。关闭失败时原支付入口继续
145
145
  有效;若支付在关闭竞态中先完成,界面会刷新已入账账户,而不会误报订单已取消。
146
146
 
147
- Handle 提供方的默认域名为 `awiki.ai`。本机用户可以在“设置 → AWiki → 高级设置”中覆盖该值;
147
+ Handle 提供方的默认域名为 `awiki.ai`。本机用户可以在“设置 → AWiki”中覆盖该值;
148
148
  DSH 会把选择写入自己的设置文件,并在下次重启 Harness 后生效。该设置影响后续
149
149
  身份注册和短 Handle 的域名补全,不会改写已经注册的 DID 或 Handle。
150
150
 
@@ -152,7 +152,7 @@ DSH 会把选择写入自己的设置文件,并在下次重启 Harness 后生
152
152
  因此独立安装的 `@awiki/dsh-plugin` 无需修改 DSH 核心设置白名单;非本机浏览器来源不能
153
153
  读取或修改这项 Host 设置。
154
154
 
155
- “设置 → AWiki → 高级设置 → 危险区域”中的清空操作只删除此安装的本地 AWiki 状态,不删除
155
+ “设置 → AWiki → 危险区域”中的清空操作只删除此安装的本地 AWiki 状态,不删除
156
156
  服务端账号或 Handle。执行前必须在确认弹窗中输入指定确认词;成功后本机 DID 私钥、
157
157
  访问令牌、注册草稿、会话记录、附件索引和图片预览缓存无法通过应用恢复,原身份也可能无法再由本机使用。
158
158
 
@@ -19,10 +19,3 @@ manager as a normal exact-version runtime dependency.
19
19
  The embedded launcher artwork in `src/client/assets.ts` comes from the AWiki Me
20
20
  application maintained by the same project team. Its use here is limited to
21
21
  identifying the AWiki integration.
22
-
23
- ## QR Code generation
24
-
25
- The browser bundle uses `qrcode@1.5.4` (node-qrcode) to render TongQiFu
26
- `ALI_QR` payment content as an image. The package and its bundled browser
27
- dependencies are distributed under their respective MIT licenses; their
28
- license text is retained by the package manager and source distribution.