@lovrabet/lovrabet-cli 2.3.11 → 2.3.12
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.js +1 -1
- package/lib/commands/artifact/index.d.ts +13 -1
- 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/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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 +3 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.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/access-error.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- 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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a97_0x188652=a97_0x3615;function a97_0x3615(_0x1bc866,_0x6f0357){_0x1bc866=_0x1bc866-0x86;const _0x30bccb=a97_0x30bc();let _0x36151f=_0x30bccb[_0x1bc866];return _0x36151f;}(function(_0x4a650d,_0x144e7d){const _0x5ee099=a97_0x3615,_0x597ee8=_0x4a650d();while(!![]){try{const _0x2b3e73=-parseInt(_0x5ee099(0x9d))/0x1*(parseInt(_0x5ee099(0x8e))/0x2)+-parseInt(_0x5ee099(0xa7))/0x3*(parseInt(_0x5ee099(0x95))/0x4)+parseInt(_0x5ee099(0x93))/0x5*(-parseInt(_0x5ee099(0x9e))/0x6)+-parseInt(_0x5ee099(0x8b))/0x7+parseInt(_0x5ee099(0x8f))/0x8*(parseInt(_0x5ee099(0xad))/0x9)+-parseInt(_0x5ee099(0xa0))/0xa*(parseInt(_0x5ee099(0x99))/0xb)+parseInt(_0x5ee099(0x8c))/0xc;if(_0x2b3e73===_0x144e7d)break;else _0x597ee8['push'](_0x597ee8['shift']());}catch(_0x21d853){_0x597ee8['push'](_0x597ee8['shift']());}}}(a97_0x30bc,0x25234));import{PRODUCT_CONFIG}from'../constant/product.js';function a97_0x30bc(){const _0x238ec5=['map','nonInteractive','3mtgqrn','app','help','params','sqlcode','<expr>','562824lYTUqN','non-interactive','Record\x20ID','Clear\x20output','cliDisplayName','Name\x20filter','production\x20|\x20development\x20|\x20daily','Preview\x20operation\x20without\x20executing','Use\x20global\x20config\x20scope','boolean','Environment','type','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','dry-run','Override\x20appcode','clear','global','636664uYcQIQ','8865864rKERfK','Force\x20non-interactive\x20mode\x20(CI)','2Zcqstl','32LvstIB','format','env','Verbose\x20output','113185przRNq','verbose','968096dEwNvI','cliBinName','yes','name','1606HUuNuJ','meowKey','Alias\x20for\x20--non-interactive','Select\x20app\x20profile\x20by\x20name','277247rZLOYh','30aQWWff','appcode','7770kKuZzw','Show\x20help','<name>','string','<code>'];a97_0x30bc=function(){return _0x238ec5;};return a97_0x30bc();}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a97_0x188652(0x96)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a97_0x188652(0xb1)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a97_0x188652(0x9f),'meowKey':a97_0x188652(0x9f),'type':a97_0x188652(0xa3),'description':a97_0x188652(0x88),'hint':a97_0x188652(0xa4)},{'name':a97_0x188652(0xa8),'meowKey':a97_0x188652(0xa8),'type':a97_0x188652(0xa3),'description':a97_0x188652(0x9c),'hint':a97_0x188652(0xa2)},{'name':a97_0x188652(0x91),'meowKey':a97_0x188652(0x91),'type':a97_0x188652(0xa3),'description':a97_0x188652(0xb7),'hint':a97_0x188652(0xb3)},{'name':a97_0x188652(0x90),'meowKey':a97_0x188652(0x90),'type':a97_0x188652(0xa3),'description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a97_0x188652(0xa3),'description':a97_0x188652(0x86),'hint':a97_0x188652(0xac)},{'name':'dry-run','meowKey':'dryRun','type':a97_0x188652(0xb6),'description':a97_0x188652(0xb4)},{'name':a97_0x188652(0x97),'meowKey':a97_0x188652(0x97),'type':a97_0x188652(0xb6),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a97_0x188652(0xae),'meowKey':a97_0x188652(0xa6),'type':'boolean','description':a97_0x188652(0x8d)},{'name':'global','meowKey':a97_0x188652(0x8a),'type':a97_0x188652(0xb6),'description':a97_0x188652(0xb5)},{'name':'ci','meowKey':'ci','type':a97_0x188652(0xb6),'description':a97_0x188652(0x9b),'hidden':!![]},{'name':'help','meowKey':a97_0x188652(0xa9),'type':a97_0x188652(0xb6),'description':a97_0x188652(0xa1)},{'name':'id','meowKey':'id','type':a97_0x188652(0xa3),'description':a97_0x188652(0xaf),'hidden':!![]},{'name':'name','meowKey':a97_0x188652(0x98),'type':a97_0x188652(0xa3),'description':a97_0x188652(0xb2),'hidden':!![]},{'name':'sqlcode','meowKey':a97_0x188652(0xab),'type':a97_0x188652(0xa3),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a97_0x188652(0xaa),'meowKey':a97_0x188652(0xaa),'type':a97_0x188652(0xa3),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':'verbose','meowKey':a97_0x188652(0x94),'type':a97_0x188652(0xb6),'description':a97_0x188652(0x92),'hidden':!![]},{'name':a97_0x188652(0x89),'meowKey':'clear','type':a97_0x188652(0xb6),'description':a97_0x188652(0xb0),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a97_0x188652(0x9f),a97_0x188652(0xa8),'env',a97_0x188652(0x90),'jq',a97_0x188652(0x87),a97_0x188652(0x97),'non-interactive','ci']);export function buildMeowFlags(){const _0x28083c=a97_0x188652;return Object['fromEntries'](GLOBAL_FLAGS[_0x28083c(0xa5)](_0x10ee46=>[_0x10ee46[_0x28083c(0x9a)],{'type':_0x10ee46[_0x28083c(0xb8)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a98_0x5a04e9=a98_0x12aa;function a98_0x12aa(_0x42819b,_0x251458){_0x42819b=_0x42819b-0x18a;const _0x450f69=a98_0x450f();let _0x12aa24=_0x450f69[_0x42819b];return _0x12aa24;}function a98_0x450f(){const _0x2e7343=['167297GFRyTS','en-US','compress','470676KXmmUn','4346272yishxG','main','write','906690MmkNHd','652376lPoiRP','605589ZKbuxH','443388IKHsoD'];a98_0x450f=function(){return _0x2e7343;};return a98_0x450f();}(function(_0x9eab5a,_0x5ac790){const _0x56c158=a98_0x12aa,_0x48d614=_0x9eab5a();while(!![]){try{const _0x170527=-parseInt(_0x56c158(0x18c))/0x1+-parseInt(_0x56c158(0x18f))/0x2+parseInt(_0x56c158(0x18a))/0x3+-parseInt(_0x56c158(0x194))/0x4+-parseInt(_0x56c158(0x193))/0x5+parseInt(_0x56c158(0x18b))/0x6+parseInt(_0x56c158(0x190))/0x7;if(_0x170527===_0x5ac790)break;else _0x48d614['push'](_0x48d614['shift']());}catch(_0x1e6c5e){_0x48d614['push'](_0x48d614['shift']());}}}(a98_0x450f,0x24856));export const DEFAULT_APP_PROFILE_NAME=a98_0x5a04e9(0x191);export const DEFAULT_CONFIG_VALUES={'env':'production','format':a98_0x5a04e9(0x18e),'locale':a98_0x5a04e9(0x18d),'riskLevel':a98_0x5a04e9(0x192)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a98_0x5a04e9(0x18e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a99_0x5ecabf=a99_0x483c;(function(_0x1b6625,_0xe3cfb4){const _0x2fc33c=a99_0x483c,_0x66b85d=_0x1b6625();while(!![]){try{const _0xcf3c9c=parseInt(_0x2fc33c(0x89))/0x1+-parseInt(_0x2fc33c(0x8a))/0x2+parseInt(_0x2fc33c(0x98))/0x3*(parseInt(_0x2fc33c(0x91))/0x4)+-parseInt(_0x2fc33c(0x8c))/0x5*(-parseInt(_0x2fc33c(0x90))/0x6)+-parseInt(_0x2fc33c(0x95))/0x7*(parseInt(_0x2fc33c(0x8e))/0x8)+parseInt(_0x2fc33c(0x8b))/0x9*(-parseInt(_0x2fc33c(0x92))/0xa)+-parseInt(_0x2fc33c(0x97))/0xb*(parseInt(_0x2fc33c(0x8d))/0xc);if(_0xcf3c9c===_0xe3cfb4)break;else _0x66b85d['push'](_0x66b85d['shift']());}catch(_0x852294){_0x66b85d['push'](_0x66b85d['shift']());}}}(a99_0xfe35,0x193c3));import{PRODUCT_CONFIG}from'../constant/product.js';function a99_0x483c(_0x98a3b6,_0x3cc871){_0x98a3b6=_0x98a3b6-0x89;const _0xfe3545=a99_0xfe35();let _0x483c0e=_0xfe3545[_0x98a3b6];return _0x483c0e;}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a99_0x5ecabf(0x94)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a99_0x5ecabf(0x93)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a99_0x5ecabf(0x8f)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a99_0x5ecabf(0x96)];function a99_0xfe35(){const _0x30bd01=['skillSource','npmPackageName','33236fGDGnV','cliCdnBaseUrl','50919bxyPma','15oboZOx','201115TtYkrI','104394LAdzkZ','1593468VXZwsO','5EaTvnI','132siJbQy','88fOrIkI','npmRegistryBaseUrl','958674MyAdlD','59892RZDWmh','10TNWRgX'];a99_0xfe35=function(){return _0x30bd01;};return a99_0xfe35();}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+'/dist/lovrabet-cli/config/index.json';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x4c6591=a100_0x41ec;function a100_0x41ec(_0x1adaa9,_0x349823){_0x1adaa9=_0x1adaa9-0xc0;const _0x4f2f83=a100_0x4f2f();let _0x41ec85=_0x4f2f83[_0x1adaa9];return _0x41ec85;}(function(_0x3b0c70,_0x25a55f){const _0x498d03=a100_0x41ec,_0x1293d9=_0x3b0c70();while(!![]){try{const _0x186aed=-parseInt(_0x498d03(0xd3))/0x1+-parseInt(_0x498d03(0xc6))/0x2+parseInt(_0x498d03(0xcf))/0x3*(-parseInt(_0x498d03(0xce))/0x4)+parseInt(_0x498d03(0xc5))/0x5+parseInt(_0x498d03(0xc3))/0x6+parseInt(_0x498d03(0xd4))/0x7+-parseInt(_0x498d03(0xd1))/0x8*(-parseInt(_0x498d03(0xd5))/0x9);if(_0x186aed===_0x25a55f)break;else _0x1293d9['push'](_0x1293d9['shift']());}catch(_0x289817){_0x1293d9['push'](_0x1293d9['shift']());}}}(a100_0x4f2f,0xca697));import{CliErrors}from'../errors.js';function a100_0x4f2f(){const _0x5d4274=['userDomain','739264SBdArH','apiDomain','345679WMLyti','7221417RkiuMW','90SQRwLt','skillDomain','runtimeDomain','kbService','harness','5800140xAYrmi','runtime','229830UkzohX','2984346xuRRMb','serviceDomains','user','harnessDomain','production','api','region','daily','16ARvTzE','226077TWGabt'];a100_0x4f2f=function(){return _0x5d4274;};return a100_0x4f2f();}import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,customHarnessDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x13e9b6){const _0x3bf9c5=a100_0x41ec;customApiDomain=_0x13e9b6?.[_0x3bf9c5(0xd2)],customUserDomain=_0x13e9b6?.[_0x3bf9c5(0xd0)],customRuntimeDomain=_0x13e9b6?.[_0x3bf9c5(0xc0)],customSkillDomain=_0x13e9b6?.[_0x3bf9c5(0xd6)],customKbServiceDomain=_0x13e9b6?.['kbServiceDomain'],customHarnessDomain=_0x13e9b6?.[_0x3bf9c5(0xc9)],activeRegion=_0x13e9b6?.[_0x3bf9c5(0xcc)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x57ad11=a100_0x41ec,_0x575178=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x57ad11(0xc7)];return isProduction(getEnv())?_0x575178[_0x57ad11(0xca)]:'daily'in _0x575178?_0x575178[_0x57ad11(0xcd)]:_0x575178[_0x57ad11(0xca)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a100_0x4c6591(0xc8)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a100_0x4c6591(0xcb)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a100_0x4c6591(0xc4)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbServiceDomain=()=>{const _0x4d04cf=a100_0x4c6591;if(customKbServiceDomain)return customKbServiceDomain;const _0x4e16a3=getActiveRegionDomains();return'kbService'in _0x4e16a3?_0x4e16a3[_0x4d04cf(0xc1)]:undefined;};export const getHarnessDomain=()=>{const _0x16cd5a=a100_0x4c6591;if(customHarnessDomain)return customHarnessDomain;const _0x1be1ab=getActiveRegionDomains();return _0x16cd5a(0xc2)in _0x1be1ab?_0x1be1ab['harness']:undefined;};export function requireHarnessDomain(){const _0x1c443a=getHarnessDomain();if(!_0x1c443a)throw CliErrors['validation']('Harness\x20is\x20not\x20configured.','Configure\x20a\x20trusted\x20harnessDomain\x20HTTPS\x20origin\x20in\x20the\x20connection\x20settings.');return _0x1c443a;}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x1f6298=a101_0x2489;function a101_0x45d2(){const _0x11bcb4=['201NYtpiq','2345988IoAxNw','33qwHwwa','7KOheKk','72nvZygP','263408gUCLTE','ENV','252880LbNdbR','prod','793508yLKWOs','99612qFueHd','production','development','122174wnmuuY','5168holmtz','5PpkVij'];a101_0x45d2=function(){return _0x11bcb4;};return a101_0x45d2();}(function(_0x20946f,_0x1070c0){const _0x434b08=a101_0x2489,_0x4d1237=_0x20946f();while(!![]){try{const _0x28e67b=parseInt(_0x434b08(0x7c))/0x1+parseInt(_0x434b08(0x6d))/0x2*(-parseInt(_0x434b08(0x6f))/0x3)+-parseInt(_0x434b08(0x78))/0x4+parseInt(_0x434b08(0x6e))/0x5*(parseInt(_0x434b08(0x79))/0x6)+parseInt(_0x434b08(0x72))/0x7*(-parseInt(_0x434b08(0x74))/0x8)+-parseInt(_0x434b08(0x73))/0x9*(parseInt(_0x434b08(0x76))/0xa)+-parseInt(_0x434b08(0x71))/0xb*(-parseInt(_0x434b08(0x70))/0xc);if(_0x28e67b===_0x1070c0)break;else _0x4d1237['push'](_0x4d1237['shift']());}catch(_0x25c7d8){_0x4d1237['push'](_0x4d1237['shift']());}}}(a101_0x45d2,0x1cf0a));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a101_0x1f6298(0x7a),a101_0x1f6298(0x7b),'daily'];function a101_0x2489(_0x4c7196,_0x519f3d){_0x4c7196=_0x4c7196-0x6d;const _0x45d2aa=a101_0x45d2();let _0x24895a=_0x45d2aa[_0x4c7196];return _0x24895a;}export function normalizeEnv(_0x366ccd){const _0x41bbf8=a101_0x1f6298;return _0x366ccd==='online'||_0x366ccd===_0x41bbf8(0x77)?'production':_0x366ccd;}export function isProduction(_0x439af8){const _0x1c3ae2=a101_0x1f6298;return normalizeEnv(_0x439af8)===_0x1c3ae2(0x7a);}export function isDaily(_0x479724){return normalizeEnv(_0x479724)==='daily';}export function isDev(_0x8a1129){const _0xfa909d=a101_0x1f6298,_0x204de1=normalizeEnv(_0x8a1129);return _0x204de1===_0xfa909d(0x7b)||_0x204de1==='dev';}let env=normalizeEnv(productEnv(a101_0x1f6298(0x75))||'production');export function getEnv(){return env;}export function initEnv(_0x525ab8){env=normalizeEnv(_0x525ab8);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a102_0x3bbf=a102_0x417d;(function(_0x1b7efe,_0x198abc){const _0x389f18=a102_0x417d,_0x256088=_0x1b7efe();while(!![]){try{const _0x595169=-parseInt(_0x389f18(0x183))/0x1+parseInt(_0x389f18(0x17f))/0x2+-parseInt(_0x389f18(0x181))/0x3*(-parseInt(_0x389f18(0x17e))/0x4)+parseInt(_0x389f18(0x184))/0x5+-parseInt(_0x389f18(0x17a))/0x6*(parseInt(_0x389f18(0x17d))/0x7)+-parseInt(_0x389f18(0x182))/0x8*(-parseInt(_0x389f18(0x178))/0x9)+-parseInt(_0x389f18(0x180))/0xa;if(_0x595169===_0x198abc)break;else _0x256088['push'](_0x256088['shift']());}catch(_0x32e146){_0x256088['push'](_0x256088['shift']());}}}(a102_0x37f4,0xba92f));function a102_0x37f4(){const _0x421013=['117SigJNU','pretty','5651118VUqfLw','json','compress','7RSRgji','1080496sgnxbk','1070456LTAFSH','7949900RMYNRe','6gDIfXO','815664sLSGan','1315388vFiXeY','7077540aGxfHU'];a102_0x37f4=function(){return _0x421013;};return a102_0x37f4();}function a102_0x417d(_0x43e0c5,_0x367b41){_0x43e0c5=_0x43e0c5-0x178;const _0x37f422=a102_0x37f4();let _0x417dad=_0x37f422[_0x43e0c5];return _0x417dad;}export const OUTPUT_FORMAT_VALUES=[a102_0x3bbf(0x17b),a102_0x3bbf(0x179),a102_0x3bbf(0x17c)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a103_0x31d64d=a103_0x18db;function a103_0x18db(_0x630477,_0x5aad7f){_0x630477=_0x630477-0x15f;const _0x400ff4=a103_0x400f();let _0x18db51=_0x400ff4[_0x630477];return _0x18db51;}(function(_0x4682cf,_0x27c687){const _0x28d4e3=a103_0x18db,_0x7a4297=_0x4682cf();while(!![]){try{const _0x2186ba=parseInt(_0x28d4e3(0x15f))/0x1+parseInt(_0x28d4e3(0x165))/0x2+-parseInt(_0x28d4e3(0x16a))/0x3*(-parseInt(_0x28d4e3(0x175))/0x4)+parseInt(_0x28d4e3(0x171))/0x5+-parseInt(_0x28d4e3(0x16d))/0x6+parseInt(_0x28d4e3(0x172))/0x7+parseInt(_0x28d4e3(0x16c))/0x8*(-parseInt(_0x28d4e3(0x167))/0x9);if(_0x2186ba===_0x27c687)break;else _0x7a4297['push'](_0x7a4297['shift']());}catch(_0x5d94b1){_0x7a4297['push'](_0x7a4297['shift']());}}}(a103_0x400f,0xf284d));function a103_0x400f(){const _0x3141c2=['lovrabet','562192gxsMRq','3833904VUCMlx','@lovrabet/lovrabet-cli','https://registry.npmjs.org','legacyEnvPrefixes','5007890ODpPAP','2434607UqQWYX','https://g.lovrabet.com','lovrabet/lovrabet-cli','3156388NsCGjE','1782799Dfnvec','SKIP_NPX_SKILLS','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','.lovrabet-runtime.log','.lovrabet.json','Lovrabet\x20User\x20Center','1887340FTMWku','cli:lovrabet-runtime','414xLtlFa','/user/ak','RABETBASE','3WGwWYA'];a103_0x400f=function(){return _0x3141c2;};return a103_0x400f();}export const PRODUCT_CONFIG={'cliBinName':a103_0x31d64d(0x16b),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':a103_0x31d64d(0x16e),'skillSource':a103_0x31d64d(0x174),'internalSkillSource':a103_0x31d64d(0x161),'globalSkillName':a103_0x31d64d(0x16b),'npmRegistryBaseUrl':a103_0x31d64d(0x16f),'cliCdnBaseUrl':a103_0x31d64d(0x173),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a103_0x31d64d(0x169)],'configFileNames':[a103_0x31d64d(0x163)],'newConfigFileName':'.lovrabet.json','homeDirName':'.lovrabet','logFileName':a103_0x31d64d(0x162),'invokeSource':a103_0x31d64d(0x166),'userCenterDisplayName':a103_0x31d64d(0x164),'skipNpxSkillsEnvSuffix':a103_0x31d64d(0x160),'accessKeyCreatePath':a103_0x31d64d(0x168)};export function productEnvName(_0x5c1576){return PRODUCT_CONFIG['envPrefix']+'_'+_0x5c1576;}export function productEnvNames(_0x3d5d14){const _0x179f68=a103_0x31d64d;return[productEnvName(_0x3d5d14),...PRODUCT_CONFIG[_0x179f68(0x170)]['map'](_0x10935e=>_0x10935e+'_'+_0x3d5d14)];}export function productEnv(_0x13dc54){for(const _0x216c27 of productEnvNames(_0x13dc54)){const _0x5c8912=process.env[_0x216c27];if(_0x5c8912!==undefined)return _0x5c8912;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e2292,_0x1814ec){const _0x2ce96b=a104_0x58a4,_0x40c666=_0x5e2292();while(!![]){try{const _0xd304d6=parseInt(_0x2ce96b(0x1b0))/0x1*(-parseInt(_0x2ce96b(0x1af))/0x2)+-parseInt(_0x2ce96b(0x1a2))/0x3+parseInt(_0x2ce96b(0x1a7))/0x4*(parseInt(_0x2ce96b(0x1a8))/0x5)+-parseInt(_0x2ce96b(0x1a5))/0x6+parseInt(_0x2ce96b(0x1a4))/0x7+-parseInt(_0x2ce96b(0x1a9))/0x8+parseInt(_0x2ce96b(0x1ab))/0x9;if(_0xd304d6===_0x1814ec)break;else _0x40c666['push'](_0x40c666['shift']());}catch(_0x175c84){_0x40c666['push'](_0x40c666['shift']());}}}(a104_0x235f,0x4b8cb));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';function a104_0x58a4(_0x4ecac2,_0x47246f){_0x4ecac2=_0x4ecac2-0x1a0;const _0x235fc3=a104_0x235f();let _0x58a493=_0x235fc3[_0x4ecac2];return _0x58a493;}export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;function a104_0x235f(){const _0x2917d0=['3715424cAqCuj','\x22\x20is\x20not\x20currently\x20available.','10849824ZEBaMV','join','validation','Available\x20regions:\x20','264736GpGoug','1YyiJJE','Region\x20\x22','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','665040cnFbDv','includes','107905EENpNi','3552960rKsxjJ','string','88WPbAro','113440dhMajh'];a104_0x235f=function(){return _0x2917d0;};return a104_0x235f();}export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x425a8d){const _0x294e01=a104_0x58a4;return typeof _0x425a8d===_0x294e01(0x1a6)&&LOVRABET_REGION_VALUES[_0x294e01(0x1a3)](_0x425a8d);}export function isEnabledLovrabetRegion(_0x23ad6c){const _0x1ebf51=a104_0x58a4;return typeof _0x23ad6c===_0x1ebf51(0x1a6)&&ENABLED_LOVRABET_REGION_VALUES['includes'](_0x23ad6c);}export function normalizeLovrabetRegion(_0x448cae){const _0x2d2c3d=a104_0x58a4;if(_0x448cae===undefined||_0x448cae===null||_0x448cae==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x448cae!==_0x2d2c3d(0x1a6))throw CliErrors[_0x2d2c3d(0x1ad)]('Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20'+typeof _0x448cae+'.',_0x2d2c3d(0x1a0));const _0x2279b7=REGION_ALIASES[_0x448cae]??_0x448cae;if(isEnabledLovrabetRegion(_0x2279b7))return _0x2279b7;throw CliErrors[_0x2d2c3d(0x1ad)](_0x2d2c3d(0x1b1)+_0x448cae+_0x2d2c3d(0x1aa),_0x2d2c3d(0x1ae)+ENABLED_LOVRABET_REGION_VALUES[_0x2d2c3d(0x1ac)](',\x20')+_0x2d2c3d(0x1a1));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0x4a95(_0x1427fc,_0x3a3b92){_0x1427fc=_0x1427fc-0x12e;const _0x3bf852=a105_0x3bf8();let _0x4a9558=_0x3bf852[_0x1427fc];return _0x4a9558;}const a105_0x4fccb2=a105_0x4a95;(function(_0x559240,_0x3d0f85){const _0x16ac9b=a105_0x4a95,_0x4b7c94=_0x559240();while(!![]){try{const _0x54a468=parseInt(_0x16ac9b(0x137))/0x1+parseInt(_0x16ac9b(0x135))/0x2*(-parseInt(_0x16ac9b(0x131))/0x3)+parseInt(_0x16ac9b(0x139))/0x4*(parseInt(_0x16ac9b(0x12f))/0x5)+-parseInt(_0x16ac9b(0x134))/0x6*(-parseInt(_0x16ac9b(0x12e))/0x7)+-parseInt(_0x16ac9b(0x132))/0x8*(parseInt(_0x16ac9b(0x130))/0x9)+parseInt(_0x16ac9b(0x133))/0xa+-parseInt(_0x16ac9b(0x13b))/0xb*(parseInt(_0x16ac9b(0x13a))/0xc);if(_0x54a468===_0x3d0f85)break;else _0x4b7c94['push'](_0x4b7c94['shift']());}catch(_0x17c14f){_0x4b7c94['push'](_0x4b7c94['shift']());}}}(a105_0x3bf8,0xc546c));export const RISK_LEVEL_VALUES=[a105_0x4fccb2(0x138),'write',a105_0x4fccb2(0x136)];function a105_0x3bf8(){const _0x12f20f=['22539qCcRUc','7QGCOIb','295BMQJPt','31761XqDGze','3jqgInK','1328vojqxW','12846470owotBs','6272346qdQROe','2065108AeTDzN','high-risk-write','53454KcXOox','read','10828vUddLC','684cCIwan'];a105_0x3bf8=function(){return _0x12f20f;};return a105_0x3bf8();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x49cb(_0x1cc171,_0x2c8234){_0x1cc171=_0x1cc171-0x1b2;const _0x1b75d0=a106_0x1b75();let _0x49cbee=_0x1b75d0[_0x1cc171];return _0x49cbee;}(function(_0x549d0f,_0x5c934c){const _0x25e5f5=a106_0x49cb,_0xa44b5f=_0x549d0f();while(!![]){try{const _0x285f86=-parseInt(_0x25e5f5(0x1be))/0x1*(parseInt(_0x25e5f5(0x1b2))/0x2)+-parseInt(_0x25e5f5(0x1bb))/0x3*(-parseInt(_0x25e5f5(0x1bc))/0x4)+parseInt(_0x25e5f5(0x1b7))/0x5*(parseInt(_0x25e5f5(0x1b6))/0x6)+parseInt(_0x25e5f5(0x1b8))/0x7+-parseInt(_0x25e5f5(0x1ba))/0x8+-parseInt(_0x25e5f5(0x1bd))/0x9+parseInt(_0x25e5f5(0x1b4))/0xa*(-parseInt(_0x25e5f5(0x1bf))/0xb);if(_0x285f86===_0x5c934c)break;else _0xa44b5f['push'](_0xa44b5f['shift']());}catch(_0x2d6ada){_0xa44b5f['push'](_0xa44b5f['shift']());}}}(a106_0x1b75,0x45341));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(_0x19d87d=DEFAULT_LOVRABET_REGION){const _0x14e96d=a106_0x49cb,_0x41a011=OFFICIAL_ROUTING_PROFILES[_0x19d87d][_0x14e96d(0x1b3)][_0x14e96d(0x1b9)][_0x14e96d(0x1b5)];return''+_0x41a011+PRODUCT_CONFIG['accessKeyCreatePath'];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a106_0x1b75(){const _0x2ec2fb=['35649ItHDdC','1441UdjruG','8vmhimz','serviceDomains','8620RERmnC','user','173064vFzIsW','65wICesM','3135307EYhGJA','production','405896rCLUrV','6303BfobfA','276XmAqBF','3403170wyIJVA'];a106_0x1b75=function(){return _0x2ec2fb;};return a106_0x1b75();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3b21d2,_0x475cbf){const _0x93fc4e=a107_0x84ab,_0x2d631d=_0x3b21d2();while(!![]){try{const _0x34245b=-parseInt(_0x93fc4e(0x17b))/0x1+-parseInt(_0x93fc4e(0x163))/0x2+-parseInt(_0x93fc4e(0x162))/0x3*(parseInt(_0x93fc4e(0x192))/0x4)+-parseInt(_0x93fc4e(0x1b1))/0x5*(-parseInt(_0x93fc4e(0x196))/0x6)+-parseInt(_0x93fc4e(0x167))/0x7*(parseInt(_0x93fc4e(0x174))/0x8)+-parseInt(_0x93fc4e(0x1a5))/0x9*(parseInt(_0x93fc4e(0x1a0))/0xa)+parseInt(_0x93fc4e(0x1b5))/0xb*(parseInt(_0x93fc4e(0x1aa))/0xc);if(_0x34245b===_0x475cbf)break;else _0x2d631d['push'](_0x2d631d['shift']());}catch(_0x14e804){_0x2d631d['push'](_0x2d631d['shift']());}}}(a107_0x299f,0xec66a));function a107_0x299f(){const _0xfa1d13=['read','locale','ACCESS_KEY','39905nhyeuN','.tmp','missing','region','11qMUSGE','apiDomain','nativeToolAvailable','PAGE_SIZE','69sSJLQg','2302050jHJcfF','./constant/env.js','accessKey','find','1591156LGZthv','code','explicit','project','platformDomain','stdout','agentDomain','empty','top-level','EACCES','online','projectConfig','./constant/domain.js','40incEFI','object','stringify','setRawCommand','harnessDomain','defaultApp','skillDomain','112970wOFUZq','isRaw','stdin','high-risk-write','global','write','global\x20config','error','VERBOSE','apps','string','raw','skillHubDomain','development','globalConfig','app','routing','production','setLogPath','APP','env','join','appCode','315184lGAdfe','kbServiceDomain','message','trim','1002bSwHYN','authRequired','FORMAT','nonInteractive','runtimeDomain','cache','true','parse','setRawMode','cwd','13221810SMvLyZ','riskLevel','userDomain','format','local-alias','9lbecEq','EPERM','utf8','APPCODE','isTTY','62045940bQVKNX','values','slice','appcode'];a107_0x299f=function(){return _0xfa1d13;};return a107_0x299f();}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';function a107_0x84ab(_0x3d8564,_0x54d06b){_0x3d8564=_0x3d8564-0x161;const _0x299f21=a107_0x299f();let _0x84ab77=_0x299f21[_0x3d8564];return _0x84ab77;}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{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x3a4943){for(const _0x352696 of CONFIG_NAMES){const _0x30ee3a=resolve(_0x3a4943,_0x352696);if(existsSync(_0x30ee3a))return _0x30ee3a;}return undefined;}export function resolveWriteConfigPath(_0x17e863){const _0x365c34=a107_0x84ab,_0x55c7e9=_0x17e863===_0x365c34(0x16a)?process[_0x365c34(0x19f)]():homedir(),_0x3af103=resolveConfigPath(_0x55c7e9);return _0x3af103??resolve(_0x55c7e9,NEW_CONFIG_NAME);}export function readConfigFile(_0x4a616b){const _0xd9c31c=a107_0x84ab;try{if(existsSync(_0x4a616b)){const _0x5015a6=readFileSync(_0x4a616b,{'encoding':'utf8'});if(_0x5015a6){const _0x1371ae=JSON[_0xd9c31c(0x19d)](_0x5015a6);return migrateOnlineEnv(_0x4a616b,_0x1371ae),_0x1371ae;}}}catch{}return{};}function migrateOnlineEnv(_0x5ce39a,_0xcb17e6){const _0x211747=a107_0x84ab;let _0x572598=![];_0xcb17e6[_0x211747(0x18f)]===_0x211747(0x171)&&(_0xcb17e6[_0x211747(0x18f)]=_0x211747(0x18c),_0x572598=!![]);if(_0xcb17e6[_0x211747(0x184)]&&typeof _0xcb17e6['apps']===_0x211747(0x175))for(const _0x578301 of Object[_0x211747(0x1ab)](_0xcb17e6[_0x211747(0x184)])){_0x578301&&_0x578301['env']===_0x211747(0x171)&&(_0x578301[_0x211747(0x18f)]=_0x211747(0x18c),_0x572598=!![]);}if(_0x572598)try{writeConfigFile(_0x5ce39a,_0xcb17e6);}catch{}}export function writeConfigFile(_0x2694eb,_0x485ed1){const _0x5e69b5=a107_0x84ab,_0xb5028b=dirname(_0x2694eb);!existsSync(_0xb5028b)&&mkdirSync(_0xb5028b,{'recursive':!![]});const _0x331b95=_0x2694eb+_0x5e69b5(0x1b2);try{writeFileSync(_0x331b95,JSON['stringify'](_0x485ed1,null,0x2)+'\x0a',{'encoding':_0x5e69b5(0x1a7),'mode':0x180});try{renameSync(_0x331b95,_0x2694eb);}catch(_0xa3717a){if(_0xa3717a[_0x5e69b5(0x168)]===_0x5e69b5(0x1a6)||_0xa3717a[_0x5e69b5(0x168)]==='EXDEV'||_0xa3717a['code']===_0x5e69b5(0x170)){writeFileSync(_0x2694eb,JSON[_0x5e69b5(0x176)](_0x485ed1,null,0x2)+'\x0a',{'encoding':_0x5e69b5(0x1a7)});try{unlinkSync(_0x331b95);}catch{}}else throw _0xa3717a;}}catch(_0x3c3512){try{unlinkSync(_0x331b95);}catch{}throw _0x3c3512;}}export function isNonInteractiveMode(_0x510e4f){const _0x1fac3b=a107_0x84ab;return!!(_0x510e4f[_0x1fac3b(0x199)]||_0x510e4f['ci']||productEnvNames('CI')['some'](_0x592b3e=>process.env[_0x592b3e]===_0x1fac3b(0x19c))||process.env.CI===_0x1fac3b(0x19c)||!process[_0x1fac3b(0x16c)][_0x1fac3b(0x1a9)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3e0937=a107_0x84ab;if(!process['stdin'][_0x3e0937(0x1a9)])return![];try{const _0x3046a2=process[_0x3e0937(0x17d)][_0x3e0937(0x17c)];return process[_0x3e0937(0x17d)]['setRawMode'](!![]),process[_0x3e0937(0x17d)][_0x3e0937(0x19e)](_0x3046a2??![]),!![];}catch{return![];}}export async function createContext(_0x32bf77){const _0x266b4c=a107_0x84ab,_0x1caea6=buildConfigFromFlags(_0x32bf77);await initGlobalEnvironment(_0x1caea6);const {getUserDomain:_0x5ac55b,getApiDomain:_0x3f2b01}=await import(_0x266b4c(0x173)),_0x57a701={'apiDomain':_0x3f2b01(),'userDomain':_0x5ac55b()},_0x43f9ae=await buildAuth(_0x1caea6);logger[_0x266b4c(0x18d)](process[_0x266b4c(0x19f)]());const _0x1d00af=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process['argv'][_0x266b4c(0x1ac)](0x2))[_0x266b4c(0x190)]('\x20'))['trim']();logger[_0x266b4c(0x177)](_0x1d00af);const _0xcc4644=isNonInteractiveMode(_0x32bf77);return{'config':_0x1caea6,'auth':_0x43f9ae,'logger':logger,'env':_0x57a701,'nonInteractive':_0xcc4644};}export function buildConfigFromFlags(_0x5dc96e){return buildConfig(loadRawConfigLayers(),_0x5dc96e);}export function getLocalAppAliases(_0x1e1d66){const _0x27bd67=a107_0x84ab;return _0x1e1d66[_0x27bd67(0x184)]&&typeof _0x1e1d66[_0x27bd67(0x184)]==='object'?_0x1e1d66[_0x27bd67(0x184)]:{};}export function resolveLocalAppAliasCode(_0x225eba,_0x5100ce){const _0x23d4e3=a107_0x84ab;if(!_0x5100ce)return undefined;const _0xf2a062=getLocalAppAliases(_0x225eba)[_0x5100ce],_0x36e7c3=_0xf2a062?.['appcode'];return typeof _0x36e7c3===_0x23d4e3(0x185)&&_0x36e7c3['trim']()?_0x36e7c3[_0x23d4e3(0x195)]():undefined;}export function readAppCodeFromConfig(){const _0x42f7df=a107_0x84ab;return buildConfigFromFlags({})[_0x42f7df(0x191)];}export function readScopedConfig(_0x16e6ce){const _0x233b10=a107_0x84ab,_0x21c7b5=_0x16e6ce['global']?_0x233b10(0x17f):_0x233b10(0x16a);return readConfigFile(resolveWriteConfigPath(_0x21c7b5));}export function writeScopedConfig(_0x3c994d,_0x2d161e){const _0x14649c=a107_0x84ab,_0x40dc96=_0x2d161e['global']?_0x14649c(0x17f):_0x14649c(0x16a);writeConfigFile(resolveWriteConfigPath(_0x40dc96),_0x3c994d);}export async function initGlobalEnvironment(_0x2e3eef){const _0x4bcc4d=a107_0x84ab,{initEnv:_0x203087}=await import(_0x4bcc4d(0x164));_0x203087(_0x2e3eef[_0x4bcc4d(0x18f)]);const {initDomains:_0x1ca435}=await import(_0x4bcc4d(0x173)),_0x371454=resolveEnterpriseRoutingConfig(_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x18b)]);_0x1ca435({'apiDomain':_0x371454?_0x371454[_0x4bcc4d(0x1b6)]:_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x1b6)]||_0x2e3eef['raw']['host']||undefined,'userDomain':_0x371454?_0x371454[_0x4bcc4d(0x1a2)]:_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x1a2)]||undefined,'runtimeDomain':_0x371454?_0x371454[_0x4bcc4d(0x19a)]:_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x19a)]||undefined,'skillDomain':_0x371454?_0x371454['skillDomain']:_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x17a)]||_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x187)]||_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x16d)]||_0x2e3eef['raw'][_0x4bcc4d(0x16b)]||undefined,'kbServiceDomain':_0x371454?_0x371454[_0x4bcc4d(0x193)]:typeof _0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x193)]==='string'&&_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x193)][_0x4bcc4d(0x195)]()?_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x193)]:undefined,'harnessDomain':_0x371454?_0x371454[_0x4bcc4d(0x178)]:_0x2e3eef['raw'][_0x4bcc4d(0x178)]===undefined?undefined:normalizeDomainOrigin(_0x4bcc4d(0x178),_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x178)]),'region':normalizeLovrabetRegion(_0x2e3eef[_0x4bcc4d(0x186)][_0x4bcc4d(0x1b4)])});}export function getProjectConfigPath(){const _0x17eec6=a107_0x84ab;return resolveConfigPath(process[_0x17eec6(0x19f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x58c314){const _0x1803e4=a107_0x84ab;if(!existsSync(_0x58c314))return{'status':_0x1803e4(0x1b3)};try{const _0xbb1049=readFileSync(_0x58c314,{'encoding':'utf8'});if(!_0xbb1049?.[_0x1803e4(0x195)]())return{'status':_0x1803e4(0x16e)};const _0x570816=JSON[_0x1803e4(0x19d)](_0xbb1049);return{'status':'ok','data':_0x570816};}catch(_0x130074){return{'status':_0x1803e4(0x182),'message':_0x130074 instanceof Error?_0x130074[_0x1803e4(0x194)]:String(_0x130074)};}}export function loadRawConfigLayers(_0x294906){const _0x3b42dd=a107_0x84ab;let _0x5c0fef={},_0x5796c3={},_0x4f44a9,_0x337e3d;try{_0x4f44a9=resolveConfigPath(homedir());if(_0x4f44a9){const _0x1c1688=readFileSync(_0x4f44a9,{'encoding':_0x3b42dd(0x1a7)});if(_0x1c1688)_0x5c0fef=JSON[_0x3b42dd(0x19d)](_0x1c1688);}}catch{}try{const _0x5eb23f=_0x294906||process[_0x3b42dd(0x19f)]();_0x337e3d=resolveConfigPath(_0x5eb23f);if(_0x337e3d){const _0x2603a3=readFileSync(_0x337e3d,{'encoding':_0x3b42dd(0x1a7)});if(_0x2603a3)_0x5796c3=JSON['parse'](_0x2603a3);}}catch{}return{'globalPath':_0x4f44a9,'projectPath':_0x337e3d,'globalConfig':_0x5c0fef,'projectConfig':_0x5796c3};}function mergeRawConfigLayers(_0x52742d){const _0x337959=a107_0x84ab,{globalConfig:_0x402205,projectConfig:_0x5480e8}=_0x52742d,_0x57ce93={..._0x402205,..._0x5480e8};delete _0x57ce93['inherit'];if('defaultApp'in _0x5480e8)_0x57ce93[_0x337959(0x179)]=_0x5480e8[_0x337959(0x179)];else _0x402205[_0x337959(0x179)]&&(_0x57ce93['defaultApp']=_0x402205['defaultApp']);return _0x57ce93;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x3e6c40){return mergeRawConfigLayers(loadRawConfigLayers(_0x3e6c40));}export function readRawConfigWithLayers(_0x1ccbd6){const _0x201061=loadRawConfigLayers(_0x1ccbd6);return{'config':mergeRawConfigLayers(_0x201061),'layers':_0x201061};}export function resolveDefaultAppSource(_0x1cfdc1){const _0x2030a2=a107_0x84ab;if(_0x2030a2(0x179)in _0x1cfdc1[_0x2030a2(0x172)])return'project';if(_0x1cfdc1[_0x2030a2(0x189)]['defaultApp'])return'global';return null;}function buildConfig(_0x4dd753,_0x5ad163){const _0x259b5e=a107_0x84ab,_0x2c7a6b=mergeRawConfigLayers(_0x4dd753),{projectConfig:_0x482b8d}=_0x4dd753,_0x4fe2c2=_0x2c7a6b[_0x259b5e(0x179)]||undefined,_0x2dfbe5=typeof _0x5ad163[_0x259b5e(0x1ad)]===_0x259b5e(0x185)?_0x5ad163[_0x259b5e(0x1ad)]:undefined,_0x5155eb=_0x482b8d[_0x259b5e(0x1ad)]||_0x482b8d[_0x259b5e(0x18a)],_0x28b94f=!_0x2dfbe5&&!_0x5ad163[_0x259b5e(0x18a)]&&!_0x5155eb&&!_0x482b8d['defaultApp'],_0x50f0fc=_0x28b94f?env(_0x259b5e(0x1a8)):undefined,_0x504180=_0x5ad163[_0x259b5e(0x18a)]||(_0x28b94f&&!_0x50f0fc?env(_0x259b5e(0x18e)):undefined),_0xb9d095=_0x504180||_0x4fe2c2||undefined,_0x53a23d=_0x504180||_0x50f0fc?undefined:_0x5155eb||(_0x482b8d[_0x259b5e(0x179)]?undefined:_0x2c7a6b[_0x259b5e(0x1ad)]||_0x2c7a6b[_0x259b5e(0x18a)]||undefined),_0x5af21e=_0x504180||(_0x53a23d?undefined:_0x4fe2c2),_0x2c14b5=resolveLocalAppAliasCode(_0x2c7a6b,_0x5af21e),_0x54353a=productEnvNames(_0x259b5e(0x1b0))[_0x259b5e(0x166)](_0x8cea7f=>process.env[_0x8cea7f]!==undefined),_0x431e98=_0x54353a?process.env[_0x54353a]:undefined,_0x202a41=_0x482b8d[_0x259b5e(0x165)]||_0x431e98||_0x2c7a6b[_0x259b5e(0x165)]||undefined,_0x368499=_0x482b8d[_0x259b5e(0x165)]?'project\x20config':_0x431e98?_0x54353a:_0x2c7a6b[_0x259b5e(0x165)]?_0x259b5e(0x181):undefined,_0x57f911=_0x5ad163[_0x259b5e(0x18f)]||_0x2c7a6b[_0x259b5e(0x18f)]||env('ENV')||DEFAULT_CONFIG_VALUES[_0x259b5e(0x18f)],_0x5c2b59=normalizeEnv(String(_0x57f911)),_0x3ea723=isDaily(_0x5c2b59)?'daily':isDev(_0x5c2b59)?_0x259b5e(0x188):_0x259b5e(0x18c),_0x16bade=_0x2dfbe5||_0x50f0fc||_0x53a23d||_0x2c14b5?undefined:resolveCachedAppCode(_0x5af21e,_0x3ea723,_0x202a41),_0x533eb4=_0x2dfbe5||_0x50f0fc||_0x53a23d||_0x2c14b5||_0x16bade||undefined,_0x44e921=_0x2dfbe5?_0x259b5e(0x169):_0x50f0fc?'env':_0x53a23d?_0x259b5e(0x16f):_0x2c14b5?_0x259b5e(0x1a4):_0x16bade?_0x259b5e(0x19b):undefined,_0x2f13d0=_0x2c7a6b[_0x259b5e(0x1af)]||DEFAULT_CONFIG_VALUES['locale'],_0x56fc4a=undefined,_0x3cd3dc=_0x5ad163[_0x259b5e(0x1a3)]||env(_0x259b5e(0x198))||_0x2c7a6b[_0x259b5e(0x1a3)],_0x172ede=normalizeLegacyOutputFormat(_0x3cd3dc),_0x114da9=env(_0x259b5e(0x161))||_0x2c7a6b['pageSize'],_0x5bc772=_0x114da9?Number(_0x114da9)||undefined:undefined,_0x3d3f49=_0x2c7a6b[_0x259b5e(0x1a1)],_0x1c3f49=_0x3d3f49===_0x259b5e(0x1ae)||_0x3d3f49===_0x259b5e(0x180)||_0x3d3f49===_0x259b5e(0x17e)?_0x3d3f49:DEFAULT_CONFIG_VALUES[_0x259b5e(0x1a1)],_0x574bb9=_0x2c7a6b[_0x259b5e(0x1b7)]===!![],_0x2b4cbb=env(_0x259b5e(0x183)),_0x3bdca0=_0x2b4cbb==='1'||_0x2b4cbb===_0x259b5e(0x19c);return{'appCode':typeof _0x533eb4===_0x259b5e(0x185)&&_0x533eb4[_0x259b5e(0x195)]()?_0x533eb4[_0x259b5e(0x195)]():undefined,'appCodeSource':_0x44e921,'env':_0x3ea723,'locale':_0x2f13d0,'cookie':_0x56fc4a,'accessKey':_0x202a41,'accessKeySource':_0x368499,'format':_0x172ede,'pageSize':_0x5bc772,'riskLevel':_0x1c3f49,'nativeToolAvailable':_0x574bb9,'verbose':_0x3bdca0,'defaultApp':_0x4fe2c2,'currentApp':typeof _0xb9d095==='string'?_0xb9d095:undefined,'raw':_0x2c7a6b};}function env(_0x181378){return productEnv(_0x181378);}async function buildAuth(_0x55c0aa){const _0x263b85=a107_0x84ab,_0x285f9b='',_0x4162b9=!!_0x55c0aa[_0x263b85(0x165)];return{'cookie':_0x285f9b,'isLoggedIn':_0x4162b9,async 'getOrLogin'(){const _0x2a2bc1=_0x263b85;if(_0x4162b9)return _0x285f9b;throw CliErrors[_0x2a2bc1(0x197)]();}};}
|
|
1
|
+
const a107_0x3461ab=a107_0x593a;(function(_0x206438,_0x1befc2){const _0x1c1419=a107_0x593a,_0x48d81f=_0x206438();while(!![]){try{const _0x5ec206=-parseInt(_0x1c1419(0x95))/0x1+parseInt(_0x1c1419(0xc1))/0x2+parseInt(_0x1c1419(0xd3))/0x3+-parseInt(_0x1c1419(0xae))/0x4+parseInt(_0x1c1419(0xb0))/0x5+-parseInt(_0x1c1419(0xcd))/0x6*(-parseInt(_0x1c1419(0xce))/0x7)+parseInt(_0x1c1419(0xa2))/0x8*(-parseInt(_0x1c1419(0xdd))/0x9);if(_0x5ec206===_0x1befc2)break;else _0x48d81f['push'](_0x48d81f['shift']());}catch(_0x448051){_0x48d81f['push'](_0x48d81f['shift']());}}}(a107_0xb5d2,0x443ab));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';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';function a107_0x593a(_0x2a1f72,_0x59f954){_0x2a1f72=_0x2a1f72-0x93;const _0xb5d2f8=a107_0xb5d2();let _0x593a0a=_0xb5d2f8[_0x2a1f72];return _0x593a0a;}import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';function a107_0xb5d2(){const _0x1a84aa=['cwd','code','appCode','trim','join','utf8','runtimeDomain','high-risk-write','message','188588ugbpGW','string','1939800IzhyUq','empty','daily','setRawCommand','apps','stringify','newConfigFileName','app','write','setRawMode','setLogPath','object','locale','userDomain','raw','accessKey','local-alias','332542dwcAsc','skillDomain','apiDomain','find','production','EPERM','skillHubDomain','missing','APP','stdin','globalConfig','project','126WCHNfU','97321HjeKnF','./constant/domain.js','inherit','PAGE_SIZE','kbServiceDomain','531459WFPGQp','./constant/env.js','defaultApp','authRequired','routing','ACCESS_KEY','pageSize','argv','VERBOSE','harnessDomain','3633030OUkSHP','top-level','error','some','293063hrcmpQ','true','explicit','online','ENV','isTTY','env','format','values','slice','global','riskLevel','appcode','8ELiarD','parse','agentDomain'];a107_0xb5d2=function(){return _0x1a84aa;};return a107_0xb5d2();}export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a107_0x3461ab(0xb6)];function resolveConfigPath(_0x50f5da){for(const _0x26d7f6 of CONFIG_NAMES){const _0x4ff168=resolve(_0x50f5da,_0x26d7f6);if(existsSync(_0x4ff168))return _0x4ff168;}return undefined;}export function resolveWriteConfigPath(_0x35a21e){const _0x33befa=a107_0x3461ab,_0x464b05=_0x35a21e===_0x33befa(0xcc)?process[_0x33befa(0xa5)]():homedir(),_0x1b6bfb=resolveConfigPath(_0x464b05);return _0x1b6bfb??resolve(_0x464b05,NEW_CONFIG_NAME);}export function readConfigFile(_0x33b742){try{if(existsSync(_0x33b742)){const _0x1b523f=readFileSync(_0x33b742,{'encoding':'utf8'});if(_0x1b523f){const _0x12b4cf=JSON['parse'](_0x1b523f);return migrateOnlineEnv(_0x33b742,_0x12b4cf),_0x12b4cf;}}}catch{}return{};}function migrateOnlineEnv(_0x5190c3,_0x265d30){const _0xe7f712=a107_0x3461ab;let _0x1b7acf=![];_0x265d30[_0xe7f712(0x9b)]===_0xe7f712(0x98)&&(_0x265d30[_0xe7f712(0x9b)]='production',_0x1b7acf=!![]);if(_0x265d30[_0xe7f712(0xb4)]&&typeof _0x265d30[_0xe7f712(0xb4)]===_0xe7f712(0xbb))for(const _0x5d20ec of Object[_0xe7f712(0x9d)](_0x265d30[_0xe7f712(0xb4)])){_0x5d20ec&&_0x5d20ec[_0xe7f712(0x9b)]===_0xe7f712(0x98)&&(_0x5d20ec[_0xe7f712(0x9b)]=_0xe7f712(0xc5),_0x1b7acf=!![]);}if(_0x1b7acf)try{writeConfigFile(_0x5190c3,_0x265d30);}catch{}}export function writeConfigFile(_0x1b9fab,_0x7566b2){const _0x11926a=a107_0x3461ab,_0x2e93c4=dirname(_0x1b9fab);!existsSync(_0x2e93c4)&&mkdirSync(_0x2e93c4,{'recursive':!![]});const _0x5af097=_0x1b9fab+'.tmp';try{writeFileSync(_0x5af097,JSON[_0x11926a(0xb5)](_0x7566b2,null,0x2)+'\x0a',{'encoding':_0x11926a(0xaa),'mode':0x180});try{renameSync(_0x5af097,_0x1b9fab);}catch(_0x40fdec){if(_0x40fdec[_0x11926a(0xa6)]===_0x11926a(0xc6)||_0x40fdec[_0x11926a(0xa6)]==='EXDEV'||_0x40fdec['code']==='EACCES'){writeFileSync(_0x1b9fab,JSON[_0x11926a(0xb5)](_0x7566b2,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x5af097);}catch{}}else throw _0x40fdec;}}catch(_0x35ca65){try{unlinkSync(_0x5af097);}catch{}throw _0x35ca65;}}export function isNonInteractiveMode(_0x3db6e3){const _0x48bf50=a107_0x3461ab;return!!(_0x3db6e3['nonInteractive']||_0x3db6e3['ci']||productEnvNames('CI')[_0x48bf50(0x94)](_0x261652=>process.env[_0x261652]===_0x48bf50(0x96))||process.env.CI===_0x48bf50(0x96)||!process['stdout'][_0x48bf50(0x9a)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x55001f=a107_0x3461ab;if(!process[_0x55001f(0xca)][_0x55001f(0x9a)])return![];try{const _0x5e44b3=process[_0x55001f(0xca)]['isRaw'];return process[_0x55001f(0xca)][_0x55001f(0xb9)](!![]),process[_0x55001f(0xca)][_0x55001f(0xb9)](_0x5e44b3??![]),!![];}catch{return![];}}export async function createContext(_0xe07b3d){const _0x39c45f=a107_0x3461ab,_0x21f5fc=buildConfigFromFlags(_0xe07b3d);await initGlobalEnvironment(_0x21f5fc);const {getUserDomain:_0x144b22,getApiDomain:_0x112523}=await import(_0x39c45f(0xcf)),_0x31f388={'apiDomain':_0x112523(),'userDomain':_0x144b22()},_0x31fe0d=await buildAuth(_0x21f5fc);logger[_0x39c45f(0xba)](process[_0x39c45f(0xa5)]());const _0xf0c82c=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x39c45f(0xda)][_0x39c45f(0x9e)](0x2))[_0x39c45f(0xa9)]('\x20'))[_0x39c45f(0xa8)]();logger[_0x39c45f(0xb3)](_0xf0c82c);const _0x2330db=isNonInteractiveMode(_0xe07b3d);return{'config':_0x21f5fc,'auth':_0x31fe0d,'logger':logger,'env':_0x31f388,'nonInteractive':_0x2330db};}export function buildConfigFromFlags(_0x4d8f69){return buildConfig(loadRawConfigLayers(),_0x4d8f69);}export function getLocalAppAliases(_0x2db2da){const _0x365c3b=a107_0x3461ab;return _0x2db2da[_0x365c3b(0xb4)]&&typeof _0x2db2da[_0x365c3b(0xb4)]==='object'?_0x2db2da['apps']:{};}export function resolveLocalAppAliasCode(_0x8e1609,_0x36f4be){const _0x4295f9=a107_0x3461ab;if(!_0x36f4be)return undefined;const _0x46b4a3=getLocalAppAliases(_0x8e1609)[_0x36f4be],_0x11e15f=_0x46b4a3?.['appcode'];return typeof _0x11e15f===_0x4295f9(0xaf)&&_0x11e15f['trim']()?_0x11e15f[_0x4295f9(0xa8)]():undefined;}export function readAppCodeFromConfig(){const _0x326791=a107_0x3461ab;return buildConfigFromFlags({})[_0x326791(0xa7)];}export function readScopedConfig(_0x2b47a4){const _0x265099=a107_0x3461ab,_0x97c976=_0x2b47a4[_0x265099(0x9f)]?_0x265099(0x9f):_0x265099(0xcc);return readConfigFile(resolveWriteConfigPath(_0x97c976));}export function writeScopedConfig(_0x53b78c,_0x323776){const _0x313688=a107_0x3461ab,_0x43168c=_0x323776[_0x313688(0x9f)]?_0x313688(0x9f):_0x313688(0xcc);writeConfigFile(resolveWriteConfigPath(_0x43168c),_0x53b78c);}export async function initGlobalEnvironment(_0x5378dc){const _0x207a3e=a107_0x3461ab,{initEnv:_0x126b70}=await import(_0x207a3e(0xd4));_0x126b70(_0x5378dc[_0x207a3e(0x9b)]);const {initDomains:_0x335d8a}=await import(_0x207a3e(0xcf)),_0x1a6cdd=resolveEnterpriseRoutingConfig(_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xd7)]);_0x335d8a({'apiDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xc3)]:_0x5378dc[_0x207a3e(0xbe)]['apiDomain']||_0x5378dc[_0x207a3e(0xbe)]['host']||undefined,'userDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xbd)]:_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xbd)]||undefined,'runtimeDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xab)]:_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xab)]||undefined,'skillDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xc2)]:_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xc2)]||_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xc7)]||_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xa4)]||_0x5378dc['raw']['platformDomain']||undefined,'kbServiceDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xd2)]:typeof _0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xd2)]===_0x207a3e(0xaf)&&_0x5378dc[_0x207a3e(0xbe)][_0x207a3e(0xd2)][_0x207a3e(0xa8)]()?_0x5378dc[_0x207a3e(0xbe)]['kbServiceDomain']:undefined,'harnessDomain':_0x1a6cdd?_0x1a6cdd[_0x207a3e(0xdc)]:_0x5378dc[_0x207a3e(0xbe)]['harnessDomain']===undefined?undefined:normalizeDomainOrigin(_0x207a3e(0xdc),_0x5378dc[_0x207a3e(0xbe)]['harnessDomain']),'region':normalizeLovrabetRegion(_0x5378dc[_0x207a3e(0xbe)]['region'])});}export function getProjectConfigPath(){const _0x49c48c=a107_0x3461ab;return resolveConfigPath(process[_0x49c48c(0xa5)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x262128){const _0x52351a=a107_0x3461ab;if(!existsSync(_0x262128))return{'status':_0x52351a(0xc8)};try{const _0x42b784=readFileSync(_0x262128,{'encoding':_0x52351a(0xaa)});if(!_0x42b784?.['trim']())return{'status':_0x52351a(0xb1)};const _0x54e311=JSON[_0x52351a(0xa3)](_0x42b784);return{'status':'ok','data':_0x54e311};}catch(_0x267181){return{'status':_0x52351a(0x93),'message':_0x267181 instanceof Error?_0x267181[_0x52351a(0xad)]:String(_0x267181)};}}export function loadRawConfigLayers(_0x3d4076){const _0x496204=a107_0x3461ab;let _0x4467ae={},_0x3874f9={},_0x38f6fe,_0x247c43;try{_0x38f6fe=resolveConfigPath(homedir());if(_0x38f6fe){const _0x2526c8=readFileSync(_0x38f6fe,{'encoding':_0x496204(0xaa)});if(_0x2526c8)_0x4467ae=JSON[_0x496204(0xa3)](_0x2526c8);}}catch{}try{const _0x1f245a=_0x3d4076||process[_0x496204(0xa5)]();_0x247c43=resolveConfigPath(_0x1f245a);if(_0x247c43){const _0x21fbbe=readFileSync(_0x247c43,{'encoding':_0x496204(0xaa)});if(_0x21fbbe)_0x3874f9=JSON[_0x496204(0xa3)](_0x21fbbe);}}catch{}return{'globalPath':_0x38f6fe,'projectPath':_0x247c43,'globalConfig':_0x4467ae,'projectConfig':_0x3874f9};}function mergeRawConfigLayers(_0x21e7a0){const _0x5474cd=a107_0x3461ab,{globalConfig:_0x20bf60,projectConfig:_0x94ab9e}=_0x21e7a0,_0xf39e99={..._0x20bf60,..._0x94ab9e};delete _0xf39e99[_0x5474cd(0xd0)];if(_0x5474cd(0xd5)in _0x94ab9e)_0xf39e99[_0x5474cd(0xd5)]=_0x94ab9e['defaultApp'];else _0x20bf60['defaultApp']&&(_0xf39e99[_0x5474cd(0xd5)]=_0x20bf60[_0x5474cd(0xd5)]);return _0xf39e99;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x21f1eb){return mergeRawConfigLayers(loadRawConfigLayers(_0x21f1eb));}export function readRawConfigWithLayers(_0x8813ee){const _0x1fb549=loadRawConfigLayers(_0x8813ee);return{'config':mergeRawConfigLayers(_0x1fb549),'layers':_0x1fb549};}export function resolveDefaultAppSource(_0xebb88b){const _0x5bcbd0=a107_0x3461ab;if(_0x5bcbd0(0xd5)in _0xebb88b['projectConfig'])return _0x5bcbd0(0xcc);if(_0xebb88b[_0x5bcbd0(0xcb)]['defaultApp'])return _0x5bcbd0(0x9f);return null;}function buildConfig(_0x3a40d2,_0x388bd4){const _0x1eba3c=a107_0x3461ab,_0x5a6422=mergeRawConfigLayers(_0x3a40d2),{projectConfig:_0xb55344}=_0x3a40d2,_0x2c0cc8=_0x5a6422[_0x1eba3c(0xd5)]||undefined,_0x37e25f=typeof _0x388bd4['appcode']==='string'?_0x388bd4['appcode']:undefined,_0x4f124a=_0xb55344[_0x1eba3c(0xa1)]||_0xb55344[_0x1eba3c(0xb7)],_0x109bec=!_0x37e25f&&!_0x388bd4[_0x1eba3c(0xb7)]&&!_0x4f124a&&!_0xb55344[_0x1eba3c(0xd5)],_0x59c2d1=_0x109bec?env('APPCODE'):undefined,_0x3ebfbd=_0x388bd4[_0x1eba3c(0xb7)]||(_0x109bec&&!_0x59c2d1?env(_0x1eba3c(0xc9)):undefined),_0x515954=_0x3ebfbd||_0x2c0cc8||undefined,_0x2b0c7f=_0x3ebfbd||_0x59c2d1?undefined:_0x4f124a||(_0xb55344['defaultApp']?undefined:_0x5a6422[_0x1eba3c(0xa1)]||_0x5a6422[_0x1eba3c(0xb7)]||undefined),_0x350f31=_0x3ebfbd||(_0x2b0c7f?undefined:_0x2c0cc8),_0x198f44=resolveLocalAppAliasCode(_0x5a6422,_0x350f31),_0x229008=productEnvNames(_0x1eba3c(0xd8))[_0x1eba3c(0xc4)](_0x1fd468=>process.env[_0x1fd468]!==undefined),_0x9da53e=_0x229008?process.env[_0x229008]:undefined,_0x3aeabc=_0xb55344[_0x1eba3c(0xbf)]||_0x9da53e||_0x5a6422[_0x1eba3c(0xbf)]||undefined,_0x17f120=_0xb55344['accessKey']?'project\x20config':_0x9da53e?_0x229008:_0x5a6422['accessKey']?'global\x20config':undefined,_0x29d0a9=_0x388bd4[_0x1eba3c(0x9b)]||_0x5a6422[_0x1eba3c(0x9b)]||env(_0x1eba3c(0x99))||DEFAULT_CONFIG_VALUES[_0x1eba3c(0x9b)],_0x4f6cbe=normalizeEnv(String(_0x29d0a9)),_0x536c8d=isDaily(_0x4f6cbe)?_0x1eba3c(0xb2):isDev(_0x4f6cbe)?'development':_0x1eba3c(0xc5),_0x54d88a=_0x37e25f||_0x59c2d1||_0x2b0c7f||_0x198f44?undefined:resolveCachedAppCode(_0x350f31,_0x536c8d,_0x3aeabc),_0x4f8bcf=_0x37e25f||_0x59c2d1||_0x2b0c7f||_0x198f44||_0x54d88a||undefined,_0x2d5324=_0x37e25f?_0x1eba3c(0x97):_0x59c2d1?_0x1eba3c(0x9b):_0x2b0c7f?_0x1eba3c(0xde):_0x198f44?_0x1eba3c(0xc0):_0x54d88a?'cache':undefined,_0x2fd59b=_0x5a6422[_0x1eba3c(0xbc)]||DEFAULT_CONFIG_VALUES[_0x1eba3c(0xbc)],_0x4b095b=undefined,_0x1185dc=_0x388bd4['format']||env('FORMAT')||_0x5a6422[_0x1eba3c(0x9c)],_0x24b81e=normalizeLegacyOutputFormat(_0x1185dc),_0x20e127=env(_0x1eba3c(0xd1))||_0x5a6422[_0x1eba3c(0xd9)],_0x1e4ba1=_0x20e127?Number(_0x20e127)||undefined:undefined,_0x87cb8=_0x5a6422[_0x1eba3c(0xa0)],_0x4ede9b=_0x87cb8==='read'||_0x87cb8===_0x1eba3c(0xb8)||_0x87cb8===_0x1eba3c(0xac)?_0x87cb8:DEFAULT_CONFIG_VALUES[_0x1eba3c(0xa0)],_0x355cde=_0x5a6422['nativeToolAvailable']===!![],_0x55be51=env(_0x1eba3c(0xdb)),_0x30d0bb=_0x55be51==='1'||_0x55be51===_0x1eba3c(0x96);return{'appCode':typeof _0x4f8bcf===_0x1eba3c(0xaf)&&_0x4f8bcf[_0x1eba3c(0xa8)]()?_0x4f8bcf[_0x1eba3c(0xa8)]():undefined,'appCodeSource':_0x2d5324,'env':_0x536c8d,'locale':_0x2fd59b,'cookie':_0x4b095b,'accessKey':_0x3aeabc,'accessKeySource':_0x17f120,'format':_0x24b81e,'pageSize':_0x1e4ba1,'riskLevel':_0x4ede9b,'nativeToolAvailable':_0x355cde,'verbose':_0x30d0bb,'defaultApp':_0x2c0cc8,'currentApp':typeof _0x515954==='string'?_0x515954:undefined,'raw':_0x5a6422};}function env(_0x35c126){return productEnv(_0x35c126);}async function buildAuth(_0x3e0e31){const _0x2fe1d5=a107_0x3461ab,_0x360f78='',_0x4dceab=!!_0x3e0e31[_0x2fe1d5(0xbf)];return{'cookie':_0x360f78,'isLoggedIn':_0x4dceab,async 'getOrLogin'(){const _0x223eca=_0x2fe1d5;if(_0x4dceab)return _0x360f78;throw CliErrors[_0x223eca(0xd6)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -33,8 +33,9 @@ export type SqlListResult = DataList<SqlQuery>;
|
|
|
33
33
|
* handle both shapes.
|
|
34
34
|
*/
|
|
35
35
|
export declare function getSqlQueryInfo(appCode: string, sqlCode: string): Promise<SqlQuery>;
|
|
36
|
+
export type RuntimeArtifactType = "react_module" | "react_page";
|
|
36
37
|
export interface RuntimeArtifactUpsertInput {
|
|
37
|
-
artifactType:
|
|
38
|
+
artifactType: RuntimeArtifactType;
|
|
38
39
|
name?: string;
|
|
39
40
|
content: string;
|
|
40
41
|
metadata?: Record<string, unknown>;
|
|
@@ -330,7 +331,7 @@ export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM"
|
|
|
330
331
|
/** Lists app-level notification configs without using the development Cookie flow. */
|
|
331
332
|
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|
|
332
333
|
export declare function listRuntimeArtifacts(appCode: string, options?: {
|
|
333
|
-
artifactType?:
|
|
334
|
+
artifactType?: RuntimeArtifactType;
|
|
334
335
|
source?: string;
|
|
335
336
|
favorite?: boolean;
|
|
336
337
|
}): Promise<RuntimeArtifactItem[]>;
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a108_0x54c627=a108_0x3489;(function(_0x150a98,_0x30736c){const _0x112c5a=a108_0x3489,_0x18b5d2=_0x150a98();while(!![]){try{const _0x58228e=-parseInt(_0x112c5a(0x22e))/0x1+-parseInt(_0x112c5a(0x1e8))/0x2*(-parseInt(_0x112c5a(0x1e4))/0x3)+-parseInt(_0x112c5a(0x1ff))/0x4*(-parseInt(_0x112c5a(0x244))/0x5)+-parseInt(_0x112c5a(0x26a))/0x6*(parseInt(_0x112c5a(0x1d7))/0x7)+-parseInt(_0x112c5a(0x1fe))/0x8*(parseInt(_0x112c5a(0x283))/0x9)+parseInt(_0x112c5a(0x23e))/0xa+parseInt(_0x112c5a(0x287))/0xb*(-parseInt(_0x112c5a(0x1f4))/0xc);if(_0x58228e===_0x30736c)break;else _0x18b5d2['push'](_0x18b5d2['shift']());}catch(_0xb7a16b){_0x18b5d2['push'](_0x18b5d2['shift']());}}}(a108_0x4949,0x8d094));import{ClientAkModel}from'@lovrabet/sdk';import{getSdkClient,getIdentitySdkClient,clearSdkClient}from'../core/sdk-client.js';import{getEnv}from'../constant/env.js';import{readFile}from'node:fs/promises';import{getPersonalKnowledge,listPersonalKnowledge,savePersonalKnowledge}from'../core/kb-management-client.js';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain,requireHarnessDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliError,CliErrors}from'../errors.js';import{createAccessError,readApiErrorCode}from'../framework/access-error.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{normalizeRuntimeUserId}from'../utils/runtime-user-id.js';let _activeAK;export function setActiveAK(_0x2cb147){if(_activeAK!==(_0x2cb147||undefined))clearSdkClient();_activeAK=_0x2cb147||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x45bd60,_0x3b47bb){const _0x48fd67=a108_0x3489;if(!_activeAK)throw CliErrors[_0x48fd67(0x22d)](_0x48fd67(0x232)+PRODUCT_CONFIG[_0x48fd67(0x260)]+'.');const _0x247ce9=_0x45bd60?getSdkClient({'appCode':_0x45bd60,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':_0x48fd67(0x278),'accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x3b47bb(_0x247ce9));}async function identitySdkRequest(_0x464e60){const _0x45c355=a108_0x3489,_0x3e4244=_activeAK;if(!_0x3e4244)throw CliErrors[_0x45c355(0x22d)](_0x45c355(0x232)+PRODUCT_CONFIG[_0x45c355(0x260)]+'.');return withSdkErrors(()=>_0x464e60(getIdentitySdkClient(_0x3e4244,getRuntimeDomain())));}async function withSdkErrors(_0xf63abb){const _0x3f1066=a108_0x3489;try{return await _0xf63abb();}catch(_0x5085cc){if(_0x5085cc instanceof CliError)throw _0x5085cc;if(!_0x5085cc||typeof _0x5085cc!==_0x3f1066(0x215))throw _0x5085cc;const _0xd9a72=_0x5085cc,_0x386913=_0xd9a72[_0x3f1066(0x1f6)]&&typeof _0xd9a72[_0x3f1066(0x1f6)]==='object'?_0xd9a72[_0x3f1066(0x1f6)]:{},_0x2b9a74=firstString(_0x386913[_0x3f1066(0x212)],_0x386913[_0x3f1066(0x1cc)],_0x386913[_0x3f1066(0x281)],_0xd9a72[_0x3f1066(0x1cc)]),_0x2c9387=createRateLimitError({'status':[_0xd9a72[_0x3f1066(0x279)],_0x386913[_0x3f1066(0x279)],_0x386913[_0x3f1066(0x227)]]['find'](_0x446f38=>Number(_0x446f38)===0x1ad)??_0xd9a72[_0x3f1066(0x279)],'errorCode':firstString(_0x386913[_0x3f1066(0x295)],typeof _0x386913[_0x3f1066(0x227)]==='string'?_0x386913[_0x3f1066(0x227)]:undefined,_0xd9a72[_0x3f1066(0x227)]),'message':_0x2b9a74,'retryAfter':_0xd9a72[_0x3f1066(0x231)]??readRetryAfterSeconds(_0xd9a72['response'])});if(_0x2c9387)throw _0x2c9387;const _0x3aadc6=createAccessError(_0xd9a72['response'],_0xd9a72[_0x3f1066(0x227)]);if(_0x3aadc6)throw _0x3aadc6;throw CliErrors[_0x3f1066(0x1fd)](_0x2b9a74||_0x3f1066(0x241),_0xd9a72[_0x3f1066(0x227)]?_0x3f1066(0x28b)+_0xd9a72[_0x3f1066(0x227)]:undefined);}}function firstString(..._0x41ba02){const _0x2385bc=a108_0x3489;for(const _0x3c193d of _0x41ba02){if(typeof _0x3c193d===_0x2385bc(0x269)&&_0x3c193d[_0x2385bc(0x22b)]())return _0x3c193d[_0x2385bc(0x22b)]();}return undefined;}async function decodeResponseBody(_0x42bb1f){const _0x3d0060=a108_0x3489;if(typeof _0x42bb1f[_0x3d0060(0x273)]===_0x3d0060(0x27d))try{const _0x3e3b84=await _0x42bb1f[_0x3d0060(0x273)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x3e3b84),'text':_0x3e3b84};}catch{return{'isJson':![],'text':_0x3e3b84['trim']()||undefined};}}catch(_0x33f15b){if(_0x33f15b instanceof Error&&_0x33f15b[_0x3d0060(0x1f0)]===_0x3d0060(0x206))throw _0x33f15b;}try{return{'isJson':!![],'data':await _0x42bb1f['json']()};}catch(_0x16b410){if(_0x16b410 instanceof Error&&_0x16b410[_0x3d0060(0x1f0)]===_0x3d0060(0x206))throw _0x16b410;return{'isJson':![]};}}function throwIfRateLimited(_0x5e8a08,_0xe17f02,_0x546cc7){const _0x310ee1=a108_0x3489,_0x192855=_0xe17f02&&typeof _0xe17f02===_0x310ee1(0x215)?_0xe17f02:{},_0xafbe2f=[_0x192855['status'],_0x192855[_0x310ee1(0x227)]][_0x310ee1(0x1f8)](_0x56fcea=>Number(_0x56fcea)===0x1ad),_0x24bcd6=createRateLimitError({'status':_0x5e8a08['status']===0x1ad?_0x5e8a08[_0x310ee1(0x279)]:_0xafbe2f??_0x5e8a08[_0x310ee1(0x279)],'errorCode':firstString(_0x192855[_0x310ee1(0x295)],typeof _0x192855['code']===_0x310ee1(0x269)?_0x192855[_0x310ee1(0x227)]:undefined),'message':firstString(_0x192855['errorMsg'],_0x192855[_0x310ee1(0x1cc)],_0x192855['msg'],_0x546cc7),'retryAfter':readRetryAfter(_0x5e8a08['headers'])??readRetryAfterSeconds(_0xe17f02)});if(_0x24bcd6)throw _0x24bcd6;}async function apiRequest(_0x4deb48,_0x55023b={}){const _0x4b12ff=a108_0x3489,{method:method=_0x4b12ff(0x264),body:_0x466756,headers:headers={},timeout:timeout=0x7530,domain:domain='runtime',rejectRedirects:rejectRedirects=![]}=_0x55023b,_0x3d4f1b=_activeAK,_0x21764c=domain===_0x4b12ff(0x1f5)?requireHarnessDomain():domain===_0x4b12ff(0x280)?getApiDomain():getRuntimeDomain();if(!_0x3d4f1b)throw CliErrors['authRequired'](_0x4b12ff(0x232)+PRODUCT_CONFIG[_0x4b12ff(0x260)]+'.');const _0x2dc8ea=''+_0x21764c+_0x4deb48,_0x33f6de={'X-User-AK':_0x3d4f1b},_0x41ab74=new AbortController(),_0x3b7b20=setTimeout(()=>_0x41ab74[_0x4b12ff(0x1d0)](),timeout);try{const _0x4d98c2=await fetch(_0x2dc8ea,{'method':method,...rejectRedirects?{'redirect':_0x4b12ff(0x24c)}:{},'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x4b12ff(0x1d4)],..._0x33f6de,...headers},'body':_0x466756?JSON['stringify'](_0x466756):undefined,'signal':_0x41ab74[_0x4b12ff(0x2a9)]});return await readApiResponse(_0x4d98c2);}catch(_0x5b8ef6){if(_0x5b8ef6 instanceof Error&&_0x5b8ef6[_0x4b12ff(0x1f0)]===_0x4b12ff(0x206))throw CliErrors[_0x4b12ff(0x1fd)](_0x4b12ff(0x229)+_0x2dc8ea);throw _0x5b8ef6;}finally{clearTimeout(_0x3b7b20);}}async function readApiResponse(_0x59e658){const _0x2973ba=a108_0x3489,_0x457265=await decodeResponseBody(_0x59e658);if(!_0x457265[_0x2973ba(0x1f7)]){throwIfRateLimited(_0x59e658,undefined,_0x457265[_0x2973ba(0x273)]);throw CliErrors[_0x2973ba(0x1fd)](_0x2973ba(0x247)+_0x59e658[_0x2973ba(0x279)]+')',_0x59e658[_0x2973ba(0x279)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0xfd7d32=_0x457265['data'];throwIfRateLimited(_0x59e658,_0xfd7d32);if(!_0x59e658['ok']||_0xfd7d32[_0x2973ba(0x24b)]===![]){const _0xa8d094=createAccessError(_0xfd7d32);if(_0xa8d094)throw _0xa8d094;throw CliErrors[_0x2973ba(0x1fd)](_0xfd7d32[_0x2973ba(0x212)]||_0xfd7d32['message']||_0xfd7d32[_0x2973ba(0x281)]||'API\x20error:\x20'+_0x59e658['status'],readApiErrorCode(_0xfd7d32)?_0x2973ba(0x28b)+readApiErrorCode(_0xfd7d32):undefined);}return _0xfd7d32;}async function apiBinaryRequest(_0x43c1d1,_0x1f24ed={}){const _0x4920c7=a108_0x3489,{method:method=_0x4920c7(0x264),headers:headers={},timeout:timeout=0x7530}=_0x1f24ed,_0x3298aa=_activeAK,_0x435da8=getRuntimeDomain();if(!_0x3298aa)throw CliErrors[_0x4920c7(0x22d)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4920c7(0x260)]+'.');const _0xc62471=''+_0x435da8+_0x43c1d1,_0x4bdb9a=new AbortController(),_0x4c1320=setTimeout(()=>_0x4bdb9a[_0x4920c7(0x1d0)](),timeout);try{const _0x2d603b=await fetch(_0xc62471,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4920c7(0x1d4)],'X-User-AK':_0x3298aa,...headers},'signal':_0x4bdb9a[_0x4920c7(0x2a9)]});if(!_0x2d603b['ok']){const _0x199a66=await decodeResponseBody(_0x2d603b),_0x2d81de=_0x199a66[_0x4920c7(0x265)]&&typeof _0x199a66[_0x4920c7(0x265)]===_0x4920c7(0x215)?_0x199a66[_0x4920c7(0x265)]:{},_0x27e312=firstString(_0x2d81de[_0x4920c7(0x212)],_0x2d81de[_0x4920c7(0x1cc)],_0x2d81de['errorCode'],_0x199a66[_0x4920c7(0x273)]);throwIfRateLimited(_0x2d603b,_0x199a66[_0x4920c7(0x265)],_0x27e312);const _0x5f1dbb=createAccessError(_0x199a66['data']);if(_0x5f1dbb)throw _0x5f1dbb;throw CliErrors[_0x4920c7(0x1fd)](_0x27e312||_0x4920c7(0x1c2)+_0x2d603b[_0x4920c7(0x279)],_0x4920c7(0x25f)+_0xc62471);}return Buffer['from'](await _0x2d603b[_0x4920c7(0x225)]());}catch(_0x2f57db){if(_0x2f57db instanceof Error&&_0x2f57db[_0x4920c7(0x1f0)]==='AbortError')throw CliErrors['apiError'](_0x4920c7(0x229)+_0xc62471);throw _0x2f57db;}finally{clearTimeout(_0x4c1320);}}async function toolboxRequest(_0x59c277,_0x4e37f4,_0x3b5b95={}){const _0x471ff5=a108_0x3489,{method:method=_0x471ff5(0x264),headers:headers={},timeout:timeout=0x7530}=_0x3b5b95,_0x2eb00f=_activeAK;if(!_0x2eb00f)throw CliErrors[_0x471ff5(0x22d)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x471ff5(0x260)]+'.');const _0x1d1ff4=getApiDomain()['replace'](/\/$/,''),_0x3edcc8=new URL(_0x59c277,_0x1d1ff4+_0x471ff5(0x26b));if(_0x4e37f4)for(const [_0x586fe8,_0xecd3a6]of Object[_0x471ff5(0x20f)](_0x4e37f4)){_0xecd3a6!==undefined&&_0xecd3a6!==null&&_0x3edcc8['searchParams'][_0x471ff5(0x25d)](_0x586fe8,String(_0xecd3a6));}const _0x43917d=new AbortController(),_0x3d1a65=setTimeout(()=>_0x43917d[_0x471ff5(0x1d0)](),timeout);try{const _0x38f6b4=await fetch(_0x3edcc8,{'method':method,'headers':{'Content-Type':_0x471ff5(0x296),'X-Invoke-Source':PRODUCT_CONFIG[_0x471ff5(0x1d4)],'X-User-AK':_0x2eb00f,...headers},'signal':_0x43917d[_0x471ff5(0x2a9)]}),_0x47988c=await decodeResponseBody(_0x38f6b4);if(!_0x47988c[_0x471ff5(0x1f7)]){throwIfRateLimited(_0x38f6b4,undefined,_0x47988c[_0x471ff5(0x273)]);throw CliErrors[_0x471ff5(0x1fd)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x38f6b4[_0x471ff5(0x279)]+')',_0x38f6b4[_0x471ff5(0x279)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x29c517=_0x47988c[_0x471ff5(0x265)];throwIfRateLimited(_0x38f6b4,_0x29c517);if(!_0x38f6b4['ok']){const _0x14c7e2=_0x29c517&&typeof _0x29c517===_0x471ff5(0x215)?_0x29c517:{};throw CliErrors['apiError'](_0x14c7e2[_0x471ff5(0x212)]||_0x14c7e2[_0x471ff5(0x1cc)]||_0x471ff5(0x245)+_0x38f6b4['status'],_0x14c7e2[_0x471ff5(0x295)]?_0x471ff5(0x255)+_0x14c7e2[_0x471ff5(0x295)]:undefined);}if(_0x29c517&&typeof _0x29c517===_0x471ff5(0x215)&&_0x471ff5(0x24b)in _0x29c517&&typeof _0x29c517[_0x471ff5(0x24b)]===_0x471ff5(0x27b)){const _0x222709=_0x29c517;if(!_0x222709[_0x471ff5(0x24b)])throw CliErrors[_0x471ff5(0x1fd)](_0x222709[_0x471ff5(0x212)]||_0x222709[_0x471ff5(0x1cc)]||_0x471ff5(0x1eb),_0x222709['errorCode']?_0x471ff5(0x255)+_0x222709['errorCode']:undefined);return _0x222709['data'];}return _0x29c517;}catch(_0x326e30){if(_0x326e30 instanceof Error&&_0x326e30[_0x471ff5(0x1f0)]===_0x471ff5(0x206))throw CliErrors[_0x471ff5(0x1fd)](_0x471ff5(0x229)+_0x3edcc8[_0x471ff5(0x261)]());throw _0x326e30;}finally{clearTimeout(_0x3d1a65);}}async function skillHubJsonRequest(_0x4f05da,_0x454b1a={}){const _0x298028=a108_0x3489,{method:method=_0x298028(0x264),query:_0x2fea0c,body:_0x3e6870,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x454b1a,_0x14834d=_activeAK;if(!_0x14834d)throw CliErrors[_0x298028(0x22d)](_0x298028(0x232)+PRODUCT_CONFIG[_0x298028(0x260)]+'.');const _0x42999b=getSkillDomain()['replace'](/\/$/,''),_0x22b156=new URL(_0x4f05da,_0x42999b+'/');if(_0x2fea0c)for(const [_0x3db10d,_0x18a94c]of Object[_0x298028(0x20f)](_0x2fea0c)){_0x18a94c!==undefined&&_0x18a94c!==null&&_0x22b156[_0x298028(0x1d2)][_0x298028(0x25d)](_0x3db10d,String(_0x18a94c));}const _0x469c2b=new AbortController(),_0x58a78c=setTimeout(()=>_0x469c2b['abort'](),timeout);try{const _0x16c0b3=await fetch(_0x22b156[_0x298028(0x261)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x14834d,...headers},'body':_0x3e6870,'signal':_0x469c2b[_0x298028(0x2a9)]}),_0x57c9ff=await decodeResponseBody(_0x16c0b3);if(!_0x57c9ff[_0x298028(0x1f7)]){if(allowNotFound&&_0x16c0b3['status']===0x194)return undefined;throwIfRateLimited(_0x16c0b3,undefined,_0x57c9ff['text']);throw CliErrors[_0x298028(0x1fd)](_0x298028(0x1f9)+_0x16c0b3[_0x298028(0x279)]+')',_0x16c0b3[_0x298028(0x279)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x38686a=_0x57c9ff[_0x298028(0x265)];throwIfRateLimited(_0x16c0b3,_0x38686a);if(allowNotFound&&isSkillHubNotFoundResponse(_0x16c0b3['status'],_0x38686a))return undefined;const _0x5a05f0=!_0x16c0b3['ok']||_0x38686a?.[_0x298028(0x24b)]===![]||typeof _0x38686a?.[_0x298028(0x227)]===_0x298028(0x292)&&_0x38686a['code']>=0x190;if(_0x5a05f0)throw CliErrors[_0x298028(0x1fd)](_0x38686a?.['errorMsg']||_0x38686a?.[_0x298028(0x1cc)]||_0x38686a?.[_0x298028(0x281)]||_0x298028(0x1fa)+_0x16c0b3['status'],_0x38686a?.[_0x298028(0x295)]?_0x298028(0x1c7)+_0x38686a[_0x298028(0x295)]:undefined);return _0x38686a?.[_0x298028(0x265)]??_0x38686a;}catch(_0x3f067f){if(_0x3f067f instanceof Error&&_0x3f067f[_0x298028(0x1f0)]===_0x298028(0x206))throw CliErrors[_0x298028(0x1fd)](_0x298028(0x229)+_0x22b156[_0x298028(0x261)]());throw _0x3f067f;}finally{clearTimeout(_0x58a78c);}}function isSkillHubNotFoundResponse(_0x543cbc,_0x288205){const _0x1da481=a108_0x3489;if(_0x543cbc===0x194||_0x288205?.[_0x1da481(0x227)]===0x194)return!![];if(_0x543cbc!==0x190&&_0x288205?.[_0x1da481(0x227)]!==0x190)return![];const _0x3b989d=[_0x288205?.[_0x1da481(0x281)],_0x288205?.[_0x1da481(0x1cc)],_0x288205?.[_0x1da481(0x212)],_0x288205?.[_0x1da481(0x24c)]]['filter'](_0x33d782=>typeof _0x33d782===_0x1da481(0x269))[_0x1da481(0x213)]('\x20');return/skill not found\b/i['test'](_0x3b989d);}async function skillHubBinaryRequest(_0x3cd2f8,_0x254e72={}){const _0x15ff3a=a108_0x3489,{query:_0x298fcd,headers:headers={},timeout:timeout=0x7530}=_0x254e72,_0x48baa2=_activeAK;if(!_0x48baa2)throw CliErrors[_0x15ff3a(0x22d)](_0x15ff3a(0x232)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x470e0a=getSkillDomain()[_0x15ff3a(0x29b)](/\/$/,''),_0xf156ea=new URL(_0x3cd2f8,_0x470e0a+'/');if(_0x298fcd)for(const [_0x37d6e8,_0x26cb56]of Object[_0x15ff3a(0x20f)](_0x298fcd)){_0x26cb56!==undefined&&_0x26cb56!==null&&_0xf156ea[_0x15ff3a(0x1d2)][_0x15ff3a(0x25d)](_0x37d6e8,String(_0x26cb56));}const _0x36bfbb=new AbortController(),_0x2867dd=setTimeout(()=>_0x36bfbb[_0x15ff3a(0x1d0)](),timeout);try{const _0x55c888=await fetch(_0xf156ea['toString'](),{'method':_0x15ff3a(0x264),'headers':{'Accept':_0x15ff3a(0x2a2),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x48baa2,...headers},'signal':_0x36bfbb['signal']});if(!_0x55c888['ok']){const _0x5de19d=await decodeResponseBody(_0x55c888),_0xb6b407=_0x5de19d['data']&&typeof _0x5de19d[_0x15ff3a(0x265)]===_0x15ff3a(0x215)?_0x5de19d[_0x15ff3a(0x265)]:{},_0x5a717e=firstString(_0xb6b407['errorMsg'],_0xb6b407[_0x15ff3a(0x1cc)],_0xb6b407[_0x15ff3a(0x281)],_0xb6b407[_0x15ff3a(0x295)],_0x5de19d[_0x15ff3a(0x273)]);throwIfRateLimited(_0x55c888,_0x5de19d['data'],_0x5a717e);throw CliErrors[_0x15ff3a(0x1fd)](_0x5a717e||_0x15ff3a(0x1fa)+_0x55c888[_0x15ff3a(0x279)],'Download\x20failed:\x20'+_0xf156ea[_0x15ff3a(0x261)]());}return Buffer[_0x15ff3a(0x1e5)](await _0x55c888[_0x15ff3a(0x225)]());}catch(_0x42e76a){if(_0x42e76a instanceof Error&&_0x42e76a[_0x15ff3a(0x1f0)]===_0x15ff3a(0x206))throw CliErrors[_0x15ff3a(0x1fd)](_0x15ff3a(0x229)+_0xf156ea[_0x15ff3a(0x261)]());throw _0x42e76a;}finally{clearTimeout(_0x2867dd);}}export async function getBffEndpointContract(_0x4241eb,_0x25937b){const _0x46fdde=a108_0x3489;if(encodeURIComponent(_0x4241eb)!==_0x4241eb||_0x4241eb==='.'||_0x4241eb==='..')throw CliErrors[_0x46fdde(0x234)](_0x46fdde(0x22c));if(_0x25937b===_0x46fdde(0x1dd))throw CliErrors['validation'](_0x46fdde(0x2a4)+_0x4241eb+_0x46fdde(0x1e9)+_0x25937b);const _0x983cf4=await sdkRequest(_0x4241eb,_0x3e8056=>{const _0x39f057=_0x46fdde;if(!(_0x39f057(0x1c6)in _0x3e8056['bff']))throw CliErrors[_0x39f057(0x234)](_0x39f057(0x1da));return _0x3e8056['bff']['getEndpoint'](_0x25937b);});if(!_0x983cf4||typeof _0x983cf4!==_0x46fdde(0x215)||Array['isArray'](_0x983cf4)||_0x983cf4[_0x46fdde(0x1e6)]!==_0x4241eb||_0x983cf4[_0x46fdde(0x24d)]!==_0x25937b)throw CliErrors[_0x46fdde(0x234)](_0x46fdde(0x2a4)+_0x4241eb+_0x46fdde(0x1e9)+_0x25937b);const _0x5a60b3=_0x983cf4[_0x46fdde(0x297)];if(_0x5a60b3!=null&&(typeof _0x5a60b3!==_0x46fdde(0x292)||!Number[_0x46fdde(0x230)](_0x5a60b3)))throw CliErrors[_0x46fdde(0x1fd)](_0x46fdde(0x20d));return{'appCode':_0x983cf4[_0x46fdde(0x1e6)],'functionName':_0x983cf4[_0x46fdde(0x24d)],'description':_0x983cf4[_0x46fdde(0x266)],'version':_0x983cf4[_0x46fdde(0x252)],'gmtModified':_0x5a60b3};}export async function getSqlQueryInfo(_0x250ebc,_0x5179d2){const _0x2fc876=a108_0x3489,_0x113741=await sdkRequest(_0x250ebc,_0x28e53c=>{const _0x58256b=a108_0x3489;if(!(_0x58256b(0x21e)in _0x28e53c[_0x58256b(0x262)]))throw CliErrors[_0x58256b(0x234)](_0x58256b(0x271));return _0x28e53c[_0x58256b(0x262)][_0x58256b(0x21e)]({'appCode':_0x250ebc,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x5179d2});}),_0x85dfaa=_0x113741&&typeof _0x113741===_0x2fc876(0x215)&&_0x2fc876(0x29e)in _0x113741?_0x113741['tableData']?.[0x0]:_0x113741&&typeof _0x113741===_0x2fc876(0x215)&&_0x2fc876(0x29c)in _0x113741?_0x113741:undefined;if(!_0x85dfaa)throw CliErrors['validation'](_0x2fc876(0x21d)+_0x5179d2);return _0x85dfaa;}export async function listApprovalTodo(_0x421ea3,_0x227b4c=0x1,_0x312bd1=0x14){const _0x222077=a108_0x3489,_0x58fa2c=await sdkRequest(_0x421ea3,_0x5aa7bd=>_0x5aa7bd['approval']['listTodo']({'currentPage':_0x227b4c,'pageSize':_0x312bd1}));if(!_0x58fa2c||typeof _0x58fa2c!==_0x222077(0x215)||!Array[_0x222077(0x220)](_0x58fa2c[_0x222077(0x270)]))throw CliErrors['apiError'](_0x222077(0x221));return _0x58fa2c;}export async function getApprovalTaskDetail(_0x579927,_0x418dfc){const _0x7a7a8c=a108_0x3489,_0x2633dd=await sdkRequest(_0x418dfc,_0x576069=>_0x576069['approval'][_0x7a7a8c(0x267)](_0x579927));if(!_0x2633dd||typeof _0x2633dd!=='object'||Array[_0x7a7a8c(0x220)](_0x2633dd))throw CliErrors['apiError'](_0x7a7a8c(0x1ce));return _0x2633dd;}export async function approveApprovalTask(_0x297ecd){const _0x1e2093=a108_0x3489;return await sdkRequest(_0x297ecd[_0x1e2093(0x1e6)],_0x12db93=>_0x12db93[_0x1e2093(0x205)]['approve'](_0x297ecd)),null;}export async function transferApprovalTask(_0x4ea0d8){const _0x318ed1=a108_0x3489;return await sdkRequest(_0x4ea0d8[_0x318ed1(0x1e6)],_0x4bdd4a=>_0x4bdd4a[_0x318ed1(0x205)][_0x318ed1(0x24e)](_0x4ea0d8)),null;}function isRemoteAppItem(_0x2db555){const _0x543e9d=a108_0x3489;return!!_0x2db555&&typeof _0x2db555===_0x543e9d(0x215)&&typeof _0x2db555[_0x543e9d(0x1e6)]===_0x543e9d(0x269)&&typeof _0x2db555[_0x543e9d(0x224)]==='string';}function extractRemoteAppItems(_0x5daf41){const _0x211b37=a108_0x3489;if(Array[_0x211b37(0x220)](_0x5daf41))return _0x5daf41[_0x211b37(0x1ea)](isRemoteAppItem);if(!_0x5daf41||typeof _0x5daf41!=='object')throw CliErrors[_0x211b37(0x1fd)](_0x211b37(0x249));const _0x4c820b=_0x5daf41;if(Array[_0x211b37(0x220)](_0x4c820b[_0x211b37(0x29e)]))return _0x4c820b['tableData']['filter'](isRemoteAppItem);if(_0x4c820b['data']&&typeof _0x4c820b[_0x211b37(0x265)]===_0x211b37(0x215)){const _0xe60e=_0x4c820b[_0x211b37(0x265)];if(Array[_0x211b37(0x220)](_0xe60e['tableData']))return _0xe60e[_0x211b37(0x29e)][_0x211b37(0x1ea)](isRemoteAppItem);}throw CliErrors[_0x211b37(0x1fd)](_0x211b37(0x28e));}export async function getMyApps(){const _0x377ef4=a108_0x3489;return extractRemoteAppItems(await identitySdkRequest(_0x1b008f=>_0x1b008f[_0x377ef4(0x25e)]()));}export async function getLoginUserInfo(){const _0x4f6ad6=a108_0x3489,_0x111c9c=await identitySdkRequest(_0x239295=>_0x239295[_0x4f6ad6(0x1c5)]());if(!_0x111c9c||typeof _0x111c9c!==_0x4f6ad6(0x215)||Array[_0x4f6ad6(0x220)](_0x111c9c))throw CliErrors[_0x4f6ad6(0x1fd)](_0x4f6ad6(0x27c));return _0x111c9c;}export const USER_ACCOUNT_BIND_PATH=a108_0x54c627(0x1ee);export async function bindExternalUserAccount(_0x21b451,_0x1fbeea){return identitySdkRequest(_0x5505bc=>_0x5505bc['bindAccount']({'provider':_0x21b451,'accountId':_0x1fbeea}));}function runtimeSchedulePath(_0x3a83dc,_0x3e8b37=''){const _0x34f6a4=a108_0x54c627;return'/api/harness/apps/'+encodeURIComponent(_0x3a83dc)+_0x34f6a4(0x29f)+_0x3e8b37;}export async function validateRuntimeSchedule(_0x32544a,_0x102c38){const _0x4497e5=a108_0x54c627,_0x30c7ad=await apiRequest(runtimeSchedulePath(_0x32544a,_0x4497e5(0x210)),{'domain':_0x4497e5(0x1f5),'method':_0x4497e5(0x275),'body':_0x102c38});return _0x30c7ad[_0x4497e5(0x265)];}export async function createRuntimeSchedule(_0x479fb3,_0x3cda17){const _0x1b8a7d=a108_0x54c627,_0x2352d4=await apiRequest(runtimeSchedulePath(_0x479fb3),{'domain':_0x1b8a7d(0x1f5),'method':_0x1b8a7d(0x275),'body':_0x3cda17});return _0x2352d4['data'];}export async function listRuntimeSchedules(_0x49fb39,_0x27c390){const _0x44a4ad=a108_0x54c627,_0x18c3fc=new URLSearchParams();_0x18c3fc['set']('kind',_0x27c390[_0x44a4ad(0x217)]);if(_0x27c390[_0x44a4ad(0x2aa)]!==undefined)_0x18c3fc[_0x44a4ad(0x25d)](_0x44a4ad(0x2aa),String(_0x27c390[_0x44a4ad(0x2aa)]));if(_0x27c390[_0x44a4ad(0x22f)])_0x18c3fc[_0x44a4ad(0x25d)]('cursor',_0x27c390[_0x44a4ad(0x22f)]);const _0x397c9f=_0x18c3fc[_0x44a4ad(0x1d5)]>0x0?'?'+_0x18c3fc[_0x44a4ad(0x261)]():'',_0x40f9d1=await apiRequest(''+runtimeSchedulePath(_0x49fb39)+_0x397c9f,{'domain':_0x44a4ad(0x1f5)});return _0x40f9d1[_0x44a4ad(0x265)];}export async function getRuntimeSchedule(_0x5973d0,_0x4dfd9c){const _0x4d86be=a108_0x54c627,_0x4d1bc7=await apiRequest(runtimeSchedulePath(_0x5973d0,'/'+encodeURIComponent(_0x4dfd9c)),{'domain':_0x4d86be(0x1f5)});return _0x4d1bc7['data'];}export async function deleteRuntimeSchedule(_0x52ffce,_0xacd260){const _0x199655=a108_0x54c627,_0x209da9=await apiRequest(runtimeSchedulePath(_0x52ffce,'/'+encodeURIComponent(_0xacd260)),{'domain':_0x199655(0x1f5),'method':_0x199655(0x1c3)});return _0x209da9[_0x199655(0x265)];}export async function runRuntimeSchedule(_0x54048d,_0x9a543f){const _0x105328=a108_0x54c627,_0x5958e1=await apiRequest(runtimeSchedulePath(_0x54048d,'/'+encodeURIComponent(_0x9a543f)+_0x105328(0x201)),{'domain':_0x105328(0x1f5),'method':'POST'});return _0x5958e1['data'];}export async function listDatasets(_0x41d7aa,_0x42eebe){const _0x3dc7c3=a108_0x54c627,_0x385963=await sdkRequest(_0x41d7aa,_0x86b341=>_0x86b341[_0x3dc7c3(0x26e)]['list']({..._0x42eebe?.[_0x3dc7c3(0x227)]&&{'code':_0x42eebe[_0x3dc7c3(0x227)]},..._0x42eebe?.[_0x3dc7c3(0x1f0)]&&{'name':_0x42eebe[_0x3dc7c3(0x1f0)]},..._0x42eebe?.[_0x3dc7c3(0x209)]&&{'tableName':_0x42eebe[_0x3dc7c3(0x209)]}}));return extractList(_0x385963);}export async function getDatasetDetail(_0x55194f){const _0x3d3e32=a108_0x54c627;return sdkRequest(undefined,_0x49ff54=>_0x49ff54[_0x3d3e32(0x26e)]['getDrivenData']({'code':_0x55194f}));}function importSdkRequest(_0xf0263,_0x27ded7,_0x260420){return sdkRequest(_0xf0263,_0x84ec28=>{const _0x40e7cc=a108_0x3489,_0x17f70b=_0x84ec28[_0x40e7cc(0x1de)]('dataset_'+_0x27ded7);if(!(_0x17f70b instanceof ClientAkModel))throw CliErrors[_0x40e7cc(0x234)](_0x40e7cc(0x2a3));return _0x260420(_0x17f70b);});}export async function getDatasetImportContract(_0x42e48b,_0x574950){const _0x94553d=a108_0x54c627;return importSdkRequest(_0x42e48b,_0x574950,_0x26f8e2=>_0x26f8e2[_0x94553d(0x1d3)]());}export async function createDatasetImportBatch(_0x26b38c,_0x230881,_0x2e6b39){const _0x479b90=a108_0x54c627;return importSdkRequest(_0x26b38c,_0x230881,_0x3d0ba5=>_0x3d0ba5[_0x479b90(0x298)](_0x2e6b39));}export async function readDatasetImportRows(_0x368632,_0x4315fa,_0x3be213){const _0x397b7c=a108_0x54c627,_0x16602a=await importSdkRequest(_0x368632,_0x4315fa,_0xa0515f=>_0xa0515f[_0x397b7c(0x2a7)]({'ids':_0x3be213}));if(!_0x16602a||!Array['isArray'](_0x16602a[_0x397b7c(0x1dc)]))throw CliErrors[_0x397b7c(0x1fd)]('Invalid\x20import\x20readback\x20response.');return _0x16602a[_0x397b7c(0x1dc)];}export async function readDatasetImportTaskRows(_0x17bece,_0x55b81c,_0x7252e7){const _0x3d3964=a108_0x54c627,_0x4b9844=await importSdkRequest(_0x17bece,_0x55b81c,_0x2f8cf9=>_0x2f8cf9[_0x3d3964(0x2a7)]({'taskId':_0x7252e7}));if(!_0x4b9844||!Array['isArray'](_0x4b9844[_0x3d3964(0x1dc)]))throw CliErrors[_0x3d3964(0x1fd)](_0x3d3964(0x24f));return _0x4b9844[_0x3d3964(0x1dc)];}export async function uploadDatasetImportImage(_0x5ac9f6,_0x53c4f9,_0x16b768,_0x45d5dd){const _0x1cd9a3=a108_0x54c627;return importSdkRequest(_0x5ac9f6,_0x53c4f9,_0x252f96=>_0x252f96[_0x1cd9a3(0x20a)]({'importId':_0x16b768,'contentHash':_0x45d5dd[_0x1cd9a3(0x2a0)],'file':new Blob([new Uint8Array(_0x45d5dd[_0x1cd9a3(0x211)])],{'type':_0x45d5dd['type']}),'fileName':_0x1cd9a3(0x1e0)}));}export async function readDatasetImportImage(_0x48eeaf,_0x1a16f0,_0x152181,_0x3b1393){const _0x46e53e=a108_0x54c627;return importSdkRequest(_0x48eeaf,_0x1a16f0,_0x195a20=>_0x195a20[_0x46e53e(0x1c9)]({'importId':_0x152181,'contentHash':_0x3b1393[_0x46e53e(0x2a0)],'type':_0x3b1393[_0x46e53e(0x248)],'size':_0x3b1393[_0x46e53e(0x1d5)]}));}export async function getDatasetSdkUsageDoc(_0x17810a,_0x40d2cd){const _0x4bb6eb=a108_0x54c627,_0x28a8e0=await toolboxRequest(_0x4bb6eb(0x1cb),{'datasetCode':_0x17810a,'appCode':_0x40d2cd});return typeof _0x28a8e0?.[_0x4bb6eb(0x233)]==='string'?_0x28a8e0[_0x4bb6eb(0x233)]:'';}export async function uploadRuntimeFile(_0x2e3e29,_0x1172d9){const _0x2dbfed=a108_0x54c627,_0xd90700=await readFile(_0x1172d9);return sdkRequest(_0x2e3e29,_0x116c9b=>_0x116c9b['services'][_0x2dbfed(0x28a)][_0x2dbfed(0x1c4)]({'file':new Blob([new Uint8Array(_0xd90700)]),'fileName':basename(_0x1172d9)}));}export async function queryRuntimeFileUrl(_0x405158,_0x50384c={}){const _0x6d210d=a108_0x54c627;return sdkRequest(undefined,_0x5bdfb3=>_0x5bdfb3[_0x6d210d(0x21a)]['file'][_0x6d210d(0x1df)]({'filePath':_0x405158,..._0x50384c}));}export async function recognizeRuntimeOcr(_0x30c7e2,_0x84e2ac){const _0x2d52a2=a108_0x54c627;return sdkRequest(_0x30c7e2,_0x3a627c=>_0x3a627c['services'][_0x2d52a2(0x276)][_0x2d52a2(0x216)](_0x84e2ac));}export async function getRuntimeAppConfigByKey(_0x51ec02,_0x5454c6){const _0x1f480b=a108_0x54c627,_0x3e00a8=await sdkRequest(_0x51ec02,_0x24f730=>_0x24f730[_0x1f480b(0x246)][_0x1f480b(0x293)](_0x5454c6));if(typeof _0x3e00a8!==_0x1f480b(0x269))throw CliErrors[_0x1f480b(0x234)]('Invalid\x20app\x20config\x20value:\x20key='+_0x5454c6);return _0x3e00a8;}function a108_0x3489(_0x2e4e38,_0x28fa15){_0x2e4e38=_0x2e4e38-0x1c1;const _0x49490e=a108_0x4949();let _0x3489ee=_0x49490e[_0x2e4e38];return _0x3489ee;}export async function listNotificationChannelConfigs(_0x5c75c9,_0x575ebe){const _0x3cadb1=a108_0x54c627,_0x5ed77f=await sdkRequest(_0x5c75c9,_0x4b6871=>_0x4b6871[_0x3cadb1(0x246)][_0x3cadb1(0x203)](_0x575ebe));if(!Array[_0x3cadb1(0x220)](_0x5ed77f))throw CliErrors[_0x3cadb1(0x1fd)](_0x3cadb1(0x219),_0x3cadb1(0x1f2));return _0x5ed77f;}export async function listRuntimeArtifacts(_0x3d4425,_0x55208a){const _0x135dad=a108_0x54c627,_0x2912e8=await sdkRequest(_0x3d4425,_0x196f0d=>_0x196f0d[_0x135dad(0x29a)][_0x135dad(0x1cd)](_0x55208a));return Array[_0x135dad(0x220)](_0x2912e8)?_0x2912e8:[];}export async function getRuntimeArtifact(_0x33bde3,_0x504fb2){const _0x39b531=a108_0x54c627,_0x3496ce=await sdkRequest(_0x504fb2,_0x1116c0=>_0x1116c0[_0x39b531(0x29a)][_0x39b531(0x1d8)](_0x33bde3));if(!_0x3496ce)throw CliErrors[_0x39b531(0x234)](_0x39b531(0x27f)+_0x33bde3);return _0x3496ce;}export async function createRuntimeArtifact(_0x2a3d1a,_0x5845a8){const _0x24acb7=a108_0x54c627;return sdkRequest(_0x2a3d1a,_0x57372a=>_0x57372a[_0x24acb7(0x29a)][_0x24acb7(0x1d9)](_0x5845a8));}export async function updateRuntimeArtifact(_0x53ee13,_0x15403f,_0x2593be){const _0x4172ec=a108_0x54c627;return sdkRequest(_0x15403f,_0x36f066=>_0x36f066[_0x4172ec(0x29a)][_0x4172ec(0x20b)](_0x53ee13,_0x2593be));}export async function listPersonalBffs(_0x7c78be){const _0x289f55=a108_0x54c627,_0x123696=await sdkRequest(_0x7c78be,_0x13dee6=>_0x13dee6['personal'][_0x289f55(0x1c1)][_0x289f55(0x1cd)]());return Array[_0x289f55(0x220)](_0x123696)?_0x123696:[];}export async function getPersonalBff(_0x1ff500,_0x36ada5){const _0xa369d4=a108_0x54c627,_0x39e815=await sdkRequest(_0x36ada5,_0x109f3b=>_0x109f3b['personal'][_0xa369d4(0x1c1)]['get'](_0x1ff500));if(!_0x39e815)throw CliErrors[_0xa369d4(0x234)](_0xa369d4(0x1e1)+_0x1ff500);return _0x39e815;}export async function createPersonalBff(_0xfaa3d4,_0x2c96be){const _0x2d077c=a108_0x54c627;return sdkRequest(_0xfaa3d4,_0x444af5=>_0x444af5[_0x2d077c(0x20e)][_0x2d077c(0x1c1)][_0x2d077c(0x1d9)](_0x2c96be));}export async function updatePersonalBff(_0x28d0e2,_0xc4071d,_0x174506){const _0x36749f=a108_0x54c627;return sdkRequest(_0xc4071d,_0x2c61e9=>_0x2c61e9[_0x36749f(0x20e)][_0x36749f(0x1c1)][_0x36749f(0x20b)](_0x28d0e2,_0x174506));}export async function executePersonalBff(_0x5ad701,_0xe2506d,_0x481953){const _0x433f8e=a108_0x54c627;return sdkRequest(_0xe2506d,_0x15d1f4=>_0x15d1f4['personal'][_0x433f8e(0x1c1)][_0x433f8e(0x1e7)]({'scriptId':_0x5ad701,'params':_0x481953}));}export async function listPersonalKnowledgeBaseItems(_0xfa5da1,_0x551cfd){return listPersonalKnowledge({'appCode':_0xfa5da1,'accessKey':_activeAK,'signal':_0x551cfd});}export async function getPersonalKnowledgeBaseItem(_0x15cf73,_0x4cfbdc,_0x498342){return getPersonalKnowledge({'appCode':_0x4cfbdc,'accessKey':_activeAK,'signal':_0x498342},_0x15cf73);}export async function createPersonalKnowledgeBaseItem(_0xb28d9,_0xd96013,_0x3311a4){return savePersonalKnowledge({'appCode':_0xb28d9,'accessKey':_activeAK,'signal':_0x3311a4},_0xd96013);}export async function updatePersonalKnowledgeBaseItem(_0x32ad26,_0x2b4394,_0x12d522,_0x5074a6){return savePersonalKnowledge({'appCode':_0x2b4394,'accessKey':_activeAK,'signal':_0x5074a6},_0x12d522,_0x32ad26);}export async function getRuntimeSkillByCode(_0x183dd9,_0x15f06e){const _0x557b73=a108_0x54c627,_0x57cd14=await skillHubJsonRequest(_0x557b73(0x23f)+encodeURIComponent(_0x183dd9)+'/'+encodeURIComponent(_0x15f06e),{'allowNotFound':!![]});return _0x57cd14?skillHubRuntimeDetailToRuntimeSkill(_0x57cd14):undefined;}export async function listRuntimeSkills(_0x3efdcd){const _0x5ca820=a108_0x54c627,_0x2a9ef1=await skillHubJsonRequest(_0x5ca820(0x2a8)+encodeURIComponent(_0x3efdcd['appCode'])+_0x5ca820(0x25c),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x3efdcd[_0x5ca820(0x1e6)],_0x2a9ef1,_0x3efdcd[_0x5ca820(0x24a)]??_0x5ca820(0x25a),_0x3efdcd[_0x5ca820(0x227)],_0x3efdcd['installableOnly']);}export async function listPersonalRuntimeSkills(_0x218b2f){const _0xcc2f20=a108_0x54c627;return(await listRuntimeSkills({'appCode':_0x218b2f,'scope':_0xcc2f20(0x20e)}))['personal'];}export async function listCompanyRuntimeSkills(_0x3639e9){const _0x55bf03=a108_0x54c627;return(await listRuntimeSkills({'appCode':_0x3639e9,'scope':_0x55bf03(0x250)}))[_0x55bf03(0x250)];}export async function listVisibleRuntimeSkills(_0x60f650){return(await listRuntimeSkills({'appCode':_0x60f650,'scope':'all'}))['effective'];}export async function createPersonalRuntimeSkill(_0x49c57a,_0x5f90a0,_0x43bf0f={}){const _0x3d9444=a108_0x54c627;return publishRuntimeSkill(_0x49c57a,_0x5f90a0,{'visibility':_0x3d9444(0x284),'confirmWarnings':_0x43bf0f[_0x3d9444(0x21b)]});}export async function updatePersonalRuntimeSkill(_0x122934,_0x4a3c02,_0x2978e8,_0x1a12c2={}){const _0x70b4a5=a108_0x54c627;return publishRuntimeSkill(_0x4a3c02,{..._0x2978e8,'skillCode':_0x2978e8[_0x70b4a5(0x214)]??_0x122934},{'visibility':_0x70b4a5(0x284),'confirmWarnings':_0x1a12c2[_0x70b4a5(0x21b)]});}export async function publishCompanyRuntimeSkill(_0x1a8d04,_0x23a374,_0x4e5f21={}){const _0x59e029=a108_0x54c627;return publishRuntimeSkill(_0x1a8d04,_0x23a374,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x4e5f21[_0x59e029(0x21b)]});}export async function validateRuntimeSkillPublish(_0x32dae,_0x514f37,_0x2e055f){const _0x3cc16a=a108_0x54c627,_0x1019bf=buildRuntimeSkillPublishForm(_0x514f37,_0x2e055f[_0x3cc16a(0x254)]),_0x10cfa2=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x32dae)+_0x3cc16a(0x25b),{'method':_0x3cc16a(0x275),'body':_0x1019bf});return assertJointDiagramAcknowledged(_0x514f37[_0x3cc16a(0x23c)],_0x10cfa2['diagramValidated'],'validation'),{'valid':_0x10cfa2['valid']===!![],'errors':Array[_0x3cc16a(0x220)](_0x10cfa2[_0x3cc16a(0x257)])?_0x10cfa2[_0x3cc16a(0x257)]:[],'warnings':Array[_0x3cc16a(0x220)](_0x10cfa2[_0x3cc16a(0x277)])?_0x10cfa2['warnings']:[],'resolvedSlug':_0x10cfa2[_0x3cc16a(0x258)],'resolvedVersion':_0x10cfa2[_0x3cc16a(0x26d)],'diagramValidated':_0x10cfa2['diagramValidated']===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x39e5a7,_0x350753,_0x4a6b05,_0x30e2f3,_0x5f8b96){const _0x5b2cff=a108_0x54c627;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x39e5a7,_0x350753,_0x4a6b05,'/validate'),{'method':_0x5b2cff(0x275),'query':{'scope':_0x30e2f3},'headers':{'Content-Type':_0x5b2cff(0x296)},'body':JSON['stringify'](_0x5f8b96)});}export async function putRuntimeSkillVersionDiagram(_0xcd210e,_0x244f4e,_0x19a6dc,_0x492ee1,_0x28cdeb){const _0x1c6b55=a108_0x54c627;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0xcd210e,_0x244f4e,_0x19a6dc),{'method':_0x1c6b55(0x235),'query':{'scope':_0x492ee1},'headers':{'Content-Type':'application/json'},'body':JSON[_0x1c6b55(0x286)](_0x28cdeb)});}export async function getRuntimeSkillVersionDiagram(_0x44903b,_0x588015,_0x378622,_0x45ecb6){const _0x58dd25=a108_0x54c627,_0x7a5e1e=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x44903b,_0x588015,_0x378622),{'query':{'scope':_0x45ecb6}});if(typeof _0x7a5e1e[_0x58dd25(0x1ec)]!==_0x58dd25(0x27b))throw CliErrors[_0x58dd25(0x1fd)](_0x58dd25(0x272));const _0x4b0482=_0x7a5e1e[_0x58dd25(0x1d6)];if(typeof _0x4b0482!==_0x58dd25(0x269)||!/^sha256:[0-9a-f]{64}$/[_0x58dd25(0x1f3)](_0x4b0482))throw CliErrors[_0x58dd25(0x1fd)](_0x58dd25(0x1ed),'SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.');const _0x365642=_0x7a5e1e['diagramRevision'];if(_0x7a5e1e['found']&&(!Number[_0x58dd25(0x20c)](_0x365642)||Number(_0x365642)<0x1))throw CliErrors[_0x58dd25(0x1fd)](_0x58dd25(0x21f));if(!_0x7a5e1e[_0x58dd25(0x1ec)]&&_0x365642!==undefined&&_0x365642!==null)throw CliErrors[_0x58dd25(0x1fd)](_0x58dd25(0x1e2));const _0x5444f7=_0x7a5e1e['found']?Number(_0x365642):null;return{..._0x7a5e1e,'sourceFingerprint':_0x4b0482,'diagramRevision':_0x5444f7,'expectedDiagramRevision':_0x5444f7??0x0};}export async function downloadRuntimeSkillPackage(_0xfacc2c,_0x31e676,_0x147400,_0x521141){const _0x31cb7=a108_0x54c627;void _0xfacc2c;const _0x302e65=_0x521141?'/api/cli/v1/skills/'+encodeURIComponent(_0x147400)+'/'+encodeURIComponent(_0x31e676)+_0x31cb7(0x2a6)+encodeURIComponent(_0x521141)+_0x31cb7(0x2a1):_0x31cb7(0x200)+encodeURIComponent(_0x147400)+'/'+encodeURIComponent(_0x31e676)+'/download';return skillHubBinaryRequest(_0x302e65);}async function publishRuntimeSkill(_0x4b431e,_0x1cb700,_0x129d84){const _0x188c3b=a108_0x54c627,_0x19bf09=buildRuntimeSkillPublishForm(_0x1cb700,_0x129d84[_0x188c3b(0x254)]),_0x28f6e2=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x4b431e)+_0x188c3b(0x1fb),{'method':_0x188c3b(0x275),'query':{'confirmWarnings':_0x129d84[_0x188c3b(0x21b)]===!![]?!![]:undefined},'body':_0x19bf09});return assertJointDiagramAcknowledged(_0x1cb700[_0x188c3b(0x23c)],_0x28f6e2[_0x188c3b(0x208)],_0x188c3b(0x285)),{'appCode':_0x28f6e2[_0x188c3b(0x274)]??_0x4b431e,'skillCode':_0x28f6e2[_0x188c3b(0x263)]??_0x1cb700[_0x188c3b(0x214)]??'','skillName':_0x1cb700['skillName']??_0x28f6e2[_0x188c3b(0x263)]??_0x1cb700[_0x188c3b(0x214)],'description':_0x1cb700['description'],'scope':skillHubVisibilityToScope(_0x28f6e2[_0x188c3b(0x254)]??_0x129d84[_0x188c3b(0x254)])??_0x188c3b(0x20e),'version':_0x28f6e2[_0x188c3b(0x252)]??_0x1cb700[_0x188c3b(0x252)],'tags':_0x1cb700[_0x188c3b(0x27a)],'content':_0x1cb700[_0x188c3b(0x228)],'diagramBound':_0x28f6e2[_0x188c3b(0x208)]===!![]};}function assertJointDiagramAcknowledged(_0x41143d,_0x27bf07,_0x48594f){const _0x22ccc7=a108_0x54c627;if(!_0x41143d||_0x27bf07===!![])return;throw CliErrors[_0x22ccc7(0x1fd)](_0x22ccc7(0x1ca)+_0x48594f+'.',_0x22ccc7(0x28c));}function buildRuntimeSkillPublishForm(_0x4dc470,_0x235853){const _0x40988c=a108_0x54c627,_0x599a48=new FormData();return _0x599a48[_0x40988c(0x25d)]('file',runtimeSkillPackageFile(_0x4dc470)),_0x4dc470[_0x40988c(0x1ef)]?.[_0x40988c(0x22b)]()&&_0x599a48['set']('displayName',_0x4dc470[_0x40988c(0x1ef)][_0x40988c(0x22b)]()),_0x599a48[_0x40988c(0x25d)](_0x40988c(0x254),_0x235853),_0x4dc470[_0x40988c(0x23c)]&&_0x599a48[_0x40988c(0x25d)](_0x40988c(0x23c),new Blob([JSON['stringify'](_0x4dc470[_0x40988c(0x23c)])],{'type':_0x40988c(0x296)})),_0x599a48;}function runtimeSkillVersionDiagramPath(_0x441cdd,_0x4ecbb4,_0x1ff2d9,_0x2a15a4=''){const _0x154f82=a108_0x54c627;return _0x154f82(0x200)+encodeURIComponent(_0x441cdd)+'/'+encodeURIComponent(_0x4ecbb4)+_0x154f82(0x2a6)+encodeURIComponent(_0x1ff2d9)+_0x154f82(0x238)+_0x2a15a4;}function runtimeSkillPackageFile(_0x59b5f7){const _0x150456=a108_0x54c627;if(!_0x59b5f7['packageBase64'])throw CliErrors[_0x150456(0x234)](_0x150456(0x290));const _0x27210d=Buffer[_0x150456(0x1e5)](_0x59b5f7['packageBase64'],_0x150456(0x1f1)),_0x2e8247=new Blob([_0x27210d],{'type':_0x150456(0x289)}),_0x3d878d=(_0x59b5f7[_0x150456(0x214)]||_0x150456(0x240))+_0x150456(0x23a);if(typeof File!==_0x150456(0x236))return new File([_0x2e8247],_0x3d878d,{'type':_0x150456(0x289)});return _0x2e8247;}function normalizeSkillHubRuntimeListResponse(_0x2d87cb,_0x2ce09f,_0x3643fa,_0x51c4f4,_0x2e5e22=![]){const _0x16ee03=a108_0x54c627,_0x40ecef=Array[_0x16ee03(0x220)](_0x2ce09f)?_0x2ce09f:Array['isArray'](_0x2ce09f?.[_0x16ee03(0x1dc)])?_0x2ce09f[_0x16ee03(0x1dc)]:[],_0x5b0b33=_0x51c4f4?.['trim'](),_0x563399=_0x40ecef[_0x16ee03(0x1ea)](_0x33de77=>!_0x5b0b33||_0x33de77['slug']===_0x5b0b33)[_0x16ee03(0x1ea)](_0x396b9c=>!_0x2e5e22||_0x396b9c['publishedVersion']?.[_0x16ee03(0x279)]==='PUBLISHED'&&Boolean(_0x396b9c['publishedVersion'][_0x16ee03(0x252)]?.[_0x16ee03(0x22b)]()))[_0x16ee03(0x218)](skillHubRuntimeItemToRuntimeSkill)[_0x16ee03(0x1ea)](_0x22e46f=>Boolean(_0x22e46f)),_0x2c8f1d=_0x563399[_0x16ee03(0x1ea)](_0x184704=>_0x184704[_0x16ee03(0x24a)]===_0x16ee03(0x20e)),_0x4aefdc=_0x563399[_0x16ee03(0x1ea)](_0x449271=>_0x449271[_0x16ee03(0x24a)]===_0x16ee03(0x250));return{'appCode':_0x2d87cb,'personal':_0x3643fa===_0x16ee03(0x250)?[]:_0x2c8f1d,'company':_0x3643fa===_0x16ee03(0x20e)?[]:_0x4aefdc,'effective':buildEffectiveRuntimeSkills(_0x2c8f1d,_0x4aefdc,_0x3643fa)};}function a108_0x4949(){const _0x1a4a62=['response','isJson','find','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','SkillHub\x20API\x20error:\x20','/publish','userList','apiError','2285136EXeykB','4124sQwQVJ','/api/cli/v1/skills/','/run','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','listNotificationChannels','permitList','approval','AbortError','getDatasetPermitList','diagramBound','tableName','importImage','update','isInteger','Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.','personal','entries','/validate','bytes','errorMsg','join','skillCode','object','recognize','kind','map','Invalid\x20notification\x20config\x20list\x20response.','services','confirmWarnings','updateRoleUserList','SQL\x20query\x20not\x20found:\x20','query','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','isArray','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','displayName','getResourceMenuList','appName','arrayBuffer','getRoleUserList','code','content','Request\x20timeout:\x20','example','trim','Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.','authRequired','665754JpclLM','cursor','isSafeInteger','retryAfter','Configure\x20accessKey\x20in\x20','markdown','validation','PUT','undefined','getPagePermit','/diagram','getDatasetPermitMeta','.zip','effective','diagram','getMenuPermitList','3570470ftNQJR','/api/v1/skills/','skill','Runtime\x20SDK\x20request\x20failed.','].userList','applyUserList','4095iCEpZi','Toolbox\x20API\x20error:\x20','app','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','type','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','scope','success','error','functionName','transfer','Invalid\x20import\x20task\x20readback\x20response.','company','roleName','version','Invalid\x20runtime\x20role\x20members\x20response:\x20','visibility','Toolbox\x20error\x20code:\x20','saveMenuPermits','errors','resolvedSlug','headlineVersion','all','/publish/validate','/skills','set','myApps','Download\x20failed:\x20','newConfigFileName','toString','sql','slug','GET','data','description','getTask','permit','string','18nVCAFB','/api/node-toolbox/','ownerPreviewVersion','resolvedVersion','datasetMeta','max','records','SQL\x20metadata\x20requires\x20Client\x20AK.','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','text','namespace','POST','ocr','warnings','client-ak','status','tags','boolean','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','function',']\x20must\x20be\x20an\x20object.','Artifact\x20not\x20found:\x20id=','api','msg','].userId\x20is\x20invalid.','18UQtcPS','PRIVATE','publish','stringify','378631jsaqpT','createRole','application/zip','file','API\x20error\x20code:\x20','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','toLowerCase','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','getRoleList','Missing\x20Skill\x20package\x20payload.','savePagePermit','number','getConfigByKey','saveDatasetPermits','errorCode','application/json','gmtModified','importBatch','NAMESPACE_ONLY','artifact','replace','sqlCode','summary','tableData','/schedules','contentHash','/download','application/octet-stream','Dataset\x20import\x20requires\x20Client\x20AK.','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','getRolePermitList','/versions/','importReadback','/api/runtime/v1/namespaces/','signal','limit','bff','API\x20error:\x20','DELETE','upload','loginUserInfo','getEndpoint','SkillHub\x20error\x20code:\x20','deleteRole','importImageReadback','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','api-doc-generator','message','list','Invalid\x20approval\x20task\x20detail\x20response.','roleList[','abort','min','searchParams','importContract','invokeSource','size','sourceFingerprint','606921BhoIvW','get','create','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','CUSTOM','items','functions','getModel','queryUrl','image','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','updateRole','14964JQnWGf','from','appCode','execute','364zsmuOD',',\x20name=','filter','Toolbox\x20API\x20error','found','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','/client/user-accounts/bind','skillName','name','base64','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','test','12wegtxm','harness'];a108_0x4949=function(){return _0x1a4a62;};return a108_0x4949();}function skillHubRuntimeItemToRuntimeSkill(_0x39810d){const _0x84a726=a108_0x54c627,_0xb39944=_0x39810d['slug']?.[_0x84a726(0x22b)](),_0x4170a1=skillHubVisibilityToScope(_0x39810d[_0x84a726(0x254)]);if(!_0xb39944||!_0x4170a1)return undefined;return{'id':_0x39810d['id'],'appCode':_0x39810d[_0x84a726(0x274)],'skillCode':_0xb39944,'skillName':_0x39810d[_0x84a726(0x222)]??_0xb39944,'description':_0x39810d[_0x84a726(0x29d)],'example':_0x39810d[_0x84a726(0x22a)],'scope':_0x4170a1,'version':skillHubRuntimeItemVersion(_0x39810d),'status':_0x39810d[_0x84a726(0x279)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x2ce3f6){const _0x124fc9=a108_0x54c627,_0x26cd34=_0x2ce3f6[_0x124fc9(0x263)]?.['trim']();if(!_0x26cd34)return undefined;return{'id':_0x2ce3f6['id'],'appCode':_0x2ce3f6[_0x124fc9(0x274)],'skillCode':_0x26cd34,'skillName':_0x2ce3f6[_0x124fc9(0x222)]??_0x26cd34,'description':_0x2ce3f6['summary'],'example':_0x2ce3f6['example'],'scope':skillHubVisibilityToScope(_0x2ce3f6[_0x124fc9(0x254)])??_0x2ce3f6['visibility']?.[_0x124fc9(0x28d)](),'version':skillHubRuntimeItemVersion(_0x2ce3f6),'status':_0x2ce3f6['status']};}function skillHubVisibilityToScope(_0x33b6d2){const _0x3fe9e6=a108_0x54c627;if(_0x33b6d2==='PRIVATE')return _0x3fe9e6(0x20e);if(_0x33b6d2===_0x3fe9e6(0x299))return _0x3fe9e6(0x250);return undefined;}function skillHubRuntimeItemVersion(_0x59c41c){const _0x90b185=a108_0x54c627;return _0x59c41c['publishedVersion']?.[_0x90b185(0x252)]??_0x59c41c[_0x90b185(0x259)]?.['version']??_0x59c41c[_0x90b185(0x26c)]?.[_0x90b185(0x252)];}function buildEffectiveRuntimeSkills(_0x8c84f5,_0x490844,_0x279236){const _0x241ffd=a108_0x54c627;if(_0x279236===_0x241ffd(0x20e))return _0x8c84f5;if(_0x279236===_0x241ffd(0x250))return _0x490844;const _0x2d4a82=new Map();for(const _0x56fc1c of _0x490844){_0x2d4a82['set'](_0x56fc1c['skillCode'],_0x56fc1c);}for(const _0x575045 of _0x8c84f5){_0x2d4a82[_0x241ffd(0x25d)](_0x575045[_0x241ffd(0x214)],_0x575045);}return Array[_0x241ffd(0x1e5)](_0x2d4a82['values']());}function normalizeRuntimeSkillListResponse(_0x4f53d1,_0x28c56c){const _0x1deeb9=a108_0x54c627;if(Array[_0x1deeb9(0x220)](_0x28c56c)){const _0xc2fa61=_0x28c56c['filter'](_0x59b65b=>_0x59b65b[_0x1deeb9(0x24a)]===_0x1deeb9(0x20e)),_0x108a25=_0x28c56c[_0x1deeb9(0x1ea)](_0x285e19=>_0x285e19['scope']==='company');return{'appCode':_0x4f53d1,'personal':_0xc2fa61,'company':_0x108a25,'effective':[..._0x108a25,..._0xc2fa61]};}return{'appCode':_0x28c56c?.[_0x1deeb9(0x1e6)]??_0x4f53d1,'personal':Array['isArray'](_0x28c56c?.[_0x1deeb9(0x20e)])?_0x28c56c[_0x1deeb9(0x20e)]:[],'company':Array[_0x1deeb9(0x220)](_0x28c56c?.[_0x1deeb9(0x250)])?_0x28c56c['company']:[],'effective':Array['isArray'](_0x28c56c?.[_0x1deeb9(0x23b)])?_0x28c56c[_0x1deeb9(0x23b)]:[]};}function normalizeRuntimeRoleUserList(_0x4d76d8,_0x397a6f){const _0x108780=a108_0x54c627;if(!Array[_0x108780(0x220)](_0x4d76d8))throw CliErrors[_0x108780(0x1fd)](_0x108780(0x253)+_0x397a6f+'\x20must\x20be\x20an\x20array.');return _0x4d76d8[_0x108780(0x218)]((_0x1e4ac7,_0xd03c91)=>{const _0x278a72=_0x108780;if(!_0x1e4ac7||typeof _0x1e4ac7!==_0x278a72(0x215)||Array[_0x278a72(0x220)](_0x1e4ac7))throw CliErrors[_0x278a72(0x1fd)](_0x278a72(0x253)+_0x397a6f+'['+_0xd03c91+_0x278a72(0x27e));const _0x5dcba9=_0x1e4ac7,_0xcf6622=normalizeRuntimeUserId(_0x5dcba9['userId']);if(_0xcf6622===undefined)throw CliErrors[_0x278a72(0x1fd)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x397a6f+'['+_0xd03c91+_0x278a72(0x282));return{..._0x5dcba9,'userId':_0xcf6622};});}function normalizeRuntimeRoleUsersResponse(_0xdd77b){return extractList(_0xdd77b)['map']((_0x5c17c5,_0x8bdf05)=>{const _0x4ccd18=a108_0x3489;if(!_0x5c17c5||typeof _0x5c17c5!==_0x4ccd18(0x215)||Array[_0x4ccd18(0x220)](_0x5c17c5))throw CliErrors[_0x4ccd18(0x1fd)](_0x4ccd18(0x202)+_0x8bdf05+_0x4ccd18(0x27e));const _0x4fcb5c=_0x5c17c5;return{..._0x4fcb5c,'userList':normalizeRuntimeRoleUserList(_0x4fcb5c[_0x4ccd18(0x1fc)],'roleList['+_0x8bdf05+_0x4ccd18(0x242)),..._0x4fcb5c['applyUserList']===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x4fcb5c[_0x4ccd18(0x243)],_0x4ccd18(0x1cf)+_0x8bdf05+'].applyUserList')}};});}export async function listRuntimeAppRoles(_0x3fb2fc,_0x1d9cb4={}){const _0x3b4eff=a108_0x54c627,_0x20f9fe=_0x1d9cb4['currentPage']??0x1,_0xccba77=Math[_0x3b4eff(0x1d1)](Math[_0x3b4eff(0x26f)](_0x1d9cb4['pageSize']??0x64,0x1),0x64),_0x3ea8d4=await sdkRequest(_0x3fb2fc,_0x5ac13f=>_0x5ac13f['permit'][_0x3b4eff(0x28f)]({..._0x1d9cb4[_0x3b4eff(0x251)]?{'roleName':_0x1d9cb4[_0x3b4eff(0x251)]}:{},'currentPage':_0x20f9fe,'pageSize':_0xccba77}));return{'items':extractList(_0x3ea8d4),'paging':extractPaging(_0x3ea8d4)};}export async function createRuntimeAppRole(_0x27a093){const _0x45fb46=a108_0x54c627;return sdkRequest(_0x27a093[_0x45fb46(0x1e6)],_0x7205c7=>_0x7205c7['permit'][_0x45fb46(0x288)]({'roleType':_0x45fb46(0x1db),..._0x27a093}));}export async function updateRuntimeAppRole(_0x1dc2bd){const _0x2ffb65=a108_0x54c627;return sdkRequest(_0x1dc2bd['appCode'],_0x5b2690=>_0x5b2690[_0x2ffb65(0x268)][_0x2ffb65(0x1e3)](_0x1dc2bd));}export async function deleteRuntimeAppRole(_0x321397){const _0x4fafbb=a108_0x54c627;return sdkRequest(undefined,_0x4d5119=>_0x4d5119['permit'][_0x4fafbb(0x1c8)](_0x321397));}export async function listRuntimeRoleUsers(_0x1559e4){const _0x1a967e=a108_0x54c627,_0x321859=await sdkRequest(_0x1559e4,_0x2884ff=>_0x2884ff[_0x1a967e(0x268)][_0x1a967e(0x226)]());return normalizeRuntimeRoleUsersResponse(_0x321859);}export async function updateRuntimeRoleUsers(_0x415d0b,_0x576fca){const _0xfc26f6=a108_0x54c627;return sdkRequest(_0x415d0b,_0x23ed25=>_0x23ed25['permit'][_0xfc26f6(0x21c)]({'roleList':_0x576fca}));}export async function listRuntimeAppUsers(_0x28d38c){const _0x47ee75=await sdkRequest(_0x28d38c,_0x14d364=>_0x14d364['permit']['queryAppUsers']());return extractList(_0x47ee75);}export async function listRuntimePermitRoles(_0x26d28d,_0x4c78a5={}){const _0x15ddc4=a108_0x54c627,_0x58ec1e=await sdkRequest(_0x26d28d,_0x4bebdb=>_0x4bebdb[_0x15ddc4(0x268)][_0x15ddc4(0x2a5)](_0x4c78a5));return extractList(_0x58ec1e);}export async function getRuntimePagePermit(_0x379f53){const _0x598fad=a108_0x54c627;return sdkRequest(undefined,_0x72ab37=>_0x72ab37[_0x598fad(0x268)][_0x598fad(0x237)](_0x379f53));}export async function saveRuntimePagePermit(_0x120907){const _0x1f4cd8=a108_0x54c627;return sdkRequest(_0x120907[_0x1f4cd8(0x1e6)],_0x546192=>_0x546192['permit'][_0x1f4cd8(0x291)](_0x120907));}export async function getRuntimeRoleMenuResources(_0x3f2931,_0x46f7ae){const _0x253998=a108_0x54c627,_0x54c693=await sdkRequest(_0x3f2931,_0x15095f=>_0x15095f[_0x253998(0x268)][_0x253998(0x223)]({'roleId':_0x46f7ae}));return extractList(_0x54c693);}export async function listRuntimeMenuRolePermits(_0x27f9f0){const _0x114a2c=a108_0x54c627,_0x2ac305=await sdkRequest(_0x27f9f0,_0x1f86ca=>_0x1f86ca[_0x114a2c(0x268)][_0x114a2c(0x23d)]());return Array['isArray'](_0x2ac305?.[_0x114a2c(0x204)])?_0x2ac305[_0x114a2c(0x204)]:[];}export async function saveRuntimeMenuRolePermits(_0x2d12a0,_0x547bfc){const _0x1dd18c=a108_0x54c627;return sdkRequest(_0x2d12a0,_0x5d3098=>_0x5d3098[_0x1dd18c(0x268)][_0x1dd18c(0x256)]({'permitList':_0x547bfc}));}export async function listRuntimeDatasetPermits(_0x37c0d9,_0xee1e2b){const _0x418cad=a108_0x54c627,_0x3fb707=await sdkRequest(_0x37c0d9,_0x207c5a=>_0x207c5a['permit'][_0x418cad(0x207)](_0xee1e2b));return Array[_0x418cad(0x220)](_0x3fb707?.[_0x418cad(0x204)])?_0x3fb707[_0x418cad(0x204)]:[];}export async function listRuntimeDatasetRolePermits(_0xa431c5){const _0x3c18e7=a108_0x54c627,_0x3f8783=await sdkRequest(_0xa431c5,_0x5aca9d=>_0x5aca9d[_0x3c18e7(0x268)][_0x3c18e7(0x239)]());return Array[_0x3c18e7(0x220)](_0x3f8783?.['permitList'])?_0x3f8783[_0x3c18e7(0x204)]:[];}export async function saveRuntimeDatasetRolePermits(_0x9993f2,_0x11c585){const _0x595948=a108_0x54c627;return sdkRequest(_0x9993f2,_0x22e1b9=>_0x22e1b9[_0x595948(0x268)][_0x595948(0x294)]({'permitList':_0x11c585}));}
|
|
1
|
+
const a108_0x29635e=a108_0x4862;(function(_0x1db462,_0x31dccf){const _0x30f0f7=a108_0x4862,_0x29af9f=_0x1db462();while(!![]){try{const _0x539cd3=-parseInt(_0x30f0f7(0x9a))/0x1*(-parseInt(_0x30f0f7(0xcc))/0x2)+-parseInt(_0x30f0f7(0xed))/0x3+parseInt(_0x30f0f7(0xe2))/0x4+parseInt(_0x30f0f7(0xa7))/0x5*(-parseInt(_0x30f0f7(0xd7))/0x6)+parseInt(_0x30f0f7(0xd0))/0x7*(parseInt(_0x30f0f7(0x112))/0x8)+parseInt(_0x30f0f7(0x11e))/0x9*(-parseInt(_0x30f0f7(0xe5))/0xa)+-parseInt(_0x30f0f7(0x137))/0xb*(-parseInt(_0x30f0f7(0xd6))/0xc);if(_0x539cd3===_0x31dccf)break;else _0x29af9f['push'](_0x29af9f['shift']());}catch(_0x2bfaf2){_0x29af9f['push'](_0x29af9f['shift']());}}}(a108_0x19aa,0xda2a0));import{ClientAkModel}from'@lovrabet/sdk';import{getSdkClient,getIdentitySdkClient,clearSdkClient}from'../core/sdk-client.js';import{getEnv}from'../constant/env.js';import{readFile}from'node:fs/promises';import{getPersonalKnowledge,listPersonalKnowledge,savePersonalKnowledge}from'../core/kb-management-client.js';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain,requireHarnessDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliError,CliErrors}from'../errors.js';import{createAccessError,readApiErrorCode}from'../framework/access-error.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{normalizeRuntimeUserId}from'../utils/runtime-user-id.js';let _activeAK;export function setActiveAK(_0x431c46){if(_activeAK!==(_0x431c46||undefined))clearSdkClient();_activeAK=_0x431c46||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x4947ed,_0x37a693){const _0x4dd18d=a108_0x4862;if(!_activeAK)throw CliErrors[_0x4dd18d(0xe9)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4dd18d(0x120)]+'.');const _0x465fa3=_0x4947ed?getSdkClient({'appCode':_0x4947ed,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':_0x4dd18d(0x10a),'accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x37a693(_0x465fa3));}async function identitySdkRequest(_0x1a5f35){const _0x40c2e6=a108_0x4862,_0x4d9a7c=_activeAK;if(!_0x4d9a7c)throw CliErrors[_0x40c2e6(0xe9)](_0x40c2e6(0x9d)+PRODUCT_CONFIG[_0x40c2e6(0x120)]+'.');return withSdkErrors(()=>_0x1a5f35(getIdentitySdkClient(_0x4d9a7c,getRuntimeDomain())));}async function withSdkErrors(_0x4d4ee5){const _0x26801e=a108_0x4862;try{return await _0x4d4ee5();}catch(_0x2a6bc3){if(_0x2a6bc3 instanceof CliError)throw _0x2a6bc3;if(!_0x2a6bc3||typeof _0x2a6bc3!=='object')throw _0x2a6bc3;const _0x2ffe68=_0x2a6bc3,_0x37c682=_0x2ffe68['response']&&typeof _0x2ffe68[_0x26801e(0xfd)]===_0x26801e(0x100)?_0x2ffe68['response']:{},_0x337731=firstString(_0x37c682[_0x26801e(0x12c)],_0x37c682[_0x26801e(0xcd)],_0x37c682[_0x26801e(0xa2)],_0x2ffe68[_0x26801e(0xcd)]),_0x59b8b9=createRateLimitError({'status':[_0x2ffe68['status'],_0x37c682[_0x26801e(0x163)],_0x37c682['code']]['find'](_0x4b9a9b=>Number(_0x4b9a9b)===0x1ad)??_0x2ffe68[_0x26801e(0x163)],'errorCode':firstString(_0x37c682[_0x26801e(0x110)],typeof _0x37c682[_0x26801e(0x105)]===_0x26801e(0x126)?_0x37c682[_0x26801e(0x105)]:undefined,_0x2ffe68[_0x26801e(0x105)]),'message':_0x337731,'retryAfter':_0x2ffe68['retryAfter']??readRetryAfterSeconds(_0x2ffe68[_0x26801e(0xfd)])});if(_0x59b8b9)throw _0x59b8b9;const _0x3f956c=createAccessError(_0x2ffe68['response'],_0x2ffe68[_0x26801e(0x105)]);if(_0x3f956c)throw _0x3f956c;throw CliErrors[_0x26801e(0x101)](_0x337731||'Runtime\x20SDK\x20request\x20failed.',_0x2ffe68['code']?_0x26801e(0x124)+_0x2ffe68['code']:undefined);}}function firstString(..._0x22bf96){const _0xf93200=a108_0x4862;for(const _0x595f04 of _0x22bf96){if(typeof _0x595f04===_0xf93200(0x126)&&_0x595f04[_0xf93200(0x113)]())return _0x595f04['trim']();}return undefined;}async function decodeResponseBody(_0x11397a){const _0xcde849=a108_0x4862;if(typeof _0x11397a['text']==='function')try{const _0x54fa8f=await _0x11397a[_0xcde849(0x8f)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x54fa8f),'text':_0x54fa8f};}catch{return{'isJson':![],'text':_0x54fa8f[_0xcde849(0x113)]()||undefined};}}catch(_0x2f0bb1){if(_0x2f0bb1 instanceof Error&&_0x2f0bb1[_0xcde849(0xdc)]==='AbortError')throw _0x2f0bb1;}try{return{'isJson':!![],'data':await _0x11397a[_0xcde849(0xee)]()};}catch(_0x5ad7c7){if(_0x5ad7c7 instanceof Error&&_0x5ad7c7[_0xcde849(0xdc)]===_0xcde849(0x12b))throw _0x5ad7c7;return{'isJson':![]};}}function throwIfRateLimited(_0x548ee5,_0x5625c2,_0x91a76c){const _0x1a5333=a108_0x4862,_0x2f5522=_0x5625c2&&typeof _0x5625c2==='object'?_0x5625c2:{},_0x44ad1e=[_0x2f5522['status'],_0x2f5522[_0x1a5333(0x105)]][_0x1a5333(0x9e)](_0x22eac8=>Number(_0x22eac8)===0x1ad),_0x548f90=createRateLimitError({'status':_0x548ee5[_0x1a5333(0x163)]===0x1ad?_0x548ee5['status']:_0x44ad1e??_0x548ee5[_0x1a5333(0x163)],'errorCode':firstString(_0x2f5522[_0x1a5333(0x110)],typeof _0x2f5522[_0x1a5333(0x105)]==='string'?_0x2f5522['code']:undefined),'message':firstString(_0x2f5522[_0x1a5333(0x12c)],_0x2f5522['message'],_0x2f5522[_0x1a5333(0xa2)],_0x91a76c),'retryAfter':readRetryAfter(_0x548ee5['headers'])??readRetryAfterSeconds(_0x5625c2)});if(_0x548f90)throw _0x548f90;}async function apiRequest(_0x952e67,_0x405b14={}){const _0x363d35=a108_0x4862,{method:method=_0x363d35(0x15b),body:_0x3a6d26,headers:headers={},timeout:timeout=0x7530,domain:domain='runtime',rejectRedirects:rejectRedirects=![]}=_0x405b14,_0x3f01c1=_activeAK,_0x555b74=domain==='harness'?requireHarnessDomain():domain===_0x363d35(0xf2)?getApiDomain():getRuntimeDomain();if(!_0x3f01c1)throw CliErrors[_0x363d35(0xe9)](_0x363d35(0x9d)+PRODUCT_CONFIG[_0x363d35(0x120)]+'.');const _0x23cfc3=''+_0x555b74+_0x952e67,_0x3e704f={'X-User-AK':_0x3f01c1},_0x48494c=new AbortController(),_0x16e500=setTimeout(()=>_0x48494c['abort'](),timeout);try{const _0x28eb36=await fetch(_0x23cfc3,{'method':method,...rejectRedirects?{'redirect':_0x363d35(0xab)}:{},'headers':{'Content-Type':_0x363d35(0xca),'X-Invoke-Source':PRODUCT_CONFIG[_0x363d35(0xa8)],..._0x3e704f,...headers},'body':_0x3a6d26?JSON[_0x363d35(0xc6)](_0x3a6d26):undefined,'signal':_0x48494c['signal']});return await readApiResponse(_0x28eb36);}catch(_0x5c853c){if(_0x5c853c instanceof Error&&_0x5c853c[_0x363d35(0xdc)]===_0x363d35(0x12b))throw CliErrors[_0x363d35(0x101)](_0x363d35(0x14d)+_0x23cfc3);throw _0x5c853c;}finally{clearTimeout(_0x16e500);}}async function readApiResponse(_0x18bb94){const _0x435236=a108_0x4862,_0x1b2c7d=await decodeResponseBody(_0x18bb94);if(!_0x1b2c7d['isJson']){throwIfRateLimited(_0x18bb94,undefined,_0x1b2c7d[_0x435236(0x8f)]);throw CliErrors['apiError'](_0x435236(0x143)+_0x18bb94['status']+')',_0x18bb94['status']>=0x190?_0x435236(0xe6):undefined);}const _0x1467cd=_0x1b2c7d[_0x435236(0x14a)];throwIfRateLimited(_0x18bb94,_0x1467cd);if(!_0x18bb94['ok']||_0x1467cd[_0x435236(0x119)]===![]){const _0x3edd06=createAccessError(_0x1467cd);if(_0x3edd06)throw _0x3edd06;throw CliErrors[_0x435236(0x101)](_0x1467cd[_0x435236(0x12c)]||_0x1467cd[_0x435236(0xcd)]||_0x1467cd[_0x435236(0xa2)]||_0x435236(0xb3)+_0x18bb94[_0x435236(0x163)],readApiErrorCode(_0x1467cd)?_0x435236(0x124)+readApiErrorCode(_0x1467cd):undefined);}return _0x1467cd;}async function apiBinaryRequest(_0x20aac2,_0x4c3685={}){const _0x46de19=a108_0x4862,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x4c3685,_0x1e12d6=_activeAK,_0x36cf42=getRuntimeDomain();if(!_0x1e12d6)throw CliErrors[_0x46de19(0xe9)](_0x46de19(0x9d)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x221837=''+_0x36cf42+_0x20aac2,_0x3255af=new AbortController(),_0x5329ad=setTimeout(()=>_0x3255af[_0x46de19(0xe3)](),timeout);try{const _0x5017b8=await fetch(_0x221837,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x46de19(0xa8)],'X-User-AK':_0x1e12d6,...headers},'signal':_0x3255af['signal']});if(!_0x5017b8['ok']){const _0x522180=await decodeResponseBody(_0x5017b8),_0x49559e=_0x522180['data']&&typeof _0x522180[_0x46de19(0x14a)]===_0x46de19(0x100)?_0x522180[_0x46de19(0x14a)]:{},_0x339aa2=firstString(_0x49559e[_0x46de19(0x12c)],_0x49559e[_0x46de19(0xcd)],_0x49559e[_0x46de19(0x110)],_0x522180['text']);throwIfRateLimited(_0x5017b8,_0x522180[_0x46de19(0x14a)],_0x339aa2);const _0x163eee=createAccessError(_0x522180[_0x46de19(0x14a)]);if(_0x163eee)throw _0x163eee;throw CliErrors['apiError'](_0x339aa2||_0x46de19(0xb3)+_0x5017b8[_0x46de19(0x163)],_0x46de19(0xb6)+_0x221837);}return Buffer[_0x46de19(0xe7)](await _0x5017b8[_0x46de19(0x11c)]());}catch(_0x33707c){if(_0x33707c instanceof Error&&_0x33707c[_0x46de19(0xdc)]===_0x46de19(0x12b))throw CliErrors[_0x46de19(0x101)](_0x46de19(0x14d)+_0x221837);throw _0x33707c;}finally{clearTimeout(_0x5329ad);}}async function toolboxRequest(_0x578d5e,_0x1027d3,_0x33b5f3={}){const _0x2b94b2=a108_0x4862,{method:method=_0x2b94b2(0x15b),headers:headers={},timeout:timeout=0x7530}=_0x33b5f3,_0xfd6a75=_activeAK;if(!_0xfd6a75)throw CliErrors[_0x2b94b2(0xe9)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2b94b2(0x120)]+'.');const _0x247539=getApiDomain()[_0x2b94b2(0x156)](/\/$/,''),_0x4326cb=new URL(_0x578d5e,_0x247539+_0x2b94b2(0xc0));if(_0x1027d3)for(const [_0xedfac5,_0x4f3c22]of Object[_0x2b94b2(0x99)](_0x1027d3)){_0x4f3c22!==undefined&&_0x4f3c22!==null&&_0x4326cb[_0x2b94b2(0x9f)][_0x2b94b2(0x15e)](_0xedfac5,String(_0x4f3c22));}const _0x1fd66d=new AbortController(),_0xb8b155=setTimeout(()=>_0x1fd66d['abort'](),timeout);try{const _0x5b2a31=await fetch(_0x4326cb,{'method':method,'headers':{'Content-Type':_0x2b94b2(0xca),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0xfd6a75,...headers},'signal':_0x1fd66d[_0x2b94b2(0x168)]}),_0x3df564=await decodeResponseBody(_0x5b2a31);if(!_0x3df564['isJson']){throwIfRateLimited(_0x5b2a31,undefined,_0x3df564['text']);throw CliErrors['apiError'](_0x2b94b2(0xa6)+_0x5b2a31[_0x2b94b2(0x163)]+')',_0x5b2a31[_0x2b94b2(0x163)]>=0x190?_0x2b94b2(0xe6):undefined);}const _0x8f615d=_0x3df564['data'];throwIfRateLimited(_0x5b2a31,_0x8f615d);if(!_0x5b2a31['ok']){const _0x261a32=_0x8f615d&&typeof _0x8f615d==='object'?_0x8f615d:{};throw CliErrors[_0x2b94b2(0x101)](_0x261a32['errorMsg']||_0x261a32['message']||_0x2b94b2(0x14b)+_0x5b2a31[_0x2b94b2(0x163)],_0x261a32[_0x2b94b2(0x110)]?_0x2b94b2(0xfc)+_0x261a32[_0x2b94b2(0x110)]:undefined);}if(_0x8f615d&&typeof _0x8f615d===_0x2b94b2(0x100)&&_0x2b94b2(0x119)in _0x8f615d&&typeof _0x8f615d[_0x2b94b2(0x119)]===_0x2b94b2(0xc3)){const _0x2cefdc=_0x8f615d;if(!_0x2cefdc[_0x2b94b2(0x119)])throw CliErrors[_0x2b94b2(0x101)](_0x2cefdc['errorMsg']||_0x2cefdc[_0x2b94b2(0xcd)]||_0x2b94b2(0xbb),_0x2cefdc['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x2cefdc[_0x2b94b2(0x110)]:undefined);return _0x2cefdc[_0x2b94b2(0x14a)];}return _0x8f615d;}catch(_0x2f2369){if(_0x2f2369 instanceof Error&&_0x2f2369[_0x2b94b2(0xdc)]===_0x2b94b2(0x12b))throw CliErrors[_0x2b94b2(0x101)](_0x2b94b2(0x14d)+_0x4326cb['toString']());throw _0x2f2369;}finally{clearTimeout(_0xb8b155);}}async function skillHubJsonRequest(_0x5c425f,_0x4ddc40={}){const _0x44f424=a108_0x4862,{method:method='GET',query:_0xc8b97f,body:_0x38f7b1,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x4ddc40,_0x516648=_activeAK;if(!_0x516648)throw CliErrors[_0x44f424(0xe9)](_0x44f424(0x9d)+PRODUCT_CONFIG[_0x44f424(0x120)]+'.');const _0x3dbcb7=getSkillDomain()['replace'](/\/$/,''),_0x50224b=new URL(_0x5c425f,_0x3dbcb7+'/');if(_0xc8b97f)for(const [_0x5068d5,_0x5e693b]of Object[_0x44f424(0x99)](_0xc8b97f)){_0x5e693b!==undefined&&_0x5e693b!==null&&_0x50224b['searchParams'][_0x44f424(0x15e)](_0x5068d5,String(_0x5e693b));}const _0x190193=new AbortController(),_0x5608e2=setTimeout(()=>_0x190193[_0x44f424(0xe3)](),timeout);try{const _0x5142f3=await fetch(_0x50224b['toString'](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x44f424(0xa8)],'X-User-AK':_0x516648,...headers},'body':_0x38f7b1,'signal':_0x190193[_0x44f424(0x168)]}),_0x836bd7=await decodeResponseBody(_0x5142f3);if(!_0x836bd7[_0x44f424(0xac)]){if(allowNotFound&&_0x5142f3['status']===0x194)return undefined;throwIfRateLimited(_0x5142f3,undefined,_0x836bd7[_0x44f424(0x8f)]);throw CliErrors[_0x44f424(0x101)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5142f3[_0x44f424(0x163)]+')',_0x5142f3[_0x44f424(0x163)]>=0x190?_0x44f424(0xe6):undefined);}const _0x2766ef=_0x836bd7[_0x44f424(0x14a)];throwIfRateLimited(_0x5142f3,_0x2766ef);if(allowNotFound&&isSkillHubNotFoundResponse(_0x5142f3[_0x44f424(0x163)],_0x2766ef))return undefined;const _0x33a2e4=!_0x5142f3['ok']||_0x2766ef?.[_0x44f424(0x119)]===![]||typeof _0x2766ef?.[_0x44f424(0x105)]===_0x44f424(0x103)&&_0x2766ef['code']>=0x190;if(_0x33a2e4)throw CliErrors[_0x44f424(0x101)](_0x2766ef?.[_0x44f424(0x12c)]||_0x2766ef?.[_0x44f424(0xcd)]||_0x2766ef?.['msg']||'SkillHub\x20API\x20error:\x20'+_0x5142f3[_0x44f424(0x163)],_0x2766ef?.[_0x44f424(0x110)]?_0x44f424(0xc5)+_0x2766ef['errorCode']:undefined);return _0x2766ef?.[_0x44f424(0x14a)]??_0x2766ef;}catch(_0x25690e){if(_0x25690e instanceof Error&&_0x25690e[_0x44f424(0xdc)]===_0x44f424(0x12b))throw CliErrors['apiError'](_0x44f424(0x14d)+_0x50224b[_0x44f424(0x152)]());throw _0x25690e;}finally{clearTimeout(_0x5608e2);}}function isSkillHubNotFoundResponse(_0x30c04e,_0x457d2d){const _0x5ca02b=a108_0x4862;if(_0x30c04e===0x194||_0x457d2d?.['code']===0x194)return!![];if(_0x30c04e!==0x190&&_0x457d2d?.['code']!==0x190)return![];const _0x2e9df9=[_0x457d2d?.['msg'],_0x457d2d?.[_0x5ca02b(0xcd)],_0x457d2d?.['errorMsg'],_0x457d2d?.['error']][_0x5ca02b(0x102)](_0x587a0c=>typeof _0x587a0c===_0x5ca02b(0x126))[_0x5ca02b(0xfa)]('\x20');return/skill not found\b/i['test'](_0x2e9df9);}async function skillHubBinaryRequest(_0x2b398e,_0x56f636={}){const _0x1364c9=a108_0x4862,{query:_0x5bf301,headers:headers={},timeout:timeout=0x7530}=_0x56f636,_0x276f84=_activeAK;if(!_0x276f84)throw CliErrors[_0x1364c9(0xe9)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1364c9(0x120)]+'.');const _0x231a74=getSkillDomain()[_0x1364c9(0x156)](/\/$/,''),_0x44c6e5=new URL(_0x2b398e,_0x231a74+'/');if(_0x5bf301)for(const [_0x51837b,_0x50f8aa]of Object['entries'](_0x5bf301)){_0x50f8aa!==undefined&&_0x50f8aa!==null&&_0x44c6e5['searchParams'][_0x1364c9(0x15e)](_0x51837b,String(_0x50f8aa));}const _0x372a9a=new AbortController(),_0x55d725=setTimeout(()=>_0x372a9a['abort'](),timeout);try{const _0x538bdc=await fetch(_0x44c6e5['toString'](),{'method':_0x1364c9(0x15b),'headers':{'Accept':_0x1364c9(0x116),'X-Invoke-Source':PRODUCT_CONFIG[_0x1364c9(0xa8)],'X-User-AK':_0x276f84,...headers},'signal':_0x372a9a[_0x1364c9(0x168)]});if(!_0x538bdc['ok']){const _0x376461=await decodeResponseBody(_0x538bdc),_0xc4b847=_0x376461['data']&&typeof _0x376461[_0x1364c9(0x14a)]===_0x1364c9(0x100)?_0x376461[_0x1364c9(0x14a)]:{},_0x2cec57=firstString(_0xc4b847[_0x1364c9(0x12c)],_0xc4b847['message'],_0xc4b847[_0x1364c9(0xa2)],_0xc4b847[_0x1364c9(0x110)],_0x376461[_0x1364c9(0x8f)]);throwIfRateLimited(_0x538bdc,_0x376461[_0x1364c9(0x14a)],_0x2cec57);throw CliErrors[_0x1364c9(0x101)](_0x2cec57||_0x1364c9(0x15a)+_0x538bdc[_0x1364c9(0x163)],_0x1364c9(0xb6)+_0x44c6e5['toString']());}return Buffer[_0x1364c9(0xe7)](await _0x538bdc[_0x1364c9(0x11c)]());}catch(_0x26105e){if(_0x26105e instanceof Error&&_0x26105e[_0x1364c9(0xdc)]===_0x1364c9(0x12b))throw CliErrors[_0x1364c9(0x101)]('Request\x20timeout:\x20'+_0x44c6e5[_0x1364c9(0x152)]());throw _0x26105e;}finally{clearTimeout(_0x55d725);}}export async function getBffEndpointContract(_0x4860c0,_0x2a59d3){const _0x4d0a7b=a108_0x4862;if(encodeURIComponent(_0x4860c0)!==_0x4860c0||_0x4860c0==='.'||_0x4860c0==='..')throw CliErrors[_0x4d0a7b(0x94)](_0x4d0a7b(0x14c));if(_0x2a59d3===_0x4d0a7b(0xe8))throw CliErrors['validation'](_0x4d0a7b(0xae)+_0x4860c0+_0x4d0a7b(0x8d)+_0x2a59d3);const _0x3e1608=await sdkRequest(_0x4860c0,_0x422f2e=>{const _0x5a70a3=_0x4d0a7b;if(!(_0x5a70a3(0x136)in _0x422f2e['bff']))throw CliErrors['validation']('Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.');return _0x422f2e[_0x5a70a3(0xbd)][_0x5a70a3(0x136)](_0x2a59d3);});if(!_0x3e1608||typeof _0x3e1608!==_0x4d0a7b(0x100)||Array[_0x4d0a7b(0xc7)](_0x3e1608)||_0x3e1608[_0x4d0a7b(0x133)]!==_0x4860c0||_0x3e1608[_0x4d0a7b(0x93)]!==_0x2a59d3)throw CliErrors[_0x4d0a7b(0x94)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x4860c0+_0x4d0a7b(0x8d)+_0x2a59d3);const _0x39c5b7=_0x3e1608['gmtModified'];if(_0x39c5b7!=null&&(typeof _0x39c5b7!==_0x4d0a7b(0x103)||!Number[_0x4d0a7b(0xf7)](_0x39c5b7)))throw CliErrors[_0x4d0a7b(0x101)](_0x4d0a7b(0x11d));return{'appCode':_0x3e1608['appCode'],'functionName':_0x3e1608['functionName'],'description':_0x3e1608['description'],'version':_0x3e1608['version'],'gmtModified':_0x39c5b7};}export async function getSqlQueryInfo(_0x4c72f5,_0x414e37){const _0x3693e2=a108_0x4862,_0x321eb4=await sdkRequest(_0x4c72f5,_0x4fec48=>{const _0x3c72be=a108_0x4862;if(!(_0x3c72be(0xb2)in _0x4fec48[_0x3c72be(0x155)]))throw CliErrors[_0x3c72be(0x94)](_0x3c72be(0xaf));return _0x4fec48[_0x3c72be(0x155)][_0x3c72be(0xb2)]({'appCode':_0x4c72f5,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x414e37});}),_0x50043f=_0x321eb4&&typeof _0x321eb4==='object'&&_0x3693e2(0x15d)in _0x321eb4?_0x321eb4[_0x3693e2(0x15d)]?.[0x0]:_0x321eb4&&typeof _0x321eb4==='object'&&_0x3693e2(0xdf)in _0x321eb4?_0x321eb4:undefined;if(!_0x50043f)throw CliErrors[_0x3693e2(0x94)](_0x3693e2(0xc9)+_0x414e37);return _0x50043f;}export async function listApprovalTodo(_0x760c84,_0x5c4da6=0x1,_0x5ebe1c=0x14){const _0x2a21db=a108_0x4862,_0x50c351=await sdkRequest(_0x760c84,_0x4b88dd=>_0x4b88dd[_0x2a21db(0x91)][_0x2a21db(0x165)]({'currentPage':_0x5c4da6,'pageSize':_0x5ebe1c}));if(!_0x50c351||typeof _0x50c351!==_0x2a21db(0x100)||!Array[_0x2a21db(0xc7)](_0x50c351[_0x2a21db(0xf6)]))throw CliErrors[_0x2a21db(0x101)](_0x2a21db(0x14f));return _0x50c351;}export async function getApprovalTaskDetail(_0x2d5159,_0x90f4ee){const _0x1c9256=a108_0x4862,_0x8bba49=await sdkRequest(_0x90f4ee,_0x4790e3=>_0x4790e3[_0x1c9256(0x91)][_0x1c9256(0xad)](_0x2d5159));if(!_0x8bba49||typeof _0x8bba49!==_0x1c9256(0x100)||Array['isArray'](_0x8bba49))throw CliErrors[_0x1c9256(0x101)]('Invalid\x20approval\x20task\x20detail\x20response.');return _0x8bba49;}export async function approveApprovalTask(_0x272f37){const _0x39b877=a108_0x4862;return await sdkRequest(_0x272f37['appCode'],_0xdbf273=>_0xdbf273[_0x39b877(0x91)]['approve'](_0x272f37)),null;}export async function transferApprovalTask(_0x103ddf){const _0x11e54b=a108_0x4862;return await sdkRequest(_0x103ddf[_0x11e54b(0x133)],_0x1f0b35=>_0x1f0b35[_0x11e54b(0x91)][_0x11e54b(0x92)](_0x103ddf)),null;}function isRemoteAppItem(_0x4af46f){const _0x5156d=a108_0x4862;return!!_0x4af46f&&typeof _0x4af46f===_0x5156d(0x100)&&typeof _0x4af46f['appCode']==='string'&&typeof _0x4af46f['appName']==='string';}function extractRemoteAppItems(_0x9b2a77){const _0x4e39c2=a108_0x4862;if(Array['isArray'](_0x9b2a77))return _0x9b2a77['filter'](isRemoteAppItem);if(!_0x9b2a77||typeof _0x9b2a77!=='object')throw CliErrors['apiError'](_0x4e39c2(0x123));const _0x5deec7=_0x9b2a77;if(Array[_0x4e39c2(0xc7)](_0x5deec7[_0x4e39c2(0x15d)]))return _0x5deec7[_0x4e39c2(0x15d)][_0x4e39c2(0x102)](isRemoteAppItem);if(_0x5deec7['data']&&typeof _0x5deec7[_0x4e39c2(0x14a)]==='object'){const _0x477aab=_0x5deec7[_0x4e39c2(0x14a)];if(Array['isArray'](_0x477aab[_0x4e39c2(0x15d)]))return _0x477aab[_0x4e39c2(0x15d)][_0x4e39c2(0x102)](isRemoteAppItem);}throw CliErrors[_0x4e39c2(0x101)](_0x4e39c2(0x108));}export async function getMyApps(){const _0x374993=a108_0x4862;return extractRemoteAppItems(await identitySdkRequest(_0x262f0b=>_0x262f0b[_0x374993(0xd5)]()));}export async function getLoginUserInfo(){const _0x209c3e=a108_0x4862,_0x2035bf=await identitySdkRequest(_0x4c4597=>_0x4c4597[_0x209c3e(0x144)]());if(!_0x2035bf||typeof _0x2035bf!=='object'||Array[_0x209c3e(0xc7)](_0x2035bf))throw CliErrors['apiError'](_0x209c3e(0x169));return _0x2035bf;}export const USER_ACCOUNT_BIND_PATH=a108_0x29635e(0x135);export async function bindExternalUserAccount(_0x16a851,_0x2034fb){const _0x3a4c05=a108_0x29635e;return identitySdkRequest(_0x48af2e=>_0x48af2e[_0x3a4c05(0xd4)]({'provider':_0x16a851,'accountId':_0x2034fb}));}function runtimeSchedulePath(_0x3074bd,_0x2f5507=''){const _0x581b09=a108_0x29635e;return _0x581b09(0x140)+encodeURIComponent(_0x3074bd)+_0x581b09(0x114)+_0x2f5507;}export async function validateRuntimeSchedule(_0x659511,_0x4c54db){const _0x59fa3e=a108_0x29635e,_0x253de7=await apiRequest(runtimeSchedulePath(_0x659511,'/validate'),{'domain':'harness','method':_0x59fa3e(0xda),'body':_0x4c54db});return _0x253de7[_0x59fa3e(0x14a)];}export async function createRuntimeSchedule(_0x4e5d3c,_0x5ac767){const _0x50c183=a108_0x29635e,_0x5b2f65=await apiRequest(runtimeSchedulePath(_0x4e5d3c),{'domain':_0x50c183(0x12a),'method':_0x50c183(0xda),'body':_0x5ac767});return _0x5b2f65[_0x50c183(0x14a)];}export async function listRuntimeSchedules(_0x39aedd,_0x5cdbc2){const _0x22d0ea=a108_0x29635e,_0x508434=new URLSearchParams();_0x508434[_0x22d0ea(0x15e)](_0x22d0ea(0xe4),_0x5cdbc2[_0x22d0ea(0xe4)]);if(_0x5cdbc2['limit']!==undefined)_0x508434[_0x22d0ea(0x15e)](_0x22d0ea(0x147),String(_0x5cdbc2[_0x22d0ea(0x147)]));if(_0x5cdbc2[_0x22d0ea(0xd9)])_0x508434[_0x22d0ea(0x15e)](_0x22d0ea(0xd9),_0x5cdbc2[_0x22d0ea(0xd9)]);const _0x54c969=_0x508434[_0x22d0ea(0x145)]>0x0?'?'+_0x508434[_0x22d0ea(0x152)]():'',_0x371b1d=await apiRequest(''+runtimeSchedulePath(_0x39aedd)+_0x54c969,{'domain':_0x22d0ea(0x12a)});return _0x371b1d[_0x22d0ea(0x14a)];}export async function getRuntimeSchedule(_0x4843f3,_0x38e510){const _0x568c5a=await apiRequest(runtimeSchedulePath(_0x4843f3,'/'+encodeURIComponent(_0x38e510)),{'domain':'harness'});return _0x568c5a['data'];}export async function deleteRuntimeSchedule(_0x23e7dc,_0xdf41be){const _0x39f556=a108_0x29635e,_0x1718b2=await apiRequest(runtimeSchedulePath(_0x23e7dc,'/'+encodeURIComponent(_0xdf41be)),{'domain':_0x39f556(0x12a),'method':_0x39f556(0x109)});return _0x1718b2['data'];}function a108_0x19aa(){const _0x2c4641=['appCode','resolvedSlug','/client/user-accounts/bind','getEndpoint','588291SysLTY','get','app','applyUserList','updateRoleUserList','importBatch','getDatasetPermitList','confirmWarnings','tableName','/api/harness/apps/','ocr','contentHash','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','loginUserInfo','size','min','limit','getDatasetPermitMeta','Artifact\x20not\x20found:\x20id=','data','Toolbox\x20API\x20error:\x20','Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.','Request\x20timeout:\x20','importReadback','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','base64','.zip','toString','datasetMeta','Invalid\x20app\x20config\x20value:\x20key=','sql','replace','userList','/run','effective','SkillHub\x20API\x20error:\x20','GET','Dataset\x20import\x20requires\x20Client\x20AK.','tableData','set','getMenuPermitList','roleName','PRIVATE','headlineVersion','status','Invalid\x20runtime\x20role\x20members\x20response:\x20','listTodo','isInteger','values','signal','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','services','found','/api/runtime/v1/namespaces/','errors','diagramBound','queryUrl','image','publish','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','resolvedVersion','userId',',\x20name=','ownerPreviewVersion','text','namespace','approval','transfer','functionName','validation','publishedVersion','getRolePermitList','toLowerCase','sourceFingerprint','entries','937999LNcibc','updateRole','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','Configure\x20accessKey\x20in\x20','find','searchParams','listNotificationChannels','savePagePermit','msg','items','example','all','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','25SqLPCJ','invokeSource','importContract','/versions/','error','isJson','getTask','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','SQL\x20metadata\x20requires\x20Client\x20AK.','/api/cli/v1/skills/','].userList','query','API\x20error:\x20','slug','max','Download\x20failed:\x20','skillCode','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','api-doc-generator',']\x20must\x20be\x20an\x20object.','Toolbox\x20API\x20error','list','bff','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','permitList','/api/node-toolbox/','].userId\x20is\x20invalid.','/publish/validate','boolean','deleteRole','SkillHub\x20error\x20code:\x20','stringify','isArray','personal','SQL\x20query\x20not\x20found:\x20','application/json','version','2IgAeaX','message','/api/v1/skills/','CUSTOM','623VOgAtl','diagramRevision','Invalid\x20import\x20task\x20readback\x20response.','getModel','bindAccount','myApps','348mopSDB','1905492esurBN','displayName','cursor','POST','content','name','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','skillName','sqlCode','update','scope','5582256LGSFxo','abort','kind','4330170UpACWG','Check\x20your\x20credentials\x20and\x20try\x20again.','from','functions','authRequired','getPagePermit','NAMESPACE_ONLY','skill','2665287dSiicl','json','roleList[','upload','packageBase64','api','bytes','visibility','Invalid\x20notification\x20config\x20list\x20response.','records','isSafeInteger','file','getConfigByKey','join','saveMenuPermits','Toolbox\x20error\x20code:\x20','response','application/zip','markdown','object','apiError','filter','number','type','code','/diagram','pageSize','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','DELETE','client-ak','Missing\x20Skill\x20package\x20payload.','diagramValidated','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','\x20must\x20be\x20an\x20array.','test','errorCode','diagram','31592AkRpzI','trim','/schedules','company','application/octet-stream','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','tags','success','PUBLISHED','warnings','arrayBuffer','Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.','18arhyrI','artifact','newConfigFileName','permit','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','API\x20error\x20code:\x20','getRoleUserList','string','saveDatasetPermits','/validate','importImageReadback','harness','AbortError','errorMsg','getRoleList','map','summary','getDrivenData','PUT','/skills'];a108_0x19aa=function(){return _0x2c4641;};return a108_0x19aa();}export async function runRuntimeSchedule(_0x565c9c,_0x2a6d5b){const _0x550e9e=a108_0x29635e,_0x330b1f=await apiRequest(runtimeSchedulePath(_0x565c9c,'/'+encodeURIComponent(_0x2a6d5b)+_0x550e9e(0x158)),{'domain':_0x550e9e(0x12a),'method':_0x550e9e(0xda)});return _0x330b1f[_0x550e9e(0x14a)];}export async function listDatasets(_0x1bf583,_0x260761){const _0x32674c=a108_0x29635e,_0x247ea3=await sdkRequest(_0x1bf583,_0x6f7601=>_0x6f7601[_0x32674c(0x153)][_0x32674c(0xbc)]({..._0x260761?.[_0x32674c(0x105)]&&{'code':_0x260761['code']},..._0x260761?.[_0x32674c(0xdc)]&&{'name':_0x260761['name']},..._0x260761?.[_0x32674c(0x13f)]&&{'tableName':_0x260761[_0x32674c(0x13f)]}}));return extractList(_0x247ea3);}export async function getDatasetDetail(_0x4016b0){const _0x4273fc=a108_0x29635e;return sdkRequest(undefined,_0x5a4908=>_0x5a4908[_0x4273fc(0x153)][_0x4273fc(0x130)]({'code':_0x4016b0}));}function importSdkRequest(_0x54c2f8,_0x33f025,_0x1525bc){return sdkRequest(_0x54c2f8,_0xadb1c5=>{const _0x2dd96a=a108_0x4862,_0x4114b2=_0xadb1c5[_0x2dd96a(0xd3)]('dataset_'+_0x33f025);if(!(_0x4114b2 instanceof ClientAkModel))throw CliErrors['validation'](_0x2dd96a(0x15c));return _0x1525bc(_0x4114b2);});}export async function getDatasetImportContract(_0x14ef69,_0x1f3072){const _0x49cbb8=a108_0x29635e;return importSdkRequest(_0x14ef69,_0x1f3072,_0x4626c1=>_0x4626c1[_0x49cbb8(0xa9)]());}export async function createDatasetImportBatch(_0x170367,_0x2a5c5f,_0x5b1938){const _0xf03654=a108_0x29635e;return importSdkRequest(_0x170367,_0x2a5c5f,_0x584b32=>_0x584b32[_0xf03654(0x13c)](_0x5b1938));}export async function readDatasetImportRows(_0x57a8cc,_0x4e11b1,_0x5eec71){const _0x5a0498=a108_0x29635e,_0x3ec3b3=await importSdkRequest(_0x57a8cc,_0x4e11b1,_0x5e4dd2=>_0x5e4dd2['importReadback']({'ids':_0x5eec71}));if(!_0x3ec3b3||!Array[_0x5a0498(0xc7)](_0x3ec3b3['items']))throw CliErrors[_0x5a0498(0x101)]('Invalid\x20import\x20readback\x20response.');return _0x3ec3b3[_0x5a0498(0xa3)];}export async function readDatasetImportTaskRows(_0x2fb06b,_0x484730,_0x2ff555){const _0x418dd8=a108_0x29635e,_0x4eac6b=await importSdkRequest(_0x2fb06b,_0x484730,_0x404fba=>_0x404fba[_0x418dd8(0x14e)]({'taskId':_0x2ff555}));if(!_0x4eac6b||!Array['isArray'](_0x4eac6b['items']))throw CliErrors[_0x418dd8(0x101)](_0x418dd8(0xd2));return _0x4eac6b['items'];}export async function uploadDatasetImportImage(_0x284d40,_0x481a3f,_0x3e53a2,_0x5730bf){const _0x4cbc77=a108_0x29635e;return importSdkRequest(_0x284d40,_0x481a3f,_0x4d4a2a=>_0x4d4a2a['importImage']({'importId':_0x3e53a2,'contentHash':_0x5730bf[_0x4cbc77(0x142)],'file':new Blob([new Uint8Array(_0x5730bf[_0x4cbc77(0xf3)])],{'type':_0x5730bf[_0x4cbc77(0x104)]}),'fileName':_0x4cbc77(0x170)}));}export async function readDatasetImportImage(_0x3b7d5d,_0x20dcad,_0x8fa03c,_0x207114){const _0x31faaa=a108_0x29635e;return importSdkRequest(_0x3b7d5d,_0x20dcad,_0x40c113=>_0x40c113[_0x31faaa(0x129)]({'importId':_0x8fa03c,'contentHash':_0x207114[_0x31faaa(0x142)],'type':_0x207114['type'],'size':_0x207114['size']}));}export async function getDatasetSdkUsageDoc(_0x1ad2ef,_0x4d193b){const _0x356e1c=a108_0x29635e,_0x45b724=await toolboxRequest(_0x356e1c(0xb9),{'datasetCode':_0x1ad2ef,'appCode':_0x4d193b});return typeof _0x45b724?.[_0x356e1c(0xff)]===_0x356e1c(0x126)?_0x45b724[_0x356e1c(0xff)]:'';}export async function uploadRuntimeFile(_0x3f3a3b,_0x2fa13a){const _0xfc048d=a108_0x29635e,_0xdba98f=await readFile(_0x2fa13a);return sdkRequest(_0x3f3a3b,_0xfa2e13=>_0xfa2e13[_0xfc048d(0x16a)][_0xfc048d(0xf8)][_0xfc048d(0xf0)]({'file':new Blob([new Uint8Array(_0xdba98f)]),'fileName':basename(_0x2fa13a)}));}export async function queryRuntimeFileUrl(_0x519be0,_0x289236={}){const _0x4a9bd6=a108_0x29635e;return sdkRequest(undefined,_0x5e92b1=>_0x5e92b1['services'][_0x4a9bd6(0xf8)][_0x4a9bd6(0x16f)]({'filePath':_0x519be0,..._0x289236}));}export async function recognizeRuntimeOcr(_0x5db204,_0x175bba){const _0x347528=a108_0x29635e;return sdkRequest(_0x5db204,_0x112d25=>_0x112d25['services'][_0x347528(0x141)]['recognize'](_0x175bba));}export async function getRuntimeAppConfigByKey(_0x4544df,_0x5958e5){const _0x24c3e3=a108_0x29635e,_0x28eb13=await sdkRequest(_0x4544df,_0x8c6e0e=>_0x8c6e0e['app'][_0x24c3e3(0xf9)](_0x5958e5));if(typeof _0x28eb13!==_0x24c3e3(0x126))throw CliErrors['validation'](_0x24c3e3(0x154)+_0x5958e5);return _0x28eb13;}export async function listNotificationChannelConfigs(_0x5dfb9b,_0xa689fd){const _0xccf6af=a108_0x29635e,_0xf3f006=await sdkRequest(_0x5dfb9b,_0x468b94=>_0x468b94[_0xccf6af(0x139)][_0xccf6af(0xa0)](_0xa689fd));if(!Array[_0xccf6af(0xc7)](_0xf3f006))throw CliErrors[_0xccf6af(0x101)](_0xccf6af(0xf5),_0xccf6af(0x172));return _0xf3f006;}export async function listRuntimeArtifacts(_0x6de253,_0x1766b8){const _0x217555=a108_0x29635e,_0x28b24c=await sdkRequest(_0x6de253,_0x4cffbf=>_0x4cffbf[_0x217555(0x11f)][_0x217555(0xbc)](_0x1766b8));return Array[_0x217555(0xc7)](_0x28b24c)?_0x28b24c:[];}export async function getRuntimeArtifact(_0x129b66,_0x329574){const _0x53b966=a108_0x29635e,_0x2cab35=await sdkRequest(_0x329574,_0x2ddd37=>_0x2ddd37[_0x53b966(0x11f)][_0x53b966(0x138)](_0x129b66));if(!_0x2cab35)throw CliErrors[_0x53b966(0x94)](_0x53b966(0x149)+_0x129b66);return _0x2cab35;}export async function createRuntimeArtifact(_0x4f436f,_0x5e2fbb){return sdkRequest(_0x4f436f,_0x35efcb=>_0x35efcb['artifact']['create'](_0x5e2fbb));}export async function updateRuntimeArtifact(_0x3b85f4,_0x1dc921,_0x17f444){const _0x516044=a108_0x29635e;return sdkRequest(_0x1dc921,_0x202371=>_0x202371[_0x516044(0x11f)][_0x516044(0xe0)](_0x3b85f4,_0x17f444));}export async function listPersonalBffs(_0x2960a6){const _0x24a8ff=a108_0x29635e,_0x153c99=await sdkRequest(_0x2960a6,_0x3af09e=>_0x3af09e[_0x24a8ff(0xc8)][_0x24a8ff(0xbd)][_0x24a8ff(0xbc)]());return Array[_0x24a8ff(0xc7)](_0x153c99)?_0x153c99:[];}export async function getPersonalBff(_0x260ada,_0xdc1cc8){const _0x5c94b5=a108_0x29635e,_0x4bbe3c=await sdkRequest(_0xdc1cc8,_0x379983=>_0x379983['personal']['bff'][_0x5c94b5(0x138)](_0x260ada));if(!_0x4bbe3c)throw CliErrors[_0x5c94b5(0x94)](_0x5c94b5(0x117)+_0x260ada);return _0x4bbe3c;}export async function createPersonalBff(_0x485b0c,_0x62ed2c){const _0x19d802=a108_0x29635e;return sdkRequest(_0x485b0c,_0x1f79ec=>_0x1f79ec['personal'][_0x19d802(0xbd)]['create'](_0x62ed2c));}export async function updatePersonalBff(_0x1e268e,_0x21c740,_0x27e8f4){const _0x237a38=a108_0x29635e;return sdkRequest(_0x21c740,_0x1b0368=>_0x1b0368[_0x237a38(0xc8)][_0x237a38(0xbd)][_0x237a38(0xe0)](_0x1e268e,_0x27e8f4));}export async function executePersonalBff(_0x149038,_0x2b7595,_0x1b39c6){return sdkRequest(_0x2b7595,_0x101f90=>_0x101f90['personal']['bff']['execute']({'scriptId':_0x149038,'params':_0x1b39c6}));}export async function listPersonalKnowledgeBaseItems(_0x323861,_0xfb632a){return listPersonalKnowledge({'appCode':_0x323861,'accessKey':_activeAK,'signal':_0xfb632a});}export async function getPersonalKnowledgeBaseItem(_0x993615,_0x30e705,_0x2ebefd){return getPersonalKnowledge({'appCode':_0x30e705,'accessKey':_activeAK,'signal':_0x2ebefd},_0x993615);}export async function createPersonalKnowledgeBaseItem(_0x506e4f,_0x3a3cc6,_0x16a538){return savePersonalKnowledge({'appCode':_0x506e4f,'accessKey':_activeAK,'signal':_0x16a538},_0x3a3cc6);}export async function updatePersonalKnowledgeBaseItem(_0x1752de,_0x15c29f,_0x10a934,_0x1a4d2d){return savePersonalKnowledge({'appCode':_0x15c29f,'accessKey':_activeAK,'signal':_0x1a4d2d},_0x10a934,_0x1752de);}export async function getRuntimeSkillByCode(_0x105afc,_0x137c60){const _0x5c5c79=a108_0x29635e,_0x2e9fe6=await skillHubJsonRequest(_0x5c5c79(0xce)+encodeURIComponent(_0x105afc)+'/'+encodeURIComponent(_0x137c60),{'allowNotFound':!![]});return _0x2e9fe6?skillHubRuntimeDetailToRuntimeSkill(_0x2e9fe6):undefined;}export async function listRuntimeSkills(_0x46ee8f){const _0x15a17f=a108_0x29635e,_0x62ba8a=await skillHubJsonRequest(_0x15a17f(0x16c)+encodeURIComponent(_0x46ee8f['appCode'])+_0x15a17f(0x132),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x46ee8f[_0x15a17f(0x133)],_0x62ba8a,_0x46ee8f['scope']??'all',_0x46ee8f[_0x15a17f(0x105)],_0x46ee8f['installableOnly']);}export async function listPersonalRuntimeSkills(_0x366169){const _0x514b63=a108_0x29635e;return(await listRuntimeSkills({'appCode':_0x366169,'scope':_0x514b63(0xc8)}))[_0x514b63(0xc8)];}export async function listCompanyRuntimeSkills(_0x491c31){const _0x338115=a108_0x29635e;return(await listRuntimeSkills({'appCode':_0x491c31,'scope':_0x338115(0x115)}))[_0x338115(0x115)];}export async function listVisibleRuntimeSkills(_0x10553c){const _0x33ca53=a108_0x29635e;return(await listRuntimeSkills({'appCode':_0x10553c,'scope':_0x33ca53(0xa5)}))[_0x33ca53(0x159)];}export async function createPersonalRuntimeSkill(_0x2c3bce,_0x5b7144,_0x4a86b3={}){const _0xc466dc=a108_0x29635e;return publishRuntimeSkill(_0x2c3bce,_0x5b7144,{'visibility':_0xc466dc(0x161),'confirmWarnings':_0x4a86b3[_0xc466dc(0x13e)]});}export async function updatePersonalRuntimeSkill(_0x4ec12c,_0x50e6d8,_0x1cfadb,_0x51e60f={}){const _0x59e22d=a108_0x29635e;return publishRuntimeSkill(_0x50e6d8,{..._0x1cfadb,'skillCode':_0x1cfadb['skillCode']??_0x4ec12c},{'visibility':'PRIVATE','confirmWarnings':_0x51e60f[_0x59e22d(0x13e)]});}export async function publishCompanyRuntimeSkill(_0x37f3bd,_0x42f7a1,_0x41d2a5={}){const _0x3afa34=a108_0x29635e;return publishRuntimeSkill(_0x37f3bd,_0x42f7a1,{'visibility':_0x3afa34(0xeb),'confirmWarnings':_0x41d2a5[_0x3afa34(0x13e)]});}export async function validateRuntimeSkillPublish(_0x32aeb1,_0x32905d,_0x1f6c0b){const _0x1bd9dc=a108_0x29635e,_0x25a771=buildRuntimeSkillPublishForm(_0x32905d,_0x1f6c0b[_0x1bd9dc(0xf4)]),_0x24209e=await skillHubJsonRequest(_0x1bd9dc(0xb0)+encodeURIComponent(_0x32aeb1)+_0x1bd9dc(0xc2),{'method':_0x1bd9dc(0xda),'body':_0x25a771});return assertJointDiagramAcknowledged(_0x32905d[_0x1bd9dc(0x111)],_0x24209e[_0x1bd9dc(0x10c)],_0x1bd9dc(0x94)),{'valid':_0x24209e['valid']===!![],'errors':Array['isArray'](_0x24209e[_0x1bd9dc(0x16d)])?_0x24209e[_0x1bd9dc(0x16d)]:[],'warnings':Array[_0x1bd9dc(0xc7)](_0x24209e[_0x1bd9dc(0x11b)])?_0x24209e[_0x1bd9dc(0x11b)]:[],'resolvedSlug':_0x24209e[_0x1bd9dc(0x134)],'resolvedVersion':_0x24209e[_0x1bd9dc(0x8b)],'diagramValidated':_0x24209e[_0x1bd9dc(0x10c)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x2d8bbf,_0xfc022,_0x40455c,_0x4cabf8,_0x537455){const _0x1f59db=a108_0x29635e;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x2d8bbf,_0xfc022,_0x40455c,_0x1f59db(0x128)),{'method':'POST','query':{'scope':_0x4cabf8},'headers':{'Content-Type':_0x1f59db(0xca)},'body':JSON['stringify'](_0x537455)});}export async function putRuntimeSkillVersionDiagram(_0x3ad000,_0x1a1c98,_0x5bbc5e,_0x17a41a,_0x39479f){const _0x45d6c4=a108_0x29635e;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x3ad000,_0x1a1c98,_0x5bbc5e),{'method':_0x45d6c4(0x131),'query':{'scope':_0x17a41a},'headers':{'Content-Type':_0x45d6c4(0xca)},'body':JSON[_0x45d6c4(0xc6)](_0x39479f)});}export async function getRuntimeSkillVersionDiagram(_0x1d3f5e,_0x96784c,_0x5540f5,_0x635484){const _0x2017b1=a108_0x29635e,_0x3914cf=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x1d3f5e,_0x96784c,_0x5540f5),{'query':{'scope':_0x635484}});if(typeof _0x3914cf[_0x2017b1(0x16b)]!==_0x2017b1(0xc3))throw CliErrors[_0x2017b1(0x101)](_0x2017b1(0xbe));const _0x22c3a7=_0x3914cf[_0x2017b1(0x98)];if(typeof _0x22c3a7!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x2017b1(0x10f)](_0x22c3a7))throw CliErrors[_0x2017b1(0x101)](_0x2017b1(0x10d),'SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.');const _0xe0abbc=_0x3914cf[_0x2017b1(0xd1)];if(_0x3914cf[_0x2017b1(0x16b)]&&(!Number[_0x2017b1(0x166)](_0xe0abbc)||Number(_0xe0abbc)<0x1))throw CliErrors[_0x2017b1(0x101)]('Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.');if(!_0x3914cf[_0x2017b1(0x16b)]&&_0xe0abbc!==undefined&&_0xe0abbc!==null)throw CliErrors[_0x2017b1(0x101)](_0x2017b1(0xb8));const _0x1f4ab2=_0x3914cf[_0x2017b1(0x16b)]?Number(_0xe0abbc):null;return{..._0x3914cf,'sourceFingerprint':_0x22c3a7,'diagramRevision':_0x1f4ab2,'expectedDiagramRevision':_0x1f4ab2??0x0};}export async function downloadRuntimeSkillPackage(_0x2a2c46,_0x209b83,_0x1338af,_0x89eb88){const _0x1ec2f8=a108_0x29635e;void _0x2a2c46;const _0x291e69=_0x89eb88?_0x1ec2f8(0xb0)+encodeURIComponent(_0x1338af)+'/'+encodeURIComponent(_0x209b83)+_0x1ec2f8(0xaa)+encodeURIComponent(_0x89eb88)+'/download':_0x1ec2f8(0xb0)+encodeURIComponent(_0x1338af)+'/'+encodeURIComponent(_0x209b83)+'/download';return skillHubBinaryRequest(_0x291e69);}function a108_0x4862(_0x49fe02,_0x12d92f){_0x49fe02=_0x49fe02-0x8b;const _0x19aa90=a108_0x19aa();let _0x4862f5=_0x19aa90[_0x49fe02];return _0x4862f5;}async function publishRuntimeSkill(_0x3666fa,_0x5f58ab,_0x39493a){const _0x454819=a108_0x29635e,_0x3c49f2=buildRuntimeSkillPublishForm(_0x5f58ab,_0x39493a[_0x454819(0xf4)]),_0x5edbd4=await skillHubJsonRequest(_0x454819(0xb0)+encodeURIComponent(_0x3666fa)+'/publish',{'method':_0x454819(0xda),'query':{'confirmWarnings':_0x39493a['confirmWarnings']===!![]?!![]:undefined},'body':_0x3c49f2});return assertJointDiagramAcknowledged(_0x5f58ab['diagram'],_0x5edbd4['diagramBound'],_0x454819(0x171)),{'appCode':_0x5edbd4[_0x454819(0x90)]??_0x3666fa,'skillCode':_0x5edbd4[_0x454819(0xb4)]??_0x5f58ab[_0x454819(0xb7)]??'','skillName':_0x5f58ab[_0x454819(0xde)]??_0x5edbd4[_0x454819(0xb4)]??_0x5f58ab[_0x454819(0xb7)],'description':_0x5f58ab['description'],'scope':skillHubVisibilityToScope(_0x5edbd4['visibility']??_0x39493a[_0x454819(0xf4)])??_0x454819(0xc8),'version':_0x5edbd4['version']??_0x5f58ab[_0x454819(0xcb)],'tags':_0x5f58ab[_0x454819(0x118)],'content':_0x5f58ab[_0x454819(0xdb)],'diagramBound':_0x5edbd4[_0x454819(0x16e)]===!![]};}function assertJointDiagramAcknowledged(_0xddb2fa,_0x423375,_0x3fddcf){const _0x3543d4=a108_0x29635e;if(!_0xddb2fa||_0x423375===!![])return;throw CliErrors[_0x3543d4(0x101)](_0x3543d4(0xdd)+_0x3fddcf+'.',_0x3543d4(0x122));}function buildRuntimeSkillPublishForm(_0x2c7958,_0x363f95){const _0x11a5a1=a108_0x29635e,_0x438850=new FormData();return _0x438850['set'](_0x11a5a1(0xf8),runtimeSkillPackageFile(_0x2c7958)),_0x2c7958[_0x11a5a1(0xde)]?.['trim']()&&_0x438850['set'](_0x11a5a1(0xd8),_0x2c7958[_0x11a5a1(0xde)][_0x11a5a1(0x113)]()),_0x438850[_0x11a5a1(0x15e)](_0x11a5a1(0xf4),_0x363f95),_0x2c7958[_0x11a5a1(0x111)]&&_0x438850[_0x11a5a1(0x15e)](_0x11a5a1(0x111),new Blob([JSON['stringify'](_0x2c7958[_0x11a5a1(0x111)])],{'type':_0x11a5a1(0xca)})),_0x438850;}function runtimeSkillVersionDiagramPath(_0x3ed3cf,_0x46ea88,_0x559db4,_0x3a6406=''){const _0x57f474=a108_0x29635e;return _0x57f474(0xb0)+encodeURIComponent(_0x3ed3cf)+'/'+encodeURIComponent(_0x46ea88)+_0x57f474(0xaa)+encodeURIComponent(_0x559db4)+_0x57f474(0x106)+_0x3a6406;}function runtimeSkillPackageFile(_0x507714){const _0x286a62=a108_0x29635e;if(!_0x507714[_0x286a62(0xf1)])throw CliErrors[_0x286a62(0x94)](_0x286a62(0x10b));const _0xc30503=Buffer[_0x286a62(0xe7)](_0x507714['packageBase64'],_0x286a62(0x150)),_0xe485e4=new Blob([_0xc30503],{'type':_0x286a62(0xfe)}),_0x1e61d6=(_0x507714[_0x286a62(0xb7)]||_0x286a62(0xec))+_0x286a62(0x151);if(typeof File!=='undefined')return new File([_0xe485e4],_0x1e61d6,{'type':_0x286a62(0xfe)});return _0xe485e4;}function normalizeSkillHubRuntimeListResponse(_0x3860d2,_0x24ea8d,_0x432be5,_0x39e394,_0x917091=![]){const _0x2b2ce6=a108_0x29635e,_0x285ee4=Array[_0x2b2ce6(0xc7)](_0x24ea8d)?_0x24ea8d:Array[_0x2b2ce6(0xc7)](_0x24ea8d?.[_0x2b2ce6(0xa3)])?_0x24ea8d[_0x2b2ce6(0xa3)]:[],_0x1bccd6=_0x39e394?.['trim'](),_0x30e34b=_0x285ee4[_0x2b2ce6(0x102)](_0x3d4ea3=>!_0x1bccd6||_0x3d4ea3['slug']===_0x1bccd6)[_0x2b2ce6(0x102)](_0x2655f7=>!_0x917091||_0x2655f7[_0x2b2ce6(0x95)]?.[_0x2b2ce6(0x163)]===_0x2b2ce6(0x11a)&&Boolean(_0x2655f7[_0x2b2ce6(0x95)][_0x2b2ce6(0xcb)]?.[_0x2b2ce6(0x113)]()))[_0x2b2ce6(0x12e)](skillHubRuntimeItemToRuntimeSkill)[_0x2b2ce6(0x102)](_0x58c938=>Boolean(_0x58c938)),_0x5e7326=_0x30e34b[_0x2b2ce6(0x102)](_0x25ff6c=>_0x25ff6c['scope']==='personal'),_0x122fa8=_0x30e34b['filter'](_0x301ec0=>_0x301ec0[_0x2b2ce6(0xe1)]===_0x2b2ce6(0x115));return{'appCode':_0x3860d2,'personal':_0x432be5===_0x2b2ce6(0x115)?[]:_0x5e7326,'company':_0x432be5==='personal'?[]:_0x122fa8,'effective':buildEffectiveRuntimeSkills(_0x5e7326,_0x122fa8,_0x432be5)};}function skillHubRuntimeItemToRuntimeSkill(_0x3e81d6){const _0x49bc6f=a108_0x29635e,_0x1bc951=_0x3e81d6[_0x49bc6f(0xb4)]?.[_0x49bc6f(0x113)](),_0x3b1a71=skillHubVisibilityToScope(_0x3e81d6[_0x49bc6f(0xf4)]);if(!_0x1bc951||!_0x3b1a71)return undefined;return{'id':_0x3e81d6['id'],'appCode':_0x3e81d6[_0x49bc6f(0x90)],'skillCode':_0x1bc951,'skillName':_0x3e81d6[_0x49bc6f(0xd8)]??_0x1bc951,'description':_0x3e81d6[_0x49bc6f(0x12f)],'example':_0x3e81d6['example'],'scope':_0x3b1a71,'version':skillHubRuntimeItemVersion(_0x3e81d6),'status':_0x3e81d6['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x2898b1){const _0x11b6d4=a108_0x29635e,_0x556e30=_0x2898b1['slug']?.['trim']();if(!_0x556e30)return undefined;return{'id':_0x2898b1['id'],'appCode':_0x2898b1['namespace'],'skillCode':_0x556e30,'skillName':_0x2898b1[_0x11b6d4(0xd8)]??_0x556e30,'description':_0x2898b1[_0x11b6d4(0x12f)],'example':_0x2898b1[_0x11b6d4(0xa4)],'scope':skillHubVisibilityToScope(_0x2898b1['visibility'])??_0x2898b1[_0x11b6d4(0xf4)]?.[_0x11b6d4(0x97)](),'version':skillHubRuntimeItemVersion(_0x2898b1),'status':_0x2898b1['status']};}function skillHubVisibilityToScope(_0x24ed06){const _0x11f2e5=a108_0x29635e;if(_0x24ed06===_0x11f2e5(0x161))return'personal';if(_0x24ed06==='NAMESPACE_ONLY')return _0x11f2e5(0x115);return undefined;}function skillHubRuntimeItemVersion(_0x4851aa){const _0x46c121=a108_0x29635e;return _0x4851aa[_0x46c121(0x95)]?.[_0x46c121(0xcb)]??_0x4851aa[_0x46c121(0x162)]?.[_0x46c121(0xcb)]??_0x4851aa[_0x46c121(0x8e)]?.[_0x46c121(0xcb)];}function buildEffectiveRuntimeSkills(_0x1efe74,_0x49cc6b,_0x32dc5f){const _0x405580=a108_0x29635e;if(_0x32dc5f===_0x405580(0xc8))return _0x1efe74;if(_0x32dc5f===_0x405580(0x115))return _0x49cc6b;const _0x10ea1e=new Map();for(const _0x407dd1 of _0x49cc6b){_0x10ea1e['set'](_0x407dd1[_0x405580(0xb7)],_0x407dd1);}for(const _0x5213da of _0x1efe74){_0x10ea1e[_0x405580(0x15e)](_0x5213da[_0x405580(0xb7)],_0x5213da);}return Array['from'](_0x10ea1e[_0x405580(0x167)]());}function normalizeRuntimeSkillListResponse(_0x17d431,_0x36014a){const _0x145d28=a108_0x29635e;if(Array[_0x145d28(0xc7)](_0x36014a)){const _0x350a3d=_0x36014a[_0x145d28(0x102)](_0x19387e=>_0x19387e[_0x145d28(0xe1)]===_0x145d28(0xc8)),_0x4980a1=_0x36014a[_0x145d28(0x102)](_0x71337d=>_0x71337d['scope']==='company');return{'appCode':_0x17d431,'personal':_0x350a3d,'company':_0x4980a1,'effective':[..._0x4980a1,..._0x350a3d]};}return{'appCode':_0x36014a?.[_0x145d28(0x133)]??_0x17d431,'personal':Array[_0x145d28(0xc7)](_0x36014a?.['personal'])?_0x36014a[_0x145d28(0xc8)]:[],'company':Array[_0x145d28(0xc7)](_0x36014a?.[_0x145d28(0x115)])?_0x36014a[_0x145d28(0x115)]:[],'effective':Array[_0x145d28(0xc7)](_0x36014a?.[_0x145d28(0x159)])?_0x36014a['effective']:[]};}function normalizeRuntimeRoleUserList(_0x49d198,_0x305eff){const _0x1cf0c0=a108_0x29635e;if(!Array[_0x1cf0c0(0xc7)](_0x49d198))throw CliErrors[_0x1cf0c0(0x101)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x305eff+_0x1cf0c0(0x10e));return _0x49d198[_0x1cf0c0(0x12e)]((_0x12e58b,_0x973a2b)=>{const _0x315afa=_0x1cf0c0;if(!_0x12e58b||typeof _0x12e58b!=='object'||Array['isArray'](_0x12e58b))throw CliErrors[_0x315afa(0x101)](_0x315afa(0x164)+_0x305eff+'['+_0x973a2b+_0x315afa(0xba));const _0xd19897=_0x12e58b,_0x2ac061=normalizeRuntimeUserId(_0xd19897[_0x315afa(0x8c)]);if(_0x2ac061===undefined)throw CliErrors['apiError']('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x305eff+'['+_0x973a2b+_0x315afa(0xc1));return{..._0xd19897,'userId':_0x2ac061};});}function normalizeRuntimeRoleUsersResponse(_0x1e8d61){const _0x2667df=a108_0x29635e;return extractList(_0x1e8d61)[_0x2667df(0x12e)]((_0x3ef027,_0x2119d0)=>{const _0x4f8474=_0x2667df;if(!_0x3ef027||typeof _0x3ef027!=='object'||Array[_0x4f8474(0xc7)](_0x3ef027))throw CliErrors[_0x4f8474(0x101)](_0x4f8474(0x9c)+_0x2119d0+_0x4f8474(0xba));const _0x5150f0=_0x3ef027;return{..._0x5150f0,'userList':normalizeRuntimeRoleUserList(_0x5150f0[_0x4f8474(0x157)],'roleList['+_0x2119d0+_0x4f8474(0xb1)),..._0x5150f0[_0x4f8474(0x13a)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x5150f0['applyUserList'],_0x4f8474(0xef)+_0x2119d0+'].applyUserList')}};});}export async function listRuntimeAppRoles(_0x4c3393,_0x121c51={}){const _0x22c586=a108_0x29635e,_0x5067a8=_0x121c51['currentPage']??0x1,_0x66273f=Math[_0x22c586(0x146)](Math[_0x22c586(0xb5)](_0x121c51[_0x22c586(0x107)]??0x64,0x1),0x64),_0xf411b6=await sdkRequest(_0x4c3393,_0x2c2b29=>_0x2c2b29[_0x22c586(0x121)][_0x22c586(0x12d)]({..._0x121c51[_0x22c586(0x160)]?{'roleName':_0x121c51[_0x22c586(0x160)]}:{},'currentPage':_0x5067a8,'pageSize':_0x66273f}));return{'items':extractList(_0xf411b6),'paging':extractPaging(_0xf411b6)};}export async function createRuntimeAppRole(_0x1f902b){const _0x200078=a108_0x29635e;return sdkRequest(_0x1f902b[_0x200078(0x133)],_0x30a4e7=>_0x30a4e7[_0x200078(0x121)]['createRole']({'roleType':_0x200078(0xcf),..._0x1f902b}));}export async function updateRuntimeAppRole(_0x486e7d){const _0x16fcb2=a108_0x29635e;return sdkRequest(_0x486e7d['appCode'],_0x3fac1d=>_0x3fac1d['permit'][_0x16fcb2(0x9b)](_0x486e7d));}export async function deleteRuntimeAppRole(_0x41d4d4){const _0x34da65=a108_0x29635e;return sdkRequest(undefined,_0x20f0b0=>_0x20f0b0[_0x34da65(0x121)][_0x34da65(0xc4)](_0x41d4d4));}export async function listRuntimeRoleUsers(_0x1c79d7){const _0x41c96=a108_0x29635e,_0x299d56=await sdkRequest(_0x1c79d7,_0x549f87=>_0x549f87[_0x41c96(0x121)][_0x41c96(0x125)]());return normalizeRuntimeRoleUsersResponse(_0x299d56);}export async function updateRuntimeRoleUsers(_0x178441,_0x2030af){const _0x580f53=a108_0x29635e;return sdkRequest(_0x178441,_0x1f7199=>_0x1f7199[_0x580f53(0x121)][_0x580f53(0x13b)]({'roleList':_0x2030af}));}export async function listRuntimeAppUsers(_0x2fb2cd){const _0x4b30cf=a108_0x29635e,_0x269271=await sdkRequest(_0x2fb2cd,_0x3325d1=>_0x3325d1[_0x4b30cf(0x121)]['queryAppUsers']());return extractList(_0x269271);}export async function listRuntimePermitRoles(_0x5a4e1e,_0x570e77={}){const _0x3f47e2=a108_0x29635e,_0x7bb100=await sdkRequest(_0x5a4e1e,_0x245b63=>_0x245b63['permit'][_0x3f47e2(0x96)](_0x570e77));return extractList(_0x7bb100);}export async function getRuntimePagePermit(_0x389926){const _0x5c2a31=a108_0x29635e;return sdkRequest(undefined,_0x357946=>_0x357946[_0x5c2a31(0x121)][_0x5c2a31(0xea)](_0x389926));}export async function saveRuntimePagePermit(_0x34fcf4){const _0x836ac6=a108_0x29635e;return sdkRequest(_0x34fcf4[_0x836ac6(0x133)],_0x400336=>_0x400336[_0x836ac6(0x121)][_0x836ac6(0xa1)](_0x34fcf4));}export async function getRuntimeRoleMenuResources(_0x15e6c3,_0x428e53){const _0x56e165=a108_0x29635e,_0x2884e9=await sdkRequest(_0x15e6c3,_0x384fb2=>_0x384fb2[_0x56e165(0x121)]['getResourceMenuList']({'roleId':_0x428e53}));return extractList(_0x2884e9);}export async function listRuntimeMenuRolePermits(_0x243868){const _0x92daf0=a108_0x29635e,_0x3d4813=await sdkRequest(_0x243868,_0x4d4406=>_0x4d4406[_0x92daf0(0x121)][_0x92daf0(0x15f)]());return Array[_0x92daf0(0xc7)](_0x3d4813?.[_0x92daf0(0xbf)])?_0x3d4813['permitList']:[];}export async function saveRuntimeMenuRolePermits(_0x3f5534,_0x584e5e){const _0x109498=a108_0x29635e;return sdkRequest(_0x3f5534,_0x21200d=>_0x21200d[_0x109498(0x121)][_0x109498(0xfb)]({'permitList':_0x584e5e}));}export async function listRuntimeDatasetPermits(_0x5c734e,_0x16987e){const _0x1343b8=a108_0x29635e,_0x5d6745=await sdkRequest(_0x5c734e,_0x1dd493=>_0x1dd493[_0x1343b8(0x121)][_0x1343b8(0x13d)](_0x16987e));return Array[_0x1343b8(0xc7)](_0x5d6745?.['permitList'])?_0x5d6745['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x510eb4){const _0x4c2fcf=a108_0x29635e,_0x46a2f1=await sdkRequest(_0x510eb4,_0x498832=>_0x498832[_0x4c2fcf(0x121)][_0x4c2fcf(0x148)]());return Array[_0x4c2fcf(0xc7)](_0x46a2f1?.[_0x4c2fcf(0xbf)])?_0x46a2f1[_0x4c2fcf(0xbf)]:[];}export async function saveRuntimeDatasetRolePermits(_0x447735,_0x151119){const _0x1b4afe=a108_0x29635e;return sdkRequest(_0x447735,_0x4ad8bc=>_0x4ad8bc[_0x1b4afe(0x121)][_0x1b4afe(0x127)]({'permitList':_0x151119}));}
|