@awiki/dsh-plugin 0.3.12 → 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +24 -2
  2. package/README.zh.md +12 -2
  3. package/cordis.patch.yml +1 -0
  4. package/lib/client.js +997 -122
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +203 -46
  7. package/lib/provider.js +2 -1
  8. package/lib/{sdk-adapter-DFDY7Hih.mjs → sdk-adapter-DGcTiEZz.mjs} +91 -7
  9. package/lib/typert.host.js +349 -68
  10. package/lib/typert.remote-client.d.ts +9 -1
  11. package/lib/typert.remote-client.d.ts.map +1 -1
  12. package/lib/typert.remote-client.js +349 -68
  13. package/lib/types/client/AwikiDeviceJoinReminder.d.ts.map +1 -1
  14. package/lib/types/client/AwikiDeviceJoinReminder.js +1 -1
  15. package/lib/types/client/AwikiDeviceJoinReminder.js.map +1 -1
  16. package/lib/types/client/AwikiDevices.d.ts +5 -1
  17. package/lib/types/client/AwikiDevices.d.ts.map +1 -1
  18. package/lib/types/client/AwikiDevices.js +2 -1
  19. package/lib/types/client/AwikiDevices.js.map +1 -1
  20. package/lib/types/client/AwikiIdentityAccess.d.ts.map +1 -1
  21. package/lib/types/client/AwikiIdentityAccess.js +72 -24
  22. package/lib/types/client/AwikiIdentityAccess.js.map +1 -1
  23. package/lib/types/client/AwikiIdentityServices.d.ts +9 -0
  24. package/lib/types/client/AwikiIdentityServices.d.ts.map +1 -0
  25. package/lib/types/client/AwikiIdentityServices.js +66 -0
  26. package/lib/types/client/AwikiIdentityServices.js.map +1 -0
  27. package/lib/types/client/AwikiOverlay.js +1 -1
  28. package/lib/types/client/AwikiOverlay.js.map +1 -1
  29. package/lib/types/client/AwikiSettingsSection.js +1 -1
  30. package/lib/types/client/AwikiSettingsSection.js.map +1 -1
  31. package/lib/types/client/controller.d.ts +8 -0
  32. package/lib/types/client/controller.d.ts.map +1 -1
  33. package/lib/types/client/controller.js +20 -2
  34. package/lib/types/client/controller.js.map +1 -1
  35. package/lib/types/client/index.d.ts.map +1 -1
  36. package/lib/types/client/index.js +8 -0
  37. package/lib/types/client/index.js.map +1 -1
  38. package/lib/types/client/slots.d.ts +3 -1
  39. package/lib/types/client/slots.d.ts.map +1 -1
  40. package/lib/types/index.d.ts +7 -1
  41. package/lib/types/index.d.ts.map +1 -1
  42. package/lib/types/index.js +134 -34
  43. package/lib/types/index.js.map +1 -1
  44. package/lib/types/package-version.generated.d.ts +2 -2
  45. package/lib/types/package-version.generated.d.ts.map +1 -1
  46. package/lib/types/package-version.generated.js +2 -2
  47. package/lib/types/package-version.generated.js.map +1 -1
  48. package/lib/types/provider-api.d.ts +17 -1
  49. package/lib/types/provider-api.d.ts.map +1 -1
  50. package/lib/types/provider.d.ts.map +1 -1
  51. package/lib/types/provider.js +1 -0
  52. package/lib/types/provider.js.map +1 -1
  53. package/lib/types/registration-policy.d.ts +1 -1
  54. package/lib/types/registration-policy.d.ts.map +1 -1
  55. package/lib/types/registration-policy.js +1 -1
  56. package/lib/types/registration-policy.js.map +1 -1
  57. package/lib/types/sdk-adapter.d.ts +17 -1
  58. package/lib/types/sdk-adapter.d.ts.map +1 -1
  59. package/lib/types/sdk-adapter.js +83 -4
  60. package/lib/types/sdk-adapter.js.map +1 -1
  61. package/lib/types/types.d.ts +60 -1
  62. package/lib/types/types.d.ts.map +1 -1
  63. package/lib/types/types.js.map +1 -1
  64. package/lib/types/update-policy.d.ts +2 -2
  65. package/lib/types/update-policy.d.ts.map +1 -1
  66. package/package.json +35 -31
package/lib/client.js CHANGED
@@ -4165,10 +4165,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4165
4165
  "previousDid": intersection(string(), unknown()).readonly().optional(),
4166
4166
  "currentDid": intersection(string(), unknown()).readonly(),
4167
4167
  "phase": union([
4168
+ literal("remote_committed"),
4168
4169
  literal("awaiting_factor"),
4169
4170
  literal("ready_to_commit"),
4170
4171
  literal("remote_outcome_unknown"),
4171
- literal("remote_committed"),
4172
4172
  literal("identity_transition_pending"),
4173
4173
  literal("applied"),
4174
4174
  literal("quarantined_key_unavailable")
@@ -5213,10 +5213,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5213
5213
  "previousDid": intersection(string(), unknown()).readonly().optional(),
5214
5214
  "currentDid": intersection(string(), unknown()).readonly(),
5215
5215
  "phase": union([
5216
+ literal("remote_committed"),
5216
5217
  literal("awaiting_factor"),
5217
5218
  literal("ready_to_commit"),
5218
5219
  literal("remote_outcome_unknown"),
5219
- literal("remote_committed"),
5220
5220
  literal("identity_transition_pending"),
5221
5221
  literal("applied"),
5222
5222
  literal("quarantined_key_unavailable")
@@ -5892,11 +5892,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5892
5892
  }), object({
5893
5893
  "ok": literal(true).readonly(),
5894
5894
  "value": object({
5895
+ "creationMethods": array(union([literal("wba"), literal("web")])).readonly().optional(),
5896
+ "pendingRegistrations": array(object({
5897
+ "did": string().readonly(),
5898
+ "fullHandle": string().readonly(),
5899
+ "method": union([literal("wba"), literal("web")]).readonly(),
5900
+ "displayName": string().readonly(),
5901
+ "verificationKind": string().readonly(),
5902
+ "phase": union([
5903
+ literal("prepared"),
5904
+ literal("remote_committed"),
5905
+ literal("local_committed")
5906
+ ]).readonly()
5907
+ })).readonly().optional(),
5908
+ "methodCapabilities": object({
5909
+ "method": union([literal("wba"), literal("web")]).readonly(),
5910
+ "handleRecovery": boolean().readonly(),
5911
+ "rootImport": boolean().readonly(),
5912
+ "rootTransfer": boolean().readonly(),
5913
+ "servicesUpdate": boolean().readonly()
5914
+ }).readonly().optional(),
5895
5915
  "choice": union([literal(null), object({
5896
5916
  "status": literal("join-required").readonly(),
5897
5917
  "fullHandle": intersection(string(), unknown()).readonly(),
5898
5918
  "mode": union([literal("ordinary"), literal("handle-recovery-rebind")]).readonly(),
5899
- "requiresUserPresence": boolean().readonly()
5919
+ "requiresUserPresence": boolean().readonly(),
5920
+ "methodCapabilities": object({
5921
+ "method": union([literal("wba"), literal("web")]).readonly(),
5922
+ "handleRecovery": boolean().readonly(),
5923
+ "rootImport": boolean().readonly(),
5924
+ "rootTransfer": boolean().readonly(),
5925
+ "servicesUpdate": boolean().readonly()
5926
+ }).readonly().optional()
5900
5927
  })]).readonly(),
5901
5928
  "joining": boolean().readonly(),
5902
5929
  "recoveries": array(object({
@@ -5905,6 +5932,83 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5905
5932
  })).readonly()
5906
5933
  }).readonly()
5907
5934
  })]);
5935
+ const _awiki_dsh_plugin_awiki_getIdentityServices_result$schema = union([object({
5936
+ "ok": literal(false).readonly(),
5937
+ "error": object({
5938
+ "code": union([
5939
+ literal("client-version-unsupported"),
5940
+ literal("not-registered"),
5941
+ literal("signed-out"),
5942
+ literal("already-registered"),
5943
+ literal("invalid-request"),
5944
+ literal("invalid-otp"),
5945
+ literal("challenge-expired"),
5946
+ literal("handle-unavailable"),
5947
+ literal("short-handle-invite-required"),
5948
+ literal("not-found"),
5949
+ literal("forbidden"),
5950
+ literal("device-rejoin-required"),
5951
+ literal("identity-recovery-required"),
5952
+ literal("conflict"),
5953
+ literal("state-in-use"),
5954
+ literal("rate-limited"),
5955
+ literal("group-membership-required"),
5956
+ literal("group-identity-stale"),
5957
+ literal("attachment-too-large"),
5958
+ literal("summary-unavailable"),
5959
+ literal("summary-timeout"),
5960
+ literal("summary-cancelled"),
5961
+ literal("summary-invalid-output"),
5962
+ literal("summary-failed"),
5963
+ literal("delivery-unknown"),
5964
+ literal("network"),
5965
+ literal("remote")
5966
+ ]).readonly(),
5967
+ "message": string().readonly(),
5968
+ "mailRecoveryObservability": object({
5969
+ "current_principal_matches_recovery": boolean().readonly(),
5970
+ "request_generation_classification": union([literal("current"), literal("replaced")]).readonly(),
5971
+ "mail_ingress_classification": union([
5972
+ literal("reached"),
5973
+ literal("not_reached"),
5974
+ literal("unknown")
5975
+ ]).readonly(),
5976
+ "auth_status_class": union([
5977
+ literal("unknown"),
5978
+ literal("accepted"),
5979
+ literal("rejected"),
5980
+ literal("dependency_unavailable")
5981
+ ]).readonly(),
5982
+ "auth_stable_machine_code": string().readonly().optional(),
5983
+ "retryable": boolean().readonly(),
5984
+ "mail_closed_classification": union([
5985
+ literal("unknown"),
5986
+ literal("dependency_unavailable"),
5987
+ literal("success"),
5988
+ literal("authentication_rejected"),
5989
+ literal("no_active_handle"),
5990
+ literal("multiple_active_handles"),
5991
+ literal("no_mailbox"),
5992
+ literal("owner_conflict")
5993
+ ]).readonly()
5994
+ }).readonly().optional()
5995
+ }).readonly()
5996
+ }), object({
5997
+ "ok": literal(true).readonly(),
5998
+ "value": object({
5999
+ "did": string().readonly(),
6000
+ "canManage": boolean().readonly(),
6001
+ "pending": boolean().readonly(),
6002
+ "services": array(object({
6003
+ "id": string().readonly(),
6004
+ "type": string().readonly(),
6005
+ "serviceEndpoint": string().readonly(),
6006
+ "serviceDid": string().readonly().optional(),
6007
+ "profiles": array(string()).readonly().optional(),
6008
+ "securityProfiles": array(string()).readonly().optional()
6009
+ })).readonly()
6010
+ }).readonly()
6011
+ })]);
5908
6012
  const _awiki_dsh_plugin_awiki_getIntegration_result$schema = union([object({
5909
6013
  "ok": literal(false).readonly(),
5910
6014
  "error": object({
@@ -6275,10 +6379,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6275
6379
  "previousDid": intersection(string(), unknown()).readonly().optional(),
6276
6380
  "currentDid": intersection(string(), unknown()).readonly(),
6277
6381
  "phase": union([
6382
+ literal("remote_committed"),
6278
6383
  literal("awaiting_factor"),
6279
6384
  literal("ready_to_commit"),
6280
6385
  literal("remote_outcome_unknown"),
6281
- literal("remote_committed"),
6282
6386
  literal("identity_transition_pending"),
6283
6387
  literal("applied"),
6284
6388
  literal("quarantined_key_unavailable")
@@ -6403,7 +6507,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6403
6507
  })
6404
6508
  ]).readonly()
6405
6509
  })]);
6406
- const _awiki_dsh_plugin_awiki_inspectIdentityAccess_parameter_0$schema = object({ "handle": string().readonly() });
6510
+ const _awiki_dsh_plugin_awiki_inspectIdentityAccess_parameter_0$schema = object({
6511
+ "inviteCode": string().readonly().optional(),
6512
+ "phone": string().readonly().optional(),
6513
+ "handle": string().readonly()
6514
+ });
6407
6515
  const _awiki_dsh_plugin_awiki_inspectIdentityAccess_result$schema = union([object({
6408
6516
  "ok": literal(false).readonly(),
6409
6517
  "error": object({
@@ -6468,7 +6576,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6468
6576
  }), object({
6469
6577
  "ok": literal(true).readonly(),
6470
6578
  "value": object({
6471
- "status": union([literal("available"), literal("existing")]).readonly(),
6579
+ "status": union([
6580
+ literal("unavailable"),
6581
+ literal("available"),
6582
+ literal("existing")
6583
+ ]).readonly(),
6584
+ "inviteRequired": boolean().readonly().optional(),
6585
+ "inviteStatus": union([
6586
+ literal("not_required"),
6587
+ literal("required"),
6588
+ literal("valid"),
6589
+ literal("invalid")
6590
+ ]).readonly().optional(),
6472
6591
  "fullHandle": string().readonly()
6473
6592
  }).readonly()
6474
6593
  })]);
@@ -7243,10 +7362,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7243
7362
  "previousDid": intersection(string(), unknown()).readonly().optional(),
7244
7363
  "currentDid": intersection(string(), unknown()).readonly(),
7245
7364
  "phase": union([
7365
+ literal("remote_committed"),
7246
7366
  literal("awaiting_factor"),
7247
7367
  literal("ready_to_commit"),
7248
7368
  literal("remote_outcome_unknown"),
7249
- literal("remote_committed"),
7250
7369
  literal("identity_transition_pending"),
7251
7370
  literal("applied"),
7252
7371
  literal("quarantined_key_unavailable")
@@ -7520,6 +7639,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7520
7639
  }), object({
7521
7640
  "ok": literal(true).readonly(),
7522
7641
  "value": object({
7642
+ "methodCapabilities": object({
7643
+ "method": union([literal("wba"), literal("web")]).readonly(),
7644
+ "handleRecovery": boolean().readonly(),
7645
+ "rootImport": boolean().readonly(),
7646
+ "rootTransfer": boolean().readonly(),
7647
+ "servicesUpdate": boolean().readonly()
7648
+ }).readonly().optional(),
7523
7649
  "canManage": boolean().readonly(),
7524
7650
  "rootTransferSupported": boolean().readonly(),
7525
7651
  "role": union([literal("member"), literal("admin")]).readonly().optional(),
@@ -7537,6 +7663,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7537
7663
  "status": union([literal("active"), literal("revoked")]).readonly(),
7538
7664
  "role": union([literal("member"), literal("admin")]).readonly(),
7539
7665
  "managementReady": boolean().readonly(),
7666
+ "provisioning": object({
7667
+ "phase": union([
7668
+ literal("pending"),
7669
+ literal("waiting"),
7670
+ literal("failed"),
7671
+ literal("complete")
7672
+ ]).readonly(),
7673
+ "attempts": number().readonly(),
7674
+ "requiresRejoin": boolean().readonly().optional()
7675
+ }).readonly().optional(),
7540
7676
  "isCurrent": boolean().readonly()
7541
7677
  })).readonly(),
7542
7678
  "requests": array(object({
@@ -7559,6 +7695,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7559
7695
  }).readonly()
7560
7696
  })]);
7561
7697
  const _awiki_dsh_plugin_awiki_registerIdentity_parameter_0$schema = object({
7698
+ "inviteCode": string().readonly().optional(),
7699
+ "didMethod": union([literal("wba"), literal("web")]).readonly().optional(),
7562
7700
  "handle": string().readonly(),
7563
7701
  "phone": string().readonly(),
7564
7702
  "otp": string().readonly()
@@ -7638,7 +7776,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7638
7776
  "status": literal("join-required").readonly(),
7639
7777
  "fullHandle": intersection(string(), unknown()).readonly(),
7640
7778
  "mode": union([literal("ordinary"), literal("handle-recovery-rebind")]).readonly(),
7641
- "requiresUserPresence": boolean().readonly()
7779
+ "requiresUserPresence": boolean().readonly(),
7780
+ "methodCapabilities": object({
7781
+ "method": union([literal("wba"), literal("web")]).readonly(),
7782
+ "handleRecovery": boolean().readonly(),
7783
+ "rootImport": boolean().readonly(),
7784
+ "rootTransfer": boolean().readonly(),
7785
+ "servicesUpdate": boolean().readonly()
7786
+ }).readonly().optional()
7642
7787
  })]).readonly()
7643
7788
  })]);
7644
7789
  const _awiki_dsh_plugin_awiki_rejectDeviceJoin_parameter_0$schema = object({
@@ -7934,6 +8079,84 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7934
8079
  "conversationId": intersection(string(), unknown()).readonly()
7935
8080
  }).readonly()
7936
8081
  })]);
8082
+ const _awiki_dsh_plugin_awiki_resumeIdentityServicesUpdate_parameter_0$schema = object({ "did": string().readonly() });
8083
+ const _awiki_dsh_plugin_awiki_resumeIdentityServicesUpdate_result$schema = union([object({
8084
+ "ok": literal(false).readonly(),
8085
+ "error": object({
8086
+ "code": union([
8087
+ literal("client-version-unsupported"),
8088
+ literal("not-registered"),
8089
+ literal("signed-out"),
8090
+ literal("already-registered"),
8091
+ literal("invalid-request"),
8092
+ literal("invalid-otp"),
8093
+ literal("challenge-expired"),
8094
+ literal("handle-unavailable"),
8095
+ literal("short-handle-invite-required"),
8096
+ literal("not-found"),
8097
+ literal("forbidden"),
8098
+ literal("device-rejoin-required"),
8099
+ literal("identity-recovery-required"),
8100
+ literal("conflict"),
8101
+ literal("state-in-use"),
8102
+ literal("rate-limited"),
8103
+ literal("group-membership-required"),
8104
+ literal("group-identity-stale"),
8105
+ literal("attachment-too-large"),
8106
+ literal("summary-unavailable"),
8107
+ literal("summary-timeout"),
8108
+ literal("summary-cancelled"),
8109
+ literal("summary-invalid-output"),
8110
+ literal("summary-failed"),
8111
+ literal("delivery-unknown"),
8112
+ literal("network"),
8113
+ literal("remote")
8114
+ ]).readonly(),
8115
+ "message": string().readonly(),
8116
+ "mailRecoveryObservability": object({
8117
+ "current_principal_matches_recovery": boolean().readonly(),
8118
+ "request_generation_classification": union([literal("current"), literal("replaced")]).readonly(),
8119
+ "mail_ingress_classification": union([
8120
+ literal("reached"),
8121
+ literal("not_reached"),
8122
+ literal("unknown")
8123
+ ]).readonly(),
8124
+ "auth_status_class": union([
8125
+ literal("unknown"),
8126
+ literal("accepted"),
8127
+ literal("rejected"),
8128
+ literal("dependency_unavailable")
8129
+ ]).readonly(),
8130
+ "auth_stable_machine_code": string().readonly().optional(),
8131
+ "retryable": boolean().readonly(),
8132
+ "mail_closed_classification": union([
8133
+ literal("unknown"),
8134
+ literal("dependency_unavailable"),
8135
+ literal("success"),
8136
+ literal("authentication_rejected"),
8137
+ literal("no_active_handle"),
8138
+ literal("multiple_active_handles"),
8139
+ literal("no_mailbox"),
8140
+ literal("owner_conflict")
8141
+ ]).readonly()
8142
+ }).readonly().optional()
8143
+ }).readonly()
8144
+ }), object({
8145
+ "ok": literal(true).readonly(),
8146
+ "value": object({
8147
+ "did": string().readonly(),
8148
+ "canManage": boolean().readonly(),
8149
+ "pending": boolean().readonly(),
8150
+ "services": array(object({
8151
+ "id": string().readonly(),
8152
+ "type": string().readonly(),
8153
+ "serviceEndpoint": string().readonly(),
8154
+ "serviceDid": string().readonly().optional(),
8155
+ "profiles": array(string()).readonly().optional(),
8156
+ "securityProfiles": array(string()).readonly().optional()
8157
+ })).readonly()
8158
+ }).readonly()
8159
+ })]);
7937
8160
  const _awiki_dsh_plugin_awiki_resumeRecovery_parameter_0$schema = object({ "operationId": string().readonly() });
7938
8161
  const _awiki_dsh_plugin_awiki_resumeRecovery_result$schema = union([object({
7939
8162
  "ok": literal(false).readonly(),
@@ -8004,10 +8227,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8004
8227
  "previousDid": intersection(string(), unknown()).readonly().optional(),
8005
8228
  "currentDid": intersection(string(), unknown()).readonly(),
8006
8229
  "phase": union([
8230
+ literal("remote_committed"),
8007
8231
  literal("awaiting_factor"),
8008
8232
  literal("ready_to_commit"),
8009
8233
  literal("remote_outcome_unknown"),
8010
- literal("remote_committed"),
8011
8234
  literal("identity_transition_pending"),
8012
8235
  literal("applied"),
8013
8236
  literal("quarantined_key_unavailable")
@@ -8120,6 +8343,72 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8120
8343
  "ok": literal(true).readonly(),
8121
8344
  "value": object({ "completed": literal(true).readonly() }).readonly()
8122
8345
  })]);
8346
+ const _awiki_dsh_plugin_awiki_retryDeviceManagement_parameter_0$schema = object({ "deviceRef": string().readonly() });
8347
+ const _awiki_dsh_plugin_awiki_retryDeviceManagement_result$schema = union([object({
8348
+ "ok": literal(false).readonly(),
8349
+ "error": object({
8350
+ "code": union([
8351
+ literal("client-version-unsupported"),
8352
+ literal("not-registered"),
8353
+ literal("signed-out"),
8354
+ literal("already-registered"),
8355
+ literal("invalid-request"),
8356
+ literal("invalid-otp"),
8357
+ literal("challenge-expired"),
8358
+ literal("handle-unavailable"),
8359
+ literal("short-handle-invite-required"),
8360
+ literal("not-found"),
8361
+ literal("forbidden"),
8362
+ literal("device-rejoin-required"),
8363
+ literal("identity-recovery-required"),
8364
+ literal("conflict"),
8365
+ literal("state-in-use"),
8366
+ literal("rate-limited"),
8367
+ literal("group-membership-required"),
8368
+ literal("group-identity-stale"),
8369
+ literal("attachment-too-large"),
8370
+ literal("summary-unavailable"),
8371
+ literal("summary-timeout"),
8372
+ literal("summary-cancelled"),
8373
+ literal("summary-invalid-output"),
8374
+ literal("summary-failed"),
8375
+ literal("delivery-unknown"),
8376
+ literal("network"),
8377
+ literal("remote")
8378
+ ]).readonly(),
8379
+ "message": string().readonly(),
8380
+ "mailRecoveryObservability": object({
8381
+ "current_principal_matches_recovery": boolean().readonly(),
8382
+ "request_generation_classification": union([literal("current"), literal("replaced")]).readonly(),
8383
+ "mail_ingress_classification": union([
8384
+ literal("reached"),
8385
+ literal("not_reached"),
8386
+ literal("unknown")
8387
+ ]).readonly(),
8388
+ "auth_status_class": union([
8389
+ literal("unknown"),
8390
+ literal("accepted"),
8391
+ literal("rejected"),
8392
+ literal("dependency_unavailable")
8393
+ ]).readonly(),
8394
+ "auth_stable_machine_code": string().readonly().optional(),
8395
+ "retryable": boolean().readonly(),
8396
+ "mail_closed_classification": union([
8397
+ literal("unknown"),
8398
+ literal("dependency_unavailable"),
8399
+ literal("success"),
8400
+ literal("authentication_rejected"),
8401
+ literal("no_active_handle"),
8402
+ literal("multiple_active_handles"),
8403
+ literal("no_mailbox"),
8404
+ literal("owner_conflict")
8405
+ ]).readonly()
8406
+ }).readonly().optional()
8407
+ }).readonly()
8408
+ }), object({
8409
+ "ok": literal(true).readonly(),
8410
+ "value": literal(null).readonly()
8411
+ })]);
8123
8412
  const _awiki_dsh_plugin_awiki_revokeDevice_parameter_0$schema = object({
8124
8413
  "deviceRef": string().readonly(),
8125
8414
  "confirmation": string().readonly()
@@ -8188,6 +8477,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8188
8477
  }), object({
8189
8478
  "ok": literal(true).readonly(),
8190
8479
  "value": object({
8480
+ "methodCapabilities": object({
8481
+ "method": union([literal("wba"), literal("web")]).readonly(),
8482
+ "handleRecovery": boolean().readonly(),
8483
+ "rootImport": boolean().readonly(),
8484
+ "rootTransfer": boolean().readonly(),
8485
+ "servicesUpdate": boolean().readonly()
8486
+ }).readonly().optional(),
8191
8487
  "canManage": boolean().readonly(),
8192
8488
  "rootTransferSupported": boolean().readonly(),
8193
8489
  "role": union([literal("member"), literal("admin")]).readonly().optional(),
@@ -8205,6 +8501,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8205
8501
  "status": union([literal("active"), literal("revoked")]).readonly(),
8206
8502
  "role": union([literal("member"), literal("admin")]).readonly(),
8207
8503
  "managementReady": boolean().readonly(),
8504
+ "provisioning": object({
8505
+ "phase": union([
8506
+ literal("pending"),
8507
+ literal("waiting"),
8508
+ literal("failed"),
8509
+ literal("complete")
8510
+ ]).readonly(),
8511
+ "attempts": number().readonly(),
8512
+ "requiresRejoin": boolean().readonly().optional()
8513
+ }).readonly().optional(),
8208
8514
  "isCurrent": boolean().readonly()
8209
8515
  })).readonly(),
8210
8516
  "requests": array(object({
@@ -8559,6 +8865,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8559
8865
  }).readonly()
8560
8866
  })]);
8561
8867
  const _awiki_dsh_plugin_awiki_sendRegistrationOtp_parameter_0$schema = object({
8868
+ "inviteCode": string().readonly().optional(),
8869
+ "didMethod": union([literal("wba"), literal("web")]).readonly().optional(),
8562
8870
  "handle": string().readonly(),
8563
8871
  "phone": string().readonly()
8564
8872
  });
@@ -9098,6 +9406,94 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9098
9406
  "registeredAt": number().readonly()
9099
9407
  }).readonly()
9100
9408
  })]);
9409
+ const _awiki_dsh_plugin_awiki_updateIdentityServices_parameter_0$schema = object({
9410
+ "services": array(object({
9411
+ "id": string().readonly(),
9412
+ "type": string().readonly(),
9413
+ "serviceEndpoint": string().readonly(),
9414
+ "serviceDid": string().readonly().optional(),
9415
+ "profiles": array(string()).readonly().optional(),
9416
+ "securityProfiles": array(string()).readonly().optional()
9417
+ })).readonly(),
9418
+ "did": string().readonly()
9419
+ });
9420
+ const _awiki_dsh_plugin_awiki_updateIdentityServices_result$schema = union([object({
9421
+ "ok": literal(false).readonly(),
9422
+ "error": object({
9423
+ "code": union([
9424
+ literal("client-version-unsupported"),
9425
+ literal("not-registered"),
9426
+ literal("signed-out"),
9427
+ literal("already-registered"),
9428
+ literal("invalid-request"),
9429
+ literal("invalid-otp"),
9430
+ literal("challenge-expired"),
9431
+ literal("handle-unavailable"),
9432
+ literal("short-handle-invite-required"),
9433
+ literal("not-found"),
9434
+ literal("forbidden"),
9435
+ literal("device-rejoin-required"),
9436
+ literal("identity-recovery-required"),
9437
+ literal("conflict"),
9438
+ literal("state-in-use"),
9439
+ literal("rate-limited"),
9440
+ literal("group-membership-required"),
9441
+ literal("group-identity-stale"),
9442
+ literal("attachment-too-large"),
9443
+ literal("summary-unavailable"),
9444
+ literal("summary-timeout"),
9445
+ literal("summary-cancelled"),
9446
+ literal("summary-invalid-output"),
9447
+ literal("summary-failed"),
9448
+ literal("delivery-unknown"),
9449
+ literal("network"),
9450
+ literal("remote")
9451
+ ]).readonly(),
9452
+ "message": string().readonly(),
9453
+ "mailRecoveryObservability": object({
9454
+ "current_principal_matches_recovery": boolean().readonly(),
9455
+ "request_generation_classification": union([literal("current"), literal("replaced")]).readonly(),
9456
+ "mail_ingress_classification": union([
9457
+ literal("reached"),
9458
+ literal("not_reached"),
9459
+ literal("unknown")
9460
+ ]).readonly(),
9461
+ "auth_status_class": union([
9462
+ literal("unknown"),
9463
+ literal("accepted"),
9464
+ literal("rejected"),
9465
+ literal("dependency_unavailable")
9466
+ ]).readonly(),
9467
+ "auth_stable_machine_code": string().readonly().optional(),
9468
+ "retryable": boolean().readonly(),
9469
+ "mail_closed_classification": union([
9470
+ literal("unknown"),
9471
+ literal("dependency_unavailable"),
9472
+ literal("success"),
9473
+ literal("authentication_rejected"),
9474
+ literal("no_active_handle"),
9475
+ literal("multiple_active_handles"),
9476
+ literal("no_mailbox"),
9477
+ literal("owner_conflict")
9478
+ ]).readonly()
9479
+ }).readonly().optional()
9480
+ }).readonly()
9481
+ }), object({
9482
+ "ok": literal(true).readonly(),
9483
+ "value": object({
9484
+ "did": string().readonly(),
9485
+ "canManage": boolean().readonly(),
9486
+ "pending": boolean().readonly(),
9487
+ "services": array(object({
9488
+ "id": string().readonly(),
9489
+ "type": string().readonly(),
9490
+ "serviceEndpoint": string().readonly(),
9491
+ "serviceDid": string().readonly().optional(),
9492
+ "profiles": array(string()).readonly().optional(),
9493
+ "securityProfiles": array(string()).readonly().optional()
9494
+ })).readonly()
9495
+ }).readonly()
9496
+ })]);
9101
9497
  const _awiki_dsh_plugin_awiki_updateIntegration_parameter_0$schema = object({
9102
9498
  "expectedRevision": number().readonly(),
9103
9499
  "idempotencyKey": string().readonly(),
@@ -9269,7 +9665,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9269
9665
  },
9270
9666
  sourceLocation: {
9271
9667
  "file": "packages/dsh-awiki/src/index.ts",
9272
- "line": 206,
9668
+ "line": 222,
9273
9669
  "column": 9
9274
9670
  }
9275
9671
  },
@@ -9296,7 +9692,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9296
9692
  },
9297
9693
  sourceLocation: {
9298
9694
  "file": "packages/dsh-awiki/src/index.ts",
9299
- "line": 242,
9695
+ "line": 258,
9300
9696
  "column": 3
9301
9697
  }
9302
9698
  },
@@ -9323,7 +9719,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9323
9719
  },
9324
9720
  sourceLocation: {
9325
9721
  "file": "packages/dsh-awiki/src/index.ts",
9326
- "line": 166,
9722
+ "line": 179,
9327
9723
  "column": 9
9328
9724
  }
9329
9725
  },
@@ -9341,7 +9737,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9341
9737
  },
9342
9738
  sourceLocation: {
9343
9739
  "file": "packages/dsh-awiki/src/index.ts",
9344
- "line": 146,
9740
+ "line": 150,
9345
9741
  "column": 9
9346
9742
  }
9347
9743
  },
@@ -9359,7 +9755,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9359
9755
  },
9360
9756
  sourceLocation: {
9361
9757
  "file": "packages/dsh-awiki/src/index.ts",
9362
- "line": 155,
9758
+ "line": 159,
9363
9759
  "column": 9
9364
9760
  }
9365
9761
  },
@@ -9386,7 +9782,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9386
9782
  },
9387
9783
  sourceLocation: {
9388
9784
  "file": "packages/dsh-awiki/src/index.ts",
9389
- "line": 302,
9785
+ "line": 318,
9390
9786
  "column": 3
9391
9787
  }
9392
9788
  },
@@ -9413,7 +9809,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9413
9809
  },
9414
9810
  sourceLocation: {
9415
9811
  "file": "packages/dsh-awiki/src/index.ts",
9416
- "line": 114,
9812
+ "line": 118,
9417
9813
  "column": 3
9418
9814
  }
9419
9815
  },
@@ -9440,7 +9836,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9440
9836
  },
9441
9837
  sourceLocation: {
9442
9838
  "file": "packages/dsh-awiki/src/index.ts",
9443
- "line": 186,
9839
+ "line": 202,
9444
9840
  "column": 9
9445
9841
  }
9446
9842
  },
@@ -9467,7 +9863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9467
9863
  },
9468
9864
  sourceLocation: {
9469
9865
  "file": "packages/dsh-awiki/src/index.ts",
9470
- "line": 224,
9866
+ "line": 240,
9471
9867
  "column": 9
9472
9868
  }
9473
9869
  },
@@ -9494,7 +9890,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9494
9890
  },
9495
9891
  sourceLocation: {
9496
9892
  "file": "packages/dsh-awiki/src/index.ts",
9497
- "line": 105,
9893
+ "line": 109,
9498
9894
  "column": 3
9499
9895
  }
9500
9896
  },
@@ -9521,7 +9917,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9521
9917
  },
9522
9918
  sourceLocation: {
9523
9919
  "file": "packages/dsh-awiki/src/index.ts",
9524
- "line": 218,
9920
+ "line": 234,
9525
9921
  "column": 9
9526
9922
  }
9527
9923
  },
@@ -9548,7 +9944,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9548
9944
  },
9549
9945
  sourceLocation: {
9550
9946
  "file": "packages/dsh-awiki/src/index.ts",
9551
- "line": 279,
9947
+ "line": 295,
9552
9948
  "column": 9
9553
9949
  }
9554
9950
  },
@@ -9575,7 +9971,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9575
9971
  },
9576
9972
  sourceLocation: {
9577
9973
  "file": "packages/dsh-awiki/src/index.ts",
9578
- "line": 297,
9974
+ "line": 313,
9579
9975
  "column": 9
9580
9976
  }
9581
9977
  },
@@ -9602,7 +9998,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9602
9998
  },
9603
9999
  sourceLocation: {
9604
10000
  "file": "packages/dsh-awiki/src/index.ts",
9605
- "line": 215,
10001
+ "line": 231,
9606
10002
  "column": 9
9607
10003
  }
9608
10004
  },
@@ -9620,7 +10016,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9620
10016
  },
9621
10017
  sourceLocation: {
9622
10018
  "file": "packages/dsh-awiki/src/index.ts",
9623
- "line": 99,
10019
+ "line": 103,
9624
10020
  "column": 9
9625
10021
  }
9626
10022
  },
@@ -9638,7 +10034,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9638
10034
  },
9639
10035
  sourceLocation: {
9640
10036
  "file": "packages/dsh-awiki/src/index.ts",
9641
- "line": 248,
10037
+ "line": 264,
9642
10038
  "column": 3
9643
10039
  }
9644
10040
  },
@@ -9656,7 +10052,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9656
10052
  },
9657
10053
  sourceLocation: {
9658
10054
  "file": "packages/dsh-awiki/src/index.ts",
9659
- "line": 152,
10055
+ "line": 156,
9660
10056
  "column": 9
9661
10057
  }
9662
10058
  },
@@ -9683,7 +10079,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9683
10079
  },
9684
10080
  sourceLocation: {
9685
10081
  "file": "packages/dsh-awiki/src/index.ts",
9686
- "line": 236,
10082
+ "line": 252,
9687
10083
  "column": 3
9688
10084
  }
9689
10085
  },
@@ -9710,7 +10106,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9710
10106
  },
9711
10107
  sourceLocation: {
9712
10108
  "file": "packages/dsh-awiki/src/index.ts",
9713
- "line": 227,
10109
+ "line": 243,
9714
10110
  "column": 3
9715
10111
  }
9716
10112
  },
@@ -9737,7 +10133,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9737
10133
  },
9738
10134
  sourceLocation: {
9739
10135
  "file": "packages/dsh-awiki/src/index.ts",
9740
- "line": 259,
10136
+ "line": 275,
9741
10137
  "column": 3
9742
10138
  }
9743
10139
  },
@@ -9751,29 +10147,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9751
10147
  result: {
9752
10148
  mode: "strict",
9753
10149
  typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
9754
- schema: _awiki_dsh_plugin_awiki_getIdentity_result$schema
10150
+ schema: _awiki_dsh_plugin_awiki_getIdentity_result$schema
10151
+ },
10152
+ sourceLocation: {
10153
+ "file": "packages/dsh-awiki/src/index.ts",
10154
+ "line": 124,
10155
+ "column": 9
10156
+ }
10157
+ },
10158
+ {
10159
+ id: "@awiki/dsh-plugin#awiki/getIdentityAccessState",
10160
+ service: "awiki",
10161
+ namespace: "awiki",
10162
+ method: "getIdentityAccessState",
10163
+ invocation: { kind: "direct" },
10164
+ parameters: [],
10165
+ result: {
10166
+ mode: "strict",
10167
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
10168
+ schema: _awiki_dsh_plugin_awiki_getIdentityAccessState_result$schema
9755
10169
  },
9756
10170
  sourceLocation: {
9757
10171
  "file": "packages/dsh-awiki/src/index.ts",
9758
- "line": 120,
9759
- "column": 9
10172
+ "line": 153,
10173
+ "column": 3
9760
10174
  }
9761
10175
  },
9762
10176
  {
9763
- id: "@awiki/dsh-plugin#awiki/getIdentityAccessState",
10177
+ id: "@awiki/dsh-plugin#awiki/getIdentityServices",
9764
10178
  service: "awiki",
9765
10179
  namespace: "awiki",
9766
- method: "getIdentityAccessState",
10180
+ method: "getIdentityServices",
9767
10181
  invocation: { kind: "direct" },
9768
10182
  parameters: [],
9769
10183
  result: {
9770
10184
  mode: "strict",
9771
10185
  typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
9772
- schema: _awiki_dsh_plugin_awiki_getIdentityAccessState_result$schema
10186
+ schema: _awiki_dsh_plugin_awiki_getIdentityServices_result$schema
9773
10187
  },
9774
10188
  sourceLocation: {
9775
10189
  "file": "packages/dsh-awiki/src/index.ts",
9776
- "line": 149,
10190
+ "line": 165,
9777
10191
  "column": 3
9778
10192
  }
9779
10193
  },
@@ -9791,7 +10205,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9791
10205
  },
9792
10206
  sourceLocation: {
9793
10207
  "file": "packages/dsh-awiki/src/index.ts",
9794
- "line": 102,
10208
+ "line": 106,
9795
10209
  "column": 3
9796
10210
  }
9797
10211
  },
@@ -9818,7 +10232,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9818
10232
  },
9819
10233
  sourceLocation: {
9820
10234
  "file": "packages/dsh-awiki/src/index.ts",
9821
- "line": 262,
10235
+ "line": 278,
9822
10236
  "column": 3
9823
10237
  }
9824
10238
  },
@@ -9836,7 +10250,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9836
10250
  },
9837
10251
  sourceLocation: {
9838
10252
  "file": "packages/dsh-awiki/src/index.ts",
9839
- "line": 282,
10253
+ "line": 298,
9840
10254
  "column": 3
9841
10255
  }
9842
10256
  },
@@ -9854,7 +10268,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9854
10268
  },
9855
10269
  sourceLocation: {
9856
10270
  "file": "packages/dsh-awiki/src/index.ts",
9857
- "line": 194,
10271
+ "line": 210,
9858
10272
  "column": 3
9859
10273
  }
9860
10274
  },
@@ -9881,7 +10295,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9881
10295
  },
9882
10296
  sourceLocation: {
9883
10297
  "file": "packages/dsh-awiki/src/index.ts",
9884
- "line": 209,
10298
+ "line": 225,
9885
10299
  "column": 9
9886
10300
  }
9887
10301
  },
@@ -9899,7 +10313,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9899
10313
  },
9900
10314
  sourceLocation: {
9901
10315
  "file": "packages/dsh-awiki/src/index.ts",
9902
- "line": 123,
10316
+ "line": 127,
9903
10317
  "column": 9
9904
10318
  }
9905
10319
  },
@@ -9926,7 +10340,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9926
10340
  },
9927
10341
  sourceLocation: {
9928
10342
  "file": "packages/dsh-awiki/src/index.ts",
9929
- "line": 132,
10343
+ "line": 136,
9930
10344
  "column": 9
9931
10345
  }
9932
10346
  },
@@ -9953,7 +10367,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9953
10367
  },
9954
10368
  sourceLocation: {
9955
10369
  "file": "packages/dsh-awiki/src/index.ts",
9956
- "line": 230,
10370
+ "line": 246,
9957
10371
  "column": 3
9958
10372
  }
9959
10373
  },
@@ -9980,7 +10394,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9980
10394
  },
9981
10395
  sourceLocation: {
9982
10396
  "file": "packages/dsh-awiki/src/index.ts",
9983
- "line": 233,
10397
+ "line": 249,
9984
10398
  "column": 9
9985
10399
  }
9986
10400
  },
@@ -10008,7 +10422,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10008
10422
  },
10009
10423
  sourceLocation: {
10010
10424
  "file": "packages/dsh-awiki/src/index.ts",
10011
- "line": 256,
10425
+ "line": 272,
10012
10426
  "column": 3
10013
10427
  }
10014
10428
  },
@@ -10035,7 +10449,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10035
10449
  },
10036
10450
  sourceLocation: {
10037
10451
  "file": "packages/dsh-awiki/src/index.ts",
10038
- "line": 239,
10452
+ "line": 255,
10039
10453
  "column": 3
10040
10454
  }
10041
10455
  },
@@ -10063,7 +10477,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10063
10477
  },
10064
10478
  sourceLocation: {
10065
10479
  "file": "packages/dsh-awiki/src/index.ts",
10066
- "line": 285,
10480
+ "line": 301,
10067
10481
  "column": 9
10068
10482
  }
10069
10483
  },
@@ -10081,7 +10495,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10081
10495
  },
10082
10496
  sourceLocation: {
10083
10497
  "file": "packages/dsh-awiki/src/index.ts",
10084
- "line": 129,
10498
+ "line": 133,
10085
10499
  "column": 3
10086
10500
  }
10087
10501
  },
@@ -10108,7 +10522,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10108
10522
  },
10109
10523
  sourceLocation: {
10110
10524
  "file": "packages/dsh-awiki/src/index.ts",
10111
- "line": 126,
10525
+ "line": 130,
10112
10526
  "column": 3
10113
10527
  }
10114
10528
  },
@@ -10135,7 +10549,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10135
10549
  },
10136
10550
  sourceLocation: {
10137
10551
  "file": "packages/dsh-awiki/src/index.ts",
10138
- "line": 270,
10552
+ "line": 286,
10139
10553
  "column": 3
10140
10554
  }
10141
10555
  },
@@ -10162,7 +10576,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10162
10576
  },
10163
10577
  sourceLocation: {
10164
10578
  "file": "packages/dsh-awiki/src/index.ts",
10165
- "line": 291,
10579
+ "line": 307,
10166
10580
  "column": 3
10167
10581
  }
10168
10582
  },
@@ -10189,7 +10603,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10189
10603
  },
10190
10604
  sourceLocation: {
10191
10605
  "file": "packages/dsh-awiki/src/index.ts",
10192
- "line": 203,
10606
+ "line": 219,
10193
10607
  "column": 3
10194
10608
  }
10195
10609
  },
@@ -10216,7 +10630,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10216
10630
  },
10217
10631
  sourceLocation: {
10218
10632
  "file": "packages/dsh-awiki/src/index.ts",
10219
- "line": 181,
10633
+ "line": 197,
10220
10634
  "column": 9
10221
10635
  }
10222
10636
  },
@@ -10243,7 +10657,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10243
10657
  },
10244
10658
  sourceLocation: {
10245
10659
  "file": "packages/dsh-awiki/src/index.ts",
10246
- "line": 288,
10660
+ "line": 304,
10247
10661
  "column": 9
10248
10662
  }
10249
10663
  },
@@ -10261,7 +10675,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10261
10675
  },
10262
10676
  sourceLocation: {
10263
10677
  "file": "packages/dsh-awiki/src/index.ts",
10264
- "line": 158,
10678
+ "line": 162,
10265
10679
  "column": 3
10266
10680
  }
10267
10681
  },
@@ -10288,7 +10702,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10288
10702
  },
10289
10703
  sourceLocation: {
10290
10704
  "file": "packages/dsh-awiki/src/index.ts",
10291
- "line": 140,
10705
+ "line": 144,
10292
10706
  "column": 9
10293
10707
  }
10294
10708
  },
@@ -10315,7 +10729,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10315
10729
  },
10316
10730
  sourceLocation: {
10317
10731
  "file": "packages/dsh-awiki/src/index.ts",
10318
- "line": 171,
10732
+ "line": 187,
10319
10733
  "column": 9
10320
10734
  }
10321
10735
  },
@@ -10342,7 +10756,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10342
10756
  },
10343
10757
  sourceLocation: {
10344
10758
  "file": "packages/dsh-awiki/src/index.ts",
10345
- "line": 245,
10759
+ "line": 261,
10346
10760
  "column": 3
10347
10761
  }
10348
10762
  },
@@ -10369,7 +10783,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10369
10783
  },
10370
10784
  sourceLocation: {
10371
10785
  "file": "packages/dsh-awiki/src/index.ts",
10372
- "line": 117,
10786
+ "line": 121,
10373
10787
  "column": 3
10374
10788
  }
10375
10789
  },
@@ -10396,7 +10810,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10396
10810
  },
10397
10811
  sourceLocation: {
10398
10812
  "file": "packages/dsh-awiki/src/index.ts",
10399
- "line": 221,
10813
+ "line": 237,
10814
+ "column": 3
10815
+ }
10816
+ },
10817
+ {
10818
+ id: "@awiki/dsh-plugin#awiki/resumeIdentityServicesUpdate",
10819
+ service: "awiki",
10820
+ namespace: "awiki",
10821
+ method: "resumeIdentityServicesUpdate",
10822
+ invocation: { kind: "direct" },
10823
+ parameters: [{
10824
+ name: "request",
10825
+ wire: "request",
10826
+ source: "json",
10827
+ codec: {
10828
+ mode: "strict",
10829
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiIdentityServicesRequest",
10830
+ schema: _awiki_dsh_plugin_awiki_resumeIdentityServicesUpdate_parameter_0$schema
10831
+ }
10832
+ }],
10833
+ result: {
10834
+ mode: "strict",
10835
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
10836
+ schema: _awiki_dsh_plugin_awiki_resumeIdentityServicesUpdate_result$schema
10837
+ },
10838
+ sourceLocation: {
10839
+ "file": "packages/dsh-awiki/src/index.ts",
10840
+ "line": 171,
10400
10841
  "column": 3
10401
10842
  }
10402
10843
  },
@@ -10423,7 +10864,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10423
10864
  },
10424
10865
  sourceLocation: {
10425
10866
  "file": "packages/dsh-awiki/src/index.ts",
10426
- "line": 212,
10867
+ "line": 228,
10427
10868
  "column": 9
10428
10869
  }
10429
10870
  },
@@ -10441,10 +10882,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10441
10882
  },
10442
10883
  sourceLocation: {
10443
10884
  "file": "packages/dsh-awiki/src/index.ts",
10444
- "line": 143,
10885
+ "line": 147,
10445
10886
  "column": 3
10446
10887
  }
10447
10888
  },
10889
+ {
10890
+ id: "@awiki/dsh-plugin#awiki/retryDeviceManagement",
10891
+ service: "awiki",
10892
+ namespace: "awiki",
10893
+ method: "retryDeviceManagement",
10894
+ invocation: { kind: "direct" },
10895
+ parameters: [{
10896
+ name: "request",
10897
+ wire: "request",
10898
+ source: "json",
10899
+ codec: {
10900
+ mode: "strict",
10901
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiPrepareRootTransferRequest",
10902
+ schema: _awiki_dsh_plugin_awiki_retryDeviceManagement_parameter_0$schema
10903
+ }
10904
+ }],
10905
+ result: {
10906
+ mode: "strict",
10907
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
10908
+ schema: _awiki_dsh_plugin_awiki_retryDeviceManagement_result$schema
10909
+ },
10910
+ sourceLocation: {
10911
+ "file": "packages/dsh-awiki/src/index.ts",
10912
+ "line": 184,
10913
+ "column": 9
10914
+ }
10915
+ },
10448
10916
  {
10449
10917
  id: "@awiki/dsh-plugin#awiki/revokeDevice",
10450
10918
  service: "awiki",
@@ -10468,7 +10936,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10468
10936
  },
10469
10937
  sourceLocation: {
10470
10938
  "file": "packages/dsh-awiki/src/index.ts",
10471
- "line": 176,
10939
+ "line": 192,
10472
10940
  "column": 9
10473
10941
  }
10474
10942
  },
@@ -10495,7 +10963,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10495
10963
  },
10496
10964
  sourceLocation: {
10497
10965
  "file": "packages/dsh-awiki/src/index.ts",
10498
- "line": 111,
10966
+ "line": 115,
10499
10967
  "column": 3
10500
10968
  }
10501
10969
  },
@@ -10522,7 +10990,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10522
10990
  },
10523
10991
  sourceLocation: {
10524
10992
  "file": "packages/dsh-awiki/src/index.ts",
10525
- "line": 276,
10993
+ "line": 292,
10526
10994
  "column": 9
10527
10995
  }
10528
10996
  },
@@ -10549,7 +11017,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10549
11017
  },
10550
11018
  sourceLocation: {
10551
11019
  "file": "packages/dsh-awiki/src/index.ts",
10552
- "line": 294,
11020
+ "line": 310,
10553
11021
  "column": 9
10554
11022
  }
10555
11023
  },
@@ -10576,7 +11044,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10576
11044
  },
10577
11045
  sourceLocation: {
10578
11046
  "file": "packages/dsh-awiki/src/index.ts",
10579
- "line": 200,
11047
+ "line": 216,
10580
11048
  "column": 3
10581
11049
  }
10582
11050
  },
@@ -10603,7 +11071,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10603
11071
  },
10604
11072
  sourceLocation: {
10605
11073
  "file": "packages/dsh-awiki/src/index.ts",
10606
- "line": 137,
11074
+ "line": 141,
10607
11075
  "column": 9
10608
11076
  }
10609
11077
  },
@@ -10630,7 +11098,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10630
11098
  },
10631
11099
  sourceLocation: {
10632
11100
  "file": "packages/dsh-awiki/src/index.ts",
10633
- "line": 273,
11101
+ "line": 289,
10634
11102
  "column": 3
10635
11103
  }
10636
11104
  },
@@ -10657,7 +11125,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10657
11125
  },
10658
11126
  sourceLocation: {
10659
11127
  "file": "packages/dsh-awiki/src/index.ts",
10660
- "line": 161,
11128
+ "line": 174,
10661
11129
  "column": 9
10662
11130
  }
10663
11131
  },
@@ -10684,7 +11152,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10684
11152
  },
10685
11153
  sourceLocation: {
10686
11154
  "file": "packages/dsh-awiki/src/index.ts",
10687
- "line": 265,
11155
+ "line": 281,
10688
11156
  "column": 9
10689
11157
  }
10690
11158
  },
@@ -10711,7 +11179,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10711
11179
  },
10712
11180
  sourceLocation: {
10713
11181
  "file": "packages/dsh-awiki/src/index.ts",
10714
- "line": 251,
11182
+ "line": 267,
10715
11183
  "column": 3
10716
11184
  }
10717
11185
  },
@@ -10738,10 +11206,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10738
11206
  },
10739
11207
  sourceLocation: {
10740
11208
  "file": "packages/dsh-awiki/src/index.ts",
10741
- "line": 191,
11209
+ "line": 207,
10742
11210
  "column": 9
10743
11211
  }
10744
11212
  },
11213
+ {
11214
+ id: "@awiki/dsh-plugin#awiki/updateIdentityServices",
11215
+ service: "awiki",
11216
+ namespace: "awiki",
11217
+ method: "updateIdentityServices",
11218
+ invocation: { kind: "direct" },
11219
+ parameters: [{
11220
+ name: "request",
11221
+ wire: "request",
11222
+ source: "json",
11223
+ codec: {
11224
+ mode: "strict",
11225
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiUpdateIdentityServicesRequest",
11226
+ schema: _awiki_dsh_plugin_awiki_updateIdentityServices_parameter_0$schema
11227
+ }
11228
+ }],
11229
+ result: {
11230
+ mode: "strict",
11231
+ typeSymbol: "@awiki/dsh-plugin/types#AwikiResult",
11232
+ schema: _awiki_dsh_plugin_awiki_updateIdentityServices_result$schema
11233
+ },
11234
+ sourceLocation: {
11235
+ "file": "packages/dsh-awiki/src/index.ts",
11236
+ "line": 168,
11237
+ "column": 3
11238
+ }
11239
+ },
10745
11240
  {
10746
11241
  id: "@awiki/dsh-plugin#awiki/updateIntegration",
10747
11242
  service: "awiki",
@@ -10765,7 +11260,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10765
11260
  },
10766
11261
  sourceLocation: {
10767
11262
  "file": "packages/dsh-awiki/src/index.ts",
10768
- "line": 108,
11263
+ "line": 112,
10769
11264
  "column": 3
10770
11265
  }
10771
11266
  },
@@ -10792,7 +11287,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10792
11287
  },
10793
11288
  sourceLocation: {
10794
11289
  "file": "packages/dsh-awiki/src/index.ts",
10795
- "line": 197,
11290
+ "line": 213,
10796
11291
  "column": 3
10797
11292
  }
10798
11293
  }
@@ -10982,7 +11477,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10982
11477
  //#endregion
10983
11478
  //#region lib/types/registration-policy.js
10984
11479
  /** Registration presentation and Handle normalization; admission is owned by the server. */
10985
- const SHORT_HANDLE_INVITE_MESSAGE = "注册少于5位的handle需要使用邀请码,目前暂不支持自主注册。";
11480
+ const SHORT_HANDLE_INVITE_MESSAGE = "此 Handle 注册需要邀请码,请输入后继续。";
10986
11481
  //#endregion
10987
11482
  //#region lib/types/client/otp-cooldown.js
10988
11483
  /** Retain the server cooldown across panel remounts, without persisting OTPs. */
@@ -11696,8 +12191,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11696
12191
  const recoveryCooldown = useRecoveryOtpCooldown();
11697
12192
  const [phone, setPhone] = useDraftState("identity:phone", "");
11698
12193
  const [handle, setHandle] = useDraftState("identity:handle", "");
12194
+ const [inviteCode, setInviteCode] = useDraftState("identity:inviteCode", "");
12195
+ const entryInFlight = (0, react.useRef)(false);
12196
+ const [entryPending, setEntryPending] = (0, react.useState)(false);
11699
12197
  const [otp, setOtp] = useDraftState("identity:otp", "");
11700
12198
  const [registrationOtpSent, setRegistrationOtpSent] = useDraftState("identity:registrationOtpSent", false, false);
12199
+ const [didMethod, setDidMethod] = useDraftState("identity:didMethod", "wba", false);
12200
+ const [pendingRegistration, setPendingRegistration] = useDraftState("identity:pendingRegistration", null, false);
12201
+ const creationMethods = props.access?.creationMethods ?? ["wba"];
12202
+ const canRegister = creationMethods.includes(didMethod) || pendingRegistration?.method === didMethod && pendingRegistration.fullHandle === handle.trim();
11701
12203
  const [recoveryFactorContext, setRecoveryFactorContext] = useDraftState("identity:recoveryFactorContext", null, false);
11702
12204
  const [notice, setNotice] = useDraftState("identity:notice", null, false);
11703
12205
  const [error, setError] = useDraftState("identity:error", null, false);
@@ -11710,12 +12212,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11710
12212
  const [recoveryChoice, setRecoveryChoice] = useDraftState("identity:recoveryChoice", null, false);
11711
12213
  const [recoveryRiskConfirmed, setRecoveryRiskConfirmed] = useDraftState("identity:recoveryRiskConfirmed", false, false);
11712
12214
  const [recoveryEntryOpen, setRecoveryEntryOpen] = useDraftState("identity:recoveryEntryOpen", false, false);
11713
- const validRecoveryEntryOpen = recoveryEntryOpen && props.sessionStatus === "recovery-required";
12215
+ const validRecoveryEntryOpen = recoveryEntryOpen && props.sessionStatus === "recovery-required" && props.access?.methodCapabilities?.handleRecovery !== false;
11714
12216
  const recoveryConfirmationInFlight = (0, react.useRef)(false);
11715
12217
  const [recoveryConfirming, setRecoveryConfirming] = (0, react.useState)(false);
11716
12218
  const [joinCheck, setJoinCheck] = (0, react.useState)("loading");
11717
12219
  const [joinProgress, setJoinProgress] = (0, react.useState)(null);
11718
12220
  const [deviceRejoinHandle, setDeviceRejoinHandle] = useDraftState("identity:deviceRejoinHandle", null, false);
12221
+ (0, react.useEffect)(() => {
12222
+ if (!registrationOtpSent && pendingRegistration === null && creationMethods.length > 0 && !creationMethods.includes(didMethod)) setDidMethod(creationMethods.includes("wba") ? "wba" : creationMethods[0]);
12223
+ }, [
12224
+ props.access?.creationMethods,
12225
+ registrationOtpSent,
12226
+ pendingRegistration,
12227
+ didMethod
12228
+ ]);
11719
12229
  (0, react.useEffect)(() => {
11720
12230
  if (retryDeadline === null) return;
11721
12231
  const update = () => {
@@ -11740,6 +12250,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11740
12250
  setRegistrationConfirmation(null);
11741
12251
  setShortHandleInviteNotice(false);
11742
12252
  setOtp("");
12253
+ setInviteCode("");
11743
12254
  setRegistrationOtpSent(false);
11744
12255
  setRecoveryFactorContext(null);
11745
12256
  setRecoveryChoice(null);
@@ -11762,35 +12273,63 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11762
12273
  };
11763
12274
  const requestRegistrationOtp = async () => {
11764
12275
  setError(null);
11765
- const result = await props.sendRegistrationOtp({
11766
- handle: handle.trim(),
11767
- phone: phone.trim()
11768
- });
11769
- if (!result.ok) {
11770
- if (result.failureCode === "short-handle-invite-required") {
11771
- setNotice(null);
12276
+ if (entryInFlight.current) return;
12277
+ entryInFlight.current = true;
12278
+ setEntryPending(true);
12279
+ try {
12280
+ const checked = await props.inspectIdentityAccess({
12281
+ handle: handle.trim(),
12282
+ phone: phone.trim(),
12283
+ ...inviteCode.trim() === "" ? {} : { inviteCode: inviteCode.trim() }
12284
+ });
12285
+ if (!checked.ok) return setError(checked.error);
12286
+ if (checked.value.status === "unavailable") return setError("此 Handle 暂不可注册,请更换后重试。");
12287
+ if (checked.value.status !== "existing" && checked.value.inviteRequired && checked.value.inviteStatus !== "valid") {
11772
12288
  setShortHandleInviteNotice(true);
12289
+ setNotice(null);
12290
+ if (checked.value.inviteStatus === "invalid") setError("邀请码无效或不适用于当前账号,请检查后重试。");
11773
12291
  return;
11774
12292
  }
11775
- setError(result.error);
11776
- return;
12293
+ if (checked.value.status !== "existing" && !canRegister) return setError("当前服务暂不接受所选方法的新注册。");
12294
+ const admissionInvite = checked.value.status === "existing" ? "" : inviteCode.trim();
12295
+ if (checked.value.status === "existing") {
12296
+ setInviteCode("");
12297
+ setShortHandleInviteNotice(false);
12298
+ }
12299
+ const result = await props.sendRegistrationOtp({
12300
+ handle: handle.trim(),
12301
+ phone: phone.trim(),
12302
+ ...didMethod === "web" ? { didMethod } : {},
12303
+ ...admissionInvite === "" ? {} : { inviteCode: admissionInvite }
12304
+ });
12305
+ if (!result.ok) {
12306
+ if (result.failureCode === "short-handle-invite-required") {
12307
+ setNotice(null);
12308
+ setShortHandleInviteNotice(true);
12309
+ return;
12310
+ }
12311
+ setError(result.error);
12312
+ return;
12313
+ }
12314
+ const cooldownSeconds = Math.max(0, Math.ceil(result.value.retryAfterSeconds));
12315
+ setRegistrationOtpSent(true);
12316
+ setRetryDeadline(Date.now() + cooldownSeconds * 1e3);
12317
+ setRetrySeconds(cooldownSeconds);
12318
+ setNotice(`注册验证码已发送;${cooldownSeconds} 秒后可重新获取。`);
12319
+ } finally {
12320
+ entryInFlight.current = false;
12321
+ setEntryPending(false);
11777
12322
  }
11778
- const cooldownSeconds = Math.max(0, Math.ceil(result.value.retryAfterSeconds));
11779
- setRegistrationOtpSent(true);
11780
- setRetryDeadline(Date.now() + cooldownSeconds * 1e3);
11781
- setRetrySeconds(cooldownSeconds);
11782
- setNotice(`注册验证码已发送;${cooldownSeconds} 秒后可重新获取。`);
11783
12323
  };
11784
12324
  const requestIdentityOtp = async () => {
11785
12325
  setError(null);
11786
- const result = await props.continueRecoveryForHandle?.(handle.trim());
12326
+ const result = didMethod === "wba" ? await props.continueRecoveryForHandle?.(handle.trim()) : void 0;
11787
12327
  if (result !== void 0 && !result.ok) return setError(result.error);
11788
12328
  if (result?.ok && result.value) return;
11789
- setShortHandleInviteNotice(false);
11790
12329
  await requestRegistrationOtp();
11791
12330
  };
11792
12331
  const completeRegistration = async () => {
11793
- if (!registrationOtpSent || registrationConfirmation === null || registrationInFlight.current || props.pending) return;
12332
+ if (!canRegister || !registrationOtpSent || registrationConfirmation === null || registrationInFlight.current || props.pending) return;
11794
12333
  registrationInFlight.current = true;
11795
12334
  setRegistrationSubmitting(true);
11796
12335
  setError(null);
@@ -11811,13 +12350,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11811
12350
  setOtp("");
11812
12351
  setJoinContext({
11813
12352
  fullHandle: result.value.fullHandle,
11814
- phone: phone.trim()
12353
+ phone: phone.trim(),
12354
+ ...result.value.methodCapabilities === void 0 ? {} : { methodCapabilities: result.value.methodCapabilities }
11815
12355
  });
11816
12356
  return;
11817
12357
  }
11818
12358
  setPhone("");
11819
12359
  setHandle("");
11820
12360
  setDeviceRejoinHandle(null);
12361
+ setPendingRegistration(null);
11821
12362
  resetIdentityEntry();
11822
12363
  } catch {
11823
12364
  setRegistrationConfirmation(null);
@@ -11832,7 +12373,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11832
12373
  const choice = props.access.choice;
11833
12374
  setJoinContext(choice === null ? null : {
11834
12375
  fullHandle: choice.fullHandle,
11835
- phone
12376
+ phone,
12377
+ ...choice.methodCapabilities === void 0 ? {} : { methodCapabilities: choice.methodCapabilities }
11836
12378
  });
11837
12379
  }, [props.access]);
11838
12380
  const beginJoin = async () => {
@@ -12001,7 +12543,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12001
12543
  setDeviceRejoinHandle(currentHandle);
12002
12544
  resetIdentityEntry();
12003
12545
  };
12004
- const signedOutRecoveryOpen = props.sessionStatus === "signed-out" && signedOutAlternative === "recover";
12546
+ const signedOutRecoveryOpen = props.sessionStatus === "signed-out" && signedOutAlternative === "recover" && props.access?.methodCapabilities?.handleRecovery === true;
12005
12547
  const revokedHandle = props.sessionStatus === "recovery-required" ? props.identity?.handle : void 0;
12006
12548
  if (props.recoveryOperationId !== null && !signedOutRecoveryOpen) return (0, react_jsx_runtime.jsx)(Recovery, {
12007
12549
  ...props,
@@ -12014,6 +12556,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12014
12556
  requestDescription: "这个 Handle 已在另一台设备完成了更新恢复,当前设备的旧凭证因此失效。验证绑定手机号后即可继续使用本机数据。"
12015
12557
  }
12016
12558
  });
12559
+ if (props.sessionStatus === "recovery-required" && props.access?.methodCapabilities?.handleRecovery === false) return (0, react_jsx_runtime.jsxs)(AwikiIdentityPage, { children: [(0, react_jsx_runtime.jsx)("p", {
12560
+ role: "status",
12561
+ children: "此身份不支持恢复。Web 首个管理员丢失后无法恢复管理能力;可使用仍有效的设备继续访问。"
12562
+ }), (0, react_jsx_runtime.jsx)("button", {
12563
+ type: "button",
12564
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.secondary,
12565
+ disabled: props.accessLoading,
12566
+ onClick: () => {
12567
+ props.refreshIdentityAccess?.();
12568
+ },
12569
+ children: "重新检查身份状态"
12570
+ })] });
12017
12571
  if (!validRecoveryEntryOpen && (props.access === null && props.accessLoading || props.access === null && props.accessError)) return (0, react_jsx_runtime.jsxs)(AwikiIdentityPage, { children: [(0, react_jsx_runtime.jsx)("p", {
12018
12572
  role: "status",
12019
12573
  children: props.accessError ?? "正在确认本机身份操作…"
@@ -12232,13 +12786,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12232
12786
  },
12233
12787
  children: "加入新设备(推荐)"
12234
12788
  }),
12235
- (0, react_jsx_runtime.jsx)("button", {
12789
+ joinContext.methodCapabilities?.handleRecovery === true && (0, react_jsx_runtime.jsx)("button", {
12236
12790
  type: "button",
12237
12791
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.dangerLink,
12238
12792
  disabled: props.pending,
12239
12793
  onClick: chooseRecovery,
12240
12794
  children: "恢复 Handle(会替换 DID)"
12241
12795
  }),
12796
+ joinContext.methodCapabilities?.method === "web" && (0, react_jsx_runtime.jsx)("p", {
12797
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.notice,
12798
+ children: "Web 身份不支持恢复或管理权转移;首个管理员丢失后无法恢复管理能力。请使用已有管理设备批准加入。"
12799
+ }),
12242
12800
  (0, react_jsx_runtime.jsx)("button", {
12243
12801
  type: "button",
12244
12802
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.secondary,
@@ -12256,7 +12814,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12256
12814
  ]
12257
12815
  }) });
12258
12816
  if (props.sessionStatus === "signed-out") {
12259
- if (signedOutAlternative === "recover") return (0, react_jsx_runtime.jsx)(Recovery, {
12817
+ if (signedOutRecoveryOpen) return (0, react_jsx_runtime.jsx)(Recovery, {
12260
12818
  ...props,
12261
12819
  onExit: exitRecovery,
12262
12820
  onExitLabel: "返回本机身份"
@@ -12348,7 +12906,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12348
12906
  role: "alert",
12349
12907
  children: error
12350
12908
  }),
12351
- loginFailed && (0, react_jsx_runtime.jsxs)("div", {
12909
+ loginFailed && props.access?.methodCapabilities?.handleRecovery === true && (0, react_jsx_runtime.jsxs)("div", {
12352
12910
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.recoveryHelp,
12353
12911
  children: [(0, react_jsx_runtime.jsx)("p", { children: "如果本机身份凭证已经损坏或不可用,可以验证原绑定手机号后恢复这个身份。" }), (0, react_jsx_runtime.jsx)("button", {
12354
12912
  type: "button",
@@ -12378,7 +12936,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12378
12936
  if (registrationOtpSent) setRegistrationConfirmation({
12379
12937
  phone: phone.trim(),
12380
12938
  handle: handle.trim(),
12381
- otp: otp.trim()
12939
+ otp: otp.trim(),
12940
+ ...didMethod === "web" ? { didMethod } : {},
12941
+ ...inviteCode.trim() === "" ? {} : { inviteCode: inviteCode.trim() }
12382
12942
  });
12383
12943
  else requestIdentityOtp();
12384
12944
  },
@@ -12391,15 +12951,59 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12391
12951
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.headingGroup,
12392
12952
  children: [(0, react_jsx_runtime.jsx)("h3", { children: registrationOtpSent ? "验证身份" : deviceRejoinHandle === null ? "进入 AWiki" : "重新加入设备" }), (0, react_jsx_runtime.jsx)("p", { children: registrationOtpSent ? "输入注册验证码。新 Handle 会创建身份,已有 Handle 会进入设备加入选择。" : deviceRejoinHandle === null ? "输入 Handle 和手机号继续。已有恢复进度会直接继续,无需重复获取验证码。" : "验证绑定手机号后,这台设备会以一把新密钥重新申请加入;本机消息数据不会清除。" })]
12393
12953
  }),
12954
+ !registrationOtpSent && (props.access?.pendingRegistrations?.length ?? 0) > 0 && (0, react_jsx_runtime.jsxs)("div", {
12955
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.actionStack,
12956
+ "aria-label": "未完成的注册",
12957
+ children: [(0, react_jsx_runtime.jsx)("p", { children: "选择原注册继续;请重新输入手机号和有效验证码。" }), props.access?.pendingRegistrations?.filter((value) => value.verificationKind === "phone").map((value) => (0, react_jsx_runtime.jsxs)("button", {
12958
+ type: "button",
12959
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.secondary,
12960
+ disabled: entryPending || props.pending,
12961
+ onClick: () => {
12962
+ setPendingRegistration(value);
12963
+ setHandle(value.fullHandle);
12964
+ setDidMethod(value.method);
12965
+ setOtp("");
12966
+ setNotice("将继续原注册,保留同一个 DID。");
12967
+ },
12968
+ children: ["继续注册 ", value.fullHandle]
12969
+ }, value.did))]
12970
+ }),
12971
+ (creationMethods.length > 1 || creationMethods.length === 1 && creationMethods[0] === "web") && (0, react_jsx_runtime.jsxs)("label", {
12972
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.field,
12973
+ children: ["身份方法", (0, react_jsx_runtime.jsx)("select", {
12974
+ "aria-label": "身份方法",
12975
+ value: didMethod,
12976
+ disabled: entryPending || registrationOtpSent || props.pending,
12977
+ onChange: (event) => {
12978
+ setDidMethod(event.target.value);
12979
+ setPendingRegistration(null);
12980
+ },
12981
+ children: creationMethods.map((method) => (0, react_jsx_runtime.jsx)("option", {
12982
+ value: method,
12983
+ children: method === "wba" ? "WBA(默认)" : "Web"
12984
+ }, method))
12985
+ })]
12986
+ }),
12987
+ didMethod === "web" && (0, react_jsx_runtime.jsx)("p", {
12988
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.notice,
12989
+ children: "Web 身份支持独立设备加入和撤销,不支持恢复或管理权转移。首个管理员丢失后无法恢复管理能力。"
12990
+ }),
12991
+ !canRegister && (0, react_jsx_runtime.jsx)("p", {
12992
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.notice,
12993
+ children: "当前服务暂不接受所选方法的新注册。可继续已保存的注册,或重新检查。"
12994
+ }),
12394
12995
  (0, react_jsx_runtime.jsxs)("label", {
12395
12996
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.field,
12396
12997
  children: ["Handle", (0, react_jsx_runtime.jsx)("input", {
12397
12998
  value: handle,
12398
12999
  onChange: (event) => {
12399
13000
  setHandle(event.target.value);
13001
+ setPendingRegistration(null);
12400
13002
  setShortHandleInviteNotice(false);
13003
+ setInviteCode("");
13004
+ setError(null);
12401
13005
  },
12402
- readOnly: registrationOtpSent || deviceRejoinHandle !== null,
13006
+ readOnly: entryPending || props.pending || registrationOtpSent || deviceRejoinHandle !== null,
12403
13007
  autoComplete: "username",
12404
13008
  placeholder: "例如 alice",
12405
13009
  autoFocus: props.autoFocusHandle
@@ -12412,11 +13016,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12412
13016
  onChange: (event) => {
12413
13017
  setPhone(event.target.value);
12414
13018
  },
12415
- readOnly: registrationOtpSent,
13019
+ readOnly: entryPending || props.pending || registrationOtpSent,
12416
13020
  type: "tel",
12417
13021
  autoComplete: "tel"
12418
13022
  })]
12419
13023
  }),
13024
+ shortHandleInviteNotice && (0, react_jsx_runtime.jsxs)("label", {
13025
+ className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.field,
13026
+ children: ["邀请码", (0, react_jsx_runtime.jsx)("input", {
13027
+ value: inviteCode,
13028
+ onChange: (event) => {
13029
+ setInviteCode(event.target.value);
13030
+ setError(null);
13031
+ },
13032
+ readOnly: entryPending || props.pending || registrationOtpSent,
13033
+ autoComplete: "off",
13034
+ maxLength: 512,
13035
+ placeholder: "请输入邀请码"
13036
+ })]
13037
+ }),
12420
13038
  registrationOtpSent && (0, react_jsx_runtime.jsxs)("label", {
12421
13039
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.field,
12422
13040
  children: ["注册验证码", (0, react_jsx_runtime.jsx)("input", {
@@ -12432,13 +13050,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12432
13050
  (0, react_jsx_runtime.jsx)("button", {
12433
13051
  type: "submit",
12434
13052
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.primary,
12435
- disabled: props.pending || props.accessLoading || handle.trim() === "" || phone.trim() === "" || registrationOtpSent && otp.trim() === "",
13053
+ disabled: entryPending || props.pending || props.accessLoading || shortHandleInviteNotice && inviteCode.trim() === "" || handle.trim() === "" || phone.trim() === "" || registrationOtpSent && otp.trim() === "",
12436
13054
  children: registrationOtpSent ? "继续" : "获取验证码"
12437
13055
  }),
12438
13056
  registrationOtpSent && (0, react_jsx_runtime.jsx)("button", {
12439
13057
  type: "button",
12440
13058
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.linkButton,
12441
- disabled: props.pending || retrySeconds > 0,
13059
+ disabled: entryPending || props.pending || retrySeconds > 0,
12442
13060
  onClick: () => {
12443
13061
  requestRegistrationOtp();
12444
13062
  },
@@ -12447,7 +13065,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12447
13065
  shortHandleInviteNotice && (0, react_jsx_runtime.jsx)("div", {
12448
13066
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.inviteNotice,
12449
13067
  role: "alert",
12450
- children: "注册少于5位的handle需要使用邀请码,目前暂不支持自主注册。"
13068
+ children: "此 Handle 注册需要邀请码,请输入后继续。"
12451
13069
  }),
12452
13070
  notice !== null && (0, react_jsx_runtime.jsx)("small", {
12453
13071
  className: _dsh_awiki_css_AwikiIdentityAccess_module_css_default.notice,
@@ -13810,14 +14428,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13810
14428
  async beginDeviceJoin() {
13811
14429
  const generation = this.generation;
13812
14430
  const result = await this.withPending("开始加入设备", () => call(() => this.remote.beginDeviceJoin()));
13813
- if (result.ok && this.current(generation)) this.publish({
13814
- ...this.view,
13815
- identityAccess: {
13816
- choice: null,
13817
- joining: true,
13818
- recoveries: []
13819
- }
13820
- });
14431
+ if (result.ok && this.current(generation)) {
14432
+ this.recoveryRevision++;
14433
+ this.accessRequest = void 0;
14434
+ this.publish({
14435
+ ...this.view,
14436
+ identityAccess: {
14437
+ choice: null,
14438
+ joining: true,
14439
+ recoveries: []
14440
+ },
14441
+ accessLoading: false,
14442
+ accessError: null
14443
+ });
14444
+ }
13821
14445
  return result;
13822
14446
  }
13823
14447
  async getDeviceJoinStatus() {
@@ -13938,6 +14562,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13938
14562
  };
13939
14563
  });
13940
14564
  }
14565
+ getIdentityServices() {
14566
+ return call(() => this.remote.getIdentityServices());
14567
+ }
14568
+ updateIdentityServices(request) {
14569
+ return this.withPending("更新身份服务", () => call(() => this.remote.updateIdentityServices(request)));
14570
+ }
14571
+ resumeIdentityServicesUpdate(request) {
14572
+ return this.withPending("继续身份服务更新", () => call(() => this.remote.resumeIdentityServicesUpdate(request)));
14573
+ }
13941
14574
  refreshDeviceManagement() {
13942
14575
  return call(() => this.remote.refreshDeviceManagement());
13943
14576
  }
@@ -13953,6 +14586,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13953
14586
  revokeDevice(request) {
13954
14587
  return this.withPending("撤销设备", () => call(() => this.remote.revokeDevice(request)));
13955
14588
  }
14589
+ retryDeviceManagement(request) {
14590
+ return this.withPending("重试配置管理设备", () => call(() => this.remote.retryDeviceManagement(request)));
14591
+ }
13956
14592
  prepareRootTransfer(request) {
13957
14593
  return this.withPending("准备授予管理权", () => call(() => this.remote.prepareRootTransfer(request)));
13958
14594
  }
@@ -16960,6 +17596,201 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16960
17596
  "verificationIntro": "xQ4iKW_verificationIntro"
16961
17597
  };
16962
17598
  //#endregion
17599
+ //#region lib/types/client/AwikiIdentityServices.js
17600
+ /** Public services editor. Core owns authorization, protected fields and durable writes. */
17601
+ const protectedTypes = /* @__PURE__ */ new Set([
17602
+ "AgentDescription",
17603
+ "ANPHandleService",
17604
+ "ANPMessageService"
17605
+ ]);
17606
+ function AwikiIdentityServices(props) {
17607
+ const [snapshot, setSnapshot] = (0, react.useState)(null);
17608
+ const [error, setError] = (0, react.useState)(null);
17609
+ const [busy, setBusy] = (0, react.useState)(false);
17610
+ const [editing, setEditing] = (0, react.useState)(null);
17611
+ const [existingId, setExistingId] = (0, react.useState)(null);
17612
+ const alive = (0, react.useRef)(false);
17613
+ const writing = (0, react.useRef)(false);
17614
+ const canEdit = snapshot?.canManage === true && !snapshot.pending && !busy;
17615
+ const read = async () => {
17616
+ const result = await props.getIdentityServices();
17617
+ if (!alive.current) return;
17618
+ if (result.ok) setSnapshot(result.value);
17619
+ else {
17620
+ setSnapshot(null);
17621
+ setError(result.error);
17622
+ }
17623
+ };
17624
+ (0, react.useEffect)(() => {
17625
+ alive.current = true;
17626
+ read();
17627
+ return () => {
17628
+ alive.current = false;
17629
+ };
17630
+ }, []);
17631
+ const write = async (services) => {
17632
+ if (writing.current || snapshot?.canManage !== true) return;
17633
+ if (services !== void 0 && snapshot.pending) return;
17634
+ writing.current = true;
17635
+ setBusy(true);
17636
+ setError(null);
17637
+ try {
17638
+ const result = services === void 0 ? await props.resumeIdentityServicesUpdate({ did: snapshot.did }) : await props.updateIdentityServices({
17639
+ did: snapshot.did,
17640
+ services
17641
+ });
17642
+ if (!alive.current) return;
17643
+ if (result.ok) {
17644
+ setSnapshot(result.value);
17645
+ setEditing(null);
17646
+ } else setError(result.error);
17647
+ await read();
17648
+ } finally {
17649
+ writing.current = false;
17650
+ if (alive.current) setBusy(false);
17651
+ }
17652
+ };
17653
+ return (0, react_jsx_runtime.jsxs)("section", {
17654
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.section,
17655
+ "aria-label": "身份服务",
17656
+ children: [
17657
+ (0, react_jsx_runtime.jsxs)("div", {
17658
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.sectionHeading,
17659
+ children: [(0, react_jsx_runtime.jsx)("h4", { children: "身份服务" }), (0, react_jsx_runtime.jsx)("button", {
17660
+ type: "button",
17661
+ disabled: busy,
17662
+ onClick: () => {
17663
+ read();
17664
+ },
17665
+ children: "重新检查服务"
17666
+ })]
17667
+ }),
17668
+ snapshot?.pending && (0, react_jsx_runtime.jsxs)("div", {
17669
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.notice,
17670
+ role: "status",
17671
+ children: [
17672
+ (0, react_jsx_runtime.jsx)("strong", { children: "服务更新尚未确认" }),
17673
+ (0, react_jsx_runtime.jsx)("span", { children: "已保存原更新,关闭或重新打开页面不会重复提交。" }),
17674
+ snapshot.canManage && (0, react_jsx_runtime.jsx)("button", {
17675
+ type: "button",
17676
+ disabled: busy,
17677
+ onClick: () => {
17678
+ write();
17679
+ },
17680
+ children: "继续原服务更新"
17681
+ })
17682
+ ]
17683
+ }),
17684
+ snapshot?.services.map((service) => (0, react_jsx_runtime.jsxs)("article", {
17685
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.card,
17686
+ children: [
17687
+ (0, react_jsx_runtime.jsx)("strong", { children: service.type }),
17688
+ (0, react_jsx_runtime.jsx)("p", { children: service.id }),
17689
+ (0, react_jsx_runtime.jsx)("p", { children: service.serviceEndpoint }),
17690
+ protectedTypes.has(service.type) ? (0, react_jsx_runtime.jsx)("small", { children: "系统服务,只读" }) : canEdit && (0, react_jsx_runtime.jsxs)("div", {
17691
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.actions,
17692
+ children: [(0, react_jsx_runtime.jsx)("button", {
17693
+ type: "button",
17694
+ onClick: () => {
17695
+ setExistingId(service.id);
17696
+ setEditing(service);
17697
+ },
17698
+ children: "编辑服务"
17699
+ }), (0, react_jsx_runtime.jsx)("button", {
17700
+ type: "button",
17701
+ onClick: () => {
17702
+ write(snapshot.services.filter((value) => value.id !== service.id));
17703
+ },
17704
+ children: "删除服务"
17705
+ })]
17706
+ })
17707
+ ]
17708
+ }, service.id)),
17709
+ canEdit && (0, react_jsx_runtime.jsx)("button", {
17710
+ type: "button",
17711
+ onClick: () => {
17712
+ setExistingId(null);
17713
+ setEditing({
17714
+ id: `${snapshot.did}#`,
17715
+ type: "",
17716
+ serviceEndpoint: ""
17717
+ });
17718
+ },
17719
+ children: "添加服务"
17720
+ }),
17721
+ canEdit && editing !== null && (0, react_jsx_runtime.jsxs)("form", {
17722
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.card,
17723
+ onSubmit: (event) => {
17724
+ event.preventDefault();
17725
+ const services = existingId === null ? [...snapshot.services, editing] : snapshot.services.map((value) => value.id === existingId ? editing : value);
17726
+ write(services);
17727
+ },
17728
+ children: [
17729
+ (0, react_jsx_runtime.jsxs)("label", {
17730
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.field,
17731
+ children: ["服务标识", (0, react_jsx_runtime.jsx)("input", {
17732
+ "aria-label": "服务标识",
17733
+ value: editing.id,
17734
+ readOnly: existingId !== null,
17735
+ onChange: (event) => {
17736
+ setEditing({
17737
+ ...editing,
17738
+ id: event.target.value
17739
+ });
17740
+ },
17741
+ required: true
17742
+ })]
17743
+ }),
17744
+ (0, react_jsx_runtime.jsxs)("label", {
17745
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.field,
17746
+ children: ["服务类型", (0, react_jsx_runtime.jsx)("input", {
17747
+ "aria-label": "服务类型",
17748
+ value: editing.type,
17749
+ onChange: (event) => {
17750
+ setEditing({
17751
+ ...editing,
17752
+ type: event.target.value
17753
+ });
17754
+ },
17755
+ required: true
17756
+ })]
17757
+ }),
17758
+ (0, react_jsx_runtime.jsxs)("label", {
17759
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.field,
17760
+ children: ["服务地址", (0, react_jsx_runtime.jsx)("input", {
17761
+ "aria-label": "服务地址",
17762
+ value: editing.serviceEndpoint,
17763
+ onChange: (event) => {
17764
+ setEditing({
17765
+ ...editing,
17766
+ serviceEndpoint: event.target.value
17767
+ });
17768
+ },
17769
+ required: true
17770
+ })]
17771
+ }),
17772
+ (0, react_jsx_runtime.jsx)("button", {
17773
+ type: "submit",
17774
+ children: "保存服务"
17775
+ }),
17776
+ (0, react_jsx_runtime.jsx)("button", {
17777
+ type: "button",
17778
+ onClick: () => {
17779
+ setEditing(null);
17780
+ },
17781
+ children: "取消编辑"
17782
+ })
17783
+ ]
17784
+ }),
17785
+ error !== null && (0, react_jsx_runtime.jsx)("p", {
17786
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.error,
17787
+ role: "alert",
17788
+ children: error
17789
+ })
17790
+ ]
17791
+ });
17792
+ }
17793
+ //#endregion
16963
17794
  //#region lib/types/client/AwikiDevices.js
16964
17795
  /** Foreground-only ready-admin device management. SAS remains component-local. */
16965
17796
  const requestStateLabels = {
@@ -17287,7 +18118,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17287
18118
  onClick: () => {
17288
18119
  approve();
17289
18120
  },
17290
- children: "批准为 member"
18121
+ children: "批准加入并自动配置管理权"
17291
18122
  })
17292
18123
  ]
17293
18124
  }),
@@ -17320,9 +18151,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17320
18151
  role: "status",
17321
18152
  children: ["管理能力已发送;目标设备完成接收后会显示为 admin。接受时间:", readableDate(rootReceipt.acceptedAt)]
17322
18153
  }),
17323
- !snapshot.rootTransferSupported && (0, react_jsx_runtime.jsxs)("div", {
18154
+ !snapshot.rootTransferSupported && (snapshot.methodCapabilities?.method === "web" || snapshot.devices.some((device) => device.role === "member" && device.provisioning === void 0)) && (0, react_jsx_runtime.jsxs)("div", {
17324
18155
  className: _dsh_awiki_css_AwikiDevices_module_css_default.notice,
17325
- children: [(0, react_jsx_runtime.jsx)("strong", { children: "管理权转移暂不可用" }), (0, react_jsx_runtime.jsx)("span", { children: "该功能目前只能在配备 Intel 芯片的 Mac 上通过系统身份验证使用。" })]
18156
+ children: [(0, react_jsx_runtime.jsx)("strong", { children: "管理权转移暂不可用" }), (0, react_jsx_runtime.jsx)("span", { children: snapshot.methodCapabilities?.method === "web" ? "Web 身份不支持恢复或管理权转移;首个管理员丢失后无法恢复管理能力。" : "该功能目前只能在配备 Intel 芯片的 Mac 上通过系统身份验证使用。" })]
18157
+ }),
18158
+ snapshot.methodCapabilities?.servicesUpdate === true && props.getIdentityServices !== void 0 && props.updateIdentityServices !== void 0 && props.resumeIdentityServicesUpdate !== void 0 && (0, react_jsx_runtime.jsx)(AwikiIdentityServices, {
18159
+ getIdentityServices: props.getIdentityServices,
18160
+ updateIdentityServices: props.updateIdentityServices,
18161
+ resumeIdentityServicesUpdate: props.resumeIdentityServicesUpdate
17326
18162
  }),
17327
18163
  (0, react_jsx_runtime.jsxs)("section", {
17328
18164
  className: _dsh_awiki_css_AwikiDevices_module_css_default.section,
@@ -17387,7 +18223,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17387
18223
  })
17388
18224
  ]
17389
18225
  }),
17390
- snapshot.rootTransferSupported && !device.isCurrent && device.status === "active" && device.role === "member" && !device.managementReady && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
18226
+ device.provisioning !== void 0 && !device.managementReady && (0, react_jsx_runtime.jsxs)("div", {
18227
+ role: "status",
18228
+ children: [
18229
+ device.provisioning.phase === "failed" ? "自动配置失败" : device.provisioning.phase === "waiting" ? "已发送,等待设备接收" : "正在自动配置管理权",
18230
+ "(已尝试 ",
18231
+ device.provisioning.attempts,
18232
+ " 次)",
18233
+ device.provisioning.requiresRejoin && (0, react_jsx_runtime.jsx)("p", { children: "管理权限配置已失效,请撤销此成员设备,再在该设备上退出本地身份(保留数据)后重新加入。" }),
18234
+ device.provisioning.phase === "failed" && !device.provisioning.requiresRejoin && props.retryDeviceManagement !== void 0 && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
18235
+ className: _dsh_awiki_css_AwikiDevices_module_css_default.button,
18236
+ type: "button",
18237
+ disabled: props.pending,
18238
+ onClick: () => {
18239
+ props.retryDeviceManagement?.({ deviceRef: device.deviceRef }).then((result) => result.ok ? refresh() : setError(result.error));
18240
+ },
18241
+ children: "重试自动配置"
18242
+ })
18243
+ ]
18244
+ }),
18245
+ device.provisioning === void 0 && snapshot.rootTransferSupported && !device.isCurrent && device.status === "active" && device.role === "member" && !device.managementReady && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
17391
18246
  className: _dsh_awiki_css_AwikiDevices_module_css_default.button,
17392
18247
  type: "button",
17393
18248
  variant: "outline",
@@ -17589,13 +18444,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17589
18444
  active: managing,
17590
18445
  pending: props.pending,
17591
18446
  refreshDeviceManagement: props.refreshDeviceManagement,
18447
+ ...props.getIdentityServices === void 0 ? {} : { getIdentityServices: props.getIdentityServices },
18448
+ ...props.updateIdentityServices === void 0 ? {} : { updateIdentityServices: props.updateIdentityServices },
18449
+ ...props.resumeIdentityServicesUpdate === void 0 ? {} : { resumeIdentityServicesUpdate: props.resumeIdentityServicesUpdate },
17592
18450
  startDeviceJoinVerification: props.startDeviceJoinVerification,
17593
18451
  approveDeviceJoin: props.approveDeviceJoin,
17594
18452
  rejectDeviceJoin: props.rejectDeviceJoin,
17595
18453
  revokeDevice: props.revokeDevice,
18454
+ retryDeviceManagement: props.retryDeviceManagement,
17596
18455
  prepareRootTransfer: props.prepareRootTransfer,
17597
18456
  confirmRootTransfer: props.confirmRootTransfer
17598
- })
18457
+ }, props.identityKey)
17599
18458
  })] });
17600
18459
  }
17601
18460
  //#endregion
@@ -20302,10 +21161,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20302
21161
  identityKey: view.identity?.did ?? null,
20303
21162
  pending: view.pending !== null,
20304
21163
  refreshDeviceManagement: props.refreshDeviceManagement,
21164
+ ...props.getIdentityServices === void 0 ? {} : { getIdentityServices: props.getIdentityServices },
21165
+ ...props.updateIdentityServices === void 0 ? {} : { updateIdentityServices: props.updateIdentityServices },
21166
+ ...props.resumeIdentityServicesUpdate === void 0 ? {} : { resumeIdentityServicesUpdate: props.resumeIdentityServicesUpdate },
20305
21167
  startDeviceJoinVerification: props.startDeviceJoinVerification,
20306
21168
  approveDeviceJoin: props.approveDeviceJoin,
20307
21169
  rejectDeviceJoin: props.rejectDeviceJoin,
20308
21170
  revokeDevice: props.revokeDevice,
21171
+ retryDeviceManagement: props.retryDeviceManagement,
20309
21172
  prepareRootTransfer: props.prepareRootTransfer,
20310
21173
  confirmRootTransfer: props.confirmRootTransfer
20311
21174
  }),
@@ -20968,7 +21831,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20968
21831
  }),
20969
21832
  (0, react_jsx_runtime.jsx)("p", {
20970
21833
  className: _dsh_awiki_css_AwikiSettingsSection_module_css_default.description,
20971
- children: t("updateCurrent", { version: update?.currentPluginVersion ?? "0.3.12" })
21834
+ children: t("updateCurrent", { version: update?.currentPluginVersion ?? "0.3.17" })
20972
21835
  }),
20973
21836
  update !== void 0 && (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: update.currentModelProxyVersion !== void 0 && (0, react_jsx_runtime.jsx)("p", {
20974
21837
  className: _dsh_awiki_css_AwikiSettingsSection_module_css_default.description,
@@ -21491,13 +22354,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
21491
22354
  active: true,
21492
22355
  pending: awiki.pending !== null,
21493
22356
  refreshDeviceManagement: props.refreshDeviceManagement,
22357
+ ...props.getIdentityServices === void 0 ? {} : { getIdentityServices: props.getIdentityServices },
22358
+ ...props.updateIdentityServices === void 0 ? {} : { updateIdentityServices: props.updateIdentityServices },
22359
+ ...props.resumeIdentityServicesUpdate === void 0 ? {} : { resumeIdentityServicesUpdate: props.resumeIdentityServicesUpdate },
21494
22360
  startDeviceJoinVerification: props.startDeviceJoinVerification,
21495
22361
  approveDeviceJoin: props.approveDeviceJoin,
21496
22362
  rejectDeviceJoin: props.rejectDeviceJoin,
21497
22363
  revokeDevice: props.revokeDevice,
22364
+ retryDeviceManagement: props.retryDeviceManagement,
21498
22365
  prepareRootTransfer: props.prepareRootTransfer,
21499
22366
  confirmRootTransfer: props.confirmRootTransfer
21500
- }) : (0, react_jsx_runtime.jsx)("p", {
22367
+ }, `${tenantSnapshot.status === "ready" ? `${tenantSnapshot.value.activeTenantId}:${tenantSnapshot.value.generation}` : "unavailable"}:${awiki.identity?.did ?? "none"}`) : (0, react_jsx_runtime.jsx)("p", {
21501
22368
  className: _dsh_awiki_css_AwikiSettingsSection_module_css_default.notice,
21502
22369
  children: props.t("devicesUnavailable")
21503
22370
  })),
@@ -23535,10 +24402,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
23535
24402
  beginRecoveryFromDeviceJoin: (request) => awiki.beginRecoveryFromDeviceJoin(request),
23536
24403
  retireDeviceIdentityForRejoin: () => awiki.retireDeviceIdentityForRejoin(),
23537
24404
  refreshDeviceManagement: () => awiki.refreshDeviceManagement(),
24405
+ getIdentityServices: () => awiki.getIdentityServices(),
24406
+ updateIdentityServices: (request) => awiki.updateIdentityServices(request),
24407
+ resumeIdentityServicesUpdate: (request) => awiki.resumeIdentityServicesUpdate(request),
23538
24408
  startDeviceJoinVerification: (request) => awiki.startDeviceJoinVerification(request),
23539
24409
  approveDeviceJoin: (request) => awiki.approveDeviceJoin(request),
23540
24410
  rejectDeviceJoin: (request) => awiki.rejectDeviceJoin(request),
23541
24411
  revokeDevice: (request) => awiki.revokeDevice(request),
24412
+ retryDeviceManagement: (request) => awiki.retryDeviceManagement(request),
23542
24413
  prepareRootTransfer: (request) => awiki.prepareRootTransfer(request),
23543
24414
  confirmRootTransfer: (request) => awiki.confirmRootTransfer(request),
23544
24415
  updateDisplayName: (displayName) => awiki.updateDisplayName(displayName),
@@ -23612,10 +24483,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
23612
24483
  drafts: awiki.drafts,
23613
24484
  loadAwiki: () => awiki.open(),
23614
24485
  refreshDeviceManagement: () => awiki.refreshDeviceManagement(),
24486
+ getIdentityServices: () => awiki.getIdentityServices(),
24487
+ updateIdentityServices: (request) => awiki.updateIdentityServices(request),
24488
+ resumeIdentityServicesUpdate: (request) => awiki.resumeIdentityServicesUpdate(request),
23615
24489
  startDeviceJoinVerification: (request) => awiki.startDeviceJoinVerification(request),
23616
24490
  approveDeviceJoin: (request) => awiki.approveDeviceJoin(request),
23617
24491
  rejectDeviceJoin: (request) => awiki.rejectDeviceJoin(request),
23618
24492
  revokeDevice: (request) => awiki.revokeDevice(request),
24493
+ retryDeviceManagement: (request) => awiki.retryDeviceManagement(request),
23619
24494
  prepareRootTransfer: (request) => awiki.prepareRootTransfer(request),
23620
24495
  confirmRootTransfer: (request) => awiki.confirmRootTransfer(request),
23621
24496
  loadIntegration: async () => {