buckyos 0.7.169 → 0.7.175
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/cli/core/app.ts +2 -0
- package/cli/core/argv.ts +45 -239
- package/cli/core/command.ts +3 -35
- package/cli/dist/cli.mjs +2151 -673
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/agent.ts +3 -1
- package/cli/modules/app.ts +13 -2
- package/cli/modules/pikg.ts +70 -1
- package/cli/modules/runtime.ts +497 -0
- package/cli/modules/skill.ts +583 -161
- package/cli/modules/skill_lint.ts +462 -0
- package/cli/version.ts +1 -1
- package/dist/account-7a7bde6f.mjs +105 -0
- package/dist/account-7a7bde6f.mjs.map +1 -0
- package/dist/account-b12ac6b9.js +2 -0
- package/dist/account-b12ac6b9.js.map +1 -0
- package/dist/aicc-67851c41.mjs +582 -0
- package/dist/aicc-67851c41.mjs.map +1 -0
- package/dist/aicc-ccb36ef7.js +2 -0
- package/dist/aicc-ccb36ef7.js.map +1 -0
- package/dist/app-frame.cjs +1 -1
- package/dist/app-frame.cjs.map +1 -1
- package/dist/app-frame.mjs +1 -0
- package/dist/app-frame.mjs.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.ts +3 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.mjs +223 -212
- package/dist/browser.mjs.map +1 -1
- package/dist/content.cjs +1 -1
- package/dist/content.cjs.map +1 -1
- package/dist/content.d.ts +2 -1
- package/dist/content.d.ts.map +1 -1
- package/dist/content.mjs +32 -167
- package/dist/content.mjs.map +1 -1
- package/dist/content_mime-dc80d960.js +2 -0
- package/dist/content_mime-dc80d960.js.map +1 -0
- package/dist/content_mime-e42d5f8d.mjs +335 -0
- package/dist/content_mime-e42d5f8d.mjs.map +1 -0
- package/dist/content_mime.d.ts +18 -0
- package/dist/content_mime.d.ts.map +1 -1
- package/dist/did_object_client-6a1b108a.js +2 -0
- package/dist/did_object_client-6a1b108a.js.map +1 -0
- package/dist/did_object_client-7fa36f90.mjs +87 -0
- package/dist/did_object_client-7fa36f90.mjs.map +1 -0
- package/dist/did_object_client.d.ts +39 -0
- package/dist/did_object_client.d.ts.map +1 -0
- package/dist/{executor_client-a32bc377.mjs → executor_client-c620d25c.mjs} +1794 -844
- package/dist/executor_client-c620d25c.mjs.map +1 -0
- package/dist/executor_client-d4439d54.js +13 -0
- package/dist/executor_client-d4439d54.js.map +1 -0
- package/dist/executor_client.d.ts +129 -0
- package/dist/executor_client.d.ts.map +1 -1
- package/dist/file_meta.d.ts +26 -0
- package/dist/file_meta.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +228 -217
- package/dist/index.mjs.map +1 -1
- package/dist/internal/command_args.d.ts +67 -0
- package/dist/internal/command_args.d.ts.map +1 -0
- package/dist/krpc_client-26c2dc8b.js +2 -0
- package/dist/krpc_client-26c2dc8b.js.map +1 -0
- package/dist/krpc_client-673448e5.mjs +173 -0
- package/dist/krpc_client-673448e5.mjs.map +1 -0
- package/dist/krpc_client.d.ts +5 -1
- package/dist/krpc_client.d.ts.map +1 -1
- package/dist/msg_center_client.d.ts +2 -1
- package/dist/msg_center_client.d.ts.map +1 -1
- package/dist/namelib.d.ts.map +1 -1
- package/dist/ndm_client.d.ts +7 -0
- package/dist/ndm_client.d.ts.map +1 -1
- package/dist/ndn.d.ts +3 -0
- package/dist/ndn.d.ts.map +1 -0
- package/dist/{namelib-b41b10cc.mjs → ndn_types-0fac2499.mjs} +3096 -2816
- package/dist/ndn_types-0fac2499.mjs.map +1 -0
- package/dist/ndn_types-5b138882.js +2 -0
- package/dist/ndn_types-5b138882.js.map +1 -0
- package/dist/ndn_types.d.ts +268 -16
- package/dist/ndn_types.d.ts.map +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.mjs +220 -212
- package/dist/node.mjs.map +1 -1
- package/dist/object_url-8fb5a7bf.js +2 -0
- package/dist/object_url-8fb5a7bf.js.map +1 -0
- package/dist/object_url-f72c1704.mjs +412 -0
- package/dist/object_url-f72c1704.mjs.map +1 -0
- package/dist/openai-ae2978de.mjs +163 -0
- package/dist/openai-ae2978de.mjs.map +1 -0
- package/dist/openai-f560d518.js +2 -0
- package/dist/openai-f560d518.js.map +1 -0
- package/dist/provision.cjs +6 -6
- package/dist/provision.cjs.map +1 -1
- package/dist/provision.d.ts +1 -2
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.mjs +4 -31
- package/dist/provision.mjs.map +1 -1
- package/dist/repo_client.d.ts +2 -1
- package/dist/repo_client.d.ts.map +1 -1
- package/dist/site_manager-11a7a468.mjs +6410 -0
- package/dist/site_manager-11a7a468.mjs.map +1 -0
- package/dist/site_manager-334b1a51.js +2 -0
- package/dist/site_manager-334b1a51.js.map +1 -0
- package/dist/{tus_client-4f7254e9.js → tus_client-809c90ab.js} +2 -2
- package/dist/{tus_client-4f7254e9.js.map → tus_client-809c90ab.js.map} +1 -1
- package/dist/{tus_client-04080b1e.mjs → tus_client-893a3287.mjs} +2 -2
- package/dist/{tus_client-04080b1e.mjs.map → tus_client-893a3287.mjs.map} +1 -1
- package/dist/xllm/core/action_parser.d.ts +15 -0
- package/dist/xllm/core/action_parser.d.ts.map +1 -0
- package/dist/xllm/core/behavior_loop.d.ts +20 -0
- package/dist/xllm/core/behavior_loop.d.ts.map +1 -0
- package/dist/xllm/core/behavior_result.d.ts +11 -0
- package/dist/xllm/core/behavior_result.d.ts.map +1 -0
- package/dist/xllm/core/config.d.ts +62 -0
- package/dist/xllm/core/config.d.ts.map +1 -0
- package/dist/xllm/core/context_window.d.ts +15 -0
- package/dist/xllm/core/context_window.d.ts.map +1 -0
- package/dist/xllm/core/deps.d.ts +97 -0
- package/dist/xllm/core/deps.d.ts.map +1 -0
- package/dist/xllm/core/errors.d.ts +94 -0
- package/dist/xllm/core/errors.d.ts.map +1 -0
- package/dist/xllm/core/interrupt.d.ts +31 -0
- package/dist/xllm/core/interrupt.d.ts.map +1 -0
- package/dist/xllm/core/json.d.ts +11 -0
- package/dist/xllm/core/json.d.ts.map +1 -0
- package/dist/xllm/core/json_check.d.ts +17 -0
- package/dist/xllm/core/json_check.d.ts.map +1 -0
- package/dist/xllm/core/loop.d.ts +135 -0
- package/dist/xllm/core/loop.d.ts.map +1 -0
- package/dist/xllm/core/messages.d.ts +18 -0
- package/dist/xllm/core/messages.d.ts.map +1 -0
- package/dist/xllm/core/observer.d.ts +14 -0
- package/dist/xllm/core/observer.d.ts.map +1 -0
- package/dist/xllm/core/open_runtime.d.ts +22 -0
- package/dist/xllm/core/open_runtime.d.ts.map +1 -0
- package/dist/xllm/core/prepare.d.ts +54 -0
- package/dist/xllm/core/prepare.d.ts.map +1 -0
- package/dist/xllm/core/prompt.d.ts +40 -0
- package/dist/xllm/core/prompt.d.ts.map +1 -0
- package/dist/xllm/core/protocol.d.ts +15 -0
- package/dist/xllm/core/protocol.d.ts.map +1 -0
- package/dist/xllm/core/result.d.ts +12 -0
- package/dist/xllm/core/result.d.ts.map +1 -0
- package/dist/xllm/core/run.d.ts +198 -0
- package/dist/xllm/core/run.d.ts.map +1 -0
- package/dist/xllm/core/rust_text.d.ts +20 -0
- package/dist/xllm/core/rust_text.d.ts.map +1 -0
- package/dist/xllm/core/site_policy.d.ts +5 -0
- package/dist/xllm/core/site_policy.d.ts.map +1 -0
- package/dist/xllm/core/store.d.ts +60 -0
- package/dist/xllm/core/store.d.ts.map +1 -0
- package/dist/xllm/core/suspension.d.ts +13 -0
- package/dist/xllm/core/suspension.d.ts.map +1 -0
- package/dist/xllm/core/tokenizer.d.ts +8 -0
- package/dist/xllm/core/tokenizer.d.ts.map +1 -0
- package/dist/xllm/core/types.d.ts +826 -0
- package/dist/xllm/core/types.d.ts.map +1 -0
- package/dist/xllm/core/xml.d.ts +19 -0
- package/dist/xllm/core/xml.d.ts.map +1 -0
- package/dist/xllm/dev/openai.d.ts +17 -0
- package/dist/xllm/dev/openai.d.ts.map +1 -0
- package/dist/xllm/dev/scripted.d.ts +46 -0
- package/dist/xllm/dev/scripted.d.ts.map +1 -0
- package/dist/xllm/dev.d.ts +5 -0
- package/dist/xllm/dev.d.ts.map +1 -0
- package/dist/xllm/hosts/browser/store.d.ts +41 -0
- package/dist/xllm/hosts/browser/store.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/deno_api.d.ts +103 -0
- package/dist/xllm/hosts/deno/deno_api.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/identity.d.ts +29 -0
- package/dist/xllm/hosts/deno/identity.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/index.d.ts +47 -0
- package/dist/xllm/hosts/deno/index.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/native_runtime.d.ts +93 -0
- package/dist/xllm/hosts/deno/native_runtime.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/native_tools.d.ts +105 -0
- package/dist/xllm/hosts/deno/native_tools.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/provider.d.ts +13 -0
- package/dist/xllm/hosts/deno/provider.d.ts.map +1 -0
- package/dist/xllm/hosts/deno/store.d.ts +60 -0
- package/dist/xllm/hosts/deno/store.d.ts.map +1 -0
- package/dist/xllm/index.d.ts +48 -0
- package/dist/xllm/index.d.ts.map +1 -0
- package/dist/xllm/providers/aicc.d.ts +22 -0
- package/dist/xllm/providers/aicc.d.ts.map +1 -0
- package/dist/xllm/providers/timeout.d.ts +12 -0
- package/dist/xllm/providers/timeout.d.ts.map +1 -0
- package/dist/xllm/runtime/compress.d.ts +149 -0
- package/dist/xllm/runtime/compress.d.ts.map +1 -0
- package/dist/xllm/runtime/did_object_resources.d.ts +21 -0
- package/dist/xllm/runtime/did_object_resources.d.ts.map +1 -0
- package/dist/xllm/runtime/hints.d.ts +23 -0
- package/dist/xllm/runtime/hints.d.ts.map +1 -0
- package/dist/xllm/runtime/site.d.ts +22 -0
- package/dist/xllm/runtime/site.d.ts.map +1 -0
- package/dist/xllm/runtime/site_manager.d.ts +38 -0
- package/dist/xllm/runtime/site_manager.d.ts.map +1 -0
- package/dist/xllm/runtime/site_tools.d.ts +76 -0
- package/dist/xllm/runtime/site_tools.d.ts.map +1 -0
- package/dist/xllm/runtime/step_renderer.d.ts +54 -0
- package/dist/xllm/runtime/step_renderer.d.ts.map +1 -0
- package/dist/xllm/runtime/task_model.d.ts +64 -0
- package/dist/xllm/runtime/task_model.d.ts.map +1 -0
- package/dist/xllm/runtime/tool_result.d.ts +39 -0
- package/dist/xllm/runtime/tool_result.d.ts.map +1 -0
- package/dist/xllm/runtime/types.d.ts +99 -0
- package/dist/xllm/runtime/types.d.ts.map +1 -0
- package/dist/xllm.cjs +2 -0
- package/dist/xllm.cjs.map +1 -0
- package/dist/xllm.mjs +1167 -0
- package/dist/xllm.mjs.map +1 -0
- package/dist/xllm_deno.cjs +2 -0
- package/dist/xllm_deno.cjs.map +1 -0
- package/dist/xllm_deno.mjs +2487 -0
- package/dist/xllm_deno.mjs.map +1 -0
- package/dist/xllm_dev.cjs +2 -0
- package/dist/xllm_dev.cjs.map +1 -0
- package/dist/xllm_dev.mjs +70 -0
- package/dist/xllm_dev.mjs.map +1 -0
- package/package.json +22 -1
- package/src/internal/command_args.ts +268 -0
- package/dist/executor_client-a32bc377.mjs.map +0 -1
- package/dist/executor_client-e026942b.js +0 -13
- package/dist/executor_client-e026942b.js.map +0 -1
- package/dist/namelib-b41b10cc.mjs.map +0 -1
- package/dist/namelib-f8ff0045.js +0 -2
- package/dist/namelib-f8ff0045.js.map +0 -1
package/dist/node.mjs
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { c as createSDKModule } from "./executor_client-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { c as createSDKModule } from "./executor_client-c620d25c.mjs";
|
|
2
|
+
import { a9, aL, bG, aQ, bH, bM, bL, bI, bK, bN, bJ, bE, bF, bD, ac, aR, am, al, an, ao, aT, aS, aV, aU, bU, cc, cd, c8, c9, ca, cb, ce, f, B, cg, cf, ck, ci, k, co, cn, cm, cl, a1, a0, $, _, bh, ag, a8, aB, E, cp, cs, cq, Y, aA, aM, ah, c2, c1, q, M, A, C, y, w, v, N, D, x, z, aN, aO, az, l, R, aC, bl, S, b1, b0, a$, b4, b2, a_, aW, aX, b3, aY, b5, aZ, aw, ax, av, b6, ay, aP, bi, bf, bk, bm, ba, bj, bn, be, bb, bd, a4, a3, V, W, a2, aJ, aF, aK, aD, aH, aI, bo, aE, aG, bC, bv, bp, by, bt, bx, bs, bq, bu, bw, bB, bA, bz, br, Z, ab, bS, bR, bO, bQ, U, c5, c3, bg, b, e, ak, T, au, a5, a6, c6, bV, ch, cr, h, j, i, g, af, ae, I, bP, o, F, bc, a7, aq, ap, at, t, u, P, a, d, n, ai, K, H, G, Q, O, aa, c4, c7, ar, ad, p, bY, m, J, as, r, s, b9, b7, b8, bT, bX, bW, L, b$, b_, bZ, c0, X, cj, aj } from "./executor_client-c620d25c.mjs";
|
|
3
|
+
import { h as h2 } from "./account-7a7bde6f.mjs";
|
|
4
|
+
import { a as a10, D as D2, N as N2, r as r2, q as q2, g as g2, j as j2, f as f2, c, e as e2, b as b10, d as d2, k as k2, h as h3, i as i2, n as n2, o as o2, m as m2, l as l2, p as p2 } from "./ndn_types-0fac2499.mjs";
|
|
5
|
+
import { o as o3 } from "./object_url-f72c1704.mjs";
|
|
4
6
|
import { AIWS_BUILD_STATE_FILE, AIWS_COMPONENT_FILE, AIWS_COMPOSITION_FILE, AIWS_DECLARATIVE_API_VERSION, AIWS_HTML_API_VERSION, AIWS_MANIFEST_FILE, AIWS_MANIFEST_VERSION, AIWS_MAX_INLINE_BYTES, AIWS_MAX_SOURCE_FILES, AIWS_TEMPLATE_FORMAT, AiwsSourceError, aiwsContentDigest, aiwsTemplateDigest, buildControl, buildFiles, checkComponent, checkComposition, checkDeclarative, collectSources, compatManifest, controlSkeleton, createControlSource, ensureFolder, exportBundle, findFolder, folderName, hasControlSource, homeControlDir, homeExportDir, isSourcePath, joinPath, packBuildFiles, pullControl, readBuildState, slotCells, sourceStateKey, sourcesDigest, sourcesKey, templateDir, unbuiltChanges, verifyBundle, watchControl, writeBuildState, writeHomeFile, writeSourceFile } from "./aiws_ext.mjs";
|
|
5
7
|
import { NfspClient } from "./nfsp.mjs";
|
|
8
|
+
import { R as R2 } from "./krpc_client-673448e5.mjs";
|
|
9
|
+
import "./content_mime-e42d5f8d.mjs";
|
|
6
10
|
const sdkModule = createSDKModule("node");
|
|
7
11
|
const buckyos = sdkModule.buckyos;
|
|
8
12
|
const initBuckyOS = sdkModule.initBuckyOS;
|
|
@@ -39,20 +43,20 @@ const getSystemConfigClient = sdkModule.getSystemConfigClient;
|
|
|
39
43
|
const getTaskManagerClient = sdkModule.getTaskManagerClient;
|
|
40
44
|
const getWorkflowClient = sdkModule.getWorkflowClient;
|
|
41
45
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
a9 as ACCESS_DENIED_ERROR_CODE,
|
|
47
|
+
aL as AGENT_DELEGATE_TASK_SCHEMA_ID,
|
|
48
|
+
bG as AICC_AI_METHODS,
|
|
49
|
+
aQ as AICC_COMPUTE_TASK_SCHEMA_ID,
|
|
50
|
+
bH as AICC_CORE_METHODS,
|
|
51
|
+
bM as AICC_EXECUTION_MODES,
|
|
52
|
+
bL as AICC_FEATURES,
|
|
53
|
+
bI as AICC_MANAGEMENT_METHODS,
|
|
54
|
+
bK as AICC_METHODS,
|
|
55
|
+
bN as AICC_POLICY_REFUSAL_CODES,
|
|
56
|
+
bJ as AICC_QUOTA_METHODS,
|
|
57
|
+
bE as AICC_SERVICE_SERVICE_NAME,
|
|
58
|
+
bF as AICC_SERVICE_SERVICE_PORT,
|
|
59
|
+
bD as AICC_SERVICE_UNIQUE_ID,
|
|
56
60
|
AIWS_BUILD_STATE_FILE,
|
|
57
61
|
AIWS_COMPONENT_FILE,
|
|
58
62
|
AIWS_COMPOSITION_FILE,
|
|
@@ -63,175 +67,179 @@ export {
|
|
|
63
67
|
AIWS_MAX_INLINE_BYTES,
|
|
64
68
|
AIWS_MAX_SOURCE_FILES,
|
|
65
69
|
AIWS_TEMPLATE_FORMAT,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
ac as ANONYMOUS_IDENTITY,
|
|
71
|
+
aR as APP_INSTALL_TASK_SCHEMA_ID,
|
|
72
|
+
am as APP_LOGIN_EXCHANGE_METHOD,
|
|
73
|
+
al as APP_LOGIN_ISSUE_METHOD,
|
|
74
|
+
an as APP_LOGIN_SETTINGS_GET_METHOD,
|
|
75
|
+
ao as APP_LOGIN_SETTINGS_SET_METHOD,
|
|
76
|
+
aT as APP_START_TASK_SCHEMA_ID,
|
|
77
|
+
aS as APP_UNINSTALL_TASK_SCHEMA_ID,
|
|
78
|
+
aV as APP_UPDATE_BATCH_TASK_SCHEMA_ID,
|
|
79
|
+
aU as APP_UPDATE_TASK_SCHEMA_ID,
|
|
80
|
+
bU as AiccClient,
|
|
77
81
|
AiwsSourceError,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
cc as BNS_DNS_TXT_DEFAULT_TTL,
|
|
83
|
+
cd as BNS_DNS_TXT_DOC_TYPE,
|
|
84
|
+
c8 as BNS_EVM_DEFAULT_GAS_LIMIT,
|
|
85
|
+
c9 as BNS_EVM_DEFAULT_MAX_FEE_PER_GAS,
|
|
86
|
+
ca as BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS,
|
|
87
|
+
cb as BNS_MAX_INLINE_DOCUMENT_BYTES,
|
|
88
|
+
ce as BNS_PUBLISH_DOCUMENT_ABI,
|
|
89
|
+
f as BS_SERVICE_TASK_MANAGER,
|
|
86
90
|
B as BS_SERVICE_VERIFY_HUB,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
cg as BnsEvmTxBuilder,
|
|
92
|
+
cf as BnsEvmTxError,
|
|
93
|
+
ck as BnsTxExecutor,
|
|
94
|
+
ci as BnsTxExecutorError,
|
|
95
|
+
k as BuckyOSSDK,
|
|
96
|
+
co as COMPUTER_ELEMENT_ACTIONS,
|
|
97
|
+
cn as COMPUTER_ELEMENT_STATES,
|
|
98
|
+
cm as COMPUTER_ROLES,
|
|
99
|
+
cl as COMPUTER_SEMANTIC_FORMAT,
|
|
100
|
+
a1 as CONTACT_CHANGED_EVENT_PATTERN,
|
|
101
|
+
a0 as CONTACT_TAG_HOMESTATION_FOLLOWING,
|
|
102
|
+
$ as CONTACT_TAG_ZONE_AGENT,
|
|
103
|
+
_ as CONTACT_TAG_ZONE_USER,
|
|
104
|
+
bh as DEFAULT_CHILD_CONTROL_POLICY,
|
|
105
|
+
ag as DEFAULT_JUMP_BASE_URL,
|
|
106
|
+
a8 as DENY_REASONS,
|
|
107
|
+
a10 as DID_OBJECT_SERVICE_ID,
|
|
100
108
|
D2 as DID_OBJECT_SERVICE_TYPE,
|
|
101
|
-
|
|
109
|
+
aB as DOWNLOAD_TASK_SCHEMA_ID,
|
|
102
110
|
E as EXTERNAL_PRINCIPAL_CLAIM,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
cp as ExecutorClient,
|
|
112
|
+
cs as ExecutorCommandStream,
|
|
113
|
+
cq as ExecutorStreamError,
|
|
114
|
+
Y as FRIEND_INTENT,
|
|
115
|
+
aA as HUMAN_APPROVAL_SCHEMA_ID,
|
|
116
|
+
aM as HUMAN_INPUT_TASK_SCHEMA_ID,
|
|
117
|
+
ah as JUMP_ACTION_PATHS,
|
|
118
|
+
c2 as KEventClient,
|
|
119
|
+
c1 as KEventReader,
|
|
120
|
+
q as MsgCenterClient,
|
|
113
121
|
M as MsgQueueClient,
|
|
114
122
|
N2 as NODE_IDENTITY_SCHEMA_V2,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
123
|
+
A as NOTIFY_ACTION_ANSWER,
|
|
124
|
+
C as NOTIFY_ACTION_DISMISS,
|
|
125
|
+
y as NOTIFY_CHOICE_CONTROL_ID,
|
|
126
|
+
w as NOTIFY_DATA_VERSION,
|
|
127
|
+
v as NOTIFY_DELIVERED_INTENT,
|
|
120
128
|
N as NOTIFY_INTENT,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
129
|
+
D as NOTIFY_LINK_PATH,
|
|
130
|
+
x as NOTIFY_SESSION_PREFIX,
|
|
131
|
+
z as NOTIFY_TEXT_CONTROL_ID,
|
|
124
132
|
NfspClient,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
133
|
+
aN as OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID,
|
|
134
|
+
aO as OPENDAN_COMMAND_TASK_SCHEMA_ID,
|
|
135
|
+
az as RAW_TASK_SCHEMA_ID,
|
|
136
|
+
R2 as RPCError,
|
|
137
|
+
l as RepoClient,
|
|
130
138
|
R as RuntimeType,
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
aC as SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID,
|
|
140
|
+
bl as StorageDomain,
|
|
133
141
|
S as SystemConfigClient,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
142
|
+
b1 as TASK_ERR_ALREADY_COMPLETED,
|
|
143
|
+
b0 as TASK_ERR_CONTROL_ALREADY_PENDING,
|
|
144
|
+
a$ as TASK_ERR_CONTROL_NOT_AVAILABLE,
|
|
145
|
+
b4 as TASK_ERR_IDEMPOTENCY_CONFLICT,
|
|
146
|
+
b2 as TASK_ERR_INPUT_SCHEMA_MISMATCH,
|
|
147
|
+
a_ as TASK_ERR_INVALID_PHASE,
|
|
148
|
+
aW as TASK_ERR_NOT_FOUND,
|
|
149
|
+
aX as TASK_ERR_PERMISSION_DENIED,
|
|
150
|
+
b3 as TASK_ERR_RESULT_SCHEMA_MISMATCH,
|
|
151
|
+
aY as TASK_ERR_REVISION_CONFLICT,
|
|
152
|
+
b5 as TASK_ERR_SCHEMA_NOT_FOUND,
|
|
153
|
+
aZ as TASK_ERR_STALE_RUNNER_EPOCH,
|
|
154
|
+
aw as TASK_MANAGER_SERVICE_NAME,
|
|
155
|
+
ax as TASK_MANAGER_SERVICE_PORT,
|
|
156
|
+
av as TASK_MANAGER_SERVICE_UNIQUE_ID,
|
|
157
|
+
b6 as TASK_MGR_ERROR_CODES,
|
|
158
|
+
ay as TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1,
|
|
159
|
+
aP as TOOL_EXEC_BASH_TASK_SCHEMA_ID,
|
|
160
|
+
bi as TaskAction,
|
|
161
|
+
bf as TaskControlAction,
|
|
162
|
+
bk as TaskDataScope,
|
|
163
|
+
bm as TaskEventType,
|
|
164
|
+
ba as TaskExecutorKind,
|
|
165
|
+
bj as TaskGrantScope,
|
|
166
|
+
bn as TaskManagerClient,
|
|
167
|
+
be as TaskOutcome,
|
|
168
|
+
bb as TaskPhase,
|
|
169
|
+
bd as TaskWaitReasonKind,
|
|
170
|
+
a4 as USER_GROUP_REF_PREFIX,
|
|
171
|
+
a3 as USER_TYPE_GROUP_REF_PREFIX,
|
|
164
172
|
V as VerifyHubClient,
|
|
165
173
|
W as WEB3_BRIDGE_HOST,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
174
|
+
a2 as WELL_KNOWN_CONTACT_TAGS,
|
|
175
|
+
aJ as WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID,
|
|
176
|
+
aF as WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID,
|
|
177
|
+
aK as WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID,
|
|
178
|
+
aD as WORKFLOW_RUN_TREE_TASK_SCHEMA_ID,
|
|
179
|
+
aH as WORKFLOW_SCHEDULE_TASK_SCHEMA_ID,
|
|
180
|
+
aI as WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID,
|
|
181
|
+
bo as WORKFLOW_SERVICE_NAME,
|
|
182
|
+
aE as WORKFLOW_STEP_TASK_SCHEMA_ID,
|
|
183
|
+
aG as WORKFLOW_THUNK_TASK_SCHEMA_ID,
|
|
184
|
+
bC as WorkflowClient,
|
|
185
|
+
bv as WorkflowDefinitionStatus,
|
|
186
|
+
bp as WorkflowErrorCode,
|
|
187
|
+
by as WorkflowHumanActionKind,
|
|
188
|
+
bt as WorkflowJoinMode,
|
|
189
|
+
bx as WorkflowNodeRunState,
|
|
190
|
+
bs as WorkflowOutputMode,
|
|
191
|
+
bq as WorkflowRequestError,
|
|
192
|
+
bu as WorkflowRetryFallback,
|
|
193
|
+
bw as WorkflowRunStatus,
|
|
194
|
+
bB as WorkflowScheduledTaskFireStatus,
|
|
195
|
+
bA as WorkflowScheduledTaskMisfirePolicy,
|
|
196
|
+
bz as WorkflowScheduledTaskStatus,
|
|
197
|
+
br as WorkflowStepType,
|
|
190
198
|
Z as ZONE_USER_TYPES,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
ab as accessDenialOf,
|
|
200
|
+
bS as aiccMessageFirstText,
|
|
201
|
+
bR as aiccMessageTextContent,
|
|
202
|
+
bO as aiccRefusalOf,
|
|
203
|
+
bQ as aiccTextMessage,
|
|
196
204
|
aiwsContentDigest,
|
|
197
205
|
aiwsTemplateDigest,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
206
|
+
U as answerNotify,
|
|
207
|
+
c5 as appDidFromId,
|
|
208
|
+
c3 as appIdFromDid,
|
|
201
209
|
attachEvent,
|
|
202
|
-
|
|
210
|
+
bg as baselineTaskControlProfile,
|
|
203
211
|
b as bns,
|
|
204
|
-
|
|
212
|
+
e as bucket,
|
|
205
213
|
buckyos,
|
|
206
214
|
buildControl,
|
|
207
215
|
buildFiles,
|
|
208
|
-
|
|
216
|
+
ak as buildJumpUrl,
|
|
209
217
|
checkComponent,
|
|
210
218
|
checkComposition,
|
|
211
219
|
checkDeclarative,
|
|
212
220
|
collectSources,
|
|
213
|
-
|
|
221
|
+
T as commitNotifyAnswer,
|
|
214
222
|
compatManifest,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
223
|
+
au as completeAppAccessTokenLogin,
|
|
224
|
+
a5 as contactTagApp,
|
|
225
|
+
a6 as contactTagKind,
|
|
218
226
|
controlSkeleton,
|
|
219
|
-
|
|
227
|
+
c6 as createAppInstanceId,
|
|
220
228
|
createControlSource,
|
|
221
229
|
createEventReader,
|
|
222
230
|
createSDKModule,
|
|
223
231
|
create_event_reader,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
232
|
+
bV as decisionRequirements,
|
|
233
|
+
ch as decodeBnsPublishDocumentCalldata,
|
|
234
|
+
cr as encodeExecutorControl,
|
|
227
235
|
ensureFolder,
|
|
228
236
|
exportBundle,
|
|
229
237
|
findFolder,
|
|
230
238
|
folderName,
|
|
231
239
|
getAccountInfo,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
240
|
+
h as getActiveRuntimeType,
|
|
241
|
+
j as getActiveSessionToken,
|
|
242
|
+
i as getActiveZoneGatewayOrigin,
|
|
235
243
|
getAppDataDir,
|
|
236
244
|
getAppDid,
|
|
237
245
|
getAppId,
|
|
@@ -241,8 +249,8 @@ export {
|
|
|
241
249
|
getCurrentIdentity,
|
|
242
250
|
getCurrentWalletUser,
|
|
243
251
|
g as getCurrentWalletUserFromHost,
|
|
244
|
-
|
|
245
|
-
|
|
252
|
+
r2 as getDidIdentifier,
|
|
253
|
+
q2 as getDidMethod,
|
|
246
254
|
getKEventClient,
|
|
247
255
|
getRuntimeType,
|
|
248
256
|
getServiceRpcClient,
|
|
@@ -256,66 +264,66 @@ export {
|
|
|
256
264
|
h2 as hashPassword,
|
|
257
265
|
homeControlDir,
|
|
258
266
|
homeExportDir,
|
|
259
|
-
|
|
260
|
-
|
|
267
|
+
af as identityAllows,
|
|
268
|
+
ae as identityKey,
|
|
261
269
|
initBuckyOS,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
I as inputPrompt,
|
|
271
|
+
bP as isAiccAiMethod,
|
|
272
|
+
g2 as isBuckyOSAgentDocument,
|
|
273
|
+
j2 as isBuckyOSDIDObjectCard,
|
|
274
|
+
f2 as isBuckyOSDeviceDocument,
|
|
275
|
+
c as isBuckyOSDeviceMiniDocument,
|
|
276
|
+
e2 as isBuckyOSLocalNodeIdentityConfig,
|
|
277
|
+
b10 as isBuckyOSOwnerDocument,
|
|
278
|
+
d2 as isBuckyOSZoneBootDocument,
|
|
279
|
+
k2 as isBuckyOSZoneConfig,
|
|
280
|
+
h3 as isBuckyOSZoneDocument,
|
|
281
|
+
o as isExternalPrincipal,
|
|
282
|
+
F as isNotifyClosed,
|
|
275
283
|
isSourcePath,
|
|
276
|
-
|
|
277
|
-
|
|
284
|
+
bc as isTerminalTaskPhase,
|
|
285
|
+
a7 as isUserGroupRefTag,
|
|
278
286
|
i2 as isW3CDIDDocumentBase,
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
aq as issueAppCustomerLink,
|
|
288
|
+
ap as issueAppLoginCode,
|
|
281
289
|
joinPath,
|
|
282
290
|
login,
|
|
283
|
-
|
|
291
|
+
at as loginByAppAccessToken,
|
|
284
292
|
loginByBrowserSSO,
|
|
285
293
|
loginByPassword,
|
|
286
294
|
loginByRuntimeSession,
|
|
287
295
|
logout,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
296
|
+
t as mailboxAddress,
|
|
297
|
+
u as mailboxResource,
|
|
298
|
+
P as msgMachineData,
|
|
291
299
|
n2 as namelib,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
a as ndm,
|
|
301
|
+
d as ndm_proxy,
|
|
302
|
+
n as ndn,
|
|
303
|
+
ai as normalizeZoneHostname,
|
|
304
|
+
K as notifyAnswerToTaskResult,
|
|
305
|
+
H as notifyCategoryFromSessionId,
|
|
306
|
+
G as notifyCategorySessionId,
|
|
307
|
+
Q as notifyMessageData,
|
|
308
|
+
O as notifyUrl,
|
|
309
|
+
o3 as objectUrl,
|
|
302
310
|
openExternalUrl,
|
|
303
311
|
packBuildFiles,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
+
aa as parseAccessDenial,
|
|
313
|
+
c4 as parseAppId,
|
|
314
|
+
c7 as parseAppInstanceId,
|
|
315
|
+
ar as parseAppLoginExchangeResult,
|
|
316
|
+
o2 as parseBuckyOSDIDDocument,
|
|
317
|
+
m2 as parseBuckyOSDeviceMiniDocument,
|
|
318
|
+
l2 as parseBuckyOSOwnerDocument,
|
|
319
|
+
ad as parseCurrentIdentity,
|
|
312
320
|
p as parseSessionTokenClaims,
|
|
313
|
-
|
|
321
|
+
bY as parseVideoPrompt,
|
|
314
322
|
p2 as parseW3CDIDDocumentBase,
|
|
315
|
-
|
|
316
|
-
|
|
323
|
+
m as parseZoneUserType,
|
|
324
|
+
J as promptOptions,
|
|
317
325
|
pullControl,
|
|
318
|
-
|
|
326
|
+
as as randomAppLoginNonce,
|
|
319
327
|
readBuildState,
|
|
320
328
|
removeEvent,
|
|
321
329
|
r as resolveDidFromHost,
|
|
@@ -327,27 +335,27 @@ export {
|
|
|
327
335
|
sourcesDigest,
|
|
328
336
|
sourcesKey,
|
|
329
337
|
subscribeKEvent,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
338
|
+
b9 as taskMgrErrorCode,
|
|
339
|
+
b7 as taskMgrTaskEventPath,
|
|
340
|
+
b8 as taskMgrTreeEventPath,
|
|
333
341
|
templateDir,
|
|
334
342
|
unbuiltChanges,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
343
|
+
bT as validateAiccMessage,
|
|
344
|
+
bX as validateDecisionAnswers,
|
|
345
|
+
bW as validateDecisionRequest,
|
|
346
|
+
L as validateNotifyAnswer,
|
|
347
|
+
b$ as validateVideoEdit,
|
|
348
|
+
b_ as validateVideoGeneration,
|
|
349
|
+
bZ as validateVideoOutput,
|
|
342
350
|
verifyBundle,
|
|
343
|
-
|
|
344
|
-
|
|
351
|
+
c0 as videoGenerationRequirement,
|
|
352
|
+
X as waitNotify,
|
|
345
353
|
walletSignWithActiveDid,
|
|
346
|
-
|
|
354
|
+
cj as walletUserHasSnAccount,
|
|
347
355
|
watchControl,
|
|
348
356
|
writeBuildState,
|
|
349
357
|
writeHomeFile,
|
|
350
358
|
writeSourceFile,
|
|
351
|
-
|
|
359
|
+
aj as zoneActionUrl
|
|
352
360
|
};
|
|
353
361
|
//# sourceMappingURL=node.mjs.map
|
package/dist/node.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.mjs","sources":["../src/node.ts"],"sourcesContent":["import { createSDKModule } from './sdk_core'\nimport { hashPassword } from './account'\n\nconst sdkModule = createSDKModule('node')\n\nexport const buckyos = sdkModule.buckyos\nexport const initBuckyOS = sdkModule.initBuckyOS\nexport const getBuckyOSConfig = sdkModule.getBuckyOSConfig\nexport const getRuntimeType = sdkModule.getRuntimeType\nexport const getAppId = sdkModule.getAppId\nexport const getAppDid = sdkModule.getAppDid\nexport const getAppInstanceId = sdkModule.getAppInstanceId\nexport const getAppDataDir = sdkModule.getAppDataDir\nexport const getKEventClient = sdkModule.getKEventClient\nexport const createEventReader = sdkModule.createEventReader\nexport const create_event_reader = sdkModule.create_event_reader\nexport const subscribeKEvent = sdkModule.subscribeKEvent\nexport const attachEvent = sdkModule.attachEvent\nexport const removeEvent = sdkModule.removeEvent\nexport const getAccountInfo = sdkModule.getAccountInfo\nexport const getCurrentIdentity = sdkModule.getCurrentIdentity\nexport const loginByPassword = sdkModule.loginByPassword\nexport const loginByBrowserSSO = sdkModule.loginByBrowserSSO\nexport const loginByRuntimeSession = sdkModule.loginByRuntimeSession\nexport const login = sdkModule.login\nexport const logout = sdkModule.logout\nexport const getAppSetting = sdkModule.getAppSetting\nexport const setAppSetting = sdkModule.setAppSetting\nexport const getCurrentWalletUser = sdkModule.getCurrentWalletUser\nexport const resolve_did = sdkModule.resolve_did\nexport const walletSignWithActiveDid = sdkModule.walletSignWithActiveDid\nexport const openExternalUrl = sdkModule.openExternalUrl\nexport const getZoneHostName = sdkModule.getZoneHostName\nexport const getZoneServiceURL = sdkModule.getZoneServiceURL\nexport const getServiceRpcClient = sdkModule.getServiceRpcClient\nexport const getVerifyHubClient = sdkModule.getVerifyHubClient\nexport const getSystemConfigClient = sdkModule.getSystemConfigClient\nexport const getTaskManagerClient = sdkModule.getTaskManagerClient\nexport const getWorkflowClient = sdkModule.getWorkflowClient\n\nexport { hashPassword }\nexport * from './sdk_core'\nexport * from './types'\nexport * from './app_identity'\nexport * as namelib from './namelib'\nexport * as bns from './bns_client'\nexport * from './bns_evm_tx'\nexport * from './bns_tx_executor'\nexport * as sn from './sn_client'\nexport * as ndn from './
|
|
1
|
+
{"version":3,"file":"node.mjs","sources":["../src/node.ts"],"sourcesContent":["import { createSDKModule } from './sdk_core'\nimport { hashPassword } from './account'\n\nconst sdkModule = createSDKModule('node')\n\nexport const buckyos = sdkModule.buckyos\nexport const initBuckyOS = sdkModule.initBuckyOS\nexport const getBuckyOSConfig = sdkModule.getBuckyOSConfig\nexport const getRuntimeType = sdkModule.getRuntimeType\nexport const getAppId = sdkModule.getAppId\nexport const getAppDid = sdkModule.getAppDid\nexport const getAppInstanceId = sdkModule.getAppInstanceId\nexport const getAppDataDir = sdkModule.getAppDataDir\nexport const getKEventClient = sdkModule.getKEventClient\nexport const createEventReader = sdkModule.createEventReader\nexport const create_event_reader = sdkModule.create_event_reader\nexport const subscribeKEvent = sdkModule.subscribeKEvent\nexport const attachEvent = sdkModule.attachEvent\nexport const removeEvent = sdkModule.removeEvent\nexport const getAccountInfo = sdkModule.getAccountInfo\nexport const getCurrentIdentity = sdkModule.getCurrentIdentity\nexport const loginByPassword = sdkModule.loginByPassword\nexport const loginByBrowserSSO = sdkModule.loginByBrowserSSO\nexport const loginByRuntimeSession = sdkModule.loginByRuntimeSession\nexport const login = sdkModule.login\nexport const logout = sdkModule.logout\nexport const getAppSetting = sdkModule.getAppSetting\nexport const setAppSetting = sdkModule.setAppSetting\nexport const getCurrentWalletUser = sdkModule.getCurrentWalletUser\nexport const resolve_did = sdkModule.resolve_did\nexport const walletSignWithActiveDid = sdkModule.walletSignWithActiveDid\nexport const openExternalUrl = sdkModule.openExternalUrl\nexport const getZoneHostName = sdkModule.getZoneHostName\nexport const getZoneServiceURL = sdkModule.getZoneServiceURL\nexport const getServiceRpcClient = sdkModule.getServiceRpcClient\nexport const getVerifyHubClient = sdkModule.getVerifyHubClient\nexport const getSystemConfigClient = sdkModule.getSystemConfigClient\nexport const getTaskManagerClient = sdkModule.getTaskManagerClient\nexport const getWorkflowClient = sdkModule.getWorkflowClient\n\nexport { hashPassword }\nexport * from './sdk_core'\nexport * from './types'\nexport * from './app_identity'\nexport * as namelib from './namelib'\nexport * as bns from './bns_client'\nexport * from './bns_evm_tx'\nexport * from './bns_tx_executor'\nexport * as sn from './sn_client'\nexport * as ndn from './ndn'\nexport * as ndm from './ndm_client'\nexport * as ndm_proxy from './ndm_proxy'\nexport * as bucket from './bucket_client'\nexport * as objectUrl from './object_url'\n\nexport * from './executor_client'\nexport * from './aiws_ext'\nexport { NfspClient } from './nfsp'\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,YAAY,gBAAgB,MAAM;AAEjC,MAAM,UAAU,UAAU;AAC1B,MAAM,cAAc,UAAU;AAC9B,MAAM,mBAAmB,UAAU;AACnC,MAAM,iBAAiB,UAAU;AACjC,MAAM,WAAW,UAAU;AAC3B,MAAM,YAAY,UAAU;AAC5B,MAAM,mBAAmB,UAAU;AACnC,MAAM,gBAAgB,UAAU;AAChC,MAAM,kBAAkB,UAAU;AAClC,MAAM,oBAAoB,UAAU;AACpC,MAAM,sBAAsB,UAAU;AACtC,MAAM,kBAAkB,UAAU;AAClC,MAAM,cAAc,UAAU;AAC9B,MAAM,cAAc,UAAU;AAC9B,MAAM,iBAAiB,UAAU;AACjC,MAAM,qBAAqB,UAAU;AACrC,MAAM,kBAAkB,UAAU;AAClC,MAAM,oBAAoB,UAAU;AACpC,MAAM,wBAAwB,UAAU;AACxC,MAAM,QAAQ,UAAU;AACxB,MAAM,SAAS,UAAU;AACzB,MAAM,gBAAgB,UAAU;AAChC,MAAM,gBAAgB,UAAU;AAChC,MAAM,uBAAuB,UAAU;AACvC,MAAM,cAAc,UAAU;AAC9B,MAAM,0BAA0B,UAAU;AAC1C,MAAM,kBAAkB,UAAU;AAClC,MAAM,kBAAkB,UAAU;AAClC,MAAM,oBAAoB,UAAU;AACpC,MAAM,sBAAsB,UAAU;AACtC,MAAM,qBAAqB,UAAU;AACrC,MAAM,wBAAwB,UAAU;AACxC,MAAM,uBAAuB,UAAU;AACvC,MAAM,oBAAoB,UAAU;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./ndn_types-5b138882.js"),t=["config","dfs","taskmgr","kmsg","bucket","ndm","msg-center","aiworkspace","homestation","opendan","aicc"],n="/obj";class r extends Error{}function o(e){return t.includes(e)}function i(e){const t=(e=e.trim()).indexOf("://");if(t<0)throw new r(`'${e}' has no scheme`);const n=e.slice(0,t).toLowerCase(),o=e.slice(t+3);switch(n){case"https":case"http":try{return{kind:"web",url:new URL(e).toString()}}catch(i){throw new r(`invalid web url '${e}': ${i}`)}case"buckyos":return{kind:"buckyos",url:e};case"file":{const{authority:e,path:t,query:n}=g(o);if(null!==n)throw new r("file url does not take query or fragment");const i=e.toLowerCase();let s;if(""===i||"localhost"===i)s=null;else{if(!x(i))throw new r(`invalid device id '${i}' in file url`);s=i}if(""===t)throw new r("file url requires an absolute path");return{kind:"file",deviceId:s,path:k(t,!1)}}case"cyfs":{const{authority:e,path:t,query:n}=g(o);if(null!==n)throw new r("cyfs url does not take query or fragment");const i=e.toLowerCase();if(""===i||"_"===i){if(""===t)throw new r("cyfs path url requires a path");return{kind:"cyfs_path",zone:null,path:k(t,!1)}}const s=i.indexOf("."),c=s<0?i:i.slice(0,s),a=s<0?null:i.slice(s+1),u=_(c);if(u){if(null!==a&&!x(a))throw new r(`invalid source zone '${a}'`);return{kind:"cyfs_object",objId:u,sourceZone:a,innerPath:""===t||"/"===t?"":k(t,!1)}}if(!x(i)||!i.includes("."))throw new r(`'${i}' is neither a zone host nor an ObjId`);if(""===t)throw new r("cyfs path url requires a path");return{kind:"cyfs_path",zone:i,path:k(t,!1)}}case"obj":{const{authority:e,path:t,query:n}=g(o);return{kind:"obj",host:s(e.toLowerCase()),path:""===t||"/"===t?"":k(t,!0),query:null===n?{}:O(n)}}default:throw new r(`unsupported scheme '${n}'`)}}function s(e){if(""===e)throw new r("obj url requires a host");if(o(e))return{kind:"service",name:e};if(!e.includes("."))throw new r(`'${e}' is not a registered obj:// service name; type shorthands are not supported`);if(!x(e))throw new r(`'${e}' is not a valid entity hostname`);const t=e.split(".")[0];if(o(t))throw new r(`'${e}' expands a service name; write obj://${t}/ for the current zone or use https across zones`);if(_(t))throw new r("NamedObject ids do not go into obj:// host; use cyfs://<objid>/");return{kind:"entity",name:e}}function c(e){switch(e.kind){case"file":return`file://${e.deviceId??""}${e.path}`;case"cyfs_path":return`cyfs://${e.zone??""}${e.path}`;case"cyfs_object":return`cyfs://${e.objId.toBase32()}${e.sourceZone?`.${e.sourceZone}`:""}${e.innerPath||"/"}`;case"obj":{const t=Object.keys(e.query).sort().map((t=>`${j(t)}=${j(e.query[t])}`)).join("&");return`obj://${e.host.name}${e.path}${t?`?${t}`:""}`}case"web":case"buckyos":return e.url}}function a(e,t,n){const r=t.replace(/\/+$/,"");if("obj"===e.kind)return`${r}/kapi/${e.host.name}/obj${c(e).slice(`obj://${e.host.name}`.length)}`;if("cyfs_path"===e.kind&&(null===e.zone||e.zone===n))return`${r}/kapi/dfs/obj${e.path.replace(/\/+$/,"")}`;if("cyfs_object"===e.kind){const t=e.sourceZone&&e.sourceZone!==n?`https://${e.sourceZone}`:r,o=e.innerPath.replace(/^\/+|\/+$/g,"");return`${t}/ndn/${e.objId.toString()}${o?`/@/${o}`:""}`}return"web"===e.kind?e.url:null}function u(e){return c(i(e))}function l(e){return"obj"===e.kind?v(e.path):[]}function f(e){if(""!==e&&/^[A-Za-z0-9_-]+$/.test(e)&&!e.startsWith("x"))return e;let t="x";for(const n of(new TextEncoder).encode(e))t+=n.toString(16).padStart(2,"0");return t}function h(e,t,n){return`${d(e,t)}/${n}`}function d(e,t){return[n,f(e),...t.map(f)].join("/")}function p(e,t){return`obj://${e}${t.map((e=>`/${$(e)}`)).join("")}`}function b(e){if(Array.isArray(e))return`[${e.map(b).join(",")}]`;if(null!==e&&"object"==typeof e){return`{${Object.keys(e).sort().map((t=>`${JSON.stringify(t)}:${b(e[t])}`)).join(",")}}`}return JSON.stringify(e)}function $(e){return w(e,(e=>y(e)||"!$&'()*+,;=:@".includes(String.fromCharCode(e))))}function j(e){return w(e,(e=>y(e)||"!$'()*,;:@/".includes(String.fromCharCode(e))))}function w(e,t){let n="";for(const r of(new TextEncoder).encode(e))n+=t(r)?String.fromCharCode(r):`%${r.toString(16).toUpperCase().padStart(2,"0")}`;return n}function y(e){const t=String.fromCharCode(e);return/[A-Za-z0-9]/.test(t)||"-._~".includes(t)}function m(e,t){return d(e.name,v(t))}function g(e){const t=e.search(/[?#]/),n=t<0?e:e.slice(0,t);let r=null;if(t>=0){const n=e.slice(t).split("#")[0];r=n.startsWith("?")?n.slice(1):n,""===r&&(r=null)}const o=n.indexOf("/");return o<0?{authority:n,path:"",query:r}:{authority:n.slice(0,o),path:n.slice(o),query:r}}function k(e,t){if(!e.startsWith("/"))throw new r(`path '${e}' must be absolute`);let n=e.slice(1);t&&n.endsWith("/")&&(n=n.slice(0,-1));const o=n.split("/");let i="";return o.forEach(((n,s)=>{if(""===n&&s===o.length-1&&!t)return void(i+="/");const c=S(n);if(""===c||"."===c||".."===c)throw new r(`ambiguous path segment in '${e}'`);i+=`/${$(c)}`})),i}function v(e){return e.split("/").filter((e=>""!==e)).map((e=>{try{return S(e)}catch{return e}}))}function O(e){const t={};for(const o of e.split("&")){if(""===o)continue;const e=o.indexOf("="),i=S((e<0?o:o.slice(0,e)).replace(/\+/g," "));let s=S((e<0?"":o.slice(e+1)).replace(/\+/g," "));if("selector"===i)try{s=b(JSON.parse(s))}catch(n){throw new r(`selector must be JSON: ${n}`)}if(Object.prototype.hasOwnProperty.call(t,i))throw new r(`query key '${i}' repeats`);t[i]=s}return t}function S(e){const t=(new TextEncoder).encode(e),n=[];for(let o=0;o<t.length;)if(37===t[o]){const i=String.fromCharCode(t[o+1]??0,t[o+2]??0);if(!/^[0-9A-Fa-f]{2}$/.test(i))throw new r(`invalid escape in '${e}'`);n.push(parseInt(i,16)),o+=3}else n.push(t[o]),o+=1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(new Uint8Array(n))}catch{throw new r(`'${e}' is not UTF-8`)}}function x(e){return""!==e&&e.length<=253&&e.split(".").every((e=>""!==e&&e.length<=63&&/^[a-z0-9-]+$/.test(e)&&!e.startsWith("-")&&!e.endsWith("-")))}function _(t){if(t.length<26)return null;try{const n=e.ObjId.fromString(t);return/^[a-z0-9_-]+$/.test(n.objType)&&n.objHash.length>=16&&n.toBase32()===t?n:null}catch{return null}}const E=Object.freeze(Object.defineProperty({__proto__:null,OBJECT_EVENT_PREFIX:n,OBJ_SERVICE_NAMES:t,ObjectUrlError:r,canonicalJson:b,configKeyFromUrl:function(e){let t=e.startsWith("obj://config/")?e.slice(13):e;return t.startsWith("/config/")&&(t=t.slice(8)),t.replace(/^[/\\]+/,"")},encodeObjQueryComponent:j,encodeObjSegment:$,expandInputShorthand:function(e){if((e=e.trim()).startsWith("//")){const t=e.slice(2);return o(t.split(/[/?]/)[0]??"")?`obj://${t}`:e}return e.startsWith("/")?`file://${e}`:e},formatObjectUrl:c,isObjServiceName:o,keventSegment:f,ndnReadUrl:function(e,t,n){const r=`${e.replace(/\/+$/,"")}/ndn/${t}`;return!n||void 0===n.path&&void 0===n.token?r:`${r}?hint=${encodeURIComponent(b(n))}`},normalizeObjectUrl:u,objEntityUrl:function(e,t){return`obj://${e}${t.map((e=>`/${$(e)}`)).join("")}`},objEventKey:h,objEventPattern:function(e,t){return`${d(e,t)}/**`},objServiceUrl:p,objectDid:function(e,t,n){if("obj"!==e.kind)return null;const r=e.path.split("/").filter((e=>""!==e)).map((e=>e.replace(/:/g,"%3A"))),o="service"===e.host.kind?t:n??`did:web:${e.host.name}`,i="service"===e.host.kind?[e.host.name,...r]:r;return i.length?`${o}:${i.join(":")}`:o},objectEndpoint:a,objectEventKey:function(e,t){if("obj"!==e.kind)throw new r("object events are only defined for obj:// urls");if(!/^[A-Za-z0-9_-]+$/.test(t)||t.startsWith("x"))throw new r(`invalid object event name '${t}'`);const n=`${m(e.host,e.path)}/${t}`;if(n.length>256||n.split("/").length-1>8)throw new r(`object event key too long: ${n}`);return n},objectEventPattern:function(e){if("obj"!==e.kind)throw new r("object events are only defined for obj:// urls");return`${m(e.host,e.path)}/**`},objectSegments:l,parseObjHost:s,parseObjectUrl:i,rbacResourceKey:function(e,t){if("obj"===e.kind)return`obj://${e.host.name}${e.path}`;if("cyfs_path"===e.kind){return null===e.zone||void 0!==t&&e.zone===t.toLowerCase()?`obj://dfs${e.path}`:null}return null}},Symbol.toStringTag,{value:"Module"}));exports.ObjectUrlError=r,exports.canonicalJson=b,exports.encodeObjQueryComponent=j,exports.normalizeObjectUrl=u,exports.objEventKey=h,exports.objServiceUrl=p,exports.objectEndpoint=a,exports.objectSegments=l,exports.object_url=E,exports.parseObjectUrl=i;
|
|
2
|
+
//# sourceMappingURL=object_url-8fb5a7bf.js.map
|