@awiki/dsh-plugin 0.3.18 → 0.3.20

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 (59) hide show
  1. package/README.zh.md +11 -0
  2. package/lib/client.js +644 -100
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +389 -24
  5. package/lib/{package-version.generated-D0MSDRZn.mjs → package-version.generated-RNVj-2iA.mjs} +22 -2
  6. package/lib/provider.js +1 -1
  7. package/lib/typert.host.js +204 -138
  8. package/lib/typert.remote-client.d.ts +2 -0
  9. package/lib/typert.remote-client.d.ts.map +1 -1
  10. package/lib/typert.remote-client.js +204 -138
  11. package/lib/types/backend-capabilities.d.ts +12 -0
  12. package/lib/types/backend-capabilities.d.ts.map +1 -0
  13. package/lib/types/backend-capabilities.js +48 -0
  14. package/lib/types/backend-capabilities.js.map +1 -0
  15. package/lib/types/client/AwikiIdentityAccess.d.ts.map +1 -1
  16. package/lib/types/client/AwikiIdentityAccess.js +11 -2
  17. package/lib/types/client/AwikiIdentityAccess.js.map +1 -1
  18. package/lib/types/client/AwikiOverlay.d.ts.map +1 -1
  19. package/lib/types/client/AwikiOverlay.js +10 -7
  20. package/lib/types/client/AwikiOverlay.js.map +1 -1
  21. package/lib/types/client/AwikiSettingsSection.d.ts +1 -0
  22. package/lib/types/client/AwikiSettingsSection.d.ts.map +1 -1
  23. package/lib/types/client/AwikiSettingsSection.js +5 -4
  24. package/lib/types/client/AwikiSettingsSection.js.map +1 -1
  25. package/lib/types/client/controller.d.ts +7 -0
  26. package/lib/types/client/controller.d.ts.map +1 -1
  27. package/lib/types/client/controller.js +39 -3
  28. package/lib/types/client/controller.js.map +1 -1
  29. package/lib/types/client/index.d.ts.map +1 -1
  30. package/lib/types/client/index.js +1 -0
  31. package/lib/types/client/index.js.map +1 -1
  32. package/lib/types/client/settings-locales.d.ts +1 -1
  33. package/lib/types/client/settings-locales.d.ts.map +1 -1
  34. package/lib/types/client/settings-locales.js +26 -2
  35. package/lib/types/client/settings-locales.js.map +1 -1
  36. package/lib/types/index.d.ts +18 -1
  37. package/lib/types/index.d.ts.map +1 -1
  38. package/lib/types/index.js +248 -25
  39. package/lib/types/index.js.map +1 -1
  40. package/lib/types/package-version.generated.d.ts +2 -2
  41. package/lib/types/package-version.generated.js +2 -2
  42. package/lib/types/provider-api.d.ts +19 -0
  43. package/lib/types/provider-api.d.ts.map +1 -1
  44. package/lib/types/sdk-adapter.d.ts +4 -0
  45. package/lib/types/sdk-adapter.d.ts.map +1 -1
  46. package/lib/types/sdk-adapter.js +20 -0
  47. package/lib/types/sdk-adapter.js.map +1 -1
  48. package/lib/types/tenant-capability-cache.d.ts +15 -0
  49. package/lib/types/tenant-capability-cache.d.ts.map +1 -0
  50. package/lib/types/tenant-capability-cache.js +45 -0
  51. package/lib/types/tenant-capability-cache.js.map +1 -0
  52. package/lib/types/types.d.ts +8 -1
  53. package/lib/types/types.d.ts.map +1 -1
  54. package/lib/types/types.js.map +1 -1
  55. package/lib/types/update-policy.d.ts +2 -2
  56. package/lib/types/update-policy.d.ts.map +1 -1
  57. package/lib/types/update-policy.js +10 -1
  58. package/lib/types/update-policy.js.map +1 -1
  59. package/package.json +4 -4
@@ -503,9 +503,29 @@ function externalHttpAttempt(value) {
503
503
  }
504
504
  };
505
505
  }
506
+ /** Older published SDKs cannot confirm backend capabilities. Never infer support. */
507
+ function backendDiscoveryClient(client, method) {
508
+ if (typeof Reflect.get(client, method) !== "function") throw new AwikiSdkError("backend-unconfirmed");
509
+ return client;
510
+ }
506
511
  /** Adapt the Rust Node bridge to the frozen Host provider interface. */
507
512
  var RustSdkAdapter = class {
508
513
  onIdentity;
514
+ backendCapabilitiesSnapshot(authenticated = false) {
515
+ return this.run((client) => backendDiscoveryClient(client, "backendCapabilitiesSnapshot").backendCapabilitiesSnapshot(authenticated));
516
+ }
517
+ subscribeBackendCapabilities(authenticated = false) {
518
+ return this.run((client) => backendDiscoveryClient(client, "subscribeBackendCapabilities").subscribeBackendCapabilities(authenticated));
519
+ }
520
+ setBackendDiscoveryActive(active) {
521
+ return this.run(async (client) => {
522
+ if (typeof Reflect.get(client, "setBackendDiscoveryActive") !== "function") return;
523
+ await backendDiscoveryClient(client, "setBackendDiscoveryActive").setBackendDiscoveryActive(active);
524
+ });
525
+ }
526
+ backendCapabilities(authenticated = false, force = false) {
527
+ return this.run((client) => backendDiscoveryClient(client, "backendCapabilities").backendCapabilities(authenticated, force));
528
+ }
509
529
  trustedUserPresenceSupported = process.platform === "darwin" && process.arch === "x64";
510
530
  client;
511
531
  approvalManagement = /* @__PURE__ */ new Map();
@@ -1405,7 +1425,7 @@ function displaySubjectType(profile) {
1405
1425
  //#endregion
1406
1426
  //#region lib/types/package-version.generated.js
1407
1427
  /** Generated from package.json by scripts/sync-package-versions.mjs. */
1408
- const DSH_AWIKI_PACKAGE_VERSION = "0.3.18";
1409
- const DSH_AWIKI_MODEL_PROXY_PACKAGE_VERSION = "0.1.12";
1428
+ const DSH_AWIKI_PACKAGE_VERSION = "0.3.20";
1429
+ const DSH_AWIKI_MODEL_PROXY_PACKAGE_VERSION = "0.1.14";
1410
1430
  //#endregion
1411
1431
  export { downloadedAttachment as a, successfulMailRecoveryObservability as c, RustSdkAdapter as i, isMessageTarget as l, DSH_AWIKI_PACKAGE_VERSION as n, failedMailRecoveryObservability as o, AwikiSdkError as r, fencedMailRecoveryObservability as s, DSH_AWIKI_MODEL_PROXY_PACKAGE_VERSION as t };
package/lib/provider.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as RustSdkAdapter, n as DSH_AWIKI_PACKAGE_VERSION } from "./package-version.generated-D0MSDRZn.mjs";
1
+ import { i as RustSdkAdapter, n as DSH_AWIKI_PACKAGE_VERSION } from "./package-version.generated-RNVj-2iA.mjs";
2
2
  import { setTimeout } from "node:timers/promises";
3
3
  import { openImCoreNodeClient } from "@awiki/im-core-node";
4
4
  import { AnpIdentityPluginError } from "@agent-network-protocol/dsh-anp-identity";