@awiki/dsh-plugin 0.3.2 → 0.3.3

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 CHANGED
@@ -108,7 +108,7 @@ The plugin works against the public `awiki.ai` tenant without environment config
108
108
  | `DSH_AWIKI_MESSAGE_SERVICE_DID` | Authoritative message-service DID | `did:wba:awiki.ai` |
109
109
  | `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | Public endpoint written to protocol records | `https://awiki.ai` |
110
110
  | `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | JSON array of extra exact HTTPS origins | `[]` |
111
- | `DSH_AWIKI_STATE_ROOT` | Private Rust IM Core state directory | `$DSH_HOME/awiki/im-core` or `~/.dsh/awiki/im-core` |
111
+ | `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 |
112
112
  | `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` |
113
113
  | `DSH_AWIKI_VAULT_WORKSPACE_ID` | Stable non-secret Vault workspace context | `dsh-awiki` |
114
114
  | `DSH_AWIKI_VAULT_DEVICE_ID` | Stable non-secret Vault device context | `local-device` |
@@ -121,6 +121,14 @@ The plugin works against the public `awiki.ai` tenant without environment config
121
121
  | `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | UTF-8 cap after Host-side summary minimization | `32768` |
122
122
  | `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | One-shot model deadline | `30000` |
123
123
  | `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | Structured summary output cap | `768` |
124
+
125
+ The default state directory is isolated by DSH profile. Desktop uses the Host's
126
+ `desktopProfiles.current.name`; ordinary `dsh --profile` accepts the name only when the Loader
127
+ root exactly matches `$DSH_HOME/profiles/<name>`. The plugin does not guess from argv, ports, or
128
+ process type, and does not copy a legacy database automatically. The old shared `awiki/im-core`
129
+ directory remains untouched. When it is detected, the identity screen explains the isolation and
130
+ guides the user to recover with the original Handle and phone as a separate device.
131
+
124
132
  ## AWiki-hosted DeepSeek account
125
133
 
126
134
  This capability now requires the separate `@awiki/dsh-model-proxy` package. It
@@ -271,7 +279,7 @@ pnpm run verify:workspace
271
279
  pnpm pack --dry-run
272
280
  ```
273
281
 
274
- The production Host loads the exact `@awiki/im-core-node@0.1.7` runtime package;
282
+ The production Host loads the exact `@awiki/im-core-node@0.1.8` runtime package;
275
283
  the platform-specific native addon is selected through its optional dependencies
276
284
  and remains external to the JavaScript bundle. Consumers do not need Rust or an
277
285
  `awiki-cli-rs2` checkout. See `THIRD_PARTY_NOTICES.md` for provenance and
package/README.zh.md CHANGED
@@ -91,7 +91,7 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
91
91
  | `DSH_AWIKI_MESSAGE_SERVICE_DID` | 权威消息服务 DID | `did:wba:awiki.ai` |
92
92
  | `DSH_AWIKI_MESSAGE_SERVICE_PUBLIC_URL` | 写入协议记录的公开 endpoint | `https://awiki.ai` |
93
93
  | `DSH_AWIKI_ALLOWED_ATTACHMENT_ORIGINS` | 额外附件 HTTPS origin 的 JSON 数组 | `[]` |
94
- | `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core 状态目录 | `$DSH_HOME/awiki/im-core` 或 `~/.dsh/awiki/im-core` |
94
+ | `DSH_AWIKI_STATE_ROOT` | 私有 Rust IM Core 状态目录;显式设置时覆盖 profile 隔离 | `$DSH_HOME/awiki/<profile>/im-core` 或 `~/.dsh/awiki/<profile>/im-core`;无法确认 profile 时兼容旧路径 `awiki/im-core` |
95
95
  | `DSH_AWIKI_VAULT_ROOT_KEY_FILE` | 含 base64/base64url 32-byte Vault root key 的既有私有文件 | `$DSH_HOME/awiki/secret-vault/root-key.b64u` |
96
96
  | `DSH_AWIKI_VAULT_WORKSPACE_ID` | 稳定、非秘密的 Vault workspace context | `dsh-awiki` |
97
97
  | `DSH_AWIKI_VAULT_DEVICE_ID` | 稳定、非秘密的 Vault device context | `local-device` |
@@ -104,6 +104,13 @@ AWiki Host Service、Rust SDK Provider 和 Summary Provider;浏览器客户端
104
104
  | `DSH_AWIKI_SUMMARY_MAX_INPUT_BYTES` | Host 最小化后的 UTF-8 输入上限 | `32768` |
105
105
  | `DSH_AWIKI_SUMMARY_TIMEOUT_MS` | 单次模型调用超时 | `30000` |
106
106
  | `DSH_AWIKI_SUMMARY_MAX_OUTPUT_TOKENS` | 结构化摘要输出上限 | `768` |
107
+
108
+ 默认状态目录按 DSH profile 隔离:Desktop 以 Host 公开的 `desktopProfiles.current.name`
109
+ 为准,普通 `dsh --profile` 仅在 Loader 根目录严格匹配 `$DSH_HOME/profiles/<name>`
110
+ 时采用该名称。插件不会从 argv、端口或进程类型猜测 profile,也不会自动复制旧数据库;
111
+ 旧的共享 `awiki/im-core` 仍保留在原处。若检测到旧目录,身份入口会说明隔离原因并引导
112
+ 用户通过原 Handle 和手机号恢复,把目标 profile 作为独立设备接入。
113
+
107
114
  ## AWiki 托管模型账户
108
115
 
109
116
  该能力现在需要单独安装 `@awiki/dsh-model-proxy`。它通过
@@ -229,7 +236,7 @@ pnpm run verify:workspace
229
236
  pnpm pack --dry-run
230
237
  ```
231
238
 
232
- 生产 Host 加载固定版本 `@awiki/im-core-node@0.1.7`;平台原生 addon 由它的
239
+ 生产 Host 加载固定版本 `@awiki/im-core-node@0.1.8`;平台原生 addon 由它的
233
240
  optional dependencies 选择,并保持在 JavaScript bundle 外。使用者无需安装 Rust,
234
241
  也无需检出 `awiki-cli-rs2`。来源与许可证见 `THIRD_PARTY_NOTICES.md`。
235
242
 
package/lib/client.js CHANGED
@@ -4112,6 +4112,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4112
4112
  literal("forbidden"),
4113
4113
  literal("identity-recovery-required"),
4114
4114
  literal("conflict"),
4115
+ literal("state-in-use"),
4115
4116
  literal("rate-limited"),
4116
4117
  literal("group-membership-required"),
4117
4118
  literal("group-identity-stale"),
@@ -4171,6 +4172,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4171
4172
  literal("forbidden"),
4172
4173
  literal("identity-recovery-required"),
4173
4174
  literal("conflict"),
4175
+ literal("state-in-use"),
4174
4176
  literal("rate-limited"),
4175
4177
  literal("group-membership-required"),
4176
4178
  literal("group-identity-stale"),
@@ -4209,6 +4211,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4209
4211
  literal("forbidden"),
4210
4212
  literal("identity-recovery-required"),
4211
4213
  literal("conflict"),
4214
+ literal("state-in-use"),
4212
4215
  literal("rate-limited"),
4213
4216
  literal("group-membership-required"),
4214
4217
  literal("group-identity-stale"),
@@ -4247,6 +4250,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4247
4250
  literal("forbidden"),
4248
4251
  literal("identity-recovery-required"),
4249
4252
  literal("conflict"),
4253
+ literal("state-in-use"),
4250
4254
  literal("rate-limited"),
4251
4255
  literal("group-membership-required"),
4252
4256
  literal("group-identity-stale"),
@@ -4293,6 +4297,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4293
4297
  literal("forbidden"),
4294
4298
  literal("identity-recovery-required"),
4295
4299
  literal("conflict"),
4300
+ literal("state-in-use"),
4296
4301
  literal("rate-limited"),
4297
4302
  literal("group-membership-required"),
4298
4303
  literal("group-identity-stale"),
@@ -4327,6 +4332,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4327
4332
  literal("forbidden"),
4328
4333
  literal("identity-recovery-required"),
4329
4334
  literal("conflict"),
4335
+ literal("state-in-use"),
4330
4336
  literal("rate-limited"),
4331
4337
  literal("group-membership-required"),
4332
4338
  literal("group-identity-stale"),
@@ -4365,6 +4371,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4365
4371
  literal("forbidden"),
4366
4372
  literal("identity-recovery-required"),
4367
4373
  literal("conflict"),
4374
+ literal("state-in-use"),
4368
4375
  literal("rate-limited"),
4369
4376
  literal("group-membership-required"),
4370
4377
  literal("group-identity-stale"),
@@ -4408,6 +4415,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4408
4415
  literal("forbidden"),
4409
4416
  literal("identity-recovery-required"),
4410
4417
  literal("conflict"),
4418
+ literal("state-in-use"),
4411
4419
  literal("rate-limited"),
4412
4420
  literal("group-membership-required"),
4413
4421
  literal("group-identity-stale"),
@@ -4427,7 +4435,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4427
4435
  "ok": literal(true).readonly(),
4428
4436
  "value": object({
4429
4437
  "pollIntervalMs": number().readonly(),
4430
- "attachmentMaxBytes": number().readonly()
4438
+ "attachmentMaxBytes": number().readonly(),
4439
+ "profileName": string().readonly().optional(),
4440
+ "legacySharedStateDetected": boolean().readonly().optional()
4431
4441
  }).readonly()
4432
4442
  })]);
4433
4443
  const _awiki_dsh_plugin_awiki_getConversationPreferences_result$schema = union([object({
@@ -4445,6 +4455,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4445
4455
  literal("forbidden"),
4446
4456
  literal("identity-recovery-required"),
4447
4457
  literal("conflict"),
4458
+ literal("state-in-use"),
4448
4459
  literal("rate-limited"),
4449
4460
  literal("group-membership-required"),
4450
4461
  literal("group-identity-stale"),
@@ -4504,6 +4515,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4504
4515
  literal("forbidden"),
4505
4516
  literal("identity-recovery-required"),
4506
4517
  literal("conflict"),
4518
+ literal("state-in-use"),
4507
4519
  literal("rate-limited"),
4508
4520
  literal("group-membership-required"),
4509
4521
  literal("group-identity-stale"),
@@ -4551,6 +4563,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4551
4563
  literal("forbidden"),
4552
4564
  literal("identity-recovery-required"),
4553
4565
  literal("conflict"),
4566
+ literal("state-in-use"),
4554
4567
  literal("rate-limited"),
4555
4568
  literal("group-membership-required"),
4556
4569
  literal("group-identity-stale"),
@@ -4619,6 +4632,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4619
4632
  literal("forbidden"),
4620
4633
  literal("identity-recovery-required"),
4621
4634
  literal("conflict"),
4635
+ literal("state-in-use"),
4622
4636
  literal("rate-limited"),
4623
4637
  literal("group-membership-required"),
4624
4638
  literal("group-identity-stale"),
@@ -4663,6 +4677,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4663
4677
  literal("forbidden"),
4664
4678
  literal("identity-recovery-required"),
4665
4679
  literal("conflict"),
4680
+ literal("state-in-use"),
4666
4681
  literal("rate-limited"),
4667
4682
  literal("group-membership-required"),
4668
4683
  literal("group-identity-stale"),
@@ -4731,6 +4746,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4731
4746
  literal("forbidden"),
4732
4747
  literal("identity-recovery-required"),
4733
4748
  literal("conflict"),
4749
+ literal("state-in-use"),
4734
4750
  literal("rate-limited"),
4735
4751
  literal("group-membership-required"),
4736
4752
  literal("group-identity-stale"),
@@ -4769,6 +4785,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4769
4785
  literal("forbidden"),
4770
4786
  literal("identity-recovery-required"),
4771
4787
  literal("conflict"),
4788
+ literal("state-in-use"),
4772
4789
  literal("rate-limited"),
4773
4790
  literal("group-membership-required"),
4774
4791
  literal("group-identity-stale"),
@@ -4811,6 +4828,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4811
4828
  literal("forbidden"),
4812
4829
  literal("identity-recovery-required"),
4813
4830
  literal("conflict"),
4831
+ literal("state-in-use"),
4814
4832
  literal("rate-limited"),
4815
4833
  literal("group-membership-required"),
4816
4834
  literal("group-identity-stale"),
@@ -4865,6 +4883,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4865
4883
  literal("forbidden"),
4866
4884
  literal("identity-recovery-required"),
4867
4885
  literal("conflict"),
4886
+ literal("state-in-use"),
4868
4887
  literal("rate-limited"),
4869
4888
  literal("group-membership-required"),
4870
4889
  literal("group-identity-stale"),
@@ -4912,6 +4931,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4912
4931
  literal("forbidden"),
4913
4932
  literal("identity-recovery-required"),
4914
4933
  literal("conflict"),
4934
+ literal("state-in-use"),
4915
4935
  literal("rate-limited"),
4916
4936
  literal("group-membership-required"),
4917
4937
  literal("group-identity-stale"),
@@ -4950,6 +4970,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4950
4970
  literal("forbidden"),
4951
4971
  literal("identity-recovery-required"),
4952
4972
  literal("conflict"),
4973
+ literal("state-in-use"),
4953
4974
  literal("rate-limited"),
4954
4975
  literal("group-membership-required"),
4955
4976
  literal("group-identity-stale"),
@@ -4993,6 +5014,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4993
5014
  literal("forbidden"),
4994
5015
  literal("identity-recovery-required"),
4995
5016
  literal("conflict"),
5017
+ literal("state-in-use"),
4996
5018
  literal("rate-limited"),
4997
5019
  literal("group-membership-required"),
4998
5020
  literal("group-identity-stale"),
@@ -5031,6 +5053,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5031
5053
  literal("forbidden"),
5032
5054
  literal("identity-recovery-required"),
5033
5055
  literal("conflict"),
5056
+ literal("state-in-use"),
5034
5057
  literal("rate-limited"),
5035
5058
  literal("group-membership-required"),
5036
5059
  literal("group-identity-stale"),
@@ -5092,6 +5115,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5092
5115
  literal("forbidden"),
5093
5116
  literal("identity-recovery-required"),
5094
5117
  literal("conflict"),
5118
+ literal("state-in-use"),
5095
5119
  literal("rate-limited"),
5096
5120
  literal("group-membership-required"),
5097
5121
  literal("group-identity-stale"),
@@ -5151,6 +5175,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5151
5175
  literal("forbidden"),
5152
5176
  literal("identity-recovery-required"),
5153
5177
  literal("conflict"),
5178
+ literal("state-in-use"),
5154
5179
  literal("rate-limited"),
5155
5180
  literal("group-membership-required"),
5156
5181
  literal("group-identity-stale"),
@@ -5204,6 +5229,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5204
5229
  literal("forbidden"),
5205
5230
  literal("identity-recovery-required"),
5206
5231
  literal("conflict"),
5232
+ literal("state-in-use"),
5207
5233
  literal("rate-limited"),
5208
5234
  literal("group-membership-required"),
5209
5235
  literal("group-identity-stale"),
@@ -5251,6 +5277,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5251
5277
  literal("forbidden"),
5252
5278
  literal("identity-recovery-required"),
5253
5279
  literal("conflict"),
5280
+ literal("state-in-use"),
5254
5281
  literal("rate-limited"),
5255
5282
  literal("group-membership-required"),
5256
5283
  literal("group-identity-stale"),
@@ -5298,6 +5325,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5298
5325
  literal("forbidden"),
5299
5326
  literal("identity-recovery-required"),
5300
5327
  literal("conflict"),
5328
+ literal("state-in-use"),
5301
5329
  literal("rate-limited"),
5302
5330
  literal("group-membership-required"),
5303
5331
  literal("group-identity-stale"),
@@ -5333,6 +5361,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5333
5361
  literal("forbidden"),
5334
5362
  literal("identity-recovery-required"),
5335
5363
  literal("conflict"),
5364
+ literal("state-in-use"),
5336
5365
  literal("rate-limited"),
5337
5366
  literal("group-membership-required"),
5338
5367
  literal("group-identity-stale"),
@@ -5372,6 +5401,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5372
5401
  literal("forbidden"),
5373
5402
  literal("identity-recovery-required"),
5374
5403
  literal("conflict"),
5404
+ literal("state-in-use"),
5375
5405
  literal("rate-limited"),
5376
5406
  literal("group-membership-required"),
5377
5407
  literal("group-identity-stale"),
@@ -5427,6 +5457,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5427
5457
  literal("forbidden"),
5428
5458
  literal("identity-recovery-required"),
5429
5459
  literal("conflict"),
5460
+ literal("state-in-use"),
5430
5461
  literal("rate-limited"),
5431
5462
  literal("group-membership-required"),
5432
5463
  literal("group-identity-stale"),
@@ -5492,6 +5523,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5492
5523
  literal("forbidden"),
5493
5524
  literal("identity-recovery-required"),
5494
5525
  literal("conflict"),
5526
+ literal("state-in-use"),
5495
5527
  literal("rate-limited"),
5496
5528
  literal("group-membership-required"),
5497
5529
  literal("group-identity-stale"),
@@ -5535,6 +5567,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5535
5567
  literal("forbidden"),
5536
5568
  literal("identity-recovery-required"),
5537
5569
  literal("conflict"),
5570
+ literal("state-in-use"),
5538
5571
  literal("rate-limited"),
5539
5572
  literal("group-membership-required"),
5540
5573
  literal("group-identity-stale"),
@@ -5573,6 +5606,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5573
5606
  literal("forbidden"),
5574
5607
  literal("identity-recovery-required"),
5575
5608
  literal("conflict"),
5609
+ literal("state-in-use"),
5576
5610
  literal("rate-limited"),
5577
5611
  literal("group-membership-required"),
5578
5612
  literal("group-identity-stale"),
@@ -5612,6 +5646,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5612
5646
  literal("forbidden"),
5613
5647
  literal("identity-recovery-required"),
5614
5648
  literal("conflict"),
5649
+ literal("state-in-use"),
5615
5650
  literal("rate-limited"),
5616
5651
  literal("group-membership-required"),
5617
5652
  literal("group-identity-stale"),
@@ -5656,6 +5691,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5656
5691
  literal("forbidden"),
5657
5692
  literal("identity-recovery-required"),
5658
5693
  literal("conflict"),
5694
+ literal("state-in-use"),
5659
5695
  literal("rate-limited"),
5660
5696
  literal("group-membership-required"),
5661
5697
  literal("group-identity-stale"),
@@ -5724,6 +5760,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5724
5760
  literal("forbidden"),
5725
5761
  literal("identity-recovery-required"),
5726
5762
  literal("conflict"),
5763
+ literal("state-in-use"),
5727
5764
  literal("rate-limited"),
5728
5765
  literal("group-membership-required"),
5729
5766
  literal("group-identity-stale"),
@@ -5794,6 +5831,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5794
5831
  literal("forbidden"),
5795
5832
  literal("identity-recovery-required"),
5796
5833
  literal("conflict"),
5834
+ literal("state-in-use"),
5797
5835
  literal("rate-limited"),
5798
5836
  literal("group-membership-required"),
5799
5837
  literal("group-identity-stale"),
@@ -5836,6 +5874,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5836
5874
  literal("forbidden"),
5837
5875
  literal("identity-recovery-required"),
5838
5876
  literal("conflict"),
5877
+ literal("state-in-use"),
5839
5878
  literal("rate-limited"),
5840
5879
  literal("group-membership-required"),
5841
5880
  literal("group-identity-stale"),
@@ -5879,6 +5918,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5879
5918
  literal("forbidden"),
5880
5919
  literal("identity-recovery-required"),
5881
5920
  literal("conflict"),
5921
+ literal("state-in-use"),
5882
5922
  literal("rate-limited"),
5883
5923
  literal("group-membership-required"),
5884
5924
  literal("group-identity-stale"),
@@ -5934,6 +5974,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5934
5974
  literal("forbidden"),
5935
5975
  literal("identity-recovery-required"),
5936
5976
  literal("conflict"),
5977
+ literal("state-in-use"),
5937
5978
  literal("rate-limited"),
5938
5979
  literal("group-membership-required"),
5939
5980
  literal("group-identity-stale"),
@@ -6002,6 +6043,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6002
6043
  literal("forbidden"),
6003
6044
  literal("identity-recovery-required"),
6004
6045
  literal("conflict"),
6046
+ literal("state-in-use"),
6005
6047
  literal("rate-limited"),
6006
6048
  literal("group-membership-required"),
6007
6049
  literal("group-identity-stale"),
@@ -6084,6 +6126,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6084
6126
  literal("forbidden"),
6085
6127
  literal("identity-recovery-required"),
6086
6128
  literal("conflict"),
6129
+ literal("state-in-use"),
6087
6130
  literal("rate-limited"),
6088
6131
  literal("group-membership-required"),
6089
6132
  literal("group-identity-stale"),
@@ -6143,6 +6186,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6143
6186
  literal("forbidden"),
6144
6187
  literal("identity-recovery-required"),
6145
6188
  literal("conflict"),
6189
+ literal("state-in-use"),
6146
6190
  literal("rate-limited"),
6147
6191
  literal("group-membership-required"),
6148
6192
  literal("group-identity-stale"),
@@ -6187,6 +6231,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6187
6231
  literal("forbidden"),
6188
6232
  literal("identity-recovery-required"),
6189
6233
  literal("conflict"),
6234
+ literal("state-in-use"),
6190
6235
  literal("rate-limited"),
6191
6236
  literal("group-membership-required"),
6192
6237
  literal("group-identity-stale"),
@@ -8167,6 +8212,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8167
8212
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.headingGroup,
8168
8213
  children: [(0, react_jsx_runtime.jsx)("h3", { children: registrationOtpSent ? "创建新身份" : "进入 AWiki" }), (0, react_jsx_runtime.jsx)("p", { children: registrationOtpSent ? "这个 Handle 尚未注册。输入刚收到的验证码以创建身份。" : "输入 Handle 和手机号。已有 Handle 会恢复身份,新 Handle 会创建身份。" })]
8169
8214
  }),
8215
+ props.legacySharedStateDetected === true && props.profileName != null && (0, react_jsx_runtime.jsxs)("div", {
8216
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.existingNotice,
8217
+ role: "status",
8218
+ children: [(0, react_jsx_runtime.jsx)("strong", { children: "已为当前 Profile 隔离 AWiki 数据" }), (0, react_jsx_runtime.jsxs)("p", { children: [
8219
+ "检测到旧版共享数据。为避免多个 DSH Profile 同时占用数据库,当前 Profile「",
8220
+ props.profileName,
8221
+ "」使用独立数据目录;旧数据未删除或复制。请用原 Handle 和手机号恢复到此设备。"
8222
+ ] })]
8223
+ }),
8170
8224
  (0, react_jsx_runtime.jsxs)("label", {
8171
8225
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.field,
8172
8226
  children: ["Handle", (0, react_jsx_runtime.jsx)("input", {
@@ -8492,6 +8546,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8492
8546
  pending: null,
8493
8547
  error: null,
8494
8548
  attachmentMaxBytes: 0,
8549
+ profileName: null,
8550
+ legacySharedStateDetected: false,
8495
8551
  summaries: Object.freeze({}),
8496
8552
  recoveryOperationId: null,
8497
8553
  recoveryProgress: null
@@ -8911,6 +8967,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8911
8967
  identity: session.value.status === "active" ? session.value.identity : null,
8912
8968
  error: null,
8913
8969
  attachmentMaxBytes: config.value.attachmentMaxBytes,
8970
+ profileName: config.value.profileName ?? null,
8971
+ legacySharedStateDetected: config.value.legacySharedStateDetected ?? false,
8914
8972
  recoveryOperationId: storedRecoveryOperation()
8915
8973
  });
8916
8974
  const operationId = storedRecoveryOperation();
@@ -14513,7 +14571,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14513
14571
  identity: view.identity,
14514
14572
  recoveryOperationId: view.recoveryOperationId,
14515
14573
  recoveryProgress: view.recoveryProgress,
14516
- pending: view.pending !== null
14574
+ pending: view.pending !== null,
14575
+ profileName: view.profileName,
14576
+ legacySharedStateDetected: view.legacySharedStateDetected
14517
14577
  })
14518
14578
  }),
14519
14579
  view.status === "ready" && view.sessionStatus === "active" && view.identity !== null && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("div", {