buckyos 0.7.206 → 0.7.208

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 (80) hide show
  1. package/cli/dist/cli.mjs +1 -1
  2. package/cli/dist/cli.mjs.map +1 -1
  3. package/cli/version.ts +1 -1
  4. package/dist/{aiws_write-eeea8ed3.js → aiws_write-825bb6ba.js} +3 -3
  5. package/dist/aiws_write-825bb6ba.js.map +1 -0
  6. package/dist/{aiws_write-47c90e76.mjs → aiws_write-83ddc6cc.mjs} +30 -2
  7. package/dist/aiws_write-83ddc6cc.mjs.map +1 -0
  8. package/dist/app-frame.cjs +1 -1
  9. package/dist/app-frame.cjs.map +1 -1
  10. package/dist/app-frame.d.ts +3 -0
  11. package/dist/app-frame.d.ts.map +1 -1
  12. package/dist/app-frame.mjs +14 -3
  13. package/dist/app-frame.mjs.map +1 -1
  14. package/dist/browser.cjs +1 -1
  15. package/dist/browser.cjs.map +1 -1
  16. package/dist/browser.d.ts +4 -0
  17. package/dist/browser.d.ts.map +1 -1
  18. package/dist/browser.mjs +11 -6
  19. package/dist/browser.mjs.map +1 -1
  20. package/dist/{content_objid-0a095cbd.mjs → content_objid-76434848.mjs} +2 -2
  21. package/dist/{content_objid-0a095cbd.mjs.map → content_objid-76434848.mjs.map} +1 -1
  22. package/dist/{content_objid-4742308a.js → content_objid-addf9e2b.js} +2 -2
  23. package/dist/{content_objid-4742308a.js.map → content_objid-addf9e2b.js.map} +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.mjs +11 -6
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/node.cjs +1 -1
  31. package/dist/node.cjs.map +1 -1
  32. package/dist/node.d.ts +4 -0
  33. package/dist/node.d.ts.map +1 -1
  34. package/dist/node.mjs +10 -5
  35. package/dist/node.mjs.map +1 -1
  36. package/dist/sdk_core.d.ts +18 -0
  37. package/dist/sdk_core.d.ts.map +1 -1
  38. package/dist/{site_manager-91b4d899.mjs → site_manager-604ee369.mjs} +207 -141
  39. package/dist/site_manager-604ee369.mjs.map +1 -0
  40. package/dist/site_manager-70710895.js +2 -0
  41. package/dist/site_manager-70710895.js.map +1 -0
  42. package/dist/user_preferences-1d49850a.mjs +158 -0
  43. package/dist/user_preferences-1d49850a.mjs.map +1 -0
  44. package/dist/user_preferences-7288c989.js +2 -0
  45. package/dist/user_preferences-7288c989.js.map +1 -0
  46. package/dist/user_preferences.d.ts +50 -0
  47. package/dist/user_preferences.d.ts.map +1 -0
  48. package/dist/xllm/core/loop.d.ts.map +1 -1
  49. package/dist/xllm/core/types.d.ts +0 -2
  50. package/dist/xllm/core/types.d.ts.map +1 -1
  51. package/dist/xllm/hosts/deno/native_runtime.d.ts.map +1 -1
  52. package/dist/xllm/hosts/deno/native_tools.d.ts +2 -1
  53. package/dist/xllm/hosts/deno/native_tools.d.ts.map +1 -1
  54. package/dist/xllm/index.d.ts +3 -2
  55. package/dist/xllm/index.d.ts.map +1 -1
  56. package/dist/xllm/runtime/hints.d.ts +9 -4
  57. package/dist/xllm/runtime/hints.d.ts.map +1 -1
  58. package/dist/xllm/runtime/step_renderer.d.ts +4 -4
  59. package/dist/xllm/runtime/step_renderer.d.ts.map +1 -1
  60. package/dist/xllm/runtime/text_budget.d.ts +5 -0
  61. package/dist/xllm/runtime/text_budget.d.ts.map +1 -0
  62. package/dist/xllm/runtime/tool_result.d.ts +14 -1
  63. package/dist/xllm/runtime/tool_result.d.ts.map +1 -1
  64. package/dist/xllm.cjs +1 -1
  65. package/dist/xllm.cjs.map +1 -1
  66. package/dist/xllm.mjs +35 -29
  67. package/dist/xllm_deno.cjs +1 -1
  68. package/dist/xllm_deno.cjs.map +1 -1
  69. package/dist/xllm_deno.mjs +123 -42
  70. package/dist/xllm_deno.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/dist/aiws_write-47c90e76.mjs.map +0 -1
  73. package/dist/aiws_write-eeea8ed3.js.map +0 -1
  74. package/dist/runtime_env-39e4df98.mjs +0 -44
  75. package/dist/runtime_env-39e4df98.mjs.map +0 -1
  76. package/dist/runtime_env-6396e1eb.js +0 -2
  77. package/dist/runtime_env-6396e1eb.js.map +0 -1
  78. package/dist/site_manager-716a2cf5.js +0 -2
  79. package/dist/site_manager-716a2cf5.js.map +0 -1
  80. package/dist/site_manager-91b4d899.mjs.map +0 -1
@@ -40,7 +40,7 @@ import { s as DID, N as NODE_IDENTITY_SCHEMA_V2, e as isBuckyOSLocalNodeIdentity
40
40
  import { sniffMagic, mediaTypeFromExtension, extensionOf, stripMediaTypeParams, heifImageSize, isoBoxes, ContentRegistryClient } from "./content.mjs";
41
41
  import { g as getBrowserIdentityRaw, c as clearBrowserUserInfo, s as saveBrowserIdentity, a as saveBrowserUserInfo, b as getBrowserUserInfo, d as clearBrowserIdentity, h as hashPassword, e as saveLocalAccountInfo, f as cleanLocalAccountInfo } from "./account-7a7bde6f.mjs";
42
42
  import { i as AiWorkspaceClient, A as AIWORKSPACE_SERVICE_NAME, Y as newRecordId, _ as insertRecordOp, Z as setValuesOps, $ as deleteRecordsOp, V as orderKeyBetween, g as commitOverLimit, M as AIWS_PROTOCOL_VERSION, a as AiwsFailure, h as commitWithParts } from "./aiws_bind-b851d4db.mjs";
43
- import { a as getRuntimeEnvironment, g as getBuckyApi } from "./runtime_env-39e4df98.mjs";
43
+ import { U as UserPreferencesStore, r as readUserPreferences, a as getRuntimeEnvironment, g as getBuckyApi } from "./user_preferences-1d49850a.mjs";
44
44
  import { a as objEventKey } from "./object_url-20e94b67.mjs";
45
45
  function ensureSSOEnvironment() {
46
46
  if (typeof window === "undefined" || typeof window.location === "undefined") {
@@ -5254,6 +5254,7 @@ class BuckyOSSDK {
5254
5254
  this.currentRuntime = null;
5255
5255
  this.currentAccountInfo = null;
5256
5256
  this.currentKEventClient = null;
5257
+ this.userPreferences = null;
5257
5258
  this.target = target;
5258
5259
  }
5259
5260
  async initBuckyOS(appid = "", config = null) {
@@ -5351,6 +5352,31 @@ class BuckyOSSDK {
5351
5352
  }
5352
5353
  return this.currentRuntime.getCurrentIdentity();
5353
5354
  }
5355
+ /**
5356
+ * The signed-in user's settings for this page: theme, colour, language and profile. In a host's frame (a Desktop
5357
+ * window, the BuckyOS client) the appearance is the host's; alone in a tab the Zone answers what this page may see
5358
+ * (an App: the appearance and the public profile; a system service's page: the private profile too). `{}` for a
5359
+ * guest, or when the Zone cannot be reached.
5360
+ */
5361
+ async getUserPreferences() {
5362
+ return this.preferencesStore().get();
5363
+ }
5364
+ /** `listener` hears each change of `getUserPreferences` (the host's, or the Zone's read again whenever the page
5365
+ * comes back to the foreground); the returned function stops it. */
5366
+ onUserPreferencesChanged(listener) {
5367
+ return this.preferencesStore().subscribe(listener);
5368
+ }
5369
+ preferencesStore() {
5370
+ this.userPreferences ?? (this.userPreferences = new UserPreferencesStore(async () => {
5371
+ if (this.currentRuntime == null)
5372
+ return {};
5373
+ const identity = await this.getCurrentIdentity();
5374
+ if (identity.kind !== "account")
5375
+ return {};
5376
+ return readUserPreferences(await this.getServiceRpcClient("control-panel").call("user.preferences.get", {}));
5377
+ }));
5378
+ return this.userPreferences;
5379
+ }
5354
5380
  async getAccountInfo() {
5355
5381
  if (this.currentRuntime == null) {
5356
5382
  console.error("BuckyOS WebSDK is not initialized,call initBuckyOS first");
@@ -5793,6 +5819,8 @@ function createSDKModule(target) {
5793
5819
  setAppSetting: sdk.setAppSetting.bind(sdk),
5794
5820
  getCurrentWalletUser: sdk.getCurrentWalletUser.bind(sdk),
5795
5821
  getCurrentIdentity: sdk.getCurrentIdentity.bind(sdk),
5822
+ getUserPreferences: sdk.getUserPreferences.bind(sdk),
5823
+ onUserPreferencesChanged: sdk.onUserPreferencesChanged.bind(sdk),
5796
5824
  resolve_did: sdk.resolve_did.bind(sdk),
5797
5825
  walletSignWithActiveDid: sdk.walletSignWithActiveDid.bind(sdk),
5798
5826
  openExternalUrl: sdk.openExternalUrl.bind(sdk),
@@ -32698,4 +32726,4 @@ export {
32698
32726
  NOTIFY_SESSION_PREFIX as y,
32699
32727
  NOTIFY_CHOICE_CONTROL_ID as z
32700
32728
  };
32701
- //# sourceMappingURL=aiws_write-47c90e76.mjs.map
32729
+ //# sourceMappingURL=aiws_write-83ddc6cc.mjs.map