@lovrabet/lovrabet-cli 2.3.10-beta.3 → 2.3.11-beta.1
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 +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d44a9,_0x410ed0){const _0x3dc29d=a96_0x22a5,_0x1884c1=_0x1d44a9();while(!![]){try{const _0x1dc600=-parseInt(_0x3dc29d(0x132))/0x1+parseInt(_0x3dc29d(0x131))/0x2+-parseInt(_0x3dc29d(0x130))/0x3+-parseInt(_0x3dc29d(0x12f))/0x4+-parseInt(_0x3dc29d(0x12c))/0x5*(-parseInt(_0x3dc29d(0x12e))/0x6)+-parseInt(_0x3dc29d(0x12d))/0x7*(-parseInt(_0x3dc29d(0x12b))/0x8)+parseInt(_0x3dc29d(0x12a))/0x9;if(_0x1dc600===_0x410ed0)break;else _0x1884c1['push'](_0x1884c1['shift']());}catch(_0x45db2c){_0x1884c1['push'](_0x1884c1['shift']());}}}(a96_0x41e9,0xc3721));function a96_0x41e9(){const _0x1eb611=['4906105ECRRnW','77rhfNQl','6Tmyyls','2003924UMIUkj','2708049eUrRod','73062mMgGYg','1549671lWNKcU','19270143CJtLBZ','432728icixuQ'];a96_0x41e9=function(){return _0x1eb611;};return a96_0x41e9();}export const AUTH_MODE={'ClientAk':'client-ak'};function a96_0x22a5(_0x54b9ff,_0xc832b3){_0x54b9ff=_0x54b9ff-0x12a;const _0x41e9fc=a96_0x41e9();let _0x22a54a=_0x41e9fc[_0x54b9ff];return _0x22a54a;}export function isAuthMode(_0x475a5c){return _0x475a5c===AUTH_MODE['ClientAk'];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x55301a=a97_0x3836;(function(_0x12ea11,_0x22d793){const _0x4ab908=a97_0x3836,_0x543346=_0x12ea11();while(!![]){try{const _0x3cc159=-parseInt(_0x4ab908(0x1b4))/0x1*(-parseInt(_0x4ab908(0x185))/0x2)+parseInt(_0x4ab908(0x1b7))/0x3*(parseInt(_0x4ab908(0x18c))/0x4)+-parseInt(_0x4ab908(0x18b))/0x5*(parseInt(_0x4ab908(0x1b0))/0x6)+parseInt(_0x4ab908(0x1ac))/0x7+parseInt(_0x4ab908(0x18a))/0x8*(parseInt(_0x4ab908(0x19d))/0x9)+-parseInt(_0x4ab908(0x1a2))/0xa+parseInt(_0x4ab908(0x1b5))/0xb*(parseInt(_0x4ab908(0x19c))/0xc);if(_0x3cc159===_0x22d793)break;else _0x543346['push'](_0x543346['shift']());}catch(_0x37b560){_0x543346['push'](_0x543346['shift']());}}}(a97_0x2bec,0x58857));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a97_0x55301a(0x19f)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a97_0x55301a(0x194)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a97_0x2bec(){const _0x19b15e=['Clear\x20output','Environment','appcode','dry-run','params','cliDisplayName','meowKey','name','clear','Alias\x20for\x20--non-interactive','Select\x20app\x20profile\x20by\x20name','type','Force\x20non-interactive\x20mode\x20(CI)','59604psKTUV','78381SJRWtp','format','cliBinName','<expr>','yes','1778870eSEnNU','sqlcode','Use\x20global\x20config\x20scope','non-interactive','json\x20|\x20pretty\x20|\x20compress','string','Skip\x20confirmation\x20for\x20high-risk\x20writes','Name\x20filter','SQL\x20query\x20code','nonInteractive','1615005MAgvuR','fromEntries','Show\x20help','global','48SmoWRl','<code>','app','JSON\x20params\x20for\x20execute\x20commands','92UTAMeg','319dHxGYO','boolean','42uNmMFr','Output\x20format','verbose','2946NEGhAr','Preview\x20operation\x20without\x20executing','help','production\x20|\x20development\x20|\x20daily','env','16UIaqbb','304870MscYDn','143020hMVbOF','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Override\x20appcode'];a97_0x2bec=function(){return _0x19b15e;};return a97_0x2bec();}export const GLOBAL_FLAGS=[{'name':a97_0x55301a(0x191),'meowKey':a97_0x55301a(0x191),'type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x18e),'hint':a97_0x55301a(0x1b1)},{'name':a97_0x55301a(0x1b2),'meowKey':a97_0x55301a(0x1b2),'type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x199),'hint':'<name>'},{'name':a97_0x55301a(0x189),'meowKey':a97_0x55301a(0x189),'type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x190),'hint':a97_0x55301a(0x188)},{'name':a97_0x55301a(0x19e),'meowKey':a97_0x55301a(0x19e),'type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x183),'hint':a97_0x55301a(0x1a6)},{'name':'jq','meowKey':'jq','type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x18d),'hint':a97_0x55301a(0x1a0)},{'name':'dry-run','meowKey':'dryRun','type':'boolean','description':a97_0x55301a(0x186)},{'name':a97_0x55301a(0x1a1),'meowKey':a97_0x55301a(0x1a1),'type':a97_0x55301a(0x1b6),'description':a97_0x55301a(0x1a8)},{'name':a97_0x55301a(0x1a5),'meowKey':a97_0x55301a(0x1ab),'type':'boolean','description':a97_0x55301a(0x19b)},{'name':a97_0x55301a(0x1af),'meowKey':a97_0x55301a(0x1af),'type':'boolean','description':a97_0x55301a(0x1a4)},{'name':'ci','meowKey':'ci','type':'boolean','description':a97_0x55301a(0x198),'hidden':!![]},{'name':a97_0x55301a(0x187),'meowKey':a97_0x55301a(0x187),'type':'boolean','description':a97_0x55301a(0x1ae)},{'name':'id','meowKey':'id','type':a97_0x55301a(0x1a7),'description':'Record\x20ID','hidden':!![]},{'name':a97_0x55301a(0x196),'meowKey':'name','type':a97_0x55301a(0x1a7),'description':a97_0x55301a(0x1a9),'hidden':!![]},{'name':a97_0x55301a(0x1a3),'meowKey':a97_0x55301a(0x1a3),'type':'string','description':a97_0x55301a(0x1aa),'hidden':!![]},{'name':a97_0x55301a(0x193),'meowKey':a97_0x55301a(0x193),'type':'string','description':a97_0x55301a(0x1b3),'hidden':!![]},{'name':'verbose','meowKey':a97_0x55301a(0x184),'type':a97_0x55301a(0x1b6),'description':'Verbose\x20output','hidden':!![]},{'name':a97_0x55301a(0x197),'meowKey':a97_0x55301a(0x197),'type':a97_0x55301a(0x1b6),'description':a97_0x55301a(0x18f),'hidden':!![]}];function a97_0x3836(_0x56245b,_0x5f2831){_0x56245b=_0x56245b-0x183;const _0x2bec0d=a97_0x2bec();let _0x383662=_0x2bec0d[_0x56245b];return _0x383662;}export const PIPELINE_FLAG_NAMES=new Set([a97_0x55301a(0x191),a97_0x55301a(0x1b2),a97_0x55301a(0x189),a97_0x55301a(0x19e),'jq',a97_0x55301a(0x192),a97_0x55301a(0x1a1),a97_0x55301a(0x1a5),'ci']);export function buildMeowFlags(){const _0xac3747=a97_0x55301a;return Object[_0xac3747(0x1ad)](GLOBAL_FLAGS['map'](_0x531100=>[_0x531100[_0xac3747(0x195)],{'type':_0x531100[_0xac3747(0x19a)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x73ca7a=a98_0x5e88;(function(_0x4fd9d4,_0x5d1485){const _0x122954=a98_0x5e88,_0x1ce511=_0x4fd9d4();while(!![]){try{const _0x2ab617=parseInt(_0x122954(0x10f))/0x1*(parseInt(_0x122954(0x109))/0x2)+-parseInt(_0x122954(0x10d))/0x3*(parseInt(_0x122954(0x10a))/0x4)+-parseInt(_0x122954(0x102))/0x5+parseInt(_0x122954(0x10b))/0x6*(parseInt(_0x122954(0x10e))/0x7)+-parseInt(_0x122954(0x104))/0x8+-parseInt(_0x122954(0x106))/0x9*(parseInt(_0x122954(0x103))/0xa)+parseInt(_0x122954(0x101))/0xb*(parseInt(_0x122954(0x107))/0xc);if(_0x2ab617===_0x5d1485)break;else _0x1ce511['push'](_0x1ce511['shift']());}catch(_0x5213b1){_0x1ce511['push'](_0x1ce511['shift']());}}}(a98_0x409e,0x31218));function a98_0x5e88(_0x2492f6,_0x565eaf){_0x2492f6=_0x2492f6-0x101;const _0x409e30=a98_0x409e();let _0x5e8850=_0x409e30[_0x2492f6];return _0x5e8850;}function a98_0x409e(){const _0x35b114=['3OwACLc','8834XsBBGb','4DPdbBt','en-US','6435473ZknadS','1903485MIFyXm','10HBDhth','1750584cQsema','production','492795ElVGkN','24DZuWni','write','20626jOaLZQ','1534348AIkXiJ','132RfkHwv','compress'];a98_0x409e=function(){return _0x35b114;};return a98_0x409e();}export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a98_0x73ca7a(0x105),'format':a98_0x73ca7a(0x10c),'locale':a98_0x73ca7a(0x110),'riskLevel':a98_0x73ca7a(0x108)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a98_0x73ca7a(0x10c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x3b714e=a99_0x5820;(function(_0x4ef2ca,_0x27c00e){const _0x4b6b85=a99_0x5820,_0x1adc3e=_0x4ef2ca();while(!![]){try{const _0x3c136e=parseInt(_0x4b6b85(0xd6))/0x1*(parseInt(_0x4b6b85(0xd7))/0x2)+parseInt(_0x4b6b85(0xdd))/0x3*(parseInt(_0x4b6b85(0xd5))/0x4)+parseInt(_0x4b6b85(0xdc))/0x5+-parseInt(_0x4b6b85(0xdb))/0x6+-parseInt(_0x4b6b85(0xd3))/0x7*(parseInt(_0x4b6b85(0xd1))/0x8)+parseInt(_0x4b6b85(0xd9))/0x9*(parseInt(_0x4b6b85(0xd2))/0xa)+-parseInt(_0x4b6b85(0xd4))/0xb;if(_0x3c136e===_0x27c00e)break;else _0x1adc3e['push'](_0x1adc3e['shift']());}catch(_0x1aed39){_0x1adc3e['push'](_0x1adc3e['shift']());}}}(a99_0x4966,0x4461b));function a99_0x4966(){const _0x8df3be=['703978nAQniR','112mFljgV','2DsNZfP','192278rMfHsJ','/dist/lovrabet-cli/config/index.json','27sysmfM','cliCdnBaseUrl','2238504dmsTjK','1191415dkXmNu','34428yYTRFh','npmRegistryBaseUrl','npmPackageName','435576JfMmDZ','610240VFuOCN','28edguth'];a99_0x4966=function(){return _0x8df3be;};return a99_0x4966();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a99_0x3b714e(0xd0)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a99_0x3b714e(0xcf)];function a99_0x5820(_0x2af210,_0xd31eb6){_0x2af210=_0x2af210-0xcf;const _0x4966e2=a99_0x4966();let _0x5820b6=_0x4966e2[_0x2af210];return _0x5820b6;}export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a99_0x3b714e(0xda)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a99_0x3b714e(0xd8);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x2d8fe7=a100_0x92dc;function a100_0x3c26(){const _0x335e55=['5581440zfYPsT','region','4DGboMu','kbService','Configure\x20a\x20trusted\x20harnessDomain\x20HTTPS\x20origin\x20in\x20the\x20connection\x20settings.','38615RghKen','2xyKFOt','user','validation','Harness\x20is\x20not\x20configured.','3830388kYWucl','harnessDomain','runtimeDomain','1110BUvfyI','2397516mxVMwf','16ReyCBm','126266oUXdce','serviceDomains','apiDomain','6204582cRtRcp','2431541oiUQCE','runtime','skillDomain','36RoAcGq'];a100_0x3c26=function(){return _0x335e55;};return a100_0x3c26();}(function(_0x266d97,_0xa3f685){const _0x4bf9d1=a100_0x92dc,_0x1d9de5=_0x266d97();while(!![]){try{const _0x8448c2=parseInt(_0x4bf9d1(0x19d))/0x1*(-parseInt(_0x4bf9d1(0x1a7))/0x2)+parseInt(_0x4bf9d1(0x1a1))/0x3*(parseInt(_0x4bf9d1(0x199))/0x4)+-parseInt(_0x4bf9d1(0x19c))/0x5*(-parseInt(_0x4bf9d1(0x1a4))/0x6)+-parseInt(_0x4bf9d1(0x1ab))/0x7+-parseInt(_0x4bf9d1(0x1a6))/0x8*(parseInt(_0x4bf9d1(0x1aa))/0x9)+parseInt(_0x4bf9d1(0x197))/0xa+-parseInt(_0x4bf9d1(0x1a5))/0xb*(parseInt(_0x4bf9d1(0x1ae))/0xc);if(_0x8448c2===_0xa3f685)break;else _0x1d9de5['push'](_0x1d9de5['shift']());}catch(_0xc091c0){_0x1d9de5['push'](_0x1d9de5['shift']());}}}(a100_0x3c26,0xb8e9a));import{CliErrors}from'../errors.js';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;function a100_0x92dc(_0x19ded8,_0xb3f19a){_0x19ded8=_0x19ded8-0x197;const _0x3c26f0=a100_0x3c26();let _0x92dced=_0x3c26f0[_0x19ded8];return _0x92dced;}export function initDomains(_0x36c5d1){const _0x19e6e3=a100_0x92dc;customApiDomain=_0x36c5d1?.[_0x19e6e3(0x1a9)],customUserDomain=_0x36c5d1?.['userDomain'],customRuntimeDomain=_0x36c5d1?.[_0x19e6e3(0x1a3)],customSkillDomain=_0x36c5d1?.[_0x19e6e3(0x1ad)],customKbServiceDomain=_0x36c5d1?.['kbServiceDomain'],customHarnessDomain=_0x36c5d1?.[_0x19e6e3(0x1a2)],activeRegion=_0x36c5d1?.[_0x19e6e3(0x198)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x5dd1da=a100_0x92dc,_0x32bb05=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x5dd1da(0x1a8)];return isProduction(getEnv())?_0x32bb05['production']:'daily'in _0x32bb05?_0x32bb05['daily']:_0x32bb05['production'];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a100_0x2d8fe7(0x19e)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()['api'];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a100_0x2d8fe7(0x1ac)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbServiceDomain=()=>{const _0x241b25=a100_0x2d8fe7;if(customKbServiceDomain)return customKbServiceDomain;const _0x548ef6=getActiveRegionDomains();return _0x241b25(0x19a)in _0x548ef6?_0x548ef6[_0x241b25(0x19a)]:undefined;};export const getHarnessDomain=()=>{if(customHarnessDomain)return customHarnessDomain;const _0x800dbb=getActiveRegionDomains();return'harness'in _0x800dbb?_0x800dbb['harness']:undefined;};export function requireHarnessDomain(){const _0xbc9700=a100_0x2d8fe7,_0x2f284c=getHarnessDomain();if(!_0x2f284c)throw CliErrors[_0xbc9700(0x19f)](_0xbc9700(0x1a0),_0xbc9700(0x19b));return _0x2f284c;}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x4014ee=a101_0x35a8;(function(_0x3b355c,_0x2594c2){const _0x14c55c=a101_0x35a8,_0xfff089=_0x3b355c();while(!![]){try{const _0x67af35=parseInt(_0x14c55c(0xdf))/0x1+-parseInt(_0x14c55c(0xe0))/0x2*(-parseInt(_0x14c55c(0xd6))/0x3)+parseInt(_0x14c55c(0xd2))/0x4*(-parseInt(_0x14c55c(0xd8))/0x5)+-parseInt(_0x14c55c(0xd4))/0x6*(parseInt(_0x14c55c(0xda))/0x7)+parseInt(_0x14c55c(0xdb))/0x8+-parseInt(_0x14c55c(0xde))/0x9+parseInt(_0x14c55c(0xdd))/0xa;if(_0x67af35===_0x2594c2)break;else _0xfff089['push'](_0xfff089['shift']());}catch(_0xc4d084){_0xfff089['push'](_0xfff089['shift']());}}}(a101_0x3d57,0x1b9e4));import{productEnv}from'../constant/product.js';function a101_0x35a8(_0x3c9ad5,_0x3e7918){_0x3c9ad5=_0x3c9ad5-0xd2;const _0x3d57ee=a101_0x3d57();let _0x35a8c7=_0x3d57ee[_0x3c9ad5];return _0x35a8c7;}export const RUNTIME_ENV_VALUES=[a101_0x4014ee(0xd5),a101_0x4014ee(0xd7),a101_0x4014ee(0xd3)];function a101_0x3d57(){const _0x115845=['14cBircM','946648BhjeND','dev','3730150KIXkDS','1710657FrdBsy','44745WfWeka','2qXMiIF','4aEIAuF','daily','673194VuLEcn','production','371121hljZir','development','661015HzsFpA','online'];a101_0x3d57=function(){return _0x115845;};return a101_0x3d57();}export function normalizeEnv(_0x2d32d9){const _0x4df85f=a101_0x4014ee;return _0x2d32d9===_0x4df85f(0xd9)||_0x2d32d9==='prod'?_0x4df85f(0xd5):_0x2d32d9;}export function isProduction(_0x1991d4){const _0x5f195d=a101_0x4014ee;return normalizeEnv(_0x1991d4)===_0x5f195d(0xd5);}export function isDaily(_0x3c8a4a){return normalizeEnv(_0x3c8a4a)==='daily';}export function isDev(_0x18e542){const _0x309aee=a101_0x4014ee,_0x155de9=normalizeEnv(_0x18e542);return _0x155de9===_0x309aee(0xd7)||_0x155de9===_0x309aee(0xdc);}let env=normalizeEnv(productEnv('ENV')||a101_0x4014ee(0xd5));export function getEnv(){return env;}export function initEnv(_0x484c2d){env=normalizeEnv(_0x484c2d);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a102_0x4cbaf6=a102_0x59e9;(function(_0x441ff8,_0x487c1a){const _0x138c35=a102_0x59e9,_0x4ccc95=_0x441ff8();while(!![]){try{const _0x30b6f6=parseInt(_0x138c35(0x166))/0x1+parseInt(_0x138c35(0x162))/0x2*(parseInt(_0x138c35(0x15f))/0x3)+-parseInt(_0x138c35(0x160))/0x4+-parseInt(_0x138c35(0x161))/0x5*(parseInt(_0x138c35(0x165))/0x6)+-parseInt(_0x138c35(0x169))/0x7*(-parseInt(_0x138c35(0x163))/0x8)+parseInt(_0x138c35(0x168))/0x9*(parseInt(_0x138c35(0x164))/0xa)+-parseInt(_0x138c35(0x16c))/0xb;if(_0x30b6f6===_0x487c1a)break;else _0x4ccc95['push'](_0x4ccc95['shift']());}catch(_0x29e3e0){_0x4ccc95['push'](_0x4ccc95['shift']());}}}(a102_0x321b,0x7d255));function a102_0x59e9(_0x4b4e0f,_0x5504ba){_0x4b4e0f=_0x4b4e0f-0x15f;const _0x321bd2=a102_0x321b();let _0x59e9fc=_0x321bd2[_0x4b4e0f];return _0x59e9fc;}function a102_0x321b(){const _0x519c2f=['6tHHEFk','1013183WuUxUb','compress','86013TdnzlB','1134pCsIQr','json','pretty','14414466hkoOtE','173091OVTLQP','1493644qtxzQR','1076645ovIais','6QRnUdw','31728VtTrSn','610SCHrCz'];a102_0x321b=function(){return _0x519c2f;};return a102_0x321b();}export const OUTPUT_FORMAT_VALUES=[a102_0x4cbaf6(0x16a),a102_0x4cbaf6(0x16b),a102_0x4cbaf6(0x167)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x134c85=a103_0x1d36;(function(_0x2daa0b,_0x5bff06){const _0x18e392=a103_0x1d36,_0x4082e0=_0x2daa0b();while(!![]){try{const _0x503b0e=-parseInt(_0x18e392(0x186))/0x1*(-parseInt(_0x18e392(0x196))/0x2)+-parseInt(_0x18e392(0x194))/0x3+parseInt(_0x18e392(0x18d))/0x4+parseInt(_0x18e392(0x197))/0x5*(-parseInt(_0x18e392(0x18a))/0x6)+-parseInt(_0x18e392(0x198))/0x7*(-parseInt(_0x18e392(0x191))/0x8)+parseInt(_0x18e392(0x181))/0x9+parseInt(_0x18e392(0x18e))/0xa*(-parseInt(_0x18e392(0x189))/0xb);if(_0x503b0e===_0x5bff06)break;else _0x4082e0['push'](_0x4082e0['shift']());}catch(_0x4a41aa){_0x4082e0['push'](_0x4082e0['shift']());}}}(a103_0x24c1,0x38bd1));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a103_0x134c85(0x193),'npmPackageName':a103_0x134c85(0x199),'skillSource':a103_0x134c85(0x192),'internalSkillSource':a103_0x134c85(0x19b),'globalSkillName':a103_0x134c85(0x183),'npmRegistryBaseUrl':'https://registry.npmjs.org','cliCdnBaseUrl':'https://g.lovrabet.com','envPrefix':a103_0x134c85(0x185),'legacyEnvPrefixes':[a103_0x134c85(0x182)],'configFileNames':[a103_0x134c85(0x190)],'newConfigFileName':a103_0x134c85(0x190),'homeDirName':a103_0x134c85(0x184),'logFileName':a103_0x134c85(0x18f),'invokeSource':a103_0x134c85(0x195),'userCenterDisplayName':a103_0x134c85(0x187),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','accessKeyCreatePath':a103_0x134c85(0x18b)};function a103_0x1d36(_0x1810bd,_0x1987cd){_0x1810bd=_0x1810bd-0x181;const _0x24c148=a103_0x24c1();let _0x1d3661=_0x24c148[_0x1810bd];return _0x1d3661;}export function productEnvName(_0x13a57c){const _0x1a6a7c=a103_0x134c85;return PRODUCT_CONFIG[_0x1a6a7c(0x19a)]+'_'+_0x13a57c;}function a103_0x24c1(){const _0x5f355e=['envPrefix','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','1366659NSrmGB','RABETBASE','lovrabet','.lovrabet','LOVRABET','18193lgLvrJ','Lovrabet\x20User\x20Center','map','10835LhsShm','193848rwmGZm','/user/ak','legacyEnvPrefixes','101168oiIlit','1450SRrfVU','.lovrabet-runtime.log','.lovrabet.json','18504VUdmNW','lovrabet/lovrabet-cli','Lovrabet\x20Runtime\x20CLI','841926NqSooV','cli:lovrabet-runtime','46aAgwyn','10UqBUCa','378xigcrX','@lovrabet/lovrabet-cli'];a103_0x24c1=function(){return _0x5f355e;};return a103_0x24c1();}export function productEnvNames(_0xe64301){const _0x4352fd=a103_0x134c85;return[productEnvName(_0xe64301),...PRODUCT_CONFIG[_0x4352fd(0x18c)][_0x4352fd(0x188)](_0x2575f9=>_0x2575f9+'_'+_0xe64301)];}export function productEnv(_0x13b566){for(const _0x5141c2 of productEnvNames(_0x13b566)){const _0x11d742=process.env[_0x5141c2];if(_0x11d742!==undefined)return _0x11d742;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x448378,_0xf09dbb){const _0x22efef=a104_0x471c,_0xbc3b0f=_0x448378();while(!![]){try{const _0x21c9ac=-parseInt(_0x22efef(0x1d5))/0x1*(-parseInt(_0x22efef(0x1db))/0x2)+parseInt(_0x22efef(0x1cf))/0x3+-parseInt(_0x22efef(0x1ce))/0x4+-parseInt(_0x22efef(0x1d6))/0x5*(parseInt(_0x22efef(0x1d1))/0x6)+parseInt(_0x22efef(0x1de))/0x7+parseInt(_0x22efef(0x1dc))/0x8+parseInt(_0x22efef(0x1d2))/0x9*(-parseInt(_0x22efef(0x1da))/0xa);if(_0x21c9ac===_0xf09dbb)break;else _0xbc3b0f['push'](_0xbc3b0f['shift']());}catch(_0x108f2f){_0xbc3b0f['push'](_0xbc3b0f['shift']());}}}(a104_0x3450,0x9309c));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';function a104_0x471c(_0x51a683,_0x48b9d4){_0x51a683=_0x51a683-0x1ce;const _0x345063=a104_0x3450();let _0x471c4d=_0x345063[_0x51a683];return _0x471c4d;}import{CliErrors}from'../errors.js';export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;function a104_0x3450(){const _0x2f36f6=['117eKgjRP','Region\x20\x22','join','16afAWfC','5htCNUI','includes','validation','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','1167450mIoern','99174dQJzat','8516584wevRDA','string','5678302zgIeNX','Available\x20regions:\x20','\x22\x20is\x20not\x20currently\x20available.','.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.','836256cauJue','479535gdOhgS','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','2999874VLQhkm'];a104_0x3450=function(){return _0x2f36f6;};return a104_0x3450();}export function isLovrabetRegion(_0x4d85be){const _0x480b9e=a104_0x471c;return typeof _0x4d85be===_0x480b9e(0x1dd)&&LOVRABET_REGION_VALUES[_0x480b9e(0x1d7)](_0x4d85be);}export function isEnabledLovrabetRegion(_0x5d5cd4){const _0x2735c8=a104_0x471c;return typeof _0x5d5cd4===_0x2735c8(0x1dd)&&ENABLED_LOVRABET_REGION_VALUES[_0x2735c8(0x1d7)](_0x5d5cd4);}export function normalizeLovrabetRegion(_0x143d2){const _0x518e9f=a104_0x471c;if(_0x143d2===undefined||_0x143d2===null||_0x143d2==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x143d2!==_0x518e9f(0x1dd))throw CliErrors[_0x518e9f(0x1d8)](_0x518e9f(0x1d0)+typeof _0x143d2+'.',_0x518e9f(0x1d9));const _0x20c8e9=REGION_ALIASES[_0x143d2]??_0x143d2;if(isEnabledLovrabetRegion(_0x20c8e9))return _0x20c8e9;throw CliErrors[_0x518e9f(0x1d8)](_0x518e9f(0x1d3)+_0x143d2+_0x518e9f(0x1e0),_0x518e9f(0x1df)+ENABLED_LOVRABET_REGION_VALUES[_0x518e9f(0x1d4)](',\x20')+_0x518e9f(0x1e1));}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a105_0x6494e2=a105_0x5a40;(function(_0x458908,_0x341312){const _0x22090f=a105_0x5a40,_0x462865=_0x458908();while(!![]){try{const _0x204e89=parseInt(_0x22090f(0x6f))/0x1+parseInt(_0x22090f(0x69))/0x2*(parseInt(_0x22090f(0x68))/0x3)+-parseInt(_0x22090f(0x64))/0x4+-parseInt(_0x22090f(0x6b))/0x5*(parseInt(_0x22090f(0x65))/0x6)+-parseInt(_0x22090f(0x6d))/0x7*(-parseInt(_0x22090f(0x6a))/0x8)+parseInt(_0x22090f(0x6e))/0x9+parseInt(_0x22090f(0x6c))/0xa*(-parseInt(_0x22090f(0x66))/0xb);if(_0x204e89===_0x341312)break;else _0x462865['push'](_0x462865['shift']());}catch(_0x590a55){_0x462865['push'](_0x462865['shift']());}}}(a105_0x1bc9,0x1b7b7));function a105_0x5a40(_0x129b6a,_0x13142a){_0x129b6a=_0x129b6a-0x64;const _0x1bc975=a105_0x1bc9();let _0x5a4023=_0x1bc975[_0x129b6a];return _0x5a4023;}export const RISK_LEVEL_VALUES=[a105_0x6494e2(0x67),a105_0x6494e2(0x70),'high-risk-write'];function a105_0x1bc9(){const _0x56e042=['220deowOb','45464YmbtNI','65AlieKu','2480xxyKaa','245ZOAhPd','1506474hnhhRy','174347grwHdY','write','819384MeJewM','76470OBfeoI','11110HPslqS','read','5262yYceLw'];a105_0x1bc9=function(){return _0x56e042;};return a105_0x1bc9();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x2d90(_0x197214,_0x323dfe){_0x197214=_0x197214-0x77;const _0x2980a1=a106_0x2980();let _0x2d90c0=_0x2980a1[_0x197214];return _0x2d90c0;}(function(_0x47dba7,_0x49d7a7){const _0x5078bf=a106_0x2d90,_0x5cf4ae=_0x47dba7();while(!![]){try{const _0x69f85f=parseInt(_0x5078bf(0x81))/0x1*(parseInt(_0x5078bf(0x7b))/0x2)+parseInt(_0x5078bf(0x7f))/0x3*(parseInt(_0x5078bf(0x78))/0x4)+parseInt(_0x5078bf(0x7d))/0x5*(-parseInt(_0x5078bf(0x7c))/0x6)+parseInt(_0x5078bf(0x80))/0x7+-parseInt(_0x5078bf(0x79))/0x8+parseInt(_0x5078bf(0x7a))/0x9+-parseInt(_0x5078bf(0x7e))/0xa;if(_0x69f85f===_0x49d7a7)break;else _0x5cf4ae['push'](_0x5cf4ae['shift']());}catch(_0xe13e3e){_0x5cf4ae['push'](_0x5cf4ae['shift']());}}}(a106_0x2980,0xc96c8));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a106_0x2980(){const _0xd61096=['1614dLQwaV','14265tvlkDn','12179610nRjxWx','362352SdmVXj','8297513zQcLEj','102359TZqDmO','user','28UnuCkS','4358112DKaFQw','9155610iPGazI','6ZliYWP'];a106_0x2980=function(){return _0xd61096;};return a106_0x2980();}export function getUserAccessKeyCreateUrl(_0x53fc6b=DEFAULT_LOVRABET_REGION){const _0x3a2ea3=a106_0x2d90,_0x45a3e3=OFFICIAL_ROUTING_PROFILES[_0x53fc6b]['serviceDomains']['production'][_0x3a2ea3(0x77)];return''+_0x45a3e3+PRODUCT_CONFIG['accessKeyCreatePath'];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a107_0x5e3852=a107_0x1bc2;(function(_0x1427aa,_0x746b3f){const _0x18a2a2=a107_0x1bc2,_0x40e133=_0x1427aa();while(!![]){try{const _0x19b06b=-parseInt(_0x18a2a2(0xad))/0x1+parseInt(_0x18a2a2(0xb2))/0x2*(-parseInt(_0x18a2a2(0x8b))/0x3)+-parseInt(_0x18a2a2(0xae))/0x4*(-parseInt(_0x18a2a2(0x7c))/0x5)+-parseInt(_0x18a2a2(0x75))/0x6+parseInt(_0x18a2a2(0x88))/0x7+parseInt(_0x18a2a2(0x80))/0x8*(parseInt(_0x18a2a2(0xbb))/0x9)+parseInt(_0x18a2a2(0x96))/0xa;if(_0x19b06b===_0x746b3f)break;else _0x40e133['push'](_0x40e133['shift']());}catch(_0x523631){_0x40e133['push'](_0x40e133['shift']());}}}(a107_0x37f2,0x7e80a));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';function a107_0x37f2(){const _0x36558d=['pageSize','stdin','string','setRawCommand','production','10772090quqJTn','write','inherit','APPCODE','setRawMode','daily','setLogPath','utf8','global','kbServiceDomain','values','agentDomain','missing','projectConfig','object','app','top-level','locale','isRaw','empty','raw','argv','EPERM','915825IWfMci','28WQyWAk','message','appcode','configFileNames','323462Ksbhes','PAGE_SIZE','routing','true','harnessDomain','parse','format','online','ACCESS_KEY','1017KCItdG','nonInteractive','EXDEV','appCode','platformDomain','globalConfig','development','cache','explicit','read','slice','isTTY','defaultApp','trim','skillDomain','apiDomain','env','userDomain','5695146iQAnWO','code','skillHubDomain','cwd','region','join','APP','570835OlXaPf','project','./constant/domain.js','EACCES','9656xeDMTK','runtimeDomain','global\x20config','stdout','VERBOSE','authRequired','stringify','apps','3724924qOOTvy','accessKey','local-alias','3aHZGBM','nativeToolAvailable','high-risk-write','project\x20config','riskLevel','newConfigFileName'];a107_0x37f2=function(){return _0x36558d;};return a107_0x37f2();}import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a107_0x5e3852(0xb1)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a107_0x5e3852(0x90)];function resolveConfigPath(_0x32ff46){for(const _0x38cb2d of CONFIG_NAMES){const _0x57145b=resolve(_0x32ff46,_0x38cb2d);if(existsSync(_0x57145b))return _0x57145b;}return undefined;}export function resolveWriteConfigPath(_0x175b70){const _0x5063e4=a107_0x5e3852,_0x20ba52=_0x175b70==='project'?process[_0x5063e4(0x78)]():homedir(),_0xb4e1e4=resolveConfigPath(_0x20ba52);return _0xb4e1e4??resolve(_0x20ba52,NEW_CONFIG_NAME);}export function readConfigFile(_0x38f4fe){const _0x2d7ed7=a107_0x5e3852;try{if(existsSync(_0x38f4fe)){const _0x1a435c=readFileSync(_0x38f4fe,{'encoding':_0x2d7ed7(0x9d)});if(_0x1a435c){const _0x1718e5=JSON[_0x2d7ed7(0xb7)](_0x1a435c);return migrateOnlineEnv(_0x38f4fe,_0x1718e5),_0x1718e5;}}}catch{}return{};}function migrateOnlineEnv(_0x11898a,_0x5c6638){const _0x4adbd0=a107_0x5e3852;let _0x446810=![];_0x5c6638['env']===_0x4adbd0(0xb9)&&(_0x5c6638['env']=_0x4adbd0(0x95),_0x446810=!![]);if(_0x5c6638[_0x4adbd0(0x87)]&&typeof _0x5c6638[_0x4adbd0(0x87)]===_0x4adbd0(0xa4))for(const _0x4c2ae6 of Object[_0x4adbd0(0xa0)](_0x5c6638[_0x4adbd0(0x87)])){_0x4c2ae6&&_0x4c2ae6[_0x4adbd0(0x73)]==='online'&&(_0x4c2ae6['env']='production',_0x446810=!![]);}if(_0x446810)try{writeConfigFile(_0x11898a,_0x5c6638);}catch{}}export function writeConfigFile(_0x125562,_0x43a284){const _0x1821bf=a107_0x5e3852,_0x355aeb=dirname(_0x125562);!existsSync(_0x355aeb)&&mkdirSync(_0x355aeb,{'recursive':!![]});const _0x101dbc=_0x125562+'.tmp';try{writeFileSync(_0x101dbc,JSON[_0x1821bf(0x86)](_0x43a284,null,0x2)+'\x0a',{'encoding':_0x1821bf(0x9d),'mode':0x180});try{renameSync(_0x101dbc,_0x125562);}catch(_0x4cb6a9){if(_0x4cb6a9[_0x1821bf(0x76)]===_0x1821bf(0xac)||_0x4cb6a9['code']===_0x1821bf(0xbd)||_0x4cb6a9[_0x1821bf(0x76)]===_0x1821bf(0x7f)){writeFileSync(_0x125562,JSON[_0x1821bf(0x86)](_0x43a284,null,0x2)+'\x0a',{'encoding':_0x1821bf(0x9d)});try{unlinkSync(_0x101dbc);}catch{}}else throw _0x4cb6a9;}}catch(_0x1773c4){try{unlinkSync(_0x101dbc);}catch{}throw _0x1773c4;}}export function isNonInteractiveMode(_0x2d3778){const _0x29d9b1=a107_0x5e3852;return!!(_0x2d3778[_0x29d9b1(0xbc)]||_0x2d3778['ci']||productEnvNames('CI')['some'](_0x3ee10f=>process.env[_0x3ee10f]===_0x29d9b1(0xb5))||process.env.CI===_0x29d9b1(0xb5)||!process[_0x29d9b1(0x83)][_0x29d9b1(0xc6)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x9e5a9f=a107_0x5e3852;if(!process[_0x9e5a9f(0x92)][_0x9e5a9f(0xc6)])return![];try{const _0x162e35=process[_0x9e5a9f(0x92)][_0x9e5a9f(0xa8)];return process['stdin'][_0x9e5a9f(0x9a)](!![]),process[_0x9e5a9f(0x92)]['setRawMode'](_0x162e35??![]),!![];}catch{return![];}}export async function createContext(_0x491461){const _0x3dd713=a107_0x5e3852,_0x27c975=buildConfigFromFlags(_0x491461);await initGlobalEnvironment(_0x27c975);const {getUserDomain:_0x24b476,getApiDomain:_0x5ce411}=await import(_0x3dd713(0x7e)),_0x33b2b3={'apiDomain':_0x5ce411(),'userDomain':_0x24b476()},_0x69be7b=await buildAuth(_0x27c975);logger[_0x3dd713(0x9c)](process[_0x3dd713(0x78)]());const _0x5da480=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x3dd713(0xab)][_0x3dd713(0xc5)](0x2))[_0x3dd713(0x7a)]('\x20'))[_0x3dd713(0x70)]();logger[_0x3dd713(0x94)](_0x5da480);const _0x2e9ccb=isNonInteractiveMode(_0x491461);return{'config':_0x27c975,'auth':_0x69be7b,'logger':logger,'env':_0x33b2b3,'nonInteractive':_0x2e9ccb};}export function buildConfigFromFlags(_0x10f4ae){return buildConfig(loadRawConfigLayers(),_0x10f4ae);}export function getLocalAppAliases(_0x2f7c7a){const _0x579d2d=a107_0x5e3852;return _0x2f7c7a['apps']&&typeof _0x2f7c7a[_0x579d2d(0x87)]===_0x579d2d(0xa4)?_0x2f7c7a[_0x579d2d(0x87)]:{};}export function resolveLocalAppAliasCode(_0x1464c7,_0x4ee18c){const _0x2cea8b=a107_0x5e3852;if(!_0x4ee18c)return undefined;const _0x294b66=getLocalAppAliases(_0x1464c7)[_0x4ee18c],_0x2c8302=_0x294b66?.[_0x2cea8b(0xb0)];return typeof _0x2c8302==='string'&&_0x2c8302[_0x2cea8b(0x70)]()?_0x2c8302[_0x2cea8b(0x70)]():undefined;}export function readAppCodeFromConfig(){const _0x3dbcbb=a107_0x5e3852;return buildConfigFromFlags({})[_0x3dbcbb(0xbe)];}export function readScopedConfig(_0x146593){const _0x36d51c=a107_0x5e3852,_0x505618=_0x146593[_0x36d51c(0x9e)]?_0x36d51c(0x9e):_0x36d51c(0x7d);return readConfigFile(resolveWriteConfigPath(_0x505618));}export function writeScopedConfig(_0x2bed68,_0xace569){const _0x593673=a107_0x5e3852,_0x252abc=_0xace569[_0x593673(0x9e)]?_0x593673(0x9e):_0x593673(0x7d);writeConfigFile(resolveWriteConfigPath(_0x252abc),_0x2bed68);}export async function initGlobalEnvironment(_0x11dfb9){const _0x16526e=a107_0x5e3852,{initEnv:_0x54347d}=await import('./constant/env.js');_0x54347d(_0x11dfb9[_0x16526e(0x73)]);const {initDomains:_0x4dfda1}=await import(_0x16526e(0x7e)),_0xb2a94e=resolveEnterpriseRoutingConfig(_0x11dfb9['raw'][_0x16526e(0xb4)]);_0x4dfda1({'apiDomain':_0xb2a94e?_0xb2a94e['apiDomain']:_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0x72)]||_0x11dfb9[_0x16526e(0xaa)]['host']||undefined,'userDomain':_0xb2a94e?_0xb2a94e[_0x16526e(0x74)]:_0x11dfb9['raw']['userDomain']||undefined,'runtimeDomain':_0xb2a94e?_0xb2a94e[_0x16526e(0x81)]:_0x11dfb9[_0x16526e(0xaa)]['runtimeDomain']||undefined,'skillDomain':_0xb2a94e?_0xb2a94e[_0x16526e(0x71)]:_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0x71)]||_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0x77)]||_0x11dfb9['raw'][_0x16526e(0xa1)]||_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0xbf)]||undefined,'kbServiceDomain':_0xb2a94e?_0xb2a94e[_0x16526e(0x9f)]:typeof _0x11dfb9[_0x16526e(0xaa)][_0x16526e(0x9f)]===_0x16526e(0x93)&&_0x11dfb9['raw'][_0x16526e(0x9f)]['trim']()?_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0x9f)]:undefined,'harnessDomain':_0xb2a94e?_0xb2a94e[_0x16526e(0xb6)]:_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0xb6)]===undefined?undefined:normalizeDomainOrigin(_0x16526e(0xb6),_0x11dfb9[_0x16526e(0xaa)][_0x16526e(0xb6)]),'region':normalizeLovrabetRegion(_0x11dfb9['raw'][_0x16526e(0x79)])});}export function getProjectConfigPath(){const _0x3118cc=a107_0x5e3852;return resolveConfigPath(process[_0x3118cc(0x78)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a107_0x1bc2(_0x267430,_0x24ec71){_0x267430=_0x267430-0x70;const _0x37f296=a107_0x37f2();let _0x1bc2c2=_0x37f296[_0x267430];return _0x1bc2c2;}export function inspectCliConfigJsonFile(_0x96c440){const _0x29174e=a107_0x5e3852;if(!existsSync(_0x96c440))return{'status':_0x29174e(0xa2)};try{const _0x4dfaf9=readFileSync(_0x96c440,{'encoding':'utf8'});if(!_0x4dfaf9?.[_0x29174e(0x70)]())return{'status':_0x29174e(0xa9)};const _0x13623f=JSON[_0x29174e(0xb7)](_0x4dfaf9);return{'status':'ok','data':_0x13623f};}catch(_0x4cc20e){return{'status':'error','message':_0x4cc20e instanceof Error?_0x4cc20e[_0x29174e(0xaf)]:String(_0x4cc20e)};}}export function loadRawConfigLayers(_0x6ad925){const _0x4cb58c=a107_0x5e3852;let _0x2c016d={},_0x921f5a={},_0x365d04,_0x51a147;try{_0x365d04=resolveConfigPath(homedir());if(_0x365d04){const _0x994bf3=readFileSync(_0x365d04,{'encoding':_0x4cb58c(0x9d)});if(_0x994bf3)_0x2c016d=JSON[_0x4cb58c(0xb7)](_0x994bf3);}}catch{}try{const _0x5846da=_0x6ad925||process[_0x4cb58c(0x78)]();_0x51a147=resolveConfigPath(_0x5846da);if(_0x51a147){const _0x92ff4c=readFileSync(_0x51a147,{'encoding':_0x4cb58c(0x9d)});if(_0x92ff4c)_0x921f5a=JSON[_0x4cb58c(0xb7)](_0x92ff4c);}}catch{}return{'globalPath':_0x365d04,'projectPath':_0x51a147,'globalConfig':_0x2c016d,'projectConfig':_0x921f5a};}function mergeRawConfigLayers(_0x38282f){const _0x5c71e8=a107_0x5e3852,{globalConfig:_0x124ffb,projectConfig:_0x4ca86d}=_0x38282f,_0x263771={..._0x124ffb,..._0x4ca86d};delete _0x263771[_0x5c71e8(0x98)];if(_0x5c71e8(0xc7)in _0x4ca86d)_0x263771[_0x5c71e8(0xc7)]=_0x4ca86d[_0x5c71e8(0xc7)];else _0x124ffb[_0x5c71e8(0xc7)]&&(_0x263771[_0x5c71e8(0xc7)]=_0x124ffb[_0x5c71e8(0xc7)]);return _0x263771;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1bdd8f){return mergeRawConfigLayers(loadRawConfigLayers(_0x1bdd8f));}export function readRawConfigWithLayers(_0x870e2e){const _0x44ce4=loadRawConfigLayers(_0x870e2e);return{'config':mergeRawConfigLayers(_0x44ce4),'layers':_0x44ce4};}export function resolveDefaultAppSource(_0x109a76){const _0x445c8a=a107_0x5e3852;if(_0x445c8a(0xc7)in _0x109a76[_0x445c8a(0xa3)])return _0x445c8a(0x7d);if(_0x109a76[_0x445c8a(0xc0)]['defaultApp'])return _0x445c8a(0x9e);return null;}function buildConfig(_0x4d1cde,_0x33bd28){const _0x5f3595=a107_0x5e3852,_0x4aea39=mergeRawConfigLayers(_0x4d1cde),{projectConfig:_0x35de23}=_0x4d1cde,_0x297e1c=_0x4aea39['defaultApp']||undefined,_0x391e6a=typeof _0x33bd28[_0x5f3595(0xb0)]===_0x5f3595(0x93)?_0x33bd28['appcode']:undefined,_0x22898b=_0x35de23[_0x5f3595(0xb0)]||_0x35de23['app'],_0x514f7b=!_0x391e6a&&!_0x33bd28[_0x5f3595(0xa5)]&&!_0x22898b&&!_0x35de23[_0x5f3595(0xc7)],_0x585e0e=_0x514f7b?env(_0x5f3595(0x99)):undefined,_0xf1a1ef=_0x33bd28[_0x5f3595(0xa5)]||(_0x514f7b&&!_0x585e0e?env(_0x5f3595(0x7b)):undefined),_0x472cc5=_0xf1a1ef||_0x297e1c||undefined,_0x502d6c=_0xf1a1ef||_0x585e0e?undefined:_0x22898b||(_0x35de23[_0x5f3595(0xc7)]?undefined:_0x4aea39[_0x5f3595(0xb0)]||_0x4aea39[_0x5f3595(0xa5)]||undefined),_0x14c45a=_0xf1a1ef||(_0x502d6c?undefined:_0x297e1c),_0x1afaeb=resolveLocalAppAliasCode(_0x4aea39,_0x14c45a),_0xcb4d9f=productEnvNames(_0x5f3595(0xba))['find'](_0x411aa2=>process.env[_0x411aa2]!==undefined),_0x22f81d=_0xcb4d9f?process.env[_0xcb4d9f]:undefined,_0x34e7bb=_0x35de23['accessKey']||_0x22f81d||_0x4aea39[_0x5f3595(0x89)]||undefined,_0x9191d=_0x35de23['accessKey']?_0x5f3595(0x8e):_0x22f81d?_0xcb4d9f:_0x4aea39[_0x5f3595(0x89)]?_0x5f3595(0x82):undefined,_0x4fef08=_0x33bd28[_0x5f3595(0x73)]||_0x4aea39[_0x5f3595(0x73)]||env('ENV')||DEFAULT_CONFIG_VALUES[_0x5f3595(0x73)],_0xed6a03=normalizeEnv(String(_0x4fef08)),_0x5e1190=isDaily(_0xed6a03)?_0x5f3595(0x9b):isDev(_0xed6a03)?_0x5f3595(0xc1):_0x5f3595(0x95),_0x44ff6c=_0x391e6a||_0x585e0e||_0x502d6c||_0x1afaeb?undefined:resolveCachedAppCode(_0x14c45a,_0x5e1190,_0x34e7bb),_0x43ce96=_0x391e6a||_0x585e0e||_0x502d6c||_0x1afaeb||_0x44ff6c||undefined,_0x23bda3=_0x391e6a?_0x5f3595(0xc3):_0x585e0e?_0x5f3595(0x73):_0x502d6c?_0x5f3595(0xa6):_0x1afaeb?_0x5f3595(0x8a):_0x44ff6c?_0x5f3595(0xc2):undefined,_0x4bca7c=_0x4aea39[_0x5f3595(0xa7)]||DEFAULT_CONFIG_VALUES[_0x5f3595(0xa7)],_0x13ca08=undefined,_0x4d10d9=_0x33bd28[_0x5f3595(0xb8)]||env('FORMAT')||_0x4aea39[_0x5f3595(0xb8)],_0x225775=normalizeLegacyOutputFormat(_0x4d10d9),_0x32c156=env(_0x5f3595(0xb3))||_0x4aea39[_0x5f3595(0x91)],_0x173880=_0x32c156?Number(_0x32c156)||undefined:undefined,_0x31b5fb=_0x4aea39[_0x5f3595(0x8f)],_0x506cae=_0x31b5fb===_0x5f3595(0xc4)||_0x31b5fb===_0x5f3595(0x97)||_0x31b5fb===_0x5f3595(0x8d)?_0x31b5fb:DEFAULT_CONFIG_VALUES['riskLevel'],_0x28b777=_0x4aea39[_0x5f3595(0x8c)]===!![],_0x21bbb2=env(_0x5f3595(0x84)),_0x33c57d=_0x21bbb2==='1'||_0x21bbb2===_0x5f3595(0xb5);return{'appCode':typeof _0x43ce96==='string'&&_0x43ce96[_0x5f3595(0x70)]()?_0x43ce96[_0x5f3595(0x70)]():undefined,'appCodeSource':_0x23bda3,'env':_0x5e1190,'locale':_0x4bca7c,'cookie':_0x13ca08,'accessKey':_0x34e7bb,'accessKeySource':_0x9191d,'format':_0x225775,'pageSize':_0x173880,'riskLevel':_0x506cae,'nativeToolAvailable':_0x28b777,'verbose':_0x33c57d,'defaultApp':_0x297e1c,'currentApp':typeof _0x472cc5==='string'?_0x472cc5:undefined,'raw':_0x4aea39};}function env(_0x37661b){return productEnv(_0x37661b);}async function buildAuth(_0x29af03){const _0x2501d8=a107_0x5e3852,_0x66f72e='',_0x16780d=!!_0x29af03[_0x2501d8(0x89)];return{'cookie':_0x66f72e,'isLoggedIn':_0x16780d,async 'getOrLogin'(){const _0x533209=_0x2501d8;if(_0x16780d)return _0x66f72e;throw CliErrors[_0x533209(0x85)]();}};}
|
|
1
|
+
const a107_0x4c9b4b=a107_0x121d;(function(_0x345b00,_0x5ba453){const _0x4d59cd=a107_0x121d,_0x263c3c=_0x345b00();while(!![]){try{const _0x2de604=parseInt(_0x4d59cd(0x15b))/0x1*(parseInt(_0x4d59cd(0x13d))/0x2)+-parseInt(_0x4d59cd(0x14e))/0x3*(parseInt(_0x4d59cd(0x13b))/0x4)+parseInt(_0x4d59cd(0x160))/0x5*(-parseInt(_0x4d59cd(0x17c))/0x6)+-parseInt(_0x4d59cd(0x13a))/0x7+parseInt(_0x4d59cd(0x177))/0x8+-parseInt(_0x4d59cd(0x173))/0x9+-parseInt(_0x4d59cd(0x169))/0xa*(-parseInt(_0x4d59cd(0x15e))/0xb);if(_0x2de604===_0x5ba453)break;else _0x263c3c['push'](_0x263c3c['shift']());}catch(_0x4b7aa9){_0x263c3c['push'](_0x263c3c['shift']());}}}(a107_0x2de3,0xd58e0));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';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{normalizeDomainOrigin,resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a107_0x4c9b4b(0x138)];function resolveConfigPath(_0x838c9c){for(const _0x5e2e90 of CONFIG_NAMES){const _0x199a7=resolve(_0x838c9c,_0x5e2e90);if(existsSync(_0x199a7))return _0x199a7;}return undefined;}function a107_0x121d(_0x4d7934,_0x12690a){_0x4d7934=_0x4d7934-0x12a;const _0x2de34f=a107_0x2de3();let _0x121d0a=_0x2de34f[_0x4d7934];return _0x121d0a;}export function resolveWriteConfigPath(_0x25f87e){const _0x22ed64=a107_0x4c9b4b,_0x4ed8ff=_0x25f87e==='project'?process[_0x22ed64(0x12e)]():homedir(),_0x91f152=resolveConfigPath(_0x4ed8ff);return _0x91f152??resolve(_0x4ed8ff,NEW_CONFIG_NAME);}export function readConfigFile(_0x133e8d){const _0x12220c=a107_0x4c9b4b;try{if(existsSync(_0x133e8d)){const _0x413600=readFileSync(_0x133e8d,{'encoding':_0x12220c(0x157)});if(_0x413600){const _0x482d3c=JSON[_0x12220c(0x145)](_0x413600);return migrateOnlineEnv(_0x133e8d,_0x482d3c),_0x482d3c;}}}catch{}return{};}function migrateOnlineEnv(_0x39c64c,_0x2cf8e1){const _0x399aa9=a107_0x4c9b4b;let _0x5e887e=![];_0x2cf8e1[_0x399aa9(0x151)]==='online'&&(_0x2cf8e1[_0x399aa9(0x151)]=_0x399aa9(0x172),_0x5e887e=!![]);if(_0x2cf8e1[_0x399aa9(0x156)]&&typeof _0x2cf8e1[_0x399aa9(0x156)]===_0x399aa9(0x163))for(const _0x285a6c of Object[_0x399aa9(0x14f)](_0x2cf8e1[_0x399aa9(0x156)])){_0x285a6c&&_0x285a6c['env']===_0x399aa9(0x171)&&(_0x285a6c[_0x399aa9(0x151)]='production',_0x5e887e=!![]);}if(_0x5e887e)try{writeConfigFile(_0x39c64c,_0x2cf8e1);}catch{}}export function writeConfigFile(_0x32b33,_0x371a12){const _0x443b31=a107_0x4c9b4b,_0x29ccf5=dirname(_0x32b33);!existsSync(_0x29ccf5)&&mkdirSync(_0x29ccf5,{'recursive':!![]});const _0x5ade3e=_0x32b33+_0x443b31(0x150);try{writeFileSync(_0x5ade3e,JSON[_0x443b31(0x175)](_0x371a12,null,0x2)+'\x0a',{'encoding':_0x443b31(0x157),'mode':0x180});try{renameSync(_0x5ade3e,_0x32b33);}catch(_0x740b2c){if(_0x740b2c['code']===_0x443b31(0x135)||_0x740b2c[_0x443b31(0x161)]===_0x443b31(0x14b)||_0x740b2c[_0x443b31(0x161)]===_0x443b31(0x130)){writeFileSync(_0x32b33,JSON['stringify'](_0x371a12,null,0x2)+'\x0a',{'encoding':_0x443b31(0x157)});try{unlinkSync(_0x5ade3e);}catch{}}else throw _0x740b2c;}}catch(_0x4e24d4){try{unlinkSync(_0x5ade3e);}catch{}throw _0x4e24d4;}}export function isNonInteractiveMode(_0x251290){const _0x135b76=a107_0x4c9b4b;return!!(_0x251290['nonInteractive']||_0x251290['ci']||productEnvNames('CI')[_0x135b76(0x12d)](_0x1b98c9=>process.env[_0x1b98c9]===_0x135b76(0x154))||process.env.CI==='true'||!process[_0x135b76(0x17f)][_0x135b76(0x17b)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x51db29=a107_0x4c9b4b;if(!process['stdin'][_0x51db29(0x17b)])return![];try{const _0x6cde2a=process['stdin'][_0x51db29(0x16a)];return process['stdin'][_0x51db29(0x16b)](!![]),process[_0x51db29(0x149)][_0x51db29(0x16b)](_0x6cde2a??![]),!![];}catch{return![];}}function a107_0x2de3(){const _0xa0ee63=['platformDomain','apps','utf8','nativeToolAvailable','runtimeDomain','authRequired','7fpByEg','string','explicit','44tgMXjm','local-alias','7690BUrRZY','code','app','object','./constant/domain.js','global','projectConfig','appcode','read','5155370yQWyCo','isRaw','setRawMode','project','skillDomain','skillHubDomain','format','argv','online','production','11242008zDdJkt','daily','stringify','harnessDomain','7700984UknShH','globalConfig','message','PAGE_SIZE','isTTY','1164abnlqX','FORMAT','trim','stdout','kbServiceDomain','global\x20config','development','some','cwd','write','EACCES','host','inherit','locale','ACCESS_KEY','EPERM','error','accessKey','newConfigFileName','slice','6914110xtDMQb','24vkbmYg','find','458386wVEyZk','./constant/env.js','join','riskLevel','raw','high-risk-write','missing','ENV','parse','agentDomain','apiDomain','setRawCommand','stdin','appCode','EXDEV','userDomain','empty','609594yvRqHp','values','.tmp','env','pageSize','defaultApp','true'];a107_0x2de3=function(){return _0xa0ee63;};return a107_0x2de3();}export async function createContext(_0x2bc6dc){const _0xf9996=a107_0x4c9b4b,_0x368035=buildConfigFromFlags(_0x2bc6dc);await initGlobalEnvironment(_0x368035);const {getUserDomain:_0x2bbd5d,getApiDomain:_0x2d4f0d}=await import('./constant/domain.js'),_0x145166={'apiDomain':_0x2d4f0d(),'userDomain':_0x2bbd5d()},_0x5e4d9f=await buildAuth(_0x368035);logger['setLogPath'](process[_0xf9996(0x12e)]());const _0x1f0bdd=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0xf9996(0x170)][_0xf9996(0x139)](0x2))[_0xf9996(0x13f)]('\x20'))[_0xf9996(0x17e)]();logger[_0xf9996(0x148)](_0x1f0bdd);const _0x1799bf=isNonInteractiveMode(_0x2bc6dc);return{'config':_0x368035,'auth':_0x5e4d9f,'logger':logger,'env':_0x145166,'nonInteractive':_0x1799bf};}export function buildConfigFromFlags(_0x456095){return buildConfig(loadRawConfigLayers(),_0x456095);}export function getLocalAppAliases(_0x4521df){const _0x334ea5=a107_0x4c9b4b;return _0x4521df['apps']&&typeof _0x4521df[_0x334ea5(0x156)]===_0x334ea5(0x163)?_0x4521df[_0x334ea5(0x156)]:{};}export function resolveLocalAppAliasCode(_0x2d4196,_0x192896){const _0x4ab857=a107_0x4c9b4b;if(!_0x192896)return undefined;const _0x586021=getLocalAppAliases(_0x2d4196)[_0x192896],_0x1f283a=_0x586021?.['appcode'];return typeof _0x1f283a===_0x4ab857(0x15c)&&_0x1f283a['trim']()?_0x1f283a[_0x4ab857(0x17e)]():undefined;}export function readAppCodeFromConfig(){const _0x3aa246=a107_0x4c9b4b;return buildConfigFromFlags({})[_0x3aa246(0x14a)];}export function readScopedConfig(_0x1c9405){const _0x3582b9=a107_0x4c9b4b,_0x5dd328=_0x1c9405['global']?_0x3582b9(0x165):_0x3582b9(0x16c);return readConfigFile(resolveWriteConfigPath(_0x5dd328));}export function writeScopedConfig(_0x104c59,_0x31b16a){const _0x3b85aa=a107_0x4c9b4b,_0x7f0b3=_0x31b16a[_0x3b85aa(0x165)]?'global':_0x3b85aa(0x16c);writeConfigFile(resolveWriteConfigPath(_0x7f0b3),_0x104c59);}export async function initGlobalEnvironment(_0x1a1095){const _0x2f283f=a107_0x4c9b4b,{initEnv:_0x35bcea}=await import(_0x2f283f(0x13e));_0x35bcea(_0x1a1095[_0x2f283f(0x151)]);const {initDomains:_0x42e741}=await import(_0x2f283f(0x164)),_0x34c54d=resolveEnterpriseRoutingConfig(_0x1a1095[_0x2f283f(0x141)]['routing']);_0x42e741({'apiDomain':_0x34c54d?_0x34c54d[_0x2f283f(0x147)]:_0x1a1095['raw'][_0x2f283f(0x147)]||_0x1a1095[_0x2f283f(0x141)][_0x2f283f(0x131)]||undefined,'userDomain':_0x34c54d?_0x34c54d['userDomain']:_0x1a1095[_0x2f283f(0x141)][_0x2f283f(0x14c)]||undefined,'runtimeDomain':_0x34c54d?_0x34c54d[_0x2f283f(0x159)]:_0x1a1095[_0x2f283f(0x141)][_0x2f283f(0x159)]||undefined,'skillDomain':_0x34c54d?_0x34c54d[_0x2f283f(0x16d)]:_0x1a1095['raw'][_0x2f283f(0x16d)]||_0x1a1095[_0x2f283f(0x141)][_0x2f283f(0x16e)]||_0x1a1095['raw'][_0x2f283f(0x146)]||_0x1a1095['raw'][_0x2f283f(0x155)]||undefined,'kbServiceDomain':_0x34c54d?_0x34c54d[_0x2f283f(0x12a)]:typeof _0x1a1095[_0x2f283f(0x141)]['kbServiceDomain']===_0x2f283f(0x15c)&&_0x1a1095['raw']['kbServiceDomain'][_0x2f283f(0x17e)]()?_0x1a1095[_0x2f283f(0x141)][_0x2f283f(0x12a)]:undefined,'harnessDomain':_0x34c54d?_0x34c54d[_0x2f283f(0x176)]:_0x1a1095[_0x2f283f(0x141)]['harnessDomain']===undefined?undefined:normalizeDomainOrigin(_0x2f283f(0x176),_0x1a1095[_0x2f283f(0x141)]['harnessDomain']),'region':normalizeLovrabetRegion(_0x1a1095[_0x2f283f(0x141)]['region'])});}export function getProjectConfigPath(){const _0x4045ec=a107_0x4c9b4b;return resolveConfigPath(process[_0x4045ec(0x12e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x977236){const _0x3bbb7b=a107_0x4c9b4b;if(!existsSync(_0x977236))return{'status':_0x3bbb7b(0x143)};try{const _0x4f64dd=readFileSync(_0x977236,{'encoding':_0x3bbb7b(0x157)});if(!_0x4f64dd?.['trim']())return{'status':_0x3bbb7b(0x14d)};const _0x1fe4d0=JSON['parse'](_0x4f64dd);return{'status':'ok','data':_0x1fe4d0};}catch(_0x54389e){return{'status':_0x3bbb7b(0x136),'message':_0x54389e instanceof Error?_0x54389e[_0x3bbb7b(0x179)]:String(_0x54389e)};}}export function loadRawConfigLayers(_0x18a155){const _0x223278=a107_0x4c9b4b;let _0xc50894={},_0x24830a={},_0x1e8749,_0x4df00c;try{_0x1e8749=resolveConfigPath(homedir());if(_0x1e8749){const _0x47a18d=readFileSync(_0x1e8749,{'encoding':_0x223278(0x157)});if(_0x47a18d)_0xc50894=JSON[_0x223278(0x145)](_0x47a18d);}}catch{}try{const _0x48fc9d=_0x18a155||process[_0x223278(0x12e)]();_0x4df00c=resolveConfigPath(_0x48fc9d);if(_0x4df00c){const _0x2c138c=readFileSync(_0x4df00c,{'encoding':_0x223278(0x157)});if(_0x2c138c)_0x24830a=JSON['parse'](_0x2c138c);}}catch{}return{'globalPath':_0x1e8749,'projectPath':_0x4df00c,'globalConfig':_0xc50894,'projectConfig':_0x24830a};}function mergeRawConfigLayers(_0x327e38){const _0x27b169=a107_0x4c9b4b,{globalConfig:_0x7b0682,projectConfig:_0x268ccd}=_0x327e38,_0x419f5b={..._0x7b0682,..._0x268ccd};delete _0x419f5b[_0x27b169(0x132)];if(_0x27b169(0x153)in _0x268ccd)_0x419f5b[_0x27b169(0x153)]=_0x268ccd[_0x27b169(0x153)];else _0x7b0682[_0x27b169(0x153)]&&(_0x419f5b[_0x27b169(0x153)]=_0x7b0682[_0x27b169(0x153)]);return _0x419f5b;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1964ce){return mergeRawConfigLayers(loadRawConfigLayers(_0x1964ce));}export function readRawConfigWithLayers(_0x2a583a){const _0x50318e=loadRawConfigLayers(_0x2a583a);return{'config':mergeRawConfigLayers(_0x50318e),'layers':_0x50318e};}export function resolveDefaultAppSource(_0x14f031){const _0x1b37b9=a107_0x4c9b4b;if(_0x1b37b9(0x153)in _0x14f031[_0x1b37b9(0x166)])return _0x1b37b9(0x16c);if(_0x14f031[_0x1b37b9(0x178)][_0x1b37b9(0x153)])return _0x1b37b9(0x165);return null;}function buildConfig(_0x1e6d76,_0x5ad926){const _0xbaab59=a107_0x4c9b4b,_0x3e04e6=mergeRawConfigLayers(_0x1e6d76),{projectConfig:_0x57e879}=_0x1e6d76,_0x115253=_0x3e04e6[_0xbaab59(0x153)]||undefined,_0x2fa1b2=typeof _0x5ad926[_0xbaab59(0x167)]===_0xbaab59(0x15c)?_0x5ad926[_0xbaab59(0x167)]:undefined,_0x1832a9=_0x57e879[_0xbaab59(0x167)]||_0x57e879['app'],_0x39a867=!_0x2fa1b2&&!_0x5ad926[_0xbaab59(0x162)]&&!_0x1832a9&&!_0x57e879[_0xbaab59(0x153)],_0x4e36bc=_0x39a867?env('APPCODE'):undefined,_0x5f19c9=_0x5ad926['app']||(_0x39a867&&!_0x4e36bc?env('APP'):undefined),_0x53abb8=_0x5f19c9||_0x115253||undefined,_0x3820c3=_0x5f19c9||_0x4e36bc?undefined:_0x1832a9||(_0x57e879[_0xbaab59(0x153)]?undefined:_0x3e04e6[_0xbaab59(0x167)]||_0x3e04e6[_0xbaab59(0x162)]||undefined),_0x203348=_0x5f19c9||(_0x3820c3?undefined:_0x115253),_0x22bc58=resolveLocalAppAliasCode(_0x3e04e6,_0x203348),_0x4a3186=productEnvNames(_0xbaab59(0x134))[_0xbaab59(0x13c)](_0x50d376=>process.env[_0x50d376]!==undefined),_0x52d75d=_0x4a3186?process.env[_0x4a3186]:undefined,_0x188588=_0x57e879[_0xbaab59(0x137)]||_0x52d75d||_0x3e04e6['accessKey']||undefined,_0x3eda11=_0x57e879[_0xbaab59(0x137)]?'project\x20config':_0x52d75d?_0x4a3186:_0x3e04e6[_0xbaab59(0x137)]?_0xbaab59(0x12b):undefined,_0x46abd6=_0x5ad926[_0xbaab59(0x151)]||_0x3e04e6[_0xbaab59(0x151)]||env(_0xbaab59(0x144))||DEFAULT_CONFIG_VALUES[_0xbaab59(0x151)],_0x4fff45=normalizeEnv(String(_0x46abd6)),_0x188d8d=isDaily(_0x4fff45)?_0xbaab59(0x174):isDev(_0x4fff45)?_0xbaab59(0x12c):_0xbaab59(0x172),_0x839f55=_0x2fa1b2||_0x4e36bc||_0x3820c3||_0x22bc58?undefined:resolveCachedAppCode(_0x203348,_0x188d8d,_0x188588),_0x4f0354=_0x2fa1b2||_0x4e36bc||_0x3820c3||_0x22bc58||_0x839f55||undefined,_0x300e39=_0x2fa1b2?_0xbaab59(0x15d):_0x4e36bc?_0xbaab59(0x151):_0x3820c3?'top-level':_0x22bc58?_0xbaab59(0x15f):_0x839f55?'cache':undefined,_0x5d6df3=_0x3e04e6[_0xbaab59(0x133)]||DEFAULT_CONFIG_VALUES[_0xbaab59(0x133)],_0x35ef3d=undefined,_0x156b15=_0x5ad926['format']||env(_0xbaab59(0x17d))||_0x3e04e6[_0xbaab59(0x16f)],_0x1ca997=normalizeLegacyOutputFormat(_0x156b15),_0x5bb8e9=env(_0xbaab59(0x17a))||_0x3e04e6[_0xbaab59(0x152)],_0x41c742=_0x5bb8e9?Number(_0x5bb8e9)||undefined:undefined,_0xd898f4=_0x3e04e6[_0xbaab59(0x140)],_0x65b11=_0xd898f4===_0xbaab59(0x168)||_0xd898f4===_0xbaab59(0x12f)||_0xd898f4===_0xbaab59(0x142)?_0xd898f4:DEFAULT_CONFIG_VALUES[_0xbaab59(0x140)],_0x42c0d6=_0x3e04e6[_0xbaab59(0x158)]===!![],_0x5dd010=env('VERBOSE'),_0x1c24ac=_0x5dd010==='1'||_0x5dd010===_0xbaab59(0x154);return{'appCode':typeof _0x4f0354===_0xbaab59(0x15c)&&_0x4f0354['trim']()?_0x4f0354['trim']():undefined,'appCodeSource':_0x300e39,'env':_0x188d8d,'locale':_0x5d6df3,'cookie':_0x35ef3d,'accessKey':_0x188588,'accessKeySource':_0x3eda11,'format':_0x1ca997,'pageSize':_0x41c742,'riskLevel':_0x65b11,'nativeToolAvailable':_0x42c0d6,'verbose':_0x1c24ac,'defaultApp':_0x115253,'currentApp':typeof _0x53abb8===_0xbaab59(0x15c)?_0x53abb8:undefined,'raw':_0x3e04e6};}function env(_0x287993){return productEnv(_0x287993);}async function buildAuth(_0x2c3330){const _0x2e14d5=a107_0x4c9b4b,_0x3709d7='',_0x7b6867=!!_0x2c3330[_0x2e14d5(0x137)];return{'cookie':_0x3709d7,'isLoggedIn':_0x7b6867,async 'getOrLogin'(){const _0x936368=_0x2e14d5;if(_0x7b6867)return _0x3709d7;throw CliErrors[_0x936368(0x15a)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a108_0x2f2f95=a108_0x104d;(function(_0x20e003,_0x4c894c){const _0x118c83=a108_0x104d,_0x5442de=_0x20e003();while(!![]){try{const _0x5e335d=parseInt(_0x118c83(0x185))/0x1*(-parseInt(_0x118c83(0x144))/0x2)+-parseInt(_0x118c83(0x180))/0x3*(parseInt(_0x118c83(0x157))/0x4)+-parseInt(_0x118c83(0x171))/0x5+-parseInt(_0x118c83(0x16b))/0x6*(parseInt(_0x118c83(0x137))/0x7)+parseInt(_0x118c83(0x199))/0x8*(-parseInt(_0x118c83(0x128))/0x9)+parseInt(_0x118c83(0x1ad))/0xa*(parseInt(_0x118c83(0x148))/0xb)+parseInt(_0x118c83(0x1d6))/0xc;if(_0x5e335d===_0x4c894c)break;else _0x5442de['push'](_0x5442de['shift']());}catch(_0x3d07dc){_0x5442de['push'](_0x5442de['shift']());}}}(a108_0x3689,0xd359f));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(_0x1f20bf){if(_activeAK!==(_0x1f20bf||undefined))clearSdkClient();_activeAK=_0x1f20bf||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x1e6614,_0x4a967c){const _0x521082=a108_0x104d;if(!_activeAK)throw CliErrors[_0x521082(0x1c4)](_0x521082(0x1a7)+PRODUCT_CONFIG[_0x521082(0x13c)]+'.');const _0xff37e7=_0x1e6614?getSdkClient({'appCode':_0x1e6614,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':'client-ak','accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x4a967c(_0xff37e7));}async function identitySdkRequest(_0x5d7f5e){const _0x4bd114=a108_0x104d,_0x2b9b38=_activeAK;if(!_0x2b9b38)throw CliErrors[_0x4bd114(0x1c4)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4bd114(0x13c)]+'.');return withSdkErrors(()=>_0x5d7f5e(getIdentitySdkClient(_0x2b9b38,getRuntimeDomain())));}async function withSdkErrors(_0xf8b4b2){const _0x347fd4=a108_0x104d;try{return await _0xf8b4b2();}catch(_0x2e3a6c){if(_0x2e3a6c instanceof CliError)throw _0x2e3a6c;if(!_0x2e3a6c||typeof _0x2e3a6c!=='object')throw _0x2e3a6c;const _0x34ec3f=_0x2e3a6c,_0x4458df=_0x34ec3f[_0x347fd4(0x159)]&&typeof _0x34ec3f[_0x347fd4(0x159)]===_0x347fd4(0x17b)?_0x34ec3f['response']:{},_0x5bc7c0=firstString(_0x4458df[_0x347fd4(0x1a3)],_0x4458df[_0x347fd4(0x1ed)],_0x4458df[_0x347fd4(0x161)],_0x34ec3f[_0x347fd4(0x1ed)]),_0x5ec32b=createRateLimitError({'status':[_0x34ec3f['status'],_0x4458df['status'],_0x4458df['code']][_0x347fd4(0x202)](_0x42a09f=>Number(_0x42a09f)===0x1ad)??_0x34ec3f[_0x347fd4(0x1f1)],'errorCode':firstString(_0x4458df[_0x347fd4(0x177)],typeof _0x4458df[_0x347fd4(0x1f8)]==='string'?_0x4458df[_0x347fd4(0x1f8)]:undefined,_0x34ec3f[_0x347fd4(0x1f8)]),'message':_0x5bc7c0,'retryAfter':_0x34ec3f[_0x347fd4(0x16d)]??readRetryAfterSeconds(_0x34ec3f['response'])});if(_0x5ec32b)throw _0x5ec32b;const _0x28a655=createAccessError(_0x34ec3f[_0x347fd4(0x159)],_0x34ec3f[_0x347fd4(0x1f8)]);if(_0x28a655)throw _0x28a655;throw CliErrors[_0x347fd4(0x1a2)](_0x5bc7c0||_0x347fd4(0x1d3),_0x34ec3f[_0x347fd4(0x1f8)]?'API\x20error\x20code:\x20'+_0x34ec3f[_0x347fd4(0x1f8)]:undefined);}}function firstString(..._0x488326){const _0x413a0c=a108_0x104d;for(const _0x3032cc of _0x488326){if(typeof _0x3032cc===_0x413a0c(0x186)&&_0x3032cc[_0x413a0c(0x16c)]())return _0x3032cc['trim']();}return undefined;}async function decodeResponseBody(_0x2ebe54){const _0x6287e=a108_0x104d;if(typeof _0x2ebe54[_0x6287e(0x19e)]===_0x6287e(0x12a))try{const _0x23396d=await _0x2ebe54[_0x6287e(0x19e)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x23396d),'text':_0x23396d};}catch{return{'isJson':![],'text':_0x23396d[_0x6287e(0x16c)]()||undefined};}}catch(_0x422633){if(_0x422633 instanceof Error&&_0x422633['name']===_0x6287e(0x167))throw _0x422633;}try{return{'isJson':!![],'data':await _0x2ebe54[_0x6287e(0x15c)]()};}catch(_0x224240){if(_0x224240 instanceof Error&&_0x224240[_0x6287e(0x1ce)]===_0x6287e(0x167))throw _0x224240;return{'isJson':![]};}}function throwIfRateLimited(_0x310b71,_0x1af03a,_0x226dff){const _0x44130a=a108_0x104d,_0x16e2ca=_0x1af03a&&typeof _0x1af03a===_0x44130a(0x17b)?_0x1af03a:{},_0x4ab36e=[_0x16e2ca[_0x44130a(0x1f1)],_0x16e2ca[_0x44130a(0x1f8)]][_0x44130a(0x202)](_0xd34ded=>Number(_0xd34ded)===0x1ad),_0x1305ca=createRateLimitError({'status':_0x310b71[_0x44130a(0x1f1)]===0x1ad?_0x310b71[_0x44130a(0x1f1)]:_0x4ab36e??_0x310b71[_0x44130a(0x1f1)],'errorCode':firstString(_0x16e2ca[_0x44130a(0x177)],typeof _0x16e2ca[_0x44130a(0x1f8)]===_0x44130a(0x186)?_0x16e2ca['code']:undefined),'message':firstString(_0x16e2ca[_0x44130a(0x1a3)],_0x16e2ca['message'],_0x16e2ca['msg'],_0x226dff),'retryAfter':readRetryAfter(_0x310b71[_0x44130a(0x19f)])??readRetryAfterSeconds(_0x1af03a)});if(_0x1305ca)throw _0x1305ca;}async function apiRequest(_0x33a95e,_0x3469dd={}){const _0x410a62=a108_0x104d,{method:method=_0x410a62(0x1b0),body:_0x36b47c,headers:headers={},timeout:timeout=0x7530,domain:domain='runtime',rejectRedirects:rejectRedirects=![]}=_0x3469dd,_0x10356c=_activeAK,_0x4da42c=domain==='harness'?requireHarnessDomain():domain==='api'?getApiDomain():getRuntimeDomain();if(!_0x10356c)throw CliErrors[_0x410a62(0x1c4)](_0x410a62(0x1a7)+PRODUCT_CONFIG[_0x410a62(0x13c)]+'.');const _0x4b9467=''+_0x4da42c+_0x33a95e,_0x48da6a={'X-User-AK':_0x10356c},_0x1dcd34=new AbortController(),_0x12b9ba=setTimeout(()=>_0x1dcd34['abort'](),timeout);try{const _0x1162b4=await fetch(_0x4b9467,{'method':method,...rejectRedirects?{'redirect':_0x410a62(0x15d)}:{},'headers':{'Content-Type':_0x410a62(0x124),'X-Invoke-Source':PRODUCT_CONFIG[_0x410a62(0x1c5)],..._0x48da6a,...headers},'body':_0x36b47c?JSON[_0x410a62(0x134)](_0x36b47c):undefined,'signal':_0x1dcd34['signal']});return await readApiResponse(_0x1162b4);}catch(_0x6e7bd6){if(_0x6e7bd6 instanceof Error&&_0x6e7bd6[_0x410a62(0x1ce)]===_0x410a62(0x167))throw CliErrors[_0x410a62(0x1a2)]('Request\x20timeout:\x20'+_0x4b9467);throw _0x6e7bd6;}finally{clearTimeout(_0x12b9ba);}}async function readApiResponse(_0x10d06f){const _0x2d8404=a108_0x104d,_0x3cf1ce=await decodeResponseBody(_0x10d06f);if(!_0x3cf1ce[_0x2d8404(0x169)]){throwIfRateLimited(_0x10d06f,undefined,_0x3cf1ce[_0x2d8404(0x19e)]);throw CliErrors[_0x2d8404(0x1a2)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x10d06f[_0x2d8404(0x1f1)]+')',_0x10d06f['status']>=0x190?_0x2d8404(0x16f):undefined);}const _0x2c1a75=_0x3cf1ce[_0x2d8404(0x164)];throwIfRateLimited(_0x10d06f,_0x2c1a75);if(!_0x10d06f['ok']||_0x2c1a75[_0x2d8404(0x136)]===![]){const _0x4388ef=createAccessError(_0x2c1a75);if(_0x4388ef)throw _0x4388ef;throw CliErrors[_0x2d8404(0x1a2)](_0x2c1a75[_0x2d8404(0x1a3)]||_0x2c1a75[_0x2d8404(0x1ed)]||_0x2c1a75['msg']||_0x2d8404(0x1f7)+_0x10d06f[_0x2d8404(0x1f1)],readApiErrorCode(_0x2c1a75)?_0x2d8404(0x1db)+readApiErrorCode(_0x2c1a75):undefined);}return _0x2c1a75;}async function apiBinaryRequest(_0x38623d,_0x3e31b0={}){const _0x1dc475=a108_0x104d,{method:method=_0x1dc475(0x1b0),headers:headers={},timeout:timeout=0x7530}=_0x3e31b0,_0x3ce843=_activeAK,_0x58b476=getRuntimeDomain();if(!_0x3ce843)throw CliErrors[_0x1dc475(0x1c4)](_0x1dc475(0x1a7)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x384538=''+_0x58b476+_0x38623d,_0x56cf18=new AbortController(),_0x4b1fdb=setTimeout(()=>_0x56cf18[_0x1dc475(0x138)](),timeout);try{const _0x589b55=await fetch(_0x384538,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1dc475(0x1c5)],'X-User-AK':_0x3ce843,...headers},'signal':_0x56cf18[_0x1dc475(0x1d7)]});if(!_0x589b55['ok']){const _0x1e2efa=await decodeResponseBody(_0x589b55),_0x2be593=_0x1e2efa[_0x1dc475(0x164)]&&typeof _0x1e2efa[_0x1dc475(0x164)]==='object'?_0x1e2efa[_0x1dc475(0x164)]:{},_0x3111ee=firstString(_0x2be593['errorMsg'],_0x2be593[_0x1dc475(0x1ed)],_0x2be593[_0x1dc475(0x177)],_0x1e2efa[_0x1dc475(0x19e)]);throwIfRateLimited(_0x589b55,_0x1e2efa[_0x1dc475(0x164)],_0x3111ee);const _0x168f04=createAccessError(_0x1e2efa[_0x1dc475(0x164)]);if(_0x168f04)throw _0x168f04;throw CliErrors[_0x1dc475(0x1a2)](_0x3111ee||_0x1dc475(0x1f7)+_0x589b55[_0x1dc475(0x1f1)],_0x1dc475(0x1fb)+_0x384538);}return Buffer['from'](await _0x589b55['arrayBuffer']());}catch(_0x2b2b9c){if(_0x2b2b9c instanceof Error&&_0x2b2b9c[_0x1dc475(0x1ce)]===_0x1dc475(0x167))throw CliErrors[_0x1dc475(0x1a2)]('Request\x20timeout:\x20'+_0x384538);throw _0x2b2b9c;}finally{clearTimeout(_0x4b1fdb);}}async function toolboxRequest(_0x38acba,_0x54b973,_0x5ad678={}){const _0x3927c4=a108_0x104d,{method:method=_0x3927c4(0x1b0),headers:headers={},timeout:timeout=0x7530}=_0x5ad678,_0x566cbb=_activeAK;if(!_0x566cbb)throw CliErrors[_0x3927c4(0x1c4)](_0x3927c4(0x1a7)+PRODUCT_CONFIG[_0x3927c4(0x13c)]+'.');const _0x2ec438=getApiDomain()['replace'](/\/$/,''),_0x2326c8=new URL(_0x38acba,_0x2ec438+_0x3927c4(0x170));if(_0x54b973)for(const [_0x2814b9,_0x16f940]of Object['entries'](_0x54b973)){_0x16f940!==undefined&&_0x16f940!==null&&_0x2326c8[_0x3927c4(0x14d)]['set'](_0x2814b9,String(_0x16f940));}const _0x36d68f=new AbortController(),_0x38d022=setTimeout(()=>_0x36d68f[_0x3927c4(0x138)](),timeout);try{const _0x790435=await fetch(_0x2326c8,{'method':method,'headers':{'Content-Type':_0x3927c4(0x124),'X-Invoke-Source':PRODUCT_CONFIG[_0x3927c4(0x1c5)],'X-User-AK':_0x566cbb,...headers},'signal':_0x36d68f[_0x3927c4(0x1d7)]}),_0x1b7932=await decodeResponseBody(_0x790435);if(!_0x1b7932[_0x3927c4(0x169)]){throwIfRateLimited(_0x790435,undefined,_0x1b7932[_0x3927c4(0x19e)]);throw CliErrors[_0x3927c4(0x1a2)](_0x3927c4(0x1da)+_0x790435[_0x3927c4(0x1f1)]+')',_0x790435['status']>=0x190?_0x3927c4(0x16f):undefined);}const _0x3e9319=_0x1b7932[_0x3927c4(0x164)];throwIfRateLimited(_0x790435,_0x3e9319);if(!_0x790435['ok']){const _0x42a30b=_0x3e9319&&typeof _0x3e9319===_0x3927c4(0x17b)?_0x3e9319:{};throw CliErrors['apiError'](_0x42a30b[_0x3927c4(0x1a3)]||_0x42a30b[_0x3927c4(0x1ed)]||_0x3927c4(0x166)+_0x790435['status'],_0x42a30b[_0x3927c4(0x177)]?_0x3927c4(0x1f0)+_0x42a30b[_0x3927c4(0x177)]:undefined);}if(_0x3e9319&&typeof _0x3e9319===_0x3927c4(0x17b)&&_0x3927c4(0x136)in _0x3e9319&&typeof _0x3e9319['success']===_0x3927c4(0x15e)){const _0x2092a5=_0x3e9319;if(!_0x2092a5[_0x3927c4(0x136)])throw CliErrors[_0x3927c4(0x1a2)](_0x2092a5[_0x3927c4(0x1a3)]||_0x2092a5['message']||_0x3927c4(0x1fe),_0x2092a5[_0x3927c4(0x177)]?'Toolbox\x20error\x20code:\x20'+_0x2092a5[_0x3927c4(0x177)]:undefined);return _0x2092a5[_0x3927c4(0x164)];}return _0x3e9319;}catch(_0x3b559a){if(_0x3b559a instanceof Error&&_0x3b559a[_0x3927c4(0x1ce)]===_0x3927c4(0x167))throw CliErrors[_0x3927c4(0x1a2)](_0x3927c4(0x1ca)+_0x2326c8['toString']());throw _0x3b559a;}finally{clearTimeout(_0x38d022);}}async function skillHubJsonRequest(_0x223e4f,_0x3980cb={}){const _0x510ca5=a108_0x104d,{method:method=_0x510ca5(0x1b0),query:_0x4e28f0,body:_0x1595db,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x3980cb,_0x350cd1=_activeAK;if(!_0x350cd1)throw CliErrors[_0x510ca5(0x1c4)](_0x510ca5(0x1a7)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x394990=getSkillDomain()['replace'](/\/$/,''),_0x58b668=new URL(_0x223e4f,_0x394990+'/');if(_0x4e28f0)for(const [_0x3b6927,_0x510c8f]of Object[_0x510ca5(0x1a9)](_0x4e28f0)){_0x510c8f!==undefined&&_0x510c8f!==null&&_0x58b668['searchParams'][_0x510ca5(0x14b)](_0x3b6927,String(_0x510c8f));}const _0x574046=new AbortController(),_0x19dcb5=setTimeout(()=>_0x574046[_0x510ca5(0x138)](),timeout);try{const _0x43c3e9=await fetch(_0x58b668['toString'](),{'method':method,'headers':{'Accept':_0x510ca5(0x124),'X-Invoke-Source':PRODUCT_CONFIG[_0x510ca5(0x1c5)],'X-User-AK':_0x350cd1,...headers},'body':_0x1595db,'signal':_0x574046[_0x510ca5(0x1d7)]}),_0x4865d3=await decodeResponseBody(_0x43c3e9);if(!_0x4865d3[_0x510ca5(0x169)]){if(allowNotFound&&_0x43c3e9['status']===0x194)return undefined;throwIfRateLimited(_0x43c3e9,undefined,_0x4865d3['text']);throw CliErrors[_0x510ca5(0x1a2)](_0x510ca5(0x1b5)+_0x43c3e9['status']+')',_0x43c3e9[_0x510ca5(0x1f1)]>=0x190?_0x510ca5(0x16f):undefined);}const _0x15f934=_0x4865d3[_0x510ca5(0x164)];throwIfRateLimited(_0x43c3e9,_0x15f934);if(allowNotFound&&isSkillHubNotFoundResponse(_0x43c3e9['status'],_0x15f934))return undefined;const _0x5fa0=!_0x43c3e9['ok']||_0x15f934?.[_0x510ca5(0x136)]===![]||typeof _0x15f934?.[_0x510ca5(0x1f8)]==='number'&&_0x15f934[_0x510ca5(0x1f8)]>=0x190;if(_0x5fa0)throw CliErrors['apiError'](_0x15f934?.[_0x510ca5(0x1a3)]||_0x15f934?.[_0x510ca5(0x1ed)]||_0x15f934?.[_0x510ca5(0x161)]||_0x510ca5(0x122)+_0x43c3e9[_0x510ca5(0x1f1)],_0x15f934?.[_0x510ca5(0x177)]?_0x510ca5(0x1e8)+_0x15f934[_0x510ca5(0x177)]:undefined);return _0x15f934?.[_0x510ca5(0x164)]??_0x15f934;}catch(_0x139dc8){if(_0x139dc8 instanceof Error&&_0x139dc8[_0x510ca5(0x1ce)]==='AbortError')throw CliErrors[_0x510ca5(0x1a2)](_0x510ca5(0x1ca)+_0x58b668[_0x510ca5(0x1d8)]());throw _0x139dc8;}finally{clearTimeout(_0x19dcb5);}}function isSkillHubNotFoundResponse(_0x532725,_0x3f4480){const _0x2d4606=a108_0x104d;if(_0x532725===0x194||_0x3f4480?.['code']===0x194)return!![];if(_0x532725!==0x190&&_0x3f4480?.['code']!==0x190)return![];const _0x5ddcc7=[_0x3f4480?.[_0x2d4606(0x161)],_0x3f4480?.['message'],_0x3f4480?.[_0x2d4606(0x1a3)],_0x3f4480?.[_0x2d4606(0x15d)]]['filter'](_0x2a366d=>typeof _0x2a366d===_0x2d4606(0x186))['join']('\x20');return/skill not found\b/i['test'](_0x5ddcc7);}async function skillHubBinaryRequest(_0x1615d5,_0x962558={}){const _0x309d67=a108_0x104d,{query:_0x2925a6,headers:headers={},timeout:timeout=0x7530}=_0x962558,_0x4034f9=_activeAK;if(!_0x4034f9)throw CliErrors[_0x309d67(0x1c4)](_0x309d67(0x1a7)+PRODUCT_CONFIG[_0x309d67(0x13c)]+'.');const _0x10a54b=getSkillDomain()[_0x309d67(0x1fc)](/\/$/,''),_0x2e8c71=new URL(_0x1615d5,_0x10a54b+'/');if(_0x2925a6)for(const [_0x2ffb03,_0x237fe8]of Object[_0x309d67(0x1a9)](_0x2925a6)){_0x237fe8!==undefined&&_0x237fe8!==null&&_0x2e8c71['searchParams'][_0x309d67(0x14b)](_0x2ffb03,String(_0x237fe8));}const _0x35f18e=new AbortController(),_0x152241=setTimeout(()=>_0x35f18e[_0x309d67(0x138)](),timeout);try{const _0x2209af=await fetch(_0x2e8c71[_0x309d67(0x1d8)](),{'method':_0x309d67(0x1b0),'headers':{'Accept':_0x309d67(0x1bd),'X-Invoke-Source':PRODUCT_CONFIG[_0x309d67(0x1c5)],'X-User-AK':_0x4034f9,...headers},'signal':_0x35f18e['signal']});if(!_0x2209af['ok']){const _0x5fef51=await decodeResponseBody(_0x2209af),_0x1f05c4=_0x5fef51['data']&&typeof _0x5fef51[_0x309d67(0x164)]==='object'?_0x5fef51[_0x309d67(0x164)]:{},_0x2eb823=firstString(_0x1f05c4['errorMsg'],_0x1f05c4[_0x309d67(0x1ed)],_0x1f05c4[_0x309d67(0x161)],_0x1f05c4[_0x309d67(0x177)],_0x5fef51['text']);throwIfRateLimited(_0x2209af,_0x5fef51[_0x309d67(0x164)],_0x2eb823);throw CliErrors['apiError'](_0x2eb823||'SkillHub\x20API\x20error:\x20'+_0x2209af['status'],'Download\x20failed:\x20'+_0x2e8c71[_0x309d67(0x1d8)]());}return Buffer[_0x309d67(0x12c)](await _0x2209af['arrayBuffer']());}catch(_0x28edef){if(_0x28edef instanceof Error&&_0x28edef[_0x309d67(0x1ce)]===_0x309d67(0x167))throw CliErrors[_0x309d67(0x1a2)]('Request\x20timeout:\x20'+_0x2e8c71[_0x309d67(0x1d8)]());throw _0x28edef;}finally{clearTimeout(_0x152241);}}export async function getBffEndpointContract(_0x1f46c1,_0x3c60ee){const _0x543090=a108_0x104d;if(encodeURIComponent(_0x1f46c1)!==_0x1f46c1||_0x1f46c1==='.'||_0x1f46c1==='..')throw CliErrors[_0x543090(0x20a)]('Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.');if(_0x3c60ee===_0x543090(0x187))throw CliErrors[_0x543090(0x20a)](_0x543090(0x188)+_0x1f46c1+',\x20name='+_0x3c60ee);const _0x4e16af=await sdkRequest(_0x1f46c1,_0xd52da4=>{const _0x42cf21=_0x543090;if(!(_0x42cf21(0x1b8)in _0xd52da4['bff']))throw CliErrors[_0x42cf21(0x20a)](_0x42cf21(0x1ae));return _0xd52da4[_0x42cf21(0x200)]['getEndpoint'](_0x3c60ee);});if(!_0x4e16af||typeof _0x4e16af!==_0x543090(0x17b)||Array[_0x543090(0x15f)](_0x4e16af)||_0x4e16af['appCode']!==_0x1f46c1||_0x4e16af[_0x543090(0x14c)]!==_0x3c60ee)throw CliErrors[_0x543090(0x20a)](_0x543090(0x188)+_0x1f46c1+_0x543090(0x14f)+_0x3c60ee);const _0xdc88f7=_0x4e16af[_0x543090(0x176)];if(_0xdc88f7!=null&&(typeof _0xdc88f7!==_0x543090(0x1a5)||!Number[_0x543090(0x1b3)](_0xdc88f7)))throw CliErrors[_0x543090(0x1a2)]('Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.');return{'appCode':_0x4e16af[_0x543090(0x1b7)],'functionName':_0x4e16af[_0x543090(0x14c)],'description':_0x4e16af['description'],'version':_0x4e16af['version'],'gmtModified':_0xdc88f7};}export async function getSqlQueryInfo(_0x179ac9,_0x3e929b){const _0x1b9eea=a108_0x104d,_0x3fd573=await sdkRequest(_0x179ac9,_0x36c48e=>{const _0x426fd3=a108_0x104d;if(!(_0x426fd3(0x193)in _0x36c48e[_0x426fd3(0x1ef)]))throw CliErrors[_0x426fd3(0x20a)](_0x426fd3(0x179));return _0x36c48e['sql']['query']({'appCode':_0x179ac9,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x3e929b});}),_0x506572=_0x3fd573&&typeof _0x3fd573===_0x1b9eea(0x17b)&&_0x1b9eea(0x173)in _0x3fd573?_0x3fd573[_0x1b9eea(0x173)]?.[0x0]:_0x3fd573&&typeof _0x3fd573===_0x1b9eea(0x17b)&&_0x1b9eea(0x17e)in _0x3fd573?_0x3fd573:undefined;if(!_0x506572)throw CliErrors[_0x1b9eea(0x20a)]('SQL\x20query\x20not\x20found:\x20'+_0x3e929b);return _0x506572;}export async function listApprovalTodo(_0x266d4c,_0x447543=0x1,_0x6b83ad=0x14){const _0x45d62e=a108_0x104d,_0x17195d=await sdkRequest(_0x266d4c,_0xf11c4a=>_0xf11c4a[_0x45d62e(0x1b9)][_0x45d62e(0x203)]({'currentPage':_0x447543,'pageSize':_0x6b83ad}));if(!_0x17195d||typeof _0x17195d!==_0x45d62e(0x17b)||!Array[_0x45d62e(0x15f)](_0x17195d[_0x45d62e(0x1c2)]))throw CliErrors[_0x45d62e(0x1a2)](_0x45d62e(0x1c0));return _0x17195d;}export async function getApprovalTaskDetail(_0x466be4,_0x104296){const _0x813087=a108_0x104d,_0x1105c4=await sdkRequest(_0x104296,_0x3c011a=>_0x3c011a['approval'][_0x813087(0x141)](_0x466be4));if(!_0x1105c4||typeof _0x1105c4!==_0x813087(0x17b)||Array[_0x813087(0x15f)](_0x1105c4))throw CliErrors['apiError'](_0x813087(0x18d));return _0x1105c4;}export async function approveApprovalTask(_0x42c082){const _0x3dae43=a108_0x104d;return await sdkRequest(_0x42c082[_0x3dae43(0x1b7)],_0x7f1a31=>_0x7f1a31['approval'][_0x3dae43(0x1f2)](_0x42c082)),null;}export async function transferApprovalTask(_0x27b3e2){const _0x29078d=a108_0x104d;return await sdkRequest(_0x27b3e2[_0x29078d(0x1b7)],_0x546724=>_0x546724[_0x29078d(0x1b9)]['transfer'](_0x27b3e2)),null;}function isRemoteAppItem(_0xc97787){const _0x46c8a8=a108_0x104d;return!!_0xc97787&&typeof _0xc97787===_0x46c8a8(0x17b)&&typeof _0xc97787[_0x46c8a8(0x1b7)]===_0x46c8a8(0x186)&&typeof _0xc97787['appName']===_0x46c8a8(0x186);}function extractRemoteAppItems(_0x54e90e){const _0x5c9b54=a108_0x104d;if(Array['isArray'](_0x54e90e))return _0x54e90e['filter'](isRemoteAppItem);if(!_0x54e90e||typeof _0x54e90e!==_0x5c9b54(0x17b))throw CliErrors['apiError'](_0x5c9b54(0x1c6));const _0x3619b4=_0x54e90e;if(Array[_0x5c9b54(0x15f)](_0x3619b4[_0x5c9b54(0x173)]))return _0x3619b4[_0x5c9b54(0x173)][_0x5c9b54(0x18c)](isRemoteAppItem);if(_0x3619b4[_0x5c9b54(0x164)]&&typeof _0x3619b4[_0x5c9b54(0x164)]===_0x5c9b54(0x17b)){const _0x36f582=_0x3619b4[_0x5c9b54(0x164)];if(Array[_0x5c9b54(0x15f)](_0x36f582[_0x5c9b54(0x173)]))return _0x36f582[_0x5c9b54(0x173)]['filter'](isRemoteAppItem);}throw CliErrors[_0x5c9b54(0x1a2)](_0x5c9b54(0x125));}export async function getMyApps(){const _0x4a2373=a108_0x104d;return extractRemoteAppItems(await identitySdkRequest(_0x2ea09c=>_0x2ea09c[_0x4a2373(0x1ab)]()));}export async function getLoginUserInfo(){const _0x53de57=a108_0x104d,_0x87b83b=await identitySdkRequest(_0x93299f=>_0x93299f['loginUserInfo']());if(!_0x87b83b||typeof _0x87b83b!==_0x53de57(0x17b)||Array['isArray'](_0x87b83b))throw CliErrors[_0x53de57(0x1a2)](_0x53de57(0x1e0));return _0x87b83b;}export const USER_ACCOUNT_BIND_PATH=a108_0x2f2f95(0x152);export async function bindExternalUserAccount(_0x1ea785,_0x1f8704){const _0x538ef7=a108_0x2f2f95;return identitySdkRequest(_0x115475=>_0x115475[_0x538ef7(0x162)]({'provider':_0x1ea785,'accountId':_0x1f8704}));}function runtimeSchedulePath(_0x2ca00a,_0x3a1b9c=''){const _0x5b1a90=a108_0x2f2f95;return _0x5b1a90(0x1ba)+encodeURIComponent(_0x2ca00a)+_0x5b1a90(0x1f9)+_0x3a1b9c;}export async function validateRuntimeSchedule(_0x348072,_0x197e1f){const _0x26a80f=a108_0x2f2f95,_0x196178=await apiRequest(runtimeSchedulePath(_0x348072,_0x26a80f(0x145)),{'domain':'harness','method':_0x26a80f(0x206),'body':_0x197e1f});return _0x196178[_0x26a80f(0x164)];}export async function createRuntimeSchedule(_0x4f44d6,_0x4d3237){const _0x11d0b5=a108_0x2f2f95,_0x2c38f9=await apiRequest(runtimeSchedulePath(_0x4f44d6),{'domain':_0x11d0b5(0x1e5),'method':_0x11d0b5(0x206),'body':_0x4d3237});return _0x2c38f9[_0x11d0b5(0x164)];}export async function listRuntimeSchedules(_0x162b70,_0x495e59){const _0x2c388f=a108_0x2f2f95,_0x737cd3=new URLSearchParams();_0x737cd3[_0x2c388f(0x14b)](_0x2c388f(0x12d),_0x495e59['kind']);if(_0x495e59['limit']!==undefined)_0x737cd3[_0x2c388f(0x14b)](_0x2c388f(0x13d),String(_0x495e59[_0x2c388f(0x13d)]));if(_0x495e59[_0x2c388f(0x183)])_0x737cd3[_0x2c388f(0x14b)](_0x2c388f(0x183),_0x495e59[_0x2c388f(0x183)]);const _0x18863e=_0x737cd3['size']>0x0?'?'+_0x737cd3['toString']():'',_0xc169d4=await apiRequest(''+runtimeSchedulePath(_0x162b70)+_0x18863e,{'domain':'harness'});return _0xc169d4[_0x2c388f(0x164)];}export async function getRuntimeSchedule(_0xf3017c,_0x2b71ca){const _0x5395b5=a108_0x2f2f95,_0x290ea3=await apiRequest(runtimeSchedulePath(_0xf3017c,'/'+encodeURIComponent(_0x2b71ca)),{'domain':_0x5395b5(0x1e5)});return _0x290ea3[_0x5395b5(0x164)];}export async function deleteRuntimeSchedule(_0x3e5d42,_0x4d516d){const _0x2597dd=a108_0x2f2f95,_0x398368=await apiRequest(runtimeSchedulePath(_0x3e5d42,'/'+encodeURIComponent(_0x4d516d)),{'domain':'harness','method':_0x2597dd(0x1eb)});return _0x398368[_0x2597dd(0x164)];}export async function runRuntimeSchedule(_0x49041d,_0x3044a1){const _0xcaaa59=a108_0x2f2f95,_0x825d1b=await apiRequest(runtimeSchedulePath(_0x49041d,'/'+encodeURIComponent(_0x3044a1)+_0xcaaa59(0x1d0)),{'domain':_0xcaaa59(0x1e5),'method':'POST'});return _0x825d1b['data'];}export async function listDatasets(_0x15d95e,_0xacb6c1){const _0x31310d=a108_0x2f2f95,_0x339d20=await sdkRequest(_0x15d95e,_0x573fb9=>_0x573fb9[_0x31310d(0x178)][_0x31310d(0x12f)]({..._0xacb6c1?.[_0x31310d(0x1f8)]&&{'code':_0xacb6c1[_0x31310d(0x1f8)]},..._0xacb6c1?.[_0x31310d(0x1ce)]&&{'name':_0xacb6c1[_0x31310d(0x1ce)]},..._0xacb6c1?.[_0x31310d(0x1a8)]&&{'tableName':_0xacb6c1[_0x31310d(0x1a8)]}}));return extractList(_0x339d20);}export async function getDatasetDetail(_0x3b2428){const _0x342338=a108_0x2f2f95;return sdkRequest(undefined,_0x53f6ca=>_0x53f6ca[_0x342338(0x178)][_0x342338(0x1dd)]({'code':_0x3b2428}));}function importSdkRequest(_0x5a59d5,_0x5705ac,_0x7a7942){return sdkRequest(_0x5a59d5,_0x510713=>{const _0x412c53=a108_0x104d,_0x4ba47b=_0x510713[_0x412c53(0x142)](_0x412c53(0x127)+_0x5705ac);if(!(_0x4ba47b instanceof ClientAkModel))throw CliErrors[_0x412c53(0x20a)]('Dataset\x20import\x20requires\x20Client\x20AK.');return _0x7a7942(_0x4ba47b);});}export async function getDatasetImportContract(_0xb8e11,_0x31862c){const _0x317f7d=a108_0x2f2f95;return importSdkRequest(_0xb8e11,_0x31862c,_0x32af8d=>_0x32af8d[_0x317f7d(0x12e)]());}export async function createDatasetImportBatch(_0x461df0,_0x498098,_0x3c514b){const _0x22be46=a108_0x2f2f95;return importSdkRequest(_0x461df0,_0x498098,_0x3c2bdd=>_0x3c2bdd[_0x22be46(0x12b)](_0x3c514b));}export async function readDatasetImportRows(_0x5930fe,_0x4a8a72,_0x9a8b30){const _0x405492=a108_0x2f2f95,_0x29b1d2=await importSdkRequest(_0x5930fe,_0x4a8a72,_0x47bc5a=>_0x47bc5a['importReadback']({'ids':_0x9a8b30}));if(!_0x29b1d2||!Array[_0x405492(0x15f)](_0x29b1d2[_0x405492(0x1e2)]))throw CliErrors['apiError'](_0x405492(0x13f));return _0x29b1d2[_0x405492(0x1e2)];}export async function readDatasetImportTaskRows(_0x28eb58,_0x26a84c,_0x1cf30e){const _0x5b2805=a108_0x2f2f95,_0x4d6a31=await importSdkRequest(_0x28eb58,_0x26a84c,_0x18c090=>_0x18c090[_0x5b2805(0x1b1)]({'taskId':_0x1cf30e}));if(!_0x4d6a31||!Array['isArray'](_0x4d6a31[_0x5b2805(0x1e2)]))throw CliErrors[_0x5b2805(0x1a2)](_0x5b2805(0x1c3));return _0x4d6a31[_0x5b2805(0x1e2)];}export async function uploadDatasetImportImage(_0x41128e,_0x2fb237,_0x576e5c,_0x539d3f){const _0x228516=a108_0x2f2f95;return importSdkRequest(_0x41128e,_0x2fb237,_0x21d92e=>_0x21d92e[_0x228516(0x1d2)]({'importId':_0x576e5c,'contentHash':_0x539d3f[_0x228516(0x1e3)],'file':new Blob([new Uint8Array(_0x539d3f[_0x228516(0x1b6)])],{'type':_0x539d3f[_0x228516(0x17d)]}),'fileName':_0x228516(0x19d)}));}export async function readDatasetImportImage(_0x4e5b2c,_0x2f2318,_0x2d078b,_0x32346d){const _0x2c8aad=a108_0x2f2f95;return importSdkRequest(_0x4e5b2c,_0x2f2318,_0x1708fa=>_0x1708fa[_0x2c8aad(0x130)]({'importId':_0x2d078b,'contentHash':_0x32346d[_0x2c8aad(0x1e3)],'type':_0x32346d[_0x2c8aad(0x17d)],'size':_0x32346d[_0x2c8aad(0x155)]}));}export async function getDatasetSdkUsageDoc(_0x3d8ae5,_0x5abb7c){const _0x4faaf2=a108_0x2f2f95,_0x74f3ee=await toolboxRequest(_0x4faaf2(0x123),{'datasetCode':_0x3d8ae5,'appCode':_0x5abb7c});return typeof _0x74f3ee?.[_0x4faaf2(0x19c)]===_0x4faaf2(0x186)?_0x74f3ee[_0x4faaf2(0x19c)]:'';}export async function uploadRuntimeFile(_0x395c49,_0x3c11c2){const _0x1d1a6f=a108_0x2f2f95,_0x1cf6a3=await readFile(_0x3c11c2);return sdkRequest(_0x395c49,_0x708e74=>_0x708e74['services']['file'][_0x1d1a6f(0x1b4)]({'file':new Blob([new Uint8Array(_0x1cf6a3)]),'fileName':basename(_0x3c11c2)}));}export async function queryRuntimeFileUrl(_0x452806,_0x19d53c={}){const _0x116763=a108_0x2f2f95;return sdkRequest(undefined,_0x2b7503=>_0x2b7503[_0x116763(0x1cd)][_0x116763(0x1d9)]['queryUrl']({'filePath':_0x452806,..._0x19d53c}));}export async function recognizeRuntimeOcr(_0x58ddf8,_0x830b92){const _0x2d5857=a108_0x2f2f95;return sdkRequest(_0x58ddf8,_0x42bda5=>_0x42bda5['services'][_0x2d5857(0x18b)]['recognize'](_0x830b92));}export async function getRuntimeAppConfigByKey(_0x4c6dbb,_0x3786a5){const _0x2a49e4=a108_0x2f2f95,_0x556088=await sdkRequest(_0x4c6dbb,_0x2e96dc=>_0x2e96dc[_0x2a49e4(0x192)][_0x2a49e4(0x129)](_0x3786a5));if(typeof _0x556088!=='string')throw CliErrors[_0x2a49e4(0x20a)](_0x2a49e4(0x143)+_0x3786a5);return _0x556088;}export async function listNotificationChannelConfigs(_0x274de5,_0x5084c0){const _0x2499a6=a108_0x2f2f95,_0xc09b39=await sdkRequest(_0x274de5,_0x79885a=>_0x79885a[_0x2499a6(0x192)][_0x2499a6(0x1fd)](_0x5084c0));if(!Array[_0x2499a6(0x15f)](_0xc09b39))throw CliErrors['apiError'](_0x2499a6(0x205),_0x2499a6(0x151));return _0xc09b39;}export async function listRuntimeArtifacts(_0xf87735,_0x23c512){const _0x82bd5=a108_0x2f2f95,_0x509489=await sdkRequest(_0xf87735,_0x23ab52=>_0x23ab52['artifact'][_0x82bd5(0x12f)](_0x23c512));return Array[_0x82bd5(0x15f)](_0x509489)?_0x509489:[];}export async function getRuntimeArtifact(_0x25246f,_0x43a44d){const _0x29c1b0=a108_0x2f2f95,_0x118ef9=await sdkRequest(_0x43a44d,_0xf85486=>_0xf85486[_0x29c1b0(0x1bf)]['get'](_0x25246f));if(!_0x118ef9)throw CliErrors['validation'](_0x29c1b0(0x1f3)+_0x25246f);return _0x118ef9;}export async function createRuntimeArtifact(_0x32603a,_0x1a7236){const _0x3f4651=a108_0x2f2f95;return sdkRequest(_0x32603a,_0x1e73da=>_0x1e73da[_0x3f4651(0x1bf)][_0x3f4651(0x132)](_0x1a7236));}export async function updateRuntimeArtifact(_0x243cd7,_0x2488df,_0x593939){const _0x14e588=a108_0x2f2f95;return sdkRequest(_0x2488df,_0xba614b=>_0xba614b[_0x14e588(0x1bf)][_0x14e588(0x1e9)](_0x243cd7,_0x593939));}export async function listPersonalBffs(_0x1cb425){const _0x33de08=a108_0x2f2f95,_0x30456a=await sdkRequest(_0x1cb425,_0x1f866c=>_0x1f866c[_0x33de08(0x208)][_0x33de08(0x200)]['list']());return Array[_0x33de08(0x15f)](_0x30456a)?_0x30456a:[];}function a108_0x104d(_0x345d72,_0x4fe8e8){_0x345d72=_0x345d72-0x122;const _0x36895f=a108_0x3689();let _0x104db0=_0x36895f[_0x345d72];return _0x104db0;}export async function getPersonalBff(_0x45021b,_0x2004ca){const _0x251496=a108_0x2f2f95,_0x6bdd7a=await sdkRequest(_0x2004ca,_0x50d2d9=>_0x50d2d9['personal'][_0x251496(0x200)][_0x251496(0x1de)](_0x45021b));if(!_0x6bdd7a)throw CliErrors['validation'](_0x251496(0x150)+_0x45021b);return _0x6bdd7a;}export async function createPersonalBff(_0x1614dc,_0x438e1b){const _0x286463=a108_0x2f2f95;return sdkRequest(_0x1614dc,_0xd64cec=>_0xd64cec[_0x286463(0x208)][_0x286463(0x200)][_0x286463(0x132)](_0x438e1b));}export async function updatePersonalBff(_0xcd7f8d,_0xe9c062,_0x4bd845){const _0x1e5a2f=a108_0x2f2f95;return sdkRequest(_0xe9c062,_0x3becc2=>_0x3becc2[_0x1e5a2f(0x208)][_0x1e5a2f(0x200)]['update'](_0xcd7f8d,_0x4bd845));}export async function executePersonalBff(_0x23c33b,_0x293430,_0xd3e9b5){const _0x163e34=a108_0x2f2f95;return sdkRequest(_0x293430,_0x3147fc=>_0x3147fc['personal'][_0x163e34(0x200)][_0x163e34(0x154)]({'scriptId':_0x23c33b,'params':_0xd3e9b5}));}export async function listPersonalKnowledgeBaseItems(_0x67a150,_0x5d5b56){return listPersonalKnowledge({'appCode':_0x67a150,'accessKey':_activeAK,'signal':_0x5d5b56});}export async function getPersonalKnowledgeBaseItem(_0x3b90a0,_0x48e6e0,_0x4403e2){return getPersonalKnowledge({'appCode':_0x48e6e0,'accessKey':_activeAK,'signal':_0x4403e2},_0x3b90a0);}export async function createPersonalKnowledgeBaseItem(_0x2675d0,_0x100796,_0x38f388){return savePersonalKnowledge({'appCode':_0x2675d0,'accessKey':_activeAK,'signal':_0x38f388},_0x100796);}export async function updatePersonalKnowledgeBaseItem(_0x1e7f6e,_0x26af91,_0x2e86ea,_0x3aad0f){return savePersonalKnowledge({'appCode':_0x26af91,'accessKey':_activeAK,'signal':_0x3aad0f},_0x2e86ea,_0x1e7f6e);}export async function getRuntimeSkillByCode(_0x32a536,_0x598935){const _0x574831=a108_0x2f2f95,_0x2e8996=await skillHubJsonRequest(_0x574831(0x172)+encodeURIComponent(_0x32a536)+'/'+encodeURIComponent(_0x598935),{'allowNotFound':!![]});return _0x2e8996?skillHubRuntimeDetailToRuntimeSkill(_0x2e8996):undefined;}export async function listRuntimeSkills(_0x20c6cc){const _0x144dac=a108_0x2f2f95,_0x50bc18=await skillHubJsonRequest(_0x144dac(0x1cc)+encodeURIComponent(_0x20c6cc['appCode'])+_0x144dac(0x1f4),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x20c6cc[_0x144dac(0x1b7)],_0x50bc18,_0x20c6cc['scope']??'all',_0x20c6cc[_0x144dac(0x1f8)],_0x20c6cc[_0x144dac(0x190)]);}function a108_0x3689(){const _0x16e9e7=['isArray','/diagram','msg','bindAccount','applyUserList','data','found','Toolbox\x20API\x20error:\x20','AbortError','updateRoleUserList','isJson','NAMESPACE_ONLY','2190222jARAdF','trim','retryAfter','getPagePermit','Check\x20your\x20credentials\x20and\x20try\x20again.','/api/node-toolbox/','4141070mzVzNx','/api/v1/skills/','tableData','summary','getRoleList','gmtModified','errorCode','datasetMeta','SQL\x20metadata\x20requires\x20Client\x20AK.','skill','object','skillCode','type','sqlCode','packageBase64','1174479azcgPn','slug','description','cursor','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','382667HTUSUq','string','functions','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','company','min','ocr','filter','Invalid\x20approval\x20task\x20detail\x20response.','deleteRole','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','installableOnly','application/zip','app','query','resolvedVersion','diagramValidated','ownerPreviewVersion','errors','test','8cUJUQA','base64','].applyUserList','markdown','image','text','headers','PUT','sourceFingerprint','apiError','errorMsg','getResourceMenuList','number','publishedVersion','Configure\x20accessKey\x20in\x20','tableName','entries','CUSTOM','myApps','visibility','742970BjBHri','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','].userList','GET','importReadback','warnings','isSafeInteger','upload','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','bytes','appCode','getEndpoint','approval','/api/harness/apps/','map','tags','application/octet-stream','getRoleUserList','artifact','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','diagram','records','Invalid\x20import\x20task\x20readback\x20response.','authRequired','invokeSource','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','diagramBound','version','getDatasetPermitList','Request\x20timeout:\x20','saveMenuPermits','/api/runtime/v1/namespaces/','services','name','isInteger','/run','confirmWarnings','importImage','Runtime\x20SDK\x20request\x20failed.','/publish','max','28852548VGvJly','signal','toString','file','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','API\x20error\x20code:\x20','/api/cli/v1/skills/','getDrivenData','get','savePagePermit','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','all','items','contentHash','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','harness','namespace','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','SkillHub\x20error\x20code:\x20','update','scope','DELETE','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','message','permitList','sql','Toolbox\x20error\x20code:\x20','status','approve','Artifact\x20not\x20found:\x20id=','/skills','/publish/validate','displayName','API\x20error:\x20','code','/schedules','userId','Download\x20failed:\x20','replace','listNotificationChannels','Toolbox\x20API\x20error','permit','bff','PRIVATE','find','listTodo','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','Invalid\x20notification\x20config\x20list\x20response.','POST','getMenuPermitList','personal','skillName','validation','SkillHub\x20API\x20error:\x20','api-doc-generator','application/json','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','undefined','dataset_','5502879vYTIZg','getConfigByKey','function','importBatch','from','kind','importContract','list','importImageReadback','example','create','currentPage','stringify','\x20must\x20be\x20an\x20array.','success','7gcMPRa','abort','createRole','valid','userList','newConfigFileName','limit','toLowerCase','Invalid\x20import\x20readback\x20response.','effective','getTask','getModel','Invalid\x20app\x20config\x20value:\x20key=','2BbZEqR','/validate','values',']\x20must\x20be\x20an\x20object.','154qiCCKZ','roleList[','getDatasetPermitMeta','set','functionName','searchParams','/download',',\x20name=','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','/client/user-accounts/bind','roleName','execute','size','/versions/','4oaYnov','PUBLISHED','response','].userId\x20is\x20invalid.','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','json','error','boolean'];a108_0x3689=function(){return _0x16e9e7;};return a108_0x3689();}export async function listPersonalRuntimeSkills(_0x2ae937){const _0x260607=a108_0x2f2f95;return(await listRuntimeSkills({'appCode':_0x2ae937,'scope':'personal'}))[_0x260607(0x208)];}export async function listCompanyRuntimeSkills(_0x11f788){const _0x489e34=a108_0x2f2f95;return(await listRuntimeSkills({'appCode':_0x11f788,'scope':'company'}))[_0x489e34(0x189)];}export async function listVisibleRuntimeSkills(_0x120e49){const _0x2a85d8=a108_0x2f2f95;return(await listRuntimeSkills({'appCode':_0x120e49,'scope':_0x2a85d8(0x1e1)}))[_0x2a85d8(0x140)];}export async function createPersonalRuntimeSkill(_0x50b940,_0x1d8b07,_0x2ba4d2={}){const _0x91f176=a108_0x2f2f95;return publishRuntimeSkill(_0x50b940,_0x1d8b07,{'visibility':_0x91f176(0x201),'confirmWarnings':_0x2ba4d2[_0x91f176(0x1d1)]});}export async function updatePersonalRuntimeSkill(_0x2340f3,_0x5cbb41,_0x4249b9,_0x202c5c={}){const _0x4c6a6f=a108_0x2f2f95;return publishRuntimeSkill(_0x5cbb41,{..._0x4249b9,'skillCode':_0x4249b9[_0x4c6a6f(0x17c)]??_0x2340f3},{'visibility':_0x4c6a6f(0x201),'confirmWarnings':_0x202c5c[_0x4c6a6f(0x1d1)]});}export async function publishCompanyRuntimeSkill(_0x3a5f63,_0x554bdb,_0x4b52f6={}){const _0x4625a9=a108_0x2f2f95;return publishRuntimeSkill(_0x3a5f63,_0x554bdb,{'visibility':_0x4625a9(0x16a),'confirmWarnings':_0x4b52f6['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x3aeab6,_0x70c002,_0xfcc648){const _0x114791=a108_0x2f2f95,_0x2a3392=buildRuntimeSkillPublishForm(_0x70c002,_0xfcc648[_0x114791(0x1ac)]),_0x45be78=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x3aeab6)+_0x114791(0x1f5),{'method':_0x114791(0x206),'body':_0x2a3392});return assertJointDiagramAcknowledged(_0x70c002['diagram'],_0x45be78[_0x114791(0x195)],_0x114791(0x20a)),{'valid':_0x45be78[_0x114791(0x13a)]===!![],'errors':Array[_0x114791(0x15f)](_0x45be78[_0x114791(0x197)])?_0x45be78[_0x114791(0x197)]:[],'warnings':Array[_0x114791(0x15f)](_0x45be78[_0x114791(0x1b2)])?_0x45be78[_0x114791(0x1b2)]:[],'resolvedSlug':_0x45be78['resolvedSlug'],'resolvedVersion':_0x45be78[_0x114791(0x194)],'diagramValidated':_0x45be78[_0x114791(0x195)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x42b258,_0x396a3a,_0x30ff0a,_0x3c96ab,_0x3a43ab){const _0x1cc122=a108_0x2f2f95;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x42b258,_0x396a3a,_0x30ff0a,'/validate'),{'method':_0x1cc122(0x206),'query':{'scope':_0x3c96ab},'headers':{'Content-Type':_0x1cc122(0x124)},'body':JSON[_0x1cc122(0x134)](_0x3a43ab)});}export async function putRuntimeSkillVersionDiagram(_0x57eb95,_0x3e2627,_0x4ca5a0,_0x5eb078,_0x366d1f){const _0x17d62a=a108_0x2f2f95;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x57eb95,_0x3e2627,_0x4ca5a0),{'method':_0x17d62a(0x1a0),'query':{'scope':_0x5eb078},'headers':{'Content-Type':_0x17d62a(0x124)},'body':JSON[_0x17d62a(0x134)](_0x366d1f)});}export async function getRuntimeSkillVersionDiagram(_0x6772f1,_0x428fdf,_0x851601,_0xc2e576){const _0x4125a4=a108_0x2f2f95,_0x481f3a=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x6772f1,_0x428fdf,_0x851601),{'query':{'scope':_0xc2e576}});if(typeof _0x481f3a[_0x4125a4(0x165)]!=='boolean')throw CliErrors[_0x4125a4(0x1a2)](_0x4125a4(0x204));const _0x168c94=_0x481f3a[_0x4125a4(0x1a1)];if(typeof _0x168c94!==_0x4125a4(0x186)||!/^sha256:[0-9a-f]{64}$/[_0x4125a4(0x198)](_0x168c94))throw CliErrors[_0x4125a4(0x1a2)](_0x4125a4(0x1e4),_0x4125a4(0x1e7));const _0x1321a9=_0x481f3a['diagramRevision'];if(_0x481f3a[_0x4125a4(0x165)]&&(!Number[_0x4125a4(0x1cf)](_0x1321a9)||Number(_0x1321a9)<0x1))throw CliErrors[_0x4125a4(0x1a2)](_0x4125a4(0x15b));if(!_0x481f3a[_0x4125a4(0x165)]&&_0x1321a9!==undefined&&_0x1321a9!==null)throw CliErrors[_0x4125a4(0x1a2)](_0x4125a4(0x18f));const _0x29f1da=_0x481f3a[_0x4125a4(0x165)]?Number(_0x1321a9):null;return{..._0x481f3a,'sourceFingerprint':_0x168c94,'diagramRevision':_0x29f1da,'expectedDiagramRevision':_0x29f1da??0x0};}export async function downloadRuntimeSkillPackage(_0x3872a,_0x2449c4,_0x24367b,_0x1d8448){const _0x21e81b=a108_0x2f2f95;void _0x3872a;const _0x2faa17=_0x1d8448?_0x21e81b(0x1dc)+encodeURIComponent(_0x24367b)+'/'+encodeURIComponent(_0x2449c4)+_0x21e81b(0x156)+encodeURIComponent(_0x1d8448)+_0x21e81b(0x14e):_0x21e81b(0x1dc)+encodeURIComponent(_0x24367b)+'/'+encodeURIComponent(_0x2449c4)+_0x21e81b(0x14e);return skillHubBinaryRequest(_0x2faa17);}async function publishRuntimeSkill(_0x102ead,_0x3eefbc,_0x25432e){const _0x7f956d=a108_0x2f2f95,_0xac908a=buildRuntimeSkillPublishForm(_0x3eefbc,_0x25432e['visibility']),_0x507c13=await skillHubJsonRequest(_0x7f956d(0x1dc)+encodeURIComponent(_0x102ead)+_0x7f956d(0x1d4),{'method':_0x7f956d(0x206),'query':{'confirmWarnings':_0x25432e[_0x7f956d(0x1d1)]===!![]?!![]:undefined},'body':_0xac908a});return assertJointDiagramAcknowledged(_0x3eefbc[_0x7f956d(0x1c1)],_0x507c13[_0x7f956d(0x1c7)],'publish'),{'appCode':_0x507c13[_0x7f956d(0x1e6)]??_0x102ead,'skillCode':_0x507c13[_0x7f956d(0x181)]??_0x3eefbc[_0x7f956d(0x17c)]??'','skillName':_0x3eefbc['skillName']??_0x507c13['slug']??_0x3eefbc[_0x7f956d(0x17c)],'description':_0x3eefbc[_0x7f956d(0x182)],'scope':skillHubVisibilityToScope(_0x507c13['visibility']??_0x25432e[_0x7f956d(0x1ac)])??_0x7f956d(0x208),'version':_0x507c13[_0x7f956d(0x1c8)]??_0x3eefbc['version'],'tags':_0x3eefbc[_0x7f956d(0x1bc)],'content':_0x3eefbc['content'],'diagramBound':_0x507c13[_0x7f956d(0x1c7)]===!![]};}function assertJointDiagramAcknowledged(_0x434b1a,_0x23ac5c,_0x21c019){const _0x1e5580=a108_0x2f2f95;if(!_0x434b1a||_0x23ac5c===!![])return;throw CliErrors[_0x1e5580(0x1a2)]('SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20'+_0x21c019+'.',_0x1e5580(0x1ec));}function buildRuntimeSkillPublishForm(_0x4a4fb1,_0x2868e8){const _0x21ffa9=a108_0x2f2f95,_0x25e85f=new FormData();return _0x25e85f[_0x21ffa9(0x14b)](_0x21ffa9(0x1d9),runtimeSkillPackageFile(_0x4a4fb1)),_0x4a4fb1[_0x21ffa9(0x209)]?.[_0x21ffa9(0x16c)]()&&_0x25e85f[_0x21ffa9(0x14b)](_0x21ffa9(0x1f6),_0x4a4fb1[_0x21ffa9(0x209)]['trim']()),_0x25e85f[_0x21ffa9(0x14b)](_0x21ffa9(0x1ac),_0x2868e8),_0x4a4fb1[_0x21ffa9(0x1c1)]&&_0x25e85f['set']('diagram',new Blob([JSON[_0x21ffa9(0x134)](_0x4a4fb1[_0x21ffa9(0x1c1)])],{'type':_0x21ffa9(0x124)})),_0x25e85f;}function runtimeSkillVersionDiagramPath(_0x13e051,_0x2f84e1,_0xadb5b8,_0x4f5eb7=''){const _0x7d4282=a108_0x2f2f95;return _0x7d4282(0x1dc)+encodeURIComponent(_0x13e051)+'/'+encodeURIComponent(_0x2f84e1)+_0x7d4282(0x156)+encodeURIComponent(_0xadb5b8)+_0x7d4282(0x160)+_0x4f5eb7;}function runtimeSkillPackageFile(_0x39b625){const _0x3e839b=a108_0x2f2f95;if(!_0x39b625[_0x3e839b(0x17f)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x50e285=Buffer[_0x3e839b(0x12c)](_0x39b625[_0x3e839b(0x17f)],_0x3e839b(0x19a)),_0x3790e8=new Blob([_0x50e285],{'type':_0x3e839b(0x191)}),_0x308f11=(_0x39b625['skillCode']||_0x3e839b(0x17a))+'.zip';if(typeof File!==_0x3e839b(0x126))return new File([_0x3790e8],_0x308f11,{'type':_0x3e839b(0x191)});return _0x3790e8;}function normalizeSkillHubRuntimeListResponse(_0x4ede49,_0x16bcdf,_0x3c142b,_0x1637e5,_0x373f1f=![]){const _0x1c7949=a108_0x2f2f95,_0x34734b=Array[_0x1c7949(0x15f)](_0x16bcdf)?_0x16bcdf:Array['isArray'](_0x16bcdf?.[_0x1c7949(0x1e2)])?_0x16bcdf[_0x1c7949(0x1e2)]:[],_0x375dd6=_0x1637e5?.['trim'](),_0x14d75d=_0x34734b['filter'](_0x102df2=>!_0x375dd6||_0x102df2[_0x1c7949(0x181)]===_0x375dd6)[_0x1c7949(0x18c)](_0x34e654=>!_0x373f1f||_0x34e654[_0x1c7949(0x1a6)]?.[_0x1c7949(0x1f1)]===_0x1c7949(0x158)&&Boolean(_0x34e654['publishedVersion']['version']?.[_0x1c7949(0x16c)]()))['map'](skillHubRuntimeItemToRuntimeSkill)[_0x1c7949(0x18c)](_0x4200c5=>Boolean(_0x4200c5)),_0xcc2455=_0x14d75d[_0x1c7949(0x18c)](_0x138b61=>_0x138b61['scope']===_0x1c7949(0x208)),_0xc25c88=_0x14d75d['filter'](_0x5d0694=>_0x5d0694['scope']==='company');return{'appCode':_0x4ede49,'personal':_0x3c142b===_0x1c7949(0x189)?[]:_0xcc2455,'company':_0x3c142b===_0x1c7949(0x208)?[]:_0xc25c88,'effective':buildEffectiveRuntimeSkills(_0xcc2455,_0xc25c88,_0x3c142b)};}function skillHubRuntimeItemToRuntimeSkill(_0x340a42){const _0x4e2722=a108_0x2f2f95,_0x39e5f6=_0x340a42[_0x4e2722(0x181)]?.['trim'](),_0x5eac70=skillHubVisibilityToScope(_0x340a42[_0x4e2722(0x1ac)]);if(!_0x39e5f6||!_0x5eac70)return undefined;return{'id':_0x340a42['id'],'appCode':_0x340a42[_0x4e2722(0x1e6)],'skillCode':_0x39e5f6,'skillName':_0x340a42[_0x4e2722(0x1f6)]??_0x39e5f6,'description':_0x340a42[_0x4e2722(0x174)],'example':_0x340a42['example'],'scope':_0x5eac70,'version':skillHubRuntimeItemVersion(_0x340a42),'status':_0x340a42['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x159a1a){const _0x46c8e4=a108_0x2f2f95,_0x319c21=_0x159a1a[_0x46c8e4(0x181)]?.[_0x46c8e4(0x16c)]();if(!_0x319c21)return undefined;return{'id':_0x159a1a['id'],'appCode':_0x159a1a[_0x46c8e4(0x1e6)],'skillCode':_0x319c21,'skillName':_0x159a1a[_0x46c8e4(0x1f6)]??_0x319c21,'description':_0x159a1a[_0x46c8e4(0x174)],'example':_0x159a1a[_0x46c8e4(0x131)],'scope':skillHubVisibilityToScope(_0x159a1a[_0x46c8e4(0x1ac)])??_0x159a1a[_0x46c8e4(0x1ac)]?.[_0x46c8e4(0x13e)](),'version':skillHubRuntimeItemVersion(_0x159a1a),'status':_0x159a1a[_0x46c8e4(0x1f1)]};}function skillHubVisibilityToScope(_0x35aecb){const _0x3c7957=a108_0x2f2f95;if(_0x35aecb==='PRIVATE')return _0x3c7957(0x208);if(_0x35aecb==='NAMESPACE_ONLY')return _0x3c7957(0x189);return undefined;}function skillHubRuntimeItemVersion(_0x4684bd){const _0x5207d4=a108_0x2f2f95;return _0x4684bd[_0x5207d4(0x1a6)]?.[_0x5207d4(0x1c8)]??_0x4684bd['headlineVersion']?.['version']??_0x4684bd[_0x5207d4(0x196)]?.['version'];}function buildEffectiveRuntimeSkills(_0x122efc,_0x58f794,_0x16978d){const _0x503390=a108_0x2f2f95;if(_0x16978d===_0x503390(0x208))return _0x122efc;if(_0x16978d===_0x503390(0x189))return _0x58f794;const _0x2f3f52=new Map();for(const _0x47829e of _0x58f794){_0x2f3f52[_0x503390(0x14b)](_0x47829e[_0x503390(0x17c)],_0x47829e);}for(const _0xf65d6c of _0x122efc){_0x2f3f52[_0x503390(0x14b)](_0xf65d6c[_0x503390(0x17c)],_0xf65d6c);}return Array[_0x503390(0x12c)](_0x2f3f52[_0x503390(0x146)]());}function normalizeRuntimeSkillListResponse(_0x1ed984,_0x3725b1){const _0x184ecc=a108_0x2f2f95;if(Array[_0x184ecc(0x15f)](_0x3725b1)){const _0x5be40b=_0x3725b1[_0x184ecc(0x18c)](_0x5e4376=>_0x5e4376[_0x184ecc(0x1ea)]===_0x184ecc(0x208)),_0x1255ce=_0x3725b1['filter'](_0x5bc930=>_0x5bc930[_0x184ecc(0x1ea)]===_0x184ecc(0x189));return{'appCode':_0x1ed984,'personal':_0x5be40b,'company':_0x1255ce,'effective':[..._0x1255ce,..._0x5be40b]};}return{'appCode':_0x3725b1?.['appCode']??_0x1ed984,'personal':Array[_0x184ecc(0x15f)](_0x3725b1?.[_0x184ecc(0x208)])?_0x3725b1[_0x184ecc(0x208)]:[],'company':Array[_0x184ecc(0x15f)](_0x3725b1?.[_0x184ecc(0x189)])?_0x3725b1[_0x184ecc(0x189)]:[],'effective':Array[_0x184ecc(0x15f)](_0x3725b1?.[_0x184ecc(0x140)])?_0x3725b1[_0x184ecc(0x140)]:[]};}function normalizeRuntimeRoleUserList(_0xe6b388,_0x536f60){const _0x5bbd53=a108_0x2f2f95;if(!Array[_0x5bbd53(0x15f)](_0xe6b388))throw CliErrors['apiError']('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x536f60+_0x5bbd53(0x135));return _0xe6b388[_0x5bbd53(0x1bb)]((_0x1915f9,_0x20a790)=>{const _0x4f3f0a=_0x5bbd53;if(!_0x1915f9||typeof _0x1915f9!=='object'||Array[_0x4f3f0a(0x15f)](_0x1915f9))throw CliErrors[_0x4f3f0a(0x1a2)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x536f60+'['+_0x20a790+_0x4f3f0a(0x147));const _0x599cac=_0x1915f9,_0x579f4b=normalizeRuntimeUserId(_0x599cac[_0x4f3f0a(0x1fa)]);if(_0x579f4b===undefined)throw CliErrors[_0x4f3f0a(0x1a2)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x536f60+'['+_0x20a790+_0x4f3f0a(0x15a));return{..._0x599cac,'userId':_0x579f4b};});}function normalizeRuntimeRoleUsersResponse(_0x4ecaa5){const _0x54ee16=a108_0x2f2f95;return extractList(_0x4ecaa5)[_0x54ee16(0x1bb)]((_0x33f6ce,_0x59238b)=>{const _0x19328a=_0x54ee16;if(!_0x33f6ce||typeof _0x33f6ce!=='object'||Array['isArray'](_0x33f6ce))throw CliErrors['apiError'](_0x19328a(0x184)+_0x59238b+_0x19328a(0x147));const _0x4ac6f5=_0x33f6ce;return{..._0x4ac6f5,'userList':normalizeRuntimeRoleUserList(_0x4ac6f5[_0x19328a(0x13b)],_0x19328a(0x149)+_0x59238b+_0x19328a(0x1af)),..._0x4ac6f5[_0x19328a(0x163)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x4ac6f5[_0x19328a(0x163)],_0x19328a(0x149)+_0x59238b+_0x19328a(0x19b))}};});}export async function listRuntimeAppRoles(_0x3a07aa,_0x33081a={}){const _0x330caa=a108_0x2f2f95,_0x17b38d=_0x33081a[_0x330caa(0x133)]??0x1,_0x339972=Math[_0x330caa(0x18a)](Math[_0x330caa(0x1d5)](_0x33081a['pageSize']??0x64,0x1),0x64),_0x106301=await sdkRequest(_0x3a07aa,_0x6ff1ab=>_0x6ff1ab[_0x330caa(0x1ff)][_0x330caa(0x175)]({..._0x33081a[_0x330caa(0x153)]?{'roleName':_0x33081a[_0x330caa(0x153)]}:{},'currentPage':_0x17b38d,'pageSize':_0x339972}));return{'items':extractList(_0x106301),'paging':extractPaging(_0x106301)};}export async function createRuntimeAppRole(_0x405f14){const _0x5d01d6=a108_0x2f2f95;return sdkRequest(_0x405f14[_0x5d01d6(0x1b7)],_0x56d08b=>_0x56d08b[_0x5d01d6(0x1ff)][_0x5d01d6(0x139)]({'roleType':_0x5d01d6(0x1aa),..._0x405f14}));}export async function updateRuntimeAppRole(_0x5d2722){const _0x14c878=a108_0x2f2f95;return sdkRequest(_0x5d2722[_0x14c878(0x1b7)],_0x2765c4=>_0x2765c4['permit']['updateRole'](_0x5d2722));}export async function deleteRuntimeAppRole(_0x33e586){const _0x4b9b00=a108_0x2f2f95;return sdkRequest(undefined,_0x48e035=>_0x48e035[_0x4b9b00(0x1ff)][_0x4b9b00(0x18e)](_0x33e586));}export async function listRuntimeRoleUsers(_0x3a70dc){const _0x54b157=a108_0x2f2f95,_0x4845d2=await sdkRequest(_0x3a70dc,_0x5d6967=>_0x5d6967['permit'][_0x54b157(0x1be)]());return normalizeRuntimeRoleUsersResponse(_0x4845d2);}export async function updateRuntimeRoleUsers(_0x2dafd8,_0x3e26e1){const _0x4aa9fd=a108_0x2f2f95;return sdkRequest(_0x2dafd8,_0x17509a=>_0x17509a[_0x4aa9fd(0x1ff)][_0x4aa9fd(0x168)]({'roleList':_0x3e26e1}));}export async function listRuntimeAppUsers(_0x129c68){const _0x5a48c3=a108_0x2f2f95,_0x20c053=await sdkRequest(_0x129c68,_0x1b38f2=>_0x1b38f2[_0x5a48c3(0x1ff)]['queryAppUsers']());return extractList(_0x20c053);}export async function listRuntimePermitRoles(_0x1a7c34,_0xf5cad0={}){const _0x5c854d=await sdkRequest(_0x1a7c34,_0x3f1ceb=>_0x3f1ceb['permit']['getRolePermitList'](_0xf5cad0));return extractList(_0x5c854d);}export async function getRuntimePagePermit(_0x5f4e45){const _0x9c41f8=a108_0x2f2f95;return sdkRequest(undefined,_0x183b49=>_0x183b49[_0x9c41f8(0x1ff)][_0x9c41f8(0x16e)](_0x5f4e45));}export async function saveRuntimePagePermit(_0x39e85e){const _0x1a9b18=a108_0x2f2f95;return sdkRequest(_0x39e85e[_0x1a9b18(0x1b7)],_0x50812e=>_0x50812e[_0x1a9b18(0x1ff)][_0x1a9b18(0x1df)](_0x39e85e));}export async function getRuntimeRoleMenuResources(_0x38b2d2,_0x57d207){const _0x519017=a108_0x2f2f95,_0x4722ae=await sdkRequest(_0x38b2d2,_0x346aa7=>_0x346aa7[_0x519017(0x1ff)][_0x519017(0x1a4)]({'roleId':_0x57d207}));return extractList(_0x4722ae);}export async function listRuntimeMenuRolePermits(_0x479e64){const _0x3b7360=a108_0x2f2f95,_0x4b52b5=await sdkRequest(_0x479e64,_0x14cb2b=>_0x14cb2b['permit'][_0x3b7360(0x207)]());return Array[_0x3b7360(0x15f)](_0x4b52b5?.[_0x3b7360(0x1ee)])?_0x4b52b5[_0x3b7360(0x1ee)]:[];}export async function saveRuntimeMenuRolePermits(_0xf66ea0,_0x3888b5){const _0x7c2356=a108_0x2f2f95;return sdkRequest(_0xf66ea0,_0x5e4563=>_0x5e4563[_0x7c2356(0x1ff)][_0x7c2356(0x1cb)]({'permitList':_0x3888b5}));}export async function listRuntimeDatasetPermits(_0x5e1b34,_0x20cef2){const _0x1f1cf3=a108_0x2f2f95,_0x3c4910=await sdkRequest(_0x5e1b34,_0x4a6007=>_0x4a6007[_0x1f1cf3(0x1ff)][_0x1f1cf3(0x1c9)](_0x20cef2));return Array[_0x1f1cf3(0x15f)](_0x3c4910?.[_0x1f1cf3(0x1ee)])?_0x3c4910[_0x1f1cf3(0x1ee)]:[];}export async function listRuntimeDatasetRolePermits(_0x1d56be){const _0x1d51d0=a108_0x2f2f95,_0x2fa2fb=await sdkRequest(_0x1d56be,_0x1fe619=>_0x1fe619['permit'][_0x1d51d0(0x14a)]());return Array['isArray'](_0x2fa2fb?.[_0x1d51d0(0x1ee)])?_0x2fa2fb[_0x1d51d0(0x1ee)]:[];}export async function saveRuntimeDatasetRolePermits(_0x4f5922,_0x165d66){const _0x39cf0a=a108_0x2f2f95;return sdkRequest(_0x4f5922,_0x2c59b0=>_0x2c59b0[_0x39cf0a(0x1ff)]['saveDatasetPermits']({'permitList':_0x165d66}));}
|
|
1
|
+
const a108_0x74666c=a108_0x137d;(function(_0x34469c,_0x14ddf2){const _0x2bd493=a108_0x137d,_0x5ad790=_0x34469c();while(!![]){try{const _0x16bd6c=parseInt(_0x2bd493(0x243))/0x1*(parseInt(_0x2bd493(0x1b3))/0x2)+-parseInt(_0x2bd493(0x23f))/0x3+parseInt(_0x2bd493(0x228))/0x4*(-parseInt(_0x2bd493(0x1ea))/0x5)+parseInt(_0x2bd493(0x209))/0x6*(parseInt(_0x2bd493(0x1aa))/0x7)+-parseInt(_0x2bd493(0x211))/0x8*(-parseInt(_0x2bd493(0x1df))/0x9)+-parseInt(_0x2bd493(0x182))/0xa*(-parseInt(_0x2bd493(0x1b7))/0xb)+-parseInt(_0x2bd493(0x200))/0xc;if(_0x16bd6c===_0x14ddf2)break;else _0x5ad790['push'](_0x5ad790['shift']());}catch(_0xbcefd6){_0x5ad790['push'](_0x5ad790['shift']());}}}(a108_0x2265,0xafb6c));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(_0x2b74f9){if(_activeAK!==(_0x2b74f9||undefined))clearSdkClient();_activeAK=_0x2b74f9||undefined;}export function clearActiveAK(){_activeAK=undefined,clearSdkClient();}async function sdkRequest(_0x5d5f50,_0x539353){const _0x5d755b=a108_0x137d;if(!_activeAK)throw CliErrors[_0x5d755b(0x16f)](_0x5d755b(0x1b0)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4ccf1d=_0x5d5f50?getSdkClient({'appCode':_0x5d5f50,'env':getEnv(),'runtimeDomain':getRuntimeDomain(),'authMode':_0x5d755b(0x20b),'accessKey':_activeAK}):getSdkClient();return withSdkErrors(()=>_0x539353(_0x4ccf1d));}async function identitySdkRequest(_0x39f86d){const _0x189bee=a108_0x137d,_0x49b601=_activeAK;if(!_0x49b601)throw CliErrors[_0x189bee(0x16f)](_0x189bee(0x1b0)+PRODUCT_CONFIG[_0x189bee(0x1f4)]+'.');return withSdkErrors(()=>_0x39f86d(getIdentitySdkClient(_0x49b601,getRuntimeDomain())));}function a108_0x2265(){const _0x43a076=['1949151mFfJKl','artifact','slug','publish','1471vczcPb','diagramBound','undefined','signal','/api/runtime/v1/namespaces/','error','toString','transfer','invokeSource','version','importContract','authRequired','status','skill','personal','application/json','Check\x20your\x20credentials\x20and\x20try\x20again.','join','skillName','userId','list','confirmWarnings','Toolbox\x20error\x20code:\x20','].userId\x20is\x20invalid.','scope','queryAppUsers','PUBLISHED','getTask','getRoleList','skillCode','1960nUbvPB','roleList[','currentPage','bindAccount','data','limit','loginUserInfo','warnings','file','DELETE','SQL\x20metadata\x20requires\x20Client\x20AK.','items','displayName','application/zip','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','approve','runtime','appCode','/publish','NAMESPACE_ONLY','markdown','errorMsg','Invalid\x20runtime\x20role\x20members\x20response:\x20','tags','/diagram','updateRole','bytes','queryUrl','searchParams','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','functions','sqlCode','size','Dataset\x20import\x20requires\x20Client\x20AK.','packageBase64','update','Toolbox\x20API\x20error:\x20','valid','contentHash','savePagePermit','604009kTtkwY','Invalid\x20import\x20task\x20readback\x20response.','importBatch','trim','getResourceMenuList','text','Configure\x20accessKey\x20in\x20','roleName','message','1790jLRUFc','/versions/','execute','functionName','43516axpmVu','values','toLowerCase','applyUserList','apiError','headers','isInteger','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','listNotificationChannels','tableName','Toolbox\x20API\x20error','abort','upload','resolvedSlug','found','type','json','validation','/validate','visibility','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','retryAfter','/client/user-accounts/bind','find','headlineVersion','success','myApps','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','errorCode','sourceFingerprint','effective','updateRoleUserList','isJson','errors','getRolePermitList','function','entries','replace','set','isArray','9TjtZxW','getConfigByKey','Invalid\x20approval\x20task\x20detail\x20response.','company','getDatasetPermitMeta','Backend\x20Function\x20metadata\x20requires\x20Client\x20AK.','namespace','app','/run','].applyUserList','all','2207180bQHzgi','example','Download\x20failed:\x20','msg','Invalid\x20import\x20readback\x20response.','code','/api/cli/v1/skills/','pageSize','bff','/api/harness/apps/','newConfigFileName','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','/api/v1/skills/',']\x20must\x20be\x20an\x20object.','PRIVATE','approval','name','publishedVersion','summary','filter','\x20must\x20be\x20an\x20array.','api-doc-generator','9736812gSUSjb','response','SkillHub\x20error\x20code:\x20','Request\x20timeout:\x20','POST','diagramValidated','stringify','sql','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','12XzneAA','from','client-ak','permit','object','Runtime\x20SDK\x20request\x20failed.','kind','installableOnly','6393752eqoPkc','dataset_','getEndpoint','PUT','Invalid\x20notification\x20config\x20list\x20response.','API\x20error\x20code:\x20','map','content','test','SkillHub\x20API\x20error:\x20','cursor','appName','AbortError','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/schedules','query','listTodo','importImageReadback','services',',\x20name=','isSafeInteger','gmtModified','harness','8AKylNP','string','GET','datasetMeta','/download','image','resolvedVersion','saveMenuPermits','deleteRole','tableData','permitList','/skills','description','base64','diagram','Application\x20code\x20contains\x20invalid\x20URL\x20path\x20characters.','arrayBuffer','SQL\x20query\x20not\x20found:\x20','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','application/octet-stream','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','].userList','importReadback'];a108_0x2265=function(){return _0x43a076;};return a108_0x2265();}async function withSdkErrors(_0x32240b){const _0x35448e=a108_0x137d;try{return await _0x32240b();}catch(_0x55848b){if(_0x55848b instanceof CliError)throw _0x55848b;if(!_0x55848b||typeof _0x55848b!==_0x35448e(0x20d))throw _0x55848b;const _0x243dbb=_0x55848b,_0x5ea90c=_0x243dbb[_0x35448e(0x201)]&&typeof _0x243dbb[_0x35448e(0x201)]===_0x35448e(0x20d)?_0x243dbb['response']:{},_0x3977d4=firstString(_0x5ea90c[_0x35448e(0x197)],_0x5ea90c[_0x35448e(0x1b2)],_0x5ea90c[_0x35448e(0x1ed)],_0x243dbb[_0x35448e(0x1b2)]),_0x1f42be=createRateLimitError({'status':[_0x243dbb[_0x35448e(0x170)],_0x5ea90c[_0x35448e(0x170)],_0x5ea90c['code']][_0x35448e(0x1ce)](_0x5e49eb=>Number(_0x5e49eb)===0x1ad)??_0x243dbb[_0x35448e(0x170)],'errorCode':firstString(_0x5ea90c[_0x35448e(0x1d3)],typeof _0x5ea90c[_0x35448e(0x1ef)]===_0x35448e(0x229)?_0x5ea90c['code']:undefined,_0x243dbb[_0x35448e(0x1ef)]),'message':_0x3977d4,'retryAfter':_0x243dbb[_0x35448e(0x1cc)]??readRetryAfterSeconds(_0x243dbb[_0x35448e(0x201)])});if(_0x1f42be)throw _0x1f42be;const _0x1a832a=createAccessError(_0x243dbb[_0x35448e(0x201)],_0x243dbb[_0x35448e(0x1ef)]);if(_0x1a832a)throw _0x1a832a;throw CliErrors[_0x35448e(0x1bb)](_0x3977d4||_0x35448e(0x20e),_0x243dbb[_0x35448e(0x1ef)]?_0x35448e(0x216)+_0x243dbb[_0x35448e(0x1ef)]:undefined);}}function a108_0x137d(_0x128aac,_0x114d4b){_0x128aac=_0x128aac-0x168;const _0x22657d=a108_0x2265();let _0x137dab=_0x22657d[_0x128aac];return _0x137dab;}function firstString(..._0x3d8137){const _0x289ea0=a108_0x137d;for(const _0x19d020 of _0x3d8137){if(typeof _0x19d020===_0x289ea0(0x229)&&_0x19d020[_0x289ea0(0x1ad)]())return _0x19d020[_0x289ea0(0x1ad)]();}return undefined;}async function decodeResponseBody(_0x4a7ba9){const _0x385b9f=a108_0x137d;if(typeof _0x4a7ba9['text']===_0x385b9f(0x1da))try{const _0x5a5085=await _0x4a7ba9[_0x385b9f(0x1af)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x5a5085),'text':_0x5a5085};}catch{return{'isJson':![],'text':_0x5a5085[_0x385b9f(0x1ad)]()||undefined};}}catch(_0x5fc592){if(_0x5fc592 instanceof Error&&_0x5fc592['name']===_0x385b9f(0x21d))throw _0x5fc592;}try{return{'isJson':!![],'data':await _0x4a7ba9[_0x385b9f(0x1c7)]()};}catch(_0x5c5c25){if(_0x5c5c25 instanceof Error&&_0x5c5c25[_0x385b9f(0x1fa)]===_0x385b9f(0x21d))throw _0x5c5c25;return{'isJson':![]};}}function throwIfRateLimited(_0x4595de,_0x2d38b7,_0x57479f){const _0x3e76da=a108_0x137d,_0x25cf38=_0x2d38b7&&typeof _0x2d38b7==='object'?_0x2d38b7:{},_0x4766de=[_0x25cf38['status'],_0x25cf38[_0x3e76da(0x1ef)]]['find'](_0x4f544b=>Number(_0x4f544b)===0x1ad),_0x35d86e=createRateLimitError({'status':_0x4595de['status']===0x1ad?_0x4595de[_0x3e76da(0x170)]:_0x4766de??_0x4595de[_0x3e76da(0x170)],'errorCode':firstString(_0x25cf38['errorCode'],typeof _0x25cf38[_0x3e76da(0x1ef)]===_0x3e76da(0x229)?_0x25cf38['code']:undefined),'message':firstString(_0x25cf38[_0x3e76da(0x197)],_0x25cf38[_0x3e76da(0x1b2)],_0x25cf38[_0x3e76da(0x1ed)],_0x57479f),'retryAfter':readRetryAfter(_0x4595de[_0x3e76da(0x1bc)])??readRetryAfterSeconds(_0x2d38b7)});if(_0x35d86e)throw _0x35d86e;}async function apiRequest(_0x24a6f4,_0x590a0f={}){const _0x442026=a108_0x137d,{method:method='GET',body:_0xee683f,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x442026(0x192),rejectRedirects:rejectRedirects=![]}=_0x590a0f,_0x33de8e=_activeAK,_0x18c100=domain===_0x442026(0x227)?requireHarnessDomain():domain==='api'?getApiDomain():getRuntimeDomain();if(!_0x33de8e)throw CliErrors[_0x442026(0x16f)](_0x442026(0x1b0)+PRODUCT_CONFIG[_0x442026(0x1f4)]+'.');const _0x2fd7bd=''+_0x18c100+_0x24a6f4,_0x2a8b59={'X-User-AK':_0x33de8e},_0x3d5d31=new AbortController(),_0x5d3748=setTimeout(()=>_0x3d5d31['abort'](),timeout);try{const _0x3213b0=await fetch(_0x2fd7bd,{'method':method,...rejectRedirects?{'redirect':'error'}:{},'headers':{'Content-Type':_0x442026(0x173),'X-Invoke-Source':PRODUCT_CONFIG[_0x442026(0x16c)],..._0x2a8b59,...headers},'body':_0xee683f?JSON[_0x442026(0x206)](_0xee683f):undefined,'signal':_0x3d5d31['signal']});return await readApiResponse(_0x3213b0);}catch(_0x4c5892){if(_0x4c5892 instanceof Error&&_0x4c5892['name']===_0x442026(0x21d))throw CliErrors[_0x442026(0x1bb)](_0x442026(0x203)+_0x2fd7bd);throw _0x4c5892;}finally{clearTimeout(_0x5d3748);}}async function readApiResponse(_0x54becd){const _0x23803f=a108_0x137d,_0x3d793c=await decodeResponseBody(_0x54becd);if(!_0x3d793c[_0x23803f(0x1d7)]){throwIfRateLimited(_0x54becd,undefined,_0x3d793c[_0x23803f(0x1af)]);throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x54becd[_0x23803f(0x170)]+')',_0x54becd['status']>=0x190?_0x23803f(0x174):undefined);}const _0xf9db55=_0x3d793c[_0x23803f(0x186)];throwIfRateLimited(_0x54becd,_0xf9db55);if(!_0x54becd['ok']||_0xf9db55[_0x23803f(0x1d0)]===![]){const _0x4babed=createAccessError(_0xf9db55);if(_0x4babed)throw _0x4babed;throw CliErrors[_0x23803f(0x1bb)](_0xf9db55['errorMsg']||_0xf9db55[_0x23803f(0x1b2)]||_0xf9db55[_0x23803f(0x1ed)]||'API\x20error:\x20'+_0x54becd['status'],readApiErrorCode(_0xf9db55)?_0x23803f(0x216)+readApiErrorCode(_0xf9db55):undefined);}return _0xf9db55;}async function apiBinaryRequest(_0x37b133,_0xf5bd6b={}){const _0x26a0d8=a108_0x137d,{method:method=_0x26a0d8(0x22a),headers:headers={},timeout:timeout=0x7530}=_0xf5bd6b,_0x432212=_activeAK,_0x2cd7f4=getRuntimeDomain();if(!_0x432212)throw CliErrors[_0x26a0d8(0x16f)](_0x26a0d8(0x1b0)+PRODUCT_CONFIG[_0x26a0d8(0x1f4)]+'.');const _0xed2415=''+_0x2cd7f4+_0x37b133,_0x5ef3fa=new AbortController(),_0x392723=setTimeout(()=>_0x5ef3fa[_0x26a0d8(0x1c2)](),timeout);try{const _0x574608=await fetch(_0xed2415,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x26a0d8(0x16c)],'X-User-AK':_0x432212,...headers},'signal':_0x5ef3fa[_0x26a0d8(0x246)]});if(!_0x574608['ok']){const _0x4ef865=await decodeResponseBody(_0x574608),_0xb75a25=_0x4ef865[_0x26a0d8(0x186)]&&typeof _0x4ef865['data']==='object'?_0x4ef865[_0x26a0d8(0x186)]:{},_0x3cf1e0=firstString(_0xb75a25[_0x26a0d8(0x197)],_0xb75a25['message'],_0xb75a25[_0x26a0d8(0x1d3)],_0x4ef865[_0x26a0d8(0x1af)]);throwIfRateLimited(_0x574608,_0x4ef865[_0x26a0d8(0x186)],_0x3cf1e0);const _0x8a80b8=createAccessError(_0x4ef865[_0x26a0d8(0x186)]);if(_0x8a80b8)throw _0x8a80b8;throw CliErrors[_0x26a0d8(0x1bb)](_0x3cf1e0||'API\x20error:\x20'+_0x574608[_0x26a0d8(0x170)],_0x26a0d8(0x1ec)+_0xed2415);}return Buffer['from'](await _0x574608['arrayBuffer']());}catch(_0x28f8e8){if(_0x28f8e8 instanceof Error&&_0x28f8e8[_0x26a0d8(0x1fa)]===_0x26a0d8(0x21d))throw CliErrors[_0x26a0d8(0x1bb)](_0x26a0d8(0x203)+_0xed2415);throw _0x28f8e8;}finally{clearTimeout(_0x392723);}}async function toolboxRequest(_0xa4148b,_0x34f6f0,_0x121dde={}){const _0x4bd77d=a108_0x137d,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x121dde,_0x1e181b=_activeAK;if(!_0x1e181b)throw CliErrors[_0x4bd77d(0x16f)](_0x4bd77d(0x1b0)+PRODUCT_CONFIG[_0x4bd77d(0x1f4)]+'.');const _0x19b9ee=getApiDomain()[_0x4bd77d(0x1dc)](/\/$/,''),_0x1c6494=new URL(_0xa4148b,_0x19b9ee+'/api/node-toolbox/');if(_0x34f6f0)for(const [_0x4470ad,_0x5d2ad0]of Object[_0x4bd77d(0x1db)](_0x34f6f0)){_0x5d2ad0!==undefined&&_0x5d2ad0!==null&&_0x1c6494['searchParams']['set'](_0x4470ad,String(_0x5d2ad0));}const _0x1db36f=new AbortController(),_0x1e7686=setTimeout(()=>_0x1db36f['abort'](),timeout);try{const _0x5c1eb8=await fetch(_0x1c6494,{'method':method,'headers':{'Content-Type':_0x4bd77d(0x173),'X-Invoke-Source':PRODUCT_CONFIG[_0x4bd77d(0x16c)],'X-User-AK':_0x1e181b,...headers},'signal':_0x1db36f['signal']}),_0x1b840a=await decodeResponseBody(_0x5c1eb8);if(!_0x1b840a[_0x4bd77d(0x1d7)]){throwIfRateLimited(_0x5c1eb8,undefined,_0x1b840a[_0x4bd77d(0x1af)]);throw CliErrors[_0x4bd77d(0x1bb)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5c1eb8[_0x4bd77d(0x170)]+')',_0x5c1eb8[_0x4bd77d(0x170)]>=0x190?_0x4bd77d(0x174):undefined);}const _0x353093=_0x1b840a['data'];throwIfRateLimited(_0x5c1eb8,_0x353093);if(!_0x5c1eb8['ok']){const _0x39a285=_0x353093&&typeof _0x353093==='object'?_0x353093:{};throw CliErrors[_0x4bd77d(0x1bb)](_0x39a285[_0x4bd77d(0x197)]||_0x39a285[_0x4bd77d(0x1b2)]||_0x4bd77d(0x1a6)+_0x5c1eb8[_0x4bd77d(0x170)],_0x39a285[_0x4bd77d(0x1d3)]?'Toolbox\x20error\x20code:\x20'+_0x39a285['errorCode']:undefined);}if(_0x353093&&typeof _0x353093===_0x4bd77d(0x20d)&&_0x4bd77d(0x1d0)in _0x353093&&typeof _0x353093['success']==='boolean'){const _0x3a0a20=_0x353093;if(!_0x3a0a20['success'])throw CliErrors[_0x4bd77d(0x1bb)](_0x3a0a20[_0x4bd77d(0x197)]||_0x3a0a20[_0x4bd77d(0x1b2)]||_0x4bd77d(0x1c1),_0x3a0a20[_0x4bd77d(0x1d3)]?_0x4bd77d(0x17a)+_0x3a0a20[_0x4bd77d(0x1d3)]:undefined);return _0x3a0a20[_0x4bd77d(0x186)];}return _0x353093;}catch(_0x542c69){if(_0x542c69 instanceof Error&&_0x542c69[_0x4bd77d(0x1fa)]==='AbortError')throw CliErrors['apiError'](_0x4bd77d(0x203)+_0x1c6494[_0x4bd77d(0x16a)]());throw _0x542c69;}finally{clearTimeout(_0x1e7686);}}async function skillHubJsonRequest(_0x18b5b8,_0x18bb73={}){const _0x169ab3=a108_0x137d,{method:method='GET',query:_0x3d9678,body:_0x12238a,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x18bb73,_0x47323a=_activeAK;if(!_0x47323a)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x169ab3(0x1f4)]+'.');const _0x514f19=getSkillDomain()[_0x169ab3(0x1dc)](/\/$/,''),_0x415fa8=new URL(_0x18b5b8,_0x514f19+'/');if(_0x3d9678)for(const [_0xb84dd4,_0x11b533]of Object[_0x169ab3(0x1db)](_0x3d9678)){_0x11b533!==undefined&&_0x11b533!==null&&_0x415fa8[_0x169ab3(0x19e)][_0x169ab3(0x1dd)](_0xb84dd4,String(_0x11b533));}const _0xa38c=new AbortController(),_0x2e1e24=setTimeout(()=>_0xa38c[_0x169ab3(0x1c2)](),timeout);try{const _0x10ef43=await fetch(_0x415fa8[_0x169ab3(0x16a)](),{'method':method,'headers':{'Accept':_0x169ab3(0x173),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x47323a,...headers},'body':_0x12238a,'signal':_0xa38c[_0x169ab3(0x246)]}),_0x4caae6=await decodeResponseBody(_0x10ef43);if(!_0x4caae6['isJson']){if(allowNotFound&&_0x10ef43[_0x169ab3(0x170)]===0x194)return undefined;throwIfRateLimited(_0x10ef43,undefined,_0x4caae6[_0x169ab3(0x1af)]);throw CliErrors[_0x169ab3(0x1bb)](_0x169ab3(0x21e)+_0x10ef43[_0x169ab3(0x170)]+')',_0x10ef43[_0x169ab3(0x170)]>=0x190?_0x169ab3(0x174):undefined);}const _0x2e9662=_0x4caae6[_0x169ab3(0x186)];throwIfRateLimited(_0x10ef43,_0x2e9662);if(allowNotFound&&isSkillHubNotFoundResponse(_0x10ef43[_0x169ab3(0x170)],_0x2e9662))return undefined;const _0x304ce4=!_0x10ef43['ok']||_0x2e9662?.[_0x169ab3(0x1d0)]===![]||typeof _0x2e9662?.[_0x169ab3(0x1ef)]==='number'&&_0x2e9662['code']>=0x190;if(_0x304ce4)throw CliErrors['apiError'](_0x2e9662?.['errorMsg']||_0x2e9662?.[_0x169ab3(0x1b2)]||_0x2e9662?.[_0x169ab3(0x1ed)]||_0x169ab3(0x21a)+_0x10ef43['status'],_0x2e9662?.['errorCode']?_0x169ab3(0x202)+_0x2e9662['errorCode']:undefined);return _0x2e9662?.[_0x169ab3(0x186)]??_0x2e9662;}catch(_0x2ce34b){if(_0x2ce34b instanceof Error&&_0x2ce34b[_0x169ab3(0x1fa)]===_0x169ab3(0x21d))throw CliErrors[_0x169ab3(0x1bb)]('Request\x20timeout:\x20'+_0x415fa8[_0x169ab3(0x16a)]());throw _0x2ce34b;}finally{clearTimeout(_0x2e1e24);}}function isSkillHubNotFoundResponse(_0x4455e6,_0x122fee){const _0x468e8e=a108_0x137d;if(_0x4455e6===0x194||_0x122fee?.[_0x468e8e(0x1ef)]===0x194)return!![];if(_0x4455e6!==0x190&&_0x122fee?.[_0x468e8e(0x1ef)]!==0x190)return![];const _0x8d4e9b=[_0x122fee?.['msg'],_0x122fee?.['message'],_0x122fee?.[_0x468e8e(0x197)],_0x122fee?.[_0x468e8e(0x169)]][_0x468e8e(0x1fd)](_0x17ef42=>typeof _0x17ef42===_0x468e8e(0x229))[_0x468e8e(0x175)]('\x20');return/skill not found\b/i[_0x468e8e(0x219)](_0x8d4e9b);}async function skillHubBinaryRequest(_0x11828b,_0x4c75a3={}){const _0x2828ac=a108_0x137d,{query:_0x13ecc0,headers:headers={},timeout:timeout=0x7530}=_0x4c75a3,_0x5642ea=_activeAK;if(!_0x5642ea)throw CliErrors[_0x2828ac(0x16f)](_0x2828ac(0x1b0)+PRODUCT_CONFIG[_0x2828ac(0x1f4)]+'.');const _0x56f5cb=getSkillDomain()[_0x2828ac(0x1dc)](/\/$/,''),_0x556a69=new URL(_0x11828b,_0x56f5cb+'/');if(_0x13ecc0)for(const [_0x5487a2,_0x4ebf42]of Object['entries'](_0x13ecc0)){_0x4ebf42!==undefined&&_0x4ebf42!==null&&_0x556a69[_0x2828ac(0x19e)]['set'](_0x5487a2,String(_0x4ebf42));}const _0x1dd5ee=new AbortController(),_0x4e59fd=setTimeout(()=>_0x1dd5ee['abort'](),timeout);try{const _0x36c28e=await fetch(_0x556a69['toString'](),{'method':'GET','headers':{'Accept':_0x2828ac(0x23b),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5642ea,...headers},'signal':_0x1dd5ee[_0x2828ac(0x246)]});if(!_0x36c28e['ok']){const _0xf1b9f4=await decodeResponseBody(_0x36c28e),_0x468463=_0xf1b9f4[_0x2828ac(0x186)]&&typeof _0xf1b9f4[_0x2828ac(0x186)]===_0x2828ac(0x20d)?_0xf1b9f4[_0x2828ac(0x186)]:{},_0x7bfb29=firstString(_0x468463[_0x2828ac(0x197)],_0x468463['message'],_0x468463[_0x2828ac(0x1ed)],_0x468463['errorCode'],_0xf1b9f4[_0x2828ac(0x1af)]);throwIfRateLimited(_0x36c28e,_0xf1b9f4['data'],_0x7bfb29);throw CliErrors[_0x2828ac(0x1bb)](_0x7bfb29||_0x2828ac(0x21a)+_0x36c28e[_0x2828ac(0x170)],'Download\x20failed:\x20'+_0x556a69['toString']());}return Buffer[_0x2828ac(0x20a)](await _0x36c28e[_0x2828ac(0x238)]());}catch(_0x29b1b9){if(_0x29b1b9 instanceof Error&&_0x29b1b9[_0x2828ac(0x1fa)]===_0x2828ac(0x21d))throw CliErrors[_0x2828ac(0x1bb)](_0x2828ac(0x203)+_0x556a69[_0x2828ac(0x16a)]());throw _0x29b1b9;}finally{clearTimeout(_0x4e59fd);}}export async function getBffEndpointContract(_0x2d4107,_0x9be07b){const _0x18f673=a108_0x137d;if(encodeURIComponent(_0x2d4107)!==_0x2d4107||_0x2d4107==='.'||_0x2d4107==='..')throw CliErrors[_0x18f673(0x1c8)](_0x18f673(0x237));if(_0x9be07b===_0x18f673(0x1a0))throw CliErrors[_0x18f673(0x1c8)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x2d4107+_0x18f673(0x224)+_0x9be07b);const _0x446b6f=await sdkRequest(_0x2d4107,_0x3356fc=>{const _0x7778db=_0x18f673;if(!('getEndpoint'in _0x3356fc['bff']))throw CliErrors[_0x7778db(0x1c8)](_0x7778db(0x1e4));return _0x3356fc[_0x7778db(0x1f2)][_0x7778db(0x213)](_0x9be07b);});if(!_0x446b6f||typeof _0x446b6f!==_0x18f673(0x20d)||Array[_0x18f673(0x1de)](_0x446b6f)||_0x446b6f[_0x18f673(0x193)]!==_0x2d4107||_0x446b6f[_0x18f673(0x1b6)]!==_0x9be07b)throw CliErrors[_0x18f673(0x1c8)](_0x18f673(0x19f)+_0x2d4107+',\x20name='+_0x9be07b);const _0x382d4d=_0x446b6f[_0x18f673(0x226)];if(_0x382d4d!=null&&(typeof _0x382d4d!=='number'||!Number[_0x18f673(0x225)](_0x382d4d)))throw CliErrors[_0x18f673(0x1bb)]('Invalid\x20Backend\x20Function\x20response:\x20gmtModified\x20must\x20be\x20an\x20integer\x20timestamp\x20or\x20null.');return{'appCode':_0x446b6f[_0x18f673(0x193)],'functionName':_0x446b6f[_0x18f673(0x1b6)],'description':_0x446b6f[_0x18f673(0x234)],'version':_0x446b6f[_0x18f673(0x16d)],'gmtModified':_0x382d4d};}export async function getSqlQueryInfo(_0x20197b,_0x682b72){const _0x413b11=a108_0x137d,_0x3230c1=await sdkRequest(_0x20197b,_0x5b0ecf=>{const _0x562c1c=a108_0x137d;if(!(_0x562c1c(0x220)in _0x5b0ecf['sql']))throw CliErrors['validation'](_0x562c1c(0x18c));return _0x5b0ecf[_0x562c1c(0x207)][_0x562c1c(0x220)]({'appCode':_0x20197b,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x682b72});}),_0x371689=_0x3230c1&&typeof _0x3230c1===_0x413b11(0x20d)&&_0x413b11(0x231)in _0x3230c1?_0x3230c1['tableData']?.[0x0]:_0x3230c1&&typeof _0x3230c1===_0x413b11(0x20d)&&_0x413b11(0x1a1)in _0x3230c1?_0x3230c1:undefined;if(!_0x371689)throw CliErrors[_0x413b11(0x1c8)](_0x413b11(0x239)+_0x682b72);return _0x371689;}export async function listApprovalTodo(_0xf45b1d,_0x12aa3b=0x1,_0x19f55d=0x14){const _0x4ce4dc=a108_0x137d,_0x33e371=await sdkRequest(_0xf45b1d,_0x84a082=>_0x84a082[_0x4ce4dc(0x1f9)][_0x4ce4dc(0x221)]({'currentPage':_0x12aa3b,'pageSize':_0x19f55d}));if(!_0x33e371||typeof _0x33e371!==_0x4ce4dc(0x20d)||!Array[_0x4ce4dc(0x1de)](_0x33e371['records']))throw CliErrors[_0x4ce4dc(0x1bb)]('Invalid\x20approval\x20todo\x20response:\x20missing\x20records.');return _0x33e371;}export async function getApprovalTaskDetail(_0x47c0bc,_0xaaf721){const _0x3a2e65=a108_0x137d,_0x156a9b=await sdkRequest(_0xaaf721,_0x8c6a47=>_0x8c6a47[_0x3a2e65(0x1f9)][_0x3a2e65(0x17f)](_0x47c0bc));if(!_0x156a9b||typeof _0x156a9b!=='object'||Array['isArray'](_0x156a9b))throw CliErrors[_0x3a2e65(0x1bb)](_0x3a2e65(0x1e1));return _0x156a9b;}export async function approveApprovalTask(_0x2cf193){const _0x161153=a108_0x137d;return await sdkRequest(_0x2cf193[_0x161153(0x193)],_0x1034e6=>_0x1034e6[_0x161153(0x1f9)][_0x161153(0x191)](_0x2cf193)),null;}export async function transferApprovalTask(_0x130ba4){const _0x43b565=a108_0x137d;return await sdkRequest(_0x130ba4[_0x43b565(0x193)],_0x29e96b=>_0x29e96b['approval'][_0x43b565(0x16b)](_0x130ba4)),null;}function isRemoteAppItem(_0x248b28){const _0x214eec=a108_0x137d;return!!_0x248b28&&typeof _0x248b28===_0x214eec(0x20d)&&typeof _0x248b28['appCode']===_0x214eec(0x229)&&typeof _0x248b28[_0x214eec(0x21c)]===_0x214eec(0x229);}function extractRemoteAppItems(_0x24c948){const _0x57a204=a108_0x137d;if(Array[_0x57a204(0x1de)](_0x24c948))return _0x24c948[_0x57a204(0x1fd)](isRemoteAppItem);if(!_0x24c948||typeof _0x24c948!==_0x57a204(0x20d))throw CliErrors[_0x57a204(0x1bb)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x50fad5=_0x24c948;if(Array[_0x57a204(0x1de)](_0x50fad5['tableData']))return _0x50fad5[_0x57a204(0x231)][_0x57a204(0x1fd)](isRemoteAppItem);if(_0x50fad5['data']&&typeof _0x50fad5[_0x57a204(0x186)]===_0x57a204(0x20d)){const _0x2b26ad=_0x50fad5[_0x57a204(0x186)];if(Array[_0x57a204(0x1de)](_0x2b26ad[_0x57a204(0x231)]))return _0x2b26ad[_0x57a204(0x231)][_0x57a204(0x1fd)](isRemoteAppItem);}throw CliErrors[_0x57a204(0x1bb)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x47ca15=a108_0x137d;return extractRemoteAppItems(await identitySdkRequest(_0x3df178=>_0x3df178[_0x47ca15(0x1d1)]()));}export async function getLoginUserInfo(){const _0xd1c4d5=a108_0x137d,_0x9ff49b=await identitySdkRequest(_0x3c4e03=>_0x3c4e03[_0xd1c4d5(0x188)]());if(!_0x9ff49b||typeof _0x9ff49b!==_0xd1c4d5(0x20d)||Array[_0xd1c4d5(0x1de)](_0x9ff49b))throw CliErrors[_0xd1c4d5(0x1bb)](_0xd1c4d5(0x1be));return _0x9ff49b;}export const USER_ACCOUNT_BIND_PATH=a108_0x74666c(0x1cd);export async function bindExternalUserAccount(_0x55ac9c,_0x3d7661){const _0x1b76e9=a108_0x74666c;return identitySdkRequest(_0x5d3fb1=>_0x5d3fb1[_0x1b76e9(0x185)]({'provider':_0x55ac9c,'accountId':_0x3d7661}));}function runtimeSchedulePath(_0x597d75,_0x49afd4=''){const _0xbf178c=a108_0x74666c;return _0xbf178c(0x1f3)+encodeURIComponent(_0x597d75)+_0xbf178c(0x21f)+_0x49afd4;}export async function validateRuntimeSchedule(_0x127299,_0x593e09){const _0x3c2d98=a108_0x74666c,_0x33517a=await apiRequest(runtimeSchedulePath(_0x127299,_0x3c2d98(0x1c9)),{'domain':_0x3c2d98(0x227),'method':_0x3c2d98(0x204),'body':_0x593e09});return _0x33517a[_0x3c2d98(0x186)];}export async function createRuntimeSchedule(_0x10faca,_0x552f19){const _0x14909f=a108_0x74666c,_0x86701=await apiRequest(runtimeSchedulePath(_0x10faca),{'domain':_0x14909f(0x227),'method':'POST','body':_0x552f19});return _0x86701[_0x14909f(0x186)];}export async function listRuntimeSchedules(_0x1ed0fd,_0x50d9b7){const _0x48acb1=a108_0x74666c,_0x596680=new URLSearchParams();_0x596680['set'](_0x48acb1(0x20f),_0x50d9b7[_0x48acb1(0x20f)]);if(_0x50d9b7[_0x48acb1(0x187)]!==undefined)_0x596680[_0x48acb1(0x1dd)]('limit',String(_0x50d9b7[_0x48acb1(0x187)]));if(_0x50d9b7[_0x48acb1(0x21b)])_0x596680[_0x48acb1(0x1dd)](_0x48acb1(0x21b),_0x50d9b7['cursor']);const _0x4ab55d=_0x596680[_0x48acb1(0x1a2)]>0x0?'?'+_0x596680['toString']():'',_0x242e22=await apiRequest(''+runtimeSchedulePath(_0x1ed0fd)+_0x4ab55d,{'domain':_0x48acb1(0x227)});return _0x242e22[_0x48acb1(0x186)];}export async function getRuntimeSchedule(_0x242cf7,_0x2f74b0){const _0x1b97f6=a108_0x74666c,_0x302d81=await apiRequest(runtimeSchedulePath(_0x242cf7,'/'+encodeURIComponent(_0x2f74b0)),{'domain':_0x1b97f6(0x227)});return _0x302d81[_0x1b97f6(0x186)];}export async function deleteRuntimeSchedule(_0x880ac3,_0x4ac978){const _0x222b7d=a108_0x74666c,_0x3a6ed6=await apiRequest(runtimeSchedulePath(_0x880ac3,'/'+encodeURIComponent(_0x4ac978)),{'domain':_0x222b7d(0x227),'method':_0x222b7d(0x18b)});return _0x3a6ed6[_0x222b7d(0x186)];}export async function runRuntimeSchedule(_0x489083,_0x28214a){const _0x537da4=a108_0x74666c,_0x1d5a24=await apiRequest(runtimeSchedulePath(_0x489083,'/'+encodeURIComponent(_0x28214a)+_0x537da4(0x1e7)),{'domain':_0x537da4(0x227),'method':_0x537da4(0x204)});return _0x1d5a24[_0x537da4(0x186)];}export async function listDatasets(_0x486abe,_0x2030f6){const _0x17e65c=a108_0x74666c,_0x13c412=await sdkRequest(_0x486abe,_0x24eb97=>_0x24eb97[_0x17e65c(0x22b)][_0x17e65c(0x178)]({..._0x2030f6?.[_0x17e65c(0x1ef)]&&{'code':_0x2030f6['code']},..._0x2030f6?.[_0x17e65c(0x1fa)]&&{'name':_0x2030f6[_0x17e65c(0x1fa)]},..._0x2030f6?.[_0x17e65c(0x1c0)]&&{'tableName':_0x2030f6[_0x17e65c(0x1c0)]}}));return extractList(_0x13c412);}export async function getDatasetDetail(_0x5de566){const _0x181479=a108_0x74666c;return sdkRequest(undefined,_0x46be52=>_0x46be52[_0x181479(0x22b)]['getDrivenData']({'code':_0x5de566}));}function importSdkRequest(_0x265c5b,_0x38fa60,_0xdb7af){return sdkRequest(_0x265c5b,_0x14e6e9=>{const _0x4eff0a=a108_0x137d,_0x3a97a1=_0x14e6e9['getModel'](_0x4eff0a(0x212)+_0x38fa60);if(!(_0x3a97a1 instanceof ClientAkModel))throw CliErrors[_0x4eff0a(0x1c8)](_0x4eff0a(0x1a3));return _0xdb7af(_0x3a97a1);});}export async function getDatasetImportContract(_0x39eba2,_0x4774ae){const _0xfedf2c=a108_0x74666c;return importSdkRequest(_0x39eba2,_0x4774ae,_0xb0980d=>_0xb0980d[_0xfedf2c(0x16e)]());}export async function createDatasetImportBatch(_0x3ce0f5,_0x793b65,_0x32fbdb){const _0x523db3=a108_0x74666c;return importSdkRequest(_0x3ce0f5,_0x793b65,_0xcd633c=>_0xcd633c[_0x523db3(0x1ac)](_0x32fbdb));}export async function readDatasetImportRows(_0x1c959d,_0x23b2da,_0xf0a175){const _0x189252=a108_0x74666c,_0x13b812=await importSdkRequest(_0x1c959d,_0x23b2da,_0x468977=>_0x468977[_0x189252(0x23e)]({'ids':_0xf0a175}));if(!_0x13b812||!Array[_0x189252(0x1de)](_0x13b812['items']))throw CliErrors[_0x189252(0x1bb)](_0x189252(0x1ee));return _0x13b812['items'];}export async function readDatasetImportTaskRows(_0x5ab382,_0x15113c,_0x26ae2a){const _0x41e077=a108_0x74666c,_0x3dc30d=await importSdkRequest(_0x5ab382,_0x15113c,_0x418e59=>_0x418e59[_0x41e077(0x23e)]({'taskId':_0x26ae2a}));if(!_0x3dc30d||!Array[_0x41e077(0x1de)](_0x3dc30d[_0x41e077(0x18d)]))throw CliErrors[_0x41e077(0x1bb)](_0x41e077(0x1ab));return _0x3dc30d[_0x41e077(0x18d)];}export async function uploadDatasetImportImage(_0x13094c,_0x25724a,_0x1471b7,_0x2ae574){const _0x2b6926=a108_0x74666c;return importSdkRequest(_0x13094c,_0x25724a,_0x16ba68=>_0x16ba68['importImage']({'importId':_0x1471b7,'contentHash':_0x2ae574[_0x2b6926(0x1a8)],'file':new Blob([new Uint8Array(_0x2ae574[_0x2b6926(0x19c)])],{'type':_0x2ae574[_0x2b6926(0x1c6)]}),'fileName':_0x2b6926(0x22d)}));}export async function readDatasetImportImage(_0x325847,_0x52421e,_0x2844e7,_0x5d995c){const _0x266d71=a108_0x74666c;return importSdkRequest(_0x325847,_0x52421e,_0x4050f3=>_0x4050f3[_0x266d71(0x222)]({'importId':_0x2844e7,'contentHash':_0x5d995c[_0x266d71(0x1a8)],'type':_0x5d995c['type'],'size':_0x5d995c[_0x266d71(0x1a2)]}));}export async function getDatasetSdkUsageDoc(_0x2abf7c,_0x83c4d4){const _0x899d3=a108_0x74666c,_0x47c094=await toolboxRequest(_0x899d3(0x1ff),{'datasetCode':_0x2abf7c,'appCode':_0x83c4d4});return typeof _0x47c094?.[_0x899d3(0x196)]===_0x899d3(0x229)?_0x47c094[_0x899d3(0x196)]:'';}export async function uploadRuntimeFile(_0x4b5559,_0x2c430a){const _0xe4314e=a108_0x74666c,_0x581c4e=await readFile(_0x2c430a);return sdkRequest(_0x4b5559,_0x29cdbf=>_0x29cdbf['services'][_0xe4314e(0x18a)][_0xe4314e(0x1c3)]({'file':new Blob([new Uint8Array(_0x581c4e)]),'fileName':basename(_0x2c430a)}));}export async function queryRuntimeFileUrl(_0x3491de,_0x16d18b={}){const _0x2087ea=a108_0x74666c;return sdkRequest(undefined,_0x37c5ad=>_0x37c5ad[_0x2087ea(0x223)]['file'][_0x2087ea(0x19d)]({'filePath':_0x3491de,..._0x16d18b}));}export async function recognizeRuntimeOcr(_0x375f9,_0x50f3f0){const _0x2659e6=a108_0x74666c;return sdkRequest(_0x375f9,_0x3a105a=>_0x3a105a[_0x2659e6(0x223)]['ocr']['recognize'](_0x50f3f0));}export async function getRuntimeAppConfigByKey(_0x36d6cd,_0x2a1335){const _0x244af8=a108_0x74666c,_0x3db8ff=await sdkRequest(_0x36d6cd,_0x559075=>_0x559075[_0x244af8(0x1e6)][_0x244af8(0x1e0)](_0x2a1335));if(typeof _0x3db8ff!==_0x244af8(0x229))throw CliErrors[_0x244af8(0x1c8)]('Invalid\x20app\x20config\x20value:\x20key='+_0x2a1335);return _0x3db8ff;}export async function listNotificationChannelConfigs(_0x582ab1,_0xb3e72b){const _0x1159fd=a108_0x74666c,_0x1e8d92=await sdkRequest(_0x582ab1,_0x2bd74a=>_0x2bd74a['app'][_0x1159fd(0x1bf)](_0xb3e72b));if(!Array[_0x1159fd(0x1de)](_0x1e8d92))throw CliErrors['apiError'](_0x1159fd(0x215),_0x1159fd(0x208));return _0x1e8d92;}export async function listRuntimeArtifacts(_0x38926d,_0x61fb97){const _0x49d0e2=a108_0x74666c,_0x1c0517=await sdkRequest(_0x38926d,_0x56fd56=>_0x56fd56[_0x49d0e2(0x240)]['list'](_0x61fb97));return Array[_0x49d0e2(0x1de)](_0x1c0517)?_0x1c0517:[];}export async function getRuntimeArtifact(_0x8fc04c,_0x5d856d){const _0x489699=a108_0x74666c,_0x51605d=await sdkRequest(_0x5d856d,_0xe480e9=>_0xe480e9[_0x489699(0x240)]['get'](_0x8fc04c));if(!_0x51605d)throw CliErrors[_0x489699(0x1c8)]('Artifact\x20not\x20found:\x20id='+_0x8fc04c);return _0x51605d;}export async function createRuntimeArtifact(_0x14e78a,_0x1fcc1b){return sdkRequest(_0x14e78a,_0x567b83=>_0x567b83['artifact']['create'](_0x1fcc1b));}export async function updateRuntimeArtifact(_0xf140c2,_0x125bf9,_0x386cd5){const _0x4413b3=a108_0x74666c;return sdkRequest(_0x125bf9,_0x54b990=>_0x54b990[_0x4413b3(0x240)]['update'](_0xf140c2,_0x386cd5));}export async function listPersonalBffs(_0x63549){const _0x5a8aa6=a108_0x74666c,_0x224eb5=await sdkRequest(_0x63549,_0x2f1206=>_0x2f1206[_0x5a8aa6(0x172)][_0x5a8aa6(0x1f2)][_0x5a8aa6(0x178)]());return Array['isArray'](_0x224eb5)?_0x224eb5:[];}export async function getPersonalBff(_0x56961d,_0x353e08){const _0x7e540e=a108_0x74666c,_0x793fcb=await sdkRequest(_0x353e08,_0x1f3310=>_0x1f3310[_0x7e540e(0x172)]['bff']['get'](_0x56961d));if(!_0x793fcb)throw CliErrors[_0x7e540e(0x1c8)]('Personal\x20Backend\x20Function\x20not\x20found:\x20id='+_0x56961d);return _0x793fcb;}export async function createPersonalBff(_0x13def0,_0x505c9f){const _0x213b98=a108_0x74666c;return sdkRequest(_0x13def0,_0x230b01=>_0x230b01[_0x213b98(0x172)][_0x213b98(0x1f2)]['create'](_0x505c9f));}export async function updatePersonalBff(_0x3aff32,_0x496568,_0x18bb62){const _0x226019=a108_0x74666c;return sdkRequest(_0x496568,_0x5a2ae3=>_0x5a2ae3[_0x226019(0x172)][_0x226019(0x1f2)][_0x226019(0x1a5)](_0x3aff32,_0x18bb62));}export async function executePersonalBff(_0x21e772,_0x56aed0,_0x544ceb){const _0x51045a=a108_0x74666c;return sdkRequest(_0x56aed0,_0x4a88b4=>_0x4a88b4[_0x51045a(0x172)]['bff'][_0x51045a(0x1b5)]({'scriptId':_0x21e772,'params':_0x544ceb}));}export async function listPersonalKnowledgeBaseItems(_0x574905,_0x2044b3){return listPersonalKnowledge({'appCode':_0x574905,'accessKey':_activeAK,'signal':_0x2044b3});}export async function getPersonalKnowledgeBaseItem(_0x492dbd,_0x239ac2,_0x16d603){return getPersonalKnowledge({'appCode':_0x239ac2,'accessKey':_activeAK,'signal':_0x16d603},_0x492dbd);}export async function createPersonalKnowledgeBaseItem(_0x3f0eb4,_0x138eff,_0x5a88d0){return savePersonalKnowledge({'appCode':_0x3f0eb4,'accessKey':_activeAK,'signal':_0x5a88d0},_0x138eff);}export async function updatePersonalKnowledgeBaseItem(_0x59d165,_0x4c622c,_0x26e124,_0x105e1a){return savePersonalKnowledge({'appCode':_0x4c622c,'accessKey':_activeAK,'signal':_0x105e1a},_0x26e124,_0x59d165);}export async function getRuntimeSkillByCode(_0x223640,_0xd3aa4c){const _0x49c32b=a108_0x74666c,_0x7ce057=await skillHubJsonRequest(_0x49c32b(0x1f6)+encodeURIComponent(_0x223640)+'/'+encodeURIComponent(_0xd3aa4c),{'allowNotFound':!![]});return _0x7ce057?skillHubRuntimeDetailToRuntimeSkill(_0x7ce057):undefined;}export async function listRuntimeSkills(_0x2de1a6){const _0x2a4fdf=a108_0x74666c,_0x1861d9=await skillHubJsonRequest(_0x2a4fdf(0x168)+encodeURIComponent(_0x2de1a6['appCode'])+_0x2a4fdf(0x233),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x2de1a6['appCode'],_0x1861d9,_0x2de1a6['scope']??_0x2a4fdf(0x1e9),_0x2de1a6[_0x2a4fdf(0x1ef)],_0x2de1a6[_0x2a4fdf(0x210)]);}export async function listPersonalRuntimeSkills(_0x242923){const _0x194610=a108_0x74666c;return(await listRuntimeSkills({'appCode':_0x242923,'scope':_0x194610(0x172)}))[_0x194610(0x172)];}export async function listCompanyRuntimeSkills(_0x15386d){const _0x1050b7=a108_0x74666c;return(await listRuntimeSkills({'appCode':_0x15386d,'scope':_0x1050b7(0x1e2)}))['company'];}export async function listVisibleRuntimeSkills(_0x48c504){const _0x530bd9=a108_0x74666c;return(await listRuntimeSkills({'appCode':_0x48c504,'scope':_0x530bd9(0x1e9)}))[_0x530bd9(0x1d5)];}export async function createPersonalRuntimeSkill(_0x4edcd3,_0x232208,_0x382998={}){const _0x5a2dee=a108_0x74666c;return publishRuntimeSkill(_0x4edcd3,_0x232208,{'visibility':_0x5a2dee(0x1f8),'confirmWarnings':_0x382998[_0x5a2dee(0x179)]});}export async function updatePersonalRuntimeSkill(_0xa219ad,_0x36e8ed,_0xced484,_0xabaf6d={}){const _0x58d7e5=a108_0x74666c;return publishRuntimeSkill(_0x36e8ed,{..._0xced484,'skillCode':_0xced484[_0x58d7e5(0x181)]??_0xa219ad},{'visibility':_0x58d7e5(0x1f8),'confirmWarnings':_0xabaf6d[_0x58d7e5(0x179)]});}export async function publishCompanyRuntimeSkill(_0x5e386b,_0x2e186e,_0xb4ade9={}){const _0x486620=a108_0x74666c;return publishRuntimeSkill(_0x5e386b,_0x2e186e,{'visibility':_0x486620(0x195),'confirmWarnings':_0xb4ade9[_0x486620(0x179)]});}export async function validateRuntimeSkillPublish(_0x5c82cd,_0x5b2e44,_0x5c4409){const _0x765969=a108_0x74666c,_0x2eb12b=buildRuntimeSkillPublishForm(_0x5b2e44,_0x5c4409[_0x765969(0x1ca)]),_0x11c2e3=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x5c82cd)+'/publish/validate',{'method':_0x765969(0x204),'body':_0x2eb12b});return assertJointDiagramAcknowledged(_0x5b2e44[_0x765969(0x236)],_0x11c2e3[_0x765969(0x205)],_0x765969(0x1c8)),{'valid':_0x11c2e3[_0x765969(0x1a7)]===!![],'errors':Array['isArray'](_0x11c2e3[_0x765969(0x1d8)])?_0x11c2e3[_0x765969(0x1d8)]:[],'warnings':Array[_0x765969(0x1de)](_0x11c2e3[_0x765969(0x189)])?_0x11c2e3['warnings']:[],'resolvedSlug':_0x11c2e3[_0x765969(0x1c4)],'resolvedVersion':_0x11c2e3[_0x765969(0x22e)],'diagramValidated':_0x11c2e3[_0x765969(0x205)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x48243d,_0x5d3b13,_0x289b98,_0x4bc260,_0x4bdb27){const _0x31aedd=a108_0x74666c;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x48243d,_0x5d3b13,_0x289b98,'/validate'),{'method':_0x31aedd(0x204),'query':{'scope':_0x4bc260},'headers':{'Content-Type':_0x31aedd(0x173)},'body':JSON[_0x31aedd(0x206)](_0x4bdb27)});}export async function putRuntimeSkillVersionDiagram(_0x1f7993,_0x29aaa0,_0x5da022,_0x20bbd4,_0x2c5b78){const _0x449c1e=a108_0x74666c;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x1f7993,_0x29aaa0,_0x5da022),{'method':_0x449c1e(0x214),'query':{'scope':_0x20bbd4},'headers':{'Content-Type':_0x449c1e(0x173)},'body':JSON[_0x449c1e(0x206)](_0x2c5b78)});}export async function getRuntimeSkillVersionDiagram(_0x166ef4,_0x18a41f,_0x49127d,_0x28ab8e){const _0x2d4ff9=a108_0x74666c,_0x5c8771=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x166ef4,_0x18a41f,_0x49127d),{'query':{'scope':_0x28ab8e}});if(typeof _0x5c8771[_0x2d4ff9(0x1c5)]!=='boolean')throw CliErrors[_0x2d4ff9(0x1bb)]('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.');const _0x39bf63=_0x5c8771[_0x2d4ff9(0x1d4)];if(typeof _0x39bf63!==_0x2d4ff9(0x229)||!/^sha256:[0-9a-f]{64}$/[_0x2d4ff9(0x219)](_0x39bf63))throw CliErrors['apiError'](_0x2d4ff9(0x190),'SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.');const _0x4de16e=_0x5c8771['diagramRevision'];if(_0x5c8771[_0x2d4ff9(0x1c5)]&&(!Number[_0x2d4ff9(0x1bd)](_0x4de16e)||Number(_0x4de16e)<0x1))throw CliErrors[_0x2d4ff9(0x1bb)](_0x2d4ff9(0x23a));if(!_0x5c8771[_0x2d4ff9(0x1c5)]&&_0x4de16e!==undefined&&_0x4de16e!==null)throw CliErrors[_0x2d4ff9(0x1bb)](_0x2d4ff9(0x1cb));const _0xff0373=_0x5c8771['found']?Number(_0x4de16e):null;return{..._0x5c8771,'sourceFingerprint':_0x39bf63,'diagramRevision':_0xff0373,'expectedDiagramRevision':_0xff0373??0x0};}export async function downloadRuntimeSkillPackage(_0x48663a,_0x24d0be,_0x28a5e2,_0xd9d21c){const _0x18ef3b=a108_0x74666c;void _0x48663a;const _0x54d316=_0xd9d21c?_0x18ef3b(0x1f0)+encodeURIComponent(_0x28a5e2)+'/'+encodeURIComponent(_0x24d0be)+'/versions/'+encodeURIComponent(_0xd9d21c)+'/download':_0x18ef3b(0x1f0)+encodeURIComponent(_0x28a5e2)+'/'+encodeURIComponent(_0x24d0be)+_0x18ef3b(0x22c);return skillHubBinaryRequest(_0x54d316);}async function publishRuntimeSkill(_0x15db62,_0xc21404,_0x4fd906){const _0x26beb6=a108_0x74666c,_0x69613d=buildRuntimeSkillPublishForm(_0xc21404,_0x4fd906[_0x26beb6(0x1ca)]),_0x21b8ba=await skillHubJsonRequest(_0x26beb6(0x1f0)+encodeURIComponent(_0x15db62)+_0x26beb6(0x194),{'method':_0x26beb6(0x204),'query':{'confirmWarnings':_0x4fd906[_0x26beb6(0x179)]===!![]?!![]:undefined},'body':_0x69613d});return assertJointDiagramAcknowledged(_0xc21404[_0x26beb6(0x236)],_0x21b8ba[_0x26beb6(0x244)],_0x26beb6(0x242)),{'appCode':_0x21b8ba[_0x26beb6(0x1e5)]??_0x15db62,'skillCode':_0x21b8ba['slug']??_0xc21404[_0x26beb6(0x181)]??'','skillName':_0xc21404['skillName']??_0x21b8ba[_0x26beb6(0x241)]??_0xc21404['skillCode'],'description':_0xc21404['description'],'scope':skillHubVisibilityToScope(_0x21b8ba[_0x26beb6(0x1ca)]??_0x4fd906['visibility'])??'personal','version':_0x21b8ba[_0x26beb6(0x16d)]??_0xc21404['version'],'tags':_0xc21404[_0x26beb6(0x199)],'content':_0xc21404[_0x26beb6(0x218)],'diagramBound':_0x21b8ba[_0x26beb6(0x244)]===!![]};}function assertJointDiagramAcknowledged(_0x1ec209,_0x96c13d,_0x310b73){const _0x2083ec=a108_0x74666c;if(!_0x1ec209||_0x96c13d===!![])return;throw CliErrors[_0x2083ec(0x1bb)](_0x2083ec(0x1d2)+_0x310b73+'.',_0x2083ec(0x23c));}function buildRuntimeSkillPublishForm(_0x2fa407,_0x442dde){const _0x2af8dc=a108_0x74666c,_0x84bdba=new FormData();return _0x84bdba[_0x2af8dc(0x1dd)](_0x2af8dc(0x18a),runtimeSkillPackageFile(_0x2fa407)),_0x2fa407[_0x2af8dc(0x176)]?.[_0x2af8dc(0x1ad)]()&&_0x84bdba[_0x2af8dc(0x1dd)]('displayName',_0x2fa407['skillName'][_0x2af8dc(0x1ad)]()),_0x84bdba[_0x2af8dc(0x1dd)](_0x2af8dc(0x1ca),_0x442dde),_0x2fa407[_0x2af8dc(0x236)]&&_0x84bdba[_0x2af8dc(0x1dd)]('diagram',new Blob([JSON['stringify'](_0x2fa407[_0x2af8dc(0x236)])],{'type':_0x2af8dc(0x173)})),_0x84bdba;}function runtimeSkillVersionDiagramPath(_0x27ed96,_0x6d1a2f,_0x176c73,_0x59d93c=''){const _0x277d01=a108_0x74666c;return _0x277d01(0x1f0)+encodeURIComponent(_0x27ed96)+'/'+encodeURIComponent(_0x6d1a2f)+_0x277d01(0x1b4)+encodeURIComponent(_0x176c73)+_0x277d01(0x19a)+_0x59d93c;}function runtimeSkillPackageFile(_0xea4b02){const _0x1a6c3e=a108_0x74666c;if(!_0xea4b02[_0x1a6c3e(0x1a4)])throw CliErrors[_0x1a6c3e(0x1c8)]('Missing\x20Skill\x20package\x20payload.');const _0x497e99=Buffer['from'](_0xea4b02[_0x1a6c3e(0x1a4)],_0x1a6c3e(0x235)),_0x3560d0=new Blob([_0x497e99],{'type':_0x1a6c3e(0x18f)}),_0xb8eb8d=(_0xea4b02[_0x1a6c3e(0x181)]||_0x1a6c3e(0x171))+'.zip';if(typeof File!==_0x1a6c3e(0x245))return new File([_0x3560d0],_0xb8eb8d,{'type':_0x1a6c3e(0x18f)});return _0x3560d0;}function normalizeSkillHubRuntimeListResponse(_0x34d0d5,_0x529066,_0x15703f,_0x6dbe32,_0x171465=![]){const _0x51b85d=a108_0x74666c,_0x2f08a5=Array[_0x51b85d(0x1de)](_0x529066)?_0x529066:Array[_0x51b85d(0x1de)](_0x529066?.[_0x51b85d(0x18d)])?_0x529066[_0x51b85d(0x18d)]:[],_0x20dd16=_0x6dbe32?.[_0x51b85d(0x1ad)](),_0x290247=_0x2f08a5[_0x51b85d(0x1fd)](_0x5450ea=>!_0x20dd16||_0x5450ea[_0x51b85d(0x241)]===_0x20dd16)[_0x51b85d(0x1fd)](_0x2a7367=>!_0x171465||_0x2a7367[_0x51b85d(0x1fb)]?.[_0x51b85d(0x170)]===_0x51b85d(0x17e)&&Boolean(_0x2a7367[_0x51b85d(0x1fb)]['version']?.[_0x51b85d(0x1ad)]()))[_0x51b85d(0x217)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x257288=>Boolean(_0x257288)),_0x545800=_0x290247[_0x51b85d(0x1fd)](_0x55b179=>_0x55b179[_0x51b85d(0x17c)]===_0x51b85d(0x172)),_0xb37e58=_0x290247[_0x51b85d(0x1fd)](_0x2b3dc6=>_0x2b3dc6[_0x51b85d(0x17c)]===_0x51b85d(0x1e2));return{'appCode':_0x34d0d5,'personal':_0x15703f==='company'?[]:_0x545800,'company':_0x15703f===_0x51b85d(0x172)?[]:_0xb37e58,'effective':buildEffectiveRuntimeSkills(_0x545800,_0xb37e58,_0x15703f)};}function skillHubRuntimeItemToRuntimeSkill(_0x48f1e5){const _0x304050=a108_0x74666c,_0x48f254=_0x48f1e5[_0x304050(0x241)]?.[_0x304050(0x1ad)](),_0x2ecc40=skillHubVisibilityToScope(_0x48f1e5[_0x304050(0x1ca)]);if(!_0x48f254||!_0x2ecc40)return undefined;return{'id':_0x48f1e5['id'],'appCode':_0x48f1e5[_0x304050(0x1e5)],'skillCode':_0x48f254,'skillName':_0x48f1e5['displayName']??_0x48f254,'description':_0x48f1e5['summary'],'example':_0x48f1e5[_0x304050(0x1eb)],'scope':_0x2ecc40,'version':skillHubRuntimeItemVersion(_0x48f1e5),'status':_0x48f1e5['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x275e64){const _0x15a8fa=a108_0x74666c,_0x219bde=_0x275e64[_0x15a8fa(0x241)]?.[_0x15a8fa(0x1ad)]();if(!_0x219bde)return undefined;return{'id':_0x275e64['id'],'appCode':_0x275e64[_0x15a8fa(0x1e5)],'skillCode':_0x219bde,'skillName':_0x275e64[_0x15a8fa(0x18e)]??_0x219bde,'description':_0x275e64[_0x15a8fa(0x1fc)],'example':_0x275e64[_0x15a8fa(0x1eb)],'scope':skillHubVisibilityToScope(_0x275e64[_0x15a8fa(0x1ca)])??_0x275e64[_0x15a8fa(0x1ca)]?.[_0x15a8fa(0x1b9)](),'version':skillHubRuntimeItemVersion(_0x275e64),'status':_0x275e64[_0x15a8fa(0x170)]};}function skillHubVisibilityToScope(_0x224c82){const _0x1e3db1=a108_0x74666c;if(_0x224c82===_0x1e3db1(0x1f8))return'personal';if(_0x224c82===_0x1e3db1(0x195))return _0x1e3db1(0x1e2);return undefined;}function skillHubRuntimeItemVersion(_0x1ac8d7){const _0x3e6fe7=a108_0x74666c;return _0x1ac8d7['publishedVersion']?.[_0x3e6fe7(0x16d)]??_0x1ac8d7[_0x3e6fe7(0x1cf)]?.['version']??_0x1ac8d7['ownerPreviewVersion']?.[_0x3e6fe7(0x16d)];}function buildEffectiveRuntimeSkills(_0x1c5325,_0x74537c,_0x32e893){const _0x19cba6=a108_0x74666c;if(_0x32e893===_0x19cba6(0x172))return _0x1c5325;if(_0x32e893===_0x19cba6(0x1e2))return _0x74537c;const _0x528f45=new Map();for(const _0x4e389f of _0x74537c){_0x528f45[_0x19cba6(0x1dd)](_0x4e389f['skillCode'],_0x4e389f);}for(const _0x1cfd5d of _0x1c5325){_0x528f45['set'](_0x1cfd5d['skillCode'],_0x1cfd5d);}return Array['from'](_0x528f45[_0x19cba6(0x1b8)]());}function normalizeRuntimeSkillListResponse(_0x5a3883,_0x5afcd7){const _0x3a1875=a108_0x74666c;if(Array[_0x3a1875(0x1de)](_0x5afcd7)){const _0x353305=_0x5afcd7[_0x3a1875(0x1fd)](_0x271730=>_0x271730[_0x3a1875(0x17c)]==='personal'),_0x5ed86e=_0x5afcd7[_0x3a1875(0x1fd)](_0x305967=>_0x305967[_0x3a1875(0x17c)]==='company');return{'appCode':_0x5a3883,'personal':_0x353305,'company':_0x5ed86e,'effective':[..._0x5ed86e,..._0x353305]};}return{'appCode':_0x5afcd7?.['appCode']??_0x5a3883,'personal':Array['isArray'](_0x5afcd7?.[_0x3a1875(0x172)])?_0x5afcd7[_0x3a1875(0x172)]:[],'company':Array['isArray'](_0x5afcd7?.['company'])?_0x5afcd7[_0x3a1875(0x1e2)]:[],'effective':Array[_0x3a1875(0x1de)](_0x5afcd7?.[_0x3a1875(0x1d5)])?_0x5afcd7[_0x3a1875(0x1d5)]:[]};}function normalizeRuntimeRoleUserList(_0xdd70f2,_0x4313fc){const _0x2fd6cf=a108_0x74666c;if(!Array[_0x2fd6cf(0x1de)](_0xdd70f2))throw CliErrors[_0x2fd6cf(0x1bb)](_0x2fd6cf(0x198)+_0x4313fc+_0x2fd6cf(0x1fe));return _0xdd70f2['map']((_0x37ef5f,_0x1a1123)=>{const _0x24f48d=_0x2fd6cf;if(!_0x37ef5f||typeof _0x37ef5f!=='object'||Array[_0x24f48d(0x1de)](_0x37ef5f))throw CliErrors[_0x24f48d(0x1bb)]('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x4313fc+'['+_0x1a1123+_0x24f48d(0x1f7));const _0x3b35a2=_0x37ef5f,_0x502aba=normalizeRuntimeUserId(_0x3b35a2[_0x24f48d(0x177)]);if(_0x502aba===undefined)throw CliErrors[_0x24f48d(0x1bb)](_0x24f48d(0x198)+_0x4313fc+'['+_0x1a1123+_0x24f48d(0x17b));return{..._0x3b35a2,'userId':_0x502aba};});}function normalizeRuntimeRoleUsersResponse(_0x29d7cc){return extractList(_0x29d7cc)['map']((_0x26f239,_0x4057aa)=>{const _0x41cb66=a108_0x137d;if(!_0x26f239||typeof _0x26f239!==_0x41cb66(0x20d)||Array[_0x41cb66(0x1de)](_0x26f239))throw CliErrors[_0x41cb66(0x1bb)](_0x41cb66(0x1f5)+_0x4057aa+']\x20must\x20be\x20an\x20object.');const _0x14991=_0x26f239;return{..._0x14991,'userList':normalizeRuntimeRoleUserList(_0x14991['userList'],_0x41cb66(0x183)+_0x4057aa+_0x41cb66(0x23d)),..._0x14991[_0x41cb66(0x1ba)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x14991[_0x41cb66(0x1ba)],_0x41cb66(0x183)+_0x4057aa+_0x41cb66(0x1e8))}};});}export async function listRuntimeAppRoles(_0x2af56e,_0x9b1505={}){const _0x5f4820=a108_0x74666c,_0x551805=_0x9b1505[_0x5f4820(0x184)]??0x1,_0x2e4534=Math['min'](Math['max'](_0x9b1505[_0x5f4820(0x1f1)]??0x64,0x1),0x64),_0x458a0c=await sdkRequest(_0x2af56e,_0x300421=>_0x300421[_0x5f4820(0x20c)][_0x5f4820(0x180)]({..._0x9b1505['roleName']?{'roleName':_0x9b1505[_0x5f4820(0x1b1)]}:{},'currentPage':_0x551805,'pageSize':_0x2e4534}));return{'items':extractList(_0x458a0c),'paging':extractPaging(_0x458a0c)};}export async function createRuntimeAppRole(_0x38b275){const _0x4471d3=a108_0x74666c;return sdkRequest(_0x38b275[_0x4471d3(0x193)],_0x4693c7=>_0x4693c7[_0x4471d3(0x20c)]['createRole']({'roleType':'CUSTOM',..._0x38b275}));}export async function updateRuntimeAppRole(_0x26274d){const _0x1b8757=a108_0x74666c;return sdkRequest(_0x26274d['appCode'],_0x4df901=>_0x4df901[_0x1b8757(0x20c)][_0x1b8757(0x19b)](_0x26274d));}export async function deleteRuntimeAppRole(_0x58f1b2){const _0x2b5968=a108_0x74666c;return sdkRequest(undefined,_0x42a247=>_0x42a247[_0x2b5968(0x20c)][_0x2b5968(0x230)](_0x58f1b2));}export async function listRuntimeRoleUsers(_0x539453){const _0x38eafc=await sdkRequest(_0x539453,_0x487aae=>_0x487aae['permit']['getRoleUserList']());return normalizeRuntimeRoleUsersResponse(_0x38eafc);}export async function updateRuntimeRoleUsers(_0x305634,_0x4a6bdc){const _0x49d3d7=a108_0x74666c;return sdkRequest(_0x305634,_0x1d97c1=>_0x1d97c1[_0x49d3d7(0x20c)][_0x49d3d7(0x1d6)]({'roleList':_0x4a6bdc}));}export async function listRuntimeAppUsers(_0xb4a87b){const _0x1eb81b=a108_0x74666c,_0x22576d=await sdkRequest(_0xb4a87b,_0xef7614=>_0xef7614['permit'][_0x1eb81b(0x17d)]());return extractList(_0x22576d);}export async function listRuntimePermitRoles(_0x362eb2,_0x52daa6={}){const _0xc78fcb=a108_0x74666c,_0x108939=await sdkRequest(_0x362eb2,_0x1b640b=>_0x1b640b[_0xc78fcb(0x20c)][_0xc78fcb(0x1d9)](_0x52daa6));return extractList(_0x108939);}export async function getRuntimePagePermit(_0x18a6ff){const _0x26301e=a108_0x74666c;return sdkRequest(undefined,_0x351be5=>_0x351be5[_0x26301e(0x20c)]['getPagePermit'](_0x18a6ff));}export async function saveRuntimePagePermit(_0x10e376){const _0x561fdd=a108_0x74666c;return sdkRequest(_0x10e376[_0x561fdd(0x193)],_0x50cf04=>_0x50cf04['permit'][_0x561fdd(0x1a9)](_0x10e376));}export async function getRuntimeRoleMenuResources(_0x3ad781,_0x2b3028){const _0x34ab5b=a108_0x74666c,_0x2cab5e=await sdkRequest(_0x3ad781,_0x38218b=>_0x38218b[_0x34ab5b(0x20c)][_0x34ab5b(0x1ae)]({'roleId':_0x2b3028}));return extractList(_0x2cab5e);}export async function listRuntimeMenuRolePermits(_0x33b1c8){const _0x558c06=a108_0x74666c,_0x62927c=await sdkRequest(_0x33b1c8,_0x52cf91=>_0x52cf91[_0x558c06(0x20c)]['getMenuPermitList']());return Array[_0x558c06(0x1de)](_0x62927c?.[_0x558c06(0x232)])?_0x62927c[_0x558c06(0x232)]:[];}export async function saveRuntimeMenuRolePermits(_0x355baf,_0x471260){const _0x5975c3=a108_0x74666c;return sdkRequest(_0x355baf,_0x44116=>_0x44116[_0x5975c3(0x20c)][_0x5975c3(0x22f)]({'permitList':_0x471260}));}export async function listRuntimeDatasetPermits(_0xd26dd9,_0x5abf0f){const _0x4e84ab=a108_0x74666c,_0x305550=await sdkRequest(_0xd26dd9,_0x24f4ac=>_0x24f4ac[_0x4e84ab(0x20c)]['getDatasetPermitList'](_0x5abf0f));return Array['isArray'](_0x305550?.[_0x4e84ab(0x232)])?_0x305550[_0x4e84ab(0x232)]:[];}export async function listRuntimeDatasetRolePermits(_0x23d214){const _0xc789ec=a108_0x74666c,_0x3ebf11=await sdkRequest(_0x23d214,_0x11dd30=>_0x11dd30['permit'][_0xc789ec(0x1e3)]());return Array[_0xc789ec(0x1de)](_0x3ebf11?.['permitList'])?_0x3ebf11[_0xc789ec(0x232)]:[];}export async function saveRuntimeDatasetRolePermits(_0x2dd9f0,_0x437b2b){const _0x49b102=a108_0x74666c;return sdkRequest(_0x2dd9f0,_0x3f2a78=>_0x3f2a78[_0x49b102(0x20c)]['saveDatasetPermits']({'permitList':_0x437b2b}));}
|