@lovrabet/lovrabet-cli 2.3.12-beta.1 → 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.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.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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
const a107_0x2477f2=a107_0x3bba;(function(_0xaf4d3a,_0x32212e){const _0x12aff0=a107_0x3bba,_0x5802b0=_0xaf4d3a();while(!![]){try{const _0x44c816=parseInt(_0x12aff0(0x9c))/0x1*(parseInt(_0x12aff0(0x90))/0x2)+parseInt(_0x12aff0(0xc0))/0x3+-parseInt(_0x12aff0(0xb6))/0x4*(-parseInt(_0x12aff0(0xc7))/0x5)+-parseInt(_0x12aff0(0x93))/0x6+parseInt(_0x12aff0(0xc6))/0x7*(parseInt(_0x12aff0(0xb4))/0x8)+-parseInt(_0x12aff0(0x8a))/0x9*(-parseInt(_0x12aff0(0xb2))/0xa)+-parseInt(_0x12aff0(0x95))/0xb;if(_0x44c816===_0x32212e)break;else _0x5802b0['push'](_0x5802b0['shift']());}catch(_0x3dac){_0x5802b0['push'](_0x5802b0['shift']());}}}(a107_0xefb6,0x4f614));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a107_0x3bba(_0x476d7c,_0x4bc80c){_0x476d7c=_0x476d7c-0x7f;const _0xefb625=a107_0xefb6();let _0x3bba24=_0xefb625[_0x476d7c];return _0x3bba24;}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_0xefb6(){const _0x457836=['EPERM','EXDEV','app','./constant/env.js','isTTY','values','join','runtimeDomain','8901aUdMAn','configFileNames','stdin','object','nonInteractive','error','1215512jHaeAc','trim','pageSize','881532UmOskQ','online','25528151zUkUdH','write','skillHubDomain','message','accessKey','userDomain','harnessDomain','1sjgsZJ','riskLevel','raw','routing','global','missing','locale','apps','production','skillDomain','parse','utf8','cwd','explicit','defaultApp','kbServiceDomain','projectConfig','setRawMode','string','isRaw','format','globalConfig','5410YpcuML','apiDomain','144RTPmkR','local-alias','4652nhJabS','stdout','.tmp','true','PAGE_SIZE','empty','nativeToolAvailable','platformDomain','host','stringify','1663515vOaOvj','cache','ENV','project','agentDomain','env','250089GDCxVW','1945FdTZjY','find','high-risk-write','appCode','setLogPath','code','slice','appcode','./constant/domain.js','development','setRawCommand'];a107_0xefb6=function(){return _0x457836;};return a107_0xefb6();}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[a107_0x2477f2(0x8b)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x398e84){for(const _0x3067a6 of CONFIG_NAMES){const _0x242e48=resolve(_0x398e84,_0x3067a6);if(existsSync(_0x242e48))return _0x242e48;}return undefined;}export function resolveWriteConfigPath(_0x2f4a29){const _0xeaf3e1=a107_0x2477f2,_0x490e1a=_0x2f4a29===_0xeaf3e1(0xc3)?process[_0xeaf3e1(0xa8)]():homedir(),_0x56a2c1=resolveConfigPath(_0x490e1a);return _0x56a2c1??resolve(_0x490e1a,NEW_CONFIG_NAME);}export function readConfigFile(_0x49006c){const _0x21e0d7=a107_0x2477f2;try{if(existsSync(_0x49006c)){const _0x1509b7=readFileSync(_0x49006c,{'encoding':_0x21e0d7(0xa7)});if(_0x1509b7){const _0x1c25c5=JSON['parse'](_0x1509b7);return migrateOnlineEnv(_0x49006c,_0x1c25c5),_0x1c25c5;}}}catch{}return{};}function migrateOnlineEnv(_0x4617d0,_0x1c930b){const _0x4069d7=a107_0x2477f2;let _0x7a1105=![];_0x1c930b[_0x4069d7(0xc5)]===_0x4069d7(0x94)&&(_0x1c930b[_0x4069d7(0xc5)]=_0x4069d7(0xa4),_0x7a1105=!![]);if(_0x1c930b['apps']&&typeof _0x1c930b[_0x4069d7(0xa3)]===_0x4069d7(0x8d))for(const _0x23c315 of Object[_0x4069d7(0x87)](_0x1c930b[_0x4069d7(0xa3)])){_0x23c315&&_0x23c315['env']==='online'&&(_0x23c315[_0x4069d7(0xc5)]='production',_0x7a1105=!![]);}if(_0x7a1105)try{writeConfigFile(_0x4617d0,_0x1c930b);}catch{}}export function writeConfigFile(_0x25dc6a,_0x34573e){const _0x2d2845=a107_0x2477f2,_0xaa8688=dirname(_0x25dc6a);!existsSync(_0xaa8688)&&mkdirSync(_0xaa8688,{'recursive':!![]});const _0x3ec359=_0x25dc6a+_0x2d2845(0xb8);try{writeFileSync(_0x3ec359,JSON['stringify'](_0x34573e,null,0x2)+'\x0a',{'encoding':_0x2d2845(0xa7),'mode':0x180});try{renameSync(_0x3ec359,_0x25dc6a);}catch(_0x3c7f73){if(_0x3c7f73[_0x2d2845(0xcc)]===_0x2d2845(0x82)||_0x3c7f73['code']===_0x2d2845(0x83)||_0x3c7f73[_0x2d2845(0xcc)]==='EACCES'){writeFileSync(_0x25dc6a,JSON[_0x2d2845(0xbf)](_0x34573e,null,0x2)+'\x0a',{'encoding':_0x2d2845(0xa7)});try{unlinkSync(_0x3ec359);}catch{}}else throw _0x3c7f73;}}catch(_0x46a6a4){try{unlinkSync(_0x3ec359);}catch{}throw _0x46a6a4;}}export function isNonInteractiveMode(_0x294c96){const _0x4a826f=a107_0x2477f2;return!!(_0x294c96[_0x4a826f(0x8e)]||_0x294c96['ci']||productEnvNames('CI')['some'](_0x5ded2b=>process.env[_0x5ded2b]===_0x4a826f(0xb9))||process.env.CI==='true'||!process[_0x4a826f(0xb7)][_0x4a826f(0x86)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xbf8622=a107_0x2477f2;if(!process[_0xbf8622(0x8c)][_0xbf8622(0x86)])return![];try{const _0x58d82e=process[_0xbf8622(0x8c)][_0xbf8622(0xaf)];return process['stdin'][_0xbf8622(0xad)](!![]),process[_0xbf8622(0x8c)][_0xbf8622(0xad)](_0x58d82e??![]),!![];}catch{return![];}}export async function createContext(_0x3d0dad){const _0xcbc421=a107_0x2477f2,_0x3f178a=buildConfigFromFlags(_0x3d0dad);await initGlobalEnvironment(_0x3f178a);const {getUserDomain:_0x154729,getApiDomain:_0xc42829}=await import(_0xcbc421(0x7f)),_0x26b6de={'apiDomain':_0xc42829(),'userDomain':_0x154729()},_0x276600=await buildAuth(_0x3f178a);logger[_0xcbc421(0xcb)](process[_0xcbc421(0xa8)]());const _0x30a00b=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process['argv'][_0xcbc421(0xcd)](0x2))[_0xcbc421(0x88)]('\x20'))[_0xcbc421(0x91)]();logger[_0xcbc421(0x81)](_0x30a00b);const _0x190a03=isNonInteractiveMode(_0x3d0dad);return{'config':_0x3f178a,'auth':_0x276600,'logger':logger,'env':_0x26b6de,'nonInteractive':_0x190a03};}export function buildConfigFromFlags(_0x59c9f7){return buildConfig(loadRawConfigLayers(),_0x59c9f7);}export function getLocalAppAliases(_0x4ccff8){const _0x50366=a107_0x2477f2;return _0x4ccff8[_0x50366(0xa3)]&&typeof _0x4ccff8[_0x50366(0xa3)]===_0x50366(0x8d)?_0x4ccff8[_0x50366(0xa3)]:{};}export function resolveLocalAppAliasCode(_0x2413d2,_0x367b47){const _0x1fb66f=a107_0x2477f2;if(!_0x367b47)return undefined;const _0x428645=getLocalAppAliases(_0x2413d2)[_0x367b47],_0xa85a30=_0x428645?.[_0x1fb66f(0xce)];return typeof _0xa85a30===_0x1fb66f(0xae)&&_0xa85a30[_0x1fb66f(0x91)]()?_0xa85a30['trim']():undefined;}export function readAppCodeFromConfig(){const _0x30091c=a107_0x2477f2;return buildConfigFromFlags({})[_0x30091c(0xca)];}export function readScopedConfig(_0x30fc86){const _0x1c5222=a107_0x2477f2,_0x2a907a=_0x30fc86['global']?_0x1c5222(0xa0):_0x1c5222(0xc3);return readConfigFile(resolveWriteConfigPath(_0x2a907a));}export function writeScopedConfig(_0x32ca88,_0x10695b){const _0x3bbbc0=a107_0x2477f2,_0x1018f2=_0x10695b['global']?'global':_0x3bbbc0(0xc3);writeConfigFile(resolveWriteConfigPath(_0x1018f2),_0x32ca88);}export async function initGlobalEnvironment(_0x5ba5e4){const _0x38e37a=a107_0x2477f2,{initEnv:_0x2459ac}=await import(_0x38e37a(0x85));_0x2459ac(_0x5ba5e4[_0x38e37a(0xc5)]);const {initDomains:_0x5ac3b2}=await import(_0x38e37a(0x7f)),_0x488588=resolveEnterpriseRoutingConfig(_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9f)]);_0x5ac3b2({'apiDomain':_0x488588?_0x488588[_0x38e37a(0xb3)]:_0x5ba5e4['raw'][_0x38e37a(0xb3)]||_0x5ba5e4['raw'][_0x38e37a(0xbe)]||undefined,'userDomain':_0x488588?_0x488588['userDomain']:_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9a)]||undefined,'runtimeDomain':_0x488588?_0x488588[_0x38e37a(0x89)]:_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x89)]||undefined,'skillDomain':_0x488588?_0x488588['skillDomain']:_0x5ba5e4['raw'][_0x38e37a(0xa5)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x97)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xc4)]||_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xbd)]||undefined,'kbServiceDomain':_0x488588?_0x488588[_0x38e37a(0xab)]:typeof _0x5ba5e4[_0x38e37a(0x9e)]['kbServiceDomain']===_0x38e37a(0xae)&&_0x5ba5e4[_0x38e37a(0x9e)]['kbServiceDomain']['trim']()?_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0xab)]:undefined,'harnessDomain':_0x488588?_0x488588['harnessDomain']:_0x5ba5e4[_0x38e37a(0x9e)]['harnessDomain']===undefined?undefined:normalizeDomainOrigin('harnessDomain',_0x5ba5e4[_0x38e37a(0x9e)][_0x38e37a(0x9b)]),'region':normalizeLovrabetRegion(_0x5ba5e4[_0x38e37a(0x9e)]['region'])});}export function getProjectConfigPath(){const _0x4b46e1=a107_0x2477f2;return resolveConfigPath(process[_0x4b46e1(0xa8)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3691f9){const _0x5ddec7=a107_0x2477f2;if(!existsSync(_0x3691f9))return{'status':_0x5ddec7(0xa1)};try{const _0xc975ec=readFileSync(_0x3691f9,{'encoding':_0x5ddec7(0xa7)});if(!_0xc975ec?.[_0x5ddec7(0x91)]())return{'status':_0x5ddec7(0xbb)};const _0x21b123=JSON[_0x5ddec7(0xa6)](_0xc975ec);return{'status':'ok','data':_0x21b123};}catch(_0x2ef2f1){return{'status':_0x5ddec7(0x8f),'message':_0x2ef2f1 instanceof Error?_0x2ef2f1[_0x5ddec7(0x98)]:String(_0x2ef2f1)};}}export function loadRawConfigLayers(_0x197144){const _0x2197aa=a107_0x2477f2;let _0x271aa7={},_0x5f20cb={},_0x28b01b,_0x8cda97;try{_0x28b01b=resolveConfigPath(homedir());if(_0x28b01b){const _0x4823c3=readFileSync(_0x28b01b,{'encoding':_0x2197aa(0xa7)});if(_0x4823c3)_0x271aa7=JSON[_0x2197aa(0xa6)](_0x4823c3);}}catch{}try{const _0x5eec75=_0x197144||process[_0x2197aa(0xa8)]();_0x8cda97=resolveConfigPath(_0x5eec75);if(_0x8cda97){const _0x85ad1e=readFileSync(_0x8cda97,{'encoding':_0x2197aa(0xa7)});if(_0x85ad1e)_0x5f20cb=JSON['parse'](_0x85ad1e);}}catch{}return{'globalPath':_0x28b01b,'projectPath':_0x8cda97,'globalConfig':_0x271aa7,'projectConfig':_0x5f20cb};}function mergeRawConfigLayers(_0x3827bc){const _0x286f42=a107_0x2477f2,{globalConfig:_0xb936b1,projectConfig:_0x1e7a53}=_0x3827bc,_0x57656c={..._0xb936b1,..._0x1e7a53};delete _0x57656c['inherit'];if(_0x286f42(0xaa)in _0x1e7a53)_0x57656c[_0x286f42(0xaa)]=_0x1e7a53[_0x286f42(0xaa)];else _0xb936b1[_0x286f42(0xaa)]&&(_0x57656c[_0x286f42(0xaa)]=_0xb936b1[_0x286f42(0xaa)]);return _0x57656c;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x21a2a5){return mergeRawConfigLayers(loadRawConfigLayers(_0x21a2a5));}export function readRawConfigWithLayers(_0x41c735){const _0xd93784=loadRawConfigLayers(_0x41c735);return{'config':mergeRawConfigLayers(_0xd93784),'layers':_0xd93784};}export function resolveDefaultAppSource(_0x569c4d){const _0x2eafb4=a107_0x2477f2;if('defaultApp'in _0x569c4d[_0x2eafb4(0xac)])return'project';if(_0x569c4d[_0x2eafb4(0xb1)]['defaultApp'])return _0x2eafb4(0xa0);return null;}function buildConfig(_0x57bf03,_0x44a57b){const _0x36242f=a107_0x2477f2,_0x40bab4=mergeRawConfigLayers(_0x57bf03),{projectConfig:_0x3cff0c}=_0x57bf03,_0x42f0cb=_0x40bab4[_0x36242f(0xaa)]||undefined,_0x2b2cfc=typeof _0x44a57b['appcode']===_0x36242f(0xae)?_0x44a57b['appcode']:undefined,_0x5116cd=_0x3cff0c['appcode']||_0x3cff0c[_0x36242f(0x84)],_0xce8da5=!_0x2b2cfc&&!_0x44a57b[_0x36242f(0x84)]&&!_0x5116cd&&!_0x3cff0c[_0x36242f(0xaa)],_0x2767ea=_0xce8da5?env('APPCODE'):undefined,_0x303e14=_0x44a57b[_0x36242f(0x84)]||(_0xce8da5&&!_0x2767ea?env('APP'):undefined),_0x3a8415=_0x303e14||_0x42f0cb||undefined,_0x41427e=_0x303e14||_0x2767ea?undefined:_0x5116cd||(_0x3cff0c['defaultApp']?undefined:_0x40bab4[_0x36242f(0xce)]||_0x40bab4[_0x36242f(0x84)]||undefined),_0x486ad9=_0x303e14||(_0x41427e?undefined:_0x42f0cb),_0x419450=resolveLocalAppAliasCode(_0x40bab4,_0x486ad9),_0x5eae5e=productEnvNames('ACCESS_KEY')[_0x36242f(0xc8)](_0x279560=>process.env[_0x279560]!==undefined),_0x522ee2=_0x5eae5e?process.env[_0x5eae5e]:undefined,_0x57eee4=_0x3cff0c['accessKey']||_0x522ee2||_0x40bab4[_0x36242f(0x99)]||undefined,_0x317471=_0x3cff0c['accessKey']?'project\x20config':_0x522ee2?_0x5eae5e:_0x40bab4['accessKey']?'global\x20config':undefined,_0x2a55f7=_0x44a57b[_0x36242f(0xc5)]||_0x40bab4['env']||env(_0x36242f(0xc2))||DEFAULT_CONFIG_VALUES[_0x36242f(0xc5)],_0x47eb90=normalizeEnv(String(_0x2a55f7)),_0x194653=isDaily(_0x47eb90)?'daily':isDev(_0x47eb90)?_0x36242f(0x80):_0x36242f(0xa4),_0x42aff4=_0x2b2cfc||_0x2767ea||_0x41427e||_0x419450?undefined:resolveCachedAppCode(_0x486ad9,_0x194653,_0x57eee4),_0x139df5=_0x2b2cfc||_0x2767ea||_0x41427e||_0x419450||_0x42aff4||undefined,_0x50190c=_0x2b2cfc?_0x36242f(0xa9):_0x2767ea?_0x36242f(0xc5):_0x41427e?'top-level':_0x419450?_0x36242f(0xb5):_0x42aff4?_0x36242f(0xc1):undefined,_0x57a54b=_0x40bab4['locale']||DEFAULT_CONFIG_VALUES[_0x36242f(0xa2)],_0x2a9377=undefined,_0x23fd05=_0x44a57b[_0x36242f(0xb0)]||env('FORMAT')||_0x40bab4[_0x36242f(0xb0)],_0x15d4cd=normalizeLegacyOutputFormat(_0x23fd05),_0x4bde6b=env(_0x36242f(0xba))||_0x40bab4[_0x36242f(0x92)],_0x5375ff=_0x4bde6b?Number(_0x4bde6b)||undefined:undefined,_0x20cbfe=_0x40bab4[_0x36242f(0x9d)],_0x33567c=_0x20cbfe==='read'||_0x20cbfe===_0x36242f(0x96)||_0x20cbfe===_0x36242f(0xc9)?_0x20cbfe:DEFAULT_CONFIG_VALUES['riskLevel'],_0x9a1dc7=_0x40bab4[_0x36242f(0xbc)]===!![],_0x3997bd=env('VERBOSE'),_0x3215a9=_0x3997bd==='1'||_0x3997bd===_0x36242f(0xb9);return{'appCode':typeof _0x139df5===_0x36242f(0xae)&&_0x139df5[_0x36242f(0x91)]()?_0x139df5[_0x36242f(0x91)]():undefined,'appCodeSource':_0x50190c,'env':_0x194653,'locale':_0x57a54b,'cookie':_0x2a9377,'accessKey':_0x57eee4,'accessKeySource':_0x317471,'format':_0x15d4cd,'pageSize':_0x5375ff,'riskLevel':_0x33567c,'nativeToolAvailable':_0x9a1dc7,'verbose':_0x3215a9,'defaultApp':_0x42f0cb,'currentApp':typeof _0x3a8415===_0x36242f(0xae)?_0x3a8415:undefined,'raw':_0x40bab4};}function env(_0x66492b){return productEnv(_0x66492b);}async function buildAuth(_0x319186){const _0x28c023=a107_0x2477f2,_0x4b3402='',_0x48b31c=!!_0x319186[_0x28c023(0x99)];return{'cookie':_0x4b3402,'isLoggedIn':_0x48b31c,async 'getOrLogin'(){if(_0x48b31c)return _0x4b3402;throw CliErrors['authRequired']();}};}
|
|
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.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a108_0x457f55=a108_0x37db;(function(_0x42fda3,_0x403203){const _0x226d67=a108_0x37db,_0x4a49ef=_0x42fda3();while(!![]){try{const _0x19ebf6=-parseInt(_0x226d67(0x1f2))/0x1*(parseInt(_0x226d67(0x209))/0x2)+parseInt(_0x226d67(0x23b))/0x3*(parseInt(_0x226d67(0x252))/0x4)+-parseInt(_0x226d67(0x205))/0x5+parseInt(_0x226d67(0x1e9))/0x6+-parseInt(_0x226d67(0x24d))/0x7*(-parseInt(_0x226d67(0x24c))/0x8)+-parseInt(_0x226d67(0x21b))/0x9*(-parseInt(_0x226d67(0x211))/0xa)+-parseInt(_0x226d67(0x212))/0xb;if(_0x19ebf6===_0x403203)break;else _0x4a49ef['push'](_0x4a49ef['shift']());}catch(_0x44d5d5){_0x4a49ef['push'](_0x4a49ef['shift']());}}}(a108_0x4cab,0x7c8f5));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(_0x5cc7ff){if(_activeAK!==(_0x5cc7ff||undefined))clearSdkClient();_activeAK=_0x5cc7ff||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x52c6ca,_0x58d3d8){const _0x3a59d1=a108_0x37db;if(!_activeAK)throw CliErrors['authRequired'](_0x3a59d1(0x25d)+PRODUCT_CONFIG[_0x3a59d1(0x20e)]+'.');const _0x45dae7=_0x52c6ca?getSdkClient({'appCode':_0x52c6ca,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':_0x3a59d1(0x21f),'accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x58d3d8(_0x45dae7));}async function identitySdkRequest(_0x2cd6ce){const _0x5f1f1e=a108_0x37db,_0x3a7545=_activeAK;if(!_0x3a7545)throw CliErrors[_0x5f1f1e(0x1e1)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5f1f1e(0x20e)]+'.');return withSdkErrors(()=>_0x2cd6ce(getIdentitySdkClient(_0x3a7545,getRuntimeDomain())));}async function withSdkErrors(_0x39a975){const _0x38f566=a108_0x37db;try{return await _0x39a975();}catch(_0x429be6){if(_0x429be6 instanceof CliError)throw _0x429be6;if(!_0x429be6||typeof _0x429be6!==_0x38f566(0x267))throw _0x429be6;const _0x1ddfe0=_0x429be6,_0x5719e0=_0x1ddfe0['response']&&typeof _0x1ddfe0[_0x38f566(0x237)]===_0x38f566(0x267)?_0x1ddfe0['response']:{},_0x3950d6=firstString(_0x5719e0[_0x38f566(0x275)],_0x5719e0[_0x38f566(0x1c7)],_0x5719e0['msg'],_0x1ddfe0[_0x38f566(0x1c7)]),_0x59e719=createRateLimitError({'status':[_0x1ddfe0[_0x38f566(0x1bb)],_0x5719e0['status'],_0x5719e0['code']]['find'](_0x322885=>Number(_0x322885)===0x1ad)??_0x1ddfe0['status'],'errorCode':firstString(_0x5719e0[_0x38f566(0x24b)],typeof _0x5719e0[_0x38f566(0x27e)]===_0x38f566(0x232)?_0x5719e0['code']:undefined,_0x1ddfe0[_0x38f566(0x27e)]),'message':_0x3950d6,'retryAfter':_0x1ddfe0['retryAfter']??readRetryAfterSeconds(_0x1ddfe0[_0x38f566(0x237)])});if(_0x59e719)throw _0x59e719;const _0x4c5da9=createAccessError(_0x1ddfe0[_0x38f566(0x237)],_0x1ddfe0[_0x38f566(0x27e)]);if(_0x4c5da9)throw _0x4c5da9;throw CliErrors['apiError'](_0x3950d6||_0x38f566(0x1b2),_0x1ddfe0[_0x38f566(0x27e)]?'API\x20error\x20code:\x20'+_0x1ddfe0[_0x38f566(0x27e)]:undefined);}}function firstString(..._0x1c2b48){const _0x27110a=a108_0x37db;for(const _0x2f7ffc of _0x1c2b48){if(typeof _0x2f7ffc==='string'&&_0x2f7ffc[_0x27110a(0x1cd)]())return _0x2f7ffc['trim']();}return undefined;}async function decodeResponseBody(_0x15b82a){const _0x5a0c60=a108_0x37db;if(typeof _0x15b82a[_0x5a0c60(0x23d)]===_0x5a0c60(0x1e2))try{const _0xd67bf9=await _0x15b82a[_0x5a0c60(0x23d)]();try{return{'isJson':!![],'data':parseLosslessJson(_0xd67bf9),'text':_0xd67bf9};}catch{return{'isJson':![],'text':_0xd67bf9[_0x5a0c60(0x1cd)]()||undefined};}}catch(_0x342222){if(_0x342222 instanceof Error&&_0x342222[_0x5a0c60(0x274)]===_0x5a0c60(0x1c8))throw _0x342222;}try{return{'isJson':!![],'data':await _0x15b82a[_0x5a0c60(0x1ec)]()};}catch(_0x1c463c){if(_0x1c463c instanceof Error&&_0x1c463c['name']===_0x5a0c60(0x1c8))throw _0x1c463c;return{'isJson':![]};}}function throwIfRateLimited(_0x287ff9,_0x4dd47b,_0x37612c){const _0x4bdbdc=a108_0x37db,_0x5ecc75=_0x4dd47b&&typeof _0x4dd47b===_0x4bdbdc(0x267)?_0x4dd47b:{},_0x26d1a3=[_0x5ecc75[_0x4bdbdc(0x1bb)],_0x5ecc75[_0x4bdbdc(0x27e)]][_0x4bdbdc(0x284)](_0x1cad0e=>Number(_0x1cad0e)===0x1ad),_0x371a37=createRateLimitError({'status':_0x287ff9['status']===0x1ad?_0x287ff9[_0x4bdbdc(0x1bb)]:_0x26d1a3??_0x287ff9['status'],'errorCode':firstString(_0x5ecc75[_0x4bdbdc(0x24b)],typeof _0x5ecc75['code']===_0x4bdbdc(0x232)?_0x5ecc75[_0x4bdbdc(0x27e)]:undefined),'message':firstString(_0x5ecc75[_0x4bdbdc(0x275)],_0x5ecc75['message'],_0x5ecc75[_0x4bdbdc(0x1bd)],_0x37612c),'retryAfter':readRetryAfter(_0x287ff9[_0x4bdbdc(0x1b6)])??readRetryAfterSeconds(_0x4dd47b)});if(_0x371a37)throw _0x371a37;}async function apiRequest(_0x28a6ac,_0x3905fb={}){const _0x4175f2=a108_0x37db,{method:method=_0x4175f2(0x253),body:_0x3a38d7,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x4175f2(0x1e8),rejectRedirects:rejectRedirects=![]}=_0x3905fb,_0x2e16f7=_activeAK,_0xaaf9f7=domain===_0x4175f2(0x1e3)?requireHarnessDomain():domain===_0x4175f2(0x289)?getApiDomain():getRuntimeDomain();if(!_0x2e16f7)throw CliErrors[_0x4175f2(0x1e1)](_0x4175f2(0x25d)+PRODUCT_CONFIG[_0x4175f2(0x20e)]+'.');const _0x1f1d9d=''+_0xaaf9f7+_0x28a6ac,_0xe7e9d={'X-User-AK':_0x2e16f7},_0x596242=new AbortController(),_0x1a8da6=setTimeout(()=>_0x596242['abort'](),timeout);try{const _0x2d35cf=await fetch(_0x1f1d9d,{'method':method,...rejectRedirects?{'redirect':_0x4175f2(0x1b3)}:{},'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x4175f2(0x235)],..._0xe7e9d,...headers},'body':_0x3a38d7?JSON[_0x4175f2(0x1fd)](_0x3a38d7):undefined,'signal':_0x596242[_0x4175f2(0x28e)]});return await readApiResponse(_0x2d35cf);}catch(_0x2bdb97){if(_0x2bdb97 instanceof Error&&_0x2bdb97[_0x4175f2(0x274)]===_0x4175f2(0x1c8))throw CliErrors[_0x4175f2(0x224)](_0x4175f2(0x206)+_0x1f1d9d);throw _0x2bdb97;}finally{clearTimeout(_0x1a8da6);}}async function readApiResponse(_0x52d30e){const _0x4a4b42=a108_0x37db,_0x3c4cee=await decodeResponseBody(_0x52d30e);if(!_0x3c4cee['isJson']){throwIfRateLimited(_0x52d30e,undefined,_0x3c4cee[_0x4a4b42(0x23d)]);throw CliErrors[_0x4a4b42(0x224)](_0x4a4b42(0x242)+_0x52d30e[_0x4a4b42(0x1bb)]+')',_0x52d30e[_0x4a4b42(0x1bb)]>=0x190?_0x4a4b42(0x1dd):undefined);}const _0x115bec=_0x3c4cee[_0x4a4b42(0x20c)];throwIfRateLimited(_0x52d30e,_0x115bec);if(!_0x52d30e['ok']||_0x115bec[_0x4a4b42(0x273)]===![]){const _0x7fabe=createAccessError(_0x115bec);if(_0x7fabe)throw _0x7fabe;throw CliErrors['apiError'](_0x115bec[_0x4a4b42(0x275)]||_0x115bec['message']||_0x115bec[_0x4a4b42(0x1bd)]||'API\x20error:\x20'+_0x52d30e[_0x4a4b42(0x1bb)],readApiErrorCode(_0x115bec)?_0x4a4b42(0x28f)+readApiErrorCode(_0x115bec):undefined);}return _0x115bec;}async function apiBinaryRequest(_0x27f3be,_0x48513d={}){const _0x16eb0b=a108_0x37db,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x48513d,_0x252c35=_activeAK,_0x2a4fb7=getRuntimeDomain();if(!_0x252c35)throw CliErrors[_0x16eb0b(0x1e1)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x16eb0b(0x20e)]+'.');const _0x3b78fd=''+_0x2a4fb7+_0x27f3be,_0xdfb684=new AbortController(),_0x4dc25f=setTimeout(()=>_0xdfb684[_0x16eb0b(0x27d)](),timeout);try{const _0x535a4e=await fetch(_0x3b78fd,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x16eb0b(0x235)],'X-User-AK':_0x252c35,...headers},'signal':_0xdfb684[_0x16eb0b(0x28e)]});if(!_0x535a4e['ok']){const _0x231dc7=await decodeResponseBody(_0x535a4e),_0x122fbf=_0x231dc7[_0x16eb0b(0x20c)]&&typeof _0x231dc7['data']===_0x16eb0b(0x267)?_0x231dc7[_0x16eb0b(0x20c)]:{},_0x22116d=firstString(_0x122fbf[_0x16eb0b(0x275)],_0x122fbf[_0x16eb0b(0x1c7)],_0x122fbf[_0x16eb0b(0x24b)],_0x231dc7[_0x16eb0b(0x23d)]);throwIfRateLimited(_0x535a4e,_0x231dc7[_0x16eb0b(0x20c)],_0x22116d);const _0x13c90a=createAccessError(_0x231dc7['data']);if(_0x13c90a)throw _0x13c90a;throw CliErrors[_0x16eb0b(0x224)](_0x22116d||_0x16eb0b(0x230)+_0x535a4e['status'],_0x16eb0b(0x1ca)+_0x3b78fd);}return Buffer[_0x16eb0b(0x28b)](await _0x535a4e['arrayBuffer']());}catch(_0xbe76db){if(_0xbe76db instanceof Error&&_0xbe76db[_0x16eb0b(0x274)]===_0x16eb0b(0x1c8))throw CliErrors[_0x16eb0b(0x224)](_0x16eb0b(0x206)+_0x3b78fd);throw _0xbe76db;}finally{clearTimeout(_0x4dc25f);}}async function toolboxRequest(_0x1ee4e6,_0x1818b9,_0x24a760={}){const _0x1bfd8d=a108_0x37db,{method:method=_0x1bfd8d(0x253),headers:headers={},timeout:timeout=0x7530}=_0x24a760,_0x52dd05=_activeAK;if(!_0x52dd05)throw CliErrors[_0x1bfd8d(0x1e1)](_0x1bfd8d(0x25d)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x48fd9c=getApiDomain()['replace'](/\/$/,''),_0x1e6fca=new URL(_0x1ee4e6,_0x48fd9c+_0x1bfd8d(0x240));if(_0x1818b9)for(const [_0xde9711,_0x5df83e]of Object[_0x1bfd8d(0x1fc)](_0x1818b9)){_0x5df83e!==undefined&&_0x5df83e!==null&&_0x1e6fca[_0x1bfd8d(0x24a)][_0x1bfd8d(0x1b8)](_0xde9711,String(_0x5df83e));}const _0x4b5a90=new AbortController(),_0x21f54f=setTimeout(()=>_0x4b5a90[_0x1bfd8d(0x27d)](),timeout);try{const _0x1ef7b7=await fetch(_0x1e6fca,{'method':method,'headers':{'Content-Type':_0x1bfd8d(0x1e7),'X-Invoke-Source':PRODUCT_CONFIG[_0x1bfd8d(0x235)],'X-User-AK':_0x52dd05,...headers},'signal':_0x4b5a90[_0x1bfd8d(0x28e)]}),_0x38e8b1=await decodeResponseBody(_0x1ef7b7);if(!_0x38e8b1[_0x1bfd8d(0x1c5)]){throwIfRateLimited(_0x1ef7b7,undefined,_0x38e8b1['text']);throw CliErrors[_0x1bfd8d(0x224)](_0x1bfd8d(0x1de)+_0x1ef7b7[_0x1bfd8d(0x1bb)]+')',_0x1ef7b7[_0x1bfd8d(0x1bb)]>=0x190?_0x1bfd8d(0x1dd):undefined);}const _0x2860b6=_0x38e8b1[_0x1bfd8d(0x20c)];throwIfRateLimited(_0x1ef7b7,_0x2860b6);if(!_0x1ef7b7['ok']){const _0x177685=_0x2860b6&&typeof _0x2860b6===_0x1bfd8d(0x267)?_0x2860b6:{};throw CliErrors['apiError'](_0x177685[_0x1bfd8d(0x275)]||_0x177685[_0x1bfd8d(0x1c7)]||_0x1bfd8d(0x280)+_0x1ef7b7[_0x1bfd8d(0x1bb)],_0x177685[_0x1bfd8d(0x24b)]?_0x1bfd8d(0x204)+_0x177685[_0x1bfd8d(0x24b)]:undefined);}if(_0x2860b6&&typeof _0x2860b6===_0x1bfd8d(0x267)&&'success'in _0x2860b6&&typeof _0x2860b6['success']===_0x1bfd8d(0x216)){const _0x13c2ff=_0x2860b6;if(!_0x13c2ff[_0x1bfd8d(0x273)])throw CliErrors[_0x1bfd8d(0x224)](_0x13c2ff[_0x1bfd8d(0x275)]||_0x13c2ff[_0x1bfd8d(0x1c7)]||_0x1bfd8d(0x266),_0x13c2ff['errorCode']?_0x1bfd8d(0x204)+_0x13c2ff[_0x1bfd8d(0x24b)]:undefined);return _0x13c2ff[_0x1bfd8d(0x20c)];}return _0x2860b6;}catch(_0x585542){if(_0x585542 instanceof Error&&_0x585542['name']===_0x1bfd8d(0x1c8))throw CliErrors[_0x1bfd8d(0x224)]('Request\x20timeout:\x20'+_0x1e6fca['toString']());throw _0x585542;}finally{clearTimeout(_0x21f54f);}}async function skillHubJsonRequest(_0x32641e,_0x56e4be={}){const _0x3d290a=a108_0x37db,{method:method=_0x3d290a(0x253),query:_0x227041,body:_0x1bf6fd,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x56e4be,_0x23d50d=_activeAK;if(!_0x23d50d)throw CliErrors['authRequired'](_0x3d290a(0x25d)+PRODUCT_CONFIG[_0x3d290a(0x20e)]+'.');const _0x5c89f0=getSkillDomain()[_0x3d290a(0x20f)](/\/$/,''),_0x34b18c=new URL(_0x32641e,_0x5c89f0+'/');if(_0x227041)for(const [_0x34ba7b,_0x132608]of Object[_0x3d290a(0x1fc)](_0x227041)){_0x132608!==undefined&&_0x132608!==null&&_0x34b18c['searchParams'][_0x3d290a(0x1b8)](_0x34ba7b,String(_0x132608));}const _0x109bfc=new AbortController(),_0x4e6e94=setTimeout(()=>_0x109bfc[_0x3d290a(0x27d)](),timeout);try{const _0x56d919=await fetch(_0x34b18c['toString'](),{'method':method,'headers':{'Accept':_0x3d290a(0x1e7),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x23d50d,...headers},'body':_0x1bf6fd,'signal':_0x109bfc[_0x3d290a(0x28e)]}),_0x1d1ad3=await decodeResponseBody(_0x56d919);if(!_0x1d1ad3[_0x3d290a(0x1c5)]){if(allowNotFound&&_0x56d919[_0x3d290a(0x1bb)]===0x194)return undefined;throwIfRateLimited(_0x56d919,undefined,_0x1d1ad3[_0x3d290a(0x23d)]);throw CliErrors['apiError'](_0x3d290a(0x258)+_0x56d919[_0x3d290a(0x1bb)]+')',_0x56d919['status']>=0x190?_0x3d290a(0x1dd):undefined);}const _0x44519c=_0x1d1ad3[_0x3d290a(0x20c)];throwIfRateLimited(_0x56d919,_0x44519c);if(allowNotFound&&isSkillHubNotFoundResponse(_0x56d919[_0x3d290a(0x1bb)],_0x44519c))return undefined;const _0x51208b=!_0x56d919['ok']||_0x44519c?.[_0x3d290a(0x273)]===![]||typeof _0x44519c?.[_0x3d290a(0x27e)]===_0x3d290a(0x277)&&_0x44519c['code']>=0x190;if(_0x51208b)throw CliErrors[_0x3d290a(0x224)](_0x44519c?.[_0x3d290a(0x275)]||_0x44519c?.[_0x3d290a(0x1c7)]||_0x44519c?.[_0x3d290a(0x1bd)]||'SkillHub\x20API\x20error:\x20'+_0x56d919[_0x3d290a(0x1bb)],_0x44519c?.['errorCode']?_0x3d290a(0x271)+_0x44519c[_0x3d290a(0x24b)]:undefined);return _0x44519c?.[_0x3d290a(0x20c)]??_0x44519c;}catch(_0x44f2c5){if(_0x44f2c5 instanceof Error&&_0x44f2c5[_0x3d290a(0x274)]===_0x3d290a(0x1c8))throw CliErrors[_0x3d290a(0x224)](_0x3d290a(0x206)+_0x34b18c['toString']());throw _0x44f2c5;}finally{clearTimeout(_0x4e6e94);}}function isSkillHubNotFoundResponse(_0x11c364,_0xf68809){const _0x237aec=a108_0x37db;if(_0x11c364===0x194||_0xf68809?.[_0x237aec(0x27e)]===0x194)return!![];if(_0x11c364!==0x190&&_0xf68809?.[_0x237aec(0x27e)]!==0x190)return![];const _0x326178=[_0xf68809?.['msg'],_0xf68809?.[_0x237aec(0x1c7)],_0xf68809?.[_0x237aec(0x275)],_0xf68809?.[_0x237aec(0x1b3)]][_0x237aec(0x1cb)](_0x5aab11=>typeof _0x5aab11==='string')[_0x237aec(0x203)]('\x20');return/skill not found\b/i['test'](_0x326178);}async function skillHubBinaryRequest(_0x29dc9a,_0x57da79={}){const _0x4fdfcd=a108_0x37db,{query:_0x29bd07,headers:headers={},timeout:timeout=0x7530}=_0x57da79,_0x4cbc60=_activeAK;if(!_0x4cbc60)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4fdfcd(0x20e)]+'.');const _0x5ce8a3=getSkillDomain()['replace'](/\/$/,''),_0x1a2a02=new URL(_0x29dc9a,_0x5ce8a3+'/');if(_0x29bd07)for(const [_0x26914b,_0x2035f9]of Object['entries'](_0x29bd07)){_0x2035f9!==undefined&&_0x2035f9!==null&&_0x1a2a02[_0x4fdfcd(0x24a)][_0x4fdfcd(0x1b8)](_0x26914b,String(_0x2035f9));}const _0x52ea81=new AbortController(),_0x26f4e9=setTimeout(()=>_0x52ea81['abort'](),timeout);try{const _0x2038d5=await fetch(_0x1a2a02[_0x4fdfcd(0x1eb)](),{'method':_0x4fdfcd(0x253),'headers':{'Accept':_0x4fdfcd(0x221),'X-Invoke-Source':PRODUCT_CONFIG[_0x4fdfcd(0x235)],'X-User-AK':_0x4cbc60,...headers},'signal':_0x52ea81[_0x4fdfcd(0x28e)]});if(!_0x2038d5['ok']){const _0x400866=await decodeResponseBody(_0x2038d5),_0x4ecb45=_0x400866['data']&&typeof _0x400866[_0x4fdfcd(0x20c)]==='object'?_0x400866[_0x4fdfcd(0x20c)]:{},_0x1c9724=firstString(_0x4ecb45[_0x4fdfcd(0x275)],_0x4ecb45[_0x4fdfcd(0x1c7)],_0x4ecb45[_0x4fdfcd(0x1bd)],_0x4ecb45['errorCode'],_0x400866['text']);throwIfRateLimited(_0x2038d5,_0x400866[_0x4fdfcd(0x20c)],_0x1c9724);throw CliErrors[_0x4fdfcd(0x224)](_0x1c9724||_0x4fdfcd(0x248)+_0x2038d5[_0x4fdfcd(0x1bb)],_0x4fdfcd(0x1ca)+_0x1a2a02[_0x4fdfcd(0x1eb)]());}return Buffer['from'](await _0x2038d5[_0x4fdfcd(0x287)]());}catch(_0x442f16){if(_0x442f16 instanceof Error&&_0x442f16[_0x4fdfcd(0x274)]===_0x4fdfcd(0x1c8))throw CliErrors[_0x4fdfcd(0x224)]('Request\x20timeout:\x20'+_0x1a2a02['toString']());throw _0x442f16;}finally{clearTimeout(_0x26f4e9);}}export async function getBffEndpointContract(_0x3fec76,_0x452c18){const _0x542491=a108_0x37db;if(encodeURIComponent(_0x3fec76)!==_0x3fec76||_0x3fec76==='.'||_0x3fec76==='..')throw CliErrors[_0x542491(0x263)]('Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.');if(_0x452c18===_0x542491(0x27c))throw CliErrors[_0x542491(0x263)](_0x542491(0x228)+_0x3fec76+_0x542491(0x207)+_0x452c18);const _0x3943f3=await sdkRequest(_0x3fec76,_0x44f90a=>{const _0x272864=_0x542491;if(!(_0x272864(0x28d)in _0x44f90a[_0x272864(0x1b1)]))throw CliErrors['validation'](_0x272864(0x245));return _0x44f90a[_0x272864(0x1b1)][_0x272864(0x28d)](_0x452c18);});if(!_0x3943f3||typeof _0x3943f3!==_0x542491(0x267)||Array[_0x542491(0x1c2)](_0x3943f3)||_0x3943f3[_0x542491(0x256)]!==_0x3fec76||_0x3943f3[_0x542491(0x1c0)]!==_0x452c18)throw CliErrors[_0x542491(0x263)](_0x542491(0x228)+_0x3fec76+_0x542491(0x207)+_0x452c18);const _0x1eff9a=_0x3943f3['gmtModified'];if(_0x1eff9a!=null&&(typeof _0x1eff9a!==_0x542491(0x277)||!Number['isSafeInteger'](_0x1eff9a)))throw CliErrors['apiError'](_0x542491(0x1ff));return{'appCode':_0x3943f3[_0x542491(0x256)],'functionName':_0x3943f3['functionName'],'description':_0x3943f3['description'],'version':_0x3943f3['version'],'gmtModified':_0x1eff9a};}export async function getSqlQueryInfo(_0x32b245,_0x25e08b){const _0x51b6=a108_0x37db,_0x330b94=await sdkRequest(_0x32b245,_0x1bb546=>{const _0x513a76=a108_0x37db;if(!(_0x513a76(0x26f)in _0x1bb546[_0x513a76(0x26a)]))throw CliErrors[_0x513a76(0x263)]('SQL\x20metadata\x20requires\x20Client\x20AK.');return _0x1bb546['sql'][_0x513a76(0x26f)]({'appCode':_0x32b245,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x25e08b});}),_0x1fd451=_0x330b94&&typeof _0x330b94===_0x51b6(0x267)&&_0x51b6(0x231)in _0x330b94?_0x330b94[_0x51b6(0x231)]?.[0x0]:_0x330b94&&typeof _0x330b94===_0x51b6(0x267)&&_0x51b6(0x1bf)in _0x330b94?_0x330b94:undefined;if(!_0x1fd451)throw CliErrors[_0x51b6(0x263)](_0x51b6(0x200)+_0x25e08b);return _0x1fd451;}export async function listApprovalTodo(_0x2eafc3,_0x58b1ac=0x1,_0x5daf44=0x14){const _0x3ccc59=a108_0x37db,_0x21b770=await sdkRequest(_0x2eafc3,_0x4de155=>_0x4de155[_0x3ccc59(0x219)][_0x3ccc59(0x1fb)]({'currentPage':_0x58b1ac,'pageSize':_0x5daf44}));if(!_0x21b770||typeof _0x21b770!==_0x3ccc59(0x267)||!Array[_0x3ccc59(0x1c2)](_0x21b770[_0x3ccc59(0x1df)]))throw CliErrors[_0x3ccc59(0x224)](_0x3ccc59(0x1f7));return _0x21b770;}export async function getApprovalTaskDetail(_0x54d765,_0x174483){const _0x511ec7=a108_0x37db,_0x201190=await sdkRequest(_0x174483,_0xb6168a=>_0xb6168a['approval']['getTask'](_0x54d765));if(!_0x201190||typeof _0x201190!==_0x511ec7(0x267)||Array[_0x511ec7(0x1c2)](_0x201190))throw CliErrors[_0x511ec7(0x224)](_0x511ec7(0x22d));return _0x201190;}export async function approveApprovalTask(_0x26f914){const _0x563c66=a108_0x37db;return await sdkRequest(_0x26f914['appCode'],_0x1d95a8=>_0x1d95a8[_0x563c66(0x219)]['approve'](_0x26f914)),null;}export async function transferApprovalTask(_0x3ca1b8){const _0x3388c0=a108_0x37db;return await sdkRequest(_0x3ca1b8[_0x3388c0(0x256)],_0x7521ff=>_0x7521ff[_0x3388c0(0x219)][_0x3388c0(0x24e)](_0x3ca1b8)),null;}function isRemoteAppItem(_0x459502){const _0x471b7f=a108_0x37db;return!!_0x459502&&typeof _0x459502==='object'&&typeof _0x459502[_0x471b7f(0x256)]===_0x471b7f(0x232)&&typeof _0x459502['appName']==='string';}function extractRemoteAppItems(_0x7edf43){const _0x595a06=a108_0x37db;if(Array['isArray'](_0x7edf43))return _0x7edf43[_0x595a06(0x1cb)](isRemoteAppItem);if(!_0x7edf43||typeof _0x7edf43!==_0x595a06(0x267))throw CliErrors[_0x595a06(0x224)](_0x595a06(0x23e));const _0x4f64d8=_0x7edf43;if(Array['isArray'](_0x4f64d8[_0x595a06(0x231)]))return _0x4f64d8[_0x595a06(0x231)][_0x595a06(0x1cb)](isRemoteAppItem);if(_0x4f64d8[_0x595a06(0x20c)]&&typeof _0x4f64d8[_0x595a06(0x20c)]===_0x595a06(0x267)){const _0xba2450=_0x4f64d8[_0x595a06(0x20c)];if(Array['isArray'](_0xba2450[_0x595a06(0x231)]))return _0xba2450[_0x595a06(0x231)][_0x595a06(0x1cb)](isRemoteAppItem);}throw CliErrors[_0x595a06(0x224)](_0x595a06(0x215));}export async function getMyApps(){return extractRemoteAppItems(await identitySdkRequest(_0x382e12=>_0x382e12['myApps']()));}export async function getLoginUserInfo(){const _0x35f330=a108_0x37db,_0x25ea6d=await identitySdkRequest(_0x138ed6=>_0x138ed6[_0x35f330(0x1e4)]());if(!_0x25ea6d||typeof _0x25ea6d!=='object'||Array[_0x35f330(0x1c2)](_0x25ea6d))throw CliErrors[_0x35f330(0x224)](_0x35f330(0x254));return _0x25ea6d;}export const USER_ACCOUNT_BIND_PATH=a108_0x457f55(0x260);export async function bindExternalUserAccount(_0x2efb36,_0x3d9fb6){return identitySdkRequest(_0x1ccaac=>_0x1ccaac['bindAccount']({'provider':_0x2efb36,'accountId':_0x3d9fb6}));}function runtimeSchedulePath(_0x43e111,_0x816f7a=''){const _0x19634a=a108_0x457f55;return _0x19634a(0x251)+encodeURIComponent(_0x43e111)+_0x19634a(0x1b4)+_0x816f7a;}export async function validateRuntimeSchedule(_0x15da74,_0x11e70c){const _0xf2a889=a108_0x457f55,_0x165bca=await apiRequest(runtimeSchedulePath(_0x15da74,_0xf2a889(0x233)),{'domain':_0xf2a889(0x1e3),'method':'POST','body':_0x11e70c});return _0x165bca[_0xf2a889(0x20c)];}export async function createRuntimeSchedule(_0x476d53,_0x39c027){const _0x264839=a108_0x457f55,_0x20b068=await apiRequest(runtimeSchedulePath(_0x476d53),{'domain':'harness','method':_0x264839(0x28c),'body':_0x39c027});return _0x20b068[_0x264839(0x20c)];}export async function listRuntimeSchedules(_0x13e376,_0x3f5358){const _0x298e9d=a108_0x457f55,_0x402181=new URLSearchParams();_0x402181[_0x298e9d(0x1b8)](_0x298e9d(0x1cc),_0x3f5358[_0x298e9d(0x1cc)]);if(_0x3f5358['limit']!==undefined)_0x402181[_0x298e9d(0x1b8)](_0x298e9d(0x1cf),String(_0x3f5358[_0x298e9d(0x1cf)]));if(_0x3f5358[_0x298e9d(0x243)])_0x402181['set'](_0x298e9d(0x243),_0x3f5358[_0x298e9d(0x243)]);const _0x1e7702=_0x402181[_0x298e9d(0x25a)]>0x0?'?'+_0x402181[_0x298e9d(0x1eb)]():'',_0x151d40=await apiRequest(''+runtimeSchedulePath(_0x13e376)+_0x1e7702,{'domain':_0x298e9d(0x1e3)});return _0x151d40[_0x298e9d(0x20c)];}export async function getRuntimeSchedule(_0x17073d,_0x3fa082){const _0x50f213=a108_0x457f55,_0x23ee3d=await apiRequest(runtimeSchedulePath(_0x17073d,'/'+encodeURIComponent(_0x3fa082)),{'domain':'harness'});return _0x23ee3d[_0x50f213(0x20c)];}export async function deleteRuntimeSchedule(_0x1c72f3,_0x12b98a){const _0x1a39bb=a108_0x457f55,_0x1d6282=await apiRequest(runtimeSchedulePath(_0x1c72f3,'/'+encodeURIComponent(_0x12b98a)),{'domain':_0x1a39bb(0x1e3),'method':_0x1a39bb(0x1f9)});return _0x1d6282[_0x1a39bb(0x20c)];}export async function runRuntimeSchedule(_0x3cc6b2,_0x68698){const _0x305340=a108_0x457f55,_0x4a372d=await apiRequest(runtimeSchedulePath(_0x3cc6b2,'/'+encodeURIComponent(_0x68698)+_0x305340(0x1bc)),{'domain':_0x305340(0x1e3),'method':'POST'});return _0x4a372d[_0x305340(0x20c)];}export async function listDatasets(_0x17ca56,_0x11a179){const _0xa3c901=a108_0x457f55,_0x2c7ff6=await sdkRequest(_0x17ca56,_0x5f123a=>_0x5f123a['datasetMeta'][_0xa3c901(0x1d0)]({..._0x11a179?.['code']&&{'code':_0x11a179['code']},..._0x11a179?.['name']&&{'name':_0x11a179[_0xa3c901(0x274)]},..._0x11a179?.[_0xa3c901(0x286)]&&{'tableName':_0x11a179[_0xa3c901(0x286)]}}));return extractList(_0x2c7ff6);}export async function getDatasetDetail(_0x4ee22b){const _0x14f6a5=a108_0x457f55;return sdkRequest(undefined,_0xa376ad=>_0xa376ad['datasetMeta'][_0x14f6a5(0x236)]({'code':_0x4ee22b}));}function importSdkRequest(_0x5cedeb,_0x2cb243,_0x18bacd){return sdkRequest(_0x5cedeb,_0x1347bc=>{const _0x1b4653=a108_0x37db,_0x215031=_0x1347bc[_0x1b4653(0x1d2)](_0x1b4653(0x257)+_0x2cb243);if(!(_0x215031 instanceof ClientAkModel))throw CliErrors['validation'](_0x1b4653(0x291));return _0x18bacd(_0x215031);});}export async function getDatasetImportContract(_0x39c909,_0x36a5d0){return importSdkRequest(_0x39c909,_0x36a5d0,_0x57f73a=>_0x57f73a['importContract']());}export async function createDatasetImportBatch(_0x5735eb,_0x241fd3,_0x59389f){const _0x51228d=a108_0x457f55;return importSdkRequest(_0x5735eb,_0x241fd3,_0x5b9a55=>_0x5b9a55[_0x51228d(0x288)](_0x59389f));}export async function readDatasetImportRows(_0x341119,_0x27550c,_0x219fcd){const _0x2cd2a8=a108_0x457f55,_0x2372c4=await importSdkRequest(_0x341119,_0x27550c,_0x4f5775=>_0x4f5775['importReadback']({'ids':_0x219fcd}));if(!_0x2372c4||!Array[_0x2cd2a8(0x1c2)](_0x2372c4[_0x2cd2a8(0x1be)]))throw CliErrors[_0x2cd2a8(0x224)](_0x2cd2a8(0x270));return _0x2372c4[_0x2cd2a8(0x1be)];}export async function readDatasetImportTaskRows(_0x3fc78b,_0x5e6676,_0x3a14eb){const _0x330c2e=a108_0x457f55,_0x13a135=await importSdkRequest(_0x3fc78b,_0x5e6676,_0x47faeb=>_0x47faeb[_0x330c2e(0x21a)]({'taskId':_0x3a14eb}));if(!_0x13a135||!Array['isArray'](_0x13a135[_0x330c2e(0x1be)]))throw CliErrors[_0x330c2e(0x224)](_0x330c2e(0x22f));return _0x13a135[_0x330c2e(0x1be)];}export async function uploadDatasetImportImage(_0x812452,_0x8a46ac,_0x40bc94,_0x42eb33){const _0x49f03c=a108_0x457f55;return importSdkRequest(_0x812452,_0x8a46ac,_0x509380=>_0x509380[_0x49f03c(0x1b9)]({'importId':_0x40bc94,'contentHash':_0x42eb33[_0x49f03c(0x1f5)],'file':new Blob([new Uint8Array(_0x42eb33[_0x49f03c(0x22e)])],{'type':_0x42eb33[_0x49f03c(0x26b)]}),'fileName':_0x49f03c(0x281)}));}export async function readDatasetImportImage(_0x4b1ed9,_0x520781,_0x52ef42,_0x795e04){const _0x35e603=a108_0x457f55;return importSdkRequest(_0x4b1ed9,_0x520781,_0x53cbe3=>_0x53cbe3[_0x35e603(0x25c)]({'importId':_0x52ef42,'contentHash':_0x795e04[_0x35e603(0x1f5)],'type':_0x795e04[_0x35e603(0x26b)],'size':_0x795e04['size']}));}export async function getDatasetSdkUsageDoc(_0x112431,_0x4eeabe){const _0x4b15fc=a108_0x457f55,_0x384151=await toolboxRequest(_0x4b15fc(0x201),{'datasetCode':_0x112431,'appCode':_0x4eeabe});return typeof _0x384151?.[_0x4b15fc(0x247)]===_0x4b15fc(0x232)?_0x384151[_0x4b15fc(0x247)]:'';}export async function uploadRuntimeFile(_0x4617fe,_0x40fa00){const _0x4ce79b=a108_0x457f55,_0x1f795b=await readFile(_0x40fa00);return sdkRequest(_0x4617fe,_0x1895cc=>_0x1895cc[_0x4ce79b(0x1c3)][_0x4ce79b(0x1d1)][_0x4ce79b(0x25b)]({'file':new Blob([new Uint8Array(_0x1f795b)]),'fileName':basename(_0x40fa00)}));}export async function queryRuntimeFileUrl(_0x3d01ff,_0x3666a6={}){const _0x5e6190=a108_0x457f55;return sdkRequest(undefined,_0x316bd5=>_0x316bd5['services'][_0x5e6190(0x1d1)][_0x5e6190(0x276)]({'filePath':_0x3d01ff,..._0x3666a6}));}export async function recognizeRuntimeOcr(_0x53493d,_0x589a3b){const _0x14758c=a108_0x457f55;return sdkRequest(_0x53493d,_0x325c6f=>_0x325c6f[_0x14758c(0x1c3)][_0x14758c(0x1f8)]['recognize'](_0x589a3b));}export async function getRuntimeAppConfigByKey(_0x1cfc23,_0x2b7fb9){const _0x2abf7d=a108_0x457f55,_0x2b4766=await sdkRequest(_0x1cfc23,_0x20cc13=>_0x20cc13['app'][_0x2abf7d(0x20a)](_0x2b7fb9));if(typeof _0x2b4766!==_0x2abf7d(0x232))throw CliErrors[_0x2abf7d(0x263)]('Invalid\x20app\x20config\x20value:\x20key='+_0x2b7fb9);return _0x2b4766;}function a108_0x37db(_0x59a879,_0x59287f){_0x59a879=_0x59a879-0x1af;const _0x4cab57=a108_0x4cab();let _0x37dba1=_0x4cab57[_0x59a879];return _0x37dba1;}export async function listNotificationChannelConfigs(_0x10d756,_0x3bc44d){const _0x4feb5d=a108_0x457f55,_0x37fd61=await sdkRequest(_0x10d756,_0x32b4d5=>_0x32b4d5[_0x4feb5d(0x24f)][_0x4feb5d(0x202)](_0x3bc44d));if(!Array['isArray'](_0x37fd61))throw CliErrors[_0x4feb5d(0x224)]('Invalid\x20notification\x20config\x20list\x20response.',_0x4feb5d(0x1f0));return _0x37fd61;}export async function listRuntimeArtifacts(_0x45b535,_0x35e311){const _0x17e46b=a108_0x457f55,_0x167667=await sdkRequest(_0x45b535,_0x9e8d37=>_0x9e8d37['artifact'][_0x17e46b(0x1d0)](_0x35e311));return Array[_0x17e46b(0x1c2)](_0x167667)?_0x167667:[];}export async function getRuntimeArtifact(_0x2cc443,_0x423673){const _0x220a8a=a108_0x457f55,_0x4fcc0b=await sdkRequest(_0x423673,_0x28d455=>_0x28d455['artifact'][_0x220a8a(0x26c)](_0x2cc443));if(!_0x4fcc0b)throw CliErrors[_0x220a8a(0x263)](_0x220a8a(0x26d)+_0x2cc443);return _0x4fcc0b;}export async function createRuntimeArtifact(_0x48cedc,_0x38fb42){const _0x17d79b=a108_0x457f55;return sdkRequest(_0x48cedc,_0x34d917=>_0x34d917['artifact'][_0x17d79b(0x1d8)](_0x38fb42));}export async function updateRuntimeArtifact(_0x23f469,_0x327ae9,_0x406b6f){const _0x7f1944=a108_0x457f55;return sdkRequest(_0x327ae9,_0x4ed248=>_0x4ed248[_0x7f1944(0x269)][_0x7f1944(0x28a)](_0x23f469,_0x406b6f));}export async function listPersonalBffs(_0x297f0a){const _0x5ecb49=a108_0x457f55,_0x111281=await sdkRequest(_0x297f0a,_0xc2298d=>_0xc2298d[_0x5ecb49(0x1e6)][_0x5ecb49(0x1b1)][_0x5ecb49(0x1d0)]());return Array['isArray'](_0x111281)?_0x111281:[];}export async function getPersonalBff(_0x24c239,_0x11d08c){const _0x18045d=a108_0x457f55,_0x5e4131=await sdkRequest(_0x11d08c,_0x2387e6=>_0x2387e6[_0x18045d(0x1e6)][_0x18045d(0x1b1)][_0x18045d(0x26c)](_0x24c239));if(!_0x5e4131)throw CliErrors[_0x18045d(0x263)]('Personal\x20Backend\x20Function\x20not\x20found:\x20id='+_0x24c239);return _0x5e4131;}export async function createPersonalBff(_0x3efdc1,_0x14d234){const _0x142166=a108_0x457f55;return sdkRequest(_0x3efdc1,_0x11f790=>_0x11f790[_0x142166(0x1e6)][_0x142166(0x1b1)]['create'](_0x14d234));}export async function updatePersonalBff(_0x4862ba,_0x1aaa58,_0x30d6df){const _0x231137=a108_0x457f55;return sdkRequest(_0x1aaa58,_0x49fd21=>_0x49fd21[_0x231137(0x1e6)][_0x231137(0x1b1)][_0x231137(0x28a)](_0x4862ba,_0x30d6df));}export async function executePersonalBff(_0x3a207e,_0x1ee1b6,_0x142d39){const _0x56c990=a108_0x457f55;return sdkRequest(_0x1ee1b6,_0x385970=>_0x385970[_0x56c990(0x1e6)][_0x56c990(0x1b1)][_0x56c990(0x1f6)]({'scriptId':_0x3a207e,'params':_0x142d39}));}export async function listPersonalKnowledgeBaseItems(_0x51c1bd,_0x213cd1){return listPersonalKnowledge({'appCode':_0x51c1bd,'accessKey':_activeAK,'signal':_0x213cd1});}export async function getPersonalKnowledgeBaseItem(_0x2177eb,_0x2557b1,_0x3381bf){return getPersonalKnowledge({'appCode':_0x2557b1,'accessKey':_activeAK,'signal':_0x3381bf},_0x2177eb);}export async function createPersonalKnowledgeBaseItem(_0x5c51b5,_0xe48165,_0x308fbf){return savePersonalKnowledge({'appCode':_0x5c51b5,'accessKey':_activeAK,'signal':_0x308fbf},_0xe48165);}export async function updatePersonalKnowledgeBaseItem(_0x93fc04,_0xe096ae,_0x2875e5,_0x334b49){return savePersonalKnowledge({'appCode':_0xe096ae,'accessKey':_activeAK,'signal':_0x334b49},_0x2875e5,_0x93fc04);}export async function getRuntimeSkillByCode(_0x1674d7,_0x49c400){const _0x50ef72=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x1674d7)+'/'+encodeURIComponent(_0x49c400),{'allowNotFound':!![]});return _0x50ef72?skillHubRuntimeDetailToRuntimeSkill(_0x50ef72):undefined;}export async function listRuntimeSkills(_0x44db86){const _0x462f18=a108_0x457f55,_0x50cddf=await skillHubJsonRequest(_0x462f18(0x21e)+encodeURIComponent(_0x44db86[_0x462f18(0x256)])+_0x462f18(0x1ee),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x44db86[_0x462f18(0x256)],_0x50cddf,_0x44db86['scope']??_0x462f18(0x283),_0x44db86['code'],_0x44db86[_0x462f18(0x22b)]);}export async function listPersonalRuntimeSkills(_0x2a646c){const _0x575041=a108_0x457f55;return(await listRuntimeSkills({'appCode':_0x2a646c,'scope':'personal'}))[_0x575041(0x1e6)];}export async function listCompanyRuntimeSkills(_0x413332){const _0x147048=a108_0x457f55;return(await listRuntimeSkills({'appCode':_0x413332,'scope':_0x147048(0x220)}))[_0x147048(0x220)];}export async function listVisibleRuntimeSkills(_0x53ddb8){const _0x19d4a4=a108_0x457f55;return(await listRuntimeSkills({'appCode':_0x53ddb8,'scope':'all'}))[_0x19d4a4(0x1c4)];}export async function createPersonalRuntimeSkill(_0x2c3e0b,_0x1b333e,_0x14052c={}){const _0x294196=a108_0x457f55;return publishRuntimeSkill(_0x2c3e0b,_0x1b333e,{'visibility':_0x294196(0x214),'confirmWarnings':_0x14052c['confirmWarnings']});}export async function updatePersonalRuntimeSkill(_0x152df5,_0x561c1f,_0x393896,_0x44930d={}){const _0x3ce455=a108_0x457f55;return publishRuntimeSkill(_0x561c1f,{..._0x393896,'skillCode':_0x393896[_0x3ce455(0x1db)]??_0x152df5},{'visibility':_0x3ce455(0x214),'confirmWarnings':_0x44930d[_0x3ce455(0x244)]});}export async function publishCompanyRuntimeSkill(_0x236f2f,_0x118ef1,_0x366dd4={}){const _0x4aa41e=a108_0x457f55;return publishRuntimeSkill(_0x236f2f,_0x118ef1,{'visibility':_0x4aa41e(0x1ea),'confirmWarnings':_0x366dd4[_0x4aa41e(0x244)]});}export async function validateRuntimeSkillPublish(_0x285dae,_0x3e51cb,_0x16c2fe){const _0x323550=a108_0x457f55,_0x56df60=buildRuntimeSkillPublishForm(_0x3e51cb,_0x16c2fe['visibility']),_0x395c13=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x285dae)+_0x323550(0x249),{'method':'POST','body':_0x56df60});return assertJointDiagramAcknowledged(_0x3e51cb['diagram'],_0x395c13[_0x323550(0x255)],_0x323550(0x263)),{'valid':_0x395c13[_0x323550(0x27f)]===!![],'errors':Array[_0x323550(0x1c2)](_0x395c13[_0x323550(0x1d7)])?_0x395c13[_0x323550(0x1d7)]:[],'warnings':Array[_0x323550(0x1c2)](_0x395c13[_0x323550(0x222)])?_0x395c13[_0x323550(0x222)]:[],'resolvedSlug':_0x395c13[_0x323550(0x21d)],'resolvedVersion':_0x395c13['resolvedVersion'],'diagramValidated':_0x395c13['diagramValidated']===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x3dadcc,_0x5a295b,_0x2e0695,_0x30cf48,_0x25d03a){const _0x7466e1=a108_0x457f55;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x3dadcc,_0x5a295b,_0x2e0695,'/validate'),{'method':'POST','query':{'scope':_0x30cf48},'headers':{'Content-Type':_0x7466e1(0x1e7)},'body':JSON['stringify'](_0x25d03a)});}export async function putRuntimeSkillVersionDiagram(_0x1b2c1e,_0x4813d6,_0xb90a85,_0x248e37,_0xc6b0be){const _0x45b961=a108_0x457f55;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x1b2c1e,_0x4813d6,_0xb90a85),{'method':_0x45b961(0x223),'query':{'scope':_0x248e37},'headers':{'Content-Type':_0x45b961(0x1e7)},'body':JSON[_0x45b961(0x1fd)](_0xc6b0be)});}export async function getRuntimeSkillVersionDiagram(_0x2a78a7,_0x4c26da,_0x25dcb2,_0x513719){const _0x3551f8=a108_0x457f55,_0x327d72=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x2a78a7,_0x4c26da,_0x25dcb2),{'query':{'scope':_0x513719}});if(typeof _0x327d72['found']!=='boolean')throw CliErrors[_0x3551f8(0x224)](_0x3551f8(0x1ed));const _0xda8d17=_0x327d72['sourceFingerprint'];if(typeof _0xda8d17!==_0x3551f8(0x232)||!/^sha256:[0-9a-f]{64}$/['test'](_0xda8d17))throw CliErrors[_0x3551f8(0x224)](_0x3551f8(0x282),_0x3551f8(0x1fa));const _0x4a0fda=_0x327d72['diagramRevision'];if(_0x327d72[_0x3551f8(0x1b0)]&&(!Number[_0x3551f8(0x265)](_0x4a0fda)||Number(_0x4a0fda)<0x1))throw CliErrors[_0x3551f8(0x224)](_0x3551f8(0x26e));if(!_0x327d72[_0x3551f8(0x1b0)]&&_0x4a0fda!==undefined&&_0x4a0fda!==null)throw CliErrors['apiError'](_0x3551f8(0x292));const _0x13a5a5=_0x327d72[_0x3551f8(0x1b0)]?Number(_0x4a0fda):null;return{..._0x327d72,'sourceFingerprint':_0xda8d17,'diagramRevision':_0x13a5a5,'expectedDiagramRevision':_0x13a5a5??0x0};}export async function downloadRuntimeSkillPackage(_0x4feeb6,_0x1f60e0,_0x38e634,_0x2ed44a){const _0x5a6e18=a108_0x457f55;void _0x4feeb6;const _0x4ea90c=_0x2ed44a?_0x5a6e18(0x279)+encodeURIComponent(_0x38e634)+'/'+encodeURIComponent(_0x1f60e0)+_0x5a6e18(0x229)+encodeURIComponent(_0x2ed44a)+_0x5a6e18(0x1ef):_0x5a6e18(0x279)+encodeURIComponent(_0x38e634)+'/'+encodeURIComponent(_0x1f60e0)+_0x5a6e18(0x1ef);return skillHubBinaryRequest(_0x4ea90c);}async function publishRuntimeSkill(_0x2fbc9d,_0x1f4015,_0x1a7461){const _0x2649c6=a108_0x457f55,_0x407ef9=buildRuntimeSkillPublishForm(_0x1f4015,_0x1a7461[_0x2649c6(0x1b7)]),_0x23ba84=await skillHubJsonRequest(_0x2649c6(0x279)+encodeURIComponent(_0x2fbc9d)+_0x2649c6(0x1af),{'method':_0x2649c6(0x28c),'query':{'confirmWarnings':_0x1a7461[_0x2649c6(0x244)]===!![]?!![]:undefined},'body':_0x407ef9});return assertJointDiagramAcknowledged(_0x1f4015[_0x2649c6(0x1dc)],_0x23ba84[_0x2649c6(0x285)],'publish'),{'appCode':_0x23ba84[_0x2649c6(0x272)]??_0x2fbc9d,'skillCode':_0x23ba84[_0x2649c6(0x239)]??_0x1f4015[_0x2649c6(0x1db)]??'','skillName':_0x1f4015['skillName']??_0x23ba84[_0x2649c6(0x239)]??_0x1f4015[_0x2649c6(0x1db)],'description':_0x1f4015[_0x2649c6(0x20d)],'scope':skillHubVisibilityToScope(_0x23ba84['visibility']??_0x1a7461[_0x2649c6(0x1b7)])??_0x2649c6(0x1e6),'version':_0x23ba84['version']??_0x1f4015['version'],'tags':_0x1f4015['tags'],'content':_0x1f4015[_0x2649c6(0x27a)],'diagramBound':_0x23ba84[_0x2649c6(0x285)]===!![]};}function assertJointDiagramAcknowledged(_0x3a70cd,_0x2b20e7,_0x43b396){const _0x322c31=a108_0x457f55;if(!_0x3a70cd||_0x2b20e7===!![])return;throw CliErrors[_0x322c31(0x224)](_0x322c31(0x1d5)+_0x43b396+'.',_0x322c31(0x23f));}function buildRuntimeSkillPublishForm(_0x43c9a4,_0x2b1dce){const _0x4478ec=a108_0x457f55,_0x382eeb=new FormData();return _0x382eeb[_0x4478ec(0x1b8)](_0x4478ec(0x1d1),runtimeSkillPackageFile(_0x43c9a4)),_0x43c9a4[_0x4478ec(0x226)]?.['trim']()&&_0x382eeb['set'](_0x4478ec(0x21c),_0x43c9a4[_0x4478ec(0x226)][_0x4478ec(0x1cd)]()),_0x382eeb[_0x4478ec(0x1b8)](_0x4478ec(0x1b7),_0x2b1dce),_0x43c9a4[_0x4478ec(0x1dc)]&&_0x382eeb[_0x4478ec(0x1b8)](_0x4478ec(0x1dc),new Blob([JSON[_0x4478ec(0x1fd)](_0x43c9a4[_0x4478ec(0x1dc)])],{'type':_0x4478ec(0x1e7)})),_0x382eeb;}function runtimeSkillVersionDiagramPath(_0x746bd3,_0xf94b42,_0x325464,_0x50a6bc=''){const _0x3c78e1=a108_0x457f55;return _0x3c78e1(0x279)+encodeURIComponent(_0x746bd3)+'/'+encodeURIComponent(_0xf94b42)+'/versions/'+encodeURIComponent(_0x325464)+_0x3c78e1(0x210)+_0x50a6bc;}function runtimeSkillPackageFile(_0x5722ea){const _0x27243b=a108_0x457f55;if(!_0x5722ea[_0x27243b(0x218)])throw CliErrors['validation'](_0x27243b(0x27b));const _0x9902b4=Buffer['from'](_0x5722ea[_0x27243b(0x218)],_0x27243b(0x261)),_0x5c5859=new Blob([_0x9902b4],{'type':_0x27243b(0x25f)}),_0x5bbd79=(_0x5722ea[_0x27243b(0x1db)]||'skill')+_0x27243b(0x1c1);if(typeof File!=='undefined')return new File([_0x5c5859],_0x5bbd79,{'type':_0x27243b(0x25f)});return _0x5c5859;}function normalizeSkillHubRuntimeListResponse(_0x2084fe,_0x46dd56,_0x46cf90,_0x760f07,_0xe060b8=![]){const _0x3223e0=a108_0x457f55,_0x3cf7f0=Array[_0x3223e0(0x1c2)](_0x46dd56)?_0x46dd56:Array['isArray'](_0x46dd56?.[_0x3223e0(0x1be)])?_0x46dd56['items']:[],_0x618aff=_0x760f07?.['trim'](),_0x3dc71=_0x3cf7f0[_0x3223e0(0x1cb)](_0x4de159=>!_0x618aff||_0x4de159['slug']===_0x618aff)[_0x3223e0(0x1cb)](_0x7f00b1=>!_0xe060b8||_0x7f00b1[_0x3223e0(0x1b5)]?.[_0x3223e0(0x1bb)]===_0x3223e0(0x268)&&Boolean(_0x7f00b1['publishedVersion'][_0x3223e0(0x208)]?.[_0x3223e0(0x1cd)]()))['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x2610e0=>Boolean(_0x2610e0)),_0x34467d=_0x3dc71[_0x3223e0(0x1cb)](_0x5ce301=>_0x5ce301[_0x3223e0(0x20b)]===_0x3223e0(0x1e6)),_0x1e458c=_0x3dc71[_0x3223e0(0x1cb)](_0x420b99=>_0x420b99[_0x3223e0(0x20b)]===_0x3223e0(0x220));return{'appCode':_0x2084fe,'personal':_0x46cf90===_0x3223e0(0x220)?[]:_0x34467d,'company':_0x46cf90==='personal'?[]:_0x1e458c,'effective':buildEffectiveRuntimeSkills(_0x34467d,_0x1e458c,_0x46cf90)};}function skillHubRuntimeItemToRuntimeSkill(_0x2046b3){const _0x7be4dc=a108_0x457f55,_0x6aebfc=_0x2046b3[_0x7be4dc(0x239)]?.[_0x7be4dc(0x1cd)](),_0x505d1f=skillHubVisibilityToScope(_0x2046b3['visibility']);if(!_0x6aebfc||!_0x505d1f)return undefined;return{'id':_0x2046b3['id'],'appCode':_0x2046b3[_0x7be4dc(0x272)],'skillCode':_0x6aebfc,'skillName':_0x2046b3['displayName']??_0x6aebfc,'description':_0x2046b3[_0x7be4dc(0x250)],'example':_0x2046b3['example'],'scope':_0x505d1f,'version':skillHubRuntimeItemVersion(_0x2046b3),'status':_0x2046b3[_0x7be4dc(0x1bb)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x2947af){const _0x1e5365=a108_0x457f55,_0x28ddc2=_0x2947af[_0x1e5365(0x239)]?.[_0x1e5365(0x1cd)]();if(!_0x28ddc2)return undefined;return{'id':_0x2947af['id'],'appCode':_0x2947af[_0x1e5365(0x272)],'skillCode':_0x28ddc2,'skillName':_0x2947af['displayName']??_0x28ddc2,'description':_0x2947af[_0x1e5365(0x250)],'example':_0x2947af[_0x1e5365(0x22c)],'scope':skillHubVisibilityToScope(_0x2947af['visibility'])??_0x2947af['visibility']?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x2947af),'status':_0x2947af['status']};}function skillHubVisibilityToScope(_0x58c789){const _0x4bf9f0=a108_0x457f55;if(_0x58c789===_0x4bf9f0(0x214))return _0x4bf9f0(0x1e6);if(_0x58c789===_0x4bf9f0(0x1ea))return _0x4bf9f0(0x220);return undefined;}function skillHubRuntimeItemVersion(_0x3119f2){const _0x3b3602=a108_0x457f55;return _0x3119f2[_0x3b3602(0x1b5)]?.[_0x3b3602(0x208)]??_0x3119f2[_0x3b3602(0x225)]?.[_0x3b3602(0x208)]??_0x3119f2['ownerPreviewVersion']?.[_0x3b3602(0x208)];}function buildEffectiveRuntimeSkills(_0x1003ea,_0x647d29,_0x521afc){const _0x2328a7=a108_0x457f55;if(_0x521afc==='personal')return _0x1003ea;if(_0x521afc===_0x2328a7(0x220))return _0x647d29;const _0x51f57f=new Map();for(const _0x5218ec of _0x647d29){_0x51f57f[_0x2328a7(0x1b8)](_0x5218ec['skillCode'],_0x5218ec);}for(const _0x4c4fdb of _0x1003ea){_0x51f57f[_0x2328a7(0x1b8)](_0x4c4fdb[_0x2328a7(0x1db)],_0x4c4fdb);}return Array[_0x2328a7(0x28b)](_0x51f57f[_0x2328a7(0x227)]());}function normalizeRuntimeSkillListResponse(_0x37be49,_0x4d812f){const _0x441fbf=a108_0x457f55;if(Array['isArray'](_0x4d812f)){const _0x244e0c=_0x4d812f['filter'](_0x3e32d4=>_0x3e32d4[_0x441fbf(0x20b)]==='personal'),_0x4eb91a=_0x4d812f['filter'](_0x9ee199=>_0x9ee199[_0x441fbf(0x20b)]===_0x441fbf(0x220));return{'appCode':_0x37be49,'personal':_0x244e0c,'company':_0x4eb91a,'effective':[..._0x4eb91a,..._0x244e0c]};}return{'appCode':_0x4d812f?.[_0x441fbf(0x256)]??_0x37be49,'personal':Array[_0x441fbf(0x1c2)](_0x4d812f?.[_0x441fbf(0x1e6)])?_0x4d812f[_0x441fbf(0x1e6)]:[],'company':Array['isArray'](_0x4d812f?.[_0x441fbf(0x220)])?_0x4d812f['company']:[],'effective':Array[_0x441fbf(0x1c2)](_0x4d812f?.['effective'])?_0x4d812f['effective']:[]};}function normalizeRuntimeRoleUserList(_0x555576,_0x25dc6c){const _0xcc9867=a108_0x457f55;if(!Array[_0xcc9867(0x1c2)](_0x555576))throw CliErrors['apiError']('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x25dc6c+_0xcc9867(0x290));return _0x555576[_0xcc9867(0x246)]((_0x4831e3,_0x1b8fe3)=>{const _0x196ecb=_0xcc9867;if(!_0x4831e3||typeof _0x4831e3!==_0x196ecb(0x267)||Array[_0x196ecb(0x1c2)](_0x4831e3))throw CliErrors[_0x196ecb(0x224)](_0x196ecb(0x259)+_0x25dc6c+'['+_0x1b8fe3+_0x196ecb(0x1f3));const _0x34d5ea=_0x4831e3,_0x2c99b9=normalizeRuntimeUserId(_0x34d5ea[_0x196ecb(0x1ce)]);if(_0x2c99b9===undefined)throw CliErrors[_0x196ecb(0x224)](_0x196ecb(0x259)+_0x25dc6c+'['+_0x1b8fe3+_0x196ecb(0x1fe));return{..._0x34d5ea,'userId':_0x2c99b9};});}function normalizeRuntimeRoleUsersResponse(_0x42a424){const _0x36a246=a108_0x457f55;return extractList(_0x42a424)[_0x36a246(0x246)]((_0x389e81,_0x50067f)=>{const _0x190283=_0x36a246;if(!_0x389e81||typeof _0x389e81!==_0x190283(0x267)||Array['isArray'](_0x389e81))throw CliErrors[_0x190283(0x224)](_0x190283(0x278)+_0x50067f+']\x20must\x20be\x20an\x20object.');const _0xe167ed=_0x389e81;return{..._0xe167ed,'userList':normalizeRuntimeRoleUserList(_0xe167ed[_0x190283(0x1da)],'roleList['+_0x50067f+'].userList'),..._0xe167ed[_0x190283(0x1c9)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0xe167ed[_0x190283(0x1c9)],'roleList['+_0x50067f+_0x190283(0x1ba))}};});}export async function listRuntimeAppRoles(_0x2c4387,_0x14b041={}){const _0x3f151c=a108_0x457f55,_0x6a62cb=_0x14b041[_0x3f151c(0x1d3)]??0x1,_0x265b45=Math['min'](Math[_0x3f151c(0x23c)](_0x14b041[_0x3f151c(0x217)]??0x64,0x1),0x64),_0x3f722f=await sdkRequest(_0x2c4387,_0x54ba69=>_0x54ba69[_0x3f151c(0x264)][_0x3f151c(0x238)]({..._0x14b041[_0x3f151c(0x293)]?{'roleName':_0x14b041[_0x3f151c(0x293)]}:{},'currentPage':_0x6a62cb,'pageSize':_0x265b45}));return{'items':extractList(_0x3f722f),'paging':extractPaging(_0x3f722f)};}export async function createRuntimeAppRole(_0x45ea50){const _0x1c24c1=a108_0x457f55;return sdkRequest(_0x45ea50[_0x1c24c1(0x256)],_0x1bd79f=>_0x1bd79f[_0x1c24c1(0x264)][_0x1c24c1(0x1d4)]({'roleType':_0x1c24c1(0x1c6),..._0x45ea50}));}export async function updateRuntimeAppRole(_0x9fd6c4){const _0x19cb05=a108_0x457f55;return sdkRequest(_0x9fd6c4[_0x19cb05(0x256)],_0x470022=>_0x470022[_0x19cb05(0x264)][_0x19cb05(0x262)](_0x9fd6c4));}export async function deleteRuntimeAppRole(_0x1bd62c){const _0x53e9b8=a108_0x457f55;return sdkRequest(undefined,_0x47a005=>_0x47a005[_0x53e9b8(0x264)][_0x53e9b8(0x1f4)](_0x1bd62c));}export async function listRuntimeRoleUsers(_0x2f2e42){const _0x1a70a8=a108_0x457f55,_0x455c20=await sdkRequest(_0x2f2e42,_0x5beb1d=>_0x5beb1d[_0x1a70a8(0x264)][_0x1a70a8(0x1f1)]());return normalizeRuntimeRoleUsersResponse(_0x455c20);}export async function updateRuntimeRoleUsers(_0x4644e4,_0x2256f9){return sdkRequest(_0x4644e4,_0x11dd86=>_0x11dd86['permit']['updateRoleUserList']({'roleList':_0x2256f9}));}export async function listRuntimeAppUsers(_0x28d9c6){const _0x317afc=a108_0x457f55,_0x189531=await sdkRequest(_0x28d9c6,_0x956b6f=>_0x956b6f[_0x317afc(0x264)][_0x317afc(0x1e0)]());return extractList(_0x189531);}export async function listRuntimePermitRoles(_0x4a3ad1,_0x3b3507={}){const _0x3a4aba=a108_0x457f55,_0x431a52=await sdkRequest(_0x4a3ad1,_0x34d85f=>_0x34d85f[_0x3a4aba(0x264)]['getRolePermitList'](_0x3b3507));return extractList(_0x431a52);}export async function getRuntimePagePermit(_0x38240f){const _0x11d5b6=a108_0x457f55;return sdkRequest(undefined,_0x4f3594=>_0x4f3594['permit'][_0x11d5b6(0x1d6)](_0x38240f));}export async function saveRuntimePagePermit(_0x281f3c){const _0x5a3c9a=a108_0x457f55;return sdkRequest(_0x281f3c[_0x5a3c9a(0x256)],_0x465c01=>_0x465c01['permit'][_0x5a3c9a(0x25e)](_0x281f3c));}export async function getRuntimeRoleMenuResources(_0x103d9d,_0x2128c1){const _0x26cfc5=a108_0x457f55,_0x491e72=await sdkRequest(_0x103d9d,_0x2d1029=>_0x2d1029[_0x26cfc5(0x264)][_0x26cfc5(0x241)]({'roleId':_0x2128c1}));return extractList(_0x491e72);}export async function listRuntimeMenuRolePermits(_0x215732){const _0x4f7d4d=a108_0x457f55,_0x1a000a=await sdkRequest(_0x215732,_0x5b616f=>_0x5b616f['permit'][_0x4f7d4d(0x22a)]());return Array[_0x4f7d4d(0x1c2)](_0x1a000a?.[_0x4f7d4d(0x1e5)])?_0x1a000a['permitList']:[];}export async function saveRuntimeMenuRolePermits(_0x2e6b2b,_0x2550de){const _0x5a795=a108_0x457f55;return sdkRequest(_0x2e6b2b,_0x591270=>_0x591270['permit'][_0x5a795(0x23a)]({'permitList':_0x2550de}));}function a108_0x4cab(){const _0x2a232d=['type','get','Artifact\x20not\x20found:\x20id=','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','query','Invalid\x20import\x20readback\x20response.','SkillHub\x20error\x20code:\x20','namespace','success','name','errorMsg','queryUrl','number','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','/api/cli/v1/skills/','content','Missing\x20Skill\x20package\x20payload.','functions','abort','code','valid','Toolbox\x20API\x20error:\x20','image','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','all','find','diagramBound','tableName','arrayBuffer','importBatch','api','update','from','POST','getEndpoint','signal','API\x20error\x20code:\x20','\x20must\x20be\x20an\x20array.','Dataset\x20import\x20requires\x20Client\x20AK.','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','roleName','/publish','found','bff','Runtime\x20SDK\x20request\x20failed.','error','/schedules','publishedVersion','headers','visibility','set','importImage','].applyUserList','status','/run','msg','items','sqlCode','functionName','.zip','isArray','services','effective','isJson','CUSTOM','message','AbortError','applyUserList','Download\x20failed:\x20','filter','kind','trim','userId','limit','list','file','getModel','currentPage','createRole','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','getPagePermit','errors','create','getDatasetPermitMeta','userList','skillCode','diagram','Check\x20your\x20credentials\x20and\x20try\x20again.','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','records','queryAppUsers','authRequired','function','harness','loginUserInfo','permitList','personal','application/json','runtime','5367342yzrFdV','NAMESPACE_ONLY','toString','json','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','/skills','/download','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','getRoleUserList','2dHLKKp',']\x20must\x20be\x20an\x20object.','deleteRole','contentHash','execute','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','ocr','DELETE','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','listTodo','entries','stringify','].userId\x20is\x20invalid.','Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.','SQL\x20query\x20not\x20found:\x20','api-doc-generator','listNotificationChannels','join','Toolbox\x20error\x20code:\x20','2345850GCwclO','Request\x20timeout:\x20',',\x20name=','version','96598zSAqnq','getConfigByKey','scope','data','description','newConfigFileName','replace','/diagram','10iJhfrS','4617910pGevJo','getDatasetPermitList','PRIVATE','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','boolean','pageSize','packageBase64','approval','importReadback','1009314IHrXZf','displayName','resolvedSlug','/api/runtime/v1/namespaces/','client-ak','company','application/octet-stream','warnings','PUT','apiError','headlineVersion','skillName','values','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/versions/','getMenuPermitList','installableOnly','example','Invalid\x20approval\x20task\x20detail\x20response.','bytes','Invalid\x20import\x20task\x20readback\x20response.','API\x20error:\x20','tableData','string','/validate','saveDatasetPermits','invokeSource','getDrivenData','response','getRoleList','slug','saveMenuPermits','273687BkrbTa','max','text','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','/api/node-toolbox/','getResourceMenuList','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','cursor','confirmWarnings','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','map','markdown','SkillHub\x20API\x20error:\x20','/publish/validate','searchParams','errorCode','8HKgHDB','230489YcnDDU','transfer','app','summary','/api/harness/apps/','20QDCufl','GET','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','diagramValidated','appCode','dataset_','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Invalid\x20runtime\x20role\x20members\x20response:\x20','size','upload','importImageReadback','Configure\x20accessKey\x20in\x20','savePagePermit','application/zip','/client/user-accounts/bind','base64','updateRole','validation','permit','isInteger','Toolbox\x20API\x20error','object','PUBLISHED','artifact','sql'];a108_0x4cab=function(){return _0x2a232d;};return a108_0x4cab();}export async function listRuntimeDatasetPermits(_0x930261,_0xb55e8f){const _0x3c5287=a108_0x457f55,_0x307ba0=await sdkRequest(_0x930261,_0xb00fbc=>_0xb00fbc[_0x3c5287(0x264)][_0x3c5287(0x213)](_0xb55e8f));return Array[_0x3c5287(0x1c2)](_0x307ba0?.[_0x3c5287(0x1e5)])?_0x307ba0[_0x3c5287(0x1e5)]:[];}export async function listRuntimeDatasetRolePermits(_0x306bd9){const _0x27a258=a108_0x457f55,_0x2f383b=await sdkRequest(_0x306bd9,_0x3e2356=>_0x3e2356[_0x27a258(0x264)][_0x27a258(0x1d9)]());return Array[_0x27a258(0x1c2)](_0x2f383b?.['permitList'])?_0x2f383b['permitList']:[];}export async function saveRuntimeDatasetRolePermits(_0x6461c8,_0x25b77e){const _0x16b879=a108_0x457f55;return sdkRequest(_0x6461c8,_0xbd8b61=>_0xbd8b61[_0x16b879(0x264)][_0x16b879(0x234)]({'permitList':_0x25b77e}));}
|
|
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}));}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a109_0x7169(_0x5beed6,_0x31d3b1){_0x5beed6=_0x5beed6-0x141;const _0x35969a=a109_0x3596();let _0x71693b=_0x35969a[_0x5beed6];return _0x71693b;}(function(_0x2509b1,_0x3842e8){const _0x381020=a109_0x7169,_0x20e1db=_0x2509b1();while(!![]){try{const _0xa08b0b=-parseInt(_0x381020(0x141))/0x1+-parseInt(_0x381020(0x149))/0x2+parseInt(_0x381020(0x150))/0x3*(-parseInt(_0x381020(0x14e))/0x4)+-parseInt(_0x381020(0x151))/0x5+-parseInt(_0x381020(0x145))/0x6*(parseInt(_0x381020(0x14d))/0x7)+parseInt(_0x381020(0x142))/0x8+-parseInt(_0x381020(0x144))/0x9*(-parseInt(_0x381020(0x148))/0xa);if(_0xa08b0b===_0x3842e8)break;else _0x20e1db['push'](_0x20e1db['shift']());}catch(_0x3fd9b6){_0x20e1db['push'](_0x20e1db['shift']());}}}(a109_0x3596,0x38542));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0xb6b170){const _0x2e9452=a109_0x7169;if(cache[_0x2e9452(0x14a)](_0xb6b170))return cache[_0x2e9452(0x14f)](_0xb6b170);const _0x170d5b=await listDatasets(_0xb6b170),_0xd73a95=new Map();for(const _0x4db415 of _0x170d5b){const _0x3d33b1=_0x4db415[_0x2e9452(0x153)];_0x3d33b1?.[_0x2e9452(0x147)]!=null&&_0xd73a95['set'](_0x3d33b1[_0x2e9452(0x147)],typeof _0x3d33b1[_0x2e9452(0x14c)]==='string'?_0x3d33b1[_0x2e9452(0x14c)]:_0x2e9452(0x143)+_0x3d33b1[_0x2e9452(0x147)]);}const _0x582298=[..._0xd73a95['entries']()][_0x2e9452(0x14b)](([_0x56fa6e,_0xb6df1f])=>({'dbId':_0x56fa6e,'dbName':_0xb6df1f}));return cache[_0x2e9452(0x146)](_0xb6b170,_0x582298),_0x582298;}function a109_0x3596(){const _0x583756=['1060weWsnb','885620eLVnwv','has','map','dbName','504ZaClwR','68pnrgfi','get','26211RFRbAy','1310795XihlWz','find','dbtableConfig','117579nyIXuN','145016WjRlXv','db-','115380uGpvLZ','14604lpttnE','set','dbId'];a109_0x3596=function(){return _0x583756;};return a109_0x3596();}export async function getDbName(_0x15dbe8,_0x5404a0){const _0xa4f2f7=a109_0x7169;try{const _0x1ddf87=await listDatabases(_0x15dbe8);return _0x1ddf87[_0xa4f2f7(0x152)](_0xef36ec=>_0xef36ec[_0xa4f2f7(0x147)]===_0x5404a0)?.[_0xa4f2f7(0x14c)];}catch{return undefined;}}
|