@awiki/dsh-plugin 0.3.7 → 0.3.11-rc.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 +112 -73
- package/README.zh.md +91 -62
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/cordis.patch.yml +6 -5
- package/lib/builtin-tenants.json +22 -0
- package/lib/builtin-tenants.sha256 +1 -0
- package/lib/client.js +9281 -2379
- package/lib/client.js.map +1 -1
- package/lib/index.js +3553 -1138
- package/lib/model-proxy-contract.js +19 -11
- package/lib/provider.js +73 -17
- package/lib/{sdk-adapter--trNlr-T.mjs → sdk-adapter-CYcJH7sM.mjs} +374 -101
- package/lib/typert.host.js +1595 -168
- package/lib/typert.remote-client.d.ts +43 -7
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +1595 -168
- package/lib/types/builtin-tenant-config.d.ts +19 -0
- package/lib/types/builtin-tenant-config.d.ts.map +1 -0
- package/lib/types/builtin-tenant-config.js +57 -0
- package/lib/types/builtin-tenant-config.js.map +1 -0
- package/lib/types/client/AwikiDeviceJoinReminder.d.ts +15 -0
- package/lib/types/client/AwikiDeviceJoinReminder.d.ts.map +1 -0
- package/lib/types/client/AwikiDeviceJoinReminder.js +74 -0
- package/lib/types/client/AwikiDeviceJoinReminder.js.map +1 -0
- package/lib/types/client/AwikiDevices.d.ts +33 -0
- package/lib/types/client/AwikiDevices.d.ts.map +1 -0
- package/lib/types/client/AwikiDevices.js +141 -0
- package/lib/types/client/AwikiDevices.js.map +1 -0
- package/lib/types/client/AwikiGroupDetails.d.ts.map +1 -1
- package/lib/types/client/AwikiGroupDetails.js +16 -13
- package/lib/types/client/AwikiGroupDetails.js.map +1 -1
- package/lib/types/client/AwikiIdentityAccess.d.ts +17 -8
- package/lib/types/client/AwikiIdentityAccess.d.ts.map +1 -1
- package/lib/types/client/AwikiIdentityAccess.js +269 -37
- package/lib/types/client/AwikiIdentityAccess.js.map +1 -1
- package/lib/types/client/AwikiIntegrationSettings.d.ts +21 -0
- package/lib/types/client/AwikiIntegrationSettings.d.ts.map +1 -0
- package/lib/types/client/AwikiIntegrationSettings.js +105 -0
- package/lib/types/client/AwikiIntegrationSettings.js.map +1 -0
- 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 +17 -137
- package/lib/types/client/AwikiMail.js.map +1 -1
- package/lib/types/client/AwikiOverlay.d.ts +0 -1
- package/lib/types/client/AwikiOverlay.d.ts.map +1 -1
- package/lib/types/client/AwikiOverlay.js +26 -28
- package/lib/types/client/AwikiOverlay.js.map +1 -1
- package/lib/types/client/AwikiProfileCard.d.ts.map +1 -1
- package/lib/types/client/AwikiProfileCard.js +17 -18
- package/lib/types/client/AwikiProfileCard.js.map +1 -1
- package/lib/types/client/AwikiRecoveryForm.d.ts +6 -1
- package/lib/types/client/AwikiRecoveryForm.d.ts.map +1 -1
- package/lib/types/client/AwikiRecoveryForm.js +74 -30
- package/lib/types/client/AwikiRecoveryForm.js.map +1 -1
- package/lib/types/client/AwikiSettingsSection.d.ts +28 -13
- package/lib/types/client/AwikiSettingsSection.d.ts.map +1 -1
- package/lib/types/client/AwikiSettingsSection.js +93 -61
- package/lib/types/client/AwikiSettingsSection.js.map +1 -1
- package/lib/types/client/AwikiUpdates.d.ts +10 -0
- package/lib/types/client/AwikiUpdates.d.ts.map +1 -0
- package/lib/types/client/AwikiUpdates.js +57 -0
- package/lib/types/client/AwikiUpdates.js.map +1 -0
- package/lib/types/client/awiki-client-bridge.d.ts +2 -2
- package/lib/types/client/awiki-client-bridge.d.ts.map +1 -1
- package/lib/types/client/awiki-client-bridge.js +4 -1
- package/lib/types/client/awiki-client-bridge.js.map +1 -1
- package/lib/types/client/controller.d.ts +92 -44
- package/lib/types/client/controller.d.ts.map +1 -1
- package/lib/types/client/controller.js +761 -334
- package/lib/types/client/controller.js.map +1 -1
- package/lib/types/client/drafts.d.ts +31 -0
- package/lib/types/client/drafts.d.ts.map +1 -0
- package/lib/types/client/drafts.js +94 -0
- package/lib/types/client/drafts.js.map +1 -0
- package/lib/types/client/image-cache.d.ts +2 -2
- package/lib/types/client/image-cache.d.ts.map +1 -1
- package/lib/types/client/image-cache.js +15 -2
- package/lib/types/client/image-cache.js.map +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js +64 -19
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/integration-operation.d.ts +9 -0
- package/lib/types/client/integration-operation.d.ts.map +1 -0
- package/lib/types/client/integration-operation.js +54 -0
- package/lib/types/client/integration-operation.js.map +1 -0
- package/lib/types/client/mail-list-cache.d.ts +2 -0
- package/lib/types/client/mail-list-cache.d.ts.map +1 -1
- package/lib/types/client/mail-list-cache.js +18 -0
- package/lib/types/client/mail-list-cache.js.map +1 -1
- package/lib/types/client/otp-cooldown.d.ts +7 -0
- package/lib/types/client/otp-cooldown.d.ts.map +1 -0
- package/lib/types/client/otp-cooldown.js +29 -0
- package/lib/types/client/otp-cooldown.js.map +1 -0
- package/lib/types/client/settings-controller.d.ts +38 -2
- package/lib/types/client/settings-controller.d.ts.map +1 -1
- package/lib/types/client/settings-controller.js +206 -10
- package/lib/types/client/settings-controller.js.map +1 -1
- package/lib/types/client/settings-locales.d.ts +1 -1
- package/lib/types/client/settings-locales.d.ts.map +1 -1
- package/lib/types/client/settings-locales.js +192 -14
- package/lib/types/client/settings-locales.js.map +1 -1
- package/lib/types/client/slots.d.ts +21 -10
- package/lib/types/client/slots.d.ts.map +1 -1
- package/lib/types/client/slots.js +0 -1
- package/lib/types/client/slots.js.map +1 -1
- package/lib/types/client/store.d.ts +1 -1
- package/lib/types/client/store.d.ts.map +1 -1
- package/lib/types/client/store.js +1 -1
- package/lib/types/client/store.js.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/desktop-distribution.d.ts +25 -0
- package/lib/types/desktop-distribution.d.ts.map +1 -0
- package/lib/types/desktop-distribution.js +57 -0
- package/lib/types/desktop-distribution.js.map +1 -0
- package/lib/types/domain.d.ts +1 -1
- package/lib/types/domain.d.ts.map +1 -1
- package/lib/types/domain.js +2 -1
- package/lib/types/domain.js.map +1 -1
- package/lib/types/index.d.ts +165 -41
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +1594 -535
- package/lib/types/index.js.map +1 -1
- package/lib/types/integration-client.d.ts +17 -0
- package/lib/types/integration-client.d.ts.map +1 -0
- package/lib/types/integration-client.js +233 -0
- package/lib/types/integration-client.js.map +1 -0
- package/lib/types/legacy-sent-mail-cache.d.ts +4 -0
- package/lib/types/legacy-sent-mail-cache.d.ts.map +1 -0
- package/lib/types/legacy-sent-mail-cache.js +29 -0
- package/lib/types/legacy-sent-mail-cache.js.map +1 -0
- 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 +13 -128
- package/lib/types/listener.js.map +1 -1
- package/lib/types/mail-list-client.d.ts +12 -0
- package/lib/types/mail-list-client.d.ts.map +1 -0
- package/lib/types/mail-list-client.js +254 -0
- package/lib/types/mail-list-client.js.map +1 -0
- package/lib/types/mail-recovery-observability.d.ts +8 -0
- package/lib/types/mail-recovery-observability.d.ts.map +1 -0
- package/lib/types/mail-recovery-observability.js +119 -0
- package/lib/types/mail-recovery-observability.js.map +1 -0
- package/lib/types/mail.d.ts +2 -28
- package/lib/types/mail.d.ts.map +1 -1
- package/lib/types/mail.js +2 -79
- package/lib/types/mail.js.map +1 -1
- package/lib/types/model-proxy-contract.d.ts +8 -8
- package/lib/types/model-proxy-contract.d.ts.map +1 -1
- package/lib/types/model-proxy-contract.js +15 -8
- package/lib/types/model-proxy-contract.js.map +1 -1
- package/lib/types/package-version.generated.d.ts +4 -0
- package/lib/types/package-version.generated.d.ts.map +1 -0
- package/lib/types/package-version.generated.js +4 -0
- package/lib/types/package-version.generated.js.map +1 -0
- package/lib/types/profile-state.d.ts +2 -13
- package/lib/types/profile-state.d.ts.map +1 -1
- package/lib/types/profile-state.js +3 -20
- package/lib/types/profile-state.js.map +1 -1
- package/lib/types/provider-api.d.ts +134 -43
- package/lib/types/provider-api.d.ts.map +1 -1
- package/lib/types/provider.d.ts +8 -2
- package/lib/types/provider.d.ts.map +1 -1
- package/lib/types/provider.js +76 -16
- package/lib/types/provider.js.map +1 -1
- package/lib/types/realtime-supervisor.d.ts +60 -0
- package/lib/types/realtime-supervisor.d.ts.map +1 -0
- package/lib/types/realtime-supervisor.js +255 -0
- package/lib/types/realtime-supervisor.js.map +1 -0
- package/lib/types/registration-policy.d.ts +7 -0
- package/lib/types/registration-policy.d.ts.map +1 -0
- package/lib/types/registration-policy.js +21 -0
- package/lib/types/registration-policy.js.map +1 -0
- package/lib/types/sdk-adapter.d.ts +62 -11
- package/lib/types/sdk-adapter.d.ts.map +1 -1
- package/lib/types/sdk-adapter.js +285 -123
- package/lib/types/sdk-adapter.js.map +1 -1
- package/lib/types/settings-rpc-contract.d.ts +63 -5
- package/lib/types/settings-rpc-contract.d.ts.map +1 -1
- package/lib/types/settings-rpc-contract.js +108 -5
- package/lib/types/settings-rpc-contract.js.map +1 -1
- package/lib/types/settings-rpc.d.ts +14 -1
- package/lib/types/settings-rpc.d.ts.map +1 -1
- package/lib/types/settings-rpc.js +132 -3
- package/lib/types/settings-rpc.js.map +1 -1
- package/lib/types/settings-transport.d.ts +7 -0
- package/lib/types/settings-transport.d.ts.map +1 -0
- package/lib/types/settings-transport.js +52 -0
- package/lib/types/settings-transport.js.map +1 -0
- package/lib/types/tenant-registry.d.ts +74 -0
- package/lib/types/tenant-registry.d.ts.map +1 -0
- package/lib/types/tenant-registry.js +440 -0
- package/lib/types/tenant-registry.js.map +1 -0
- 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 +249 -66
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/lib/types/update-policy.d.ts +51 -0
- package/lib/types/update-policy.d.ts.map +1 -0
- package/lib/types/update-policy.js +379 -0
- package/lib/types/update-policy.js.map +1 -0
- package/lib/types/version.d.ts +4 -0
- package/lib/types/version.d.ts.map +1 -0
- package/lib/types/version.js +44 -0
- package/lib/types/version.js.map +1 -0
- package/package.json +88 -61
- package/lib/types/base64.d.ts +0 -4
- package/lib/types/base64.d.ts.map +0 -1
- package/lib/types/base64.js +0 -28
- package/lib/types/base64.js.map +0 -1
- 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 -187
- package/lib/types/client/mail-attachment.js.map +0 -1
- package/lib/types/sent-mail-store.d.ts +0 -27
- package/lib/types/sent-mail-store.d.ts.map +0 -1
- package/lib/types/sent-mail-store.js +0 -348
- package/lib/types/sent-mail-store.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,30 +13,35 @@ 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. Choosing Recovery V4 opens a separate destructive-impact page without cancelling Join or sending an OTP; only its second explicit “replace DID” action cancels the pending choice and requests a purpose-scoped recovery 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.
|
|
26
|
+
- A local Darwin x64 ready-admin can prepare Root Transfer for one exact active member and use native system authentication before sending management capability. Authorization handles and Root material remain Host/Core-only; unsupported or headless Hosts fail closed. A recovered old device uses the same native-authentication seam to re-Join only as a member.
|
|
21
27
|
- 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
28
|
- Reuse that identity across the root Agent and its subagents.
|
|
23
29
|
- 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.
|
|
24
30
|
- Create a private-discovery, open-join, transport-protected group from the Web UI with a name and 1–50 initial Handle or DID members. The group opens immediately; members that could not be added are reported without hiding the successfully created group.
|
|
25
|
-
- Text messages plus one attachment per message, with Enter-to-send, Shift+Enter line breaks, optimistic sending bubbles reconciled by an exact client message ID, image previews, and SHA verification. Verified image bytes use three bounded layers: a browser-runtime LRU makes conversation remounts immediate, identity-scoped IndexedDB survives full page reloads without a Host call, and the private Host disk cache survives browser-storage loss and Harness restarts. Clear Local Data removes all three layers.
|
|
31
|
+
- Text messages plus one attachment per message, with Enter-to-send, Shift+Enter line breaks, optimistic sending bubbles reconciled by an exact client message ID, image previews, and SHA verification. Verified image bytes use three bounded layers: a browser-runtime LRU makes conversation remounts immediate, identity-scoped IndexedDB survives full page reloads without a Host call, and the private Host disk cache survives browser-storage loss and Harness restarts. Clear Local Data removes all three layers and selectively removes every AWiki Mail list/folder localStorage projection while preserving unrelated origin storage.
|
|
26
32
|
- A draggable circular launcher that defaults to the lower-left sidebar area, adaptive popup placement, dark mode, and remembered active conversation.
|
|
27
33
|
- 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
|
-
-
|
|
29
|
-
-
|
|
34
|
+
- New one- through four-character Handles require an invitation code; self-service registration is currently unavailable. Existing short Handles retain the Join/recovery flow.
|
|
35
|
+
- OTP identity access keeps the verification form visible and disables resend with a visible server-directed cooldown countdown. A non-secret Recovery retry deadline is retained per tenant and operation so a late successful request cannot enable duplicate sending after a tenant round trip; phone, Handle, and OTP factors remain memory-only. Handle classification happens before OTP delivery, so each attempt sends exactly one purpose-correct registration or recovery code.
|
|
36
|
+
- When the user continues into the recovered identity after Recovery V4 reaches `applied`, the Host resolves the recovered Handle's original mailbox under the current DID. Inbox and sent views remount for that identity; sent history is read from the Mail Service with `mail.list(direction=outbound)`, never from the removed Host-local sent store. The optional Model Proxy package independently authenticates that current DID and sends only strict `{}` to the Model endpoint; it never requests or carries a User Service recovery credential, DID path, proof, assurance, or ledger owner. It consumes only the actual outcome-only Model response (`restored`, `already_current`, or `not_applicable`); transition assurance remains a Model server-side operation/audit/DB oracle and is not inferred by DSH.
|
|
37
|
+
- Recovery E2E receipt collection uses a run-ID-first `0600` file handshake with separately operated Model/Mail producers; DSH verifies producer, target, source candidate, measurement window, receipt path, and shared operation fingerprints but never launches those external producers. The current Mail send API is text-only, so outbound attachment-preservation evidence remains blocked until DSH/Core expose an independently reviewed attachment-send seam.
|
|
30
38
|
- 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
39
|
- 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
40
|
- 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
41
|
- A typed second confirmation in the Settings danger zone before permanently clearing local AWiki identity, key, token, registration-draft, and message-index state.
|
|
34
42
|
- 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`.
|
|
43
|
+
- Five on-demand mail Agent tools: mailbox account, inbox, plain-text read, approved mark-read, and approved plain-text send.
|
|
44
|
+
- 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
45
|
|
|
39
46
|
## Screenshots
|
|
40
47
|
|
|
@@ -51,31 +58,30 @@ post-creation group administration or multiple attachments in one message. The A
|
|
|
51
58
|
plain Direct text; Groups, attachments, encrypted/payload content, and unknown slash commands never
|
|
52
59
|
reach the Agent.
|
|
53
60
|
|
|
54
|
-
Mail
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
SHA-256, never attachment bytes. Mail subject, addresses,
|
|
62
|
-
preview, body, timestamps, and attachment metadata are
|
|
61
|
+
Mail v1 provides an on-demand browser mailbox/compose UI and five on-demand Agent tools. Inbox uses
|
|
62
|
+
the existing Core inbound query; sent uses a fixed Host-only, current-identity-authenticated
|
|
63
|
+
`mail.list(direction=outbound)` query. The identity-scoped browser cache may keep the last visible
|
|
64
|
+
page during an explicit refresh error, but it is never sent-history authority. A successful send is
|
|
65
|
+
attempted once and triggers one server-backed sent refresh in the browser. Mail does not wake an Agent
|
|
66
|
+
for new mail, render or send HTML, transfer mail attachments, or implement reply, forward, and
|
|
67
|
+
threading. Mail subject, addresses, preview, body, timestamps, and attachment metadata are
|
|
63
68
|
untrusted external data, never Agent instructions. `awiki_mail_mark_read` and `awiki_mail_send`
|
|
64
69
|
require execution approval. Mail send is attempted once without automatic retry; a timeout or
|
|
65
70
|
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
71
|
|
|
69
72
|
Identity recovery does not add server-side private-chat restoration. A fresh local state does not
|
|
70
73
|
reconstruct historical Direct conversations; only ordinary data already retained by the Rust SDK
|
|
71
74
|
continues to follow Core's existing local migration rules. Mailbox and hosted-model reconciliation
|
|
72
75
|
are independent of that private-chat boundary.
|
|
73
76
|
|
|
77
|
+
Version checks, manual upgrade commands, and tenant isolation are documented in [Updates](docs/updates.md).
|
|
78
|
+
|
|
74
79
|
## Install
|
|
75
80
|
|
|
76
|
-
Install the
|
|
81
|
+
Install the independent identity plugin first, then AWiki:
|
|
77
82
|
|
|
78
83
|
```bash
|
|
84
|
+
dsh plugin --profile web add @agent-network-protocol/dsh-anp-identity@latest
|
|
79
85
|
dsh plugin --profile web add @awiki/dsh-plugin@latest
|
|
80
86
|
```
|
|
81
87
|
|
|
@@ -89,7 +95,7 @@ dsh plugin --profile web add @awiki/dsh-model-proxy@latest
|
|
|
89
95
|
The profile installer both adds the package and activates its bundle layer. A
|
|
90
96
|
plain `npm i @awiki/dsh-plugin` in a DSH project only installs the package; it
|
|
91
97
|
does not activate the bundle, so the profile command remains the recommended
|
|
92
|
-
installation path. This release line targets the `0.1.
|
|
98
|
+
installation path. This release line targets the `0.1.5-rc.1` package family
|
|
93
99
|
and pins every direct Host peer exactly, preventing npm from mixing prerelease
|
|
94
100
|
families in a DSH root dependency tree.
|
|
95
101
|
|
|
@@ -97,50 +103,58 @@ families in a DSH root dependency tree.
|
|
|
97
103
|
`0.2.0-rc.4`. The former `@awiki/dsh` registry entry was unpublished and is
|
|
98
104
|
not an installation source for this release line.
|
|
99
105
|
|
|
100
|
-
Apply the
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
Apply the packages after the normal DSH base and Web app bundles. The standalone
|
|
107
|
+
ANP Identity package owns the Identity Service and native Provider layer. This
|
|
108
|
+
package's `cordis.patch.yml` adds only the AWiki Host Service, IM Core Provider,
|
|
109
|
+
and summary Provider; DSH discovers and injects the browser client through
|
|
110
|
+
package metadata. Teardown closes IM Core before revoking its identity lease,
|
|
111
|
+
and the identity Store Provider closes last. The patch does not insert Model Proxy. The optional package has its
|
|
104
112
|
own patch, inserts exactly one `awiki-model-proxy` row after AWiki, and declares
|
|
105
113
|
an explicit dependency on the loaded `awiki` service.
|
|
106
114
|
|
|
107
115
|
## Configuration
|
|
108
116
|
|
|
109
|
-
|
|
117
|
+
Full keys, sources, purposes, and defaults: [docs/configuration.md](docs/configuration.md).
|
|
118
|
+
|
|
119
|
+
Fresh installations contain exactly the package's two built-in tenant slots and start on its configured
|
|
120
|
+
default slot. The repository default is AWiki China followed by AWiki Global. Existing official state is
|
|
121
|
+
promoted in place when its endpoint still matches, without moving its identity, messages, attachments,
|
|
122
|
+
Vault, or state directory. A non-empty state root created before the tenant registry keeps the immutable
|
|
123
|
+
`awiki.info` endpoint snapshot shipped by that release line. Operators who have positive deployment
|
|
124
|
+
evidence that the old root belongs to a current official slot may classify it once with
|
|
125
|
+
`DSH_AWIKI_LEGACY_TENANT_SLOT`. Settings → AWiki → Tenant switches the Host-owned
|
|
126
|
+
runtime transactionally; the two official tenants are immutable, while custom tenants use independent
|
|
127
|
+
storage scopes. Build with `pnpm run build -- --tenant-config /absolute/path/tenants.json` to replace the
|
|
128
|
+
complete two-slot catalog; partial merging and hidden official fallbacks are not supported. Set deployment
|
|
129
|
+
variables only for legacy private/development migration inputs:
|
|
110
130
|
|
|
111
131
|
| Variable | Purpose | Default |
|
|
112
132
|
| --- | --- | --- |
|
|
113
|
-
| `DSH_AWIKI_USER_SERVICE_URL` |
|
|
114
|
-
| `DSH_AWIKI_USER_SERVICE_DOMAIN` |
|
|
115
|
-
| `
|
|
133
|
+
| `DSH_AWIKI_USER_SERVICE_URL` | Legacy absolute AWiki user-service URL | Package default tenant Origin |
|
|
134
|
+
| `DSH_AWIKI_USER_SERVICE_DOMAIN` | Legacy Handle provider domain | Package default tenant DID host |
|
|
135
|
+
| `DSH_AWIKI_LEGACY_TENANT_SLOT` | Evidence-based one-time official-slot override for pre-registry state | Unset; preserve the historical `awiki.info` snapshot |
|
|
136
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_URL` | Legacy Message-service URL | Package default tenant Origin |
|
|
116
137
|
| `DSH_AWIKI_MAIL_SERVICE_URL` | Mail-service URL called by the Host | Resolved user-service URL |
|
|
117
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_DID` |
|
|
118
|
-
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` |
|
|
138
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_DID` | Legacy authoritative message-service DID | Package default tenant DID |
|
|
139
|
+
| `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Legacy public protocol endpoint | Package default tenant Origin |
|
|
119
140
|
| `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | JSON array of extra exact HTTPS origins | `[]` |
|
|
120
|
-
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory
|
|
141
|
+
| `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory | `$DSH_HOME/awiki/im-core` or `~/.dsh/awiki/im-core` |
|
|
142
|
+
| `DSH_ANP_IDENTITY_STATE_ROOT` | Independent multi-DID ANP Identity Store | `$DSH_HOME/anp-identity` |
|
|
143
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER` | Store Root Key provider (`keyring`, `local-file`, `env`, or programmatic `injected`) | `keyring` |
|
|
144
|
+
| `DSH_ANP_IDENTITY_ROOT_KEY_PROVIDER_ID` | Keyring account, environment variable, or injected-provider identifier | `anp-identity/dsh` |
|
|
121
145
|
| `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
146
|
| `DSH_AWIKI_VAULT_WORKSPACE_ID` | Stable non-secret Vault workspace context | `dsh-awiki` |
|
|
123
147
|
| `DSH_AWIKI_VAULT_DEVICE_ID` | Stable non-secret Vault device context | `local-device` |
|
|
124
148
|
| `DSH_AWIKI_POLL_INTERVAL_MS` | Open-dialog polling interval | `5000` |
|
|
125
149
|
| `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
150
|
| `DSH_AWIKI_IMAGE_CACHE_MAX_BYTES` | Private verified image-preview cache budget | `67108864` |
|
|
151
|
+
| `DSH_AWIKI_REALTIME_ENABLED` | Enable the identity-level Direct/Group/System Notification WSS | `true` |
|
|
130
152
|
| `DSH_AWIKI_LISTENER_ENABLED` | Enable the Direct-to-Agent listener | `false` |
|
|
131
153
|
| `DSH_AWIKI_LISTENER_ALLOWED_PEERS` | JSON array of exact Handles or DIDs; required when enabled | `[]` |
|
|
132
154
|
| `DSH_AWIKI_LISTENER_WORKSPACE_PATH` | Absolute shared Workspace for AWiki-originated Sessions | `$DSH_HOME/workspaces/awiki` or `~/.dsh/workspaces/awiki` |
|
|
133
155
|
| `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | UTF-8 cap after Host-side summary minimization | `32768` |
|
|
134
156
|
| `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | One-shot model deadline | `30000` |
|
|
135
157
|
| `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
158
|
## AWiki-hosted DeepSeek account
|
|
145
159
|
|
|
146
160
|
This capability now requires the separate `@awiki/dsh-model-proxy` package. It
|
|
@@ -155,22 +169,22 @@ The former runtime import `@awiki/dsh-plugin/model-proxy` has been removed. Use
|
|
|
155
169
|
model onboarding, account/recharge, and usage entry points hidden while leaving
|
|
156
170
|
AWiki Advanced settings functional.
|
|
157
171
|
|
|
158
|
-
The
|
|
159
|
-
`@awiki/dsh-model-proxy@0.1.0
|
|
160
|
-
|
|
161
|
-
bridge
|
|
162
|
-
|
|
172
|
+
The split-package line was introduced by `@awiki/dsh-plugin@0.3.0` and
|
|
173
|
+
`@awiki/dsh-model-proxy@0.1.0`. The current candidate manifests are `0.3.9`
|
|
174
|
+
and `0.1.4`, and Model Proxy requires main `^0.3.9`. This keeps the shared
|
|
175
|
+
`awikiClient` Browser bridge and tenant-capability contract on the same
|
|
176
|
+
reviewed line.
|
|
163
177
|
|
|
164
178
|
The optional package owns these configuration variables:
|
|
165
179
|
|
|
166
180
|
| Variable | Purpose | Default |
|
|
167
181
|
| --- | --- | --- |
|
|
168
|
-
| `DSH_AWIKI_MODEL_PROXY_URL` | AWiki-hosted DeepSeek proxy root URL | `https://model.awiki.info` |
|
|
169
182
|
| `DSH_AWIKI_MODEL_CONTEXT_WINDOW` | AWiki-hosted DeepSeek context window | `1000000` |
|
|
170
183
|
| `DSH_AWIKI_MODEL_MAX_TOKENS` | Maximum AWiki-hosted DeepSeek output | `8192` |
|
|
171
184
|
| `DSH_AWIKI_MODEL_TOKEN_REFRESH_SKEW_SECONDS` | Early short-token refresh interval | `60` |
|
|
172
185
|
|
|
173
|
-
AWiki-hosted DeepSeek is disabled by default.
|
|
186
|
+
AWiki-hosted DeepSeek is disabled by default. Its opt-in and fallback selection are persisted per tenant.
|
|
187
|
+
Only an explicit choice in onboarding or Settings → Quick Recharge →
|
|
174
188
|
Account & Recharge registers the `awiki-deepseek` route and selects Flash. Disabling restores the
|
|
175
189
|
previous provider, model, and reasoning effort. A successful recharge refreshes the balance but
|
|
176
190
|
never enables AWiki or changes the selected model automatically.
|
|
@@ -194,14 +208,10 @@ closes the provider order, then restores the amount editor without creating a re
|
|
|
194
208
|
failure leaves the existing payment action available, while a payment that wins the race refreshes
|
|
195
209
|
the credited account instead of being reported as cancelled.
|
|
196
210
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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.
|
|
211
|
+
Settings → AWiki is split into Tenant, Devices, Local data, and Guest integration. Tenant changes are available
|
|
212
|
+
before registration, while recovering, while signed out, and while signed in. A successful switch opens
|
|
213
|
+
the target scope before committing the active tenant; a failure reconstructs the previous runtime. The
|
|
214
|
+
legacy `awiki.domain` setting is migration input only and continues to reference its existing state path.
|
|
205
215
|
|
|
206
216
|
The settings page talks to a plugin-owned Connection channel that the Host
|
|
207
217
|
accepts only from loopback. This keeps an independently installed `@awiki/dsh-plugin`
|
|
@@ -230,14 +240,23 @@ underlying disk and backups.
|
|
|
230
240
|
The Node facade owns `stateRoot/vault/root-key.b64u`; the Host does not provide, copy, or log Vault
|
|
231
241
|
key material. Preserve the complete SDK state root across ordinary restarts and upgrades.
|
|
232
242
|
|
|
233
|
-
The
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
243
|
+
The identity-level realtime supervisor is enabled by default and owns the deployment identity's
|
|
244
|
+
single Core WebSocket without depending on Workspace or Agent configuration. Direct, Group, and
|
|
245
|
+
System Notification events schedule canonical reliable sync; WSS never advances a checkpoint or
|
|
246
|
+
authorizes a device by itself. `DSH_AWIKI_REALTIME_ENABLED=false` explicitly falls back to HTTP
|
|
247
|
+
refresh. Diagnostics report the single-session lifecycle with start/stop balance, peak active
|
|
248
|
+
count, retry generation, only closed sync failure codes, and the last successful sync's page count,
|
|
249
|
+
hydrated-message count, and `olderHistoryExcluded` flag. They never expose a cursor, page ref, token,
|
|
250
|
+
manifest, or message body. A healthy reconnect may have multiple lifetime starts while still owning
|
|
251
|
+
exactly one active session. Exact-device Node builds without an
|
|
252
|
+
active P6 lane use the existing `awiki.sync.event.v3` WebSocket subprotocol, while P6
|
|
253
|
+
delivery-context is requested only after that lane was explicitly negotiated. The optional Direct-to-Agent consumer still requires both
|
|
254
|
+
`DSH_AWIKI_LISTENER_ENABLED=true` and a non-empty exact allowlist. It reads only committed Direct
|
|
255
|
+
text after eligible sync causes and cannot start or stop WSS. One identity-scoped route and message
|
|
256
|
+
watermark per Direct conversation preserve the current DSH Session across restarts. Every
|
|
257
|
+
AWiki-originated Session is created in and attached to the registered shared AWiki Workspace.
|
|
258
|
+
Listener messages are untrusted user data and do not approve tools or bridge approval/user-question
|
|
259
|
+
prompts.
|
|
241
260
|
|
|
242
261
|
For the default 10 MiB decoded attachment cap, configure a reverse-proxy request
|
|
243
262
|
limit of at least 14 MiB to account for base64 and JSON overhead.
|
|
@@ -291,17 +310,37 @@ Requirements: Node.js 22.19+ (or 24+) and pnpm 11.22.
|
|
|
291
310
|
```bash
|
|
292
311
|
pnpm install --frozen-lockfile
|
|
293
312
|
pnpm run verify:workspace
|
|
313
|
+
pnpm run e2e:smoke
|
|
314
|
+
DSH_AWIKI_E2E_CONFIG=/absolute/path/to/rwiki-cn-testing.json pnpm run e2e:live
|
|
315
|
+
DSH_AWIKI_E2E_CONFIG=/absolute/path/to/awiki-info-testing.json pnpm run e2e:live -- --headed --grep RECOVERY
|
|
294
316
|
pnpm pack --dry-run
|
|
295
317
|
```
|
|
296
318
|
|
|
297
|
-
|
|
319
|
+
`e2e:smoke` uses Playwright Chromium to install the current tarball into an
|
|
320
|
+
isolated real DSH Web profile, complete the stock Harness first-run dialogs,
|
|
321
|
+
and open the AWiki identity entry without sending an OTP. The optional
|
|
322
|
+
`e2e:smoke:webkit` command provides the same no-write compatibility check.
|
|
323
|
+
The protected general `e2e:live` lane provisions one DSH identity plus one real
|
|
324
|
+
CLI peer on `rwiki-cn-testing`, verifies bidirectional Direct and Group plus a
|
|
325
|
+
same-root Harness restart, scans artifacts for secrets, and requires exact
|
|
326
|
+
managed cleanup with zero residual. The separate Recovery command above is
|
|
327
|
+
restricted to headed macOS, exact `awiki-info-testing`, and Ali-local cleanup
|
|
328
|
+
profile `awiki-info-managed-local-v1`. See the
|
|
329
|
+
[Web E2E technical design](docs/e2e-automation-testing-cli-peer.md).
|
|
330
|
+
|
|
331
|
+
`pnpm run verify` validates the frozen sibling ANP Identity and IM Core source
|
|
332
|
+
refs, then rebuilds their native fixtures and the IM Core Node TypeScript dist
|
|
333
|
+
from source. Unit results therefore do not depend on stale ignored `.node` or
|
|
334
|
+
`dist/` files left by an earlier worktree.
|
|
335
|
+
|
|
336
|
+
The production Host loads the exact `@awiki/im-core-node@0.2.3` runtime package;
|
|
298
337
|
the platform-specific native addon is selected through its optional dependencies
|
|
299
338
|
and remains external to the JavaScript bundle. Consumers do not need Rust or an
|
|
300
339
|
`awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
|
|
301
340
|
licensing.
|
|
302
341
|
|
|
303
342
|
The checked-in Typert Host/Remote artifacts were generated from the same Host
|
|
304
|
-
contract. `pnpm check:generated` pins their complete
|
|
343
|
+
contract. `pnpm check:generated` pins their complete 58-method surface until
|
|
305
344
|
the standalone Typert generator supports root-level packages.
|
|
306
345
|
|
|
307
346
|
## Security
|