@lovrabet/lovrabet-cli 2.1.15 → 2.1.16-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 -0
- 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/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.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/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/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/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.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/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.js +1 -1
- package/lib/help.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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x530c9d,_0x4a1804){const _0xc7c7ba=a89_0x1edd,_0x501e8f=_0x530c9d();while(!![]){try{const _0x442eed=-parseInt(_0xc7c7ba(0xf1))/0x1*(-parseInt(_0xc7c7ba(0xec))/0x2)+parseInt(_0xc7c7ba(0xf5))/0x3*(parseInt(_0xc7c7ba(0xf8))/0x4)+-parseInt(_0xc7c7ba(0xf0))/0x5*(parseInt(_0xc7c7ba(0xfa))/0x6)+-parseInt(_0xc7c7ba(0xeb))/0x7+-parseInt(_0xc7c7ba(0xf4))/0x8+parseInt(_0xc7c7ba(0xee))/0x9+-parseInt(_0xc7c7ba(0xf3))/0xa;if(_0x442eed===_0x4a1804)break;else _0x501e8f['push'](_0x501e8f['shift']());}catch(_0x465b21){_0x501e8f['push'](_0x501e8f['shift']());}}}(a89_0x4fe3,0x1eaa3));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x561c65){const _0x3705f6=a89_0x1edd;if(_0x561c65 instanceof LovrabetError){const _0x509b88=userFacingLovrabetMessage(_0x561c65),_0x72f57b=_0x561c65,_0x5a790a=createRateLimitError({'status':_0x72f57b['status'],'errorCode':_0x72f57b['code'],'message':_0x509b88,'retryAfter':readRetryAfter(_0x72f57b[_0x3705f6(0xf9)]?.['headers'])??readRetryAfterSeconds(_0x72f57b['response'])});return _0x5a790a??CliErrors[_0x3705f6(0xf2)](_0x509b88);}return _0x561c65;}function a89_0x4fe3(){const _0x3256ab=['877790ToZIgm','107858SwXWgr','validation','350170JnVCpM','670496nUtbBm','1710LnYHJw','stringify','message','1688YcvwwV','response','6APBPtv','1078847AYfnCI','4ghTknI','trim','1060695CDEJoM','string'];a89_0x4fe3=function(){return _0x3256ab;};return a89_0x4fe3();}function a89_0x1edd(_0x2dce52,_0x1b6f5f){_0x2dce52=_0x2dce52-0xeb;const _0x4fe39f=a89_0x4fe3();let _0x1eddb2=_0x4fe39f[_0x2dce52];return _0x1eddb2;}function userFacingLovrabetMessage(_0x34e083){const _0x1999df=a89_0x1edd,_0x468179=_0x34e083['description'];if(_0x468179!==undefined&&_0x468179!==null){if(typeof _0x468179===_0x1999df(0xef)&&_0x468179[_0x1999df(0xed)]())return _0x468179[_0x1999df(0xed)]();try{return JSON[_0x1999df(0xf6)](_0x468179);}catch{}}return _0x34e083[_0x1999df(0xf7)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a89_0x2dfd4e=a89_0xaa98;(function(_0x18364d,_0x5b22af){const _0x2767ac=a89_0xaa98,_0x229912=_0x18364d();while(!![]){try{const _0x17ecf6=parseInt(_0x2767ac(0x183))/0x1*(parseInt(_0x2767ac(0x1a5))/0x2)+parseInt(_0x2767ac(0x184))/0x3+-parseInt(_0x2767ac(0x173))/0x4+-parseInt(_0x2767ac(0x16c))/0x5*(-parseInt(_0x2767ac(0x1a2))/0x6)+-parseInt(_0x2767ac(0x195))/0x7+-parseInt(_0x2767ac(0x1a0))/0x8*(parseInt(_0x2767ac(0x19e))/0x9)+parseInt(_0x2767ac(0x196))/0xa;if(_0x17ecf6===_0x5b22af)break;else _0x229912['push'](_0x229912['shift']());}catch(_0x142f9a){_0x229912['push'](_0x229912['shift']());}}}(a89_0x4831,0x3a45c));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function a89_0xaa98(_0x4b8b0e,_0x48d590){_0x4b8b0e=_0x4b8b0e-0x16c;const _0x4831d1=a89_0x4831();let _0xaa98f1=_0x4831d1[_0x4b8b0e];return _0xaa98f1;}import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x57e70b){return void _0x57e70b,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x39abde,_0x455602){const _0x2a1df0=a89_0xaa98,_0x405e8e=typeof _0x455602['app']===_0x2a1df0(0x1a6)&&_0x455602['app'][_0x2a1df0(0x187)]();return{'rawFlags':_0x455602,'appCode':_0x39abde[_0x2a1df0(0x194)]||productEnv(_0x2a1df0(0x178))||(_0x405e8e?undefined:readAppCodeFromConfig()),'appCodeSource':_0x39abde['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x455602),'defaultFormat':_0x39abde['format'],'defaultPageSize':_0x39abde['pageSize'],'defaultVerbose':_0x39abde['verbose'],'riskLevel':_0x39abde['riskLevel'],'accessKey':_0x39abde[_0x2a1df0(0x191)],'env':_0x39abde['env'],'mergedCli':{'defaultApp':_0x39abde[_0x2a1df0(0x17f)],'currentApp':_0x39abde[_0x2a1df0(0x179)],'appCode':_0x39abde[_0x2a1df0(0x194)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a89_0x2dfd4e(0x174)](_0x3edd4b=>PIPELINE_FLAG_NAMES[a89_0x2dfd4e(0x186)](_0x3edd4b[a89_0x2dfd4e(0x19a)]))['map'](({name:_0x4bf0b6,type:_0x4cbddc,description:_0x2c7314})=>({'name':_0x4bf0b6,'type':_0x4cbddc,'description':_0x2c7314})),'formatOutput':formatOutput,'getCommandLabel'(_0x2d6f8a){return CLI_BIN_NAME+'\x20'+_0x2d6f8a['service']+'\x20'+_0x2d6f8a['command'];},'riskPolicy':{'onViolation'(_0x56d997){console['error'](_0x56d997);},'createError'(_0x47e4c7){const _0x85e613=a89_0x2dfd4e;return CliErrors[_0x85e613(0x16f)](_0x47e4c7);}},async 'prepare'(_0x383ec8,_0x27e087){const _0x5115b9=a89_0x2dfd4e,_0x361409=resolveAuthMode(_0x27e087);if(_0x383ec8[_0x5115b9(0x185)]!==![]){if(!_0x27e087[_0x5115b9(0x191)])throw CliErrors[_0x5115b9(0x17a)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5115b9(0x176)]+'\x20or\x20pass\x20'+productEnvName(_0x5115b9(0x19b))+'.');const {setActiveAK:_0x16dc33}=await import('../core/api-client.js');_0x16dc33(_0x27e087[_0x5115b9(0x191)]);}let _0x88f4f6='';if(_0x383ec8[_0x5115b9(0x18e)]!==![]){_0x88f4f6=_0x27e087['appCode']??'',_0x88f4f6=await resolveExplicitAppName(_0x383ec8,_0x27e087,_0x88f4f6);if(!_0x88f4f6){await assertSelectedAppNameIsRuntimeAccessible(_0x383ec8,_0x27e087);throw CliErrors['configMissing'](_0x5115b9(0x1a4)+PRODUCT_CONFIG[_0x5115b9(0x176)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x383ec8,_0x27e087,_0x88f4f6);}if(_0x88f4f6){const {initSdkClient:_0x1cfb2d}=await import(_0x5115b9(0x18f));_0x1cfb2d({'appCode':_0x88f4f6,'env':_0x27e087[_0x5115b9(0x18a)]??'production','accessKey':_0x27e087[_0x5115b9(0x191)],'authMode':_0x361409}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x27e087[_0x5115b9(0x172)]},'numbers':{'pagesize':_0x27e087[_0x5115b9(0x175)]}},'extras':{'appCode':_0x88f4f6,'cookie':'','apiDomain':_0x27e087[_0x5115b9(0x17b)],'apiDir':'','accessKey':_0x27e087[_0x5115b9(0x191)],'envName':_0x27e087['env'],'mergedCli':_0x27e087['mergedCli']}};},async 'confirmHighRisk'({def:_0x3400cb,env:_0x3c965c,flags:_0x3e37e0,commandLabel:_0x26a788}){const _0x3e1e63=a89_0x2dfd4e;if(_0x3c965c[_0x3e1e63(0x171)]){const _0x17e65f=reconstructCommandArgv(_0x3400cb,_0x3e37e0);throw CliErrors[_0x3e1e63(0x18b)](_0x3e1e63(0x1a3)+_0x26a788+_0x3e1e63(0x198)+(_0x3e1e63(0x16d)+_0x17e65f));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3400cb,_0x26a788,_0x3e37e0),'createCancelledError':_0x3cbba4=>CliErrors[_0x3e1e63(0x16f)](_0x3cbba4)});},'mapDryRunError'(_0x5a94fa){return mapUserFacingExecuteError(_0x5a94fa);},'mapExecuteError'(_0x400dd6){return mapUserFacingExecuteError(_0x400dd6);},async 'finalize'(){const _0x3aad52=a89_0x2dfd4e;try{if(sdkClientInitialized){const {clearSdkClient:_0xc907cf}=await import(_0x3aad52(0x18f));_0xc907cf();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x37769a}=await import(_0x3aad52(0x197));_0x37769a();}}};async function resolveExplicitAppName(_0x19435f,_0x1206f1,_0x4856ca){const _0x31fa78=a89_0x2dfd4e;if(_0x19435f[_0x31fa78(0x18e)]===![])return _0x4856ca;const _0x2dcfe1=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x182)]===_0x31fa78(0x1a6)?_0x1206f1['rawFlags'][_0x31fa78(0x182)][_0x31fa78(0x187)]():'';if(!_0x2dcfe1)return _0x4856ca;const _0x50f633=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)]==='string'&&_0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)][_0x31fa78(0x187)]()||productEnv(_0x31fa78(0x178));if(_0x50f633||_0x1206f1['appCodeSource']===_0x31fa78(0x190))return _0x4856ca;const {getRemoteAppList:_0x379f5a}=await import(_0x31fa78(0x192)),_0x500f86=await _0x379f5a({'env':_0x1206f1['env']??'production','accessKey':_0x1206f1[_0x31fa78(0x191)]}),_0x1ffadb=findAppByName(_0x500f86['items'],_0x2dcfe1);if(_0x1ffadb&&!isRuntimeAccessibleApp(_0x1ffadb))throw runtimeInaccessibleAppError(_0x1ffadb,'\x22'+_0x2dcfe1+'\x22');const _0x53679c=_0x1ffadb?.[_0x31fa78(0x194)]?.[_0x31fa78(0x187)]();if(_0x53679c)return _0x53679c;throw CliErrors[_0x31fa78(0x18b)](_0x31fa78(0x177)+_0x2dcfe1,'Run\x20`'+CLI_BIN_NAME+_0x31fa78(0x19c)+_0x2dcfe1+_0x31fa78(0x19d)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4ac8d9,_0x74359b){const _0x48f94b=a89_0x2dfd4e;if(_0x4ac8d9['requiresAppCode']===![]||!_0x74359b[_0x48f94b(0x191)])return;const _0x4a9cf4=(typeof _0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]===_0x48f94b(0x1a6)&&_0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]['trim']()?_0x74359b['rawFlags'][_0x48f94b(0x182)]:_0x74359b['mergedCli']?.['currentApp']??_0x74359b[_0x48f94b(0x18c)]?.[_0x48f94b(0x17f)])?.[_0x48f94b(0x187)]();if(!_0x4a9cf4)return;const {getRemoteAppList:_0x36719b}=await import('../commands/app/remote-source.js'),_0x2dc0fb=await _0x36719b({'env':_0x74359b[_0x48f94b(0x18a)]??_0x48f94b(0x17d),'accessKey':_0x74359b[_0x48f94b(0x191)]}),_0x4fe72e=findAppByName(_0x2dc0fb[_0x48f94b(0x1a1)],_0x4a9cf4);if(_0x4fe72e&&!isRuntimeAccessibleApp(_0x4fe72e))throw runtimeInaccessibleAppError(_0x4fe72e,'\x22'+_0x4a9cf4+'\x22');}function a89_0x4831(){const _0x18c6c4=['_notice','appcode\x20\x22','env','validation','mergedCli','appcode','requiresAppCode','../core/sdk-client.js','local-alias','accessKey','../commands/app/remote-source.js','rawFlags','appCode','2142763ldyDeS','6444440GgbJTv','../core/api-client.js','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','resolve','name','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','.appcode\x20to\x20','1331901Ptudfa','update','8gVXFOS','items','24kINZml','High-risk\x20operation\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','106394TjKCXs','string','44005tncpdY','\x20\x20To\x20proceed:\x20','pretty','cancelled','service','isNonInteractive','defaultVerbose','1574912zGmDmU','filter','defaultPageSize','newConfigFileName','Unknown\x20app:\x20','APPCODE','currentApp','authRequired','apiDomain','schema','production','catch','defaultApp','includes','execute','app','1gGJGct','1060995OBxXjx','requiresAuth','has','trim'];a89_0x4831=function(){return _0x18c6c4;};return a89_0x4831();}async function assertAppCodeIsRuntimeAccessible(_0x411a9b,_0x2e887b,_0x1039d9){const _0x101bd1=a89_0x2dfd4e;if(_0x411a9b[_0x101bd1(0x18e)]===![]||!_0x2e887b[_0x101bd1(0x191)])return;const {getRemoteAppList:_0x5df7e9}=await import(_0x101bd1(0x192)),_0x308365=await _0x5df7e9({'env':_0x2e887b[_0x101bd1(0x18a)]??'production','accessKey':_0x2e887b[_0x101bd1(0x191)]}),_0x42c91c=findAppByCode(_0x308365['items'],_0x1039d9);if(_0x42c91c&&!isRuntimeAccessibleApp(_0x42c91c))throw runtimeInaccessibleAppError(_0x42c91c,_0x101bd1(0x189)+_0x1039d9+'\x22');}export async function runCommand(_0x3a98b7,_0xda11f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x3a98b7)?withUpdateNotice(_0x3a98b7):_0x3a98b7,_0xda11f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x4cf824){const _0xd30b4d=a89_0x2dfd4e;return![_0xd30b4d(0x19f),_0xd30b4d(0x17c),'doctor'][_0xd30b4d(0x180)](_0x4cf824[_0xd30b4d(0x170)]);}function withUpdateNotice(_0x4cc924){return{..._0x4cc924,async 'execute'(_0x6cf0a8){const _0x57bf8f=a89_0xaa98,_0x28453b=shouldResolveUpdateNotice(_0x6cf0a8)?resolveLatestUpdateNotice()[_0x57bf8f(0x17e)](()=>null):Promise[_0x57bf8f(0x199)](null),_0xdf72b5=await _0x4cc924[_0x57bf8f(0x181)](_0x6cf0a8);return attachUpdateNotice(_0xdf72b5,await _0x28453b);}};}function shouldResolveUpdateNotice(_0x1e2642){const _0x4549fe=a89_0x2dfd4e;return _0x1e2642['format']===_0x4549fe(0x16e)&&!_0x1e2642['nonInteractive'];}function attachUpdateNotice(_0x36d7a8,_0x357254){const _0x565f96=a89_0x2dfd4e;if(!_0x357254||!_0x36d7a8||typeof _0x36d7a8!=='object')return _0x36d7a8;const _0x387feb=_0x36d7a8,_0x2e0a5a=typeof _0x387feb[_0x565f96(0x188)]==='object'&&_0x387feb[_0x565f96(0x188)]!==null?_0x387feb[_0x565f96(0x188)]:{};return{..._0x387feb,'_notice':{..._0x2e0a5a,'update':_0x357254}};}
|
|
1
|
+
const a90_0x4db250=a90_0x3093;(function(_0x526030,_0x294a14){const _0x9eae7a=a90_0x3093,_0x28d971=_0x526030();while(!![]){try{const _0xd7aa7d=parseInt(_0x9eae7a(0x172))/0x1*(parseInt(_0x9eae7a(0x166))/0x2)+-parseInt(_0x9eae7a(0x142))/0x3*(parseInt(_0x9eae7a(0x177))/0x4)+-parseInt(_0x9eae7a(0x17e))/0x5+-parseInt(_0x9eae7a(0x16f))/0x6+parseInt(_0x9eae7a(0x167))/0x7+parseInt(_0x9eae7a(0x149))/0x8+-parseInt(_0x9eae7a(0x156))/0x9*(-parseInt(_0x9eae7a(0x163))/0xa);if(_0xd7aa7d===_0x294a14)break;else _0x28d971['push'](_0x28d971['shift']());}catch(_0x1362a3){_0x28d971['push'](_0x28d971['shift']());}}}(a90_0x39f8,0x520b0));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a90_0x39f8(){const _0x11ecf6=['appCode','../commands/app/remote-source.js','validation','configMissing','ACCESS_KEY','items','update','includes','6420130lauAJk','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','apiDomain','11348XSGgJf','1415260Icucjt','resolve','_notice','defaultApp','isNonInteractive','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','string','name','1275318aeFmTJ','mergedCli','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','16hundLb','requiresAppCode','\x20\x20To\x20proceed:\x20','nonInteractive','currentApp','4BaBeGN','appCodeSource','../core/api-client.js','pageSize','accessKey','cancelled','env','2108895GxcBWA','../core/sdk-client.js','High-risk\x20operation\x20`','schema','service','1192107aZXOOy','defaultPageSize','APPCODE','execute','object','authRequired','command','3462176jMHobG','app','Run\x20`','error','local-alias','rawFlags','appcode\x20\x22','appcode','riskLevel','catch','ClientAk','\x20or\x20pass\x20','production','9ZWJGVN','requiresAuth','trim','.appcode\x20to\x20','format'];a90_0x39f8=function(){return _0x11ecf6;};return a90_0x39f8();}import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x18acc6){const _0x1987a7=a90_0x3093;return void _0x18acc6,AUTH_MODE[_0x1987a7(0x153)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x170642,_0x2a4dcb){const _0x7b2627=a90_0x3093,_0x1decdf=typeof _0x2a4dcb[_0x7b2627(0x14a)]===_0x7b2627(0x16d)&&_0x2a4dcb['app']['trim']();return{'rawFlags':_0x2a4dcb,'appCode':_0x170642[_0x7b2627(0x15b)]||productEnv(_0x7b2627(0x144))||(_0x1decdf?undefined:readAppCodeFromConfig()),'appCodeSource':_0x170642[_0x7b2627(0x178)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x2a4dcb),'defaultFormat':_0x170642[_0x7b2627(0x15a)],'defaultPageSize':_0x170642[_0x7b2627(0x17a)],'defaultVerbose':_0x170642['verbose'],'riskLevel':_0x170642[_0x7b2627(0x151)],'accessKey':_0x170642[_0x7b2627(0x17b)],'env':_0x170642['env'],'mergedCli':{'defaultApp':_0x170642[_0x7b2627(0x16a)],'currentApp':_0x170642['currentApp'],'appCode':_0x170642['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x4b895f=>PIPELINE_FLAG_NAMES['has'](_0x4b895f[a90_0x4db250(0x16e)]))['map'](({name:_0x3d99a9,type:_0x5878bc,description:_0x3295e2})=>({'name':_0x3d99a9,'type':_0x5878bc,'description':_0x3295e2})),'formatOutput':formatOutput,'getCommandLabel'(_0x26bb70){const _0x2778b3=a90_0x4db250;return CLI_BIN_NAME+'\x20'+_0x26bb70[_0x2778b3(0x141)]+'\x20'+_0x26bb70[_0x2778b3(0x148)];},'riskPolicy':{'onViolation'(_0x39f8dd){const _0x55dc4e=a90_0x4db250;console[_0x55dc4e(0x14c)](_0x39f8dd);},'createError'(_0x576a82){const _0x154996=a90_0x4db250;return CliErrors[_0x154996(0x17c)](_0x576a82);}},async 'prepare'(_0x15f6fa,_0x1343db){const _0x10117d=a90_0x4db250,_0x3ea750=resolveAuthMode(_0x1343db);if(_0x15f6fa[_0x10117d(0x157)]!==![]){if(!_0x1343db[_0x10117d(0x17b)])throw CliErrors[_0x10117d(0x147)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x10117d(0x154)+productEnvName(_0x10117d(0x15f))+'.');const {setActiveAK:_0x5371e8}=await import(_0x10117d(0x179));_0x5371e8(_0x1343db[_0x10117d(0x17b)]);}let _0x582685='';if(_0x15f6fa['requiresAppCode']!==![]){_0x582685=_0x1343db[_0x10117d(0x15b)]??'',_0x582685=await resolveExplicitAppName(_0x15f6fa,_0x1343db,_0x582685);if(!_0x582685){await assertSelectedAppNameIsRuntimeAccessible(_0x15f6fa,_0x1343db);throw CliErrors[_0x10117d(0x15e)](_0x10117d(0x16c)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x15f6fa,_0x1343db,_0x582685);}if(_0x582685){const {initSdkClient:_0xff27ce}=await import(_0x10117d(0x13e));_0xff27ce({'appCode':_0x582685,'env':_0x1343db['env']??_0x10117d(0x155),'accessKey':_0x1343db[_0x10117d(0x17b)],'authMode':_0x3ea750}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x1343db['defaultVerbose']},'numbers':{'pagesize':_0x1343db[_0x10117d(0x143)]}},'extras':{'appCode':_0x582685,'cookie':'','apiDomain':_0x1343db[_0x10117d(0x165)],'apiDir':'','accessKey':_0x1343db[_0x10117d(0x17b)],'envName':_0x1343db[_0x10117d(0x17d)],'mergedCli':_0x1343db['mergedCli']}};},async 'confirmHighRisk'({def:_0x5eef39,env:_0x107a08,flags:_0x458871,commandLabel:_0x33e3b6}){const _0x168fcd=a90_0x4db250;if(_0x107a08[_0x168fcd(0x16b)]){const _0xeb59f4=reconstructCommandArgv(_0x5eef39,_0x458871);throw CliErrors[_0x168fcd(0x15d)](_0x168fcd(0x13f)+_0x33e3b6+_0x168fcd(0x164)+(_0x168fcd(0x174)+_0xeb59f4));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x5eef39,_0x33e3b6,_0x458871),'createCancelledError':_0x3be7bf=>CliErrors[_0x168fcd(0x17c)](_0x3be7bf)});},'mapDryRunError'(_0x15d4ec){return mapUserFacingExecuteError(_0x15d4ec);},'mapExecuteError'(_0x4ba762){return mapUserFacingExecuteError(_0x4ba762);},async 'finalize'(){const _0xc0de09=a90_0x4db250;try{if(sdkClientInitialized){const {clearSdkClient:_0x22e515}=await import(_0xc0de09(0x13e));_0x22e515();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xdd828c}=await import('../core/api-client.js');_0xdd828c();}}};async function resolveExplicitAppName(_0x70d37b,_0x10b9c0,_0x2f36b5){const _0x4f9047=a90_0x4db250;if(_0x70d37b[_0x4f9047(0x173)]===![])return _0x2f36b5;const _0x3700cd=typeof _0x10b9c0[_0x4f9047(0x14e)][_0x4f9047(0x14a)]==='string'?_0x10b9c0[_0x4f9047(0x14e)][_0x4f9047(0x14a)][_0x4f9047(0x158)]():'';if(!_0x3700cd)return _0x2f36b5;const _0x22b226=typeof _0x10b9c0[_0x4f9047(0x14e)][_0x4f9047(0x150)]==='string'&&_0x10b9c0[_0x4f9047(0x14e)][_0x4f9047(0x150)][_0x4f9047(0x158)]()||productEnv(_0x4f9047(0x144));if(_0x22b226||_0x10b9c0[_0x4f9047(0x178)]===_0x4f9047(0x14d))return _0x2f36b5;const {getRemoteAppList:_0x3e1fcc}=await import(_0x4f9047(0x15c)),_0x1ed379=await _0x3e1fcc({'env':_0x10b9c0[_0x4f9047(0x17d)]??_0x4f9047(0x155),'accessKey':_0x10b9c0['accessKey']}),_0x5a0ad8=findAppByName(_0x1ed379['items'],_0x3700cd);if(_0x5a0ad8&&!isRuntimeAccessibleApp(_0x5a0ad8))throw runtimeInaccessibleAppError(_0x5a0ad8,'\x22'+_0x3700cd+'\x22');const _0x5916cb=_0x5a0ad8?.['appCode']?.[_0x4f9047(0x158)]();if(_0x5916cb)return _0x5916cb;throw CliErrors[_0x4f9047(0x15d)]('Unknown\x20app:\x20'+_0x3700cd,_0x4f9047(0x14b)+CLI_BIN_NAME+_0x4f9047(0x171)+_0x3700cd+_0x4f9047(0x159)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x3c4101,_0x3de060){const _0x598107=a90_0x4db250;if(_0x3c4101[_0x598107(0x173)]===![]||!_0x3de060[_0x598107(0x17b)])return;const _0x302887=(typeof _0x3de060[_0x598107(0x14e)][_0x598107(0x14a)]===_0x598107(0x16d)&&_0x3de060[_0x598107(0x14e)][_0x598107(0x14a)]['trim']()?_0x3de060[_0x598107(0x14e)]['app']:_0x3de060[_0x598107(0x170)]?.[_0x598107(0x176)]??_0x3de060[_0x598107(0x170)]?.[_0x598107(0x16a)])?.[_0x598107(0x158)]();if(!_0x302887)return;const {getRemoteAppList:_0x36671d}=await import('../commands/app/remote-source.js'),_0xf11722=await _0x36671d({'env':_0x3de060['env']??'production','accessKey':_0x3de060[_0x598107(0x17b)]}),_0x19efc6=findAppByName(_0xf11722['items'],_0x302887);if(_0x19efc6&&!isRuntimeAccessibleApp(_0x19efc6))throw runtimeInaccessibleAppError(_0x19efc6,'\x22'+_0x302887+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x3858ad,_0x8649af,_0x3f53c7){const _0x89f511=a90_0x4db250;if(_0x3858ad[_0x89f511(0x173)]===![]||!_0x8649af[_0x89f511(0x17b)])return;const {getRemoteAppList:_0x45fef2}=await import(_0x89f511(0x15c)),_0x4f13e4=await _0x45fef2({'env':_0x8649af['env']??_0x89f511(0x155),'accessKey':_0x8649af[_0x89f511(0x17b)]}),_0x5fcfca=findAppByCode(_0x4f13e4[_0x89f511(0x160)],_0x3f53c7);if(_0x5fcfca&&!isRuntimeAccessibleApp(_0x5fcfca))throw runtimeInaccessibleAppError(_0x5fcfca,_0x89f511(0x14f)+_0x3f53c7+'\x22');}function a90_0x3093(_0x8e7ef0,_0x4beaad){_0x8e7ef0=_0x8e7ef0-0x13e;const _0x39f8b3=a90_0x39f8();let _0x30938e=_0x39f8b3[_0x8e7ef0];return _0x30938e;}export async function runCommand(_0x5c3b66,_0x2cb480){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x5c3b66)?withUpdateNotice(_0x5c3b66):_0x5c3b66,_0x2cb480,runnerAdapter);}function shouldAttachUpdateNotice(_0x5a9ae1){const _0x1eb3fe=a90_0x4db250;return![_0x1eb3fe(0x161),_0x1eb3fe(0x140),'doctor'][_0x1eb3fe(0x162)](_0x5a9ae1[_0x1eb3fe(0x141)]);}function withUpdateNotice(_0xca07a1){return{..._0xca07a1,async 'execute'(_0x52cec4){const _0x593bdf=a90_0x3093,_0x16fc20=shouldResolveUpdateNotice(_0x52cec4)?resolveLatestUpdateNotice()[_0x593bdf(0x152)](()=>null):Promise[_0x593bdf(0x168)](null),_0x1d6ce9=await _0xca07a1[_0x593bdf(0x145)](_0x52cec4);return attachUpdateNotice(_0x1d6ce9,await _0x16fc20);}};}function shouldResolveUpdateNotice(_0x3bb103){const _0x51739b=a90_0x4db250;return _0x3bb103[_0x51739b(0x15a)]==='pretty'&&!_0x3bb103[_0x51739b(0x175)];}function attachUpdateNotice(_0x464238,_0x2eb7cb){const _0x3e5cda=a90_0x4db250;if(!_0x2eb7cb||!_0x464238||typeof _0x464238!=='object')return _0x464238;const _0x37d06a=_0x464238,_0x3a7cbd=typeof _0x37d06a['_notice']===_0x3e5cda(0x146)&&_0x37d06a[_0x3e5cda(0x169)]!==null?_0x37d06a[_0x3e5cda(0x169)]:{};return{..._0x37d06a,'_notice':{..._0x3a7cbd,'update':_0x2eb7cb}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xff36f7,_0x2dcdb3){const _0x215569=a91_0x11b4,_0x511657=_0xff36f7();while(!![]){try{const _0x2ada65=parseInt(_0x215569(0x19c))/0x1+parseInt(_0x215569(0x1a0))/0x2*(parseInt(_0x215569(0x1a1))/0x3)+parseInt(_0x215569(0x1a4))/0x4*(-parseInt(_0x215569(0x1a5))/0x5)+-parseInt(_0x215569(0x1a6))/0x6+parseInt(_0x215569(0x199))/0x7+-parseInt(_0x215569(0x19e))/0x8*(-parseInt(_0x215569(0x196))/0x9)+-parseInt(_0x215569(0x197))/0xa;if(_0x2ada65===_0x2dcdb3)break;else _0x511657['push'](_0x511657['shift']());}catch(_0x5c3c3a){_0x511657['push'](_0x511657['shift']());}}}(a91_0x58f5,0x8cbf0));import{buildSchemaPayload as a91_0x98ca55}from'@lovrabet/cli-framework';function a91_0x11b4(_0x317cf4,_0x4bc4e0){_0x317cf4=_0x317cf4-0x195;const _0x58f5e8=a91_0x58f5();let _0x11b4b8=_0x58f5e8[_0x317cf4];return _0x11b4b8;}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a91_0x58f5(){const _0x54dd53=['4IEPhLU','978825fBJUbn','1134864nNbXot','../commands/registry.js','539739vlqFIW','17486790BfFONs','filter','6646654RFTLEl','auth','has','108330SOLkVi','map','88haPqZq','none','2SNMofJ','2977653HsGhox','service','services'];a91_0x58f5=function(){return _0x54dd53;};return a91_0x58f5();}import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x363a94=a91_0x11b4,{serviceRegistry:_0x5eb80a,findDefinition:_0x51cc40}=await import(_0x363a94(0x195)),_0xfbb434=new Set(_0x5eb80a['map'](_0x58afeb=>_0x58afeb[_0x363a94(0x1a2)])),_0x2047a7=listDynamicServiceEntries()[_0x363a94(0x198)](_0x4316df=>!_0xfbb434[_0x363a94(0x19b)](_0x4316df[_0x363a94(0x1a2)])),_0x5a0fdd=a91_0x98ca55({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x5eb80a,_0x2047a7),'buildAllFlags':buildAllFlags,'findDefinition':(_0x4052cd,_0x35b085)=>_0x51cc40(_0x4052cd,_0x35b085)??findDynamicServiceDefinition(_0x4052cd,_0x35b085)});return normalizeSchemaPayload(_0x5a0fdd);}function normalizeSchemaPayload(_0x28883f){const _0x1f9b17=a91_0x11b4;return{..._0x28883f,'schemaVersion':0x2,'services':_0x28883f[_0x1f9b17(0x1a3)][_0x1f9b17(0x19d)](_0xcaf30b=>({..._0xcaf30b,'commands':_0xcaf30b['commands'][_0x1f9b17(0x19d)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x253453){const _0x30e395=a91_0x11b4,_0x539b57=_0x253453;return{..._0x253453,'auth':_0x539b57[_0x30e395(0x19a)]??(_0x253453['requiresAuth']?'required':_0x30e395(0x19f))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ebcbe,_0x4f47e4){const _0xc3cbb2=a92_0x3803,_0xcf4500=_0x2ebcbe();while(!![]){try{const _0x179abc=parseInt(_0xc3cbb2(0xd8))/0x1+parseInt(_0xc3cbb2(0xde))/0x2+-parseInt(_0xc3cbb2(0xdb))/0x3*(-parseInt(_0xc3cbb2(0xdd))/0x4)+-parseInt(_0xc3cbb2(0xd6))/0x5+-parseInt(_0xc3cbb2(0xdc))/0x6*(-parseInt(_0xc3cbb2(0xd7))/0x7)+-parseInt(_0xc3cbb2(0xdf))/0x8*(-parseInt(_0xc3cbb2(0xda))/0x9)+-parseInt(_0xc3cbb2(0xe2))/0xa*(parseInt(_0xc3cbb2(0xe1))/0xb);if(_0x179abc===_0x4f47e4)break;else _0xcf4500['push'](_0xcf4500['shift']());}catch(_0x237934){_0xcf4500['push'](_0xcf4500['shift']());}}}(a92_0x49b5,0x873d1));function a92_0x3803(_0x47885f,_0x3d25a0){_0x47885f=_0x47885f-0xd6;const _0x49b586=a92_0x49b5();let _0x380353=_0x49b586[_0x47885f];return _0x380353;}function a92_0x49b5(){const _0x44b31a=['6808072skqlHn','slice','5527863iVVHcP','30BhkiTa','3987120GAlqGf','7siUjqc','861929fwWoNL','service','9vMqgxp','966822jYuHkH','561390iXgNEl','12FRwnmI','171270enEfvb'];a92_0x49b5=function(){return _0x44b31a;};return a92_0x49b5();}export function insertDynamicServicesAfterServiceTree(_0x43c824,_0x41d40e){const _0x5f0a29=a92_0x3803;if(_0x41d40e['length']===0x0)return[..._0x43c824];const _0x45e812=_0x43c824['findIndex'](_0x5baab0=>_0x5baab0[_0x5f0a29(0xd9)]===_0x5f0a29(0xd9));if(_0x45e812<0x0)return[..._0x43c824,..._0x41d40e];return[..._0x43c824[_0x5f0a29(0xe0)](0x0,_0x45e812+0x1),..._0x41d40e,..._0x43c824[_0x5f0a29(0xe0)](_0x45e812+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x419cba,_0x394ada){var _0x11f30a=a93_0x44df,_0x110def=_0x419cba();while(!![]){try{var _0x53fec1=-parseInt(_0x11f30a(0x1d5))/0x1*(parseInt(_0x11f30a(0x1de))/0x2)+-parseInt(_0x11f30a(0x1d8))/0x3+parseInt(_0x11f30a(0x1dc))/0x4*(-parseInt(_0x11f30a(0x1dd))/0x5)+-parseInt(_0x11f30a(0x1d6))/0x6+parseInt(_0x11f30a(0x1d7))/0x7+-parseInt(_0x11f30a(0x1db))/0x8+-parseInt(_0x11f30a(0x1da))/0x9*(-parseInt(_0x11f30a(0x1d9))/0xa);if(_0x53fec1===_0x394ada)break;else _0x110def['push'](_0x110def['shift']());}catch(_0x41f07b){_0x110def['push'](_0x110def['shift']());}}}(a93_0x363b,0xb7b40));function a93_0x363b(){var _0x3f9817=['50492EwhUnX','155YRVjxh','1886882PPVZsb','1uVHuOt','820032MTZfbM','5084163SLNeql','380745ojSNbB','9653170mLkdBb','18KLtYRT','2449232MEaERC'];a93_0x363b=function(){return _0x3f9817;};return a93_0x363b();}function a93_0x44df(_0x529a40,_0x32ed6e){_0x529a40=_0x529a40-0x1d5;var _0x363b85=a93_0x363b();var _0x44dfc5=_0x363b85[_0x529a40];return _0x44dfc5;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x316cc6=a94_0x187b;(function(_0x344524,_0x58f448){const _0x328060=a94_0x187b,_0x2a5fe5=_0x344524();while(!![]){try{const _0x317c12=-parseInt(_0x328060(0x108))/0x1*(-parseInt(_0x328060(0x105))/0x2)+parseInt(_0x328060(0x107))/0x3*(-parseInt(_0x328060(0xfd))/0x4)+parseInt(_0x328060(0x101))/0x5*(parseInt(_0x328060(0xfe))/0x6)+-parseInt(_0x328060(0x102))/0x7*(parseInt(_0x328060(0x106))/0x8)+-parseInt(_0x328060(0x103))/0x9*(-parseInt(_0x328060(0x104))/0xa)+-parseInt(_0x328060(0x10a))/0xb*(parseInt(_0x328060(0x10c))/0xc)+parseInt(_0x328060(0xff))/0xd;if(_0x317c12===_0x58f448)break;else _0x2a5fe5['push'](_0x2a5fe5['shift']());}catch(_0x4f1bbe){_0x2a5fe5['push'](_0x2a5fe5['shift']());}}}(a94_0x54bd,0xe7116));function a94_0x54bd(){const _0x261a8f=['12805288kKyaHF','3ZvuPOe','1526503NUAyQf','2026-07-18T08:32:27.464Z','11vcRIcu','v2.1.16-beta.1','16393560yYbPao','2623228xVplxh','48NiYzlY','11259768dHtuaW','ae86378','267470ymlSDV','7iNOKOw','99eWsLgq','1589510NYhvce','2WZptKP'];a94_0x54bd=function(){return _0x261a8f;};return a94_0x54bd();}export const VERSION='2.1.16-beta.1';export const GIT_TAG=a94_0x316cc6(0x10b);function a94_0x187b(_0x563384,_0x34e87c){_0x563384=_0x563384-0xfd;const _0x54bd18=a94_0x54bd();let _0x187b17=_0x54bd18[_0x563384];return _0x187b17;}export const GIT_COMMIT=a94_0x316cc6(0x100);export const BUILD_TIME=a94_0x316cc6(0x109);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b08ad,_0x1f6fa1){const _0x56ffc9=a95_0x4aed,_0x225d7c=_0x1b08ad();while(!![]){try{const _0x483ca6=parseInt(_0x56ffc9(0x16d))/0x1+parseInt(_0x56ffc9(0x173))/0x2+parseInt(_0x56ffc9(0x168))/0x3*(parseInt(_0x56ffc9(0x171))/0x4)+-parseInt(_0x56ffc9(0x170))/0x5+-parseInt(_0x56ffc9(0x16c))/0x6*(parseInt(_0x56ffc9(0x176))/0x7)+parseInt(_0x56ffc9(0x16b))/0x8+parseInt(_0x56ffc9(0x169))/0x9*(-parseInt(_0x56ffc9(0x16e))/0xa);if(_0x483ca6===_0x1f6fa1)break;else _0x225d7c['push'](_0x225d7c['shift']());}catch(_0x535a68){_0x225d7c['push'](_0x225d7c['shift']());}}}(a95_0x37dc,0x77a5e));function a95_0x37dc(){const _0x11ca73=['4jxFcgw','\x20--help','328410kzNQXa','green','\x20\x20Use\x20','175uPjqCV','2863611DJflga','603tRAGHv','\x20to\x20view\x20available\x20commands.','7198744UUOjzv','157980fWtDzG','667677ognDqP','210340WPdBnw','column','643280NneMMs'];a95_0x37dc=function(){return _0x11ca73;};return a95_0x37dc();}import{jsx as a95_0x533220,jsxs as a95_0x21390c}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a95_0x4aed(_0x378a19,_0x31b20c){_0x378a19=_0x378a19-0x168;const _0x37dc4f=a95_0x37dc();let _0x4aed49=_0x37dc4f[_0x378a19];return _0x4aed49;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x995c9e=a95_0x4aed,{exit:_0x4c748c}=useApp();return useEffect(()=>{_0x4c748c();},[_0x4c748c]),a95_0x21390c(Box,{'flexDirection':_0x995c9e(0x16f),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0x533220(Box,{'children':a95_0x533220(Text,{'bold':!![],'color':_0x995c9e(0x174),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x21390c(Box,{'marginTop':0x1,'children':[a95_0x533220(Text,{'dimColor':!![],'children':_0x995c9e(0x175)}),a95_0x533220(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x995c9e(0x172)}),a95_0x533220(Text,{'dimColor':!![],'children':_0x995c9e(0x16a)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a96_0x1b76dc=a96_0x474d;(function(_0x56a6f5,_0x32551a){const _0x2fa973=a96_0x474d,_0x16b93c=_0x56a6f5();while(!![]){try{const _0x3f7178=-parseInt(_0x2fa973(0xf5))/0x1+-parseInt(_0x2fa973(0xfb))/0x2+-parseInt(_0x2fa973(0xf8))/0x3*(-parseInt(_0x2fa973(0xf4))/0x4)+-parseInt(_0x2fa973(0xfe))/0x5+parseInt(_0x2fa973(0xff))/0x6*(parseInt(_0x2fa973(0xfd))/0x7)+-parseInt(_0x2fa973(0xed))/0x8+parseInt(_0x2fa973(0xf6))/0x9;if(_0x3f7178===_0x32551a)break;else _0x16b93c['push'](_0x16b93c['shift']());}catch(_0x2b4f3e){_0x16b93c['push'](_0x16b93c['shift']());}}}(a96_0x2fc5,0x7bfec));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a96_0x2fc5(){const _0x25f3e3=['6jjuZIc','add','exit\x20','skills','inherit','unknown','4476992pTMoOC','skipNpxSkillsEnvSuffix','pipe','trim','npx','log','stdout','2824oZLIeR','808181Spopkv','22904703VwubtD','status','4155xcKtDR','stderr','toString','1763844pLplgg','stdio','1557381FEzoWh','4938245SuDUqQ'];a96_0x2fc5=function(){return _0x25f3e3;};return a96_0x2fc5();}import{LOVRABET_SKILL_SOURCE as a96_0x3dfdf6}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x3dfdf6;function a96_0x474d(_0x55af0d,_0x2b665f){_0x55af0d=_0x55af0d-0xea;const _0x2fc501=a96_0x2fc5();let _0x474ddd=_0x2fc501[_0x55af0d];return _0x474ddd;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a96_0x1b76dc(0xee)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0xa98e40,_0xb1c46f=LOVRABET_SKILL_SOURCE,_0x37ecb9){const _0x1544bd=a96_0x1b76dc;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2fd99e=_0x37ecb9?.[_0x1544bd(0xfc)]??_0x1544bd(0xeb),_0x35824a=resolveNpmBin(_0x1544bd(0xf1)),_0x1ad442=[_0x1544bd(0xea),_0x1544bd(0x100),_0xb1c46f,'-g','-y'],_0x21047d=[_0x35824a,..._0x1ad442]['join']('\x20');console[_0x1544bd(0xf2)]('*\x20'+_0x21047d);const _0x117041=spawnSync(_0x35824a,_0x1ad442,{'cwd':_0xa98e40,'stdio':_0x2fd99e,'env':process.env,'shell':![]});if(_0x117041[_0x1544bd(0xf7)]===0x0)return{'ok':!![],'status':0x0};let _0x1d8897=_0x1544bd(0x101)+(_0x117041[_0x1544bd(0xf7)]??_0x1544bd(0xec));if(_0x2fd99e===_0x1544bd(0xef)){const _0x2fcebc=_0x117041['stderr']?_0x117041[_0x1544bd(0xf9)][_0x1544bd(0xfa)]()[_0x1544bd(0xf0)]():'',_0x313de8=_0x117041[_0x1544bd(0xf3)]?_0x117041[_0x1544bd(0xf3)]['toString']()[_0x1544bd(0xf0)]():'';if(_0x2fcebc)_0x1d8897=_0x2fcebc;else{if(_0x313de8)_0x1d8897=_0x313de8;}}return{'ok':![],'status':_0x117041[_0x1544bd(0xf7)]??null,'error':_0x1d8897};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0x13b9(){const _0x4fa203=['7rPOKxV','5518035IHpYJp','1270266UsUgEJ','162390CxpeWV','.svn','.git','3067536RJBdxB','.DS_Store','node_modules','build','.next','2063802GewhmW','.cache','.turbo','1845skBQOW','SKILL.md','.hg','17704yOrofn','dist','761680KMrpmN'];a97_0x13b9=function(){return _0x4fa203;};return a97_0x13b9();}const a97_0x289811=a97_0x284f;(function(_0x3d162c,_0x1371cf){const _0x24b697=a97_0x284f,_0x49a86a=_0x3d162c();while(!![]){try{const _0x140aa9=-parseInt(_0x24b697(0x7a))/0x1+parseInt(_0x24b697(0x72))/0x2+parseInt(_0x24b697(0x7e))/0x3+parseInt(_0x24b697(0x81))/0x4+-parseInt(_0x24b697(0x7c))/0x5+parseInt(_0x24b697(0x7d))/0x6*(parseInt(_0x24b697(0x7b))/0x7)+-parseInt(_0x24b697(0x78))/0x8*(-parseInt(_0x24b697(0x75))/0x9);if(_0x140aa9===_0x1371cf)break;else _0x49a86a['push'](_0x49a86a['shift']());}catch(_0x4f2c2f){_0x49a86a['push'](_0x49a86a['shift']());}}}(a97_0x13b9,0x9f6cc));function a97_0x284f(_0x18e77e,_0x2f3a78){_0x18e77e=_0x18e77e-0x71;const _0x13b934=a97_0x13b9();let _0x284f7f=_0x13b934[_0x18e77e];return _0x284f7f;}export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a97_0x289811(0x76);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x289811(0x82)]);export const IGNORED_DIR_NAMES=new Set([a97_0x289811(0x80),a97_0x289811(0x77),a97_0x289811(0x7f),a97_0x289811(0x83),a97_0x289811(0x71),a97_0x289811(0x79),a97_0x289811(0x84),'coverage',a97_0x289811(0x74),a97_0x289811(0x73)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0xd3b3(_0x5b2c1e,_0x30cfed){_0x5b2c1e=_0x5b2c1e-0xe4;const _0x1959ca=a98_0x1959();let _0xd3b39e=_0x1959ca[_0x5b2c1e];return _0xd3b39e;}(function(_0x364267,_0x4a1078){const _0x3f701b=a98_0xd3b3,_0x42d3bb=_0x364267();while(!![]){try{const _0x3d5ef7=-parseInt(_0x3f701b(0xf2))/0x1+-parseInt(_0x3f701b(0xeb))/0x2*(-parseInt(_0x3f701b(0xe5))/0x3)+parseInt(_0x3f701b(0xf4))/0x4+-parseInt(_0x3f701b(0xe7))/0x5*(parseInt(_0x3f701b(0xe8))/0x6)+-parseInt(_0x3f701b(0xec))/0x7*(-parseInt(_0x3f701b(0xf6))/0x8)+parseInt(_0x3f701b(0xe9))/0x9*(-parseInt(_0x3f701b(0xee))/0xa)+-parseInt(_0x3f701b(0xf0))/0xb;if(_0x3d5ef7===_0x4a1078)break;else _0x42d3bb['push'](_0x42d3bb['shift']());}catch(_0x1c006d){_0x42d3bb['push'](_0x42d3bb['shift']());}}}(a98_0x1959,0xbbd82));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a98_0x1959(){const _0x7d826d=['5143624QhXlHS','split','8344SgeVwG','validation','18558dSbOJB','startsWith','5ywVNqU','1468962sQNtZK','9KraDZS','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','62JxoTxP','9793BdNQbQ','isSymbolicLink','1537630NqDxpQ','from','2613204vAquyD','utf8','1531265wHUvLt','endsWith'];a98_0x1959=function(){return _0x7d826d;};return a98_0x1959();}export function resolveManagedFilePath(_0x3501d6,_0x5e2590){const _0x48fbf8=a98_0xd3b3,_0x347bcd=normalizeSkillRelativePath(_0x5e2590),_0x566cfc=realOrResolved(_0x3501d6),_0x327d73=resolve(_0x566cfc,..._0x347bcd['split']('/'));if(!isPathInside(_0x327d73,_0x566cfc))throw CliErrors[_0x48fbf8(0xe4)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5e2590);return ensureNoSymlinkInManagedPath(_0x566cfc,_0x347bcd),_0x327d73;}export function ensureNoSymlinkInManagedPath(_0x1ab54a,_0x13d010){const _0x5ce396=a98_0xd3b3;let _0x7a57da=_0x1ab54a;for(const _0x38c642 of _0x13d010[_0x5ce396(0xf5)]('/')){_0x7a57da=resolve(_0x7a57da,_0x38c642);const _0x252835=lstatIfPresent(_0x7a57da);if(_0x252835?.[_0x5ce396(0xed)]())throw CliErrors[_0x5ce396(0xe4)](_0x5ce396(0xea)+_0x13d010);}}export function isDanglingSymlink(_0x2a2e63){const _0xb4c64b=a98_0xd3b3;try{return lstatSync(_0x2a2e63)[_0xb4c64b(0xed)]();}catch{return![];}}export function resolveSymlinkTarget(_0x5685b3){const _0x47a9bd=readlinkSync(_0x5685b3);return isAbsolute(_0x47a9bd)?_0x47a9bd:resolve(dirname(_0x5685b3),_0x47a9bd);}export function isPathInside(_0x134a6f,_0x7b738f){const _0x1b6862=a98_0xd3b3,_0x287442=_0x134a6f['endsWith'](sep)?_0x134a6f:''+_0x134a6f+sep,_0x19dcb5=_0x7b738f[_0x1b6862(0xf3)](sep)?_0x7b738f:''+_0x7b738f+sep;return _0x134a6f===_0x7b738f||_0x287442[_0x1b6862(0xe6)](_0x19dcb5);}export function realOrResolved(_0x1062f6){try{return realpathSync(_0x1062f6);}catch{return resolve(_0x1062f6);}}export function lstatIfPresent(_0x1c4067){try{return lstatSync(_0x1c4067);}catch{return undefined;}}export function writeTextAtomic(_0x438b06,_0x85b72,_0x17523a){const _0x4a2750=a98_0xd3b3;writeBytesAtomic(_0x438b06,Buffer[_0x4a2750(0xef)](_0x85b72,_0x4a2750(0xf1)),_0x17523a);}export function writeBytesAtomic(_0x36f3bd,_0x4cdd20,_0x5999a6){const _0x3a2a5c=_0x36f3bd+'.tmp';try{writeFileSync(_0x3a2a5c,_0x4cdd20,{'mode':_0x5999a6}),renameSync(_0x3a2a5c,_0x36f3bd);}catch(_0x3d82a3){try{rmSync(_0x3a2a5c,{'force':!![]});}catch{}throw _0x3d82a3;}}export function writeJsonAtomic(_0x2cc315,_0x4c707e){writeTextAtomic(_0x2cc315,JSON['stringify'](_0x4c707e,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4982fd,_0x1c0605){const _0x2a7e75=a99_0xcf15,_0x49284b=_0x4982fd();while(!![]){try{const _0x4eb4fd=parseInt(_0x2a7e75(0x160))/0x1+parseInt(_0x2a7e75(0x16c))/0x2*(parseInt(_0x2a7e75(0x169))/0x3)+-parseInt(_0x2a7e75(0x162))/0x4+parseInt(_0x2a7e75(0x164))/0x5*(parseInt(_0x2a7e75(0x166))/0x6)+parseInt(_0x2a7e75(0x16b))/0x7*(-parseInt(_0x2a7e75(0x16d))/0x8)+-parseInt(_0x2a7e75(0x15c))/0x9*(-parseInt(_0x2a7e75(0x165))/0xa)+-parseInt(_0x2a7e75(0x15e))/0xb*(parseInt(_0x2a7e75(0x16a))/0xc);if(_0x4eb4fd===_0x1c0605)break;else _0x49284b['push'](_0x49284b['shift']());}catch(_0x8a1640){_0x49284b['push'](_0x49284b['shift']());}}}(a99_0x5a24,0xad241));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a99_0xcf15(_0x5675f3,_0x44e19e){_0x5675f3=_0x5675f3-0x15c;const _0x5a2464=a99_0x5a24();let _0xcf152c=_0x5a2464[_0x5675f3];return _0xcf152c;}export function contentHash(_0xa41e1a){const _0x3ccea9=a99_0xcf15;return createHash(_0x3ccea9(0x163))['update'](_0xa41e1a)[_0x3ccea9(0x15d)]('hex');}function a99_0x5a24(){const _0x2c6feb=['9bLkIIP','digest','704kyFxXw','path','852217ckWDKC','hex','5308140khWxJJ','sha256','5vpTylV','11947330uAbVQr','8342454cvwUnq','size','update','166101NUpHrL','251868EteFHX','7wMSvwI','48qqfGfs','11093208eaDVlr'];a99_0x5a24=function(){return _0x2c6feb;};return a99_0x5a24();}export function fileHash(_0x160bc4){return bufferSha256(fileContent(_0x160bc4));}export function bufferSha256(_0x20c635){const _0x76bd80=a99_0xcf15;return createHash('sha256')[_0x76bd80(0x168)](_0x20c635)[_0x76bd80(0x15d)](_0x76bd80(0x161));}export function fileTreeHash(_0xf47f8d){const _0xf13124=a99_0xcf15,_0x3126f4=createHash(_0xf13124(0x163));for(const _0x542f3f of normalizeManifestFiles(_0xf47f8d)){_0x3126f4[_0xf13124(0x168)](_0x542f3f[_0xf13124(0x15f)]),_0x3126f4[_0xf13124(0x168)]('\x00'),_0x3126f4['update'](_0x542f3f[_0xf13124(0x163)]),_0x3126f4[_0xf13124(0x168)]('\x00'),_0x3126f4[_0xf13124(0x168)](String(_0x542f3f[_0xf13124(0x167)])),_0x3126f4[_0xf13124(0x168)]('\x00');}return _0x3126f4[_0xf13124(0x15d)]('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x311194,_0x5f7ac){const _0x52682c=a100_0x489a,_0xe4bea1=_0x311194();while(!![]){try{const _0xd91e4e=parseInt(_0x52682c(0x9c))/0x1*(-parseInt(_0x52682c(0x9e))/0x2)+parseInt(_0x52682c(0x9f))/0x3+parseInt(_0x52682c(0x94))/0x4*(parseInt(_0x52682c(0x74))/0x5)+parseInt(_0x52682c(0x95))/0x6*(parseInt(_0x52682c(0x8d))/0x7)+parseInt(_0x52682c(0x87))/0x8+parseInt(_0x52682c(0x70))/0x9*(parseInt(_0x52682c(0x73))/0xa)+-parseInt(_0x52682c(0x7d))/0xb;if(_0xd91e4e===_0x5f7ac)break;else _0xe4bea1['push'](_0xe4bea1['shift']());}catch(_0x13cdf9){_0xe4bea1['push'](_0xe4bea1['shift']());}}}(a100_0x42c2,0xb897e));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a100_0x5263f6 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x5263f6;export function linkEffectiveRuntimeSkills(_0x2a712a,_0x3ab98d,_0x319f89={}){const _0x2b4786=a100_0x489a,_0x54b467=new Map();for(const _0x4179be of _0x2a712a){const _0x1330f1=_0x4179be[_0x2b4786(0x85)][_0x2b4786(0x91)];if(!_0x1330f1)continue;const _0x49bd1e=_0x54b467[_0x2b4786(0x7e)](_0x1330f1);(!_0x49bd1e||_0x4179be['scope']==='personal')&&_0x54b467[_0x2b4786(0x76)](_0x1330f1,_0x4179be);}const _0x5ca4ab=[],_0x1757e0=resolveSkillSyncPaths(_0x319f89);for(const _0x4f2765 of _0x54b467[_0x2b4786(0x8c)]()){const _0x26a391=requireSkillCode(_0x4f2765[_0x2b4786(0x85)]),_0x354786=_0x3ab98d+'--'+_0x26a391;for(const _0x5481bd of runtimeAgentSkillRoots(_0x1757e0)){_0x5ca4ab[_0x2b4786(0x86)](ensureManagedSymlink(resolve(_0x5481bd,_0x354786),_0x4f2765[_0x2b4786(0x8e)],_0x1757e0[_0x2b4786(0x82)]));}}return _0x5ca4ab;}export function pruneStaleRuntimeSkillLinks(_0x275444,_0x5cd962,_0x4f9109={},_0x23fdf1){const _0x5aa00c=a100_0x489a,_0x59b72f=resolveSkillSyncPaths(_0x4f9109),_0xccf77a=new Set([..._0x5cd962][_0x5aa00c(0x93)](_0x5ba55a=>_0x5ba55a[_0x5aa00c(0x88)]())[_0x5aa00c(0x7c)](Boolean)),_0x574192=_0x23fdf1?new Set([..._0x23fdf1][_0x5aa00c(0x93)](_0x239c03=>_0x239c03[_0x5aa00c(0x88)]())[_0x5aa00c(0x7c)](Boolean)):undefined,_0x4f4b49=[];for(const _0x379c1e of runtimeAgentSkillRoots(_0x59b72f)){for(const _0x50da08 of managedAppSkillLinkPaths(_0x379c1e,_0x275444)){const _0x242af4=basename(_0x50da08)['slice']((_0x275444+'--')[_0x5aa00c(0x8f)]);if(_0x574192&&!_0x574192[_0x5aa00c(0x99)](_0x242af4))continue;if(_0xccf77a[_0x5aa00c(0x99)](_0x242af4))continue;_0x4f4b49[_0x5aa00c(0x86)](removeManagedSkillLink(_0x50da08,_0x59b72f[_0x5aa00c(0x82)]));}}return _0x4f4b49;}export function pruneStaleRuntimeSkillCache(_0x232881,_0x529f34={}){const _0x492180=a100_0x489a,_0x5a0419=new Set([..._0x232881['activeSkillCodes']][_0x492180(0x93)](_0x17d03b=>_0x17d03b[_0x492180(0x88)]())['filter'](Boolean)),_0x2a0b1e=_0x232881['pruneSkillCodes']?new Set([..._0x232881[_0x492180(0x84)]][_0x492180(0x93)](_0x248e16=>_0x248e16[_0x492180(0x88)]())[_0x492180(0x7c)](Boolean)):undefined,_0x248589=_0x232881[_0x492180(0x79)]??[_0x492180(0x75),_0x492180(0x81)],_0x1cf4b6=resolve(getRuntimeSkillCacheRoot(_0x232881[_0x492180(0x7f)],_0x232881['accessKey'],_0x529f34),safePathSegment(_0x232881['appCode'],_0x492180(0xa0))),_0x2d3d46=[];for(const _0x58ef20 of _0x248589){const _0x592cb5=resolve(_0x1cf4b6,_0x58ef20);if(!existsSync(_0x592cb5))continue;for(const _0x347552 of readdirSync(_0x592cb5,{'withFileTypes':!![]})){if(!_0x347552['isDirectory']())continue;const _0x945e67=_0x347552['name'];if(_0x2a0b1e&&!_0x2a0b1e[_0x492180(0x99)](_0x945e67))continue;if(_0x5a0419['has'](_0x945e67))continue;const _0x75c722=resolve(_0x592cb5,_0x945e67),_0x2e5517=readMetadataIfPresent(resolve(_0x75c722,METADATA_FILE));if(_0x2e5517?.['appCode']!==_0x232881[_0x492180(0xa0)]||_0x2e5517['scope']!==_0x58ef20||_0x2e5517['skillCode']!==_0x945e67){_0x2d3d46[_0x492180(0x86)]({'path':_0x75c722,'action':_0x492180(0x77),'reason':_0x492180(0x8a)});continue;}removeSync(_0x75c722),_0x2d3d46[_0x492180(0x86)]({'path':_0x75c722,'action':_0x492180(0x98)});}}return _0x2d3d46;}function a100_0x42c2(){const _0x24bee4=['push','11804912djOTpY','trim','isDirectory','metadata-mismatch','contentHash','values','287MElQha','dir','length','builtin','skillCode','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','map','9000czByhY','139242LDHgmq','scope','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','has','validation','not-managed-symlink','556757fkrXda','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','4vSpOWW','3713550oEoBmU','appCode','306cwMVBJ','isSymbolicLink','startsWith','122510ecNMId','1025NiyKOQ','personal','set','skipped','name','scopes','agentsSkillsDir','external-symlink','filter','29404397wPPzgW','get','env','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','company','managedRoot','created','pruneSkillCodes','skill'];a100_0x42c2=function(){return _0x24bee4;};return a100_0x42c2();}export function linkGlobalRuntimeSkills(_0x57f528,_0x535a4c={}){const _0x252997=a100_0x489a,_0x2dc1b2=resolveSkillSyncPaths(_0x535a4c),_0x4d31ea=[];for(const _0x512d6d of _0x57f528){if(_0x512d6d['scope']!==_0x252997(0x90))throw CliErrors[_0x252997(0x9a)](_0x252997(0x80)+_0x512d6d[_0x252997(0x96)]);const _0x33c2e3=requireSkillCode(_0x512d6d[_0x252997(0x85)]),_0x3f7da1=copyManagedSkillDirectory(_0x512d6d['dir'],resolve(_0x2dc1b2[_0x252997(0x7a)],_0x33c2e3));_0x4d31ea['push']({..._0x3f7da1,'contentHash':_0x512d6d[_0x252997(0x8b)]});}return _0x4d31ea;}function ensureManagedSymlink(_0x4dacbb,_0x3a018c,_0x4214b1){const _0x1bee3e=a100_0x489a;mkdirSync(dirname(_0x4dacbb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4dacbb)||isDanglingSymlink(_0x4dacbb)){const _0x459ccc=lstatSync(_0x4dacbb);if(!_0x459ccc[_0x1bee3e(0x71)]())throw CliErrors[_0x1bee3e(0x9a)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x4dacbb);const _0x48d0f9=resolveSymlinkTarget(_0x4dacbb);if(!isPathInside(realOrResolved(_0x48d0f9),realOrResolved(_0x4214b1)))throw CliErrors[_0x1bee3e(0x9a)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x4dacbb);if(realOrResolved(_0x48d0f9)===realOrResolved(_0x3a018c))return{'path':_0x4dacbb,'target':_0x3a018c,'action':'unchanged'};return unlinkSync(_0x4dacbb),symlinkSync(_0x3a018c,_0x4dacbb,_0x1bee3e(0x8e)),{'path':_0x4dacbb,'target':_0x3a018c,'action':'updated'};}return symlinkSync(_0x3a018c,_0x4dacbb,_0x1bee3e(0x8e)),{'path':_0x4dacbb,'target':_0x3a018c,'action':_0x1bee3e(0x83)};}function managedAppSkillLinkPaths(_0x4feb9a,_0xba82d0){const _0x41a197=a100_0x489a;if(!existsSync(_0x4feb9a))return[];const _0xf2d99f=_0xba82d0+'--';return readdirSync(_0x4feb9a,{'withFileTypes':!![]})[_0x41a197(0x7c)](_0x499802=>_0x499802[_0x41a197(0x78)][_0x41a197(0x72)](_0xf2d99f))[_0x41a197(0x93)](_0x23deb7=>resolve(_0x4feb9a,_0x23deb7[_0x41a197(0x78)]));}function a100_0x489a(_0x172a1e,_0x413970){_0x172a1e=_0x172a1e-0x70;const _0x42c258=a100_0x42c2();let _0x489ae2=_0x42c258[_0x172a1e];return _0x489ae2;}function removeManagedSkillLink(_0x215e17,_0x44b149){const _0x55ad99=a100_0x489a,_0x5b24f9=lstatIfPresent(_0x215e17);if(!_0x5b24f9?.[_0x55ad99(0x71)]())return{'path':_0x215e17,'action':_0x55ad99(0x77),'reason':_0x55ad99(0x9b)};const _0xff0bb1=resolveSymlinkTarget(_0x215e17);if(!isPathInside(realOrResolved(_0xff0bb1),realOrResolved(_0x44b149)))return{'path':_0x215e17,'action':'skipped','reason':_0x55ad99(0x7b)};return unlinkSync(_0x215e17),{'path':_0x215e17,'action':_0x55ad99(0x98)};}export function copyManagedSkillDirectory(_0x276c47,_0x399e86){const _0x170d34=a100_0x489a,_0x49aa32=resolve(_0x399e86,METADATA_FILE),_0x2b162b=existsSync(_0x399e86);if(_0x2b162b){const _0x37e128=lstatSync(_0x399e86);if(_0x37e128[_0x170d34(0x71)]())throw CliErrors[_0x170d34(0x9a)](_0x170d34(0x9d)+_0x399e86);if(!_0x37e128[_0x170d34(0x89)]())throw CliErrors[_0x170d34(0x9a)](_0x170d34(0x92)+_0x399e86);const _0x63c964=readMetadataIfPresent(_0x49aa32);if(_0x63c964?.[_0x170d34(0x96)]!==_0x170d34(0x90))throw CliErrors[_0x170d34(0x9a)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x399e86);}ensureDirSync(dirname(_0x399e86));const _0x36bf79=_0x2b162b?readMetadataIfPresent(_0x49aa32)?.[_0x170d34(0x8b)]:undefined,_0x39bf16=readMetadataIfPresent(resolve(_0x276c47,METADATA_FILE))?.[_0x170d34(0x8b)];return _0x2b162b&&removeSync(_0x399e86),copySkillDirectory(_0x276c47,_0x399e86),{'path':_0x399e86,'target':_0x276c47,'action':!_0x2b162b?_0x170d34(0x83):_0x36bf79===_0x39bf16?'unchanged':'updated'};}function copySkillDirectory(_0x4861f7,_0x320bb6){copySync(_0x4861f7,_0x320bb6,{'dereference':![],'overwrite':!![],'filter'(_0x260862){const _0xbcc43f=a100_0x489a;if(lstatSync(_0x260862)['isSymbolicLink']())throw CliErrors[_0xbcc43f(0x9a)](_0xbcc43f(0x97)+_0x260862);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54b476,_0x11c8e2){const _0x37527f=a101_0x5139,_0x4b51d4=_0x54b476();while(!![]){try{const _0x532b9c=parseInt(_0x37527f(0x10f))/0x1+parseInt(_0x37527f(0x106))/0x2+-parseInt(_0x37527f(0xfc))/0x3*(parseInt(_0x37527f(0xf0))/0x4)+-parseInt(_0x37527f(0x103))/0x5+-parseInt(_0x37527f(0x10c))/0x6+parseInt(_0x37527f(0xf8))/0x7+parseInt(_0x37527f(0xf6))/0x8*(parseInt(_0x37527f(0x105))/0x9);if(_0x532b9c===_0x11c8e2)break;else _0x4b51d4['push'](_0x4b51d4['shift']());}catch(_0x5c4d59){_0x4b51d4['push'](_0x4b51d4['shift']());}}}(a101_0x17a7,0x1ae2d));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a101_0x17a7(){const _0x19e91e=['from','cache','code','scope','skillMdPath','includes','4AoposB','map','metadataPath','set','push','cacheDir','8aYDaAW','builtin','1309014nUwYpC','skillCode','local','linkedPaths','309357ExfMRL','trim','filter','has','startsWith','appCode','get','974390AcgXnQ','accessKey','311247obIEEH','128780ZVDDBT','sort','scopes','dir','localeCompare','name','94698RUxTKC','linkedPath','tags','137930CczWak','values','isDirectory','source'];a101_0x17a7=function(){return _0x19e91e;};return a101_0x17a7();}function a101_0x5139(_0x2ec5b6,_0x213bb6){_0x2ec5b6=_0x2ec5b6-0xed;const _0x17a746=a101_0x17a7();let _0x513959=_0x17a746[_0x2ec5b6];return _0x513959;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x48f112,_0x2ba6e5={}){const _0x1382e1=a101_0x5139,_0x36108c=safePathSegment(_0x48f112[_0x1382e1(0x101)],_0x1382e1(0x101)),_0x3f2ae4=normalizeRuntimeSkillScopes(_0x48f112[_0x1382e1(0x108)]),_0x279ad0=new Set(_0x3f2ae4),_0x1c0e89=_0x48f112[_0x1382e1(0x115)]?.['trim'](),_0x5ef69a=new Map(),_0x565c87=resolve(getRuntimeSkillCacheRoot(_0x48f112['env'],_0x48f112[_0x1382e1(0x104)],_0x2ba6e5),_0x36108c);for(const _0x1b1bc4 of _0x3f2ae4){for(const _0x5b4fe4 of localSkillEntryDirs(resolve(_0x565c87,_0x1b1bc4))){collectLocalRuntimeSkill(_0x5ef69a,_0x5b4fe4,{'appCode':_0x36108c,'scopes':_0x279ad0,'code':_0x1c0e89,'source':_0x1382e1(0x114)});}}const _0x9c74c0=resolveSkillSyncPaths(_0x2ba6e5);for(const _0x2f1b0d of runtimeAgentSkillRoots(_0x9c74c0)){for(const _0x390a56 of localSkillLinkCandidates(_0x2f1b0d,_0x36108c,_0x279ad0)){collectLocalRuntimeSkill(_0x5ef69a,_0x390a56,{'appCode':_0x36108c,'scopes':_0x279ad0,'code':_0x1c0e89,'source':'link','linkedPath':_0x390a56});}}return Array[_0x1382e1(0x113)](_0x5ef69a[_0x1382e1(0x110)]())[_0x1382e1(0x107)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x448a88){const _0x4f1175=a101_0x5139;if(!existsSync(_0x448a88))return[];return readdirSync(_0x448a88,{'withFileTypes':!![]})[_0x4f1175(0xfe)](_0x13b1cd=>_0x13b1cd[_0x4f1175(0x111)]()||_0x13b1cd['isSymbolicLink']())[_0x4f1175(0xf1)](_0x264337=>resolve(_0x448a88,_0x264337[_0x4f1175(0x10b)]));}function localSkillLinkCandidates(_0x4a774a,_0x40eaf9,_0x2a8616){const _0x2e4ecf=a101_0x5139;if(!existsSync(_0x4a774a))return[];const _0x50fb77=_0x40eaf9+'--';return readdirSync(_0x4a774a,{'withFileTypes':!![]})[_0x2e4ecf(0xfe)](_0xca38f9=>_0xca38f9[_0x2e4ecf(0x111)]()||_0xca38f9['isSymbolicLink']())[_0x2e4ecf(0xfe)](_0x33cc05=>_0x33cc05[_0x2e4ecf(0x10b)][_0x2e4ecf(0x100)](_0x50fb77)||_0x2a8616[_0x2e4ecf(0xff)](_0x2e4ecf(0xf7)))[_0x2e4ecf(0xf1)](_0x314449=>resolve(_0x4a774a,_0x314449[_0x2e4ecf(0x10b)]));}function collectLocalRuntimeSkill(_0x1ed90d,_0x2780b1,_0x3bab4a){const _0x19221a=a101_0x5139,_0x3415c3=resolve(_0x2780b1,METADATA_FILE),_0x2a6451=readMetadataIfPresent(_0x3415c3);if(!_0x2a6451)return;if(_0x2a6451['appCode']!==_0x3bab4a[_0x19221a(0x101)])return;if(!isRuntimeSkillScope(_0x2a6451[_0x19221a(0xed)])||!_0x3bab4a[_0x19221a(0x108)][_0x19221a(0xff)](_0x2a6451[_0x19221a(0xed)]))return;const _0x3dc832=_0x2a6451[_0x19221a(0xf9)]?.[_0x19221a(0xfd)]();if(!_0x3dc832)return;if(_0x3bab4a[_0x19221a(0x115)]&&_0x3dc832!==_0x3bab4a['code'])return;const _0x4008c9=_0x2a6451[_0x19221a(0xed)]+':'+_0x3dc832,_0xacc19f=_0x3bab4a[_0x19221a(0x10d)]?[_0x3bab4a[_0x19221a(0x10d)]]:[],_0x2f82b0=_0x1ed90d[_0x19221a(0x102)](_0x4008c9);if(_0x2f82b0){_0x3bab4a[_0x19221a(0x112)]===_0x19221a(0x114)&&(_0x2f82b0[_0x19221a(0x109)]=_0x2780b1,_0x2f82b0[_0x19221a(0xf5)]=_0x2780b1,_0x2f82b0[_0x19221a(0xee)]=resolve(_0x2780b1,SKILL_FILE),_0x2f82b0[_0x19221a(0xf2)]=_0x3415c3);for(const _0x40e75b of _0xacc19f){!_0x2f82b0[_0x19221a(0xfb)][_0x19221a(0xef)](_0x40e75b)&&_0x2f82b0[_0x19221a(0xfb)][_0x19221a(0xf4)](_0x40e75b);}_0x2f82b0[_0x19221a(0xfb)][_0x19221a(0x107)]();return;}_0x1ed90d[_0x19221a(0xf3)](_0x4008c9,{..._0x2a6451,'tags':Array['isArray'](_0x2a6451[_0x19221a(0x10e)])?_0x2a6451['tags']:[],'scope':_0x2a6451['scope'],'source':_0x19221a(0xfa),'dir':_0x2780b1,'cacheDir':_0x3bab4a['source']===_0x19221a(0x114)?_0x2780b1:undefined,'skillMdPath':resolve(_0x2780b1,SKILL_FILE),'metadataPath':_0x3415c3,'linkedPaths':_0xacc19f});}function compareLocalRuntimeSkills(_0xbb6af0,_0x5901c1){const _0x2fcfaf=a101_0x5139,_0x197cd5={'personal':0x0,'company':0x1,'builtin':0x2};return _0x197cd5[_0xbb6af0[_0x2fcfaf(0xed)]]-_0x197cd5[_0x5901c1[_0x2fcfaf(0xed)]]||_0xbb6af0[_0x2fcfaf(0xf9)][_0x2fcfaf(0x10a)](_0x5901c1[_0x2fcfaf(0xf9)])||_0xbb6af0['dir'][_0x2fcfaf(0x10a)](_0x5901c1[_0x2fcfaf(0x109)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d5250,_0x5c0956){const _0x2f67be=a102_0x1284,_0x523ecd=_0x4d5250();while(!![]){try{const _0x3577bb=parseInt(_0x2f67be(0x189))/0x1*(parseInt(_0x2f67be(0x15d))/0x2)+-parseInt(_0x2f67be(0x188))/0x3+parseInt(_0x2f67be(0x17e))/0x4+parseInt(_0x2f67be(0x17b))/0x5+-parseInt(_0x2f67be(0x15e))/0x6+-parseInt(_0x2f67be(0x16d))/0x7*(-parseInt(_0x2f67be(0x187))/0x8)+-parseInt(_0x2f67be(0x16a))/0x9*(parseInt(_0x2f67be(0x175))/0xa);if(_0x3577bb===_0x5c0956)break;else _0x523ecd['push'](_0x523ecd['shift']());}catch(_0x119939){_0x523ecd['push'](_0x523ecd['shift']());}}}(a102_0x1513,0x355a9));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x36859c){const _0x15dca0=a102_0x1284;return _0x36859c[_0x15dca0(0x184)]??Buffer[_0x15dca0(0x179)](_0x36859c[_0x15dca0(0x15c)]??'',_0x15dca0(0x16c));}export function fileText(_0x5b11b2){const _0x49def3=a102_0x1284;return fileContent(_0x5b11b2)['toString'](_0x49def3(0x16c));}function a102_0x1284(_0x4febf3,_0x5e6c06){_0x4febf3=_0x4febf3-0x15b;const _0x1513dd=a102_0x1513();let _0x128499=_0x1513dd[_0x4febf3];return _0x128499;}export function normalizeLocalFiles(_0x5cbf3a){const _0x3b71cd=a102_0x1284;if(!Array[_0x3b71cd(0x17f)](_0x5cbf3a)||_0x5cbf3a[_0x3b71cd(0x166)]===0x0)return[];const _0x57a6a1=new Map();for(const _0x3ac03c of _0x5cbf3a){if(!_0x3ac03c||typeof _0x3ac03c!==_0x3b71cd(0x161)||typeof _0x3ac03c[_0x3b71cd(0x178)]!==_0x3b71cd(0x177))throw CliErrors['validation'](_0x3b71cd(0x17c));const _0x3ceb4d=normalizeSkillRelativePath(_0x3ac03c[_0x3b71cd(0x178)]);if(_0x57a6a1['has'](_0x3ceb4d))throw CliErrors['validation'](_0x3b71cd(0x16f)+_0x3ceb4d);if(_0x3ac03c['bytes']!==undefined&&!Buffer[_0x3b71cd(0x162)](_0x3ac03c[_0x3b71cd(0x184)]))throw CliErrors[_0x3b71cd(0x172)](_0x3b71cd(0x15b)+_0x3ceb4d);if(_0x3ac03c[_0x3b71cd(0x184)]===undefined&&typeof _0x3ac03c[_0x3b71cd(0x15c)]!==_0x3b71cd(0x177))throw CliErrors[_0x3b71cd(0x172)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x3ceb4d);const _0x36cbb1=fileContent(_0x3ac03c);_0x57a6a1[_0x3b71cd(0x182)](_0x3ceb4d,{'path':_0x3ceb4d,'bytes':_0x36cbb1});}return Array[_0x3b71cd(0x179)](_0x57a6a1['values']())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x36aea0){const _0x5b72eb=a102_0x1284;if(!Array[_0x5b72eb(0x17f)](_0x36aea0)||_0x36aea0['length']===0x0)return[];const _0x4f335a=new Map();for(const _0xc1d439 of _0x36aea0){if(!_0xc1d439||typeof _0xc1d439!==_0x5b72eb(0x161)||typeof _0xc1d439[_0x5b72eb(0x178)]!==_0x5b72eb(0x177))throw CliErrors[_0x5b72eb(0x172)](_0x5b72eb(0x17c));const _0x2bed92=normalizeSkillRelativePath(_0xc1d439[_0x5b72eb(0x178)]);if(_0x4f335a[_0x5b72eb(0x180)](_0x2bed92))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x2bed92);if(!isSha256Hex(_0xc1d439['sha256']))throw CliErrors[_0x5b72eb(0x172)](_0x5b72eb(0x16b)+_0x2bed92);if(!Number[_0x5b72eb(0x16e)](_0xc1d439[_0x5b72eb(0x174)])||_0xc1d439['size']<0x0)throw CliErrors[_0x5b72eb(0x172)](_0x5b72eb(0x171)+_0x2bed92);_0x4f335a[_0x5b72eb(0x182)](_0x2bed92,{'path':_0x2bed92,'sha256':_0xc1d439[_0x5b72eb(0x164)][_0x5b72eb(0x168)](),'size':_0xc1d439[_0x5b72eb(0x174)]});}return Array[_0x5b72eb(0x179)](_0x4f335a[_0x5b72eb(0x170)]())[_0x5b72eb(0x169)](compareSkillFiles);}export function scanSkillDirectory(_0x2f3a38){const _0x100a95=realpathSync(_0x2f3a38),_0x104297=[];function _0x498d7f(_0x2ee9ae){const _0x847d02=a102_0x1284,_0x57fec1=readdirSync(_0x2ee9ae,{'withFileTypes':!![]})[_0x847d02(0x169)]((_0x2f08cb,_0x26a167)=>_0x2f08cb[_0x847d02(0x17d)][_0x847d02(0x186)](_0x26a167['name']));for(const _0x2e15cd of _0x57fec1){if(_0x2e15cd[_0x847d02(0x173)]()&&IGNORED_DIR_NAMES[_0x847d02(0x180)](_0x2e15cd[_0x847d02(0x17d)]))continue;if(IGNORED_FILE_NAMES['has'](_0x2e15cd[_0x847d02(0x17d)]))continue;const _0x21f898=resolve(_0x2ee9ae,_0x2e15cd[_0x847d02(0x17d)]);if(_0x2e15cd[_0x847d02(0x15f)]())throw CliErrors[_0x847d02(0x172)](_0x847d02(0x183)+_0x21f898);const _0x5edc7b=toPosixPath(relative(_0x100a95,_0x21f898));if(_0x2e15cd[_0x847d02(0x173)]()){_0x498d7f(_0x21f898);continue;}if(!_0x2e15cd['isFile']())continue;validateSkillRelativePath(_0x5edc7b);const _0x13468b=readFileSync(_0x21f898);_0x104297[_0x847d02(0x185)]({'path':_0x5edc7b,'bytes':_0x13468b});}}return _0x498d7f(_0x100a95),normalizeLocalFiles(_0x104297);}export function compareSkillFiles(_0x1b781c,_0x2e7773){const _0xbd3cbf=a102_0x1284;if(_0x1b781c['path']===SKILL_FILE)return _0x2e7773[_0xbd3cbf(0x178)]===SKILL_FILE?0x0:-0x1;if(_0x2e7773[_0xbd3cbf(0x178)]===SKILL_FILE)return 0x1;return Buffer[_0xbd3cbf(0x163)](Buffer[_0xbd3cbf(0x179)](_0x1b781c[_0xbd3cbf(0x178)],'utf8'),Buffer['from'](_0x2e7773[_0xbd3cbf(0x178)],'utf8'));}export function normalizeSkillRelativePath(_0x7cd0ff){const _0x5bf677=a102_0x1284,_0x541d39=toPosixPath(_0x7cd0ff[_0x5bf677(0x17a)]());return validateSkillRelativePath(_0x541d39),_0x541d39;}function a102_0x1513(){const _0x34f20f=['validation','isDirectory','size','490tHASaK','Unsafe\x20Skill\x20file\x20path:\x20','string','path','from','trim','1528470FwPNfm','Skill\x20file\x20path\x20must\x20be\x20text.','name','767396JDNhMu','isArray','has','split','set','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','bytes','push','localeCompare','8PDIZIn','1285272yBZGOZ','146581hYDPmx','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','content','2gWBrNF','1266036DRPNdJ','isSymbolicLink','includes','object','isBuffer','compare','sha256','startsWith','length','replace','toLowerCase','sort','26226tLxVVL','Skill\x20file\x20sha256\x20is\x20invalid:\x20','utf8','2496403YRaJQq','isSafeInteger','Duplicate\x20Skill\x20file\x20path:\x20','values','Skill\x20file\x20size\x20is\x20invalid:\x20'];a102_0x1513=function(){return _0x34f20f;};return a102_0x1513();}export function validateSkillRelativePath(_0x44a1ec){const _0x2c875d=a102_0x1284;if(!_0x44a1ec||_0x44a1ec[_0x2c875d(0x165)]('/')||_0x44a1ec[_0x2c875d(0x160)]('//'))throw CliErrors['validation'](_0x2c875d(0x176)+_0x44a1ec);for(const _0xebe824 of _0x44a1ec[_0x2c875d(0x181)]('/')){if(!_0xebe824||_0xebe824==='.'||_0xebe824==='..')throw CliErrors[_0x2c875d(0x172)](_0x2c875d(0x176)+_0x44a1ec);}}export function toPosixPath(_0x3b4261){const _0x23e374=a102_0x1284;return _0x3b4261[_0x23e374(0x167)](/\\/g,'/');}export function isSha256Hex(_0x90a82b){const _0x16257f=a102_0x1284;return typeof _0x90a82b===_0x16257f(0x177)&&/^[a-fA-F0-9]{64}$/['test'](_0x90a82b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x123589,_0xe7c0c2){const _0x18d67a=a103_0x36d5,_0x388f5a=_0x123589();while(!![]){try{const _0x3d17e2=-parseInt(_0x18d67a(0x138))/0x1+-parseInt(_0x18d67a(0x12a))/0x2*(parseInt(_0x18d67a(0x11c))/0x3)+parseInt(_0x18d67a(0x13d))/0x4+-parseInt(_0x18d67a(0x13e))/0x5*(parseInt(_0x18d67a(0x125))/0x6)+parseInt(_0x18d67a(0x113))/0x7*(-parseInt(_0x18d67a(0x11a))/0x8)+-parseInt(_0x18d67a(0x136))/0x9+parseInt(_0x18d67a(0x123))/0xa;if(_0x3d17e2===_0xe7c0c2)break;else _0x388f5a['push'](_0x388f5a['shift']());}catch(_0xf003cd){_0x388f5a['push'](_0x388f5a['shift']());}}}(a103_0xcc67,0x3ee8a));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';function a103_0x36d5(_0x1ce337,_0x1f0f18){_0x1ce337=_0x1ce337-0x10f;const _0xcc6743=a103_0xcc67();let _0x36d54c=_0xcc6743[_0x1ce337];return _0x36d54c;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xcd7d4e,_0x232907,_0x57639b){const _0x4a340b=a103_0x36d5,_0x349b5d=requireSkillCode(_0xcd7d4e),_0x4fd25d=requirePackageBytes(_0x349b5d,_0x57639b['packageBytes']),_0x353a7a=extractDownloadedPackage(_0x4fd25d),_0x1641a3=_0x353a7a[_0x4a340b(0x11b)](_0x43367f=>_0x43367f[_0x4a340b(0x12f)]===SKILL_FILE);if(!_0x1641a3)throw CliErrors[_0x4a340b(0x134)](_0x4a340b(0x129)+SKILL_FILE+':\x20'+_0x349b5d);const _0x589a07=withMaterializedSkillFrontmatter(_0x353a7a,_0xcd7d4e,_0x349b5d),_0x32df9f=_0x589a07[_0x4a340b(0x11b)](_0x10a747=>_0x10a747[_0x4a340b(0x12f)]===SKILL_FILE),_0x3ad5a8=fileText(_0x32df9f),_0x108db9=getRuntimeSkillDir(_0x57639b[_0x4a340b(0x126)],_0x57639b[_0x4a340b(0x132)],_0x57639b['appCode'],_0x232907,_0x349b5d,_0x57639b['paths']),_0x21a472=resolve(_0x108db9,SKILL_FILE),_0x498937=resolve(_0x108db9,METADATA_FILE),_0x106e0f=contentHash(_0x3ad5a8),_0x13879d=readMetadataIfPresent(_0x498937)?.[_0x4a340b(0x114)];ensurePulledFilesCanBeOverwritten(_0x108db9,_0x498937,_0x589a07,_0x57639b[_0x4a340b(0x127)]===!![]),mkdirSync(_0x108db9,{'recursive':!![],'mode':0x1c0});const _0x541dca=existsSync(_0x21a472)?readFileSync(_0x21a472,'utf8'):undefined;return materializeFiles(_0x108db9,_0x589a07),removeStaleManagedFiles(_0x108db9,_0x13879d,_0x589a07),writeJsonAtomic(_0x498937,buildMetadata(_0xcd7d4e,_0x232907,_0x57639b[_0x4a340b(0x139)],_0x106e0f,_0x57639b[_0x4a340b(0x135)],_0x589a07,_0x4fd25d)),{'skill':_0xcd7d4e,'scope':_0x232907,'dir':_0x108db9,'skillMdPath':_0x21a472,'metadataPath':_0x498937,'contentHash':_0x106e0f,'changed':_0x541dca!==_0x3ad5a8};}function withMaterializedSkillFrontmatter(_0xa70b86,_0x4fd051,_0x5ba7ab){const _0x1bcdf7=a103_0x36d5,_0x469563=skillDisplayName(_0x4fd051,_0x5ba7ab),_0x475d64=_0x4fd051['description']?.[_0x1bcdf7(0x112)]()||_0x469563||_0x5ba7ab;return normalizeLocalFiles(_0xa70b86)[_0x1bcdf7(0x116)](_0x316164=>{const _0xbb50a=_0x1bcdf7,_0x58791c=fileText(_0x316164);if(_0x316164[_0xbb50a(0x12f)]!==SKILL_FILE)return _0x316164;if(hasYamlFrontmatter(_0x58791c))return{'path':_0x316164[_0xbb50a(0x12f)],'content':withSyncedDisplayName(_0x58791c,_0x469563)};return{'path':_0x316164[_0xbb50a(0x12f)],'content':prependSkillFrontmatter(_0x58791c,{'name':_0x5ba7ab,'displayName':_0x469563,'description':_0x475d64})};});}function hasYamlFrontmatter(_0x4e89c9){return/^\uFEFF?---\s*\r?\n/['test'](_0x4e89c9);}function prependSkillFrontmatter(_0x2a1c11,_0x504734){const _0x2b0ac7=a103_0x36d5,_0x3d672c=_0x2a1c11[_0x2b0ac7(0x10f)](/^\uFEFF/,'');return['---',_0x2b0ac7(0x118)+yamlString(_0x504734[_0x2b0ac7(0x140)]),_0x504734['displayName']?_0x2b0ac7(0x117)+yamlString(_0x504734[_0x2b0ac7(0x110)]):undefined,_0x2b0ac7(0x11d)+yamlString(_0x504734[_0x2b0ac7(0x133)]),'---','',_0x3d672c][_0x2b0ac7(0x13c)](_0x1f0ce7=>_0x1f0ce7!==undefined)[_0x2b0ac7(0x12c)]('\x0a');}function yamlString(_0x5c75de){const _0x2fa9ea=a103_0x36d5;return JSON[_0x2fa9ea(0x130)](_0x5c75de[_0x2fa9ea(0x10f)](/\r/g,'')[_0x2fa9ea(0x112)]());}function skillDisplayName(_0x5e5e51,_0x13fac5){const _0x5204a8=a103_0x36d5,_0x46359e=_0x5e5e51[_0x5204a8(0x11f)]?.['trim']();return _0x46359e||_0x13fac5;}function withSyncedDisplayName(_0x1ff059,_0x9cb4fb){const _0x3d3950=a103_0x36d5,_0x2a6c52=_0x1ff059[_0x3d3950(0x12d)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a6c52)return _0x1ff059;const _0x1633b0=_0x2a6c52[0x1]??'',_0x37ccec=_0x2a6c52[0x2]??'',_0x24d55f=parseDocument(_0x37ccec);if(_0x24d55f['errors'][_0x3d3950(0x13f)]>0x0||!isMap(_0x24d55f['contents']))return _0x1ff059;if(_0x9cb4fb)_0x24d55f[_0x3d3950(0x131)](_0x3d3950(0x110),_0x9cb4fb);else{if(_0x24d55f[_0x3d3950(0x122)]('displayName'))_0x24d55f[_0x3d3950(0x111)](_0x3d3950(0x110));else return _0x1ff059;}forceBlockCollections(_0x24d55f['contents']);const _0x429b66=_0x24d55f['toString']({'lineWidth':0x0})[_0x3d3950(0x128)](),_0x5883d1=_0x1ff059[_0x3d3950(0x12b)](_0x2a6c52[0x0]['length'])[_0x3d3950(0x10f)](/^\r?\n/,'');return _0x1633b0+_0x3d3950(0x13a)+_0x429b66+_0x3d3950(0x120)+_0x5883d1;}function a103_0xcc67(){const _0x5e9c74=['1842792xHEJlN','find','3IhOyPa','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','skillName','\x0a---\x0a\x0a','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','has','13475810GwTEbG','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','6RcXAwT','env','force','trimEnd','Runtime\x20Skill\x20package\x20is\x20missing\x20','42974XnJUhv','slice','join','match','contentHash','path','stringify','set','accessKey','description','validation','pulledAt','4602150DYiILv','keys','305305lQbjIQ','appCode','---\x0a','utf8','filter','1432740VLhShN','1898005lrLKzd','length','name','replace','displayName','delete','trim','7myeapi','fileHashes','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','map','displayName:\x20','name:\x20','isFile'];a103_0xcc67=function(){return _0x5e9c74;};return a103_0xcc67();}function forceBlockCollections(_0x53d9e8){if(!isNode(_0x53d9e8))return;visit(_0x53d9e8,(_0x4737e0,_0x58c03b)=>{isCollection(_0x58c03b)&&(_0x58c03b['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x24606b,_0x2c31d3,_0x294868,_0x40f882){const _0x3748a9=a103_0x36d5;if(_0x40f882||!existsSync(_0x2c31d3))return;const _0x1535ec=readMetadataIfPresent(_0x2c31d3);if(!_0x1535ec)return;const _0x2cc1b7=_0x1535ec[_0x3748a9(0x114)]&&Object['keys'](_0x1535ec['fileHashes'])['length']>0x0?_0x1535ec[_0x3748a9(0x114)]:undefined;if(_0x2cc1b7)for(const [_0x5f5c7d,_0xceb1be]of Object['entries'](_0x2cc1b7)){const _0x1f002f=resolveManagedFilePath(_0x24606b,_0x5f5c7d);if(!existsSync(_0x1f002f))throw CliErrors[_0x3748a9(0x134)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x24606b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x5f5c7d);const _0x3010f3=lstatSync(_0x1f002f);if(!_0x3010f3[_0x3748a9(0x119)]())throw CliErrors[_0x3748a9(0x134)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x24606b,_0x3748a9(0x124)+_0x5f5c7d);const _0x450cc9=bufferSha256(readFileSync(_0x1f002f));if(_0x450cc9!==_0xceb1be)throw CliErrors[_0x3748a9(0x134)](_0x3748a9(0x115)+_0x24606b+'.\x20Changed\x20file:\x20'+_0x5f5c7d,_0x3748a9(0x11e)+_0x5f5c7d);}else{const _0x4f091e=resolve(_0x24606b,SKILL_FILE);if(existsSync(_0x4f091e)&&_0x1535ec['contentHash']){const _0xf7d60=contentHash(readFileSync(_0x4f091e,_0x3748a9(0x13b)));if(_0xf7d60!==_0x1535ec[_0x3748a9(0x12e)])throw CliErrors[_0x3748a9(0x134)](_0x3748a9(0x121)+_0x4f091e,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x3681b8 of normalizeLocalFiles(_0x294868)){if(_0x2cc1b7?.[_0x3681b8[_0x3748a9(0x12f)]])continue;if(!_0x2cc1b7&&_0x3681b8[_0x3748a9(0x12f)]===SKILL_FILE)continue;const _0x4fe8c2=resolveManagedFilePath(_0x24606b,_0x3681b8[_0x3748a9(0x12f)]);if(!existsSync(_0x4fe8c2))continue;const _0xca96f8=lstatSync(_0x4fe8c2);if(!_0xca96f8[_0x3748a9(0x119)]())throw CliErrors[_0x3748a9(0x134)](_0x3748a9(0x115)+_0x24606b,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3681b8[_0x3748a9(0x12f)]);const _0x303d53=bufferSha256(readFileSync(_0x4fe8c2));if(_0x303d53!==fileHash(_0x3681b8))throw CliErrors['validation'](_0x3748a9(0x115)+_0x24606b,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3681b8[_0x3748a9(0x12f)]);}}function materializeFiles(_0x3fb16e,_0x11d965){const _0x35039a=a103_0x36d5;for(const _0x1f2f63 of normalizeLocalFiles(_0x11d965)){const _0x4d6f5f=resolveManagedFilePath(_0x3fb16e,_0x1f2f63[_0x35039a(0x12f)]);mkdirSync(dirname(_0x4d6f5f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4d6f5f,fileContent(_0x1f2f63),0x180);}}function removeStaleManagedFiles(_0x1b1ff8,_0x147c24,_0x476d73){const _0x93f6a=a103_0x36d5;if(!_0x147c24)return;const _0x128b3c=new Set(normalizeLocalFiles(_0x476d73)[_0x93f6a(0x116)](_0x472d25=>_0x472d25[_0x93f6a(0x12f)]));for(const _0x1fc07c of Object[_0x93f6a(0x137)](_0x147c24)){if(_0x128b3c[_0x93f6a(0x122)](_0x1fc07c))continue;const _0x2723c9=resolveManagedFilePath(_0x1b1ff8,_0x1fc07c);existsSync(_0x2723c9)&&lstatSync(_0x2723c9)['isFile']()&&rmSync(_0x2723c9,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a104_0xb92a(){const _0x1a87ee=['2133166ziPjhA','21nfuKhV','version','8244070JjqcBv','forkedFromSkillId','zipSha256','312714TkDQqu','30IMuQCR','manifest','557821pQNeNO','tags','fromEntries','forkedFromVersion','status','length','skillName','utf8','map','2187008SMKCKH','description','readonly','userId','97588trmXQe','ossPath','sourceSessionId','skillCode','trim','toISOString','path','tenantCode','personal','163248WhQvKL','validation','files','hasUpstreamUpdate','isArray','object','Runtime\x20Skill\x20is\x20missing\x20skillCode.','parse','9jgLvoA'];a104_0xb92a=function(){return _0x1a87ee;};return a104_0xb92a();}(function(_0x1b856c,_0x36763f){const _0x100b50=a104_0x1cd0,_0x47266a=_0x1b856c();while(!![]){try{const _0x1afacd=-parseInt(_0x100b50(0xb6))/0x1+-parseInt(_0x100b50(0xa4))/0x2+-parseInt(_0x100b50(0xae))/0x3*(parseInt(_0x100b50(0x9b))/0x4)+-parseInt(_0x100b50(0xb4))/0x5*(-parseInt(_0x100b50(0xb3))/0x6)+-parseInt(_0x100b50(0xad))/0x7+parseInt(_0x100b50(0x97))/0x8+parseInt(_0x100b50(0xac))/0x9*(parseInt(_0x100b50(0xb0))/0xa);if(_0x1afacd===_0x36763f)break;else _0x47266a['push'](_0x47266a['shift']());}catch(_0x1edf54){_0x47266a['push'](_0x47266a['shift']());}}}(a104_0xb92a,0x4826f));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a104_0x1cd0(_0xfb3dba,_0x37a0ac){_0xfb3dba=_0xfb3dba-0x95;const _0xb92a74=a104_0xb92a();let _0x1cd0ec=_0xb92a74[_0xfb3dba];return _0x1cd0ec;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x16e053,_0x4a8368,_0x268ba7,_0x14041c,_0x382dd7,_0x4df69f,_0x523bbb){const _0x186865=a104_0x1cd0,_0x39751b=_0x4df69f?normalizeLocalFiles(_0x4df69f):[],_0x493525=!_0x523bbb&&_0x39751b['length']>0x0?buildSkillPackage(_0x39751b):undefined,_0x570e61=_0x523bbb?bufferSha256(_0x523bbb):_0x493525?.['manifest'][_0x186865(0xb2)],_0x51c5f2=_0x523bbb?.[_0x186865(0xbb)]??_0x493525?.[_0x186865(0xb5)]['zipSize'],_0x29cf51=_0x39751b[_0x186865(0xbb)]>0x0?Object[_0x186865(0xb8)](_0x39751b[_0x186865(0x96)](_0x36fda8=>[_0x36fda8[_0x186865(0xa1)],fileHash(_0x36fda8)])):undefined;return{'schemaVersion':_0x39751b['length']>0x0?0x2:0x1,'id':_0x16e053['id'],'appCode':_0x268ba7,'skillCode':requireSkillCode(_0x16e053),'skillName':_0x16e053[_0x186865(0xbc)],'description':_0x16e053[_0x186865(0x98)],'scope':_0x4a8368,'readonly':_0x4a8368!==_0x186865(0xa3)||_0x16e053[_0x186865(0x99)]===!![],'tenantCode':_0x16e053[_0x186865(0xa2)],'userId':_0x16e053[_0x186865(0x9a)],'version':_0x16e053[_0x186865(0xaf)],'status':_0x16e053[_0x186865(0xba)],'tags':Array[_0x186865(0xa8)](_0x16e053[_0x186865(0xb7)])?_0x16e053['tags']:[],'hasUpstreamUpdate':_0x16e053[_0x186865(0xa7)],'forkedFromSkillId':_0x16e053[_0x186865(0xb1)],'forkedFromVersion':_0x16e053[_0x186865(0xb9)],'sourceSessionId':_0x16e053[_0x186865(0x9d)],'contentHash':_0x14041c,'fileHashes':_0x29cf51,'treeHash':_0x39751b[_0x186865(0xbb)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x39751b)):undefined,'ossPath':remoteManifestOssPath(_0x16e053[_0x186865(0xa6)]),'zipSha256':_0x570e61,'zipSize':_0x51c5f2,'files':_0x39751b['length']>0x0?_0x39751b[_0x186865(0x96)](_0x15b968=>({'path':_0x15b968[_0x186865(0xa1)],'hash':fileHash(_0x15b968),'size':fileContent(_0x15b968)['length']})):undefined,'pulledAt':_0x382dd7??new Date()[_0x186865(0xa0)]()};}export function requireSkillCode(_0x7c2f7){const _0x45dd0d=a104_0x1cd0,_0x50092f=_0x7c2f7[_0x45dd0d(0x9e)]?.[_0x45dd0d(0x9f)]();if(!_0x50092f)throw CliErrors[_0x45dd0d(0xa5)](_0x45dd0d(0xaa));return _0x50092f;}export function readMetadataIfPresent(_0x407817){const _0x1cd08c=a104_0x1cd0;if(!existsSync(_0x407817))return undefined;try{const _0x33f4a7=JSON[_0x1cd08c(0xab)](readFileSync(_0x407817,_0x1cd08c(0x95)));return _0x33f4a7;}catch{throw CliErrors[_0x1cd08c(0xa5)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x407817);}}function remoteManifestOssPath(_0x2a3587){const _0x3ee69b=a104_0x1cd0;if(!_0x2a3587||typeof _0x2a3587!==_0x3ee69b(0xa9)||Array[_0x3ee69b(0xa8)](_0x2a3587))return undefined;const _0x523846=_0x2a3587[_0x3ee69b(0x9c)];return typeof _0x523846==='string'&&_0x523846[_0x3ee69b(0x9f)]()?_0x523846[_0x3ee69b(0x9f)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x13c593,_0x2964c4){const _0x186b84=a105_0x355c,_0x27c2c8=_0x13c593();while(!![]){try{const _0x23d304=-parseInt(_0x186b84(0x14c))/0x1+parseInt(_0x186b84(0x14b))/0x2+-parseInt(_0x186b84(0x146))/0x3+-parseInt(_0x186b84(0x156))/0x4*(parseInt(_0x186b84(0x149))/0x5)+parseInt(_0x186b84(0x152))/0x6+parseInt(_0x186b84(0x145))/0x7+-parseInt(_0x186b84(0x15a))/0x8;if(_0x23d304===_0x2964c4)break;else _0x27c2c8['push'](_0x27c2c8['shift']());}catch(_0x1bc75b){_0x27c2c8['push'](_0x27c2c8['shift']());}}}(a105_0x8244,0x4b674));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a105_0x8244(){const _0x29ce34=['417963hmVZcA','.workbuddy','includes','145ejjiGl','SKILL_ROOT','941144Ahykjt','202638uYOtSy','cacheRoot','Unsafe\x20','skillCode','claudeSkillsDir','trim','1090332ZUTmoN','skills','filter','homeDirName','15064AtDnQd','workbuddySkillsDir','agentsSkillsDir','.claude','2984488gEzKRo','CLAUDE_SKILL_ROOT','homeDir','3365544HjrJQC'];a105_0x8244=function(){return _0x29ce34;};return a105_0x8244();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a105_0x355c(_0x2460b2,_0x2c6c7d){_0x2460b2=_0x2460b2-0x144;const _0x8244ba=a105_0x8244();let _0x355c34=_0x8244ba[_0x2460b2];return _0x355c34;}export function resolveSkillSyncPaths(_0x22624e={}){const _0xd05569=a105_0x355c,_0x433f53=_0x22624e[_0xd05569(0x144)]??homedir(),_0x3f817e=resolve(_0x433f53,PRODUCT_CONFIG[_0xd05569(0x155)],'cache'),_0x296935=trimmedEnv(_0xd05569(0x14a)),_0x3a7861=trimmedEnv(_0xd05569(0x15b)),_0x238a13=resolve(_0x433f53,_0xd05569(0x147)),_0x3458e5=_0x22624e[_0xd05569(0x157)]??(existsSync(_0x238a13)?resolve(_0x238a13,_0xd05569(0x153)):undefined);return{'homeDir':_0x433f53,'cacheRoot':_0x3f817e,'managedRoot':resolve(_0x433f53,PRODUCT_CONFIG[_0xd05569(0x155)]),'agentsSkillsDir':_0x22624e['agentsSkillsDir']??_0x296935??resolve(_0x433f53,'.agents','skills'),'claudeSkillsDir':_0x22624e[_0xd05569(0x150)]??_0x3a7861??resolve(_0x433f53,_0xd05569(0x159),_0xd05569(0x153)),'workbuddySkillsDir':_0x3458e5};}export function runtimeAgentSkillRoots(_0x40dddd){const _0x47ac3a=a105_0x355c;return[_0x40dddd[_0x47ac3a(0x158)],_0x40dddd[_0x47ac3a(0x150)],_0x40dddd[_0x47ac3a(0x157)]][_0x47ac3a(0x154)](_0x3ef360=>Boolean(_0x3ef360));}export function getRuntimeSkillCacheRoot(_0x46e614,_0x58ce30,_0x39fab1={}){const _0x3b75cf=a105_0x355c,_0x1f744e=resolveSkillSyncPaths(_0x39fab1);return resolve(_0x1f744e[_0x3b75cf(0x14d)],_0x46e614,fingerprintAccessKey(_0x58ce30),'skills');}export function getRuntimeSkillDir(_0x4d8ffd,_0x29a86a,_0x5728ba,_0x344cbd,_0x135f8b,_0x4807b2={}){const _0x1ba2a9=a105_0x355c;return resolve(getRuntimeSkillCacheRoot(_0x4d8ffd,_0x29a86a,_0x4807b2),safePathSegment(_0x5728ba,'appCode'),_0x344cbd,safePathSegment(_0x135f8b,_0x1ba2a9(0x14f)));}export function safePathSegment(_0x26ea59,_0x154fa6='path\x20segment'){const _0x1867e3=a105_0x355c;if(!_0x26ea59||_0x26ea59[_0x1867e3(0x148)]('/')||_0x26ea59[_0x1867e3(0x148)]('\x5c')||_0x26ea59[_0x1867e3(0x148)]('..'))throw CliErrors['validation'](_0x1867e3(0x14e)+_0x154fa6+'\x20for\x20local\x20path:\x20'+_0x26ea59);return _0x26ea59;}function trimmedEnv(_0x5264b8){const _0x14e965=a105_0x355c,_0x7656a=productEnv(_0x5264b8)?.[_0x14e965(0x151)]();return _0x7656a?_0x7656a:undefined;}
|