buckyos 0.7.131 → 0.7.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/cli/core/app.ts +8 -0
- package/cli/dist/cli.mjs +1360 -240
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/agent.ts +165 -0
- package/cli/modules/ai.ts +160 -0
- package/cli/modules/app.ts +86 -0
- package/cli/modules/log.ts +57 -5
- package/cli/modules/pikg.ts +14 -7
- package/cli/modules/pikg_archive.ts +83 -0
- package/cli/modules/pikg_protocol.ts +11 -1
- package/cli/modules/share.ts +356 -0
- package/cli/modules/skill.ts +256 -0
- package/cli/modules/system.ts +54 -15
- package/cli/runtime/host.ts +4 -0
- package/cli/version.ts +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +118 -110
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +118 -110
- package/dist/msg_center_client.d.ts +156 -5
- package/dist/msg_center_client.d.ts.map +1 -1
- package/dist/{ndm_proxy-a167f2a4.mjs → ndm_proxy-501cb1e8.mjs} +201 -109
- package/dist/ndm_proxy-501cb1e8.mjs.map +1 -0
- package/dist/ndm_proxy-68b8160c.js +13 -0
- package/dist/ndm_proxy-68b8160c.js.map +1 -0
- package/dist/nfsp.cjs +1 -1
- package/dist/nfsp.cjs.map +1 -1
- package/dist/nfsp.d.ts +300 -0
- package/dist/nfsp.d.ts.map +1 -1
- package/dist/nfsp.mjs +105 -0
- package/dist/nfsp.mjs.map +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +118 -110
- package/dist/sdk_core.d.ts +2 -2
- package/dist/sdk_core.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ndm_proxy-28e72ddf.js +0 -13
- package/dist/ndm_proxy-28e72ddf.js.map +0 -1
- package/dist/ndm_proxy-a167f2a4.mjs.map +0 -1
|
@@ -1765,6 +1765,25 @@ class MsgQueueClient {
|
|
|
1765
1765
|
return asNumber$2(result, "deleted_count");
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
+
const FRIEND_INTENT = "buckyos.friend";
|
|
1769
|
+
const CONTACT_TAG_ZONE_USER = "zone_user";
|
|
1770
|
+
const CONTACT_TAG_ZONE_AGENT = "zone_agent";
|
|
1771
|
+
const CONTACT_TAG_HOMESTATION_FOLLOWING = "homestation.following";
|
|
1772
|
+
const CONTACT_CHANGED_EVENT_BOX = "CONTACTS";
|
|
1773
|
+
const WELL_KNOWN_CONTACT_TAGS = [
|
|
1774
|
+
{ key: CONTACT_TAG_ZONE_USER, kind: "system", user_editable: false },
|
|
1775
|
+
{ key: CONTACT_TAG_ZONE_AGENT, kind: "system", user_editable: false },
|
|
1776
|
+
{ key: CONTACT_TAG_HOMESTATION_FOLLOWING, kind: "app", app: "homestation", user_editable: false }
|
|
1777
|
+
];
|
|
1778
|
+
function contactTagApp(tag) {
|
|
1779
|
+
const match = /^([a-z][a-z0-9_-]*)\.([a-z0-9_.-]+)$/.exec(tag);
|
|
1780
|
+
return match ? match[1] : null;
|
|
1781
|
+
}
|
|
1782
|
+
function contactTagKind(tag) {
|
|
1783
|
+
if (tag === CONTACT_TAG_ZONE_USER || tag === CONTACT_TAG_ZONE_AGENT)
|
|
1784
|
+
return "system";
|
|
1785
|
+
return contactTagApp(tag) ? "app" : "user";
|
|
1786
|
+
}
|
|
1768
1787
|
function mailboxAddress(owner, sessionId) {
|
|
1769
1788
|
if (!/^did:[^:]+:.+$/.test(owner) || /[\s\x00-\x1f\x7f-\x9f/\\?#*|]/.test(owner)) {
|
|
1770
1789
|
throw new RPCError("mailbox owner must be a bare DID");
|
|
@@ -2109,6 +2128,71 @@ class MsgCenterClient {
|
|
|
2109
2128
|
subscriber_count: record.subscriber_count
|
|
2110
2129
|
};
|
|
2111
2130
|
}
|
|
2131
|
+
/** Find people and groups for raw input: name, DID, BNS name or group invite link. */
|
|
2132
|
+
async lookup(req) {
|
|
2133
|
+
const result = asRecord$2(await this.call("contact.lookup", compact$1({ ...req })), "LookupResult");
|
|
2134
|
+
return {
|
|
2135
|
+
...result,
|
|
2136
|
+
candidates: Array.isArray(result.candidates) ? result.candidates : []
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2139
|
+
/** Add / remove tags; a user may only change user tags, an app only its own namespace. */
|
|
2140
|
+
async updateContactTags(did, change, contactMgrOwner) {
|
|
2141
|
+
const result = await this.call("contact.update_tags", compact$1({
|
|
2142
|
+
did,
|
|
2143
|
+
add: change.add,
|
|
2144
|
+
remove: change.remove,
|
|
2145
|
+
contact_mgr_owner: contactMgrOwner
|
|
2146
|
+
}));
|
|
2147
|
+
return asRecord$2(result, "Contact");
|
|
2148
|
+
}
|
|
2149
|
+
/** Delete the contact record (history stays); relations the system established are refused. */
|
|
2150
|
+
async removeContact(did, contactMgrOwner) {
|
|
2151
|
+
await this.call("contact.remove_contact", compact$1({ did, contact_mgr_owner: contactMgrOwner }));
|
|
2152
|
+
}
|
|
2153
|
+
async unblockContact(did, contactMgrOwner) {
|
|
2154
|
+
const result = await this.call("contact.unblock_contact", compact$1({ did, contact_mgr_owner: contactMgrOwner }));
|
|
2155
|
+
return asRecord$2(result, "Contact");
|
|
2156
|
+
}
|
|
2157
|
+
async sendFriendRequest(did, message, contactMgrOwner) {
|
|
2158
|
+
const result = await this.call("contact.send_friend_request", compact$1({
|
|
2159
|
+
did,
|
|
2160
|
+
message,
|
|
2161
|
+
contact_mgr_owner: contactMgrOwner
|
|
2162
|
+
}));
|
|
2163
|
+
return asRecord$2(result, "FriendRequestResult");
|
|
2164
|
+
}
|
|
2165
|
+
async respondFriendRequest(requestId, decision, contactMgrOwner) {
|
|
2166
|
+
const result = await this.call("contact.respond_friend_request", compact$1({
|
|
2167
|
+
request_id: requestId,
|
|
2168
|
+
decision,
|
|
2169
|
+
contact_mgr_owner: contactMgrOwner
|
|
2170
|
+
}));
|
|
2171
|
+
return asRecord$2(result, "FriendRequestResult");
|
|
2172
|
+
}
|
|
2173
|
+
async cancelFriendRequest(requestId, contactMgrOwner) {
|
|
2174
|
+
const result = await this.call("contact.cancel_friend_request", compact$1({
|
|
2175
|
+
request_id: requestId,
|
|
2176
|
+
contact_mgr_owner: contactMgrOwner
|
|
2177
|
+
}));
|
|
2178
|
+
return asRecord$2(result, "FriendRequestResult");
|
|
2179
|
+
}
|
|
2180
|
+
/** End the friendship; `notify` (default true) tells the peer. */
|
|
2181
|
+
async removeFriend(did, notify, contactMgrOwner) {
|
|
2182
|
+
const result = await this.call("contact.remove_friend", compact$1({
|
|
2183
|
+
did,
|
|
2184
|
+
notify,
|
|
2185
|
+
contact_mgr_owner: contactMgrOwner
|
|
2186
|
+
}));
|
|
2187
|
+
return asRecord$2(result, "FriendRequestResult");
|
|
2188
|
+
}
|
|
2189
|
+
async listFriendRequests(req = {}) {
|
|
2190
|
+
const result = asOptionalRecord(
|
|
2191
|
+
await this.call("contact.list_friend_requests", compact$1({ ...req })),
|
|
2192
|
+
"FriendRequestPage"
|
|
2193
|
+
);
|
|
2194
|
+
return result && Array.isArray(result.items) ? result.items : [];
|
|
2195
|
+
}
|
|
2112
2196
|
/** Notify a zone user (System Notify). */
|
|
2113
2197
|
async notifySend(req) {
|
|
2114
2198
|
return asNotifyView(await this.call("notify.send", compact$1({ ...req })));
|
|
@@ -28626,7 +28710,7 @@ const ndm_proxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
28626
28710
|
unpinOwner
|
|
28627
28711
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
28628
28712
|
export {
|
|
28629
|
-
|
|
28713
|
+
TASK_MANAGER_SERVICE_UNIQUE_ID as $,
|
|
28630
28714
|
notifyCategorySessionId as A,
|
|
28631
28715
|
BS_SERVICE_VERIFY_HUB as B,
|
|
28632
28716
|
notifyCategoryFromSessionId as C,
|
|
@@ -28642,119 +28726,127 @@ export {
|
|
|
28642
28726
|
MsgQueueClient as M,
|
|
28643
28727
|
NOTIFY_INTENT as N,
|
|
28644
28728
|
waitNotify as O,
|
|
28645
|
-
|
|
28646
|
-
|
|
28729
|
+
FRIEND_INTENT as P,
|
|
28730
|
+
CONTACT_TAG_ZONE_USER as Q,
|
|
28647
28731
|
RuntimeType as R,
|
|
28648
28732
|
SystemConfigClient as S,
|
|
28649
|
-
|
|
28650
|
-
|
|
28733
|
+
CONTACT_TAG_ZONE_AGENT as T,
|
|
28734
|
+
CONTACT_TAG_HOMESTATION_FOLLOWING as U,
|
|
28651
28735
|
VerifyHubClient as V,
|
|
28652
28736
|
WEB3_BRIDGE_HOST as W,
|
|
28653
|
-
|
|
28654
|
-
|
|
28655
|
-
|
|
28656
|
-
|
|
28737
|
+
CONTACT_CHANGED_EVENT_BOX as X,
|
|
28738
|
+
WELL_KNOWN_CONTACT_TAGS as Y,
|
|
28739
|
+
contactTagApp as Z,
|
|
28740
|
+
contactTagKind as _,
|
|
28657
28741
|
ndm_proxy as a,
|
|
28658
|
-
|
|
28659
|
-
|
|
28660
|
-
|
|
28661
|
-
|
|
28662
|
-
|
|
28663
|
-
|
|
28664
|
-
|
|
28665
|
-
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
|
|
28674
|
-
|
|
28675
|
-
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28680
|
-
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
28689
|
-
|
|
28690
|
-
|
|
28691
|
-
|
|
28692
|
-
|
|
28693
|
-
|
|
28694
|
-
|
|
28695
|
-
|
|
28696
|
-
|
|
28697
|
-
|
|
28698
|
-
|
|
28699
|
-
|
|
28700
|
-
|
|
28701
|
-
|
|
28702
|
-
|
|
28703
|
-
|
|
28704
|
-
|
|
28705
|
-
|
|
28706
|
-
|
|
28707
|
-
|
|
28708
|
-
|
|
28709
|
-
|
|
28710
|
-
|
|
28711
|
-
|
|
28712
|
-
|
|
28713
|
-
|
|
28714
|
-
|
|
28715
|
-
|
|
28716
|
-
|
|
28717
|
-
|
|
28718
|
-
|
|
28719
|
-
|
|
28720
|
-
|
|
28721
|
-
|
|
28742
|
+
WorkflowNodeRunState as a$,
|
|
28743
|
+
TASK_MANAGER_SERVICE_NAME as a0,
|
|
28744
|
+
TASK_MANAGER_SERVICE_PORT as a1,
|
|
28745
|
+
TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1 as a2,
|
|
28746
|
+
RAW_TASK_SCHEMA_ID as a3,
|
|
28747
|
+
HUMAN_APPROVAL_SCHEMA_ID as a4,
|
|
28748
|
+
DOWNLOAD_TASK_SCHEMA_ID as a5,
|
|
28749
|
+
SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID as a6,
|
|
28750
|
+
WORKFLOW_RUN_TREE_TASK_SCHEMA_ID as a7,
|
|
28751
|
+
WORKFLOW_STEP_TASK_SCHEMA_ID as a8,
|
|
28752
|
+
WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID as a9,
|
|
28753
|
+
TASK_ERR_IDEMPOTENCY_CONFLICT as aA,
|
|
28754
|
+
TASK_ERR_SCHEMA_NOT_FOUND as aB,
|
|
28755
|
+
TASK_MGR_ERROR_CODES as aC,
|
|
28756
|
+
taskMgrTaskEventPath as aD,
|
|
28757
|
+
taskMgrTreeEventPath as aE,
|
|
28758
|
+
taskMgrErrorCode as aF,
|
|
28759
|
+
TaskExecutorKind as aG,
|
|
28760
|
+
TaskPhase as aH,
|
|
28761
|
+
isTerminalTaskPhase as aI,
|
|
28762
|
+
TaskWaitReasonKind as aJ,
|
|
28763
|
+
TaskOutcome as aK,
|
|
28764
|
+
TaskControlAction as aL,
|
|
28765
|
+
baselineTaskControlProfile as aM,
|
|
28766
|
+
DEFAULT_CHILD_CONTROL_POLICY as aN,
|
|
28767
|
+
TaskAction as aO,
|
|
28768
|
+
TaskGrantScope as aP,
|
|
28769
|
+
TaskDataScope as aQ,
|
|
28770
|
+
StorageDomain as aR,
|
|
28771
|
+
TaskEventType as aS,
|
|
28772
|
+
TaskManagerClient as aT,
|
|
28773
|
+
WORKFLOW_SERVICE_NAME as aU,
|
|
28774
|
+
WorkflowStepType as aV,
|
|
28775
|
+
WorkflowOutputMode as aW,
|
|
28776
|
+
WorkflowJoinMode as aX,
|
|
28777
|
+
WorkflowRetryFallback as aY,
|
|
28778
|
+
WorkflowDefinitionStatus as aZ,
|
|
28779
|
+
WorkflowRunStatus as a_,
|
|
28780
|
+
WORKFLOW_THUNK_TASK_SCHEMA_ID as aa,
|
|
28781
|
+
WORKFLOW_SCHEDULE_TASK_SCHEMA_ID as ab,
|
|
28782
|
+
WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID as ac,
|
|
28783
|
+
WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID as ad,
|
|
28784
|
+
WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID as ae,
|
|
28785
|
+
AGENT_DELEGATE_TASK_SCHEMA_ID as af,
|
|
28786
|
+
HUMAN_INPUT_TASK_SCHEMA_ID as ag,
|
|
28787
|
+
OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID as ah,
|
|
28788
|
+
OPENDAN_COMMAND_TASK_SCHEMA_ID as ai,
|
|
28789
|
+
TOOL_EXEC_BASH_TASK_SCHEMA_ID as aj,
|
|
28790
|
+
AICC_COMPUTE_TASK_SCHEMA_ID as ak,
|
|
28791
|
+
APP_INSTALL_TASK_SCHEMA_ID as al,
|
|
28792
|
+
APP_UNINSTALL_TASK_SCHEMA_ID as am,
|
|
28793
|
+
APP_START_TASK_SCHEMA_ID as an,
|
|
28794
|
+
APP_UPDATE_TASK_SCHEMA_ID as ao,
|
|
28795
|
+
APP_UPDATE_BATCH_TASK_SCHEMA_ID as ap,
|
|
28796
|
+
TASK_ERR_NOT_FOUND as aq,
|
|
28797
|
+
TASK_ERR_PERMISSION_DENIED as ar,
|
|
28798
|
+
TASK_ERR_REVISION_CONFLICT as as,
|
|
28799
|
+
TASK_ERR_STALE_RUNNER_EPOCH as at,
|
|
28800
|
+
TASK_ERR_INVALID_PHASE as au,
|
|
28801
|
+
TASK_ERR_CONTROL_NOT_AVAILABLE as av,
|
|
28802
|
+
TASK_ERR_CONTROL_ALREADY_PENDING as aw,
|
|
28803
|
+
TASK_ERR_ALREADY_COMPLETED as ax,
|
|
28804
|
+
TASK_ERR_INPUT_SCHEMA_MISMATCH as ay,
|
|
28805
|
+
TASK_ERR_RESULT_SCHEMA_MISMATCH as az,
|
|
28722
28806
|
bns_client as b,
|
|
28723
|
-
|
|
28724
|
-
|
|
28725
|
-
|
|
28726
|
-
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
28734
|
-
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
28740
|
-
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
|
|
28744
|
-
|
|
28745
|
-
|
|
28746
|
-
|
|
28747
|
-
|
|
28748
|
-
|
|
28749
|
-
|
|
28750
|
-
|
|
28751
|
-
|
|
28752
|
-
|
|
28753
|
-
|
|
28754
|
-
|
|
28755
|
-
|
|
28756
|
-
|
|
28757
|
-
|
|
28807
|
+
WorkflowHumanActionKind as b0,
|
|
28808
|
+
WorkflowScheduledTaskStatus as b1,
|
|
28809
|
+
WorkflowScheduledTaskMisfirePolicy as b2,
|
|
28810
|
+
WorkflowScheduledTaskFireStatus as b3,
|
|
28811
|
+
WorkflowClient as b4,
|
|
28812
|
+
AICC_SERVICE_UNIQUE_ID as b5,
|
|
28813
|
+
AICC_SERVICE_SERVICE_NAME as b6,
|
|
28814
|
+
AICC_SERVICE_SERVICE_PORT as b7,
|
|
28815
|
+
AICC_AI_METHODS as b8,
|
|
28816
|
+
AICC_CORE_METHODS as b9,
|
|
28817
|
+
BNS_PUBLISH_DOCUMENT_ABI as bA,
|
|
28818
|
+
BnsEvmTxError as bB,
|
|
28819
|
+
BnsEvmTxBuilder as bC,
|
|
28820
|
+
decodeBnsPublishDocumentCalldata as bD,
|
|
28821
|
+
BnsTxExecutorError as bE,
|
|
28822
|
+
walletUserHasSnAccount as bF,
|
|
28823
|
+
BnsTxExecutor as bG,
|
|
28824
|
+
AICC_MANAGEMENT_METHODS as ba,
|
|
28825
|
+
AICC_METHODS as bb,
|
|
28826
|
+
AICC_FEATURES as bc,
|
|
28827
|
+
AICC_EXECUTION_MODES as bd,
|
|
28828
|
+
isAiccAiMethod as be,
|
|
28829
|
+
aiccTextMessage as bf,
|
|
28830
|
+
aiccMessageTextContent as bg,
|
|
28831
|
+
aiccMessageFirstText as bh,
|
|
28832
|
+
validateAiccMessage as bi,
|
|
28833
|
+
AiccClient as bj,
|
|
28834
|
+
decisionRequirements as bk,
|
|
28835
|
+
validateDecisionRequest as bl,
|
|
28836
|
+
validateDecisionAnswers as bm,
|
|
28837
|
+
KEventReader as bn,
|
|
28838
|
+
KEventClient as bo,
|
|
28839
|
+
appIdFromDid as bp,
|
|
28840
|
+
parseAppId as bq,
|
|
28841
|
+
appDidFromId as br,
|
|
28842
|
+
createAppInstanceId as bs,
|
|
28843
|
+
parseAppInstanceId as bt,
|
|
28844
|
+
BNS_EVM_DEFAULT_GAS_LIMIT as bu,
|
|
28845
|
+
BNS_EVM_DEFAULT_MAX_FEE_PER_GAS as bv,
|
|
28846
|
+
BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS as bw,
|
|
28847
|
+
BNS_MAX_INLINE_DOCUMENT_BYTES as bx,
|
|
28848
|
+
BNS_DNS_TXT_DEFAULT_TTL as by,
|
|
28849
|
+
BNS_DNS_TXT_DOC_TYPE as bz,
|
|
28758
28850
|
createSDKModule as c,
|
|
28759
28851
|
BS_SERVICE_TASK_MANAGER as d,
|
|
28760
28852
|
getActiveRuntimeType as e,
|
|
@@ -28780,4 +28872,4 @@ export {
|
|
|
28780
28872
|
NOTIFY_LINK_PATH as y,
|
|
28781
28873
|
isNotifyClosed as z
|
|
28782
28874
|
};
|
|
28783
|
-
//# sourceMappingURL=ndm_proxy-
|
|
28875
|
+
//# sourceMappingURL=ndm_proxy-501cb1e8.mjs.map
|