@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-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/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/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -0
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -0
- package/lib/commands/notification/shared.d.ts +13 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.d.ts +2 -0
- package/lib/commands/permit/dataset-get.js +1 -0
- package/lib/commands/permit/dataset-set.d.ts +2 -0
- package/lib/commands/permit/dataset-set.js +1 -0
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.d.ts +52 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.d.ts +33 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -0
- 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/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/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +161 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.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/platform.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 +19 -6
- package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-auth.md +1 -5
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
- package/skills/lovrabet.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x383aab,_0xe025a1){const _0xb45d69=a74_0x55e6,_0x2bd074=_0x383aab();while(!![]){try{const _0x4ee666=parseInt(_0xb45d69(0x1ff))/0x1*(-parseInt(_0xb45d69(0x1e7))/0x2)+-parseInt(_0xb45d69(0x20f))/0x3+parseInt(_0xb45d69(0x1f6))/0x4+parseInt(_0xb45d69(0x1ee))/0x5*(parseInt(_0xb45d69(0x1e1))/0x6)+parseInt(_0xb45d69(0x209))/0x7*(parseInt(_0xb45d69(0x1f8))/0x8)+parseInt(_0xb45d69(0x1e8))/0x9*(-parseInt(_0xb45d69(0x1ec))/0xa)+parseInt(_0xb45d69(0x205))/0xb;if(_0x4ee666===_0xe025a1)break;else _0x2bd074['push'](_0x2bd074['shift']());}catch(_0x15dc42){_0x2bd074['push'](_0x2bd074['shift']());}}}(a74_0x3d0f,0xb3ae0));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x461d3d){const _0x76dede=a74_0x55e6,_0x1e0f31=_0x461d3d[_0x76dede(0x20d)](_0x76dede(0x20c))||_0x76dede(0x1e9);if(_0x1e0f31===_0x76dede(0x1e9)||_0x1e0f31===_0x76dede(0x1e5))return _0x1e0f31;throw CliErrors['validation'](_0x76dede(0x1e4)+_0x1e0f31+'\x22.');}export function allowRetargetArgs(_0x220bcb){return _0x220bcb?[{'allowAppCodeRetarget':!![]}]:[];}function a74_0x55e6(_0x29b3df,_0x5b31a2){_0x29b3df=_0x29b3df-0x1e0;const _0x3d0fa7=a74_0x3d0f();let _0x55e6a4=_0x3d0fa7[_0x29b3df];return _0x55e6a4;}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x4ab735=a74_0x55e6;return{'targetScope':_0x4ab735(0x1e5),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x347c82={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x347c82};}export function remotePersonalReadOptions(_0xe13085,_0x5c63e7={}){return{'ignoreInvalidMetadata':!![],..._0xe13085?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x5c63e7};}export function throwIfBuiltinPushTarget(_0x4b6f3a){const _0x424a73=a74_0x55e6;if(_0x4b6f3a?.[_0x424a73(0x20c)]!==_0x424a73(0x1e3))return;throw CliErrors[_0x424a73(0x20e)](_0x424a73(0x203)+(_0x4b6f3a['skillCode']??_0x424a73(0x1f0))+_0x424a73(0x1ef),'Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.');}export function throwIfPublishValidationFailed(_0x246d7f,_0x5ca660,_0x581f87){const _0x213df0=a74_0x55e6;if(_0x581f87[_0x213df0(0x201)]['length']===0x0&&(_0x581f87['valid']||_0x581f87[_0x213df0(0x1f3)][_0x213df0(0x200)]>0x0))return;const _0x142e59=_0x581f87[_0x213df0(0x201)][_0x213df0(0x200)]>0x0?_0x581f87[_0x213df0(0x201)][_0x213df0(0x206)](';\x20'):_0x213df0(0x20a),_0x32987e=_0x246d7f===_0x213df0(0x1e5)?_0x213df0(0x1f9):'Personal';throw CliErrors[_0x213df0(0x20e)](_0x32987e+_0x213df0(0x1f5)+_0x5ca660+'.',_0x142e59);}function a74_0x3d0f(){const _0x1e9e02=['downloadRuntimeSkillPackage','verifyRuntimeSkillBundle','warnings','Personal','\x20Skill\x20push\x20validation\x20failed\x20for\x20','2380664HDCYFK','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','24GMeroA','Company','different','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','lovrabet.skill.json','skill-metadata-appcode-retargeted','554wYGebs','length','errors','Review\x20each\x20warning\x20before\x20continuing.','Builtin\x20Skill\x20','not-applicable','26135010ZusEHE','join','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','skillCode','2842546ODGvhZ','SkillHub\x20validation\x20returned\x20invalid.','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','scope','str','validation','3803424fQHNMe','Warnings:\x20','132xNVFwz','appCode','builtin','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','company','publishInput','3200nLAzzO','241974WyQWXe','personal','files','remote','500EHbOHl','warning','10265ZcvLzh','\x20cannot\x20be\x20pushed.','(unknown)'];a74_0x3d0f=function(){return _0x1e9e02;};return a74_0x3d0f();}export function throwIfUnconfirmedPublishWarnings(_0x14fb42,_0x128e47,_0x44a128,_0x1b5b5f){const _0x28263a=a74_0x55e6;if(_0x44a128[_0x28263a(0x200)]===0x0||_0x1b5b5f)return;const _0x520f07=_0x14fb42===_0x28263a(0x1e5)?_0x28263a(0x1f9):_0x28263a(0x1f4);throw CliErrors[_0x28263a(0x20e)](_0x520f07+_0x28263a(0x1fc)+_0x128e47+'.',[_0x28263a(0x202),_0x28263a(0x20b),_0x28263a(0x1f7),_0x28263a(0x1e0)+_0x44a128[_0x28263a(0x206)](';\x20')][_0x28263a(0x206)]('\x20'));}export function buildRetargetWarning(_0x3cdbf1,_0x4e3627){const _0x311ffa=a74_0x55e6;if(!_0x3cdbf1?.['appCode']||_0x3cdbf1[_0x311ffa(0x1e2)]===_0x4e3627)return[];return[{'level':_0x311ffa(0x1ed),'ruleId':_0x311ffa(0x1fe),'file':_0x311ffa(0x1fd),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x3cdbf1[_0x311ffa(0x1e2)]+_0x311ffa(0x1fb)+_0x4e3627+'\x20after\x20successful\x20push.','suggestion':_0x311ffa(0x207)}];}export async function runRemoteContentPreflight(_0x104508){const _0x49a942=a74_0x55e6;if(!_0x104508['remote']||_0x104508[_0x49a942(0x1eb)][_0x49a942(0x20c)]!==_0x104508[_0x49a942(0x20c)]||!_0x104508[_0x49a942(0x1e6)][_0x49a942(0x1ea)])return{'status':_0x49a942(0x204)};const _0xdaacae=_0x104508['remote'][_0x49a942(0x208)]||_0x104508['skillCode'];if(!_0xdaacae)return{'status':_0x49a942(0x204)};const _0x2ad5bc=await _0x104508[_0x49a942(0x1f1)](_0x104508[_0x49a942(0x20c)],_0xdaacae,_0x104508[_0x49a942(0x1e2)],_0x104508[_0x49a942(0x1eb)]['version']);try{_0x104508[_0x49a942(0x1f2)](_0x104508['publishInput'][_0x49a942(0x1ea)],_0x2ad5bc);}catch{return{'status':_0x49a942(0x1fa)};}return{'status':'identical','savedSkill':{..._0x104508[_0x49a942(0x1eb)],'content':_0x104508[_0x49a942(0x1e6)]['content'],'files':_0x104508[_0x49a942(0x1e6)]['files']}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a75_0x2e32(){const _0x424b6c=['576iRAOdt','preferInputSkillName','633YsjZbV','5AdXEJF','2551549MzImeZ','version','1304rAHPvr','2526678vJrBac','4880570RvOgTd','3102054dLxgQV','1946krvKov','isArray','skill-metadata-appcode-retargeted','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','sourceSessionId','41640HOoleK','\x20after\x20successful\x20push.','skillName','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','description','warning','2565VuZYrl','tags','lovrabet.skill.json'];a75_0x2e32=function(){return _0x424b6c;};return a75_0x2e32();}(function(_0x5a8d67,_0x4f95ba){const _0x48404e=a75_0x15c1,_0x4b2f33=_0x5a8d67();while(!![]){try{const _0x19fff2=parseInt(_0x48404e(0x19d))/0x1*(parseInt(_0x48404e(0x18f))/0x2)+parseInt(_0x48404e(0x19f))/0x3*(parseInt(_0x48404e(0x1a3))/0x4)+parseInt(_0x48404e(0x1a0))/0x5*(-parseInt(_0x48404e(0x18e))/0x6)+-parseInt(_0x48404e(0x1a4))/0x7+parseInt(_0x48404e(0x194))/0x8*(parseInt(_0x48404e(0x19a))/0x9)+-parseInt(_0x48404e(0x1a5))/0xa+parseInt(_0x48404e(0x1a1))/0xb;if(_0x19fff2===_0x4f95ba)break;else _0x4b2f33['push'](_0x4b2f33['shift']());}catch(_0x336f63){_0x4b2f33['push'](_0x4b2f33['shift']());}}}(a75_0x2e32,0xeeea6));export function withRetargetExistingMetadata(_0x1385a4,_0x13d908,_0xb889e1={}){const _0x278ab0=a75_0x15c1,_0x208887=_0xb889e1[_0x278ab0(0x19e)]?_0x1385a4[_0x278ab0(0x196)]??_0x13d908['skillName']:_0x13d908['skillName']??_0x1385a4[_0x278ab0(0x196)];return{..._0x1385a4,'skillName':_0x208887,'description':_0x13d908[_0x278ab0(0x198)]??_0x1385a4['description'],'tags':Array[_0x278ab0(0x190)](_0x13d908[_0x278ab0(0x19b)])?_0x13d908['tags']:_0x1385a4[_0x278ab0(0x19b)],'version':_0x13d908[_0x278ab0(0x1a2)]??_0x1385a4[_0x278ab0(0x1a2)],'sourceSessionId':_0x13d908[_0x278ab0(0x193)]??_0x1385a4[_0x278ab0(0x193)]};}function a75_0x15c1(_0x237744,_0x5cbf8b){_0x237744=_0x237744-0x18e;const _0x2e32e7=a75_0x2e32();let _0x15c151=_0x2e32e7[_0x237744];return _0x15c151;}export function buildRetargetWarning(_0x2abca8,_0x37ea69){const _0x44a53d=a75_0x15c1;if(!_0x2abca8?.['appCode']||_0x2abca8['appCode']===_0x37ea69)return[];return[{'level':_0x44a53d(0x199),'ruleId':_0x44a53d(0x191),'file':_0x44a53d(0x19c),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x2abca8['appCode']+_0x44a53d(0x197)+_0x37ea69+_0x44a53d(0x195),'suggestion':_0x44a53d(0x192)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x5595(_0x2335d7,_0xee49fb){_0x2335d7=_0x2335d7-0x114;const _0x2466e8=a76_0x2466();let _0x5595f4=_0x2466e8[_0x2335d7];return _0x5595f4;}(function(_0x3cfc35,_0x249f12){const _0x2ecbbd=a76_0x5595,_0x507aa3=_0x3cfc35();while(!![]){try{const _0x5b4c5=parseInt(_0x2ecbbd(0x117))/0x1*(parseInt(_0x2ecbbd(0x120))/0x2)+parseInt(_0x2ecbbd(0x11e))/0x3*(parseInt(_0x2ecbbd(0x116))/0x4)+parseInt(_0x2ecbbd(0x121))/0x5*(-parseInt(_0x2ecbbd(0x124))/0x6)+-parseInt(_0x2ecbbd(0x119))/0x7*(parseInt(_0x2ecbbd(0x115))/0x8)+-parseInt(_0x2ecbbd(0x11d))/0x9*(-parseInt(_0x2ecbbd(0x118))/0xa)+parseInt(_0x2ecbbd(0x11b))/0xb+-parseInt(_0x2ecbbd(0x11c))/0xc*(parseInt(_0x2ecbbd(0x125))/0xd);if(_0x5b4c5===_0x249f12)break;else _0x507aa3['push'](_0x507aa3['shift']());}catch(_0xfd6b90){_0x507aa3['push'](_0x507aa3['shift']());}}}(a76_0x2466,0xd0bbc));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x2f4f19){const _0x47cfe1=a76_0x5595,_0x3beb4c=_0x2f4f19[_0x47cfe1(0x11f)]();if(!_0x3beb4c||_0x3beb4c==='all')return[_0x47cfe1(0x122),_0x47cfe1(0x11a)];if(_0x3beb4c===_0x47cfe1(0x122)||_0x3beb4c==='company')return[_0x3beb4c];throw CliErrors['validation']('Unsupported\x20Skill\x20sync\x20scope:\x20'+_0x2f4f19);}export function normalizeListScope(_0x152be4){const _0xbbc7ae=a76_0x5595,_0x43de37=_0x152be4[_0xbbc7ae(0x11f)]();if(!_0x43de37)return _0xbbc7ae(0x123);if(_0x43de37==='personal'||_0x43de37==='company'||_0x43de37===_0xbbc7ae(0x123))return _0x43de37;throw CliErrors['validation'](_0xbbc7ae(0x114)+_0x152be4);}export function shouldListScope(_0x10ec2b,_0x28a23d){if(_0x10ec2b==='all')return!![];return _0x10ec2b===_0x28a23d;}export function listScopeToRuntimeScopes(_0x3d726e){const _0x2ac8de=a76_0x5595;if(_0x3d726e===_0x2ac8de(0x123))return[_0x2ac8de(0x122),'company'];return[_0x3d726e===_0x2ac8de(0x11a)?_0x2ac8de(0x11a):_0x3d726e];}function a76_0x2466(){const _0xb09457=['816722QnSOhW','320005OZklUN','personal','all','12HMiatX','13natpIn','Unsupported\x20Skill\x20list\x20scope:\x20','8ckKmiD','5697772zJTWEv','1oEGDHg','969380EvySOW','3172414BnNIKh','company','11586586VdriFn','33685032KyDOtz','126wWqWAV','3jsYigu','trim'];a76_0x2466=function(){return _0xb09457;};return a76_0x2466();}export function listScopeToRemoteScope(_0x3775a6){return _0x3775a6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a77_0xc779(_0x5b073e,_0x439ad7){_0x5b073e=_0x5b073e-0x1cb;var _0x4de75c=a77_0x4de7();var _0xc77983=_0x4de75c[_0x5b073e];return _0xc77983;}(function(_0x190988,_0x49f3f8){var _0x265b11=a77_0xc779,_0x2d5bcb=_0x190988();while(!![]){try{var _0x15a64c=-parseInt(_0x265b11(0x1d2))/0x1*(-parseInt(_0x265b11(0x1d6))/0x2)+-parseInt(_0x265b11(0x1de))/0x3+-parseInt(_0x265b11(0x1d4))/0x4*(parseInt(_0x265b11(0x1cc))/0x5)+-parseInt(_0x265b11(0x1cb))/0x6*(parseInt(_0x265b11(0x1dc))/0x7)+parseInt(_0x265b11(0x1d9))/0x8*(parseInt(_0x265b11(0x1db))/0x9)+parseInt(_0x265b11(0x1cd))/0xa+parseInt(_0x265b11(0x1d8))/0xb;if(_0x15a64c===_0x49f3f8)break;else _0x2d5bcb['push'](_0x2d5bcb['shift']());}catch(_0x43b021){_0x2d5bcb['push'](_0x2d5bcb['shift']());}}}(a77_0x4de7,0x36f8b));function a77_0x4de7(){var _0x1260ec=['pulledAt','contentHash','1SVpbtb','appCode','74192XuQFcQ','cacheDir','678924cTUnnR','version','1617462ZWGRFq','2224AnwaxO','dir','1566PpqCoA','7EOaeit','skillMdPath','958680xIWHCZ','skillCode','status','317274ZFKTIi','65RdDYCA','3038500bzXbEz','skillName','readonly'];a77_0x4de7=function(){return _0x1260ec;};return a77_0x4de7();}export function summarizeRuntimeSkill(_0x107148){var _0x245269=a77_0xc779;return{'id':_0x107148['id'],'skillCode':_0x107148[_0x245269(0x1df)],'skillName':_0x107148[_0x245269(0x1ce)],'scope':_0x107148['scope'],'version':_0x107148[_0x245269(0x1d7)],'readonly':_0x107148[_0x245269(0x1cf)]};}export function summarizeLocalRuntimeSkill(_0x523da6){var _0x103de9=a77_0xc779;return{'id':_0x523da6['id'],'skillCode':_0x523da6[_0x103de9(0x1df)],'skillName':_0x523da6[_0x103de9(0x1ce)],'scope':_0x523da6['scope'],'appCode':_0x523da6[_0x103de9(0x1d3)],'version':_0x523da6[_0x103de9(0x1d7)],'status':_0x523da6[_0x103de9(0x1e0)],'readonly':_0x523da6[_0x103de9(0x1cf)],'tags':_0x523da6['tags'],'dir':_0x523da6[_0x103de9(0x1da)],'cacheDir':_0x523da6[_0x103de9(0x1d5)],'skillMdPath':_0x523da6[_0x103de9(0x1dd)],'metadataPath':_0x523da6['metadataPath'],'linkedPaths':_0x523da6['linkedPaths'],'contentHash':_0x523da6[_0x103de9(0x1d1)],'treeHash':_0x523da6['treeHash'],'pulledAt':_0x523da6[_0x103de9(0x1d0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x5871ef=a78_0x2ab9;(function(_0x4b044e,_0x245f1f){const _0x17de91=a78_0x2ab9,_0x282e0a=_0x4b044e();while(!![]){try{const _0x3e7839=-parseInt(_0x17de91(0xdb))/0x1+parseInt(_0x17de91(0xd8))/0x2*(parseInt(_0x17de91(0xea))/0x3)+parseInt(_0x17de91(0xe2))/0x4+parseInt(_0x17de91(0xe8))/0x5*(parseInt(_0x17de91(0xd9))/0x6)+-parseInt(_0x17de91(0xd0))/0x7+-parseInt(_0x17de91(0xe0))/0x8*(-parseInt(_0x17de91(0xee))/0x9)+-parseInt(_0x17de91(0xe3))/0xa;if(_0x3e7839===_0x245f1f)break;else _0x282e0a['push'](_0x282e0a['shift']());}catch(_0x47f2de){_0x282e0a['push'](_0x282e0a['shift']());}}}(a78_0x5a9c,0xa03d5));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a78_0x5871ef(0xeb),a78_0x5871ef(0xda)];function a78_0x5a9c(){const _0x3423=['9061416OJLYSi','\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','join','trim','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','includes','2jURYkJ','150tuFJXe','read','600512CBVIdw','references/runtime-contract.md','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','Unsupported\x20Skill\x20type:\x20','#\x20Output\x20Contract\x0a\x0a','8Pgojgn','\x0a\x20\x20created:\x20\x22','3848228aovuZp','2649310VHWpvU','toISOString','timestamp','references/output-contract.md','skillName','81665JqXqSP','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','496374IGFsLn','write','SKILL.md','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','11523888xkbURc','validation','.agents/skills','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','test','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。'];a78_0x5a9c=function(){return _0x3423;};return a78_0x5a9c();}export const DEFAULT_SKILL_TARGET=a78_0x5871ef(0xf0);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function a78_0x2ab9(_0x4c5f06,_0x37c5ed){_0x4c5f06=_0x4c5f06-0xcd;const _0x5a9c2c=a78_0x5a9c();let _0x2ab999=_0x5a9c2c[_0x4c5f06];return _0x2ab999;}export const RUNTIME_CONTRACT_FILE=a78_0x5871ef(0xdc);export const OUTPUT_CONTRACT_FILE=a78_0x5871ef(0xe6);export function validateSkillName(_0x31eb2a){const _0x496946=a78_0x5871ef,_0x4fe9a4=_0x31eb2a[_0x496946(0xd4)]();if(!SKILL_NAME_PATTERN[_0x496946(0xce)](_0x4fe9a4))throw CliErrors[_0x496946(0xef)]('Invalid\x20Skill\x20name:\x20'+_0x31eb2a+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x496946(0xed));return _0x4fe9a4;}export function normalizeSkillTemplateType(_0x3a1617){const _0xcbf127=a78_0x5871ef,_0x55018e=(_0x3a1617||'write')[_0xcbf127(0xd4)]()||'write';if(SKILL_TYPES[_0xcbf127(0xd7)](_0x55018e))return _0x55018e;throw CliErrors[_0xcbf127(0xef)](_0xcbf127(0xde)+_0x3a1617,'Use\x20one\x20of:\x20'+SKILL_TYPES[_0xcbf127(0xd3)](',\x20')+'.');}export function renderSkillTemplate(_0x42b14d){const _0x103619=a78_0x5871ef,_0x382427=validateSkillName(_0x42b14d[_0x103619(0xe7)]),_0x15a07c=normalizeSkillTemplateType(_0x42b14d['type']),_0x465029=_0x42b14d[_0x103619(0xe5)]??new Date()[_0x103619(0xe4)]();return{'skillName':_0x382427,'type':_0x15a07c,'files':[{'path':_0x103619(0xec),'content':renderSkillMd(_0x382427,_0x15a07c,_0x465029)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x382427,_0x15a07c)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x382427,_0x15a07c)}]};}function renderSkillMd(_0x21e0d9,_0x459580,_0x1cef5a){const _0x122ee8=a78_0x5871ef,_0x435618=typeWorkflow(_0x459580);return'---\x0aname:\x20'+_0x21e0d9+_0x122ee8(0xd1)+_0x459580+_0x122ee8(0xe1)+_0x1cef5a+_0x122ee8(0xdd)+_0x21e0d9+'\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a'+_0x435618+'\x0a\x0a'+businessStateSection(_0x459580)+_0x122ee8(0xd2);}function renderRuntimeContract(_0x47c291,_0x97368c){const _0x1f24bc=a78_0x5871ef,_0xd0feed=_0x97368c===_0x1f24bc(0xeb)?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return'#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。'+_0x47c291+_0x1f24bc(0xd5)+_0x97368c+_0x1f24bc(0xd6)+_0xd0feed+'\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a';}function renderOutputContract(_0x33aadb,_0x560105){const _0x3734dd=a78_0x5871ef,_0x5800ad=_0x560105==='write'?'write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。':_0x560105+_0x3734dd(0xe9);return _0x3734dd(0xdf)+_0x33aadb+_0x3734dd(0xcd)+_0x5800ad+'\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a';}function typeWorkflow(_0x31756d){const _0x52021a=a78_0x5871ef;if(_0x31756d==='read')return _0x52021a(0xcf);return'1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】';}function businessStateSection(_0x2692d5){if(_0x2692d5!=='write')return'';return'##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x1bac95=a59_0x3601;(function(_0x33d647,_0x1a33aa){const _0x56e6c5=a59_0x3601,_0x2a0e61=_0x33d647();while(!![]){try{const _0x65f7b5=-parseInt(_0x56e6c5(0xf2))/0x1*(parseInt(_0x56e6c5(0xe5))/0x2)+parseInt(_0x56e6c5(0xd9))/0x3+parseInt(_0x56e6c5(0xab))/0x4+parseInt(_0x56e6c5(0xb0))/0x5*(parseInt(_0x56e6c5(0xb2))/0x6)+-parseInt(_0x56e6c5(0xf6))/0x7+-parseInt(_0x56e6c5(0xc8))/0x8+parseInt(_0x56e6c5(0xd2))/0x9;if(_0x65f7b5===_0x1a33aa)break;else _0x2a0e61['push'](_0x2a0e61['shift']());}catch(_0x1cea3c){_0x2a0e61['push'](_0x2a0e61['shift']());}}}(a59_0x55db,0x87a89));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a59_0x4a4d97}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a59_0x1bac95(0xbc),SUPPORTED_SKILL_TYPES=new Set([a59_0x1bac95(0xc0),a59_0x1bac95(0xa5)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0xfe13da,_0x1b0c1b={}){const _0x1750aa=a59_0x1bac95,_0x2e8238=resolveSkillDirectoryRoot(_0xfe13da),_0x2826bc=[],_0xc5b202=loadRequiredSkillFile(_0x2e8238,_0x2826bc),_0xbdb957=_0xc5b202?parseFrontmatter(_0xc5b202[_0x1750aa(0xf5)]):{'hasFrontmatter':![]};_0xc5b202&&validateFrontmatter(_0xc5b202[_0x1750aa(0xef)],_0xbdb957,_0x2826bc);validateRuntimeCliReferences(_0x2e8238,_0x2826bc);const _0x1eec84=_0x2826bc[_0x1750aa(0x9e)](_0x31429b=>_0x31429b['level']===_0x1750aa(0xcf)),_0x1ab6f4=_0x2826bc['filter'](_0x2f7b0b=>_0x2f7b0b['level']===_0x1750aa(0xa8));return{'ok':_0x1eec84['length']===0x0,'dir':_0x2e8238,'type':_0xbdb957[_0x1750aa(0xbe)],'errors':_0x1eec84,'warnings':_0x1ab6f4};}function resolveSkillDirectoryRoot(_0x10b720){const _0xb7106=a59_0x1bac95,_0x2de223=resolve(_0x10b720);if(!existsSync(_0x2de223))throw CliErrors[_0xb7106(0x9c)](_0xb7106(0xeb)+_0x10b720);const _0x39ac4b=lstatSync(_0x2de223);if(_0x39ac4b[_0xb7106(0xf7)]())return _0x2de223;if(_0x39ac4b['isSymbolicLink']()){const _0x494d14=realpathSync(_0x2de223);if(lstatSync(_0x494d14)[_0xb7106(0xf7)]())return _0x494d14;}throw CliErrors[_0xb7106(0x9c)](_0xb7106(0xeb)+_0x10b720);}export function throwIfSkillValidationFailed(_0x53037b,_0x5da23f=![]){const _0x43e366=a59_0x1bac95;if(_0x53037b['ok'])return;const _0x1d0f07=_0x53037b[_0x43e366(0xe7)][_0x43e366(0xc6)](_0x511a1e=>{const _0x52cace=_0x43e366,_0x447766=_0x511a1e[_0x52cace(0xe4)]?'#'+_0x511a1e[_0x52cace(0xe4)]:'';return _0x511a1e['level'][_0x52cace(0xc2)]()+'\x20'+_0x511a1e['ruleId']+'\x20'+_0x511a1e[_0x52cace(0xdc)]+_0x447766+':\x20'+_0x511a1e[_0x52cace(0xb8)]+_0x52cace(0xdf)+_0x511a1e[_0x52cace(0xa6)];});throw CliErrors[_0x43e366(0x9c)](_0x43e366(0xc7)+_0x1d0f07[_0x43e366(0xd3)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function a59_0x3601(_0x304a55,_0x180cd7){_0x304a55=_0x304a55-0x9b;const _0x55db22=a59_0x55db();let _0x3601ef=_0x55db22[_0x304a55];return _0x3601ef;}function loadRequiredSkillFile(_0x5aa008,_0x47a28a){const _0x39ff8d=a59_0x1bac95,_0x3a72cd=resolve(_0x5aa008,SKILL_FILE);if(!existsSync(_0x3a72cd))return _0x47a28a[_0x39ff8d(0xf3)](issue('error',_0x39ff8d(0xa0),SKILL_FILE,_0x39ff8d(0xda),_0x39ff8d(0xcd))),undefined;const _0x1bc8a0=lstatSync(_0x3a72cd);if(_0x1bc8a0['isSymbolicLink']())return _0x47a28a['push'](issue(_0x39ff8d(0xcf),_0x39ff8d(0xa0),SKILL_FILE,_0x39ff8d(0xf0),_0x39ff8d(0xcb))),undefined;if(!_0x1bc8a0[_0x39ff8d(0xd0)]())return _0x47a28a[_0x39ff8d(0xf3)](issue(_0x39ff8d(0xcf),'structure-complete',SKILL_FILE,_0x39ff8d(0xe6),_0x39ff8d(0xd6))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3a72cd,'utf8')};}function validateFrontmatter(_0x333138,_0x3ee8a0,_0x259800){const _0x452625=a59_0x1bac95;if(!_0x3ee8a0[_0x452625(0xaf)]){_0x259800['push'](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xca),_0x452625(0xe1)));return;}!_0x3ee8a0[_0x452625(0xd8)]?.[_0x452625(0xa2)]()&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xd4),_0x452625(0xbf))),!_0x3ee8a0['displayName']?.['trim']()&&_0x259800['push'](issue(_0x452625(0xa8),_0x452625(0xaa),_0x333138,_0x452625(0xde),_0x452625(0xc9))),!_0x3ee8a0['example']?.['trim']()&&_0x259800[_0x452625(0xf3)](issue('warning',_0x452625(0xdb),_0x333138,'Frontmatter\x20example\x20is\x20missing.',_0x452625(0xe0))),!_0x3ee8a0[_0x452625(0xac)]?.[_0x452625(0xa2)]()&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0x9b),_0x333138,_0x452625(0xa7),_0x452625(0xec))),_0x3ee8a0[_0x452625(0xf4)]===!![]&&_0x259800[_0x452625(0xf3)](issue('error','internal-skill',_0x333138,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0x452625(0xdd))),_0x3ee8a0[_0x452625(0xbe)]?.[_0x452625(0xa2)]()&&!SUPPORTED_SKILL_TYPES[_0x452625(0xbd)](_0x3ee8a0[_0x452625(0xbe)])&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xb7),_0x452625(0xbb)));}function validateRuntimeCliReferences(_0x52f8e8,_0x3bef52){const _0x4d802f=a59_0x1bac95;for(const _0x363092 of findRabetbaseCliInvocations(_0x52f8e8)){_0x3bef52[_0x4d802f(0xf3)](issue(_0x4d802f(0xa8),_0x4d802f(0xad),_0x363092[_0x4d802f(0xdc)],_0x4d802f(0xa3),_0x4d802f(0xb5),'L'+_0x363092['line']));}}function findRabetbaseCliInvocations(_0x2ca8f1){const _0x3ef328=a59_0x1bac95;return scanSkillDirectory(_0x2ca8f1)[_0x3ef328(0x9e)](_0x410557=>TEXT_SKILL_FILE_PATTERN['test'](_0x410557[_0x3ef328(0xef)]))[_0x3ef328(0xe2)](_0xa022d3=>{const _0xb53967=_0x3ef328,_0x1e2fd=fileText(_0xa022d3);return _0x1e2fd[_0xb53967(0xd5)](/\r?\n/)[_0xb53967(0xc6)]((_0x5bbf0f,_0x508a40)=>({'file':_0xa022d3['path'],'line':_0x508a40+0x1,'text':_0x5bbf0f}))[_0xb53967(0x9e)](({text:_0x54ad43})=>isRabetbaseCliInvocation(_0x54ad43))[_0xb53967(0xc6)](({file:_0x5d5cfc,line:_0x252ed7})=>({'file':_0x5d5cfc,'line':_0x252ed7}));});}const RABETBASE_SUBCOMMANDS=[a59_0x1bac95(0xa4),'sql',a59_0x1bac95(0xe8),a59_0x1bac95(0x9f),a59_0x1bac95(0xc1),a59_0x1bac95(0xae),a59_0x1bac95(0xce),a59_0x1bac95(0xba),'artifact','kb',a59_0x1bac95(0xc3),a59_0x1bac95(0xa1),a59_0x1bac95(0xee),a59_0x1bac95(0xed),a59_0x1bac95(0xb3),a59_0x1bac95(0xf1)],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String['raw']`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x167782){const _0x3c3e0a=a59_0x1bac95,_0x4c90e1=_0x167782[_0x3c3e0a(0xc4)](/\brabetbase\b/i);if(_0x4c90e1<0x0)return![];const _0x3caf52=_0x167782[_0x3c3e0a(0xb1)](_0x4c90e1)[_0x3c3e0a(0xd5)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x3caf52);}function parseFrontmatter(_0x4a3634){const _0x14dad8=a59_0x1bac95,_0x406009=_0x4a3634[_0x14dad8(0xa9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x406009)return{'hasFrontmatter':![]};const _0x170c53=_0x406009[0x1]??'',_0x29b2c8={'hasFrontmatter':!![]};let _0x3da443;try{_0x3da443=a59_0x4a4d97(_0x170c53);}catch{return _0x29b2c8;}const _0x4c5acf=asRecord(_0x3da443);if(!_0x4c5acf)return _0x29b2c8;_0x29b2c8[_0x14dad8(0xd8)]=scalarToString(_0x4c5acf[_0x14dad8(0xd8)]),_0x29b2c8[_0x14dad8(0xe3)]=scalarToString(_0x4c5acf[_0x14dad8(0xe3)]),_0x29b2c8[_0x14dad8(0xac)]=scalarToString(_0x4c5acf[_0x14dad8(0xac)]),_0x29b2c8[_0x14dad8(0xe9)]=scalarToString(_0x4c5acf[_0x14dad8(0xe9)]);const _0x1ad375=asRecord(_0x4c5acf['metadata']);return _0x1ad375&&(_0x29b2c8[_0x14dad8(0xbe)]=scalarToString(_0x1ad375[_0x14dad8(0xbe)]),_0x29b2c8['internal']=scalarToBoolean(_0x1ad375['internal'])),_0x29b2c8;}function asRecord(_0x3292f8){const _0x3eeb12=a59_0x1bac95;if(_0x3292f8&&typeof _0x3292f8===_0x3eeb12(0xd7)&&!Array[_0x3eeb12(0xd1)](_0x3292f8))return _0x3292f8;return undefined;}function a59_0x55db(){const _0x1e1d4a=['toLowerCase','service','Set\x20metadata.type\x20to\x20write\x20or\x20read.','SKILL.md','has','type','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','write','project','toUpperCase','config','search','true','map','Skill\x20validation\x20failed:\x0a','3976440pQTWqq','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','SKILL.md\x20must\x20start\x20with\x20frontmatter.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','frontmatter-required','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','schema','error','isFile','isArray','9936864VfgBaG','join','Frontmatter\x20name\x20is\x20missing.','split','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','object','name','2079063GRjLKh','Missing\x20SKILL.md.','example-recommended','file','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','Frontmatter\x20displayName\x20is\x20missing.','\x20Fix:\x20','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','flatMap','displayName','section','6tEBxBf','SKILL.md\x20is\x20not\x20a\x20file.','errors','bff','example','false','Skill\x20directory\x20not\x20found:\x20','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','auth','data','path','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','registry','321579pNeBPR','push','internal','content','6925331kvqvYz','isDirectory','description-required','validation','boolean','filter','page','structure-complete','workspace','trim','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','dataset','read','suggestion','Frontmatter\x20description\x20is\x20empty.','warning','match','display-name-recommended','746776XWWrIW','description','rabetbase-cli-reference','app','hasFrontmatter','9085wgWZIH','slice','3378Cwpjup','logs','number','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','string','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','message'];a59_0x55db=function(){return _0x1e1d4a;};return a59_0x55db();}function scalarToString(_0x2de6c9){const _0x10456b=a59_0x1bac95;if(typeof _0x2de6c9==='string')return _0x2de6c9[_0x10456b(0xa2)]();if(typeof _0x2de6c9===_0x10456b(0xb4)||typeof _0x2de6c9===_0x10456b(0x9d))return String(_0x2de6c9);return undefined;}function scalarToBoolean(_0x2a9118){const _0x27c990=a59_0x1bac95;if(typeof _0x2a9118===_0x27c990(0x9d))return _0x2a9118;if(typeof _0x2a9118===_0x27c990(0xb6))return cleanBoolean(_0x2a9118);return undefined;}function cleanBoolean(_0x21303e){const _0x4fa8bb=a59_0x1bac95,_0x5bbdb1=_0x21303e[_0x4fa8bb(0xa2)]()[_0x4fa8bb(0xb9)]();if(_0x5bbdb1===_0x4fa8bb(0xc5))return!![];if(_0x5bbdb1===_0x4fa8bb(0xea))return![];return undefined;}function issue(_0x2d9694,_0x2c7ddc,_0x3e3ebc,_0x15a6be,_0x282156,_0x3e503a){return{'level':_0x2d9694,'ruleId':_0x2c7ddc,'file':_0x3e3ebc,'section':_0x3e503a,'message':_0x15a6be,'suggestion':_0x282156};}
|
|
1
|
+
const a79_0x20f1e5=a79_0x40e0;(function(_0x46601a,_0x2fbc61){const _0x51b13c=a79_0x40e0,_0x2a5bc8=_0x46601a();while(!![]){try{const _0x33f9ef=-parseInt(_0x51b13c(0xf5))/0x1+parseInt(_0x51b13c(0xf7))/0x2*(-parseInt(_0x51b13c(0x12c))/0x3)+parseInt(_0x51b13c(0xfb))/0x4+-parseInt(_0x51b13c(0xe7))/0x5*(parseInt(_0x51b13c(0x134))/0x6)+parseInt(_0x51b13c(0x133))/0x7+parseInt(_0x51b13c(0x13a))/0x8*(parseInt(_0x51b13c(0x11c))/0x9)+-parseInt(_0x51b13c(0x106))/0xa;if(_0x33f9ef===_0x2fbc61)break;else _0x2a5bc8['push'](_0x2a5bc8['shift']());}catch(_0x4d10ed){_0x2a5bc8['push'](_0x2a5bc8['shift']());}}}(a79_0x58e4,0xe0028));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a79_0x189bc7}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';function a79_0x40e0(_0x165974,_0x554b0d){_0x165974=_0x165974-0xde;const _0x58e408=a79_0x58e4();let _0x40e0e0=_0x58e408[_0x165974];return _0x40e0e0;}function a79_0x58e4(){const _0x56313d=['true','app','workspace','config','sql','filter','string','object','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','3033870qbAGps','hasFrontmatter','displayName','description','error','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','has','toUpperCase','logs','match','Skill\x20validation\x20failed:\x0a','type','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','search','isSymbolicLink','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','registry','SKILL.md','metadata','structure-complete','name','trim','12335499zuBqEG','join','raw','map','path','split','Missing\x20SKILL.md.','Set\x20metadata.type\x20to\x20write\x20or\x20read.','line','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','test','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','Skill\x20directory\x20not\x20found:\x20','push','toLowerCase','warning','3734997nhemGY','rabetbase-cli-reference','auth','project','bff','write','number','7349335qAwapi','216HJpfNF','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','artifact','description-required','internal','message','8DACAdV','SKILL.md\x20is\x20not\x20a\x20file.','example','dataset','read','Frontmatter\x20name\x20is\x20missing.','content','Frontmatter\x20displayName\x20is\x20missing.','section','\x20Fix:\x20','26985ctDIUo','Frontmatter\x20example\x20is\x20missing.','isFile','isDirectory','level','validation','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','internal-skill','flatMap','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','frontmatter-required','service','boolean','186549eQVBDd','false','2fRoUyj','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Frontmatter\x20description\x20is\x20empty.','ruleId','1705020bORUSE'];a79_0x58e4=function(){return _0x56313d;};return a79_0x58e4();}const SKILL_FILE=a79_0x20f1e5(0x117),SUPPORTED_SKILL_TYPES=new Set([a79_0x20f1e5(0x131),a79_0x20f1e5(0xe1)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0xd434ca,_0x33d5b6={}){const _0x53725d=a79_0x20f1e5,_0x587a1a=resolveSkillDirectoryRoot(_0xd434ca),_0x71fdbd=[],_0x23ea0f=loadRequiredSkillFile(_0x587a1a,_0x71fdbd),_0x5f48d0=_0x23ea0f?parseFrontmatter(_0x23ea0f[_0x53725d(0xe3)]):{'hasFrontmatter':![]};_0x23ea0f&&validateFrontmatter(_0x23ea0f[_0x53725d(0x120)],_0x5f48d0,_0x71fdbd);validateRuntimeCliReferences(_0x587a1a,_0x71fdbd);const _0x1cd12e=_0x71fdbd[_0x53725d(0x101)](_0x2e216b=>_0x2e216b[_0x53725d(0xeb)]===_0x53725d(0x10a)),_0x47ad09=_0x71fdbd['filter'](_0x20da46=>_0x20da46[_0x53725d(0xeb)]===_0x53725d(0x12b));return{'ok':_0x1cd12e['length']===0x0,'dir':_0x587a1a,'type':_0x5f48d0[_0x53725d(0x111)],'errors':_0x1cd12e,'warnings':_0x47ad09};}function resolveSkillDirectoryRoot(_0x4f526c){const _0x5ebd48=a79_0x20f1e5,_0x5eec70=resolve(_0x4f526c);if(!existsSync(_0x5eec70))throw CliErrors[_0x5ebd48(0xec)](_0x5ebd48(0x128)+_0x4f526c);const _0x1aa908=lstatSync(_0x5eec70);if(_0x1aa908[_0x5ebd48(0xea)]())return _0x5eec70;if(_0x1aa908[_0x5ebd48(0x114)]()){const _0x3c6859=realpathSync(_0x5eec70);if(lstatSync(_0x3c6859)[_0x5ebd48(0xea)]())return _0x3c6859;}throw CliErrors['validation'](_0x5ebd48(0x128)+_0x4f526c);}export function throwIfSkillValidationFailed(_0x45c2aa,_0x9ea48d=![]){const _0x38f06e=a79_0x20f1e5;if(_0x45c2aa['ok'])return;const _0x303241=_0x45c2aa['errors'][_0x38f06e(0x11f)](_0x5cf657=>{const _0xab7cdb=_0x38f06e,_0x4b38bb=_0x5cf657[_0xab7cdb(0xe5)]?'#'+_0x5cf657['section']:'';return _0x5cf657[_0xab7cdb(0xeb)][_0xab7cdb(0x10d)]()+'\x20'+_0x5cf657[_0xab7cdb(0xfa)]+'\x20'+_0x5cf657['file']+_0x4b38bb+':\x20'+_0x5cf657[_0xab7cdb(0x139)]+_0xab7cdb(0xe6)+_0x5cf657['suggestion'];});throw CliErrors[_0x38f06e(0xec)](_0x38f06e(0x110)+_0x303241[_0x38f06e(0x11d)]('\x0a'),_0x38f06e(0x127));}function loadRequiredSkillFile(_0x5b9dd5,_0x6684ed){const _0x53bdcf=a79_0x20f1e5,_0x1fc3a7=resolve(_0x5b9dd5,SKILL_FILE);if(!existsSync(_0x1fc3a7))return _0x6684ed['push'](issue('error',_0x53bdcf(0x119),SKILL_FILE,_0x53bdcf(0x122),_0x53bdcf(0xf1))),undefined;const _0x155f71=lstatSync(_0x1fc3a7);if(_0x155f71[_0x53bdcf(0x114)]())return _0x6684ed[_0x53bdcf(0x129)](issue(_0x53bdcf(0x10a),_0x53bdcf(0x119),SKILL_FILE,_0x53bdcf(0x115),_0x53bdcf(0x10b))),undefined;if(!_0x155f71[_0x53bdcf(0xe9)]())return _0x6684ed['push'](issue(_0x53bdcf(0x10a),_0x53bdcf(0x119),SKILL_FILE,_0x53bdcf(0xde),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x1fc3a7,'utf8')};}function validateFrontmatter(_0x32b03b,_0x186c6c,_0x56f0b9){const _0x34f98d=a79_0x20f1e5;if(!_0x186c6c[_0x34f98d(0x107)]){_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x10a),_0x34f98d(0xf2),_0x32b03b,'SKILL.md\x20must\x20start\x20with\x20frontmatter.',_0x34f98d(0x105)));return;}!_0x186c6c['name']?.[_0x34f98d(0x11b)]()&&_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x10a),_0x34f98d(0xf2),_0x32b03b,_0x34f98d(0xe2),_0x34f98d(0xf0))),!_0x186c6c['displayName']?.[_0x34f98d(0x11b)]()&&_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x12b),'display-name-recommended',_0x32b03b,_0x34f98d(0xe4),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x186c6c[_0x34f98d(0xdf)]?.['trim']()&&_0x56f0b9[_0x34f98d(0x129)](issue('warning','example-recommended',_0x32b03b,_0x34f98d(0xe8),'Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x186c6c[_0x34f98d(0x109)]?.['trim']()&&_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x10a),_0x34f98d(0x137),_0x32b03b,_0x34f98d(0xf9),_0x34f98d(0xed))),_0x186c6c[_0x34f98d(0x138)]===!![]&&_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x10a),_0x34f98d(0xee),_0x32b03b,_0x34f98d(0xf8),_0x34f98d(0x112))),_0x186c6c[_0x34f98d(0x111)]?.['trim']()&&!SUPPORTED_SKILL_TYPES[_0x34f98d(0x10c)](_0x186c6c[_0x34f98d(0x111)])&&_0x56f0b9[_0x34f98d(0x129)](issue(_0x34f98d(0x10a),_0x34f98d(0xf2),_0x32b03b,_0x34f98d(0x104),_0x34f98d(0x123)));}function validateRuntimeCliReferences(_0x46e6eb,_0x50243d){const _0x20f7b3=a79_0x20f1e5;for(const _0x4f0c14 of findRabetbaseCliInvocations(_0x46e6eb)){_0x50243d[_0x20f7b3(0x129)](issue(_0x20f7b3(0x12b),_0x20f7b3(0x12d),_0x4f0c14['file'],_0x20f7b3(0x135),_0x20f7b3(0x125),'L'+_0x4f0c14[_0x20f7b3(0x124)]));}}function findRabetbaseCliInvocations(_0x14e4b4){const _0x1773c3=a79_0x20f1e5;return scanSkillDirectory(_0x14e4b4)[_0x1773c3(0x101)](_0x3da6b1=>TEXT_SKILL_FILE_PATTERN['test'](_0x3da6b1[_0x1773c3(0x120)]))[_0x1773c3(0xef)](_0x22be58=>{const _0x13e8b7=_0x1773c3,_0x10f8c6=fileText(_0x22be58);return _0x10f8c6[_0x13e8b7(0x121)](/\r?\n/)['map']((_0xeabbe2,_0x3c942c)=>({'file':_0x22be58[_0x13e8b7(0x120)],'line':_0x3c942c+0x1,'text':_0xeabbe2}))[_0x13e8b7(0x101)](({text:_0x151448})=>isRabetbaseCliInvocation(_0x151448))[_0x13e8b7(0x11f)](({file:_0x5c9f75,line:_0x5c6aa9})=>({'file':_0x5c9f75,'line':_0x5c6aa9}));});}const RABETBASE_SUBCOMMANDS=[a79_0x20f1e5(0xe0),a79_0x20f1e5(0x100),a79_0x20f1e5(0x130),'page',a79_0x20f1e5(0x12f),a79_0x20f1e5(0xfd),'schema',a79_0x20f1e5(0xf3),a79_0x20f1e5(0x136),'kb',a79_0x20f1e5(0xff),a79_0x20f1e5(0xfe),'data',a79_0x20f1e5(0x12e),a79_0x20f1e5(0x10e),a79_0x20f1e5(0x116)],RABETBASE_INVOCATION=new RegExp(String[a79_0x20f1e5(0x11e)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a79_0x20f1e5(0x11d)]('|')})\b`+String[a79_0x20f1e5(0x11e)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x1131fb){const _0x49a035=a79_0x20f1e5,_0xbb13ee=_0x1131fb[_0x49a035(0x113)](/\brabetbase\b/i);if(_0xbb13ee<0x0)return![];const _0xdd2a2=_0x1131fb['slice'](_0xbb13ee)[_0x49a035(0x121)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x49a035(0x126)](_0xdd2a2);}function parseFrontmatter(_0x344a37){const _0x14144c=a79_0x20f1e5,_0xdd519e=_0x344a37[_0x14144c(0x10f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xdd519e)return{'hasFrontmatter':![]};const _0x4bd05b=_0xdd519e[0x1]??'',_0xb5d0c1={'hasFrontmatter':!![]};let _0x55c876;try{_0x55c876=a79_0x189bc7(_0x4bd05b);}catch{return _0xb5d0c1;}const _0x248770=asRecord(_0x55c876);if(!_0x248770)return _0xb5d0c1;_0xb5d0c1[_0x14144c(0x11a)]=scalarToString(_0x248770[_0x14144c(0x11a)]),_0xb5d0c1[_0x14144c(0x108)]=scalarToString(_0x248770[_0x14144c(0x108)]),_0xb5d0c1[_0x14144c(0x109)]=scalarToString(_0x248770[_0x14144c(0x109)]),_0xb5d0c1['example']=scalarToString(_0x248770['example']);const _0x576abe=asRecord(_0x248770[_0x14144c(0x118)]);return _0x576abe&&(_0xb5d0c1[_0x14144c(0x111)]=scalarToString(_0x576abe[_0x14144c(0x111)]),_0xb5d0c1[_0x14144c(0x138)]=scalarToBoolean(_0x576abe['internal'])),_0xb5d0c1;}function asRecord(_0x3a7d35){const _0x300210=a79_0x20f1e5;if(_0x3a7d35&&typeof _0x3a7d35===_0x300210(0x103)&&!Array['isArray'](_0x3a7d35))return _0x3a7d35;return undefined;}function scalarToString(_0x4c1024){const _0x2ac89f=a79_0x20f1e5;if(typeof _0x4c1024===_0x2ac89f(0x102))return _0x4c1024[_0x2ac89f(0x11b)]();if(typeof _0x4c1024===_0x2ac89f(0x132)||typeof _0x4c1024===_0x2ac89f(0xf4))return String(_0x4c1024);return undefined;}function scalarToBoolean(_0x3c52fa){const _0x83484f=a79_0x20f1e5;if(typeof _0x3c52fa===_0x83484f(0xf4))return _0x3c52fa;if(typeof _0x3c52fa===_0x83484f(0x102))return cleanBoolean(_0x3c52fa);return undefined;}function cleanBoolean(_0x20691e){const _0x35ca1d=a79_0x20f1e5,_0xf99b6b=_0x20691e[_0x35ca1d(0x11b)]()[_0x35ca1d(0x12a)]();if(_0xf99b6b===_0x35ca1d(0xfc))return!![];if(_0xf99b6b===_0x35ca1d(0xf6))return![];return undefined;}function issue(_0x73472a,_0x113382,_0x219c48,_0x22ce9b,_0xba3b57,_0x38d2cd){return{'level':_0x73472a,'ruleId':_0x113382,'file':_0x219c48,'section':_0x38d2cd,'message':_0x22ce9b,'suggestion':_0xba3b57};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x5f1d28=a80_0x3dbb;function a80_0x561b(){const _0xa6d076=['sqlContent','399VAbNxC','1462844IoKjpJ','sql','18909qMeeri','sqlName','7ndnKTv','144jIbdlD','read','str','5870360CjZJYj','1095385UpUcwZ','dbId','2892498sjfUIA','1614hruSaQ','6JEbbFK','appCode','74493MdaRyE','sqlCode','4584pAAFuT','detail'];a80_0x561b=function(){return _0xa6d076;};return a80_0x561b();}function a80_0x3dbb(_0x163305,_0x2497b2){_0x163305=_0x163305-0xc7;const _0x561bd9=a80_0x561b();let _0x3dbb05=_0x561bd9[_0x163305];return _0x3dbb05;}(function(_0x1fca9a,_0x53853d){const _0x36b168=a80_0x3dbb,_0x4ceca7=_0x1fca9a();while(!![]){try{const _0x5cd6f3=parseInt(_0x36b168(0xd0))/0x1*(parseInt(_0x36b168(0xc8))/0x2)+-parseInt(_0x36b168(0xc9))/0x3*(-parseInt(_0x36b168(0xd1))/0x4)+parseInt(_0x36b168(0xda))/0x5+parseInt(_0x36b168(0xc7))/0x6*(-parseInt(_0x36b168(0xd5))/0x7)+parseInt(_0x36b168(0xd6))/0x8*(-parseInt(_0x36b168(0xcb))/0x9)+parseInt(_0x36b168(0xd9))/0xa+-parseInt(_0x36b168(0xd3))/0xb*(parseInt(_0x36b168(0xcd))/0xc);if(_0x5cd6f3===_0x53853d)break;else _0x4ceca7['push'](_0x4ceca7['shift']());}catch(_0x52820e){_0x4ceca7['push'](_0x4ceca7['shift']());}}}(a80_0x561b,0x8b999));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a80_0x5f1d28(0xd2),'command':a80_0x5f1d28(0xce),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a80_0x5f1d28(0xd7),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x258b8f){const _0x4b08f7=a80_0x5f1d28,_0x2d2a56=await getSqlQueryInfo(_0x258b8f['appCode'],_0x258b8f[_0x4b08f7(0xd8)]('sqlcode')),_0x81c086=_0x258b8f['bool']('verbose');if(_0x81c086)return{'ok':!![],'data':_0x2d2a56};const _0x27e513=_0x2d2a56[_0x4b08f7(0xdb)]?await getDbName(_0x258b8f[_0x4b08f7(0xca)],_0x2d2a56[_0x4b08f7(0xdb)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x2d2a56[_0x4b08f7(0xcc)],'sqlName':_0x2d2a56[_0x4b08f7(0xd4)],'db':_0x27e513?_0x27e513+'\x20('+_0x2d2a56['dbId']+')':_0x2d2a56['dbId']??'','sqlContent':_0x2d2a56[_0x4b08f7(0xcf)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x350335=a81_0x2cb7;function a81_0x2a64(){const _0x8ebd49=['str','10joHebt','537148HrHbsq','786773ELHBBP','2400topZFB','4385943iGiGcA','13385RCYabP','2299801amJLtC','\x20row(s)\x20in\x20','now','44440UTfTlC','read','330CSSSsW','sqlcode','2cOOoYv','execSuccess','18rxxrQw','8dzOxUC','length','params','execResult','sql','17878TCrcQW','Returned\x20','22633zNUNSk','isArray'];a81_0x2a64=function(){return _0x8ebd49;};return a81_0x2a64();}(function(_0x53957d,_0x2dd864){const _0x493be0=a81_0x2cb7,_0x320cc2=_0x53957d();while(!![]){try{const _0x38c5ad=-parseInt(_0x493be0(0x18d))/0x1*(-parseInt(_0x493be0(0x198))/0x2)+parseInt(_0x493be0(0x19a))/0x3*(-parseInt(_0x493be0(0x18c))/0x4)+-parseInt(_0x493be0(0x190))/0x5*(parseInt(_0x493be0(0x196))/0x6)+-parseInt(_0x493be0(0x191))/0x7*(parseInt(_0x493be0(0x181))/0x8)+-parseInt(_0x493be0(0x18f))/0x9*(parseInt(_0x493be0(0x18b))/0xa)+parseInt(_0x493be0(0x194))/0xb*(-parseInt(_0x493be0(0x18e))/0xc)+parseInt(_0x493be0(0x188))/0xd*(parseInt(_0x493be0(0x186))/0xe);if(_0x38c5ad===_0x2dd864)break;else _0x320cc2['push'](_0x320cc2['shift']());}catch(_0xed77f2){_0x320cc2['push'](_0x320cc2['shift']());}}}(a81_0x2a64,0x69c33));import{executeSdkSql}from'../../core/sdk-client.js';function a81_0x2cb7(_0x2025d6,_0x3227fb){_0x2025d6=_0x2025d6-0x181;const _0x2a64bd=a81_0x2a64();let _0x2cb7d1=_0x2a64bd[_0x2025d6];return _0x2cb7d1;}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a81_0x350335(0x185),'command':'exec','description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a81_0x350335(0x195),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x15b663){const _0x26b568=a81_0x350335,_0x1a3b68=parseJsonParams(_0x15b663[_0x26b568(0x18a)](_0x26b568(0x183))),_0x501c9d=Date['now'](),_0x113681=await executeSdkSql(_0x15b663[_0x26b568(0x18a)](_0x26b568(0x197)),_0x1a3b68),_0x476222=Date[_0x26b568(0x193)]()-_0x501c9d,_0x25e68b=_0x113681?.[_0x26b568(0x184)]??_0x113681,_0x3130c6=_0x113681?.[_0x26b568(0x199)]??!![];if(!_0x3130c6)return{'ok':![],'data':{'error':_0x113681?.['execError']||'SQL\x20execution\x20failed','elapsed':_0x476222},'message':'SQL\x20execution\x20failed'};const _0x5e0741=Array[_0x26b568(0x189)](_0x25e68b)?_0x25e68b:[];return{'ok':!![],'data':{'rows':_0x5e0741,'rowCount':_0x5e0741[_0x26b568(0x182)],'elapsed':_0x476222},'message':_0x26b568(0x187)+_0x5e0741['length']+_0x26b568(0x192)+_0x476222+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb6e778,_0x13cc03){const _0x2aeca6=a82_0x433c,_0x1643b2=_0xb6e778();while(!![]){try{const _0x486463=parseInt(_0x2aeca6(0xfa))/0x1+-parseInt(_0x2aeca6(0xf8))/0x2*(parseInt(_0x2aeca6(0xf7))/0x3)+parseInt(_0x2aeca6(0xfb))/0x4+-parseInt(_0x2aeca6(0xf6))/0x5*(parseInt(_0x2aeca6(0xf5))/0x6)+-parseInt(_0x2aeca6(0xf2))/0x7+-parseInt(_0x2aeca6(0xf3))/0x8+-parseInt(_0x2aeca6(0xf4))/0x9*(-parseInt(_0x2aeca6(0xf9))/0xa);if(_0x486463===_0x13cc03)break;else _0x1643b2['push'](_0x1643b2['shift']());}catch(_0x4965e3){_0x1643b2['push'](_0x1643b2['shift']());}}}(a82_0x3c81,0x82d93));import{sqlDetail}from'../../commands/sql/detail.js';function a82_0x3c81(){const _0x1c7dcd=['109404dkZpaN','50uzMbyA','4629TAsHlL','730iWJcJj','23873770JxjvGw','551269osRIJn','847308YeihSs','6800115NyJffV','7180304SymrYw','9UsoUzj'];a82_0x3c81=function(){return _0x1c7dcd;};return a82_0x3c81();}import{sqlExec}from'../../commands/sql/exec.js';function a82_0x433c(_0x5db307,_0x4d0c38){_0x5db307=_0x5db307-0xf2;const _0x3c8191=a82_0x3c81();let _0x433c7a=_0x3c8191[_0x5db307];return _0x433c7a;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x5e6f61=a83_0xaf46;(function(_0x57241a,_0x514025){const _0x421ca1=a83_0xaf46,_0x41bbe7=_0x57241a();while(!![]){try{const _0xdd8e42=parseInt(_0x421ca1(0x1cc))/0x1*(-parseInt(_0x421ca1(0x1d7))/0x2)+-parseInt(_0x421ca1(0x1f1))/0x3*(parseInt(_0x421ca1(0x212))/0x4)+parseInt(_0x421ca1(0x1d4))/0x5+parseInt(_0x421ca1(0x210))/0x6+-parseInt(_0x421ca1(0x1ea))/0x7*(parseInt(_0x421ca1(0x20e))/0x8)+parseInt(_0x421ca1(0x211))/0x9+parseInt(_0x421ca1(0x1cb))/0xa*(parseInt(_0x421ca1(0x1c7))/0xb);if(_0xdd8e42===_0x514025)break;else _0x41bbe7['push'](_0x41bbe7['shift']());}catch(_0x3b0c48){_0x41bbe7['push'](_0x41bbe7['shift']());}}}(a83_0x3c97,0x5ef5d));import{spawnSync}from'node:child_process';import a83_0x17e629 from'semver';function a83_0x3c97(){const _0x46c061=['\x20is\x20current.',']:\x20','object','Update\x20failed:\x20','inherit','valid','reason','stderr','log','validation','nonInteractive','Install\x20a\x20specific\x20CLI\x20version','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','map','str','Already\x20on\x20requested\x20version\x20(v','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','/-/package/','npm','message','current','Checking\x20CLI\x20Built-in\x20Skill...','4762664FCZYdY','pipe','386490NBzlEB','4991130VFJfPa','6568OKhphc','INSTALL_FAILED','77AyTWFO','stdout','/dist-tags','update','1147990hFOsng','1EDuhhZ','Current\x20version:\x20','find','source','warn','skillVersion','trim','\x20->\x20','2123740eCKChg','boolean','beta','1407524QtSXOY','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Version\x20comparison\x20failed:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','Updating\x20','\x20\x20Run\x20manually:\x20','code','length','filter','error','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','join','status','unknown','version','repairCommand','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bool','7BJLvDU','latest','install','entries','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','json','291jRpRZA','state','fromEntries','toString','exit\x20','Checking\x20npm\x20dist-tags...','timeout'];a83_0x3c97=function(){return _0x46c061;};return a83_0x3c97();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';function a83_0xaf46(_0x255a5b,_0x5897be){_0x255a5b=_0x255a5b-0x1c6;const _0x3c978c=a83_0x3c97();let _0xaf467e=_0x3c978c[_0x255a5b];return _0xaf467e;}const updateFlags=[{'name':a83_0x5e6f61(0x1eb),'type':a83_0x5e6f61(0x1d5),'description':a83_0x5e6f61(0x204),'default':![]},{'name':a83_0x5e6f61(0x1d6),'type':a83_0x5e6f61(0x1d5),'description':a83_0x5e6f61(0x1e2),'default':![]},{'name':a83_0x5e6f61(0x1e6),'type':'string','description':a83_0x5e6f61(0x203)}];function getRequestedVersion(_0x2066e2){const _0x1fda0f=a83_0x5e6f61,_0x52b830=_0x2066e2[_0x1fda0f(0x206)]('version')[_0x1fda0f(0x1d2)]();if(_0x52b830)return _0x52b830;return String(_0x2066e2['args']?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x4a4be7){const _0x35a1af=a83_0x5e6f61,_0x266954=getRequestedVersion(_0x4a4be7),_0x1bfc9f=[_0x4a4be7[_0x35a1af(0x1e9)]('latest')?'latest':'',_0x4a4be7[_0x35a1af(0x1e9)]('beta')?_0x35a1af(0x1d6):'',_0x266954?_0x35a1af(0x1e6):''][_0x35a1af(0x1e0)](Boolean);if(_0x1bfc9f[_0x35a1af(0x1df)]>0x1)throw CliErrors[_0x35a1af(0x201)](_0x35a1af(0x1ef),_0x35a1af(0x1d8));if(_0x266954&&!a83_0x17e629[_0x35a1af(0x1fd)](_0x266954))throw CliErrors[_0x35a1af(0x201)]('Invalid\x20version:\x20'+_0x266954,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x2e802f=a83_0x5e6f61;try{const _0x3d77d3=NPM_REGISTRY_BASE_URL+_0x2e802f(0x209)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x2e802f(0x1c9),_0x2045e0=await fetch(_0x3d77d3,{'signal':AbortSignal[_0x2e802f(0x1f7)](0x2710)});if(!_0x2045e0['ok'])return null;const _0x3b72be=await _0x2045e0[_0x2e802f(0x1f0)]();if(!_0x3b72be||typeof _0x3b72be!==_0x2e802f(0x1fa))return null;return Object[_0x2e802f(0x1f3)](Object[_0x2e802f(0x1ed)](_0x3b72be)['filter'](([,_0x4608ac])=>typeof _0x4608ac==='string'&&_0x4608ac[_0x2e802f(0x1d2)]())[_0x2e802f(0x205)](([_0xccf13b,_0x5a3403])=>[_0xccf13b,String(_0x5a3403)[_0x2e802f(0x1d2)]()]));}catch{return null;}}async function resolveTargetVersion(_0x44cbf1){const _0x33f892=a83_0x5e6f61,_0x43f189=getRequestedVersion(_0x44cbf1);if(_0x43f189)return{'version':_0x43f189,'source':_0x33f892(0x1e6)};const _0x3f76b6=_0x44cbf1['bool'](_0x33f892(0x1d6))?_0x33f892(0x1d6):_0x33f892(0x1eb),_0x39b843=await fetchNpmDistTags(),_0x1ec404=_0x39b843?.[_0x3f76b6];if(!_0x1ec404)return null;return{'version':_0x1ec404,'source':_0x3f76b6};}function shouldInstallTarget(_0x4ef82c,_0x18e007){const _0xcbe6b3=a83_0x5e6f61;if(_0x18e007[_0xcbe6b3(0x1cf)]===_0xcbe6b3(0x1e6)||_0x18e007[_0xcbe6b3(0x1cf)]==='beta')return!a83_0x17e629['eq'](_0x4ef82c,_0x18e007[_0xcbe6b3(0x1e6)]);return a83_0x17e629['lt'](_0x4ef82c,_0x18e007[_0xcbe6b3(0x1e6)]);}function installCliPackage(_0x2a9b17,_0x52773f){const _0x344df1=a83_0x5e6f61,_0x186e9f=resolveNpmBin(_0x344df1(0x20a)),_0x11929f=[_0x344df1(0x1ec),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2a9b17];console[_0x344df1(0x200)]('*\x20'+[_0x186e9f,..._0x11929f][_0x344df1(0x1e3)]('\x20'));const _0x4910d6=spawnSync(_0x186e9f,_0x11929f,{'cwd':process['cwd'](),'stdio':_0x52773f?_0x344df1(0x20f):_0x344df1(0x1fc),'env':process.env,'shell':![]});if(_0x4910d6['status']===0x0)return{'ok':!![]};let _0x256dff=_0x4910d6['error']?.[_0x344df1(0x20b)]||_0x344df1(0x1f5)+(_0x4910d6[_0x344df1(0x1e4)]??_0x344df1(0x1e5));if(_0x52773f){const _0x3ccb73=_0x4910d6['stderr']?_0x4910d6[_0x344df1(0x1ff)][_0x344df1(0x1f4)]()[_0x344df1(0x1d2)]():'',_0x2f4dc9=_0x4910d6[_0x344df1(0x1c8)]?_0x4910d6[_0x344df1(0x1c8)][_0x344df1(0x1f4)]()['trim']():'';if(_0x3ccb73)_0x256dff=_0x3ccb73;else{if(_0x2f4dc9)_0x256dff=_0x2f4dc9;}}return{'ok':![],'error':_0x256dff};}function repairCurrentBuiltinSkill(_0x5dbda5){const _0x5ee415=a83_0x5e6f61;console[_0x5ee415(0x200)](_0x5ee415(0x20d));const _0x4bf2f4=installBuiltinSkill({'stdio':_0x5dbda5?_0x5ee415(0x20f):_0x5ee415(0x1fc)});if(_0x4bf2f4['ok'])return console['log'](_0x5ee415(0x1db)+_0x4bf2f4[_0x5ee415(0x1d1)]+_0x5ee415(0x1f8)),!![];return console[_0x5ee415(0x1d0)](_0x5ee415(0x1ee)+(_0x4bf2f4[_0x5ee415(0x1de)]||_0x5ee415(0x1c6))+_0x5ee415(0x1f9)+(_0x4bf2f4[_0x5ee415(0x1e1)]||_0x5ee415(0x1e5))),console[_0x5ee415(0x200)](_0x5ee415(0x1dd)+_0x4bf2f4[_0x5ee415(0x1e7)]),![];}function verifyUpdatedBuiltinSkill(_0x1addce){const _0x398072=a83_0x5e6f61;console['log'](_0x398072(0x20d));const _0x1a134e=inspectInstalledBuiltinSkillVersion(_0x1addce);if(_0x1a134e[_0x398072(0x1f2)]===_0x398072(0x20c))return console[_0x398072(0x200)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1addce+_0x398072(0x1f8)),!![];console[_0x398072(0x1d0)](_0x398072(0x1d9)+_0x1a134e[_0x398072(0x1f2)]+'.');if(_0x1a134e['reason'])console['warn']('\x20\x20'+_0x1a134e[_0x398072(0x1fe)]);return console['log']('\x20\x20Run\x20manually:\x20'+_0x1a134e[_0x398072(0x1e7)]),![];}async function execute(_0x14344b){const _0x1c9565=a83_0x5e6f61;await validateUpdateFlags(_0x14344b);const _0x29cac6=getCliVersion();console[_0x1c9565(0x200)](_0x1c9565(0x1cd)+_0x29cac6),console[_0x1c9565(0x200)](_0x1c9565(0x1f6));const _0x4c0119=await resolveTargetVersion(_0x14344b);if(!_0x4c0119){const _0x4ec765=_0x14344b[_0x1c9565(0x1e9)](_0x1c9565(0x1d6))?_0x1c9565(0x1d6):'latest',_0x1dbdb7='Unable\x20to\x20resolve\x20'+_0x4ec765+'\x20version\x20from\x20npm.';return console[_0x1c9565(0x1d0)](_0x1dbdb7),console[_0x1c9565(0x200)](_0x1c9565(0x208)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4ec765),{'ok':![]};}const _0x451fbe=[_0x29cac6,_0x4c0119['version']][_0x1c9565(0x1ce)](_0x145ae6=>!a83_0x17e629['valid'](_0x145ae6));if(_0x451fbe)return console[_0x1c9565(0x1d0)](_0x1c9565(0x1da)+_0x451fbe+'.'),{'ok':![]};if(!shouldInstallTarget(_0x29cac6,_0x4c0119)){const _0x459b6a=_0x4c0119[_0x1c9565(0x1cf)]==='version'?_0x1c9565(0x207)+_0x4c0119[_0x1c9565(0x1e6)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x4c0119[_0x1c9565(0x1e6)]+').';return console[_0x1c9565(0x200)](_0x459b6a),{'ok':repairCurrentBuiltinSkill(_0x14344b['nonInteractive'])};}console[_0x1c9565(0x200)](_0x1c9565(0x1dc)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x29cac6+_0x1c9565(0x1d3)+_0x4c0119[_0x1c9565(0x1e6)]);const _0x52ed9f=installCliPackage(_0x4c0119[_0x1c9565(0x1e6)],_0x14344b[_0x1c9565(0x202)]);if(!_0x52ed9f['ok']){const _0x32fe41=_0x1c9565(0x1fb)+(_0x52ed9f[_0x1c9565(0x1e1)]||_0x1c9565(0x1e5));return console[_0x1c9565(0x1e1)](_0x32fe41),console[_0x1c9565(0x200)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4c0119[_0x1c9565(0x1e6)]),{'ok':![]};}return console[_0x1c9565(0x200)]('Updated\x20to\x20v'+_0x4c0119[_0x1c9565(0x1e6)]+'.'),console['log'](_0x1c9565(0x1e8)),{'ok':verifyUpdatedBuiltinSkill(_0x4c0119[_0x1c9565(0x1e6)])};}export const updateDefinition={'service':a83_0x5e6f61(0x1ca),'command':'run','description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+'\x20CLI','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a84_0x4c0f(_0x275a96,_0x401b0f){_0x275a96=_0x275a96-0xcc;const _0x15cbd4=a84_0x15cb();let _0x4c0fbc=_0x15cbd4[_0x275a96];return _0x4c0fbc;}const a84_0xbf0e20=a84_0x4c0f;function a84_0x15cb(){const _0x522478=['将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','1610919dKVJYH','user-account','1256115ioBaev','Pass\x20one\x20of:\x20','16aKCHgr','External\x20account\x20provider','apiError','POST','23086740fyeJrK','5149980jxVXTP','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','--account-id\x20cannot\x20be\x20empty.','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','7502022TUNGdG','write','External\x20account\x20binding\x20was\x20not\x20confirmed.','provider','string','account-id','toLowerCase','str','50769FtXzIv','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','trim','bind','1619555utIuba','16NsvzFQ','58tfpLYf'];a84_0x15cb=function(){return _0x522478;};return a84_0x15cb();}(function(_0xbd428f,_0xf2620f){const _0x1e5d05=a84_0x4c0f,_0x5369e1=_0xbd428f();while(!![]){try{const _0x3e9892=-parseInt(_0x1e5d05(0xdf))/0x1+-parseInt(_0x1e5d05(0xdd))/0x2*(-parseInt(_0x1e5d05(0xd6))/0x3)+parseInt(_0x1e5d05(0xdc))/0x4*(parseInt(_0x1e5d05(0xe1))/0x5)+-parseInt(_0x1e5d05(0xe8))/0x6+-parseInt(_0x1e5d05(0xdb))/0x7*(-parseInt(_0x1e5d05(0xe3))/0x8)+-parseInt(_0x1e5d05(0xce))/0x9+parseInt(_0x1e5d05(0xe7))/0xa;if(_0x3e9892===_0xf2620f)break;else _0x5369e1['push'](_0x5369e1['shift']());}catch(_0x25b791){_0x5369e1['push'](_0x5369e1['shift']());}}}(a84_0x15cb,0xeb6a0));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a84_0xbf0e20(0xcd),SUPPORTED_PROVIDERS=['dingtalk'];function readBindingInput(_0x5b6ea3){const _0x3e5f79=a84_0xbf0e20,_0x2db87c=_0x5b6ea3[_0x3e5f79(0xd5)](_0x3e5f79(0xd1))[_0x3e5f79(0xd9)]()[_0x3e5f79(0xd4)]();if(!SUPPORTED_PROVIDERS['includes'](_0x2db87c))throw CliErrors['validation']('Unsupported\x20provider:\x20'+(_0x2db87c||'(empty)')+'.',_0x3e5f79(0xe2)+SUPPORTED_PROVIDERS['join'](',\x20')+'.');const _0x60d9da=_0x5b6ea3[_0x3e5f79(0xd5)](_0x3e5f79(0xd3))['trim']();if(!_0x60d9da)throw CliErrors['validation'](_0x3e5f79(0xcc),_0x3e5f79(0xea));return{'provider':_0x2db87c,'accountId':_0x60d9da};}function buildBindingData(_0x5e5ecb,_0x1b3ff1,_0x11ea1a){const _0x1238c9=a84_0xbf0e20;return{'operation':_0x1238c9(0xda),'selector':{'provider':_0x5e5ecb,'accountId':_0x1b3ff1},'before':null,'after':{'provider':_0x5e5ecb,'accountId':_0x1b3ff1,'bound':!![]},'dryRun':_0x11ea1a,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a84_0xbf0e20(0xe0),'command':a84_0xbf0e20(0xda),'description':'Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','risk':a84_0xbf0e20(0xcf),'confirmationDescription':a84_0xbf0e20(0xde),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a84_0xbf0e20(0xd1),'type':a84_0xbf0e20(0xd2),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a84_0xbf0e20(0xe4)},{'name':'account-id','type':'string','required':!![],'description':a84_0xbf0e20(0xd8)}],async 'validate'(_0x42ccf4){readBindingInput(_0x42ccf4);},async 'dryRun'(_0x3fc5fd){const _0x5897f3=a84_0xbf0e20,{provider:_0x2aa2df,accountId:_0x4f0b42}=readBindingInput(_0x3fc5fd);return{...buildBindingData(_0x2aa2df,_0x4f0b42,!![]),'method':_0x5897f3(0xe6),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x2aa2df,'accountId':_0x4f0b42}};},async 'execute'(_0x2837be){const _0x10b340=a84_0xbf0e20,{provider:_0x15ab0e,accountId:_0x5f5929}=readBindingInput(_0x2837be),_0x1f0777=await bindExternalUserAccount(_0x15ab0e,_0x5f5929);if(_0x1f0777!==!![])throw CliErrors[_0x10b340(0xe5)](_0x10b340(0xd0),_0x10b340(0xd7));return{'ok':!![],'data':buildBindingData(_0x15ab0e,_0x5f5929,![]),'message':_0x10b340(0xe9)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xa01a89,_0x132457){const _0x4cbcb1=a85_0x2e9f,_0x1f7d9c=_0xa01a89();while(!![]){try{const _0x4a5744=-parseInt(_0x4cbcb1(0x187))/0x1*(parseInt(_0x4cbcb1(0x183))/0x2)+-parseInt(_0x4cbcb1(0x180))/0x3+parseInt(_0x4cbcb1(0x18a))/0x4*(parseInt(_0x4cbcb1(0x185))/0x5)+parseInt(_0x4cbcb1(0x182))/0x6*(-parseInt(_0x4cbcb1(0x17f))/0x7)+-parseInt(_0x4cbcb1(0x188))/0x8+-parseInt(_0x4cbcb1(0x181))/0x9*(-parseInt(_0x4cbcb1(0x184))/0xa)+-parseInt(_0x4cbcb1(0x189))/0xb*(-parseInt(_0x4cbcb1(0x186))/0xc);if(_0x4a5744===_0x132457)break;else _0x1f7d9c['push'](_0x1f7d9c['shift']());}catch(_0x5b68cb){_0x1f7d9c['push'](_0x1f7d9c['shift']());}}}(a85_0x474b,0xa44df));function a85_0x474b(){const _0x1b7c63=['9jELQPR','138EuLcfK','30syFVcq','5472420xNPlke','5DpyqDd','12auEpWF','33071MgPUhI','805424zYJUiS','28951318quAwki','542300HDMEFT','360325uUevZf','2583288NhPTAS'];a85_0x474b=function(){return _0x1b7c63;};return a85_0x474b();}import{bindUserAccount}from'../../commands/user-account/bind.js';function a85_0x2e9f(_0x4ef138,_0x2eaee7){_0x4ef138=_0x4ef138-0x17f;const _0x474ba7=a85_0x474b();let _0x2e9ff8=_0x474ba7[_0x4ef138];return _0x2e9ff8;}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x374494=a86_0x4134;(function(_0x3f2ac2,_0x110355){const _0x35bc6d=a86_0x4134,_0x4ce8ba=_0x3f2ac2();while(!![]){try{const _0x347da1=parseInt(_0x35bc6d(0xa4))/0x1*(parseInt(_0x35bc6d(0xb8))/0x2)+parseInt(_0x35bc6d(0xb5))/0x3*(-parseInt(_0x35bc6d(0xab))/0x4)+parseInt(_0x35bc6d(0xc9))/0x5+parseInt(_0x35bc6d(0xc1))/0x6*(-parseInt(_0x35bc6d(0xad))/0x7)+parseInt(_0x35bc6d(0xa7))/0x8*(parseInt(_0x35bc6d(0xb4))/0x9)+-parseInt(_0x35bc6d(0xb7))/0xa+parseInt(_0x35bc6d(0x92))/0xb;if(_0x347da1===_0x110355)break;else _0x4ce8ba['push'](_0x4ce8ba['shift']());}catch(_0x4a7fdb){_0x4ce8ba['push'](_0x4ce8ba['shift']());}}}(a86_0x2285,0x2e011));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a86_0x374494(0xa2),'type':a86_0x374494(0xa1),'description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':a86_0x374494(0xaa),'type':a86_0x374494(0xa1),'description':a86_0x374494(0xc0)},{'name':a86_0x374494(0xa9),'type':'string','description':a86_0x374494(0x9d),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x2ce659,_0x1fb14f){const _0x54261f=a86_0x374494,_0x15137c=_0x2ce659[_0x54261f(0xa8)](_0x54261f(0xa2))[_0x54261f(0xc4)](),_0x5f2d30=_0x2ce659[_0x54261f(0xa8)]('appcode')[_0x54261f(0xc4)](),_0x364831=_0x2ce659[_0x54261f(0xa8)]('env')['trim'](),_0x225546=resolveWorkspaceEnv(_0x364831||_0x2ce659[_0x54261f(0xc3)]||DEFAULT_CONFIG_VALUES[_0x54261f(0xa9)]);if(!_0x15137c&&!_0x5f2d30)throw CliErrors[_0x54261f(0x9a)](_0x54261f(0xb9),_0x54261f(0xa3)+CLI_BIN_NAME+'\x20workspace\x20'+_0x1fb14f+'\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'+CLI_BIN_NAME+'\x20workspace\x20'+_0x1fb14f+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x15137c&&_0x5f2d30)throw CliErrors[_0x54261f(0x9a)]('Conflicting\x20workspace\x20app\x20selectors.',_0x54261f(0x94));const _0x118dcd=resolveWriteConfigPath(_0x54261f(0xb2)),_0x2962cf=readConfigFile(_0x118dcd);assertWorkspaceCommandState(_0x1fb14f,_0x2962cf);const _0x1a1eb7=_0x5f2d30||await resolveRemoteAppCode({'command':_0x1fb14f,'appName':_0x15137c,'env':_0x225546,'accessKey':_0x2ce659['accessKey']});return writeWorkspaceConfig({'command':_0x1fb14f,'appName':_0x15137c,'appcode':_0x1a1eb7,'env':_0x225546,'shouldWriteEnv':!!_0x364831,'accessKey':_0x2ce659[_0x54261f(0xb1)]},_0x118dcd,_0x2962cf),{'ok':!![],'data':{'configPath':_0x118dcd,'app':_0x15137c||null,'appcode':_0x1a1eb7,'env':_0x364831?_0x225546:null,'accessKeyWritten':![],'command':_0x54261f(0x96)+_0x1fb14f},'message':buildWorkspaceMessage(_0x118dcd,_0x15137c,_0x1a1eb7,_0x364831?_0x225546:undefined)};}async function resolveRemoteAppCode(_0x4dd527){const _0x4b7f62=a86_0x374494;if(!_0x4dd527[_0x4b7f62(0xb1)])throw CliErrors['authRequired']('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+_0x4b7f62(0x93)+_0x4dd527[_0x4b7f62(0x99)]+'.');const {setActiveAK:_0x1c5460}=await import('../../core/api-client.js'),{getRemoteAppList:_0x2cd845}=await import(_0x4b7f62(0xc5));_0x1c5460(_0x4dd527[_0x4b7f62(0xb1)]);const _0x3ec012=await _0x2cd845({'env':_0x4dd527[_0x4b7f62(0xa9)],'accessKey':_0x4dd527[_0x4b7f62(0xb1)],'noCache':![]}),_0x5ec92a=findAppByName(_0x3ec012[_0x4b7f62(0xb6)],_0x4dd527[_0x4b7f62(0xbb)]);if(_0x5ec92a&&!isRuntimeAccessibleApp(_0x5ec92a))throw runtimeInaccessibleAppError(_0x5ec92a,'\x22'+_0x4dd527['appName']+'\x22');const _0x349dfe=_0x5ec92a?.[_0x4b7f62(0xa6)]?.['trim']();if(_0x349dfe)return _0x349dfe;const _0x46f2a7=_0x3ec012[_0x4b7f62(0xb6)]['map'](_0x2e1645=>_0x2e1645[_0x4b7f62(0xbb)])[_0x4b7f62(0xc7)](Boolean),_0x4d8e78=_0x46f2a7[_0x4b7f62(0xac)]?_0x4b7f62(0xcd)+Array[_0x4b7f62(0xba)](new Set(_0x46f2a7))[_0x4b7f62(0xcf)](',\x20')+'.':_0x4b7f62(0xca)+CLI_BIN_NAME+_0x4b7f62(0xa5);throw CliErrors[_0x4b7f62(0x9a)](_0x4b7f62(0xbd)+_0x4dd527['appName']+_0x4b7f62(0xc6),_0x4d8e78);}function writeWorkspaceConfig(_0x187663,_0xe6ac18,_0x76228c){const _0x212e3c=a86_0x374494;_0x187663['shouldWriteEnv']&&(_0x76228c[_0x212e3c(0xa9)]=_0x187663[_0x212e3c(0xa9)]);if(_0x187663['appName']){const _0x530567=isRecord(_0x76228c[_0x212e3c(0xb0)])?{..._0x76228c[_0x212e3c(0xb0)]}:{},_0x4ed425=isRecord(_0x530567[_0x187663['appName']])?_0x530567[_0x187663['appName']]:{};return _0x530567[_0x187663['appName']]={..._0x4ed425,'appcode':_0x187663[_0x212e3c(0xaa)]},_0x76228c[_0x212e3c(0xb0)]=_0x530567,_0x76228c[_0x212e3c(0x9f)]=_0x187663['appName'],delete _0x76228c[_0x212e3c(0xaa)],delete _0x76228c[_0x212e3c(0xa2)],writeAndReturn(_0xe6ac18,_0x76228c);}return _0x76228c['appcode']=_0x187663[_0x212e3c(0xaa)],delete _0x76228c['defaultApp'],delete _0x76228c[_0x212e3c(0xa2)],writeAndReturn(_0xe6ac18,_0x76228c);}function writeAndReturn(_0x4c2814,_0x226b2a){return writeConfigFile(_0x4c2814,_0x226b2a),_0x4c2814;}function resolveWorkspaceEnv(_0x17f073){const _0x26a30e=a86_0x374494;if(RUNTIME_ENV_VALUES[_0x26a30e(0x9e)](_0x17f073))return _0x17f073;throw CliErrors[_0x26a30e(0x9a)](_0x26a30e(0xbc)+_0x17f073+_0x26a30e(0xd0)+RUNTIME_ENV_VALUES[_0x26a30e(0xcf)](',\x20'));}function a86_0x2285(){const _0x4d3e24=['Target\x20environment','includes','defaultApp','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','string','app','Usage:\x20','1qxYXvX','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','appCode','2819272xFQlwG','str','env','appcode','104ujlqpK','length','3885nVEkgk','Workspace\x20configured.\x0aConfig\x20file:\x20','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','apps','accessKey','project','为尚未绑定应用的当前工作目录初始化应用上下文','9TNMfBR','29205xDPFKC','items','2898260YnVIDU','713478UtpePv','Missing\x20workspace\x20app\x20selector.','from','appName','Invalid\x20env\x20\x22','App\x20\x22','将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','Workspace\x20app\x20context\x20is\x20already\x20initialized.','App\x20code\x20to\x20bind\x20directly','3978ZHnPsy','workspace','envName','trim','../../commands/app/remote-source.js','\x22\x20not\x20found.','filter','Use\x20`','1209195tRcrBO','Run\x20`','\x0aDefault\x20app:\x20','init','Available\x20apps:\x20','\x0aAccessKey:\x20not\x20written','join','\x22.\x20Allowed:\x20','1631817GPeUqM','\x20workspace\x20','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','isArray','workspace\x20','修改当前工作目录已有绑定的应用上下文','\x0aEnv:\x20','command','validation','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','use'];a86_0x2285=function(){return _0x4d3e24;};return a86_0x2285();}function buildWorkspaceMessage(_0x977bc,_0x5816c0,_0x46e658,_0x46fa66){const _0x20cc45=a86_0x374494,_0xb2eec6=_0x5816c0?_0x5816c0+'\x20('+_0x46e658+')':_0x46e658,_0x590b13=_0x46fa66?_0x20cc45(0x98)+_0x46fa66:'';return _0x20cc45(0xae)+_0x977bc+_0x20cc45(0xcb)+_0xb2eec6+_0x590b13+_0x20cc45(0xce);}function isRecord(_0x2142c0){const _0x3e07f2=a86_0x374494;return typeof _0x2142c0==='object'&&_0x2142c0!==null&&!Array[_0x3e07f2(0x95)](_0x2142c0);}function hasWorkspaceAppBinding(_0x14833b){const _0x5230f7=a86_0x374494;if(typeof _0x14833b[_0x5230f7(0xaa)]===_0x5230f7(0xa1)&&_0x14833b['appcode'][_0x5230f7(0xc4)]()[_0x5230f7(0xac)]>0x0)return!![];if(typeof _0x14833b['defaultApp']!==_0x5230f7(0xa1)||!_0x14833b[_0x5230f7(0x9f)][_0x5230f7(0xc4)]())return![];if(!isRecord(_0x14833b[_0x5230f7(0xb0)]))return![];const _0x75dcd1=_0x14833b[_0x5230f7(0xb0)][_0x14833b[_0x5230f7(0x9f)]['trim']()];return isRecord(_0x75dcd1)&&typeof _0x75dcd1[_0x5230f7(0xaa)]===_0x5230f7(0xa1)&&_0x75dcd1[_0x5230f7(0xaa)]['trim']()[_0x5230f7(0xac)]>0x0;}function assertWorkspaceCommandState(_0xe41724,_0x4fb4a9){const _0x59d634=a86_0x374494,_0x4b245b=hasWorkspaceAppBinding(_0x4fb4a9);if(_0xe41724===_0x59d634(0xcc)&&_0x4b245b)throw CliErrors['validation'](_0x59d634(0xbf),_0x59d634(0xc8)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x59d634(0xa0));if(_0xe41724===_0x59d634(0x9c)&&!_0x4b245b)throw CliErrors['validation']('Workspace\x20app\x20context\x20is\x20not\x20initialized.',_0x59d634(0xca)+CLI_BIN_NAME+_0x59d634(0xaf)+CLI_BIN_NAME+_0x59d634(0x9b));}function makeWorkspaceCommand(_0x4a0c25){const _0x3e7c14=a86_0x374494;return{'service':_0x3e7c14(0xc2),'command':_0x4a0c25,'description':_0x4a0c25==='init'?_0x3e7c14(0xb3):_0x3e7c14(0x97),'risk':'write','confirmationDescription':_0x4a0c25===_0x3e7c14(0xcc)?'将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。':_0x3e7c14(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x344f74){return executeWorkspaceUse(_0x344f74,_0x4a0c25);}};}function a86_0x4134(_0x15dc58,_0x7538ff){_0x15dc58=_0x15dc58-0x92;const _0x2285cc=a86_0x2285();let _0x4134c9=_0x2285cc[_0x15dc58];return _0x4134c9;}export const workspaceDefinitions=[makeWorkspaceCommand('init'),makeWorkspaceCommand('use')];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x690de2=a87_0x4b20;(function(_0x1689d2,_0x5bea82){const _0x26cc2f=a87_0x4b20,_0x580f3e=_0x1689d2();while(!![]){try{const _0x483bbd=parseInt(_0x26cc2f(0xe9))/0x1+parseInt(_0x26cc2f(0xda))/0x2*(parseInt(_0x26cc2f(0xee))/0x3)+parseInt(_0x26cc2f(0xde))/0x4*(parseInt(_0x26cc2f(0xe8))/0x5)+-parseInt(_0x26cc2f(0xe2))/0x6*(-parseInt(_0x26cc2f(0xe3))/0x7)+-parseInt(_0x26cc2f(0xe6))/0x8+parseInt(_0x26cc2f(0xec))/0x9+-parseInt(_0x26cc2f(0xdc))/0xa*(parseInt(_0x26cc2f(0xe1))/0xb);if(_0x483bbd===_0x5bea82)break;else _0x580f3e['push'](_0x580f3e['shift']());}catch(_0x1bf5f9){_0x580f3e['push'](_0x580f3e['shift']());}}}(a87_0x5702,0x58411));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';function a87_0x5702(){const _0x1b650b=['Target\x20environment','Override\x20API\x20domain','189598scxSsn','Default\x20page\x20size','9749340JKKylh','filter','38652pXgubL','Default\x20output\x20format',';\x20local\x20alias:\x20apps.<alias>.appcode','11jRNPed','24WfAZZO','860083Tkwqbt','format','cliSettableTopLevel','5673576KtVhWo','Access\x20key\x20(client-ak\x20auth)','175Xycxvi','481301lAsJKn','Config\x20key.\x20Top-level:\x20','riskLevel','1492596NoanMA','Risk\x20level','18KbrQtE','Override\x20runtime\x20domain','locale','has','Locale','fromEntries','env','map','enumValues','join','defaultValue','entries'];a87_0x5702=function(){return _0x1b650b;};return a87_0x5702();}export const CONFIG_FIELD_SCHEMAS={'env':{'description':a87_0x690de2(0xd8),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x690de2(0xf4)],'importable':!![]},'format':{'description':a87_0x690de2(0xdf),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x690de2(0xe4)],'importable':!![]},'pageSize':{'description':a87_0x690de2(0xdb),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a87_0x690de2(0xd9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a87_0x690de2(0xef),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a87_0x690de2(0xe7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x690de2(0xed),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x690de2(0xeb)],'importable':!![]},'locale':{'description':a87_0x690de2(0xf2),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x690de2(0xf0)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a87_0x690de2(0xd7)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x564bb9])=>_0x564bb9[a87_0x690de2(0xe5)])['map'](([_0x37665c])=>_0x37665c));export const CONFIG_ENUM_VALUES=Object[a87_0x690de2(0xf3)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a87_0x690de2(0xdd)](([,_0x4e07e5])=>_0x4e07e5[a87_0x690de2(0xf6)])[a87_0x690de2(0xf5)](([_0x2951da,_0x42c248])=>[_0x2951da,[..._0x42c248[a87_0x690de2(0xf6)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x690de2(0xd7)](CONFIG_FIELD_SCHEMAS)[a87_0x690de2(0xdd)](([,_0x42bced])=>_0x42bced['importable'])['map'](([_0x23978e])=>_0x23978e);export function getConfigFieldSchema(_0x5b1690){return CONFIG_FIELD_SCHEMAS[_0x5b1690];}export function getConfigEnumValues(_0x2b07d3){const _0x2f0180=a87_0x690de2;return getConfigFieldSchema(_0x2b07d3)?.[_0x2f0180(0xf6)];}function a87_0x4b20(_0x59c66c,_0x1100e6){_0x59c66c=_0x59c66c-0xd7;const _0x57023d=a87_0x5702();let _0x4b20af=_0x57023d[_0x59c66c];return _0x4b20af;}export function getConfigDefaultValue(_0x3680f6){const _0x2b41cb=a87_0x690de2;return getConfigFieldSchema(_0x3680f6)?.[_0x2b41cb(0xf8)];}export function isTopLevelConfigKey(_0x47c790){const _0x332a9c=a87_0x690de2;return TOP_LEVEL_CONFIG_KEYS[_0x332a9c(0xf1)](_0x47c790);}export function isLegacyCompatConfigKey(_0x339c4a){return getConfigFieldSchema(_0x339c4a)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0xdf3bc){const _0x1e1b9a=a87_0x690de2;return[..._0xdf3bc][_0x1e1b9a(0xf7)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5322f4=a87_0x690de2;return _0x5322f4(0xea)+getTopLevelConfigKeySummary()+_0x5322f4(0xe0);}export function buildAppProfileListFields(_0xca06d8){return{'env':_0xca06d8,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x2f8de5=a88_0x167f;function a88_0x167f(_0x4fddb2,_0xf273ba){_0x4fddb2=_0x4fddb2-0x1a2;const _0x598e30=a88_0x598e();let _0x167f1b=_0x598e30[_0x4fddb2];return _0x167f1b;}(function(_0x4239e7,_0x5e0804){const _0x59604f=a88_0x167f,_0x50f9bd=_0x4239e7();while(!![]){try{const _0xfc8d3f=parseInt(_0x59604f(0x1a7))/0x1*(parseInt(_0x59604f(0x1a4))/0x2)+parseInt(_0x59604f(0x1a2))/0x3*(parseInt(_0x59604f(0x1ad))/0x4)+parseInt(_0x59604f(0x1ab))/0x5+-parseInt(_0x59604f(0x1ac))/0x6+parseInt(_0x59604f(0x1aa))/0x7+-parseInt(_0x59604f(0x1a5))/0x8+-parseInt(_0x59604f(0x1a8))/0x9;if(_0xfc8d3f===_0x5e0804)break;else _0x50f9bd['push'](_0x50f9bd['shift']());}catch(_0x5c08a9){_0x50f9bd['push'](_0x50f9bd['shift']());}}}(a88_0x598e,0xb4f18));function a88_0x598e(){const _0x1fa2cd=['9146862kRbxSL','UNPUBLISH','6140141rUYJsu','6444095URaZuL','1014486VZZZWO','703244JFIryX','9ImFaaz','PUBLISHED','12472bnrQVg','8579488ElXKrJ','Published','49hJTdDr'];a88_0x598e=function(){return _0x1fa2cd;};return a88_0x598e();}export const APP_PUBLISH_STATUS={'Published':a88_0x2f8de5(0x1a3),'Unpublished':a88_0x2f8de5(0x1a9)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0x2f8de5(0x1a6)];
|