buckyos 0.7.170 → 0.7.177
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/aiworkspace_client.d.ts +36 -2
- package/dist/aiworkspace_client.d.ts.map +1 -1
- package/dist/app-frame.cjs +1 -1
- package/dist/app-frame.cjs.map +1 -1
- package/dist/app-frame.d.ts +56 -1
- package/dist/app-frame.d.ts.map +1 -1
- package/dist/app-frame.mjs +285 -4
- 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 +4 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.mjs +218 -194
- 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 +77 -0
- package/dist/content.d.ts.map +1 -1
- package/dist/content.mjs +65 -0
- package/dist/content.mjs.map +1 -1
- package/dist/content_objid-1aff74b6.js +2 -0
- package/dist/content_objid-1aff74b6.js.map +1 -0
- package/dist/content_objid-9232bcaf.mjs +29 -0
- package/dist/content_objid-9232bcaf.mjs.map +1 -0
- package/dist/content_objid.d.ts +15 -0
- package/dist/content_objid.d.ts.map +1 -0
- 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-7ce0ddc7.js +13 -0
- package/dist/executor_client-7ce0ddc7.js.map +1 -0
- package/dist/{executor_client-5f4d0468.mjs → executor_client-bfc8a1e1.mjs} +308 -752
- package/dist/executor_client-bfc8a1e1.mjs.map +1 -0
- package/dist/executor_client.d.ts +129 -0
- package/dist/executor_client.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +218 -199
- 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/{ndn_types-ab30fac0.mjs → ndn_types-0fac2499.mjs} +115 -215
- 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/node.cjs +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.mjs +201 -194
- 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.mjs +4 -3
- package/dist/provision.mjs.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-b231b248.js → tus_client-809c90ab.js} +2 -2
- package/dist/{tus_client-b231b248.js.map → tus_client-809c90ab.js.map} +1 -1
- package/dist/{tus_client-d1ffe2d6.mjs → tus_client-893a3287.mjs} +2 -2
- package/dist/{tus_client-d1ffe2d6.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-1ee523cf.js +0 -13
- package/dist/executor_client-1ee523cf.js.map +0 -1
- package/dist/executor_client-5f4d0468.mjs.map +0 -1
- package/dist/ndn_types-8c2696d5.js +0 -2
- package/dist/ndn_types-8c2696d5.js.map +0 -1
- package/dist/ndn_types-ab30fac0.mjs.map +0 -1
|
@@ -35,167 +35,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
35
35
|
return method;
|
|
36
36
|
};
|
|
37
37
|
var _listener, _listeners, _cancelled, _allowInsecure, _gzip, _headers, _method, _timeout, _url, _body, _bodyType, _creds, _preflight, _process, _retry, _signal, _throttle, _getUrlFunc, _send, send_fn, _statusCode, _statusMessage, _headers2, _body2, _request, _error, _names, _data, _dataLength, _writeData, writeData_fn, _data2, _offset, _bytesRead, _parent, _maxInflation, _incrementBytesRead, incrementBytesRead_fn, _peekBytes, peekBytes_fn, _a, _r, _s, _v, _networkV, _privateKey, _options, _type, _to, _data3, _nonce, _gasLimit, _gasPrice, _maxPriorityFeePerGas, _maxFeePerGas, _value, _chainId, _sig, _accessList, _maxFeePerBlobGas, _blobVersionedHashes, _kzg, _blobs, _auths, _blobWrapperVersion, _getSerialized, getSerialized_fn, _types, _fullTypes, _encoderCache, _getEncoder, getEncoder_fn, _offset2, _tokens, _subTokenString, subTokenString_fn, _walkAsync, walkAsync_fn, _getCoder, getCoder_fn, _errors, _events, _functions, _abiCoder, _getFunction, getFunction_fn, _getEvent, getEvent_fn, _transactions, _logs, _startBlock, _iface, _iface2, _filter, _b, _supports2544, _resolver, _fetch, fetch_fn, _getResolver, getResolver_fn, _url2, _processFunc, _name, _chainId2, _plugins, _provider, _poller, _interval, _blockNumber, _poll, poll_fn, _provider2, _poll2, _running, _tag, _lastBlock, _filter2, _hash, _provider3, _filter3, _poller2, _running2, _blockNumber2, _poll3, poll_fn2, _subs, _plugins2, _pausedState, _destroyed, _networkPromise, _anyNetwork, _performCache, _lastBlockNumber, _nextTimer, _timers, _disableCcipRead, _requestRate, _requestTimes, _options2, _getDelay, getDelay_fn, _perform, perform_fn, _call, call_fn, _checkNetwork, checkNetwork_fn, _getAccountValue, getAccountValue_fn, _getBlock, getBlock_fn, _hasSub, hasSub_fn, _getSub, getSub_fn, _throwUnsupported, throwUnsupported_fn, _provider4, _filterIdPromise, _poller3, _running3, _network, _hault, _poll4, poll_fn3, _teardown, teardown_fn, _event, _options3, _nextId, _payloads, _drainTimer, _notReady, _network2, _pendingDetectNetwork, _scheduleDrain, scheduleDrain_fn, _pollingInterval, _connect, _signingKey, _data4, _checksum, _words, _loadWords, loadWords_fn, _account, account_fn, _fromSeed, fromSeed_fn, _fromAccount, fromAccount_fn;
|
|
38
|
-
import {
|
|
38
|
+
import { R as RPCError, k as kRPCClient } from "./krpc_client-673448e5.mjs";
|
|
39
|
+
import { s as DID, N as NODE_IDENTITY_SCHEMA_V2, e as isBuckyOSLocalNodeIdentityConfig, l as parseBuckyOSOwnerDocument, t as canonicalize, u as signJwtEdDSA, F as FileObject, A as ACTION_TYPE_DOWNLOAD, v as ACTION_TYPE_INSTALLED, w as ACTION_TYPE_LIKED, x as ACTION_TYPE_PURCHASED, y as ACTION_TYPE_SHARED, z as ACTION_TYPE_UNLIKED, B as ACTION_TYPE_VIEWED, C as BaseContentObject, E as CYFS_CONTENT_TYPE_NAMED_OBJECT_JSON, G as CYFS_CONTENT_TYPE_NAMED_OBJECT_JWT, H as ChunkId, I as ChunkType, J as DEFAULT_HASH_METHOD, K as DirObject, L as HashMethod, M as InclusionProof, O as KnownStandardObject, P as MSG_OBJECT_RESERVED_KEYS, Q as MSG_REACTION_KEY_MAX_BYTES, R as MSG_SESSION_ID_MAX_CHARS, S as NamedObjectBase, T as NdnError, U as OBJ_TYPE_ACTION, V as OBJ_TYPE_CHUNK_LIST, W as OBJ_TYPE_DIR, X as OBJ_TYPE_FILE, Y as OBJ_TYPE_INCLUSION_PROOF, Z as OBJ_TYPE_LIST, _ as OBJ_TYPE_MSG, $ as OBJ_TYPE_OBJMAP, a0 as OBJ_TYPE_PACK, a1 as OBJ_TYPE_PATH, a2 as OBJ_TYPE_PKG, a3 as OBJ_TYPE_RECEIPT, a4 as OBJ_TYPE_RELATION, a5 as ObjId, a6 as PathObject, a7 as RELATION_TYPE_PART_OF, a8 as RELATION_TYPE_SAME, a9 as RelationObject, aa as SimpleChunkList, ab as SimpleMapItem, ac as SimpleObjectMap, ad as actionObjectFromJson, ae as base32Decode, af as base32Encode, ag as buildNamedObjectByJson, ah as buildNamedObjectByJwt, ai as buildObjId, aj as bytesToHex$2, ak as calcPkgMetaObjId, al as canonicalizeJson, am as decodeMsgObjectJwt, an as extractObjIdByPath, ao as hexToBytes$1, ap as isCyfsNamedObjectContentType, aq as isValidMsgSessionId, ar as loadNamedObj, as as loadNamedObjAndVerify, at as loadNamedObjectFromObjStr, au as msgJwtKidDid, av as msgObjectFromJsonChecked, aw as namedObjectEncodingFromContentType, ax as normalizePackageMetaForObjId, ay as randomMsgNonce, az as receiptObjFromJson, aA as sha256Bytes, aB as sha256Utf8, aC as toCanonicalJsonString, aD as validateMsgObject, aE as varintDecode, aF as varintEncode, aG as verifyMsgObjectJwt, aH as verifyNamedObject, aI as verifyNamedObjectFromJwt, aJ as verifyNamedObjectFromStr } from "./ndn_types-0fac2499.mjs";
|
|
39
40
|
import { s as sniffMagic, m as mediaTypeFromExtension, e as extensionOf, a as stripMediaTypeParams, h as heifImageSize, i as isoBoxes } from "./content_mime-e42d5f8d.mjs";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
super(message);
|
|
43
|
-
this.name = "RPCError";
|
|
44
|
-
this.code = code;
|
|
45
|
-
this.data = data;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const defaultFetcher$1 = async (input, init2) => {
|
|
49
|
-
if (typeof window !== "undefined" && typeof window.fetch === "function") {
|
|
50
|
-
return window.fetch(input, init2);
|
|
51
|
-
}
|
|
52
|
-
if (typeof globalThis !== "undefined" && typeof globalThis.fetch === "function") {
|
|
53
|
-
return globalThis.fetch(input, init2);
|
|
54
|
-
}
|
|
55
|
-
throw new RPCError("fetch is not available in this runtime");
|
|
56
|
-
};
|
|
57
|
-
class kRPCClient {
|
|
58
|
-
constructor(url, token = null, seq = null, options = {}) {
|
|
59
|
-
this.serverUrl = url;
|
|
60
|
-
this.protocolType = "HttpPostJson";
|
|
61
|
-
this.seq = seq ?? Date.now();
|
|
62
|
-
this.sessionToken = token || null;
|
|
63
|
-
this.initToken = token || null;
|
|
64
|
-
this.traceId = options.traceId || null;
|
|
65
|
-
this.fetcher = options.fetcher ?? defaultFetcher$1;
|
|
66
|
-
this.sessionTokenProvider = options.sessionTokenProvider ?? null;
|
|
67
|
-
this.sessionTokenOverride = void 0;
|
|
68
|
-
}
|
|
69
|
-
async call(method, params, options = {}) {
|
|
70
|
-
return this._call(method, params, options);
|
|
71
|
-
}
|
|
72
|
-
async callWithSessionToken(sessionToken, method, params) {
|
|
73
|
-
return this._call(method, params, { sessionToken });
|
|
74
|
-
}
|
|
75
|
-
setSeq(seq) {
|
|
76
|
-
this.seq = seq;
|
|
77
|
-
}
|
|
78
|
-
resetSessionToken() {
|
|
79
|
-
this.sessionToken = this.initToken;
|
|
80
|
-
this.sessionTokenOverride = void 0;
|
|
81
|
-
}
|
|
82
|
-
setSessionToken(token) {
|
|
83
|
-
this.sessionToken = token || null;
|
|
84
|
-
this.sessionTokenOverride = token || null;
|
|
85
|
-
}
|
|
86
|
-
getSessionToken() {
|
|
87
|
-
return this.sessionToken;
|
|
88
|
-
}
|
|
89
|
-
// Trace id attached to subsequent requests (request sys trace slot), for
|
|
90
|
-
// correlating a call chain across services. Pass null to clear.
|
|
91
|
-
setTraceId(traceId) {
|
|
92
|
-
this.traceId = traceId || null;
|
|
93
|
-
}
|
|
94
|
-
getTraceId() {
|
|
95
|
-
return this.traceId;
|
|
96
|
-
}
|
|
97
|
-
buildRequest(method, params, seq, sessionToken, traceId) {
|
|
98
|
-
let sys;
|
|
99
|
-
if (traceId) {
|
|
100
|
-
sys = [seq, sessionToken, traceId];
|
|
101
|
-
} else {
|
|
102
|
-
sys = sessionToken ? [seq, sessionToken] : [seq];
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
method,
|
|
106
|
-
params,
|
|
107
|
-
sys
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
// Validates a response sys tuple and returns its trace id (if any). The
|
|
111
|
-
// trace id is only checked for well-formedness; it must never be stored as
|
|
112
|
-
// a session token.
|
|
113
|
-
parseResponseSys(sys, currentSeq) {
|
|
114
|
-
if (sys === void 0 || sys === null) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
if (!Array.isArray(sys)) {
|
|
118
|
-
throw new RPCError("sys is not array");
|
|
119
|
-
}
|
|
120
|
-
if (sys.length < 1) {
|
|
121
|
-
throw new RPCError("sys is empty");
|
|
122
|
-
}
|
|
123
|
-
const responseSeq = sys[0];
|
|
124
|
-
if (typeof responseSeq !== "number") {
|
|
125
|
-
throw new RPCError("sys[0] is not number");
|
|
126
|
-
}
|
|
127
|
-
if (responseSeq !== currentSeq) {
|
|
128
|
-
throw new RPCError(`seq not match: ${responseSeq}!=${currentSeq}`);
|
|
129
|
-
}
|
|
130
|
-
if (sys.length >= 2) {
|
|
131
|
-
const traceId = sys[1];
|
|
132
|
-
if (typeof traceId !== "string") {
|
|
133
|
-
throw new RPCError("sys[1] trace_id is not string");
|
|
134
|
-
}
|
|
135
|
-
return traceId;
|
|
136
|
-
}
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
async prepareSessionToken(options) {
|
|
140
|
-
if (Object.prototype.hasOwnProperty.call(options, "sessionToken")) {
|
|
141
|
-
return options.sessionToken || null;
|
|
142
|
-
}
|
|
143
|
-
if (this.sessionTokenOverride !== void 0) {
|
|
144
|
-
return this.sessionTokenOverride;
|
|
145
|
-
}
|
|
146
|
-
if (this.sessionTokenProvider) {
|
|
147
|
-
const preparedToken = await this.sessionTokenProvider();
|
|
148
|
-
if (preparedToken !== void 0) {
|
|
149
|
-
this.sessionToken = preparedToken || null;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return this.sessionToken;
|
|
153
|
-
}
|
|
154
|
-
prepareTraceId(options) {
|
|
155
|
-
if (Object.prototype.hasOwnProperty.call(options, "traceId")) {
|
|
156
|
-
return options.traceId || null;
|
|
157
|
-
}
|
|
158
|
-
return this.traceId;
|
|
159
|
-
}
|
|
160
|
-
async _call(method, params, options) {
|
|
161
|
-
const sessionToken = await this.prepareSessionToken(options);
|
|
162
|
-
const traceId = this.prepareTraceId(options);
|
|
163
|
-
const currentSeq = this.seq;
|
|
164
|
-
this.seq += 1;
|
|
165
|
-
const requestBody = this.buildRequest(method, params, currentSeq, sessionToken, traceId);
|
|
166
|
-
try {
|
|
167
|
-
const response = await this.fetcher(this.serverUrl, {
|
|
168
|
-
method: "POST",
|
|
169
|
-
headers: {
|
|
170
|
-
"Content-Type": "application/json"
|
|
171
|
-
},
|
|
172
|
-
body: JSON.stringify(requestBody)
|
|
173
|
-
});
|
|
174
|
-
if (!response.ok) {
|
|
175
|
-
throw new RPCError(`RPC call error: ${response.status}`);
|
|
176
|
-
}
|
|
177
|
-
const rpcResponse = await response.json();
|
|
178
|
-
this.parseResponseSys(rpcResponse.sys, currentSeq);
|
|
179
|
-
if ("error" in rpcResponse && rpcResponse.error) {
|
|
180
|
-
throw new RPCError(
|
|
181
|
-
`RPC call error: ${rpcResponse.error}`,
|
|
182
|
-
typeof rpcResponse.code === "string" ? rpcResponse.code : void 0,
|
|
183
|
-
rpcResponse.data
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
if (!("result" in rpcResponse) || rpcResponse.result === void 0) {
|
|
187
|
-
throw new RPCError("RPC response missing result");
|
|
188
|
-
}
|
|
189
|
-
return rpcResponse.result;
|
|
190
|
-
} catch (error) {
|
|
191
|
-
if (error instanceof RPCError) {
|
|
192
|
-
throw error;
|
|
193
|
-
}
|
|
194
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
195
|
-
throw new RPCError(`RPC call failed: ${message}`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
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
|
+
import { e as encodeObjQueryComponent, c as canonicalJson, a as objServiceUrl, n as normalizeObjectUrl, p as parseObjectUrl, b as objectSegments, d as objEventKey } from "./object_url-f72c1704.mjs";
|
|
199
43
|
function ensureSSOEnvironment() {
|
|
200
44
|
if (typeof window === "undefined" || typeof window.location === "undefined") {
|
|
201
45
|
throw new Error("AuthClient can only be created in browser SSO environments");
|
|
@@ -324,404 +168,6 @@ function buildJumpUrl(action, params, jumpBase = DEFAULT_JUMP_BASE_URL) {
|
|
|
324
168
|
const fragment = new URLSearchParams(params).toString();
|
|
325
169
|
return `${base.origin}${path}${fragment ? `#${fragment}` : ""}`;
|
|
326
170
|
}
|
|
327
|
-
const OBJ_SERVICE_NAMES = [
|
|
328
|
-
"config",
|
|
329
|
-
"dfs",
|
|
330
|
-
"taskmgr",
|
|
331
|
-
"kmsg",
|
|
332
|
-
"bucket",
|
|
333
|
-
"ndm",
|
|
334
|
-
"msg-center",
|
|
335
|
-
"aiworkspace",
|
|
336
|
-
"homestation",
|
|
337
|
-
"opendan",
|
|
338
|
-
"aicc"
|
|
339
|
-
];
|
|
340
|
-
const OBJECT_EVENT_PREFIX = "/obj";
|
|
341
|
-
class ObjectUrlError extends Error {
|
|
342
|
-
}
|
|
343
|
-
function isObjServiceName(name) {
|
|
344
|
-
return OBJ_SERVICE_NAMES.includes(name);
|
|
345
|
-
}
|
|
346
|
-
function parseObjectUrl(input) {
|
|
347
|
-
input = input.trim();
|
|
348
|
-
const sep = input.indexOf("://");
|
|
349
|
-
if (sep < 0)
|
|
350
|
-
throw new ObjectUrlError(`'${input}' has no scheme`);
|
|
351
|
-
const scheme = input.slice(0, sep).toLowerCase();
|
|
352
|
-
const rest = input.slice(sep + 3);
|
|
353
|
-
switch (scheme) {
|
|
354
|
-
case "https":
|
|
355
|
-
case "http": {
|
|
356
|
-
try {
|
|
357
|
-
return { kind: "web", url: new URL(input).toString() };
|
|
358
|
-
} catch (e) {
|
|
359
|
-
throw new ObjectUrlError(`invalid web url '${input}': ${e}`);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
case "buckyos":
|
|
363
|
-
return { kind: "buckyos", url: input };
|
|
364
|
-
case "file": {
|
|
365
|
-
const { authority, path, query } = splitAuthority(rest);
|
|
366
|
-
if (query !== null)
|
|
367
|
-
throw new ObjectUrlError("file url does not take query or fragment");
|
|
368
|
-
const host = authority.toLowerCase();
|
|
369
|
-
let deviceId;
|
|
370
|
-
if (host === "" || host === "localhost")
|
|
371
|
-
deviceId = null;
|
|
372
|
-
else if (isHostname(host))
|
|
373
|
-
deviceId = host;
|
|
374
|
-
else
|
|
375
|
-
throw new ObjectUrlError(`invalid device id '${host}' in file url`);
|
|
376
|
-
if (path === "")
|
|
377
|
-
throw new ObjectUrlError("file url requires an absolute path");
|
|
378
|
-
return { kind: "file", deviceId, path: normalizePath(path, false) };
|
|
379
|
-
}
|
|
380
|
-
case "cyfs": {
|
|
381
|
-
const { authority: rawAuthority, path, query } = splitAuthority(rest);
|
|
382
|
-
if (query !== null)
|
|
383
|
-
throw new ObjectUrlError("cyfs url does not take query or fragment");
|
|
384
|
-
const authority = rawAuthority.toLowerCase();
|
|
385
|
-
if (authority === "" || authority === "_") {
|
|
386
|
-
if (path === "")
|
|
387
|
-
throw new ObjectUrlError("cyfs path url requires a path");
|
|
388
|
-
return { kind: "cyfs_path", zone: null, path: normalizePath(path, false) };
|
|
389
|
-
}
|
|
390
|
-
const dot = authority.indexOf(".");
|
|
391
|
-
const firstLabel = dot < 0 ? authority : authority.slice(0, dot);
|
|
392
|
-
const restLabels = dot < 0 ? null : authority.slice(dot + 1);
|
|
393
|
-
const objId = strictObjIdLabel(firstLabel);
|
|
394
|
-
if (objId) {
|
|
395
|
-
if (restLabels !== null && !isHostname(restLabels)) {
|
|
396
|
-
throw new ObjectUrlError(`invalid source zone '${restLabels}'`);
|
|
397
|
-
}
|
|
398
|
-
return {
|
|
399
|
-
kind: "cyfs_object",
|
|
400
|
-
objId,
|
|
401
|
-
sourceZone: restLabels,
|
|
402
|
-
innerPath: path === "" || path === "/" ? "" : normalizePath(path, false)
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
if (!isHostname(authority) || !authority.includes(".")) {
|
|
406
|
-
throw new ObjectUrlError(`'${authority}' is neither a zone host nor an ObjId`);
|
|
407
|
-
}
|
|
408
|
-
if (path === "")
|
|
409
|
-
throw new ObjectUrlError("cyfs path url requires a path");
|
|
410
|
-
return { kind: "cyfs_path", zone: authority, path: normalizePath(path, false) };
|
|
411
|
-
}
|
|
412
|
-
case "obj": {
|
|
413
|
-
const { authority, path, query } = splitAuthority(rest);
|
|
414
|
-
const host = parseObjHost(authority.toLowerCase());
|
|
415
|
-
return {
|
|
416
|
-
kind: "obj",
|
|
417
|
-
host,
|
|
418
|
-
path: path === "" || path === "/" ? "" : normalizePath(path, true),
|
|
419
|
-
query: query === null ? {} : parseQuery(query)
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
default:
|
|
423
|
-
throw new ObjectUrlError(`unsupported scheme '${scheme}'`);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
function expandInputShorthand(input) {
|
|
427
|
-
input = input.trim();
|
|
428
|
-
if (input.startsWith("//")) {
|
|
429
|
-
const rest = input.slice(2);
|
|
430
|
-
const service = rest.split(/[/?]/)[0] ?? "";
|
|
431
|
-
return isObjServiceName(service) ? `obj://${rest}` : input;
|
|
432
|
-
}
|
|
433
|
-
if (input.startsWith("/"))
|
|
434
|
-
return `file://${input}`;
|
|
435
|
-
return input;
|
|
436
|
-
}
|
|
437
|
-
function parseObjHost(host) {
|
|
438
|
-
if (host === "")
|
|
439
|
-
throw new ObjectUrlError("obj url requires a host");
|
|
440
|
-
if (isObjServiceName(host))
|
|
441
|
-
return { kind: "service", name: host };
|
|
442
|
-
if (!host.includes(".")) {
|
|
443
|
-
throw new ObjectUrlError(
|
|
444
|
-
`'${host}' is not a registered obj:// service name; type shorthands are not supported`
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
if (!isHostname(host))
|
|
448
|
-
throw new ObjectUrlError(`'${host}' is not a valid entity hostname`);
|
|
449
|
-
const firstLabel = host.split(".")[0];
|
|
450
|
-
if (isObjServiceName(firstLabel)) {
|
|
451
|
-
throw new ObjectUrlError(
|
|
452
|
-
`'${host}' expands a service name; write obj://${firstLabel}/ for the current zone or use https across zones`
|
|
453
|
-
);
|
|
454
|
-
}
|
|
455
|
-
if (strictObjIdLabel(firstLabel)) {
|
|
456
|
-
throw new ObjectUrlError("NamedObject ids do not go into obj:// host; use cyfs://<objid>/");
|
|
457
|
-
}
|
|
458
|
-
return { kind: "entity", name: host };
|
|
459
|
-
}
|
|
460
|
-
function formatObjectUrl(url) {
|
|
461
|
-
switch (url.kind) {
|
|
462
|
-
case "file":
|
|
463
|
-
return `file://${url.deviceId ?? ""}${url.path}`;
|
|
464
|
-
case "cyfs_path":
|
|
465
|
-
return `cyfs://${url.zone ?? ""}${url.path}`;
|
|
466
|
-
case "cyfs_object":
|
|
467
|
-
return `cyfs://${url.objId.toBase32()}${url.sourceZone ? `.${url.sourceZone}` : ""}${url.innerPath || "/"}`;
|
|
468
|
-
case "obj": {
|
|
469
|
-
const keys = Object.keys(url.query).sort();
|
|
470
|
-
const query = keys.map((k) => `${encodeObjQueryComponent(k)}=${encodeObjQueryComponent(url.query[k])}`).join("&");
|
|
471
|
-
return `obj://${url.host.name}${url.path}${query ? `?${query}` : ""}`;
|
|
472
|
-
}
|
|
473
|
-
case "web":
|
|
474
|
-
case "buckyos":
|
|
475
|
-
return url.url;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
function objectEndpoint(url, origin, currentZone) {
|
|
479
|
-
const base = origin.replace(/\/+$/, "");
|
|
480
|
-
if (url.kind === "obj")
|
|
481
|
-
return `${base}/kapi/${url.host.name}/obj${formatObjectUrl(url).slice(`obj://${url.host.name}`.length)}`;
|
|
482
|
-
if (url.kind === "cyfs_path" && (url.zone === null || url.zone === currentZone))
|
|
483
|
-
return `${base}/kapi/dfs/obj${url.path.replace(/\/+$/, "")}`;
|
|
484
|
-
if (url.kind === "cyfs_object") {
|
|
485
|
-
const from = url.sourceZone && url.sourceZone !== currentZone ? `https://${url.sourceZone}` : base;
|
|
486
|
-
const inner = url.innerPath.replace(/^\/+|\/+$/g, "");
|
|
487
|
-
return `${from}/ndn/${url.objId.toString()}${inner ? `/@/${inner}` : ""}`;
|
|
488
|
-
}
|
|
489
|
-
if (url.kind === "web")
|
|
490
|
-
return url.url;
|
|
491
|
-
return null;
|
|
492
|
-
}
|
|
493
|
-
function ndnReadUrl(origin, objId, hint) {
|
|
494
|
-
const url = `${origin.replace(/\/+$/, "")}/ndn/${objId}`;
|
|
495
|
-
if (!hint || hint.path === void 0 && hint.token === void 0)
|
|
496
|
-
return url;
|
|
497
|
-
return `${url}?hint=${encodeURIComponent(canonicalJson(hint))}`;
|
|
498
|
-
}
|
|
499
|
-
function normalizeObjectUrl(input) {
|
|
500
|
-
return formatObjectUrl(parseObjectUrl(input));
|
|
501
|
-
}
|
|
502
|
-
function rbacResourceKey(url, currentZone) {
|
|
503
|
-
if (url.kind === "obj")
|
|
504
|
-
return `obj://${url.host.name}${url.path}`;
|
|
505
|
-
if (url.kind === "cyfs_path") {
|
|
506
|
-
const local = url.zone === null || currentZone !== void 0 && url.zone === currentZone.toLowerCase();
|
|
507
|
-
return local ? `obj://dfs${url.path}` : null;
|
|
508
|
-
}
|
|
509
|
-
return null;
|
|
510
|
-
}
|
|
511
|
-
function objectSegments(url) {
|
|
512
|
-
return url.kind === "obj" ? decodedSegments(url.path) : [];
|
|
513
|
-
}
|
|
514
|
-
function objectEventKey(url, event) {
|
|
515
|
-
if (url.kind !== "obj")
|
|
516
|
-
throw new ObjectUrlError("object events are only defined for obj:// urls");
|
|
517
|
-
if (!/^[A-Za-z0-9_-]+$/.test(event) || event.startsWith("x")) {
|
|
518
|
-
throw new ObjectUrlError(`invalid object event name '${event}'`);
|
|
519
|
-
}
|
|
520
|
-
const key = `${objectEventBase(url.host, url.path)}/${event}`;
|
|
521
|
-
if (key.length > 256 || key.split("/").length - 1 > 8) {
|
|
522
|
-
throw new ObjectUrlError(`object event key too long: ${key}`);
|
|
523
|
-
}
|
|
524
|
-
return key;
|
|
525
|
-
}
|
|
526
|
-
function objectEventPattern(url) {
|
|
527
|
-
if (url.kind !== "obj")
|
|
528
|
-
throw new ObjectUrlError("object events are only defined for obj:// urls");
|
|
529
|
-
return `${objectEventBase(url.host, url.path)}/**`;
|
|
530
|
-
}
|
|
531
|
-
function keventSegment(segment) {
|
|
532
|
-
if (segment !== "" && /^[A-Za-z0-9_-]+$/.test(segment) && !segment.startsWith("x"))
|
|
533
|
-
return segment;
|
|
534
|
-
let out = "x";
|
|
535
|
-
for (const byte of new TextEncoder().encode(segment))
|
|
536
|
-
out += byte.toString(16).padStart(2, "0");
|
|
537
|
-
return out;
|
|
538
|
-
}
|
|
539
|
-
function objEventKey(host, segments, event) {
|
|
540
|
-
return `${objEventBase(host, segments)}/${event}`;
|
|
541
|
-
}
|
|
542
|
-
function objEventPattern(host, segments) {
|
|
543
|
-
return `${objEventBase(host, segments)}/**`;
|
|
544
|
-
}
|
|
545
|
-
function objEventBase(host, segments) {
|
|
546
|
-
return [OBJECT_EVENT_PREFIX, keventSegment(host), ...segments.map(keventSegment)].join("/");
|
|
547
|
-
}
|
|
548
|
-
function objectDid(url, zoneDid, entityDid) {
|
|
549
|
-
if (url.kind !== "obj")
|
|
550
|
-
return null;
|
|
551
|
-
const segments = url.path.split("/").filter((s) => s !== "").map((s) => s.replace(/:/g, "%3A"));
|
|
552
|
-
const base = url.host.kind === "service" ? zoneDid : entityDid ?? `did:web:${url.host.name}`;
|
|
553
|
-
const all = url.host.kind === "service" ? [url.host.name, ...segments] : segments;
|
|
554
|
-
return all.length ? `${base}:${all.join(":")}` : base;
|
|
555
|
-
}
|
|
556
|
-
function objServiceUrl(service, segments) {
|
|
557
|
-
return `obj://${service}${segments.map((s) => `/${encodeObjSegment(s)}`).join("")}`;
|
|
558
|
-
}
|
|
559
|
-
function objEntityUrl(entityHost, segments) {
|
|
560
|
-
return `obj://${entityHost}${segments.map((s) => `/${encodeObjSegment(s)}`).join("")}`;
|
|
561
|
-
}
|
|
562
|
-
function configKeyFromUrl(input) {
|
|
563
|
-
let key = input.startsWith("obj://config/") ? input.slice("obj://config/".length) : input;
|
|
564
|
-
if (key.startsWith("/config/"))
|
|
565
|
-
key = key.slice("/config/".length);
|
|
566
|
-
return key.replace(/^[/\\]+/, "");
|
|
567
|
-
}
|
|
568
|
-
function canonicalJson(value) {
|
|
569
|
-
if (Array.isArray(value))
|
|
570
|
-
return `[${value.map(canonicalJson).join(",")}]`;
|
|
571
|
-
if (value !== null && typeof value === "object") {
|
|
572
|
-
const entries = Object.keys(value).sort().map((k) => `${JSON.stringify(k)}:${canonicalJson(value[k])}`);
|
|
573
|
-
return `{${entries.join(",")}}`;
|
|
574
|
-
}
|
|
575
|
-
return JSON.stringify(value);
|
|
576
|
-
}
|
|
577
|
-
function encodeObjSegment(segment) {
|
|
578
|
-
return encodeWith(segment, (b2) => isUnreserved(b2) || "!$&'()*+,;=:@".includes(String.fromCharCode(b2)));
|
|
579
|
-
}
|
|
580
|
-
function encodeObjQueryComponent(component) {
|
|
581
|
-
return encodeWith(component, (b2) => isUnreserved(b2) || "!$'()*,;:@/".includes(String.fromCharCode(b2)));
|
|
582
|
-
}
|
|
583
|
-
function encodeWith(input, keep) {
|
|
584
|
-
let out = "";
|
|
585
|
-
for (const byte of new TextEncoder().encode(input)) {
|
|
586
|
-
out += keep(byte) ? String.fromCharCode(byte) : `%${byte.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
587
|
-
}
|
|
588
|
-
return out;
|
|
589
|
-
}
|
|
590
|
-
function isUnreserved(byte) {
|
|
591
|
-
const ch = String.fromCharCode(byte);
|
|
592
|
-
return /[A-Za-z0-9]/.test(ch) || "-._~".includes(ch);
|
|
593
|
-
}
|
|
594
|
-
function objectEventBase(host, path) {
|
|
595
|
-
return objEventBase(host.name, decodedSegments(path));
|
|
596
|
-
}
|
|
597
|
-
function splitAuthority(rest) {
|
|
598
|
-
const qpos = rest.search(/[?#]/);
|
|
599
|
-
const beforeQuery = qpos < 0 ? rest : rest.slice(0, qpos);
|
|
600
|
-
let query = null;
|
|
601
|
-
if (qpos >= 0) {
|
|
602
|
-
const q = rest.slice(qpos).split("#")[0];
|
|
603
|
-
query = q.startsWith("?") ? q.slice(1) : q;
|
|
604
|
-
if (query === "")
|
|
605
|
-
query = null;
|
|
606
|
-
}
|
|
607
|
-
const slash = beforeQuery.indexOf("/");
|
|
608
|
-
return slash < 0 ? { authority: beforeQuery, path: "", query } : { authority: beforeQuery.slice(0, slash), path: beforeQuery.slice(slash), query };
|
|
609
|
-
}
|
|
610
|
-
function normalizePath(path, trimTrailingSlash) {
|
|
611
|
-
if (!path.startsWith("/"))
|
|
612
|
-
throw new ObjectUrlError(`path '${path}' must be absolute`);
|
|
613
|
-
let body = path.slice(1);
|
|
614
|
-
if (trimTrailingSlash && body.endsWith("/"))
|
|
615
|
-
body = body.slice(0, -1);
|
|
616
|
-
const raw = body.split("/");
|
|
617
|
-
let out = "";
|
|
618
|
-
raw.forEach((segment, index) => {
|
|
619
|
-
if (segment === "" && index === raw.length - 1 && !trimTrailingSlash) {
|
|
620
|
-
out += "/";
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
const decoded = percentDecode(segment);
|
|
624
|
-
if (decoded === "" || decoded === "." || decoded === "..") {
|
|
625
|
-
throw new ObjectUrlError(`ambiguous path segment in '${path}'`);
|
|
626
|
-
}
|
|
627
|
-
out += `/${encodeObjSegment(decoded)}`;
|
|
628
|
-
});
|
|
629
|
-
return out;
|
|
630
|
-
}
|
|
631
|
-
function decodedSegments(path) {
|
|
632
|
-
return path.split("/").filter((s) => s !== "").map((s) => {
|
|
633
|
-
try {
|
|
634
|
-
return percentDecode(s);
|
|
635
|
-
} catch {
|
|
636
|
-
return s;
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
function parseQuery(query) {
|
|
641
|
-
const out = {};
|
|
642
|
-
for (const pair of query.split("&")) {
|
|
643
|
-
if (pair === "")
|
|
644
|
-
continue;
|
|
645
|
-
const eq = pair.indexOf("=");
|
|
646
|
-
const key = percentDecode((eq < 0 ? pair : pair.slice(0, eq)).replace(/\+/g, " "));
|
|
647
|
-
let value = percentDecode((eq < 0 ? "" : pair.slice(eq + 1)).replace(/\+/g, " "));
|
|
648
|
-
if (key === "selector") {
|
|
649
|
-
try {
|
|
650
|
-
value = canonicalJson(JSON.parse(value));
|
|
651
|
-
} catch (e) {
|
|
652
|
-
throw new ObjectUrlError(`selector must be JSON: ${e}`);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
if (Object.prototype.hasOwnProperty.call(out, key)) {
|
|
656
|
-
throw new ObjectUrlError(`query key '${key}' repeats`);
|
|
657
|
-
}
|
|
658
|
-
out[key] = value;
|
|
659
|
-
}
|
|
660
|
-
return out;
|
|
661
|
-
}
|
|
662
|
-
function percentDecode(input) {
|
|
663
|
-
const raw = new TextEncoder().encode(input);
|
|
664
|
-
const bytes2 = [];
|
|
665
|
-
for (let i = 0; i < raw.length; ) {
|
|
666
|
-
if (raw[i] === 37) {
|
|
667
|
-
const hex = String.fromCharCode(raw[i + 1] ?? 0, raw[i + 2] ?? 0);
|
|
668
|
-
if (!/^[0-9A-Fa-f]{2}$/.test(hex))
|
|
669
|
-
throw new ObjectUrlError(`invalid escape in '${input}'`);
|
|
670
|
-
bytes2.push(parseInt(hex, 16));
|
|
671
|
-
i += 3;
|
|
672
|
-
} else {
|
|
673
|
-
bytes2.push(raw[i]);
|
|
674
|
-
i += 1;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
try {
|
|
678
|
-
return new TextDecoder("utf-8", { fatal: true }).decode(new Uint8Array(bytes2));
|
|
679
|
-
} catch {
|
|
680
|
-
throw new ObjectUrlError(`'${input}' is not UTF-8`);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
function isHostname(host) {
|
|
684
|
-
return host !== "" && host.length <= 253 && host.split(".").every((label) => label !== "" && label.length <= 63 && /^[a-z0-9-]+$/.test(label) && !label.startsWith("-") && !label.endsWith("-"));
|
|
685
|
-
}
|
|
686
|
-
function strictObjIdLabel(label) {
|
|
687
|
-
if (label.length < 26)
|
|
688
|
-
return null;
|
|
689
|
-
try {
|
|
690
|
-
const objId = ObjId.fromString(label);
|
|
691
|
-
const typeOk = /^[a-z0-9_-]+$/.test(objId.objType);
|
|
692
|
-
return typeOk && objId.objHash.length >= 16 && objId.toBase32() === label ? objId : null;
|
|
693
|
-
} catch {
|
|
694
|
-
return null;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
const object_url = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
698
|
-
__proto__: null,
|
|
699
|
-
OBJECT_EVENT_PREFIX,
|
|
700
|
-
OBJ_SERVICE_NAMES,
|
|
701
|
-
ObjectUrlError,
|
|
702
|
-
canonicalJson,
|
|
703
|
-
configKeyFromUrl,
|
|
704
|
-
encodeObjQueryComponent,
|
|
705
|
-
encodeObjSegment,
|
|
706
|
-
expandInputShorthand,
|
|
707
|
-
formatObjectUrl,
|
|
708
|
-
isObjServiceName,
|
|
709
|
-
keventSegment,
|
|
710
|
-
ndnReadUrl,
|
|
711
|
-
normalizeObjectUrl,
|
|
712
|
-
objEntityUrl,
|
|
713
|
-
objEventKey,
|
|
714
|
-
objEventPattern,
|
|
715
|
-
objServiceUrl,
|
|
716
|
-
objectDid,
|
|
717
|
-
objectEndpoint,
|
|
718
|
-
objectEventKey,
|
|
719
|
-
objectEventPattern,
|
|
720
|
-
objectSegments,
|
|
721
|
-
parseObjHost,
|
|
722
|
-
parseObjectUrl,
|
|
723
|
-
rbacResourceKey
|
|
724
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
725
171
|
const AIWORKSPACE_SERVICE_NAME = "aiworkspace";
|
|
726
172
|
class AiwsFailure extends Error {
|
|
727
173
|
constructor(error) {
|
|
@@ -763,9 +209,70 @@ function parseAiwsReferenceUrl(url) {
|
|
|
763
209
|
reference.version = JSON.parse(parsed.query.version);
|
|
764
210
|
return reference;
|
|
765
211
|
}
|
|
212
|
+
const AIWS_COMMIT_PART_BYTES = 6 * 1024 * 1024;
|
|
213
|
+
const AIWS_COMMIT_MAX_BYTES = 32 * 1024 * 1024;
|
|
214
|
+
const AIWS_COMMIT_MAX_OPERATIONS = 5e4;
|
|
215
|
+
const utf8 = new TextEncoder();
|
|
216
|
+
function jsonBytes(value) {
|
|
217
|
+
const text = JSON.stringify(value);
|
|
218
|
+
return text.length + (/[^\x00-\x7f]/.test(text) ? utf8.encode(text).length - text.length : 0);
|
|
219
|
+
}
|
|
220
|
+
function splitCommitOperations(operations, partBytes = AIWS_COMMIT_PART_BYTES) {
|
|
221
|
+
const parts = [];
|
|
222
|
+
let current = [];
|
|
223
|
+
let size = 2;
|
|
224
|
+
for (const op of operations) {
|
|
225
|
+
const bytes2 = jsonBytes(op) + 1;
|
|
226
|
+
if (current.length > 0 && size + bytes2 > partBytes) {
|
|
227
|
+
parts.push(current);
|
|
228
|
+
current = [];
|
|
229
|
+
size = 2;
|
|
230
|
+
}
|
|
231
|
+
current.push(op);
|
|
232
|
+
size += bytes2;
|
|
233
|
+
}
|
|
234
|
+
if (current.length > 0 || parts.length === 0)
|
|
235
|
+
parts.push(current);
|
|
236
|
+
return parts;
|
|
237
|
+
}
|
|
238
|
+
function commitOverLimit(operations) {
|
|
239
|
+
if (operations.length > AIWS_COMMIT_MAX_OPERATIONS)
|
|
240
|
+
return { limit: "operations", value: operations.length, max: AIWS_COMMIT_MAX_OPERATIONS };
|
|
241
|
+
let bytes2 = 2;
|
|
242
|
+
for (const op of operations)
|
|
243
|
+
bytes2 += jsonBytes(op) + 1;
|
|
244
|
+
return bytes2 + 4096 > AIWS_COMMIT_MAX_BYTES ? { limit: "bytes", value: bytes2, max: AIWS_COMMIT_MAX_BYTES } : null;
|
|
245
|
+
}
|
|
246
|
+
async function commitWithParts(call, request, options = {}) {
|
|
247
|
+
var _a2, _b2;
|
|
248
|
+
const method = options.method ?? "doc.commit";
|
|
249
|
+
const operations = Array.isArray(request.operations) ? request.operations : [];
|
|
250
|
+
const parts = splitCommitOperations(operations, options.partBytes ?? AIWS_COMMIT_PART_BYTES);
|
|
251
|
+
if (parts.length <= 1)
|
|
252
|
+
return await call(method, request);
|
|
253
|
+
const { workspace_id, epoch, idempotency_key } = request;
|
|
254
|
+
for (let attempt2 = 0; ; attempt2++) {
|
|
255
|
+
const staged = [];
|
|
256
|
+
for (let part = 0; part < parts.length - 1; part++) {
|
|
257
|
+
(_a2 = options.onPart) == null ? void 0 : _a2.call(options, part + 1, parts.length);
|
|
258
|
+
const held = await call("doc.stage", { workspace_id, epoch, idempotency_key, part, operations: parts[part] });
|
|
259
|
+
if (!held || held.ok === false || typeof held.digest !== "string") {
|
|
260
|
+
const error = (held == null ? void 0 : held.error) ?? { code: "STORAGE_IO_ERROR", retryable: true, detail: "doc.stage returned no digest" };
|
|
261
|
+
return { status: "rejected", code: error.code, retryable: error.retryable, detail: error.detail, ...error.sub_code ? { sub_code: error.sub_code } : {}, errors: [error] };
|
|
262
|
+
}
|
|
263
|
+
staged.push(held.digest);
|
|
264
|
+
}
|
|
265
|
+
(_b2 = options.onPart) == null ? void 0 : _b2.call(options, parts.length, parts.length);
|
|
266
|
+
const result = await call(method, { ...request, staged, operations: parts[parts.length - 1] });
|
|
267
|
+
if (attempt2 === 0 && (result == null ? void 0 : result.status) === "rejected" && result.sub_code === "STAGED_PARTS_MISSING")
|
|
268
|
+
continue;
|
|
269
|
+
return result;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
766
272
|
class AiWorkspaceClient {
|
|
767
273
|
constructor(rpcClient) {
|
|
768
274
|
this.rpcClient = rpcClient;
|
|
275
|
+
this.raw = (method, params) => this.rpcClient.call(method, params);
|
|
769
276
|
}
|
|
770
277
|
async call(method, params) {
|
|
771
278
|
const raw = await this.rpcClient.call(method, params);
|
|
@@ -803,11 +310,12 @@ class AiWorkspaceClient {
|
|
|
803
310
|
return this.call("doc.outline", { workspace_id });
|
|
804
311
|
}
|
|
805
312
|
prepare(workspace_id, request) {
|
|
806
|
-
return this.
|
|
313
|
+
return commitWithParts(this.raw, { workspace_id, ...request }, { method: "doc.prepare" });
|
|
807
314
|
}
|
|
808
|
-
/** The three-state commit result (`status: accepted | conflict | rejected`), never thrown.
|
|
809
|
-
|
|
810
|
-
|
|
315
|
+
/** The three-state commit result (`status: accepted | conflict | rejected`), never thrown. One call per Commit
|
|
316
|
+
* whatever its size (up to `AIWS_COMMIT_MAX_BYTES` / `AIWS_COMMIT_MAX_OPERATIONS`): a large one is sent in parts. */
|
|
317
|
+
commit(workspace_id, request, options = {}) {
|
|
318
|
+
return commitWithParts(this.raw, { workspace_id, ...request }, options);
|
|
811
319
|
}
|
|
812
320
|
getSubmission(workspace_id, epoch, idempotency_key) {
|
|
813
321
|
return this.call("doc.get_submission", { workspace_id, epoch, idempotency_key });
|
|
@@ -30921,7 +30429,7 @@ async function uploadChunkViaTus(endpoint, file, chunkInfo, chunkIndex, fileHash
|
|
|
30921
30429
|
const logicalPath = chunkInfo.chunkId;
|
|
30922
30430
|
let tusModule;
|
|
30923
30431
|
try {
|
|
30924
|
-
tusModule = await import("./tus_client-
|
|
30432
|
+
tusModule = await import("./tus_client-893a3287.mjs");
|
|
30925
30433
|
} catch (error) {
|
|
30926
30434
|
const message = error instanceof Error ? error.message : String(error);
|
|
30927
30435
|
throw new NdmError("UPLOAD_FAILED", `Failed to load tus-js-client: ${message}`);
|
|
@@ -31782,6 +31290,40 @@ const ndm_proxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
31782
31290
|
unpin,
|
|
31783
31291
|
unpinOwner
|
|
31784
31292
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
31293
|
+
const COMPUTER_SEMANTIC_FORMAT = "outline-v1";
|
|
31294
|
+
const COMPUTER_ROLES = [
|
|
31295
|
+
"window",
|
|
31296
|
+
"dialog",
|
|
31297
|
+
"document",
|
|
31298
|
+
"group",
|
|
31299
|
+
"toolbar",
|
|
31300
|
+
"heading",
|
|
31301
|
+
"button",
|
|
31302
|
+
"link",
|
|
31303
|
+
"tab",
|
|
31304
|
+
"tablist",
|
|
31305
|
+
"menu",
|
|
31306
|
+
"menubar",
|
|
31307
|
+
"menuitem",
|
|
31308
|
+
"checkbox",
|
|
31309
|
+
"radio",
|
|
31310
|
+
"switch",
|
|
31311
|
+
"textbox",
|
|
31312
|
+
"combobox",
|
|
31313
|
+
"slider",
|
|
31314
|
+
"list",
|
|
31315
|
+
"listitem",
|
|
31316
|
+
"tree",
|
|
31317
|
+
"treeitem",
|
|
31318
|
+
"table",
|
|
31319
|
+
"row",
|
|
31320
|
+
"cell",
|
|
31321
|
+
"image",
|
|
31322
|
+
"text",
|
|
31323
|
+
"generic"
|
|
31324
|
+
];
|
|
31325
|
+
const COMPUTER_ELEMENT_STATES = ["disabled", "focused", "selected", "checked", "mixed", "expanded", "collapsed", "readonly"];
|
|
31326
|
+
const COMPUTER_ELEMENT_ACTIONS = ["focus", "invoke", "set_value", "toggle", "select", "expand", "collapse", "scroll_into_view"];
|
|
31785
31327
|
class ExecutorClient {
|
|
31786
31328
|
constructor(serviceUrl, token = null, options = {}) {
|
|
31787
31329
|
this.rpc = new kRPCClient(serviceUrl, token, null, options);
|
|
@@ -32046,6 +31588,9 @@ class ExecutorCommandStream {
|
|
|
32046
31588
|
this.socket.send(encodeExecutorControl({ type: "upload_end", request_id: `end${++this.sequence}`, op_id: locator.op_id }));
|
|
32047
31589
|
return accepted;
|
|
32048
31590
|
}
|
|
31591
|
+
computer(locator, request) {
|
|
31592
|
+
return this.request("computer", { ...this.fresh(locator), request });
|
|
31593
|
+
}
|
|
32049
31594
|
query(locator, channel, offset = 0, wait_ms = 0) {
|
|
32050
31595
|
this.operation(locator);
|
|
32051
31596
|
return this.request("query", { store_id: locator.store_id, op_id: locator.op_id, channel, offset, max_bytes: 262144, wait_ms });
|
|
@@ -32056,197 +31601,208 @@ class ExecutorCommandStream {
|
|
|
32056
31601
|
}
|
|
32057
31602
|
}
|
|
32058
31603
|
export {
|
|
32059
|
-
|
|
32060
|
-
|
|
31604
|
+
CONTACT_TAG_ZONE_AGENT as $,
|
|
31605
|
+
NOTIFY_ACTION_ANSWER as A,
|
|
32061
31606
|
BS_SERVICE_VERIFY_HUB as B,
|
|
32062
|
-
|
|
32063
|
-
|
|
31607
|
+
NOTIFY_ACTION_DISMISS as C,
|
|
31608
|
+
NOTIFY_LINK_PATH as D,
|
|
32064
31609
|
EXTERNAL_PRINCIPAL_CLAIM as E,
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
31610
|
+
isNotifyClosed as F,
|
|
31611
|
+
notifyCategorySessionId as G,
|
|
31612
|
+
notifyCategoryFromSessionId as H,
|
|
31613
|
+
inputPrompt as I,
|
|
31614
|
+
promptOptions as J,
|
|
31615
|
+
notifyAnswerToTaskResult as K,
|
|
31616
|
+
validateNotifyAnswer as L,
|
|
32072
31617
|
MsgQueueClient as M,
|
|
32073
31618
|
NOTIFY_INTENT as N,
|
|
32074
|
-
|
|
32075
|
-
|
|
32076
|
-
|
|
31619
|
+
notifyUrl as O,
|
|
31620
|
+
msgMachineData as P,
|
|
31621
|
+
notifyMessageData as Q,
|
|
32077
31622
|
RuntimeType as R,
|
|
32078
31623
|
SystemConfigClient as S,
|
|
32079
|
-
|
|
32080
|
-
|
|
31624
|
+
commitNotifyAnswer as T,
|
|
31625
|
+
answerNotify as U,
|
|
32081
31626
|
VerifyHubClient as V,
|
|
32082
31627
|
WEB3_BRIDGE_HOST as W,
|
|
32083
|
-
|
|
32084
|
-
|
|
31628
|
+
waitNotify as X,
|
|
31629
|
+
FRIEND_INTENT as Y,
|
|
32085
31630
|
ZONE_USER_TYPES as Z,
|
|
32086
|
-
|
|
31631
|
+
CONTACT_TAG_ZONE_USER as _,
|
|
32087
31632
|
ndm_client as a,
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
|
|
32107
|
-
|
|
32108
|
-
|
|
32109
|
-
|
|
32110
|
-
|
|
32111
|
-
|
|
32112
|
-
|
|
32113
|
-
|
|
32114
|
-
|
|
32115
|
-
|
|
32116
|
-
|
|
32117
|
-
|
|
32118
|
-
|
|
32119
|
-
|
|
32120
|
-
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32127
|
-
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
|
|
32135
|
-
|
|
32136
|
-
|
|
32137
|
-
|
|
32138
|
-
|
|
32139
|
-
|
|
32140
|
-
|
|
32141
|
-
|
|
32142
|
-
|
|
32143
|
-
|
|
32144
|
-
|
|
32145
|
-
|
|
32146
|
-
|
|
32147
|
-
|
|
32148
|
-
|
|
32149
|
-
|
|
32150
|
-
|
|
32151
|
-
|
|
31633
|
+
TASK_ERR_CONTROL_NOT_AVAILABLE as a$,
|
|
31634
|
+
CONTACT_TAG_HOMESTATION_FOLLOWING as a0,
|
|
31635
|
+
CONTACT_CHANGED_EVENT_PATTERN as a1,
|
|
31636
|
+
WELL_KNOWN_CONTACT_TAGS as a2,
|
|
31637
|
+
USER_TYPE_GROUP_REF_PREFIX as a3,
|
|
31638
|
+
USER_GROUP_REF_PREFIX as a4,
|
|
31639
|
+
contactTagApp as a5,
|
|
31640
|
+
contactTagKind as a6,
|
|
31641
|
+
isUserGroupRefTag as a7,
|
|
31642
|
+
DENY_REASONS as a8,
|
|
31643
|
+
ACCESS_DENIED_ERROR_CODE as a9,
|
|
31644
|
+
HUMAN_APPROVAL_SCHEMA_ID as aA,
|
|
31645
|
+
DOWNLOAD_TASK_SCHEMA_ID as aB,
|
|
31646
|
+
SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID as aC,
|
|
31647
|
+
WORKFLOW_RUN_TREE_TASK_SCHEMA_ID as aD,
|
|
31648
|
+
WORKFLOW_STEP_TASK_SCHEMA_ID as aE,
|
|
31649
|
+
WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID as aF,
|
|
31650
|
+
WORKFLOW_THUNK_TASK_SCHEMA_ID as aG,
|
|
31651
|
+
WORKFLOW_SCHEDULE_TASK_SCHEMA_ID as aH,
|
|
31652
|
+
WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID as aI,
|
|
31653
|
+
WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID as aJ,
|
|
31654
|
+
WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID as aK,
|
|
31655
|
+
AGENT_DELEGATE_TASK_SCHEMA_ID as aL,
|
|
31656
|
+
HUMAN_INPUT_TASK_SCHEMA_ID as aM,
|
|
31657
|
+
OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID as aN,
|
|
31658
|
+
OPENDAN_COMMAND_TASK_SCHEMA_ID as aO,
|
|
31659
|
+
TOOL_EXEC_BASH_TASK_SCHEMA_ID as aP,
|
|
31660
|
+
AICC_COMPUTE_TASK_SCHEMA_ID as aQ,
|
|
31661
|
+
APP_INSTALL_TASK_SCHEMA_ID as aR,
|
|
31662
|
+
APP_UNINSTALL_TASK_SCHEMA_ID as aS,
|
|
31663
|
+
APP_START_TASK_SCHEMA_ID as aT,
|
|
31664
|
+
APP_UPDATE_TASK_SCHEMA_ID as aU,
|
|
31665
|
+
APP_UPDATE_BATCH_TASK_SCHEMA_ID as aV,
|
|
31666
|
+
TASK_ERR_NOT_FOUND as aW,
|
|
31667
|
+
TASK_ERR_PERMISSION_DENIED as aX,
|
|
31668
|
+
TASK_ERR_REVISION_CONFLICT as aY,
|
|
31669
|
+
TASK_ERR_STALE_RUNNER_EPOCH as aZ,
|
|
31670
|
+
TASK_ERR_INVALID_PHASE as a_,
|
|
31671
|
+
parseAccessDenial as aa,
|
|
31672
|
+
accessDenialOf as ab,
|
|
31673
|
+
ANONYMOUS_IDENTITY as ac,
|
|
31674
|
+
parseCurrentIdentity as ad,
|
|
31675
|
+
identityKey as ae,
|
|
31676
|
+
identityAllows as af,
|
|
31677
|
+
DEFAULT_JUMP_BASE_URL as ag,
|
|
31678
|
+
JUMP_ACTION_PATHS as ah,
|
|
31679
|
+
normalizeZoneHostname as ai,
|
|
31680
|
+
zoneActionUrl as aj,
|
|
31681
|
+
buildJumpUrl as ak,
|
|
31682
|
+
APP_LOGIN_ISSUE_METHOD as al,
|
|
31683
|
+
APP_LOGIN_EXCHANGE_METHOD as am,
|
|
31684
|
+
APP_LOGIN_SETTINGS_GET_METHOD as an,
|
|
31685
|
+
APP_LOGIN_SETTINGS_SET_METHOD as ao,
|
|
31686
|
+
issueAppLoginCode as ap,
|
|
31687
|
+
issueAppCustomerLink as aq,
|
|
31688
|
+
parseAppLoginExchangeResult as ar,
|
|
31689
|
+
randomAppLoginNonce as as,
|
|
31690
|
+
loginByAppAccessToken as at,
|
|
31691
|
+
completeAppAccessTokenLogin as au,
|
|
31692
|
+
TASK_MANAGER_SERVICE_UNIQUE_ID as av,
|
|
31693
|
+
TASK_MANAGER_SERVICE_NAME as aw,
|
|
31694
|
+
TASK_MANAGER_SERVICE_PORT as ax,
|
|
31695
|
+
TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1 as ay,
|
|
31696
|
+
RAW_TASK_SCHEMA_ID as az,
|
|
32152
31697
|
bns_client as b,
|
|
32153
|
-
|
|
32154
|
-
|
|
32155
|
-
|
|
32156
|
-
|
|
32157
|
-
|
|
32158
|
-
|
|
32159
|
-
|
|
32160
|
-
|
|
32161
|
-
|
|
32162
|
-
|
|
32163
|
-
|
|
32164
|
-
|
|
32165
|
-
|
|
32166
|
-
|
|
32167
|
-
|
|
32168
|
-
|
|
32169
|
-
|
|
32170
|
-
|
|
32171
|
-
|
|
32172
|
-
|
|
32173
|
-
|
|
32174
|
-
|
|
32175
|
-
|
|
32176
|
-
|
|
32177
|
-
|
|
32178
|
-
|
|
32179
|
-
|
|
32180
|
-
|
|
32181
|
-
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
|
|
32189
|
-
|
|
32190
|
-
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
|
|
32195
|
-
|
|
32196
|
-
|
|
32197
|
-
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32215
|
-
|
|
32216
|
-
|
|
31698
|
+
validateVideoEdit as b$,
|
|
31699
|
+
TASK_ERR_CONTROL_ALREADY_PENDING as b0,
|
|
31700
|
+
TASK_ERR_ALREADY_COMPLETED as b1,
|
|
31701
|
+
TASK_ERR_INPUT_SCHEMA_MISMATCH as b2,
|
|
31702
|
+
TASK_ERR_RESULT_SCHEMA_MISMATCH as b3,
|
|
31703
|
+
TASK_ERR_IDEMPOTENCY_CONFLICT as b4,
|
|
31704
|
+
TASK_ERR_SCHEMA_NOT_FOUND as b5,
|
|
31705
|
+
TASK_MGR_ERROR_CODES as b6,
|
|
31706
|
+
taskMgrTaskEventPath as b7,
|
|
31707
|
+
taskMgrTreeEventPath as b8,
|
|
31708
|
+
taskMgrErrorCode as b9,
|
|
31709
|
+
WorkflowScheduledTaskMisfirePolicy as bA,
|
|
31710
|
+
WorkflowScheduledTaskFireStatus as bB,
|
|
31711
|
+
WorkflowClient as bC,
|
|
31712
|
+
AICC_SERVICE_UNIQUE_ID as bD,
|
|
31713
|
+
AICC_SERVICE_SERVICE_NAME as bE,
|
|
31714
|
+
AICC_SERVICE_SERVICE_PORT as bF,
|
|
31715
|
+
AICC_AI_METHODS as bG,
|
|
31716
|
+
AICC_CORE_METHODS as bH,
|
|
31717
|
+
AICC_MANAGEMENT_METHODS as bI,
|
|
31718
|
+
AICC_QUOTA_METHODS as bJ,
|
|
31719
|
+
AICC_METHODS as bK,
|
|
31720
|
+
AICC_FEATURES as bL,
|
|
31721
|
+
AICC_EXECUTION_MODES as bM,
|
|
31722
|
+
AICC_POLICY_REFUSAL_CODES as bN,
|
|
31723
|
+
aiccRefusalOf as bO,
|
|
31724
|
+
isAiccAiMethod as bP,
|
|
31725
|
+
aiccTextMessage as bQ,
|
|
31726
|
+
aiccMessageTextContent as bR,
|
|
31727
|
+
aiccMessageFirstText as bS,
|
|
31728
|
+
validateAiccMessage as bT,
|
|
31729
|
+
AiccClient as bU,
|
|
31730
|
+
decisionRequirements as bV,
|
|
31731
|
+
validateDecisionRequest as bW,
|
|
31732
|
+
validateDecisionAnswers as bX,
|
|
31733
|
+
parseVideoPrompt as bY,
|
|
31734
|
+
validateVideoOutput as bZ,
|
|
31735
|
+
validateVideoGeneration as b_,
|
|
31736
|
+
TaskExecutorKind as ba,
|
|
31737
|
+
TaskPhase as bb,
|
|
31738
|
+
isTerminalTaskPhase as bc,
|
|
31739
|
+
TaskWaitReasonKind as bd,
|
|
31740
|
+
TaskOutcome as be,
|
|
31741
|
+
TaskControlAction as bf,
|
|
31742
|
+
baselineTaskControlProfile as bg,
|
|
31743
|
+
DEFAULT_CHILD_CONTROL_POLICY as bh,
|
|
31744
|
+
TaskAction as bi,
|
|
31745
|
+
TaskGrantScope as bj,
|
|
31746
|
+
TaskDataScope as bk,
|
|
31747
|
+
StorageDomain as bl,
|
|
31748
|
+
TaskEventType as bm,
|
|
31749
|
+
TaskManagerClient as bn,
|
|
31750
|
+
WORKFLOW_SERVICE_NAME as bo,
|
|
31751
|
+
WorkflowErrorCode as bp,
|
|
31752
|
+
WorkflowRequestError as bq,
|
|
31753
|
+
WorkflowStepType as br,
|
|
31754
|
+
WorkflowOutputMode as bs,
|
|
31755
|
+
WorkflowJoinMode as bt,
|
|
31756
|
+
WorkflowRetryFallback as bu,
|
|
31757
|
+
WorkflowDefinitionStatus as bv,
|
|
31758
|
+
WorkflowRunStatus as bw,
|
|
31759
|
+
WorkflowNodeRunState as bx,
|
|
31760
|
+
WorkflowHumanActionKind as by,
|
|
31761
|
+
WorkflowScheduledTaskStatus as bz,
|
|
32217
31762
|
createSDKModule as c,
|
|
32218
|
-
|
|
32219
|
-
|
|
32220
|
-
|
|
32221
|
-
|
|
32222
|
-
|
|
32223
|
-
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
|
|
32238
|
-
|
|
32239
|
-
|
|
32240
|
-
|
|
32241
|
-
|
|
32242
|
-
|
|
32243
|
-
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
31763
|
+
videoGenerationRequirement as c0,
|
|
31764
|
+
KEventReader as c1,
|
|
31765
|
+
KEventClient as c2,
|
|
31766
|
+
appIdFromDid as c3,
|
|
31767
|
+
parseAppId as c4,
|
|
31768
|
+
appDidFromId as c5,
|
|
31769
|
+
createAppInstanceId as c6,
|
|
31770
|
+
parseAppInstanceId as c7,
|
|
31771
|
+
BNS_EVM_DEFAULT_GAS_LIMIT as c8,
|
|
31772
|
+
BNS_EVM_DEFAULT_MAX_FEE_PER_GAS as c9,
|
|
31773
|
+
splitCommitOperations as cA,
|
|
31774
|
+
commitOverLimit as cB,
|
|
31775
|
+
commitWithParts as cC,
|
|
31776
|
+
AiWorkspaceClient as cD,
|
|
31777
|
+
importFiles as cE,
|
|
31778
|
+
ensureUploaded as cF,
|
|
31779
|
+
releaseImportSession as cG,
|
|
31780
|
+
BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS as ca,
|
|
31781
|
+
BNS_MAX_INLINE_DOCUMENT_BYTES as cb,
|
|
31782
|
+
BNS_DNS_TXT_DEFAULT_TTL as cc,
|
|
31783
|
+
BNS_DNS_TXT_DOC_TYPE as cd,
|
|
31784
|
+
BNS_PUBLISH_DOCUMENT_ABI as ce,
|
|
31785
|
+
BnsEvmTxError as cf,
|
|
31786
|
+
BnsEvmTxBuilder as cg,
|
|
31787
|
+
decodeBnsPublishDocumentCalldata as ch,
|
|
31788
|
+
BnsTxExecutorError as ci,
|
|
31789
|
+
walletUserHasSnAccount as cj,
|
|
31790
|
+
BnsTxExecutor as ck,
|
|
31791
|
+
COMPUTER_SEMANTIC_FORMAT as cl,
|
|
31792
|
+
COMPUTER_ROLES as cm,
|
|
31793
|
+
COMPUTER_ELEMENT_STATES as cn,
|
|
31794
|
+
COMPUTER_ELEMENT_ACTIONS as co,
|
|
31795
|
+
ExecutorClient as cp,
|
|
31796
|
+
ExecutorStreamError as cq,
|
|
31797
|
+
encodeExecutorControl as cr,
|
|
31798
|
+
ExecutorCommandStream as cs,
|
|
31799
|
+
AIWORKSPACE_SERVICE_NAME as ct,
|
|
31800
|
+
AiwsFailure as cu,
|
|
31801
|
+
aiwsReferenceUrl as cv,
|
|
31802
|
+
parseAiwsReferenceUrl as cw,
|
|
31803
|
+
AIWS_COMMIT_PART_BYTES as cx,
|
|
31804
|
+
AIWS_COMMIT_MAX_BYTES as cy,
|
|
31805
|
+
AIWS_COMMIT_MAX_OPERATIONS as cz,
|
|
32250
31806
|
ndm_proxy as d,
|
|
32251
31807
|
bucket_client as e,
|
|
32252
31808
|
BS_SERVICE_TASK_MANAGER as f,
|
|
@@ -32258,17 +31814,17 @@ export {
|
|
|
32258
31814
|
RepoClient as l,
|
|
32259
31815
|
parseZoneUserType as m,
|
|
32260
31816
|
ndn as n,
|
|
32261
|
-
|
|
31817
|
+
isExternalPrincipal as o,
|
|
32262
31818
|
parseSessionTokenClaims as p,
|
|
32263
|
-
|
|
31819
|
+
MsgCenterClient as q,
|
|
32264
31820
|
resolveDidFromHost as r,
|
|
32265
31821
|
sn_client as s,
|
|
32266
|
-
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
|
|
32271
|
-
|
|
32272
|
-
|
|
31822
|
+
mailboxAddress as t,
|
|
31823
|
+
mailboxResource as u,
|
|
31824
|
+
NOTIFY_DELIVERED_INTENT as v,
|
|
31825
|
+
NOTIFY_DATA_VERSION as w,
|
|
31826
|
+
NOTIFY_SESSION_PREFIX as x,
|
|
31827
|
+
NOTIFY_CHOICE_CONTROL_ID as y,
|
|
31828
|
+
NOTIFY_TEXT_CONTROL_ID as z
|
|
32273
31829
|
};
|
|
32274
|
-
//# sourceMappingURL=executor_client-
|
|
31830
|
+
//# sourceMappingURL=executor_client-bfc8a1e1.mjs.map
|