buckyos 0.7.124 → 0.7.126

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.
@@ -1764,6 +1764,22 @@ class MsgQueueClient {
1764
1764
  return asNumber$2(result, "deleted_count");
1765
1765
  }
1766
1766
  }
1767
+ function mailboxAddress(owner, sessionId) {
1768
+ if (!/^did:[^:]+:.+$/.test(owner) || /[\s\x00-\x1f\x7f-\x9f/\\?#*|]/.test(owner)) {
1769
+ throw new RPCError("mailbox owner must be a bare DID");
1770
+ }
1771
+ if (sessionId === void 0)
1772
+ return owner;
1773
+ if (!sessionId || sessionId.trim() !== sessionId || [...sessionId].length > 200 || sessionId === "." || sessionId === ".." || /[\x00-\x1f\x7f-\x9f]/.test(sessionId)) {
1774
+ throw new RPCError("invalid mailbox session_id");
1775
+ }
1776
+ const encoded = encodeURIComponent(sessionId).replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%3A/g, ":").replace(/%40/g, "@");
1777
+ return `${owner}/${encoded}`;
1778
+ }
1779
+ function mailboxResource(mailbox, kind) {
1780
+ const encoded = encodeURIComponent(mailbox).replace(/[!'()*.]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%2F/g, "/");
1781
+ return `obj://msg-center/${kind.toLowerCase()}/${encoded}`;
1782
+ }
1767
1783
  function compact$1(input) {
1768
1784
  const out = {};
1769
1785
  for (const [key, value] of Object.entries(input)) {
@@ -1822,6 +1838,12 @@ class MsgCenterClient {
1822
1838
  }));
1823
1839
  return asRecord$2(result, "PostSendResult");
1824
1840
  }
1841
+ async listMailboxes(owner, boxKind) {
1842
+ return asArrayOf(await this.call("msg.list_mailboxes", { owner, box_kind: boxKind }), "Vec<MailboxAddress>");
1843
+ }
1844
+ async moveRecord(recordId, mailbox) {
1845
+ return asRecord$2(await this.call("msg.move_record", { record_id: recordId, mailbox }), "MailboxRecord");
1846
+ }
1825
1847
  async getNext(req) {
1826
1848
  const result = await this.call("msg.get_next", compact$1({ ...req }));
1827
1849
  return asOptionalRecord(result, "MailboxRecordWithObject");
@@ -2058,66 +2080,6 @@ class MsgCenterClient {
2058
2080
  subscriber_count: record.subscriber_count
2059
2081
  };
2060
2082
  }
2061
- async groupCreate(req) {
2062
- return asRecord$2(await this.call("group.create", req), "GroupDoc");
2063
- }
2064
- async groupGetDoc(req) {
2065
- return asOptionalRecord(await this.call("group.get_doc", req), "GroupDoc");
2066
- }
2067
- async groupUpdateProfile(req) {
2068
- return asRecord$2(await this.call("group.update_profile", req), "GroupDoc");
2069
- }
2070
- async groupInviteMember(req) {
2071
- return asRecord$2(await this.call("group.invite_member", req), "GroupMemberRecord");
2072
- }
2073
- async groupSubmitMemberProof(req) {
2074
- return asRecord$2(await this.call("group.submit_member_proof", req), "GroupMemberRecord");
2075
- }
2076
- async groupRequestJoin(req) {
2077
- return asRecord$2(await this.call("group.request_join", req), "GroupMemberRecord");
2078
- }
2079
- async groupApproveMember(req) {
2080
- return asRecord$2(await this.call("group.approve_member", req), "GroupMemberRecord");
2081
- }
2082
- async groupRejectMember(req) {
2083
- return asRecord$2(await this.call("group.reject_member", req), "GroupMemberRecord");
2084
- }
2085
- async groupRemoveMember(req) {
2086
- return asRecord$2(await this.call("group.remove_member", req), "GroupMemberRecord");
2087
- }
2088
- async groupUpdateMemberRole(req) {
2089
- return asRecord$2(await this.call("group.update_member_role", req), "GroupMemberRecord");
2090
- }
2091
- async groupListMembers(req) {
2092
- return asArrayOf(await this.call("group.list_members", req), "Vec<GroupMemberRecord>");
2093
- }
2094
- async groupCreateSubgroup(req) {
2095
- return asRecord$2(await this.call("group.create_subgroup", req), "GroupSubgroup");
2096
- }
2097
- async groupUpdateSubgroup(req) {
2098
- return asRecord$2(await this.call("group.update_subgroup", req), "GroupSubgroup");
2099
- }
2100
- async groupListSubgroups(req) {
2101
- return asArrayOf(await this.call("group.list_subgroups", req), "Vec<GroupSubgroup>");
2102
- }
2103
- async groupUpdateCollectionPolicy(req) {
2104
- return asRecord$2(await this.call("group.update_collection_policy", req), "GroupDoc");
2105
- }
2106
- async groupUpdateAttributionPolicy(req) {
2107
- return asRecord$2(await this.call("group.update_attribution_policy", req), "GroupDoc");
2108
- }
2109
- async groupExpandMembers(req) {
2110
- return asRecord$2(await this.call("group.expand_members", req), "GroupExpansionSnapshot");
2111
- }
2112
- async groupListByMember(req) {
2113
- return asArrayOf(await this.call("group.list_by_member", req), "Vec<GroupSummary>");
2114
- }
2115
- async groupListParents(req) {
2116
- return asArrayOf(await this.call("group.list_parents", req), "Vec<GroupSummary>");
2117
- }
2118
- async groupCheckAccess(req) {
2119
- return asRecord$2(await this.call("group.check_access", req), "GroupAccessDecision");
2120
- }
2121
2083
  }
2122
2084
  function compact(input) {
2123
2085
  const out = {};
@@ -28417,111 +28379,113 @@ const ndm_proxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
28417
28379
  unpinOwner
28418
28380
  }, Symbol.toStringTag, { value: "Module" }));
28419
28381
  export {
28420
- TASK_ERR_CONTROL_NOT_AVAILABLE as $,
28421
- WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID as A,
28382
+ TASK_ERR_STALE_RUNNER_EPOCH as $,
28383
+ WORKFLOW_SCHEDULE_TASK_SCHEMA_ID as A,
28422
28384
  BS_SERVICE_VERIFY_HUB as B,
28423
- WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID as C,
28385
+ WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID as C,
28424
28386
  DOWNLOAD_TASK_SCHEMA_ID as D,
28425
- AGENT_DELEGATE_TASK_SCHEMA_ID as E,
28426
- HUMAN_INPUT_TASK_SCHEMA_ID as F,
28427
- OPENDAN_COMMAND_TASK_SCHEMA_ID as G,
28387
+ WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID as E,
28388
+ WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID as F,
28389
+ AGENT_DELEGATE_TASK_SCHEMA_ID as G,
28428
28390
  HUMAN_APPROVAL_SCHEMA_ID as H,
28429
- TOOL_EXEC_BASH_TASK_SCHEMA_ID as I,
28430
- AICC_COMPUTE_TASK_SCHEMA_ID as J,
28431
- APP_INSTALL_TASK_SCHEMA_ID as K,
28432
- APP_UNINSTALL_TASK_SCHEMA_ID as L,
28391
+ HUMAN_INPUT_TASK_SCHEMA_ID as I,
28392
+ OPENDAN_COMMAND_TASK_SCHEMA_ID as J,
28393
+ TOOL_EXEC_BASH_TASK_SCHEMA_ID as K,
28394
+ AICC_COMPUTE_TASK_SCHEMA_ID as L,
28433
28395
  MsgQueueClient as M,
28434
- APP_START_TASK_SCHEMA_ID as N,
28396
+ APP_INSTALL_TASK_SCHEMA_ID as N,
28435
28397
  OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID as O,
28436
- APP_UPDATE_TASK_SCHEMA_ID as P,
28437
- APP_UPDATE_BATCH_TASK_SCHEMA_ID as Q,
28398
+ APP_UNINSTALL_TASK_SCHEMA_ID as P,
28399
+ APP_START_TASK_SCHEMA_ID as Q,
28438
28400
  RuntimeType as R,
28439
28401
  SystemConfigClient as S,
28440
28402
  TASK_MANAGER_SERVICE_UNIQUE_ID as T,
28441
- TASK_ERR_NOT_FOUND as U,
28403
+ APP_UPDATE_TASK_SCHEMA_ID as U,
28442
28404
  VerifyHubClient as V,
28443
28405
  WEB3_BRIDGE_HOST as W,
28444
- TASK_ERR_PERMISSION_DENIED as X,
28445
- TASK_ERR_REVISION_CONFLICT as Y,
28446
- TASK_ERR_STALE_RUNNER_EPOCH as Z,
28447
- TASK_ERR_INVALID_PHASE as _,
28406
+ APP_UPDATE_BATCH_TASK_SCHEMA_ID as X,
28407
+ TASK_ERR_NOT_FOUND as Y,
28408
+ TASK_ERR_PERMISSION_DENIED as Z,
28409
+ TASK_ERR_REVISION_CONFLICT as _,
28448
28410
  ndm_proxy as a,
28449
- BNS_EVM_DEFAULT_MAX_FEE_PER_GAS as a$,
28450
- TASK_ERR_CONTROL_ALREADY_PENDING as a0,
28451
- TASK_ERR_ALREADY_COMPLETED as a1,
28452
- TASK_ERR_INPUT_SCHEMA_MISMATCH as a2,
28453
- TASK_ERR_RESULT_SCHEMA_MISMATCH as a3,
28454
- TASK_ERR_IDEMPOTENCY_CONFLICT as a4,
28455
- TASK_ERR_SCHEMA_NOT_FOUND as a5,
28456
- TASK_MGR_ERROR_CODES as a6,
28457
- taskMgrTaskEventPath as a7,
28458
- taskMgrTreeEventPath as a8,
28459
- taskMgrErrorCode as a9,
28460
- WorkflowClient as aA,
28461
- AICC_SERVICE_UNIQUE_ID as aB,
28462
- AICC_SERVICE_SERVICE_NAME as aC,
28463
- AICC_SERVICE_SERVICE_PORT as aD,
28464
- AICC_AI_METHODS as aE,
28465
- AICC_CORE_METHODS as aF,
28466
- AICC_MANAGEMENT_METHODS as aG,
28467
- AICC_METHODS as aH,
28468
- AICC_FEATURES as aI,
28469
- AICC_EXECUTION_MODES as aJ,
28470
- isAiccAiMethod as aK,
28471
- aiccTextMessage as aL,
28472
- aiccMessageTextContent as aM,
28473
- aiccMessageFirstText as aN,
28474
- validateAiccMessage as aO,
28475
- AiccClient as aP,
28476
- decisionRequirements as aQ,
28477
- validateDecisionRequest as aR,
28478
- validateDecisionAnswers as aS,
28479
- KEventReader as aT,
28480
- KEventClient as aU,
28481
- appIdFromDid as aV,
28482
- parseAppId as aW,
28483
- appDidFromId as aX,
28484
- createAppInstanceId as aY,
28485
- parseAppInstanceId as aZ,
28486
- BNS_EVM_DEFAULT_GAS_LIMIT as a_,
28487
- TaskExecutorKind as aa,
28488
- TaskPhase as ab,
28489
- isTerminalTaskPhase as ac,
28490
- TaskWaitReasonKind as ad,
28491
- TaskOutcome as ae,
28492
- TaskControlAction as af,
28493
- baselineTaskControlProfile as ag,
28494
- DEFAULT_CHILD_CONTROL_POLICY as ah,
28495
- TaskAction as ai,
28496
- TaskGrantScope as aj,
28497
- TaskDataScope as ak,
28498
- StorageDomain as al,
28499
- TaskEventType as am,
28500
- TaskManagerClient as an,
28501
- WORKFLOW_SERVICE_NAME as ao,
28502
- WorkflowStepType as ap,
28503
- WorkflowOutputMode as aq,
28504
- WorkflowJoinMode as ar,
28505
- WorkflowRetryFallback as as,
28506
- WorkflowDefinitionStatus as at,
28507
- WorkflowRunStatus as au,
28508
- WorkflowNodeRunState as av,
28509
- WorkflowHumanActionKind as aw,
28510
- WorkflowScheduledTaskStatus as ax,
28511
- WorkflowScheduledTaskMisfirePolicy as ay,
28512
- WorkflowScheduledTaskFireStatus as az,
28411
+ parseAppInstanceId as a$,
28412
+ TASK_ERR_INVALID_PHASE as a0,
28413
+ TASK_ERR_CONTROL_NOT_AVAILABLE as a1,
28414
+ TASK_ERR_CONTROL_ALREADY_PENDING as a2,
28415
+ TASK_ERR_ALREADY_COMPLETED as a3,
28416
+ TASK_ERR_INPUT_SCHEMA_MISMATCH as a4,
28417
+ TASK_ERR_RESULT_SCHEMA_MISMATCH as a5,
28418
+ TASK_ERR_IDEMPOTENCY_CONFLICT as a6,
28419
+ TASK_ERR_SCHEMA_NOT_FOUND as a7,
28420
+ TASK_MGR_ERROR_CODES as a8,
28421
+ taskMgrTaskEventPath as a9,
28422
+ WorkflowScheduledTaskMisfirePolicy as aA,
28423
+ WorkflowScheduledTaskFireStatus as aB,
28424
+ WorkflowClient as aC,
28425
+ AICC_SERVICE_UNIQUE_ID as aD,
28426
+ AICC_SERVICE_SERVICE_NAME as aE,
28427
+ AICC_SERVICE_SERVICE_PORT as aF,
28428
+ AICC_AI_METHODS as aG,
28429
+ AICC_CORE_METHODS as aH,
28430
+ AICC_MANAGEMENT_METHODS as aI,
28431
+ AICC_METHODS as aJ,
28432
+ AICC_FEATURES as aK,
28433
+ AICC_EXECUTION_MODES as aL,
28434
+ isAiccAiMethod as aM,
28435
+ aiccTextMessage as aN,
28436
+ aiccMessageTextContent as aO,
28437
+ aiccMessageFirstText as aP,
28438
+ validateAiccMessage as aQ,
28439
+ AiccClient as aR,
28440
+ decisionRequirements as aS,
28441
+ validateDecisionRequest as aT,
28442
+ validateDecisionAnswers as aU,
28443
+ KEventReader as aV,
28444
+ KEventClient as aW,
28445
+ appIdFromDid as aX,
28446
+ parseAppId as aY,
28447
+ appDidFromId as aZ,
28448
+ createAppInstanceId as a_,
28449
+ taskMgrTreeEventPath as aa,
28450
+ taskMgrErrorCode as ab,
28451
+ TaskExecutorKind as ac,
28452
+ TaskPhase as ad,
28453
+ isTerminalTaskPhase as ae,
28454
+ TaskWaitReasonKind as af,
28455
+ TaskOutcome as ag,
28456
+ TaskControlAction as ah,
28457
+ baselineTaskControlProfile as ai,
28458
+ DEFAULT_CHILD_CONTROL_POLICY as aj,
28459
+ TaskAction as ak,
28460
+ TaskGrantScope as al,
28461
+ TaskDataScope as am,
28462
+ StorageDomain as an,
28463
+ TaskEventType as ao,
28464
+ TaskManagerClient as ap,
28465
+ WORKFLOW_SERVICE_NAME as aq,
28466
+ WorkflowStepType as ar,
28467
+ WorkflowOutputMode as as,
28468
+ WorkflowJoinMode as at,
28469
+ WorkflowRetryFallback as au,
28470
+ WorkflowDefinitionStatus as av,
28471
+ WorkflowRunStatus as aw,
28472
+ WorkflowNodeRunState as ax,
28473
+ WorkflowHumanActionKind as ay,
28474
+ WorkflowScheduledTaskStatus as az,
28513
28475
  bns_client as b,
28514
- BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS as b0,
28515
- BNS_MAX_INLINE_DOCUMENT_BYTES as b1,
28516
- BNS_DNS_TXT_DEFAULT_TTL as b2,
28517
- BNS_DNS_TXT_DOC_TYPE as b3,
28518
- BNS_PUBLISH_DOCUMENT_ABI as b4,
28519
- BnsEvmTxError as b5,
28520
- BnsEvmTxBuilder as b6,
28521
- decodeBnsPublishDocumentCalldata as b7,
28522
- BnsTxExecutorError as b8,
28523
- walletUserHasSnAccount as b9,
28524
- BnsTxExecutor as ba,
28476
+ BNS_EVM_DEFAULT_GAS_LIMIT as b0,
28477
+ BNS_EVM_DEFAULT_MAX_FEE_PER_GAS as b1,
28478
+ BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS as b2,
28479
+ BNS_MAX_INLINE_DOCUMENT_BYTES as b3,
28480
+ BNS_DNS_TXT_DEFAULT_TTL as b4,
28481
+ BNS_DNS_TXT_DOC_TYPE as b5,
28482
+ BNS_PUBLISH_DOCUMENT_ABI as b6,
28483
+ BnsEvmTxError as b7,
28484
+ BnsEvmTxBuilder as b8,
28485
+ decodeBnsPublishDocumentCalldata as b9,
28486
+ BnsTxExecutorError as ba,
28487
+ walletUserHasSnAccount as bb,
28488
+ BnsTxExecutor as bc,
28525
28489
  createSDKModule as c,
28526
28490
  BS_SERVICE_TASK_MANAGER as d,
28527
28491
  getActiveRuntimeType as e,
@@ -28529,22 +28493,22 @@ export {
28529
28493
  getCurrentWalletUserFromHost as g,
28530
28494
  getActiveSessionToken as h,
28531
28495
  BuckyOSSDK as i,
28532
- MsgCenterClient as j,
28533
- RepoClient as k,
28534
- TASK_MANAGER_SERVICE_NAME as l,
28535
- TASK_MANAGER_SERVICE_PORT as m,
28496
+ RepoClient as j,
28497
+ MsgCenterClient as k,
28498
+ mailboxResource as l,
28499
+ mailboxAddress as m,
28536
28500
  ndm_client as n,
28537
- TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1 as o,
28501
+ TASK_MANAGER_SERVICE_NAME as o,
28538
28502
  parseSessionTokenClaims as p,
28539
- RAW_TASK_SCHEMA_ID as q,
28503
+ TASK_MANAGER_SERVICE_PORT as q,
28540
28504
  resolveDidFromHost as r,
28541
28505
  sn_client as s,
28542
- SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID as t,
28543
- WORKFLOW_RUN_TREE_TASK_SCHEMA_ID as u,
28544
- WORKFLOW_STEP_TASK_SCHEMA_ID as v,
28545
- WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID as w,
28546
- WORKFLOW_THUNK_TASK_SCHEMA_ID as x,
28547
- WORKFLOW_SCHEDULE_TASK_SCHEMA_ID as y,
28548
- WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID as z
28506
+ TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1 as t,
28507
+ RAW_TASK_SCHEMA_ID as u,
28508
+ SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID as v,
28509
+ WORKFLOW_RUN_TREE_TASK_SCHEMA_ID as w,
28510
+ WORKFLOW_STEP_TASK_SCHEMA_ID as x,
28511
+ WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID as y,
28512
+ WORKFLOW_THUNK_TASK_SCHEMA_ID as z
28549
28513
  };
28550
- //# sourceMappingURL=ndm_proxy-ebc5a1bf.mjs.map
28514
+ //# sourceMappingURL=ndm_proxy-54e7d13f.mjs.map