@awiki/dsh-plugin 0.2.0-rc.4

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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +138 -0
  3. package/README.zh.md +114 -0
  4. package/THIRD_PARTY_NOTICES.md +21 -0
  5. package/cordis.patch.yml +26 -0
  6. package/lib/client.js +8398 -0
  7. package/lib/client.js.map +1 -0
  8. package/lib/index.js +1497 -0
  9. package/lib/invariant.js +16 -0
  10. package/lib/provider.js +22 -0
  11. package/lib/sdk-adapter-DPPZhs6p.mjs +316 -0
  12. package/lib/summary-provider.js +192 -0
  13. package/lib/typert.host.d.ts +3 -0
  14. package/lib/typert.host.js +1201 -0
  15. package/lib/typert.remote-client.d.ts +54 -0
  16. package/lib/typert.remote-client.d.ts.map +1 -0
  17. package/lib/typert.remote-client.js +817 -0
  18. package/lib/types/client/AwikiOverlay.d.ts +22 -0
  19. package/lib/types/client/AwikiOverlay.d.ts.map +1 -0
  20. package/lib/types/client/AwikiOverlay.js +689 -0
  21. package/lib/types/client/AwikiOverlay.js.map +1 -0
  22. package/lib/types/client/AwikiSettingsSection.d.ts +25 -0
  23. package/lib/types/client/AwikiSettingsSection.d.ts.map +1 -0
  24. package/lib/types/client/AwikiSettingsSection.js +119 -0
  25. package/lib/types/client/AwikiSettingsSection.js.map +1 -0
  26. package/lib/types/client/assets.d.ts +3 -0
  27. package/lib/types/client/assets.d.ts.map +1 -0
  28. package/lib/types/client/assets.js +70 -0
  29. package/lib/types/client/assets.js.map +1 -0
  30. package/lib/types/client/controller.d.ts +194 -0
  31. package/lib/types/client/controller.d.ts.map +1 -0
  32. package/lib/types/client/controller.js +701 -0
  33. package/lib/types/client/controller.js.map +1 -0
  34. package/lib/types/client/file.d.ts +20 -0
  35. package/lib/types/client/file.d.ts.map +1 -0
  36. package/lib/types/client/file.js +41 -0
  37. package/lib/types/client/file.js.map +1 -0
  38. package/lib/types/client/index.d.ts +16 -0
  39. package/lib/types/client/index.d.ts.map +1 -0
  40. package/lib/types/client/index.js +129 -0
  41. package/lib/types/client/index.js.map +1 -0
  42. package/lib/types/client/settings-controller.d.ts +28 -0
  43. package/lib/types/client/settings-controller.d.ts.map +1 -0
  44. package/lib/types/client/settings-controller.js +139 -0
  45. package/lib/types/client/settings-controller.js.map +1 -0
  46. package/lib/types/client/settings-locales.d.ts +13 -0
  47. package/lib/types/client/settings-locales.d.ts.map +1 -0
  48. package/lib/types/client/settings-locales.js +68 -0
  49. package/lib/types/client/settings-locales.js.map +1 -0
  50. package/lib/types/client/slots.d.ts +74 -0
  51. package/lib/types/client/slots.d.ts.map +1 -0
  52. package/lib/types/client/slots.js +3 -0
  53. package/lib/types/client/slots.js.map +1 -0
  54. package/lib/types/client/store.d.ts +18 -0
  55. package/lib/types/client/store.d.ts.map +1 -0
  56. package/lib/types/client/store.js +17 -0
  57. package/lib/types/client/store.js.map +1 -0
  58. package/lib/types/client.d.ts +3 -0
  59. package/lib/types/client.d.ts.map +1 -0
  60. package/lib/types/client.js +3 -0
  61. package/lib/types/client.js.map +1 -0
  62. package/lib/types/domain.d.ts +10 -0
  63. package/lib/types/domain.d.ts.map +1 -0
  64. package/lib/types/domain.js +18 -0
  65. package/lib/types/domain.js.map +1 -0
  66. package/lib/types/index.d.ts +188 -0
  67. package/lib/types/index.d.ts.map +1 -0
  68. package/lib/types/index.js +861 -0
  69. package/lib/types/index.js.map +1 -0
  70. package/lib/types/invariant.d.ts +9 -0
  71. package/lib/types/invariant.d.ts.map +1 -0
  72. package/lib/types/invariant.js +14 -0
  73. package/lib/types/invariant.js.map +1 -0
  74. package/lib/types/provider-api.d.ts +70 -0
  75. package/lib/types/provider-api.d.ts.map +1 -0
  76. package/lib/types/provider-api.js +3 -0
  77. package/lib/types/provider-api.js.map +1 -0
  78. package/lib/types/provider.d.ts +9 -0
  79. package/lib/types/provider.d.ts.map +1 -0
  80. package/lib/types/provider.js +20 -0
  81. package/lib/types/provider.js.map +1 -0
  82. package/lib/types/sdk-adapter.d.ts +46 -0
  83. package/lib/types/sdk-adapter.d.ts.map +1 -0
  84. package/lib/types/sdk-adapter.js +327 -0
  85. package/lib/types/sdk-adapter.js.map +1 -0
  86. package/lib/types/session.d.ts +14 -0
  87. package/lib/types/session.d.ts.map +1 -0
  88. package/lib/types/session.js +76 -0
  89. package/lib/types/session.js.map +1 -0
  90. package/lib/types/settings-rpc-contract.d.ts +34 -0
  91. package/lib/types/settings-rpc-contract.d.ts.map +1 -0
  92. package/lib/types/settings-rpc-contract.js +62 -0
  93. package/lib/types/settings-rpc-contract.js.map +1 -0
  94. package/lib/types/settings-rpc.d.ts +6 -0
  95. package/lib/types/settings-rpc.d.ts.map +1 -0
  96. package/lib/types/settings-rpc.js +147 -0
  97. package/lib/types/settings-rpc.js.map +1 -0
  98. package/lib/types/settings.d.ts +13 -0
  99. package/lib/types/settings.d.ts.map +1 -0
  100. package/lib/types/settings.js +15 -0
  101. package/lib/types/settings.js.map +1 -0
  102. package/lib/types/summary-provider-api.d.ts +45 -0
  103. package/lib/types/summary-provider-api.d.ts.map +1 -0
  104. package/lib/types/summary-provider-api.js +3 -0
  105. package/lib/types/summary-provider-api.js.map +1 -0
  106. package/lib/types/summary-provider.d.ts +48 -0
  107. package/lib/types/summary-provider.d.ts.map +1 -0
  108. package/lib/types/summary-provider.js +208 -0
  109. package/lib/types/summary-provider.js.map +1 -0
  110. package/lib/types/tools.d.ts +20 -0
  111. package/lib/types/tools.d.ts.map +1 -0
  112. package/lib/types/tools.js +139 -0
  113. package/lib/types/tools.js.map +1 -0
  114. package/lib/types/types.d.ts +292 -0
  115. package/lib/types/types.d.ts.map +1 -0
  116. package/lib/types/types.js +6 -0
  117. package/lib/types/types.js.map +1 -0
  118. package/package.json +179 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # @awiki/dsh-plugin
2
+
3
+ AWiki identity and messaging for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
4
+ The package installs one Host service, its production Rust SDK provider,
5
+ the model tools, and a Web client with a draggable AWiki Me launcher.
6
+
7
+ [中文说明](./README.zh.md)
8
+
9
+ Registration failures preserve the form and local pending identity material. Closed registration,
10
+ unavailable verification state, and commit conflicts each give a safe next action without exposing
11
+ remote response details.
12
+
13
+ The Rust SDK exclusively owns the identity, SecretVault, database, cache, and metadata below the
14
+ configured `stateRoot`. This release performs a clean cutover and does not import the former
15
+ TypeScript SDK `identity.json`; create a new Rust-backed identity after upgrading.
16
+
17
+ ## Features
18
+
19
+ - Register one deployment-level AWiki identity from the Web UI.
20
+ - Open the top-left AWiki account menu to sign out locally without deleting the encrypted identity or message database; **Resume** restores the same DID and Handle, including across DSH restarts.
21
+ - Reuse that identity across the root Agent and its subagents.
22
+ - Direct-message and existing-group conversation lists, unread counts, latest-message previews, and persisted display names.
23
+ - Text messages plus one attachment per message, with image previews and SHA verification.
24
+ - A draggable circular launcher, adaptive popup placement, dark mode, and remembered active conversation.
25
+ - 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.
26
+ - An AWiki page in DSH Settings for a durable, validated default Handle domain.
27
+ - A typed second confirmation in the Settings danger zone before permanently clearing local AWiki identity, key, token, registration-draft, and message-index state.
28
+ - Five approval-aware Agent tools: identity status, conversations, history, text send, and attachment send.
29
+
30
+ The first release does not implement end-to-end encryption, multiple identities,
31
+ group administration, realtime push, or multiple attachments in one message.
32
+
33
+ ## Install
34
+
35
+ Install the official public npm package:
36
+
37
+ ```bash
38
+ pnpm add @awiki/dsh-plugin@next
39
+ ```
40
+
41
+ `@awiki/dsh-plugin` is the canonical package identity starting with
42
+ `0.2.0-rc.4`. The former `@awiki/dsh` registry entry was unpublished and is
43
+ not an installation source for this release line.
44
+
45
+ Apply the package after the normal DSH base and Web app bundles. Its
46
+ `cordis.patch.yml` adds the Host service and provider; DSH discovers and injects
47
+ the browser client through the package metadata.
48
+
49
+ ## Configuration
50
+
51
+ The plugin works against the public `awiki.ai` tenant without environment configuration. Set these variables only when a deployment needs an override:
52
+
53
+ | Variable | Purpose | Default |
54
+ | --- | --- | --- |
55
+ | `DSH_AWIKI_USER_SERVICE_URL` | Absolute AWiki user-service URL | `https://awiki.ai` |
56
+ | `DSH_AWIKI_USER_SERVICE_DOMAIN` | Composition default for the Handle provider domain | `awiki.ai` |
57
+ | `DSH_AWIKI_MESSAGE_SERVICE_URL` | Message-service URL called by the Host | `https://awiki.ai` |
58
+ | `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba:awiki.ai` |
59
+ | `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https://awiki.ai` |
60
+ | `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | JSON array of extra exact HTTPS origins | `[]` |
61
+ | `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory | `$DSH_HOME/awiki/im-core` or `~/.dsh/awiki/im-core` |
62
+ | `DSH_AWIKI_POLL_INTERVAL_MS` | Open-dialog polling interval | `5000` |
63
+ | `DSH_AWIKI_ATTACHMENT_MAX_BYTES` | Decoded attachment limit | `10485760` |
64
+ | `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | UTF-8 cap after Host-side summary minimization | `32768` |
65
+ | `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | One-shot model deadline | `30000` |
66
+ | `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | Structured summary output cap | `768` |
67
+
68
+ The default Handle provider domain is `awiki.ai`. A local user can override it
69
+ from Settings → AWiki; DSH persists that choice in its settings document and
70
+ applies it after the next Harness restart. The setting affects future identity
71
+ registration and completion of short Handles. It does not rewrite an already
72
+ registered DID or Handle.
73
+
74
+ The settings page talks to a plugin-owned Connection channel that the Host
75
+ accepts only from loopback. This keeps an independently installed `@awiki/dsh-plugin`
76
+ compatible with stock DSH releases without adding AWiki to a core settings
77
+ allowlist; non-local browser origins cannot read or mutate the Host setting.
78
+
79
+ Settings → AWiki → Danger zone clears only this installation's local AWiki
80
+ state; it does not delete the server-side account or Handle. The dialog requires
81
+ the displayed confirmation phrase. After success, the local DID keys, access
82
+ token, registration draft, conversations, and attachment index cannot be
83
+ recovered by the app, and this installation may lose access to the old identity.
84
+
85
+ Ordinary sign-out is separate from that destructive action. It writes only a private
86
+ Host-owned session marker, gates both Web and Agent operations, and retains the SDK-owned
87
+ SecretVault identity, keys, tokens, conversations, and attachment index. Resuming removes
88
+ the marker and reloads the same local identity without registration.
89
+
90
+ The provider domain and message-service DID are protocol identifiers. Do not
91
+ infer them from an API hostname. Production service URLs must use HTTPS. The IM Core state directory contains access material;
92
+ keep it outside the repository, restrict filesystem access, and protect the
93
+ underlying disk and backups.
94
+
95
+ For the default 10 MiB decoded attachment cap, configure a reverse-proxy request
96
+ limit of at least 14 MiB to account for base64 and JSON overhead.
97
+
98
+ AI summary generation runs only after the user selects **AI Summary**. If a
99
+ conversation had unread messages when it was opened, the Host summarizes that
100
+ unread tail; otherwise it summarizes the newest 50 messages. The Host enforces
101
+ the 50-message and UTF-8 limits, sends attachment metadata rather than file
102
+ bytes, and treats serialized conversation content as untrusted data. Summaries
103
+ are cached per conversation only for the current browser runtime and become
104
+ stale, without another model call, when newer messages arrive. The replaceable
105
+ `@awiki/dsh-plugin/summary-provider` uses the current Harness default provider and model
106
+ for one direct `ctx.llm.stream` request; it does not create an Agent or write an
107
+ Agent session.
108
+
109
+ ## Development
110
+
111
+ Requirements: Node.js 22.19+ (or 24+) and pnpm 11.7.
112
+
113
+ ```bash
114
+ pnpm install --frozen-lockfile
115
+ pnpm run verify
116
+ pnpm pack --dry-run
117
+ ```
118
+
119
+ The production Host loads the exact `@awiki/im-core-node@0.1.2` runtime package;
120
+ the platform-specific native addon is selected through its optional dependencies
121
+ and remains external to the JavaScript bundle. Consumers do not need Rust or an
122
+ `awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
123
+ licensing.
124
+
125
+ The checked-in Typert Host/Remote artifacts were generated from the same Host
126
+ contract. `pnpm check:generated` pins their complete seventeen-method surface until
127
+ the standalone Typert generator supports root-level packages.
128
+
129
+ ## Security
130
+
131
+ Do not commit OTPs, access tokens, private keys, identity state, `.env` files, or
132
+ remote-test reports. `pnpm check:public` enforces the public-tree guard before
133
+ verification and packaging.
134
+
135
+ ## License
136
+
137
+ The plugin is MIT licensed. Its Rust IM Core runtime dependency is distributed
138
+ under AGPL-3.0-only and remains subject to its own retained notices and license.
package/README.zh.md ADDED
@@ -0,0 +1,114 @@
1
+ # @awiki/dsh-plugin
2
+
3
+ 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供 AWiki
4
+ 身份与消息能力。一个包同时包含 Host Service、Rust SDK Provider、Agent 工具,
5
+ 以及带可拖动 AWiki Me 悬浮入口的 Web 客户端。
6
+
7
+ Rust SDK 独占管理配置的 `stateRoot` 下的身份、SecretVault、数据库、缓存和元数据。
8
+ 本版本采用干净切换,不导入旧 TypeScript SDK 的 `identity.json`;升级后需创建新的
9
+ Rust 身份。
10
+
11
+ ## 功能
12
+
13
+ - 在 Web UI 中注册一个部署级 AWiki 身份,根 Agent 与子 Agent 共用。
14
+ - 点击 AWiki 面板左上角图标可打开账户菜单;普通退出只锁定本机会话,不删除加密身份或消息数据库,重新进入及重启 DSH 后仍恢复同一个 DID 和 Handle。
15
+ - 注册失败时保留手机号、Handle、验证码和本机待注册密钥;注册未开放、验证码状态失效和提交冲突会给出对应的安全处理提示。
16
+ - 私聊和已有群聊列表、未读角标、最新消息预览、时间更新与昵称持久化。
17
+ - 文本和单附件消息,支持图片预览、附件说明与 SHA 校验。
18
+ - 圆形可拖动入口、自适应四角弹窗、深色模式和当前会话记忆。
19
+ - 用户点击后才生成的 AI 对话总结:最多处理 50 条最近或未读消息,按会话保留本次运行期缓存,并支持过期提示、重试、复制与跳转原消息。
20
+ - 在 DSH 设置中提供 AWiki 页面,可持久化修改并校验默认 Handle 域名。
21
+ - 在设置页危险区域中,经输入确认词的二次确认后,永久清空本机 AWiki 身份、密钥、令牌、注册草稿和消息索引。
22
+ - 五个受 Harness 审批约束的 Agent 工具:身份、会话、历史、文本发送、附件发送。
23
+
24
+ 首版不包含端到端加密、多身份、群管理、实时推送和单消息多附件。
25
+
26
+ ## 安装
27
+
28
+ 安装公开发布的官方 npm 包:
29
+
30
+ ```bash
31
+ pnpm add @awiki/dsh-plugin@next
32
+ ```
33
+
34
+ 从 `0.2.0-rc.4` 起,`@awiki/dsh-plugin` 是唯一规范包名。原
35
+ `@awiki/dsh` registry 条目已被 unpublish,不再作为本发布线的安装来源。
36
+
37
+ 请在常规 DSH base 和 Web app bundle 之后应用本包。`cordis.patch.yml` 会加入
38
+ Host Service 和 Provider;浏览器客户端由 DSH 根据包元数据自动发现并注入。
39
+
40
+ ## 配置
41
+
42
+ 插件无需环境变量即可连接公开的 `awiki.ai` 租户;仅在部署需要覆盖默认值时设置以下变量:
43
+
44
+ | 环境变量 | 用途 | 默认值 |
45
+ | --- | --- | --- |
46
+ | `DSH_AWIKI_USER_SERVICE_URL` | AWiki user service 绝对 URL | `https://awiki.ai` |
47
+ | `DSH_AWIKI_USER_SERVICE_DOMAIN` | Handle 提供方域名的部署默认值 | `awiki.ai` |
48
+ | `DSH_AWIKI_MESSAGE_SERVICE_URL` | Host 调用的 message service URL | `https://awiki.ai` |
49
+ | `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba:awiki.ai` |
50
+ | `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https://awiki.ai` |
51
+ | `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | 额外附件 HTTPS origin 的 JSON 数组 | `[]` |
52
+ | `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core 状态目录 | `$DSH_HOME/awiki/im-core` 或 `~/.dsh/awiki/im-core` |
53
+ | `DSH_AWIKI_POLL_INTERVAL_MS` | 弹窗打开时的轮询间隔 | `5000` |
54
+ | `DSH_AWIKI_ATTACHMENT_MAX_BYTES` | 解码后的附件上限 | `10485760` |
55
+ | `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | Host 最小化后的 UTF-8 输入上限 | `32768` |
56
+ | `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | 单次模型调用超时 | `30000` |
57
+ | `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | 结构化摘要输出上限 | `768` |
58
+
59
+ Handle 提供方的默认域名为 `awiki.ai`。本机用户可以在“设置 → AWiki”中覆盖该值;
60
+ DSH 会把选择写入自己的设置文件,并在下次重启 Harness 后生效。该设置影响后续
61
+ 身份注册和短 Handle 的域名补全,不会改写已经注册的 DID 或 Handle。
62
+
63
+ 设置页通过插件自有的 Connection 通道访问 Host,Host 只接受 loopback 来源。
64
+ 因此独立安装的 `@awiki/dsh-plugin` 无需修改 DSH 核心设置白名单;非本机浏览器来源不能
65
+ 读取或修改这项 Host 设置。
66
+
67
+ “设置 → AWiki → 危险区域”中的清空操作只删除此安装的本地 AWiki 状态,不删除
68
+ 服务端账号或 Handle。执行前必须在确认弹窗中输入指定确认词;成功后本机 DID 私钥、
69
+ 访问令牌、注册草稿、会话记录和附件索引无法通过应用恢复,原身份也可能无法再由本机使用。
70
+
71
+ 普通“退出登录”与危险区域的永久清空相互独立。退出只写入一个 Host 私有会话标记,
72
+ 同时阻止 Web UI 和 Agent 使用该身份;SecretVault 中的身份、密钥、令牌、会话和附件索引
73
+ 全部保留。“重新进入”会移除标记并恢复同一个本机身份,不需要重新注册。
74
+
75
+ Provider 域名和消息服务 DID 都是协议标识,不能根据 API host 猜测。生产环境 URL
76
+ 必须使用 HTTPS。IM Core 状态目录含访问材料,应置于仓库外,限制文件权限,并为磁盘
77
+ 和备份提供保护。
78
+
79
+ 默认附件上限为解码后 10 MiB;反向代理请求体上限至少应为 14 MiB,以容纳
80
+ base64 与 JSON 封装开销。
81
+
82
+ AI 总结只在用户点击“AI 总结”后生成。打开会话时若存在未读消息,Host 总结该未读
83
+ 尾部;否则总结最近 50 条。Host 最终强制 50 条与 UTF-8 字节上限,附件只发送文件名、
84
+ MIME、大小和说明,不发送文件二进制;序列化后的对话内容始终按不可信数据处理。
85
+ 总结只按会话缓存在本次浏览器运行期;新消息只会把已有结果标记为过期,不会自动再次
86
+ 调用模型。可替换的 `@awiki/dsh-plugin/summary-provider` 使用 Harness 当前默认 provider/model
87
+ 执行一次直接的 `ctx.llm.stream`,不会创建 Agent,也不会写入 Agent session。
88
+
89
+ ## 开发与验证
90
+
91
+ 需要 Node.js 22.19+(或 24+)以及 pnpm 11.7:
92
+
93
+ ```bash
94
+ pnpm install --frozen-lockfile
95
+ pnpm run verify
96
+ pnpm pack --dry-run
97
+ ```
98
+
99
+ 生产 Host 加载固定版本 `@awiki/im-core-node@0.1.2`;平台原生 addon 由它的
100
+ optional dependencies 选择,并保持在 JavaScript bundle 外。使用者无需安装 Rust,
101
+ 也无需检出 `awiki-cli-rs2`。来源与许可证见 `THIRD_PARTY_NOTICES.md`。
102
+
103
+ Typert Host/Remote 产物与当前 Host 契约一同提交;在独立 Typert 生成器支持根级
104
+ 包之前,`pnpm check:generated` 会固定检查完整的 17 个 Remote 方法。
105
+
106
+ ## 安全
107
+
108
+ 不要提交 OTP、访问令牌、私钥、身份状态、`.env` 或远程测试报告。
109
+ `pnpm check:public` 是验证和打包前的公开仓库安全门禁。
110
+
111
+ ## 许可证
112
+
113
+ 插件使用 MIT 许可证;Rust IM Core 运行时依赖使用 AGPL-3.0-only,并继续适用其
114
+ 自带的许可证与声明。
@@ -0,0 +1,21 @@
1
+ # Third-party notices
2
+
3
+ ## AWiki Rust IM Core Node SDK
4
+
5
+ `@awiki/im-core-node@0.1.2` and its target-specific optional package provide the
6
+ Rust IM Core runtime used by the Host provider. These packages are distributed
7
+ under AGPL-3.0-only. Each package carries its own `LICENSE`, `NOTICE.md`,
8
+ `SOURCE.md`, CycloneDX SBOM, checksums, and build provenance. The corresponding
9
+ source is the `AgentConnect/awiki-cli-rs2` repository at the commit recorded in
10
+ the installed package's `provenance.json`.
11
+
12
+ The native runtime includes the pinned Agent Network Protocol Rust SDK revision
13
+ recorded in that same provenance and SBOM. The native package remains external
14
+ to the `dsh-awiki` JavaScript bundle and is installed through the package
15
+ manager as a normal exact-version runtime dependency.
16
+
17
+ ## AWiki Me icon
18
+
19
+ The embedded launcher artwork in `src/client/assets.ts` comes from the AWiki Me
20
+ application maintained by the same project team. Its use here is limited to
21
+ identifying the AWiki integration.
@@ -0,0 +1,26 @@
1
+ # Optional AWiki messaging for a DeepSeek Harness Web profile. Apply after
2
+ # @deepseek-ai/dsh-base and @deepseek-ai/dsh-web-app.
3
+
4
+ - insert:
5
+ - id: awiki
6
+ name: '@awiki/dsh-plugin'
7
+ config:
8
+ userServiceUrl: !!js process.env.DSH_AWIKI_USER_SERVICE_URL ?? 'https://awiki.ai'
9
+ userServiceDomain: !!js process.env.DSH_AWIKI_USER_SERVICE_DOMAIN ?? 'awiki.ai'
10
+ messageServiceUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_URL ?? 'https://awiki.ai'
11
+ messageServiceDid: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_DID ?? 'did:wba:awiki.ai'
12
+ messageServicePublicUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL ?? 'https://awiki.ai'
13
+ allowedAttachmentOrigins: !!js JSON.parse(process.env.DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS ?? '[]')
14
+ stateRoot: !!js process.env.DSH_AWIKI_STATE_ROOT
15
+ pollIntervalMs: !!js Number(process.env.DSH_AWIKI_POLL_INTERVAL_MS ?? '5000')
16
+ attachmentMaxBytes: !!js Number(process.env.DSH_AWIKI_ATTACHMENT_MAX_BYTES ?? '10485760')
17
+ summaryMaxInputBytes: !!js Number(process.env.DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES ?? '32768')
18
+
19
+ - id: awiki-provider
20
+ name: '@awiki/dsh-plugin/provider'
21
+
22
+ - id: awiki-summary-provider
23
+ name: '@awiki/dsh-plugin/summary-provider'
24
+ config:
25
+ timeoutMs: !!js Number(process.env.DSH_AWIKI_SUMMARY_TIMEOUT_MS ?? '30000')
26
+ maxOutputTokens: !!js Number(process.env.DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS ?? '768')