@awiki/dsh-plugin 0.3.1-rc.1 → 0.3.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 +7 -1
- package/README.zh.md +5 -1
- package/lib/client.js +20 -16
- package/lib/client.js.map +1 -1
- package/lib/index.js +86 -14
- package/lib/provider.js +1 -1
- package/lib/{sdk-adapter-BIbsJmRj.mjs → sdk-adapter-C0gdpg1u.mjs} +12 -1
- package/lib/types/client/controller.js +13 -13
- package/lib/types/client/controller.js.map +1 -1
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +106 -11
- package/lib/types/index.js.map +1 -1
- package/lib/types/provider-api.d.ts +7 -0
- package/lib/types/provider-api.d.ts.map +1 -1
- package/lib/types/sdk-adapter.d.ts +4 -0
- package/lib/types/sdk-adapter.d.ts.map +1 -1
- package/lib/types/sdk-adapter.js +11 -0
- package/lib/types/sdk-adapter.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ TypeScript SDK `identity.json`; create a new Rust-backed identity after upgradin
|
|
|
26
26
|
- A draggable circular launcher that defaults to the lower-left sidebar area, adaptive popup placement, dark mode, and remembered active conversation.
|
|
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
|
+
- After Recovery V4 reaches `applied`, the Host resolves the recovered Handle's original mailbox under the current DID. If the separate Model Proxy package is installed, the Host also obtains one short-lived, audience-bound recovery attestation and reconciles the current DID to the original billing account without copying or adding balances. A temporary failure keeps only the non-secret recovery operation ID and retries the same idempotent reconciliation after restart; the attestation and ledger identity never enter Browser state, Agent tools, logs, or model context.
|
|
29
30
|
- 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
31
|
- 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
32
|
- 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.
|
|
@@ -56,6 +57,11 @@ untrusted external data, never Agent instructions. `awiki_mail_mark_read` and `a
|
|
|
56
57
|
require execution approval. Mail send is attempted once without automatic retry; a timeout or
|
|
57
58
|
transport loss returns `delivery-unknown`, so inspect the mailbox before approving another send.
|
|
58
59
|
|
|
60
|
+
Identity recovery does not add server-side private-chat restoration. A fresh local state does not
|
|
61
|
+
reconstruct historical Direct conversations; only ordinary data already retained by the Rust SDK
|
|
62
|
+
continues to follow Core's existing local migration rules. Mailbox and hosted-model reconciliation
|
|
63
|
+
are independent of that private-chat boundary.
|
|
64
|
+
|
|
59
65
|
## Install
|
|
60
66
|
|
|
61
67
|
Install the official public npm package:
|
|
@@ -265,7 +271,7 @@ pnpm run verify:workspace
|
|
|
265
271
|
pnpm pack --dry-run
|
|
266
272
|
```
|
|
267
273
|
|
|
268
|
-
The production Host loads the exact `@awiki/im-core-node@0.1.
|
|
274
|
+
The production Host loads the exact `@awiki/im-core-node@0.1.7` runtime package;
|
|
269
275
|
the platform-specific native addon is selected through its optional dependencies
|
|
270
276
|
and remains external to the JavaScript bundle. Consumers do not need Rust or an
|
|
271
277
|
`awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
|
package/README.zh.md
CHANGED
|
@@ -19,6 +19,7 @@ Rust 身份。
|
|
|
19
19
|
- 圆形可拖动入口、自适应四角弹窗、深色模式和当前会话记忆。
|
|
20
20
|
- 用户点击后才生成的 AI 对话总结:最多处理 50 条最近或未读消息,按会话保留本次运行期缓存,并支持过期提示、重试、复制与跳转原消息。
|
|
21
21
|
- OTP 身份入口会保留验证码输入表单,并按服务端返回的冷却时间显示重发倒计时、禁用提前重发;Handle 分流发生在发送前,因此每次只会发送一个用途正确的注册或恢复验证码。
|
|
22
|
+
- Recovery V4 进入 `applied` 后,Host 会用 current DID 解析已恢复 Handle 的原邮箱;如同时安装独立 Model Proxy 包,还会获取一份短时、固定受众的恢复凭证,把 current DID 对账到原模型账本,不复制余额、不做金额相加。临时失败只保留非敏感 operation id,并在重启后对同一幂等操作自动重试;恢复凭证和账本标识不会进入 Browser 状态、Agent 工具、日志或模型上下文。
|
|
22
23
|
- 安装独立的 `@awiki/dsh-model-proxy` 后,仅在 Harness 没有任何可用模型时,首次引导才会在官方 API Key 步骤前提供 AWiki 托管模型选项;用户可以明确启用,也可以跳过并继续原版 API Key 流程。已经配置官方或其他 Provider 时,新会话不会显示 AWiki 模型或支付提示。
|
|
23
24
|
- 可选 Model Proxy 包独占 Host 内部短期 Token 和全部模型托管界面:首次引导,以及“设置 → 快速充值”中的“账户与充值”“用量明细”。它提供 `deepseek-v4-flash` 和 `deepseek-v4-pro`,默认推荐 Flash;Token 不进入 Browser。
|
|
24
25
|
- AWiki 主包只保留身份、域名和本地数据设置。只安装主包时,不会注册模型启停、充值、用量或模型首次引导界面。
|
|
@@ -46,6 +47,9 @@ Rust 身份。
|
|
|
46
47
|
`awiki_mail_send` 每次执行都需要审批。邮件发送只尝试一次且不自动重试;超时或传输中断返回
|
|
47
48
|
`delivery-unknown`,再次审批发送前应先检查邮箱。
|
|
48
49
|
|
|
50
|
+
身份恢复不新增服务端私聊恢复。清空本地状态后不会重新构造历史私聊会话;只有 Rust SDK
|
|
51
|
+
已经保留的普通本地数据继续遵循 Core 既有迁移规则。邮箱和托管模型账本对账与私聊边界相互独立。
|
|
52
|
+
|
|
49
53
|
## 安装
|
|
50
54
|
|
|
51
55
|
安装公开发布的官方 npm 包:
|
|
@@ -225,7 +229,7 @@ pnpm run verify:workspace
|
|
|
225
229
|
pnpm pack --dry-run
|
|
226
230
|
```
|
|
227
231
|
|
|
228
|
-
生产 Host 加载固定版本 `@awiki/im-core-node@0.1.
|
|
232
|
+
生产 Host 加载固定版本 `@awiki/im-core-node@0.1.7`;平台原生 addon 由它的
|
|
229
233
|
optional dependencies 选择,并保持在 JavaScript bundle 外。使用者无需安装 Rust,
|
|
230
234
|
也无需检出 `awiki-cli-rs2`。来源与许可证见 `THIRD_PARTY_NOTICES.md`。
|
|
231
235
|
|
package/lib/client.js
CHANGED
|
@@ -8913,6 +8913,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8913
8913
|
attachmentMaxBytes: config.value.attachmentMaxBytes,
|
|
8914
8914
|
recoveryOperationId: storedRecoveryOperation()
|
|
8915
8915
|
});
|
|
8916
|
+
const operationId = storedRecoveryOperation();
|
|
8917
|
+
if (operationId !== null) {
|
|
8918
|
+
const recovery = await call(() => this.remote.getRecoveryStatus({ operationId }));
|
|
8919
|
+
if (this.current(generation) && recovery.ok) {
|
|
8920
|
+
this.publish({
|
|
8921
|
+
...this.view,
|
|
8922
|
+
recoveryOperationId: operationId,
|
|
8923
|
+
recoveryProgress: recovery.value
|
|
8924
|
+
});
|
|
8925
|
+
if (recovery.value.phase === "applied") {
|
|
8926
|
+
storeRecoveryOperation(null);
|
|
8927
|
+
this.publish({
|
|
8928
|
+
...this.view,
|
|
8929
|
+
recoveryOperationId: null,
|
|
8930
|
+
recoveryProgress: recovery.value
|
|
8931
|
+
});
|
|
8932
|
+
if (identity === null) return this.loadSession();
|
|
8933
|
+
}
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8916
8936
|
if (identity !== null) {
|
|
8917
8937
|
await this.loadConversationPreferences(generation);
|
|
8918
8938
|
const profile = await call(() => this.remote.getProfile());
|
|
@@ -8920,22 +8940,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8920
8940
|
...this.view,
|
|
8921
8941
|
profile: profile.value
|
|
8922
8942
|
});
|
|
8923
|
-
} else {
|
|
8924
|
-
const operationId = storedRecoveryOperation();
|
|
8925
|
-
if (operationId !== null) {
|
|
8926
|
-
const recovery = await call(() => this.remote.getRecoveryStatus({ operationId }));
|
|
8927
|
-
if (this.current(generation) && recovery.ok) {
|
|
8928
|
-
this.publish({
|
|
8929
|
-
...this.view,
|
|
8930
|
-
recoveryOperationId: operationId,
|
|
8931
|
-
recoveryProgress: recovery.value
|
|
8932
|
-
});
|
|
8933
|
-
if (recovery.value.phase === "applied") {
|
|
8934
|
-
storeRecoveryOperation(null);
|
|
8935
|
-
return this.loadSession();
|
|
8936
|
-
}
|
|
8937
|
-
}
|
|
8938
|
-
}
|
|
8939
8943
|
}
|
|
8940
8944
|
return {
|
|
8941
8945
|
ok: true,
|