@awiki/dsh-plugin 0.3.6 → 0.3.7-dsh-test.20260831.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 +58 -60
- package/README.zh.md +45 -51
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/cordis.patch.yml +7 -8
- package/lib/client.js +1389 -1152
- package/lib/client.js.map +1 -1
- package/lib/index.js +1084 -792
- package/lib/provider.js +57 -16
- package/lib/{sdk-adapter--trNlr-T.mjs → sdk-adapter-FGaOi8It.mjs} +168 -84
- package/lib/typert.host.js +406 -178
- package/lib/typert.remote-client.d.ts +19 -7
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +406 -178
- package/lib/types/client/AwikiDevices.d.ts +28 -0
- package/lib/types/client/AwikiDevices.d.ts.map +1 -0
- package/lib/types/client/AwikiDevices.js +85 -0
- package/lib/types/client/AwikiDevices.js.map +1 -0
- package/lib/types/client/AwikiIdentityAccess.d.ts +6 -5
- package/lib/types/client/AwikiIdentityAccess.d.ts.map +1 -1
- package/lib/types/client/AwikiIdentityAccess.js +88 -27
- package/lib/types/client/AwikiIdentityAccess.js.map +1 -1
- package/lib/types/client/AwikiMail.d.ts +1 -1
- package/lib/types/client/AwikiMail.d.ts.map +1 -1
- package/lib/types/client/AwikiMail.js +6 -130
- package/lib/types/client/AwikiMail.js.map +1 -1
- package/lib/types/client/AwikiOverlay.d.ts.map +1 -1
- package/lib/types/client/AwikiOverlay.js +5 -12
- package/lib/types/client/AwikiOverlay.js.map +1 -1
- package/lib/types/client/AwikiRecoveryForm.d.ts.map +1 -1
- package/lib/types/client/AwikiRecoveryForm.js +1 -1
- package/lib/types/client/AwikiRecoveryForm.js.map +1 -1
- package/lib/types/client/controller.d.ts +20 -34
- package/lib/types/client/controller.d.ts.map +1 -1
- package/lib/types/client/controller.js +56 -203
- package/lib/types/client/controller.js.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js +8 -4
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/settings-locales.js +8 -8
- package/lib/types/client/settings-locales.js.map +1 -1
- package/lib/types/client/slots.d.ts +10 -10
- package/lib/types/client/slots.d.ts.map +1 -1
- package/lib/types/conversation-preferences.d.ts.map +1 -1
- package/lib/types/conversation-preferences.js +0 -17
- package/lib/types/conversation-preferences.js.map +1 -1
- package/lib/types/index.d.ts +59 -30
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +804 -462
- package/lib/types/index.js.map +1 -1
- package/lib/types/listener-state.d.ts +5 -3
- package/lib/types/listener-state.d.ts.map +1 -1
- package/lib/types/listener-state.js +28 -13
- package/lib/types/listener-state.js.map +1 -1
- package/lib/types/listener.d.ts +9 -32
- package/lib/types/listener.d.ts.map +1 -1
- package/lib/types/listener.js +11 -127
- package/lib/types/listener.js.map +1 -1
- package/lib/types/mail.d.ts +2 -28
- package/lib/types/mail.d.ts.map +1 -1
- package/lib/types/mail.js +2 -78
- package/lib/types/mail.js.map +1 -1
- package/lib/types/provider-api.d.ts +102 -38
- package/lib/types/provider-api.d.ts.map +1 -1
- package/lib/types/provider.d.ts +7 -1
- package/lib/types/provider.d.ts.map +1 -1
- package/lib/types/provider.js +58 -15
- package/lib/types/provider.js.map +1 -1
- package/lib/types/realtime-supervisor.d.ts +54 -0
- package/lib/types/realtime-supervisor.d.ts.map +1 -0
- package/lib/types/realtime-supervisor.js +242 -0
- package/lib/types/realtime-supervisor.js.map +1 -0
- package/lib/types/sdk-adapter.d.ts +32 -7
- package/lib/types/sdk-adapter.d.ts.map +1 -1
- package/lib/types/sdk-adapter.js +163 -104
- package/lib/types/sdk-adapter.js.map +1 -1
- package/lib/types/sent-mail-store.d.ts +2 -7
- package/lib/types/sent-mail-store.d.ts.map +1 -1
- package/lib/types/sent-mail-store.js +23 -125
- package/lib/types/sent-mail-store.js.map +1 -1
- package/lib/types/tools.d.ts +1 -1
- package/lib/types/tools.d.ts.map +1 -1
- package/lib/types/tools.js +4 -20
- package/lib/types/tools.js.map +1 -1
- package/lib/types/types.d.ts +77 -66
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/package.json +20 -15
- package/lib/types/client/mail-attachment.d.ts +0 -40
- package/lib/types/client/mail-attachment.d.ts.map +0 -1
- package/lib/types/client/mail-attachment.js +0 -186
- package/lib/types/client/mail-attachment.js.map +0 -1
- package/lib/types/profile-state.d.ts +0 -17
- package/lib/types/profile-state.d.ts.map +0 -1
- package/lib/types/profile-state.js +0 -58
- package/lib/types/profile-state.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @awiki/dsh-plugin
|
|
2
2
|
|
|
3
|
-
AWiki
|
|
4
|
-
The package installs one Host
|
|
5
|
-
the model tools, and a Web client with a draggable AWiki Me launcher.
|
|
3
|
+
AWiki account, authorization, recovery, and messaging for
|
|
4
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). The package installs one Host
|
|
5
|
+
service, its IM Core provider, the model tools, and a Web client with a draggable AWiki Me launcher.
|
|
6
|
+
General DID documents and private keys are managed by the independent
|
|
7
|
+
`@agent-network-protocol/dsh-anp-identity` plugin and injected through Cordis.
|
|
6
8
|
|
|
7
9
|
[中文说明](./README.zh.md)
|
|
8
10
|
|
|
@@ -11,13 +13,16 @@ phone and OTP never enter browser persistence, controller snapshots, or public
|
|
|
11
13
|
Remote results. Closed registration, unavailable verification state, and commit conflicts each give
|
|
12
14
|
a safe next action without exposing remote response details.
|
|
13
15
|
|
|
14
|
-
The
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
The two plugins deliberately own different state. ANP Identity owns the multi-DID Store, DID
|
|
17
|
+
documents, private keys, and publication transactions. AWiki IM Core owns Handle/account bindings,
|
|
18
|
+
device and recovery workflows, authentication tokens, messages, mail, SQLite, and caches below its
|
|
19
|
+
configured `stateRoot`. The Host-only provider lease is never exposed to Browser, Remote, Agent
|
|
20
|
+
tools, or model APIs.
|
|
17
21
|
|
|
18
22
|
## Features
|
|
19
23
|
|
|
20
|
-
- Enter a Handle and phone through one Web UI flow
|
|
24
|
+
- Enter a Handle and phone through one Web UI flow and always request a registration OTP. A new Handle creates the deployment identity; an existing Handle offers ordinary Device Join first, with Recovery V4 as an explicit destructive alternative that requests a second purpose-scoped OTP.
|
|
25
|
+
- DSH can join an existing Handle as an independent member device. When DSH created or recovered the Handle and is the current ready-admin, the foreground Devices tab can list devices, verify an incoming request with SAS, approve one member, reject it, or revoke another device. These mutations are not Agent tools and require explicit `APPROVE` / `REVOKE` confirmation.
|
|
21
26
|
- Open the top-left AWiki account menu to sign out locally without deleting the encrypted identity or message database; **Resume local identity** restores the same DID and Handle, including across DSH restarts. The signed-out screen reveals phone recovery only after local resume fails. Switching identities requires an explicit confirmation that permanently clears local AWiki data first.
|
|
22
27
|
- Reuse that identity across the root Agent and its subagents.
|
|
23
28
|
- Direct-message and existing-group conversation lists, unread counts, latest-message previews, and persisted display names. Core SQLite remains the persistent source of truth: the Host joins persisted peer profiles onto Direct roster rows, while the browser keeps the active identity's last trustworthy Direct profile and group title. Sparse polling identifiers therefore cannot overwrite a resolved display name or real group title. After an existing Handle is recovered, the Host synchronizes account projections before asking Core to restore old group memberships; pending or blocked groups expose a retryable status without disabling Direct messages or other groups. Opening a conversation renders the committed local timeline first, hydrates group sender labels from the Core display-profile cache, reconciles remote history and Direct profile data in the background, and keeps local messages visible if refresh fails. A failed background roster poll also leaves the usable local view quiet; explicit loads still surface their errors. This local-first path covers the newest projected page; loading older messages still requires the remote history service. Scrolling up reveals a latest-message control that counts newer arrivals without interrupting reading. A conversation is marked read only after its newest rendered message reaches the visible bottom.
|
|
@@ -26,15 +31,14 @@ TypeScript SDK `identity.json`; create a new Rust-backed identity after upgradin
|
|
|
26
31
|
- A draggable circular launcher that defaults to the lower-left sidebar area, adaptive popup placement, dark mode, and remembered active conversation.
|
|
27
32
|
- 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
33
|
- 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
|
|
34
|
+
- 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.
|
|
30
35
|
- 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.
|
|
31
36
|
- 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.
|
|
32
37
|
- 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.
|
|
33
38
|
- A typed second confirmation in the Settings danger zone before permanently clearing local AWiki identity, key, token, registration-draft, and message-index state.
|
|
34
39
|
- Five messaging Agent tools: identity status, conversations, history, approved text send, and approved attachment send.
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- An opt-in realtime listener that lets exact-allowlisted Direct peers continue one DSH Agent session or use `/new`, `/status`, and `/help`.
|
|
40
|
+
- Five on-demand mail Agent tools: mailbox account, inbox, plain-text read, approved mark-read, and approved plain-text send.
|
|
41
|
+
- A default identity-level realtime connection for Direct, Group, and System Notification sync, plus an independent opt-in Agent consumer that lets exact-allowlisted Direct peers continue one DSH Agent session or use `/new`, `/status`, and `/help`.
|
|
38
42
|
|
|
39
43
|
## Screenshots
|
|
40
44
|
|
|
@@ -51,20 +55,12 @@ post-creation group administration or multiple attachments in one message. The A
|
|
|
51
55
|
plain Direct text; Groups, attachments, encrypted/payload content, and unknown slash commands never
|
|
52
56
|
reach the Agent.
|
|
53
57
|
|
|
54
|
-
Mail
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
total-size limits before canonical Base64 crosses Remote. Attachment downloads are always explicit;
|
|
58
|
-
the Browser matches the returned metadata and verifies canonical Base64, byte count, and SHA-256
|
|
59
|
-
before creating a temporary Blob URL, then revokes that URL immediately. It never auto-opens HTML,
|
|
60
|
-
SVG, or another attachment. Sent history stores only the service message id, file metadata, and
|
|
61
|
-
SHA-256, never attachment bytes. Mail subject, addresses,
|
|
62
|
-
preview, body, timestamps, and attachment metadata are
|
|
58
|
+
Mail v1 is on demand only and has no browser mailbox or compose UI. It does not wake an Agent for
|
|
59
|
+
new mail, render or send HTML, transfer mail attachments, or implement reply, forward, and
|
|
60
|
+
threading. Mail subject, addresses, preview, body, timestamps, and attachment metadata are
|
|
63
61
|
untrusted external data, never Agent instructions. `awiki_mail_mark_read` and `awiki_mail_send`
|
|
64
62
|
require execution approval. Mail send is attempted once without automatic retry; a timeout or
|
|
65
63
|
transport loss returns `delivery-unknown`, so inspect the mailbox before approving another send.
|
|
66
|
-
The Agent tool does not accept attachment Base64 or local paths; attachment selection and download
|
|
67
|
-
remain explicit Browser UI actions until Harness provides a formally authorized file-resource contract.
|
|
68
64
|
|
|
69
65
|
Identity recovery does not add server-side private-chat restoration. A fresh local state does not
|
|
70
66
|
reconstruct historical Direct conversations; only ordinary data already retained by the Rust SDK
|
|
@@ -73,9 +69,10 @@ are independent of that private-chat boundary.
|
|
|
73
69
|
|
|
74
70
|
## Install
|
|
75
71
|
|
|
76
|
-
Install the
|
|
72
|
+
Install the independent identity plugin first, then AWiki:
|
|
77
73
|
|
|
78
74
|
```bash
|
|
75
|
+
dsh plugin --profile web add @agent-network-protocol/dsh-anp-identity@latest
|
|
79
76
|
dsh plugin --profile web add @awiki/dsh-plugin@latest
|
|
80
77
|
```
|
|
81
78
|
|
|
@@ -97,50 +94,47 @@ families in a DSH root dependency tree.
|
|
|
97
94
|
`0.2.0-rc.4`. The former `@awiki/dsh` registry entry was unpublished and is
|
|
98
95
|
not an installation source for this release line.
|
|
99
96
|
|
|
100
|
-
Apply the
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
Apply the packages after the normal DSH base and Web app bundles. The standalone
|
|
98
|
+
ANP Identity package owns the Identity Service and native Provider layer. This
|
|
99
|
+
package's `cordis.patch.yml` adds only the AWiki Host Service, IM Core Provider,
|
|
100
|
+
and summary Provider; DSH discovers and injects the browser client through
|
|
101
|
+
package metadata. Teardown closes IM Core before revoking its identity lease,
|
|
102
|
+
and the identity Store Provider closes last. The patch does not insert Model Proxy. The optional package has its
|
|
104
103
|
own patch, inserts exactly one `awiki-model-proxy` row after AWiki, and declares
|
|
105
104
|
an explicit dependency on the loaded `awiki` service.
|
|
106
105
|
|
|
107
106
|
## Configuration
|
|
108
107
|
|
|
108
|
+
Full keys, sources, purposes, and defaults: [docs/configuration.md](docs/configuration.md).
|
|
109
|
+
|
|
109
110
|
The plugin works against the public `awiki.ai` tenant without environment configuration. Set these variables only when a deployment needs an override:
|
|
110
111
|
|
|
111
112
|
| Variable | Purpose | Default |
|
|
112
113
|
| --- | --- | --- |
|
|
113
|
-
| `DSH_AWIKI_USER_SERVICE_URL` | Absolute AWiki user-service URL | `https
|
|
114
|
-
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Composition default for the
|
|
115
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Message-service URL called by the Host | `https
|
|
114
|
+
| `DSH_AWIKI_USER_SERVICE_URL` | Absolute AWiki user-service URL | `https://awiki.ai` |
|
|
115
|
+
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Composition default for the Handle provider domain | `awiki.ai` |
|
|
116
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Message-service URL called by the Host | `https://awiki.ai` |
|
|
116
117
|
| `DSH_AWIKI_MAIL_SERVICE_URL` | Mail-service URL called by the Host | Resolved user-service URL |
|
|
117
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba
|
|
118
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https
|
|
118
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba:awiki.ai` |
|
|
119
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https://awiki.ai` |
|
|
119
120
|
| `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | JSON array of extra exact HTTPS origins | `[]` |
|
|
120
|
-
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory
|
|
121
|
+
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory | `$DSH_HOME/awiki/im-core` or `~/.dsh/awiki/im-core` |
|
|
122
|
+
| `DSH_ANP_IDENTITY_STATE_ROOT` | Independent multi-DID ANP Identity Store | `$DSH_HOME/anp-identity` |
|
|
123
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER` | Store Root Key provider (`keyring`, `local-file`, `env`, or programmatic `injected`) | `keyring` |
|
|
124
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID` | Keyring account, environment variable, or injected-provider identifier | `anp-identity/dsh` |
|
|
121
125
|
| `DSH_AWIKI_VAULT_ROOT_KEY_FILE` | Existing private file containing a base64/base64url 32-byte Vault root key | `$DSH_HOME/awiki/secret-vault/root-key.b64u` |
|
|
122
126
|
| `DSH_AWIKI_VAULT_WORKSPACE_ID` | Stable non-secret Vault workspace context | `dsh-awiki` |
|
|
123
127
|
| `DSH_AWIKI_VAULT_DEVICE_ID` | Stable non-secret Vault device context | `local-device` |
|
|
124
128
|
| `DSH_AWIKI_POLL_INTERVAL_MS` | Open-dialog polling interval | `5000` |
|
|
125
129
|
| `DSH_AWIKI_ATTACHMENT_MAX_BYTES` | Decoded attachment limit | `10485760` |
|
|
126
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_MAX_COUNT` | Maximum attachments in one mail; at most the service limit | `10` |
|
|
127
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_MAX_BYTES` | Maximum decoded bytes in one mail attachment | `10485760` |
|
|
128
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_TOTAL_MAX_BYTES` | Maximum total decoded attachment bytes in one mail | `18874368` |
|
|
129
130
|
| `DSH_AWIKI_IMAGE_CACHE_MAX_BYTES` | Private verified image-preview cache budget | `67108864` |
|
|
131
|
+
| `DSH_AWIKI_REALTIME_ENABLED` | Enable the identity-level Direct/Group/System Notification WSS | `true` |
|
|
130
132
|
| `DSH_AWIKI_LISTENER_ENABLED` | Enable the Direct-to-Agent listener | `false` |
|
|
131
133
|
| `DSH_AWIKI_LISTENER_ALLOWED_PEERS` | JSON array of exact Handles or DIDs; required when enabled | `[]` |
|
|
132
134
|
| `DSH_AWIKI_LISTENER_WORKSPACE_PATH` | Absolute shared Workspace for AWiki-originated Sessions | `$DSH_HOME/workspaces/awiki` or `~/.dsh/workspaces/awiki` |
|
|
133
135
|
| `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | UTF-8 cap after Host-side summary minimization | `32768` |
|
|
134
136
|
| `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | One-shot model deadline | `30000` |
|
|
135
137
|
| `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | Structured summary output cap | `768` |
|
|
136
|
-
|
|
137
|
-
The default state directory is isolated by DSH profile. Desktop uses the Host's
|
|
138
|
-
`desktopProfiles.current.name`; ordinary `dsh --profile` accepts the name only when the Loader
|
|
139
|
-
root exactly matches `$DSH_HOME/profiles/<name>`. The plugin does not guess from argv, ports, or
|
|
140
|
-
process type, and does not copy a legacy database automatically. The old shared `awiki/im-core`
|
|
141
|
-
directory remains untouched. When it is detected, the identity screen explains the isolation and
|
|
142
|
-
guides the user to recover with the original Handle and phone as a separate device.
|
|
143
|
-
|
|
144
138
|
## AWiki-hosted DeepSeek account
|
|
145
139
|
|
|
146
140
|
This capability now requires the separate `@awiki/dsh-model-proxy` package. It
|
|
@@ -194,14 +188,11 @@ closes the provider order, then restores the amount editor without creating a re
|
|
|
194
188
|
failure leaves the existing payment action available, while a payment that wins the race refreshes
|
|
195
189
|
the credited account instead of being reported as cancelled.
|
|
196
190
|
|
|
197
|
-
The default
|
|
191
|
+
The default Handle provider domain is `awiki.ai`. A local user can override it
|
|
198
192
|
from Settings → AWiki; DSH persists that choice in its settings document and
|
|
199
|
-
applies it after the next Harness restart.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
isolated local identity, message, cache directory, and browser recovery-operation
|
|
203
|
-
key. Switching back restores that tenant's previous local state instead of
|
|
204
|
-
rewriting its DID or keys.
|
|
193
|
+
applies it after the next Harness restart. The setting affects future identity
|
|
194
|
+
registration and completion of short Handles. It does not rewrite an already
|
|
195
|
+
registered DID or Handle.
|
|
205
196
|
|
|
206
197
|
The settings page talks to a plugin-owned Connection channel that the Host
|
|
207
198
|
accepts only from loopback. This keeps an independently installed `@awiki/dsh-plugin`
|
|
@@ -230,14 +221,21 @@ underlying disk and backups.
|
|
|
230
221
|
The Node facade owns `stateRoot/vault/root-key.b64u`; the Host does not provide, copy, or log Vault
|
|
231
222
|
key material. Preserve the complete SDK state root across ordinary restarts and upgrades.
|
|
232
223
|
|
|
233
|
-
The
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
224
|
+
The identity-level realtime supervisor is enabled by default and owns the deployment identity's
|
|
225
|
+
single Core WebSocket without depending on Workspace or Agent configuration. Direct, Group, and
|
|
226
|
+
System Notification events schedule canonical reliable sync; WSS never advances a checkpoint or
|
|
227
|
+
authorizes a device by itself. `DSH_AWIKI_REALTIME_ENABLED=false` explicitly falls back to HTTP
|
|
228
|
+
refresh. Diagnostics report the single-session lifecycle with start/stop balance, peak active
|
|
229
|
+
count, retry generation, and only closed sync failure codes; a healthy reconnect may have multiple
|
|
230
|
+
lifetime starts while still owning exactly one active session. Exact-device Node builds without an
|
|
231
|
+
active P6 lane use the existing `awiki.sync.event.v3` WebSocket subprotocol, while P6
|
|
232
|
+
delivery-context is requested only after that lane was explicitly negotiated. The optional Direct-to-Agent consumer still requires both
|
|
233
|
+
`DSH_AWIKI_LISTENER_ENABLED=true` and a non-empty exact allowlist. It reads only committed Direct
|
|
234
|
+
text after eligible sync causes and cannot start or stop WSS. One identity-scoped route and message
|
|
235
|
+
watermark per Direct conversation preserve the current DSH Session across restarts. Every
|
|
236
|
+
AWiki-originated Session is created in and attached to the registered shared AWiki Workspace.
|
|
237
|
+
Listener messages are untrusted user data and do not approve tools or bridge approval/user-question
|
|
238
|
+
prompts.
|
|
241
239
|
|
|
242
240
|
For the default 10 MiB decoded attachment cap, configure a reverse-proxy request
|
|
243
241
|
limit of at least 14 MiB to account for base64 and JSON overhead.
|
|
@@ -294,7 +292,7 @@ pnpm run verify:workspace
|
|
|
294
292
|
pnpm pack --dry-run
|
|
295
293
|
```
|
|
296
294
|
|
|
297
|
-
The production Host loads the exact `@awiki/im-core-node@0.1
|
|
295
|
+
The production Host loads the exact `@awiki/im-core-node@0.2.1` runtime package;
|
|
298
296
|
the platform-specific native addon is selected through its optional dependencies
|
|
299
297
|
and remains external to the JavaScript bundle. Consumers do not need Rust or an
|
|
300
298
|
`awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
|
package/README.zh.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# @awiki/dsh-plugin
|
|
2
2
|
|
|
3
3
|
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供 AWiki
|
|
4
|
-
|
|
5
|
-
以及带可拖动 AWiki Me 悬浮入口的 Web
|
|
4
|
+
账号、授权、恢复与消息能力。主包包含 Host Service、IM Core Provider、Agent 工具,
|
|
5
|
+
以及带可拖动 AWiki Me 悬浮入口的 Web 客户端;通用 DID 文档与私钥由独立的
|
|
6
|
+
`@agent-network-protocol/dsh-anp-identity` 插件管理,并通过 Cordis 注入。
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
两个插件的状态所有权相互独立:ANP Identity 管理多 DID Store、DID 文档、私钥和发布事务;
|
|
9
|
+
AWiki IM Core 管理 Handle/账号绑定、设备与恢复流程、认证令牌、消息、邮件、SQLite 和缓存。
|
|
10
|
+
Host-only Provider lease 不会进入 Browser、Remote、Agent tools 或模型 API。
|
|
10
11
|
|
|
11
12
|
## 功能
|
|
12
13
|
|
|
13
|
-
- 在 Web UI 的统一入口输入 Handle
|
|
14
|
+
- 在 Web UI 的统一入口输入 Handle 和手机号,并始终先发送注册验证码。新 Handle 创建部署级身份;已有 Handle 优先进入普通 Device Join,Recovery V4 仅作为显式危险替代项,并重新发送用途隔离的恢复验证码;根 Agent 与子 Agent 共用最终身份。
|
|
15
|
+
- DSH 可以作为独立 member 设备加入已有 Handle;当 DSH 创建或恢复 Handle、当前设备为 ready-admin 时,前台“设备”页可列出设备、通过 SAS 验证并批准 member、拒绝请求或撤销其他设备。管理动作不进入 Agent 工具,并要求显式输入 `APPROVE` / `REVOKE`。
|
|
14
16
|
- 点击 AWiki 面板左上角图标可打开账户菜单;普通退出只锁定本机会话,不删除加密身份或消息数据库,重新进入及重启 DSH 后仍恢复同一个 DID 和 Handle。退出页默认只提供重新进入本机身份和使用其他身份;只有本机重新进入失败后才显示手机号恢复入口。改用其他身份必须先确认永久清除本地 AWiki 数据。
|
|
15
17
|
- 身份入口失败时保留当前挂载表单中的手机号、Handle 和验证码,以便修正后重试;手机号和验证码不进入 Browser 持久化状态、controller snapshot 或公开 Remote 结果。仅恢复操作编号可用于崩溃续跑。注册未开放、验证码状态失效和提交冲突会给出对应的安全处理提示。
|
|
16
18
|
- 私聊和已有群聊列表、未读角标、最新消息预览、时间更新与昵称持久化。Core SQLite 是持久化真相源:Host 将持久化的对端资料合并进私聊列表,浏览器再按当前身份保留最后一次可信的私聊资料和群名,稀疏轮询中的 Handle、DID 或 Group DID 占位不会覆盖真实名称。恢复已有 Handle 后,Host 会先同步账号投影,再让 Core 自动恢复旧群聊成员身份;未完成或受阻的群聊会显示可重试状态,但不影响私聊和其他群聊。打开会话时先显示 Core 已提交的本地时间线,并从 Core 显示资料缓存补齐群消息发送者名称,再在后台补齐远端历史和私聊资料;刷新失败不会清空本地消息。后台会话轮询失败也不会用全局红条打断仍可用的本地页面,用户主动加载失败仍会正常提示。当前 local-first 只覆盖本地最新一页,“加载更早消息”仍需访问远端 history。向上阅读时显示下滑箭头,新消息到达后在同一控件中累计数量且不打断阅读位置。只有最新一条已渲染消息到达可视区域底部后,当前会话才会自动标记为已读。
|
|
@@ -18,16 +20,15 @@ Rust 身份。
|
|
|
18
20
|
- 文本和单附件消息;Enter 发送、Shift+Enter 换行,发送中立即显示带 loading 动画的乐观气泡,并通过精确的客户端消息 ID 与已提交消息对账,避免同一条消息显示两个气泡;同时支持图片预览、附件说明与 SHA 校验。校验通过的图片字节使用三层有界缓存:浏览器运行期 LRU 让会话重新挂载时立即出图,按身份隔离的 IndexedDB 在整页刷新后无需访问 Host,Host 私有磁盘缓存则应对浏览器缓存丢失并跨 Harness 重启复用;“清除本地数据”会删除三层缓存。
|
|
19
21
|
- 圆形可拖动入口、自适应四角弹窗、深色模式和当前会话记忆。
|
|
20
22
|
- 用户点击后才生成的 AI 对话总结:最多处理 50 条最近或未读消息,按会话保留本次运行期缓存,并支持过期提示、重试、复制与跳转原消息。
|
|
21
|
-
- OTP
|
|
22
|
-
- Recovery V4 进入 `applied` 后,Host
|
|
23
|
+
- OTP 身份入口会保留验证码输入表单,并按服务端返回的冷却时间显示重发倒计时、禁用提前重发;已有 Handle 在消费 registration OTP 后再选择 Join 或 Recovery,Recovery 不复用 registration grant。
|
|
24
|
+
- Recovery V4 进入 `applied` 后,Host 会用 current DID 解析已恢复 Handle 的原邮箱;如同时安装独立 Model Proxy 包,还会获取一份短时、固定受众的恢复凭证,把 current DID 对账到原模型账本,不复制余额、不做金额相加。临时失败只保留非敏感 operation id,并在重启后对同一幂等操作自动重试;恢复凭证和账本标识不会进入 Browser 状态、Agent 工具、日志或模型上下文。
|
|
23
25
|
- 安装独立的 `@awiki/dsh-model-proxy` 后,仅在 Harness 没有任何可用模型时,首次引导才会在官方 API Key 步骤前提供 AWiki 托管模型选项;用户可以明确启用,也可以跳过并继续原版 API Key 流程。已经配置官方或其他 Provider 时,新会话不会显示 AWiki 模型或支付提示。
|
|
24
26
|
- 可选 Model Proxy 包独占 Host 内部短期 Token 和全部模型托管界面:首次引导,以及“设置 → 快速充值”中的“账户与充值”“用量明细”。它提供 `deepseek-v4-flash` 和 `deepseek-v4-pro`,默认推荐 Flash;Token 不进入 Browser。
|
|
25
27
|
- AWiki 主包只保留身份、域名和本地数据设置。只安装主包时,不会注册模型启停、充值、用量或模型首次引导界面。
|
|
26
28
|
- 在设置页危险区域中,经输入确认词的二次确认后,永久清空本机 AWiki 身份、密钥、令牌、注册草稿和消息索引。
|
|
27
29
|
- 五个消息 Agent 工具:身份、会话、历史、需审批的文本发送和需审批的附件发送。
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- 可选的实时监听模式:exact allowlist 中的私聊对方可续接一个 DSH Agent 会话,或使用 `/new`、`/status`、`/help`。
|
|
30
|
+
- 五个按需邮件 Agent 工具:邮箱账户、收件箱、纯文本读取、需审批的标记已读和需审批的纯文本发送。
|
|
31
|
+
- 默认身份级 realtime 连接统一调度 Direct、Group 和 System Notification 同步;独立、可选的 Agent consumer 允许 exact allowlist 中的私聊对方续接一个 DSH Agent 会话,或使用 `/new`、`/status`、`/help`。
|
|
31
32
|
|
|
32
33
|
## 界面截图
|
|
33
34
|
|
|
@@ -42,25 +43,21 @@ Rust 身份。
|
|
|
42
43
|
首版不包含端到端加密、多身份、建群后的成员或群设置管理和单消息多附件。Agent listener 只接受明文私聊文本;
|
|
43
44
|
群聊、附件、加密/payload 内容和未知斜杠命令都不会进入 Agent。
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Host 下发的数量、单文件和总量限制;只有 canonical Base64 会穿过 Remote。附件只能显式下载;
|
|
48
|
-
Browser 在创建临时 Blob URL 前复核返回元数据、canonical Base64、字节数和 SHA-256,随后立即
|
|
49
|
-
释放 URL,不会自动打开 HTML、SVG 或其他附件。本地发件历史只保存服务端消息 ID、文件元数据和
|
|
50
|
-
SHA-256,不保存附件字节。邮件主题、地址、预览、正文、
|
|
46
|
+
邮件 v1 仅支持按需调用,不提供浏览器收件箱或写信 UI,也不会以新邮件唤醒 Agent;不渲染或
|
|
47
|
+
发送 HTML,不传输邮件附件,也不支持回复、转发和会话串联。邮件主题、地址、预览、正文、
|
|
51
48
|
时间戳和附件元数据都是不可信外部数据,不能作为 Agent 指令。`awiki_mail_mark_read` 和
|
|
52
49
|
`awiki_mail_send` 每次执行都需要审批。邮件发送只尝试一次且不自动重试;超时或传输中断返回
|
|
53
|
-
`delivery-unknown`,再次审批发送前应先检查邮箱。
|
|
54
|
-
在 Harness 提供正式、可授权的文件资源契约前,附件选择和下载都保留为 Browser UI 显式操作。
|
|
50
|
+
`delivery-unknown`,再次审批发送前应先检查邮箱。
|
|
55
51
|
|
|
56
52
|
身份恢复不新增服务端私聊恢复。清空本地状态后不会重新构造历史私聊会话;只有 Rust SDK
|
|
57
53
|
已经保留的普通本地数据继续遵循 Core 既有迁移规则。邮箱和托管模型账本对账与私聊边界相互独立。
|
|
58
54
|
|
|
59
55
|
## 安装
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
先安装独立身份插件,再安装 AWiki:
|
|
62
58
|
|
|
63
59
|
```bash
|
|
60
|
+
dsh plugin --profile web add @agent-network-protocol/dsh-anp-identity@latest
|
|
64
61
|
dsh plugin --profile web add @awiki/dsh-plugin@latest
|
|
65
62
|
```
|
|
66
63
|
|
|
@@ -79,47 +76,44 @@ Profile 命令。本发布线面向 `0.1.1-rc.2` 包族,并精确锁定所有
|
|
|
79
76
|
从 `0.2.0-rc.4` 起,`@awiki/dsh-plugin` 是唯一规范包名。原
|
|
80
77
|
`@awiki/dsh` registry 条目已被 unpublish,不再作为本发布线的安装来源。
|
|
81
78
|
|
|
82
|
-
请在常规 DSH base 和 Web app bundle
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
请在常规 DSH base 和 Web app bundle 之后应用两个插件。独立 ANP Identity 插件拥有
|
|
80
|
+
Identity Service 与 Native Provider layer;本包 `cordis.patch.yml` 只加入 AWiki Host Service、
|
|
81
|
+
AWiki IM Core Provider 和 Summary Provider。浏览器客户端由 DSH 根据包元数据自动发现并注入。卸载时先关闭 IM Core,
|
|
82
|
+
再撤销身份 lease,最后关闭身份 Store Provider。主 patch 不再插入 Model Proxy。可选包使用自己的 patch,
|
|
85
83
|
只插入一个 `awiki-model-proxy`,并显式依赖已经加载的 `awiki` 服务。
|
|
86
84
|
|
|
87
85
|
## 配置
|
|
88
86
|
|
|
87
|
+
完整标识符、来源、作用与默认值见 [docs/configuration.md](docs/configuration.md)。
|
|
88
|
+
|
|
89
89
|
插件无需环境变量即可连接公开的 `awiki.ai` 租户;仅在部署需要覆盖默认值时设置以下变量:
|
|
90
90
|
|
|
91
91
|
| 环境变量 | 用途 | 默认值 |
|
|
92
92
|
| --- | --- | --- |
|
|
93
|
-
| `DSH_AWIKI_USER_SERVICE_URL` | AWiki user service 绝对 URL | `https
|
|
94
|
-
| `DSH_AWIKI_USER_SERVICE_DOMAIN` |
|
|
95
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Host 调用的 message service URL | `https
|
|
93
|
+
| `DSH_AWIKI_USER_SERVICE_URL` | AWiki user service 绝对 URL | `https://awiki.ai` |
|
|
94
|
+
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Handle 提供方域名的部署默认值 | `awiki.ai` |
|
|
95
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Host 调用的 message service URL | `https://awiki.ai` |
|
|
96
96
|
| `DSH_AWIKI_MAIL_SERVICE_URL` | Host 调用的 mail service URL | 解析后的 user service URL |
|
|
97
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba
|
|
98
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https
|
|
97
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba:awiki.ai` |
|
|
98
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https://awiki.ai` |
|
|
99
99
|
| `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | 额外附件 HTTPS origin 的 JSON 数组 | `[]` |
|
|
100
|
-
| `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core
|
|
100
|
+
| `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core 状态目录 | `$DSH_HOME/awiki/im-core` 或 `~/.dsh/awiki/im-core` |
|
|
101
|
+
| `DSH_ANP_IDENTITY_STATE_ROOT` | 独立的 ANP Identity 多 DID Store | `$DSH_HOME/anp-identity` |
|
|
102
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER` | Store 根密钥提供方(`keyring`、`local-file`、`env` 或程序注入的 `injected`) | `keyring` |
|
|
103
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID` | Keyring account、环境变量名或 injected provider 标识 | `anp-identity/dsh` |
|
|
101
104
|
| `DSH_AWIKI_VAULT_ROOT_KEY_FILE` | 含 base64/base64url 32-byte Vault root key 的既有私有文件 | `$DSH_HOME/awiki/secret-vault/root-key.b64u` |
|
|
102
105
|
| `DSH_AWIKI_VAULT_WORKSPACE_ID` | 稳定、非秘密的 Vault workspace context | `dsh-awiki` |
|
|
103
106
|
| `DSH_AWIKI_VAULT_DEVICE_ID` | 稳定、非秘密的 Vault device context | `local-device` |
|
|
104
107
|
| `DSH_AWIKI_POLL_INTERVAL_MS` | 弹窗打开时的轮询间隔 | `5000` |
|
|
105
108
|
| `DSH_AWIKI_ATTACHMENT_MAX_BYTES` | 解码后的附件上限 | `10485760` |
|
|
106
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_MAX_COUNT` | 单封邮件附件数量上限,不得高于服务端 | `10` |
|
|
107
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_MAX_BYTES` | 单个邮件附件解码字节上限 | `10485760` |
|
|
108
|
-
| `DSH_AWIKI_MAIL_ATTACHMENT_TOTAL_MAX_BYTES` | 单封邮件附件解码总字节上限 | `18874368` |
|
|
109
109
|
| `DSH_AWIKI_IMAGE_CACHE_MAX_BYTES` | 私有图片预览缓存的磁盘预算 | `67108864` |
|
|
110
|
+
| `DSH_AWIKI_REALTIME_ENABLED` | 开启身份级 Direct/Group/System Notification WSS | `true` |
|
|
110
111
|
| `DSH_AWIKI_LISTENER_ENABLED` | 开启私聊到 Agent 的 listener | `false` |
|
|
111
112
|
| `DSH_AWIKI_LISTENER_ALLOWED_PEERS` | exact Handle/DID JSON 数组;开启时必填 | `[]` |
|
|
112
113
|
| `DSH_AWIKI_LISTENER_WORKSPACE_PATH` | 所有 AWiki Session 共用的绝对 Workspace 路径 | `$DSH_HOME/workspaces/awiki` 或 `~/.dsh/workspaces/awiki` |
|
|
113
114
|
| `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | Host 最小化后的 UTF-8 输入上限 | `32768` |
|
|
114
115
|
| `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | 单次模型调用超时 | `30000` |
|
|
115
116
|
| `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | 结构化摘要输出上限 | `768` |
|
|
116
|
-
|
|
117
|
-
默认状态目录按 DSH profile 隔离:Desktop 以 Host 公开的 `desktopProfiles.current.name`
|
|
118
|
-
为准,普通 `dsh --profile` 仅在 Loader 根目录严格匹配 `$DSH_HOME/profiles/<name>`
|
|
119
|
-
时采用该名称。插件不会从 argv、端口或进程类型猜测 profile,也不会自动复制旧数据库;
|
|
120
|
-
旧的共享 `awiki/im-core` 仍保留在原处。若检测到旧目录,身份入口会说明隔离原因并引导
|
|
121
|
-
用户通过原 Handle 和手机号恢复,把目标 profile 作为独立设备接入。
|
|
122
|
-
|
|
123
117
|
## AWiki 托管模型账户
|
|
124
118
|
|
|
125
119
|
该能力现在需要单独安装 `@awiki/dsh-model-proxy`。它通过
|
|
@@ -164,11 +158,9 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
|
|
|
164
158
|
关闭支付平台订单,再恢复金额输入框,并且不会自动创建替代订单。关闭失败时原支付入口继续
|
|
165
159
|
有效;若支付在关闭竞态中先完成,界面会刷新已入账账户,而不会误报订单已取消。
|
|
166
160
|
|
|
167
|
-
|
|
168
|
-
DSH 会把选择写入自己的设置文件,并在下次重启 Harness
|
|
169
|
-
|
|
170
|
-
每个域名使用相互隔离的本地身份、消息、缓存目录和浏览器身份恢复任务;切回原域名会恢复
|
|
171
|
-
原有本地状态,不会把一个租户的 DID、私钥、邮箱账号或恢复进度带到另一个租户。
|
|
161
|
+
Handle 提供方的默认域名为 `awiki.ai`。本机用户可以在“设置 → AWiki”中覆盖该值;
|
|
162
|
+
DSH 会把选择写入自己的设置文件,并在下次重启 Harness 后生效。该设置影响后续
|
|
163
|
+
身份注册和短 Handle 的域名补全,不会改写已经注册的 DID 或 Handle。
|
|
172
164
|
|
|
173
165
|
设置页通过插件自有的 Connection 通道访问 Host,Host 只接受 loopback 来源。
|
|
174
166
|
因此独立安装的 `@awiki/dsh-plugin` 无需修改 DSH 核心设置白名单;非本机浏览器来源不能
|
|
@@ -191,12 +183,14 @@ Provider 域名和消息服务 DID 都是协议标识,不能根据 API host
|
|
|
191
183
|
Node facade 独占 `stateRoot/vault/root-key.b64u`;Host 不提供、不复制也不记录 Vault key
|
|
192
184
|
material。普通重启与升级期间应完整保留 SDK state root。
|
|
193
185
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
186
|
+
身份级 realtime supervisor 默认开启,独占部署身份的一条 Core WebSocket,不依赖 Workspace 或
|
|
187
|
+
Agent 配置。Direct、Group 和 System Notification 事件只调度 canonical reliable sync;WSS 本身
|
|
188
|
+
不推进 checkpoint,也不授权设备。显式设置 `DSH_AWIKI_REALTIME_ENABLED=false` 可回退到 HTTP
|
|
189
|
+
refresh。私聊 Agent consumer 仍只有在 `DSH_AWIKI_LISTENER_ENABLED=true` 且 exact allowlist
|
|
190
|
+
非空时才启用;它只读取合格同步原因之后的已提交 Direct 文本,不能启动或停止 WSS。每个私聊的
|
|
191
|
+
DSH Session route 和消息 watermark 按身份隔离持久化,重启后可续接;所有 AWiki 来源 Session 都
|
|
192
|
+
创建并 attach 到已注册的共享 AWiki Workspace。Listener 消息始终是不可信用户数据,不会自动批准
|
|
193
|
+
工具,也不会桥接 approval 或 user-question prompt。
|
|
200
194
|
|
|
201
195
|
默认附件上限为解码后 10 MiB;反向代理请求体上限至少应为 14 MiB,以容纳
|
|
202
196
|
base64 与 JSON 封装开销。
|
|
@@ -247,7 +241,7 @@ pnpm run verify:workspace
|
|
|
247
241
|
pnpm pack --dry-run
|
|
248
242
|
```
|
|
249
243
|
|
|
250
|
-
生产 Host 加载固定版本 `@awiki/im-core-node@0.1
|
|
244
|
+
生产 Host 加载固定版本 `@awiki/im-core-node@0.2.1`;平台原生 addon 由它的
|
|
251
245
|
optional dependencies 选择,并保持在 JavaScript bundle 外。使用者无需安装 Rust,
|
|
252
246
|
也无需检出 `awiki-cli-rs2`。来源与许可证见 `THIRD_PARTY_NOTICES.md`。
|
|
253
247
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## AWiki Rust IM Core Node SDK
|
|
4
4
|
|
|
5
|
-
`@awiki/im-core-node@0.1
|
|
5
|
+
`@awiki/im-core-node@0.2.1` and its target-specific optional package provide the
|
|
6
6
|
Rust IM Core runtime used by the Host provider. These packages are distributed
|
|
7
7
|
under AGPL-3.0-only. Each package carries its own `LICENSE`, `NOTICE.md`,
|
|
8
8
|
`SOURCE.md`, CycloneDX SBOM, checksums, and build provenance. The corresponding
|
package/cordis.patch.yml
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
# Optional AWiki messaging for a DeepSeek Harness Web profile. Apply after
|
|
2
|
-
# @deepseek-ai/dsh-base
|
|
2
|
+
# @deepseek-ai/dsh-base, @deepseek-ai/dsh-web-app, and the standalone
|
|
3
|
+
# @agent-network-protocol/dsh-anp-identity bundle layer.
|
|
3
4
|
|
|
4
5
|
- insert:
|
|
5
6
|
- id: awiki
|
|
6
7
|
name: '@awiki/dsh-plugin'
|
|
7
8
|
config:
|
|
8
|
-
userServiceUrl: !!js process.env.DSH_AWIKI_USER_SERVICE_URL
|
|
9
|
+
userServiceUrl: !!js process.env.DSH_AWIKI_USER_SERVICE_URL ?? 'https://awiki.ai'
|
|
9
10
|
userServiceDomain: !!js process.env.DSH_AWIKI_USER_SERVICE_DOMAIN ?? 'awiki.ai'
|
|
10
|
-
messageServiceUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_URL
|
|
11
|
+
messageServiceUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_URL ?? 'https://awiki.ai'
|
|
11
12
|
mailServiceUrl: !!js process.env.DSH_AWIKI_MAIL_SERVICE_URL
|
|
12
|
-
messageServiceDid: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_DID
|
|
13
|
-
messageServicePublicUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL
|
|
13
|
+
messageServiceDid: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_DID ?? 'did:wba:awiki.ai'
|
|
14
|
+
messageServicePublicUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL ?? 'https://awiki.ai'
|
|
14
15
|
allowedAttachmentOrigins: !!js JSON.parse(process.env.DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS ?? '[]')
|
|
15
16
|
stateRoot: !!js process.env.DSH_AWIKI_STATE_ROOT
|
|
16
17
|
pollIntervalMs: !!js Number(process.env.DSH_AWIKI_POLL_INTERVAL_MS ?? '5000')
|
|
17
18
|
attachmentMaxBytes: !!js Number(process.env.DSH_AWIKI_ATTACHMENT_MAX_BYTES ?? '10485760')
|
|
18
|
-
mailAttachmentMaxCount: !!js Number(process.env.DSH_AWIKI_MAIL_ATTACHMENT_MAX_COUNT ?? '10')
|
|
19
|
-
mailAttachmentMaxBytes: !!js Number(process.env.DSH_AWIKI_MAIL_ATTACHMENT_MAX_BYTES ?? '10485760')
|
|
20
|
-
mailAttachmentTotalMaxBytes: !!js Number(process.env.DSH_AWIKI_MAIL_ATTACHMENT_TOTAL_MAX_BYTES ?? '18874368')
|
|
21
19
|
imageAttachmentCacheMaxBytes: !!js Number(process.env.DSH_AWIKI_IMAGE_CACHE_MAX_BYTES ?? '67108864')
|
|
22
20
|
summaryMaxInputBytes: !!js Number(process.env.DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES ?? '32768')
|
|
21
|
+
realtimeEnabled: !!js JSON.parse(process.env.DSH_AWIKI_REALTIME_ENABLED || 'true')
|
|
23
22
|
listenerEnabled: !!js process.env.DSH_AWIKI_LISTENER_ENABLED === 'true'
|
|
24
23
|
listenerAllowedPeers: !!js JSON.parse(process.env.DSH_AWIKI_LISTENER_ALLOWED_PEERS ?? '[]')
|
|
25
24
|
listenerWorkspacePath: !!js process.env.DSH_AWIKI_LISTENER_WORKSPACE_PATH
|