@lovrabet/lovrabet-cli 2.3.11 → 2.3.12-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 (187) 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/approval/index.js +1 -1
  12. package/lib/commands/artifact/index.d.ts +13 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/issue/context.js +1 -1
  38. package/lib/commands/issue/index.js +1 -1
  39. package/lib/commands/issue/report.js +1 -1
  40. package/lib/commands/kb/index.js +1 -1
  41. package/lib/commands/logs/index.js +1 -1
  42. package/lib/commands/notification/config-list.js +1 -1
  43. package/lib/commands/notification/index.js +1 -1
  44. package/lib/commands/notification/shared.js +1 -1
  45. package/lib/commands/ocr/index.js +1 -1
  46. package/lib/commands/permit/dataset-get.js +1 -1
  47. package/lib/commands/permit/dataset-set.js +1 -1
  48. package/lib/commands/permit/index.js +1 -1
  49. package/lib/commands/permit/page-get.js +1 -1
  50. package/lib/commands/permit/page-set.js +1 -1
  51. package/lib/commands/permit/role-menus-set.js +1 -1
  52. package/lib/commands/permit/role-menus.js +1 -1
  53. package/lib/commands/permit/shared.js +1 -1
  54. package/lib/commands/personal-bff/index.js +1 -1
  55. package/lib/commands/registry.js +1 -1
  56. package/lib/commands/role/create.js +1 -1
  57. package/lib/commands/role/delete.js +1 -1
  58. package/lib/commands/role/detail.js +1 -1
  59. package/lib/commands/role/index.js +1 -1
  60. package/lib/commands/role/list.js +1 -1
  61. package/lib/commands/role/shared.js +1 -1
  62. package/lib/commands/role/update.js +1 -1
  63. package/lib/commands/role/user-add.js +1 -1
  64. package/lib/commands/role/user-remove.js +1 -1
  65. package/lib/commands/schedule/index.js +1 -1
  66. package/lib/commands/schema.js +1 -1
  67. package/lib/commands/service/dynamic.js +1 -1
  68. package/lib/commands/service/function-name-adapter.js +1 -1
  69. package/lib/commands/service/index.js +1 -1
  70. package/lib/commands/service/registry.js +1 -1
  71. package/lib/commands/skill/commands/create.js +1 -1
  72. package/lib/commands/skill/commands/diagram.js +1 -1
  73. package/lib/commands/skill/commands/install.js +1 -1
  74. package/lib/commands/skill/commands/list.js +1 -1
  75. package/lib/commands/skill/commands/push.js +1 -1
  76. package/lib/commands/skill/commands/validate.js +1 -1
  77. package/lib/commands/skill/diagram.js +1 -1
  78. package/lib/commands/skill/flags.js +1 -1
  79. package/lib/commands/skill/index.js +1 -1
  80. package/lib/commands/skill/manifest-helpers.js +1 -1
  81. package/lib/commands/skill/push-execute.js +1 -1
  82. package/lib/commands/skill/push-flow-helpers.js +1 -1
  83. package/lib/commands/skill/push-retarget.js +1 -1
  84. package/lib/commands/skill/scopes.js +1 -1
  85. package/lib/commands/skill/summary.js +1 -1
  86. package/lib/commands/skill/templates.js +1 -1
  87. package/lib/commands/skill/validate.js +1 -1
  88. package/lib/commands/sql/detail.js +1 -1
  89. package/lib/commands/sql/exec.js +1 -1
  90. package/lib/commands/sql/index.js +1 -1
  91. package/lib/commands/update.js +1 -1
  92. package/lib/commands/user-account/bind.js +1 -1
  93. package/lib/commands/user-account/index.js +1 -1
  94. package/lib/commands/workspace/index.js +1 -1
  95. package/lib/config/domain-config.js +1 -1
  96. package/lib/config/schema.js +1 -1
  97. package/lib/constant/app.js +1 -1
  98. package/lib/constant/auth-mode.js +1 -1
  99. package/lib/constant/cli.js +1 -1
  100. package/lib/constant/defaults.js +1 -1
  101. package/lib/constant/distribution.js +1 -1
  102. package/lib/constant/domain.js +1 -1
  103. package/lib/constant/env.js +1 -1
  104. package/lib/constant/output.js +1 -1
  105. package/lib/constant/product.js +1 -1
  106. package/lib/constant/region.js +1 -1
  107. package/lib/constant/risk.js +1 -1
  108. package/lib/constant/url.js +1 -1
  109. package/lib/context.js +1 -1
  110. package/lib/core/api-client.d.ts +3 -2
  111. package/lib/core/api-client.js +1 -1
  112. package/lib/core/db-resolver.js +1 -1
  113. package/lib/core/kb-management-client.js +1 -1
  114. package/lib/core/kb-sdk-errors.js +1 -1
  115. package/lib/core/kb-search-client.js +1 -1
  116. package/lib/core/sdk-client.js +1 -1
  117. package/lib/errors.js +1 -1
  118. package/lib/framework/access-error.js +1 -1
  119. package/lib/framework/build-all-flags.js +1 -1
  120. package/lib/framework/dryrun.js +1 -1
  121. package/lib/framework/flags.js +1 -1
  122. package/lib/framework/help.js +1 -1
  123. package/lib/framework/index.js +1 -1
  124. package/lib/framework/output.js +1 -1
  125. package/lib/framework/preparse.js +1 -1
  126. package/lib/framework/rate-limit.js +1 -1
  127. package/lib/framework/raw-flags.js +1 -1
  128. package/lib/framework/response.js +1 -1
  129. package/lib/framework/runner-confirmation.js +1 -1
  130. package/lib/framework/runner-error.js +1 -1
  131. package/lib/framework/runner.js +1 -1
  132. package/lib/framework/schema-export.js +1 -1
  133. package/lib/framework/service-order.js +1 -1
  134. package/lib/framework/types.js +1 -1
  135. package/lib/generated/build-info.d.ts +4 -4
  136. package/lib/generated/build-info.js +1 -1
  137. package/lib/generated/official-routing.js +1 -1
  138. package/lib/generated/routing-contract.js +1 -1
  139. package/lib/help.js +1 -1
  140. package/lib/postinstall.js +1 -1
  141. package/lib/runtime/confirmation.js +1 -1
  142. package/lib/runtime/event.js +1 -1
  143. package/lib/runtime/index.js +1 -1
  144. package/lib/runtime/queue.js +1 -1
  145. package/lib/runtime/resolve.js +1 -1
  146. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  147. package/lib/services/dataset-import/excel-reader.js +1 -1
  148. package/lib/services/dataset-import/image-bytes.js +1 -1
  149. package/lib/services/dataset-import/image-ooxml.js +1 -1
  150. package/lib/services/dataset-import/image-runner.js +1 -1
  151. package/lib/services/dataset-import/metadata.js +1 -1
  152. package/lib/services/dataset-import/preview.js +1 -1
  153. package/lib/services/dataset-import/runner.js +1 -1
  154. package/lib/skills/builtin-skill.js +1 -1
  155. package/lib/skills/npx-skills-add.js +1 -1
  156. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  157. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  158. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  159. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  160. package/lib/skills/runtime-skill-sync/links.js +1 -1
  161. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  162. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  163. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  164. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  165. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  166. package/lib/skills/runtime-skill-sync/push.js +1 -1
  167. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  168. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  169. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  170. package/lib/skills/runtime-skill-sync.js +1 -1
  171. package/lib/skills/skill-presence.js +1 -1
  172. package/lib/utils/access-key-redaction.js +1 -1
  173. package/lib/utils/apply-jq-filter.js +1 -1
  174. package/lib/utils/cli-version-check.js +1 -1
  175. package/lib/utils/cli-version-policy.js +1 -1
  176. package/lib/utils/logger.js +1 -1
  177. package/lib/utils/lossless-json.js +1 -1
  178. package/lib/utils/params.js +1 -1
  179. package/lib/utils/positive-safe-integer.js +1 -1
  180. package/lib/utils/redaction.js +1 -1
  181. package/lib/utils/runtime-user-id.js +1 -1
  182. package/lib/utils/update-notice.js +1 -1
  183. package/lib/utils/version.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +1 -1
  186. package/skills/lovrabet/SKILL.md +1 -1
  187. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x11666e,_0x3265fe){const _0x2750f1=a161_0x44df,_0x3519b6=_0x11666e();while(!![]){try{const _0x2d2679=parseInt(_0x2750f1(0xea))/0x1*(-parseInt(_0x2750f1(0xd7))/0x2)+-parseInt(_0x2750f1(0xce))/0x3*(-parseInt(_0x2750f1(0xdf))/0x4)+parseInt(_0x2750f1(0xb5))/0x5*(parseInt(_0x2750f1(0xe4))/0x6)+parseInt(_0x2750f1(0xda))/0x7*(parseInt(_0x2750f1(0xd2))/0x8)+parseInt(_0x2750f1(0xc5))/0x9*(parseInt(_0x2750f1(0xd5))/0xa)+parseInt(_0x2750f1(0xbb))/0xb+parseInt(_0x2750f1(0xf3))/0xc*(-parseInt(_0x2750f1(0xef))/0xd);if(_0x2d2679===_0x3265fe)break;else _0x3519b6['push'](_0x3519b6['shift']());}catch(_0x5cce65){_0x3519b6['push'](_0x3519b6['shift']());}}}(a161_0x3b15,0x57191));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a161_0x3b15(){const _0x9b3574=['entries','2029040AxkKnO','scope','trim','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','84DPqdUT','validation','length','skillCode','keys','5vWyatA','errors','contents','skillName','---\x0a','flow','7028538ZHfCpT','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','---','status','path','delete','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','join','filter','26883yArtBk','version','toString','find','slice','description','example','hasOwn','map','18iIxlKZ','Managed\x20file\x20was\x20removed\x20locally:\x20','match','displayName:\x20','1315352pQqNrQ','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','packageBytes','860CkyFEu','test','48670YAAkmZ','utf8','\x0a---\x0a\x0a','21CqKtPs','isFile','accessKey','has','replace','60356dIvSGv','force','appCode','displayName','trimEnd','4052382cnjSmj','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','fileHashes','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','contentHash','Runtime\x20Skill\x20package\x20is\x20missing\x20','29JPHvVi','env','schemaVersion','paths'];a161_0x3b15=function(){return _0x9b3574;};return a161_0x3b15();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x367c94,_0x25e7e8,_0x3fa89a){const _0xaaa570=a161_0x44df,_0x37d028=requireSkillCode(_0x367c94),_0x5a1392=requirePackageBytes(_0x37d028,_0x3fa89a[_0xaaa570(0xd4)]),_0x44f1c2=extractDownloadedPackage(_0x5a1392),_0x783db2=_0x44f1c2['find'](_0x13581b=>_0x13581b[_0xaaa570(0xc0)]===SKILL_FILE);if(!_0x783db2)throw CliErrors[_0xaaa570(0xf4)](_0xaaa570(0xe9)+SKILL_FILE+':\x20'+_0x37d028);const _0x50a4ef=withMaterializedSkillFrontmatter(_0x44f1c2,_0x367c94,_0x37d028),_0x1fe124=_0x50a4ef[_0xaaa570(0xc8)](_0x3b3801=>_0x3b3801[_0xaaa570(0xc0)]===SKILL_FILE),_0x5505cc=fileText(_0x1fe124),_0x35ef33=getRuntimeSkillDir(_0x3fa89a['env'],_0x3fa89a[_0xaaa570(0xdc)],_0x3fa89a['appCode'],_0x25e7e8,_0x37d028,_0x3fa89a[_0xaaa570(0xed)]),_0xb105d8=resolve(_0x35ef33,SKILL_FILE),_0x213566=resolve(_0x35ef33,METADATA_FILE),_0x142207=contentHash(_0x5505cc),_0x22319c=readMetadataIfPresent(_0x213566)?.[_0xaaa570(0xe6)];ensurePulledFilesCanBeOverwritten(_0x35ef33,_0x213566,_0x50a4ef,_0x3fa89a[_0xaaa570(0xe0)]===!![]),mkdirSync(_0x35ef33,{'recursive':!![],'mode':0x1c0});const _0x42d3cf=existsSync(_0xb105d8)?readFileSync(_0xb105d8,_0xaaa570(0xd8)):undefined;return materializeFiles(_0x35ef33,_0x50a4ef),removeStaleManagedFiles(_0x35ef33,_0x22319c,_0x50a4ef),writeJsonAtomic(_0x213566,buildMetadata(_0x367c94,_0x25e7e8,_0x3fa89a[_0xaaa570(0xe1)],_0x142207,_0x3fa89a['pulledAt'],_0x50a4ef,_0x5a1392)),{'skill':_0x367c94,'scope':_0x25e7e8,'dir':_0x35ef33,'skillMdPath':_0xb105d8,'metadataPath':_0x213566,'contentHash':_0x142207,'changed':_0x42d3cf!==_0x5505cc};}export function reuseMaterializedRuntimeSkill(_0x136a15,_0x3ef986,_0x5186fc){const _0x1d4dba=a161_0x44df,_0xdfca90=_0x136a15[_0x1d4dba(0xc6)]?.[_0x1d4dba(0xf1)]();if(!_0xdfca90)return undefined;const _0xee21b3=requireSkillCode(_0x136a15),_0x3c9f27=getRuntimeSkillDir(_0x5186fc[_0x1d4dba(0xeb)],_0x5186fc[_0x1d4dba(0xdc)],_0x5186fc['appCode'],_0x3ef986,_0xee21b3,_0x5186fc[_0x1d4dba(0xed)]),_0x2882e9=resolve(_0x3c9f27,SKILL_FILE),_0x18233e=resolve(_0x3c9f27,METADATA_FILE),_0x5de990=readMetadataIfPresent(_0x18233e);if(!_0x5de990||_0x5de990[_0x1d4dba(0xec)]!==0x2||_0x5de990[_0x1d4dba(0xe1)]!==_0x5186fc['appCode']||_0x5de990[_0x1d4dba(0xf0)]!==_0x3ef986||_0x5de990[_0x1d4dba(0xf6)]!==_0xee21b3||_0x5de990['version']!==_0xdfca90||_0x5de990['id']!==_0x136a15['id']||_0x5de990['skillName']!==_0x136a15[_0x1d4dba(0xb8)]||_0x5de990[_0x1d4dba(0xca)]!==_0x136a15[_0x1d4dba(0xca)]||_0x5de990[_0x1d4dba(0xcb)]!==_0x136a15[_0x1d4dba(0xcb)]||_0x5de990['status']!==_0x136a15[_0x1d4dba(0xbf)]||!_0x5de990[_0x1d4dba(0xe8)]||!_0x5de990[_0x1d4dba(0xe6)]||!Object[_0x1d4dba(0xcc)](_0x5de990[_0x1d4dba(0xe6)],SKILL_FILE))return undefined;for(const [_0x185164,_0x51d08b]of Object[_0x1d4dba(0xee)](_0x5de990[_0x1d4dba(0xe6)])){if(!/^[a-f0-9]{64}$/[_0x1d4dba(0xd6)](_0x51d08b))return undefined;const _0x53c8b2=resolveManagedFilePath(_0x3c9f27,_0x185164);if(!existsSync(_0x53c8b2)||!lstatSync(_0x53c8b2)[_0x1d4dba(0xdb)]())return undefined;if(bufferSha256(readFileSync(_0x53c8b2))!==_0x51d08b)return undefined;}return{'skill':_0x136a15,'scope':_0x3ef986,'dir':_0x3c9f27,'skillMdPath':_0x2882e9,'metadataPath':_0x18233e,'contentHash':_0x5de990['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x4b92d7,_0x716a3f,_0x515a2e){const _0x3ea729=a161_0x44df,_0x13246f=skillDisplayName(_0x716a3f,_0x515a2e),_0x4f2c33=_0x716a3f[_0x3ea729(0xca)]?.[_0x3ea729(0xf1)]()||_0x13246f||_0x515a2e;return normalizeLocalFiles(_0x4b92d7)[_0x3ea729(0xcd)](_0x3cf102=>{const _0x3c8dc0=_0x3ea729,_0x2c8066=fileText(_0x3cf102);if(_0x3cf102[_0x3c8dc0(0xc0)]!==SKILL_FILE)return _0x3cf102;if(hasYamlFrontmatter(_0x2c8066))return{'path':_0x3cf102[_0x3c8dc0(0xc0)],'content':withSyncedDisplayName(_0x2c8066,_0x13246f)};return{'path':_0x3cf102[_0x3c8dc0(0xc0)],'content':prependSkillFrontmatter(_0x2c8066,{'name':_0x515a2e,'displayName':_0x13246f,'description':_0x4f2c33})};});}function hasYamlFrontmatter(_0x1b05ef){const _0x3d7385=a161_0x44df;return/^\uFEFF?---\s*\r?\n/[_0x3d7385(0xd6)](_0x1b05ef);}function prependSkillFrontmatter(_0x16986f,_0x4f1db0){const _0x251f67=a161_0x44df,_0x2b0495=_0x16986f['replace'](/^\uFEFF/,'');return[_0x251f67(0xbe),'name:\x20'+yamlString(_0x4f1db0['name']),_0x4f1db0['displayName']?_0x251f67(0xd1)+yamlString(_0x4f1db0[_0x251f67(0xe2)]):undefined,'description:\x20'+yamlString(_0x4f1db0['description']),_0x251f67(0xbe),'',_0x2b0495][_0x251f67(0xc4)](_0x575a5a=>_0x575a5a!==undefined)[_0x251f67(0xc3)]('\x0a');}function yamlString(_0xfbead5){return JSON['stringify'](_0xfbead5['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x2446ac,_0x4ded1c){const _0x2c0313=a161_0x44df,_0x3450bb=_0x2446ac[_0x2c0313(0xb8)]?.[_0x2c0313(0xf1)]();return _0x3450bb||_0x4ded1c;}function withSyncedDisplayName(_0x4a8141,_0x37f8ed){const _0x28ee18=a161_0x44df,_0x439498=_0x4a8141[_0x28ee18(0xd0)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x439498)return _0x4a8141;const _0x56a444=_0x439498[0x1]??'',_0x12a5d4=_0x439498[0x2]??'',_0x31480c=parseDocument(_0x12a5d4);if(_0x31480c[_0x28ee18(0xb6)]['length']>0x0||!isMap(_0x31480c[_0x28ee18(0xb7)]))return _0x4a8141;if(_0x37f8ed)_0x31480c['set'](_0x28ee18(0xe2),_0x37f8ed);else{if(_0x31480c[_0x28ee18(0xdd)](_0x28ee18(0xe2)))_0x31480c[_0x28ee18(0xc1)](_0x28ee18(0xe2));else return _0x4a8141;}forceBlockCollections(_0x31480c[_0x28ee18(0xb7)]);const _0x5723f5=_0x31480c[_0x28ee18(0xc7)]({'lineWidth':0x0})[_0x28ee18(0xe3)](),_0x5d0b65=_0x4a8141[_0x28ee18(0xc9)](_0x439498[0x0][_0x28ee18(0xf5)])[_0x28ee18(0xde)](/^\r?\n/,'');return _0x56a444+_0x28ee18(0xb9)+_0x5723f5+_0x28ee18(0xd9)+_0x5d0b65;}function forceBlockCollections(_0xe04af7){if(!isNode(_0xe04af7))return;visit(_0xe04af7,(_0x3e0f1f,_0x19756a)=>{const _0x4bff54=a161_0x44df;isCollection(_0x19756a)&&(_0x19756a[_0x4bff54(0xba)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x422e7a,_0x499908,_0x5221f0,_0x928580){const _0xebd506=a161_0x44df;if(_0x928580||!existsSync(_0x499908))return;const _0x28d652=readMetadataIfPresent(_0x499908);if(!_0x28d652)return;const _0x2573d3=_0x28d652[_0xebd506(0xe6)]&&Object[_0xebd506(0xb4)](_0x28d652[_0xebd506(0xe6)])[_0xebd506(0xf5)]>0x0?_0x28d652[_0xebd506(0xe6)]:undefined;if(_0x2573d3)for(const [_0x583478,_0x5f4105]of Object[_0xebd506(0xee)](_0x2573d3)){const _0x22034c=resolveManagedFilePath(_0x422e7a,_0x583478);if(!existsSync(_0x22034c))throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xcf)+_0x583478);const _0x793d14=lstatSync(_0x22034c);if(!_0x793d14[_0xebd506(0xdb)]())throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xe7)+_0x583478);const _0x5c523c=bufferSha256(readFileSync(_0x22034c));if(_0x5c523c!==_0x5f4105)throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a+_0xebd506(0xbc)+_0x583478,_0xebd506(0xc2)+_0x583478);}else{const _0x2acc41=resolve(_0x422e7a,SKILL_FILE);if(existsSync(_0x2acc41)&&_0x28d652[_0xebd506(0xe8)]){const _0x36a32c=contentHash(readFileSync(_0x2acc41,_0xebd506(0xd8)));if(_0x36a32c!==_0x28d652[_0xebd506(0xe8)])throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xd3)+_0x2acc41,_0xebd506(0xbd));}}for(const _0x225e0e of normalizeLocalFiles(_0x5221f0)){if(_0x2573d3?.[_0x225e0e[_0xebd506(0xc0)]])continue;if(!_0x2573d3&&_0x225e0e['path']===SKILL_FILE)continue;const _0x103b48=resolveManagedFilePath(_0x422e7a,_0x225e0e[_0xebd506(0xc0)]);if(!existsSync(_0x103b48))continue;const _0x26a29d=lstatSync(_0x103b48);if(!_0x26a29d['isFile']())throw CliErrors['validation'](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xe5)+_0x225e0e['path']);const _0x227614=bufferSha256(readFileSync(_0x103b48));if(_0x227614!==fileHash(_0x225e0e))throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x225e0e[_0xebd506(0xc0)]);}}function a161_0x44df(_0x4d516c,_0x3a853d){_0x4d516c=_0x4d516c-0xb4;const _0x3b15e1=a161_0x3b15();let _0x44dfcc=_0x3b15e1[_0x4d516c];return _0x44dfcc;}function materializeFiles(_0x2234fd,_0x403292){const _0x3c4d39=a161_0x44df;for(const _0x53967c of normalizeLocalFiles(_0x403292)){const _0x50a055=resolveManagedFilePath(_0x2234fd,_0x53967c[_0x3c4d39(0xc0)]);mkdirSync(dirname(_0x50a055),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x50a055,fileContent(_0x53967c),0x180);}}function removeStaleManagedFiles(_0x2611fc,_0x559a13,_0x4c692a){const _0x1e8e50=a161_0x44df;if(!_0x559a13)return;const _0x2b76fc=new Set(normalizeLocalFiles(_0x4c692a)['map'](_0x3a4e37=>_0x3a4e37[_0x1e8e50(0xc0)]));for(const _0x1bae86 of Object[_0x1e8e50(0xb4)](_0x559a13)){if(_0x2b76fc['has'](_0x1bae86))continue;const _0x2c5803=resolveManagedFilePath(_0x2611fc,_0x1bae86);existsSync(_0x2c5803)&&lstatSync(_0x2c5803)[_0x1e8e50(0xdb)]()&&rmSync(_0x2c5803,{'force':!![]});}}
1
+ (function(_0x1a8259,_0xb4baed){const _0xa6e242=a161_0x2104,_0x3c7892=_0x1a8259();while(!![]){try{const _0x114887=parseInt(_0xa6e242(0x1c6))/0x1*(-parseInt(_0xa6e242(0x1ac))/0x2)+-parseInt(_0xa6e242(0x1b7))/0x3*(parseInt(_0xa6e242(0x1a6))/0x4)+-parseInt(_0xa6e242(0x1bf))/0x5+parseInt(_0xa6e242(0x1d5))/0x6+-parseInt(_0xa6e242(0x1cb))/0x7*(parseInt(_0xa6e242(0x1d7))/0x8)+parseInt(_0xa6e242(0x1b3))/0x9+parseInt(_0xa6e242(0x1b2))/0xa;if(_0x114887===_0xb4baed)break;else _0x3c7892['push'](_0x3c7892['shift']());}catch(_0x420a7f){_0x3c7892['push'](_0x3c7892['shift']());}}}(a161_0x672c,0x3b11e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a161_0x2104(_0x48be69,_0x7c01fb){_0x48be69=_0x48be69-0x1a0;const _0x672ce=a161_0x672c();let _0x21043c=_0x672ce[_0x48be69];return _0x21043c;}import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a161_0x672c(){const _0x3a2e03=['join','utf8','contentHash','slice','find','has','1185495xHObdQ','appCode','\x0a---\x0a\x0a','description','skillCode','set','skillName','1VpLKyc','Managed\x20file\x20was\x20removed\x20locally:\x20','version','name','---','1141zWwqeM','validation','filter','contents','flow','status','packageBytes','entries','.\x20Changed\x20file:\x20','errors','1538970hBcQLX','accessKey','11560jUHruW','length','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','force','match','pulledAt','map','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','replace','example','schemaVersion','keys','env','hasOwn','20IJECrN','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','path','displayName:\x20','name:\x20','stringify','89646hEEkLL','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','trim','test','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','isFile','6433430OYRrCO','331866IFsQzC','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','paths','displayName','106383zDdRwT','Runtime\x20Skill\x20package\x20is\x20missing\x20'];a161_0x672c=function(){return _0x3a2e03;};return a161_0x672c();}import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x338d20,_0x5b6df8,_0x1ec6f8){const _0x314325=a161_0x2104,_0x3b6400=requireSkillCode(_0x338d20),_0x3b2211=requirePackageBytes(_0x3b6400,_0x1ec6f8[_0x314325(0x1d1)]),_0x17e731=extractDownloadedPackage(_0x3b2211),_0xd89e3c=_0x17e731[_0x314325(0x1bd)](_0x1c648e=>_0x1c648e['path']===SKILL_FILE);if(!_0xd89e3c)throw CliErrors[_0x314325(0x1cc)](_0x314325(0x1b8)+SKILL_FILE+':\x20'+_0x3b6400);const _0x4e27af=withMaterializedSkillFrontmatter(_0x17e731,_0x338d20,_0x3b6400),_0x2e61c8=_0x4e27af[_0x314325(0x1bd)](_0x17c16e=>_0x17c16e[_0x314325(0x1a8)]===SKILL_FILE),_0x577bc8=fileText(_0x2e61c8),_0x369769=getRuntimeSkillDir(_0x1ec6f8[_0x314325(0x1a4)],_0x1ec6f8['accessKey'],_0x1ec6f8[_0x314325(0x1c0)],_0x5b6df8,_0x3b6400,_0x1ec6f8[_0x314325(0x1b5)]),_0xeb18e5=resolve(_0x369769,SKILL_FILE),_0x190b66=resolve(_0x369769,METADATA_FILE),_0x131b5=contentHash(_0x577bc8),_0x5318e4=readMetadataIfPresent(_0x190b66)?.[_0x314325(0x1df)];ensurePulledFilesCanBeOverwritten(_0x369769,_0x190b66,_0x4e27af,_0x1ec6f8[_0x314325(0x1da)]===!![]),mkdirSync(_0x369769,{'recursive':!![],'mode':0x1c0});const _0x2b5be6=existsSync(_0xeb18e5)?readFileSync(_0xeb18e5,_0x314325(0x1ba)):undefined;return materializeFiles(_0x369769,_0x4e27af),removeStaleManagedFiles(_0x369769,_0x5318e4,_0x4e27af),writeJsonAtomic(_0x190b66,buildMetadata(_0x338d20,_0x5b6df8,_0x1ec6f8['appCode'],_0x131b5,_0x1ec6f8[_0x314325(0x1dc)],_0x4e27af,_0x3b2211)),{'skill':_0x338d20,'scope':_0x5b6df8,'dir':_0x369769,'skillMdPath':_0xeb18e5,'metadataPath':_0x190b66,'contentHash':_0x131b5,'changed':_0x2b5be6!==_0x577bc8};}export function reuseMaterializedRuntimeSkill(_0x39d2a4,_0x3fbdc2,_0x41ee51){const _0x2ee854=a161_0x2104,_0x3c1b65=_0x39d2a4[_0x2ee854(0x1c8)]?.[_0x2ee854(0x1ae)]();if(!_0x3c1b65)return undefined;const _0x5370d1=requireSkillCode(_0x39d2a4),_0x50bcdf=getRuntimeSkillDir(_0x41ee51['env'],_0x41ee51[_0x2ee854(0x1d6)],_0x41ee51[_0x2ee854(0x1c0)],_0x3fbdc2,_0x5370d1,_0x41ee51[_0x2ee854(0x1b5)]),_0x1ce15f=resolve(_0x50bcdf,SKILL_FILE),_0x531554=resolve(_0x50bcdf,METADATA_FILE),_0xd345e6=readMetadataIfPresent(_0x531554);if(!_0xd345e6||_0xd345e6[_0x2ee854(0x1a2)]!==0x2||_0xd345e6[_0x2ee854(0x1c0)]!==_0x41ee51['appCode']||_0xd345e6['scope']!==_0x3fbdc2||_0xd345e6[_0x2ee854(0x1c3)]!==_0x5370d1||_0xd345e6[_0x2ee854(0x1c8)]!==_0x3c1b65||_0xd345e6['id']!==_0x39d2a4['id']||_0xd345e6[_0x2ee854(0x1c5)]!==_0x39d2a4['skillName']||_0xd345e6[_0x2ee854(0x1c2)]!==_0x39d2a4[_0x2ee854(0x1c2)]||_0xd345e6[_0x2ee854(0x1a1)]!==_0x39d2a4[_0x2ee854(0x1a1)]||_0xd345e6[_0x2ee854(0x1d0)]!==_0x39d2a4[_0x2ee854(0x1d0)]||!_0xd345e6[_0x2ee854(0x1bb)]||!_0xd345e6[_0x2ee854(0x1df)]||!Object[_0x2ee854(0x1a5)](_0xd345e6['fileHashes'],SKILL_FILE))return undefined;for(const [_0x2c1352,_0x35933a]of Object['entries'](_0xd345e6['fileHashes'])){if(!/^[a-f0-9]{64}$/[_0x2ee854(0x1af)](_0x35933a))return undefined;const _0xf67abe=resolveManagedFilePath(_0x50bcdf,_0x2c1352);if(!existsSync(_0xf67abe)||!lstatSync(_0xf67abe)[_0x2ee854(0x1b1)]())return undefined;if(bufferSha256(readFileSync(_0xf67abe))!==_0x35933a)return undefined;}return{'skill':_0x39d2a4,'scope':_0x3fbdc2,'dir':_0x50bcdf,'skillMdPath':_0x1ce15f,'metadataPath':_0x531554,'contentHash':_0xd345e6['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x57f948,_0x287f01,_0x2bf364){const _0x243673=a161_0x2104,_0x503909=skillDisplayName(_0x287f01,_0x2bf364),_0x461504=_0x287f01['description']?.[_0x243673(0x1ae)]()||_0x503909||_0x2bf364;return normalizeLocalFiles(_0x57f948)[_0x243673(0x1dd)](_0x2120de=>{const _0x187bf2=_0x243673,_0x12e3cd=fileText(_0x2120de);if(_0x2120de[_0x187bf2(0x1a8)]!==SKILL_FILE)return _0x2120de;if(hasYamlFrontmatter(_0x12e3cd))return{'path':_0x2120de[_0x187bf2(0x1a8)],'content':withSyncedDisplayName(_0x12e3cd,_0x503909)};return{'path':_0x2120de[_0x187bf2(0x1a8)],'content':prependSkillFrontmatter(_0x12e3cd,{'name':_0x2bf364,'displayName':_0x503909,'description':_0x461504})};});}function hasYamlFrontmatter(_0x1e4402){return/^\uFEFF?---\s*\r?\n/['test'](_0x1e4402);}function prependSkillFrontmatter(_0x6f33e2,_0x1996a6){const _0x5a0641=a161_0x2104,_0x1de5c5=_0x6f33e2[_0x5a0641(0x1a0)](/^\uFEFF/,'');return[_0x5a0641(0x1ca),_0x5a0641(0x1aa)+yamlString(_0x1996a6[_0x5a0641(0x1c9)]),_0x1996a6[_0x5a0641(0x1b6)]?_0x5a0641(0x1a9)+yamlString(_0x1996a6['displayName']):undefined,'description:\x20'+yamlString(_0x1996a6[_0x5a0641(0x1c2)]),_0x5a0641(0x1ca),'',_0x1de5c5][_0x5a0641(0x1cd)](_0x3e000b=>_0x3e000b!==undefined)[_0x5a0641(0x1b9)]('\x0a');}function yamlString(_0x45fc07){const _0x5a4dbd=a161_0x2104;return JSON[_0x5a4dbd(0x1ab)](_0x45fc07[_0x5a4dbd(0x1a0)](/\r/g,'')[_0x5a4dbd(0x1ae)]());}function skillDisplayName(_0xe6a625,_0x35bac5){const _0x5b4494=_0xe6a625['skillName']?.['trim']();return _0x5b4494||_0x35bac5;}function withSyncedDisplayName(_0x4de9d9,_0x5a8c95){const _0x5449d7=a161_0x2104,_0x1bce20=_0x4de9d9[_0x5449d7(0x1db)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1bce20)return _0x4de9d9;const _0x9fc81c=_0x1bce20[0x1]??'',_0x2d7100=_0x1bce20[0x2]??'',_0x33bde4=parseDocument(_0x2d7100);if(_0x33bde4[_0x5449d7(0x1d4)][_0x5449d7(0x1d8)]>0x0||!isMap(_0x33bde4[_0x5449d7(0x1ce)]))return _0x4de9d9;if(_0x5a8c95)_0x33bde4[_0x5449d7(0x1c4)](_0x5449d7(0x1b6),_0x5a8c95);else{if(_0x33bde4[_0x5449d7(0x1be)](_0x5449d7(0x1b6)))_0x33bde4['delete'](_0x5449d7(0x1b6));else return _0x4de9d9;}forceBlockCollections(_0x33bde4[_0x5449d7(0x1ce)]);const _0x4cab0e=_0x33bde4['toString']({'lineWidth':0x0})['trimEnd'](),_0x5f3a2f=_0x4de9d9[_0x5449d7(0x1bc)](_0x1bce20[0x0][_0x5449d7(0x1d8)])[_0x5449d7(0x1a0)](/^\r?\n/,'');return _0x9fc81c+'---\x0a'+_0x4cab0e+_0x5449d7(0x1c1)+_0x5f3a2f;}function forceBlockCollections(_0x2470f2){if(!isNode(_0x2470f2))return;visit(_0x2470f2,(_0x29ff69,_0x17e126)=>{const _0x4e5ada=a161_0x2104;isCollection(_0x17e126)&&(_0x17e126[_0x4e5ada(0x1cf)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23c121,_0x20a4ee,_0x5743e0,_0x252982){const _0x126fb1=a161_0x2104;if(_0x252982||!existsSync(_0x20a4ee))return;const _0x136e3a=readMetadataIfPresent(_0x20a4ee);if(!_0x136e3a)return;const _0xd7e108=_0x136e3a['fileHashes']&&Object['keys'](_0x136e3a[_0x126fb1(0x1df)])['length']>0x0?_0x136e3a['fileHashes']:undefined;if(_0xd7e108)for(const [_0x482a8d,_0x14aed6]of Object[_0x126fb1(0x1d2)](_0xd7e108)){const _0x5dc8f2=resolveManagedFilePath(_0x23c121,_0x482a8d);if(!existsSync(_0x5dc8f2))throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1c7)+_0x482a8d);const _0x37cd4d=lstatSync(_0x5dc8f2);if(!_0x37cd4d[_0x126fb1(0x1b1)]())throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1a7)+_0x482a8d);const _0x461e4b=bufferSha256(readFileSync(_0x5dc8f2));if(_0x461e4b!==_0x14aed6)throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121+_0x126fb1(0x1d3)+_0x482a8d,_0x126fb1(0x1b4)+_0x482a8d);}else{const _0x2e5ce9=resolve(_0x23c121,SKILL_FILE);if(existsSync(_0x2e5ce9)&&_0x136e3a[_0x126fb1(0x1bb)]){const _0x4d5c90=contentHash(readFileSync(_0x2e5ce9,_0x126fb1(0x1ba)));if(_0x4d5c90!==_0x136e3a[_0x126fb1(0x1bb)])throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1ad)+_0x2e5ce9,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x2f0077 of normalizeLocalFiles(_0x5743e0)){if(_0xd7e108?.[_0x2f0077[_0x126fb1(0x1a8)]])continue;if(!_0xd7e108&&_0x2f0077[_0x126fb1(0x1a8)]===SKILL_FILE)continue;const _0x4ca7c2=resolveManagedFilePath(_0x23c121,_0x2f0077['path']);if(!existsSync(_0x4ca7c2))continue;const _0x201061=lstatSync(_0x4ca7c2);if(!_0x201061[_0x126fb1(0x1b1)]())throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1d9)+_0x2f0077[_0x126fb1(0x1a8)]);const _0x3d2ea0=bufferSha256(readFileSync(_0x4ca7c2));if(_0x3d2ea0!==fileHash(_0x2f0077))throw CliErrors[_0x126fb1(0x1cc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23c121,_0x126fb1(0x1b0)+_0x2f0077[_0x126fb1(0x1a8)]);}}function materializeFiles(_0x357a4a,_0x5925d4){const _0x13a4e7=a161_0x2104;for(const _0x2e6515 of normalizeLocalFiles(_0x5925d4)){const _0x1c6e3e=resolveManagedFilePath(_0x357a4a,_0x2e6515[_0x13a4e7(0x1a8)]);mkdirSync(dirname(_0x1c6e3e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1c6e3e,fileContent(_0x2e6515),0x180);}}function removeStaleManagedFiles(_0x211073,_0x4b20b7,_0x3ef664){const _0x51a590=a161_0x2104;if(!_0x4b20b7)return;const _0x3d5968=new Set(normalizeLocalFiles(_0x3ef664)[_0x51a590(0x1dd)](_0x3b7927=>_0x3b7927['path']));for(const _0x1cea98 of Object[_0x51a590(0x1a3)](_0x4b20b7)){if(_0x3d5968[_0x51a590(0x1be)](_0x1cea98))continue;const _0x4881a5=resolveManagedFilePath(_0x211073,_0x1cea98);existsSync(_0x4881a5)&&lstatSync(_0x4881a5)[_0x51a590(0x1b1)]()&&rmSync(_0x4881a5,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x37d3be,_0x243c4b){const _0xdf2ea=a162_0xb869,_0x591860=_0x37d3be();while(!![]){try{const _0x15e8c9=-parseInt(_0xdf2ea(0xd9))/0x1*(-parseInt(_0xdf2ea(0xe5))/0x2)+-parseInt(_0xdf2ea(0xd6))/0x3*(parseInt(_0xdf2ea(0xdc))/0x4)+-parseInt(_0xdf2ea(0xde))/0x5*(-parseInt(_0xdf2ea(0xeb))/0x6)+-parseInt(_0xdf2ea(0xd4))/0x7*(-parseInt(_0xdf2ea(0xd8))/0x8)+-parseInt(_0xdf2ea(0xce))/0x9*(parseInt(_0xdf2ea(0xe1))/0xa)+parseInt(_0xdf2ea(0xd3))/0xb*(parseInt(_0xdf2ea(0xe6))/0xc)+-parseInt(_0xdf2ea(0xd1))/0xd;if(_0x15e8c9===_0x243c4b)break;else _0x591860['push'](_0x591860['shift']());}catch(_0x348a7b){_0x591860['push'](_0x591860['shift']());}}}(a162_0x20a8,0x7a8d0));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a162_0xb869(_0x333aa7,_0x36cb6e){_0x333aa7=_0x333aa7-0xcd;const _0x20a8e2=a162_0x20a8();let _0xb86999=_0x20a8e2[_0x333aa7];return _0xb86999;}function a162_0x20a8(){const _0x2fb9e4=['forkedFromSkillId','isArray','3509805btDWoG','trim','89056erlpST','5201077FRLggl','path','3wFLymO','status','8RIaYXW','2ciGlsK','sourceSessionId','zipSize','2399272oyircV','skillName','360uvBkES','Runtime\x20Skill\x20is\x20missing\x20skillCode.','Invalid\x20','3206870vFAqGp','validation','tags','utf8','467374OlUcrm','552aHpcRU','map','manifest','string','readonly','35862mLBSqI','userId','object','description','files','forkedFromVersion','skillCode','length','toISOString','18XPYLVL'];a162_0x20a8=function(){return _0x2fb9e4;};return a162_0x20a8();}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2cb319,_0x35bcf7,_0xa6e7d3,_0x36f6a1,_0x449ad5,_0x3a3980,_0x1463fd){const _0x326f3b=a162_0xb869,_0x4b0884=_0x3a3980?normalizeLocalFiles(_0x3a3980):[],_0x15c19c=!_0x1463fd&&_0x4b0884[_0x326f3b(0xf2)]>0x0?buildSkillPackage(_0x4b0884):undefined,_0x521c72=_0x1463fd?bufferSha256(_0x1463fd):_0x15c19c?.[_0x326f3b(0xe8)]['zipSha256'],_0x1970a7=_0x1463fd?.[_0x326f3b(0xf2)]??_0x15c19c?.['manifest'][_0x326f3b(0xdb)],_0x13179a=_0x4b0884[_0x326f3b(0xf2)]>0x0?Object['fromEntries'](_0x4b0884[_0x326f3b(0xe7)](_0x2035aa=>[_0x2035aa[_0x326f3b(0xd5)],fileHash(_0x2035aa)])):undefined;return{'schemaVersion':_0x4b0884['length']>0x0?0x2:0x1,'id':_0x2cb319['id'],'appCode':_0xa6e7d3,'skillCode':requireSkillCode(_0x2cb319),'skillName':_0x2cb319[_0x326f3b(0xdd)],'description':_0x2cb319[_0x326f3b(0xee)],'example':_0x2cb319['example'],'scope':_0x35bcf7,'readonly':_0x35bcf7!=='personal'||_0x2cb319[_0x326f3b(0xea)]===!![],'tenantCode':_0x2cb319['tenantCode'],'userId':_0x2cb319[_0x326f3b(0xec)],'version':_0x2cb319['version'],'status':_0x2cb319[_0x326f3b(0xd7)],'tags':Array[_0x326f3b(0xd0)](_0x2cb319[_0x326f3b(0xe3)])?_0x2cb319[_0x326f3b(0xe3)]:[],'hasUpstreamUpdate':_0x2cb319['hasUpstreamUpdate'],'forkedFromSkillId':_0x2cb319[_0x326f3b(0xcf)],'forkedFromVersion':_0x2cb319[_0x326f3b(0xf0)],'sourceSessionId':_0x2cb319[_0x326f3b(0xda)],'contentHash':_0x36f6a1,'fileHashes':_0x13179a,'treeHash':_0x4b0884['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x4b0884)):undefined,'ossPath':remoteManifestOssPath(_0x2cb319[_0x326f3b(0xef)]),'zipSha256':_0x521c72,'zipSize':_0x1970a7,'files':_0x4b0884[_0x326f3b(0xf2)]>0x0?_0x4b0884[_0x326f3b(0xe7)](_0x13e828=>({'path':_0x13e828['path'],'hash':fileHash(_0x13e828),'size':fileContent(_0x13e828)[_0x326f3b(0xf2)]})):undefined,'pulledAt':_0x449ad5??new Date()[_0x326f3b(0xcd)]()};}export function requireSkillCode(_0x51d0a6){const _0x2bae10=a162_0xb869,_0xd78f5f=_0x51d0a6[_0x2bae10(0xf1)]?.[_0x2bae10(0xd2)]();if(!_0xd78f5f)throw CliErrors[_0x2bae10(0xe2)](_0x2bae10(0xdf));return _0xd78f5f;}export function readMetadataIfPresent(_0x4f88bb){const _0x439b09=a162_0xb869;if(!existsSync(_0x4f88bb))return undefined;try{const _0x10ba9b=JSON['parse'](readFileSync(_0x4f88bb,_0x439b09(0xe4)));return _0x10ba9b;}catch{throw CliErrors[_0x439b09(0xe2)](_0x439b09(0xe0)+METADATA_FILE+':\x20'+_0x4f88bb);}}function remoteManifestOssPath(_0x1a1c44){const _0x278d1e=a162_0xb869;if(!_0x1a1c44||typeof _0x1a1c44!==_0x278d1e(0xed)||Array[_0x278d1e(0xd0)](_0x1a1c44))return undefined;const _0x1d685a=_0x1a1c44['ossPath'];return typeof _0x1d685a===_0x278d1e(0xe9)&&_0x1d685a[_0x278d1e(0xd2)]()?_0x1d685a[_0x278d1e(0xd2)]():undefined;}
1
+ (function(_0x5a8b7c,_0x192c69){const _0x60ea4f=a162_0x5995,_0x1d9642=_0x5a8b7c();while(!![]){try{const _0x49c060=-parseInt(_0x60ea4f(0xbe))/0x1+parseInt(_0x60ea4f(0xcf))/0x2*(-parseInt(_0x60ea4f(0xdf))/0x3)+parseInt(_0x60ea4f(0xd2))/0x4+parseInt(_0x60ea4f(0xe0))/0x5*(parseInt(_0x60ea4f(0xcb))/0x6)+parseInt(_0x60ea4f(0xdb))/0x7*(-parseInt(_0x60ea4f(0xc5))/0x8)+-parseInt(_0x60ea4f(0xc0))/0x9+parseInt(_0x60ea4f(0xe2))/0xa*(parseInt(_0x60ea4f(0xd0))/0xb);if(_0x49c060===_0x192c69)break;else _0x1d9642['push'](_0x1d9642['shift']());}catch(_0x8348be){_0x1d9642['push'](_0x1d9642['shift']());}}}(a162_0x16d3,0x27053));function a162_0x16d3(){const _0x599e2d=['trim','285774fVAKDS','Invalid\x20','zipSize','isArray','133798XrwNMC','11INOcyY','forkedFromVersion','1056276GIMrAR','status','utf8','skillCode','forkedFromSkillId','personal','map','sourceSessionId','parse','154yVQlBg','manifest','readonly','fromEntries','9XJkYGZ','30axmQlY','tenantCode','2498770OSxtbR','files','length','hasUpstreamUpdate','ossPath','userId','155115dwPbTP','path','387639hvXEoW','string','zipSha256','tags','Runtime\x20Skill\x20is\x20missing\x20skillCode.','87640ROkmGW','version','description','validation','example'];a162_0x16d3=function(){return _0x599e2d;};return a162_0x16d3();}import{existsSync,readFileSync}from'node:fs';function a162_0x5995(_0x16a1b2,_0x34f520){_0x16a1b2=_0x16a1b2-0xbc;const _0x16d365=a162_0x16d3();let _0x5995ba=_0x16d365[_0x16a1b2];return _0x5995ba;}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0xaf8946,_0x5069aa,_0x337302,_0x36ea7d,_0x3dc306,_0x3abf6b,_0x5f0be4){const _0x1349f4=a162_0x5995,_0x27b310=_0x3abf6b?normalizeLocalFiles(_0x3abf6b):[],_0x51ea65=!_0x5f0be4&&_0x27b310['length']>0x0?buildSkillPackage(_0x27b310):undefined,_0x2feb8a=_0x5f0be4?bufferSha256(_0x5f0be4):_0x51ea65?.[_0x1349f4(0xdc)][_0x1349f4(0xc2)],_0xd2a8f9=_0x5f0be4?.[_0x1349f4(0xe4)]??_0x51ea65?.[_0x1349f4(0xdc)][_0x1349f4(0xcd)],_0xfef083=_0x27b310[_0x1349f4(0xe4)]>0x0?Object[_0x1349f4(0xde)](_0x27b310[_0x1349f4(0xd8)](_0x3b830b=>[_0x3b830b[_0x1349f4(0xbf)],fileHash(_0x3b830b)])):undefined;return{'schemaVersion':_0x27b310[_0x1349f4(0xe4)]>0x0?0x2:0x1,'id':_0xaf8946['id'],'appCode':_0x337302,'skillCode':requireSkillCode(_0xaf8946),'skillName':_0xaf8946['skillName'],'description':_0xaf8946[_0x1349f4(0xc7)],'example':_0xaf8946[_0x1349f4(0xc9)],'scope':_0x5069aa,'readonly':_0x5069aa!==_0x1349f4(0xd7)||_0xaf8946[_0x1349f4(0xdd)]===!![],'tenantCode':_0xaf8946[_0x1349f4(0xe1)],'userId':_0xaf8946[_0x1349f4(0xbd)],'version':_0xaf8946[_0x1349f4(0xc6)],'status':_0xaf8946[_0x1349f4(0xd3)],'tags':Array[_0x1349f4(0xce)](_0xaf8946[_0x1349f4(0xc3)])?_0xaf8946[_0x1349f4(0xc3)]:[],'hasUpstreamUpdate':_0xaf8946[_0x1349f4(0xe5)],'forkedFromSkillId':_0xaf8946[_0x1349f4(0xd6)],'forkedFromVersion':_0xaf8946[_0x1349f4(0xd1)],'sourceSessionId':_0xaf8946[_0x1349f4(0xd9)],'contentHash':_0x36ea7d,'fileHashes':_0xfef083,'treeHash':_0x27b310['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x27b310)):undefined,'ossPath':remoteManifestOssPath(_0xaf8946[_0x1349f4(0xe3)]),'zipSha256':_0x2feb8a,'zipSize':_0xd2a8f9,'files':_0x27b310['length']>0x0?_0x27b310[_0x1349f4(0xd8)](_0x5b4878=>({'path':_0x5b4878[_0x1349f4(0xbf)],'hash':fileHash(_0x5b4878),'size':fileContent(_0x5b4878)[_0x1349f4(0xe4)]})):undefined,'pulledAt':_0x3dc306??new Date()['toISOString']()};}export function requireSkillCode(_0x551360){const _0x20b138=a162_0x5995,_0x2580dd=_0x551360[_0x20b138(0xd5)]?.['trim']();if(!_0x2580dd)throw CliErrors['validation'](_0x20b138(0xc4));return _0x2580dd;}export function readMetadataIfPresent(_0x38ae6a){const _0x5934cc=a162_0x5995;if(!existsSync(_0x38ae6a))return undefined;try{const _0x12935a=JSON[_0x5934cc(0xda)](readFileSync(_0x38ae6a,_0x5934cc(0xd4)));return _0x12935a;}catch{throw CliErrors[_0x5934cc(0xc8)](_0x5934cc(0xcc)+METADATA_FILE+':\x20'+_0x38ae6a);}}function remoteManifestOssPath(_0xa85752){const _0x3cc4b9=a162_0x5995;if(!_0xa85752||typeof _0xa85752!=='object'||Array['isArray'](_0xa85752))return undefined;const _0x1b8882=_0xa85752[_0x3cc4b9(0xbc)];return typeof _0x1b8882===_0x3cc4b9(0xc1)&&_0x1b8882[_0x3cc4b9(0xca)]()?_0x1b8882[_0x3cc4b9(0xca)]():undefined;}
@@ -1 +1 @@
1
- const a163_0x396b70=a163_0x3f9a;(function(_0xfe33c,_0x2dc2b5){const _0x3763b7=a163_0x3f9a,_0xe6d8ee=_0xfe33c();while(!![]){try{const _0xc56bd6=parseInt(_0x3763b7(0x182))/0x1*(-parseInt(_0x3763b7(0x172))/0x2)+-parseInt(_0x3763b7(0x17b))/0x3+-parseInt(_0x3763b7(0x178))/0x4+parseInt(_0x3763b7(0x175))/0x5*(-parseInt(_0x3763b7(0x174))/0x6)+parseInt(_0x3763b7(0x173))/0x7+-parseInt(_0x3763b7(0x17d))/0x8*(-parseInt(_0x3763b7(0x183))/0x9)+parseInt(_0x3763b7(0x16f))/0xa;if(_0xc56bd6===_0x2dc2b5)break;else _0xe6d8ee['push'](_0xe6d8ee['shift']());}catch(_0x454db1){_0xe6d8ee['push'](_0xe6d8ee['shift']());}}}(a163_0x2e1a,0x2105e));import{existsSync}from'node:fs';import{homedir}from'node:os';function a163_0x2e1a(){const _0x45460d=['342728pCgwUb','claudeSkillsDir','agentsSkillsDir','326832tLWvxp','.workbuddy','381312mGgjGL','.agents','SKILL_ROOT','workbuddySkillsDir','trim','111215krALKg','36qLJMSg','homeDir','homeDirName','cacheRoot','includes','.claude','path\x20segment','appCode','5796030dmbLuZ','validation','CLAUDE_SKILL_ROOT','4ksmbkX','172984HwLBBB','6AgWvKK','1213265kScNvN','skills','skillCode'];a163_0x2e1a=function(){return _0x45460d;};return a163_0x2e1a();}import{resolve}from'node:path';function a163_0x3f9a(_0x5b74c1,_0x2c1c73){_0x5b74c1=_0x5b74c1-0x16d;const _0x2e1ab2=a163_0x2e1a();let _0x3f9ab8=_0x2e1ab2[_0x5b74c1];return _0x3f9ab8;}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xdafdb0={}){const _0x59b0c8=a163_0x3f9a,_0x5a2105=_0xdafdb0[_0x59b0c8(0x184)]??homedir(),_0x407bf7=resolve(_0x5a2105,PRODUCT_CONFIG[_0x59b0c8(0x185)],'cache'),_0x3394c2=trimmedEnv(_0x59b0c8(0x17f)),_0x2aaecf=trimmedEnv(_0x59b0c8(0x171)),_0x29dd39=resolve(_0x5a2105,_0x59b0c8(0x17c)),_0x4253bc=_0xdafdb0[_0x59b0c8(0x180)]??(existsSync(_0x29dd39)?resolve(_0x29dd39,_0x59b0c8(0x176)):undefined);return{'homeDir':_0x5a2105,'cacheRoot':_0x407bf7,'managedRoot':resolve(_0x5a2105,PRODUCT_CONFIG[_0x59b0c8(0x185)]),'agentsSkillsDir':_0xdafdb0[_0x59b0c8(0x17a)]??_0x3394c2??resolve(_0x5a2105,_0x59b0c8(0x17e),_0x59b0c8(0x176)),'claudeSkillsDir':_0xdafdb0[_0x59b0c8(0x179)]??_0x2aaecf??resolve(_0x5a2105,_0x59b0c8(0x188),'skills'),'workbuddySkillsDir':_0x4253bc};}export function runtimeAgentSkillRoots(_0x37f7d0){const _0x5982fe=a163_0x3f9a;return[_0x37f7d0[_0x5982fe(0x17a)],_0x37f7d0[_0x5982fe(0x179)],_0x37f7d0[_0x5982fe(0x180)]]['filter'](_0xda6de=>Boolean(_0xda6de));}export function getRuntimeSkillCacheRoot(_0x52786b,_0x294bae,_0x1517c9={}){const _0x662398=a163_0x3f9a,_0xd22463=resolveSkillSyncPaths(_0x1517c9);return resolve(_0xd22463[_0x662398(0x186)],_0x52786b,fingerprintAccessKey(_0x294bae),_0x662398(0x176));}export function getRuntimeSkillDir(_0x4d1172,_0x1eff9b,_0x5de87b,_0x4f6731,_0x150a6f,_0xa84ccc={}){const _0x5d0bbb=a163_0x3f9a;return resolve(getRuntimeSkillCacheRoot(_0x4d1172,_0x1eff9b,_0xa84ccc),safePathSegment(_0x5de87b,_0x5d0bbb(0x16e)),_0x4f6731,safePathSegment(_0x150a6f,_0x5d0bbb(0x177)));}export function safePathSegment(_0x49b628,_0x28bd36=a163_0x396b70(0x16d)){const _0x285bc3=a163_0x396b70;if(!_0x49b628||_0x49b628['includes']('/')||_0x49b628[_0x285bc3(0x187)]('\x5c')||_0x49b628['includes']('..'))throw CliErrors[_0x285bc3(0x170)]('Unsafe\x20'+_0x28bd36+'\x20for\x20local\x20path:\x20'+_0x49b628);return _0x49b628;}function trimmedEnv(_0x35f668){const _0x5e832f=a163_0x396b70,_0x5c7c68=productEnv(_0x35f668)?.[_0x5e832f(0x181)]();return _0x5c7c68?_0x5c7c68:undefined;}
1
+ const a163_0x298366=a163_0x35e5;(function(_0x197eed,_0x1a5a82){const _0x21aff4=a163_0x35e5,_0x3747c0=_0x197eed();while(!![]){try{const _0x2862c5=parseInt(_0x21aff4(0x1c1))/0x1+parseInt(_0x21aff4(0x1b9))/0x2+parseInt(_0x21aff4(0x1bf))/0x3+parseInt(_0x21aff4(0x1c9))/0x4+parseInt(_0x21aff4(0x1b7))/0x5*(parseInt(_0x21aff4(0x1c8))/0x6)+-parseInt(_0x21aff4(0x1ba))/0x7+parseInt(_0x21aff4(0x1d1))/0x8;if(_0x2862c5===_0x1a5a82)break;else _0x3747c0['push'](_0x3747c0['shift']());}catch(_0x5b7bd8){_0x3747c0['push'](_0x3747c0['shift']());}}}(a163_0x55b9,0x458cb));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a163_0x55b9(){const _0x4882f2=['path\x20segment','17540DtNXcx','3895178VDKzhi','claudeSkillsDir','cache','homeDir','trim','114246sXkQdq','appCode','399605UkmxTQ','Unsafe\x20','skills','agentsSkillsDir','skillCode','validation','CLAUDE_SKILL_ROOT','1653528vHnkcC','19240oXBdPE','filter','workbuddySkillsDir','\x20for\x20local\x20path:\x20','includes','.workbuddy','cacheRoot','.claude','915792voFUVX','homeDirName','SKILL_ROOT','5LJHlso'];a163_0x55b9=function(){return _0x4882f2;};return a163_0x55b9();}export function resolveSkillSyncPaths(_0x5a08a8={}){const _0x39db75=a163_0x35e5,_0xba399e=_0x5a08a8[_0x39db75(0x1bd)]??homedir(),_0x5d9296=resolve(_0xba399e,PRODUCT_CONFIG[_0x39db75(0x1d2)],_0x39db75(0x1bc)),_0x98172d=trimmedEnv(_0x39db75(0x1b6)),_0x3bada3=trimmedEnv(_0x39db75(0x1c7)),_0x9a1612=resolve(_0xba399e,_0x39db75(0x1ce)),_0x71cc55=_0x5a08a8[_0x39db75(0x1cb)]??(existsSync(_0x9a1612)?resolve(_0x9a1612,_0x39db75(0x1c3)):undefined);return{'homeDir':_0xba399e,'cacheRoot':_0x5d9296,'managedRoot':resolve(_0xba399e,PRODUCT_CONFIG[_0x39db75(0x1d2)]),'agentsSkillsDir':_0x5a08a8[_0x39db75(0x1c4)]??_0x98172d??resolve(_0xba399e,'.agents','skills'),'claudeSkillsDir':_0x5a08a8['claudeSkillsDir']??_0x3bada3??resolve(_0xba399e,_0x39db75(0x1d0),_0x39db75(0x1c3)),'workbuddySkillsDir':_0x71cc55};}export function runtimeAgentSkillRoots(_0x5da650){const _0x374132=a163_0x35e5;return[_0x5da650['agentsSkillsDir'],_0x5da650[_0x374132(0x1bb)],_0x5da650['workbuddySkillsDir']][_0x374132(0x1ca)](_0xb0b507=>Boolean(_0xb0b507));}export function getRuntimeSkillCacheRoot(_0x2d2798,_0x3331b0,_0x1a2053={}){const _0x47ef5a=a163_0x35e5,_0x11af42=resolveSkillSyncPaths(_0x1a2053);return resolve(_0x11af42[_0x47ef5a(0x1cf)],_0x2d2798,fingerprintAccessKey(_0x3331b0),'skills');}export function getRuntimeSkillDir(_0x16c3cd,_0x2f4d87,_0x8a925a,_0x95fa8e,_0x58bbf7,_0x4007c1={}){const _0x394b42=a163_0x35e5;return resolve(getRuntimeSkillCacheRoot(_0x16c3cd,_0x2f4d87,_0x4007c1),safePathSegment(_0x8a925a,_0x394b42(0x1c0)),_0x95fa8e,safePathSegment(_0x58bbf7,_0x394b42(0x1c5)));}export function safePathSegment(_0x36e8ff,_0x32276a=a163_0x298366(0x1b8)){const _0x3b9949=a163_0x298366;if(!_0x36e8ff||_0x36e8ff[_0x3b9949(0x1cd)]('/')||_0x36e8ff[_0x3b9949(0x1cd)]('\x5c')||_0x36e8ff['includes']('..'))throw CliErrors[_0x3b9949(0x1c6)](_0x3b9949(0x1c2)+_0x32276a+_0x3b9949(0x1cc)+_0x36e8ff);return _0x36e8ff;}function a163_0x35e5(_0x1fa8ba,_0x2c0bbe){_0x1fa8ba=_0x1fa8ba-0x1b6;const _0x55b90c=a163_0x55b9();let _0x35e586=_0x55b90c[_0x1fa8ba];return _0x35e586;}function trimmedEnv(_0x5f5515){const _0x3ba17b=a163_0x298366,_0xe53f02=productEnv(_0x5f5515)?.[_0x3ba17b(0x1be)]();return _0xe53f02?_0xe53f02:undefined;}
@@ -1 +1 @@
1
- (function(_0x4fc1d5,_0x1f34c5){const _0x4f37e9=a164_0x5ed0,_0x1cc37d=_0x4fc1d5();while(!![]){try{const _0x12c190=parseInt(_0x4f37e9(0xf1))/0x1*(parseInt(_0x4f37e9(0xca))/0x2)+parseInt(_0x4f37e9(0xfb))/0x3+-parseInt(_0x4f37e9(0xd0))/0x4+parseInt(_0x4f37e9(0xe2))/0x5*(parseInt(_0x4f37e9(0xe0))/0x6)+parseInt(_0x4f37e9(0xdf))/0x7*(parseInt(_0x4f37e9(0xf4))/0x8)+-parseInt(_0x4f37e9(0xdd))/0x9*(-parseInt(_0x4f37e9(0xc1))/0xa)+parseInt(_0x4f37e9(0xed))/0xb*(-parseInt(_0x4f37e9(0xd2))/0xc);if(_0x12c190===_0x1f34c5)break;else _0x1cc37d['push'](_0x1cc37d['shift']());}catch(_0x370629){_0x1cc37d['push'](_0x1cc37d['shift']());}}}(a164_0x1c6d,0x4d5f1));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a164_0x4e2504}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x42532f,_0x330a9f,_0x176be1={}){const _0x5a9c4a=a164_0x5ed0,_0x30079d=resolvePushDirectoryRoot(_0x42532f),_0x390d14=readPushMetadataIfPresent(resolve(_0x30079d,METADATA_FILE),{'ignoreInvalidMetadata':_0x176be1[_0x5a9c4a(0xfc)]});if(_0x390d14?.[_0x5a9c4a(0xbd)]&&_0x390d14[_0x5a9c4a(0xbd)]!==_0x330a9f&&!_0x176be1[_0x5a9c4a(0xcf)]&&!_0x176be1['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x5a9c4a(0xc4)]('Skill\x20metadata\x20appCode\x20\x22'+_0x390d14[_0x5a9c4a(0xbd)]+_0x5a9c4a(0xf5)+_0x330a9f+'\x22.');const _0x4e7410=resolvePushSkillCode(_0x30079d,_0x330a9f,_0x390d14,_0x176be1);if(!_0x4e7410)throw CliErrors[_0x5a9c4a(0xc4)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x5a9c4a(0xbc));return{'dir':_0x30079d,'skillCode':_0x4e7410,'metadata':_0x390d14};}function a164_0x5ed0(_0x8de506,_0x50f928){_0x8de506=_0x8de506-0xb9;const _0x1c6dbd=a164_0x1c6d();let _0x5ed078=_0x1c6dbd[_0x8de506];return _0x5ed078;}export function readPushDirectory(_0x43641a,_0x353485,_0x56cba9={}){const _0x9f97b9=a164_0x5ed0,_0x1ccd27=resolvePushDirectoryIdentity(_0x43641a,_0x353485,_0x56cba9),_0x6f50ed=_0x1ccd27[_0x9f97b9(0xfe)],_0x1f1fba=resolve(_0x6f50ed,SKILL_FILE);if(!existsSync(_0x1f1fba)||!lstatSync(_0x1f1fba)[_0x9f97b9(0xbb)]())throw CliErrors[_0x9f97b9(0xc4)](_0x9f97b9(0xda)+SKILL_FILE+':\x20'+_0x1f1fba);const _0x283c64=_0x1ccd27[_0x9f97b9(0xe8)],_0x12738e=_0x56cba9['targetScope']??_0x9f97b9(0xd4);if(!_0x56cba9[_0x9f97b9(0xc6)]&&_0x283c64?.['scope']===_0x9f97b9(0xf9))throw CliErrors[_0x9f97b9(0xc4)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x9f97b9(0xe3)+_0x283c64[_0x9f97b9(0xc5)]+'\x22.');if(!_0x56cba9[_0x9f97b9(0xc6)]&&_0x12738e===_0x9f97b9(0xd4)&&_0x283c64?.[_0x9f97b9(0xc5)]&&_0x283c64[_0x9f97b9(0xc5)]!==_0x9f97b9(0xd4))throw CliErrors['validation'](_0x9f97b9(0xe7)+METADATA_FILE+_0x9f97b9(0xe3)+_0x283c64['scope']+'\x22.',_0x9f97b9(0xdb)+_0x6f50ed+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0xb2c1fe=scanSkillDirectory(_0x6f50ed,{'excludedFilePaths':_0x56cba9[_0x9f97b9(0xd3)]}),_0xa66f98=buildSkillPackage(_0xb2c1fe),_0x3dd5ec=readFileSync(_0x1f1fba,_0x9f97b9(0xc7)),_0x5a4c8c=_0x1ccd27[_0x9f97b9(0xe4)],_0x2d5146=_0x56cba9[_0x9f97b9(0xf0)]?undefined:_0x283c64,_0xa4c325=readSkillDisplayName(_0x3dd5ec);return{'skillCode':_0x5a4c8c,'metadata':_0x283c64,'frontmatterDisplayName':_0xa4c325,'input':{'skillCode':_0x5a4c8c,'skillName':_0xa4c325??_0x2d5146?.[_0x9f97b9(0xf6)],'description':_0x2d5146?.['description'],'content':_0x3dd5ec,'files':_0xa66f98[_0x9f97b9(0xc9)],'packageBase64':_0xa66f98[_0x9f97b9(0xd6)],'tags':_0x2d5146?.[_0x9f97b9(0xdc)],'version':_0x2d5146?.[_0x9f97b9(0xde)],'sourceSessionId':_0x2d5146?.[_0x9f97b9(0xc3)]}};}export function refreshPushDirectoryMetadataFromRemote(_0xcf1315,_0x508663,_0x418ac4,_0x5468f7={}){const _0x26c386=a164_0x5ed0,_0x2ab91a=resolvePushDirectoryRoot(_0xcf1315),_0x332447=readPushMetadataIfPresent(resolve(_0x2ab91a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x41e0fa=requireRemoteScope(_0x508663),_0x3c8304=readLocalSkillContent(_0x2ab91a),_0x41d2ed={..._0x508663,'appCode':_0x508663[_0x26c386(0xbd)]??_0x418ac4,'skillName':_0x508663[_0x26c386(0xf6)]??_0x332447?.[_0x26c386(0xf6)],'description':_0x508663[_0x26c386(0xc0)]??_0x332447?.[_0x26c386(0xc0)],'example':_0x508663[_0x26c386(0xec)]??_0x332447?.['example'],'tags':Array['isArray'](_0x508663[_0x26c386(0xdc)])?_0x508663[_0x26c386(0xdc)]:_0x332447?.[_0x26c386(0xdc)],'sourceSessionId':_0x508663[_0x26c386(0xc3)]??_0x332447?.[_0x26c386(0xc3)],'content':_0x508663['content']??_0x3c8304},_0xeff22c=buildMetadata(_0x41d2ed,_0x41e0fa,_0x418ac4,contentHash(_0x3c8304),_0x5468f7[_0x26c386(0xee)]);writeJsonAtomic(resolve(_0x2ab91a,METADATA_FILE),_0xeff22c);}export function recordPushedRuntimeSkill(_0x1ab24d,_0x53b50a,_0x3aa567,_0x1198d0={}){const _0xe0cb32=a164_0x5ed0,_0x260fe9=resolvePushDirectoryRoot(_0x1ab24d),_0x1e0774=scanSkillDirectory(_0x260fe9),_0x56f6fa=_0x1e0774[_0xe0cb32(0xb9)](_0x6e3a14=>_0x6e3a14[_0xe0cb32(0xf3)]===SKILL_FILE),_0x265cf3=_0x56f6fa?fileText(_0x56f6fa):'',_0x16341c=tryNormalizePackageManifest(_0x53b50a[_0xe0cb32(0xce)]),_0x5d75e1={..._0x53b50a,'content':_0x53b50a['content']??_0x265cf3,'files':_0x16341c},_0x449c9f=_0x16341c?normalizeLocalFiles(_0x1e0774)[_0xe0cb32(0xe9)](_0x3e928d=>_0x16341c[_0xe0cb32(0xce)][_0xe0cb32(0xf8)](_0xa1a5de=>_0xa1a5de['path']===_0x3e928d['path'])):undefined,_0x1d63ec=buildMetadata(_0x5d75e1,_0x1198d0[_0xe0cb32(0xc5)]??_0xe0cb32(0xd4),_0x3aa567,contentHash(_0x5d75e1[_0xe0cb32(0xe5)]??''),_0x1198d0[_0xe0cb32(0xfa)],_0x449c9f);writeJsonAtomic(resolve(_0x260fe9,METADATA_FILE),_0x1d63ec);}export function deriveSkillCodeFromDirectory(_0xf3d42c,_0x1c0a02){const _0x108114=a164_0x5ed0,_0x1dfa3f=basename(resolve(_0xf3d42c)),_0x296f12=_0x1c0a02+'--';return _0x1dfa3f[_0x108114(0xd1)](_0x296f12)?_0x1dfa3f['slice'](_0x296f12[_0x108114(0xf2)]):_0x1dfa3f;}function resolvePushSkillCode(_0xb814db,_0x53428f,_0x5b5c30,_0x578757){const _0x3b9c66=a164_0x5ed0,_0xda00f6=deriveSkillCodeFromSkillFile(_0xb814db)||deriveSkillCodeFromDirectory(_0xb814db,_0x53428f);if(_0x578757['ignoreMetadataSkillCode'])return _0xda00f6;return _0x5b5c30?.[_0x3b9c66(0xe4)]?.[_0x3b9c66(0xd8)]()||_0xda00f6;}function deriveSkillCodeFromSkillFile(_0x97dc59){const _0x1ad5db=a164_0x5ed0,_0x1f6b94=resolve(_0x97dc59,SKILL_FILE);if(!existsSync(_0x1f6b94)||!lstatSync(_0x1f6b94)['isFile']())return undefined;const _0x163dc1=readFileSync(_0x1f6b94,_0x1ad5db(0xc7)),_0x17f7d0=_0x163dc1[_0x1ad5db(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x17f7d0)return undefined;const _0x42f9cd=parseFrontmatterObject(_0x17f7d0[0x1]??''),_0x2c4047=scalarToString(_0x42f9cd?.[_0x1ad5db(0xe6)]);return _0x2c4047?slugifySkillName(_0x2c4047):undefined;}function readSkillDisplayName(_0x132bee){const _0x5ef502=a164_0x5ed0,_0x4694a4=_0x132bee[_0x5ef502(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4694a4)return undefined;const _0x17f0cd=parseFrontmatterObject(_0x4694a4[0x1]??'');return scalarToString(_0x17f0cd?.['displayName']);}function slugifySkillName(_0x58b446){const _0x2899a0=a164_0x5ed0,_0x328c6d=_0x58b446[_0x2899a0(0xd8)]()[_0x2899a0(0xfd)]()[_0x2899a0(0xba)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x2899a0(0xba)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x328c6d)throw CliErrors[_0x2899a0(0xc4)](_0x2899a0(0xeb)+SKILL_FILE+_0x2899a0(0xc2));return _0x328c6d;}function parseFrontmatterObject(_0x413fa7){const _0x1b1062=a164_0x5ed0;try{const _0x5d5777=a164_0x4e2504(_0x413fa7);return _0x5d5777&&typeof _0x5d5777===_0x1b1062(0xe1)&&!Array[_0x1b1062(0xbe)](_0x5d5777)?_0x5d5777:undefined;}catch{return undefined;}}function scalarToString(_0x248bfe){const _0x2c59fe=a164_0x5ed0;if(typeof _0x248bfe===_0x2c59fe(0xd5))return _0x248bfe[_0x2c59fe(0xd8)]();if(typeof _0x248bfe===_0x2c59fe(0xbf)||typeof _0x248bfe===_0x2c59fe(0xd9))return String(_0x248bfe);return undefined;}function resolvePushDirectoryRoot(_0x1bd20e){const _0x342e55=a164_0x5ed0,_0x3893f6=resolve(_0x1bd20e);if(!existsSync(_0x3893f6))throw CliErrors[_0x342e55(0xc4)](_0x342e55(0xcd)+_0x1bd20e);const _0x2e8e7a=lstatSync(_0x3893f6);if(_0x2e8e7a[_0x342e55(0xd7)]())return _0x3893f6;if(_0x2e8e7a[_0x342e55(0xea)]()){const _0x5a491e=realpathSync(_0x3893f6);if(lstatSync(_0x5a491e)[_0x342e55(0xd7)]())return _0x5a491e;}throw CliErrors[_0x342e55(0xc4)]('Skill\x20directory\x20not\x20found:\x20'+_0x1bd20e);}function requireRemoteScope(_0x1a14ff){const _0x3cc82f=a164_0x5ed0;if(_0x1a14ff[_0x3cc82f(0xc5)]===_0x3cc82f(0xd4)||_0x1a14ff['scope']===_0x3cc82f(0xf7)||_0x1a14ff[_0x3cc82f(0xc5)]===_0x3cc82f(0xf9))return _0x1a14ff[_0x3cc82f(0xc5)];throw CliErrors[_0x3cc82f(0xc4)](_0x3cc82f(0xcc)+(_0x1a14ff[_0x3cc82f(0xe4)]||_0x3cc82f(0xcb))+_0x3cc82f(0xef)+(_0x1a14ff[_0x3cc82f(0xc5)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x1c5382){const _0x30198a=a164_0x5ed0,_0x49bc13=resolve(_0x1c5382,SKILL_FILE);return existsSync(_0x49bc13)&&lstatSync(_0x49bc13)[_0x30198a(0xbb)]()?readFileSync(_0x49bc13,_0x30198a(0xc7)):'';}function a164_0x1c6d(){const _0x16171c=['files','allowAppCodeRetarget','2133360kycRvf','startsWith','7765944WxzZaB','excludedFilePaths','personal','string','packageBase64','isDirectory','trim','boolean','Missing\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','tags','165528ZrsHwJ','version','3941364Bsshgc','20184DmfLEL','object','785xinEVP','\x20has\x20scope=\x22','skillCode','content','name','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','metadata','filter','isSymbolicLink','Invalid\x20','example','11wKDYIC','refreshedAt','\x20has\x20unsupported\x20scope\x20\x22','ignoreMetadataForPayload','23348DfTYep','length','path','8HgUXxp','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillName','company','some','builtin','pushedAt','286929LONJMl','ignoreInvalidMetadata','toLowerCase','dir','find','replace','isFile',',\x20or\x20directory\x20name.','appCode','isArray','number','description','80VvqSaW','\x20name\x20for\x20SkillHub\x20slug\x20generation.','sourceSessionId','validation','scope','ignoreMetadataScope','utf8','match','manifest','14wUTSsH','(unknown)','Remote\x20Skill\x20','Skill\x20directory\x20not\x20found:\x20'];a164_0x1c6d=function(){return _0x16171c;};return a164_0x1c6d();}function readPushMetadataIfPresent(_0x39fbbf,_0x3cd41a={}){const _0x39bf00=a164_0x5ed0;try{return readMetadataIfPresent(_0x39fbbf);}catch(_0x21eeed){if(_0x3cd41a[_0x39bf00(0xfc)])return undefined;throw _0x21eeed;}}
1
+ (function(_0x5143d5,_0x3468a5){const _0x24e5aa=a164_0xd246,_0x329618=_0x5143d5();while(!![]){try{const _0x5aae3e=parseInt(_0x24e5aa(0x1df))/0x1*(-parseInt(_0x24e5aa(0x1cd))/0x2)+-parseInt(_0x24e5aa(0x1ed))/0x3*(-parseInt(_0x24e5aa(0x1b0))/0x4)+parseInt(_0x24e5aa(0x1c8))/0x5*(parseInt(_0x24e5aa(0x1af))/0x6)+parseInt(_0x24e5aa(0x1e2))/0x7+-parseInt(_0x24e5aa(0x1c6))/0x8+parseInt(_0x24e5aa(0x1bf))/0x9+-parseInt(_0x24e5aa(0x1d1))/0xa*(parseInt(_0x24e5aa(0x1e0))/0xb);if(_0x5aae3e===_0x3468a5)break;else _0x329618['push'](_0x329618['shift']());}catch(_0x3c2624){_0x329618['push'](_0x329618['shift']());}}}(a164_0x1033,0xa9403));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a164_0x1033(){const _0x194c2b=['utf8','tags','isFile','filter','478NDaJCV','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','displayName','replace','205780gyXQVp','\x20name\x20for\x20SkillHub\x20slug\x20generation.','length','isDirectory','find','Skill\x20directory\x20not\x20found:\x20','match','trim','Missing\x20','\x20has\x20scope=\x22','ignoreMetadataForPayload','Skill\x20metadata\x20appCode\x20\x22','isArray','skillCode','1109AqCsEa','737pXxSPK','personal','7837067UqtZcG','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataScope','content','name','path','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','appCode','string','validation','boolean','724158RvVJUM','skillName','scope','1169382gPqXrs','20YNbiiV','files','dir','builtin','ignoreMetadataSkillCode','manifest','excludedFilePaths','sourceSessionId','some','example','ignoreInvalidMetadata','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','object','refreshedAt','packageBase64','8168850FHiqIY','(unknown)','description','\x20has\x20unsupported\x20scope\x20\x22','isSymbolicLink','toLowerCase','Unable\x20to\x20resolve\x20skillCode\x20from\x20','10295416SysrmR','company','10rIGqaV'];a164_0x1033=function(){return _0x194c2b;};return a164_0x1033();}import{parse as a164_0x42f679}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a164_0xd246(_0x56d019,_0x506195){_0x56d019=_0x56d019-0x1af;const _0x103395=a164_0x1033();let _0xd246be=_0x103395[_0x56d019];return _0xd246be;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x2ef61a,_0x4d1cb6,_0x3f7bfd={}){const _0x20f695=a164_0xd246,_0x3df360=resolvePushDirectoryRoot(_0x2ef61a),_0x188edc=readPushMetadataIfPresent(resolve(_0x3df360,METADATA_FILE),{'ignoreInvalidMetadata':_0x3f7bfd[_0x20f695(0x1ba)]});if(_0x188edc?.[_0x20f695(0x1e9)]&&_0x188edc['appCode']!==_0x4d1cb6&&!_0x3f7bfd['allowAppCodeRetarget']&&!_0x3f7bfd['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x20f695(0x1eb)](_0x20f695(0x1dc)+_0x188edc[_0x20f695(0x1e9)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4d1cb6+'\x22.');const _0x2fc8e8=resolvePushSkillCode(_0x3df360,_0x4d1cb6,_0x188edc,_0x3f7bfd);if(!_0x2fc8e8)throw CliErrors[_0x20f695(0x1eb)](_0x20f695(0x1c5)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x3df360,'skillCode':_0x2fc8e8,'metadata':_0x188edc};}export function readPushDirectory(_0x48b2f3,_0x4acd5d,_0x207892={}){const _0x205b30=a164_0xd246,_0x19acf0=resolvePushDirectoryIdentity(_0x48b2f3,_0x4acd5d,_0x207892),_0x5f37e0=_0x19acf0[_0x205b30(0x1b2)],_0x11f225=resolve(_0x5f37e0,SKILL_FILE);if(!existsSync(_0x11f225)||!lstatSync(_0x11f225)[_0x205b30(0x1cb)]())throw CliErrors[_0x205b30(0x1eb)](_0x205b30(0x1d9)+SKILL_FILE+':\x20'+_0x11f225);const _0xb46b2e=_0x19acf0['metadata'],_0x51af9c=_0x207892['targetScope']??_0x205b30(0x1e1);if(!_0x207892[_0x205b30(0x1e4)]&&_0xb46b2e?.[_0x205b30(0x1ef)]==='builtin')throw CliErrors['validation'](_0x205b30(0x1ce)+METADATA_FILE+_0x205b30(0x1da)+_0xb46b2e[_0x205b30(0x1ef)]+'\x22.');if(!_0x207892[_0x205b30(0x1e4)]&&_0x51af9c===_0x205b30(0x1e1)&&_0xb46b2e?.[_0x205b30(0x1ef)]&&_0xb46b2e['scope']!==_0x205b30(0x1e1))throw CliErrors[_0x205b30(0x1eb)](_0x205b30(0x1bb)+METADATA_FILE+_0x205b30(0x1da)+_0xb46b2e[_0x205b30(0x1ef)]+'\x22.',_0x205b30(0x1e3)+_0x5f37e0+_0x205b30(0x1e8));const _0x1efe9a=scanSkillDirectory(_0x5f37e0,{'excludedFilePaths':_0x207892[_0x205b30(0x1b6)]}),_0x3756f8=buildSkillPackage(_0x1efe9a),_0x400ce6=readFileSync(_0x11f225,_0x205b30(0x1c9)),_0x11d39c=_0x19acf0[_0x205b30(0x1de)],_0x58923d=_0x207892[_0x205b30(0x1db)]?undefined:_0xb46b2e,_0x58e6de=readSkillDisplayName(_0x400ce6);return{'skillCode':_0x11d39c,'metadata':_0xb46b2e,'frontmatterDisplayName':_0x58e6de,'input':{'skillCode':_0x11d39c,'skillName':_0x58e6de??_0x58923d?.[_0x205b30(0x1ee)],'description':_0x58923d?.[_0x205b30(0x1c1)],'content':_0x400ce6,'files':_0x3756f8[_0x205b30(0x1b5)],'packageBase64':_0x3756f8[_0x205b30(0x1be)],'tags':_0x58923d?.['tags'],'version':_0x58923d?.['version'],'sourceSessionId':_0x58923d?.[_0x205b30(0x1b7)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x29e128,_0x646e94,_0x3c00cc,_0x5b87c3={}){const _0x8309b3=a164_0xd246,_0x29d1d4=resolvePushDirectoryRoot(_0x29e128),_0x473c26=readPushMetadataIfPresent(resolve(_0x29d1d4,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x353d9b=requireRemoteScope(_0x646e94),_0x219e4b=readLocalSkillContent(_0x29d1d4),_0x297fbb={..._0x646e94,'appCode':_0x646e94[_0x8309b3(0x1e9)]??_0x3c00cc,'skillName':_0x646e94[_0x8309b3(0x1ee)]??_0x473c26?.['skillName'],'description':_0x646e94[_0x8309b3(0x1c1)]??_0x473c26?.[_0x8309b3(0x1c1)],'example':_0x646e94[_0x8309b3(0x1b9)]??_0x473c26?.[_0x8309b3(0x1b9)],'tags':Array[_0x8309b3(0x1dd)](_0x646e94['tags'])?_0x646e94[_0x8309b3(0x1ca)]:_0x473c26?.[_0x8309b3(0x1ca)],'sourceSessionId':_0x646e94[_0x8309b3(0x1b7)]??_0x473c26?.[_0x8309b3(0x1b7)],'content':_0x646e94['content']??_0x219e4b},_0x4a1364=buildMetadata(_0x297fbb,_0x353d9b,_0x3c00cc,contentHash(_0x219e4b),_0x5b87c3[_0x8309b3(0x1bd)]);writeJsonAtomic(resolve(_0x29d1d4,METADATA_FILE),_0x4a1364);}export function recordPushedRuntimeSkill(_0x5c3d77,_0x2dde30,_0xc7b023,_0x14e4e9={}){const _0x397128=a164_0xd246,_0x3a53c9=resolvePushDirectoryRoot(_0x5c3d77),_0x5b741e=scanSkillDirectory(_0x3a53c9),_0xe5f9dc=_0x5b741e[_0x397128(0x1d5)](_0x55104b=>_0x55104b[_0x397128(0x1e7)]===SKILL_FILE),_0x254ad6=_0xe5f9dc?fileText(_0xe5f9dc):'',_0x1fc1e6=tryNormalizePackageManifest(_0x2dde30[_0x397128(0x1b1)]),_0x42ac9a={..._0x2dde30,'content':_0x2dde30[_0x397128(0x1e5)]??_0x254ad6,'files':_0x1fc1e6},_0x32f1ce=_0x1fc1e6?normalizeLocalFiles(_0x5b741e)[_0x397128(0x1cc)](_0x330459=>_0x1fc1e6[_0x397128(0x1b1)][_0x397128(0x1b8)](_0x5bff9e=>_0x5bff9e['path']===_0x330459[_0x397128(0x1e7)])):undefined,_0x52656f=buildMetadata(_0x42ac9a,_0x14e4e9[_0x397128(0x1ef)]??_0x397128(0x1e1),_0xc7b023,contentHash(_0x42ac9a[_0x397128(0x1e5)]??''),_0x14e4e9['pushedAt'],_0x32f1ce);writeJsonAtomic(resolve(_0x3a53c9,METADATA_FILE),_0x52656f);}export function deriveSkillCodeFromDirectory(_0x3e2f33,_0x1db25c){const _0x5e60fe=a164_0xd246,_0x9fb095=basename(resolve(_0x3e2f33)),_0xe50f5a=_0x1db25c+'--';return _0x9fb095['startsWith'](_0xe50f5a)?_0x9fb095['slice'](_0xe50f5a[_0x5e60fe(0x1d3)]):_0x9fb095;}function resolvePushSkillCode(_0x164f16,_0xec2a12,_0x15ed63,_0x37a65f){const _0x5308f7=a164_0xd246,_0x48c902=deriveSkillCodeFromSkillFile(_0x164f16)||deriveSkillCodeFromDirectory(_0x164f16,_0xec2a12);if(_0x37a65f[_0x5308f7(0x1b4)])return _0x48c902;return _0x15ed63?.[_0x5308f7(0x1de)]?.[_0x5308f7(0x1d8)]()||_0x48c902;}function deriveSkillCodeFromSkillFile(_0x4b2880){const _0x531ca0=a164_0xd246,_0x494161=resolve(_0x4b2880,SKILL_FILE);if(!existsSync(_0x494161)||!lstatSync(_0x494161)['isFile']())return undefined;const _0x1207aa=readFileSync(_0x494161,_0x531ca0(0x1c9)),_0x5a3112=_0x1207aa[_0x531ca0(0x1d7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5a3112)return undefined;const _0x2abde6=parseFrontmatterObject(_0x5a3112[0x1]??''),_0x1abc6d=scalarToString(_0x2abde6?.[_0x531ca0(0x1e6)]);return _0x1abc6d?slugifySkillName(_0x1abc6d):undefined;}function readSkillDisplayName(_0x541368){const _0x32ef94=a164_0xd246,_0x346af4=_0x541368[_0x32ef94(0x1d7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x346af4)return undefined;const _0x34c2df=parseFrontmatterObject(_0x346af4[0x1]??'');return scalarToString(_0x34c2df?.[_0x32ef94(0x1cf)]);}function slugifySkillName(_0x5cc42a){const _0x2a88b9=a164_0xd246,_0x5d0e32=_0x5cc42a[_0x2a88b9(0x1d8)]()[_0x2a88b9(0x1c4)]()[_0x2a88b9(0x1d0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2a88b9(0x1d0)](/^-+/,'')[_0x2a88b9(0x1d0)](/-+$/,'')[_0x2a88b9(0x1d0)](/-{2,}/g,'-');if(!_0x5d0e32)throw CliErrors[_0x2a88b9(0x1eb)]('Invalid\x20'+SKILL_FILE+_0x2a88b9(0x1d2));return _0x5d0e32;}function parseFrontmatterObject(_0x5461fc){const _0xeadbdb=a164_0xd246;try{const _0x598eac=a164_0x42f679(_0x5461fc);return _0x598eac&&typeof _0x598eac===_0xeadbdb(0x1bc)&&!Array[_0xeadbdb(0x1dd)](_0x598eac)?_0x598eac:undefined;}catch{return undefined;}}function scalarToString(_0x243f8b){const _0x10a034=a164_0xd246;if(typeof _0x243f8b===_0x10a034(0x1ea))return _0x243f8b[_0x10a034(0x1d8)]();if(typeof _0x243f8b==='number'||typeof _0x243f8b===_0x10a034(0x1ec))return String(_0x243f8b);return undefined;}function resolvePushDirectoryRoot(_0x1332e9){const _0x48bbf7=a164_0xd246,_0x52e94f=resolve(_0x1332e9);if(!existsSync(_0x52e94f))throw CliErrors[_0x48bbf7(0x1eb)]('Skill\x20directory\x20not\x20found:\x20'+_0x1332e9);const _0x418e2c=lstatSync(_0x52e94f);if(_0x418e2c[_0x48bbf7(0x1d4)]())return _0x52e94f;if(_0x418e2c[_0x48bbf7(0x1c3)]()){const _0xc53257=realpathSync(_0x52e94f);if(lstatSync(_0xc53257)['isDirectory']())return _0xc53257;}throw CliErrors['validation'](_0x48bbf7(0x1d6)+_0x1332e9);}function requireRemoteScope(_0x162175){const _0x5826f9=a164_0xd246;if(_0x162175['scope']===_0x5826f9(0x1e1)||_0x162175[_0x5826f9(0x1ef)]===_0x5826f9(0x1c7)||_0x162175[_0x5826f9(0x1ef)]===_0x5826f9(0x1b3))return _0x162175[_0x5826f9(0x1ef)];throw CliErrors[_0x5826f9(0x1eb)]('Remote\x20Skill\x20'+(_0x162175['skillCode']||_0x5826f9(0x1c0))+_0x5826f9(0x1c2)+(_0x162175[_0x5826f9(0x1ef)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x1b9126){const _0x1fd8e0=a164_0xd246,_0x459eae=resolve(_0x1b9126,SKILL_FILE);return existsSync(_0x459eae)&&lstatSync(_0x459eae)[_0x1fd8e0(0x1cb)]()?readFileSync(_0x459eae,'utf8'):'';}function readPushMetadataIfPresent(_0x45cb85,_0x4af6b8={}){const _0x292bba=a164_0xd246;try{return readMetadataIfPresent(_0x45cb85);}catch(_0x91bd13){if(_0x4af6b8[_0x292bba(0x1ba)])return undefined;throw _0x91bd13;}}
@@ -1 +1 @@
1
- (function(_0x4c825c,_0x14586b){const _0x2b2bc8=a165_0x3888,_0x355575=_0x4c825c();while(!![]){try{const _0x39bcff=parseInt(_0x2b2bc8(0x163))/0x1+parseInt(_0x2b2bc8(0x157))/0x2+-parseInt(_0x2b2bc8(0x155))/0x3+parseInt(_0x2b2bc8(0x162))/0x4*(-parseInt(_0x2b2bc8(0x161))/0x5)+parseInt(_0x2b2bc8(0x158))/0x6*(-parseInt(_0x2b2bc8(0x156))/0x7)+-parseInt(_0x2b2bc8(0x154))/0x8+-parseInt(_0x2b2bc8(0x159))/0x9*(-parseInt(_0x2b2bc8(0x15d))/0xa);if(_0x39bcff===_0x14586b)break;else _0x355575['push'](_0x355575['shift']());}catch(_0x36d068){_0x355575['push'](_0x355575['shift']());}}}(a165_0x198d,0x53b16));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x39302f){const _0x229b8b=a165_0x3888,_0x2a80e8=_0x39302f&&_0x39302f[_0x229b8b(0x15c)]>0x0?_0x39302f:[_0x229b8b(0x15f),_0x229b8b(0x15a),_0x229b8b(0x160)],_0x4fd967=[];for(const _0x1c7185 of _0x2a80e8){if(!isRuntimeSkillScope(_0x1c7185))throw CliErrors[_0x229b8b(0x15b)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x1c7185);!_0x4fd967[_0x229b8b(0x153)](_0x1c7185)&&_0x4fd967[_0x229b8b(0x15e)](_0x1c7185);}return _0x4fd967;}function a165_0x3888(_0x4092ff,_0x771b17){_0x4092ff=_0x4092ff-0x153;const _0x198d85=a165_0x198d();let _0x3888a8=_0x198d85[_0x4092ff];return _0x3888a8;}function a165_0x198d(){const _0x319f0e=['7776cdlnhF','company','validation','length','9270SRUrXi','push','personal','builtin','2701835ixvDxw','4JOqrNg','196042gIRrTe','includes','1277328IlXdFP','1370946cbYkwC','14jAngAR','1035058KcjYRz','44034eDSIMS'];a165_0x198d=function(){return _0x319f0e;};return a165_0x198d();}export function isRuntimeSkillScope(_0x2638eb){const _0x260a8d=a165_0x3888;return _0x2638eb===_0x260a8d(0x15f)||_0x2638eb==='company'||_0x2638eb===_0x260a8d(0x160);}
1
+ (function(_0x1c323e,_0x23c87d){const _0x2beb21=a165_0x5a68,_0x105e8a=_0x1c323e();while(!![]){try{const _0x206a21=-parseInt(_0x2beb21(0x69))/0x1*(parseInt(_0x2beb21(0x73))/0x2)+parseInt(_0x2beb21(0x72))/0x3*(-parseInt(_0x2beb21(0x6b))/0x4)+-parseInt(_0x2beb21(0x6d))/0x5*(-parseInt(_0x2beb21(0x71))/0x6)+parseInt(_0x2beb21(0x75))/0x7*(-parseInt(_0x2beb21(0x70))/0x8)+parseInt(_0x2beb21(0x67))/0x9*(-parseInt(_0x2beb21(0x65))/0xa)+-parseInt(_0x2beb21(0x66))/0xb+parseInt(_0x2beb21(0x68))/0xc*(parseInt(_0x2beb21(0x6e))/0xd);if(_0x206a21===_0x23c87d)break;else _0x105e8a['push'](_0x105e8a['shift']());}catch(_0x17a1f2){_0x105e8a['push'](_0x105e8a['shift']());}}}(a165_0x1f5d,0x8a399));import{CliErrors}from'../../errors.js';function a165_0x1f5d(){const _0x25f177=['13bNeLUL','push','13672xzbxks','66dKUzjQ','4815RvuuwO','1306586EpcGDk','length','2506USpBvZ','includes','company','2157730piNtaX','5322658LTwJOm','27WUuIhZ','22792164mHSQhP','1DDaqZl','validation','68nwnaUM','personal','495645fpKuew'];a165_0x1f5d=function(){return _0x25f177;};return a165_0x1f5d();}export function normalizeRuntimeSkillScopes(_0x112489){const _0x214a2e=a165_0x5a68,_0x73802d=_0x112489&&_0x112489[_0x214a2e(0x74)]>0x0?_0x112489:[_0x214a2e(0x6c),'company','builtin'],_0x526199=[];for(const _0x532f70 of _0x73802d){if(!isRuntimeSkillScope(_0x532f70))throw CliErrors[_0x214a2e(0x6a)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x532f70);!_0x526199[_0x214a2e(0x76)](_0x532f70)&&_0x526199[_0x214a2e(0x6f)](_0x532f70);}return _0x526199;}function a165_0x5a68(_0x343ecd,_0x4393fb){_0x343ecd=_0x343ecd-0x64;const _0x1f5dbd=a165_0x1f5d();let _0x5a68d2=_0x1f5dbd[_0x343ecd];return _0x5a68d2;}export function isRuntimeSkillScope(_0x152545){const _0x5b2cef=a165_0x5a68;return _0x152545===_0x5b2cef(0x6c)||_0x152545===_0x5b2cef(0x64)||_0x152545==='builtin';}
@@ -1 +1 @@
1
- const a167_0x302c8d=a167_0xd621;function a167_0x19e4(){const _0x2806b8=['40PobeZA','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','10870580NkVzcE','validation','1980-01-01T00:00:00.000Z','endsWith','4YHwrkW','1665189cgmDmh','1345122HqOReE','10GqaONn','2001465lYyGOX','from','1279358NqoNaQ','length','1306559cIYsYa','validation_error','8535387PThsXZ','sort','name','code','path','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','object'];a167_0x19e4=function(){return _0x2806b8;};return a167_0x19e4();}(function(_0x1f769e,_0x20bf8b){const _0x2e212e=a167_0xd621,_0x2e621e=_0x1f769e();while(!![]){try{const _0x31e399=parseInt(_0x2e212e(0x14a))/0x1+-parseInt(_0x2e212e(0x148))/0x2+-parseInt(_0x2e212e(0x143))/0x3*(-parseInt(_0x2e212e(0x142))/0x4)+-parseInt(_0x2e212e(0x145))/0x5*(-parseInt(_0x2e212e(0x144))/0x6)+parseInt(_0x2e212e(0x14c))/0x7+-parseInt(_0x2e212e(0x13c))/0x8*(parseInt(_0x2e212e(0x146))/0x9)+-parseInt(_0x2e212e(0x13e))/0xa;if(_0x31e399===_0x20bf8b)break;else _0x2e621e['push'](_0x2e621e['shift']());}catch(_0x3cdded){_0x2e621e['push'](_0x2e621e['shift']());}}}(a167_0x19e4,0xa89f3));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a167_0xd621(_0x3a3966,_0x58e75f){_0x3a3966=_0x3a3966-0x13a;const _0x19e43b=a167_0x19e4();let _0xd621af=_0x19e43b[_0x3a3966];return _0xd621af;}const ZIP_MTIME=new Date(a167_0x302c8d(0x140));export function createDeterministicZipPackage(_0x3eab23){const _0x3bf0fd=a167_0x302c8d,_0x5d258c={};for(const _0x240188 of normalizeLocalFiles(_0x3eab23)){_0x5d258c[_0x240188[_0x3bf0fd(0x150)]]=fileContent(_0x240188);}return Buffer[_0x3bf0fd(0x147)](zipSync(_0x5d258c,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x5f40ff){const _0x315fb1=a167_0x302c8d;if(_0x5f40ff[_0x315fb1(0x149)]<0x16)throw CliErrors[_0x315fb1(0x13f)](_0x315fb1(0x13d));let _0x3b49e2;try{_0x3b49e2=unzipSync(_0x5f40ff,{'filter'(_0x4aa0bc){const _0x55d14b=_0x315fb1,_0x2c448b=normalizeSkillRelativePath(_0x4aa0bc[_0x55d14b(0x14e)]);if(_0x2c448b[_0x55d14b(0x141)]('/'))throw CliErrors[_0x55d14b(0x13f)](_0x55d14b(0x13a)+_0x2c448b);return!![];}});}catch(_0x51a307){if(isRuntimeSkillValidationError(_0x51a307))throw _0x51a307;throw CliErrors[_0x315fb1(0x13f)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x315fb1(0x151)](_0x3b49e2)['map'](([_0x56f04d,_0x1e131b])=>({'path':normalizeSkillRelativePath(_0x56f04d),'bytes':Buffer[_0x315fb1(0x147)](_0x1e131b)}))[_0x315fb1(0x14d)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x4dde06){const _0x5812fc=a167_0x302c8d;return typeof _0x4dde06===_0x5812fc(0x13b)&&_0x4dde06!==null&&'code'in _0x4dde06&&_0x4dde06[_0x5812fc(0x14f)]===_0x5812fc(0x14b);}
1
+ const a167_0x189c27=a167_0x1f34;function a167_0x2879(){const _0x3f80de=['entries','760566utGwAp','4914872TNAuuU','validation','35JyKfnL','896826gcvaJM','validation_error','path','from','3281935vttxZB','name','endsWith','175618hxqeMd','17731328sLifbf','object','sort','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','code','1980-01-01T00:00:00.000Z','map','652884cxyGBk'];a167_0x2879=function(){return _0x3f80de;};return a167_0x2879();}(function(_0x6d8a07,_0xd33dee){const _0x1b08c0=a167_0x1f34,_0xf1c4a=_0x6d8a07();while(!![]){try{const _0x385c3c=parseInt(_0x1b08c0(0x1e4))/0x1+parseInt(_0x1b08c0(0x1dc))/0x2+parseInt(_0x1b08c0(0x1ea))/0x3+-parseInt(_0x1b08c0(0x1e7))/0x4+-parseInt(_0x1b08c0(0x1ee))/0x5+-parseInt(_0x1b08c0(0x1e6))/0x6*(parseInt(_0x1b08c0(0x1e9))/0x7)+parseInt(_0x1b08c0(0x1dd))/0x8;if(_0x385c3c===_0xd33dee)break;else _0xf1c4a['push'](_0xf1c4a['shift']());}catch(_0x1a9722){_0xf1c4a['push'](_0xf1c4a['shift']());}}}(a167_0x2879,0xb3f75));function a167_0x1f34(_0x46a783,_0x1baab3){_0x46a783=_0x46a783-0x1dc;const _0x2879ab=a167_0x2879();let _0x1f3473=_0x2879ab[_0x46a783];return _0x1f3473;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a167_0x189c27(0x1e2));export function createDeterministicZipPackage(_0x5b1ed4){const _0x22e810=a167_0x189c27,_0x29478e={};for(const _0x5160d3 of normalizeLocalFiles(_0x5b1ed4)){_0x29478e[_0x5160d3[_0x22e810(0x1ec)]]=fileContent(_0x5160d3);}return Buffer[_0x22e810(0x1ed)](zipSync(_0x29478e,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x587d24){const _0x2b4f76=a167_0x189c27;if(_0x587d24['length']<0x16)throw CliErrors[_0x2b4f76(0x1e8)](_0x2b4f76(0x1e0));let _0x3d5431;try{_0x3d5431=unzipSync(_0x587d24,{'filter'(_0x4cd7bc){const _0xc9ac43=_0x2b4f76,_0xb47461=normalizeSkillRelativePath(_0x4cd7bc[_0xc9ac43(0x1ef)]);if(_0xb47461[_0xc9ac43(0x1f0)]('/'))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0xb47461);return!![];}});}catch(_0x396b1c){if(isRuntimeSkillValidationError(_0x396b1c))throw _0x396b1c;throw CliErrors[_0x2b4f76(0x1e8)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x2b4f76(0x1e5)](_0x3d5431)[_0x2b4f76(0x1e3)](([_0x2354be,_0x51b568])=>({'path':normalizeSkillRelativePath(_0x2354be),'bytes':Buffer[_0x2b4f76(0x1ed)](_0x51b568)}))[_0x2b4f76(0x1df)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x40a970){const _0xc62281=a167_0x189c27;return typeof _0x40a970===_0xc62281(0x1de)&&_0x40a970!==null&&_0xc62281(0x1e1)in _0x40a970&&_0x40a970['code']===_0xc62281(0x1eb);}
@@ -1 +1 @@
1
- (function(_0x1919ed,_0x3c75a6){const _0xdf18f5=a168_0x4f1f,_0xa479d9=_0x1919ed();while(!![]){try{const _0x3b79d4=-parseInt(_0xdf18f5(0x16d))/0x1*(-parseInt(_0xdf18f5(0x16b))/0x2)+-parseInt(_0xdf18f5(0x149))/0x3+-parseInt(_0xdf18f5(0x177))/0x4*(-parseInt(_0xdf18f5(0x14d))/0x5)+-parseInt(_0xdf18f5(0x16c))/0x6+parseInt(_0xdf18f5(0x160))/0x7+parseInt(_0xdf18f5(0x163))/0x8*(-parseInt(_0xdf18f5(0x154))/0x9)+-parseInt(_0xdf18f5(0x15e))/0xa*(-parseInt(_0xdf18f5(0x147))/0xb);if(_0x3b79d4===_0x3c75a6)break;else _0xa479d9['push'](_0xa479d9['shift']());}catch(_0xecdb0b){_0xa479d9['push'](_0xa479d9['shift']());}}}(a168_0x379e,0xa1db1));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x47e41e){const _0x319ecf=a168_0x4f1f,_0x1181a9=normalizeLocalFiles(_0x47e41e);if(!_0x1181a9[_0x319ecf(0x14b)](_0x241845=>_0x241845['path']===SKILL_FILE))throw CliErrors['validation'](_0x319ecf(0x14a)+SKILL_FILE+_0x319ecf(0x158));const _0x4b46d9=localFilesToManifestFiles(_0x1181a9),_0x446cb0=createDeterministicZipPackage(_0x1181a9);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x4b46d9),'zipSha256':bufferSha256(_0x446cb0),'zipSize':_0x446cb0[_0x319ecf(0x156)],'files':_0x4b46d9},'packageBytes':_0x446cb0,'packageBase64':_0x446cb0[_0x319ecf(0x14c)](_0x319ecf(0x15c))};}export function verifyRuntimeSkillPackage(_0x47e7a5,_0x460405){const _0x1197ea=a168_0x4f1f,_0x14df3f=normalizePackageManifest(_0x47e7a5,{'requireOssPath':![]});if(!_0x14df3f)throw CliErrors['validation'](_0x1197ea(0x175));return extractAndVerifyPackage(_0x14df3f,_0x460405);}export function verifyRuntimeSkillBundle(_0x57e608,_0x5e6d53){const _0x8abb01=normalizePackageManifest(_0x57e608,{'requireOssPath':![]});if(!_0x8abb01)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x8abb01,_0x5e6d53);}export function tryNormalizePackageManifest(_0xe01257){return normalizePackageManifest(_0xe01257,{'requireOssPath':![]});}export function requirePackageBytes(_0x14cf92,_0x39a8f5){const _0x24cfc6=a168_0x4f1f;if(!_0x39a8f5||_0x39a8f5[_0x24cfc6(0x156)]===0x0)throw CliErrors[_0x24cfc6(0x168)](_0x24cfc6(0x169)+_0x14cf92);return _0x39a8f5;}function a168_0x379e(){const _0x3ba22e=['requireOssPath','1011132KpgRPh','Missing\x20','some','toString','1025XYSKIS','sha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','files','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','18FXtJOR','treeSha256','length','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','\x20in\x20Skill\x20file\x20package.','set','push','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','base64','zipSize','50XWlzEB','map','1755887zrhxtY','schemaVersion','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','1452296vaKJZP','get','Runtime\x20Skill\x20package\x20size\x20mismatch.','trim','ossPath','validation','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','toLowerCase','335618fupFRE','630360dFjMqs','2XnwkXC','zipSha256','path','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','bytes','isSafeInteger','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','size','6212JpHwkC','string','1239293aOgUPu'];a168_0x379e=function(){return _0x3ba22e;};return a168_0x379e();}export function extractDownloadedPackage(_0x4627ee){const _0x3adf65=a168_0x4f1f,_0x20d396=parseZipPackage(_0x4627ee)[_0x3adf65(0x15f)](_0x286fb3=>({'path':_0x286fb3[_0x3adf65(0x16f)],'bytes':_0x286fb3[_0x3adf65(0x172)]}));if(!_0x20d396[_0x3adf65(0x14b)](_0x5eb620=>_0x5eb620[_0x3adf65(0x16f)]===SKILL_FILE))throw CliErrors[_0x3adf65(0x168)](_0x3adf65(0x151)+SKILL_FILE+'.');return normalizeLocalFiles(_0x20d396);}export function localFilesToManifestFiles(_0x363343){const _0xb146fb=a168_0x4f1f;return normalizeLocalFiles(_0x363343)['map'](_0x53f058=>({'path':_0x53f058[_0xb146fb(0x16f)],'sha256':fileHash(_0x53f058),'size':fileContent(_0x53f058)['length']}));}function normalizePackageManifest(_0x2ff598,_0x589c79){const _0x166c58=a168_0x4f1f;if(!_0x2ff598||typeof _0x2ff598!=='object'||Array['isArray'](_0x2ff598))return undefined;const _0x160fa4=_0x2ff598,_0x5c0ff2=typeof _0x160fa4[_0x166c58(0x167)]===_0x166c58(0x178)?_0x160fa4[_0x166c58(0x167)][_0x166c58(0x166)]():undefined;if(_0x589c79[_0x166c58(0x148)]&&!_0x5c0ff2)return undefined;if(!Array['isArray'](_0x160fa4[_0x166c58(0x152)])||_0x160fa4[_0x166c58(0x152)][_0x166c58(0x156)]===0x0)return undefined;if(!isSha256Hex(_0x160fa4[_0x166c58(0x155)]))throw CliErrors['validation'](_0x166c58(0x14f));if(!isSha256Hex(_0x160fa4[_0x166c58(0x16e)]))throw CliErrors[_0x166c58(0x168)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x166c58(0x173)](_0x160fa4[_0x166c58(0x15d)])||_0x160fa4[_0x166c58(0x15d)]<0x0)throw CliErrors[_0x166c58(0x168)](_0x166c58(0x162));const _0x3a77c0=normalizeManifestFiles(_0x160fa4[_0x166c58(0x152)]);if(!_0x3a77c0[_0x166c58(0x14b)](_0xe5ab3b=>_0xe5ab3b[_0x166c58(0x16f)]===SKILL_FILE))throw CliErrors['validation'](_0x166c58(0x170)+SKILL_FILE+'.');const _0x3470f7=fileTreeHash(_0x3a77c0);if(_0x3470f7!==_0x160fa4[_0x166c58(0x155)][_0x166c58(0x16a)]())throw CliErrors[_0x166c58(0x168)](_0x166c58(0x157));return{'schemaVersion':Number[_0x166c58(0x173)](_0x160fa4[_0x166c58(0x161)])?_0x160fa4[_0x166c58(0x161)]:0x2,'ossPath':_0x5c0ff2,'treeSha256':_0x3470f7,'zipSha256':_0x160fa4[_0x166c58(0x16e)][_0x166c58(0x16a)](),'zipSize':_0x160fa4[_0x166c58(0x15d)],'files':_0x3a77c0};}function extractAndVerifyPackage(_0x55ed8d,_0x173bf5){const _0x586038=a168_0x4f1f,_0x14c05b=normalizePackageManifest(_0x55ed8d,{'requireOssPath':![]});if(!_0x14c05b)throw CliErrors[_0x586038(0x168)](_0x586038(0x175));if(_0x173bf5[_0x586038(0x156)]!==_0x14c05b[_0x586038(0x15d)])throw CliErrors[_0x586038(0x168)](_0x586038(0x165));const _0x44e4ac=bufferSha256(_0x173bf5);if(_0x44e4ac!==_0x14c05b[_0x586038(0x16e)])throw CliErrors[_0x586038(0x168)](_0x586038(0x171));return extractAndVerifyPackageFiles(_0x14c05b,_0x173bf5);}function a168_0x4f1f(_0x39ac96,_0x59b9be){_0x39ac96=_0x39ac96-0x147;const _0x379e32=a168_0x379e();let _0x4f1f8b=_0x379e32[_0x39ac96];return _0x4f1f8b;}function extractAndVerifyPackageFiles(_0x584bb5,_0x205c0d){const _0x1141f5=a168_0x4f1f,_0x267105=parseZipPackage(_0x205c0d);if(_0x267105[_0x1141f5(0x156)]!==_0x584bb5['files']['length'])throw CliErrors[_0x1141f5(0x168)](_0x1141f5(0x153));const _0x5ca6fc=new Map();for(const _0x40585a of _0x267105){if(_0x5ca6fc['has'](_0x40585a[_0x1141f5(0x16f)]))throw CliErrors['validation'](_0x1141f5(0x150)+_0x40585a['path']);_0x5ca6fc[_0x1141f5(0x159)](_0x40585a['path'],_0x40585a);}const _0x74a091=[];for(const _0x89f82d of _0x584bb5[_0x1141f5(0x152)]){const _0x35a39e=_0x5ca6fc[_0x1141f5(0x164)](_0x89f82d[_0x1141f5(0x16f)]);if(!_0x35a39e)throw CliErrors[_0x1141f5(0x168)](_0x1141f5(0x15b)+_0x89f82d[_0x1141f5(0x16f)]);if(_0x35a39e['bytes'][_0x1141f5(0x156)]!==_0x89f82d[_0x1141f5(0x176)])throw CliErrors[_0x1141f5(0x168)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x89f82d['path']);const _0x385f31=bufferSha256(_0x35a39e['bytes']);if(_0x385f31!==_0x89f82d[_0x1141f5(0x14e)])throw CliErrors['validation'](_0x1141f5(0x174)+_0x89f82d[_0x1141f5(0x16f)]);_0x74a091[_0x1141f5(0x15a)]({'path':_0x89f82d[_0x1141f5(0x16f)],'bytes':_0x35a39e['bytes']});}return normalizeLocalFiles(_0x74a091);}
1
+ (function(_0xe6047f,_0x308cea){const _0xea670c=a168_0x24c5,_0x185527=_0xe6047f();while(!![]){try{const _0xac9065=-parseInt(_0xea670c(0xe9))/0x1*(parseInt(_0xea670c(0xe8))/0x2)+-parseInt(_0xea670c(0xec))/0x3*(-parseInt(_0xea670c(0xd8))/0x4)+parseInt(_0xea670c(0xfd))/0x5*(parseInt(_0xea670c(0xfe))/0x6)+parseInt(_0xea670c(0xe2))/0x7*(-parseInt(_0xea670c(0xf4))/0x8)+parseInt(_0xea670c(0xe1))/0x9*(parseInt(_0xea670c(0xee))/0xa)+parseInt(_0xea670c(0xfa))/0xb+-parseInt(_0xea670c(0xeb))/0xc;if(_0xac9065===_0x308cea)break;else _0x185527['push'](_0x185527['shift']());}catch(_0x251065){_0x185527['push'](_0x185527['shift']());}}}(a168_0x494b,0x1b3be));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a168_0x24c5(_0x23d599,_0x5465c4){_0x23d599=_0x23d599-0xd4;const _0x494b3a=a168_0x494b();let _0x24c567=_0x494b3a[_0x23d599];return _0x24c567;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x37e16b){const _0x253db1=a168_0x24c5,_0x1fa865=normalizeLocalFiles(_0x37e16b);if(!_0x1fa865[_0x253db1(0xed)](_0x4b09e4=>_0x4b09e4['path']===SKILL_FILE))throw CliErrors[_0x253db1(0x100)](_0x253db1(0xf1)+SKILL_FILE+_0x253db1(0xd9));const _0x152c82=localFilesToManifestFiles(_0x1fa865),_0x2ed64d=createDeterministicZipPackage(_0x1fa865);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x152c82),'zipSha256':bufferSha256(_0x2ed64d),'zipSize':_0x2ed64d[_0x253db1(0x101)],'files':_0x152c82},'packageBytes':_0x2ed64d,'packageBase64':_0x2ed64d['toString'](_0x253db1(0xfb))};}export function verifyRuntimeSkillPackage(_0x1548a0,_0x4261c6){const _0x39fee8=a168_0x24c5,_0x3b4926=normalizePackageManifest(_0x1548a0,{'requireOssPath':![]});if(!_0x3b4926)throw CliErrors['validation'](_0x39fee8(0xf7));return extractAndVerifyPackage(_0x3b4926,_0x4261c6);}function a168_0x494b(){const _0x5c6eb1=['Runtime\x20Skill\x20manifest\x20is\x20missing\x20','validation','length','sha256','schemaVersion','map','treeSha256','zipSize','4QOdZLS','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','get','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','set','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','793017yITbDC','155708eoPjpJ','string','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','2862dExWxx','71awuuNe','object','708264RRuRHr','101478KTXpgV','some','10bqAfJW','isSafeInteger','push','Missing\x20','ossPath','zipSha256','8xpToiN','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','path','files','700887VdOiJc','base64','bytes','5BOTmrl','652566JzqJuy'];a168_0x494b=function(){return _0x5c6eb1;};return a168_0x494b();}export function verifyRuntimeSkillBundle(_0x660632,_0x46603d){const _0x85b3fe=a168_0x24c5,_0x2dcb0e=normalizePackageManifest(_0x660632,{'requireOssPath':![]});if(!_0x2dcb0e)throw CliErrors[_0x85b3fe(0x100)](_0x85b3fe(0xf7));return extractAndVerifyPackageFiles(_0x2dcb0e,_0x46603d);}export function tryNormalizePackageManifest(_0x3ac976){return normalizePackageManifest(_0x3ac976,{'requireOssPath':![]});}export function requirePackageBytes(_0xd7a4af,_0x3173d8){const _0x206330=a168_0x24c5;if(!_0x3173d8||_0x3173d8[_0x206330(0x101)]===0x0)throw CliErrors[_0x206330(0x100)](_0x206330(0xda)+_0xd7a4af);return _0x3173d8;}export function extractDownloadedPackage(_0x217e1a){const _0x56cbc0=a168_0x24c5,_0x2efa04=parseZipPackage(_0x217e1a)[_0x56cbc0(0xd5)](_0x55cc1e=>({'path':_0x55cc1e['path'],'bytes':_0x55cc1e[_0x56cbc0(0xfc)]}));if(!_0x2efa04[_0x56cbc0(0xed)](_0x1c9a1f=>_0x1c9a1f[_0x56cbc0(0xf8)]===SKILL_FILE))throw CliErrors[_0x56cbc0(0x100)](_0x56cbc0(0xde)+SKILL_FILE+'.');return normalizeLocalFiles(_0x2efa04);}export function localFilesToManifestFiles(_0x7b0db2){const _0x43be81=a168_0x24c5;return normalizeLocalFiles(_0x7b0db2)[_0x43be81(0xd5)](_0x51d6d8=>({'path':_0x51d6d8[_0x43be81(0xf8)],'sha256':fileHash(_0x51d6d8),'size':fileContent(_0x51d6d8)[_0x43be81(0x101)]}));}function normalizePackageManifest(_0x36a9d,_0x1e95cf){const _0x5f2fe7=a168_0x24c5;if(!_0x36a9d||typeof _0x36a9d!==_0x5f2fe7(0xea)||Array['isArray'](_0x36a9d))return undefined;const _0x4fcae8=_0x36a9d,_0x1fb302=typeof _0x4fcae8['ossPath']===_0x5f2fe7(0xe3)?_0x4fcae8[_0x5f2fe7(0xf2)]['trim']():undefined;if(_0x1e95cf['requireOssPath']&&!_0x1fb302)return undefined;if(!Array[_0x5f2fe7(0xe5)](_0x4fcae8[_0x5f2fe7(0xf9)])||_0x4fcae8[_0x5f2fe7(0xf9)]['length']===0x0)return undefined;if(!isSha256Hex(_0x4fcae8['treeSha256']))throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xe0));if(!isSha256Hex(_0x4fcae8[_0x5f2fe7(0xf3)]))throw CliErrors[_0x5f2fe7(0x100)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x5f2fe7(0xef)](_0x4fcae8[_0x5f2fe7(0xd7)])||_0x4fcae8[_0x5f2fe7(0xd7)]<0x0)throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xf5));const _0x1a9d35=normalizeManifestFiles(_0x4fcae8[_0x5f2fe7(0xf9)]);if(!_0x1a9d35[_0x5f2fe7(0xed)](_0x5a8f81=>_0x5a8f81[_0x5f2fe7(0xf8)]===SKILL_FILE))throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xff)+SKILL_FILE+'.');const _0x566d21=fileTreeHash(_0x1a9d35);if(_0x566d21!==_0x4fcae8[_0x5f2fe7(0xd6)]['toLowerCase']())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x5f2fe7(0xef)](_0x4fcae8[_0x5f2fe7(0xd4)])?_0x4fcae8[_0x5f2fe7(0xd4)]:0x2,'ossPath':_0x1fb302,'treeSha256':_0x566d21,'zipSha256':_0x4fcae8[_0x5f2fe7(0xf3)]['toLowerCase'](),'zipSize':_0x4fcae8[_0x5f2fe7(0xd7)],'files':_0x1a9d35};}function extractAndVerifyPackage(_0x181f2d,_0x76585c){const _0x4a5745=a168_0x24c5,_0x5b0e42=normalizePackageManifest(_0x181f2d,{'requireOssPath':![]});if(!_0x5b0e42)throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xf7));if(_0x76585c[_0x4a5745(0x101)]!==_0x5b0e42['zipSize'])throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xdf));const _0x4e5411=bufferSha256(_0x76585c);if(_0x4e5411!==_0x5b0e42['zipSha256'])throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xe4));return extractAndVerifyPackageFiles(_0x5b0e42,_0x76585c);}function extractAndVerifyPackageFiles(_0xba5464,_0x18ba75){const _0x41ee82=a168_0x24c5,_0x4291ab=parseZipPackage(_0x18ba75);if(_0x4291ab[_0x41ee82(0x101)]!==_0xba5464['files'][_0x41ee82(0x101)])throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xdc));const _0x3056b6=new Map();for(const _0x35a4d2 of _0x4291ab){if(_0x3056b6['has'](_0x35a4d2[_0x41ee82(0xf8)]))throw CliErrors['validation'](_0x41ee82(0xf6)+_0x35a4d2['path']);_0x3056b6[_0x41ee82(0xdd)](_0x35a4d2[_0x41ee82(0xf8)],_0x35a4d2);}const _0x112622=[];for(const _0x2919d9 of _0xba5464['files']){const _0x455e9f=_0x3056b6[_0x41ee82(0xdb)](_0x2919d9[_0x41ee82(0xf8)]);if(!_0x455e9f)throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xe6)+_0x2919d9[_0x41ee82(0xf8)]);if(_0x455e9f[_0x41ee82(0xfc)][_0x41ee82(0x101)]!==_0x2919d9['size'])throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xe7)+_0x2919d9[_0x41ee82(0xf8)]);const _0x1b3725=bufferSha256(_0x455e9f[_0x41ee82(0xfc)]);if(_0x1b3725!==_0x2919d9[_0x41ee82(0x102)])throw CliErrors[_0x41ee82(0x100)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x2919d9[_0x41ee82(0xf8)]);_0x112622[_0x41ee82(0xf0)]({'path':_0x2919d9['path'],'bytes':_0x455e9f[_0x41ee82(0xfc)]});}return normalizeLocalFiles(_0x112622);}
@@ -1 +1 @@
1
- (function(_0x40f0b7,_0x194853){var _0x506935=a169_0x5442,_0x59bbc5=_0x40f0b7();while(!![]){try{var _0x373fb9=-parseInt(_0x506935(0x161))/0x1+-parseInt(_0x506935(0x164))/0x2+-parseInt(_0x506935(0x162))/0x3*(parseInt(_0x506935(0x167))/0x4)+-parseInt(_0x506935(0x168))/0x5*(parseInt(_0x506935(0x166))/0x6)+-parseInt(_0x506935(0x16a))/0x7*(-parseInt(_0x506935(0x163))/0x8)+parseInt(_0x506935(0x160))/0x9*(parseInt(_0x506935(0x15f))/0xa)+-parseInt(_0x506935(0x165))/0xb*(-parseInt(_0x506935(0x169))/0xc);if(_0x373fb9===_0x194853)break;else _0x59bbc5['push'](_0x59bbc5['shift']());}catch(_0x5a6161){_0x59bbc5['push'](_0x59bbc5['shift']());}}}(a169_0x5143,0x4e536));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a169_0x5442(_0x3c0b42,_0x330036){_0x3c0b42=_0x3c0b42-0x15f;var _0x5143ae=a169_0x5143();var _0x5442f4=_0x5143ae[_0x3c0b42];return _0x5442f4;}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a169_0x5143(){var _0x4be036=['7hfaARA','1842170RoTkEZ','9wLjHpE','208270SaokTP','20466WoMnkl','78248WDhoie','506916CAPfcD','1177hHfAty','30OhqOnB','220APOEqr','334255OlwBKP','145572RRLAKY'];a169_0x5143=function(){return _0x4be036;};return a169_0x5143();}
1
+ (function(_0x5f4881,_0x118824){var _0x2c73fa=a169_0x3fa8,_0x1e3404=_0x5f4881();while(!![]){try{var _0x1ef70c=-parseInt(_0x2c73fa(0xe2))/0x1+-parseInt(_0x2c73fa(0xdc))/0x2+parseInt(_0x2c73fa(0xde))/0x3+parseInt(_0x2c73fa(0xdf))/0x4+parseInt(_0x2c73fa(0xe0))/0x5*(-parseInt(_0x2c73fa(0xe1))/0x6)+parseInt(_0x2c73fa(0xdd))/0x7*(parseInt(_0x2c73fa(0xdb))/0x8)+-parseInt(_0x2c73fa(0xda))/0x9;if(_0x1ef70c===_0x118824)break;else _0x1e3404['push'](_0x1e3404['shift']());}catch(_0x4b4697){_0x1e3404['push'](_0x1e3404['shift']());}}}(a169_0x2087,0x94b90));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a169_0x3fa8(_0x4e6813,_0x1f96cd){_0x4e6813=_0x4e6813-0xda;var _0x208710=a169_0x2087();var _0x3fa82d=_0x208710[_0x4e6813];return _0x3fa82d;}export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';function a169_0x2087(){var _0x2d7358=['1252044ByVzAj','255425OPSdps','1932102WScgQk','7648424ofCDML','1566432JuEmGB','7MBmCQV','992661VidsNI','4806276jgfRGP','15dpKmTe'];a169_0x2087=function(){return _0x2d7358;};return a169_0x2087();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- const a170_0x5f5b1b=a170_0x241c;(function(_0x401b46,_0x1e3f16){const _0x29fe49=a170_0x241c,_0xc1d40=_0x401b46();while(!![]){try{const _0x1bcded=parseInt(_0x29fe49(0x1b4))/0x1+-parseInt(_0x29fe49(0x1ba))/0x2+-parseInt(_0x29fe49(0x1ce))/0x3+-parseInt(_0x29fe49(0x1cc))/0x4*(-parseInt(_0x29fe49(0x1bc))/0x5)+-parseInt(_0x29fe49(0x1be))/0x6*(parseInt(_0x29fe49(0x1c2))/0x7)+-parseInt(_0x29fe49(0x1c5))/0x8+parseInt(_0x29fe49(0x1b6))/0x9*(parseInt(_0x29fe49(0x1d2))/0xa);if(_0x1bcded===_0x1e3f16)break;else _0xc1d40['push'](_0xc1d40['shift']());}catch(_0x487f56){_0xc1d40['push'](_0xc1d40['shift']());}}}(a170_0x20b5,0x59cc7));function a170_0x241c(_0x1ce7bd,_0x4b831b){_0x1ce7bd=_0x1ce7bd-0x1b1;const _0x20b5b1=a170_0x20b5();let _0x241c5b=_0x20b5b1[_0x1ce7bd];return _0x241c5b;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a170_0x5f5b1b(0x1bd),'.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a170_0x5f5b1b(0x1bd),a170_0x5f5b1b(0x1d1)),join(a170_0x5f5b1b(0x1b9),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function a170_0x20b5(){const _0x2564d5=['unverifiable','1572615gZqJne','absent','\x20has\x20no\x20skills\x20map','skills','10BRIwfg','\x20uses\x20unsupported\x20version\x20','number','kind','reason','version','491865vEumRW','present','16527933oIjjvI','lockFile','not-recorded','.claude','1414502snZMpB','home','2143885FUBPQq','.agents','2088BUhIGY','includes','find','object','12033PMYLzB','SKILL.md','recorded','4476768XeMNrL','join','\x20records\x20\x22','map','parse','unusable','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','4TKgSvD'];a170_0x20b5=function(){return _0x2564d5;};return a170_0x20b5();}function readLockLookup(_0x45c02f,_0x2cb6d5){const _0x355d4a=a170_0x5f5b1b;if(!existsSync(_0x45c02f))return{'kind':_0x355d4a(0x1b8)};let _0x402f8e;try{_0x402f8e=JSON[_0x355d4a(0x1c9)](readFileSync(_0x45c02f,'utf8'));}catch(_0xe83b44){return{'kind':_0x355d4a(0x1ca),'reason':_0x45c02f+'\x20is\x20unreadable:\x20'+_0xe83b44['message']};}const _0x4071a8=_0x402f8e;if(typeof _0x4071a8?.[_0x355d4a(0x1b3)]!==_0x355d4a(0x1d4)||!SUPPORTED_LOCK_VERSIONS[_0x355d4a(0x1bf)](_0x4071a8[_0x355d4a(0x1b3)]))return{'kind':_0x355d4a(0x1ca),'reason':_0x45c02f+_0x355d4a(0x1d3)+String(_0x4071a8?.[_0x355d4a(0x1b3)])};if(!_0x4071a8['skills']||typeof _0x4071a8[_0x355d4a(0x1d1)]!==_0x355d4a(0x1c1))return{'kind':_0x355d4a(0x1ca),'reason':_0x45c02f+_0x355d4a(0x1d0)};return _0x4071a8[_0x355d4a(0x1d1)][_0x2cb6d5]?{'kind':'recorded'}:{'kind':_0x355d4a(0x1b8)};}export function resolveInstalledSkill(_0x38a308,_0x126569){const _0x3d00fb=a170_0x5f5b1b,_0x3b330c=_0x126569?.[_0x3d00fb(0x1bb)]??homedir(),_0x3d90c6=_0x126569?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x372e2b=>join(_0x3b330c,_0x372e2b)),_0x1b6ced=_0x126569?.[_0x3d00fb(0x1b7)]??join(_0x3b330c,SKILL_LOCK_RELATIVE_PATH),_0x582f8f=_0x3d90c6[_0x3d00fb(0x1c8)](_0x27a24e=>join(_0x27a24e,_0x38a308,_0x3d00fb(0x1c3))),_0xd7e264=_0x582f8f[_0x3d00fb(0x1c0)](_0x14309a=>existsSync(_0x14309a));if(_0xd7e264)return{'state':_0x3d00fb(0x1b5),'path':_0xd7e264};const _0x56bab9=readLockLookup(_0x1b6ced,_0x38a308);if(_0x56bab9[_0x3d00fb(0x1b1)]===_0x3d00fb(0x1ca))return{'state':_0x3d00fb(0x1cd),'reason':_0x56bab9[_0x3d00fb(0x1b2)]};if(_0x56bab9['kind']===_0x3d00fb(0x1c4))return{'state':_0x3d00fb(0x1cd),'reason':_0x1b6ced+_0x3d00fb(0x1c7)+_0x38a308+_0x3d00fb(0x1cb)+('('+_0x582f8f[_0x3d00fb(0x1c6)](',\x20')+')')};return{'state':_0x3d00fb(0x1cf),'checked':_0x582f8f};}
1
+ const a170_0x5edaac=a170_0x80f2;(function(_0x13917f,_0x24d971){const _0x353e8d=a170_0x80f2,_0x31667a=_0x13917f();while(!![]){try{const _0x5951f4=-parseInt(_0x353e8d(0x1ab))/0x1+parseInt(_0x353e8d(0x1a7))/0x2*(-parseInt(_0x353e8d(0x1bd))/0x3)+parseInt(_0x353e8d(0x1ad))/0x4+parseInt(_0x353e8d(0x1b8))/0x5+parseInt(_0x353e8d(0x1ac))/0x6+-parseInt(_0x353e8d(0x1b2))/0x7+-parseInt(_0x353e8d(0x1a4))/0x8;if(_0x5951f4===_0x24d971)break;else _0x31667a['push'](_0x31667a['shift']());}catch(_0x366d75){_0x31667a['push'](_0x31667a['shift']());}}}(a170_0x5665,0xb45eb));function a170_0x80f2(_0x5245b0,_0xfdbadd){_0x5245b0=_0x5245b0-0x1a0;const _0x56658a=a170_0x5665();let _0x80f270=_0x56658a[_0x5245b0];return _0x80f270;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a170_0x5665(){const _0xc7f7b1=['lockFile','13606408ubFVuu','.claude','parse','285256afNaqp','version','\x20is\x20unreadable:\x20','\x20records\x20\x22','337938xMulej','5778348BnGNin','2652604sGfceZ','.agents','utf8','reason','message','615475zCwFWy','home','\x20uses\x20unsupported\x20version\x20','absent','find','skills','6909390fCBIuX','recorded','includes','unusable','join','3sIGdjy','not-recorded','SKILL.md','unverifiable'];a170_0x5665=function(){return _0xc7f7b1;};return a170_0x5665();}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a170_0x5edaac(0x1ae),a170_0x5edaac(0x1b7)),join(a170_0x5edaac(0x1a5),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xfe8733,_0x345ef7){const _0x411a91=a170_0x5edaac;if(!existsSync(_0xfe8733))return{'kind':_0x411a91(0x1a0)};let _0xc12814;try{_0xc12814=JSON[_0x411a91(0x1a6)](readFileSync(_0xfe8733,_0x411a91(0x1af)));}catch(_0x463b7c){return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+_0x411a91(0x1a9)+_0x463b7c[_0x411a91(0x1b1)]};}const _0x59cf95=_0xc12814;if(typeof _0x59cf95?.[_0x411a91(0x1a8)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x411a91(0x1ba)](_0x59cf95['version']))return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+_0x411a91(0x1b4)+String(_0x59cf95?.['version'])};if(!_0x59cf95[_0x411a91(0x1b7)]||typeof _0x59cf95[_0x411a91(0x1b7)]!=='object')return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+'\x20has\x20no\x20skills\x20map'};return _0x59cf95[_0x411a91(0x1b7)][_0x345ef7]?{'kind':_0x411a91(0x1b9)}:{'kind':_0x411a91(0x1a0)};}export function resolveInstalledSkill(_0x215dcd,_0x56fbf2){const _0xdff341=a170_0x5edaac,_0x34aea7=_0x56fbf2?.[_0xdff341(0x1b3)]??homedir(),_0xc06b5e=_0x56fbf2?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x4315ed=>join(_0x34aea7,_0x4315ed)),_0x4a0627=_0x56fbf2?.[_0xdff341(0x1a3)]??join(_0x34aea7,SKILL_LOCK_RELATIVE_PATH),_0x458956=_0xc06b5e['map'](_0x1f8bed=>join(_0x1f8bed,_0x215dcd,_0xdff341(0x1a1))),_0x318463=_0x458956[_0xdff341(0x1b6)](_0x5db40b=>existsSync(_0x5db40b));if(_0x318463)return{'state':'present','path':_0x318463};const _0x25ac54=readLockLookup(_0x4a0627,_0x215dcd);if(_0x25ac54['kind']===_0xdff341(0x1bb))return{'state':_0xdff341(0x1a2),'reason':_0x25ac54[_0xdff341(0x1b0)]};if(_0x25ac54['kind']===_0xdff341(0x1b9))return{'state':'unverifiable','reason':_0x4a0627+_0xdff341(0x1aa)+_0x215dcd+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x458956[_0xdff341(0x1bc)](',\x20')+')')};return{'state':_0xdff341(0x1b5),'checked':_0x458956};}
@@ -1 +1 @@
1
- (function(_0x23ac36,_0x3f6c1a){const _0x3a88ee=a171_0x1bd0,_0x16127f=_0x23ac36();while(!![]){try{const _0x30c0fd=parseInt(_0x3a88ee(0x131))/0x1*(parseInt(_0x3a88ee(0x137))/0x2)+-parseInt(_0x3a88ee(0x135))/0x3*(-parseInt(_0x3a88ee(0x11f))/0x4)+parseInt(_0x3a88ee(0x12a))/0x5+-parseInt(_0x3a88ee(0x134))/0x6*(-parseInt(_0x3a88ee(0x124))/0x7)+parseInt(_0x3a88ee(0x130))/0x8*(parseInt(_0x3a88ee(0x123))/0x9)+parseInt(_0x3a88ee(0x128))/0xa*(-parseInt(_0x3a88ee(0x132))/0xb)+-parseInt(_0x3a88ee(0x120))/0xc;if(_0x30c0fd===_0x3f6c1a)break;else _0x16127f['push'](_0x16127f['shift']());}catch(_0x2a8519){_0x16127f['push'](_0x16127f['shift']());}}}(a171_0x203a,0x5507e));const REDACTED_ACCESS_KEY='<redacted>';function a171_0x203a(){const _0x5d20b4=['32473LaIHOb','length','test','map','342080dtUhGl','apps','1320695XrSsyV','call','isArray','entries','string','prototype','16GzUAMh','15749xSIcpQ','143yIjEMr','accessKey','102QGmJSs','57npdMFm','hasOwnProperty','58AWfefi','14732CEpBic','7336536neTYDH','slice','object','2406006VuhRlT'];a171_0x203a=function(){return _0x5d20b4;};return a171_0x203a();}export function maskCliAccessKey(_0x4bcc8d){const _0x40e654=a171_0x1bd0;if(typeof _0x4bcc8d!==_0x40e654(0x12e)||_0x4bcc8d[_0x40e654(0x125)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x4bcc8d[_0x40e654(0x121)](0x0,0x8)+'*'['repeat'](_0x4bcc8d[_0x40e654(0x125)]-0x8);}export function redactCliConfigCredentials(_0x363863){const _0x1c3d2f=a171_0x1bd0,_0x54fa21={..._0x363863};return Object[_0x1c3d2f(0x12f)]['hasOwnProperty'][_0x1c3d2f(0x12b)](_0x54fa21,_0x1c3d2f(0x133))&&(_0x54fa21[_0x1c3d2f(0x133)]=maskCliAccessKey(_0x54fa21[_0x1c3d2f(0x133)])),_0x54fa21[_0x1c3d2f(0x129)]&&typeof _0x54fa21['apps']==='object'&&!Array['isArray'](_0x54fa21[_0x1c3d2f(0x129)])&&(_0x54fa21[_0x1c3d2f(0x129)]=redactLegacyAppCredentials(_0x54fa21[_0x1c3d2f(0x129)])),_0x54fa21;}function a171_0x1bd0(_0x9475ce,_0x481d72){_0x9475ce=_0x9475ce-0x11f;const _0x203a5f=a171_0x203a();let _0x1bd075=_0x203a5f[_0x9475ce];return _0x1bd075;}export function redactCliConfigValue(_0x4d87c7,_0x50c5cb){const _0x5687ff=a171_0x1bd0;if(_0x4d87c7===_0x5687ff(0x133)||/^apps\.[^.]+\.accessKey$/['test'](_0x4d87c7))return maskCliAccessKey(_0x50c5cb);if(_0x4d87c7===_0x5687ff(0x129)&&_0x50c5cb&&typeof _0x50c5cb===_0x5687ff(0x122)&&!Array['isArray'](_0x50c5cb))return redactLegacyAppCredentials(_0x50c5cb);if(/^apps\.[^.]+$/[_0x5687ff(0x126)](_0x4d87c7)&&_0x50c5cb&&typeof _0x50c5cb===_0x5687ff(0x122)&&!Array[_0x5687ff(0x12c)](_0x50c5cb)){const _0x1707fd=_0x50c5cb;return Object[_0x5687ff(0x12f)]['hasOwnProperty'][_0x5687ff(0x12b)](_0x1707fd,_0x5687ff(0x133))?{..._0x1707fd,'accessKey':maskCliAccessKey(_0x1707fd[_0x5687ff(0x133)])}:_0x50c5cb;}return _0x50c5cb;}function redactLegacyAppCredentials(_0x2a1e06){const _0x14f905=a171_0x1bd0;return Object['fromEntries'](Object[_0x14f905(0x12d)](_0x2a1e06)[_0x14f905(0x127)](([_0x21b2f0,_0x5cd7cf])=>{const _0x40011a=_0x14f905;if(!_0x5cd7cf||typeof _0x5cd7cf!==_0x40011a(0x122)||Array[_0x40011a(0x12c)](_0x5cd7cf))return[_0x21b2f0,_0x5cd7cf];const _0x2617fc={..._0x5cd7cf};return Object[_0x40011a(0x12f)][_0x40011a(0x136)][_0x40011a(0x12b)](_0x2617fc,_0x40011a(0x133))&&(_0x2617fc['accessKey']=maskCliAccessKey(_0x2617fc[_0x40011a(0x133)])),[_0x21b2f0,_0x2617fc];}));}
1
+ const a171_0x1ec232=a171_0x23ff;function a171_0x23ff(_0x5f0720,_0x4382d4){_0x5f0720=_0x5f0720-0xf0;const _0x1deb7f=a171_0x1deb();let _0x23ff88=_0x1deb7f[_0x5f0720];return _0x23ff88;}(function(_0x441edb,_0x3cf8d0){const _0x3c8c2c=a171_0x23ff,_0x2256ad=_0x441edb();while(!![]){try{const _0x44caa9=parseInt(_0x3c8c2c(0x107))/0x1*(parseInt(_0x3c8c2c(0xf1))/0x2)+parseInt(_0x3c8c2c(0xf3))/0x3*(parseInt(_0x3c8c2c(0x102))/0x4)+parseInt(_0x3c8c2c(0xf8))/0x5*(parseInt(_0x3c8c2c(0xf0))/0x6)+parseInt(_0x3c8c2c(0x104))/0x7*(parseInt(_0x3c8c2c(0xfe))/0x8)+-parseInt(_0x3c8c2c(0xf4))/0x9+-parseInt(_0x3c8c2c(0xf9))/0xa+-parseInt(_0x3c8c2c(0xfb))/0xb;if(_0x44caa9===_0x3cf8d0)break;else _0x2256ad['push'](_0x2256ad['shift']());}catch(_0x5b85fc){_0x2256ad['push'](_0x2256ad['shift']());}}}(a171_0x1deb,0xacfcf));const REDACTED_ACCESS_KEY=a171_0x1ec232(0xfa);export function maskCliAccessKey(_0x195933){const _0x12af5a=a171_0x1ec232;if(typeof _0x195933!=='string'||_0x195933['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x195933[_0x12af5a(0xf7)](0x0,0x8)+'*'[_0x12af5a(0x105)](_0x195933[_0x12af5a(0x109)]-0x8);}export function redactCliConfigCredentials(_0x1fd452){const _0x362460=a171_0x1ec232,_0x53ad47={..._0x1fd452};return Object[_0x362460(0xf2)][_0x362460(0xfd)][_0x362460(0x108)](_0x53ad47,_0x362460(0x101))&&(_0x53ad47[_0x362460(0x101)]=maskCliAccessKey(_0x53ad47[_0x362460(0x101)])),_0x53ad47[_0x362460(0xfc)]&&typeof _0x53ad47[_0x362460(0xfc)]===_0x362460(0x100)&&!Array['isArray'](_0x53ad47[_0x362460(0xfc)])&&(_0x53ad47[_0x362460(0xfc)]=redactLegacyAppCredentials(_0x53ad47[_0x362460(0xfc)])),_0x53ad47;}export function redactCliConfigValue(_0x1244b2,_0x100a69){const _0x35fc02=a171_0x1ec232;if(_0x1244b2===_0x35fc02(0x101)||/^apps\.[^.]+\.accessKey$/['test'](_0x1244b2))return maskCliAccessKey(_0x100a69);if(_0x1244b2===_0x35fc02(0xfc)&&_0x100a69&&typeof _0x100a69===_0x35fc02(0x100)&&!Array[_0x35fc02(0x106)](_0x100a69))return redactLegacyAppCredentials(_0x100a69);if(/^apps\.[^.]+$/[_0x35fc02(0xf6)](_0x1244b2)&&_0x100a69&&typeof _0x100a69===_0x35fc02(0x100)&&!Array[_0x35fc02(0x106)](_0x100a69)){const _0x23fbc9=_0x100a69;return Object['prototype']['hasOwnProperty']['call'](_0x23fbc9,_0x35fc02(0x101))?{..._0x23fbc9,'accessKey':maskCliAccessKey(_0x23fbc9['accessKey'])}:_0x100a69;}return _0x100a69;}function redactLegacyAppCredentials(_0x285018){const _0x49f0e8=a171_0x1ec232;return Object[_0x49f0e8(0xff)](Object[_0x49f0e8(0x103)](_0x285018)[_0x49f0e8(0xf5)](([_0xbe7517,_0x2aeee3])=>{const _0x19d4ce=_0x49f0e8;if(!_0x2aeee3||typeof _0x2aeee3!=='object'||Array[_0x19d4ce(0x106)](_0x2aeee3))return[_0xbe7517,_0x2aeee3];const _0x4f72cf={..._0x2aeee3};return Object[_0x19d4ce(0xf2)][_0x19d4ce(0xfd)][_0x19d4ce(0x108)](_0x4f72cf,'accessKey')&&(_0x4f72cf[_0x19d4ce(0x101)]=maskCliAccessKey(_0x4f72cf[_0x19d4ce(0x101)])),[_0xbe7517,_0x4f72cf];}));}function a171_0x1deb(){const _0x2ad61c=['1772NyjiCc','prototype','2870691qdWlBi','1340523WUXqjr','map','test','slice','9060PjdWJg','6155830DjZLjK','<redacted>','18782478qWWYNu','apps','hasOwnProperty','158224ToIiou','fromEntries','object','accessKey','4vYqSiy','entries','322CNPUrB','repeat','isArray','1213KMrwSG','call','length','792rOEDsO'];a171_0x1deb=function(){return _0x2ad61c;};return a171_0x1deb();}
@@ -1 +1 @@
1
- (function(_0x2cd59a,_0x141ae4){const _0x2da252=a172_0x2c60,_0x1e1bb7=_0x2cd59a();while(!![]){try{const _0x4cf443=-parseInt(_0x2da252(0xe5))/0x1+parseInt(_0x2da252(0xe6))/0x2+-parseInt(_0x2da252(0xe3))/0x3+-parseInt(_0x2da252(0xe0))/0x4*(-parseInt(_0x2da252(0xe2))/0x5)+-parseInt(_0x2da252(0xde))/0x6*(parseInt(_0x2da252(0xe1))/0x7)+-parseInt(_0x2da252(0xdf))/0x8+parseInt(_0x2da252(0xe4))/0x9;if(_0x4cf443===_0x141ae4)break;else _0x1e1bb7['push'](_0x1e1bb7['shift']());}catch(_0x45f5b5){_0x1e1bb7['push'](_0x1e1bb7['shift']());}}}(a172_0x44e1,0x78733));function a172_0x44e1(){const _0x13f232=['5947992wswKqN','60AFZzDM','7yRngSu','194315qweAmY','1949202fiqlQn','19815264XprYJU','717664YrnByE','870442gSmmAR','3693612OaCrNH'];a172_0x44e1=function(){return _0x13f232;};return a172_0x44e1();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a172_0x2c60(_0x2c0b50,_0x10a709){_0x2c0b50=_0x2c0b50-0xde;const _0x44e148=a172_0x44e1();let _0x2c6097=_0x44e148[_0x2c0b50];return _0x2c6097;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ function a172_0x49c1(){const _0x5abf89=['4474LZXpHc','9zmeKaw','95623AXruNa','1051722DxMaPQ','4697palkjf','762218WPWRhs','245kMFswQ','753NGHjad','708Jxwcaz','31532VshTET','5368grqCjP','369480Dqikgg'];a172_0x49c1=function(){return _0x5abf89;};return a172_0x49c1();}(function(_0x24c6fe,_0x2b9316){const _0x21378a=a172_0x204e,_0x4a83ea=_0x24c6fe();while(!![]){try{const _0x1384bf=parseInt(_0x21378a(0x97))/0x1+parseInt(_0x21378a(0x92))/0x2*(-parseInt(_0x21378a(0x99))/0x3)+-parseInt(_0x21378a(0x8f))/0x4*(-parseInt(_0x21378a(0x98))/0x5)+-parseInt(_0x21378a(0x95))/0x6+parseInt(_0x21378a(0x96))/0x7*(parseInt(_0x21378a(0x90))/0x8)+-parseInt(_0x21378a(0x93))/0x9*(-parseInt(_0x21378a(0x91))/0xa)+parseInt(_0x21378a(0x94))/0xb*(-parseInt(_0x21378a(0x8e))/0xc);if(_0x1384bf===_0x2b9316)break;else _0x4a83ea['push'](_0x4a83ea['shift']());}catch(_0xbca591){_0x4a83ea['push'](_0x4a83ea['shift']());}}}(a172_0x49c1,0x5e3dd));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a172_0x204e(_0x3e66e5,_0x1b4337){_0x3e66e5=_0x3e66e5-0x8e;const _0x49c173=a172_0x49c1();let _0x204e57=_0x49c173[_0x3e66e5];return _0x204e57;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- function a173_0x26d8(){const _0x26b918=['212fiSlzc','385aRAUlQ','minimumVersionMessage','unavailable','176728VzgCUz','2451UAgrJN','11562480mwWyBM','validation','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','12rIJvTS','upgradeMessage','Current\x20version:\x20','472416ooNsFz','valid','4730aArzBJ','join','7pTpaET','80UngnxO','latest','belowMinimum','38027639CkTVHF','stableVersion','Recommended\x20stable:\x20','minimumVersion','1130718BAeTvS','Upgrade\x20command:\x20','8fjAIOc','currentVersion','Minimum\x20supported:\x20'];a173_0x26d8=function(){return _0x26b918;};return a173_0x26d8();}(function(_0xade72d,_0x389015){const _0x391743=a173_0xc530,_0x137eda=_0xade72d();while(!![]){try{const _0x173b67=-parseInt(_0x391743(0xfc))/0x1*(parseInt(_0x391743(0xf7))/0x2)+parseInt(_0x391743(0x10f))/0x3*(parseInt(_0x391743(0xf4))/0x4)+-parseInt(_0x391743(0x108))/0x5*(parseInt(_0x391743(0x103))/0x6)+-parseInt(_0x391743(0x107))/0x7*(parseInt(_0x391743(0xfb))/0x8)+-parseInt(_0x391743(0xfd))/0x9+-parseInt(_0x391743(0x105))/0xa*(-parseInt(_0x391743(0xf8))/0xb)+parseInt(_0x391743(0x100))/0xc*(parseInt(_0x391743(0x10b))/0xd);if(_0x173b67===_0x389015)break;else _0x137eda['push'](_0x137eda['shift']());}catch(_0x4e2419){_0x137eda['push'](_0x137eda['shift']());}}}(a173_0x26d8,0xd4339));import a173_0x4274c2 from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';function a173_0xc530(_0x49f860,_0x3d2b18){_0x49f860=_0x49f860-0xf4;const _0x26d830=a173_0x26d8();let _0xc530bc=_0x26d830[_0x49f860];return _0xc530bc;}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x21605f,_0x2cf924){const _0x5bf250=a173_0xc530,_0x17f31a=a173_0x4274c2[_0x5bf250(0x104)](_0x21605f)===_0x21605f,_0x108129=_0x2cf924?.[_0x5bf250(0x10c)]??null,_0x59ac42=_0x2cf924?.[_0x5bf250(0x10e)]??null,_0x54f832=Boolean(_0x17f31a&&_0x108129&&a173_0x4274c2['lt'](_0x21605f,_0x108129)),_0x5512ef=Boolean(_0x17f31a&&_0x59ac42&&a173_0x4274c2['lt'](_0x21605f,_0x59ac42));return{'currentVersion':_0x21605f,'stableVersion':_0x108129,'minimumVersion':_0x59ac42,'needsUpgrade':_0x54f832||_0x5512ef,'belowMinimum':_0x5512ef,'upgradeMessage':_0x2cf924?.[_0x5bf250(0x101)],'minimumVersionMessage':_0x2cf924?.[_0x5bf250(0xf9)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x59b160){const _0x558136=a173_0xc530;return'npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x59b160[_0x558136(0x10c)]??_0x558136(0x109));}export function assertCliVersionSupported(_0x4f1cb8){const _0x23097e=a173_0xc530;if(!_0x4f1cb8[_0x23097e(0x10a)])return;const _0xa6985f=[_0x4f1cb8[_0x23097e(0xf9)],_0x23097e(0x102)+_0x4f1cb8[_0x23097e(0xf5)],_0x23097e(0xf6)+_0x4f1cb8[_0x23097e(0x10e)],_0x23097e(0x10d)+(_0x4f1cb8[_0x23097e(0x10c)]??_0x23097e(0xfa)),_0x23097e(0x110)+getCliUpgradeCommand(_0x4f1cb8)]['filter'](Boolean)[_0x23097e(0x106)]('\x0a');throw CliErrors[_0x23097e(0xfe)](_0x23097e(0xff),_0xa6985f);}
1
+ (function(_0x589e5d,_0x41ced6){const _0x297d1f=a173_0x619c,_0xa738fc=_0x589e5d();while(!![]){try{const _0x280048=-parseInt(_0x297d1f(0x8b))/0x1+parseInt(_0x297d1f(0x8a))/0x2+parseInt(_0x297d1f(0x82))/0x3+parseInt(_0x297d1f(0x81))/0x4*(parseInt(_0x297d1f(0x84))/0x5)+-parseInt(_0x297d1f(0x7c))/0x6*(-parseInt(_0x297d1f(0x87))/0x7)+-parseInt(_0x297d1f(0x83))/0x8*(-parseInt(_0x297d1f(0x79))/0x9)+-parseInt(_0x297d1f(0x85))/0xa;if(_0x280048===_0x41ced6)break;else _0xa738fc['push'](_0xa738fc['shift']());}catch(_0x2e5dee){_0xa738fc['push'](_0xa738fc['shift']());}}}(a173_0x4086,0x5b000));import a173_0x5c2086 from'semver';function a173_0x4086(){const _0xf16d7d=['Recommended\x20stable:\x20','belowMinimum','minimumVersionMessage','18mYasAd','currentVersion','Upgrade\x20command:\x20','658326ZoUkKF','filter','stableVersion','npm\x20install\x20-g\x20','unavailable','16644rVQWtl','1414809sKdXfc','2623384RuQFol','305DlovUa','15413250tSSTLG','minimumVersion','14VVsSRw','upgradeMessage','Current\x20version:\x20','1434526mmBerJ','403914sAtRFH'];a173_0x4086=function(){return _0xf16d7d;};return a173_0x4086();}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x572093,_0x1bfe67){const _0x23c3c1=a173_0x619c,_0x4a1bbc=a173_0x5c2086['valid'](_0x572093)===_0x572093,_0x6f0273=_0x1bfe67?.['stableVersion']??null,_0x5dedf4=_0x1bfe67?.[_0x23c3c1(0x86)]??null,_0x1e9b80=Boolean(_0x4a1bbc&&_0x6f0273&&a173_0x5c2086['lt'](_0x572093,_0x6f0273)),_0x14b268=Boolean(_0x4a1bbc&&_0x5dedf4&&a173_0x5c2086['lt'](_0x572093,_0x5dedf4));return{'currentVersion':_0x572093,'stableVersion':_0x6f0273,'minimumVersion':_0x5dedf4,'needsUpgrade':_0x1e9b80||_0x14b268,'belowMinimum':_0x14b268,'upgradeMessage':_0x1bfe67?.[_0x23c3c1(0x88)],'minimumVersionMessage':_0x1bfe67?.[_0x23c3c1(0x78)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a173_0x619c(_0x3af4ea,_0x9e321d){_0x3af4ea=_0x3af4ea-0x78;const _0x4086a2=a173_0x4086();let _0x619c1c=_0x4086a2[_0x3af4ea];return _0x619c1c;}export function getCliUpgradeCommand(_0x14795d){const _0x532989=a173_0x619c;return _0x532989(0x7f)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x14795d[_0x532989(0x7e)]??'latest');}export function assertCliVersionSupported(_0x4fcf48){const _0x1ebfc9=a173_0x619c;if(!_0x4fcf48[_0x1ebfc9(0x8d)])return;const _0x3a0bdc=[_0x4fcf48['minimumVersionMessage'],_0x1ebfc9(0x89)+_0x4fcf48[_0x1ebfc9(0x7a)],'Minimum\x20supported:\x20'+_0x4fcf48[_0x1ebfc9(0x86)],_0x1ebfc9(0x8c)+(_0x4fcf48['stableVersion']??_0x1ebfc9(0x80)),_0x1ebfc9(0x7b)+getCliUpgradeCommand(_0x4fcf48)][_0x1ebfc9(0x7d)](Boolean)['join']('\x0a');throw CliErrors['validation']('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x3a0bdc);}
@@ -1 +1 @@
1
- function a174_0x2713(_0x5513db,_0x42f2a7){_0x5513db=_0x5513db-0x1c0;const _0x505281=a174_0x5052();let _0x271341=_0x505281[_0x5513db];return _0x271341;}(function(_0x4b9999,_0x3468f0){const _0x2b523d=a174_0x2713,_0x55e9b6=_0x4b9999();while(!![]){try{const _0x519495=-parseInt(_0x2b523d(0x1c8))/0x1*(-parseInt(_0x2b523d(0x1d6))/0x2)+-parseInt(_0x2b523d(0x1d3))/0x3*(-parseInt(_0x2b523d(0x1ce))/0x4)+-parseInt(_0x2b523d(0x1cd))/0x5*(parseInt(_0x2b523d(0x1d0))/0x6)+-parseInt(_0x2b523d(0x1cf))/0x7+-parseInt(_0x2b523d(0x1c3))/0x8+-parseInt(_0x2b523d(0x1c4))/0x9+parseInt(_0x2b523d(0x1d5))/0xa*(parseInt(_0x2b523d(0x1d2))/0xb);if(_0x519495===_0x3468f0)break;else _0x55e9b6['push'](_0x55e9b6['shift']());}catch(_0x49766f){_0x55e9b6['push'](_0x55e9b6['shift']());}}}(a174_0x5052,0xa3f02));import a174_0x440344 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x58e6f3){const _0x139309=a174_0x2713;return typeof _0x58e6f3==='string'&&_0x58e6f3[_0x139309(0x1c9)]()?_0x58e6f3[_0x139309(0x1c9)]():null;}function pickStrictSemver(_0x53befc){const _0x47a325=a174_0x2713,_0x3e3bb7=pickString(_0x53befc);return _0x3e3bb7&&a174_0x440344[_0x47a325(0x1c7)](_0x3e3bb7)===_0x3e3bb7?_0x3e3bb7:null;}function a174_0x5052(){const _0x237de3=['minimumVersion','stableVersion','valid','934996oQPKoH','trim','upgradeMessage','now','minimumVersionMessage','3725Uluwnc','1448yzQDAQ','586971SFVejt','4266wMeKAo','cli','3601543MhwJaA','6303zKmyNp','object','50yfeQfW','2dCKvqs','timeout','then','application/json','7738496utWlrN','9722457CBtEbp'];a174_0x5052=function(){return _0x237de3;};return a174_0x5052();}export function normalizeCliVersionPolicy(_0x37201a){const _0x96d0e6=a174_0x2713;if(!_0x37201a||typeof _0x37201a!==_0x96d0e6(0x1d4))return null;const _0x2f1add=_0x37201a,_0x2c4f98=_0x2f1add[_0x96d0e6(0x1d1)]&&typeof _0x2f1add['cli']===_0x96d0e6(0x1d4)?_0x2f1add[_0x96d0e6(0x1d1)]:_0x2f1add,_0x4df4e6=pickStrictSemver(_0x2c4f98[_0x96d0e6(0x1c6)]??_0x2c4f98['latestVersion']??_0x2c4f98['recommendedVersion']),_0x51966e=pickStrictSemver(_0x2c4f98[_0x96d0e6(0x1c5)]??_0x2c4f98['minVersion']);if(!_0x4df4e6&&!_0x51966e)return null;if(_0x4df4e6&&_0x51966e&&a174_0x440344['gt'](_0x51966e,_0x4df4e6))return null;return{'stableVersion':_0x4df4e6,'minimumVersion':_0x51966e,'upgradeMessage':pickString(_0x2c4f98[_0x96d0e6(0x1ca)])??undefined,'minimumVersionMessage':pickString(_0x2c4f98[_0x96d0e6(0x1cc)])??undefined};}export async function fetchCliVersionPolicy(){const _0xd95aa9=a174_0x2713;try{const _0x22b2db=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0xd95aa9(0x1c2)},'signal':AbortSignal[_0xd95aa9(0x1c0)](FETCH_TIMEOUT_MS)});if(!_0x22b2db['ok'])return null;return normalizeCliVersionPolicy(await _0x22b2db['json']());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x191b7f=a174_0x2713,_0x9b74a8=Date[_0x191b7f(0x1cb)]();if(hasCachedPolicy){const _0x18cb01=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x9b74a8-cachedAt<_0x18cb01)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x191b7f(0x1c1)](_0x16f46e=>{return cachedPolicy=_0x16f46e,cachedAt=Date['now'](),hasCachedPolicy=!![],_0x16f46e;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
1
+ (function(_0x12e786,_0x586a0b){const _0x4530f7=a174_0x4b7d,_0x10bac5=_0x12e786();while(!![]){try{const _0x11fe05=-parseInt(_0x4530f7(0x8e))/0x1*(parseInt(_0x4530f7(0x94))/0x2)+-parseInt(_0x4530f7(0x7d))/0x3*(-parseInt(_0x4530f7(0x85))/0x4)+parseInt(_0x4530f7(0x82))/0x5+-parseInt(_0x4530f7(0x84))/0x6+parseInt(_0x4530f7(0x8c))/0x7+parseInt(_0x4530f7(0x90))/0x8+-parseInt(_0x4530f7(0x8b))/0x9;if(_0x11fe05===_0x586a0b)break;else _0x10bac5['push'](_0x10bac5['shift']());}catch(_0x5df54f){_0x10bac5['push'](_0x10bac5['shift']());}}}(a174_0x5584,0xb84af));import a174_0x5fcee8 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x1e18d2){const _0x528cf6=a174_0x4b7d;return typeof _0x1e18d2===_0x528cf6(0x8a)&&_0x1e18d2[_0x528cf6(0x88)]()?_0x1e18d2[_0x528cf6(0x88)]():null;}function pickStrictSemver(_0x46de87){const _0x2702e5=pickString(_0x46de87);return _0x2702e5&&a174_0x5fcee8['valid'](_0x2702e5)===_0x2702e5?_0x2702e5:null;}export function normalizeCliVersionPolicy(_0x58b2fb){const _0x51b799=a174_0x4b7d;if(!_0x58b2fb||typeof _0x58b2fb!==_0x51b799(0x8d))return null;const _0x4bc72a=_0x58b2fb,_0x2c4baa=_0x4bc72a[_0x51b799(0x7f)]&&typeof _0x4bc72a[_0x51b799(0x7f)]===_0x51b799(0x8d)?_0x4bc72a['cli']:_0x4bc72a,_0x4a1ab1=pickStrictSemver(_0x2c4baa[_0x51b799(0x81)]??_0x2c4baa[_0x51b799(0x93)]??_0x2c4baa[_0x51b799(0x86)]),_0x48470b=pickStrictSemver(_0x2c4baa[_0x51b799(0x91)]??_0x2c4baa['minVersion']);if(!_0x4a1ab1&&!_0x48470b)return null;if(_0x4a1ab1&&_0x48470b&&a174_0x5fcee8['gt'](_0x48470b,_0x4a1ab1))return null;return{'stableVersion':_0x4a1ab1,'minimumVersion':_0x48470b,'upgradeMessage':pickString(_0x2c4baa[_0x51b799(0x83)])??undefined,'minimumVersionMessage':pickString(_0x2c4baa[_0x51b799(0x89)])??undefined};}export async function fetchCliVersionPolicy(){const _0x169d10=a174_0x4b7d;try{const _0x27beec=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x169d10(0x87)},'signal':AbortSignal[_0x169d10(0x92)](FETCH_TIMEOUT_MS)});if(!_0x27beec['ok'])return null;return normalizeCliVersionPolicy(await _0x27beec[_0x169d10(0x80)]());}catch{return null;}}function a174_0x5584(){const _0x2ce1a7=['stableVersion','17310cYdFMH','upgradeMessage','6748074bzXpus','4253048WpAFqN','recommendedVersion','application/json','trim','minimumVersionMessage','string','7462989qHgpSm','9564660TBrQsP','object','10pHGAcI','finally','7381512WVDNqZ','minimumVersion','timeout','latestVersion','129406MKcCfa','3TIroPD','now','cli','json'];a174_0x5584=function(){return _0x2ce1a7;};return a174_0x5584();}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x48d2c9=a174_0x4b7d,_0x562264=Date['now']();if(hasCachedPolicy){const _0x4835ee=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x562264-cachedAt<_0x4835ee)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()['then'](_0x14ba0a=>{const _0x13039d=a174_0x4b7d;return cachedPolicy=_0x14ba0a,cachedAt=Date[_0x13039d(0x7e)](),hasCachedPolicy=!![],_0x14ba0a;})[_0x48d2c9(0x8f)](()=>{pendingPolicy=null;}),pendingPolicy;}function a174_0x4b7d(_0x271375,_0x47aa0f){_0x271375=_0x271375-0x7d;const _0x55844b=a174_0x5584();let _0x4b7d7a=_0x55844b[_0x271375];return _0x4b7d7a;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
@@ -1 +1 @@
1
- const a175_0x596aae=a175_0x5295;function a175_0x57eb(){const _0x25d632=['3633080jfVhZS','File','readLogs','unknown','level','setLogPath','success','now','logTask','Failed\x20to\x20clear\x20logs:','message','filter','4581996CvYadA','info','clearLogs','format','error','yellow','utf8','trim','timestamp','duration','green','errors','1773yzaBzT','Failed\x20to\x20read\x20logs:','existsSync','winstonLogger','338736VasfVz','split','stringify','Completed:\x20','2672neTTSc','rawCommand','parse','Starting:\x20','clear','logFileName','initWinstonLogger','logFilePath','createLogger','map','105JFwwDJ','dirname','4547pppcUX','details','transports','combine','mkdirSync','currentRawCommand','join','10161890OKmlyN','readFileSync','98aLWsUF','936081DRuQRf','printf'];a175_0x57eb=function(){return _0x25d632;};return a175_0x57eb();}(function(_0x18eeb9,_0x1de131){const _0x434c7b=a175_0x5295,_0x48e517=_0x18eeb9();while(!![]){try{const _0x455aa3=-parseInt(_0x434c7b(0x1e3))/0x1*(parseInt(_0x434c7b(0x1ec))/0x2)+-parseInt(_0x434c7b(0x207))/0x3*(-parseInt(_0x434c7b(0x20f))/0x4)+-parseInt(_0x434c7b(0x1ef))/0x5+parseInt(_0x434c7b(0x1fb))/0x6+parseInt(_0x434c7b(0x1e1))/0x7*(-parseInt(_0x434c7b(0x20b))/0x8)+-parseInt(_0x434c7b(0x1ed))/0x9+parseInt(_0x434c7b(0x1ea))/0xa;if(_0x455aa3===_0x1de131)break;else _0x48e517['push'](_0x48e517['shift']());}catch(_0x21a00e){_0x48e517['push'](_0x48e517['shift']());}}}(a175_0x57eb,0x76ac5));import a175_0x38c8bc from'winston';function a175_0x5295(_0x2d7272,_0x1d9547){_0x2d7272=_0x2d7272-0x1da;const _0x57eb50=a175_0x57eb();let _0x529572=_0x57eb50[_0x2d7272];return _0x529572;}import a175_0x3f55ea from'node:fs';import a175_0x4458a8 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a175_0x596aae(0x20a)];[a175_0x596aae(0x1de)]='';[a175_0x596aae(0x1e8)]='';constructor(){}['setRawCommand'](_0x22b941){const _0x4be960=a175_0x596aae;this[_0x4be960(0x1e8)]=_0x22b941;}[a175_0x596aae(0x1f4)](_0x52d01a){const _0x50f2c5=a175_0x596aae;this['logFilePath']=a175_0x4458a8[_0x50f2c5(0x1e9)](_0x52d01a,PRODUCT_CONFIG[_0x50f2c5(0x1dc)]),this[_0x50f2c5(0x20a)]&&this[_0x50f2c5(0x20a)][_0x50f2c5(0x1db)](),this[_0x50f2c5(0x1dd)]();}[a175_0x596aae(0x1dd)](){const _0x22a166=a175_0x596aae,_0x1a6978=a175_0x4458a8[_0x22a166(0x1e2)](this['logFilePath']);!a175_0x3f55ea[_0x22a166(0x209)](_0x1a6978)&&a175_0x3f55ea[_0x22a166(0x1e7)](_0x1a6978,{'recursive':!![]});const _0x4a833f=a175_0x38c8bc[_0x22a166(0x1fe)][_0x22a166(0x1e6)](a175_0x38c8bc[_0x22a166(0x1fe)][_0x22a166(0x203)](),a175_0x38c8bc[_0x22a166(0x1fe)][_0x22a166(0x206)]({'stack':!![]}),a175_0x38c8bc['format'][_0x22a166(0x1ee)](_0x330612=>{const _0x4839c1=_0x22a166,_0x1a6afe={'timestamp':_0x330612[_0x4839c1(0x203)]||new Date()['toISOString'](),'level':_0x330612[_0x4839c1(0x1f3)]||'info','command':_0x330612['command']||_0x4839c1(0x1f2),'rawCommand':_0x330612[_0x4839c1(0x210)]||this[_0x4839c1(0x1e8)]||undefined,'message':_0x330612[_0x4839c1(0x1f9)]||'','duration':_0x330612[_0x4839c1(0x204)]||undefined,'details':_0x330612[_0x4839c1(0x1e4)]||undefined};return JSON[_0x4839c1(0x20d)](_0x1a6afe);}));this[_0x22a166(0x20a)]=a175_0x38c8bc[_0x22a166(0x1df)]({'level':_0x22a166(0x1fc),'format':_0x4a833f,'transports':[new a175_0x38c8bc[(_0x22a166(0x1e5))][(_0x22a166(0x1f0))]({'filename':this[_0x22a166(0x1de)],'level':_0x22a166(0x1fc)})],'silent':![]}),a175_0x38c8bc['addColors']({'success':_0x22a166(0x205),'error':'red','warn':_0x22a166(0x200),'info':'blue'});}[a175_0x596aae(0x1fc)](_0x16f363,_0x43fbdc,_0x26a003){const _0x2cadbb=a175_0x596aae;if(!this[_0x2cadbb(0x1de)]||!this[_0x2cadbb(0x20a)])return;this[_0x2cadbb(0x20a)]['info'](_0x43fbdc,{'command':_0x16f363,'details':_0x26a003});}['success'](_0x4e4901,_0x309e1c,_0x31e4d9,_0x584b56){const _0x4d080d=a175_0x596aae;if(!this[_0x4d080d(0x1de)]||!this['winstonLogger'])return;this[_0x4d080d(0x20a)]['log'](_0x4d080d(0x1fc),_0x309e1c,{'level':_0x4d080d(0x1f5),'command':_0x4e4901,'duration':_0x31e4d9,'details':_0x584b56});}[a175_0x596aae(0x1ff)](_0x523f30,_0x2f4872,_0x6f3277){const _0x4e59a0=a175_0x596aae;if(!this[_0x4e59a0(0x1de)]||!this[_0x4e59a0(0x20a)])return;this[_0x4e59a0(0x20a)][_0x4e59a0(0x1ff)](_0x2f4872,{'command':_0x523f30,'details':_0x6f3277});}['warn'](_0x9ac631,_0x1a1eb3,_0x285043){const _0x27f638=a175_0x596aae;if(!this[_0x27f638(0x1de)]||!this[_0x27f638(0x20a)])return;this['winstonLogger']['warn'](_0x1a1eb3,{'command':_0x9ac631,'details':_0x285043});}async[a175_0x596aae(0x1f7)](_0x1b1704,_0x4a8e4a,_0xf3096a){const _0x185f30=a175_0x596aae,_0x222c0f=Date[_0x185f30(0x1f6)]();this['info'](_0x1b1704,_0x185f30(0x1da)+_0x4a8e4a);try{const _0x3c0338=await _0xf3096a(),_0x1d440f=Date[_0x185f30(0x1f6)]()-_0x222c0f;return this['success'](_0x1b1704,_0x185f30(0x20e)+_0x4a8e4a,_0x1d440f),_0x3c0338;}catch(_0x5b3b67){const _0xf4b2cf=Date[_0x185f30(0x1f6)]()-_0x222c0f;this[_0x185f30(0x1ff)](_0x1b1704,'Failed:\x20'+_0x4a8e4a,{'error':_0x5b3b67 instanceof Error?_0x5b3b67['message']:String(_0x5b3b67),'duration':_0xf4b2cf});throw _0x5b3b67;}}[a175_0x596aae(0x1f1)](){const _0x3b161a=a175_0x596aae;try{if(!a175_0x3f55ea[_0x3b161a(0x209)](this[_0x3b161a(0x1de)]))return[];const _0x3c1a41=a175_0x3f55ea[_0x3b161a(0x1eb)](this[_0x3b161a(0x1de)],_0x3b161a(0x201));return _0x3c1a41[_0x3b161a(0x20c)](/\r?\n/)[_0x3b161a(0x1fa)](_0xc6a225=>_0xc6a225[_0x3b161a(0x202)]())[_0x3b161a(0x1e0)](_0xf7f8fa=>JSON[_0x3b161a(0x211)](_0xf7f8fa));}catch(_0x7caede){return console['warn'](_0x3b161a(0x208),_0x7caede),[];}}[a175_0x596aae(0x1fd)](){const _0x2d9a8c=a175_0x596aae;try{a175_0x3f55ea[_0x2d9a8c(0x209)](this['logFilePath'])&&a175_0x3f55ea['writeFileSync'](this['logFilePath'],'',_0x2d9a8c(0x201));}catch(_0x420d71){console['warn'](_0x2d9a8c(0x1f8),_0x420d71);}}['getWinstonInstance'](){const _0x23a4af=a175_0x596aae;return this[_0x23a4af(0x20a)];}}export const logger=new Logger();
1
+ function a175_0x8668(_0x32f1a9,_0x442293){_0x32f1a9=_0x32f1a9-0x1f2;const _0x1b2ca7=a175_0x1b2c();let _0x8668b2=_0x1b2ca7[_0x32f1a9];return _0x8668b2;}const a175_0x150d9c=a175_0x8668;(function(_0x5c40bb,_0x5a0f8e){const _0x3518a2=a175_0x8668,_0x10a4f1=_0x5c40bb();while(!![]){try{const _0x1f7160=-parseInt(_0x3518a2(0x20f))/0x1+-parseInt(_0x3518a2(0x1f5))/0x2+parseInt(_0x3518a2(0x212))/0x3+parseInt(_0x3518a2(0x1fe))/0x4+-parseInt(_0x3518a2(0x224))/0x5+-parseInt(_0x3518a2(0x215))/0x6*(-parseInt(_0x3518a2(0x203))/0x7)+parseInt(_0x3518a2(0x21a))/0x8;if(_0x1f7160===_0x5a0f8e)break;else _0x10a4f1['push'](_0x10a4f1['shift']());}catch(_0xc1b801){_0x10a4f1['push'](_0x10a4f1['shift']());}}}(a175_0x1b2c,0xa038e));import a175_0x2c4cc2 from'winston';import a175_0xc7d556 from'node:fs';import a175_0x4b82bc from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a175_0x1b2c(){const _0x55d558=['combine','warn','map','currentRawCommand','format','existsSync','Starting:\x20','306882jmwGNf','Failed\x20to\x20clear\x20logs:','createLogger','123690tnqLLI','filter','command','1722msxoHY','info','setRawCommand','timestamp','trim','10349072pKiLFZ','now','success','log','duration','readLogs','message','initWinstonLogger','parse','utf8','5290540HrbmVL','logFilePath','yellow','toISOString','524618LDacpL','red','logTask','level','blue','mkdirSync','winstonLogger','readFileSync','logFileName','958112MQkzXc','unknown','clearLogs','details','split','17297MKYCIi','error','clear','addColors','green'];a175_0x1b2c=function(){return _0x55d558;};return a175_0x1b2c();}class Logger{[a175_0x150d9c(0x1fb)];[a175_0x150d9c(0x1f2)]='';[a175_0x150d9c(0x20b)]='';constructor(){}[a175_0x150d9c(0x217)](_0x48e8ae){const _0x5eff5e=a175_0x150d9c;this[_0x5eff5e(0x20b)]=_0x48e8ae;}['setLogPath'](_0x3c366d){const _0x1016a3=a175_0x150d9c;this[_0x1016a3(0x1f2)]=a175_0x4b82bc['join'](_0x3c366d,PRODUCT_CONFIG[_0x1016a3(0x1fd)]),this[_0x1016a3(0x1fb)]&&this[_0x1016a3(0x1fb)][_0x1016a3(0x205)](),this[_0x1016a3(0x221)]();}[a175_0x150d9c(0x221)](){const _0x13c46f=a175_0x150d9c,_0x586aae=a175_0x4b82bc['dirname'](this[_0x13c46f(0x1f2)]);!a175_0xc7d556[_0x13c46f(0x20d)](_0x586aae)&&a175_0xc7d556[_0x13c46f(0x1fa)](_0x586aae,{'recursive':!![]});const _0x1a2d52=a175_0x2c4cc2['format'][_0x13c46f(0x208)](a175_0x2c4cc2[_0x13c46f(0x20c)][_0x13c46f(0x218)](),a175_0x2c4cc2[_0x13c46f(0x20c)]['errors']({'stack':!![]}),a175_0x2c4cc2[_0x13c46f(0x20c)]['printf'](_0x5b0a1f=>{const _0x1c4bb5=_0x13c46f,_0x49f8bf={'timestamp':_0x5b0a1f['timestamp']||new Date()[_0x1c4bb5(0x1f4)](),'level':_0x5b0a1f[_0x1c4bb5(0x1f8)]||'info','command':_0x5b0a1f[_0x1c4bb5(0x214)]||_0x1c4bb5(0x1ff),'rawCommand':_0x5b0a1f['rawCommand']||this[_0x1c4bb5(0x20b)]||undefined,'message':_0x5b0a1f[_0x1c4bb5(0x220)]||'','duration':_0x5b0a1f[_0x1c4bb5(0x21e)]||undefined,'details':_0x5b0a1f[_0x1c4bb5(0x201)]||undefined};return JSON['stringify'](_0x49f8bf);}));this[_0x13c46f(0x1fb)]=a175_0x2c4cc2[_0x13c46f(0x211)]({'level':_0x13c46f(0x216),'format':_0x1a2d52,'transports':[new a175_0x2c4cc2['transports']['File']({'filename':this['logFilePath'],'level':_0x13c46f(0x216)})],'silent':![]}),a175_0x2c4cc2[_0x13c46f(0x206)]({'success':_0x13c46f(0x207),'error':_0x13c46f(0x1f6),'warn':_0x13c46f(0x1f3),'info':_0x13c46f(0x1f9)});}[a175_0x150d9c(0x216)](_0xb57b8e,_0x1e206a,_0x299998){const _0x37c4a8=a175_0x150d9c;if(!this[_0x37c4a8(0x1f2)]||!this[_0x37c4a8(0x1fb)])return;this[_0x37c4a8(0x1fb)][_0x37c4a8(0x216)](_0x1e206a,{'command':_0xb57b8e,'details':_0x299998});}[a175_0x150d9c(0x21c)](_0x53f638,_0x37fd38,_0x4227a0,_0x5b6a61){const _0x4e3489=a175_0x150d9c;if(!this['logFilePath']||!this[_0x4e3489(0x1fb)])return;this[_0x4e3489(0x1fb)][_0x4e3489(0x21d)](_0x4e3489(0x216),_0x37fd38,{'level':_0x4e3489(0x21c),'command':_0x53f638,'duration':_0x4227a0,'details':_0x5b6a61});}[a175_0x150d9c(0x204)](_0x5c7e9f,_0x581ea3,_0x3dfd02){const _0x16d9fd=a175_0x150d9c;if(!this['logFilePath']||!this[_0x16d9fd(0x1fb)])return;this['winstonLogger']['error'](_0x581ea3,{'command':_0x5c7e9f,'details':_0x3dfd02});}[a175_0x150d9c(0x209)](_0x27d424,_0x1c4f47,_0x4e1532){const _0x325d25=a175_0x150d9c;if(!this[_0x325d25(0x1f2)]||!this[_0x325d25(0x1fb)])return;this['winstonLogger'][_0x325d25(0x209)](_0x1c4f47,{'command':_0x27d424,'details':_0x4e1532});}async[a175_0x150d9c(0x1f7)](_0x2db00a,_0x49720a,_0x172af5){const _0x314816=a175_0x150d9c,_0x31c3e0=Date[_0x314816(0x21b)]();this['info'](_0x2db00a,_0x314816(0x20e)+_0x49720a);try{const _0x4cbe5e=await _0x172af5(),_0x39c8ee=Date[_0x314816(0x21b)]()-_0x31c3e0;return this[_0x314816(0x21c)](_0x2db00a,'Completed:\x20'+_0x49720a,_0x39c8ee),_0x4cbe5e;}catch(_0x4db4a1){const _0x48a495=Date[_0x314816(0x21b)]()-_0x31c3e0;this[_0x314816(0x204)](_0x2db00a,'Failed:\x20'+_0x49720a,{'error':_0x4db4a1 instanceof Error?_0x4db4a1[_0x314816(0x220)]:String(_0x4db4a1),'duration':_0x48a495});throw _0x4db4a1;}}[a175_0x150d9c(0x21f)](){const _0x3c1aa8=a175_0x150d9c;try{if(!a175_0xc7d556['existsSync'](this[_0x3c1aa8(0x1f2)]))return[];const _0xb88c=a175_0xc7d556[_0x3c1aa8(0x1fc)](this[_0x3c1aa8(0x1f2)],'utf8');return _0xb88c[_0x3c1aa8(0x202)](/\r?\n/)[_0x3c1aa8(0x213)](_0x5db3df=>_0x5db3df[_0x3c1aa8(0x219)]())[_0x3c1aa8(0x20a)](_0x4fa22c=>JSON[_0x3c1aa8(0x222)](_0x4fa22c));}catch(_0x5213b6){return console[_0x3c1aa8(0x209)]('Failed\x20to\x20read\x20logs:',_0x5213b6),[];}}[a175_0x150d9c(0x200)](){const _0x48bd13=a175_0x150d9c;try{a175_0xc7d556[_0x48bd13(0x20d)](this['logFilePath'])&&a175_0xc7d556['writeFileSync'](this[_0x48bd13(0x1f2)],'',_0x48bd13(0x223));}catch(_0x10d7b4){console[_0x48bd13(0x209)](_0x48bd13(0x210),_0x10d7b4);}}['getWinstonInstance'](){const _0xf9f0bc=a175_0x150d9c;return this[_0xf9f0bc(0x1fb)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a176_0x19245e=a176_0x87ae;(function(_0x576ae1,_0x2ee35e){const _0x1c0945=a176_0x87ae,_0x25d43f=_0x576ae1();while(!![]){try{const _0x36f008=parseInt(_0x1c0945(0x1ba))/0x1+parseInt(_0x1c0945(0x1c1))/0x2*(parseInt(_0x1c0945(0x1c4))/0x3)+parseInt(_0x1c0945(0x1be))/0x4+-parseInt(_0x1c0945(0x1bd))/0x5*(parseInt(_0x1c0945(0x1bf))/0x6)+-parseInt(_0x1c0945(0x1c3))/0x7*(-parseInt(_0x1c0945(0x1cb))/0x8)+-parseInt(_0x1c0945(0x1c5))/0x9+parseInt(_0x1c0945(0x1cc))/0xa*(parseInt(_0x1c0945(0x1bc))/0xb);if(_0x36f008===_0x2ee35e)break;else _0x25d43f['push'](_0x25d43f['shift']());}catch(_0x2b90c1){_0x25d43f['push'](_0x25d43f['shift']());}}}(a176_0x58fa,0x3b660));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a176_0x19245e(0x1b9)]),MIN_SAFE_INTEGER=BigInt(Number[a176_0x19245e(0x1bb)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a176_0x58fa(){const _0x4cb15d=['length','json','parse','exec','42552vibbSL','702370HurxHg','prototype','getOwnPropertyDescriptor','defineProperty','MAX_SAFE_INTEGER','15277qhKZuY','MIN_SAFE_INTEGER','44xadngs','5QJmaAq','1279404MKePAY','630942PeAntI','text','192YFPbgO','includes','77TtWGEv','2235NZaNmQ','3578868TOOnIX','undefined'];a176_0x58fa=function(){return _0x4cb15d;};return a176_0x58fa();}function isUnsafeIntegerLiteral(_0x3b25d1){const _0xf28b3a=a176_0x19245e;if(_0x3b25d1[_0xf28b3a(0x1c2)]('.')||_0x3b25d1[_0xf28b3a(0x1c2)]('e')||_0x3b25d1[_0xf28b3a(0x1c2)]('E'))return![];const _0x5988f0=BigInt(_0x3b25d1);return _0x5988f0>MAX_SAFE_INTEGER||_0x5988f0<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x1252c1){const _0x35a475=a176_0x19245e;let _0x457a2a='',_0x2be62d=![],_0x52bac6=![];for(let _0x23d343=0x0;_0x23d343<_0x1252c1[_0x35a475(0x1c7)];){const _0x21c356=_0x1252c1[_0x23d343];if(_0x2be62d){_0x457a2a+=_0x21c356,_0x23d343+=0x1;if(_0x52bac6)_0x52bac6=![];else{if(_0x21c356==='\x5c')_0x52bac6=!![];else _0x21c356==='\x22'&&(_0x2be62d=![]);}continue;}if(_0x21c356==='\x22'){_0x2be62d=!![],_0x457a2a+=_0x21c356,_0x23d343+=0x1;continue;}if(_0x21c356==='-'||_0x21c356>='0'&&_0x21c356<='9'){const _0x5a4e7=JSON_NUMBER_PATTERN[_0x35a475(0x1ca)](_0x1252c1['slice'](_0x23d343))?.[0x0];if(_0x5a4e7){_0x457a2a+=isUnsafeIntegerLiteral(_0x5a4e7)?'\x22'+_0x5a4e7+'\x22':_0x5a4e7,_0x23d343+=_0x5a4e7[_0x35a475(0x1c7)];continue;}}_0x457a2a+=_0x21c356,_0x23d343+=0x1;}return _0x457a2a;}export function parseLosslessJson(_0x3ee1ff){const _0x96f484=a176_0x19245e;return JSON[_0x96f484(0x1c9)](quoteUnsafeIntegerLiterals(_0x3ee1ff));}function a176_0x87ae(_0x3ce4fa,_0x476d44){_0x3ce4fa=_0x3ce4fa-0x1b8;const _0x58fa6a=a176_0x58fa();let _0x87ae86=_0x58fa6a[_0x3ce4fa];return _0x87ae86;}export function installLosslessJsonResponseParser(){const _0x274530=a176_0x19245e;if(typeof Response===_0x274530(0x1c6))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x274530(0x1cd)],originalResponseJsonDescriptor=Object[_0x274530(0x1ce)](responseJsonPrototype,'json'),Object[_0x274530(0x1b8)](responseJsonPrototype,_0x274530(0x1c8),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0xd47b6a(){const _0x3e6be7=_0x274530;return parseLosslessJson(await this[_0x3e6be7(0x1c0)]());}}),restoreResponseJsonParser=()=>{const _0x187283=_0x274530;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x187283(0x1b8)](responseJsonPrototype,_0x187283(0x1c8),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a176_0x28e59d=a176_0x3d55;(function(_0x395da1,_0x1f41af){const _0x515dba=a176_0x3d55,_0x533c5b=_0x395da1();while(!![]){try{const _0x24a199=parseInt(_0x515dba(0x87))/0x1*(parseInt(_0x515dba(0x90))/0x2)+parseInt(_0x515dba(0x91))/0x3*(-parseInt(_0x515dba(0x7f))/0x4)+parseInt(_0x515dba(0x8d))/0x5+-parseInt(_0x515dba(0x8a))/0x6*(parseInt(_0x515dba(0x92))/0x7)+-parseInt(_0x515dba(0x89))/0x8+-parseInt(_0x515dba(0x8f))/0x9+-parseInt(_0x515dba(0x82))/0xa*(-parseInt(_0x515dba(0x84))/0xb);if(_0x24a199===_0x1f41af)break;else _0x533c5b['push'](_0x533c5b['shift']());}catch(_0x130e61){_0x533c5b['push'](_0x533c5b['shift']());}}}(a176_0x1697,0xeff6a));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a176_0x28e59d(0x81)]),MIN_SAFE_INTEGER=BigInt(Number[a176_0x28e59d(0x8c)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x36c6c5){const _0x470977=a176_0x28e59d;if(_0x36c6c5[_0x470977(0x86)]('.')||_0x36c6c5[_0x470977(0x86)]('e')||_0x36c6c5['includes']('E'))return![];const _0x53976f=BigInt(_0x36c6c5);return _0x53976f>MAX_SAFE_INTEGER||_0x53976f<MIN_SAFE_INTEGER;}function a176_0x1697(){const _0x1d2f98=['prototype','8573224VWlSGI','969486OGzxVw','slice','MIN_SAFE_INTEGER','5161400BUcUGf','json','10181295HbHrzd','2094VyvpDJ','482763POfoMA','7EftLDH','defineProperty','undefined','8gdpBSQ','text','MAX_SAFE_INTEGER','700bpGIdr','length','224675iNXdbO','exec','includes','1153tXHiJb'];a176_0x1697=function(){return _0x1d2f98;};return a176_0x1697();}function quoteUnsafeIntegerLiterals(_0x9b762a){const _0x310d98=a176_0x28e59d;let _0x458bdc='',_0x2adcc2=![],_0x266da7=![];for(let _0x4efc32=0x0;_0x4efc32<_0x9b762a[_0x310d98(0x83)];){const _0x2837cf=_0x9b762a[_0x4efc32];if(_0x2adcc2){_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;if(_0x266da7)_0x266da7=![];else{if(_0x2837cf==='\x5c')_0x266da7=!![];else _0x2837cf==='\x22'&&(_0x2adcc2=![]);}continue;}if(_0x2837cf==='\x22'){_0x2adcc2=!![],_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;continue;}if(_0x2837cf==='-'||_0x2837cf>='0'&&_0x2837cf<='9'){const _0x3a2be2=JSON_NUMBER_PATTERN[_0x310d98(0x85)](_0x9b762a[_0x310d98(0x8b)](_0x4efc32))?.[0x0];if(_0x3a2be2){_0x458bdc+=isUnsafeIntegerLiteral(_0x3a2be2)?'\x22'+_0x3a2be2+'\x22':_0x3a2be2,_0x4efc32+=_0x3a2be2[_0x310d98(0x83)];continue;}}_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;}return _0x458bdc;}function a176_0x3d55(_0x512708,_0x1725fd){_0x512708=_0x512708-0x7d;const _0x16975b=a176_0x1697();let _0x3d551b=_0x16975b[_0x512708];return _0x3d551b;}export function parseLosslessJson(_0x42b6a4){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x42b6a4));}export function installLosslessJsonResponseParser(){const _0x5c87d3=a176_0x28e59d;if(typeof Response===_0x5c87d3(0x7e))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x5c87d3(0x88)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x5c87d3(0x8e)),Object[_0x5c87d3(0x7d)](responseJsonPrototype,_0x5c87d3(0x8e),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x591fef(){const _0x41316e=_0x5c87d3;return parseLosslessJson(await this[_0x41316e(0x80)]());}}),restoreResponseJsonParser=()=>{const _0x2b8eac=_0x5c87d3;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x2b8eac(0x8e),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x2b8eac(0x8e)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
@@ -1 +1 @@
1
- (function(_0x315cca,_0xa02591){const _0x56b169=a177_0x1e73,_0x1c445f=_0x315cca();while(!![]){try{const _0x22f14d=-parseInt(_0x56b169(0xef))/0x1+parseInt(_0x56b169(0xdd))/0x2*(parseInt(_0x56b169(0xe0))/0x3)+-parseInt(_0x56b169(0xf1))/0x4*(-parseInt(_0x56b169(0xeb))/0x5)+parseInt(_0x56b169(0xe6))/0x6*(-parseInt(_0x56b169(0xd3))/0x7)+-parseInt(_0x56b169(0xed))/0x8*(-parseInt(_0x56b169(0xda))/0x9)+-parseInt(_0x56b169(0xdf))/0xa*(parseInt(_0x56b169(0xd2))/0xb)+parseInt(_0x56b169(0xd7))/0xc;if(_0x22f14d===_0xa02591)break;else _0x1c445f['push'](_0x1c445f['shift']());}catch(_0xb2ac0){_0x1c445f['push'](_0x1c445f['shift']());}}}(a177_0x522b,0xba446));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x3126a4){const _0x46c7f0=a177_0x1e73;if(!_0x3126a4)return undefined;try{return parseLosslessJson(_0x3126a4);}catch{throw CliErrors['validation'](_0x46c7f0(0xe7)+_0x3126a4);}}export function parseJsonParamsValue(_0x5f01d8){const _0x13a151=a177_0x1e73;if(!_0x5f01d8)return undefined;try{return parseLosslessJson(_0x5f01d8);}catch{throw CliErrors[_0x13a151(0xd9)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x5f01d8);}}function a177_0x1e73(_0x36a353,_0xe35760){_0x36a353=_0x36a353-0xd0;const _0x522b3e=a177_0x522b();let _0x1e7312=_0x522b3e[_0x36a353];return _0x1e7312;}function a177_0x522b(){const _0x169daf=['object','data\x20update\x20--params.','23702oLScIr','test','7390VyuIcz','123BDNCRN','items','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','number','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','id[','6YgcIdp','Invalid\x20JSON\x20for\x20--params:\x20','data\x20update\x20can\x20update\x20at\x20most\x20','isArray','isSafeInteger','251455LDUOas','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','2208KMNNQv','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','1450056TElMAt','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','12cMvurA','length','map','1177ZoTUmG','1316210xtQusA','\x20records\x20per\x20call;\x20received\x20','join','string','7447980yxXvkf','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','validation','39870gSNXzv'];a177_0x522b=function(){return _0x169daf;};return a177_0x522b();}export function parseBatchCreateItemsFromParams(_0x56ae81){const _0x2d2e62=a177_0x1e73;if(Array[_0x2d2e62(0xe9)](_0x56ae81))return _0x56ae81;if(_0x56ae81!==null&&_0x56ae81!==undefined&&typeof _0x56ae81===_0x2d2e62(0xdb)&&Array[_0x2d2e62(0xe9)](_0x56ae81[_0x2d2e62(0xe1)]))return _0x56ae81[_0x2d2e62(0xe1)];throw CliErrors['validation'](_0x2d2e62(0xe2),_0x2d2e62(0xee));}function parseDataUpdateId(_0x22c084,_0x410995){const _0x1413e6=a177_0x1e73;if(typeof _0x22c084===_0x1413e6(0xe3)&&Number[_0x1413e6(0xea)](_0x22c084)&&_0x22c084>0x0)return _0x22c084;if(typeof _0x22c084===_0x1413e6(0xd6)){if(/^[1-9]\d*$/[_0x1413e6(0xde)](_0x22c084))return _0x22c084;}throw CliErrors[_0x1413e6(0xd9)](_0x1413e6(0xdc)+_0x410995+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}export function parseUpdateIdsFromParams(_0x5ae907){const _0xa04312=a177_0x1e73;if(_0x5ae907===null||_0x5ae907===undefined||typeof _0x5ae907!==_0xa04312(0xdb)||Array[_0xa04312(0xe9)](_0x5ae907))throw CliErrors[_0xa04312(0xd9)](_0xa04312(0xf0),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x5a6b2d=_0x5ae907['id'];if(_0x5a6b2d===undefined||_0x5a6b2d===null)throw CliErrors[_0xa04312(0xd9)](_0xa04312(0xe4),_0xa04312(0xd8));const _0x2231a5=Array['isArray'](_0x5a6b2d)?_0x5a6b2d:[_0x5a6b2d];if(_0x2231a5[_0xa04312(0xd0)]===0x0)throw CliErrors[_0xa04312(0xd9)](_0xa04312(0xec));if(_0x2231a5[_0xa04312(0xd0)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0xa04312(0xd9)](_0xa04312(0xe8)+MAX_DATA_UPDATE_IDS+_0xa04312(0xd4)+_0x2231a5[_0xa04312(0xd0)]+'.');return _0x2231a5[_0xa04312(0xd1)]((_0x2f7947,_0x9be5d)=>parseDataUpdateId(_0x2f7947,Array['isArray'](_0x5a6b2d)?_0xa04312(0xe5)+_0x9be5d+']':'id'));}export function normalizeUpdateParamsForRuntime(_0xee2337,_0xa97f1d){const _0x13ddee=a177_0x1e73;if(Array[_0x13ddee(0xe9)](_0xee2337['id'])&&_0xa97f1d[_0x13ddee(0xd0)]>0x1)return{..._0xee2337,'id':_0xa97f1d[_0x13ddee(0xd5)](',')};return _0xee2337;}
1
+ (function(_0x10e1c9,_0x4e1947){const _0x1604be=a177_0x498b,_0x16e171=_0x10e1c9();while(!![]){try{const _0x4d052c=parseInt(_0x1604be(0x184))/0x1*(parseInt(_0x1604be(0x179))/0x2)+-parseInt(_0x1604be(0x183))/0x3*(parseInt(_0x1604be(0x18d))/0x4)+parseInt(_0x1604be(0x17a))/0x5+parseInt(_0x1604be(0x17c))/0x6+parseInt(_0x1604be(0x188))/0x7*(-parseInt(_0x1604be(0x18e))/0x8)+parseInt(_0x1604be(0x17b))/0x9+-parseInt(_0x1604be(0x18c))/0xa;if(_0x4d052c===_0x4e1947)break;else _0x16e171['push'](_0x16e171['shift']());}catch(_0x131889){_0x16e171['push'](_0x16e171['shift']());}}}(a177_0x2166,0xc29fe));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x3c2ad9){const _0x29253d=a177_0x498b;if(!_0x3c2ad9)return undefined;try{return parseLosslessJson(_0x3c2ad9);}catch{throw CliErrors[_0x29253d(0x190)](_0x29253d(0x17f)+_0x3c2ad9);}}function a177_0x498b(_0x14dc06,_0x3e867b){_0x14dc06=_0x14dc06-0x178;const _0x2166bf=a177_0x2166();let _0x498b78=_0x2166bf[_0x14dc06];return _0x498b78;}export function parseJsonParamsValue(_0x1afdb0){const _0x3541c9=a177_0x498b;if(!_0x1afdb0)return undefined;try{return parseLosslessJson(_0x1afdb0);}catch{throw CliErrors[_0x3541c9(0x190)](_0x3541c9(0x17f)+_0x1afdb0);}}export function parseBatchCreateItemsFromParams(_0x5c7b28){const _0x217d0f=a177_0x498b;if(Array[_0x217d0f(0x192)](_0x5c7b28))return _0x5c7b28;if(_0x5c7b28!==null&&_0x5c7b28!==undefined&&typeof _0x5c7b28==='object'&&Array[_0x217d0f(0x192)](_0x5c7b28['items']))return _0x5c7b28['items'];throw CliErrors['validation'](_0x217d0f(0x185),_0x217d0f(0x17d));}function parseDataUpdateId(_0x1874a1,_0x3704b3){const _0x15140c=a177_0x498b;if(typeof _0x1874a1===_0x15140c(0x17e)&&Number[_0x15140c(0x178)](_0x1874a1)&&_0x1874a1>0x0)return _0x1874a1;if(typeof _0x1874a1===_0x15140c(0x18a)){if(/^[1-9]\d*$/[_0x15140c(0x187)](_0x1874a1))return _0x1874a1;}throw CliErrors[_0x15140c(0x190)]('data\x20update\x20--params.'+_0x3704b3+_0x15140c(0x181));}export function parseUpdateIdsFromParams(_0x49f50d){const _0x475505=a177_0x498b;if(_0x49f50d===null||_0x49f50d===undefined||typeof _0x49f50d!=='object'||Array[_0x475505(0x192)](_0x49f50d))throw CliErrors[_0x475505(0x190)](_0x475505(0x18b),_0x475505(0x180));const _0x485865=_0x49f50d['id'];if(_0x485865===undefined||_0x485865===null)throw CliErrors[_0x475505(0x190)](_0x475505(0x18f),_0x475505(0x180));const _0x452ece=Array[_0x475505(0x192)](_0x485865)?_0x485865:[_0x485865];if(_0x452ece[_0x475505(0x189)]===0x0)throw CliErrors[_0x475505(0x190)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x452ece['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x475505(0x190)](_0x475505(0x182)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x452ece[_0x475505(0x189)]+'.');return _0x452ece['map']((_0x595882,_0x44fc12)=>parseDataUpdateId(_0x595882,Array[_0x475505(0x192)](_0x485865)?_0x475505(0x186)+_0x44fc12+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x7bd6c0,_0x227126){const _0x1f0788=a177_0x498b;if(Array[_0x1f0788(0x192)](_0x7bd6c0['id'])&&_0x227126[_0x1f0788(0x189)]>0x1)return{..._0x7bd6c0,'id':_0x227126[_0x1f0788(0x191)](',')};return _0x7bd6c0;}function a177_0x2166(){const _0x127f6b=['string','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','32250470KligJR','100nIrJBD','144dbGUhg','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','validation','join','isArray','isSafeInteger','154006pQRDCw','3109695rbABVx','10903338GugPGS','8482170fUhfFa','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','number','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20can\x20update\x20at\x20most\x20','15699dGBwTI','20XgsEfx','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','id[','test','246603HKVPsW','length'];a177_0x2166=function(){return _0x127f6b;};return a177_0x2166();}