@awiki/dsh-plugin 0.3.4 → 0.3.6
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 +60 -51
- package/README.zh.md +51 -43
- package/cordis.patch.yml +7 -21
- package/lib/client.js +785 -1308
- package/lib/client.js.map +1 -1
- package/lib/index.js +715 -1017
- package/lib/provider.js +16 -52
- package/lib/{sdk-adapter-BeJakxLP.mjs → sdk-adapter--trNlr-T.mjs} +38 -143
- package/lib/typert.host.js +139 -414
- package/lib/typert.remote-client.d.ts +5 -19
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +139 -414
- package/lib/types/client/AwikiIdentityAccess.d.ts +5 -6
- package/lib/types/client/AwikiIdentityAccess.d.ts.map +1 -1
- package/lib/types/client/AwikiIdentityAccess.js +27 -88
- 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 +130 -6
- 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 +3 -4
- package/lib/types/client/AwikiOverlay.js.map +1 -1
- package/lib/types/client/controller.d.ts +11 -20
- package/lib/types/client/controller.d.ts.map +1 -1
- package/lib/types/client/controller.js +48 -53
- 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 +2 -8
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/mail-attachment.d.ts +40 -0
- package/lib/types/client/mail-attachment.d.ts.map +1 -0
- package/lib/types/client/mail-attachment.js +186 -0
- package/lib/types/client/mail-attachment.js.map +1 -0
- 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 +6 -10
- package/lib/types/client/slots.d.ts.map +1 -1
- package/lib/types/index.d.ts +28 -59
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +417 -800
- package/lib/types/index.js.map +1 -1
- package/lib/types/listener-state.d.ts +3 -5
- package/lib/types/listener-state.d.ts.map +1 -1
- package/lib/types/listener-state.js +13 -28
- package/lib/types/listener-state.js.map +1 -1
- package/lib/types/listener.d.ts +32 -9
- package/lib/types/listener.d.ts.map +1 -1
- package/lib/types/listener.js +127 -11
- package/lib/types/listener.js.map +1 -1
- package/lib/types/mail.d.ts +28 -2
- package/lib/types/mail.d.ts.map +1 -1
- package/lib/types/mail.js +78 -2
- package/lib/types/mail.js.map +1 -1
- package/lib/types/profile-state.d.ts +17 -0
- package/lib/types/profile-state.d.ts.map +1 -0
- package/lib/types/profile-state.js +58 -0
- package/lib/types/profile-state.js.map +1 -0
- package/lib/types/provider-api.d.ts +36 -100
- package/lib/types/provider-api.d.ts.map +1 -1
- package/lib/types/provider.d.ts +1 -7
- package/lib/types/provider.d.ts.map +1 -1
- package/lib/types/provider.js +15 -53
- package/lib/types/provider.js.map +1 -1
- package/lib/types/sdk-adapter.d.ts +5 -30
- package/lib/types/sdk-adapter.d.ts.map +1 -1
- package/lib/types/sdk-adapter.js +48 -133
- package/lib/types/sdk-adapter.js.map +1 -1
- package/lib/types/sent-mail-store.d.ts +7 -2
- package/lib/types/sent-mail-store.d.ts.map +1 -1
- package/lib/types/sent-mail-store.js +125 -23
- 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 +20 -4
- package/lib/types/tools.js.map +1 -1
- package/lib/types/types.d.ts +45 -77
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/package.json +4 -6
- package/lib/types/client/AwikiDevices.d.ts +0 -28
- package/lib/types/client/AwikiDevices.d.ts.map +0 -1
- package/lib/types/client/AwikiDevices.js +0 -85
- package/lib/types/client/AwikiDevices.js.map +0 -1
- package/lib/types/realtime-supervisor.d.ts +0 -43
- package/lib/types/realtime-supervisor.d.ts.map +0 -1
- package/lib/types/realtime-supervisor.js +0 -166
- package/lib/types/realtime-supervisor.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
# @awiki/dsh-plugin
|
|
2
2
|
|
|
3
|
-
AWiki
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
General DID documents and private keys are managed by the independent
|
|
7
|
-
`@agent-network-protocol/dsh-anp-identity` plugin and injected through Cordis.
|
|
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.
|
|
8
6
|
|
|
9
7
|
[中文说明](./README.zh.md)
|
|
10
8
|
|
|
@@ -13,16 +11,13 @@ phone and OTP never enter browser persistence, controller snapshots, or public
|
|
|
13
11
|
Remote results. Closed registration, unavailable verification state, and commit conflicts each give
|
|
14
12
|
a safe next action without exposing remote response details.
|
|
15
13
|
|
|
16
|
-
The
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
configured `stateRoot`. The Host-only provider lease is never exposed to Browser, Remote, Agent
|
|
20
|
-
tools, or model APIs.
|
|
14
|
+
The Rust SDK exclusively owns the identity, SecretVault, database, cache, and metadata below the
|
|
15
|
+
configured `stateRoot`. This release performs a clean cutover and does not import the former
|
|
16
|
+
TypeScript SDK `identity.json`; create a new Rust-backed identity after upgrading.
|
|
21
17
|
|
|
22
18
|
## Features
|
|
23
19
|
|
|
24
|
-
- Enter a Handle and phone through one Web UI flow
|
|
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.
|
|
20
|
+
- Enter a Handle and phone through one Web UI flow. Before any code is sent, the Host classifies the Handle: a new Handle receives a registration OTP and creates the deployment identity, while an existing Handle receives one Recovery V4 OTP and enters the recovery state machine directly.
|
|
26
21
|
- 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.
|
|
27
22
|
- Reuse that identity across the root Agent and its subagents.
|
|
28
23
|
- 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.
|
|
@@ -31,14 +26,15 @@ tools, or model APIs.
|
|
|
31
26
|
- A draggable circular launcher that defaults to the lower-left sidebar area, adaptive popup placement, dark mode, and remembered active conversation.
|
|
32
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.
|
|
33
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.
|
|
34
|
-
- After Recovery V4 reaches `applied`, the Host
|
|
29
|
+
- After Recovery V4 reaches `applied`, the Host activates the recovered identity immediately. Automatic restoration of the historical mailbox and canonical model billing account is currently deferred, so those optional account projections cannot block identity recovery. The Browser clears its blocking operation marker while Core retains the authoritative recovery journal; no recovery attestation or model reconciliation request is issued.
|
|
35
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.
|
|
36
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.
|
|
37
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.
|
|
38
33
|
- A typed second confirmation in the Settings danger zone before permanently clearing local AWiki identity, key, token, registration-draft, and message-index state.
|
|
39
34
|
- Five messaging Agent tools: identity status, conversations, history, approved text send, and approved attachment send.
|
|
40
|
-
-
|
|
41
|
-
-
|
|
35
|
+
- A mail Web UI that selects, reviews, removes, and sends up to 10 bounded attachments, then explicitly downloads one metadata-matched attachment with Base64, size, and SHA-256 verification.
|
|
36
|
+
- Five on-demand mail Agent tools: mailbox account, inbox, plain-text read, approved mark-read, and approved plain-text send. Mail read exposes attachment metadata plus a Browser-UI-only download note; Agent mail send remains attachment-free because DSH has no authorized file-resource handle for this tool.
|
|
37
|
+
- An opt-in realtime listener that lets exact-allowlisted Direct peers continue one DSH Agent session or use `/new`, `/status`, and `/help`.
|
|
42
38
|
|
|
43
39
|
## Screenshots
|
|
44
40
|
|
|
@@ -55,12 +51,20 @@ post-creation group administration or multiple attachments in one message. The A
|
|
|
55
51
|
plain Direct text; Groups, attachments, encrypted/payload content, and unknown slash commands never
|
|
56
52
|
reach the Agent.
|
|
57
53
|
|
|
58
|
-
Mail
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
Mail remains on demand and does not wake an Agent for new mail, render or send HTML, or implement
|
|
55
|
+
reply, forward, and threading. The Browser reads only user-selected `File` objects, freezes the
|
|
56
|
+
approved draft during its one send attempt, and enforces the Host-provided count, single-file, and
|
|
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
|
|
61
63
|
untrusted external data, never Agent instructions. `awiki_mail_mark_read` and `awiki_mail_send`
|
|
62
64
|
require execution approval. Mail send is attempted once without automatic retry; a timeout or
|
|
63
65
|
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.
|
|
64
68
|
|
|
65
69
|
Identity recovery does not add server-side private-chat restoration. A fresh local state does not
|
|
66
70
|
reconstruct historical Direct conversations; only ordinary data already retained by the Rust SDK
|
|
@@ -69,10 +73,9 @@ are independent of that private-chat boundary.
|
|
|
69
73
|
|
|
70
74
|
## Install
|
|
71
75
|
|
|
72
|
-
Install the
|
|
76
|
+
Install the official public npm package:
|
|
73
77
|
|
|
74
78
|
```bash
|
|
75
|
-
dsh plugin --profile web add @agent-network-protocol/dsh-anp-identity@latest
|
|
76
79
|
dsh plugin --profile web add @awiki/dsh-plugin@latest
|
|
77
80
|
```
|
|
78
81
|
|
|
@@ -94,11 +97,10 @@ families in a DSH root dependency tree.
|
|
|
94
97
|
`0.2.0-rc.4`. The former `@awiki/dsh` registry entry was unpublished and is
|
|
95
98
|
not an installation source for this release line.
|
|
96
99
|
|
|
97
|
-
Apply the
|
|
98
|
-
`cordis.patch.yml`
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
lease, and the identity Store Provider closes last. The patch does not insert Model Proxy. The optional package has its
|
|
100
|
+
Apply the package after the normal DSH base and Web app bundles. Its
|
|
101
|
+
The main `cordis.patch.yml` adds the AWiki Host service, Rust SDK provider, and
|
|
102
|
+
summary provider; DSH discovers and injects the browser client through the
|
|
103
|
+
package metadata. It does not insert Model Proxy. The optional package has its
|
|
102
104
|
own patch, inserts exactly one `awiki-model-proxy` row after AWiki, and declares
|
|
103
105
|
an explicit dependency on the loaded `awiki` service.
|
|
104
106
|
|
|
@@ -108,30 +110,37 @@ The plugin works against the public `awiki.ai` tenant without environment config
|
|
|
108
110
|
|
|
109
111
|
| Variable | Purpose | Default |
|
|
110
112
|
| --- | --- | --- |
|
|
111
|
-
| `DSH_AWIKI_USER_SERVICE_URL` | Absolute AWiki user-service URL | `https
|
|
112
|
-
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Composition default for the
|
|
113
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Message-service URL called by the Host | `https
|
|
113
|
+
| `DSH_AWIKI_USER_SERVICE_URL` | Absolute AWiki user-service URL | `https://<selected-domain>` |
|
|
114
|
+
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Composition default for the tenant domain | `awiki.ai` |
|
|
115
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Message-service URL called by the Host | `https://<selected-domain>` |
|
|
114
116
|
| `DSH_AWIKI_MAIL_SERVICE_URL` | Mail-service URL called by the Host | Resolved user-service URL |
|
|
115
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba
|
|
116
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https
|
|
117
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba:<selected-domain>` |
|
|
118
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https://<selected-domain>` |
|
|
117
119
|
| `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | JSON array of extra exact HTTPS origins | `[]` |
|
|
118
|
-
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory | `$DSH_HOME/awiki
|
|
119
|
-
| `DSH_ANP_IDENTITY_STATE_ROOT` | Independent multi-DID ANP Identity Store | `$DSH_HOME/anp-identity` |
|
|
120
|
-
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER` | Store Root Key provider (`keyring`, `local-file`, `env`, or programmatic `injected`) | `keyring` |
|
|
121
|
-
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID` | Keyring account, environment variable, or injected-provider identifier | `anp-identity/dsh` |
|
|
120
|
+
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory; an explicit value overrides profile isolation | `$DSH_HOME/awiki/<profile>/im-core` or `~/.dsh/awiki/<profile>/im-core`; legacy `awiki/im-core` when no profile can be proven |
|
|
122
121
|
| `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` |
|
|
123
122
|
| `DSH_AWIKI_VAULT_WORKSPACE_ID` | Stable non-secret Vault workspace context | `dsh-awiki` |
|
|
124
123
|
| `DSH_AWIKI_VAULT_DEVICE_ID` | Stable non-secret Vault device context | `local-device` |
|
|
125
124
|
| `DSH_AWIKI_POLL_INTERVAL_MS` | Open-dialog polling interval | `5000` |
|
|
126
125
|
| `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` |
|
|
127
129
|
| `DSH_AWIKI_IMAGE_CACHE_MAX_BYTES` | Private verified image-preview cache budget | `67108864` |
|
|
128
|
-
| `DSH_AWIKI_REALTIME_ENABLED` | Enable the identity-level Direct/Group/System Notification WSS | `true` |
|
|
129
130
|
| `DSH_AWIKI_LISTENER_ENABLED` | Enable the Direct-to-Agent listener | `false` |
|
|
130
131
|
| `DSH_AWIKI_LISTENER_ALLOWED_PEERS` | JSON array of exact Handles or DIDs; required when enabled | `[]` |
|
|
131
132
|
| `DSH_AWIKI_LISTENER_WORKSPACE_PATH` | Absolute shared Workspace for AWiki-originated Sessions | `$DSH_HOME/workspaces/awiki` or `~/.dsh/workspaces/awiki` |
|
|
132
133
|
| `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | UTF-8 cap after Host-side summary minimization | `32768` |
|
|
133
134
|
| `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | One-shot model deadline | `30000` |
|
|
134
135
|
| `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
|
+
|
|
135
144
|
## AWiki-hosted DeepSeek account
|
|
136
145
|
|
|
137
146
|
This capability now requires the separate `@awiki/dsh-model-proxy` package. It
|
|
@@ -185,11 +194,14 @@ closes the provider order, then restores the amount editor without creating a re
|
|
|
185
194
|
failure leaves the existing payment action available, while a payment that wins the race refreshes
|
|
186
195
|
the credited account instead of being reported as cancelled.
|
|
187
196
|
|
|
188
|
-
The default
|
|
197
|
+
The default AWiki tenant domain is `awiki.ai`. A local user can switch it
|
|
189
198
|
from Settings → AWiki; DSH persists that choice in its settings document and
|
|
190
|
-
applies it after the next Harness restart.
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
applies it after the next Harness restart. Unless an endpoint has an explicit
|
|
200
|
+
deployment override, the User, Message, Mail, attachment origin, and message-
|
|
201
|
+
service DID routes are derived from the selected domain. Each domain uses an
|
|
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
205
|
|
|
194
206
|
The settings page talks to a plugin-owned Connection channel that the Host
|
|
195
207
|
accepts only from loopback. This keeps an independently installed `@awiki/dsh-plugin`
|
|
@@ -218,17 +230,14 @@ underlying disk and backups.
|
|
|
218
230
|
The Node facade owns `stateRoot/vault/root-key.b64u`; the Host does not provide, copy, or log Vault
|
|
219
231
|
key material. Preserve the complete SDK state root across ordinary restarts and upgrades.
|
|
220
232
|
|
|
221
|
-
The
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
AWiki-originated Session is created in and attached to the registered shared AWiki Workspace.
|
|
230
|
-
Listener messages are untrusted user data and do not approve tools or bridge approval/user-question
|
|
231
|
-
prompts.
|
|
233
|
+
The listener is disabled unless both `DSH_AWIKI_LISTENER_ENABLED=true` and a non-empty exact
|
|
234
|
+
allowlist are configured. On startup and every Core realtime scheduling signal it runs canonical
|
|
235
|
+
reliable sync before reading committed history. Core owns WebSocket connection and reconnect;
|
|
236
|
+
stream closure is recovered as stop, reconnect sync, then replacement realtime session. One
|
|
237
|
+
persisted route and message watermark per Direct conversation preserve the current DSH Session
|
|
238
|
+
across restarts. Every AWiki-originated Session is created in and attached to the registered shared
|
|
239
|
+
AWiki Workspace. Listener messages are untrusted user data and do not approve tools or bridge
|
|
240
|
+
approval/user-question prompts.
|
|
232
241
|
|
|
233
242
|
For the default 10 MiB decoded attachment cap, configure a reverse-proxy request
|
|
234
243
|
limit of at least 14 MiB to account for base64 and JSON overhead.
|
|
@@ -285,7 +294,7 @@ pnpm run verify:workspace
|
|
|
285
294
|
pnpm pack --dry-run
|
|
286
295
|
```
|
|
287
296
|
|
|
288
|
-
The production Host loads the exact `@awiki/im-core-node@0.
|
|
297
|
+
The production Host loads the exact `@awiki/im-core-node@0.1.9` runtime package;
|
|
289
298
|
the platform-specific native addon is selected through its optional dependencies
|
|
290
299
|
and remains external to the JavaScript bundle. Consumers do not need Rust or an
|
|
291
300
|
`awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
|
package/README.zh.md
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
# @awiki/dsh-plugin
|
|
2
2
|
|
|
3
3
|
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供 AWiki
|
|
4
|
-
|
|
5
|
-
以及带可拖动 AWiki Me 悬浮入口的 Web
|
|
6
|
-
`@agent-network-protocol/dsh-anp-identity` 插件管理,并通过 Cordis 注入。
|
|
4
|
+
身份与消息能力。一个包同时包含 Host Service、Rust SDK Provider、Agent 工具,
|
|
5
|
+
以及带可拖动 AWiki Me 悬浮入口的 Web 客户端;入口默认位于 DSH 左下角侧栏区域。
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Rust SDK 独占管理配置的 `stateRoot` 下的身份、SecretVault、数据库、缓存和元数据。
|
|
8
|
+
本版本采用干净切换,不导入旧 TypeScript SDK 的 `identity.json`;升级后需创建新的
|
|
9
|
+
Rust 身份。
|
|
11
10
|
|
|
12
11
|
## 功能
|
|
13
12
|
|
|
14
|
-
- 在 Web UI 的统一入口输入 Handle
|
|
15
|
-
- DSH 可以作为独立 member 设备加入已有 Handle;当 DSH 创建或恢复 Handle、当前设备为 ready-admin 时,前台“设备”页可列出设备、通过 SAS 验证并批准 member、拒绝请求或撤销其他设备。管理动作不进入 Agent 工具,并要求显式输入 `APPROVE` / `REVOKE`。
|
|
13
|
+
- 在 Web UI 的统一入口输入 Handle 和手机号。Host 会在发送验证码前判断 Handle 状态:新 Handle 只发送注册验证码并创建部署级身份,已有 Handle 只发送 Recovery V4 恢复验证码并直接进入恢复流程;根 Agent 与子 Agent 共用最终身份。
|
|
16
14
|
- 点击 AWiki 面板左上角图标可打开账户菜单;普通退出只锁定本机会话,不删除加密身份或消息数据库,重新进入及重启 DSH 后仍恢复同一个 DID 和 Handle。退出页默认只提供重新进入本机身份和使用其他身份;只有本机重新进入失败后才显示手机号恢复入口。改用其他身份必须先确认永久清除本地 AWiki 数据。
|
|
17
15
|
- 身份入口失败时保留当前挂载表单中的手机号、Handle 和验证码,以便修正后重试;手机号和验证码不进入 Browser 持久化状态、controller snapshot 或公开 Remote 结果。仅恢复操作编号可用于崩溃续跑。注册未开放、验证码状态失效和提交冲突会给出对应的安全处理提示。
|
|
18
16
|
- 私聊和已有群聊列表、未读角标、最新消息预览、时间更新与昵称持久化。Core SQLite 是持久化真相源:Host 将持久化的对端资料合并进私聊列表,浏览器再按当前身份保留最后一次可信的私聊资料和群名,稀疏轮询中的 Handle、DID 或 Group DID 占位不会覆盖真实名称。恢复已有 Handle 后,Host 会先同步账号投影,再让 Core 自动恢复旧群聊成员身份;未完成或受阻的群聊会显示可重试状态,但不影响私聊和其他群聊。打开会话时先显示 Core 已提交的本地时间线,并从 Core 显示资料缓存补齐群消息发送者名称,再在后台补齐远端历史和私聊资料;刷新失败不会清空本地消息。后台会话轮询失败也不会用全局红条打断仍可用的本地页面,用户主动加载失败仍会正常提示。当前 local-first 只覆盖本地最新一页,“加载更早消息”仍需访问远端 history。向上阅读时显示下滑箭头,新消息到达后在同一控件中累计数量且不打断阅读位置。只有最新一条已渲染消息到达可视区域底部后,当前会话才会自动标记为已读。
|
|
@@ -20,15 +18,16 @@ Host-only Provider lease 不会进入 Browser、Remote、Agent tools 或模型 A
|
|
|
20
18
|
- 文本和单附件消息;Enter 发送、Shift+Enter 换行,发送中立即显示带 loading 动画的乐观气泡,并通过精确的客户端消息 ID 与已提交消息对账,避免同一条消息显示两个气泡;同时支持图片预览、附件说明与 SHA 校验。校验通过的图片字节使用三层有界缓存:浏览器运行期 LRU 让会话重新挂载时立即出图,按身份隔离的 IndexedDB 在整页刷新后无需访问 Host,Host 私有磁盘缓存则应对浏览器缓存丢失并跨 Harness 重启复用;“清除本地数据”会删除三层缓存。
|
|
21
19
|
- 圆形可拖动入口、自适应四角弹窗、深色模式和当前会话记忆。
|
|
22
20
|
- 用户点击后才生成的 AI 对话总结:最多处理 50 条最近或未读消息,按会话保留本次运行期缓存,并支持过期提示、重试、复制与跳转原消息。
|
|
23
|
-
- OTP
|
|
24
|
-
- Recovery V4 进入 `applied` 后,Host
|
|
21
|
+
- OTP 身份入口会保留验证码输入表单,并按服务端返回的冷却时间显示重发倒计时、禁用提前重发;Handle 分流发生在发送前,因此每次只会发送一个用途正确的注册或恢复验证码。
|
|
22
|
+
- Recovery V4 进入 `applied` 后,Host 会立即激活恢复后的身份。当前暂不自动恢复历史邮箱或原模型账本,两个可选账户投影不会再阻塞身份恢复。Browser 会清除阻塞流程标记,权威恢复 journal 仍由 Core 保留;当前不会申请恢复凭证,也不会发送模型账本对账请求。
|
|
25
23
|
- 安装独立的 `@awiki/dsh-model-proxy` 后,仅在 Harness 没有任何可用模型时,首次引导才会在官方 API Key 步骤前提供 AWiki 托管模型选项;用户可以明确启用,也可以跳过并继续原版 API Key 流程。已经配置官方或其他 Provider 时,新会话不会显示 AWiki 模型或支付提示。
|
|
26
24
|
- 可选 Model Proxy 包独占 Host 内部短期 Token 和全部模型托管界面:首次引导,以及“设置 → 快速充值”中的“账户与充值”“用量明细”。它提供 `deepseek-v4-flash` 和 `deepseek-v4-pro`,默认推荐 Flash;Token 不进入 Browser。
|
|
27
25
|
- AWiki 主包只保留身份、域名和本地数据设置。只安装主包时,不会注册模型启停、充值、用量或模型首次引导界面。
|
|
28
26
|
- 在设置页危险区域中,经输入确认词的二次确认后,永久清空本机 AWiki 身份、密钥、令牌、注册草稿和消息索引。
|
|
29
27
|
- 五个消息 Agent 工具:身份、会话、历史、需审批的文本发送和需审批的附件发送。
|
|
30
|
-
-
|
|
31
|
-
-
|
|
28
|
+
- 邮件 Web UI 支持选择、确认、移除和发送最多 10 个受限附件,并在显式下载时复核元数据、Base64、大小和 SHA-256。
|
|
29
|
+
- 五个按需邮件 Agent 工具:邮箱账户、收件箱、纯文本读取、需审批的标记已读和需审批的纯文本发送。读取工具返回附件元数据和“仅可在 Browser UI 下载”的说明;由于 DSH 当前没有该工具可授权使用的文件资源句柄,Agent 邮件发送仍不接受附件。
|
|
30
|
+
- 可选的实时监听模式:exact allowlist 中的私聊对方可续接一个 DSH Agent 会话,或使用 `/new`、`/status`、`/help`。
|
|
32
31
|
|
|
33
32
|
## 界面截图
|
|
34
33
|
|
|
@@ -43,21 +42,25 @@ Host-only Provider lease 不会进入 Browser、Remote、Agent tools 或模型 A
|
|
|
43
42
|
首版不包含端到端加密、多身份、建群后的成员或群设置管理和单消息多附件。Agent listener 只接受明文私聊文本;
|
|
44
43
|
群聊、附件、加密/payload 内容和未知斜杠命令都不会进入 Agent。
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
邮件仍按需调用,不会以新邮件唤醒 Agent;不渲染或发送 HTML,也不支持回复、转发和会话串联。
|
|
46
|
+
Browser 只读取用户明确选择的 `File` 对象,确认发送后冻结整份草稿,并在唯一一次发送前执行
|
|
47
|
+
Host 下发的数量、单文件和总量限制;只有 canonical Base64 会穿过 Remote。附件只能显式下载;
|
|
48
|
+
Browser 在创建临时 Blob URL 前复核返回元数据、canonical Base64、字节数和 SHA-256,随后立即
|
|
49
|
+
释放 URL,不会自动打开 HTML、SVG 或其他附件。本地发件历史只保存服务端消息 ID、文件元数据和
|
|
50
|
+
SHA-256,不保存附件字节。邮件主题、地址、预览、正文、
|
|
48
51
|
时间戳和附件元数据都是不可信外部数据,不能作为 Agent 指令。`awiki_mail_mark_read` 和
|
|
49
52
|
`awiki_mail_send` 每次执行都需要审批。邮件发送只尝试一次且不自动重试;超时或传输中断返回
|
|
50
|
-
`delivery-unknown`,再次审批发送前应先检查邮箱。
|
|
53
|
+
`delivery-unknown`,再次审批发送前应先检查邮箱。Agent 工具不接受附件 Base64 或本地路径;
|
|
54
|
+
在 Harness 提供正式、可授权的文件资源契约前,附件选择和下载都保留为 Browser UI 显式操作。
|
|
51
55
|
|
|
52
56
|
身份恢复不新增服务端私聊恢复。清空本地状态后不会重新构造历史私聊会话;只有 Rust SDK
|
|
53
57
|
已经保留的普通本地数据继续遵循 Core 既有迁移规则。邮箱和托管模型账本对账与私聊边界相互独立。
|
|
54
58
|
|
|
55
59
|
## 安装
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
安装公开发布的官方 npm 包:
|
|
58
62
|
|
|
59
63
|
```bash
|
|
60
|
-
dsh plugin --profile web add @agent-network-protocol/dsh-anp-identity@latest
|
|
61
64
|
dsh plugin --profile web add @awiki/dsh-plugin@latest
|
|
62
65
|
```
|
|
63
66
|
|
|
@@ -76,10 +79,9 @@ Profile 命令。本发布线面向 `0.1.1-rc.2` 包族,并精确锁定所有
|
|
|
76
79
|
从 `0.2.0-rc.4` 起,`@awiki/dsh-plugin` 是唯一规范包名。原
|
|
77
80
|
`@awiki/dsh` registry 条目已被 unpublish,不再作为本发布线的安装来源。
|
|
78
81
|
|
|
79
|
-
请在常规 DSH base 和 Web app bundle 之后应用本包。主包 `cordis.patch.yml`
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
再撤销身份 lease,最后关闭身份 Store Provider。主 patch 不再插入 Model Proxy。可选包使用自己的 patch,
|
|
82
|
+
请在常规 DSH base 和 Web app bundle 之后应用本包。主包 `cordis.patch.yml` 会加入
|
|
83
|
+
AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端由 DSH 根据
|
|
84
|
+
包元数据自动发现并注入。主 patch 不再插入 Model Proxy。可选包使用自己的 patch,
|
|
83
85
|
只插入一个 `awiki-model-proxy`,并显式依赖已经加载的 `awiki` 服务。
|
|
84
86
|
|
|
85
87
|
## 配置
|
|
@@ -88,30 +90,36 @@ Summary Provider;浏览器客户端由 DSH 根据包元数据自动发现并
|
|
|
88
90
|
|
|
89
91
|
| 环境变量 | 用途 | 默认值 |
|
|
90
92
|
| --- | --- | --- |
|
|
91
|
-
| `DSH_AWIKI_USER_SERVICE_URL` | AWiki user service 绝对 URL | `https
|
|
92
|
-
| `DSH_AWIKI_USER_SERVICE_DOMAIN` |
|
|
93
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Host 调用的 message service URL | `https
|
|
93
|
+
| `DSH_AWIKI_USER_SERVICE_URL` | AWiki user service 绝对 URL | `https://<所选域名>` |
|
|
94
|
+
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | 租户域名的部署默认值 | `awiki.ai` |
|
|
95
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Host 调用的 message service URL | `https://<所选域名>` |
|
|
94
96
|
| `DSH_AWIKI_MAIL_SERVICE_URL` | Host 调用的 mail service URL | 解析后的 user service URL |
|
|
95
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba
|
|
96
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https
|
|
97
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba:<所选域名>` |
|
|
98
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https://<所选域名>` |
|
|
97
99
|
| `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | 额外附件 HTTPS origin 的 JSON 数组 | `[]` |
|
|
98
|
-
| `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core
|
|
99
|
-
| `DSH_ANP_IDENTITY_STATE_ROOT` | 独立的 ANP Identity 多 DID Store | `$DSH_HOME/anp-identity` |
|
|
100
|
-
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER` | Store 根密钥提供方(`keyring`、`local-file`、`env` 或程序注入的 `injected`) | `keyring` |
|
|
101
|
-
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID` | Keyring account、环境变量名或 injected provider 标识 | `anp-identity/dsh` |
|
|
100
|
+
| `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core 状态目录;显式设置时覆盖 profile 隔离 | `$DSH_HOME/awiki/<profile>/im-core` 或 `~/.dsh/awiki/<profile>/im-core`;无法确认 profile 时兼容旧路径 `awiki/im-core` |
|
|
102
101
|
| `DSH_AWIKI_VAULT_ROOT_KEY_FILE` | 含 base64/base64url 32-byte Vault root key 的既有私有文件 | `$DSH_HOME/awiki/secret-vault/root-key.b64u` |
|
|
103
102
|
| `DSH_AWIKI_VAULT_WORKSPACE_ID` | 稳定、非秘密的 Vault workspace context | `dsh-awiki` |
|
|
104
103
|
| `DSH_AWIKI_VAULT_DEVICE_ID` | 稳定、非秘密的 Vault device context | `local-device` |
|
|
105
104
|
| `DSH_AWIKI_POLL_INTERVAL_MS` | 弹窗打开时的轮询间隔 | `5000` |
|
|
106
105
|
| `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` |
|
|
107
109
|
| `DSH_AWIKI_IMAGE_CACHE_MAX_BYTES` | 私有图片预览缓存的磁盘预算 | `67108864` |
|
|
108
|
-
| `DSH_AWIKI_REALTIME_ENABLED` | 开启身份级 Direct/Group/System Notification WSS | `true` |
|
|
109
110
|
| `DSH_AWIKI_LISTENER_ENABLED` | 开启私聊到 Agent 的 listener | `false` |
|
|
110
111
|
| `DSH_AWIKI_LISTENER_ALLOWED_PEERS` | exact Handle/DID JSON 数组;开启时必填 | `[]` |
|
|
111
112
|
| `DSH_AWIKI_LISTENER_WORKSPACE_PATH` | 所有 AWiki Session 共用的绝对 Workspace 路径 | `$DSH_HOME/workspaces/awiki` 或 `~/.dsh/workspaces/awiki` |
|
|
112
113
|
| `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | Host 最小化后的 UTF-8 输入上限 | `32768` |
|
|
113
114
|
| `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | 单次模型调用超时 | `30000` |
|
|
114
115
|
| `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
|
+
|
|
115
123
|
## AWiki 托管模型账户
|
|
116
124
|
|
|
117
125
|
该能力现在需要单独安装 `@awiki/dsh-model-proxy`。它通过
|
|
@@ -156,9 +164,11 @@ Summary Provider;浏览器客户端由 DSH 根据包元数据自动发现并
|
|
|
156
164
|
关闭支付平台订单,再恢复金额输入框,并且不会自动创建替代订单。关闭失败时原支付入口继续
|
|
157
165
|
有效;若支付在关闭竞态中先完成,界面会刷新已入账账户,而不会误报订单已取消。
|
|
158
166
|
|
|
159
|
-
|
|
160
|
-
DSH 会把选择写入自己的设置文件,并在下次重启 Harness
|
|
161
|
-
|
|
167
|
+
AWiki 的默认租户域名为 `awiki.ai`。本机用户可以在“设置 → AWiki”中切换租户;
|
|
168
|
+
DSH 会把选择写入自己的设置文件,并在下次重启 Harness 后生效。未显式配置独立服务
|
|
169
|
+
端点时,User、Message、Mail、附件公开来源和消息服务 DID 都由所选域名派生。
|
|
170
|
+
每个域名使用相互隔离的本地身份、消息、缓存目录和浏览器身份恢复任务;切回原域名会恢复
|
|
171
|
+
原有本地状态,不会把一个租户的 DID、私钥、邮箱账号或恢复进度带到另一个租户。
|
|
162
172
|
|
|
163
173
|
设置页通过插件自有的 Connection 通道访问 Host,Host 只接受 loopback 来源。
|
|
164
174
|
因此独立安装的 `@awiki/dsh-plugin` 无需修改 DSH 核心设置白名单;非本机浏览器来源不能
|
|
@@ -181,14 +191,12 @@ Provider 域名和消息服务 DID 都是协议标识,不能根据 API host
|
|
|
181
191
|
Node facade 独占 `stateRoot/vault/root-key.b64u`;Host 不提供、不复制也不记录 Vault key
|
|
182
192
|
material。普通重启与升级期间应完整保留 SDK state root。
|
|
183
193
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
创建并 attach 到已注册的共享 AWiki Workspace。Listener 消息始终是不可信用户数据,不会自动批准
|
|
191
|
-
工具,也不会桥接 approval 或 user-question prompt。
|
|
194
|
+
Listener 只有在 `DSH_AWIKI_LISTENER_ENABLED=true` 且 exact allowlist 非空时才启用。启动和每个
|
|
195
|
+
Core realtime 调度信号都会先执行 canonical reliable sync,再读取已提交 history。WebSocket
|
|
196
|
+
连接与重连由 Core 所有;stream 关闭固定按“停止旧 session、reconnect sync、启动 replacement”
|
|
197
|
+
恢复。每个私聊持久化一个当前 DSH Session route 和消息 watermark,重启后可续接;所有 AWiki
|
|
198
|
+
来源 Session 都创建并 attach 到已注册的共享 AWiki Workspace。Listener 消息始终是不可信用户
|
|
199
|
+
数据,不会自动批准工具,也不会桥接 approval 或 user-question prompt。
|
|
192
200
|
|
|
193
201
|
默认附件上限为解码后 10 MiB;反向代理请求体上限至少应为 14 MiB,以容纳
|
|
194
202
|
base64 与 JSON 封装开销。
|
|
@@ -239,7 +247,7 @@ pnpm run verify:workspace
|
|
|
239
247
|
pnpm pack --dry-run
|
|
240
248
|
```
|
|
241
249
|
|
|
242
|
-
生产 Host 加载固定版本 `@awiki/im-core-node@0.
|
|
250
|
+
生产 Host 加载固定版本 `@awiki/im-core-node@0.1.9`;平台原生 addon 由它的
|
|
243
251
|
optional dependencies 选择,并保持在 JavaScript bundle 外。使用者无需安装 Rust,
|
|
244
252
|
也无需检出 `awiki-cli-rs2`。来源与许可证见 `THIRD_PARTY_NOTICES.md`。
|
|
245
253
|
|
package/cordis.patch.yml
CHANGED
|
@@ -2,38 +2,24 @@
|
|
|
2
2
|
# @deepseek-ai/dsh-base and @deepseek-ai/dsh-web-app.
|
|
3
3
|
|
|
4
4
|
- insert:
|
|
5
|
-
- id: anp-identity
|
|
6
|
-
name: '@agent-network-protocol/dsh-anp-identity'
|
|
7
|
-
config:
|
|
8
|
-
stateRoot: !!js process.env.DSH_ANP_IDENTITY_STATE_ROOT
|
|
9
|
-
allowConsumers: ['@awiki/dsh-plugin']
|
|
10
|
-
allowProviderConsumers: ['@awiki/dsh-plugin']
|
|
11
|
-
recoveryOnOpen: true
|
|
12
|
-
|
|
13
|
-
- id: anp-identity-provider
|
|
14
|
-
name: '@agent-network-protocol/dsh-anp-identity/provider'
|
|
15
|
-
config:
|
|
16
|
-
stateRoot: !!js process.env.DSH_ANP_IDENTITY_STATE_ROOT
|
|
17
|
-
rootKeyProvider: !!js process.env.DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER ?? 'keyring'
|
|
18
|
-
rootKeyProviderId: !!js process.env.DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID ?? 'anp-identity/dsh'
|
|
19
|
-
keyringFallbackToLocalFile: false
|
|
20
|
-
|
|
21
5
|
- id: awiki
|
|
22
6
|
name: '@awiki/dsh-plugin'
|
|
23
7
|
config:
|
|
24
|
-
userServiceUrl: !!js process.env.DSH_AWIKI_USER_SERVICE_URL
|
|
8
|
+
userServiceUrl: !!js process.env.DSH_AWIKI_USER_SERVICE_URL
|
|
25
9
|
userServiceDomain: !!js process.env.DSH_AWIKI_USER_SERVICE_DOMAIN ?? 'awiki.ai'
|
|
26
|
-
messageServiceUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_URL
|
|
10
|
+
messageServiceUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_URL
|
|
27
11
|
mailServiceUrl: !!js process.env.DSH_AWIKI_MAIL_SERVICE_URL
|
|
28
|
-
messageServiceDid: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_DID
|
|
29
|
-
messageServicePublicUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL
|
|
12
|
+
messageServiceDid: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_DID
|
|
13
|
+
messageServicePublicUrl: !!js process.env.DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL
|
|
30
14
|
allowedAttachmentOrigins: !!js JSON.parse(process.env.DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS ?? '[]')
|
|
31
15
|
stateRoot: !!js process.env.DSH_AWIKI_STATE_ROOT
|
|
32
16
|
pollIntervalMs: !!js Number(process.env.DSH_AWIKI_POLL_INTERVAL_MS ?? '5000')
|
|
33
17
|
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')
|
|
34
21
|
imageAttachmentCacheMaxBytes: !!js Number(process.env.DSH_AWIKI_IMAGE_CACHE_MAX_BYTES ?? '67108864')
|
|
35
22
|
summaryMaxInputBytes: !!js Number(process.env.DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES ?? '32768')
|
|
36
|
-
realtimeEnabled: !!js JSON.parse(process.env.DSH_AWIKI_REALTIME_ENABLED || 'true')
|
|
37
23
|
listenerEnabled: !!js process.env.DSH_AWIKI_LISTENER_ENABLED === 'true'
|
|
38
24
|
listenerAllowedPeers: !!js JSON.parse(process.env.DSH_AWIKI_LISTENER_ALLOWED_PEERS ?? '[]')
|
|
39
25
|
listenerWorkspacePath: !!js process.env.DSH_AWIKI_LISTENER_WORKSPACE_PATH
|