@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-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.
Files changed (128) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/raw-flags.js +1 -1
  90. package/lib/framework/response.js +1 -1
  91. package/lib/framework/runner-confirmation.js +1 -1
  92. package/lib/framework/runner-error.js +1 -1
  93. package/lib/framework/runner.js +1 -1
  94. package/lib/framework/schema-export.js +1 -1
  95. package/lib/framework/service-order.js +1 -1
  96. package/lib/framework/types.js +1 -1
  97. package/lib/generated/build-info.d.ts +4 -4
  98. package/lib/generated/build-info.js +1 -1
  99. package/lib/help.js +1 -1
  100. package/lib/runtime/event.js +1 -1
  101. package/lib/runtime/index.js +1 -1
  102. package/lib/runtime/queue.js +1 -1
  103. package/lib/runtime/resolve.js +1 -1
  104. package/lib/skills/npx-skills-add.js +1 -1
  105. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  106. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  107. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  108. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  109. package/lib/skills/runtime-skill-sync/links.js +1 -1
  110. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  111. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  112. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  113. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  114. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  115. package/lib/skills/runtime-skill-sync/push.js +1 -1
  116. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  117. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  118. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  119. package/lib/skills/runtime-skill-sync.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -1
  121. package/lib/utils/logger.js +1 -1
  122. package/lib/utils/lossless-json.js +1 -1
  123. package/lib/utils/params.js +1 -1
  124. package/lib/utils/platform.js +1 -1
  125. package/lib/utils/update-notice.js +1 -1
  126. package/lib/utils/version.js +1 -1
  127. package/lib/utils/write-cli-side-channel.js +1 -1
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5bfc08,_0x17164a){const _0x133ea6=a39_0x2c9e,_0x3568ff=_0x5bfc08();while(!![]){try{const _0x54c12f=parseInt(_0x133ea6(0x1a4))/0x1*(-parseInt(_0x133ea6(0x1da))/0x2)+-parseInt(_0x133ea6(0x17d))/0x3+-parseInt(_0x133ea6(0x1ca))/0x4+parseInt(_0x133ea6(0x1c6))/0x5*(-parseInt(_0x133ea6(0x1a8))/0x6)+-parseInt(_0x133ea6(0x190))/0x7*(parseInt(_0x133ea6(0x1c4))/0x8)+parseInt(_0x133ea6(0x184))/0x9*(parseInt(_0x133ea6(0x1a9))/0xa)+parseInt(_0x133ea6(0x18c))/0xb;if(_0x54c12f===_0x17164a)break;else _0x3568ff['push'](_0x3568ff['shift']());}catch(_0xb932d7){_0x3568ff['push'](_0x3568ff['shift']());}}}(a39_0x5763,0xedf27));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x2e993d,_0xc7fed1){const _0x53ce67=a39_0x2c9e,_0x319dea=listLocalServiceTrees();let _0x5c2b22;for(const _0x915fe8 of _0x319dea){const _0x3de6fe=matchServiceTreeCommand(_0x915fe8,_0x2e993d);if(!_0x3de6fe)continue;(!_0x5c2b22||_0x3de6fe[_0x53ce67(0x17a)][_0x53ce67(0x1c2)][_0x53ce67(0x19b)]>_0x5c2b22['command'][_0x53ce67(0x1c2)][_0x53ce67(0x19b)])&&(_0x5c2b22={'tree':_0x915fe8,'command':_0x3de6fe['command'],'remainingArgs':_0x3de6fe[_0x53ce67(0x1bb)]});}if(!_0x5c2b22)return undefined;const _0x518c34={..._0xc7fed1};return applyAppBinding(_0x5c2b22['tree'],_0x5c2b22[_0x53ce67(0x17a)],_0x518c34),{'definition':buildDynamicCommandDefinition(_0x5c2b22[_0x53ce67(0x18d)],_0x5c2b22[_0x53ce67(0x17a)]),'args':_0x5c2b22[_0x53ce67(0x1bb)],'flags':_0x518c34,'tree':_0x5c2b22[_0x53ce67(0x18d)],'command':_0x5c2b22[_0x53ce67(0x17a)]};}export function generateDynamicServiceHelp(_0x3b1135){const _0x91bab7=a39_0x2c9e,_0x72b2dc=listLocalServiceTrees()[_0x91bab7(0x1c8)](_0x43901f=>_0x43901f[_0x91bab7(0x1cb)][_0x91bab7(0x1ba)]===_0x3b1135);if(!_0x72b2dc)return undefined;const _0x5dd686=[CLI_BIN_NAME+'\x20'+_0x3b1135+'\x20<command>\x20[flags]','',_0x72b2dc[_0x91bab7(0x1cb)][_0x91bab7(0x17c)]||_0x3b1135,_0x72b2dc[_0x91bab7(0x1cb)]['description']?'\x20\x20'+_0x72b2dc[_0x91bab7(0x1cb)][_0x91bab7(0x1c7)]:'','','Commands:',..._0x72b2dc[_0x91bab7(0x1df)][_0x91bab7(0x1be)](_0x5c9fe0=>{const _0x5dc322=_0x91bab7,_0x216bb5=_0x5c9fe0[_0x5dc322(0x1c2)][_0x5dc322(0x1c0)](0x1)['join']('\x20'),_0x546622=_0x5c9fe0['risk']==='read'?'':'\x20['+_0x5c9fe0['risk']+']';return'\x20\x20'+_0x216bb5['padEnd'](0x18)+'\x20'+(_0x5c9fe0[_0x5dc322(0x1c7)]||'')+_0x546622;}),'',_0x91bab7(0x1a2)+CLI_BIN_NAME+_0x91bab7(0x193)+_0x3b1135+_0x91bab7(0x1e1)][_0x91bab7(0x1a7)](Boolean);return _0x5dd686[_0x91bab7(0x1ce)]('\x0a');}export function listDynamicServiceEntries(){const _0xff3634=a39_0x2c9e;return listLocalServices()[_0xff3634(0x1be)](_0x54fcd5=>{const _0x52c764=_0xff3634,_0x58e05c=_0x54fcd5[_0x52c764(0x1dd)];return{'service':_0x58e05c[_0x52c764(0x1cb)][_0x52c764(0x1ba)],'label':_0x58e05c['service'][_0x52c764(0x17c)]||_0x58e05c[_0x52c764(0x1cb)][_0x52c764(0x1ba)],'commands':_0x58e05c[_0x52c764(0x1df)]['map'](_0x18e042=>({'command':dynamicCommandName(_0x18e042),'description':_0x18e042['description']||_0x52c764(0x1bd)+_0x18e042[_0x52c764(0x18e)],'tag':riskTag(_0x18e042[_0x52c764(0x1d1)])}))};});}export function getDynamicServiceEntry(_0x5c93bb){const _0x1fed24=a39_0x2c9e;return listDynamicServiceEntries()[_0x1fed24(0x1c8)](_0x1b3967=>_0x1b3967['service']===_0x5c93bb);}export function listDynamicServiceDefinitions(_0x2a21ff){const _0x58dbef=a39_0x2c9e;return listLocalServiceTrees()[_0x58dbef(0x1a7)](_0x3f4a98=>!_0x2a21ff||_0x3f4a98[_0x58dbef(0x1cb)]['code']===_0x2a21ff)[_0x58dbef(0x1b5)](_0x1cd439=>_0x1cd439[_0x58dbef(0x1df)][_0x58dbef(0x1be)](_0xaf5318=>buildDynamicCommandDefinition(_0x1cd439,_0xaf5318)));}export function getDynamicServiceDefinitions(_0x39da6b){const _0x11b8cb=listDynamicServiceDefinitions(_0x39da6b);return _0x11b8cb['length']>0x0?_0x11b8cb:undefined;}export function findDynamicServiceDefinition(_0x3b629c,_0x1b01ef){const _0x46c341=a39_0x2c9e;return listDynamicServiceDefinitions(_0x3b629c)['find'](_0x199160=>_0x199160[_0x46c341(0x17a)]===_0x1b01ef);}export function buildDynamicCommandDefinition(_0x51588b,_0x4f73ec){const _0x277862=a39_0x2c9e;return{'service':_0x51588b['service'][_0x277862(0x1ba)],'command':dynamicCommandName(_0x4f73ec),'description':_0x4f73ec['description']||'Run\x20service\x20command\x20'+_0x4f73ec['cliPath'],'risk':_0x4f73ec['risk'],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x4f73ec['args']['map'](_0x11bfc9=>({'name':_0x11bfc9[_0x277862(0x17c)],'description':_0x11bfc9[_0x277862(0x1c7)]||_0x11bfc9[_0x277862(0x17c)],'required':_0x11bfc9[_0x277862(0x1ae)]})),'flags':_0x4f73ec[_0x277862(0x1dc)][_0x277862(0x1be)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x4f73ec),async 'dryRun'(_0x339d9d){const _0xeb96c2=_0x277862,_0x25cf0e=await compilePlan(_0x4f73ec,_0x339d9d);return{'method':_0xeb96c2(0x1cc),'url':_0x4f73ec[_0xeb96c2(0x18e)],'body':{'target':targetPreview(_0x25cf0e),'params':_0x25cf0e[_0xeb96c2(0x1d5)]},'description':_0xeb96c2(0x18b)+_0x4f73ec[_0xeb96c2(0x18e)]};},async 'execute'(_0x32f766){const _0x3dea95=_0x277862,_0x67eca7=await compilePlan(_0x4f73ec,_0x32f766),_0x19bca6=Date[_0x3dea95(0x192)](),_0x257398=await executePlan(_0x67eca7,_0x4f73ec,_0x32f766),_0x3f527a=Date[_0x3dea95(0x192)]()-_0x19bca6;return{'ok':!![],'data':{'service':_0x51588b[_0x3dea95(0x1cb)],'command':_0x4f73ec[_0x3dea95(0x18e)],'target':targetPreview(_0x67eca7),'result':_0x257398,'elapsed':_0x3f527a},'message':_0x3dea95(0x1c9)+_0x4f73ec[_0x3dea95(0x18e)]+_0x3dea95(0x181)+_0x3f527a+'ms'};}};}function dynamicCommandName(_0x256fdf){const _0x377c12=a39_0x2c9e;return _0x256fdf[_0x377c12(0x1c2)][_0x377c12(0x1c0)](0x1)[_0x377c12(0x1ce)]('\x20');}function riskTag(_0x2077d){return _0x2077d==='read'?'':'\x20\x20['+_0x2077d+']';}function flagToCommandFlag(_0x106255){const _0x2ab627=a39_0x2c9e;return{'name':_0x106255[_0x2ab627(0x17f)],'type':_0x106255[_0x2ab627(0x1b4)]===_0x2ab627(0x1c5)?_0x2ab627(0x186):_0x106255[_0x2ab627(0x1b4)],'description':_0x106255[_0x2ab627(0x1c7)]||_0x106255[_0x2ab627(0x17c)],'required':_0x106255[_0x2ab627(0x1ae)],'default':isPrimitiveFlagDefault(_0x106255['default'])?_0x106255[_0x2ab627(0x1b9)]:undefined,'enum':_0x106255[_0x2ab627(0x1ab)]};}function a39_0x2c9e(_0x34b06d,_0xe2832f){_0x34b06d=_0x34b06d-0x17a;const _0x57636c=a39_0x5763();let _0x2c9e1b=_0x57636c[_0x34b06d];return _0x2c9e1b;}async function compilePlan(_0x311210,_0x28761b){const _0xea6e70=a39_0x2c9e;return compileServiceTreeCommand(_0x311210,{'flags':_0x28761b['rawFlags'],'args':_0x28761b[_0xea6e70(0x1b2)],'context':await buildServiceContext(_0x311210,_0x28761b)});}async function buildServiceContext(_0x49e98d,_0x3ab248){const _0x2e3369=a39_0x2c9e,_0x339dbd={'appCode':_0x3ab248['appCode'],'env':_0x3ab248[_0x2e3369(0x19e)],'envName':_0x3ab248['envName']};if(!usesRuntimeContext(_0x49e98d))return _0x339dbd;const _0x358a9e=await getLoginUserInfo(),_0x2f3c9e=pickFirst(_0x358a9e['userId'],_0x358a9e['id']);return{..._0x339dbd,'user':_0x358a9e,'userId':_0x2f3c9e,'id':_0x358a9e['id'],'username':pickFirst(_0x358a9e[_0x2e3369(0x188)],_0x358a9e[_0x2e3369(0x18a)],_0x358a9e[_0x2e3369(0x197)]),'userName':_0x358a9e[_0x2e3369(0x18a)],'nickname':pickFirst(_0x358a9e[_0x2e3369(0x1b0)],_0x358a9e['nickName']),'nickName':_0x358a9e['nickName'],'tenantCode':_0x358a9e[_0x2e3369(0x1e0)],'employeeId':_0x358a9e[_0x2e3369(0x196)]};}function usesRuntimeContext(_0x46cf70){const _0x4cd592=a39_0x2c9e;return _0x46cf70[_0x4cd592(0x1ad)][_0x4cd592(0x1db)](_0x224b2c=>typeof _0x224b2c[_0x4cd592(0x1d6)]==='string'&&(_0x224b2c[_0x4cd592(0x1d6)][_0x4cd592(0x180)](_0x4cd592(0x189))||_0x224b2c[_0x4cd592(0x1d6)][_0x4cd592(0x180)](_0x4cd592(0x1d2))));}function a39_0x5763(){const _0x3a04c5=['params','source','sql','appCode','\x20\x20SERVICE\x20TREE\x20TARGET','2bfLRSA','some','flags','normalizedManifest','\x20\x20\x20\x20kind:\x20\x20\x20\x20','commands','tenantCode','`\x20to\x20inspect\x20the\x20manifest.','command','env','name','5718225TUsGwm','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','cliName','startsWith','\x20completed\x20in\x20','number','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','9dkKNId','\x20\x20MAP\x20TO','string','\x20requires\x20target.functionName.','username','context.','userName','Preview\x20dynamic\x20service\x20command:\x20','63735760QVEDSl','tree','cliPath','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','7OGcMDz','\x20\x20\x20\x20command:\x20','now','\x20service\x20detail\x20--service\x20','Unsupported\x20service\x20target\x20kind:\x20','bff','employeeId','loginName','\x20\x20\x20\x20datatable:\x20','Cannot\x20resolve\x20datatable\x20\x22','boolean','length','bffId','datasetCode','envName','\x20requires\x20target.sqlCode.','\x20\x20\x20\x20','push','Use\x20`','bffCode','701707XsKCDF','const','target','filter','746958DxIJnc','13763930VYKLzO','\x20\x20\x20\x20datasetCode:\x20','enum','dbtableConfig','mapTo','required','\x20\x20\x20\x20sqlCode:\x20','nickname','appcode','args','entries','type','flatMap','fromEntries','data','appRef','default','code','remainingArgs','\x22\x20in\x20service\x20command\x20','Run\x20service\x20command\x20','map','validation','slice','appBindings','fullPath','app','12370960DhEjuJ','json','30HIExHA','description','find','Service\x20command\x20','5179248nFTcCL','service','SERVICE_TREE','kind','join','operator','sqlCode','risk','ctx.','scriptName','datatable'];a39_0x5763=function(){return _0x3a04c5;};return a39_0x5763();}function pickFirst(..._0x5a0e51){const _0x264429=a39_0x2c9e;return _0x5a0e51[_0x264429(0x1c8)](_0x3e7b7c=>_0x3e7b7c!==undefined&&_0x3e7b7c!==null);}async function executePlan(_0x6d2c4e,_0x32004d,_0x1149d3){const _0x202a45=a39_0x2c9e;if(_0x6d2c4e[_0x202a45(0x1cd)]===_0x202a45(0x1b7)){const _0x12c2d6=await resolveDatasetCode(_0x6d2c4e,_0x32004d,_0x1149d3);return executeData(_0x12c2d6,_0x6d2c4e['command'],_0x6d2c4e[_0x202a45(0x1d5)]);}if(_0x6d2c4e[_0x202a45(0x1cd)]===_0x202a45(0x1d7)){if(!_0x6d2c4e['sqlCode'])throw CliErrors[_0x202a45(0x1bf)]('Service\x20command\x20'+_0x32004d['cliPath']+_0x202a45(0x19f));return executeSdkSql(_0x6d2c4e[_0x202a45(0x1d0)],normalizeScalarParams(_0x6d2c4e[_0x202a45(0x1d5)]));}if(_0x6d2c4e[_0x202a45(0x1cd)]===_0x202a45(0x195)){const _0x7b1654=_0x6d2c4e[_0x202a45(0x1d3)]||_0x6d2c4e[_0x202a45(0x1a3)]||(_0x6d2c4e[_0x202a45(0x19c)]==null?'':String(_0x6d2c4e[_0x202a45(0x19c)]));if(!_0x7b1654)throw CliErrors[_0x202a45(0x1bf)](_0x202a45(0x1c9)+_0x32004d[_0x202a45(0x18e)]+_0x202a45(0x187));return executeSdkBff(_0x7b1654,_0x6d2c4e[_0x202a45(0x1d5)]);}throw CliErrors[_0x202a45(0x1bf)](_0x202a45(0x194)+_0x6d2c4e['kind']);}async function resolveDatasetCode(_0x260adb,_0x178032,_0x5099e5){const _0x1eb7a1=a39_0x2c9e;if(_0x260adb[_0x1eb7a1(0x19d)])return _0x260adb[_0x1eb7a1(0x19d)];if(!_0x260adb[_0x1eb7a1(0x1d4)])throw CliErrors[_0x1eb7a1(0x1bf)](_0x1eb7a1(0x1c9)+_0x178032[_0x1eb7a1(0x18e)]+_0x1eb7a1(0x17e));const _0x13df7a=await listDatasets(_0x5099e5['appCode']),_0x2fc9db=_0x13df7a[_0x1eb7a1(0x1c8)](_0x1d70ec=>_0x1d70ec[_0x1eb7a1(0x1ac)]?.['tableName']===_0x260adb['datatable']);if(!_0x2fc9db?.[_0x1eb7a1(0x1ba)])throw CliErrors[_0x1eb7a1(0x1bf)](_0x1eb7a1(0x199)+_0x260adb[_0x1eb7a1(0x1d4)]+_0x1eb7a1(0x18f)+_0x5099e5[_0x1eb7a1(0x1d8)]+'.',_0x1eb7a1(0x183));return _0x2fc9db[_0x1eb7a1(0x1ba)];}function applyAppBinding(_0x232bec,_0x50c409,_0x1b1f35){const _0x4e69a6=a39_0x2c9e,_0x5d67f5=_0x50c409['target'][_0x4e69a6(0x1b8)];if(!_0x5d67f5)return;const _0x316900=_0x232bec[_0x4e69a6(0x1c1)][_0x5d67f5];if(!_0x316900)throw CliErrors[_0x4e69a6(0x1bf)]('Unknown\x20appRef\x20\x22'+_0x5d67f5+_0x4e69a6(0x1bc)+_0x50c409['cliPath']+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x3c24d3=_0x316900[_0x4e69a6(0x1b1)]||_0x316900['appCode'];_0x3c24d3&&!hasText(_0x1b1f35[_0x4e69a6(0x1b1)])&&(_0x1b1f35['appcode']=_0x3c24d3),_0x316900[_0x4e69a6(0x1c3)]&&!hasText(_0x1b1f35[_0x4e69a6(0x1c3)])&&!hasText(_0x1b1f35['appcode'])&&(_0x1b1f35[_0x4e69a6(0x1c3)]=_0x316900[_0x4e69a6(0x1c3)]),_0x316900[_0x4e69a6(0x17b)]&&!hasText(_0x1b1f35[_0x4e69a6(0x17b)])&&(_0x1b1f35[_0x4e69a6(0x17b)]=_0x316900['env']);}function renderDynamicCommandHelp(_0x21a497){const _0x5820ab=a39_0x2c9e,_0xe5c939=[_0x5820ab(0x1d9),_0x5820ab(0x1de)+_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x1cd)],_0x5820ab(0x191)+_0x21a497['target'][_0x5820ab(0x17a)]];if(_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x19d)])_0xe5c939['push'](_0x5820ab(0x1aa)+_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x19d)]);if(_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x1d4)])_0xe5c939['push'](_0x5820ab(0x198)+_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x1d4)]);if(_0x21a497[_0x5820ab(0x1a6)]['sqlCode'])_0xe5c939['push'](_0x5820ab(0x1af)+_0x21a497[_0x5820ab(0x1a6)]['sqlCode']);if(_0x21a497['target']['scriptName'])_0xe5c939[_0x5820ab(0x1a1)]('\x20\x20\x20\x20functionName:\x20'+_0x21a497[_0x5820ab(0x1a6)][_0x5820ab(0x1d3)]);if(_0x21a497[_0x5820ab(0x1ad)][_0x5820ab(0x19b)]>0x0){_0xe5c939[_0x5820ab(0x1a1)]('',_0x5820ab(0x185));for(const _0xb834b2 of _0x21a497['mapTo']){_0xe5c939[_0x5820ab(0x1a1)](_0x5820ab(0x1a0)+(_0xb834b2[_0x5820ab(0x1d6)]||_0x5820ab(0x1a5))+'\x20->\x20'+_0xb834b2['target']+(_0xb834b2['operator']?'.'+_0xb834b2[_0x5820ab(0x1cf)]:''));}}return _0xe5c939[_0x5820ab(0x1ce)]('\x0a');}function targetPreview(_0x188b3e){const _0x4ffeec=a39_0x2c9e;return{'kind':_0x188b3e[_0x4ffeec(0x1cd)],'command':_0x188b3e[_0x4ffeec(0x17a)],'appRef':_0x188b3e[_0x4ffeec(0x1b8)],'datasetCode':_0x188b3e[_0x4ffeec(0x19d)],'datatable':_0x188b3e[_0x4ffeec(0x1d4)],'sqlCode':_0x188b3e['sqlCode'],'bffCode':_0x188b3e['bffCode'],'bffId':_0x188b3e[_0x4ffeec(0x19c)],'functionName':_0x188b3e['scriptName']};}function normalizeScalarParams(_0x1f1951){const _0x37f31c=a39_0x2c9e;return Object[_0x37f31c(0x1b6)](Object[_0x37f31c(0x1b3)](_0x1f1951)[_0x37f31c(0x1a7)](([,_0x3b4e44])=>typeof _0x3b4e44===_0x37f31c(0x186)||typeof _0x3b4e44===_0x37f31c(0x182)));}function hasText(_0x2594dc){const _0x39c761=a39_0x2c9e;return typeof _0x2594dc==='string'&&_0x2594dc['trim']()[_0x39c761(0x19b)]>0x0;}function isPrimitiveFlagDefault(_0x36d8ff){const _0xd469b1=a39_0x2c9e;return _0x36d8ff===undefined||typeof _0x36d8ff===_0xd469b1(0x186)||typeof _0x36d8ff===_0xd469b1(0x182)||typeof _0x36d8ff===_0xd469b1(0x19a);}
1
+ (function(_0x3f605e,_0x46a149){const _0x12b8c3=a39_0x746a,_0x59790e=_0x3f605e();while(!![]){try{const _0x5c563e=-parseInt(_0x12b8c3(0xb7))/0x1+-parseInt(_0x12b8c3(0xee))/0x2*(-parseInt(_0x12b8c3(0xd6))/0x3)+parseInt(_0x12b8c3(0xdb))/0x4+parseInt(_0x12b8c3(0xc8))/0x5*(-parseInt(_0x12b8c3(0xe7))/0x6)+-parseInt(_0x12b8c3(0xb6))/0x7+-parseInt(_0x12b8c3(0xd3))/0x8+-parseInt(_0x12b8c3(0xa1))/0x9*(-parseInt(_0x12b8c3(0xaa))/0xa);if(_0x5c563e===_0x46a149)break;else _0x59790e['push'](_0x59790e['shift']());}catch(_0x337224){_0x59790e['push'](_0x59790e['shift']());}}}(a39_0x34db,0x62c5d));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a39_0x34db(){const _0xeff7b0=['1450vBkgjT','name','Run\x20service\x20command\x20','mapTo','Commands:','find','\x20\x20MAP\x20TO','\x22\x20in\x20service\x20command\x20','userId','filter','startsWith','tableName','4313631PnUIxI','7514pKKgqn','fullPath','flags','envName','join','\x20requires\x20target.functionName.','type','app','Service\x20command\x20','appRef','env','\x20\x20\x20\x20kind:\x20\x20\x20\x20','Cannot\x20resolve\x20datatable\x20\x22','SERVICE_TREE','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','target','datasetCode','1895VuJLlB','\x20\x20\x20\x20command:\x20','rawFlags','nickname','json','context.','bff','commands','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','\x20\x20\x20\x20datatable:\x20','map','5014560xLgTtM','risk','nickName','305931mBiHNm','validation','scriptName','enum','appCode','99908SXkRXl','\x20->\x20','appcode','\x20<command>\x20[flags]','username','params','string','code','sqlCode','bffId','required','ctx.','10938agkwEN','service','Preview\x20dynamic\x20service\x20command:\x20','now','remainingArgs','Unsupported\x20service\x20target\x20kind:\x20','\x20\x20\x20\x20sqlCode:\x20','10NZbpRr','boolean','\x20\x20\x20\x20datasetCode:\x20','Unknown\x20appRef\x20\x22','\x20completed\x20in\x20','const','datatable','operator','entries','push','trim','tenantCode','appBindings','description','length','flatMap','normalizedManifest','some','command','source','cliPath','\x20\x20SERVICE\x20TREE\x20TARGET','number','slice','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','kind','\x20\x20\x20\x20','fromEntries','112419EAGAep','\x20\x20[','userName','\x20\x20\x20\x20functionName:\x20','padEnd','default','read','Use\x20`','tree'];a39_0x34db=function(){return _0xeff7b0;};return a39_0x34db();}export function resolveDynamicServiceCommand(_0x1d54a2,_0x3de1a9){const _0x19d233=a39_0x746a,_0x120df4=listLocalServiceTrees();let _0x306c3e;for(const _0x44113c of _0x120df4){const _0x46d127=matchServiceTreeCommand(_0x44113c,_0x1d54a2);if(!_0x46d127)continue;(!_0x306c3e||_0x46d127[_0x19d233(0x97)][_0x19d233(0xb8)][_0x19d233(0x93)]>_0x306c3e[_0x19d233(0x97)][_0x19d233(0xb8)][_0x19d233(0x93)])&&(_0x306c3e={'tree':_0x44113c,'command':_0x46d127[_0x19d233(0x97)],'remainingArgs':_0x46d127[_0x19d233(0xeb)]});}if(!_0x306c3e)return undefined;const _0x34ad42={..._0x3de1a9};return applyAppBinding(_0x306c3e[_0x19d233(0xa9)],_0x306c3e['command'],_0x34ad42),{'definition':buildDynamicCommandDefinition(_0x306c3e['tree'],_0x306c3e[_0x19d233(0x97)]),'args':_0x306c3e[_0x19d233(0xeb)],'flags':_0x34ad42,'tree':_0x306c3e[_0x19d233(0xa9)],'command':_0x306c3e[_0x19d233(0x97)]};}export function generateDynamicServiceHelp(_0x5582e1){const _0x43eeee=a39_0x746a,_0x39783e=listLocalServiceTrees()['find'](_0x1afe2f=>_0x1afe2f[_0x43eeee(0xe8)][_0x43eeee(0xe2)]===_0x5582e1);if(!_0x39783e)return undefined;const _0x4f8c60=[CLI_BIN_NAME+'\x20'+_0x5582e1+_0x43eeee(0xde),'',_0x39783e[_0x43eeee(0xe8)]['name']||_0x5582e1,_0x39783e[_0x43eeee(0xe8)][_0x43eeee(0x92)]?'\x20\x20'+_0x39783e[_0x43eeee(0xe8)][_0x43eeee(0x92)]:'','',_0x43eeee(0xae),..._0x39783e[_0x43eeee(0xcf)][_0x43eeee(0xd2)](_0x549430=>{const _0x505241=_0x43eeee,_0x37f174=_0x549430['fullPath'][_0x505241(0x9c)](0x1)[_0x505241(0xbb)]('\x20'),_0x344b54=_0x549430[_0x505241(0xd4)]===_0x505241(0xa7)?'':'\x20['+_0x549430[_0x505241(0xd4)]+']';return'\x20\x20'+_0x37f174[_0x505241(0xa5)](0x18)+'\x20'+(_0x549430[_0x505241(0x92)]||'')+_0x344b54;}),'',_0x43eeee(0xa8)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x5582e1+'`\x20to\x20inspect\x20the\x20manifest.'][_0x43eeee(0xb3)](Boolean);return _0x4f8c60[_0x43eeee(0xbb)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x192dec=>{const _0x51c67c=a39_0x746a,_0x52d80a=_0x192dec[_0x51c67c(0x95)];return{'service':_0x52d80a['service'][_0x51c67c(0xe2)],'label':_0x52d80a['service'][_0x51c67c(0xab)]||_0x52d80a['service'][_0x51c67c(0xe2)],'commands':_0x52d80a['commands'][_0x51c67c(0xd2)](_0x385a6b=>({'command':dynamicCommandName(_0x385a6b),'description':_0x385a6b[_0x51c67c(0x92)]||_0x51c67c(0xac)+_0x385a6b[_0x51c67c(0x99)],'tag':riskTag(_0x385a6b[_0x51c67c(0xd4)])}))};});}export function getDynamicServiceEntry(_0x1aa3fd){return listDynamicServiceEntries()['find'](_0xb94008=>_0xb94008['service']===_0x1aa3fd);}export function listDynamicServiceDefinitions(_0x1ee463){const _0x5e41d8=a39_0x746a;return listLocalServiceTrees()[_0x5e41d8(0xb3)](_0x5db3b7=>!_0x1ee463||_0x5db3b7[_0x5e41d8(0xe8)][_0x5e41d8(0xe2)]===_0x1ee463)[_0x5e41d8(0x94)](_0x2932c5=>_0x2932c5[_0x5e41d8(0xcf)]['map'](_0x41c875=>buildDynamicCommandDefinition(_0x2932c5,_0x41c875)));}export function getDynamicServiceDefinitions(_0x544229){const _0x319020=a39_0x746a,_0x2a4aa7=listDynamicServiceDefinitions(_0x544229);return _0x2a4aa7[_0x319020(0x93)]>0x0?_0x2a4aa7:undefined;}export function findDynamicServiceDefinition(_0x1220b7,_0x37ff1d){const _0x53729c=a39_0x746a;return listDynamicServiceDefinitions(_0x1220b7)[_0x53729c(0xaf)](_0x460855=>_0x460855['command']===_0x37ff1d);}export function buildDynamicCommandDefinition(_0x3e0910,_0x3dc767){const _0x238175=a39_0x746a;return{'service':_0x3e0910[_0x238175(0xe8)][_0x238175(0xe2)],'command':dynamicCommandName(_0x3dc767),'description':_0x3dc767[_0x238175(0x92)]||_0x238175(0xac)+_0x3dc767[_0x238175(0x99)],'risk':_0x3dc767[_0x238175(0xd4)],'requiresAuth':!![],'requiresAppCode':!![],'args':_0x3dc767['args'][_0x238175(0xd2)](_0x5a3eea=>({'name':_0x5a3eea['name'],'description':_0x5a3eea[_0x238175(0x92)]||_0x5a3eea[_0x238175(0xab)],'required':_0x5a3eea[_0x238175(0xe5)]})),'flags':_0x3dc767[_0x238175(0xb9)][_0x238175(0xd2)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x3dc767),async 'dryRun'(_0x34f0ae){const _0xae7aed=_0x238175,_0x1d45f4=await compilePlan(_0x3dc767,_0x34f0ae);return{'method':_0xae7aed(0xc4),'url':_0x3dc767[_0xae7aed(0x99)],'body':{'target':targetPreview(_0x1d45f4),'params':_0x1d45f4['params']},'description':_0xae7aed(0xe9)+_0x3dc767[_0xae7aed(0x99)]};},async 'execute'(_0x50b137){const _0x3adeea=_0x238175,_0x4d81d8=await compilePlan(_0x3dc767,_0x50b137),_0x56d0df=Date[_0x3adeea(0xea)](),_0x5a1e12=await executePlan(_0x4d81d8,_0x3dc767,_0x50b137),_0x3f0597=Date[_0x3adeea(0xea)]()-_0x56d0df;return{'ok':!![],'data':{'service':_0x3e0910[_0x3adeea(0xe8)],'command':_0x3dc767[_0x3adeea(0x99)],'target':targetPreview(_0x4d81d8),'result':_0x5a1e12,'elapsed':_0x3f0597},'message':_0x3adeea(0xbf)+_0x3dc767[_0x3adeea(0x99)]+_0x3adeea(0xf2)+_0x3f0597+'ms'};}};}function dynamicCommandName(_0x1b70ca){const _0x351021=a39_0x746a;return _0x1b70ca[_0x351021(0xb8)][_0x351021(0x9c)](0x1)[_0x351021(0xbb)]('\x20');}function riskTag(_0x381b80){const _0x459855=a39_0x746a;return _0x381b80==='read'?'':_0x459855(0xa2)+_0x381b80+']';}function a39_0x746a(_0x45e70e,_0x22b0d0){_0x45e70e=_0x45e70e-0x8a;const _0x34dbbd=a39_0x34db();let _0x746ade=_0x34dbbd[_0x45e70e];return _0x746ade;}function flagToCommandFlag(_0x3a8e31){const _0x3873c1=a39_0x746a;return{'name':_0x3a8e31['cliName'],'type':_0x3a8e31[_0x3873c1(0xbd)]===_0x3873c1(0xcc)?_0x3873c1(0xe1):_0x3a8e31[_0x3873c1(0xbd)],'description':_0x3a8e31[_0x3873c1(0x92)]||_0x3a8e31[_0x3873c1(0xab)],'required':_0x3a8e31[_0x3873c1(0xe5)],'default':isPrimitiveFlagDefault(_0x3a8e31[_0x3873c1(0xa6)])?_0x3a8e31[_0x3873c1(0xa6)]:undefined,'enum':_0x3a8e31[_0x3873c1(0xd9)]};}async function compilePlan(_0x41ffbc,_0x1636ab){const _0x330a0a=a39_0x746a;return compileServiceTreeCommand(_0x41ffbc,{'flags':_0x1636ab[_0x330a0a(0xca)],'args':_0x1636ab['args'],'context':await buildServiceContext(_0x41ffbc,_0x1636ab)});}async function buildServiceContext(_0x2637ac,_0x35c144){const _0x114c7f=a39_0x746a,_0xcc09ee={'appCode':_0x35c144[_0x114c7f(0xda)],'env':_0x35c144[_0x114c7f(0xba)],'envName':_0x35c144['envName']};if(!usesRuntimeContext(_0x2637ac))return _0xcc09ee;const _0x5ad32f=await getLoginUserInfo(),_0x4db487=pickFirst(_0x5ad32f[_0x114c7f(0xb2)],_0x5ad32f['id']);return{..._0xcc09ee,'user':_0x5ad32f,'userId':_0x4db487,'id':_0x5ad32f['id'],'username':pickFirst(_0x5ad32f[_0x114c7f(0xdf)],_0x5ad32f['userName'],_0x5ad32f['loginName']),'userName':_0x5ad32f[_0x114c7f(0xa3)],'nickname':pickFirst(_0x5ad32f[_0x114c7f(0xcb)],_0x5ad32f[_0x114c7f(0xd5)]),'nickName':_0x5ad32f[_0x114c7f(0xd5)],'tenantCode':_0x5ad32f[_0x114c7f(0x90)],'employeeId':_0x5ad32f['employeeId']};}function usesRuntimeContext(_0x56b011){const _0x4c2446=a39_0x746a;return _0x56b011[_0x4c2446(0xad)][_0x4c2446(0x96)](_0x378fca=>typeof _0x378fca[_0x4c2446(0x98)]==='string'&&(_0x378fca[_0x4c2446(0x98)][_0x4c2446(0xb4)](_0x4c2446(0xcd))||_0x378fca[_0x4c2446(0x98)]['startsWith'](_0x4c2446(0xe6))));}function pickFirst(..._0x28f6b5){const _0xaac4c1=a39_0x746a;return _0x28f6b5[_0xaac4c1(0xaf)](_0x291a1c=>_0x291a1c!==undefined&&_0x291a1c!==null);}async function executePlan(_0x35ca3e,_0x352183,_0xdae7f0){const _0x5b679b=a39_0x746a;if(_0x35ca3e[_0x5b679b(0x9e)]==='data'){const _0x2565b4=await resolveDatasetCode(_0x35ca3e,_0x352183,_0xdae7f0);return executeData(_0x2565b4,_0x35ca3e['command'],_0x35ca3e[_0x5b679b(0xe0)]);}if(_0x35ca3e['kind']==='sql'){if(!_0x35ca3e[_0x5b679b(0xe3)])throw CliErrors[_0x5b679b(0xd7)](_0x5b679b(0xbf)+_0x352183[_0x5b679b(0x99)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x35ca3e[_0x5b679b(0xe3)],normalizeScalarParams(_0x35ca3e[_0x5b679b(0xe0)]));}if(_0x35ca3e[_0x5b679b(0x9e)]===_0x5b679b(0xce)){const _0x153fbb=_0x35ca3e[_0x5b679b(0xd8)]||_0x35ca3e['bffCode']||(_0x35ca3e[_0x5b679b(0xe4)]==null?'':String(_0x35ca3e[_0x5b679b(0xe4)]));if(!_0x153fbb)throw CliErrors[_0x5b679b(0xd7)](_0x5b679b(0xbf)+_0x352183[_0x5b679b(0x99)]+_0x5b679b(0xbc));return executeSdkBff(_0x153fbb,_0x35ca3e[_0x5b679b(0xe0)]);}throw CliErrors[_0x5b679b(0xd7)](_0x5b679b(0xec)+_0x35ca3e[_0x5b679b(0x9e)]);}async function resolveDatasetCode(_0x2c1f3d,_0x221af8,_0x1b0ca8){const _0x3f1bed=a39_0x746a;if(_0x2c1f3d['datasetCode'])return _0x2c1f3d[_0x3f1bed(0xc7)];if(!_0x2c1f3d[_0x3f1bed(0x8b)])throw CliErrors[_0x3f1bed(0xd7)]('Service\x20command\x20'+_0x221af8[_0x3f1bed(0x99)]+_0x3f1bed(0x9d));const _0x41be12=await listDatasets(_0x1b0ca8[_0x3f1bed(0xda)]),_0xc8d938=_0x41be12[_0x3f1bed(0xaf)](_0x51af9f=>_0x51af9f['dbtableConfig']?.[_0x3f1bed(0xb5)]===_0x2c1f3d[_0x3f1bed(0x8b)]);if(!_0xc8d938?.['code'])throw CliErrors[_0x3f1bed(0xd7)](_0x3f1bed(0xc3)+_0x2c1f3d[_0x3f1bed(0x8b)]+_0x3f1bed(0xd0)+_0x1b0ca8[_0x3f1bed(0xda)]+'.',_0x3f1bed(0xc5));return _0xc8d938[_0x3f1bed(0xe2)];}function applyAppBinding(_0x792da1,_0xf263a0,_0x58bf74){const _0x54c611=a39_0x746a,_0x420c28=_0xf263a0['target'][_0x54c611(0xc0)];if(!_0x420c28)return;const _0x4ad150=_0x792da1[_0x54c611(0x91)][_0x420c28];if(!_0x4ad150)throw CliErrors[_0x54c611(0xd7)](_0x54c611(0xf1)+_0x420c28+_0x54c611(0xb1)+_0xf263a0[_0x54c611(0x99)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x5f31b0=_0x4ad150[_0x54c611(0xdd)]||_0x4ad150[_0x54c611(0xda)];_0x5f31b0&&!hasText(_0x58bf74[_0x54c611(0xdd)])&&(_0x58bf74['appcode']=_0x5f31b0),_0x4ad150['app']&&!hasText(_0x58bf74[_0x54c611(0xbe)])&&!hasText(_0x58bf74[_0x54c611(0xdd)])&&(_0x58bf74['app']=_0x4ad150['app']),_0x4ad150['env']&&!hasText(_0x58bf74[_0x54c611(0xc1)])&&(_0x58bf74['env']=_0x4ad150[_0x54c611(0xc1)]);}function renderDynamicCommandHelp(_0x2d2bff){const _0x29fb90=a39_0x746a,_0x4e298e=[_0x29fb90(0x9a),_0x29fb90(0xc2)+_0x2d2bff[_0x29fb90(0xc6)][_0x29fb90(0x9e)],_0x29fb90(0xc9)+_0x2d2bff[_0x29fb90(0xc6)][_0x29fb90(0x97)]];if(_0x2d2bff[_0x29fb90(0xc6)][_0x29fb90(0xc7)])_0x4e298e[_0x29fb90(0x8e)](_0x29fb90(0xf0)+_0x2d2bff[_0x29fb90(0xc6)][_0x29fb90(0xc7)]);if(_0x2d2bff[_0x29fb90(0xc6)]['datatable'])_0x4e298e[_0x29fb90(0x8e)](_0x29fb90(0xd1)+_0x2d2bff['target'][_0x29fb90(0x8b)]);if(_0x2d2bff[_0x29fb90(0xc6)]['sqlCode'])_0x4e298e[_0x29fb90(0x8e)](_0x29fb90(0xed)+_0x2d2bff['target'][_0x29fb90(0xe3)]);if(_0x2d2bff['target'][_0x29fb90(0xd8)])_0x4e298e['push'](_0x29fb90(0xa4)+_0x2d2bff['target'][_0x29fb90(0xd8)]);if(_0x2d2bff[_0x29fb90(0xad)]['length']>0x0){_0x4e298e[_0x29fb90(0x8e)]('',_0x29fb90(0xb0));for(const _0x493db4 of _0x2d2bff[_0x29fb90(0xad)]){_0x4e298e['push'](_0x29fb90(0x9f)+(_0x493db4[_0x29fb90(0x98)]||_0x29fb90(0x8a))+_0x29fb90(0xdc)+_0x493db4['target']+(_0x493db4[_0x29fb90(0x8c)]?'.'+_0x493db4[_0x29fb90(0x8c)]:''));}}return _0x4e298e[_0x29fb90(0xbb)]('\x0a');}function targetPreview(_0x55e64d){const _0x28543f=a39_0x746a;return{'kind':_0x55e64d['kind'],'command':_0x55e64d['command'],'appRef':_0x55e64d[_0x28543f(0xc0)],'datasetCode':_0x55e64d[_0x28543f(0xc7)],'datatable':_0x55e64d[_0x28543f(0x8b)],'sqlCode':_0x55e64d[_0x28543f(0xe3)],'bffCode':_0x55e64d['bffCode'],'bffId':_0x55e64d[_0x28543f(0xe4)],'functionName':_0x55e64d[_0x28543f(0xd8)]};}function normalizeScalarParams(_0x4357f1){const _0x3f1cf3=a39_0x746a;return Object[_0x3f1cf3(0xa0)](Object[_0x3f1cf3(0x8d)](_0x4357f1)[_0x3f1cf3(0xb3)](([,_0xed5cb3])=>typeof _0xed5cb3===_0x3f1cf3(0xe1)||typeof _0xed5cb3===_0x3f1cf3(0x9b)));}function hasText(_0x1adb24){const _0x580b4f=a39_0x746a;return typeof _0x1adb24===_0x580b4f(0xe1)&&_0x1adb24[_0x580b4f(0x8f)]()[_0x580b4f(0x93)]>0x0;}function isPrimitiveFlagDefault(_0x149443){const _0xfbabfe=a39_0x746a;return _0x149443===undefined||typeof _0x149443===_0xfbabfe(0xe1)||typeof _0x149443==='number'||typeof _0x149443===_0xfbabfe(0xef);}
@@ -1 +1 @@
1
- function a40_0x4465(_0x3e4209,_0x3c0f67){_0x3e4209=_0x3e4209-0x14e;const _0x21911d=a40_0x2191();let _0x446543=_0x21911d[_0x3e4209];return _0x446543;}(function(_0x50a252,_0x45b0d4){const _0x2b6b55=a40_0x4465,_0x45f989=_0x50a252();while(!![]){try{const _0x13b1f9=-parseInt(_0x2b6b55(0x164))/0x1*(parseInt(_0x2b6b55(0x153))/0x2)+parseInt(_0x2b6b55(0x16e))/0x3*(parseInt(_0x2b6b55(0x163))/0x4)+-parseInt(_0x2b6b55(0x156))/0x5+parseInt(_0x2b6b55(0x172))/0x6*(-parseInt(_0x2b6b55(0x16f))/0x7)+parseInt(_0x2b6b55(0x160))/0x8+parseInt(_0x2b6b55(0x169))/0x9+-parseInt(_0x2b6b55(0x167))/0xa;if(_0x13b1f9===_0x45b0d4)break;else _0x45f989['push'](_0x45f989['shift']());}catch(_0x2996f9){_0x45f989['push'](_0x45f989['shift']());}}}(a40_0x2191,0xb7592));export function adaptServiceTreeManifestForLegacyFramework(_0x192f55){const _0x11ea19=a40_0x4465,_0x101b66=cloneJsonValue(_0x192f55),_0x5a772a=[];if(!isObjectRecord(_0x101b66))return{'manifest':_0x101b66,'errors':_0x5a772a};return Array[_0x11ea19(0x150)](_0x101b66[_0x11ea19(0x15d)])&&_0x101b66[_0x11ea19(0x15d)]['forEach']((_0x3cb10a,_0x71c7fc)=>{const _0x4f8b29=_0x11ea19;if(!isObjectRecord(_0x3cb10a))return;adaptBffTarget(_0x3cb10a[_0x4f8b29(0x15e)],_0x4f8b29(0x155)+_0x71c7fc+_0x4f8b29(0x161),_0x5a772a);}),adaptResources(_0x101b66[_0x11ea19(0x14e)],'$.resources',_0x5a772a),{'manifest':_0x101b66,'errors':_0x5a772a};}export function toPublicServiceTreeTarget(_0x304745){const _0x515dbb=a40_0x4465,{scriptName:_0x29b65a,..._0x2a216b}=_0x304745;return typeof _0x29b65a===_0x515dbb(0x151)&&_0x29b65a[_0x515dbb(0x158)]()&&(_0x2a216b[_0x515dbb(0x16d)]=_0x29b65a),_0x2a216b;}export function toPublicNormalizedServiceTree(_0x5a3624){const _0xaf9435=a40_0x4465;return{..._0x5a3624,'commands':_0x5a3624[_0xaf9435(0x15d)][_0xaf9435(0x16b)](_0x335860=>({..._0x335860,'target':toPublicServiceTreeTarget(_0x335860[_0xaf9435(0x15e)])}))};}function adaptResources(_0x581a69,_0x505c2d,_0x1b8acd){const _0x3101c2=a40_0x4465;if(!isObjectRecord(_0x581a69))return;for(const [_0x1aaa87,_0x4399d1]of Object[_0x3101c2(0x159)](_0x581a69)){if(!isObjectRecord(_0x4399d1))continue;const _0x31453e=_0x505c2d+'.'+_0x1aaa87;if(isObjectRecord(_0x4399d1[_0x3101c2(0x15a)]))for(const [_0x2a2faa,_0x72002d]of Object[_0x3101c2(0x159)](_0x4399d1[_0x3101c2(0x15a)])){if(!isObjectRecord(_0x72002d))continue;const _0x2d3d3f=_0x31453e+'.actions.'+_0x2a2faa,_0x246da8=isObjectRecord(_0x72002d[_0x3101c2(0x15e)])&&_0x72002d[_0x3101c2(0x15e)]['kind']===_0x3101c2(0x162);adaptBffTarget(_0x72002d[_0x3101c2(0x15e)],_0x2d3d3f+_0x3101c2(0x154),_0x1b8acd),(_0x246da8||isBffAction(_0x72002d))&&adaptFunctionNameField(_0x72002d,_0x2d3d3f,_0x1b8acd);}adaptResources(_0x4399d1[_0x3101c2(0x14e)],_0x31453e+_0x3101c2(0x14f),_0x1b8acd);}}function a40_0x2191(){const _0x123be8=['resources','.resources','isArray','string','push','131420JxIXzh','.target','$.commands[','4019520WKcxqv','scriptName','trim','entries','actions','bff.exec','prototype','commands','target','fromEntries','9223752wrullf','].target','bff','955744bISMdw','15ChBxZs','.functionName','call','2522350ntUnCX','functionName\x20must\x20be\x20a\x20non-empty\x20string.','11729952ThCTkZ','error','map','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','functionName','12dzdipm','4334806mItrLQ','object','kind','6nPVKLJ','hasOwnProperty'];a40_0x2191=function(){return _0x123be8;};return a40_0x2191();}function adaptBffTarget(_0x5a69a5,_0x34523e,_0x407c69){const _0x57b8c3=a40_0x4465;if(!isObjectRecord(_0x5a69a5)||_0x5a69a5['kind']!==_0x57b8c3(0x162))return;adaptFunctionNameField(_0x5a69a5,_0x34523e,_0x407c69);}function adaptFunctionNameField(_0x5383fe,_0xa261b4,_0x24ff5d){const _0x96cb49=a40_0x4465;Object[_0x96cb49(0x15c)][_0x96cb49(0x173)][_0x96cb49(0x166)](_0x5383fe,_0x96cb49(0x157))&&_0x24ff5d[_0x96cb49(0x152)]({'level':_0x96cb49(0x16a),'path':_0xa261b4+'.scriptName','message':_0x96cb49(0x16c)});if(Object['prototype'][_0x96cb49(0x173)][_0x96cb49(0x166)](_0x5383fe,_0x96cb49(0x16d))){if(typeof _0x5383fe[_0x96cb49(0x16d)]!==_0x96cb49(0x151)||!_0x5383fe[_0x96cb49(0x16d)][_0x96cb49(0x158)]()){_0x24ff5d['push']({'level':'error','path':_0xa261b4+_0x96cb49(0x165),'message':_0x96cb49(0x168)}),delete _0x5383fe[_0x96cb49(0x16d)];return;}_0x5383fe[_0x96cb49(0x157)]=_0x5383fe[_0x96cb49(0x16d)],delete _0x5383fe[_0x96cb49(0x16d)];}}function isBffAction(_0x50da60){const _0x627c07=a40_0x4465;return _0x50da60[_0x627c07(0x171)]===_0x627c07(0x162)||_0x50da60['action']==='bff.exec'||_0x50da60[_0x627c07(0x15e)]===_0x627c07(0x15b);}function cloneJsonValue(_0x10b564){const _0x59a414=a40_0x4465;if(Array['isArray'](_0x10b564))return _0x10b564['map'](_0x58da41=>cloneJsonValue(_0x58da41));if(isObjectRecord(_0x10b564))return Object[_0x59a414(0x15f)](Object[_0x59a414(0x159)](_0x10b564)[_0x59a414(0x16b)](([_0x568d99,_0x478350])=>[_0x568d99,cloneJsonValue(_0x478350)]));return _0x10b564;}function isObjectRecord(_0x52374f){const _0x4de446=a40_0x4465;return Boolean(_0x52374f)&&typeof _0x52374f===_0x4de446(0x170)&&!Array['isArray'](_0x52374f);}
1
+ (function(_0x651978,_0x32f08b){const _0x14d8ab=a40_0x3f01,_0x420936=_0x651978();while(!![]){try{const _0x580a5b=-parseInt(_0x14d8ab(0x15a))/0x1+parseInt(_0x14d8ab(0x160))/0x2+-parseInt(_0x14d8ab(0x16b))/0x3+parseInt(_0x14d8ab(0x15e))/0x4+parseInt(_0x14d8ab(0x16c))/0x5+parseInt(_0x14d8ab(0x156))/0x6+-parseInt(_0x14d8ab(0x155))/0x7;if(_0x580a5b===_0x32f08b)break;else _0x420936['push'](_0x420936['shift']());}catch(_0x132ea0){_0x420936['push'](_0x420936['shift']());}}}(a40_0x29fa,0xa3fca));export function adaptServiceTreeManifestForLegacyFramework(_0x2e093a){const _0x1bdfed=a40_0x3f01,_0x1e84ef=cloneJsonValue(_0x2e093a),_0x4d5e3d=[];if(!isObjectRecord(_0x1e84ef))return{'manifest':_0x1e84ef,'errors':_0x4d5e3d};return Array[_0x1bdfed(0x159)](_0x1e84ef[_0x1bdfed(0x15b)])&&_0x1e84ef[_0x1bdfed(0x15b)][_0x1bdfed(0x153)]((_0x389fab,_0x1f21af)=>{const _0x4eed03=_0x1bdfed;if(!isObjectRecord(_0x389fab))return;adaptBffTarget(_0x389fab[_0x4eed03(0x162)],_0x4eed03(0x168)+_0x1f21af+'].target',_0x4d5e3d);}),adaptResources(_0x1e84ef[_0x1bdfed(0x165)],_0x1bdfed(0x15c),_0x4d5e3d),{'manifest':_0x1e84ef,'errors':_0x4d5e3d};}export function toPublicServiceTreeTarget(_0x5d12bd){const _0x34e6c6=a40_0x3f01,{scriptName:_0x3f5534,..._0x1b73f6}=_0x5d12bd;return typeof _0x3f5534===_0x34e6c6(0x14f)&&_0x3f5534[_0x34e6c6(0x170)]()&&(_0x1b73f6[_0x34e6c6(0x150)]=_0x3f5534),_0x1b73f6;}function a40_0x3f01(_0x4d6f5a,_0x15f3cb){_0x4d6f5a=_0x4d6f5a-0x14f;const _0x29fa89=a40_0x29fa();let _0x3f011f=_0x29fa89[_0x4d6f5a];return _0x3f011f;}export function toPublicNormalizedServiceTree(_0x4d2338){const _0x1726d5=a40_0x3f01;return{..._0x4d2338,'commands':_0x4d2338[_0x1726d5(0x15b)][_0x1726d5(0x151)](_0x546bbf=>({..._0x546bbf,'target':toPublicServiceTreeTarget(_0x546bbf[_0x1726d5(0x162)])}))};}function a40_0x29fa(){const _0x519260=['scriptName','action','actions','trim','string','functionName','map','.target','forEach','hasOwnProperty','10327268kIlmWl','7626978tJxtQJ','kind','functionName\x20must\x20be\x20a\x20non-empty\x20string.','isArray','159786rcFvBs','commands','$.resources','.functionName','2050716zzSEdE','entries','1586608ynRpoB','bff','target','push','error','resources','fromEntries','.scriptName','$.commands[','call','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','4030062Wbldax','5365040vRbHwB'];a40_0x29fa=function(){return _0x519260;};return a40_0x29fa();}function adaptResources(_0x2d84cc,_0x2f3fa3,_0x442270){const _0x5b1055=a40_0x3f01;if(!isObjectRecord(_0x2d84cc))return;for(const [_0x115a04,_0x90d720]of Object[_0x5b1055(0x15f)](_0x2d84cc)){if(!isObjectRecord(_0x90d720))continue;const _0x53114e=_0x2f3fa3+'.'+_0x115a04;if(isObjectRecord(_0x90d720[_0x5b1055(0x16f)]))for(const [_0x583453,_0x462d73]of Object[_0x5b1055(0x15f)](_0x90d720[_0x5b1055(0x16f)])){if(!isObjectRecord(_0x462d73))continue;const _0x2ae2ef=_0x53114e+'.actions.'+_0x583453,_0x1b9548=isObjectRecord(_0x462d73['target'])&&_0x462d73[_0x5b1055(0x162)][_0x5b1055(0x157)]===_0x5b1055(0x161);adaptBffTarget(_0x462d73['target'],_0x2ae2ef+_0x5b1055(0x152),_0x442270),(_0x1b9548||isBffAction(_0x462d73))&&adaptFunctionNameField(_0x462d73,_0x2ae2ef,_0x442270);}adaptResources(_0x90d720[_0x5b1055(0x165)],_0x53114e+'.resources',_0x442270);}}function adaptBffTarget(_0xc55b15,_0x24b018,_0x1364a0){const _0x147d0f=a40_0x3f01;if(!isObjectRecord(_0xc55b15)||_0xc55b15[_0x147d0f(0x157)]!==_0x147d0f(0x161))return;adaptFunctionNameField(_0xc55b15,_0x24b018,_0x1364a0);}function adaptFunctionNameField(_0x27ea95,_0x2a02ae,_0x1e487e){const _0x54ecfb=a40_0x3f01;Object['prototype'][_0x54ecfb(0x154)][_0x54ecfb(0x169)](_0x27ea95,_0x54ecfb(0x16d))&&_0x1e487e[_0x54ecfb(0x163)]({'level':_0x54ecfb(0x164),'path':_0x2a02ae+_0x54ecfb(0x167),'message':_0x54ecfb(0x16a)});if(Object['prototype'][_0x54ecfb(0x154)][_0x54ecfb(0x169)](_0x27ea95,_0x54ecfb(0x150))){if(typeof _0x27ea95['functionName']!=='string'||!_0x27ea95['functionName']['trim']()){_0x1e487e[_0x54ecfb(0x163)]({'level':'error','path':_0x2a02ae+_0x54ecfb(0x15d),'message':_0x54ecfb(0x158)}),delete _0x27ea95['functionName'];return;}_0x27ea95[_0x54ecfb(0x16d)]=_0x27ea95[_0x54ecfb(0x150)],delete _0x27ea95[_0x54ecfb(0x150)];}}function isBffAction(_0x228979){const _0x722108=a40_0x3f01;return _0x228979['kind']===_0x722108(0x161)||_0x228979[_0x722108(0x16e)]==='bff.exec'||_0x228979['target']==='bff.exec';}function cloneJsonValue(_0x38a9c0){const _0x5ed707=a40_0x3f01;if(Array[_0x5ed707(0x159)](_0x38a9c0))return _0x38a9c0['map'](_0x58b3af=>cloneJsonValue(_0x58b3af));if(isObjectRecord(_0x38a9c0))return Object[_0x5ed707(0x166)](Object['entries'](_0x38a9c0)[_0x5ed707(0x151)](([_0x1829fa,_0x5e4a5b])=>[_0x1829fa,cloneJsonValue(_0x5e4a5b)]));return _0x38a9c0;}function isObjectRecord(_0x38685f){const _0x538ced=a40_0x3f01;return Boolean(_0x38685f)&&typeof _0x38685f==='object'&&!Array[_0x538ced(0x159)](_0x38685f);}
@@ -1 +1 @@
1
- const a41_0x2b684f=a41_0x3131;(function(_0x927abe,_0x3303ee){const _0x870ada=a41_0x3131,_0xc820d0=_0x927abe();while(!![]){try{const _0x1d6f04=-parseInt(_0x870ada(0x1f6))/0x1+-parseInt(_0x870ada(0x1fb))/0x2*(-parseInt(_0x870ada(0x1e6))/0x3)+parseInt(_0x870ada(0x214))/0x4*(parseInt(_0x870ada(0x1e8))/0x5)+parseInt(_0x870ada(0x1f7))/0x6+-parseInt(_0x870ada(0x1f8))/0x7+parseInt(_0x870ada(0x1fa))/0x8*(-parseInt(_0x870ada(0x202))/0x9)+parseInt(_0x870ada(0x207))/0xa;if(_0x1d6f04===_0x3303ee)break;else _0xc820d0['push'](_0xc820d0['shift']());}catch(_0x4b3fe5){_0xc820d0['push'](_0xc820d0['shift']());}}}(a41_0x320d,0xcbc48));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a41_0x2b684f(0x1fe),'type':'string','required':!![],'description':a41_0x2b684f(0x1e5)},SERVICE_FLAG={'name':a41_0x2b684f(0x205),'type':'string','required':!![],'description':a41_0x2b684f(0x219),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a41_0x2b684f(0x1df)}};function summarizeService(_0x36d84f){const _0x579810=a41_0x2b684f;return{'serviceCode':_0x36d84f[_0x579810(0x1e2)],'name':_0x36d84f[_0x579810(0x20f)][_0x579810(0x205)][_0x579810(0x203)],'version':_0x36d84f[_0x579810(0x1de)],'importedAt':_0x36d84f[_0x579810(0x211)],'source':_0x36d84f['source'],'commandCount':_0x36d84f[_0x579810(0x20f)][_0x579810(0x201)][_0x579810(0x1fc)],'commands':_0x36d84f[_0x579810(0x20f)][_0x579810(0x201)][_0x579810(0x204)](_0x304933=>({'path':_0x304933[_0x579810(0x1fd)],'description':_0x304933[_0x579810(0x20b)],'risk':_0x304933[_0x579810(0x20c)],'target':toPublicServiceTreeTarget(_0x304933[_0x579810(0x1f2)]),'flags':_0x304933[_0x579810(0x1d8)]['map'](_0x1f4ce7=>({'name':_0x1f4ce7['name'],'cliName':_0x1f4ce7[_0x579810(0x1f5)],'type':_0x1f4ce7[_0x579810(0x1d7)],'required':_0x1f4ce7['required']===!![]}))}))};}function a41_0x320d(){const _0x1e20df=['registryPath','target','\x20service(s),\x20updated\x20','manifests','cliName','1067217igOMcL','7200804gfPbrB','10465259HchiHg','validate','144TXmafH','68tIOesq','length','cliPath','file','report','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','commands','159183HKdkkY','name','map','service','\x20service(s).','7851350TPtkBE','hash','Imported','Removed\x20service\x20','description','risk','registry','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','normalizedManifest','import','importedAt','Service\x20registry\x20validation\x20passed.','errors','92HXkCUE','Imported\x20','export','remove','updated','Local\x20service\x20code,\x20for\x20example\x20crm','serviceCount','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','read','entries','Service\x20manifest\x20validation\x20passed.','imported','type','flags','registryIndex','\x20service\x20','str','source','warnings','version','lower\x20kebab-case\x20service\x20code','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','registryServiceCode','serviceCode','kind','WRITE','Service\x20Tree\x20manifest\x20file\x20path','110379DTlkmx','filePath','104135doptQV','detail','write','Local\x20service\x20not\x20found:\x20','replaced','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','reduce','Exported\x20service\x20','entry'];a41_0x320d=function(){return _0x1e20df;};return a41_0x320d();}function summarizeLoadedManifest(_0x3470ee){const _0x2752e3=a41_0x2b684f;return{'service':_0x3470ee[_0x2752e3(0x20f)]?.[_0x2752e3(0x205)],'version':_0x3470ee['normalizedManifest']?.['version'],'commandCount':_0x3470ee[_0x2752e3(0x20f)]?.['commands']['length']??0x0,'commands':_0x3470ee[_0x2752e3(0x20f)]?.[_0x2752e3(0x201)][_0x2752e3(0x204)](_0x39831c=>({'path':_0x39831c[_0x2752e3(0x1fd)],'risk':_0x39831c[_0x2752e3(0x20c)],'target':toPublicServiceTreeTarget(_0x39831c[_0x2752e3(0x1f2)])}))??[],'registryIndex':_0x3470ee[_0x2752e3(0x1d9)],'registryServiceCode':_0x3470ee[_0x2752e3(0x1e1)],'errors':_0x3470ee[_0x2752e3(0x1ff)][_0x2752e3(0x213)],'warnings':_0x3470ee[_0x2752e3(0x1ff)][_0x2752e3(0x1dd)]};}function a41_0x3131(_0x303e0a,_0xb74c54){_0x303e0a=_0x303e0a-0x1d3;const _0x320d6a=a41_0x320d();let _0x31314e=_0x320d6a[_0x303e0a];return _0x31314e;}export const serviceDefinitions=[{'service':a41_0x2b684f(0x205),'command':a41_0x2b684f(0x1f9),'description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a41_0x2b684f(0x1d3),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x5872d5){const _0x50ddda=a41_0x2b684f,_0x559ed=loadServiceManifestFromFile(_0x5872d5[_0x50ddda(0x1db)]('file'));if(!_0x559ed['report']['ok'])return{'ok':![],'data':{'file':_0x559ed[_0x50ddda(0x1e7)],'hash':_0x559ed[_0x50ddda(0x208)],'kind':_0x559ed[_0x50ddda(0x1e3)],'serviceCount':_0x559ed['manifests'][_0x50ddda(0x1fc)],'services':_0x559ed[_0x50ddda(0x1f4)][_0x50ddda(0x204)](summarizeLoadedManifest),'errors':_0x559ed[_0x50ddda(0x1ff)][_0x50ddda(0x213)],'warnings':_0x559ed['report'][_0x50ddda(0x1dd)]},'message':formatValidationFailure(_0x559ed[_0x50ddda(0x1ff)])};if(_0x559ed[_0x50ddda(0x1e3)]===_0x50ddda(0x20d)||_0x559ed[_0x50ddda(0x1f4)][_0x50ddda(0x1fc)]!==0x1)return{'ok':!![],'data':{'file':_0x559ed[_0x50ddda(0x1e7)],'hash':_0x559ed['hash'],'kind':_0x559ed['kind'],'serviceCount':_0x559ed[_0x50ddda(0x1f4)][_0x50ddda(0x1fc)],'commandCount':_0x559ed[_0x50ddda(0x1f4)][_0x50ddda(0x1ee)]((_0x3d6924,_0x339c49)=>_0x3d6924+(_0x339c49[_0x50ddda(0x20f)]?.[_0x50ddda(0x201)][_0x50ddda(0x1fc)]??0x0),0x0),'services':_0x559ed[_0x50ddda(0x1f4)][_0x50ddda(0x204)](summarizeLoadedManifest),'warnings':_0x559ed['report'][_0x50ddda(0x1dd)]},'message':_0x50ddda(0x212)};return{'ok':!![],'data':{'file':_0x559ed[_0x50ddda(0x1e7)],'hash':_0x559ed['hash'],'kind':_0x559ed['kind'],'service':_0x559ed[_0x50ddda(0x20f)]?.['service'],'version':_0x559ed[_0x50ddda(0x20f)]?.[_0x50ddda(0x1de)],'commandCount':_0x559ed['normalizedManifest']?.[_0x50ddda(0x201)][_0x50ddda(0x1fc)]??0x0,'commands':_0x559ed[_0x50ddda(0x20f)]?.[_0x50ddda(0x201)][_0x50ddda(0x204)](_0x3d4a88=>({'path':_0x3d4a88[_0x50ddda(0x1fd)],'risk':_0x3d4a88[_0x50ddda(0x20c)],'target':toPublicServiceTreeTarget(_0x3d4a88['target'])})),'warnings':_0x559ed[_0x50ddda(0x1ff)]['warnings']},'message':_0x50ddda(0x1d5)};}},{'service':a41_0x2b684f(0x205),'command':a41_0x2b684f(0x210),'description':a41_0x2b684f(0x1e0),'risk':a41_0x2b684f(0x1ea),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x23678e){const _0x311eaf=a41_0x2b684f,_0x2f8620=loadServiceManifestFromFile(_0x23678e[_0x311eaf(0x1db)]('file'));return{'method':_0x311eaf(0x1e4),'url':getServiceRegistryPath(),'body':{'file':_0x2f8620['filePath'],'hash':_0x2f8620[_0x311eaf(0x208)],'kind':_0x2f8620['kind'],'ok':_0x2f8620[_0x311eaf(0x1ff)]['ok'],'service':_0x2f8620[_0x311eaf(0x20f)]?.[_0x311eaf(0x205)],'version':_0x2f8620[_0x311eaf(0x20f)]?.[_0x311eaf(0x1de)],'serviceCount':_0x2f8620['manifests'][_0x311eaf(0x1fc)],'services':_0x2f8620[_0x311eaf(0x1f4)][_0x311eaf(0x204)](_0x32c2cc=>({'service':_0x32c2cc[_0x311eaf(0x20f)]?.[_0x311eaf(0x205)],'version':_0x32c2cc[_0x311eaf(0x20f)]?.[_0x311eaf(0x1de)],'commandCount':_0x32c2cc[_0x311eaf(0x20f)]?.['commands'][_0x311eaf(0x1fc)]??0x0,'errors':_0x32c2cc[_0x311eaf(0x1ff)]['errors']})),'errors':_0x2f8620[_0x311eaf(0x1ff)][_0x311eaf(0x213)],'commandCount':_0x2f8620[_0x311eaf(0x20f)]?.[_0x311eaf(0x201)][_0x311eaf(0x1fc)]??0x0},'description':_0x311eaf(0x20e)};},async 'execute'(_0x114fe5){const _0xf90c33=a41_0x2b684f,_0x7b811e=importServiceManifest(_0x114fe5['str'](_0xf90c33(0x1fe)));if(_0x7b811e[_0xf90c33(0x1d4)][_0xf90c33(0x1fc)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x7b811e[_0xf90c33(0x1f1)],'imported':_0x7b811e[_0xf90c33(0x1d6)],'updated':_0x7b811e['updated'],'serviceCount':_0x7b811e[_0xf90c33(0x21a)],'services':_0x7b811e[_0xf90c33(0x1d4)][_0xf90c33(0x204)](summarizeService)},'message':_0xf90c33(0x215)+_0x7b811e[_0xf90c33(0x1d6)]+_0xf90c33(0x1f3)+_0x7b811e['updated']+_0xf90c33(0x206)};return{'ok':!![],'data':{'registryPath':_0x7b811e[_0xf90c33(0x1f1)],'replaced':_0x7b811e[_0xf90c33(0x1ec)],'imported':_0x7b811e[_0xf90c33(0x1d6)],'updated':_0x7b811e[_0xf90c33(0x218)],'serviceCount':_0x7b811e[_0xf90c33(0x21a)],'service':summarizeService(_0x7b811e[_0xf90c33(0x1f0)])},'message':(_0x7b811e[_0xf90c33(0x1ec)]?'Updated':_0xf90c33(0x209))+_0xf90c33(0x1da)+_0x7b811e[_0xf90c33(0x1f0)][_0xf90c33(0x1e2)]+'.'};}},{'service':a41_0x2b684f(0x205),'command':a41_0x2b684f(0x216),'description':a41_0x2b684f(0x200),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x5e9dbb){const _0x522052=a41_0x2b684f,_0x40f6d2=getLocalServiceEntry(_0x5e9dbb[_0x522052(0x1db)](_0x522052(0x205)));return{'method':_0x522052(0x1e4),'url':_0x5e9dbb['str']('file'),'body':{'service':_0x5e9dbb[_0x522052(0x1db)]('service'),'found':Boolean(_0x40f6d2),'version':_0x40f6d2?.[_0x522052(0x1de)],'source':_0x40f6d2?.[_0x522052(0x1dc)]},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x2bba51){const _0x18b6a1=a41_0x2b684f,_0xc5a772=exportServiceManifest(_0x2bba51[_0x18b6a1(0x1db)](_0x18b6a1(0x205)),_0x2bba51['str']('file'));return{'ok':!![],'data':{'registryPath':_0xc5a772[_0x18b6a1(0x1f1)],'file':_0xc5a772[_0x18b6a1(0x1e7)],'service':summarizeService(_0xc5a772['entry'])},'message':_0x18b6a1(0x1ef)+_0xc5a772['entry']['serviceCode']+'.'};}},{'service':a41_0x2b684f(0x205),'command':'list','description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a41_0x2b684f(0x1d3),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x53088b=a41_0x2b684f,_0x358dd1=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x358dd1[_0x53088b(0x1fc)],'services':_0x358dd1[_0x53088b(0x204)](summarizeService)}};}},{'service':a41_0x2b684f(0x205),'command':a41_0x2b684f(0x217),'description':'Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','risk':a41_0x2b684f(0x1ea),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x52d7c9){const _0x1f5d43=a41_0x2b684f,_0x7fdee5=getLocalServiceEntry(_0x52d7c9[_0x1f5d43(0x1db)](_0x1f5d43(0x205)));return{'method':_0x1f5d43(0x1e4),'url':getServiceRegistryPath(),'body':{'service':_0x52d7c9[_0x1f5d43(0x1db)](_0x1f5d43(0x205)),'found':Boolean(_0x7fdee5),'version':_0x7fdee5?.['version'],'source':_0x7fdee5?.[_0x1f5d43(0x1dc)]},'description':_0x1f5d43(0x1ed)};},async 'execute'(_0x16a014){const _0x2a2000=a41_0x2b684f,_0x47b7dc=removeServiceManifest(_0x16a014['str'](_0x2a2000(0x205)));return{'ok':!![],'data':{'registryPath':_0x47b7dc[_0x2a2000(0x1f1)],'serviceCount':_0x47b7dc[_0x2a2000(0x21a)],'service':summarizeService(_0x47b7dc['entry'])},'message':_0x2a2000(0x20a)+_0x47b7dc['entry']['serviceCode']+'.'};}},{'service':a41_0x2b684f(0x205),'command':a41_0x2b684f(0x1e9),'description':a41_0x2b684f(0x21b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x5dbec1){const _0x344739=a41_0x2b684f,_0x49431e=getLocalServiceEntry(_0x5dbec1[_0x344739(0x1db)](_0x344739(0x205)));if(!_0x49431e)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x5dbec1['str'](_0x344739(0x205))},'message':_0x344739(0x1eb)+_0x5dbec1[_0x344739(0x1db)](_0x344739(0x205))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x49431e),'manifest':_0x49431e['manifest'],'normalizedManifest':toPublicNormalizedServiceTree(_0x49431e[_0x344739(0x20f)])}};}}];
1
+ const a41_0x707eb7=a41_0x396f;function a41_0x396f(_0x393f61,_0x288ca7){_0x393f61=_0x393f61-0x7d;const _0x594263=a41_0x5942();let _0x396fa1=_0x594263[_0x393f61];return _0x396fa1;}(function(_0x36ba54,_0x56408a){const _0x9f1af8=a41_0x396f,_0x3123df=_0x36ba54();while(!![]){try{const _0x3a071f=-parseInt(_0x9f1af8(0x86))/0x1+-parseInt(_0x9f1af8(0xb7))/0x2+-parseInt(_0x9f1af8(0xaf))/0x3+-parseInt(_0x9f1af8(0xa0))/0x4*(parseInt(_0x9f1af8(0x9d))/0x5)+parseInt(_0x9f1af8(0x9b))/0x6+-parseInt(_0x9f1af8(0x8f))/0x7+parseInt(_0x9f1af8(0xac))/0x8;if(_0x3a071f===_0x56408a)break;else _0x3123df['push'](_0x3123df['shift']());}catch(_0x9f57eb){_0x3123df['push'](_0x3123df['shift']());}}}(a41_0x5942,0x4319c));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a41_0x707eb7(0x7e),'type':'string','required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':'service','type':a41_0x707eb7(0x7d),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a41_0x707eb7(0xbe)}};function summarizeService(_0x44c4a0){const _0x2f40e7=a41_0x707eb7;return{'serviceCode':_0x44c4a0['serviceCode'],'name':_0x44c4a0[_0x2f40e7(0x93)]['service']['name'],'version':_0x44c4a0[_0x2f40e7(0x80)],'importedAt':_0x44c4a0[_0x2f40e7(0xbc)],'source':_0x44c4a0[_0x2f40e7(0x83)],'commandCount':_0x44c4a0[_0x2f40e7(0x93)][_0x2f40e7(0x99)][_0x2f40e7(0x8b)],'commands':_0x44c4a0[_0x2f40e7(0x93)][_0x2f40e7(0x99)][_0x2f40e7(0x90)](_0x275dc1=>({'path':_0x275dc1[_0x2f40e7(0x9a)],'description':_0x275dc1[_0x2f40e7(0x81)],'risk':_0x275dc1[_0x2f40e7(0xab)],'target':toPublicServiceTreeTarget(_0x275dc1[_0x2f40e7(0xbd)]),'flags':_0x275dc1[_0x2f40e7(0xa2)][_0x2f40e7(0x90)](_0x1883ea=>({'name':_0x1883ea[_0x2f40e7(0x9e)],'cliName':_0x1883ea[_0x2f40e7(0xa4)],'type':_0x1883ea[_0x2f40e7(0xa3)],'required':_0x1883ea[_0x2f40e7(0x94)]===!![]}))}))};}function a41_0x5942(){const _0x5980a9=['version','description','Service\x20manifest\x20validation\x20passed.','source','errors','imported','334275eiVOSQ','import','manifests','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','Local\x20service\x20not\x20found:\x20','length','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','\x20service\x20','Updated','393057aFLmyZ','map','detail','warnings','normalizedManifest','required','validate','registryPath','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Exported\x20service\x20','commands','cliPath','1018356ExniLV','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','1250kGFcxo','name','updated','7992zIMNOZ','entries','flags','type','cliName','Imported\x20','report','manifest','str','read','kind','risk','11564920dmpUXE','service','filePath','418086TheesL','serviceCount','serviceCode','Imported','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','write','remove','WRITE','622418YTKpGw','replaced','hash','\x20service(s).','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','importedAt','target','lower\x20kebab-case\x20service\x20code','string','file','entry'];a41_0x5942=function(){return _0x5980a9;};return a41_0x5942();}function summarizeLoadedManifest(_0x4785fe){const _0x136012=a41_0x707eb7;return{'service':_0x4785fe['normalizedManifest']?.[_0x136012(0xad)],'version':_0x4785fe[_0x136012(0x93)]?.[_0x136012(0x80)],'commandCount':_0x4785fe[_0x136012(0x93)]?.[_0x136012(0x99)][_0x136012(0x8b)]??0x0,'commands':_0x4785fe['normalizedManifest']?.['commands'][_0x136012(0x90)](_0x3f1234=>({'path':_0x3f1234[_0x136012(0x9a)],'risk':_0x3f1234[_0x136012(0xab)],'target':toPublicServiceTreeTarget(_0x3f1234[_0x136012(0xbd)])}))??[],'registryIndex':_0x4785fe['registryIndex'],'registryServiceCode':_0x4785fe['registryServiceCode'],'errors':_0x4785fe['report']['errors'],'warnings':_0x4785fe[_0x136012(0xa6)][_0x136012(0x92)]};}export const serviceDefinitions=[{'service':a41_0x707eb7(0xad),'command':a41_0x707eb7(0x95),'description':a41_0x707eb7(0xbb),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x1dee36){const _0x2a908c=a41_0x707eb7,_0x5cd20f=loadServiceManifestFromFile(_0x1dee36[_0x2a908c(0xa8)](_0x2a908c(0x7e)));if(!_0x5cd20f[_0x2a908c(0xa6)]['ok'])return{'ok':![],'data':{'file':_0x5cd20f[_0x2a908c(0xae)],'hash':_0x5cd20f[_0x2a908c(0xb9)],'kind':_0x5cd20f[_0x2a908c(0xaa)],'serviceCount':_0x5cd20f['manifests'][_0x2a908c(0x8b)],'services':_0x5cd20f[_0x2a908c(0x88)]['map'](summarizeLoadedManifest),'errors':_0x5cd20f[_0x2a908c(0xa6)][_0x2a908c(0x84)],'warnings':_0x5cd20f[_0x2a908c(0xa6)][_0x2a908c(0x92)]},'message':formatValidationFailure(_0x5cd20f[_0x2a908c(0xa6)])};if(_0x5cd20f[_0x2a908c(0xaa)]==='registry'||_0x5cd20f[_0x2a908c(0x88)][_0x2a908c(0x8b)]!==0x1)return{'ok':!![],'data':{'file':_0x5cd20f[_0x2a908c(0xae)],'hash':_0x5cd20f['hash'],'kind':_0x5cd20f[_0x2a908c(0xaa)],'serviceCount':_0x5cd20f['manifests']['length'],'commandCount':_0x5cd20f['manifests']['reduce']((_0x481791,_0x45bc95)=>_0x481791+(_0x45bc95[_0x2a908c(0x93)]?.['commands']['length']??0x0),0x0),'services':_0x5cd20f[_0x2a908c(0x88)]['map'](summarizeLoadedManifest),'warnings':_0x5cd20f[_0x2a908c(0xa6)][_0x2a908c(0x92)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x5cd20f[_0x2a908c(0xae)],'hash':_0x5cd20f['hash'],'kind':_0x5cd20f['kind'],'service':_0x5cd20f[_0x2a908c(0x93)]?.[_0x2a908c(0xad)],'version':_0x5cd20f[_0x2a908c(0x93)]?.[_0x2a908c(0x80)],'commandCount':_0x5cd20f[_0x2a908c(0x93)]?.[_0x2a908c(0x99)]['length']??0x0,'commands':_0x5cd20f['normalizedManifest']?.[_0x2a908c(0x99)]['map'](_0x1b99c3=>({'path':_0x1b99c3[_0x2a908c(0x9a)],'risk':_0x1b99c3[_0x2a908c(0xab)],'target':toPublicServiceTreeTarget(_0x1b99c3[_0x2a908c(0xbd)])})),'warnings':_0x5cd20f['report']['warnings']},'message':_0x2a908c(0x82)};}},{'service':a41_0x707eb7(0xad),'command':a41_0x707eb7(0x87),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a41_0x707eb7(0xb4),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5979df){const _0x309684=a41_0x707eb7,_0x1f6482=loadServiceManifestFromFile(_0x5979df[_0x309684(0xa8)]('file'));return{'method':_0x309684(0xb6),'url':getServiceRegistryPath(),'body':{'file':_0x1f6482['filePath'],'hash':_0x1f6482[_0x309684(0xb9)],'kind':_0x1f6482[_0x309684(0xaa)],'ok':_0x1f6482[_0x309684(0xa6)]['ok'],'service':_0x1f6482[_0x309684(0x93)]?.[_0x309684(0xad)],'version':_0x1f6482['normalizedManifest']?.[_0x309684(0x80)],'serviceCount':_0x1f6482[_0x309684(0x88)][_0x309684(0x8b)],'services':_0x1f6482['manifests'][_0x309684(0x90)](_0xa4d013=>({'service':_0xa4d013[_0x309684(0x93)]?.[_0x309684(0xad)],'version':_0xa4d013[_0x309684(0x93)]?.[_0x309684(0x80)],'commandCount':_0xa4d013['normalizedManifest']?.[_0x309684(0x99)][_0x309684(0x8b)]??0x0,'errors':_0xa4d013[_0x309684(0xa6)][_0x309684(0x84)]})),'errors':_0x1f6482[_0x309684(0xa6)][_0x309684(0x84)],'commandCount':_0x1f6482[_0x309684(0x93)]?.['commands'][_0x309684(0x8b)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x22c1d7){const _0x4eeb11=a41_0x707eb7,_0x19d4dd=importServiceManifest(_0x22c1d7[_0x4eeb11(0xa8)](_0x4eeb11(0x7e)));if(_0x19d4dd[_0x4eeb11(0xa1)][_0x4eeb11(0x8b)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x19d4dd[_0x4eeb11(0x96)],'imported':_0x19d4dd['imported'],'updated':_0x19d4dd[_0x4eeb11(0x9f)],'serviceCount':_0x19d4dd['serviceCount'],'services':_0x19d4dd[_0x4eeb11(0xa1)][_0x4eeb11(0x90)](summarizeService)},'message':_0x4eeb11(0xa5)+_0x19d4dd[_0x4eeb11(0x85)]+'\x20service(s),\x20updated\x20'+_0x19d4dd[_0x4eeb11(0x9f)]+_0x4eeb11(0xba)};return{'ok':!![],'data':{'registryPath':_0x19d4dd[_0x4eeb11(0x96)],'replaced':_0x19d4dd[_0x4eeb11(0xb8)],'imported':_0x19d4dd[_0x4eeb11(0x85)],'updated':_0x19d4dd[_0x4eeb11(0x9f)],'serviceCount':_0x19d4dd[_0x4eeb11(0xb0)],'service':summarizeService(_0x19d4dd[_0x4eeb11(0x7f)])},'message':(_0x19d4dd[_0x4eeb11(0xb8)]?_0x4eeb11(0x8e):_0x4eeb11(0xb2))+_0x4eeb11(0x8d)+_0x19d4dd[_0x4eeb11(0x7f)][_0x4eeb11(0xb1)]+'.'};}},{'service':a41_0x707eb7(0xad),'command':'export','description':'Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','risk':a41_0x707eb7(0xb4),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x355261){const _0x17cac0=a41_0x707eb7,_0x2c07f6=getLocalServiceEntry(_0x355261['str'](_0x17cac0(0xad)));return{'method':_0x17cac0(0xb6),'url':_0x355261[_0x17cac0(0xa8)]('file'),'body':{'service':_0x355261[_0x17cac0(0xa8)](_0x17cac0(0xad)),'found':Boolean(_0x2c07f6),'version':_0x2c07f6?.[_0x17cac0(0x80)],'source':_0x2c07f6?.[_0x17cac0(0x83)]},'description':_0x17cac0(0x97)};},async 'execute'(_0x553e1){const _0xf98c6=a41_0x707eb7,_0x72b375=exportServiceManifest(_0x553e1[_0xf98c6(0xa8)](_0xf98c6(0xad)),_0x553e1[_0xf98c6(0xa8)](_0xf98c6(0x7e)));return{'ok':!![],'data':{'registryPath':_0x72b375[_0xf98c6(0x96)],'file':_0x72b375['filePath'],'service':summarizeService(_0x72b375[_0xf98c6(0x7f)])},'message':_0xf98c6(0x98)+_0x72b375['entry']['serviceCode']+'.'};}},{'service':a41_0x707eb7(0xad),'command':'list','description':a41_0x707eb7(0x9c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5204f7=a41_0x707eb7,_0x250b8b=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x250b8b['length'],'services':_0x250b8b[_0x5204f7(0x90)](summarizeService)}};}},{'service':a41_0x707eb7(0xad),'command':a41_0x707eb7(0xb5),'description':a41_0x707eb7(0xb3),'risk':a41_0x707eb7(0xb4),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x137d28){const _0x27fd30=a41_0x707eb7,_0x5bf490=getLocalServiceEntry(_0x137d28[_0x27fd30(0xa8)]('service'));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x137d28[_0x27fd30(0xa8)](_0x27fd30(0xad)),'found':Boolean(_0x5bf490),'version':_0x5bf490?.[_0x27fd30(0x80)],'source':_0x5bf490?.[_0x27fd30(0x83)]},'description':_0x27fd30(0x8c)};},async 'execute'(_0x5ac7a9){const _0x106722=a41_0x707eb7,_0x5aec62=removeServiceManifest(_0x5ac7a9['str'](_0x106722(0xad)));return{'ok':!![],'data':{'registryPath':_0x5aec62[_0x106722(0x96)],'serviceCount':_0x5aec62['serviceCount'],'service':summarizeService(_0x5aec62[_0x106722(0x7f)])},'message':'Removed\x20service\x20'+_0x5aec62[_0x106722(0x7f)][_0x106722(0xb1)]+'.'};}},{'service':'service','command':a41_0x707eb7(0x91),'description':a41_0x707eb7(0x89),'risk':a41_0x707eb7(0xa9),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x7ff6e0){const _0x238cc6=a41_0x707eb7,_0x15a92d=getLocalServiceEntry(_0x7ff6e0[_0x238cc6(0xa8)](_0x238cc6(0xad)));if(!_0x15a92d)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x7ff6e0[_0x238cc6(0xa8)](_0x238cc6(0xad))},'message':_0x238cc6(0x8a)+_0x7ff6e0['str'](_0x238cc6(0xad))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x15a92d),'manifest':_0x15a92d[_0x238cc6(0xa7)],'normalizedManifest':toPublicNormalizedServiceTree(_0x15a92d[_0x238cc6(0x93)])}};}}];
@@ -1 +1 @@
1
- const a42_0x384f82=a42_0x5730;function a42_0x3219(){const _0x294d41=['registryIndex','findIndex','find','report','hex','1034034wFfaKr','localeCompare','Service\x20manifest\x20validation\x20failed:\x0a','Service\x20manifest\x20file\x20not\x20found:\x20','service','startsWith','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','sort','splice','ENOENT','services\x20must\x20be\x20an\x20array','warnings','join','path','now','trim','kind','parse','schemaVersion','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','target','registry','serviceCode','homeDir','Local\x20service\x20not\x20found:\x20','service.json','.tmp','utf8','map','push','message','code','source','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','stringify','Invalid\x20service\x20registry\x20JSON:\x20','reduce','object','homeDirName','risk','1154436cZBelA','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','errors','version','5644324DDApHB','validation','].manifest','isArray','normalizedManifest','2960664XGWwth','574056MojQsv','sourceHash','7250526ayMyZz','name','updatedAt','Cannot\x20write\x20service\x20registry:\x20','length','Unsupported\x20service\x20registry\x20schemaVersion:\x20','missing','5098360VkwWsb','empty','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','commandCount','slice','services','manifests','toISOString','6HOhRsZ','invalid','$.services[','manifest'];a42_0x3219=function(){return _0x294d41;};return a42_0x3219();}(function(_0x24ebcd,_0x5ba0ec){const _0x27c00d=a42_0x5730,_0x5162ba=_0x24ebcd();while(!![]){try{const _0x256052=-parseInt(_0x27c00d(0x124))/0x1+-parseInt(_0x27c00d(0xf2))/0x2*(-parseInt(_0x27c00d(0xfb))/0x3)+-parseInt(_0x27c00d(0xe1))/0x4+parseInt(_0x27c00d(0xea))/0x5+-parseInt(_0x27c00d(0xe3))/0x6+parseInt(_0x27c00d(0x128))/0x7+parseInt(_0x27c00d(0xe0))/0x8;if(_0x256052===_0x5ba0ec)break;else _0x5162ba['push'](_0x5162ba['shift']());}catch(_0x2d2d9a){_0x5162ba['push'](_0x5162ba['shift']());}}}(a42_0x3219,0xb0b26));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a42_0x5730(_0x4e3378,_0x2419c3){_0x4e3378=_0x4e3378-0xde;const _0x32192e=a42_0x3219();let _0x57303c=_0x32192e[_0x4e3378];return _0x57303c;}import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a42_0x384f82(0x115);export function getServiceRegistryPath(_0x3be005={}){const _0x3bb2bd=a42_0x384f82;return resolve(_0x3be005[_0x3bb2bd(0x113)]??homedir(),PRODUCT_CONFIG[_0x3bb2bd(0x122)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x394abb={}){const _0x2fe138=a42_0x384f82,_0x5b8a30=getServiceRegistryPath(_0x394abb);if(!existsSync(_0x5b8a30))return emptyServiceRegistry();try{const _0x20f0d7=readFileSync(_0x5b8a30,_0x2fe138(0x117));if(!_0x20f0d7[_0x2fe138(0x10a)]())return emptyServiceRegistry();const _0x5674bf=JSON[_0x2fe138(0x10c)](_0x20f0d7);if(_0x5674bf[_0x2fe138(0x10d)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x2fe138(0x129)](_0x2fe138(0xe8)+String(_0x5674bf[_0x2fe138(0x10d)]),'Remove\x20or\x20migrate\x20'+_0x5b8a30+'.');if(!Array['isArray'](_0x5674bf[_0x2fe138(0xef)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5674bf[_0x2fe138(0xe5)],'services':_0x5674bf['services']};}catch(_0x5c2659){if(_0x5c2659 instanceof Error&&_0x5c2659[_0x2fe138(0xe4)]==='CliError')throw _0x5c2659;throw CliErrors[_0x2fe138(0x129)](_0x2fe138(0x11f)+_0x5b8a30,_0x2fe138(0x10f));}}export function writeServiceRegistry(_0x379c80,_0x335dac={}){const _0x3ec91e=a42_0x384f82,_0x5888c9=getServiceRegistryPath(_0x335dac),_0x3e0d8b=dirname(_0x5888c9);!existsSync(_0x3e0d8b)&&mkdirSync(_0x3e0d8b,{'recursive':!![]});const _0x128f5d=_0x5888c9+_0x3ec91e(0x116);try{writeFileSync(_0x128f5d,JSON['stringify'](_0x379c80,null,0x2)+'\x0a',{'encoding':_0x3ec91e(0x117),'mode':0x180}),renameSync(_0x128f5d,_0x5888c9);}catch(_0x3e2f6d){try{unlinkSync(_0x128f5d);}catch{}if(_0x3e2f6d?.[_0x3ec91e(0x11b)]===_0x3ec91e(0x104))throw CliErrors[_0x3ec91e(0x129)](_0x3ec91e(0xe6)+_0x5888c9);throw _0x3e2f6d;}return _0x5888c9;}export function loadServiceManifestFromFile(_0x1f680b){const _0x10ed29=a42_0x384f82,_0xbcae79=resolve(_0x1f680b);if(!existsSync(_0xbcae79))throw CliErrors[_0x10ed29(0x129)](_0x10ed29(0xfe)+_0x1f680b);let _0x272b67;const _0x34dcb4=readFileSync(_0xbcae79,_0x10ed29(0x117));try{_0x272b67=JSON['parse'](_0x34dcb4);}catch{throw CliErrors[_0x10ed29(0x129)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x1f680b,_0x10ed29(0x101));}const _0x553115=sha256(_0x34dcb4),_0xc0f860=extractLoadedServiceManifests(_0x272b67,_0x553115),_0x5ac039=aggregateValidationReports(_0xc0f860),_0x55b60d=_0xc0f860[0x0];return{'filePath':_0xbcae79,'hash':_0x553115,'kind':isServiceRegistryLike(_0x272b67)?_0x10ed29(0x111):_0x10ed29(0xf5),'manifest':_0x55b60d?.[_0x10ed29(0xf5)]??_0x272b67,'report':_0x5ac039,'normalizedManifest':_0xc0f860[_0x10ed29(0xe7)]===0x1?_0x55b60d?.['normalizedManifest']:undefined,'manifests':_0xc0f860};}export function importServiceManifest(_0x8545a2,_0x4646b8={}){const _0x5d25d0=a42_0x384f82,_0x1a2379=loadServiceManifestFromFile(_0x8545a2);if(!_0x1a2379[_0x5d25d0(0xf9)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x1a2379[_0x5d25d0(0xf9)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x1a2379[_0x5d25d0(0xf0)]['length']===0x0)throw CliErrors['validation'](_0x5d25d0(0xec),_0x5d25d0(0x10e));const _0x57947a=readServiceRegistry(_0x4646b8),_0x5f35ce=(_0x4646b8['now']??(()=>new Date()))()['toISOString'](),_0x1f25e1=[];let _0xed4311=0x0,_0x574db6=0x0;for(const _0x58977e of _0x1a2379['manifests']){if(!_0x58977e[_0x5d25d0(0xdf)])continue;const _0xf21f6a=_0x58977e[_0x5d25d0(0xdf)][_0x5d25d0(0xff)][_0x5d25d0(0x11b)],_0x3e12b7={'serviceCode':_0xf21f6a,'version':_0x58977e[_0x5d25d0(0xdf)][_0x5d25d0(0x127)],'importedAt':_0x5f35ce,'source':{'type':'file','path':_0x1a2379['filePath'],'hash':_0x58977e[_0x5d25d0(0xe2)]},'manifest':_0x58977e['manifest'],'normalizedManifest':_0x58977e['normalizedManifest']},_0x19afbe=_0x57947a['services'][_0x5d25d0(0xf7)](_0x136313=>_0x136313[_0x5d25d0(0x112)]===_0xf21f6a);_0x19afbe>=0x0?(_0x57947a[_0x5d25d0(0xef)][_0x19afbe]=_0x3e12b7,_0x574db6++):(_0x57947a['services'][_0x5d25d0(0x119)](_0x3e12b7),_0xed4311++),_0x1f25e1['push'](_0x3e12b7);}_0x57947a['services'][_0x5d25d0(0x102)]((_0x372689,_0x18c015)=>_0x372689[_0x5d25d0(0x112)][_0x5d25d0(0xfc)](_0x18c015[_0x5d25d0(0x112)])),_0x57947a[_0x5d25d0(0xe5)]=_0x5f35ce;const _0x1a0b2a=writeServiceRegistry(_0x57947a,_0x4646b8);return{'registryPath':_0x1a0b2a,'entry':_0x1f25e1[0x0],'replaced':_0x1f25e1[_0x5d25d0(0xe7)]===0x1?_0x574db6===0x1:_0x574db6>0x0,'entries':_0x1f25e1,'imported':_0xed4311,'updated':_0x574db6,'serviceCount':_0x57947a[_0x5d25d0(0xef)]['length']};}export function exportServiceManifest(_0x363a36,_0xbcecc5,_0x5998ed={}){const _0x2b1920=a42_0x384f82,_0x4a1e16=getServiceRegistryPath(_0x5998ed),_0x47264a=getLocalServiceEntry(_0x363a36,_0x5998ed);if(!_0x47264a)throw CliErrors['validation'](_0x2b1920(0x114)+_0x363a36,_0x2b1920(0x11d));const _0x8c9189=resolve(_0xbcecc5),_0x9ece98=dirname(_0x8c9189);return!existsSync(_0x9ece98)&&mkdirSync(_0x9ece98,{'recursive':!![]}),writeFileSync(_0x8c9189,JSON[_0x2b1920(0x11e)](_0x47264a[_0x2b1920(0xf5)],null,0x2)+'\x0a',{'encoding':_0x2b1920(0x117),'mode':0x180}),{'registryPath':_0x4a1e16,'filePath':_0x8c9189,'entry':_0x47264a};}export function removeServiceManifest(_0x5d6257,_0x27e842={}){const _0x1c20fb=a42_0x384f82,_0x4eadf3=readServiceRegistry(_0x27e842),_0x3ef444=_0x5d6257[_0x1c20fb(0x10a)](),_0x8f9ba5=_0x4eadf3['services'][_0x1c20fb(0xf7)](_0x54405f=>_0x54405f['serviceCode']===_0x3ef444);if(_0x8f9ba5<0x0)throw CliErrors[_0x1c20fb(0x129)](_0x1c20fb(0x114)+_0x3ef444,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x1efc01]=_0x4eadf3[_0x1c20fb(0xef)][_0x1c20fb(0x103)](_0x8f9ba5,0x1),_0x284847=(_0x27e842[_0x1c20fb(0x109)]??(()=>new Date()))()[_0x1c20fb(0xf1)]();_0x4eadf3['updatedAt']=_0x284847;const _0x45c3ed=writeServiceRegistry(_0x4eadf3,_0x27e842);return{'registryPath':_0x45c3ed,'entry':_0x1efc01,'serviceCount':_0x4eadf3[_0x1c20fb(0xef)][_0x1c20fb(0xe7)]};}export function listLocalServices(_0x51a1e9={}){const _0x55dd9d=a42_0x384f82;return readServiceRegistry(_0x51a1e9)[_0x55dd9d(0xef)];}export function getLocalServiceEntry(_0x334bbc,_0x2345f9={}){const _0x25ed89=a42_0x384f82;return readServiceRegistry(_0x2345f9)['services'][_0x25ed89(0xf8)](_0x1aec6f=>_0x1aec6f[_0x25ed89(0x112)]===_0x334bbc['trim']());}export function listLocalServiceTrees(_0x1c254c={}){const _0x32e6af=a42_0x384f82;return readServiceRegistry(_0x1c254c)[_0x32e6af(0xef)][_0x32e6af(0x118)](_0x3cad0c=>_0x3cad0c[_0x32e6af(0xdf)]);}export function inspectServiceRegistry(_0x18eeb8={}){const _0x29ad4d=a42_0x384f82,_0x24d604=getServiceRegistryPath(_0x18eeb8);if(!existsSync(_0x24d604))return emptyServiceRegistryInspection(_0x24d604,_0x29ad4d(0xe9),![]);try{const _0x3bdda4=readFileSync(_0x24d604,_0x29ad4d(0x117));if(!_0x3bdda4[_0x29ad4d(0x10a)]())return emptyServiceRegistryInspection(_0x24d604,_0x29ad4d(0xeb),!![]);const _0x5414c4=JSON[_0x29ad4d(0x10c)](_0x3bdda4);if(_0x5414c4[_0x29ad4d(0x10d)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x24d604,_0x29ad4d(0xf3),!![]),'schemaVersion':_0x5414c4[_0x29ad4d(0x10d)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x5414c4['schemaVersion'])};if(!Array['isArray'](_0x5414c4[_0x29ad4d(0xef)]))return{...emptyServiceRegistryInspection(_0x24d604,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5414c4['updatedAt'],'message':_0x29ad4d(0x105)};const _0x2ec93a=_0x5414c4[_0x29ad4d(0xef)][_0x29ad4d(0x118)](summarizeLocalServiceEntry);return{'registryPath':_0x24d604,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5414c4[_0x29ad4d(0xe5)],'serviceCount':_0x2ec93a[_0x29ad4d(0xe7)],'commandCount':_0x2ec93a[_0x29ad4d(0x120)]((_0x585f81,_0x39c1bf)=>_0x585f81+_0x39c1bf[_0x29ad4d(0xed)],0x0),'services':_0x2ec93a};}catch(_0x32c30d){return{...emptyServiceRegistryInspection(_0x24d604,_0x29ad4d(0xf3),!![]),'message':_0x32c30d instanceof Error?_0x32c30d['message']:String(_0x32c30d)};}}export function formatValidationFailure(_0x2d5059){const _0x62429d=a42_0x384f82,_0xbeaf4e=_0x2d5059[_0x62429d(0x126)][_0x62429d(0x118)](_0x5cc6bf=>_0x5cc6bf[_0x62429d(0x108)]+':\x20'+_0x5cc6bf[_0x62429d(0x11a)]);return _0x62429d(0xfd)+_0xbeaf4e[_0x62429d(0x107)]('\x0a');}function extractLoadedServiceManifests(_0x8e756e,_0x533c4f){const _0x242fed=a42_0x384f82;if(!isServiceRegistryLike(_0x8e756e)){const _0x380bec=_0x8e756e,{manifest:_0x41a3a9,errors:_0x1f222b}=adaptServiceTreeManifestForLegacyFramework(_0x380bec),_0x270240=validateServiceTreeManifest(_0x41a3a9),_0x28a676=mergeValidationErrors(_0x270240,_0x1f222b);return[{'manifest':_0x380bec,'report':_0x28a676,'normalizedManifest':_0x28a676['ok']?normalizeServiceTreeManifest(_0x41a3a9):undefined,'sourceHash':_0x533c4f}];}return _0x8e756e[_0x242fed(0xef)]['map']((_0x31cadc,_0x335394)=>{const _0x4c861a=_0x242fed,_0xf78771=isObjectRecord(_0x31cadc)?_0x31cadc[_0x4c861a(0xf5)]:undefined,{manifest:_0x140054,errors:_0x1021a0}=adaptServiceTreeManifestForLegacyFramework(_0xf78771),_0x4c4629=validateServiceTreeManifest(_0x140054),_0x54693a=mergeValidationErrors(_0x4c4629,_0x1021a0),_0x7703f4=isObjectRecord(_0x31cadc)&&typeof _0x31cadc[_0x4c861a(0x112)]==='string'?_0x31cadc[_0x4c861a(0x112)]:undefined;return{'manifest':_0xf78771,'report':_0x54693a,'normalizedManifest':_0x54693a['ok']?normalizeServiceTreeManifest(_0x140054):undefined,'sourceHash':sha256(JSON['stringify'](_0xf78771,null,0x2)+'\x0a'),'registryIndex':_0x335394,'registryServiceCode':_0x7703f4};});}function mergeValidationErrors(_0x2abd55,_0x317bf6){const _0x1eb46a=a42_0x384f82,_0x176437=_0x2abd55[_0x1eb46a(0x126)][_0x1eb46a(0x118)](_0x508e3f=>_0x508e3f[_0x1eb46a(0x11a)]===_0x1eb46a(0x125)?{..._0x508e3f,'message':'bff\x20target\x20requires\x20functionName.'}:_0x508e3f),_0x551e6b=[..._0x317bf6,..._0x176437];return{'ok':_0x551e6b[_0x1eb46a(0xe7)]===0x0,'errors':_0x551e6b,'warnings':_0x2abd55[_0x1eb46a(0x106)]};}function aggregateValidationReports(_0x2728b1){const _0x1782b5=a42_0x384f82,_0x50b1bd=_0x2728b1['flatMap'](_0x1e7a3d=>_0x1e7a3d[_0x1782b5(0xf6)]===undefined?_0x1e7a3d['report']['errors']:_0x1e7a3d[_0x1782b5(0xf9)][_0x1782b5(0x126)]['map'](_0x30ca9a=>({..._0x30ca9a,'path':prefixRegistryIssuePath(_0x1e7a3d[_0x1782b5(0xf6)],_0x30ca9a[_0x1782b5(0x108)])}))),_0x5a5688=_0x2728b1['flatMap'](_0x591c10=>_0x591c10[_0x1782b5(0xf6)]===undefined?_0x591c10[_0x1782b5(0xf9)][_0x1782b5(0x106)]:_0x591c10[_0x1782b5(0xf9)][_0x1782b5(0x106)]['map'](_0x40f181=>({..._0x40f181,'path':prefixRegistryIssuePath(_0x591c10['registryIndex'],_0x40f181['path'])})));return{'ok':_0x50b1bd[_0x1782b5(0xe7)]===0x0,'errors':_0x50b1bd,'warnings':_0x5a5688};}function prefixRegistryIssuePath(_0x2d480e,_0x222a77){const _0x1ecaf7=a42_0x384f82;if(_0x222a77==='$')return _0x1ecaf7(0xf4)+_0x2d480e+'].manifest';if(_0x222a77[_0x1ecaf7(0x100)]('$.'))return _0x1ecaf7(0xf4)+_0x2d480e+_0x1ecaf7(0x12a)+_0x222a77[_0x1ecaf7(0xee)](0x1);if(_0x222a77[_0x1ecaf7(0x100)]('$['))return'$.services['+_0x2d480e+_0x1ecaf7(0x12a)+_0x222a77[_0x1ecaf7(0xee)](0x1);return _0x1ecaf7(0xf4)+_0x2d480e+'].manifest.'+_0x222a77;}function isServiceRegistryLike(_0x6eaf1){const _0x6f21e6=a42_0x384f82;return isObjectRecord(_0x6eaf1)&&_0x6eaf1[_0x6f21e6(0x10d)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x6f21e6(0xde)](_0x6eaf1['services']);}function isObjectRecord(_0x4027a2){const _0x18bec2=a42_0x384f82;return Boolean(_0x4027a2)&&typeof _0x4027a2===_0x18bec2(0x121)&&!Array['isArray'](_0x4027a2);}function emptyServiceRegistryInspection(_0x59cb46,_0x32bd72,_0x2d42c0){return{'registryPath':_0x59cb46,'exists':_0x2d42c0,'status':_0x32bd72,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x4bf3e2){const _0x5dfa96=a42_0x384f82,_0x2ddd29=_0x4bf3e2[_0x5dfa96(0xdf)],_0x3ff893=_0x2ddd29['commands'][_0x5dfa96(0x118)](_0x4a103c=>({'path':_0x4a103c['cliPath'],'description':_0x4a103c['description'],'risk':_0x4a103c[_0x5dfa96(0x123)],'targetKind':_0x4a103c[_0x5dfa96(0x110)][_0x5dfa96(0x10b)],'targetCommand':_0x4a103c[_0x5dfa96(0x110)]['command']}));return{'serviceCode':_0x4bf3e2[_0x5dfa96(0x112)],'name':_0x2ddd29['service'][_0x5dfa96(0xe4)],'description':_0x2ddd29[_0x5dfa96(0xff)]['description'],'version':_0x4bf3e2['version'],'importedAt':_0x4bf3e2['importedAt'],'source':_0x4bf3e2[_0x5dfa96(0x11c)],'commandCount':_0x3ff893[_0x5dfa96(0xe7)],'commands':_0x3ff893};}function sha256(_0x3a52d9){const _0x3a6d80=a42_0x384f82;return createHash('sha256')['update'](_0x3a52d9)['digest'](_0x3a6d80(0xfa));}
1
+ const a42_0x106f25=a42_0x1754;(function(_0x55d242,_0x258875){const _0x4360f1=a42_0x1754,_0x82eea=_0x55d242();while(!![]){try{const _0x138b20=parseInt(_0x4360f1(0x110))/0x1*(-parseInt(_0x4360f1(0x137))/0x2)+parseInt(_0x4360f1(0x12c))/0x3+parseInt(_0x4360f1(0xf3))/0x4*(-parseInt(_0x4360f1(0x10e))/0x5)+-parseInt(_0x4360f1(0x121))/0x6+-parseInt(_0x4360f1(0xf2))/0x7*(-parseInt(_0x4360f1(0x11c))/0x8)+-parseInt(_0x4360f1(0x12d))/0x9+parseInt(_0x4360f1(0xfb))/0xa;if(_0x138b20===_0x258875)break;else _0x82eea['push'](_0x82eea['shift']());}catch(_0x5a0e80){_0x82eea['push'](_0x82eea['shift']());}}}(a42_0x3579,0x8a8f0));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a42_0x106f25(0xfa);export function getServiceRegistryPath(_0x4acaf0={}){const _0x144cea=a42_0x106f25;return resolve(_0x4acaf0[_0x144cea(0x139)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x121a26={}){const _0xcacc72=a42_0x106f25,_0x2fa0b4=getServiceRegistryPath(_0x121a26);if(!existsSync(_0x2fa0b4))return emptyServiceRegistry();try{const _0x38a2c2=readFileSync(_0x2fa0b4,_0xcacc72(0x109));if(!_0x38a2c2[_0xcacc72(0xfd)]())return emptyServiceRegistry();const _0x1860e4=JSON[_0xcacc72(0xf8)](_0x38a2c2);if(_0x1860e4[_0xcacc72(0x113)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0xcacc72(0x116)](_0xcacc72(0xf4)+String(_0x1860e4[_0xcacc72(0x113)]),_0xcacc72(0xe8)+_0x2fa0b4+'.');if(!Array['isArray'](_0x1860e4[_0xcacc72(0x12b)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1860e4[_0xcacc72(0x13a)],'services':_0x1860e4[_0xcacc72(0x12b)]};}catch(_0x575c20){if(_0x575c20 instanceof Error&&_0x575c20[_0xcacc72(0x11b)]===_0xcacc72(0xf7))throw _0x575c20;throw CliErrors['validation']('Invalid\x20service\x20registry\x20JSON:\x20'+_0x2fa0b4,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x97fd9,_0x37f105={}){const _0x2b327a=a42_0x106f25,_0x4655aa=getServiceRegistryPath(_0x37f105),_0x3b8c0e=dirname(_0x4655aa);!existsSync(_0x3b8c0e)&&mkdirSync(_0x3b8c0e,{'recursive':!![]});const _0x12316c=_0x4655aa+'.tmp';try{writeFileSync(_0x12316c,JSON[_0x2b327a(0x124)](_0x97fd9,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x12316c,_0x4655aa);}catch(_0x427ca5){try{unlinkSync(_0x12316c);}catch{}if(_0x427ca5?.[_0x2b327a(0xef)]===_0x2b327a(0xe5))throw CliErrors['validation'](_0x2b327a(0xe9)+_0x4655aa);throw _0x427ca5;}return _0x4655aa;}export function loadServiceManifestFromFile(_0x5516c8){const _0x52211a=a42_0x106f25,_0x17f18f=resolve(_0x5516c8);if(!existsSync(_0x17f18f))throw CliErrors[_0x52211a(0x116)](_0x52211a(0xf0)+_0x5516c8);let _0x3081dc;const _0x1e5bfa=readFileSync(_0x17f18f,'utf8');try{_0x3081dc=JSON[_0x52211a(0xf8)](_0x1e5bfa);}catch{throw CliErrors['validation'](_0x52211a(0xe6)+_0x5516c8,_0x52211a(0x117));}const _0x48b287=sha256(_0x1e5bfa),_0xeeaf40=extractLoadedServiceManifests(_0x3081dc,_0x48b287),_0x21be3a=aggregateValidationReports(_0xeeaf40),_0x2fddf9=_0xeeaf40[0x0];return{'filePath':_0x17f18f,'hash':_0x48b287,'kind':isServiceRegistryLike(_0x3081dc)?_0x52211a(0x134):_0x52211a(0x127),'manifest':_0x2fddf9?.['manifest']??_0x3081dc,'report':_0x21be3a,'normalizedManifest':_0xeeaf40['length']===0x1?_0x2fddf9?.[_0x52211a(0xe4)]:undefined,'manifests':_0xeeaf40};}export function importServiceManifest(_0x2cd1c7,_0x5d755a={}){const _0x1aaec1=a42_0x106f25,_0x148f3c=loadServiceManifestFromFile(_0x2cd1c7);if(!_0x148f3c['report']['ok'])throw CliErrors[_0x1aaec1(0x116)](formatValidationFailure(_0x148f3c[_0x1aaec1(0xeb)]),_0x1aaec1(0xea));if(_0x148f3c[_0x1aaec1(0x138)]['length']===0x0)throw CliErrors['validation'](_0x1aaec1(0xf5),_0x1aaec1(0x106));const _0x55ca97=readServiceRegistry(_0x5d755a),_0x1b7270=(_0x5d755a[_0x1aaec1(0x118)]??(()=>new Date()))()[_0x1aaec1(0x130)](),_0x4f91a6=[];let _0x4b68d9=0x0,_0x4e6a3a=0x0;for(const _0x4009a0 of _0x148f3c['manifests']){if(!_0x4009a0[_0x1aaec1(0xe4)])continue;const _0x3ebbfb=_0x4009a0[_0x1aaec1(0xe4)][_0x1aaec1(0x10c)][_0x1aaec1(0xef)],_0x1bf8df={'serviceCode':_0x3ebbfb,'version':_0x4009a0['normalizedManifest'][_0x1aaec1(0x11a)],'importedAt':_0x1b7270,'source':{'type':_0x1aaec1(0x105),'path':_0x148f3c[_0x1aaec1(0x10a)],'hash':_0x4009a0[_0x1aaec1(0x123)]},'manifest':_0x4009a0[_0x1aaec1(0x127)],'normalizedManifest':_0x4009a0[_0x1aaec1(0xe4)]},_0x4b4ae8=_0x55ca97['services'][_0x1aaec1(0xf9)](_0x288f64=>_0x288f64[_0x1aaec1(0x12e)]===_0x3ebbfb);_0x4b4ae8>=0x0?(_0x55ca97[_0x1aaec1(0x12b)][_0x4b4ae8]=_0x1bf8df,_0x4e6a3a++):(_0x55ca97['services'][_0x1aaec1(0x104)](_0x1bf8df),_0x4b68d9++),_0x4f91a6['push'](_0x1bf8df);}_0x55ca97[_0x1aaec1(0x12b)][_0x1aaec1(0xff)]((_0x2a9596,_0x2b1788)=>_0x2a9596['serviceCode'][_0x1aaec1(0x128)](_0x2b1788[_0x1aaec1(0x12e)])),_0x55ca97[_0x1aaec1(0x13a)]=_0x1b7270;const _0x3271c4=writeServiceRegistry(_0x55ca97,_0x5d755a);return{'registryPath':_0x3271c4,'entry':_0x4f91a6[0x0],'replaced':_0x4f91a6['length']===0x1?_0x4e6a3a===0x1:_0x4e6a3a>0x0,'entries':_0x4f91a6,'imported':_0x4b68d9,'updated':_0x4e6a3a,'serviceCount':_0x55ca97['services']['length']};}export function exportServiceManifest(_0x2d2df7,_0x10918c,_0x572518={}){const _0x4f71b5=a42_0x106f25,_0x53b0d5=getServiceRegistryPath(_0x572518),_0x3fcaa8=getLocalServiceEntry(_0x2d2df7,_0x572518);if(!_0x3fcaa8)throw CliErrors[_0x4f71b5(0x116)](_0x4f71b5(0x129)+_0x2d2df7,_0x4f71b5(0x125));const _0x245295=resolve(_0x10918c),_0xedaf9d=dirname(_0x245295);return!existsSync(_0xedaf9d)&&mkdirSync(_0xedaf9d,{'recursive':!![]}),writeFileSync(_0x245295,JSON['stringify'](_0x3fcaa8[_0x4f71b5(0x127)],null,0x2)+'\x0a',{'encoding':_0x4f71b5(0x109),'mode':0x180}),{'registryPath':_0x53b0d5,'filePath':_0x245295,'entry':_0x3fcaa8};}export function removeServiceManifest(_0x290202,_0x40d48a={}){const _0x3825db=a42_0x106f25,_0x2cd08f=readServiceRegistry(_0x40d48a),_0x46843c=_0x290202['trim'](),_0x2ae439=_0x2cd08f['services'][_0x3825db(0xf9)](_0x174203=>_0x174203[_0x3825db(0x12e)]===_0x46843c);if(_0x2ae439<0x0)throw CliErrors['validation'](_0x3825db(0x129)+_0x46843c,_0x3825db(0x125));const [_0xd5cc24]=_0x2cd08f['services'][_0x3825db(0x132)](_0x2ae439,0x1),_0x4e879e=(_0x40d48a[_0x3825db(0x118)]??(()=>new Date()))()['toISOString']();_0x2cd08f[_0x3825db(0x13a)]=_0x4e879e;const _0x335cf=writeServiceRegistry(_0x2cd08f,_0x40d48a);return{'registryPath':_0x335cf,'entry':_0xd5cc24,'serviceCount':_0x2cd08f[_0x3825db(0x12b)]['length']};}export function listLocalServices(_0x56d703={}){const _0x5255c1=a42_0x106f25;return readServiceRegistry(_0x56d703)[_0x5255c1(0x12b)];}export function getLocalServiceEntry(_0x27dc3b,_0x50961a={}){const _0x46b159=a42_0x106f25;return readServiceRegistry(_0x50961a)[_0x46b159(0x12b)][_0x46b159(0xe2)](_0x5f41ba=>_0x5f41ba['serviceCode']===_0x27dc3b[_0x46b159(0xfd)]());}export function listLocalServiceTrees(_0x5c458c={}){const _0x3d97ba=a42_0x106f25;return readServiceRegistry(_0x5c458c)[_0x3d97ba(0x12b)]['map'](_0x225488=>_0x225488[_0x3d97ba(0xe4)]);}export function inspectServiceRegistry(_0x4c9c5e={}){const _0x10b5fd=a42_0x106f25,_0x1f4ee4=getServiceRegistryPath(_0x4c9c5e);if(!existsSync(_0x1f4ee4))return emptyServiceRegistryInspection(_0x1f4ee4,_0x10b5fd(0x108),![]);try{const _0x389266=readFileSync(_0x1f4ee4,_0x10b5fd(0x109));if(!_0x389266[_0x10b5fd(0xfd)]())return emptyServiceRegistryInspection(_0x1f4ee4,_0x10b5fd(0xfe),!![]);const _0x15394e=JSON[_0x10b5fd(0xf8)](_0x389266);if(_0x15394e[_0x10b5fd(0x113)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x1f4ee4,_0x10b5fd(0x10b),!![]),'schemaVersion':_0x15394e[_0x10b5fd(0x113)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x15394e[_0x10b5fd(0x113)])};if(!Array[_0x10b5fd(0xfc)](_0x15394e['services']))return{...emptyServiceRegistryInspection(_0x1f4ee4,_0x10b5fd(0x10b),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x15394e[_0x10b5fd(0x13a)],'message':'services\x20must\x20be\x20an\x20array'};const _0x40ef45=_0x15394e['services'][_0x10b5fd(0x101)](summarizeLocalServiceEntry);return{'registryPath':_0x1f4ee4,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x15394e[_0x10b5fd(0x13a)],'serviceCount':_0x40ef45[_0x10b5fd(0x120)],'commandCount':_0x40ef45[_0x10b5fd(0xec)]((_0x100f3e,_0x3dcc0d)=>_0x100f3e+_0x3dcc0d[_0x10b5fd(0x102)],0x0),'services':_0x40ef45};}catch(_0x134932){return{...emptyServiceRegistryInspection(_0x1f4ee4,_0x10b5fd(0x10b),!![]),'message':_0x134932 instanceof Error?_0x134932['message']:String(_0x134932)};}}export function formatValidationFailure(_0x2b23cb){const _0x1c4192=a42_0x106f25,_0x15a245=_0x2b23cb[_0x1c4192(0x100)][_0x1c4192(0x101)](_0x1168db=>_0x1168db['path']+':\x20'+_0x1168db[_0x1c4192(0x112)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x15a245[_0x1c4192(0xf6)]('\x0a');}function extractLoadedServiceManifests(_0xdcb7f4,_0x1c77d3){const _0x2b27d3=a42_0x106f25;if(!isServiceRegistryLike(_0xdcb7f4)){const _0x33a341=_0xdcb7f4,{manifest:_0x4df4b6,errors:_0x370321}=adaptServiceTreeManifestForLegacyFramework(_0x33a341),_0x388f87=validateServiceTreeManifest(_0x4df4b6),_0x4c6799=mergeValidationErrors(_0x388f87,_0x370321);return[{'manifest':_0x33a341,'report':_0x4c6799,'normalizedManifest':_0x4c6799['ok']?normalizeServiceTreeManifest(_0x4df4b6):undefined,'sourceHash':_0x1c77d3}];}return _0xdcb7f4[_0x2b27d3(0x12b)][_0x2b27d3(0x101)]((_0xab7d1e,_0x4eb993)=>{const _0x4d02ac=_0x2b27d3,_0x1946f7=isObjectRecord(_0xab7d1e)?_0xab7d1e['manifest']:undefined,{manifest:_0x3996cf,errors:_0x5cbb9d}=adaptServiceTreeManifestForLegacyFramework(_0x1946f7),_0x4dd713=validateServiceTreeManifest(_0x3996cf),_0xf201d=mergeValidationErrors(_0x4dd713,_0x5cbb9d),_0x415925=isObjectRecord(_0xab7d1e)&&typeof _0xab7d1e[_0x4d02ac(0x12e)]===_0x4d02ac(0x10f)?_0xab7d1e[_0x4d02ac(0x12e)]:undefined;return{'manifest':_0x1946f7,'report':_0xf201d,'normalizedManifest':_0xf201d['ok']?normalizeServiceTreeManifest(_0x3996cf):undefined,'sourceHash':sha256(JSON[_0x4d02ac(0x124)](_0x1946f7,null,0x2)+'\x0a'),'registryIndex':_0x4eb993,'registryServiceCode':_0x415925};});}function a42_0x1754(_0x4ed709,_0x353296){_0x4ed709=_0x4ed709-0xe2;const _0x357935=a42_0x3579();let _0x175483=_0x357935[_0x4ed709];return _0x175483;}function mergeValidationErrors(_0xb3d037,_0x30ffcb){const _0x4d2794=a42_0x106f25,_0x536a88=_0xb3d037['errors'][_0x4d2794(0x101)](_0x256352=>_0x256352[_0x4d2794(0x112)]===_0x4d2794(0xe3)?{..._0x256352,'message':_0x4d2794(0xee)}:_0x256352),_0x2d5cec=[..._0x30ffcb,..._0x536a88];return{'ok':_0x2d5cec[_0x4d2794(0x120)]===0x0,'errors':_0x2d5cec,'warnings':_0xb3d037[_0x4d2794(0x11f)]};}function aggregateValidationReports(_0x3d942f){const _0x148223=a42_0x106f25,_0x80c4b9=_0x3d942f[_0x148223(0x103)](_0x47bd67=>_0x47bd67[_0x148223(0x111)]===undefined?_0x47bd67['report'][_0x148223(0x100)]:_0x47bd67[_0x148223(0xeb)]['errors']['map'](_0x29afdd=>({..._0x29afdd,'path':prefixRegistryIssuePath(_0x47bd67['registryIndex'],_0x29afdd[_0x148223(0x122)])}))),_0x45e6c6=_0x3d942f['flatMap'](_0x2f19a1=>_0x2f19a1['registryIndex']===undefined?_0x2f19a1[_0x148223(0xeb)][_0x148223(0x11f)]:_0x2f19a1[_0x148223(0xeb)][_0x148223(0x11f)][_0x148223(0x101)](_0x48ff34=>({..._0x48ff34,'path':prefixRegistryIssuePath(_0x2f19a1['registryIndex'],_0x48ff34[_0x148223(0x122)])})));return{'ok':_0x80c4b9['length']===0x0,'errors':_0x80c4b9,'warnings':_0x45e6c6};}function prefixRegistryIssuePath(_0x4bcb80,_0x21c572){const _0x53c7d2=a42_0x106f25;if(_0x21c572==='$')return _0x53c7d2(0x131)+_0x4bcb80+_0x53c7d2(0x114);if(_0x21c572['startsWith']('$.'))return _0x53c7d2(0x131)+_0x4bcb80+_0x53c7d2(0x114)+_0x21c572[_0x53c7d2(0xf1)](0x1);if(_0x21c572[_0x53c7d2(0x133)]('$['))return _0x53c7d2(0x131)+_0x4bcb80+_0x53c7d2(0x114)+_0x21c572[_0x53c7d2(0xf1)](0x1);return _0x53c7d2(0x131)+_0x4bcb80+_0x53c7d2(0x10d)+_0x21c572;}function isServiceRegistryLike(_0x405093){const _0x3e7401=a42_0x106f25;return isObjectRecord(_0x405093)&&_0x405093[_0x3e7401(0x113)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x405093[_0x3e7401(0x12b)]);}function isObjectRecord(_0x5a5d1f){const _0x247868=a42_0x106f25;return Boolean(_0x5a5d1f)&&typeof _0x5a5d1f===_0x247868(0x11d)&&!Array[_0x247868(0xfc)](_0x5a5d1f);}function emptyServiceRegistryInspection(_0x5e36d8,_0x2035aa,_0x21a849){return{'registryPath':_0x5e36d8,'exists':_0x21a849,'status':_0x2035aa,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x294a7b){const _0x42c7a0=a42_0x106f25,_0x1dcdd5=_0x294a7b[_0x42c7a0(0xe4)],_0x1373ef=_0x1dcdd5['commands'][_0x42c7a0(0x101)](_0x2db177=>({'path':_0x2db177[_0x42c7a0(0x12f)],'description':_0x2db177[_0x42c7a0(0x135)],'risk':_0x2db177[_0x42c7a0(0x107)],'targetKind':_0x2db177[_0x42c7a0(0x115)][_0x42c7a0(0xed)],'targetCommand':_0x2db177['target'][_0x42c7a0(0x119)]}));return{'serviceCode':_0x294a7b[_0x42c7a0(0x12e)],'name':_0x1dcdd5[_0x42c7a0(0x10c)][_0x42c7a0(0x11b)],'description':_0x1dcdd5[_0x42c7a0(0x10c)][_0x42c7a0(0x135)],'version':_0x294a7b[_0x42c7a0(0x11a)],'importedAt':_0x294a7b[_0x42c7a0(0x11e)],'source':_0x294a7b[_0x42c7a0(0x136)],'commandCount':_0x1373ef[_0x42c7a0(0x120)],'commands':_0x1373ef};}function a42_0x3579(){const _0x3a8bf6=['22996DkvWxh','Unsupported\x20service\x20registry\x20schemaVersion:\x20','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','join','CliError','parse','findIndex','service.json','32514700KZFzqh','isArray','trim','empty','sort','errors','map','commandCount','flatMap','push','file','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','risk','missing','utf8','filePath','invalid','service','].manifest.','905saLPEq','string','1xXdpzG','registryIndex','message','schemaVersion','].manifest','target','validation','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','now','command','version','name','62344ZarQtC','object','importedAt','warnings','length','5237250JTUhmQ','path','sourceHash','stringify','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','sha256','manifest','localeCompare','Local\x20service\x20not\x20found:\x20','update','services','885261FedSli','5726817KjCcaP','serviceCode','cliPath','toISOString','$.services[','splice','startsWith','registry','description','source','1248178VqPGfx','manifests','homeDir','updatedAt','find','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','normalizedManifest','ENOENT','Invalid\x20service\x20manifest\x20JSON:\x20','digest','Remove\x20or\x20migrate\x20','Cannot\x20write\x20service\x20registry:\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','report','reduce','kind','bff\x20target\x20requires\x20functionName.','code','Service\x20manifest\x20file\x20not\x20found:\x20','slice','175IkTYvu'];a42_0x3579=function(){return _0x3a8bf6;};return a42_0x3579();}function sha256(_0x2a0e5d){const _0x4d73ba=a42_0x106f25;return createHash(_0x4d73ba(0x126))[_0x4d73ba(0x12a)](_0x2a0e5d)[_0x4d73ba(0xe7)]('hex');}
@@ -1 +1 @@
1
- function a43_0x4e81(_0xe7899,_0x193e59){_0xe7899=_0xe7899-0x1dd;const _0x3f7f67=a43_0x3f7f();let _0x4e81c0=_0x3f7f67[_0xe7899];return _0x4e81c0;}function a43_0x3f7f(){const _0x14cf37=['str','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','9eRLmKZ','isSymbolicLink','trim','name','737790ECzWpO','skillDir','type','path','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','skillName','62QFGLcq','433OwFwcM','validation','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','996234tHBEDm','rendered','2350624rDJsEg','154278WZPfZi','map','target','WRITE','create','files','isDirectory','1465604auYQIC','bool','20UNUkoX','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','skill','417915AhBjkj','content','Created\x20local\x20Skill\x20draft\x20'];a43_0x3f7f=function(){return _0x14cf37;};return a43_0x3f7f();}const a43_0x25759a=a43_0x4e81;(function(_0x1f01e1,_0x327195){const _0x5bd004=a43_0x4e81,_0x4ec229=_0x1f01e1();while(!![]){try{const _0x271053=-parseInt(_0x5bd004(0x1e5))/0x1*(parseInt(_0x5bd004(0x1e4))/0x2)+parseInt(_0x5bd004(0x1eb))/0x3*(parseInt(_0x5bd004(0x1f4))/0x4)+-parseInt(_0x5bd004(0x1f8))/0x5+-parseInt(_0x5bd004(0x1e8))/0x6+-parseInt(_0x5bd004(0x1f2))/0x7+parseInt(_0x5bd004(0x1ea))/0x8+-parseInt(_0x5bd004(0x1fd))/0x9*(-parseInt(_0x5bd004(0x1de))/0xa);if(_0x271053===_0x327195)break;else _0x4ec229['push'](_0x4ec229['shift']());}catch(_0x41da31){_0x4ec229['push'](_0x4ec229['shift']());}}}(a43_0x3f7f,0x25300));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a43_0x25759a(0x1f7),'command':a43_0x25759a(0x1ef),'description':a43_0x25759a(0x1e7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x222022){const _0x46fe67=a43_0x25759a,_0xfbe216=buildSkillCreatePlan(_0x222022[_0x46fe67(0x1fb)](_0x46fe67(0x1dd)),_0x222022['str'](_0x46fe67(0x1e0)),_0x222022['str'](_0x46fe67(0x1ed)));return{'method':_0x46fe67(0x1ee),'url':_0xfbe216['skillDir'],'body':{'skillName':_0xfbe216[_0x46fe67(0x1e9)][_0x46fe67(0x1e3)],'type':_0xfbe216[_0x46fe67(0x1e9)][_0x46fe67(0x1e0)],'selfContained':!![],'files':_0xfbe216[_0x46fe67(0x1e9)][_0x46fe67(0x1f0)]['map'](_0x476820=>_0x476820[_0x46fe67(0x1e1)])},'description':_0x46fe67(0x1f6)};},async 'execute'(_0x49a8d8){const _0x38f13a=a43_0x25759a,_0x389f6d=buildSkillCreatePlan(_0x49a8d8[_0x38f13a(0x1fb)]('name'),_0x49a8d8[_0x38f13a(0x1fb)](_0x38f13a(0x1e0)),_0x49a8d8[_0x38f13a(0x1fb)](_0x38f13a(0x1ed)));return writeSkillDraft(_0x389f6d,_0x49a8d8[_0x38f13a(0x1f3)]('force')),{'ok':!![],'data':{'skillName':_0x389f6d[_0x38f13a(0x1e9)]['skillName'],'type':_0x389f6d['rendered'][_0x38f13a(0x1e0)],'dir':_0x389f6d[_0x38f13a(0x1df)],'files':_0x389f6d[_0x38f13a(0x1e9)][_0x38f13a(0x1f0)][_0x38f13a(0x1ec)](_0x3a3fa9=>_0x3a3fa9[_0x38f13a(0x1e1)])},'message':_0x38f13a(0x1fa)+_0x389f6d[_0x38f13a(0x1e9)][_0x38f13a(0x1e3)]};}};function buildSkillCreatePlan(_0x4c3eb5,_0x2b6148,_0xc0ffab){const _0x2525ca=a43_0x25759a,_0x1f5500=_0x2b6148[_0x2525ca(0x1ff)](),_0x19cec3=renderSkillTemplate({'skillName':_0x4c3eb5,'type':_0x1f5500});!_0x1f5500&&writeCliSideChannelLine(_0x2525ca(0x1fc));const _0x35076d=resolve(normalizeSkillTarget(_0xc0ffab));return{'rendered':_0x19cec3,'targetRoot':_0x35076d,'skillDir':resolve(_0x35076d,_0x19cec3[_0x2525ca(0x1e3)])};}function normalizeSkillTarget(_0x52f81e){const _0x3d5c1c=a43_0x25759a;return(_0x52f81e||DEFAULT_SKILL_TARGET)[_0x3d5c1c(0x1ff)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x3357f4,_0x2237c4){const _0xcbf378=a43_0x25759a;if(existsSync(_0x3357f4[_0xcbf378(0x1df)])){const _0x51db46=lstatSync(_0x3357f4['skillDir']);if(!_0x51db46[_0xcbf378(0x1f1)]()||_0x51db46[_0xcbf378(0x1fe)]())throw CliErrors[_0xcbf378(0x1e6)](_0xcbf378(0x1e2)+_0x3357f4[_0xcbf378(0x1df)]);if(!_0x2237c4)throw CliErrors[_0xcbf378(0x1e6)]('Skill\x20directory\x20already\x20exists:\x20'+_0x3357f4[_0xcbf378(0x1df)],_0xcbf378(0x1f5));}for(const _0x59fa89 of _0x3357f4[_0xcbf378(0x1e9)][_0xcbf378(0x1f0)]){const _0x1f79be=resolve(_0x3357f4['skillDir'],_0x59fa89[_0xcbf378(0x1e1)]),_0x566bf1=dirname(_0x1f79be);mkdirSync(_0x566bf1,{'recursive':!![]});if(existsSync(_0x1f79be)&&lstatSync(_0x1f79be)['isSymbolicLink']())throw CliErrors[_0xcbf378(0x1e6)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x1f79be);writeFileSync(_0x1f79be,_0x59fa89[_0xcbf378(0x1f9)],'utf8');}}
1
+ const a43_0x12cd05=a43_0x1403;(function(_0xb3c068,_0x3bdc67){const _0x1abfb2=a43_0x1403,_0x657956=_0xb3c068();while(!![]){try{const _0xc3578b=-parseInt(_0x1abfb2(0x8c))/0x1+parseInt(_0x1abfb2(0x91))/0x2+parseInt(_0x1abfb2(0x86))/0x3*(-parseInt(_0x1abfb2(0x84))/0x4)+-parseInt(_0x1abfb2(0x93))/0x5*(parseInt(_0x1abfb2(0x99))/0x6)+parseInt(_0x1abfb2(0x87))/0x7+-parseInt(_0x1abfb2(0x95))/0x8*(-parseInt(_0x1abfb2(0x92))/0x9)+parseInt(_0x1abfb2(0x8b))/0xa;if(_0xc3578b===_0x3bdc67)break;else _0x657956['push'](_0x657956['shift']());}catch(_0x406d81){_0x657956['push'](_0x657956['shift']());}}}(a43_0x6e8a,0x4f2ad));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':'create','description':a43_0x12cd05(0x8a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x1473e8){const _0x2b2536=a43_0x12cd05,_0x3ef121=buildSkillCreatePlan(_0x1473e8[_0x2b2536(0x85)]('name'),_0x1473e8[_0x2b2536(0x85)](_0x2b2536(0x82)),_0x1473e8[_0x2b2536(0x85)]('target'));return{'method':_0x2b2536(0x97),'url':_0x3ef121[_0x2b2536(0x7f)],'body':{'skillName':_0x3ef121['rendered'][_0x2b2536(0x94)],'type':_0x3ef121[_0x2b2536(0x8d)]['type'],'selfContained':!![],'files':_0x3ef121[_0x2b2536(0x8d)][_0x2b2536(0x83)]['map'](_0x3a258d=>_0x3a258d[_0x2b2536(0x80)])},'description':_0x2b2536(0x81)};},async 'execute'(_0x47b8a9){const _0x39bc55=a43_0x12cd05,_0x213958=buildSkillCreatePlan(_0x47b8a9[_0x39bc55(0x85)]('name'),_0x47b8a9[_0x39bc55(0x85)](_0x39bc55(0x82)),_0x47b8a9['str']('target'));return writeSkillDraft(_0x213958,_0x47b8a9['bool']('force')),{'ok':!![],'data':{'skillName':_0x213958[_0x39bc55(0x8d)]['skillName'],'type':_0x213958[_0x39bc55(0x8d)][_0x39bc55(0x82)],'dir':_0x213958[_0x39bc55(0x7f)],'files':_0x213958[_0x39bc55(0x8d)][_0x39bc55(0x83)][_0x39bc55(0x98)](_0x2e8ea1=>_0x2e8ea1[_0x39bc55(0x80)])},'message':_0x39bc55(0x88)+_0x213958[_0x39bc55(0x8d)]['skillName']};}};function buildSkillCreatePlan(_0xbda927,_0x3998b7,_0x56a8c7){const _0x273aca=a43_0x12cd05,_0x220373=_0x3998b7['trim'](),_0x262a12=renderSkillTemplate({'skillName':_0xbda927,'type':_0x220373});!_0x220373&&writeCliSideChannelLine(_0x273aca(0x7d));const _0x194da3=resolve(normalizeSkillTarget(_0x56a8c7));return{'rendered':_0x262a12,'targetRoot':_0x194da3,'skillDir':resolve(_0x194da3,_0x262a12[_0x273aca(0x94)])};}function normalizeSkillTarget(_0x2b6964){const _0x287a6e=a43_0x12cd05;return(_0x2b6964||DEFAULT_SKILL_TARGET)[_0x287a6e(0x96)]()||DEFAULT_SKILL_TARGET;}function a43_0x6e8a(){const _0x5473c1=['files','4efpFzo','str','1708545WvvmdR','1951880ldVqcn','Created\x20local\x20Skill\x20draft\x20','validation','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','12532230JWlUoC','411514swuvfh','rendered','isSymbolicLink','content','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','270568mJvJFt','9BQGbCT','58460OHBraF','skillName','1125656XBkQLy','trim','WRITE','map','258GKKTtD','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','Skill\x20directory\x20already\x20exists:\x20','skillDir','path','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','type'];a43_0x6e8a=function(){return _0x5473c1;};return a43_0x6e8a();}function a43_0x1403(_0x1f1cd1,_0x280952){_0x1f1cd1=_0x1f1cd1-0x7d;const _0x6e8a22=a43_0x6e8a();let _0x140329=_0x6e8a22[_0x1f1cd1];return _0x140329;}function writeSkillDraft(_0xda4700,_0x5eec67){const _0x43bbe2=a43_0x12cd05;if(existsSync(_0xda4700['skillDir'])){const _0x1fbf42=lstatSync(_0xda4700[_0x43bbe2(0x7f)]);if(!_0x1fbf42['isDirectory']()||_0x1fbf42[_0x43bbe2(0x8e)]())throw CliErrors[_0x43bbe2(0x89)](_0x43bbe2(0x90)+_0xda4700[_0x43bbe2(0x7f)]);if(!_0x5eec67)throw CliErrors[_0x43bbe2(0x89)](_0x43bbe2(0x7e)+_0xda4700[_0x43bbe2(0x7f)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x319e45 of _0xda4700[_0x43bbe2(0x8d)]['files']){const _0x918f54=resolve(_0xda4700['skillDir'],_0x319e45[_0x43bbe2(0x80)]),_0x230907=dirname(_0x918f54);mkdirSync(_0x230907,{'recursive':!![]});if(existsSync(_0x918f54)&&lstatSync(_0x918f54)[_0x43bbe2(0x8e)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x918f54);writeFileSync(_0x918f54,_0x319e45[_0x43bbe2(0x8f)],'utf8');}}
@@ -1 +1 @@
1
- const a44_0x42e5c9=a44_0x51e9;(function(_0x4bee89,_0x5e15e1){const _0xc6e2b3=a44_0x51e9,_0x1d9fc6=_0x4bee89();while(!![]){try{const _0x3aa744=parseInt(_0xc6e2b3(0xf4))/0x1*(-parseInt(_0xc6e2b3(0xfa))/0x2)+-parseInt(_0xc6e2b3(0xed))/0x3*(-parseInt(_0xc6e2b3(0xef))/0x4)+parseInt(_0xc6e2b3(0x10b))/0x5+-parseInt(_0xc6e2b3(0xf7))/0x6*(-parseInt(_0xc6e2b3(0xf9))/0x7)+-parseInt(_0xc6e2b3(0xe6))/0x8*(-parseInt(_0xc6e2b3(0xe9))/0x9)+-parseInt(_0xc6e2b3(0xf8))/0xa*(parseInt(_0xc6e2b3(0x10e))/0xb)+parseInt(_0xc6e2b3(0x100))/0xc*(-parseInt(_0xc6e2b3(0xfc))/0xd);if(_0x3aa744===_0x5e15e1)break;else _0x1d9fc6['push'](_0x1d9fc6['shift']());}catch(_0x391fec){_0x1d9fc6['push'](_0x1d9fc6['shift']());}}}(a44_0x8f5e,0x9312d));function a44_0x51e9(_0x122275,_0x324f6e){_0x122275=_0x122275-0xdf;const _0x8f5ec6=a44_0x8f5e();let _0x51e9c2=_0x8f5ec6[_0x122275];return _0x51e9c2;}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';function a44_0x8f5e(){const _0x417e16=['str','envName','appCode','427368GGhArV','removed','project','../../../core/api-client.js','map','\x20company\x20Skill(s).','scope','trim','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','personal','authRequired','4863660YipnXB','includes','../../../skills/runtime-skill-sync.js','22kpmhwU','created','accessKey','push','write','\x20personal\x20and\x20','Installed\x20','unchanged','filter','bool','96DrjYHV','length','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','820269CIHEof','skillRoots','skillCode','code','147513eAXdFg','action','32fkniOl','reduce','flatMap','version','updated','1PmFVMp','company','force','1894818tQwkJD','428200GSzQAP','14TPMyBl','1031606FQFwfF','global','689VzDCnp'];a44_0x8f5e=function(){return _0x417e16;};return a44_0x8f5e();}export const installCommand={'service':'skill','command':'install','description':a44_0x42e5c9(0xe8),'risk':a44_0x42e5c9(0xe0),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x19c200){return syncRuntimeSkills(_0x19c200);}};async function syncRuntimeSkills(_0x3775a0){const _0x5e8de2=a44_0x42e5c9,{downloadRuntimeSkillPackage:_0x3f595d,listRuntimeSkills:_0xe6418c}=await import(_0x5e8de2(0x103)),{linkEffectiveRuntimeSkills:_0x5ec77e,materializeRuntimeSkill:_0x14e47c,pruneStaleRuntimeSkillCache:_0x1bf77a,pruneStaleRuntimeSkillLinks:_0x5042c7,resolveRuntimeSkillInstallTarget:_0x493eea}=await import(_0x5e8de2(0x10d)),_0x42e9be=_0x3775a0[_0x5e8de2(0xfd)](_0x5e8de2(0xec)),_0x53d398=normalizeSyncScopes(_0x3775a0['str']('scope')),_0x39ac41=_0x3775a0[_0x5e8de2(0xfe)]??'production',_0x1c2b2e=_0x3775a0[_0x5e8de2(0x110)],_0x3758cb=_0x3775a0[_0x5e8de2(0xe5)](_0x5e8de2(0xf6));if(!_0x1c2b2e)throw CliErrors[_0x5e8de2(0x10a)](_0x5e8de2(0x108));const _0x87a43c=_0x493eea(_0x3775a0[_0x5e8de2(0xff)],_0x3775a0[_0x5e8de2(0xe5)](_0x5e8de2(0x102))?_0x5e8de2(0x102):_0x5e8de2(0xfb)),_0x16f888=_0x493eea(_0x3775a0[_0x5e8de2(0xff)],_0x87a43c[_0x5e8de2(0x106)]===_0x5e8de2(0x102)?_0x5e8de2(0xfb):_0x5e8de2(0x102)),_0x4b9ada=await Promise['all'](_0x53d398[_0x5e8de2(0x104)](_0x2c7b41=>_0xe6418c({'appCode':_0x3775a0[_0x5e8de2(0xff)],'scope':_0x2c7b41,'code':_0x42e9be[_0x5e8de2(0x107)]()||undefined}))),_0x5e0373=_0x53d398['includes'](_0x5e8de2(0x109))?_0x4b9ada[_0x5e8de2(0xf1)]((_0x713213,_0x97221f)=>_0x53d398[_0x97221f]==='personal'?_0x713213['personal']:[]):[],_0x1a2b9d=_0x53d398[_0x5e8de2(0x10c)](_0x5e8de2(0xf5))?_0x4b9ada[_0x5e8de2(0xf1)]((_0x494721,_0x4e79ae)=>_0x53d398[_0x4e79ae]===_0x5e8de2(0xf5)?_0x494721[_0x5e8de2(0xf5)]:[]):[],_0xc20198=new Set([..._0x5e0373['map'](_0x1343a3=>_0x1343a3['skillCode']?.[_0x5e8de2(0x107)]())[_0x5e8de2(0xe4)](_0x4038eb=>Boolean(_0x4038eb)),..._0x1a2b9d['map'](_0x9e3f61=>_0x9e3f61['skillCode']?.[_0x5e8de2(0x107)]())[_0x5e8de2(0xe4)](_0x5ca7f1=>Boolean(_0x5ca7f1))]),_0x2e75dc=_0x42e9be['trim']()?[_0x42e9be[_0x5e8de2(0x107)]()]:undefined,_0x2a2ccf=_0x53d398[_0x5e8de2(0xe7)]===0x2&&_0x53d398[_0x5e8de2(0x10c)]('personal')&&_0x53d398[_0x5e8de2(0x10c)](_0x5e8de2(0xf5)),_0x38211a=_0x2a2ccf?_0x5042c7(_0x87a43c,_0xc20198,_0x2e75dc):[],_0x1112cb=_0x1bf77a({'env':_0x39ac41,'accessKey':_0x1c2b2e,'appCode':_0x3775a0[_0x5e8de2(0xff)],'activeSkillCodes':_0xc20198,'pruneSkillCodes':_0x2e75dc,'scopes':_0x53d398,'protectedLinkRoots':_0x16f888[_0x5e8de2(0xea)]}),_0x3596d4=[];for(const _0x4eeaf9 of _0x5e0373){_0x3596d4['push'](_0x14e47c(_0x4eeaf9,'personal',{'env':_0x39ac41,'accessKey':_0x1c2b2e,'appCode':_0x3775a0[_0x5e8de2(0xff)],'force':_0x3758cb,'packageBytes':await downloadSkillPackage(_0x4eeaf9,_0x5e8de2(0x109),_0x3775a0['appCode'],_0x3f595d)}));}for(const _0x4377f1 of _0x1a2b9d){_0x3596d4[_0x5e8de2(0xdf)](_0x14e47c(_0x4377f1,_0x5e8de2(0xf5),{'env':_0x39ac41,'accessKey':_0x1c2b2e,'appCode':_0x3775a0[_0x5e8de2(0xff)],'force':_0x3758cb,'packageBytes':await downloadSkillPackage(_0x4377f1,_0x5e8de2(0xf5),_0x3775a0[_0x5e8de2(0xff)],_0x3f595d)}));}const _0x537256=_0x5ec77e(_0x3596d4,_0x87a43c),_0x8fcb0=countLinkActions(_0x537256);return{'ok':!![],'data':{'appCode':_0x3775a0['appCode'],..._0x87a43c[_0x5e8de2(0x106)]==='project'?{'installTarget':{'scope':_0x87a43c[_0x5e8de2(0x106)],'skillRoots':[..._0x87a43c[_0x5e8de2(0xea)]]}}:{},'personal':_0x5e0373[_0x5e8de2(0xe7)],'company':_0x1a2b9d['length'],'materialized':_0x3596d4[_0x5e8de2(0xe7)],'links':{'total':_0x537256[_0x5e8de2(0xe7)],'created':_0x8fcb0[_0x5e8de2(0x10f)]??0x0,'updated':_0x8fcb0[_0x5e8de2(0xf3)]??0x0,'unchanged':_0x8fcb0[_0x5e8de2(0xe3)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x38211a[_0x5e8de2(0xe4)](_0x8b9d32=>_0x8b9d32[_0x5e8de2(0xee)]==='removed')[_0x5e8de2(0xe7)],'cacheDirs':_0x1112cb[_0x5e8de2(0xe4)](_0x2413df=>_0x2413df[_0x5e8de2(0xee)]===_0x5e8de2(0x101))[_0x5e8de2(0xe7)],'skipped':[..._0x38211a,..._0x1112cb][_0x5e8de2(0xe4)](_0x447a2f=>_0x447a2f[_0x5e8de2(0xee)]==='skipped')['length']},'skills':{'personal':_0x5e0373[_0x5e8de2(0x104)](summarizeRuntimeSkill),'company':_0x1a2b9d['map'](summarizeRuntimeSkill)}},'message':_0x5e8de2(0xe2)+_0x5e0373[_0x5e8de2(0xe7)]+_0x5e8de2(0xe1)+_0x1a2b9d[_0x5e8de2(0xe7)]+_0x5e8de2(0x105)};}async function downloadSkillPackage(_0x2534ab,_0x3c267c,_0x6b736d,_0xf5ae35){const _0x57657f=a44_0x42e5c9,_0x4c1dc7=_0x2534ab[_0x57657f(0xf2)]?.['trim']();return _0x4c1dc7?_0xf5ae35(_0x3c267c,_0x2534ab[_0x57657f(0xeb)],_0x6b736d,_0x4c1dc7):_0xf5ae35(_0x3c267c,_0x2534ab[_0x57657f(0xeb)],_0x6b736d);}function countLinkActions(_0x2328b1){const _0x4d9d16=a44_0x42e5c9;return _0x2328b1[_0x4d9d16(0xf0)]((_0x381ccc,_0x3bcdd6)=>{const _0x252f57=_0x4d9d16;return _0x381ccc[_0x3bcdd6['action']]=(_0x381ccc[_0x3bcdd6[_0x252f57(0xee)]]??0x0)+0x1,_0x381ccc;},{});}
1
+ const a44_0x113681=a44_0x1f36;(function(_0x2d0ff9,_0xa773ef){const _0x2c8b5c=a44_0x1f36,_0x2a3559=_0x2d0ff9();while(!![]){try{const _0x3f52b8=-parseInt(_0x2c8b5c(0x192))/0x1+parseInt(_0x2c8b5c(0x193))/0x2*(parseInt(_0x2c8b5c(0x181))/0x3)+-parseInt(_0x2c8b5c(0x184))/0x4+-parseInt(_0x2c8b5c(0x19b))/0x5+-parseInt(_0x2c8b5c(0x185))/0x6*(-parseInt(_0x2c8b5c(0x1ac))/0x7)+-parseInt(_0x2c8b5c(0x18c))/0x8+-parseInt(_0x2c8b5c(0x1a4))/0x9;if(_0x3f52b8===_0xa773ef)break;else _0x2a3559['push'](_0x2a3559['shift']());}catch(_0x4c55b3){_0x2a3559['push'](_0x2a3559['shift']());}}}(a44_0x3ffe,0x5bd99));function a44_0x3ffe(){const _0x38a8ad=['personal','install','appCode','../../../core/api-client.js','skill','includes','flatMap','production','1937700jMydHz','length','\x20company\x20Skill(s).','map','force','authRequired','created','trim','182ssbzVh','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','write','17463OHrqje','action','skillCode','596856AXOitr','145074ZvhdZZ','unchanged','accessKey','reduce','str','code','global','1795736utNTSz','all','version','envName','filter','bool','261366rIQDSg','206aWnXOe','project','scope','Installed\x20','push','company','removed','\x20personal\x20and\x20','8265GqEdaJ'];a44_0x3ffe=function(){return _0x38a8ad;};return a44_0x3ffe();}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a44_0x1f36(_0x432b6d,_0x2a1411){_0x432b6d=_0x432b6d-0x180;const _0x3ffef3=a44_0x3ffe();let _0x1f36c0=_0x3ffef3[_0x432b6d];return _0x1f36c0;}import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a44_0x113681(0x1a0),'command':a44_0x113681(0x19d),'description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':a44_0x113681(0x180),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x58242e){return syncRuntimeSkills(_0x58242e);}};async function syncRuntimeSkills(_0x2746f2){const _0x52d63b=a44_0x113681,{downloadRuntimeSkillPackage:_0x36c0df,listRuntimeSkills:_0x598861}=await import(_0x52d63b(0x19f)),{linkEffectiveRuntimeSkills:_0x202616,materializeRuntimeSkill:_0x581f1b,pruneStaleRuntimeSkillCache:_0x421ab8,pruneStaleRuntimeSkillLinks:_0x29b3b4,resolveRuntimeSkillInstallTarget:_0x28d168}=await import('../../../skills/runtime-skill-sync.js'),_0x383476=_0x2746f2[_0x52d63b(0x189)](_0x52d63b(0x18a)),_0x16bfe4=normalizeSyncScopes(_0x2746f2[_0x52d63b(0x189)](_0x52d63b(0x195))),_0x55b4ae=_0x2746f2[_0x52d63b(0x18f)]??_0x52d63b(0x1a3),_0x345d40=_0x2746f2[_0x52d63b(0x187)],_0x18033e=_0x2746f2[_0x52d63b(0x191)](_0x52d63b(0x1a8));if(!_0x345d40)throw CliErrors[_0x52d63b(0x1a9)](_0x52d63b(0x1ad));const _0x3afb7d=_0x28d168(_0x2746f2[_0x52d63b(0x19e)],_0x2746f2[_0x52d63b(0x191)](_0x52d63b(0x194))?'project':'global'),_0x4f46ee=_0x28d168(_0x2746f2[_0x52d63b(0x19e)],_0x3afb7d[_0x52d63b(0x195)]===_0x52d63b(0x194)?_0x52d63b(0x18b):_0x52d63b(0x194)),_0xbb252c=await Promise[_0x52d63b(0x18d)](_0x16bfe4['map'](_0x504348=>_0x598861({'appCode':_0x2746f2[_0x52d63b(0x19e)],'scope':_0x504348,'code':_0x383476[_0x52d63b(0x1ab)]()||undefined}))),_0x24fd90=_0x16bfe4[_0x52d63b(0x1a1)]('personal')?_0xbb252c[_0x52d63b(0x1a2)]((_0x2c3c86,_0x2c0ecd)=>_0x16bfe4[_0x2c0ecd]==='personal'?_0x2c3c86[_0x52d63b(0x19c)]:[]):[],_0x190714=_0x16bfe4[_0x52d63b(0x1a1)]('company')?_0xbb252c[_0x52d63b(0x1a2)]((_0x21e4f5,_0x10f7f4)=>_0x16bfe4[_0x10f7f4]==='company'?_0x21e4f5['company']:[]):[],_0x479ea0=new Set([..._0x24fd90[_0x52d63b(0x1a7)](_0x198d54=>_0x198d54['skillCode']?.[_0x52d63b(0x1ab)]())[_0x52d63b(0x190)](_0x23cb13=>Boolean(_0x23cb13)),..._0x190714[_0x52d63b(0x1a7)](_0x51771a=>_0x51771a[_0x52d63b(0x183)]?.[_0x52d63b(0x1ab)]())[_0x52d63b(0x190)](_0x5aafa6=>Boolean(_0x5aafa6))]),_0x1b8c8f=_0x383476[_0x52d63b(0x1ab)]()?[_0x383476[_0x52d63b(0x1ab)]()]:undefined,_0x48ee32=_0x16bfe4['length']===0x2&&_0x16bfe4[_0x52d63b(0x1a1)](_0x52d63b(0x19c))&&_0x16bfe4[_0x52d63b(0x1a1)](_0x52d63b(0x198)),_0x4fc18f=_0x48ee32?_0x29b3b4(_0x3afb7d,_0x479ea0,_0x1b8c8f):[],_0x52f200=_0x421ab8({'env':_0x55b4ae,'accessKey':_0x345d40,'appCode':_0x2746f2[_0x52d63b(0x19e)],'activeSkillCodes':_0x479ea0,'pruneSkillCodes':_0x1b8c8f,'scopes':_0x16bfe4,'protectedLinkRoots':_0x4f46ee['skillRoots']}),_0x1b8a45=[];for(const _0x17963c of _0x24fd90){_0x1b8a45[_0x52d63b(0x197)](_0x581f1b(_0x17963c,_0x52d63b(0x19c),{'env':_0x55b4ae,'accessKey':_0x345d40,'appCode':_0x2746f2[_0x52d63b(0x19e)],'force':_0x18033e,'packageBytes':await downloadSkillPackage(_0x17963c,'personal',_0x2746f2[_0x52d63b(0x19e)],_0x36c0df)}));}for(const _0x36d991 of _0x190714){_0x1b8a45[_0x52d63b(0x197)](_0x581f1b(_0x36d991,_0x52d63b(0x198),{'env':_0x55b4ae,'accessKey':_0x345d40,'appCode':_0x2746f2['appCode'],'force':_0x18033e,'packageBytes':await downloadSkillPackage(_0x36d991,'company',_0x2746f2[_0x52d63b(0x19e)],_0x36c0df)}));}const _0xa364a1=_0x202616(_0x1b8a45,_0x3afb7d),_0x122d2e=countLinkActions(_0xa364a1);return{'ok':!![],'data':{'appCode':_0x2746f2[_0x52d63b(0x19e)],..._0x3afb7d['scope']==='project'?{'installTarget':{'scope':_0x3afb7d[_0x52d63b(0x195)],'skillRoots':[..._0x3afb7d['skillRoots']]}}:{},'personal':_0x24fd90[_0x52d63b(0x1a5)],'company':_0x190714[_0x52d63b(0x1a5)],'materialized':_0x1b8a45['length'],'links':{'total':_0xa364a1[_0x52d63b(0x1a5)],'created':_0x122d2e[_0x52d63b(0x1aa)]??0x0,'updated':_0x122d2e['updated']??0x0,'unchanged':_0x122d2e[_0x52d63b(0x186)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x4fc18f[_0x52d63b(0x190)](_0x10007f=>_0x10007f[_0x52d63b(0x182)]==='removed')['length'],'cacheDirs':_0x52f200[_0x52d63b(0x190)](_0x3796ea=>_0x3796ea[_0x52d63b(0x182)]===_0x52d63b(0x199))['length'],'skipped':[..._0x4fc18f,..._0x52f200][_0x52d63b(0x190)](_0x265ec1=>_0x265ec1[_0x52d63b(0x182)]==='skipped')[_0x52d63b(0x1a5)]},'skills':{'personal':_0x24fd90[_0x52d63b(0x1a7)](summarizeRuntimeSkill),'company':_0x190714[_0x52d63b(0x1a7)](summarizeRuntimeSkill)}},'message':_0x52d63b(0x196)+_0x24fd90[_0x52d63b(0x1a5)]+_0x52d63b(0x19a)+_0x190714[_0x52d63b(0x1a5)]+_0x52d63b(0x1a6)};}async function downloadSkillPackage(_0x2e18c2,_0x106873,_0x356daa,_0x3aa48f){const _0x19c218=a44_0x113681,_0x1b19bb=_0x2e18c2[_0x19c218(0x18e)]?.[_0x19c218(0x1ab)]();return _0x1b19bb?_0x3aa48f(_0x106873,_0x2e18c2[_0x19c218(0x183)],_0x356daa,_0x1b19bb):_0x3aa48f(_0x106873,_0x2e18c2[_0x19c218(0x183)],_0x356daa);}function countLinkActions(_0x1ccee7){const _0x231cba=a44_0x113681;return _0x1ccee7[_0x231cba(0x188)]((_0x10411b,_0x23e48b)=>{const _0x3d94c6=_0x231cba;return _0x10411b[_0x23e48b[_0x3d94c6(0x182)]]=(_0x10411b[_0x23e48b['action']]??0x0)+0x1,_0x10411b;},{});}
@@ -1 +1 @@
1
- const a45_0x3857b0=a45_0x1148;function a45_0x1c98(){const _0x4f728d=['scope','\x20local\x20Skill(s).','skill','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','appCode','envName','map','str','global','4882CswNRG','1869140mSRgcf','filter','code','authRequired','length','list','read','project','613932aIapBA','117WHlqTd','2747339mSlONW','1411952WtLIGV','builtin','company','personal','trim','\x20remote\x20Skill(s).','accessKey','../../../skills/runtime-skill-sync.js','36cdYbFO','remote','9eVomqI','5UdKXWX','4AcdQIY','production','bool','2325763OGnDlr','1220514KLcbBT','local','Listed\x20'];a45_0x1c98=function(){return _0x4f728d;};return a45_0x1c98();}function a45_0x1148(_0x57189e,_0x5869c4){_0x57189e=_0x57189e-0xde;const _0x1c9873=a45_0x1c98();let _0x114817=_0x1c9873[_0x57189e];return _0x114817;}(function(_0x38126d,_0x2b3bbd){const _0x535461=a45_0x1148,_0xb7d4f0=_0x38126d();while(!![]){try{const _0x238b26=parseInt(_0x535461(0x102))/0x1*(parseInt(_0x535461(0xf8))/0x2)+-parseInt(_0x535461(0xec))/0x3*(parseInt(_0x535461(0xe8))/0x4)+parseInt(_0x535461(0xe7))/0x5*(parseInt(_0x535461(0x101))/0x6)+-parseInt(_0x535461(0x103))/0x7+parseInt(_0x535461(0x104))/0x8*(-parseInt(_0x535461(0xe6))/0x9)+parseInt(_0x535461(0xf9))/0xa+-parseInt(_0x535461(0xeb))/0xb*(-parseInt(_0x535461(0xe4))/0xc);if(_0x238b26===_0x2b3bbd)break;else _0xb7d4f0['push'](_0xb7d4f0['shift']());}catch(_0x478336){_0xb7d4f0['push'](_0xb7d4f0['shift']());}}}(a45_0x1c98,0x38f6b));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a45_0x3857b0(0xf1),'command':a45_0x3857b0(0xfe),'description':a45_0x3857b0(0xf2),'risk':a45_0x3857b0(0xff),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x270011){const _0xdbd8d1=a45_0x3857b0,_0x509e4e=_0x270011[_0xdbd8d1(0xf6)](_0xdbd8d1(0xfb)),_0x3b57cf=normalizeListScope(_0x270011[_0xdbd8d1(0xf6)](_0xdbd8d1(0xef)));if(_0x270011[_0xdbd8d1(0xea)](_0xdbd8d1(0xed))){const _0x25d767=_0x270011[_0xdbd8d1(0xe2)];if(!_0x25d767)throw CliErrors[_0xdbd8d1(0xfc)]();const {listLocalRuntimeSkills:_0x40e73b,resolveRuntimeSkillInstallTarget:_0x272c98}=await import(_0xdbd8d1(0xe3)),_0x26d76e=_0x272c98(_0x270011['appCode'],_0x270011['bool']('project')?_0xdbd8d1(0x100):_0xdbd8d1(0xf7)),_0x58007d=_0x40e73b({'env':_0x270011[_0xdbd8d1(0xf4)]??_0xdbd8d1(0xe9),'accessKey':_0x25d767,'appCode':_0x270011['appCode'],'scopes':listScopeToRuntimeScopes(_0x3b57cf),'code':_0x509e4e[_0xdbd8d1(0xe0)]()||undefined},_0x26d76e),_0x4a1a06=groupLocalRuntimeSkills(_0x58007d);return{'ok':!![],'data':{'appCode':_0x270011[_0xdbd8d1(0xf3)],'source':_0xdbd8d1(0xed),..._0x26d76e[_0xdbd8d1(0xef)]==='project'?{'installScope':_0x26d76e[_0xdbd8d1(0xef)]}:{},'scope':_0x3b57cf,'total':_0x58007d[_0xdbd8d1(0xfd)],'personal':_0x4a1a06[_0xdbd8d1(0xdf)][_0xdbd8d1(0xfd)],'company':_0x4a1a06[_0xdbd8d1(0xde)]['length'],'items':_0x58007d['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x4a1a06['personal'][_0xdbd8d1(0xf5)](summarizeLocalRuntimeSkill),'company':_0x4a1a06[_0xdbd8d1(0xde)]['map'](summarizeLocalRuntimeSkill)}},'message':_0xdbd8d1(0xee)+_0x58007d['length']+_0xdbd8d1(0xf0)};}const {listRuntimeSkills:_0x593dd2}=await import('../../../core/api-client.js'),_0x546af9=await _0x593dd2({'appCode':_0x270011[_0xdbd8d1(0xf3)],'scope':listScopeToRemoteScope(_0x3b57cf),'code':_0x509e4e[_0xdbd8d1(0xe0)]()||undefined}),_0x52e384=shouldListScope(_0x3b57cf,_0xdbd8d1(0xdf))?_0x546af9[_0xdbd8d1(0xdf)]??[]:[],_0x3ec469=shouldListScope(_0x3b57cf,_0xdbd8d1(0xde))?_0x546af9['company']??[]:[],_0x555b46=[..._0x52e384,..._0x3ec469];return{'ok':!![],'data':{'appCode':_0x270011[_0xdbd8d1(0xf3)],'source':_0xdbd8d1(0xe5),'scope':_0x3b57cf,'total':_0x555b46['length'],'personal':_0x52e384[_0xdbd8d1(0xfd)],'company':_0x3ec469['length'],'items':_0x555b46[_0xdbd8d1(0xf5)](summarizeRuntimeSkill),'skills':{'personal':_0x52e384['map'](summarizeRuntimeSkill),'company':_0x3ec469['map'](summarizeRuntimeSkill)}},'message':'Listed\x20'+_0x555b46[_0xdbd8d1(0xfd)]+_0xdbd8d1(0xe1)};}};function groupLocalRuntimeSkills(_0x460428){const _0x5286f9=a45_0x3857b0;return{'personal':_0x460428[_0x5286f9(0xfa)](_0x12fdf7=>_0x12fdf7[_0x5286f9(0xef)]===_0x5286f9(0xdf)),'company':_0x460428['filter'](_0x551c8c=>_0x551c8c[_0x5286f9(0xef)]===_0x5286f9(0xde)),'builtin':_0x460428['filter'](_0x1331a0=>_0x1331a0[_0x5286f9(0xef)]===_0x5286f9(0x105))};}
1
+ function a45_0x2ad6(){const _0x4f069d=['2808VPRLrU','project','company','\x20local\x20Skill(s).','2903844IKrxSz','length','scope','str','633148LAmfSW','list','personal','13006vcnXsM','code','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','Listed\x20','2500690coORMm','bool','local','471328ewJCxa','production','global','appCode','builtin','filter','read','trim','25151310MPIbcu','38504qkkYCv','map','remote','48TpwTXr','envName','skill'];a45_0x2ad6=function(){return _0x4f069d;};return a45_0x2ad6();}const a45_0x238c25=a45_0x3707;(function(_0x14dee5,_0x421d42){const _0x773854=a45_0x3707,_0x492dc7=_0x14dee5();while(!![]){try{const _0x38882c=-parseInt(_0x773854(0xae))/0x1+-parseInt(_0x773854(0xb7))/0x2*(parseInt(_0x773854(0xba))/0x3)+parseInt(_0x773854(0xc5))/0x4+-parseInt(_0x773854(0xab))/0x5+-parseInt(_0x773854(0xc1))/0x6+-parseInt(_0x773854(0xc8))/0x7*(parseInt(_0x773854(0xbd))/0x8)+parseInt(_0x773854(0xb6))/0x9;if(_0x38882c===_0x421d42)break;else _0x492dc7['push'](_0x492dc7['shift']());}catch(_0x2b5765){_0x492dc7['push'](_0x492dc7['shift']());}}}(a45_0x2ad6,0x8329f));import{CliErrors}from'../../../errors.js';function a45_0x3707(_0x970416,_0x423c4b){_0x970416=_0x970416-0xab;const _0x2ad64e=a45_0x2ad6();let _0x37076b=_0x2ad64e[_0x970416];return _0x37076b;}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a45_0x238c25(0xbc),'command':a45_0x238c25(0xc6),'description':a45_0x238c25(0xca),'risk':a45_0x238c25(0xb4),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0xd8b4d5){const _0x207fc6=a45_0x238c25,_0x49c7f1=_0xd8b4d5['str'](_0x207fc6(0xc9)),_0x53f4bf=normalizeListScope(_0xd8b4d5[_0x207fc6(0xc4)](_0x207fc6(0xc3)));if(_0xd8b4d5['bool'](_0x207fc6(0xad))){const _0x2ac57e=_0xd8b4d5['accessKey'];if(!_0x2ac57e)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x294451,resolveRuntimeSkillInstallTarget:_0x29cfd1}=await import('../../../skills/runtime-skill-sync.js'),_0x5b4471=_0x29cfd1(_0xd8b4d5[_0x207fc6(0xb1)],_0xd8b4d5[_0x207fc6(0xac)](_0x207fc6(0xbe))?_0x207fc6(0xbe):_0x207fc6(0xb0)),_0x97e067=_0x294451({'env':_0xd8b4d5[_0x207fc6(0xbb)]??_0x207fc6(0xaf),'accessKey':_0x2ac57e,'appCode':_0xd8b4d5[_0x207fc6(0xb1)],'scopes':listScopeToRuntimeScopes(_0x53f4bf),'code':_0x49c7f1[_0x207fc6(0xb5)]()||undefined},_0x5b4471),_0x46071b=groupLocalRuntimeSkills(_0x97e067);return{'ok':!![],'data':{'appCode':_0xd8b4d5[_0x207fc6(0xb1)],'source':_0x207fc6(0xad),..._0x5b4471[_0x207fc6(0xc3)]==='project'?{'installScope':_0x5b4471[_0x207fc6(0xc3)]}:{},'scope':_0x53f4bf,'total':_0x97e067[_0x207fc6(0xc2)],'personal':_0x46071b[_0x207fc6(0xc7)][_0x207fc6(0xc2)],'company':_0x46071b[_0x207fc6(0xbf)]['length'],'items':_0x97e067[_0x207fc6(0xb8)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x46071b[_0x207fc6(0xc7)][_0x207fc6(0xb8)](summarizeLocalRuntimeSkill),'company':_0x46071b['company'][_0x207fc6(0xb8)](summarizeLocalRuntimeSkill)}},'message':_0x207fc6(0xcb)+_0x97e067[_0x207fc6(0xc2)]+_0x207fc6(0xc0)};}const {listRuntimeSkills:_0x5e8e39}=await import('../../../core/api-client.js'),_0xd6f76a=await _0x5e8e39({'appCode':_0xd8b4d5[_0x207fc6(0xb1)],'scope':listScopeToRemoteScope(_0x53f4bf),'code':_0x49c7f1[_0x207fc6(0xb5)]()||undefined}),_0x4c61d7=shouldListScope(_0x53f4bf,_0x207fc6(0xc7))?_0xd6f76a[_0x207fc6(0xc7)]??[]:[],_0x258389=shouldListScope(_0x53f4bf,_0x207fc6(0xbf))?_0xd6f76a[_0x207fc6(0xbf)]??[]:[],_0x43a5c5=[..._0x4c61d7,..._0x258389];return{'ok':!![],'data':{'appCode':_0xd8b4d5['appCode'],'source':_0x207fc6(0xb9),'scope':_0x53f4bf,'total':_0x43a5c5[_0x207fc6(0xc2)],'personal':_0x4c61d7[_0x207fc6(0xc2)],'company':_0x258389[_0x207fc6(0xc2)],'items':_0x43a5c5['map'](summarizeRuntimeSkill),'skills':{'personal':_0x4c61d7['map'](summarizeRuntimeSkill),'company':_0x258389['map'](summarizeRuntimeSkill)}},'message':'Listed\x20'+_0x43a5c5[_0x207fc6(0xc2)]+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x4ff059){const _0x7676ac=a45_0x238c25;return{'personal':_0x4ff059['filter'](_0x4c227e=>_0x4c227e[_0x7676ac(0xc3)]===_0x7676ac(0xc7)),'company':_0x4ff059[_0x7676ac(0xb3)](_0xdbd2a0=>_0xdbd2a0[_0x7676ac(0xc3)]===_0x7676ac(0xbf)),'builtin':_0x4ff059[_0x7676ac(0xb3)](_0x31b4d6=>_0x31b4d6[_0x7676ac(0xc3)]===_0x7676ac(0xb2))};}
@@ -1 +1 @@
1
- const a46_0x1f4ffc=a46_0x572b;(function(_0x21cb39,_0x2c59c3){const _0x214c76=a46_0x572b,_0x3cba80=_0x21cb39();while(!![]){try{const _0x18de08=-parseInt(_0x214c76(0x16f))/0x1+-parseInt(_0x214c76(0x172))/0x2*(parseInt(_0x214c76(0x176))/0x3)+parseInt(_0x214c76(0x173))/0x4*(-parseInt(_0x214c76(0x175))/0x5)+-parseInt(_0x214c76(0x174))/0x6+-parseInt(_0x214c76(0x16b))/0x7*(-parseInt(_0x214c76(0x171))/0x8)+-parseInt(_0x214c76(0x170))/0x9+parseInt(_0x214c76(0x16c))/0xa;if(_0x18de08===_0x2c59c3)break;else _0x3cba80['push'](_0x3cba80['shift']());}catch(_0x2c7061){_0x3cba80['push'](_0x3cba80['shift']());}}}(a46_0x4a7e,0xa637e));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a46_0x572b(_0x420dfc,_0x22f779){_0x420dfc=_0x420dfc-0x16b;const _0x4a7e9b=a46_0x4a7e();let _0x572b2c=_0x4a7e9b[_0x420dfc];return _0x572b2c;}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':'skill','command':a46_0x1f4ffc(0x16d),'description':a46_0x1f4ffc(0x16e),'risk':'write','flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};function a46_0x4a7e(){const _0x96fef3=['3jMZyFI','21sGgepv','20900950wyHJyN','push','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','1344677JglHow','991422BolXAT','3410296TRRPPG','1330586jSzite','12tNujPG','117714nFdKYV','913965muUFPf'];a46_0x4a7e=function(){return _0x96fef3;};return a46_0x4a7e();}
1
+ function a46_0x31ef(_0x42cadf,_0x379808){_0x42cadf=_0x42cadf-0x7c;const _0x61a089=a46_0x61a0();let _0x31ef36=_0x61a089[_0x42cadf];return _0x31ef36;}const a46_0x44ae5c=a46_0x31ef;(function(_0x4b7e49,_0x1c371e){const _0x33d1f8=a46_0x31ef,_0x3b2853=_0x4b7e49();while(!![]){try{const _0x4c2717=-parseInt(_0x33d1f8(0x84))/0x1+-parseInt(_0x33d1f8(0x7f))/0x2*(parseInt(_0x33d1f8(0x86))/0x3)+parseInt(_0x33d1f8(0x85))/0x4*(-parseInt(_0x33d1f8(0x80))/0x5)+-parseInt(_0x33d1f8(0x7d))/0x6+-parseInt(_0x33d1f8(0x7e))/0x7+parseInt(_0x33d1f8(0x87))/0x8+parseInt(_0x33d1f8(0x82))/0x9*(parseInt(_0x33d1f8(0x81))/0xa);if(_0x4c2717===_0x1c371e)break;else _0x3b2853['push'](_0x3b2853['shift']());}catch(_0x28f36c){_0x3b2853['push'](_0x3b2853['shift']());}}}(a46_0x61a0,0x9531c));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';function a46_0x61a0(){const _0x45ea25=['1553084vIjbVG','3316587wAsOKn','5746520HuFvVR','write','push','7157922HGuWtY','1194480hsKmZb','2TyDVwH','10jdDEwR','12590Oatccu','29106kZUvls','skill','933123OhaYvS'];a46_0x61a0=function(){return _0x45ea25;};return a46_0x61a0();}export const pushCommand={'service':a46_0x44ae5c(0x83),'command':a46_0x44ae5c(0x7c),'description':'Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','risk':a46_0x44ae5c(0x88),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
@@ -1 +1 @@
1
- const a47_0x275dcc=a47_0x38fb;(function(_0x2a263a,_0x37cb96){const _0x203cf3=a47_0x38fb,_0x36742d=_0x2a263a();while(!![]){try{const _0x3ce5b7=-parseInt(_0x203cf3(0x12c))/0x1*(-parseInt(_0x203cf3(0x12a))/0x2)+-parseInt(_0x203cf3(0x123))/0x3+parseInt(_0x203cf3(0x12d))/0x4+parseInt(_0x203cf3(0x127))/0x5*(parseInt(_0x203cf3(0x120))/0x6)+parseInt(_0x203cf3(0x11d))/0x7+parseInt(_0x203cf3(0x129))/0x8+-parseInt(_0x203cf3(0x121))/0x9;if(_0x3ce5b7===_0x37cb96)break;else _0x36742d['push'](_0x36742d['shift']());}catch(_0x2addf5){_0x36742d['push'](_0x36742d['shift']());}}}(a47_0x36fb,0x2b15c));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a47_0x38fb(_0x123257,_0x57b9ef){_0x123257=_0x123257-0x11d;const _0x36fb0b=a47_0x36fb();let _0x38fb34=_0x36fb0b[_0x123257];return _0x38fb34;}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':'skill','command':a47_0x275dcc(0x125),'description':a47_0x275dcc(0x124),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x165096){const _0xb51d5=a47_0x275dcc,_0x185b03=_0x165096[_0xb51d5(0x128)]('strict'),_0x17f280=validateSkillDirectory(_0x165096[_0xb51d5(0x11f)](_0xb51d5(0x12b)),{'strict':_0x185b03});return throwIfSkillValidationFailed(_0x17f280,_0x185b03),{'ok':!![],'data':{'dir':_0x17f280['dir'],'type':_0x17f280['type'],'errors':_0x17f280[_0xb51d5(0x126)],'warnings':_0x17f280[_0xb51d5(0x11e)]},'message':_0xb51d5(0x122)};}};function a47_0x36fb(){const _0x5ae734=['validate','errors','25zZBWEH','bool','1848648AhkxOU','22IwWjjI','dir','20285zOEkbe','659552McaIQO','2469719xRjJmb','warnings','str','60168zbTUxA','6262038AvaeOj','Skill\x20validation\x20passed.','449409qppYDy','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package'];a47_0x36fb=function(){return _0x5ae734;};return a47_0x36fb();}
1
+ const a47_0x519807=a47_0x1407;(function(_0x2d3b64,_0x41b7f3){const _0x38e746=a47_0x1407,_0x3f1c32=_0x2d3b64();while(!![]){try{const _0x37a416=parseInt(_0x38e746(0x1e4))/0x1*(parseInt(_0x38e746(0x1db))/0x2)+-parseInt(_0x38e746(0x1dc))/0x3*(parseInt(_0x38e746(0x1eb))/0x4)+parseInt(_0x38e746(0x1ee))/0x5*(-parseInt(_0x38e746(0x1e6))/0x6)+parseInt(_0x38e746(0x1e7))/0x7+parseInt(_0x38e746(0x1df))/0x8*(-parseInt(_0x38e746(0x1ef))/0x9)+parseInt(_0x38e746(0x1e9))/0xa+parseInt(_0x38e746(0x1dd))/0xb*(parseInt(_0x38e746(0x1e2))/0xc);if(_0x37a416===_0x41b7f3)break;else _0x3f1c32['push'](_0x3f1c32['shift']());}catch(_0x55c33d){_0x3f1c32['push'](_0x3f1c32['shift']());}}}(a47_0x2ee2,0x9b202));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':'skill','command':a47_0x519807(0x1ea),'description':a47_0x519807(0x1e8),'risk':a47_0x519807(0x1e1),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x35e1c5){const _0x1c79e3=a47_0x519807,_0x49ca85=_0x35e1c5[_0x1c79e3(0x1ed)]('strict'),_0x342c49=validateSkillDirectory(_0x35e1c5[_0x1c79e3(0x1ec)](_0x1c79e3(0x1de)),{'strict':_0x49ca85});return throwIfSkillValidationFailed(_0x342c49,_0x49ca85),{'ok':!![],'data':{'dir':_0x342c49[_0x1c79e3(0x1de)],'type':_0x342c49[_0x1c79e3(0x1e0)],'errors':_0x342c49[_0x1c79e3(0x1e5)],'warnings':_0x342c49[_0x1c79e3(0x1e3)]},'message':'Skill\x20validation\x20passed.'};}};function a47_0x1407(_0xd611f6,_0x26284b){_0xd611f6=_0xd611f6-0x1db;const _0x2ee2ad=a47_0x2ee2();let _0x1407a2=_0x2ee2ad[_0xd611f6];return _0x1407a2;}function a47_0x2ee2(){const _0xa592a5=['read','63444etKyJr','warnings','327099MLpiGU','errors','18DZjTPP','695359hQnuHc','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','11157870EjOQRV','validate','1710848uUlhre','str','bool','2030235gaXVYB','18bnuJLi','2LuxlUH','3jWkQfx','2156znUCTA','dir','1188912JQlRxB','type'];a47_0x2ee2=function(){return _0xa592a5;};return a47_0x2ee2();}
@@ -1 +1 @@
1
- const a48_0x3949f6=a48_0x3247;function a48_0x3247(_0x4aa61b,_0x237a30){_0x4aa61b=_0x4aa61b-0x16a;const _0x20f655=a48_0x20f6();let _0x32479a=_0x20f655[_0x4aa61b];return _0x32479a;}(function(_0x3dc73d,_0x2d59e0){const _0x13fb36=a48_0x3247,_0x25d06b=_0x3dc73d();while(!![]){try{const _0x1d249e=parseInt(_0x13fb36(0x17e))/0x1*(-parseInt(_0x13fb36(0x16a))/0x2)+parseInt(_0x13fb36(0x17b))/0x3+-parseInt(_0x13fb36(0x185))/0x4+parseInt(_0x13fb36(0x17d))/0x5*(parseInt(_0x13fb36(0x177))/0x6)+-parseInt(_0x13fb36(0x16c))/0x7+parseInt(_0x13fb36(0x174))/0x8*(-parseInt(_0x13fb36(0x184))/0x9)+parseInt(_0x13fb36(0x179))/0xa;if(_0x1d249e===_0x2d59e0)break;else _0x25d06b['push'](_0x25d06b['shift']());}catch(_0x494a82){_0x25d06b['push'](_0x25d06b['shift']());}}}(a48_0x20f6,0xda924));function a48_0x20f6(){const _0x766dd7=['746242NOEIIU','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','type','Local\x20Skill\x20directory\x20containing\x20SKILL.md','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','boolean','company','2906888SvOlyv','dir','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','942mjvDCN','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','6103950NvAcFp','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','1996770vIzwSq','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','32405Qxyspd','22017SxhWHO','confirm-warnings','local','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','personal','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','9aWgpIc','102280ZKOnEL','force','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','scope','82GqmPwp','string'];a48_0x20f6=function(){return _0x766dd7;};return a48_0x20f6();}import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':'code','type':a48_0x3949f6(0x16b),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a48_0x3949f6(0x188),'type':a48_0x3949f6(0x16b),'description':a48_0x3949f6(0x176),'enum':['all',a48_0x3949f6(0x182),a48_0x3949f6(0x173)]};export const PUSH_SCOPE_FLAG={'name':a48_0x3949f6(0x188),'type':a48_0x3949f6(0x16b),'description':a48_0x3949f6(0x17a),'default':a48_0x3949f6(0x182),'enum':[a48_0x3949f6(0x182),'company']};export const LIST_SCOPE_FLAG={'name':a48_0x3949f6(0x188),'type':a48_0x3949f6(0x16b),'description':a48_0x3949f6(0x181),'enum':['all','personal',a48_0x3949f6(0x173)]};export const LOCAL_FLAG={'name':a48_0x3949f6(0x180),'type':a48_0x3949f6(0x172),'description':a48_0x3949f6(0x171)};export const DIR_FLAG={'name':a48_0x3949f6(0x175),'type':a48_0x3949f6(0x16b),'required':!![],'description':a48_0x3949f6(0x170)};export const CREATE_NAME_FLAG={'name':'name','type':a48_0x3949f6(0x16b),'required':!![],'description':a48_0x3949f6(0x187),'pattern':{'regex':SKILL_NAME_PATTERN,'description':'lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'}};export const TYPE_FLAG={'name':a48_0x3949f6(0x16f),'type':'string','description':a48_0x3949f6(0x16d),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':'target','type':a48_0x3949f6(0x16b),'description':a48_0x3949f6(0x16e),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a48_0x3949f6(0x186),'type':'boolean','description':a48_0x3949f6(0x183)};export const PROJECT_TARGET_FLAG={'name':'project','type':a48_0x3949f6(0x172),'description':'Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories'};export const CONFIRM_WARNINGS_FLAG={'name':a48_0x3949f6(0x17f),'type':a48_0x3949f6(0x172),'description':a48_0x3949f6(0x178)};export const STRICT_FLAG={'name':'strict','type':a48_0x3949f6(0x172),'description':a48_0x3949f6(0x17c)};
1
+ const a48_0x1a67aa=a48_0x2b98;function a48_0x2b98(_0x23ef48,_0x55421a){_0x23ef48=_0x23ef48-0x14a;const _0xcc9559=a48_0xcc95();let _0x2b9881=_0xcc9559[_0x23ef48];return _0x2b9881;}(function(_0x5c4fd6,_0x323751){const _0x663fe9=a48_0x2b98,_0x43e08e=_0x5c4fd6();while(!![]){try{const _0x16fa99=-parseInt(_0x663fe9(0x160))/0x1*(parseInt(_0x663fe9(0x14b))/0x2)+parseInt(_0x663fe9(0x16e))/0x3*(-parseInt(_0x663fe9(0x14a))/0x4)+parseInt(_0x663fe9(0x151))/0x5*(parseInt(_0x663fe9(0x15d))/0x6)+parseInt(_0x663fe9(0x165))/0x7+parseInt(_0x663fe9(0x14c))/0x8+parseInt(_0x663fe9(0x15c))/0x9*(-parseInt(_0x663fe9(0x168))/0xa)+parseInt(_0x663fe9(0x154))/0xb*(-parseInt(_0x663fe9(0x14d))/0xc);if(_0x16fa99===_0x323751)break;else _0x43e08e['push'](_0x43e08e['shift']());}catch(_0x2073f4){_0x43e08e['push'](_0x43e08e['shift']());}}}(a48_0xcc95,0xe66eb));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a48_0x1a67aa(0x167),'type':a48_0x1a67aa(0x169),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a48_0x1a67aa(0x158),'type':a48_0x1a67aa(0x169),'description':a48_0x1a67aa(0x163),'enum':['all','personal',a48_0x1a67aa(0x156)]};export const PUSH_SCOPE_FLAG={'name':'scope','type':'string','description':a48_0x1a67aa(0x15b),'default':a48_0x1a67aa(0x166),'enum':[a48_0x1a67aa(0x166),a48_0x1a67aa(0x156)]};export const LIST_SCOPE_FLAG={'name':a48_0x1a67aa(0x158),'type':a48_0x1a67aa(0x169),'description':a48_0x1a67aa(0x161),'enum':[a48_0x1a67aa(0x162),a48_0x1a67aa(0x166),a48_0x1a67aa(0x156)]};export const LOCAL_FLAG={'name':a48_0x1a67aa(0x159),'type':'boolean','description':a48_0x1a67aa(0x15f)};export const DIR_FLAG={'name':a48_0x1a67aa(0x150),'type':a48_0x1a67aa(0x169),'required':!![],'description':a48_0x1a67aa(0x15e)};function a48_0xcc95(){const _0x11e48b=['scope','local','strict','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','3015BHeJfO','24LANvYk','Local\x20Skill\x20directory\x20containing\x20SKILL.md','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','559CiaINL','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','all','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','13141121QIUSjf','personal','code','9330YOKXdk','string','target','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','confirm-warnings','name','5991ZOMHLy','604xVySZO','1084RBpfYN','12799984YJyIda','9624EsYvGB','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','dir','332405iKbbKq','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','type','25817cJusFN','boolean','company','project'];a48_0xcc95=function(){return _0x11e48b;};return a48_0xcc95();}export const CREATE_NAME_FLAG={'name':a48_0x1a67aa(0x16d),'type':'string','required':!![],'description':a48_0x1a67aa(0x164),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a48_0x1a67aa(0x14e)}};export const TYPE_FLAG={'name':a48_0x1a67aa(0x153),'type':a48_0x1a67aa(0x169),'description':a48_0x1a67aa(0x152),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a48_0x1a67aa(0x16a),'type':a48_0x1a67aa(0x169),'description':a48_0x1a67aa(0x14f),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':'force','type':a48_0x1a67aa(0x155),'description':'Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists'};export const PROJECT_TARGET_FLAG={'name':a48_0x1a67aa(0x157),'type':a48_0x1a67aa(0x155),'description':'Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories'};export const CONFIRM_WARNINGS_FLAG={'name':a48_0x1a67aa(0x16c),'type':a48_0x1a67aa(0x155),'description':'Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings'};export const STRICT_FLAG={'name':a48_0x1a67aa(0x15a),'type':a48_0x1a67aa(0x155),'description':a48_0x1a67aa(0x16b)};
@@ -1 +1 @@
1
- function a49_0x5422(_0x28b613,_0x5302fe){_0x28b613=_0x28b613-0xe9;const _0x52a27c=a49_0x52a2();let _0x542244=_0x52a27c[_0x28b613];return _0x542244;}(function(_0x2b768a,_0x5e75d2){const _0x5f2c72=a49_0x5422,_0x564557=_0x2b768a();while(!![]){try{const _0x4df420=parseInt(_0x5f2c72(0xeb))/0x1+-parseInt(_0x5f2c72(0xed))/0x2+parseInt(_0x5f2c72(0xec))/0x3+-parseInt(_0x5f2c72(0xef))/0x4*(parseInt(_0x5f2c72(0xf0))/0x5)+-parseInt(_0x5f2c72(0xea))/0x6+-parseInt(_0x5f2c72(0xee))/0x7+parseInt(_0x5f2c72(0xe9))/0x8;if(_0x4df420===_0x5e75d2)break;else _0x564557['push'](_0x564557['shift']());}catch(_0x2ba0c0){_0x564557['push'](_0x564557['shift']());}}}(a49_0x52a2,0xe8c96));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';function a49_0x52a2(){const _0x7ea023=['2819784QRVbsj','916195MhTIJN','20VTTscc','1535855BSdTvv','13942448cVHtZV','3494694HViunY','1232413zrIynb','4912068lGpdgB'];a49_0x52a2=function(){return _0x7ea023;};return a49_0x52a2();}export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
1
+ (function(_0x639e85,_0x4ec50c){const _0x193a97=a49_0xbb41,_0x16fcf4=_0x639e85();while(!![]){try{const _0x42119f=parseInt(_0x193a97(0xf0))/0x1*(-parseInt(_0x193a97(0xed))/0x2)+parseInt(_0x193a97(0xf2))/0x3*(parseInt(_0x193a97(0xf4))/0x4)+parseInt(_0x193a97(0xef))/0x5*(-parseInt(_0x193a97(0xf3))/0x6)+-parseInt(_0x193a97(0xee))/0x7+parseInt(_0x193a97(0xeb))/0x8+-parseInt(_0x193a97(0xec))/0x9*(-parseInt(_0x193a97(0xf5))/0xa)+-parseInt(_0x193a97(0xf1))/0xb;if(_0x42119f===_0x4ec50c)break;else _0x16fcf4['push'](_0x16fcf4['shift']());}catch(_0x4991d7){_0x16fcf4['push'](_0x16fcf4['shift']());}}}(a49_0xcfa0,0x9276c));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';function a49_0xcfa0(){const _0x52b07d=['9bRVcDC','2uuOBaW','1040074RGsiIO','15JFatQd','709537CbRudP','3814415fYbVAz','2166gslwOR','681816QeAToQ','3280HrQCGH','7274090ZdQxlt','6610072vMgjpQ'];a49_0xcfa0=function(){return _0x52b07d;};return a49_0xcfa0();}function a49_0xbb41(_0x3530de,_0x368c92){_0x3530de=_0x3530de-0xeb;const _0xcfa0b7=a49_0xcfa0();let _0xbb41d2=_0xcfa0b7[_0x3530de];return _0xbb41d2;}export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
@@ -1 +1 @@
1
- (function(_0x166ba0,_0x1b520a){var _0x74af66=a50_0x4e73,_0x41d9a4=_0x166ba0();while(!![]){try{var _0xd12be5=-parseInt(_0x74af66(0x1ef))/0x1*(-parseInt(_0x74af66(0x1ee))/0x2)+-parseInt(_0x74af66(0x1eb))/0x3+-parseInt(_0x74af66(0x1ea))/0x4*(parseInt(_0x74af66(0x1e8))/0x5)+-parseInt(_0x74af66(0x1e0))/0x6+-parseInt(_0x74af66(0x1e9))/0x7+parseInt(_0x74af66(0x1ed))/0x8*(-parseInt(_0x74af66(0x1e6))/0x9)+parseInt(_0x74af66(0x1e4))/0xa;if(_0xd12be5===_0x1b520a)break;else _0x41d9a4['push'](_0x41d9a4['shift']());}catch(_0x3bdabd){_0x41d9a4['push'](_0x41d9a4['shift']());}}}(a50_0x1b93,0x7f05e));export function isPackageBackedManifest(_0x5cd935){var _0x5c31d9=a50_0x4e73;return!!_0x5cd935&&typeof _0x5cd935==='object'&&!Array[_0x5c31d9(0x1de)](_0x5cd935)&&typeof _0x5cd935[_0x5c31d9(0x1df)]===_0x5c31d9(0x1dd)&&_0x5cd935[_0x5c31d9(0x1df)][_0x5c31d9(0x1e1)]>0x0&&Array[_0x5c31d9(0x1de)](_0x5cd935[_0x5c31d9(0x1e7)]);}function a50_0x4e73(_0x2c5c13,_0x42447c){_0x2c5c13=_0x2c5c13-0x1dd;var _0x1b93a6=a50_0x1b93();var _0x4e73cd=_0x1b93a6[_0x2c5c13];return _0x4e73cd;}function a50_0x1b93(){var _0x2d1ebe=['SKILL.md','17451YEKnwB','files','5aOcqCM','6533373pclFHB','594436QKUNtT','2563194LgabKe','object','712DaDgGa','2OPWUvH','648793saeyvP','string','isArray','ossPath','5721366KLyQQW','length','path','some','29339710ghykGb'];a50_0x1b93=function(){return _0x2d1ebe;};return a50_0x1b93();}export function isMultiFileManifest(_0x47b4e2){var _0x23a1f4=a50_0x4e73;return!!_0x47b4e2&&typeof _0x47b4e2===_0x23a1f4(0x1ec)&&!Array['isArray'](_0x47b4e2)&&Array[_0x23a1f4(0x1de)](_0x47b4e2['files'])&&_0x47b4e2[_0x23a1f4(0x1e7)][_0x23a1f4(0x1e3)](_0x632a8e=>_0x632a8e[_0x23a1f4(0x1e2)]!==_0x23a1f4(0x1e5));}
1
+ (function(_0x2ed426,_0x229009){var _0x30e618=a50_0x572f,_0x4841a7=_0x2ed426();while(!![]){try{var _0x197d5f=parseInt(_0x30e618(0x1db))/0x1+parseInt(_0x30e618(0x1d3))/0x2*(-parseInt(_0x30e618(0x1de))/0x3)+parseInt(_0x30e618(0x1df))/0x4*(parseInt(_0x30e618(0x1da))/0x5)+-parseInt(_0x30e618(0x1dd))/0x6+parseInt(_0x30e618(0x1dc))/0x7*(-parseInt(_0x30e618(0x1d0))/0x8)+parseInt(_0x30e618(0x1e0))/0x9+parseInt(_0x30e618(0x1ce))/0xa*(parseInt(_0x30e618(0x1d5))/0xb);if(_0x197d5f===_0x229009)break;else _0x4841a7['push'](_0x4841a7['shift']());}catch(_0x2428d0){_0x4841a7['push'](_0x4841a7['shift']());}}}(a50_0x503b,0x8869c));function a50_0x572f(_0x43b59d,_0xa34852){_0x43b59d=_0x43b59d-0x1cd;var _0x503bcb=a50_0x503b();var _0x572f34=_0x503bcb[_0x43b59d];return _0x572f34;}export function isPackageBackedManifest(_0x51d7b9){var _0x2e19a9=a50_0x572f;return!!_0x51d7b9&&typeof _0x51d7b9===_0x2e19a9(0x1d7)&&!Array[_0x2e19a9(0x1d9)](_0x51d7b9)&&typeof _0x51d7b9['ossPath']===_0x2e19a9(0x1d1)&&_0x51d7b9[_0x2e19a9(0x1cd)][_0x2e19a9(0x1cf)]>0x0&&Array[_0x2e19a9(0x1d9)](_0x51d7b9[_0x2e19a9(0x1d8)]);}function a50_0x503b(){var _0x4e4c79=['186SXjaFy','1248NzfaHB','1810773YaLQDm','ossPath','803230wkSejP','length','8CWpGPf','string','path','22598FNzkov','SKILL.md','253ZzCTHb','some','object','files','isArray','4080wmDNTF','298220xaCoRI','1761788mznZAz','6542808Dkdixu'];a50_0x503b=function(){return _0x4e4c79;};return a50_0x503b();}export function isMultiFileManifest(_0x3706dc){var _0x902cdc=a50_0x572f;return!!_0x3706dc&&typeof _0x3706dc===_0x902cdc(0x1d7)&&!Array[_0x902cdc(0x1d9)](_0x3706dc)&&Array[_0x902cdc(0x1d9)](_0x3706dc[_0x902cdc(0x1d8)])&&_0x3706dc[_0x902cdc(0x1d8)][_0x902cdc(0x1d6)](_0x4ef9df=>_0x4ef9df[_0x902cdc(0x1d2)]!==_0x902cdc(0x1d4));}