@lovrabet/lovrabet-cli 2.3.2 → 2.3.3
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/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +83 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x13d29c=a98_0x51f7;(function(_0x4f2fe8,_0x1930aa){const _0x34a0bf=a98_0x51f7,_0x442fb0=_0x4f2fe8();while(!![]){try{const _0x53cc8a=parseInt(_0x34a0bf(0x192))/0x1*(-parseInt(_0x34a0bf(0x187))/0x2)+-parseInt(_0x34a0bf(0x18d))/0x3+parseInt(_0x34a0bf(0x18c))/0x4*(-parseInt(_0x34a0bf(0x185))/0x5)+-parseInt(_0x34a0bf(0x189))/0x6*(-parseInt(_0x34a0bf(0x18a))/0x7)+parseInt(_0x34a0bf(0x186))/0x8*(parseInt(_0x34a0bf(0x18e))/0x9)+parseInt(_0x34a0bf(0x18f))/0xa*(parseInt(_0x34a0bf(0x190))/0xb)+-parseInt(_0x34a0bf(0x191))/0xc;if(_0x53cc8a===_0x1930aa)break;else _0x442fb0['push'](_0x442fb0['shift']());}catch(_0x1c1aea){_0x442fb0['push'](_0x442fb0['shift']());}}}(a98_0x4ff8,0x439e8));function a98_0x51f7(_0x569836,_0x156817){_0x569836=_0x569836-0x185;const _0x4ff81a=a98_0x4ff8();let _0x51f71a=_0x4ff81a[_0x569836];return _0x51f71a;}export const OUTPUT_FORMAT_VALUES=['json',a98_0x13d29c(0x188),a98_0x13d29c(0x18b)];function a98_0x4ff8(){const _0x1a9d77=['6ZGJxti','30gkBwkK','960168VONaMC','101726YfsAJx','pretty','18jVnTYD','1213772oSUyCz','compress','78524fObCXH','785421HJpUDU','27KJjTna','20LlBbkK','1880439ltAdLZ','3124920keZoGD'];a98_0x4ff8=function(){return _0x1a9d77;};return a98_0x4ff8();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a99_0x5ecb(_0x5166d4,_0x312752){_0x5166d4=_0x5166d4-0xaf;const _0x5d0171=a99_0x5d01();let _0x5ecb15=_0x5d0171[_0x5166d4];return _0x5ecb15;}const a99_0x1333b4=a99_0x5ecb;(function(_0x2f0649,_0x26a93a){const _0x4046d5=a99_0x5ecb,_0x588981=_0x2f0649();while(!![]){try{const _0x2e753a=-parseInt(_0x4046d5(0xc2))/0x1+parseInt(_0x4046d5(0xb2))/0x2+parseInt(_0x4046d5(0xc7))/0x3+parseInt(_0x4046d5(0xb4))/0x4*(parseInt(_0x4046d5(0xb3))/0x5)+parseInt(_0x4046d5(0xc5))/0x6+parseInt(_0x4046d5(0xbb))/0x7+parseInt(_0x4046d5(0xbc))/0x8*(-parseInt(_0x4046d5(0xba))/0x9);if(_0x2e753a===_0x26a93a)break;else _0x588981['push'](_0x588981['shift']());}catch(_0x595e41){_0x588981['push'](_0x588981['shift']());}}}(a99_0x5d01,0x7a56e));export const PRODUCT_CONFIG={'cliBinName':a99_0x1333b4(0xaf),'cliDisplayName':a99_0x1333b4(0xc0),'npmPackageName':a99_0x1333b4(0xbf),'skillSource':a99_0x1333b4(0xbe),'internalSkillSource':'git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','globalSkillName':'lovrabet','npmRegistryBaseUrl':a99_0x1333b4(0xbd),'cliCdnBaseUrl':a99_0x1333b4(0xc1),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a99_0x1333b4(0xb5)],'configFileNames':[a99_0x1333b4(0xb1)],'newConfigFileName':'.lovrabet.json','homeDirName':a99_0x1333b4(0xc6),'logFileName':a99_0x1333b4(0xb8),'invokeSource':a99_0x1333b4(0xb9),'userCenterDisplayName':a99_0x1333b4(0xb6),'skipNpxSkillsEnvSuffix':a99_0x1333b4(0xc3),'accessKeyCreatePath':a99_0x1333b4(0xc4)};function a99_0x5d01(){const _0x86f35c=['.lovrabet-runtime.log','cli:lovrabet-runtime','1467261sfNCNf','1787359rmJSXl','72TiJNYJ','https://registry.npmjs.org','lovrabet/lovrabet-cli','@lovrabet/lovrabet-cli','Lovrabet\x20Runtime\x20CLI','https://g.lovrabet.com','126439MZvNik','SKIP_NPX_SKILLS','/user/ak','1739808HEZhWZ','.lovrabet','2520732FCuJPF','lovrabet','map','.lovrabet.json','759430HUsudZ','10kQDZdN','659076HBVMjS','RABETBASE','Lovrabet\x20User\x20Center','legacyEnvPrefixes'];a99_0x5d01=function(){return _0x86f35c;};return a99_0x5d01();}export function productEnvName(_0x1b5a4c){return PRODUCT_CONFIG['envPrefix']+'_'+_0x1b5a4c;}export function productEnvNames(_0x2b5b94){const _0x37f7aa=a99_0x1333b4;return[productEnvName(_0x2b5b94),...PRODUCT_CONFIG[_0x37f7aa(0xb7)][_0x37f7aa(0xb0)](_0x4e254b=>_0x4e254b+'_'+_0x2b5b94)];}export function productEnv(_0x1cbdf5){for(const _0x1b9c78 of productEnvNames(_0x1cbdf5)){const _0x267353=process.env[_0x1b9c78];if(_0x267353!==undefined)return _0x267353;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c2f8b,_0x2b55e9){const _0x17290e=a100_0x4e6c,_0x9a83cc=_0x4c2f8b();while(!![]){try{const _0x1daf7d=parseInt(_0x17290e(0x67))/0x1*(-parseInt(_0x17290e(0x73))/0x2)+parseInt(_0x17290e(0x6b))/0x3*(-parseInt(_0x17290e(0x70))/0x4)+-parseInt(_0x17290e(0x74))/0x5+parseInt(_0x17290e(0x76))/0x6+-parseInt(_0x17290e(0x66))/0x7+-parseInt(_0x17290e(0x6e))/0x8*(-parseInt(_0x17290e(0x6d))/0x9)+parseInt(_0x17290e(0x75))/0xa;if(_0x1daf7d===_0x2b55e9)break;else _0x9a83cc['push'](_0x9a83cc['shift']());}catch(_0x3da457){_0x9a83cc['push'](_0x9a83cc['shift']());}}}(a100_0x2cda,0xc0467));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';function a100_0x4e6c(_0x19b4fd,_0x21cfcc){_0x19b4fd=_0x19b4fd-0x64;const _0x2cda77=a100_0x2cda();let _0x4e6c68=_0x2cda77[_0x19b4fd];return _0x4e6c68;}import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;function a100_0x2cda(){const _0x2003ee=['join','14ctSpRi','5052215OehvUs','19873650PbPuRR','9204960uqMdge','validation','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','\x22\x20is\x20not\x20currently\x20available.','1149491EbhZts','172603KFejEf','Region\x20\x22','string','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','9381FLIsta','includes','243RWRvBq','114632nIYyyE','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','944RdjEsJ','Available\x20regions:\x20'];a100_0x2cda=function(){return _0x2003ee;};return a100_0x2cda();}export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x4a9430){const _0x3900f1=a100_0x4e6c;return typeof _0x4a9430===_0x3900f1(0x69)&&LOVRABET_REGION_VALUES['includes'](_0x4a9430);}export function isEnabledLovrabetRegion(_0x39de53){const _0x12b255=a100_0x4e6c;return typeof _0x39de53===_0x12b255(0x69)&&ENABLED_LOVRABET_REGION_VALUES[_0x12b255(0x6c)](_0x39de53);}export function normalizeLovrabetRegion(_0x292b52){const _0x2dec0a=a100_0x4e6c;if(_0x292b52===undefined||_0x292b52===null||_0x292b52==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x292b52!=='string')throw CliErrors[_0x2dec0a(0x77)](_0x2dec0a(0x64)+typeof _0x292b52+'.',_0x2dec0a(0x6a));const _0x2e8589=REGION_ALIASES[_0x292b52]??_0x292b52;if(isEnabledLovrabetRegion(_0x2e8589))return _0x2e8589;throw CliErrors[_0x2dec0a(0x77)](_0x2dec0a(0x68)+_0x292b52+_0x2dec0a(0x65),_0x2dec0a(0x71)+ENABLED_LOVRABET_REGION_VALUES[_0x2dec0a(0x72)](',\x20')+_0x2dec0a(0x6f));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a101_0x58f0(_0x4d9b11,_0x9168bd){_0x4d9b11=_0x4d9b11-0xd2;const _0x471d54=a101_0x471d();let _0x58f03c=_0x471d54[_0x4d9b11];return _0x58f03c;}function a101_0x471d(){const _0x5742b0=['high-risk-write','write','1016OsRjpG','1914627BYqYRt','2281940QFoHmi','2ZFimYe','488707bQAMPg','15Xghhwo','50754dkTOQe','353262hWfico','25533JePtVi','27912HozCrl','98NmLBlk','312ZbMXJu'];a101_0x471d=function(){return _0x5742b0;};return a101_0x471d();}const a101_0x2efce7=a101_0x58f0;(function(_0x400e54,_0xda3cd4){const _0x56f707=a101_0x58f0,_0x5343b3=_0x400e54();while(!![]){try{const _0x5dd329=-parseInt(_0x56f707(0xd7))/0x1*(parseInt(_0x56f707(0xd6))/0x2)+-parseInt(_0x56f707(0xd4))/0x3+-parseInt(_0x56f707(0xdc))/0x4*(-parseInt(_0x56f707(0xd8))/0x5)+-parseInt(_0x56f707(0xda))/0x6*(-parseInt(_0x56f707(0xdd))/0x7)+parseInt(_0x56f707(0xd3))/0x8*(parseInt(_0x56f707(0xdb))/0x9)+parseInt(_0x56f707(0xd5))/0xa+-parseInt(_0x56f707(0xd9))/0xb*(-parseInt(_0x56f707(0xde))/0xc);if(_0x5dd329===_0xda3cd4)break;else _0x5343b3['push'](_0x5343b3['shift']());}catch(_0x18ea67){_0x5343b3['push'](_0x5343b3['shift']());}}}(a101_0x471d,0x68301));export const RISK_LEVEL_VALUES=['read',a101_0x2efce7(0xd2),a101_0x2efce7(0xdf)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22e77a,_0x30e651){const _0x191e04=a102_0x5f39,_0xd058ed=_0x22e77a();while(!![]){try{const _0x4da4f6=parseInt(_0x191e04(0x17c))/0x1+parseInt(_0x191e04(0x17b))/0x2+-parseInt(_0x191e04(0x17f))/0x3*(parseInt(_0x191e04(0x182))/0x4)+-parseInt(_0x191e04(0x187))/0x5*(-parseInt(_0x191e04(0x189))/0x6)+-parseInt(_0x191e04(0x183))/0x7*(-parseInt(_0x191e04(0x17e))/0x8)+parseInt(_0x191e04(0x181))/0x9*(-parseInt(_0x191e04(0x185))/0xa)+-parseInt(_0x191e04(0x180))/0xb*(-parseInt(_0x191e04(0x17d))/0xc);if(_0x4da4f6===_0x30e651)break;else _0xd058ed['push'](_0xd058ed['shift']());}catch(_0x154445){_0xd058ed['push'](_0xd058ed['shift']());}}}(a102_0xe3f8,0xdd9ef));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';export function getUserAccessKeyCreateUrl(_0x831f62=DEFAULT_LOVRABET_REGION){const _0x3696ef=a102_0x5f39,_0x100c16=OFFICIAL_ROUTING_PROFILES[_0x831f62][_0x3696ef(0x186)][_0x3696ef(0x188)]['user'];return''+_0x100c16+PRODUCT_CONFIG[_0x3696ef(0x184)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a102_0x5f39(_0x494115,_0x34d953){_0x494115=_0x494115-0x17b;const _0xe3f860=a102_0xe3f8();let _0x5f39ca=_0xe3f860[_0x494115];return _0x5f39ca;}function a102_0xe3f8(){const _0x1a1177=['240qVLInZ','7EYGdXO','accessKeyCreatePath','290QNAsjI','serviceDomains','1014625frmKaO','production','6mskYXO','1825368FQWYYw','140189TuJYWr','12Ogdvgt','1568264LpCkLy','79017tEkHUU','13192685WbIrQd','50607GaoOzN'];a102_0xe3f8=function(){return _0x1a1177;};return a102_0xe3f8();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x52768d=a102_0x5c27;(function(_0x5b8c0e,_0x31d38c){const _0x4d8128=a102_0x5c27,_0x309625=_0x5b8c0e();while(!![]){try{const _0x17a4ff=parseInt(_0x4d8128(0x15e))/0x1+parseInt(_0x4d8128(0x138))/0x2+-parseInt(_0x4d8128(0x164))/0x3+parseInt(_0x4d8128(0x16f))/0x4+-parseInt(_0x4d8128(0x156))/0x5*(-parseInt(_0x4d8128(0x170))/0x6)+-parseInt(_0x4d8128(0x159))/0x7+-parseInt(_0x4d8128(0x133))/0x8;if(_0x17a4ff===_0x31d38c)break;else _0x309625['push'](_0x309625['shift']());}catch(_0x3d360a){_0x309625['push'](_0x309625['shift']());}}}(a102_0x5ab8,0x40ec4));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a102_0x52768d(0x13e)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a102_0x52768d(0x16b)];function resolveConfigPath(_0x167e53){for(const _0x2f1517 of CONFIG_NAMES){const _0x511589=resolve(_0x167e53,_0x2f1517);if(existsSync(_0x511589))return _0x511589;}return undefined;}export function resolveWriteConfigPath(_0x67def1){const _0x3803e1=a102_0x52768d,_0x1d2d43=_0x67def1===_0x3803e1(0x152)?process[_0x3803e1(0x12e)]():homedir(),_0x3c389a=resolveConfigPath(_0x1d2d43);return _0x3c389a??resolve(_0x1d2d43,NEW_CONFIG_NAME);}export function readConfigFile(_0x2729ae){const _0x129cb3=a102_0x52768d;try{if(existsSync(_0x2729ae)){const _0x830088=readFileSync(_0x2729ae,{'encoding':_0x129cb3(0x15a)});if(_0x830088){const _0x16215d=JSON[_0x129cb3(0x146)](_0x830088);return migrateOnlineEnv(_0x2729ae,_0x16215d),_0x16215d;}}}catch{}return{};}function migrateOnlineEnv(_0x77573d,_0x4920a1){const _0x3179e7=a102_0x52768d;let _0x27be9f=![];_0x4920a1['env']==='online'&&(_0x4920a1['env']=_0x3179e7(0x130),_0x27be9f=!![]);if(_0x4920a1['apps']&&typeof _0x4920a1[_0x3179e7(0x12f)]===_0x3179e7(0x132))for(const _0x215bc1 of Object[_0x3179e7(0x169)](_0x4920a1[_0x3179e7(0x12f)])){_0x215bc1&&_0x215bc1[_0x3179e7(0x168)]===_0x3179e7(0x166)&&(_0x215bc1[_0x3179e7(0x168)]=_0x3179e7(0x130),_0x27be9f=!![]);}if(_0x27be9f)try{writeConfigFile(_0x77573d,_0x4920a1);}catch{}}export function writeConfigFile(_0x5e0167,_0x1ab7da){const _0x18b5c5=a102_0x52768d,_0x1aa4df=dirname(_0x5e0167);!existsSync(_0x1aa4df)&&mkdirSync(_0x1aa4df,{'recursive':!![]});const _0x832b8f=_0x5e0167+_0x18b5c5(0x14f);try{writeFileSync(_0x832b8f,JSON[_0x18b5c5(0x16d)](_0x1ab7da,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x832b8f,_0x5e0167);}catch(_0x4a6130){if(_0x4a6130[_0x18b5c5(0x16c)]===_0x18b5c5(0x162)||_0x4a6130[_0x18b5c5(0x16c)]===_0x18b5c5(0x14c)||_0x4a6130[_0x18b5c5(0x16c)]===_0x18b5c5(0x174)){writeFileSync(_0x5e0167,JSON[_0x18b5c5(0x16d)](_0x1ab7da,null,0x2)+'\x0a',{'encoding':_0x18b5c5(0x15a)});try{unlinkSync(_0x832b8f);}catch{}}else throw _0x4a6130;}}catch(_0x2fe3ee){try{unlinkSync(_0x832b8f);}catch{}throw _0x2fe3ee;}}export function isNonInteractiveMode(_0x1be49c){const _0x3c9f09=a102_0x52768d;return!!(_0x1be49c[_0x3c9f09(0x163)]||_0x1be49c['ci']||productEnvNames('CI')[_0x3c9f09(0x173)](_0x21e466=>process.env[_0x21e466]===_0x3c9f09(0x147))||process.env.CI===_0x3c9f09(0x147)||!process[_0x3c9f09(0x13c)][_0x3c9f09(0x165)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2bc4f6=a102_0x52768d;if(!process['stdin'][_0x2bc4f6(0x165)])return![];try{const _0x5a6184=process[_0x2bc4f6(0x14b)][_0x2bc4f6(0x145)];return process['stdin'][_0x2bc4f6(0x136)](!![]),process[_0x2bc4f6(0x14b)][_0x2bc4f6(0x136)](_0x5a6184??![]),!![];}catch{return![];}}export async function createContext(_0x144b98){const _0x31caea=a102_0x52768d,_0x2a4814=readRawConfig(),_0x3290b6=buildConfig(_0x2a4814,_0x144b98);await initGlobalEnvironment(_0x3290b6);const {getUserDomain:_0x223992,getApiDomain:_0x13280e}=await import(_0x31caea(0x144)),_0x441fa1={'apiDomain':_0x13280e(),'userDomain':_0x223992()},_0x1f0953=await buildAuth(_0x3290b6);logger[_0x31caea(0x15f)](process[_0x31caea(0x12e)]());const _0x5a8924=(CLI_BIN_NAME+'\x20'+process['argv'][_0x31caea(0x13f)](0x2)[_0x31caea(0x161)]('\x20'))[_0x31caea(0x12a)]();logger[_0x31caea(0x137)](_0x5a8924);const _0x4a96e9=isNonInteractiveMode(_0x144b98);return{'config':_0x3290b6,'auth':_0x1f0953,'logger':logger,'env':_0x441fa1,'nonInteractive':_0x4a96e9};}export function buildConfigFromFlags(_0x9a55aa){return buildConfig(readRawConfig(),_0x9a55aa);}export function getLocalAppAliases(_0x2f7601){const _0x52ce16=a102_0x52768d;return _0x2f7601[_0x52ce16(0x12f)]&&typeof _0x2f7601[_0x52ce16(0x12f)]==='object'?_0x2f7601['apps']:{};}function a102_0x5ab8(){const _0x1297bc=['userDomain','stdin','EXDEV','VERBOSE','global','.tmp','nativeToolAvailable','authRequired','project','find','inherit','accessKey','131275xqcVCT','high-risk-write','projectConfig','1006376xYYqkV','utf8','routing','runtimeDomain','message','162253btaFvr','setLogPath','ACCESS_KEY','join','EPERM','nonInteractive','219294fvXnCp','isTTY','online','empty','env','values','skillDomain','newConfigFileName','code','stringify','APPCODE','1161984LDdDtj','24qXiIpr','host','daily','some','EACCES','FORMAT','./constant/env.js','skillHubDomain','app','trim','ENV','globalConfig','defaultApp','cwd','apps','production','string','object','3422872ljfYcW','error','PAGE_SIZE','setRawMode','setRawCommand','705760UEmGNB','region','top-level','locale','stdout','agentDomain','configFileNames','slice','raw','apiDomain','development','format','./constant/domain.js','isRaw','parse','true','appcode','riskLevel'];a102_0x5ab8=function(){return _0x1297bc;};return a102_0x5ab8();}export function resolveLocalAppAliasCode(_0x4cd9d1,_0x2a0a74){const _0x231cd7=a102_0x52768d;if(!_0x2a0a74)return undefined;const _0x15dccc=getLocalAppAliases(_0x4cd9d1)[_0x2a0a74],_0x8c2745=_0x15dccc?.[_0x231cd7(0x148)];return typeof _0x8c2745==='string'&&_0x8c2745[_0x231cd7(0x12a)]()?_0x8c2745[_0x231cd7(0x12a)]():undefined;}export function readAppCodeFromConfig(){const _0x2ee8de=a102_0x52768d,_0x351cd1=readRawConfig(),_0x492502=_0x351cd1['appcode']??_0x351cd1[_0x2ee8de(0x178)];if(typeof _0x492502===_0x2ee8de(0x131)&&_0x492502[_0x2ee8de(0x12a)]())return _0x492502[_0x2ee8de(0x12a)]();const _0x550200=resolveLocalAppAliasCode(_0x351cd1,typeof _0x351cd1['defaultApp']===_0x2ee8de(0x131)?_0x351cd1['defaultApp']:undefined);if(_0x550200)return _0x550200;const _0x47c453=normalizeEnv(String(_0x351cd1[_0x2ee8de(0x168)]||_0x2ee8de(0x130))),_0x44e3fd=isDaily(_0x47c453)?_0x2ee8de(0x172):isDev(_0x47c453)?_0x2ee8de(0x142):'production',_0x10b6dc=resolveCachedAppCode(typeof _0x351cd1[_0x2ee8de(0x12d)]===_0x2ee8de(0x131)?_0x351cd1[_0x2ee8de(0x12d)]:undefined,_0x44e3fd,typeof _0x351cd1[_0x2ee8de(0x155)]==='string'?_0x351cd1[_0x2ee8de(0x155)]:undefined);if(_0x10b6dc)return _0x10b6dc;const _0x4997e1=Object[_0x2ee8de(0x169)](getLocalAppAliases(_0x351cd1))[_0x2ee8de(0x153)](_0x20b972=>_0x20b972?.[_0x2ee8de(0x148)]);return typeof _0x4997e1?.[_0x2ee8de(0x148)]===_0x2ee8de(0x131)&&_0x4997e1['appcode']['trim']()?_0x4997e1[_0x2ee8de(0x148)]['trim']():undefined;}export function readScopedConfig(_0xd0553c){const _0x26d430=a102_0x52768d,_0x480f3f=_0xd0553c[_0x26d430(0x14e)]?_0x26d430(0x14e):'project';return readConfigFile(resolveWriteConfigPath(_0x480f3f));}export function writeScopedConfig(_0x547489,_0x5a3ef8){const _0x2aced9=a102_0x52768d,_0x1c3f43=_0x5a3ef8[_0x2aced9(0x14e)]?_0x2aced9(0x14e):'project';writeConfigFile(resolveWriteConfigPath(_0x1c3f43),_0x547489);}export async function initGlobalEnvironment(_0x19413d){const _0xeff6b2=a102_0x52768d,{initEnv:_0x72245c}=await import(_0xeff6b2(0x176));_0x72245c(_0x19413d[_0xeff6b2(0x168)]);const {initDomains:_0x392b9f}=await import(_0xeff6b2(0x144)),_0x5776d7=resolveEnterpriseRoutingConfig(_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x15b)]);_0x392b9f({'apiDomain':_0x5776d7?_0x5776d7['apiDomain']:_0x19413d['raw'][_0xeff6b2(0x141)]||_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x171)]||undefined,'userDomain':_0x5776d7?_0x5776d7[_0xeff6b2(0x14a)]:_0x19413d['raw'][_0xeff6b2(0x14a)]||undefined,'runtimeDomain':_0x5776d7?_0x5776d7['runtimeDomain']:_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x15c)]||undefined,'skillDomain':_0x5776d7?_0x5776d7['skillDomain']:_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x16a)]||_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x177)]||_0x19413d[_0xeff6b2(0x140)][_0xeff6b2(0x13d)]||_0x19413d[_0xeff6b2(0x140)]['platformDomain']||undefined,'region':normalizeLovrabetRegion(_0x19413d['raw'][_0xeff6b2(0x139)])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x367b2e){const _0x19995e=a102_0x52768d;if(!existsSync(_0x367b2e))return{'status':'missing'};try{const _0x396264=readFileSync(_0x367b2e,{'encoding':_0x19995e(0x15a)});if(!_0x396264?.['trim']())return{'status':_0x19995e(0x167)};const _0xdfa5bb=JSON[_0x19995e(0x146)](_0x396264);return{'status':'ok','data':_0xdfa5bb};}catch(_0x367af5){return{'status':_0x19995e(0x134),'message':_0x367af5 instanceof Error?_0x367af5[_0x19995e(0x15d)]:String(_0x367af5)};}}export function loadRawConfigLayers(_0x1de321){const _0x5bb03d=a102_0x52768d;let _0x30c57f={},_0x478d07={},_0x1d62b6,_0x5301ae;try{_0x1d62b6=resolveConfigPath(homedir());if(_0x1d62b6){const _0x497ed5=readFileSync(_0x1d62b6,{'encoding':'utf8'});if(_0x497ed5)_0x30c57f=JSON[_0x5bb03d(0x146)](_0x497ed5);}}catch{}try{const _0x48f626=_0x1de321||process[_0x5bb03d(0x12e)]();_0x5301ae=resolveConfigPath(_0x48f626);if(_0x5301ae){const _0xd0ca20=readFileSync(_0x5301ae,{'encoding':_0x5bb03d(0x15a)});if(_0xd0ca20)_0x478d07=JSON[_0x5bb03d(0x146)](_0xd0ca20);}}catch{}return{'globalPath':_0x1d62b6,'projectPath':_0x5301ae,'globalConfig':_0x30c57f,'projectConfig':_0x478d07};}function mergeRawConfigLayers(_0x54f53a){const _0x3b7c83=a102_0x52768d,{globalConfig:_0x2621b5,projectConfig:_0x3885fd}=_0x54f53a,_0x1b22b2={..._0x2621b5,..._0x3885fd};delete _0x1b22b2[_0x3b7c83(0x154)];if(_0x3b7c83(0x12d)in _0x3885fd)_0x1b22b2[_0x3b7c83(0x12d)]=_0x3885fd[_0x3b7c83(0x12d)];else _0x2621b5[_0x3b7c83(0x12d)]&&(_0x1b22b2[_0x3b7c83(0x12d)]=_0x2621b5[_0x3b7c83(0x12d)]);return _0x1b22b2;}export function isInProject(){return!!getProjectConfigPath();}function a102_0x5c27(_0x4f6f47,_0x165ab6){_0x4f6f47=_0x4f6f47-0x12a;const _0x5ab8ed=a102_0x5ab8();let _0x5c27f0=_0x5ab8ed[_0x4f6f47];return _0x5c27f0;}export function readRawConfig(_0x1cedb2){return mergeRawConfigLayers(loadRawConfigLayers(_0x1cedb2));}export function readRawConfigWithLayers(_0x50d91b){const _0x2e215f=loadRawConfigLayers(_0x50d91b);return{'config':mergeRawConfigLayers(_0x2e215f),'layers':_0x2e215f};}export function resolveDefaultAppSource(_0xa4753){const _0x10cef6=a102_0x52768d;if(_0x10cef6(0x12d)in _0xa4753[_0x10cef6(0x158)])return _0x10cef6(0x152);if(_0xa4753[_0x10cef6(0x12c)][_0x10cef6(0x12d)])return'global';return null;}function buildConfig(_0x49d185,_0x464350){const _0x3aa241=a102_0x52768d,_0x32c877=_0x49d185[_0x3aa241(0x12d)]||undefined,_0x4d6b90=_0x464350['app']||env('APP')||undefined,_0x17f6fc=_0x4d6b90||_0x32c877||undefined,_0xc81dff=env(_0x3aa241(0x160))||_0x49d185[_0x3aa241(0x155)]||undefined,_0xebf75=_0x464350[_0x3aa241(0x168)]||env(_0x3aa241(0x12b))||_0x49d185[_0x3aa241(0x168)]||DEFAULT_CONFIG_VALUES[_0x3aa241(0x168)],_0x2d6f91=normalizeEnv(String(_0xebf75)),_0x6e402f=isDaily(_0x2d6f91)?_0x3aa241(0x172):isDev(_0x2d6f91)?_0x3aa241(0x142):_0x3aa241(0x130),_0x302776=typeof _0x464350[_0x3aa241(0x148)]==='string'?_0x464350['appcode']:undefined,_0x1b442a=env(_0x3aa241(0x16e)),_0x5dcb26=_0x4d6b90?undefined:_0x49d185[_0x3aa241(0x148)]||_0x49d185[_0x3aa241(0x178)]||undefined,_0xd5546f=_0x4d6b90||(_0x5dcb26?undefined:_0x32c877),_0x2e25f5=resolveLocalAppAliasCode(_0x49d185,_0xd5546f),_0x29046f=resolveCachedAppCode(_0xd5546f,_0x6e402f,_0xc81dff),_0x37e924=_0x302776||_0x1b442a||_0x5dcb26||_0x2e25f5||_0x29046f||undefined,_0x84d55f=_0x302776?'explicit':_0x1b442a?_0x3aa241(0x168):_0x5dcb26?_0x3aa241(0x13a):_0x2e25f5?'local-alias':_0x29046f?'cache':undefined,_0x1125f8=_0x49d185[_0x3aa241(0x13b)]||DEFAULT_CONFIG_VALUES[_0x3aa241(0x13b)],_0x5331a2=undefined,_0x2794a8=_0x464350[_0x3aa241(0x143)]||env(_0x3aa241(0x175))||_0x49d185[_0x3aa241(0x143)],_0x15ed29=normalizeLegacyOutputFormat(_0x2794a8),_0x3b7a7c=env(_0x3aa241(0x135))||_0x49d185['pageSize'],_0x5243d7=_0x3b7a7c?Number(_0x3b7a7c)||undefined:undefined,_0x410272=_0x49d185[_0x3aa241(0x149)],_0x122dfa=_0x410272==='read'||_0x410272==='write'||_0x410272===_0x3aa241(0x157)?_0x410272:DEFAULT_CONFIG_VALUES[_0x3aa241(0x149)],_0x5764ac=_0x49d185[_0x3aa241(0x150)]===!![],_0x5d9ec1=env(_0x3aa241(0x14d)),_0x3818c8=_0x5d9ec1==='1'||_0x5d9ec1===_0x3aa241(0x147);return{'appCode':typeof _0x37e924==='string'&&_0x37e924['trim']()?_0x37e924[_0x3aa241(0x12a)]():undefined,'appCodeSource':_0x84d55f,'env':_0x6e402f,'locale':_0x1125f8,'cookie':_0x5331a2,'accessKey':_0xc81dff,'format':_0x15ed29,'pageSize':_0x5243d7,'riskLevel':_0x122dfa,'nativeToolAvailable':_0x5764ac,'verbose':_0x3818c8,'defaultApp':_0x32c877,'currentApp':typeof _0x17f6fc===_0x3aa241(0x131)?_0x17f6fc:undefined,'raw':_0x49d185};}function env(_0x4ff6bd){return productEnv(_0x4ff6bd);}async function buildAuth(_0x349cc3){const _0x3b7100=a102_0x52768d,_0x5d4722='',_0x22bd9f=!!_0x349cc3[_0x3b7100(0x155)];return{'cookie':_0x5d4722,'isLoggedIn':_0x22bd9f,async 'getOrLogin'(){const _0xda08dc=_0x3b7100;if(_0x22bd9f)return _0x5d4722;throw CliErrors[_0xda08dc(0x151)]();}};}
|
|
1
|
+
const a103_0x308ef5=a103_0x444e;(function(_0x170479,_0x405b4a){const _0x5cd2c5=a103_0x444e,_0x1346c1=_0x170479();while(!![]){try{const _0x1ea572=-parseInt(_0x5cd2c5(0xbd))/0x1+parseInt(_0x5cd2c5(0xad))/0x2*(-parseInt(_0x5cd2c5(0xc6))/0x3)+-parseInt(_0x5cd2c5(0x86))/0x4+-parseInt(_0x5cd2c5(0xc9))/0x5*(parseInt(_0x5cd2c5(0xa5))/0x6)+-parseInt(_0x5cd2c5(0x8d))/0x7*(parseInt(_0x5cd2c5(0x9f))/0x8)+parseInt(_0x5cd2c5(0xbe))/0x9*(parseInt(_0x5cd2c5(0x95))/0xa)+parseInt(_0x5cd2c5(0xbf))/0xb*(parseInt(_0x5cd2c5(0x94))/0xc);if(_0x1ea572===_0x405b4a)break;else _0x1346c1['push'](_0x1346c1['shift']());}catch(_0x3be30e){_0x1346c1['push'](_0x1346c1['shift']());}}}(a103_0x3bc2,0x64fc7));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';function a103_0x3bc2(){const _0x39f2f3=['argv','agentDomain','env','cwd','apiDomain','86deFGIX','userDomain','EXDEV','accessKey','local-alias','stdout','pageSize','write','skillDomain','newConfigFileName','apps','FORMAT','host','routing','projectConfig','inherit','71282BxvqkI','1719yATveu','21034519dVlMUn','some','message','raw','stringify','parse','true','6654ZQzwKA','EACCES','ENV','177665AVKSpV','values','riskLevel','join','APP','configFileNames','EPERM','global','project','setRawCommand','object','empty','region','104444lIocmm','locale','setRawMode','skillHubDomain','PAGE_SIZE','setLogPath','runtimeDomain','21553hVwUCc','trim','defaultApp','app','string','code','.tmp','12gvxEbF','7790KFaCge','read','./constant/domain.js','appcode','format','utf8','find','ACCESS_KEY','production','APPCODE','1656aXhDsG','slice','online','stdin','isTTY','nonInteractive','138GJUYaE','error','cache'];a103_0x3bc2=function(){return _0x39f2f3;};return a103_0x3bc2();}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a103_0x308ef5(0xce)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a103_0x308ef5(0xb6)];function resolveConfigPath(_0x559f41){for(const _0x245ea0 of CONFIG_NAMES){const _0x1bef9f=resolve(_0x559f41,_0x245ea0);if(existsSync(_0x1bef9f))return _0x1bef9f;}return undefined;}export function resolveWriteConfigPath(_0x366954){const _0x14cced=a103_0x308ef5,_0x3fbc97=_0x366954===_0x14cced(0xd1)?process[_0x14cced(0xab)]():homedir(),_0x3b2a89=resolveConfigPath(_0x3fbc97);return _0x3b2a89??resolve(_0x3fbc97,NEW_CONFIG_NAME);}export function readConfigFile(_0x19a3ad){const _0x3a4b34=a103_0x308ef5;try{if(existsSync(_0x19a3ad)){const _0x357d9a=readFileSync(_0x19a3ad,{'encoding':_0x3a4b34(0x9a)});if(_0x357d9a){const _0x289dbd=JSON[_0x3a4b34(0xc4)](_0x357d9a);return migrateOnlineEnv(_0x19a3ad,_0x289dbd),_0x289dbd;}}}catch{}return{};}function migrateOnlineEnv(_0x14b503,_0x2ad7e4){const _0x3fb55c=a103_0x308ef5;let _0x23e292=![];_0x2ad7e4['env']===_0x3fb55c(0xa1)&&(_0x2ad7e4[_0x3fb55c(0xaa)]=_0x3fb55c(0x9d),_0x23e292=!![]);if(_0x2ad7e4[_0x3fb55c(0xb7)]&&typeof _0x2ad7e4[_0x3fb55c(0xb7)]===_0x3fb55c(0x83))for(const _0x7e7930 of Object[_0x3fb55c(0xca)](_0x2ad7e4[_0x3fb55c(0xb7)])){_0x7e7930&&_0x7e7930[_0x3fb55c(0xaa)]===_0x3fb55c(0xa1)&&(_0x7e7930[_0x3fb55c(0xaa)]='production',_0x23e292=!![]);}if(_0x23e292)try{writeConfigFile(_0x14b503,_0x2ad7e4);}catch{}}export function writeConfigFile(_0x54a140,_0x51f60f){const _0x1edd6e=a103_0x308ef5,_0x3d3197=dirname(_0x54a140);!existsSync(_0x3d3197)&&mkdirSync(_0x3d3197,{'recursive':!![]});const _0x5e30ae=_0x54a140+_0x1edd6e(0x93);try{writeFileSync(_0x5e30ae,JSON['stringify'](_0x51f60f,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5e30ae,_0x54a140);}catch(_0x41360e){if(_0x41360e['code']===_0x1edd6e(0xcf)||_0x41360e[_0x1edd6e(0x92)]===_0x1edd6e(0xaf)||_0x41360e['code']===_0x1edd6e(0xc7)){writeFileSync(_0x54a140,JSON[_0x1edd6e(0xc3)](_0x51f60f,null,0x2)+'\x0a',{'encoding':_0x1edd6e(0x9a)});try{unlinkSync(_0x5e30ae);}catch{}}else throw _0x41360e;}}catch(_0x4369ba){try{unlinkSync(_0x5e30ae);}catch{}throw _0x4369ba;}}export function isNonInteractiveMode(_0x36a0c7){const _0x4cd9e2=a103_0x308ef5;return!!(_0x36a0c7[_0x4cd9e2(0xa4)]||_0x36a0c7['ci']||productEnvNames('CI')[_0x4cd9e2(0xc0)](_0x1fe9d7=>process.env[_0x1fe9d7]==='true')||process.env.CI===_0x4cd9e2(0xc5)||!process[_0x4cd9e2(0xb2)][_0x4cd9e2(0xa3)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x40cf92=a103_0x308ef5;if(!process[_0x40cf92(0xa2)][_0x40cf92(0xa3)])return![];try{const _0x3a3f24=process[_0x40cf92(0xa2)]['isRaw'];return process[_0x40cf92(0xa2)][_0x40cf92(0x88)](!![]),process[_0x40cf92(0xa2)][_0x40cf92(0x88)](_0x3a3f24??![]),!![];}catch{return![];}}function a103_0x444e(_0x3eaf3c,_0x5a12e5){_0x3eaf3c=_0x3eaf3c-0x83;const _0x3bc24d=a103_0x3bc2();let _0x444e50=_0x3bc24d[_0x3eaf3c];return _0x444e50;}export async function createContext(_0x353b2f){const _0x3d626e=a103_0x308ef5,_0x130dc8=readRawConfig(),_0x5c3c4b=buildConfig(_0x130dc8,_0x353b2f);await initGlobalEnvironment(_0x5c3c4b);const {getUserDomain:_0x2d1902,getApiDomain:_0x1a4b6f}=await import(_0x3d626e(0x97)),_0x5f3cdf={'apiDomain':_0x1a4b6f(),'userDomain':_0x2d1902()},_0x508d77=await buildAuth(_0x5c3c4b);logger[_0x3d626e(0x8b)](process[_0x3d626e(0xab)]());const _0x1713e0=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x3d626e(0xa8)][_0x3d626e(0xa0)](0x2))[_0x3d626e(0xcc)]('\x20'))[_0x3d626e(0x8e)]();logger[_0x3d626e(0xd2)](_0x1713e0);const _0x400bad=isNonInteractiveMode(_0x353b2f);return{'config':_0x5c3c4b,'auth':_0x508d77,'logger':logger,'env':_0x5f3cdf,'nonInteractive':_0x400bad};}export function buildConfigFromFlags(_0x214760){return buildConfig(readRawConfig(),_0x214760);}export function getLocalAppAliases(_0x2c9cc7){const _0x53896d=a103_0x308ef5;return _0x2c9cc7[_0x53896d(0xb7)]&&typeof _0x2c9cc7['apps']==='object'?_0x2c9cc7[_0x53896d(0xb7)]:{};}export function resolveLocalAppAliasCode(_0x1db621,_0x427a89){const _0x3004a7=a103_0x308ef5;if(!_0x427a89)return undefined;const _0x401788=getLocalAppAliases(_0x1db621)[_0x427a89],_0x36f54c=_0x401788?.[_0x3004a7(0x98)];return typeof _0x36f54c===_0x3004a7(0x91)&&_0x36f54c[_0x3004a7(0x8e)]()?_0x36f54c[_0x3004a7(0x8e)]():undefined;}export function readAppCodeFromConfig(){const _0x19a266=a103_0x308ef5,_0x2d76c0=readRawConfig(),_0x471e02=_0x2d76c0[_0x19a266(0x98)]??_0x2d76c0[_0x19a266(0x90)];if(typeof _0x471e02===_0x19a266(0x91)&&_0x471e02[_0x19a266(0x8e)]())return _0x471e02['trim']();const _0xf71387=resolveLocalAppAliasCode(_0x2d76c0,typeof _0x2d76c0[_0x19a266(0x8f)]==='string'?_0x2d76c0['defaultApp']:undefined);if(_0xf71387)return _0xf71387;const _0x45314d=normalizeEnv(String(_0x2d76c0[_0x19a266(0xaa)]||_0x19a266(0x9d))),_0x26d447=isDaily(_0x45314d)?'daily':isDev(_0x45314d)?'development':_0x19a266(0x9d),_0x16f861=resolveCachedAppCode(typeof _0x2d76c0[_0x19a266(0x8f)]===_0x19a266(0x91)?_0x2d76c0[_0x19a266(0x8f)]:undefined,_0x26d447,typeof _0x2d76c0[_0x19a266(0xb0)]==='string'?_0x2d76c0[_0x19a266(0xb0)]:undefined);if(_0x16f861)return _0x16f861;const _0x197364=Object[_0x19a266(0xca)](getLocalAppAliases(_0x2d76c0))[_0x19a266(0x9b)](_0x5c3cb3=>_0x5c3cb3?.[_0x19a266(0x98)]);return typeof _0x197364?.[_0x19a266(0x98)]===_0x19a266(0x91)&&_0x197364[_0x19a266(0x98)][_0x19a266(0x8e)]()?_0x197364[_0x19a266(0x98)][_0x19a266(0x8e)]():undefined;}export function readScopedConfig(_0x3cd577){const _0x20e45e=a103_0x308ef5,_0x204686=_0x3cd577[_0x20e45e(0xd0)]?_0x20e45e(0xd0):'project';return readConfigFile(resolveWriteConfigPath(_0x204686));}export function writeScopedConfig(_0x14e46a,_0x170fb4){const _0xbfa851=a103_0x308ef5,_0x20ec82=_0x170fb4[_0xbfa851(0xd0)]?_0xbfa851(0xd0):_0xbfa851(0xd1);writeConfigFile(resolveWriteConfigPath(_0x20ec82),_0x14e46a);}export async function initGlobalEnvironment(_0x598a48){const _0x48727a=a103_0x308ef5,{initEnv:_0x1f43b3}=await import('./constant/env.js');_0x1f43b3(_0x598a48[_0x48727a(0xaa)]);const {initDomains:_0x3877fe}=await import(_0x48727a(0x97)),_0x303fee=resolveEnterpriseRoutingConfig(_0x598a48[_0x48727a(0xc2)][_0x48727a(0xba)]);_0x3877fe({'apiDomain':_0x303fee?_0x303fee[_0x48727a(0xac)]:_0x598a48[_0x48727a(0xc2)][_0x48727a(0xac)]||_0x598a48[_0x48727a(0xc2)][_0x48727a(0xb9)]||undefined,'userDomain':_0x303fee?_0x303fee['userDomain']:_0x598a48[_0x48727a(0xc2)][_0x48727a(0xae)]||undefined,'runtimeDomain':_0x303fee?_0x303fee[_0x48727a(0x8c)]:_0x598a48['raw'][_0x48727a(0x8c)]||undefined,'skillDomain':_0x303fee?_0x303fee[_0x48727a(0xb5)]:_0x598a48[_0x48727a(0xc2)][_0x48727a(0xb5)]||_0x598a48['raw'][_0x48727a(0x89)]||_0x598a48[_0x48727a(0xc2)][_0x48727a(0xa9)]||_0x598a48[_0x48727a(0xc2)]['platformDomain']||undefined,'region':normalizeLovrabetRegion(_0x598a48[_0x48727a(0xc2)][_0x48727a(0x85)])});}export function getProjectConfigPath(){const _0x4fd6c1=a103_0x308ef5;return resolveConfigPath(process[_0x4fd6c1(0xab)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3763a1){const _0x52b6cf=a103_0x308ef5;if(!existsSync(_0x3763a1))return{'status':'missing'};try{const _0xb35d5b=readFileSync(_0x3763a1,{'encoding':_0x52b6cf(0x9a)});if(!_0xb35d5b?.[_0x52b6cf(0x8e)]())return{'status':_0x52b6cf(0x84)};const _0x54ff56=JSON['parse'](_0xb35d5b);return{'status':'ok','data':_0x54ff56};}catch(_0x23e7fe){return{'status':_0x52b6cf(0xa6),'message':_0x23e7fe instanceof Error?_0x23e7fe[_0x52b6cf(0xc1)]:String(_0x23e7fe)};}}export function loadRawConfigLayers(_0x10e3f6){const _0x8474fc=a103_0x308ef5;let _0x1f7dda={},_0x5c0ede={},_0x1e7d00,_0x19ef14;try{_0x1e7d00=resolveConfigPath(homedir());if(_0x1e7d00){const _0x240136=readFileSync(_0x1e7d00,{'encoding':_0x8474fc(0x9a)});if(_0x240136)_0x1f7dda=JSON[_0x8474fc(0xc4)](_0x240136);}}catch{}try{const _0x11878d=_0x10e3f6||process[_0x8474fc(0xab)]();_0x19ef14=resolveConfigPath(_0x11878d);if(_0x19ef14){const _0x188a4f=readFileSync(_0x19ef14,{'encoding':_0x8474fc(0x9a)});if(_0x188a4f)_0x5c0ede=JSON[_0x8474fc(0xc4)](_0x188a4f);}}catch{}return{'globalPath':_0x1e7d00,'projectPath':_0x19ef14,'globalConfig':_0x1f7dda,'projectConfig':_0x5c0ede};}function mergeRawConfigLayers(_0x2649d6){const _0x2135fa=a103_0x308ef5,{globalConfig:_0x1cf934,projectConfig:_0x5230f4}=_0x2649d6,_0x2668f1={..._0x1cf934,..._0x5230f4};delete _0x2668f1[_0x2135fa(0xbc)];if(_0x2135fa(0x8f)in _0x5230f4)_0x2668f1[_0x2135fa(0x8f)]=_0x5230f4[_0x2135fa(0x8f)];else _0x1cf934[_0x2135fa(0x8f)]&&(_0x2668f1[_0x2135fa(0x8f)]=_0x1cf934[_0x2135fa(0x8f)]);return _0x2668f1;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2a6064){return mergeRawConfigLayers(loadRawConfigLayers(_0x2a6064));}export function readRawConfigWithLayers(_0x59a428){const _0xde0c88=loadRawConfigLayers(_0x59a428);return{'config':mergeRawConfigLayers(_0xde0c88),'layers':_0xde0c88};}export function resolveDefaultAppSource(_0x28278b){const _0x502628=a103_0x308ef5;if(_0x502628(0x8f)in _0x28278b[_0x502628(0xbb)])return _0x502628(0xd1);if(_0x28278b['globalConfig']['defaultApp'])return _0x502628(0xd0);return null;}function buildConfig(_0x37efad,_0x4f5916){const _0x14c58f=a103_0x308ef5,_0xb9532b=_0x37efad['defaultApp']||undefined,_0x1e8a66=_0x4f5916[_0x14c58f(0x90)]||env(_0x14c58f(0xcd))||undefined,_0x34a4c1=_0x1e8a66||_0xb9532b||undefined,_0x567256=env(_0x14c58f(0x9c))||_0x37efad[_0x14c58f(0xb0)]||undefined,_0x3a2f1c=_0x4f5916[_0x14c58f(0xaa)]||env(_0x14c58f(0xc8))||_0x37efad[_0x14c58f(0xaa)]||DEFAULT_CONFIG_VALUES[_0x14c58f(0xaa)],_0x371c65=normalizeEnv(String(_0x3a2f1c)),_0x45afdc=isDaily(_0x371c65)?'daily':isDev(_0x371c65)?'development':'production',_0x191237=typeof _0x4f5916[_0x14c58f(0x98)]===_0x14c58f(0x91)?_0x4f5916[_0x14c58f(0x98)]:undefined,_0x2066c=env(_0x14c58f(0x9e)),_0x9fd1dc=_0x1e8a66?undefined:_0x37efad['appcode']||_0x37efad[_0x14c58f(0x90)]||undefined,_0x239848=_0x1e8a66||(_0x9fd1dc?undefined:_0xb9532b),_0x5b90e1=resolveLocalAppAliasCode(_0x37efad,_0x239848),_0x3c550d=resolveCachedAppCode(_0x239848,_0x45afdc,_0x567256),_0x3447c4=_0x191237||_0x2066c||_0x9fd1dc||_0x5b90e1||_0x3c550d||undefined,_0x5f4aec=_0x191237?'explicit':_0x2066c?_0x14c58f(0xaa):_0x9fd1dc?'top-level':_0x5b90e1?_0x14c58f(0xb1):_0x3c550d?_0x14c58f(0xa7):undefined,_0x546949=_0x37efad[_0x14c58f(0x87)]||DEFAULT_CONFIG_VALUES['locale'],_0x295bf1=undefined,_0x1e9608=_0x4f5916[_0x14c58f(0x99)]||env(_0x14c58f(0xb8))||_0x37efad[_0x14c58f(0x99)],_0x33f366=normalizeLegacyOutputFormat(_0x1e9608),_0x5c8f25=env(_0x14c58f(0x8a))||_0x37efad[_0x14c58f(0xb3)],_0x579598=_0x5c8f25?Number(_0x5c8f25)||undefined:undefined,_0x395740=_0x37efad[_0x14c58f(0xcb)],_0x3b936b=_0x395740===_0x14c58f(0x96)||_0x395740===_0x14c58f(0xb4)||_0x395740==='high-risk-write'?_0x395740:DEFAULT_CONFIG_VALUES[_0x14c58f(0xcb)],_0x443364=_0x37efad['nativeToolAvailable']===!![],_0x1cd0f7=env('VERBOSE'),_0x108057=_0x1cd0f7==='1'||_0x1cd0f7==='true';return{'appCode':typeof _0x3447c4===_0x14c58f(0x91)&&_0x3447c4[_0x14c58f(0x8e)]()?_0x3447c4['trim']():undefined,'appCodeSource':_0x5f4aec,'env':_0x45afdc,'locale':_0x546949,'cookie':_0x295bf1,'accessKey':_0x567256,'format':_0x33f366,'pageSize':_0x579598,'riskLevel':_0x3b936b,'nativeToolAvailable':_0x443364,'verbose':_0x108057,'defaultApp':_0xb9532b,'currentApp':typeof _0x34a4c1===_0x14c58f(0x91)?_0x34a4c1:undefined,'raw':_0x37efad};}function env(_0x5235f2){return productEnv(_0x5235f2);}async function buildAuth(_0x127a0d){const _0x41b36b=a103_0x308ef5,_0x3d033d='',_0x5553ad=!!_0x127a0d[_0x41b36b(0xb0)];return{'cookie':_0x3d033d,'isLoggedIn':_0x5553ad,async 'getOrLogin'(){if(_0x5553ad)return _0x3d033d;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -339,6 +339,81 @@ export interface LoginUserInfo {
|
|
|
339
339
|
email?: string | null;
|
|
340
340
|
[key: string]: unknown;
|
|
341
341
|
}
|
|
342
|
+
/** Runtime approval task returned by the current task APIs. */
|
|
343
|
+
export interface ApprovalFlowTaskItem {
|
|
344
|
+
id?: string;
|
|
345
|
+
name?: string;
|
|
346
|
+
taskDefinitionKey?: string;
|
|
347
|
+
assignee?: string;
|
|
348
|
+
assigneeName?: string;
|
|
349
|
+
transferCandidates?: Array<{
|
|
350
|
+
userId?: string;
|
|
351
|
+
userName?: string;
|
|
352
|
+
}>;
|
|
353
|
+
processInstanceId?: string;
|
|
354
|
+
flowCode?: string;
|
|
355
|
+
flowName?: string;
|
|
356
|
+
appCode?: string;
|
|
357
|
+
initiatorUserId?: string;
|
|
358
|
+
initiatorUsername?: string;
|
|
359
|
+
datasetCode?: string;
|
|
360
|
+
pageId?: number;
|
|
361
|
+
operationType?: string;
|
|
362
|
+
dataId?: unknown;
|
|
363
|
+
detailUrl?: string;
|
|
364
|
+
taskStatus?: string;
|
|
365
|
+
processStatus?: string;
|
|
366
|
+
createTime?: number;
|
|
367
|
+
endTime?: number;
|
|
368
|
+
processStartTime?: number;
|
|
369
|
+
[key: string]: unknown;
|
|
370
|
+
}
|
|
371
|
+
/** Page envelope returned by `GET /api/approve/todo`. */
|
|
372
|
+
export interface ApprovalFlowTodoPage {
|
|
373
|
+
records: ApprovalFlowTaskItem[];
|
|
374
|
+
currentPage?: number;
|
|
375
|
+
pageSize?: number;
|
|
376
|
+
totalCount?: number;
|
|
377
|
+
totalPages?: number;
|
|
378
|
+
[key: string]: unknown;
|
|
379
|
+
}
|
|
380
|
+
/** Task detail returned by `GET /api/flow/task/{taskId}`. */
|
|
381
|
+
export interface ApprovalFlowTaskDetail {
|
|
382
|
+
id?: string;
|
|
383
|
+
name?: string;
|
|
384
|
+
taskDefinitionKey?: string;
|
|
385
|
+
assignee?: string;
|
|
386
|
+
assigneeName?: string;
|
|
387
|
+
processInstanceId?: string;
|
|
388
|
+
appCode?: string;
|
|
389
|
+
dataId?: unknown;
|
|
390
|
+
createTime?: number;
|
|
391
|
+
endTime?: number;
|
|
392
|
+
status?: string;
|
|
393
|
+
canHandle?: boolean;
|
|
394
|
+
canCancel?: boolean;
|
|
395
|
+
transferCandidates?: Array<{
|
|
396
|
+
userId?: string;
|
|
397
|
+
userName?: string;
|
|
398
|
+
}>;
|
|
399
|
+
formData?: Record<string, unknown>;
|
|
400
|
+
identityLinks?: Array<Record<string, unknown>>;
|
|
401
|
+
timeline?: Record<string, unknown>;
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
}
|
|
404
|
+
/** Request body accepted by `POST /api/flow/approve`. */
|
|
405
|
+
export interface ApprovalFlowApproveInput {
|
|
406
|
+
taskId: string;
|
|
407
|
+
approved: boolean;
|
|
408
|
+
comment?: string;
|
|
409
|
+
variables?: Record<string, unknown>;
|
|
410
|
+
}
|
|
411
|
+
/** Request body accepted by `POST /api/flow/task/transfer`. */
|
|
412
|
+
export interface ApprovalFlowTransferInput {
|
|
413
|
+
taskId: string;
|
|
414
|
+
targetUserId: string;
|
|
415
|
+
comment?: string;
|
|
416
|
+
}
|
|
342
417
|
export type RuntimeScheduleKind = "CRON" | "ONCE";
|
|
343
418
|
export type RuntimeScheduleModel = "kimi/k3" | "deepseek-v4-flash-0731" | "deepseek-v4-pro-0813";
|
|
344
419
|
export type RuntimeScheduleTaskStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
@@ -377,6 +452,14 @@ export interface RuntimeScheduleRun {
|
|
|
377
452
|
taskId: string;
|
|
378
453
|
status: "QUEUED";
|
|
379
454
|
}
|
|
455
|
+
/** Lists the current user's approval tasks. */
|
|
456
|
+
export declare function listApprovalTodo(appCode: string, currentPage?: number, pageSize?: number): Promise<ApprovalFlowTodoPage>;
|
|
457
|
+
/** Fetches one approval task detail for the AccessKey-authenticated user. */
|
|
458
|
+
export declare function getApprovalTaskDetail(taskId: string): Promise<ApprovalFlowTaskDetail>;
|
|
459
|
+
/** Approves or rejects one approval task. */
|
|
460
|
+
export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<unknown>;
|
|
461
|
+
/** Transfers one approval task to a Runtime-authorized target user. */
|
|
462
|
+
export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<unknown>;
|
|
380
463
|
/** Fetches the current user's app list from the remote API. */
|
|
381
464
|
export declare function getMyApps(): Promise<RemoteAppItem[]>;
|
|
382
465
|
/**
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a103_0x53f4d0=a103_0x4f64;(function(_0x2e9a04,_0x41368f){const _0x3dbc8a=a103_0x4f64,_0x32766e=_0x2e9a04();while(!![]){try{const _0x1831a5=-parseInt(_0x3dbc8a(0x267))/0x1*(parseInt(_0x3dbc8a(0x228))/0x2)+parseInt(_0x3dbc8a(0x217))/0x3+parseInt(_0x3dbc8a(0x23d))/0x4+parseInt(_0x3dbc8a(0x1e2))/0x5+parseInt(_0x3dbc8a(0x243))/0x6*(-parseInt(_0x3dbc8a(0x283))/0x7)+-parseInt(_0x3dbc8a(0x29a))/0x8*(-parseInt(_0x3dbc8a(0x26d))/0x9)+-parseInt(_0x3dbc8a(0x248))/0xa*(parseInt(_0x3dbc8a(0x1f6))/0xb);if(_0x1831a5===_0x41368f)break;else _0x32766e['push'](_0x32766e['shift']());}catch(_0x32db38){_0x32766e['push'](_0x32766e['shift']());}}}(a103_0x2c29,0xe5df6));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x4cd41e){_activeAK=_0x4cd41e||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x3f60b4){const _0x16ab2c=a103_0x4f64;for(const _0x430bc5 of _0x3f60b4){if(typeof _0x430bc5===_0x16ab2c(0x27e)&&_0x430bc5[_0x16ab2c(0x203)]())return _0x430bc5[_0x16ab2c(0x203)]();}return undefined;}async function decodeResponseBody(_0xb21439){const _0xb53ce1=a103_0x4f64;if(typeof _0xb21439[_0xb53ce1(0x292)]==='function')try{const _0x313530=await _0xb21439[_0xb53ce1(0x292)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x313530),'text':_0x313530};}catch{return{'isJson':![],'text':_0x313530[_0xb53ce1(0x203)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0xb21439[_0xb53ce1(0x235)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x2dbf79,_0x314df9,_0x3d38ac){const _0x48af3a=a103_0x4f64,_0x984f84=_0x314df9&&typeof _0x314df9===_0x48af3a(0x214)?_0x314df9:{},_0x4bdf71=[_0x984f84[_0x48af3a(0x261)],_0x984f84[_0x48af3a(0x262)]][_0x48af3a(0x26b)](_0x2865b6=>Number(_0x2865b6)===0x1ad),_0x410d7a=createRateLimitError({'status':_0x2dbf79[_0x48af3a(0x261)]===0x1ad?_0x2dbf79[_0x48af3a(0x261)]:_0x4bdf71??_0x2dbf79[_0x48af3a(0x261)],'errorCode':firstString(_0x984f84[_0x48af3a(0x226)],typeof _0x984f84[_0x48af3a(0x262)]==='string'?_0x984f84[_0x48af3a(0x262)]:undefined),'message':firstString(_0x984f84[_0x48af3a(0x29c)],_0x984f84['message'],_0x984f84[_0x48af3a(0x260)],_0x3d38ac),'retryAfter':readRetryAfter(_0x2dbf79[_0x48af3a(0x274)])??readRetryAfterSeconds(_0x314df9)});if(_0x410d7a)throw _0x410d7a;}async function apiRequest(_0xf52059,_0x1aef0f={}){const _0x968adb=a103_0x4f64,{method:method=_0x968adb(0x28e),body:_0x4fb305,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x968adb(0x29b)}=_0x1aef0f,_0x5cbba9=_activeAK,_0x4d353b=domain===_0x968adb(0x282)?getApiDomain():getRuntimeDomain();if(!_0x5cbba9)throw CliErrors[_0x968adb(0x1ef)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x968adb(0x288)]+'.');const _0x1872bc=''+_0x4d353b+_0xf52059,_0x20d673={'X-User-AK':_0x5cbba9},_0x4a2090=new AbortController(),_0x22f112=setTimeout(()=>_0x4a2090[_0x968adb(0x24b)](),timeout);try{const _0xfd61f0=await fetch(_0x1872bc,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x968adb(0x1f2)],..._0x20d673,...headers},'body':_0x4fb305?JSON[_0x968adb(0x20d)](_0x4fb305):undefined,'signal':_0x4a2090[_0x968adb(0x26a)]}),_0x550edb=await decodeResponseBody(_0xfd61f0);if(!_0x550edb[_0x968adb(0x1f5)]){throwIfRateLimited(_0xfd61f0,undefined,_0x550edb[_0x968adb(0x292)]);throw CliErrors['apiError'](_0x968adb(0x252)+_0xfd61f0[_0x968adb(0x261)]+')',_0xfd61f0[_0x968adb(0x261)]>=0x190?_0x968adb(0x1e4):undefined);}const _0x4f6909=_0x550edb[_0x968adb(0x29f)];throwIfRateLimited(_0xfd61f0,_0x4f6909);if(!_0xfd61f0['ok']||_0x4f6909['success']===![])throw CliErrors[_0x968adb(0x257)](_0x4f6909['errorMsg']||_0x4f6909[_0x968adb(0x200)]||'API\x20error:\x20'+_0xfd61f0[_0x968adb(0x261)],_0x4f6909[_0x968adb(0x226)]?'API\x20error\x20code:\x20'+_0x4f6909['errorCode']:undefined);return _0x4f6909;}catch(_0x1c7afc){if(_0x1c7afc instanceof Error&&_0x1c7afc['name']==='AbortError')throw CliErrors[_0x968adb(0x257)](_0x968adb(0x23b)+_0x1872bc);throw _0x1c7afc;}finally{clearTimeout(_0x22f112);}}async function apiBinaryRequest(_0x491973,_0x4a545d={}){const _0xb088db=a103_0x4f64,{method:method=_0xb088db(0x28e),headers:headers={},timeout:timeout=0x7530}=_0x4a545d,_0x138bec=_activeAK,_0x212ab9=getRuntimeDomain();if(!_0x138bec)throw CliErrors['authRequired'](_0xb088db(0x242)+PRODUCT_CONFIG[_0xb088db(0x288)]+'.');const _0x4ee1fe=''+_0x212ab9+_0x491973,_0x52831b=new AbortController(),_0x10c7d9=setTimeout(()=>_0x52831b['abort'](),timeout);try{const _0xc1ee9a=await fetch(_0x4ee1fe,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x138bec,...headers},'signal':_0x52831b[_0xb088db(0x26a)]});if(!_0xc1ee9a['ok']){const _0x2ad9a0=await decodeResponseBody(_0xc1ee9a),_0x239122=_0x2ad9a0['data']&&typeof _0x2ad9a0[_0xb088db(0x29f)]===_0xb088db(0x214)?_0x2ad9a0[_0xb088db(0x29f)]:{},_0x2b002e=firstString(_0x239122[_0xb088db(0x29c)],_0x239122[_0xb088db(0x200)],_0x239122[_0xb088db(0x226)],_0x2ad9a0[_0xb088db(0x292)]);throwIfRateLimited(_0xc1ee9a,_0x2ad9a0[_0xb088db(0x29f)],_0x2b002e);throw CliErrors[_0xb088db(0x257)](_0x2b002e||'API\x20error:\x20'+_0xc1ee9a[_0xb088db(0x261)],_0xb088db(0x24f)+_0x4ee1fe);}return Buffer[_0xb088db(0x23e)](await _0xc1ee9a['arrayBuffer']());}catch(_0x2a0647){if(_0x2a0647 instanceof Error&&_0x2a0647['name']===_0xb088db(0x258))throw CliErrors[_0xb088db(0x257)](_0xb088db(0x23b)+_0x4ee1fe);throw _0x2a0647;}finally{clearTimeout(_0x10c7d9);}}async function apiFormRequest(_0x50e512,_0x4fc6f5,_0x4b5d4c={}){const _0x5ae31f=a103_0x4f64,{timeout:timeout=0x7530}=_0x4b5d4c,_0x1ecede=_activeAK,_0x3876a5=getRuntimeDomain();if(!_0x1ecede)throw CliErrors[_0x5ae31f(0x1ef)](_0x5ae31f(0x242)+PRODUCT_CONFIG[_0x5ae31f(0x288)]+'.');const _0x57ee4c=''+_0x3876a5+_0x50e512,_0x4760a2=new AbortController(),_0x255a45=setTimeout(()=>_0x4760a2[_0x5ae31f(0x24b)](),timeout);try{const _0x12da99=await fetch(_0x57ee4c,{'method':_0x5ae31f(0x1f4),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x5ae31f(0x1f2)],'X-User-AK':_0x1ecede},'body':_0x4fc6f5,'signal':_0x4760a2[_0x5ae31f(0x26a)]}),_0x3165fe=await decodeResponseBody(_0x12da99);if(!_0x3165fe['isJson']){throwIfRateLimited(_0x12da99,undefined,_0x3165fe[_0x5ae31f(0x292)]);throw CliErrors['apiError'](_0x5ae31f(0x252)+_0x12da99[_0x5ae31f(0x261)]+')',_0x12da99['status']>=0x190?_0x5ae31f(0x1e4):undefined);}const _0x957c5b=_0x3165fe['data'];throwIfRateLimited(_0x12da99,_0x957c5b);if(!_0x12da99['ok']||_0x957c5b[_0x5ae31f(0x215)]===![])throw CliErrors[_0x5ae31f(0x257)](_0x957c5b[_0x5ae31f(0x29c)]||_0x957c5b[_0x5ae31f(0x200)]||_0x5ae31f(0x271)+_0x12da99[_0x5ae31f(0x261)],_0x957c5b[_0x5ae31f(0x226)]?'API\x20error\x20code:\x20'+_0x957c5b[_0x5ae31f(0x226)]:undefined);return _0x957c5b;}catch(_0xfbe55e){if(_0xfbe55e instanceof Error&&_0xfbe55e[_0x5ae31f(0x1ed)]===_0x5ae31f(0x258))throw CliErrors['apiError'](_0x5ae31f(0x23b)+_0x57ee4c);throw _0xfbe55e;}finally{clearTimeout(_0x255a45);}}async function toolboxRequest(_0x46efe2,_0x26cd08,_0x2e7ad3={}){const _0x37c7da=a103_0x4f64,{method:method=_0x37c7da(0x28e),headers:headers={},timeout:timeout=0x7530}=_0x2e7ad3,_0x52a1b0=_activeAK;if(!_0x52a1b0)throw CliErrors[_0x37c7da(0x1ef)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x37c7da(0x288)]+'.');const _0x315af6=getApiDomain()['replace'](/\/$/,''),_0x53ae59=new URL(_0x46efe2,_0x315af6+_0x37c7da(0x21f));if(_0x26cd08)for(const [_0x38b92a,_0x2bb2d2]of Object['entries'](_0x26cd08)){_0x2bb2d2!==undefined&&_0x2bb2d2!==null&&_0x53ae59[_0x37c7da(0x216)][_0x37c7da(0x1e1)](_0x38b92a,String(_0x2bb2d2));}const _0x3a3b80=new AbortController(),_0x47e15e=setTimeout(()=>_0x3a3b80['abort'](),timeout);try{const _0x2e5805=await fetch(_0x53ae59,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x37c7da(0x1f2)],'X-User-AK':_0x52a1b0,...headers},'signal':_0x3a3b80[_0x37c7da(0x26a)]}),_0x5d300c=await decodeResponseBody(_0x2e5805);if(!_0x5d300c['isJson']){throwIfRateLimited(_0x2e5805,undefined,_0x5d300c['text']);throw CliErrors['apiError']('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2e5805[_0x37c7da(0x261)]+')',_0x2e5805['status']>=0x190?_0x37c7da(0x1e4):undefined);}const _0x4fc75e=_0x5d300c[_0x37c7da(0x29f)];throwIfRateLimited(_0x2e5805,_0x4fc75e);if(!_0x2e5805['ok']){const _0x566440=_0x4fc75e&&typeof _0x4fc75e===_0x37c7da(0x214)?_0x4fc75e:{};throw CliErrors[_0x37c7da(0x257)](_0x566440[_0x37c7da(0x29c)]||_0x566440[_0x37c7da(0x200)]||_0x37c7da(0x1fe)+_0x2e5805['status'],_0x566440['errorCode']?_0x37c7da(0x21d)+_0x566440[_0x37c7da(0x226)]:undefined);}if(_0x4fc75e&&typeof _0x4fc75e===_0x37c7da(0x214)&&'success'in _0x4fc75e&&typeof _0x4fc75e['success']==='boolean'){const _0x3d9752=_0x4fc75e;if(!_0x3d9752[_0x37c7da(0x215)])throw CliErrors[_0x37c7da(0x257)](_0x3d9752[_0x37c7da(0x29c)]||_0x3d9752[_0x37c7da(0x200)]||_0x37c7da(0x27b),_0x3d9752['errorCode']?_0x37c7da(0x21d)+_0x3d9752['errorCode']:undefined);return _0x3d9752[_0x37c7da(0x29f)];}return _0x4fc75e;}catch(_0x173eda){if(_0x173eda instanceof Error&&_0x173eda[_0x37c7da(0x1ed)]==='AbortError')throw CliErrors[_0x37c7da(0x257)]('Request\x20timeout:\x20'+_0x53ae59[_0x37c7da(0x270)]());throw _0x173eda;}finally{clearTimeout(_0x47e15e);}}async function skillHubJsonRequest(_0x3b05d1,_0x3cc184={}){const _0x503ac6=a103_0x4f64,{method:method='GET',query:_0x1e95e0,body:_0x5a7935,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x3cc184,_0x97a665=_activeAK;if(!_0x97a665)throw CliErrors['authRequired'](_0x503ac6(0x242)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x587600=getSkillDomain()['replace'](/\/$/,''),_0x25ae49=new URL(_0x3b05d1,_0x587600+'/');if(_0x1e95e0)for(const [_0x1f4322,_0x15c305]of Object[_0x503ac6(0x27c)](_0x1e95e0)){_0x15c305!==undefined&&_0x15c305!==null&&_0x25ae49[_0x503ac6(0x216)][_0x503ac6(0x1e1)](_0x1f4322,String(_0x15c305));}const _0x305885=new AbortController(),_0x24eb32=setTimeout(()=>_0x305885['abort'](),timeout);try{const _0x509726=await fetch(_0x25ae49[_0x503ac6(0x270)](),{'method':method,'headers':{'Accept':_0x503ac6(0x1eb),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x97a665,...headers},'body':_0x5a7935,'signal':_0x305885[_0x503ac6(0x26a)]}),_0x199215=await decodeResponseBody(_0x509726);if(!_0x199215['isJson']){if(allowNotFound&&_0x509726[_0x503ac6(0x261)]===0x194)return undefined;throwIfRateLimited(_0x509726,undefined,_0x199215[_0x503ac6(0x292)]);throw CliErrors[_0x503ac6(0x257)](_0x503ac6(0x293)+_0x509726[_0x503ac6(0x261)]+')',_0x509726[_0x503ac6(0x261)]>=0x190?_0x503ac6(0x1e4):undefined);}const _0x410209=_0x199215[_0x503ac6(0x29f)];throwIfRateLimited(_0x509726,_0x410209);if(allowNotFound&&isSkillHubNotFoundResponse(_0x509726['status'],_0x410209))return undefined;const _0x5dcaca=!_0x509726['ok']||_0x410209?.[_0x503ac6(0x215)]===![]||typeof _0x410209?.[_0x503ac6(0x262)]===_0x503ac6(0x285)&&_0x410209[_0x503ac6(0x262)]>=0x190;if(_0x5dcaca)throw CliErrors[_0x503ac6(0x257)](_0x410209?.[_0x503ac6(0x29c)]||_0x410209?.['message']||_0x410209?.[_0x503ac6(0x260)]||'SkillHub\x20API\x20error:\x20'+_0x509726[_0x503ac6(0x261)],_0x410209?.['errorCode']?_0x503ac6(0x20c)+_0x410209[_0x503ac6(0x226)]:undefined);return _0x410209?.[_0x503ac6(0x29f)]??_0x410209;}catch(_0x325b6b){if(_0x325b6b instanceof Error&&_0x325b6b[_0x503ac6(0x1ed)]==='AbortError')throw CliErrors[_0x503ac6(0x257)](_0x503ac6(0x23b)+_0x25ae49[_0x503ac6(0x270)]());throw _0x325b6b;}finally{clearTimeout(_0x24eb32);}}function isSkillHubNotFoundResponse(_0x444999,_0x205e21){const _0x3f6cf8=a103_0x4f64;if(_0x444999===0x194||_0x205e21?.['code']===0x194)return!![];if(_0x444999!==0x190&&_0x205e21?.[_0x3f6cf8(0x262)]!==0x190)return![];const _0x553f15=[_0x205e21?.['msg'],_0x205e21?.[_0x3f6cf8(0x200)],_0x205e21?.[_0x3f6cf8(0x29c)],_0x205e21?.['error']][_0x3f6cf8(0x281)](_0x113831=>typeof _0x113831==='string')[_0x3f6cf8(0x207)]('\x20');return/skill not found\b/i[_0x3f6cf8(0x272)](_0x553f15);}async function skillHubBinaryRequest(_0x19e07f,_0x4f9ce1={}){const _0x16e5cd=a103_0x4f64,{query:_0x7d23da,headers:headers={},timeout:timeout=0x7530}=_0x4f9ce1,_0x133987=_activeAK;if(!_0x133987)throw CliErrors[_0x16e5cd(0x1ef)](_0x16e5cd(0x242)+PRODUCT_CONFIG[_0x16e5cd(0x288)]+'.');const _0x2dbc66=getSkillDomain()['replace'](/\/$/,''),_0x530bc3=new URL(_0x19e07f,_0x2dbc66+'/');if(_0x7d23da)for(const [_0x2a101f,_0x3c2a3f]of Object[_0x16e5cd(0x27c)](_0x7d23da)){_0x3c2a3f!==undefined&&_0x3c2a3f!==null&&_0x530bc3[_0x16e5cd(0x216)][_0x16e5cd(0x1e1)](_0x2a101f,String(_0x3c2a3f));}const _0x3b79d7=new AbortController(),_0x55c6d4=setTimeout(()=>_0x3b79d7[_0x16e5cd(0x24b)](),timeout);try{const _0x3dbffe=await fetch(_0x530bc3[_0x16e5cd(0x270)](),{'method':_0x16e5cd(0x28e),'headers':{'Accept':_0x16e5cd(0x25a),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x133987,...headers},'signal':_0x3b79d7[_0x16e5cd(0x26a)]});if(!_0x3dbffe['ok']){const _0x43bd46=await decodeResponseBody(_0x3dbffe),_0xa3f6f0=_0x43bd46[_0x16e5cd(0x29f)]&&typeof _0x43bd46[_0x16e5cd(0x29f)]===_0x16e5cd(0x214)?_0x43bd46[_0x16e5cd(0x29f)]:{},_0x47365e=firstString(_0xa3f6f0['errorMsg'],_0xa3f6f0['message'],_0xa3f6f0[_0x16e5cd(0x260)],_0xa3f6f0[_0x16e5cd(0x226)],_0x43bd46[_0x16e5cd(0x292)]);throwIfRateLimited(_0x3dbffe,_0x43bd46['data'],_0x47365e);throw CliErrors[_0x16e5cd(0x257)](_0x47365e||_0x16e5cd(0x229)+_0x3dbffe[_0x16e5cd(0x261)],_0x16e5cd(0x24f)+_0x530bc3[_0x16e5cd(0x270)]());}return Buffer[_0x16e5cd(0x23e)](await _0x3dbffe[_0x16e5cd(0x21b)]());}catch(_0x252225){if(_0x252225 instanceof Error&&_0x252225[_0x16e5cd(0x1ed)]===_0x16e5cd(0x258))throw CliErrors[_0x16e5cd(0x257)](_0x16e5cd(0x23b)+_0x530bc3[_0x16e5cd(0x270)]());throw _0x252225;}finally{clearTimeout(_0x55c6d4);}}export async function getBffEndpointContract(_0x19ccdc,_0x1784c5){const _0x35b648=a103_0x4f64;if(_0x1784c5===_0x35b648(0x27a))throw CliErrors[_0x35b648(0x278)](_0x35b648(0x25c)+_0x19ccdc+_0x35b648(0x294)+_0x1784c5);const _0x238bb3=await apiRequest(_0x35b648(0x24a)+encodeURIComponent(_0x19ccdc)+'/'+encodeURIComponent(_0x1784c5)),_0x2dbf70=_0x238bb3['data'];if(!_0x2dbf70||typeof _0x2dbf70!==_0x35b648(0x214)||Array[_0x35b648(0x1f9)](_0x2dbf70)||_0x2dbf70['appCode']!==_0x19ccdc||_0x2dbf70['functionName']!==_0x1784c5)throw CliErrors[_0x35b648(0x278)](_0x35b648(0x25c)+_0x19ccdc+_0x35b648(0x294)+_0x1784c5);return{'appCode':_0x2dbf70[_0x35b648(0x27f)],'functionName':_0x2dbf70[_0x35b648(0x1e6)],'description':_0x2dbf70['description'],'version':_0x2dbf70[_0x35b648(0x22b)],'gmtModified':_0x2dbf70[_0x35b648(0x22f)]};}export async function getSqlQueryInfo(_0x30dee5,_0x150155){const _0x32667d=a103_0x4f64,_0x528d23=await apiRequest(_0x32667d(0x280),{'method':'POST','body':{'appCode':_0x30dee5,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x150155}}),_0x557ff3=_0x528d23[_0x32667d(0x29f)],_0x3d07f0=_0x557ff3&&typeof _0x557ff3===_0x32667d(0x214)&&_0x32667d(0x25f)in _0x557ff3?_0x557ff3[_0x32667d(0x25f)]?.[0x0]:_0x557ff3&&typeof _0x557ff3===_0x32667d(0x214)&&_0x32667d(0x213)in _0x557ff3?_0x557ff3:undefined;if(!_0x3d07f0)throw CliErrors[_0x32667d(0x278)]('SQL\x20query\x20not\x20found:\x20'+_0x150155);return _0x3d07f0;}function isRemoteAppItem(_0x23ed1d){const _0x46d225=a103_0x4f64;return!!_0x23ed1d&&typeof _0x23ed1d===_0x46d225(0x214)&&typeof _0x23ed1d[_0x46d225(0x27f)]==='string'&&typeof _0x23ed1d[_0x46d225(0x247)]==='string';}function extractRemoteAppItems(_0x1642e7){const _0x12eeed=a103_0x4f64;if(Array[_0x12eeed(0x1f9)](_0x1642e7))return _0x1642e7['filter'](isRemoteAppItem);if(!_0x1642e7||typeof _0x1642e7!==_0x12eeed(0x214))throw CliErrors[_0x12eeed(0x257)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x1316f9=_0x1642e7;if(Array['isArray'](_0x1316f9['tableData']))return _0x1316f9[_0x12eeed(0x25f)]['filter'](isRemoteAppItem);if(_0x1316f9[_0x12eeed(0x29f)]&&typeof _0x1316f9['data']===_0x12eeed(0x214)){const _0x6df830=_0x1316f9[_0x12eeed(0x29f)];if(Array[_0x12eeed(0x1f9)](_0x6df830[_0x12eeed(0x25f)]))return _0x6df830[_0x12eeed(0x25f)][_0x12eeed(0x281)](isRemoteAppItem);}throw CliErrors['apiError'](_0x12eeed(0x218));}export async function getMyApps(){const _0xfb9693=a103_0x4f64,_0x3338a0=await apiRequest(_0xfb9693(0x20a));return extractRemoteAppItems(_0x3338a0[_0xfb9693(0x29f)]);}export async function getLoginUserInfo(){const _0x4a0fa8=a103_0x4f64,_0x5f9459=await apiRequest('/client/user/loginUserInfo');if(!_0x5f9459[_0x4a0fa8(0x29f)]||typeof _0x5f9459[_0x4a0fa8(0x29f)]!=='object'||Array['isArray'](_0x5f9459[_0x4a0fa8(0x29f)]))throw CliErrors[_0x4a0fa8(0x257)](_0x4a0fa8(0x279));return _0x5f9459[_0x4a0fa8(0x29f)];}export const USER_ACCOUNT_BIND_PATH=a103_0x53f4d0(0x241);export async function bindExternalUserAccount(_0x161470,_0x3f72fb){const _0x37f3cb=a103_0x53f4d0,_0x262e44=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':'POST','body':{'provider':_0x161470,'accountId':_0x3f72fb}});return _0x262e44[_0x37f3cb(0x29f)];}function runtimeSchedulePath(_0x3e78da,_0x3a2028=''){return'/api/harness/apps/'+encodeURIComponent(_0x3e78da)+'/schedules'+_0x3a2028;}export async function validateRuntimeSchedule(_0x31bac2,_0x249bbe){const _0x14d2a0=a103_0x53f4d0,_0x47db39=await apiRequest(runtimeSchedulePath(_0x31bac2,_0x14d2a0(0x287)),{'method':'POST','body':_0x249bbe});return _0x47db39[_0x14d2a0(0x29f)];}export async function createRuntimeSchedule(_0xd1b34a,_0x2ba93f){const _0x284c70=a103_0x53f4d0,_0x3e6a7e=await apiRequest(runtimeSchedulePath(_0xd1b34a),{'method':_0x284c70(0x1f4),'body':_0x2ba93f});return _0x3e6a7e[_0x284c70(0x29f)];}export async function listRuntimeSchedules(_0x29a93e,_0x404dab){const _0xe1fddc=a103_0x53f4d0,_0x599985=new URLSearchParams();_0x599985[_0xe1fddc(0x1e1)](_0xe1fddc(0x239),_0x404dab[_0xe1fddc(0x239)]);if(_0x404dab['limit']!==undefined)_0x599985['set'](_0xe1fddc(0x238),String(_0x404dab[_0xe1fddc(0x238)]));if(_0x404dab['cursor'])_0x599985[_0xe1fddc(0x1e1)](_0xe1fddc(0x255),_0x404dab['cursor']);const _0x7439e8=_0x599985[_0xe1fddc(0x2a0)]>0x0?'?'+_0x599985['toString']():'',_0xe98e7c=await apiRequest(''+runtimeSchedulePath(_0x29a93e)+_0x7439e8);return _0xe98e7c[_0xe1fddc(0x29f)];}export async function getRuntimeSchedule(_0x1181d5,_0x541a7c){const _0x539957=a103_0x53f4d0,_0x21ba96=await apiRequest(runtimeSchedulePath(_0x1181d5,'/'+encodeURIComponent(_0x541a7c)));return _0x21ba96[_0x539957(0x29f)];}export async function deleteRuntimeSchedule(_0x1bf6ee,_0x4b3dc6){const _0x4d645e=a103_0x53f4d0,_0xd17aac=await apiRequest(runtimeSchedulePath(_0x1bf6ee,'/'+encodeURIComponent(_0x4b3dc6)),{'method':_0x4d645e(0x251)});return _0xd17aac['data'];}export async function runRuntimeSchedule(_0xfebc6c,_0x567458){const _0xfd8544=await apiRequest(runtimeSchedulePath(_0xfebc6c,'/'+encodeURIComponent(_0x567458)+'/run'),{'method':'POST'});return _0xfd8544['data'];}export async function listDatasets(_0x11ca89,_0x350a74){const _0x4604f0=a103_0x53f4d0,_0x1b5d71=await apiRequest(_0x4604f0(0x204),{'method':_0x4604f0(0x1f4),'body':{'appCode':_0x11ca89,..._0x350a74?.['code']&&{'code':_0x350a74[_0x4604f0(0x262)]},..._0x350a74?.[_0x4604f0(0x1ed)]&&{'name':_0x350a74['name']}}});return extractList(_0x1b5d71[_0x4604f0(0x29f)]);}export async function getDatasetDetail(_0x4ea356){const _0x54f583=a103_0x53f4d0,_0x16794a=await apiRequest(_0x54f583(0x234)+encodeURIComponent(_0x4ea356));return _0x16794a[_0x54f583(0x29f)];}export async function getDatasetSdkUsageDoc(_0x5067d1,_0x462cfa){const _0x342c4f=a103_0x53f4d0,_0xca20b4=await toolboxRequest(_0x342c4f(0x231),{'datasetCode':_0x5067d1,'appCode':_0x462cfa});return typeof _0xca20b4?.[_0x342c4f(0x1fc)]==='string'?_0xca20b4['markdown']:'';}export async function uploadRuntimeFile(_0x24106e,_0x4709b8){const _0x7cd6ea=a103_0x53f4d0,_0x12fae5=await readFile(_0x4709b8),_0x42ebca=new FormData();_0x42ebca[_0x7cd6ea(0x1e8)](_0x7cd6ea(0x27f),_0x24106e),_0x42ebca[_0x7cd6ea(0x1e8)](_0x7cd6ea(0x264),new Blob([new Uint8Array(_0x12fae5)]),basename(_0x4709b8));const _0x34719e=await apiFormRequest(_0x7cd6ea(0x1f7),_0x42ebca);return _0x34719e[_0x7cd6ea(0x29f)];}export async function queryRuntimeFileUrl(_0x589aa3,_0x4a85ba={}){const _0x159b65=a103_0x53f4d0,_0x58d033=await apiRequest(_0x159b65(0x21c),{'method':'POST','body':{'filePath':_0x589aa3,'downloadFlag':_0x4a85ba[_0x159b65(0x275)]??![],..._0x4a85ba[_0x159b65(0x244)]?{'longTerm':!![]}:{}}});return _0x58d033[_0x159b65(0x29f)];}export async function recognizeRuntimeOcr(_0x293223,_0x405ce4){const _0x19c6ef=a103_0x53f4d0,_0x4e22b9=await apiRequest(_0x19c6ef(0x230),{'method':_0x19c6ef(0x1f4),'body':{'appCode':_0x293223,'url':_0x405ce4[_0x19c6ef(0x225)],'type':_0x405ce4[_0x19c6ef(0x25d)]}});return _0x4e22b9[_0x19c6ef(0x29f)];}export async function getRuntimeAppConfigByKey(_0x553aa5,_0x498ed0){const _0x1a9a4c=a103_0x53f4d0,_0x314198=new URLSearchParams({'appCode':_0x553aa5,'key':_0x498ed0}),_0x2a981b=await apiRequest(_0x1a9a4c(0x29e)+_0x314198['toString']());if(typeof _0x2a981b[_0x1a9a4c(0x29f)]!==_0x1a9a4c(0x27e))throw CliErrors['validation'](_0x1a9a4c(0x233)+_0x498ed0);return _0x2a981b[_0x1a9a4c(0x29f)];}export async function listNotificationChannelConfigs(_0x248523,_0x5d041f){const _0x562cf6=a103_0x53f4d0,_0x8ade28=new URLSearchParams({'appCode':_0x248523,'channelType':_0x5d041f}),_0x2901f1=await apiRequest(_0x562cf6(0x20f)+_0x8ade28['toString']());if(!Array[_0x562cf6(0x1f9)](_0x2901f1[_0x562cf6(0x29f)]))throw CliErrors[_0x562cf6(0x257)]('Invalid\x20notification\x20config\x20list\x20response.',_0x562cf6(0x268));return _0x2901f1[_0x562cf6(0x29f)];}export async function listRuntimeArtifacts(_0xefd96,_0x4c42c6){const _0x203520=a103_0x53f4d0,_0x57eeb3=new URLSearchParams({'appCode':_0xefd96});if(_0x4c42c6?.[_0x203520(0x1e5)])_0x57eeb3['set'](_0x203520(0x1e5),_0x4c42c6['artifactType']);if(_0x4c42c6?.[_0x203520(0x1ee)])_0x57eeb3[_0x203520(0x1e1)](_0x203520(0x1ee),_0x4c42c6[_0x203520(0x1ee)]);if(_0x4c42c6?.[_0x203520(0x263)]!==undefined)_0x57eeb3[_0x203520(0x1e1)](_0x203520(0x263),String(_0x4c42c6['favorite']));const _0x36d9d7=await apiRequest(_0x203520(0x212)+_0x57eeb3[_0x203520(0x270)]());return Array[_0x203520(0x1f9)](_0x36d9d7['data'])?_0x36d9d7[_0x203520(0x29f)]:[];}export async function getRuntimeArtifact(_0xc9114a,_0x5de456){const _0x2c4246=a103_0x53f4d0,_0x26e19b=await apiRequest(_0x2c4246(0x23c)+_0xc9114a+_0x2c4246(0x223)+encodeURIComponent(_0x5de456));if(!_0x26e19b['data'])throw CliErrors[_0x2c4246(0x278)](_0x2c4246(0x1f0)+_0xc9114a);return _0x26e19b[_0x2c4246(0x29f)];}export async function createRuntimeArtifact(_0x5d6cda,_0x25399c){const _0x36a4f7=a103_0x53f4d0,_0x9c49d0=await apiRequest(_0x36a4f7(0x222),{'method':_0x36a4f7(0x1f4),'body':{'appCode':_0x5d6cda,..._0x25399c}});return _0x9c49d0['data'];}export async function updateRuntimeArtifact(_0x82fd62,_0x27b8dc,_0x368283){const _0x4618d7=a103_0x53f4d0,_0xb55a63=await apiRequest(_0x4618d7(0x23c)+_0x82fd62+_0x4618d7(0x28c),{'method':_0x4618d7(0x1f4),'body':{'appCode':_0x27b8dc,..._0x368283}});return _0xb55a63[_0x4618d7(0x29f)];}export async function listPersonalBffs(_0x5145d8){const _0x1220bd=a103_0x53f4d0,_0x27cf34=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x5145d8));return Array[_0x1220bd(0x1f9)](_0x27cf34['data'])?_0x27cf34['data']:[];}export async function getPersonalBff(_0x419b79,_0x4f4681){const _0x5b616b=a103_0x53f4d0,_0x2d5d57=await apiRequest('/client/runtime-bff/personal/'+_0x419b79+_0x5b616b(0x223)+encodeURIComponent(_0x4f4681));if(!_0x2d5d57[_0x5b616b(0x29f)])throw CliErrors[_0x5b616b(0x278)](_0x5b616b(0x265)+_0x419b79);return _0x2d5d57[_0x5b616b(0x29f)];}export async function createPersonalBff(_0x561ad2,_0x49532c){const _0x3f5c4e=a103_0x53f4d0,_0x126944=await apiRequest(_0x3f5c4e(0x28a),{'method':_0x3f5c4e(0x1f4),'body':{'appCode':_0x561ad2,..._0x49532c}});return _0x126944['data'];}export async function updatePersonalBff(_0x3e7c7e,_0x183a83,_0x5e9917){const _0x243132=a103_0x53f4d0,_0x3e1c86=await apiRequest(_0x243132(0x240)+_0x3e7c7e+_0x243132(0x28c),{'method':_0x243132(0x1f4),'body':{'appCode':_0x183a83,..._0x5e9917}});return _0x3e1c86[_0x243132(0x29f)];}export async function executePersonalBff(_0x4068f1,_0x12f6b9,_0x4870ae){const _0x84bcb3=a103_0x53f4d0,_0x3ebc38=await apiRequest('/client/runtime-bff/personal/'+_0x4068f1+_0x84bcb3(0x1e9)+encodeURIComponent(_0x12f6b9),{'method':_0x84bcb3(0x1f4),'body':_0x4870ae});return _0x3ebc38[_0x84bcb3(0x29f)];}export async function listPersonalKnowledgeBaseItems(_0x5d0d51){const _0x4608d3=a103_0x53f4d0,_0x540d07=await apiRequest(_0x4608d3(0x253)+encodeURIComponent(_0x5d0d51));return Array[_0x4608d3(0x1f9)](_0x540d07['data'])?_0x540d07['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x59a255,_0x4ab898){const _0x2d62c4=a103_0x53f4d0,_0xc480af=await apiRequest('/client/knowledge-base/personal/'+_0x59a255+_0x2d62c4(0x223)+encodeURIComponent(_0x4ab898));if(!_0xc480af[_0x2d62c4(0x29f)])throw CliErrors[_0x2d62c4(0x278)](_0x2d62c4(0x27d)+_0x59a255);return _0xc480af[_0x2d62c4(0x29f)];}export async function createPersonalKnowledgeBaseItem(_0x53620d,_0x497b9b){const _0x37f020=a103_0x53f4d0,_0x20ccba=await apiRequest(_0x37f020(0x20e),{'method':_0x37f020(0x1f4),'body':{'appCode':_0x53620d,..._0x497b9b}});return _0x20ccba[_0x37f020(0x29f)];}export async function updatePersonalKnowledgeBaseItem(_0x50a9b5,_0x26247c,_0x604154){const _0x11abb7=a103_0x53f4d0,_0x340596=await apiRequest(_0x11abb7(0x202)+_0x50a9b5+_0x11abb7(0x28c),{'method':_0x11abb7(0x1f4),'body':{'appCode':_0x26247c,..._0x604154}});return _0x340596['data'];}function a103_0x4f64(_0x5333d6,_0x4d96f3){_0x5333d6=_0x5333d6-0x1e1;const _0x2c2938=a103_0x2c29();let _0x4f6461=_0x2c2938[_0x5333d6];return _0x4f6461;}export async function getRuntimeSkillByCode(_0x42a102,_0x1a26a8){const _0x100586=a103_0x53f4d0,_0x54e00c=await skillHubJsonRequest(_0x100586(0x269)+encodeURIComponent(_0x42a102)+'/'+encodeURIComponent(_0x1a26a8),{'allowNotFound':!![]});return _0x54e00c?skillHubRuntimeDetailToRuntimeSkill(_0x54e00c):undefined;}export async function listRuntimeSkills(_0x7955ae){const _0x5a897b=a103_0x53f4d0,_0x52fecf=await skillHubJsonRequest(_0x5a897b(0x1ff)+encodeURIComponent(_0x7955ae[_0x5a897b(0x27f)])+_0x5a897b(0x21e),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x7955ae[_0x5a897b(0x27f)],_0x52fecf,_0x7955ae[_0x5a897b(0x1ea)]??_0x5a897b(0x22d),_0x7955ae[_0x5a897b(0x262)]);}export async function listPersonalRuntimeSkills(_0x426bc8){const _0x47d5c2=a103_0x53f4d0;return(await listRuntimeSkills({'appCode':_0x426bc8,'scope':_0x47d5c2(0x22e)}))['personal'];}export async function listCompanyRuntimeSkills(_0x9ad928){const _0x27e837=a103_0x53f4d0;return(await listRuntimeSkills({'appCode':_0x9ad928,'scope':_0x27e837(0x298)}))[_0x27e837(0x298)];}export async function listVisibleRuntimeSkills(_0x5ecd5a){const _0x23514c=a103_0x53f4d0;return(await listRuntimeSkills({'appCode':_0x5ecd5a,'scope':_0x23514c(0x22d)}))[_0x23514c(0x25b)];}export async function createPersonalRuntimeSkill(_0x2dfc62,_0x11de15,_0x4162f6={}){const _0x149cc2=a103_0x53f4d0;return publishRuntimeSkill(_0x2dfc62,_0x11de15,{'visibility':_0x149cc2(0x256),'confirmWarnings':_0x4162f6[_0x149cc2(0x28b)]});}export async function updatePersonalRuntimeSkill(_0x314bc1,_0x20dbf2,_0x4b0073,_0x31c253={}){const _0x2e0357=a103_0x53f4d0;return publishRuntimeSkill(_0x20dbf2,{..._0x4b0073,'skillCode':_0x4b0073[_0x2e0357(0x209)]??_0x314bc1},{'visibility':_0x2e0357(0x256),'confirmWarnings':_0x31c253[_0x2e0357(0x28b)]});}export async function publishCompanyRuntimeSkill(_0x203ef3,_0x1b7049,_0x1d8b78={}){const _0x369aac=a103_0x53f4d0;return publishRuntimeSkill(_0x203ef3,_0x1b7049,{'visibility':_0x369aac(0x249),'confirmWarnings':_0x1d8b78[_0x369aac(0x28b)]});}export async function validateRuntimeSkillPublish(_0x38623e,_0x49a48a,_0x12f99e){const _0x13af44=a103_0x53f4d0,_0x2ab48f=buildRuntimeSkillPublishForm(_0x49a48a,_0x12f99e[_0x13af44(0x236)]),_0x2056cb=await skillHubJsonRequest(_0x13af44(0x26c)+encodeURIComponent(_0x38623e)+'/publish/validate',{'method':_0x13af44(0x1f4),'body':_0x2ab48f});return assertJointDiagramAcknowledged(_0x49a48a['diagram'],_0x2056cb[_0x13af44(0x276)],_0x13af44(0x278)),{'valid':_0x2056cb[_0x13af44(0x237)]===!![],'errors':Array[_0x13af44(0x1f9)](_0x2056cb[_0x13af44(0x1f1)])?_0x2056cb[_0x13af44(0x1f1)]:[],'warnings':Array[_0x13af44(0x1f9)](_0x2056cb[_0x13af44(0x273)])?_0x2056cb[_0x13af44(0x273)]:[],'resolvedSlug':_0x2056cb[_0x13af44(0x1e7)],'resolvedVersion':_0x2056cb['resolvedVersion'],'diagramValidated':_0x2056cb['diagramValidated']===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x36efc6,_0x4598eb,_0x35aaa7,_0xce11a2,_0x10d163){const _0x4c9eb5=a103_0x53f4d0;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x36efc6,_0x4598eb,_0x35aaa7,_0x4c9eb5(0x287)),{'method':'POST','query':{'scope':_0xce11a2},'headers':{'Content-Type':_0x4c9eb5(0x1eb)},'body':JSON['stringify'](_0x10d163)});}export async function putRuntimeSkillVersionDiagram(_0x269116,_0x3aaa3c,_0x521b2d,_0x460f79,_0x217615){const _0x42f3c7=a103_0x53f4d0;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x269116,_0x3aaa3c,_0x521b2d),{'method':_0x42f3c7(0x296),'query':{'scope':_0x460f79},'headers':{'Content-Type':_0x42f3c7(0x1eb)},'body':JSON[_0x42f3c7(0x20d)](_0x217615)});}export async function getRuntimeSkillVersionDiagram(_0x3550fd,_0x1e81ed,_0x7c13b5,_0x4f3458){const _0x1701db=a103_0x53f4d0,_0x4104ba=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x3550fd,_0x1e81ed,_0x7c13b5),{'query':{'scope':_0x4f3458}});if(typeof _0x4104ba[_0x1701db(0x1fb)]!==_0x1701db(0x284))throw CliErrors[_0x1701db(0x257)](_0x1701db(0x21a));const _0x596fbe=_0x4104ba[_0x1701db(0x205)];if(typeof _0x596fbe!==_0x1701db(0x27e)||!/^sha256:[0-9a-f]{64}$/['test'](_0x596fbe))throw CliErrors[_0x1701db(0x257)]('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.',_0x1701db(0x206));const _0x1ea135=_0x4104ba['diagramRevision'];if(_0x4104ba[_0x1701db(0x1fb)]&&(!Number[_0x1701db(0x28f)](_0x1ea135)||Number(_0x1ea135)<0x1))throw CliErrors['apiError']('Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.');if(!_0x4104ba[_0x1701db(0x1fb)]&&_0x1ea135!==undefined&&_0x1ea135!==null)throw CliErrors[_0x1701db(0x257)](_0x1701db(0x22a));const _0x27b90f=_0x4104ba[_0x1701db(0x1fb)]?Number(_0x1ea135):null;return{..._0x4104ba,'sourceFingerprint':_0x596fbe,'diagramRevision':_0x27b90f,'expectedDiagramRevision':_0x27b90f??0x0};}export async function downloadRuntimeSkillPackage(_0x43b02b,_0x5af283,_0x34009d,_0x495289){const _0x205e53=a103_0x53f4d0;void _0x43b02b;const _0x270839=_0x495289?_0x205e53(0x26c)+encodeURIComponent(_0x34009d)+'/'+encodeURIComponent(_0x5af283)+_0x205e53(0x1fd)+encodeURIComponent(_0x495289)+'/download':'/api/cli/v1/skills/'+encodeURIComponent(_0x34009d)+'/'+encodeURIComponent(_0x5af283)+'/download';return skillHubBinaryRequest(_0x270839);}async function publishRuntimeSkill(_0x6f1cf4,_0x26a3c7,_0x1d3411){const _0x275e68=a103_0x53f4d0,_0x1b3f93=buildRuntimeSkillPublishForm(_0x26a3c7,_0x1d3411[_0x275e68(0x236)]),_0x53de9d=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x6f1cf4)+_0x275e68(0x221),{'method':'POST','query':{'confirmWarnings':_0x1d3411[_0x275e68(0x28b)]===!![]?!![]:undefined},'body':_0x1b3f93});return assertJointDiagramAcknowledged(_0x26a3c7['diagram'],_0x53de9d[_0x275e68(0x24c)],_0x275e68(0x22c)),{'appCode':_0x53de9d[_0x275e68(0x210)]??_0x6f1cf4,'skillCode':_0x53de9d[_0x275e68(0x20b)]??_0x26a3c7['skillCode']??'','skillName':_0x26a3c7[_0x275e68(0x289)]??_0x53de9d[_0x275e68(0x20b)]??_0x26a3c7['skillCode'],'description':_0x26a3c7[_0x275e68(0x208)],'scope':skillHubVisibilityToScope(_0x53de9d[_0x275e68(0x236)]??_0x1d3411[_0x275e68(0x236)])??_0x275e68(0x22e),'version':_0x53de9d[_0x275e68(0x22b)]??_0x26a3c7['version'],'tags':_0x26a3c7['tags'],'content':_0x26a3c7['content'],'diagramBound':_0x53de9d[_0x275e68(0x24c)]===!![]};}function assertJointDiagramAcknowledged(_0x55093a,_0x516fa3,_0x20d6f7){const _0x2fbe04=a103_0x53f4d0;if(!_0x55093a||_0x516fa3===!![])return;throw CliErrors[_0x2fbe04(0x257)](_0x2fbe04(0x277)+_0x20d6f7+'.',_0x2fbe04(0x23f));}function buildRuntimeSkillPublishForm(_0x135569,_0x5b5ef5){const _0x32d6d6=a103_0x53f4d0,_0x23b2ef=new FormData();return _0x23b2ef[_0x32d6d6(0x1e1)](_0x32d6d6(0x264),runtimeSkillPackageFile(_0x135569)),_0x135569[_0x32d6d6(0x289)]?.[_0x32d6d6(0x203)]()&&_0x23b2ef[_0x32d6d6(0x1e1)]('displayName',_0x135569[_0x32d6d6(0x289)][_0x32d6d6(0x203)]()),_0x23b2ef[_0x32d6d6(0x1e1)](_0x32d6d6(0x236),_0x5b5ef5),_0x135569[_0x32d6d6(0x245)]&&_0x23b2ef[_0x32d6d6(0x1e1)](_0x32d6d6(0x245),new Blob([JSON[_0x32d6d6(0x20d)](_0x135569[_0x32d6d6(0x245)])],{'type':_0x32d6d6(0x1eb)})),_0x23b2ef;}function a103_0x2c29(){const _0x42b20c=['longTerm','diagram','permitList','appName','110WKUgSx','NAMESPACE_ONLY','/client/bff/endpoint/','abort','diagramBound','/client/permit/dataset/permit-list','publishedVersion','Download\x20failed:\x20','/client/permit/role/create','DELETE','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/knowledge-base/personal/list?appCode=','/client/dept/queryAppUser','cursor','PRIVATE','apiError','AbortError','/client/permit/role/get-list','application/octet-stream','effective','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','type','application/zip','tableData','msg','status','code','favorite','file','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','CUSTOM','31145RGeHnX','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','/api/v1/skills/','signal','find','/api/cli/v1/skills/','38061WrLhYS','summary','skill','toString','API\x20error:\x20','test','warnings','headers','download','diagramValidated','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','validation','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','functions','Toolbox\x20API\x20error','entries','Knowledge-base\x20entry\x20not\x20found:\x20id=','string','appCode','/client/sql/query','filter','api','3052RrXxuZ','boolean','number','/diagram','/validate','newConfigFileName','skillName','/client/runtime-bff/personal/create','confirmWarnings','/update','/client/menu/permit-list','GET','isInteger','base64','values','text','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20',',\x20name=','/client/permit/resource/batch-save-dataset','PUT','/client/permit/page/save','company','/client/permit/resource/batch-save-menu','3448fZouRY','runtime','errorMsg','example','/client/app-config/getByKey?','data','size','set','5838330BPThjt','ownerPreviewVersion','Check\x20your\x20credentials\x20and\x20try\x20again.','artifactType','functionName','resolvedSlug','append','/execute?appCode=','scope','application/json','pageSize','name','source','authRequired','Artifact\x20not\x20found:\x20id=','errors','invokeSource','roleName','POST','isJson','4821487qGjrqh','/client/uploadFile','items','isArray','/client/permit/role/get-permit-list','found','markdown','/versions/','Toolbox\x20API\x20error:\x20','/api/runtime/v1/namespaces/','message','min','/client/knowledge-base/personal/','trim','/client/dataset/list','sourceFingerprint','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','join','description','skillCode','/client/app/my-apps','slug','SkillHub\x20error\x20code:\x20','stringify','/client/knowledge-base/personal/create','/client/notification/channel-config/list?','namespace','packageBase64','/client/artifact/list?','sqlCode','object','success','searchParams','4164438LEDjRE','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/permit/role/update','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','arrayBuffer','/client/queryFileUrl','Toolbox\x20error\x20code:\x20','/skills','/api/node-toolbox/','Missing\x20Skill\x20package\x20payload.','/publish','/client/artifact/create','?appCode=','/client/permit/page/get-one','url','errorCode','displayName','4wxEqyz','SkillHub\x20API\x20error:\x20','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','version','publish','all','personal','gmtModified','/client/ocr','api-doc-generator','/client/permit/role/delete','Invalid\x20app\x20config\x20value:\x20key=','/client/dataset/get-driven-data?code=','json','visibility','valid','limit','kind','headlineVersion','Request\x20timeout:\x20','/client/artifact/','6256432MPhVWJ','from','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','/client/runtime-bff/personal/','/client/user-accounts/bind','Configure\x20accessKey\x20in\x20','1614HjgWzn'];a103_0x2c29=function(){return _0x42b20c;};return a103_0x2c29();}function runtimeSkillVersionDiagramPath(_0x4aa5b1,_0x5916a0,_0x46c797,_0x56d645=''){const _0x59d5f6=a103_0x53f4d0;return'/api/cli/v1/skills/'+encodeURIComponent(_0x4aa5b1)+'/'+encodeURIComponent(_0x5916a0)+_0x59d5f6(0x1fd)+encodeURIComponent(_0x46c797)+_0x59d5f6(0x286)+_0x56d645;}function runtimeSkillPackageFile(_0x15ffd6){const _0x293222=a103_0x53f4d0;if(!_0x15ffd6[_0x293222(0x211)])throw CliErrors[_0x293222(0x278)](_0x293222(0x220));const _0x4d1df4=Buffer['from'](_0x15ffd6['packageBase64'],_0x293222(0x290)),_0xf045f0=new Blob([_0x4d1df4],{'type':_0x293222(0x25e)}),_0x35f66a=(_0x15ffd6[_0x293222(0x209)]||_0x293222(0x26f))+'.zip';if(typeof File!=='undefined')return new File([_0xf045f0],_0x35f66a,{'type':'application/zip'});return _0xf045f0;}function normalizeSkillHubRuntimeListResponse(_0x410c39,_0x261457,_0x2af0e0,_0x897885){const _0x402cab=a103_0x53f4d0,_0x47679d=Array['isArray'](_0x261457)?_0x261457:Array[_0x402cab(0x1f9)](_0x261457?.[_0x402cab(0x1f8)])?_0x261457[_0x402cab(0x1f8)]:[],_0x4919a=_0x897885?.[_0x402cab(0x203)](),_0x17f45f=_0x47679d[_0x402cab(0x281)](_0xee7107=>!_0x4919a||_0xee7107['slug']===_0x4919a)['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x4be96c=>Boolean(_0x4be96c)),_0x28edde=_0x17f45f[_0x402cab(0x281)](_0x4d72f1=>_0x4d72f1[_0x402cab(0x1ea)]==='personal'),_0x52ff0f=_0x17f45f[_0x402cab(0x281)](_0x39a9ed=>_0x39a9ed[_0x402cab(0x1ea)]===_0x402cab(0x298));return{'appCode':_0x410c39,'personal':_0x2af0e0===_0x402cab(0x298)?[]:_0x28edde,'company':_0x2af0e0===_0x402cab(0x22e)?[]:_0x52ff0f,'effective':buildEffectiveRuntimeSkills(_0x28edde,_0x52ff0f,_0x2af0e0)};}function skillHubRuntimeItemToRuntimeSkill(_0x418f1d){const _0x55f11a=a103_0x53f4d0,_0x1af86f=_0x418f1d['slug']?.[_0x55f11a(0x203)](),_0x34d3fc=skillHubVisibilityToScope(_0x418f1d[_0x55f11a(0x236)]);if(!_0x1af86f||!_0x34d3fc)return undefined;return{'id':_0x418f1d['id'],'appCode':_0x418f1d[_0x55f11a(0x210)],'skillCode':_0x1af86f,'skillName':_0x418f1d[_0x55f11a(0x227)]??_0x1af86f,'description':_0x418f1d[_0x55f11a(0x26e)],'example':_0x418f1d[_0x55f11a(0x29d)],'scope':_0x34d3fc,'version':skillHubRuntimeItemVersion(_0x418f1d),'status':_0x418f1d[_0x55f11a(0x261)]};}function skillHubRuntimeDetailToRuntimeSkill(_0xe3b4ae){const _0x65370c=a103_0x53f4d0,_0x19e4bb=_0xe3b4ae['slug']?.['trim']();if(!_0x19e4bb)return undefined;return{'id':_0xe3b4ae['id'],'appCode':_0xe3b4ae[_0x65370c(0x210)],'skillCode':_0x19e4bb,'skillName':_0xe3b4ae[_0x65370c(0x227)]??_0x19e4bb,'description':_0xe3b4ae[_0x65370c(0x26e)],'example':_0xe3b4ae[_0x65370c(0x29d)],'scope':skillHubVisibilityToScope(_0xe3b4ae[_0x65370c(0x236)])??_0xe3b4ae[_0x65370c(0x236)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0xe3b4ae),'status':_0xe3b4ae['status']};}function skillHubVisibilityToScope(_0x259d0b){const _0x542732=a103_0x53f4d0;if(_0x259d0b===_0x542732(0x256))return _0x542732(0x22e);if(_0x259d0b===_0x542732(0x249))return'company';return undefined;}function skillHubRuntimeItemVersion(_0xee64c5){const _0x54beef=a103_0x53f4d0;return _0xee64c5[_0x54beef(0x24e)]?.[_0x54beef(0x22b)]??_0xee64c5[_0x54beef(0x23a)]?.['version']??_0xee64c5[_0x54beef(0x1e3)]?.[_0x54beef(0x22b)];}function buildEffectiveRuntimeSkills(_0x21fa50,_0x14a625,_0x514f4d){const _0x211be4=a103_0x53f4d0;if(_0x514f4d===_0x211be4(0x22e))return _0x21fa50;if(_0x514f4d==='company')return _0x14a625;const _0xc4c53=new Map();for(const _0x338dd8 of _0x14a625){_0xc4c53[_0x211be4(0x1e1)](_0x338dd8[_0x211be4(0x209)],_0x338dd8);}for(const _0x3c1750 of _0x21fa50){_0xc4c53['set'](_0x3c1750[_0x211be4(0x209)],_0x3c1750);}return Array[_0x211be4(0x23e)](_0xc4c53[_0x211be4(0x291)]());}function normalizeRuntimeSkillListResponse(_0x2128bb,_0x507dae){const _0x37d50d=a103_0x53f4d0;if(Array['isArray'](_0x507dae)){const _0x1bc95c=_0x507dae[_0x37d50d(0x281)](_0x13244e=>_0x13244e[_0x37d50d(0x1ea)]===_0x37d50d(0x22e)),_0x3803c5=_0x507dae['filter'](_0x3b8a66=>_0x3b8a66[_0x37d50d(0x1ea)]===_0x37d50d(0x298));return{'appCode':_0x2128bb,'personal':_0x1bc95c,'company':_0x3803c5,'effective':[..._0x3803c5,..._0x1bc95c]};}return{'appCode':_0x507dae?.[_0x37d50d(0x27f)]??_0x2128bb,'personal':Array[_0x37d50d(0x1f9)](_0x507dae?.[_0x37d50d(0x22e)])?_0x507dae[_0x37d50d(0x22e)]:[],'company':Array[_0x37d50d(0x1f9)](_0x507dae?.[_0x37d50d(0x298)])?_0x507dae['company']:[],'effective':Array[_0x37d50d(0x1f9)](_0x507dae?.[_0x37d50d(0x25b)])?_0x507dae[_0x37d50d(0x25b)]:[]};}export async function listRuntimeAppRoles(_0x112d60,_0x4b715d={}){const _0x352045=a103_0x53f4d0,_0x1aeec8=_0x4b715d['currentPage']??0x1,_0x260170=Math[_0x352045(0x201)](Math['max'](_0x4b715d[_0x352045(0x1ec)]??0x64,0x1),0x64),_0x50bd7c=await apiRequest(_0x352045(0x259),{'method':'POST','body':{'appCode':_0x112d60,..._0x4b715d[_0x352045(0x1f3)]?{'roleName':_0x4b715d['roleName']}:{},'currentPage':_0x1aeec8,'pageSize':_0x260170}});return{'items':extractList(_0x50bd7c[_0x352045(0x29f)]),'paging':extractPaging(_0x50bd7c['data'])};}export async function createRuntimeAppRole(_0x422c3c){const _0x4b5d19=a103_0x53f4d0,_0x5c300a=await apiRequest(_0x4b5d19(0x250),{'method':_0x4b5d19(0x1f4),'body':{'roleType':_0x4b5d19(0x266),..._0x422c3c}});return _0x5c300a[_0x4b5d19(0x29f)];}export async function updateRuntimeAppRole(_0x5ede95){const _0x3b63d7=a103_0x53f4d0,_0x170cec=await apiRequest(_0x3b63d7(0x219),{'method':_0x3b63d7(0x1f4),'body':_0x5ede95});return _0x170cec[_0x3b63d7(0x29f)];}export async function deleteRuntimeAppRole(_0x41dee9){const _0x30306d=a103_0x53f4d0,_0x1aceb0=await apiRequest(_0x30306d(0x232),{'method':_0x30306d(0x1f4),'body':{'id':_0x41dee9}});return _0x1aceb0[_0x30306d(0x29f)];}export async function listRuntimeRoleUsers(_0x30d30d){const _0x56c486=a103_0x53f4d0,_0x5e925d=await apiRequest('/client/permit/user-role/get-user-list',{'method':_0x56c486(0x1f4),'body':{'appCode':_0x30d30d}});return extractList(_0x5e925d[_0x56c486(0x29f)]);}export async function updateRuntimeRoleUsers(_0x15531f,_0x5b7e7a){const _0x15e3fe=a103_0x53f4d0,_0x3817b8=await apiRequest('/client/permit/user-role/update-user-list',{'method':'POST','body':{'appCode':_0x15531f,'roleList':_0x5b7e7a}});return _0x3817b8[_0x15e3fe(0x29f)];}export async function listRuntimeAppUsers(_0x15c173){const _0x5279be=a103_0x53f4d0,_0x1fb6db=await apiRequest(_0x5279be(0x254)+runtimePermitQuery({'appCode':_0x15c173}));return extractList(_0x1fb6db[_0x5279be(0x29f)]);}function runtimePermitQuery(_0x5cd353){const _0x22f805=a103_0x53f4d0,_0x3bc63e=new URLSearchParams();for(const [_0x3a15ee,_0x1843b5]of Object[_0x22f805(0x27c)](_0x5cd353))_0x3bc63e[_0x22f805(0x1e1)](_0x3a15ee,String(_0x1843b5));return'?'+_0x3bc63e[_0x22f805(0x270)]();}export async function listRuntimePermitRoles(_0x54b18f,_0x52033c={}){const _0x540568=a103_0x53f4d0,_0xee546=await apiRequest(_0x540568(0x1fa),{'method':_0x540568(0x1f4),'body':{'appCode':_0x54b18f,..._0x52033c}});return extractList(_0xee546[_0x540568(0x29f)]);}export async function getRuntimePagePermit(_0x395ca4){const _0x49f18e=a103_0x53f4d0,_0x3f932c=await apiRequest(_0x49f18e(0x224)+runtimePermitQuery({'menuId':_0x395ca4}));return _0x3f932c[_0x49f18e(0x29f)];}export async function saveRuntimePagePermit(_0x531b8e){const _0x4849b9=a103_0x53f4d0,_0x573de2=await apiRequest(_0x4849b9(0x297),{'method':_0x4849b9(0x1f4),'body':_0x531b8e});return _0x573de2['data'];}export async function getRuntimeRoleMenuResources(_0x4a9140,_0x132092){const _0x1681d0=a103_0x53f4d0,_0x137599=await apiRequest('/client/permit/resource/get-menu-list',{'method':_0x1681d0(0x1f4),'body':{'appCode':_0x4a9140,'roleId':_0x132092}});return extractList(_0x137599[_0x1681d0(0x29f)]);}export async function listRuntimeMenuRolePermits(_0x525245){const _0x5b2171=a103_0x53f4d0,_0x383cf4=await apiRequest(_0x5b2171(0x28d)+runtimePermitQuery({'appCode':_0x525245}));return Array[_0x5b2171(0x1f9)](_0x383cf4['data']?.[_0x5b2171(0x246)])?_0x383cf4['data'][_0x5b2171(0x246)]:[];}export async function saveRuntimeMenuRolePermits(_0x5a7b44,_0x8f1632){const _0x39474a=a103_0x53f4d0,_0x4e168c=await apiRequest(_0x39474a(0x299),{'method':_0x39474a(0x1f4),'body':{'appCode':_0x5a7b44,'permitList':_0x8f1632}});return _0x4e168c[_0x39474a(0x29f)];}export async function listRuntimeDatasetPermits(_0x58d57d,_0x1719b1){const _0xb9ff73=a103_0x53f4d0,_0x4b2c78=await apiRequest('/client/permit/dataset/list'+runtimePermitQuery({'appCode':_0x58d57d,'roleId':_0x1719b1}));return Array[_0xb9ff73(0x1f9)](_0x4b2c78[_0xb9ff73(0x29f)]?.[_0xb9ff73(0x246)])?_0x4b2c78['data']['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x42b1a6){const _0x4d94b7=a103_0x53f4d0,_0xb2f5a6=await apiRequest(_0x4d94b7(0x24d)+runtimePermitQuery({'appCode':_0x42b1a6}));return Array[_0x4d94b7(0x1f9)](_0xb2f5a6[_0x4d94b7(0x29f)]?.['permitList'])?_0xb2f5a6[_0x4d94b7(0x29f)][_0x4d94b7(0x246)]:[];}export async function saveRuntimeDatasetRolePermits(_0x3769fa,_0x425dc7){const _0x5c74da=a103_0x53f4d0,_0x53a4e4=await apiRequest(_0x5c74da(0x295),{'method':'POST','body':{'appCode':_0x3769fa,'permitList':_0x425dc7}});return _0x53a4e4[_0x5c74da(0x29f)];}
|
|
1
|
+
(function(_0x1a7f87,_0x33877d){const _0x4f0472=a104_0x2c0e,_0x47a003=_0x1a7f87();while(!![]){try{const _0x431ba8=parseInt(_0x4f0472(0x10b))/0x1*(-parseInt(_0x4f0472(0x142))/0x2)+parseInt(_0x4f0472(0x14c))/0x3*(parseInt(_0x4f0472(0xbf))/0x4)+parseInt(_0x4f0472(0xec))/0x5*(parseInt(_0x4f0472(0x117))/0x6)+-parseInt(_0x4f0472(0xd9))/0x7*(parseInt(_0x4f0472(0x151))/0x8)+-parseInt(_0x4f0472(0x11c))/0x9+-parseInt(_0x4f0472(0x10c))/0xa*(parseInt(_0x4f0472(0x115))/0xb)+parseInt(_0x4f0472(0xf8))/0xc*(parseInt(_0x4f0472(0xb3))/0xd);if(_0x431ba8===_0x33877d)break;else _0x47a003['push'](_0x47a003['shift']());}catch(_0x17283e){_0x47a003['push'](_0x47a003['shift']());}}}(a104_0x45cf,0x7d8d9));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';import{normalizePositiveSafeInteger}from'../utils/positive-safe-integer.js';let _activeAK;export function setActiveAK(_0x4846ee){_activeAK=_0x4846ee||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x14264b){const _0x519a02=a104_0x2c0e;for(const _0x580d66 of _0x14264b){if(typeof _0x580d66===_0x519a02(0xcf)&&_0x580d66['trim']())return _0x580d66[_0x519a02(0x10f)]();}return undefined;}async function decodeResponseBody(_0x1a98d6){const _0x5a6463=a104_0x2c0e;if(typeof _0x1a98d6[_0x5a6463(0xda)]===_0x5a6463(0xf4))try{const _0xbdbe3c=await _0x1a98d6['text']();try{return{'isJson':!![],'data':parseLosslessJson(_0xbdbe3c),'text':_0xbdbe3c};}catch{return{'isJson':![],'text':_0xbdbe3c[_0x5a6463(0x10f)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x1a98d6['json']()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x292731,_0x20f768,_0x160305){const _0x1d873e=a104_0x2c0e,_0xad8b72=_0x20f768&&typeof _0x20f768===_0x1d873e(0x15b)?_0x20f768:{},_0x3eb0f2=[_0xad8b72[_0x1d873e(0xb0)],_0xad8b72['code']][_0x1d873e(0xbd)](_0x2e817e=>Number(_0x2e817e)===0x1ad),_0x3184d6=createRateLimitError({'status':_0x292731[_0x1d873e(0xb0)]===0x1ad?_0x292731[_0x1d873e(0xb0)]:_0x3eb0f2??_0x292731['status'],'errorCode':firstString(_0xad8b72['errorCode'],typeof _0xad8b72[_0x1d873e(0x122)]===_0x1d873e(0xcf)?_0xad8b72[_0x1d873e(0x122)]:undefined),'message':firstString(_0xad8b72[_0x1d873e(0xc0)],_0xad8b72[_0x1d873e(0xe6)],_0xad8b72[_0x1d873e(0xce)],_0x160305),'retryAfter':readRetryAfter(_0x292731[_0x1d873e(0xa2)])??readRetryAfterSeconds(_0x20f768)});if(_0x3184d6)throw _0x3184d6;}async function apiRequest(_0x249a5c,_0x230e6e={}){const _0x380b0d=a104_0x2c0e,{method:method=_0x380b0d(0x12f),body:_0x50feba,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x380b0d(0x13e)}=_0x230e6e,_0x56bfe2=_activeAK,_0x1c0635=domain===_0x380b0d(0xb6)?getApiDomain():getRuntimeDomain();if(!_0x56bfe2)throw CliErrors[_0x380b0d(0xeb)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x380b0d(0xd6)]+'.');const _0x1cfbe3=''+_0x1c0635+_0x249a5c,_0x21a046={'X-User-AK':_0x56bfe2},_0x18055d=new AbortController(),_0x1a0ce4=setTimeout(()=>_0x18055d[_0x380b0d(0xd3)](),timeout);try{const _0x16d68a=await fetch(_0x1cfbe3,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x380b0d(0x137)],..._0x21a046,...headers},'body':_0x50feba?JSON['stringify'](_0x50feba):undefined,'signal':_0x18055d[_0x380b0d(0xfc)]}),_0xc999f4=await decodeResponseBody(_0x16d68a);if(!_0xc999f4[_0x380b0d(0xa3)]){throwIfRateLimited(_0x16d68a,undefined,_0xc999f4['text']);throw CliErrors[_0x380b0d(0xa7)](_0x380b0d(0xdf)+_0x16d68a[_0x380b0d(0xb0)]+')',_0x16d68a[_0x380b0d(0xb0)]>=0x190?_0x380b0d(0x130):undefined);}const _0x4237a3=_0xc999f4[_0x380b0d(0x119)];throwIfRateLimited(_0x16d68a,_0x4237a3);if(!_0x16d68a['ok']||_0x4237a3[_0x380b0d(0xd5)]===![])throw CliErrors[_0x380b0d(0xa7)](_0x4237a3[_0x380b0d(0xc0)]||_0x4237a3[_0x380b0d(0xe6)]||_0x4237a3[_0x380b0d(0xce)]||'API\x20error:\x20'+_0x16d68a[_0x380b0d(0xb0)],_0x4237a3[_0x380b0d(0x13f)]?_0x380b0d(0xf2)+_0x4237a3[_0x380b0d(0x13f)]:undefined);return _0x4237a3;}catch(_0x354ed3){if(_0x354ed3 instanceof Error&&_0x354ed3[_0x380b0d(0x109)]===_0x380b0d(0xb2))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x1cfbe3);throw _0x354ed3;}finally{clearTimeout(_0x1a0ce4);}}async function apiBinaryRequest(_0x2daf2d,_0x4bea60={}){const _0x2ebe7b=a104_0x2c0e,{method:method=_0x2ebe7b(0x12f),headers:headers={},timeout:timeout=0x7530}=_0x4bea60,_0x14a6ac=_activeAK,_0xe0c07d=getRuntimeDomain();if(!_0x14a6ac)throw CliErrors[_0x2ebe7b(0xeb)](_0x2ebe7b(0xab)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3065c0=''+_0xe0c07d+_0x2daf2d,_0x5c0106=new AbortController(),_0x45544a=setTimeout(()=>_0x5c0106['abort'](),timeout);try{const _0x48d23c=await fetch(_0x3065c0,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2ebe7b(0x137)],'X-User-AK':_0x14a6ac,...headers},'signal':_0x5c0106[_0x2ebe7b(0xfc)]});if(!_0x48d23c['ok']){const _0x8c8280=await decodeResponseBody(_0x48d23c),_0x8eb4a7=_0x8c8280[_0x2ebe7b(0x119)]&&typeof _0x8c8280[_0x2ebe7b(0x119)]===_0x2ebe7b(0x15b)?_0x8c8280[_0x2ebe7b(0x119)]:{},_0x487387=firstString(_0x8eb4a7[_0x2ebe7b(0xc0)],_0x8eb4a7[_0x2ebe7b(0xe6)],_0x8eb4a7[_0x2ebe7b(0x13f)],_0x8c8280[_0x2ebe7b(0xda)]);throwIfRateLimited(_0x48d23c,_0x8c8280[_0x2ebe7b(0x119)],_0x487387);throw CliErrors['apiError'](_0x487387||_0x2ebe7b(0xde)+_0x48d23c['status'],_0x2ebe7b(0x9f)+_0x3065c0);}return Buffer[_0x2ebe7b(0x150)](await _0x48d23c[_0x2ebe7b(0x97)]());}catch(_0xc84b52){if(_0xc84b52 instanceof Error&&_0xc84b52[_0x2ebe7b(0x109)]==='AbortError')throw CliErrors[_0x2ebe7b(0xa7)]('Request\x20timeout:\x20'+_0x3065c0);throw _0xc84b52;}finally{clearTimeout(_0x45544a);}}async function apiFormRequest(_0x3678f2,_0x34a1e3,_0x2b1326={}){const _0x312066=a104_0x2c0e,{timeout:timeout=0x7530}=_0x2b1326,_0x1d035e=_activeAK,_0x49039b=getRuntimeDomain();if(!_0x1d035e)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x312066(0xd6)]+'.');const _0x2a1874=''+_0x49039b+_0x3678f2,_0x1dc3eb=new AbortController(),_0x583321=setTimeout(()=>_0x1dc3eb[_0x312066(0xd3)](),timeout);try{const _0x59b1bf=await fetch(_0x2a1874,{'method':_0x312066(0xef),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x312066(0x137)],'X-User-AK':_0x1d035e},'body':_0x34a1e3,'signal':_0x1dc3eb[_0x312066(0xfc)]}),_0x4fa7f5=await decodeResponseBody(_0x59b1bf);if(!_0x4fa7f5[_0x312066(0xa3)]){throwIfRateLimited(_0x59b1bf,undefined,_0x4fa7f5[_0x312066(0xda)]);throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x59b1bf[_0x312066(0xb0)]+')',_0x59b1bf['status']>=0x190?_0x312066(0x130):undefined);}const _0x27f6ae=_0x4fa7f5[_0x312066(0x119)];throwIfRateLimited(_0x59b1bf,_0x27f6ae);if(!_0x59b1bf['ok']||_0x27f6ae['success']===![])throw CliErrors['apiError'](_0x27f6ae[_0x312066(0xc0)]||_0x27f6ae[_0x312066(0xe6)]||_0x312066(0xde)+_0x59b1bf['status'],_0x27f6ae[_0x312066(0x13f)]?_0x312066(0xf2)+_0x27f6ae[_0x312066(0x13f)]:undefined);return _0x27f6ae;}catch(_0x2f7a3e){if(_0x2f7a3e instanceof Error&&_0x2f7a3e[_0x312066(0x109)]==='AbortError')throw CliErrors[_0x312066(0xa7)](_0x312066(0x143)+_0x2a1874);throw _0x2f7a3e;}finally{clearTimeout(_0x583321);}}async function toolboxRequest(_0x4cf0a2,_0x54d1d1,_0xe87fc7={}){const _0x1a2172=a104_0x2c0e,{method:method=_0x1a2172(0x12f),headers:headers={},timeout:timeout=0x7530}=_0xe87fc7,_0x402a24=_activeAK;if(!_0x402a24)throw CliErrors[_0x1a2172(0xeb)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1a2172(0xd6)]+'.');const _0x1b35df=getApiDomain()[_0x1a2172(0xf3)](/\/$/,''),_0x55b38b=new URL(_0x4cf0a2,_0x1b35df+_0x1a2172(0xbc));if(_0x54d1d1)for(const [_0x42cb53,_0x4c8048]of Object[_0x1a2172(0xdb)](_0x54d1d1)){_0x4c8048!==undefined&&_0x4c8048!==null&&_0x55b38b['searchParams']['set'](_0x42cb53,String(_0x4c8048));}const _0x5795be=new AbortController(),_0x556e74=setTimeout(()=>_0x5795be['abort'](),timeout);try{const _0x29c2af=await fetch(_0x55b38b,{'method':method,'headers':{'Content-Type':_0x1a2172(0x93),'X-Invoke-Source':PRODUCT_CONFIG[_0x1a2172(0x137)],'X-User-AK':_0x402a24,...headers},'signal':_0x5795be[_0x1a2172(0xfc)]}),_0x2822d0=await decodeResponseBody(_0x29c2af);if(!_0x2822d0[_0x1a2172(0xa3)]){throwIfRateLimited(_0x29c2af,undefined,_0x2822d0[_0x1a2172(0xda)]);throw CliErrors['apiError'](_0x1a2172(0x157)+_0x29c2af['status']+')',_0x29c2af[_0x1a2172(0xb0)]>=0x190?_0x1a2172(0x130):undefined);}const _0x2e73fd=_0x2822d0['data'];throwIfRateLimited(_0x29c2af,_0x2e73fd);if(!_0x29c2af['ok']){const _0x566e61=_0x2e73fd&&typeof _0x2e73fd===_0x1a2172(0x15b)?_0x2e73fd:{};throw CliErrors['apiError'](_0x566e61[_0x1a2172(0xc0)]||_0x566e61[_0x1a2172(0xe6)]||_0x1a2172(0x9a)+_0x29c2af[_0x1a2172(0xb0)],_0x566e61[_0x1a2172(0x13f)]?'Toolbox\x20error\x20code:\x20'+_0x566e61['errorCode']:undefined);}if(_0x2e73fd&&typeof _0x2e73fd===_0x1a2172(0x15b)&&'success'in _0x2e73fd&&typeof _0x2e73fd[_0x1a2172(0xd5)]===_0x1a2172(0x153)){const _0x4f0979=_0x2e73fd;if(!_0x4f0979['success'])throw CliErrors[_0x1a2172(0xa7)](_0x4f0979['errorMsg']||_0x4f0979['message']||_0x1a2172(0xe5),_0x4f0979[_0x1a2172(0x13f)]?'Toolbox\x20error\x20code:\x20'+_0x4f0979[_0x1a2172(0x13f)]:undefined);return _0x4f0979[_0x1a2172(0x119)];}return _0x2e73fd;}catch(_0x50aafc){if(_0x50aafc instanceof Error&&_0x50aafc[_0x1a2172(0x109)]===_0x1a2172(0xb2))throw CliErrors[_0x1a2172(0xa7)](_0x1a2172(0x143)+_0x55b38b[_0x1a2172(0x10e)]());throw _0x50aafc;}finally{clearTimeout(_0x556e74);}}async function skillHubJsonRequest(_0x4de12a,_0x159ef0={}){const _0x4e23e3=a104_0x2c0e,{method:method=_0x4e23e3(0x12f),query:_0x4c8947,body:_0x560c30,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x159ef0,_0x115cfb=_activeAK;if(!_0x115cfb)throw CliErrors[_0x4e23e3(0xeb)](_0x4e23e3(0xab)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x52af17=getSkillDomain()['replace'](/\/$/,''),_0x2c4cd7=new URL(_0x4de12a,_0x52af17+'/');if(_0x4c8947)for(const [_0xa66af7,_0x1869df]of Object[_0x4e23e3(0xdb)](_0x4c8947)){_0x1869df!==undefined&&_0x1869df!==null&&_0x2c4cd7[_0x4e23e3(0x98)]['set'](_0xa66af7,String(_0x1869df));}const _0x3420be=new AbortController(),_0x307c85=setTimeout(()=>_0x3420be['abort'](),timeout);try{const _0x23f82f=await fetch(_0x2c4cd7[_0x4e23e3(0x10e)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x4e23e3(0x137)],'X-User-AK':_0x115cfb,...headers},'body':_0x560c30,'signal':_0x3420be[_0x4e23e3(0xfc)]}),_0x7d2bb8=await decodeResponseBody(_0x23f82f);if(!_0x7d2bb8['isJson']){if(allowNotFound&&_0x23f82f['status']===0x194)return undefined;throwIfRateLimited(_0x23f82f,undefined,_0x7d2bb8[_0x4e23e3(0xda)]);throw CliErrors[_0x4e23e3(0xa7)](_0x4e23e3(0x154)+_0x23f82f[_0x4e23e3(0xb0)]+')',_0x23f82f[_0x4e23e3(0xb0)]>=0x190?_0x4e23e3(0x130):undefined);}const _0x1ed7fb=_0x7d2bb8['data'];throwIfRateLimited(_0x23f82f,_0x1ed7fb);if(allowNotFound&&isSkillHubNotFoundResponse(_0x23f82f[_0x4e23e3(0xb0)],_0x1ed7fb))return undefined;const _0xf02ac7=!_0x23f82f['ok']||_0x1ed7fb?.[_0x4e23e3(0xd5)]===![]||typeof _0x1ed7fb?.['code']===_0x4e23e3(0xca)&&_0x1ed7fb[_0x4e23e3(0x122)]>=0x190;if(_0xf02ac7)throw CliErrors[_0x4e23e3(0xa7)](_0x1ed7fb?.[_0x4e23e3(0xc0)]||_0x1ed7fb?.[_0x4e23e3(0xe6)]||_0x1ed7fb?.[_0x4e23e3(0xce)]||_0x4e23e3(0x118)+_0x23f82f[_0x4e23e3(0xb0)],_0x1ed7fb?.['errorCode']?_0x4e23e3(0xa8)+_0x1ed7fb['errorCode']:undefined);return _0x1ed7fb?.[_0x4e23e3(0x119)]??_0x1ed7fb;}catch(_0x41a46a){if(_0x41a46a instanceof Error&&_0x41a46a['name']===_0x4e23e3(0xb2))throw CliErrors['apiError'](_0x4e23e3(0x143)+_0x2c4cd7[_0x4e23e3(0x10e)]());throw _0x41a46a;}finally{clearTimeout(_0x307c85);}}function isSkillHubNotFoundResponse(_0x541b51,_0x241a98){const _0x27d5b9=a104_0x2c0e;if(_0x541b51===0x194||_0x241a98?.[_0x27d5b9(0x122)]===0x194)return!![];if(_0x541b51!==0x190&&_0x241a98?.[_0x27d5b9(0x122)]!==0x190)return![];const _0x3fba31=[_0x241a98?.[_0x27d5b9(0xce)],_0x241a98?.[_0x27d5b9(0xe6)],_0x241a98?.[_0x27d5b9(0xc0)],_0x241a98?.[_0x27d5b9(0xc4)]][_0x27d5b9(0xd2)](_0x4190ac=>typeof _0x4190ac===_0x27d5b9(0xcf))['join']('\x20');return/skill not found\b/i['test'](_0x3fba31);}async function skillHubBinaryRequest(_0x2f2a9f,_0x54b77c={}){const _0x43731d=a104_0x2c0e,{query:_0x35bbc2,headers:headers={},timeout:timeout=0x7530}=_0x54b77c,_0x68a3ee=_activeAK;if(!_0x68a3ee)throw CliErrors[_0x43731d(0xeb)](_0x43731d(0xab)+PRODUCT_CONFIG[_0x43731d(0xd6)]+'.');const _0x2192cc=getSkillDomain()['replace'](/\/$/,''),_0x95da29=new URL(_0x2f2a9f,_0x2192cc+'/');if(_0x35bbc2)for(const [_0x262a23,_0x4b5682]of Object[_0x43731d(0xdb)](_0x35bbc2)){_0x4b5682!==undefined&&_0x4b5682!==null&&_0x95da29['searchParams'][_0x43731d(0x15a)](_0x262a23,String(_0x4b5682));}const _0x1cbc8b=new AbortController(),_0x2d4426=setTimeout(()=>_0x1cbc8b[_0x43731d(0xd3)](),timeout);try{const _0x255a8b=await fetch(_0x95da29[_0x43731d(0x10e)](),{'method':_0x43731d(0x12f),'headers':{'Accept':_0x43731d(0xff),'X-Invoke-Source':PRODUCT_CONFIG[_0x43731d(0x137)],'X-User-AK':_0x68a3ee,...headers},'signal':_0x1cbc8b[_0x43731d(0xfc)]});if(!_0x255a8b['ok']){const _0x14f736=await decodeResponseBody(_0x255a8b),_0x48feec=_0x14f736['data']&&typeof _0x14f736[_0x43731d(0x119)]==='object'?_0x14f736['data']:{},_0x34ecde=firstString(_0x48feec[_0x43731d(0xc0)],_0x48feec[_0x43731d(0xe6)],_0x48feec['msg'],_0x48feec[_0x43731d(0x13f)],_0x14f736[_0x43731d(0xda)]);throwIfRateLimited(_0x255a8b,_0x14f736[_0x43731d(0x119)],_0x34ecde);throw CliErrors['apiError'](_0x34ecde||_0x43731d(0x118)+_0x255a8b[_0x43731d(0xb0)],_0x43731d(0x9f)+_0x95da29[_0x43731d(0x10e)]());}return Buffer[_0x43731d(0x150)](await _0x255a8b[_0x43731d(0x97)]());}catch(_0x4de57e){if(_0x4de57e instanceof Error&&_0x4de57e['name']==='AbortError')throw CliErrors[_0x43731d(0xa7)](_0x43731d(0x143)+_0x95da29[_0x43731d(0x10e)]());throw _0x4de57e;}finally{clearTimeout(_0x2d4426);}}export async function getBffEndpointContract(_0x252c99,_0x1cf5d1){const _0x26d8ae=a104_0x2c0e;if(_0x1cf5d1===_0x26d8ae(0xad))throw CliErrors['validation'](_0x26d8ae(0x129)+_0x252c99+_0x26d8ae(0x11b)+_0x1cf5d1);const _0x4d5371=await apiRequest('/client/bff/endpoint/'+encodeURIComponent(_0x252c99)+'/'+encodeURIComponent(_0x1cf5d1)),_0x328b3b=_0x4d5371['data'];if(!_0x328b3b||typeof _0x328b3b!==_0x26d8ae(0x15b)||Array['isArray'](_0x328b3b)||_0x328b3b['appCode']!==_0x252c99||_0x328b3b[_0x26d8ae(0xfd)]!==_0x1cf5d1)throw CliErrors[_0x26d8ae(0x132)](_0x26d8ae(0x129)+_0x252c99+_0x26d8ae(0x11b)+_0x1cf5d1);return{'appCode':_0x328b3b['appCode'],'functionName':_0x328b3b['functionName'],'description':_0x328b3b[_0x26d8ae(0x127)],'version':_0x328b3b[_0x26d8ae(0x12b)],'gmtModified':_0x328b3b[_0x26d8ae(0x12d)]};}export async function getSqlQueryInfo(_0xfdeea4,_0x22ede9){const _0x51008e=a104_0x2c0e,_0x114e90=await apiRequest(_0x51008e(0xa5),{'method':'POST','body':{'appCode':_0xfdeea4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x22ede9}}),_0x2606a8=_0x114e90[_0x51008e(0x119)],_0x809de=_0x2606a8&&typeof _0x2606a8===_0x51008e(0x15b)&&'tableData'in _0x2606a8?_0x2606a8[_0x51008e(0x8f)]?.[0x0]:_0x2606a8&&typeof _0x2606a8===_0x51008e(0x15b)&&_0x51008e(0xbb)in _0x2606a8?_0x2606a8:undefined;if(!_0x809de)throw CliErrors['validation'](_0x51008e(0xf9)+_0x22ede9);return _0x809de;}export async function listApprovalTodo(_0x2a80c7,_0x10aa0a=0x1,_0xf53ea0=0x14){const _0x17265f=a104_0x2c0e,_0x3777e8=new URLSearchParams({'appCode':_0x2a80c7,'currentPage':String(_0x10aa0a),'pageSize':String(_0xf53ea0)}),_0x48e9c4=await apiRequest(_0x17265f(0xed)+_0x3777e8[_0x17265f(0x10e)]());if(!_0x48e9c4[_0x17265f(0x119)]||typeof _0x48e9c4[_0x17265f(0x119)]!==_0x17265f(0x15b)||!Array[_0x17265f(0xcc)](_0x48e9c4[_0x17265f(0x119)][_0x17265f(0x10a)]))throw CliErrors[_0x17265f(0xa7)](_0x17265f(0x125));return _0x48e9c4[_0x17265f(0x119)];}export async function getApprovalTaskDetail(_0x6c5ff2){const _0x51c6f5=a104_0x2c0e,_0x1ef37f=await apiRequest(_0x51c6f5(0x124)+encodeURIComponent(_0x6c5ff2));if(!_0x1ef37f[_0x51c6f5(0x119)]||typeof _0x1ef37f[_0x51c6f5(0x119)]!==_0x51c6f5(0x15b)||Array[_0x51c6f5(0xcc)](_0x1ef37f[_0x51c6f5(0x119)]))throw CliErrors[_0x51c6f5(0xa7)](_0x51c6f5(0x139));return _0x1ef37f[_0x51c6f5(0x119)];}export async function approveApprovalTask(_0x1e5538){const _0xad6851=a104_0x2c0e,_0x553b05=await apiRequest(_0xad6851(0xa9),{'method':_0xad6851(0xef),'body':_0x1e5538});return _0x553b05[_0xad6851(0x119)];}export async function transferApprovalTask(_0x38e090){const _0x52ec2e=a104_0x2c0e,_0x2da7b2=await apiRequest(_0x52ec2e(0xc6),{'method':_0x52ec2e(0xef),'body':_0x38e090});return _0x2da7b2[_0x52ec2e(0x119)];}function isRemoteAppItem(_0x5281d7){const _0x3b09ad=a104_0x2c0e;return!!_0x5281d7&&typeof _0x5281d7==='object'&&typeof _0x5281d7[_0x3b09ad(0xe8)]==='string'&&typeof _0x5281d7['appName']===_0x3b09ad(0xcf);}function extractRemoteAppItems(_0x6b56bc){const _0x120009=a104_0x2c0e;if(Array['isArray'](_0x6b56bc))return _0x6b56bc['filter'](isRemoteAppItem);if(!_0x6b56bc||typeof _0x6b56bc!=='object')throw CliErrors['apiError'](_0x120009(0x12e));const _0x5d06ee=_0x6b56bc;if(Array['isArray'](_0x5d06ee['tableData']))return _0x5d06ee[_0x120009(0x8f)][_0x120009(0xd2)](isRemoteAppItem);if(_0x5d06ee['data']&&typeof _0x5d06ee['data']===_0x120009(0x15b)){const _0x64bc75=_0x5d06ee[_0x120009(0x119)];if(Array[_0x120009(0xcc)](_0x64bc75[_0x120009(0x8f)]))return _0x64bc75[_0x120009(0x8f)][_0x120009(0xd2)](isRemoteAppItem);}throw CliErrors[_0x120009(0xa7)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x4e402a=a104_0x2c0e,_0xa93905=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0xa93905[_0x4e402a(0x119)]);}export async function getLoginUserInfo(){const _0x37a74a=a104_0x2c0e,_0x251030=await apiRequest('/client/user/loginUserInfo');if(!_0x251030[_0x37a74a(0x119)]||typeof _0x251030[_0x37a74a(0x119)]!==_0x37a74a(0x15b)||Array[_0x37a74a(0xcc)](_0x251030[_0x37a74a(0x119)]))throw CliErrors[_0x37a74a(0xa7)](_0x37a74a(0xb9));return _0x251030['data'];}export const USER_ACCOUNT_BIND_PATH='/client/user-accounts/bind';export async function bindExternalUserAccount(_0x5edcc9,_0x510e3b){const _0x11165b=a104_0x2c0e,_0x5b9019=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':_0x11165b(0xef),'body':{'provider':_0x5edcc9,'accountId':_0x510e3b}});return _0x5b9019['data'];}function runtimeSchedulePath(_0xbfd573,_0x4f0fe1=''){const _0x232d97=a104_0x2c0e;return _0x232d97(0xc9)+encodeURIComponent(_0xbfd573)+_0x232d97(0xa6)+_0x4f0fe1;}export async function validateRuntimeSchedule(_0x44a74e,_0x1eaacd){const _0x377e32=a104_0x2c0e,_0x6990f7=await apiRequest(runtimeSchedulePath(_0x44a74e,_0x377e32(0xb8)),{'method':'POST','body':_0x1eaacd});return _0x6990f7['data'];}export async function createRuntimeSchedule(_0x48a52e,_0x1c22e8){const _0x2ac37e=a104_0x2c0e,_0x5edd2c=await apiRequest(runtimeSchedulePath(_0x48a52e),{'method':_0x2ac37e(0xef),'body':_0x1c22e8});return _0x5edd2c['data'];}export async function listRuntimeSchedules(_0x12e244,_0x5243dd){const _0x544ef9=a104_0x2c0e,_0x55aa5e=new URLSearchParams();_0x55aa5e[_0x544ef9(0x15a)](_0x544ef9(0x89),_0x5243dd[_0x544ef9(0x89)]);if(_0x5243dd[_0x544ef9(0x113)]!==undefined)_0x55aa5e['set']('limit',String(_0x5243dd[_0x544ef9(0x113)]));if(_0x5243dd['cursor'])_0x55aa5e['set'](_0x544ef9(0x105),_0x5243dd[_0x544ef9(0x105)]);const _0x17fa5e=_0x55aa5e[_0x544ef9(0xba)]>0x0?'?'+_0x55aa5e[_0x544ef9(0x10e)]():'',_0x1ecc60=await apiRequest(''+runtimeSchedulePath(_0x12e244)+_0x17fa5e);return _0x1ecc60[_0x544ef9(0x119)];}export async function getRuntimeSchedule(_0x19fef2,_0x328272){const _0x19c313=a104_0x2c0e,_0x3ed7b1=await apiRequest(runtimeSchedulePath(_0x19fef2,'/'+encodeURIComponent(_0x328272)));return _0x3ed7b1[_0x19c313(0x119)];}export async function deleteRuntimeSchedule(_0x423c70,_0x1743a0){const _0x1a7d6d=a104_0x2c0e,_0x3ca320=await apiRequest(runtimeSchedulePath(_0x423c70,'/'+encodeURIComponent(_0x1743a0)),{'method':_0x1a7d6d(0x156)});return _0x3ca320[_0x1a7d6d(0x119)];}export async function runRuntimeSchedule(_0x2b8922,_0x32f2f8){const _0x5ea914=a104_0x2c0e,_0x13f2d9=await apiRequest(runtimeSchedulePath(_0x2b8922,'/'+encodeURIComponent(_0x32f2f8)+'/run'),{'method':_0x5ea914(0xef)});return _0x13f2d9['data'];}export async function listDatasets(_0x233d29,_0x2d9457){const _0x1b46dc=a104_0x2c0e,_0x363e9f=await apiRequest(_0x1b46dc(0x13a),{'method':_0x1b46dc(0xef),'body':{'appCode':_0x233d29,..._0x2d9457?.[_0x1b46dc(0x122)]&&{'code':_0x2d9457[_0x1b46dc(0x122)]},..._0x2d9457?.[_0x1b46dc(0x109)]&&{'name':_0x2d9457[_0x1b46dc(0x109)]}}});return extractList(_0x363e9f['data']);}export async function getDatasetDetail(_0xc65e91){const _0x7c5541=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0xc65e91));return _0x7c5541['data'];}export async function getDatasetSdkUsageDoc(_0x1508cd,_0x558ede){const _0x7ab95b=a104_0x2c0e,_0x278d91=await toolboxRequest(_0x7ab95b(0x15c),{'datasetCode':_0x1508cd,'appCode':_0x558ede});return typeof _0x278d91?.[_0x7ab95b(0x11f)]==='string'?_0x278d91[_0x7ab95b(0x11f)]:'';}export async function uploadRuntimeFile(_0x6027e1,_0x4158ca){const _0x3cc1a1=a104_0x2c0e,_0x240e9d=await readFile(_0x4158ca),_0x202802=new FormData();_0x202802['append'](_0x3cc1a1(0xe8),_0x6027e1),_0x202802[_0x3cc1a1(0x107)](_0x3cc1a1(0xfe),new Blob([new Uint8Array(_0x240e9d)]),basename(_0x4158ca));const _0x278569=await apiFormRequest(_0x3cc1a1(0xee),_0x202802);return _0x278569['data'];}export async function queryRuntimeFileUrl(_0x5d1762,_0x553af3={}){const _0x23d82f=a104_0x2c0e,_0x1e782e=await apiRequest(_0x23d82f(0x108),{'method':_0x23d82f(0xef),'body':{'filePath':_0x5d1762,'downloadFlag':_0x553af3[_0x23d82f(0xc8)]??![],..._0x553af3[_0x23d82f(0xea)]?{'longTerm':!![]}:{}}});return _0x1e782e[_0x23d82f(0x119)];}export async function recognizeRuntimeOcr(_0x30c7c7,_0x4a9547){const _0x15d864=a104_0x2c0e,_0x57e01f=await apiRequest(_0x15d864(0xe2),{'method':_0x15d864(0xef),'body':{'appCode':_0x30c7c7,'url':_0x4a9547[_0x15d864(0xaf)],'type':_0x4a9547[_0x15d864(0x152)]}});return _0x57e01f[_0x15d864(0x119)];}export async function getRuntimeAppConfigByKey(_0x5324b2,_0x45d280){const _0x350a4d=a104_0x2c0e,_0x2d0cf4=new URLSearchParams({'appCode':_0x5324b2,'key':_0x45d280}),_0x215576=await apiRequest(_0x350a4d(0x9c)+_0x2d0cf4[_0x350a4d(0x10e)]());if(typeof _0x215576[_0x350a4d(0x119)]!==_0x350a4d(0xcf))throw CliErrors[_0x350a4d(0x132)](_0x350a4d(0x138)+_0x45d280);return _0x215576[_0x350a4d(0x119)];}export async function listNotificationChannelConfigs(_0x103e91,_0x5c2d0e){const _0x5b1ab3=a104_0x2c0e,_0x43e708=new URLSearchParams({'appCode':_0x103e91,'channelType':_0x5c2d0e}),_0x4878f3=await apiRequest(_0x5b1ab3(0x141)+_0x43e708[_0x5b1ab3(0x10e)]());if(!Array[_0x5b1ab3(0xcc)](_0x4878f3[_0x5b1ab3(0x119)]))throw CliErrors['apiError'](_0x5b1ab3(0xae),'Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.');return _0x4878f3[_0x5b1ab3(0x119)];}export async function listRuntimeArtifacts(_0x1a66c4,_0x1171a9){const _0x150a92=a104_0x2c0e,_0x2e475f=new URLSearchParams({'appCode':_0x1a66c4});if(_0x1171a9?.[_0x150a92(0xc3)])_0x2e475f[_0x150a92(0x15a)]('artifactType',_0x1171a9[_0x150a92(0xc3)]);if(_0x1171a9?.['source'])_0x2e475f['set']('source',_0x1171a9[_0x150a92(0x91)]);if(_0x1171a9?.['favorite']!==undefined)_0x2e475f[_0x150a92(0x15a)](_0x150a92(0x159),String(_0x1171a9['favorite']));const _0x1090e4=await apiRequest('/client/artifact/list?'+_0x2e475f[_0x150a92(0x10e)]());return Array[_0x150a92(0xcc)](_0x1090e4[_0x150a92(0x119)])?_0x1090e4[_0x150a92(0x119)]:[];}export async function getRuntimeArtifact(_0x298787,_0x23a8c6){const _0x196d7d=a104_0x2c0e,_0x5c5c46=await apiRequest(_0x196d7d(0x146)+_0x298787+_0x196d7d(0xd1)+encodeURIComponent(_0x23a8c6));if(!_0x5c5c46[_0x196d7d(0x119)])throw CliErrors[_0x196d7d(0x132)](_0x196d7d(0x111)+_0x298787);return _0x5c5c46[_0x196d7d(0x119)];}export async function createRuntimeArtifact(_0x5524f8,_0xbeee0d){const _0x86bedf=a104_0x2c0e,_0x43cb21=await apiRequest(_0x86bedf(0x133),{'method':'POST','body':{'appCode':_0x5524f8,..._0xbeee0d}});return _0x43cb21[_0x86bedf(0x119)];}export async function updateRuntimeArtifact(_0x5a5a3c,_0x5927a6,_0x217821){const _0x5754b5=a104_0x2c0e,_0x3fb5bf=await apiRequest(_0x5754b5(0x146)+_0x5a5a3c+_0x5754b5(0x114),{'method':'POST','body':{'appCode':_0x5927a6,..._0x217821}});return _0x3fb5bf['data'];}export async function listPersonalBffs(_0x534954){const _0x5eb3d2=a104_0x2c0e,_0xa60256=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x534954));return Array[_0x5eb3d2(0xcc)](_0xa60256[_0x5eb3d2(0x119)])?_0xa60256[_0x5eb3d2(0x119)]:[];}export async function getPersonalBff(_0x377943,_0x548064){const _0x2c5257=a104_0x2c0e,_0x4d87ce=await apiRequest(_0x2c5257(0xe7)+_0x377943+_0x2c5257(0xd1)+encodeURIComponent(_0x548064));if(!_0x4d87ce[_0x2c5257(0x119)])throw CliErrors[_0x2c5257(0x132)](_0x2c5257(0x158)+_0x377943);return _0x4d87ce[_0x2c5257(0x119)];}export async function createPersonalBff(_0x368e18,_0x28fc2f){const _0x263ca2=a104_0x2c0e,_0x5d5cf9=await apiRequest(_0x263ca2(0x12a),{'method':_0x263ca2(0xef),'body':{'appCode':_0x368e18,..._0x28fc2f}});return _0x5d5cf9['data'];}export async function updatePersonalBff(_0x3bbe31,_0x128afe,_0x3735e8){const _0x2978ea=a104_0x2c0e,_0x524778=await apiRequest('/client/runtime-bff/personal/'+_0x3bbe31+_0x2978ea(0x114),{'method':'POST','body':{'appCode':_0x128afe,..._0x3735e8}});return _0x524778[_0x2978ea(0x119)];}export async function executePersonalBff(_0x387d7b,_0x20994a,_0x39cfbc){const _0x5c2612=a104_0x2c0e,_0x3ad2a4=await apiRequest(_0x5c2612(0xe7)+_0x387d7b+'/execute?appCode='+encodeURIComponent(_0x20994a),{'method':_0x5c2612(0xef),'body':_0x39cfbc});return _0x3ad2a4['data'];}export async function listPersonalKnowledgeBaseItems(_0x230f67){const _0x4364ba=a104_0x2c0e,_0x4f5693=await apiRequest(_0x4364ba(0x121)+encodeURIComponent(_0x230f67));return Array[_0x4364ba(0xcc)](_0x4f5693[_0x4364ba(0x119)])?_0x4f5693['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x3d0627,_0x3fb366){const _0x269a38=a104_0x2c0e,_0x2f507c=await apiRequest(_0x269a38(0x103)+_0x3d0627+_0x269a38(0xd1)+encodeURIComponent(_0x3fb366));if(!_0x2f507c[_0x269a38(0x119)])throw CliErrors['validation'](_0x269a38(0x13b)+_0x3d0627);return _0x2f507c[_0x269a38(0x119)];}export async function createPersonalKnowledgeBaseItem(_0x1a5441,_0x11de74){const _0x33bd85=a104_0x2c0e,_0x3dbd50=await apiRequest(_0x33bd85(0xd4),{'method':_0x33bd85(0xef),'body':{'appCode':_0x1a5441,..._0x11de74}});return _0x3dbd50[_0x33bd85(0x119)];}export async function updatePersonalKnowledgeBaseItem(_0x55cedc,_0x394ba9,_0x3665a5){const _0x104685=a104_0x2c0e,_0x58abdb=await apiRequest(_0x104685(0x103)+_0x55cedc+_0x104685(0x114),{'method':_0x104685(0xef),'body':{'appCode':_0x394ba9,..._0x3665a5}});return _0x58abdb[_0x104685(0x119)];}export async function getRuntimeSkillByCode(_0x149795,_0x4aeb87){const _0x5ac61c=a104_0x2c0e,_0x4697cd=await skillHubJsonRequest(_0x5ac61c(0xdd)+encodeURIComponent(_0x149795)+'/'+encodeURIComponent(_0x4aeb87),{'allowNotFound':!![]});return _0x4697cd?skillHubRuntimeDetailToRuntimeSkill(_0x4697cd):undefined;}export async function listRuntimeSkills(_0x286249){const _0x32d74a=a104_0x2c0e,_0xf26713=await skillHubJsonRequest(_0x32d74a(0xaa)+encodeURIComponent(_0x286249[_0x32d74a(0xe8)])+_0x32d74a(0x123),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x286249[_0x32d74a(0xe8)],_0xf26713,_0x286249[_0x32d74a(0x95)]??_0x32d74a(0x8b),_0x286249['code']);}export async function listPersonalRuntimeSkills(_0x448306){const _0x32dbb4=a104_0x2c0e;return(await listRuntimeSkills({'appCode':_0x448306,'scope':_0x32dbb4(0x136)}))[_0x32dbb4(0x136)];}export async function listCompanyRuntimeSkills(_0x36f863){const _0x101fca=a104_0x2c0e;return(await listRuntimeSkills({'appCode':_0x36f863,'scope':_0x101fca(0xac)}))[_0x101fca(0xac)];}export async function listVisibleRuntimeSkills(_0x4a39bb){const _0x2de5aa=a104_0x2c0e;return(await listRuntimeSkills({'appCode':_0x4a39bb,'scope':_0x2de5aa(0x8b)}))['effective'];}export async function createPersonalRuntimeSkill(_0xcdd9d5,_0x48ac6b,_0x29ab4d={}){const _0x1d2bf6=a104_0x2c0e;return publishRuntimeSkill(_0xcdd9d5,_0x48ac6b,{'visibility':_0x1d2bf6(0xa4),'confirmWarnings':_0x29ab4d['confirmWarnings']});}function a104_0x2c0e(_0x5411d7,_0x392a19){_0x5411d7=_0x5411d7-0x89;const _0x45cf8c=a104_0x45cf();let _0x2c0e16=_0x45cf8c[_0x5411d7];return _0x2c0e16;}export async function updatePersonalRuntimeSkill(_0x2490e2,_0x40fec8,_0x4c55df,_0x57c750={}){const _0xb5f7a1=a104_0x2c0e;return publishRuntimeSkill(_0x40fec8,{..._0x4c55df,'skillCode':_0x4c55df[_0xb5f7a1(0x126)]??_0x2490e2},{'visibility':_0xb5f7a1(0xa4),'confirmWarnings':_0x57c750[_0xb5f7a1(0x128)]});}export async function publishCompanyRuntimeSkill(_0x53fe7e,_0x350846,_0x2398df={}){const _0x31c747=a104_0x2c0e;return publishRuntimeSkill(_0x53fe7e,_0x350846,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x2398df[_0x31c747(0x128)]});}export async function validateRuntimeSkillPublish(_0x2f64b3,_0x18d514,_0x346d19){const _0x1287c5=a104_0x2c0e,_0x2c2eab=buildRuntimeSkillPublishForm(_0x18d514,_0x346d19[_0x1287c5(0xcd)]),_0x547f42=await skillHubJsonRequest(_0x1287c5(0xa1)+encodeURIComponent(_0x2f64b3)+_0x1287c5(0x13c),{'method':'POST','body':_0x2c2eab});return assertJointDiagramAcknowledged(_0x18d514[_0x1287c5(0xf6)],_0x547f42[_0x1287c5(0xd0)],_0x1287c5(0x132)),{'valid':_0x547f42['valid']===!![],'errors':Array[_0x1287c5(0xcc)](_0x547f42[_0x1287c5(0x14b)])?_0x547f42['errors']:[],'warnings':Array[_0x1287c5(0xcc)](_0x547f42[_0x1287c5(0xfa)])?_0x547f42[_0x1287c5(0xfa)]:[],'resolvedSlug':_0x547f42[_0x1287c5(0x90)],'resolvedVersion':_0x547f42[_0x1287c5(0x106)],'diagramValidated':_0x547f42[_0x1287c5(0xd0)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x3e596a,_0x17612d,_0x57c59b,_0x3cfc75,_0x4ab71c){const _0x136742=a104_0x2c0e;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x3e596a,_0x17612d,_0x57c59b,'/validate'),{'method':'POST','query':{'scope':_0x3cfc75},'headers':{'Content-Type':_0x136742(0x93)},'body':JSON['stringify'](_0x4ab71c)});}export async function putRuntimeSkillVersionDiagram(_0x499ed2,_0x508b47,_0x1f4f1c,_0x43ceb7,_0x4687da){const _0x529448=a104_0x2c0e;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x499ed2,_0x508b47,_0x1f4f1c),{'method':_0x529448(0xb4),'query':{'scope':_0x43ceb7},'headers':{'Content-Type':_0x529448(0x93)},'body':JSON[_0x529448(0x134)](_0x4687da)});}export async function getRuntimeSkillVersionDiagram(_0x44046d,_0x56ca66,_0x18b42a,_0x2ab586){const _0x2a84fa=a104_0x2c0e,_0x14e756=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x44046d,_0x56ca66,_0x18b42a),{'query':{'scope':_0x2ab586}});if(typeof _0x14e756[_0x2a84fa(0x145)]!==_0x2a84fa(0x153))throw CliErrors[_0x2a84fa(0xa7)](_0x2a84fa(0xbe));const _0x137681=_0x14e756[_0x2a84fa(0xf0)];if(typeof _0x137681!==_0x2a84fa(0xcf)||!/^sha256:[0-9a-f]{64}$/[_0x2a84fa(0x101)](_0x137681))throw CliErrors[_0x2a84fa(0xa7)](_0x2a84fa(0x8c),_0x2a84fa(0x8e));const _0x38ff3a=_0x14e756[_0x2a84fa(0xdc)];if(_0x14e756[_0x2a84fa(0x145)]&&(!Number['isInteger'](_0x38ff3a)||Number(_0x38ff3a)<0x1))throw CliErrors['apiError'](_0x2a84fa(0xf5));if(!_0x14e756[_0x2a84fa(0x145)]&&_0x38ff3a!==undefined&&_0x38ff3a!==null)throw CliErrors[_0x2a84fa(0xa7)](_0x2a84fa(0x10d));const _0x3735cf=_0x14e756[_0x2a84fa(0x145)]?Number(_0x38ff3a):null;return{..._0x14e756,'sourceFingerprint':_0x137681,'diagramRevision':_0x3735cf,'expectedDiagramRevision':_0x3735cf??0x0};}export async function downloadRuntimeSkillPackage(_0x14d73f,_0x30d8ab,_0x173a9a,_0x299174){const _0x450098=a104_0x2c0e;void _0x14d73f;const _0x5cae=_0x299174?_0x450098(0xa1)+encodeURIComponent(_0x173a9a)+'/'+encodeURIComponent(_0x30d8ab)+_0x450098(0x120)+encodeURIComponent(_0x299174)+_0x450098(0xe4):_0x450098(0xa1)+encodeURIComponent(_0x173a9a)+'/'+encodeURIComponent(_0x30d8ab)+_0x450098(0xe4);return skillHubBinaryRequest(_0x5cae);}async function publishRuntimeSkill(_0x50e317,_0x5a392a,_0x15e582){const _0x245d04=a104_0x2c0e,_0x206954=buildRuntimeSkillPublishForm(_0x5a392a,_0x15e582['visibility']),_0x51925e=await skillHubJsonRequest(_0x245d04(0xa1)+encodeURIComponent(_0x50e317)+'/publish',{'method':_0x245d04(0xef),'query':{'confirmWarnings':_0x15e582[_0x245d04(0x128)]===!![]?!![]:undefined},'body':_0x206954});return assertJointDiagramAcknowledged(_0x5a392a[_0x245d04(0xf6)],_0x51925e[_0x245d04(0x149)],_0x245d04(0x144)),{'appCode':_0x51925e[_0x245d04(0xa0)]??_0x50e317,'skillCode':_0x51925e[_0x245d04(0x14f)]??_0x5a392a[_0x245d04(0x126)]??'','skillName':_0x5a392a[_0x245d04(0x14e)]??_0x51925e[_0x245d04(0x14f)]??_0x5a392a[_0x245d04(0x126)],'description':_0x5a392a[_0x245d04(0x127)],'scope':skillHubVisibilityToScope(_0x51925e[_0x245d04(0xcd)]??_0x15e582[_0x245d04(0xcd)])??_0x245d04(0x136),'version':_0x51925e[_0x245d04(0x12b)]??_0x5a392a[_0x245d04(0x12b)],'tags':_0x5a392a['tags'],'content':_0x5a392a[_0x245d04(0x9b)],'diagramBound':_0x51925e[_0x245d04(0x149)]===!![]};}function assertJointDiagramAcknowledged(_0x437a03,_0x34e395,_0x4e34ec){const _0x49f939=a104_0x2c0e;if(!_0x437a03||_0x34e395===!![])return;throw CliErrors['apiError'](_0x49f939(0x12c)+_0x4e34ec+'.','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.');}function buildRuntimeSkillPublishForm(_0x5ab27c,_0x146fbc){const _0x2cf215=a104_0x2c0e,_0x3a263d=new FormData();return _0x3a263d[_0x2cf215(0x15a)](_0x2cf215(0xfe),runtimeSkillPackageFile(_0x5ab27c)),_0x5ab27c[_0x2cf215(0x14e)]?.[_0x2cf215(0x10f)]()&&_0x3a263d[_0x2cf215(0x15a)](_0x2cf215(0x147),_0x5ab27c[_0x2cf215(0x14e)]['trim']()),_0x3a263d['set'](_0x2cf215(0xcd),_0x146fbc),_0x5ab27c[_0x2cf215(0xf6)]&&_0x3a263d['set']('diagram',new Blob([JSON[_0x2cf215(0x134)](_0x5ab27c[_0x2cf215(0xf6)])],{'type':_0x2cf215(0x93)})),_0x3a263d;}function runtimeSkillVersionDiagramPath(_0x1e34bb,_0x3feefc,_0x95c16b,_0x299076=''){const _0x246acd=a104_0x2c0e;return _0x246acd(0xa1)+encodeURIComponent(_0x1e34bb)+'/'+encodeURIComponent(_0x3feefc)+_0x246acd(0x120)+encodeURIComponent(_0x95c16b)+_0x246acd(0xd8)+_0x299076;}function runtimeSkillPackageFile(_0x2f0f23){const _0x86bb5f=a104_0x2c0e;if(!_0x2f0f23[_0x86bb5f(0x14d)])throw CliErrors[_0x86bb5f(0x132)](_0x86bb5f(0xb1));const _0xe2c83e=Buffer[_0x86bb5f(0x150)](_0x2f0f23[_0x86bb5f(0x14d)],'base64'),_0x57ec89=new Blob([_0xe2c83e],{'type':_0x86bb5f(0x99)}),_0x41bbc1=(_0x2f0f23[_0x86bb5f(0x126)]||'skill')+_0x86bb5f(0xf1);if(typeof File!==_0x86bb5f(0x11a))return new File([_0x57ec89],_0x41bbc1,{'type':_0x86bb5f(0x99)});return _0x57ec89;}function normalizeSkillHubRuntimeListResponse(_0x2dfa26,_0x323935,_0x24357b,_0x2b8f22){const _0x16c3dc=a104_0x2c0e,_0x21db58=Array[_0x16c3dc(0xcc)](_0x323935)?_0x323935:Array[_0x16c3dc(0xcc)](_0x323935?.[_0x16c3dc(0x96)])?_0x323935['items']:[],_0x18bf0f=_0x2b8f22?.[_0x16c3dc(0x10f)](),_0x1462c6=_0x21db58[_0x16c3dc(0xd2)](_0x52d981=>!_0x18bf0f||_0x52d981[_0x16c3dc(0x14f)]===_0x18bf0f)[_0x16c3dc(0x14a)](skillHubRuntimeItemToRuntimeSkill)[_0x16c3dc(0xd2)](_0x48413a=>Boolean(_0x48413a)),_0x148c2c=_0x1462c6[_0x16c3dc(0xd2)](_0x53f0cb=>_0x53f0cb[_0x16c3dc(0x95)]===_0x16c3dc(0x136)),_0x486a27=_0x1462c6[_0x16c3dc(0xd2)](_0x2f8a4a=>_0x2f8a4a[_0x16c3dc(0x95)]===_0x16c3dc(0xac));return{'appCode':_0x2dfa26,'personal':_0x24357b==='company'?[]:_0x148c2c,'company':_0x24357b===_0x16c3dc(0x136)?[]:_0x486a27,'effective':buildEffectiveRuntimeSkills(_0x148c2c,_0x486a27,_0x24357b)};}function skillHubRuntimeItemToRuntimeSkill(_0x4bc8db){const _0x1eb8b4=a104_0x2c0e,_0x1d622d=_0x4bc8db[_0x1eb8b4(0x14f)]?.[_0x1eb8b4(0x10f)](),_0x597edc=skillHubVisibilityToScope(_0x4bc8db[_0x1eb8b4(0xcd)]);if(!_0x1d622d||!_0x597edc)return undefined;return{'id':_0x4bc8db['id'],'appCode':_0x4bc8db['namespace'],'skillCode':_0x1d622d,'skillName':_0x4bc8db['displayName']??_0x1d622d,'description':_0x4bc8db[_0x1eb8b4(0x9e)],'example':_0x4bc8db[_0x1eb8b4(0xc5)],'scope':_0x597edc,'version':skillHubRuntimeItemVersion(_0x4bc8db),'status':_0x4bc8db['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x19a53d){const _0x199ed1=a104_0x2c0e,_0x38366a=_0x19a53d['slug']?.[_0x199ed1(0x10f)]();if(!_0x38366a)return undefined;return{'id':_0x19a53d['id'],'appCode':_0x19a53d[_0x199ed1(0xa0)],'skillCode':_0x38366a,'skillName':_0x19a53d[_0x199ed1(0x147)]??_0x38366a,'description':_0x19a53d[_0x199ed1(0x9e)],'example':_0x19a53d[_0x199ed1(0xc5)],'scope':skillHubVisibilityToScope(_0x19a53d['visibility'])??_0x19a53d[_0x199ed1(0xcd)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x19a53d),'status':_0x19a53d[_0x199ed1(0xb0)]};}function skillHubVisibilityToScope(_0x2bc780){const _0x180235=a104_0x2c0e;if(_0x2bc780==='PRIVATE')return _0x180235(0x136);if(_0x2bc780===_0x180235(0xd7))return _0x180235(0xac);return undefined;}function skillHubRuntimeItemVersion(_0x232355){const _0xa7dbf3=a104_0x2c0e;return _0x232355[_0xa7dbf3(0x11e)]?.[_0xa7dbf3(0x12b)]??_0x232355['headlineVersion']?.[_0xa7dbf3(0x12b)]??_0x232355[_0xa7dbf3(0xc7)]?.[_0xa7dbf3(0x12b)];}function buildEffectiveRuntimeSkills(_0xf6f69c,_0x2326b0,_0xe99488){const _0x7a2b22=a104_0x2c0e;if(_0xe99488===_0x7a2b22(0x136))return _0xf6f69c;if(_0xe99488===_0x7a2b22(0xac))return _0x2326b0;const _0x4629aa=new Map();for(const _0x2a1407 of _0x2326b0){_0x4629aa[_0x7a2b22(0x15a)](_0x2a1407[_0x7a2b22(0x126)],_0x2a1407);}for(const _0x2f182e of _0xf6f69c){_0x4629aa[_0x7a2b22(0x15a)](_0x2f182e[_0x7a2b22(0x126)],_0x2f182e);}return Array[_0x7a2b22(0x150)](_0x4629aa[_0x7a2b22(0x104)]());}function normalizeRuntimeSkillListResponse(_0x3a7b0c,_0x3d7898){const _0xa7669b=a104_0x2c0e;if(Array[_0xa7669b(0xcc)](_0x3d7898)){const _0x3552dc=_0x3d7898[_0xa7669b(0xd2)](_0x2a38d6=>_0x2a38d6['scope']===_0xa7669b(0x136)),_0x3b8795=_0x3d7898[_0xa7669b(0xd2)](_0x10b212=>_0x10b212[_0xa7669b(0x95)]===_0xa7669b(0xac));return{'appCode':_0x3a7b0c,'personal':_0x3552dc,'company':_0x3b8795,'effective':[..._0x3b8795,..._0x3552dc]};}return{'appCode':_0x3d7898?.[_0xa7669b(0xe8)]??_0x3a7b0c,'personal':Array[_0xa7669b(0xcc)](_0x3d7898?.[_0xa7669b(0x136)])?_0x3d7898['personal']:[],'company':Array[_0xa7669b(0xcc)](_0x3d7898?.[_0xa7669b(0xac)])?_0x3d7898[_0xa7669b(0xac)]:[],'effective':Array[_0xa7669b(0xcc)](_0x3d7898?.[_0xa7669b(0xe3)])?_0x3d7898[_0xa7669b(0xe3)]:[]};}function normalizeRuntimeRoleUserList(_0x5e9e9d,_0x2a3d0f){const _0x592dc3=a104_0x2c0e;if(!Array[_0x592dc3(0xcc)](_0x5e9e9d))throw CliErrors[_0x592dc3(0xa7)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x2a3d0f+_0x592dc3(0x8d));return _0x5e9e9d[_0x592dc3(0x14a)]((_0x1f71c6,_0x2a7999)=>{const _0x1a1850=_0x592dc3;if(!_0x1f71c6||typeof _0x1f71c6!==_0x1a1850(0x15b)||Array['isArray'](_0x1f71c6))throw CliErrors[_0x1a1850(0xa7)](_0x1a1850(0x148)+_0x2a3d0f+'['+_0x2a7999+']\x20must\x20be\x20an\x20object.');const _0x4bde88=_0x1f71c6,_0xd06d45=normalizePositiveSafeInteger(_0x4bde88[_0x1a1850(0xe9)]);if(_0xd06d45===undefined)throw CliErrors[_0x1a1850(0xa7)](_0x1a1850(0x148)+_0x2a3d0f+'['+_0x2a7999+'].userId\x20must\x20be\x20a\x20positive\x20safe\x20integer\x20or\x20numeric\x20string.');return{..._0x4bde88,'userId':_0xd06d45};});}function a104_0x45cf(){const _0x18b283=['cursor','resolvedVersion','append','/client/queryFileUrl','name','records','1000777MNJJTa','10JJathe','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','toString','trim','/client/permit/user-role/update-user-list','Artifact\x20not\x20found:\x20id=','/client/dept/queryAppUser','limit','/update','5228498NbJuQl','/client/permit/dataset/list','6RyzsWv','SkillHub\x20API\x20error:\x20','data','undefined',',\x20name=','683874LMxvqW','/client/permit/user-role/get-user-list','publishedVersion','markdown','/versions/','/client/knowledge-base/personal/list?appCode=','code','/skills','/api/flow/task/','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','skillCode','description','confirmWarnings','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/client/runtime-bff/personal/create','version','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','gmtModified','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','GET','Check\x20your\x20credentials\x20and\x20try\x20again.','CUSTOM','validation','/client/artifact/create','stringify','/client/permit/dataset/permit-list','personal','invokeSource','Invalid\x20app\x20config\x20value:\x20key=','Invalid\x20approval\x20task\x20detail\x20response.','/client/dataset/list','Knowledge-base\x20entry\x20not\x20found:\x20id=','/publish/validate','min','runtime','errorCode','].userList','/client/notification/channel-config/list?','2yrtbTY','Request\x20timeout:\x20','publish','found','/client/artifact/','displayName','Invalid\x20runtime\x20role\x20members\x20response:\x20','diagramBound','map','errors','33AaNuAc','packageBase64','skillName','slug','from','7456RSWQzq','type','boolean','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/permit/role/delete','DELETE','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','favorite','set','object','api-doc-generator','kind','permitList','all','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','\x20must\x20be\x20an\x20array.','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','tableData','resolvedSlug','source','/client/permit/role/update','application/json','/client/permit/resource/batch-save-dataset','scope','items','arrayBuffer','searchParams','application/zip','Toolbox\x20API\x20error:\x20','content','/client/app-config/getByKey?','].applyUserList','summary','Download\x20failed:\x20','namespace','/api/cli/v1/skills/','headers','isJson','PRIVATE','/client/sql/query','/schedules','apiError','SkillHub\x20error\x20code:\x20','/api/flow/approve','/api/runtime/v1/namespaces/','Configure\x20accessKey\x20in\x20','company','functions','Invalid\x20notification\x20config\x20list\x20response.','url','status','Missing\x20Skill\x20package\x20payload.','AbortError','13LfybZZ','PUT','/client/permit/role/get-list','api','/client/permit/resource/batch-save-menu','/validate','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','size','sqlCode','/api/node-toolbox/','find','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','345532QKrpso','errorMsg','roleList[','/client/menu/permit-list','artifactType','error','example','/api/flow/task/transfer','ownerPreviewVersion','download','/api/harness/apps/','number','/client/permit/page/get-one','isArray','visibility','msg','string','diagramValidated','?appCode=','filter','abort','/client/knowledge-base/personal/create','success','newConfigFileName','NAMESPACE_ONLY','/diagram','5782AzECyE','text','entries','diagramRevision','/api/v1/skills/','API\x20error:\x20','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','/client/permit/role/get-permit-list','/client/ocr','effective','/download','Toolbox\x20API\x20error','message','/client/runtime-bff/personal/','appCode','userId','longTerm','authRequired','4336945rFBZlE','/api/approve/todo?','/client/uploadFile','POST','sourceFingerprint','.zip','API\x20error\x20code:\x20','replace','function','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','diagram','/client/permit/role/create','12222912gJedkg','SQL\x20query\x20not\x20found:\x20','warnings','applyUserList','signal','functionName','file','application/octet-stream','pageSize','test','userList','/client/knowledge-base/personal/','values'];a104_0x45cf=function(){return _0x18b283;};return a104_0x45cf();}function normalizeRuntimeRoleUsersResponse(_0xb3c343){const _0x1ac362=a104_0x2c0e;return extractList(_0xb3c343)[_0x1ac362(0x14a)]((_0x2c21d8,_0x5cb73d)=>{const _0x51bddd=_0x1ac362;if(!_0x2c21d8||typeof _0x2c21d8!==_0x51bddd(0x15b)||Array['isArray'](_0x2c21d8))throw CliErrors[_0x51bddd(0xa7)](_0x51bddd(0xe0)+_0x5cb73d+']\x20must\x20be\x20an\x20object.');const _0x32118b=_0x2c21d8;return{..._0x32118b,'userList':normalizeRuntimeRoleUserList(_0x32118b[_0x51bddd(0x102)],_0x51bddd(0xc1)+_0x5cb73d+_0x51bddd(0x140)),..._0x32118b['applyUserList']===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x32118b[_0x51bddd(0xfb)],_0x51bddd(0xc1)+_0x5cb73d+_0x51bddd(0x9d))}};});}export async function listRuntimeAppRoles(_0x51c987,_0xc934b5={}){const _0x6c68b3=a104_0x2c0e,_0x5135b6=_0xc934b5['currentPage']??0x1,_0x10ff5b=Math[_0x6c68b3(0x13d)](Math['max'](_0xc934b5[_0x6c68b3(0x100)]??0x64,0x1),0x64),_0x3038c7=await apiRequest(_0x6c68b3(0xb5),{'method':_0x6c68b3(0xef),'body':{'appCode':_0x51c987,..._0xc934b5['roleName']?{'roleName':_0xc934b5['roleName']}:{},'currentPage':_0x5135b6,'pageSize':_0x10ff5b}});return{'items':extractList(_0x3038c7[_0x6c68b3(0x119)]),'paging':extractPaging(_0x3038c7[_0x6c68b3(0x119)])};}export async function createRuntimeAppRole(_0x56bcfa){const _0x44a898=a104_0x2c0e,_0x201128=await apiRequest(_0x44a898(0xf7),{'method':_0x44a898(0xef),'body':{'roleType':_0x44a898(0x131),..._0x56bcfa}});return _0x201128[_0x44a898(0x119)];}export async function updateRuntimeAppRole(_0xf3fe4b){const _0x586c1b=a104_0x2c0e,_0x269ef1=await apiRequest(_0x586c1b(0x92),{'method':_0x586c1b(0xef),'body':_0xf3fe4b});return _0x269ef1['data'];}export async function deleteRuntimeAppRole(_0xf043fb){const _0x5270de=a104_0x2c0e,_0x482506=await apiRequest(_0x5270de(0x155),{'method':_0x5270de(0xef),'body':{'id':_0xf043fb}});return _0x482506[_0x5270de(0x119)];}export async function listRuntimeRoleUsers(_0x5e7533){const _0x3c6db6=a104_0x2c0e,_0x5b3da6=await apiRequest(_0x3c6db6(0x11d),{'method':_0x3c6db6(0xef),'body':{'appCode':_0x5e7533}});return normalizeRuntimeRoleUsersResponse(_0x5b3da6[_0x3c6db6(0x119)]);}export async function updateRuntimeRoleUsers(_0x3d17ad,_0x416171){const _0x13a5b8=a104_0x2c0e,_0x532e2d=await apiRequest(_0x13a5b8(0x110),{'method':'POST','body':{'appCode':_0x3d17ad,'roleList':_0x416171}});return _0x532e2d[_0x13a5b8(0x119)];}export async function listRuntimeAppUsers(_0x342a8d){const _0x2c5ce8=a104_0x2c0e,_0x118e49=await apiRequest(_0x2c5ce8(0x112)+runtimePermitQuery({'appCode':_0x342a8d}));return extractList(_0x118e49[_0x2c5ce8(0x119)]);}function runtimePermitQuery(_0x137c30){const _0x320bdc=a104_0x2c0e,_0x4b8f7a=new URLSearchParams();for(const [_0x13b354,_0xca7cf9]of Object[_0x320bdc(0xdb)](_0x137c30))_0x4b8f7a['set'](_0x13b354,String(_0xca7cf9));return'?'+_0x4b8f7a[_0x320bdc(0x10e)]();}export async function listRuntimePermitRoles(_0x556a50,_0x33e4dd={}){const _0x5dc3ec=a104_0x2c0e,_0x3a19e5=await apiRequest(_0x5dc3ec(0xe1),{'method':_0x5dc3ec(0xef),'body':{'appCode':_0x556a50,..._0x33e4dd}});return extractList(_0x3a19e5[_0x5dc3ec(0x119)]);}export async function getRuntimePagePermit(_0xa79868){const _0x2aa243=a104_0x2c0e,_0x45a8fc=await apiRequest(_0x2aa243(0xcb)+runtimePermitQuery({'menuId':_0xa79868}));return _0x45a8fc[_0x2aa243(0x119)];}export async function saveRuntimePagePermit(_0x5a2a74){const _0x1aa9a2=await apiRequest('/client/permit/page/save',{'method':'POST','body':_0x5a2a74});return _0x1aa9a2['data'];}export async function getRuntimeRoleMenuResources(_0x2f623c,_0x1070ce){const _0xab028c=a104_0x2c0e,_0x1fd969=await apiRequest('/client/permit/resource/get-menu-list',{'method':_0xab028c(0xef),'body':{'appCode':_0x2f623c,'roleId':_0x1070ce}});return extractList(_0x1fd969['data']);}export async function listRuntimeMenuRolePermits(_0x4eaa32){const _0x52a814=a104_0x2c0e,_0x15f945=await apiRequest(_0x52a814(0xc2)+runtimePermitQuery({'appCode':_0x4eaa32}));return Array['isArray'](_0x15f945[_0x52a814(0x119)]?.[_0x52a814(0x8a)])?_0x15f945[_0x52a814(0x119)][_0x52a814(0x8a)]:[];}export async function saveRuntimeMenuRolePermits(_0x58b241,_0x3a3b55){const _0x2790cc=a104_0x2c0e,_0x44042c=await apiRequest(_0x2790cc(0xb7),{'method':_0x2790cc(0xef),'body':{'appCode':_0x58b241,'permitList':_0x3a3b55}});return _0x44042c['data'];}export async function listRuntimeDatasetPermits(_0x12f02d,_0x439f48){const _0x2ba0db=a104_0x2c0e,_0x34d24c=await apiRequest(_0x2ba0db(0x116)+runtimePermitQuery({'appCode':_0x12f02d,'roleId':_0x439f48}));return Array[_0x2ba0db(0xcc)](_0x34d24c[_0x2ba0db(0x119)]?.[_0x2ba0db(0x8a)])?_0x34d24c[_0x2ba0db(0x119)][_0x2ba0db(0x8a)]:[];}export async function listRuntimeDatasetRolePermits(_0x43757a){const _0x239c24=a104_0x2c0e,_0x7fd4df=await apiRequest(_0x239c24(0x135)+runtimePermitQuery({'appCode':_0x43757a}));return Array[_0x239c24(0xcc)](_0x7fd4df[_0x239c24(0x119)]?.[_0x239c24(0x8a)])?_0x7fd4df[_0x239c24(0x119)][_0x239c24(0x8a)]:[];}export async function saveRuntimeDatasetRolePermits(_0x1203aa,_0x4f6615){const _0x59e14e=a104_0x2c0e,_0x58f820=await apiRequest(_0x59e14e(0x94),{'method':_0x59e14e(0xef),'body':{'appCode':_0x1203aa,'permitList':_0x4f6615}});return _0x58f820[_0x59e14e(0x119)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x5ce3(_0x1194e8,_0x2e4c58){_0x1194e8=_0x1194e8-0x184;const _0x209a6a=a105_0x209a();let _0x5ce342=_0x209a6a[_0x1194e8];return _0x5ce342;}function a105_0x209a(){const _0x512a7e=['db-','dbName','1143zVpfjO','dbtableConfig','2227113WiVtNY','436002XAshmG','find','set','2490025fgamOr','107868iSbMHm','63uowfYs','dbId','map','entries','2735976Nmoxdo','get','181942PaFtEH','has','3834MKxTJX'];a105_0x209a=function(){return _0x512a7e;};return a105_0x209a();}(function(_0x28a508,_0x3ef1d6){const _0xe05752=a105_0x5ce3,_0x1c08ab=_0x28a508();while(!![]){try{const _0x160a4a=parseInt(_0xe05752(0x196))/0x1+parseInt(_0xe05752(0x185))/0x2*(parseInt(_0xe05752(0x188))/0x3)+-parseInt(_0xe05752(0x18f))/0x4+-parseInt(_0xe05752(0x18e))/0x5+parseInt(_0xe05752(0x18b))/0x6*(parseInt(_0xe05752(0x190))/0x7)+-parseInt(_0xe05752(0x194))/0x8+-parseInt(_0xe05752(0x18a))/0x9;if(_0x160a4a===_0x3ef1d6)break;else _0x1c08ab['push'](_0x1c08ab['shift']());}catch(_0x4dcd3a){_0x1c08ab['push'](_0x1c08ab['shift']());}}}(a105_0x209a,0x6e538));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0xdcec4a){const _0x14f702=a105_0x5ce3;if(cache[_0x14f702(0x184)](_0xdcec4a))return cache[_0x14f702(0x195)](_0xdcec4a);const _0x5cdd76=await listDatasets(_0xdcec4a),_0x57b598=new Map();for(const _0x423c7d of _0x5cdd76){const _0x121af5=_0x423c7d[_0x14f702(0x189)];_0x121af5?.[_0x14f702(0x191)]!=null&&_0x57b598['set'](_0x121af5[_0x14f702(0x191)],_0x121af5[_0x14f702(0x187)]??_0x14f702(0x186)+_0x121af5[_0x14f702(0x191)]);}const _0x20d195=[..._0x57b598[_0x14f702(0x193)]()][_0x14f702(0x192)](([_0x6a0f48,_0x265c30])=>({'dbId':_0x6a0f48,'dbName':_0x265c30}));return cache[_0x14f702(0x18d)](_0xdcec4a,_0x20d195),_0x20d195;}export async function getDbName(_0x41f4e0,_0x14542d){const _0x27c621=a105_0x5ce3;try{const _0x1cb37d=await listDatabases(_0x41f4e0);return _0x1cb37d[_0x27c621(0x18c)](_0xc4b5b6=>_0xc4b5b6[_0x27c621(0x191)]===_0x14542d)?.[_0x27c621(0x187)];}catch{return undefined;}}
|