@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.2

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 (252) hide show
  1. package/lib/cli.d.ts +21 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.d.ts +38 -0
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.d.ts +61 -0
  6. package/lib/commands/app/cache.js +1 -1
  7. package/lib/commands/app/definitions.d.ts +26 -0
  8. package/lib/commands/app/definitions.js +1 -1
  9. package/lib/commands/app/eligibility.d.ts +16 -0
  10. package/lib/commands/app/eligibility.js +1 -1
  11. package/lib/commands/app/mock-loader.d.ts +41 -0
  12. package/lib/commands/app/mock-loader.js +1 -1
  13. package/lib/commands/app/remote-source.d.ts +66 -0
  14. package/lib/commands/app/remote-source.js +1 -1
  15. package/lib/commands/app/shared.d.ts +38 -0
  16. package/lib/commands/app/shared.js +1 -1
  17. package/lib/commands/app-config/get.d.ts +2 -0
  18. package/lib/commands/app-config/get.js +1 -1
  19. package/lib/commands/app-config/index.d.ts +2 -0
  20. package/lib/commands/app-config/index.js +1 -1
  21. package/lib/commands/artifact/index.d.ts +9 -0
  22. package/lib/commands/artifact/index.js +1 -1
  23. package/lib/commands/auth/device.d.ts +31 -0
  24. package/lib/commands/auth/device.js +1 -1
  25. package/lib/commands/auth/index.d.ts +23 -0
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/auth/prompt.d.ts +33 -0
  28. package/lib/commands/auth/prompt.js +1 -1
  29. package/lib/commands/bff/detail.d.ts +8 -0
  30. package/lib/commands/bff/detail.js +1 -1
  31. package/lib/commands/bff/exec.d.ts +19 -0
  32. package/lib/commands/bff/exec.js +1 -1
  33. package/lib/commands/bff/index.d.ts +15 -0
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/cli-skill/index.d.ts +9 -0
  36. package/lib/commands/cli-skill/index.js +1 -1
  37. package/lib/commands/common/config-policy.d.ts +80 -0
  38. package/lib/commands/common/config-policy.js +1 -1
  39. package/lib/commands/common/constraints.d.ts +67 -0
  40. package/lib/commands/common/constraints.js +1 -1
  41. package/lib/commands/common/flags.d.ts +41 -0
  42. package/lib/commands/common/flags.js +1 -1
  43. package/lib/commands/common/local-file.d.ts +6 -0
  44. package/lib/commands/common/local-file.js +1 -1
  45. package/lib/commands/config/definitions.d.ts +21 -0
  46. package/lib/commands/config/definitions.js +1 -1
  47. package/lib/commands/config/shared.d.ts +17 -0
  48. package/lib/commands/config/shared.js +1 -1
  49. package/lib/commands/data/index.d.ts +27 -0
  50. package/lib/commands/data/index.js +1 -1
  51. package/lib/commands/dataset/detail.d.ts +26 -0
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.d.ts +10 -0
  54. package/lib/commands/dataset/index.js +1 -1
  55. package/lib/commands/dataset/list.d.ts +18 -0
  56. package/lib/commands/dataset/list.js +1 -1
  57. package/lib/commands/dataset/sdk-doc.d.ts +6 -0
  58. package/lib/commands/dataset/sdk-doc.js +1 -1
  59. package/lib/commands/doctor.d.ts +23 -0
  60. package/lib/commands/doctor.js +1 -1
  61. package/lib/commands/file/index.d.ts +2 -0
  62. package/lib/commands/file/index.js +1 -1
  63. package/lib/commands/init.d.ts +32 -0
  64. package/lib/commands/init.js +1 -1
  65. package/lib/commands/kb/index.d.ts +8 -0
  66. package/lib/commands/kb/index.js +1 -1
  67. package/lib/commands/logs/index.d.ts +20 -0
  68. package/lib/commands/logs/index.js +1 -1
  69. package/lib/commands/ocr/index.d.ts +2 -0
  70. package/lib/commands/ocr/index.js +1 -1
  71. package/lib/commands/personal-bff/index.d.ts +5 -0
  72. package/lib/commands/personal-bff/index.js +1 -1
  73. package/lib/commands/registry.d.ts +56 -0
  74. package/lib/commands/registry.js +1 -1
  75. package/lib/commands/schedule/index.d.ts +2 -0
  76. package/lib/commands/schedule/index.js +1 -0
  77. package/lib/commands/schema.d.ts +18 -0
  78. package/lib/commands/schema.js +1 -1
  79. package/lib/commands/service/dynamic.d.ts +18 -0
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.d.ts +13 -0
  82. package/lib/commands/service/function-name-adapter.js +1 -1
  83. package/lib/commands/service/index.d.ts +2 -0
  84. package/lib/commands/service/index.js +1 -1
  85. package/lib/commands/service/registry.d.ts +102 -0
  86. package/lib/commands/service/registry.js +1 -1
  87. package/lib/commands/skill/commands/create.d.ts +2 -0
  88. package/lib/commands/skill/commands/create.js +1 -1
  89. package/lib/commands/skill/commands/install.d.ts +2 -0
  90. package/lib/commands/skill/commands/install.js +1 -1
  91. package/lib/commands/skill/commands/list.d.ts +2 -0
  92. package/lib/commands/skill/commands/list.js +1 -1
  93. package/lib/commands/skill/commands/push.d.ts +2 -0
  94. package/lib/commands/skill/commands/push.js +1 -1
  95. package/lib/commands/skill/commands/validate.d.ts +2 -0
  96. package/lib/commands/skill/commands/validate.js +1 -1
  97. package/lib/commands/skill/flags.d.ts +13 -0
  98. package/lib/commands/skill/flags.js +1 -1
  99. package/lib/commands/skill/index.d.ts +9 -0
  100. package/lib/commands/skill/index.js +1 -1
  101. package/lib/commands/skill/manifest-helpers.d.ts +5 -0
  102. package/lib/commands/skill/manifest-helpers.js +1 -1
  103. package/lib/commands/skill/push-execute.d.ts +49 -0
  104. package/lib/commands/skill/push-execute.js +1 -1
  105. package/lib/commands/skill/push-flow-helpers.d.ts +80 -0
  106. package/lib/commands/skill/push-flow-helpers.js +1 -1
  107. package/lib/commands/skill/push-retarget.d.ts +9 -0
  108. package/lib/commands/skill/push-retarget.js +1 -1
  109. package/lib/commands/skill/scopes.d.ts +13 -0
  110. package/lib/commands/skill/scopes.js +1 -1
  111. package/lib/commands/skill/summary.d.ts +6 -0
  112. package/lib/commands/skill/summary.js +1 -1
  113. package/lib/commands/skill/templates.d.ts +23 -0
  114. package/lib/commands/skill/templates.js +1 -1
  115. package/lib/commands/skill/validate.d.ts +20 -0
  116. package/lib/commands/skill/validate.js +1 -1
  117. package/lib/commands/sql/detail.d.ts +13 -0
  118. package/lib/commands/sql/detail.js +1 -1
  119. package/lib/commands/sql/exec.d.ts +21 -0
  120. package/lib/commands/sql/exec.js +1 -1
  121. package/lib/commands/sql/index.d.ts +9 -0
  122. package/lib/commands/sql/index.js +1 -1
  123. package/lib/commands/update.d.ts +10 -0
  124. package/lib/commands/update.js +1 -1
  125. package/lib/commands/workspace/index.d.ts +10 -0
  126. package/lib/commands/workspace/index.js +1 -1
  127. package/lib/config/schema.d.ts +108 -0
  128. package/lib/config/schema.js +1 -1
  129. package/lib/constant/app.d.ts +13 -0
  130. package/lib/constant/app.js +1 -1
  131. package/lib/constant/auth-mode.d.ts +28 -0
  132. package/lib/constant/auth-mode.js +1 -1
  133. package/lib/constant/cli.d.ts +86 -0
  134. package/lib/constant/cli.js +1 -1
  135. package/lib/constant/defaults.d.ts +45 -0
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/distribution.d.ts +12 -0
  138. package/lib/constant/distribution.js +1 -1
  139. package/lib/constant/domain.d.ts +57 -0
  140. package/lib/constant/domain.js +1 -1
  141. package/lib/constant/env.d.ts +56 -0
  142. package/lib/constant/env.js +1 -1
  143. package/lib/constant/output.d.ts +13 -0
  144. package/lib/constant/output.js +1 -1
  145. package/lib/constant/product.d.ts +79 -0
  146. package/lib/constant/product.js +1 -1
  147. package/lib/constant/risk.d.ts +14 -0
  148. package/lib/constant/risk.js +1 -1
  149. package/lib/constant/url.d.ts +14 -0
  150. package/lib/constant/url.js +1 -1
  151. package/lib/context.d.ts +287 -0
  152. package/lib/context.js +1 -1
  153. package/lib/core/api-client.d.ts +451 -0
  154. package/lib/core/api-client.js +1 -1
  155. package/lib/core/db-resolver.d.ts +39 -0
  156. package/lib/core/db-resolver.js +1 -1
  157. package/lib/core/sdk-client.d.ts +62 -0
  158. package/lib/core/sdk-client.js +1 -1
  159. package/lib/errors.d.ts +25 -0
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.d.ts +24 -0
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/dryrun.d.ts +64 -0
  164. package/lib/framework/dryrun.js +1 -1
  165. package/lib/framework/flags.d.ts +19 -0
  166. package/lib/framework/flags.js +1 -1
  167. package/lib/framework/help.d.ts +21 -0
  168. package/lib/framework/help.js +1 -1
  169. package/lib/framework/index.d.ts +10 -0
  170. package/lib/framework/index.js +1 -1
  171. package/lib/framework/output.d.ts +10 -0
  172. package/lib/framework/output.js +1 -1
  173. package/lib/framework/preparse.d.ts +64 -0
  174. package/lib/framework/preparse.js +1 -1
  175. package/lib/framework/rate-limit.d.ts +10 -0
  176. package/lib/framework/rate-limit.js +1 -1
  177. package/lib/framework/response.d.ts +10 -0
  178. package/lib/framework/response.js +1 -1
  179. package/lib/framework/runner-confirmation.d.ts +46 -0
  180. package/lib/framework/runner-confirmation.js +1 -1
  181. package/lib/framework/runner-error.d.ts +28 -0
  182. package/lib/framework/runner-error.js +1 -1
  183. package/lib/framework/runner.d.ts +102 -0
  184. package/lib/framework/runner.js +1 -1
  185. package/lib/framework/schema-export.d.ts +29 -0
  186. package/lib/framework/schema-export.js +1 -1
  187. package/lib/framework/service-order.d.ts +4 -0
  188. package/lib/framework/service-order.js +1 -1
  189. package/lib/framework/types.d.ts +108 -0
  190. package/lib/framework/types.js +1 -1
  191. package/lib/generated/build-info.d.ts +4 -0
  192. package/lib/generated/build-info.js +1 -1
  193. package/lib/help.d.ts +25 -0
  194. package/lib/help.js +1 -1
  195. package/lib/runtime/event.d.ts +16 -0
  196. package/lib/runtime/event.js +1 -0
  197. package/lib/runtime/index.d.ts +13 -0
  198. package/lib/runtime/index.js +1 -0
  199. package/lib/runtime/queue.d.ts +6 -0
  200. package/lib/runtime/queue.js +1 -0
  201. package/lib/runtime/resolve.d.ts +14 -0
  202. package/lib/runtime/resolve.js +1 -0
  203. package/lib/runtime/types.d.ts +59 -0
  204. package/lib/runtime/types.js +1 -0
  205. package/lib/skills/npx-skills-add.d.ts +42 -0
  206. package/lib/skills/npx-skills-add.js +1 -1
  207. package/lib/skills/runtime-skill-sync/constants.d.ts +4 -0
  208. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  209. package/lib/skills/runtime-skill-sync/fs-utils.d.ts +21 -0
  210. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  211. package/lib/skills/runtime-skill-sync/hashing.d.ts +9 -0
  212. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  213. package/lib/skills/runtime-skill-sync/links.d.ts +18 -0
  214. package/lib/skills/runtime-skill-sync/links.js +1 -1
  215. package/lib/skills/runtime-skill-sync/list-local.d.ts +3 -0
  216. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  217. package/lib/skills/runtime-skill-sync/local-files.d.ts +25 -0
  218. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  219. package/lib/skills/runtime-skill-sync/materialize.d.ts +11 -0
  220. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  221. package/lib/skills/runtime-skill-sync/metadata.d.ts +7 -0
  222. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  223. package/lib/skills/runtime-skill-sync/paths.d.ts +11 -0
  224. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  225. package/lib/skills/runtime-skill-sync/push.d.ts +33 -0
  226. package/lib/skills/runtime-skill-sync/push.js +1 -1
  227. package/lib/skills/runtime-skill-sync/scopes.d.ts +5 -0
  228. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  229. package/lib/skills/runtime-skill-sync/types.d.ts +105 -0
  230. package/lib/skills/runtime-skill-sync/zip-codec.d.ts +9 -0
  231. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  232. package/lib/skills/runtime-skill-sync/zip-package.d.ts +15 -0
  233. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  234. package/lib/skills/runtime-skill-sync.d.ts +15 -0
  235. package/lib/skills/runtime-skill-sync.js +1 -1
  236. package/lib/utils/apply-jq-filter.d.ts +25 -0
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/logger.d.ts +73 -0
  239. package/lib/utils/logger.js +1 -1
  240. package/lib/utils/lossless-json.d.ts +21 -0
  241. package/lib/utils/lossless-json.js +1 -1
  242. package/lib/utils/params.d.ts +65 -0
  243. package/lib/utils/params.js +1 -1
  244. package/lib/utils/platform.d.ts +17 -0
  245. package/lib/utils/platform.js +1 -1
  246. package/lib/utils/update-notice.d.ts +10 -0
  247. package/lib/utils/update-notice.js +1 -1
  248. package/lib/utils/version.d.ts +18 -0
  249. package/lib/utils/version.js +1 -1
  250. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  251. package/lib/utils/write-cli-side-channel.js +1 -1
  252. package/package.json +9 -1
@@ -1 +1 @@
1
- function a103_0x5ced(){const _0x2db730=['contents','delete','88iLaOWo','length','env','483607THaQPH','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','accessKey','skillName','6004638BWpjGi','description:\x20','find','fileHashes','path','appCode','5vqrEcT','test','.\x20Changed\x20file:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','8Lscxbd','toString','name:\x20','---\x0a','match','126917Wsotpn','7052010XxSajP','name','contentHash','isFile','displayName','stringify','entries','---','keys','trim','validation','1420376GLmjcx','join','map','trimEnd','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','has','406707vseQBd','paths','set','filter','utf8','description','errors','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','replace','4122675zDVNqP','pulledAt'];a103_0x5ced=function(){return _0x2db730;};return a103_0x5ced();}(function(_0xda60c3,_0x10e190){const _0x2f6cde=a103_0x334c,_0x23c80c=_0xda60c3();while(!![]){try{const _0x189c21=-parseInt(_0x2f6cde(0x148))/0x1+parseInt(_0x2f6cde(0x167))/0x2+parseInt(_0x2f6cde(0x16d))/0x3*(-parseInt(_0x2f6cde(0x156))/0x4)+parseInt(_0x2f6cde(0x152))/0x5*(parseInt(_0x2f6cde(0x14c))/0x6)+parseInt(_0x2f6cde(0x15b))/0x7*(-parseInt(_0x2f6cde(0x145))/0x8)+parseInt(_0x2f6cde(0x141))/0x9+-parseInt(_0x2f6cde(0x15c))/0xa;if(_0x189c21===_0x10e190)break;else _0x23c80c['push'](_0x23c80c['shift']());}catch(_0x477603){_0x23c80c['push'](_0x23c80c['shift']());}}}(a103_0x5ced,0x7c6d1));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';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x910000,_0x1b25e6,_0x3f9eb6){const _0x150cbd=a103_0x334c,_0x46f9c1=requireSkillCode(_0x910000),_0x1c2c83=requirePackageBytes(_0x46f9c1,_0x3f9eb6['packageBytes']),_0x27c09c=extractDownloadedPackage(_0x1c2c83),_0x35e0d0=_0x27c09c[_0x150cbd(0x14e)](_0x5b30e4=>_0x5b30e4['path']===SKILL_FILE);if(!_0x35e0d0)throw CliErrors[_0x150cbd(0x166)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x46f9c1);const _0x224041=withMaterializedSkillFrontmatter(_0x27c09c,_0x910000,_0x46f9c1),_0x4632cd=_0x224041[_0x150cbd(0x14e)](_0x1364c2=>_0x1364c2[_0x150cbd(0x150)]===SKILL_FILE),_0x36269f=fileText(_0x4632cd),_0x6210dd=getRuntimeSkillDir(_0x3f9eb6[_0x150cbd(0x147)],_0x3f9eb6[_0x150cbd(0x14a)],_0x3f9eb6[_0x150cbd(0x151)],_0x1b25e6,_0x46f9c1,_0x3f9eb6[_0x150cbd(0x16e)]),_0x2cb55b=resolve(_0x6210dd,SKILL_FILE),_0x20c46b=resolve(_0x6210dd,METADATA_FILE),_0x4c6097=contentHash(_0x36269f),_0x349abe=readMetadataIfPresent(_0x20c46b)?.[_0x150cbd(0x14f)];ensurePulledFilesCanBeOverwritten(_0x6210dd,_0x20c46b,_0x224041,_0x3f9eb6['force']===!![]),mkdirSync(_0x6210dd,{'recursive':!![],'mode':0x1c0});const _0x9bb633=existsSync(_0x2cb55b)?readFileSync(_0x2cb55b,'utf8'):undefined;return materializeFiles(_0x6210dd,_0x224041),removeStaleManagedFiles(_0x6210dd,_0x349abe,_0x224041),writeJsonAtomic(_0x20c46b,buildMetadata(_0x910000,_0x1b25e6,_0x3f9eb6[_0x150cbd(0x151)],_0x4c6097,_0x3f9eb6[_0x150cbd(0x142)],_0x224041,_0x1c2c83)),{'skill':_0x910000,'scope':_0x1b25e6,'dir':_0x6210dd,'skillMdPath':_0x2cb55b,'metadataPath':_0x20c46b,'contentHash':_0x4c6097,'changed':_0x9bb633!==_0x36269f};}function withMaterializedSkillFrontmatter(_0x32751f,_0x2edc43,_0x5357fd){const _0xf6403c=a103_0x334c,_0x20439f=skillDisplayName(_0x2edc43,_0x5357fd),_0x3a802e=_0x2edc43[_0xf6403c(0x172)]?.['trim']()||_0x20439f||_0x5357fd;return normalizeLocalFiles(_0x32751f)[_0xf6403c(0x169)](_0x13e7dc=>{const _0x1b28e2=_0xf6403c,_0x1a8f59=fileText(_0x13e7dc);if(_0x13e7dc[_0x1b28e2(0x150)]!==SKILL_FILE)return _0x13e7dc;if(hasYamlFrontmatter(_0x1a8f59))return{'path':_0x13e7dc[_0x1b28e2(0x150)],'content':withSyncedDisplayName(_0x1a8f59,_0x20439f)};return{'path':_0x13e7dc[_0x1b28e2(0x150)],'content':prependSkillFrontmatter(_0x1a8f59,{'name':_0x5357fd,'displayName':_0x20439f,'description':_0x3a802e})};});}function hasYamlFrontmatter(_0x1e80a7){const _0x8dd337=a103_0x334c;return/^\uFEFF?---\s*\r?\n/[_0x8dd337(0x153)](_0x1e80a7);}function prependSkillFrontmatter(_0x2a090b,_0x485e2a){const _0x248df6=a103_0x334c,_0x14149d=_0x2a090b[_0x248df6(0x140)](/^\uFEFF/,'');return[_0x248df6(0x163),_0x248df6(0x158)+yamlString(_0x485e2a[_0x248df6(0x15d)]),_0x485e2a['displayName']?'displayName:\x20'+yamlString(_0x485e2a[_0x248df6(0x160)]):undefined,_0x248df6(0x14d)+yamlString(_0x485e2a[_0x248df6(0x172)]),_0x248df6(0x163),'',_0x14149d][_0x248df6(0x170)](_0x3b08f1=>_0x3b08f1!==undefined)[_0x248df6(0x168)]('\x0a');}function a103_0x334c(_0xc7dd08,_0x57ece1){_0xc7dd08=_0xc7dd08-0x140;const _0x5cedd4=a103_0x5ced();let _0x334cee=_0x5cedd4[_0xc7dd08];return _0x334cee;}function yamlString(_0x2880cf){const _0x4295fd=a103_0x334c;return JSON[_0x4295fd(0x161)](_0x2880cf[_0x4295fd(0x140)](/\r/g,'')[_0x4295fd(0x165)]());}function skillDisplayName(_0x4c9825,_0x1b48d0){const _0x5076a2=a103_0x334c,_0x4bae5b=_0x4c9825[_0x5076a2(0x14b)]?.['trim']();return _0x4bae5b||_0x1b48d0;}function withSyncedDisplayName(_0x253b2,_0x3c81db){const _0x32dcf0=a103_0x334c,_0x4bba6b=_0x253b2[_0x32dcf0(0x15a)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bba6b)return _0x253b2;const _0x13727c=_0x4bba6b[0x1]??'',_0x57aa08=_0x4bba6b[0x2]??'',_0x826cbc=parseDocument(_0x57aa08);if(_0x826cbc[_0x32dcf0(0x173)][_0x32dcf0(0x146)]>0x0||!isMap(_0x826cbc['contents']))return _0x253b2;if(_0x3c81db)_0x826cbc[_0x32dcf0(0x16f)](_0x32dcf0(0x160),_0x3c81db);else{if(_0x826cbc[_0x32dcf0(0x16c)](_0x32dcf0(0x160)))_0x826cbc[_0x32dcf0(0x144)](_0x32dcf0(0x160));else return _0x253b2;}forceBlockCollections(_0x826cbc[_0x32dcf0(0x143)]);const _0x5a4e4b=_0x826cbc[_0x32dcf0(0x157)]({'lineWidth':0x0})[_0x32dcf0(0x16a)](),_0x57c4b2=_0x253b2['slice'](_0x4bba6b[0x0][_0x32dcf0(0x146)])[_0x32dcf0(0x140)](/^\r?\n/,'');return _0x13727c+_0x32dcf0(0x159)+_0x5a4e4b+'\x0a---\x0a\x0a'+_0x57c4b2;}function forceBlockCollections(_0x585a6e){if(!isNode(_0x585a6e))return;visit(_0x585a6e,(_0x5ca3c9,_0x2ea0e4)=>{isCollection(_0x2ea0e4)&&(_0x2ea0e4['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1c3e6b,_0x312684,_0x4f2a2d,_0x45a699){const _0x4429a6=a103_0x334c;if(_0x45a699||!existsSync(_0x312684))return;const _0x436aa0=readMetadataIfPresent(_0x312684);if(!_0x436aa0)return;const _0x287f51=_0x436aa0['fileHashes']&&Object[_0x4429a6(0x164)](_0x436aa0[_0x4429a6(0x14f)])[_0x4429a6(0x146)]>0x0?_0x436aa0[_0x4429a6(0x14f)]:undefined;if(_0x287f51)for(const [_0x4e7f37,_0x3a3931]of Object[_0x4429a6(0x162)](_0x287f51)){const _0x237af6=resolveManagedFilePath(_0x1c3e6b,_0x4e7f37);if(!existsSync(_0x237af6))throw CliErrors['validation'](_0x4429a6(0x149)+_0x1c3e6b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x4e7f37);const _0x5d2cc9=lstatSync(_0x237af6);if(!_0x5d2cc9[_0x4429a6(0x15f)]())throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x4e7f37);const _0x4f4b48=bufferSha256(readFileSync(_0x237af6));if(_0x4f4b48!==_0x3a3931)throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b+_0x4429a6(0x154)+_0x4e7f37,_0x4429a6(0x174)+_0x4e7f37);}else{const _0x50e858=resolve(_0x1c3e6b,SKILL_FILE);if(existsSync(_0x50e858)&&_0x436aa0['contentHash']){const _0x11466d=contentHash(readFileSync(_0x50e858,_0x4429a6(0x171)));if(_0x11466d!==_0x436aa0[_0x4429a6(0x15e)])throw CliErrors['validation'](_0x4429a6(0x155)+_0x50e858,_0x4429a6(0x16b));}}for(const _0x3d71f8 of normalizeLocalFiles(_0x4f2a2d)){if(_0x287f51?.[_0x3d71f8[_0x4429a6(0x150)]])continue;if(!_0x287f51&&_0x3d71f8[_0x4429a6(0x150)]===SKILL_FILE)continue;const _0x423087=resolveManagedFilePath(_0x1c3e6b,_0x3d71f8[_0x4429a6(0x150)]);if(!existsSync(_0x423087))continue;const _0x6fbfe1=lstatSync(_0x423087);if(!_0x6fbfe1['isFile']())throw CliErrors[_0x4429a6(0x166)](_0x4429a6(0x149)+_0x1c3e6b,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3d71f8[_0x4429a6(0x150)]);const _0x4fb6ec=bufferSha256(readFileSync(_0x423087));if(_0x4fb6ec!==fileHash(_0x3d71f8))throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3d71f8[_0x4429a6(0x150)]);}}function materializeFiles(_0x467793,_0x354d2e){const _0x5ad738=a103_0x334c;for(const _0xcb7706 of normalizeLocalFiles(_0x354d2e)){const _0x896409=resolveManagedFilePath(_0x467793,_0xcb7706[_0x5ad738(0x150)]);mkdirSync(dirname(_0x896409),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x896409,fileContent(_0xcb7706),0x180);}}function removeStaleManagedFiles(_0x5e0355,_0x494d65,_0x12bd64){const _0x5bd2e2=a103_0x334c;if(!_0x494d65)return;const _0x41d224=new Set(normalizeLocalFiles(_0x12bd64)[_0x5bd2e2(0x169)](_0x7b96cb=>_0x7b96cb[_0x5bd2e2(0x150)]));for(const _0x2ac9f9 of Object[_0x5bd2e2(0x164)](_0x494d65)){if(_0x41d224['has'](_0x2ac9f9))continue;const _0x259caa=resolveManagedFilePath(_0x5e0355,_0x2ac9f9);existsSync(_0x259caa)&&lstatSync(_0x259caa)[_0x5bd2e2(0x15f)]()&&rmSync(_0x259caa,{'force':!![]});}}
1
+ (function(_0x525398,_0x41d0be){const _0x32441d=a109_0x5043,_0x544a53=_0x525398();while(!![]){try{const _0x4a0f46=-parseInt(_0x32441d(0x1d5))/0x1+parseInt(_0x32441d(0x1c4))/0x2+-parseInt(_0x32441d(0x1c3))/0x3*(-parseInt(_0x32441d(0x1d9))/0x4)+-parseInt(_0x32441d(0x1c9))/0x5+-parseInt(_0x32441d(0x1be))/0x6+-parseInt(_0x32441d(0x1e6))/0x7*(-parseInt(_0x32441d(0x1c7))/0x8)+-parseInt(_0x32441d(0x1dc))/0x9;if(_0x4a0f46===_0x41d0be)break;else _0x544a53['push'](_0x544a53['shift']());}catch(_0x282686){_0x544a53['push'](_0x544a53['shift']());}}}(a109_0x2c1f,0x68578));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';function a109_0x2c1f(){const _0x3f3b55=['Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','3077523nABpmW','contents','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','trim','find','map','join','validation','---\x0a','delete','35ETSnGB','isFile','description','match','trimEnd','errors','test','filter','name','length','utf8','slice','510654OnpGjz','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','.\x20Changed\x20file:\x20','env','paths','17616jZEauW','1331602UbaKpe','Runtime\x20Skill\x20package\x20is\x20missing\x20','replace','125752VlzCnY','description:\x20','229705PVtyXa','contentHash','accessKey','appCode','keys','displayName','skillName','stringify','---','has','path','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','331391FpbFAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','entries','fileHashes','332tJWYxi','set'];a109_0x2c1f=function(){return _0x3f3b55;};return a109_0x2c1f();}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 a109_0x5043(_0x486233,_0x13d6e9){_0x486233=_0x486233-0x1b8;const _0x2c1fa1=a109_0x2c1f();let _0x5043eb=_0x2c1fa1[_0x486233];return _0x5043eb;}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4bd8ee,_0x142e54,_0x2b03cd){const _0x408335=a109_0x5043,_0x1c0bdc=requireSkillCode(_0x4bd8ee),_0xe337ce=requirePackageBytes(_0x1c0bdc,_0x2b03cd['packageBytes']),_0x37e897=extractDownloadedPackage(_0xe337ce),_0x168468=_0x37e897[_0x408335(0x1e0)](_0xc1df4f=>_0xc1df4f[_0x408335(0x1d3)]===SKILL_FILE);if(!_0x168468)throw CliErrors[_0x408335(0x1e3)](_0x408335(0x1c5)+SKILL_FILE+':\x20'+_0x1c0bdc);const _0x252535=withMaterializedSkillFrontmatter(_0x37e897,_0x4bd8ee,_0x1c0bdc),_0x10df5a=_0x252535[_0x408335(0x1e0)](_0x3985c6=>_0x3985c6[_0x408335(0x1d3)]===SKILL_FILE),_0x5851c5=fileText(_0x10df5a),_0x4b15b8=getRuntimeSkillDir(_0x2b03cd[_0x408335(0x1c1)],_0x2b03cd[_0x408335(0x1cb)],_0x2b03cd[_0x408335(0x1cc)],_0x142e54,_0x1c0bdc,_0x2b03cd[_0x408335(0x1c2)]),_0x1268ec=resolve(_0x4b15b8,SKILL_FILE),_0x25c5a0=resolve(_0x4b15b8,METADATA_FILE),_0x112872=contentHash(_0x5851c5),_0x3b22c4=readMetadataIfPresent(_0x25c5a0)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x4b15b8,_0x25c5a0,_0x252535,_0x2b03cd['force']===!![]),mkdirSync(_0x4b15b8,{'recursive':!![],'mode':0x1c0});const _0x262a2d=existsSync(_0x1268ec)?readFileSync(_0x1268ec,_0x408335(0x1bc)):undefined;return materializeFiles(_0x4b15b8,_0x252535),removeStaleManagedFiles(_0x4b15b8,_0x3b22c4,_0x252535),writeJsonAtomic(_0x25c5a0,buildMetadata(_0x4bd8ee,_0x142e54,_0x2b03cd['appCode'],_0x112872,_0x2b03cd['pulledAt'],_0x252535,_0xe337ce)),{'skill':_0x4bd8ee,'scope':_0x142e54,'dir':_0x4b15b8,'skillMdPath':_0x1268ec,'metadataPath':_0x25c5a0,'contentHash':_0x112872,'changed':_0x262a2d!==_0x5851c5};}function withMaterializedSkillFrontmatter(_0xf9256c,_0x4998,_0x514200){const _0x17d1d6=a109_0x5043,_0x5baae3=skillDisplayName(_0x4998,_0x514200),_0x48a3ea=_0x4998['description']?.['trim']()||_0x5baae3||_0x514200;return normalizeLocalFiles(_0xf9256c)[_0x17d1d6(0x1e1)](_0x301ecb=>{const _0x1fe972=_0x17d1d6,_0x513edf=fileText(_0x301ecb);if(_0x301ecb[_0x1fe972(0x1d3)]!==SKILL_FILE)return _0x301ecb;if(hasYamlFrontmatter(_0x513edf))return{'path':_0x301ecb[_0x1fe972(0x1d3)],'content':withSyncedDisplayName(_0x513edf,_0x5baae3)};return{'path':_0x301ecb['path'],'content':prependSkillFrontmatter(_0x513edf,{'name':_0x514200,'displayName':_0x5baae3,'description':_0x48a3ea})};});}function hasYamlFrontmatter(_0x3f9e22){const _0x315842=a109_0x5043;return/^\uFEFF?---\s*\r?\n/[_0x315842(0x1b8)](_0x3f9e22);}function prependSkillFrontmatter(_0x538530,_0x1940a3){const _0x15c3fb=a109_0x5043,_0x5345a1=_0x538530[_0x15c3fb(0x1c6)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x1940a3[_0x15c3fb(0x1ba)]),_0x1940a3[_0x15c3fb(0x1ce)]?'displayName:\x20'+yamlString(_0x1940a3[_0x15c3fb(0x1ce)]):undefined,_0x15c3fb(0x1c8)+yamlString(_0x1940a3[_0x15c3fb(0x1e8)]),_0x15c3fb(0x1d1),'',_0x5345a1][_0x15c3fb(0x1b9)](_0x1cad71=>_0x1cad71!==undefined)[_0x15c3fb(0x1e2)]('\x0a');}function yamlString(_0x432cf0){const _0x206151=a109_0x5043;return JSON[_0x206151(0x1d0)](_0x432cf0[_0x206151(0x1c6)](/\r/g,'')[_0x206151(0x1df)]());}function skillDisplayName(_0x5e59a8,_0x569cb0){const _0x4fb433=a109_0x5043,_0x1199a7=_0x5e59a8[_0x4fb433(0x1cf)]?.[_0x4fb433(0x1df)]();return _0x1199a7||_0x569cb0;}function withSyncedDisplayName(_0x44d2e1,_0x535f2a){const _0x17da01=a109_0x5043,_0x5c2ea4=_0x44d2e1[_0x17da01(0x1e9)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5c2ea4)return _0x44d2e1;const _0xaa037d=_0x5c2ea4[0x1]??'',_0x415712=_0x5c2ea4[0x2]??'',_0x11cf25=parseDocument(_0x415712);if(_0x11cf25[_0x17da01(0x1eb)]['length']>0x0||!isMap(_0x11cf25[_0x17da01(0x1dd)]))return _0x44d2e1;if(_0x535f2a)_0x11cf25[_0x17da01(0x1da)](_0x17da01(0x1ce),_0x535f2a);else{if(_0x11cf25[_0x17da01(0x1d2)](_0x17da01(0x1ce)))_0x11cf25[_0x17da01(0x1e5)]('displayName');else return _0x44d2e1;}forceBlockCollections(_0x11cf25[_0x17da01(0x1dd)]);const _0x1e7cf5=_0x11cf25['toString']({'lineWidth':0x0})[_0x17da01(0x1ea)](),_0x1e524f=_0x44d2e1[_0x17da01(0x1bd)](_0x5c2ea4[0x0][_0x17da01(0x1bb)])[_0x17da01(0x1c6)](/^\r?\n/,'');return _0xaa037d+_0x17da01(0x1e4)+_0x1e7cf5+'\x0a---\x0a\x0a'+_0x1e524f;}function forceBlockCollections(_0x5f02c2){if(!isNode(_0x5f02c2))return;visit(_0x5f02c2,(_0x5145f3,_0x1d4370)=>{isCollection(_0x1d4370)&&(_0x1d4370['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x148b0a,_0x5a689f,_0x4033ac,_0x1a5465){const _0x2382d1=a109_0x5043;if(_0x1a5465||!existsSync(_0x5a689f))return;const _0x4b8f5d=readMetadataIfPresent(_0x5a689f);if(!_0x4b8f5d)return;const _0x4d783d=_0x4b8f5d[_0x2382d1(0x1d8)]&&Object['keys'](_0x4b8f5d[_0x2382d1(0x1d8)])['length']>0x0?_0x4b8f5d[_0x2382d1(0x1d8)]:undefined;if(_0x4d783d)for(const [_0x546094,_0xaec870]of Object[_0x2382d1(0x1d7)](_0x4d783d)){const _0x82c2ea=resolveManagedFilePath(_0x148b0a,_0x546094);if(!existsSync(_0x82c2ea))throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x546094);const _0x4c8aaf=lstatSync(_0x82c2ea);if(!_0x4c8aaf[_0x2382d1(0x1e7)]())throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,_0x2382d1(0x1d4)+_0x546094);const _0x52fec4=bufferSha256(readFileSync(_0x82c2ea));if(_0x52fec4!==_0xaec870)throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a+_0x2382d1(0x1c0)+_0x546094,_0x2382d1(0x1db)+_0x546094);}else{const _0x3b421a=resolve(_0x148b0a,SKILL_FILE);if(existsSync(_0x3b421a)&&_0x4b8f5d[_0x2382d1(0x1ca)]){const _0x5c95a3=contentHash(readFileSync(_0x3b421a,'utf8'));if(_0x5c95a3!==_0x4b8f5d[_0x2382d1(0x1ca)])throw CliErrors[_0x2382d1(0x1e3)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3b421a,_0x2382d1(0x1d6));}}for(const _0x217cdb of normalizeLocalFiles(_0x4033ac)){if(_0x4d783d?.[_0x217cdb['path']])continue;if(!_0x4d783d&&_0x217cdb[_0x2382d1(0x1d3)]===SKILL_FILE)continue;const _0x54834c=resolveManagedFilePath(_0x148b0a,_0x217cdb[_0x2382d1(0x1d3)]);if(!existsSync(_0x54834c))continue;const _0x47c788=lstatSync(_0x54834c);if(!_0x47c788['isFile']())throw CliErrors[_0x2382d1(0x1e3)](_0x2382d1(0x1bf)+_0x148b0a,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x217cdb[_0x2382d1(0x1d3)]);const _0x608654=bufferSha256(readFileSync(_0x54834c));if(_0x608654!==fileHash(_0x217cdb))throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,_0x2382d1(0x1de)+_0x217cdb[_0x2382d1(0x1d3)]);}}function materializeFiles(_0x533187,_0x2afe54){for(const _0x163eb6 of normalizeLocalFiles(_0x2afe54)){const _0x17b26f=resolveManagedFilePath(_0x533187,_0x163eb6['path']);mkdirSync(dirname(_0x17b26f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x17b26f,fileContent(_0x163eb6),0x180);}}function removeStaleManagedFiles(_0x483dfa,_0x4175fe,_0x4db3ff){const _0x1bdc64=a109_0x5043;if(!_0x4175fe)return;const _0x508cc9=new Set(normalizeLocalFiles(_0x4db3ff)['map'](_0x269155=>_0x269155[_0x1bdc64(0x1d3)]));for(const _0x34ff10 of Object[_0x1bdc64(0x1cd)](_0x4175fe)){if(_0x508cc9[_0x1bdc64(0x1d2)](_0x34ff10))continue;const _0x4416ec=resolveManagedFilePath(_0x483dfa,_0x34ff10);existsSync(_0x4416ec)&&lstatSync(_0x4416ec)[_0x1bdc64(0x1e7)]()&&rmSync(_0x4416ec,{'force':!![]});}}
@@ -0,0 +1,7 @@
1
+ import type { LocalSkillFile, RuntimeSkillItem, RuntimeSkillMetadata, RuntimeSkillScope } from "./types.js";
2
+ /** Builds the local metadata record used to detect edits and list installed Skills. */
3
+ export declare function buildMetadata(skill: RuntimeSkillItem, scope: RuntimeSkillScope, appCode: string, hash: string, pulledAt?: string, files?: LocalSkillFile[], packageBytes?: Buffer): RuntimeSkillMetadata;
4
+ /** Requires a non-empty backend skillCode before filesystem operations. */
5
+ export declare function requireSkillCode(skill: RuntimeSkillItem): string;
6
+ /** Reads local runtime Skill metadata, returning undefined when it is absent. */
7
+ export declare function readMetadataIfPresent(path: string): RuntimeSkillMetadata | undefined;
@@ -1 +1 @@
1
- (function(_0xf7ac8e,_0x3dba8a){const _0x52791a=a104_0x570e,_0x51f370=_0xf7ac8e();while(!![]){try{const _0x41f78a=-parseInt(_0x52791a(0x1b5))/0x1+-parseInt(_0x52791a(0x1b7))/0x2+-parseInt(_0x52791a(0x1af))/0x3*(parseInt(_0x52791a(0x1a6))/0x4)+parseInt(_0x52791a(0x1a3))/0x5*(-parseInt(_0x52791a(0x1ba))/0x6)+-parseInt(_0x52791a(0x1a5))/0x7+-parseInt(_0x52791a(0x1b1))/0x8*(-parseInt(_0x52791a(0x199))/0x9)+-parseInt(_0x52791a(0x1a1))/0xa*(-parseInt(_0x52791a(0x1ac))/0xb);if(_0x41f78a===_0x3dba8a)break;else _0x51f370['push'](_0x51f370['shift']());}catch(_0x35db08){_0x51f370['push'](_0x51f370['shift']());}}}(a104_0x8df7,0xa3b1d));function a104_0x8df7(){const _0x2552b8=['length','version','skillCode','710VgZldK','trim','303965AAykRM','map','3455354TzLMti','1260bCGbfN','tenantCode','status','readonly','string','userId','497629aPUUHY','ossPath','zipSize','8229ebEedj','description','448VSwPVW','validation','tags','personal','41410OWEuvD','files','1922774oaDuao','manifest','object','24axuzoh','skillName','isArray','zipSha256','path','parse','9990akAwDc','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','forkedFromSkillId','hasUpstreamUpdate'];a104_0x8df7=function(){return _0x2552b8;};return a104_0x8df7();}import{existsSync,readFileSync}from'node:fs';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(_0x6e09cd,_0x24ce30,_0x54fcd2,_0x47c4f6,_0x1b0996,_0x4297f8,_0x1a1b11){const _0x4a452f=a104_0x570e,_0x1751bf=_0x4297f8?normalizeLocalFiles(_0x4297f8):[],_0x278af8=!_0x1a1b11&&_0x1751bf[_0x4a452f(0x19e)]>0x0?buildSkillPackage(_0x1751bf):undefined,_0x148298=_0x1a1b11?bufferSha256(_0x1a1b11):_0x278af8?.[_0x4a452f(0x1b8)][_0x4a452f(0x196)],_0x2a0bb6=_0x1a1b11?.[_0x4a452f(0x19e)]??_0x278af8?.['manifest'][_0x4a452f(0x1ae)],_0x1c28b7=_0x1751bf['length']>0x0?Object['fromEntries'](_0x1751bf[_0x4a452f(0x1a4)](_0x1906c7=>[_0x1906c7[_0x4a452f(0x197)],fileHash(_0x1906c7)])):undefined;return{'schemaVersion':_0x1751bf[_0x4a452f(0x19e)]>0x0?0x2:0x1,'id':_0x6e09cd['id'],'appCode':_0x54fcd2,'skillCode':requireSkillCode(_0x6e09cd),'skillName':_0x6e09cd[_0x4a452f(0x1bb)],'description':_0x6e09cd[_0x4a452f(0x1b0)],'scope':_0x24ce30,'readonly':_0x24ce30!==_0x4a452f(0x1b4)||_0x6e09cd[_0x4a452f(0x1a9)]===!![],'tenantCode':_0x6e09cd[_0x4a452f(0x1a7)],'userId':_0x6e09cd[_0x4a452f(0x1ab)],'version':_0x6e09cd[_0x4a452f(0x19f)],'status':_0x6e09cd[_0x4a452f(0x1a8)],'tags':Array[_0x4a452f(0x195)](_0x6e09cd[_0x4a452f(0x1b3)])?_0x6e09cd[_0x4a452f(0x1b3)]:[],'hasUpstreamUpdate':_0x6e09cd[_0x4a452f(0x19d)],'forkedFromSkillId':_0x6e09cd[_0x4a452f(0x19c)],'forkedFromVersion':_0x6e09cd['forkedFromVersion'],'sourceSessionId':_0x6e09cd['sourceSessionId'],'contentHash':_0x47c4f6,'fileHashes':_0x1c28b7,'treeHash':_0x1751bf[_0x4a452f(0x19e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x1751bf)):undefined,'ossPath':remoteManifestOssPath(_0x6e09cd[_0x4a452f(0x1b6)]),'zipSha256':_0x148298,'zipSize':_0x2a0bb6,'files':_0x1751bf[_0x4a452f(0x19e)]>0x0?_0x1751bf[_0x4a452f(0x1a4)](_0x201e2f=>({'path':_0x201e2f['path'],'hash':fileHash(_0x201e2f),'size':fileContent(_0x201e2f)[_0x4a452f(0x19e)]})):undefined,'pulledAt':_0x1b0996??new Date()['toISOString']()};}export function requireSkillCode(_0xd8d73a){const _0x1c3c6c=a104_0x570e,_0x3d6c6d=_0xd8d73a[_0x1c3c6c(0x1a0)]?.[_0x1c3c6c(0x1a2)]();if(!_0x3d6c6d)throw CliErrors[_0x1c3c6c(0x1b2)](_0x1c3c6c(0x19a));return _0x3d6c6d;}function a104_0x570e(_0x281ffa,_0x31e954){_0x281ffa=_0x281ffa-0x195;const _0x8df74=a104_0x8df7();let _0x570ebd=_0x8df74[_0x281ffa];return _0x570ebd;}export function readMetadataIfPresent(_0x2e76b4){const _0xc04701=a104_0x570e;if(!existsSync(_0x2e76b4))return undefined;try{const _0x338173=JSON[_0xc04701(0x198)](readFileSync(_0x2e76b4,_0xc04701(0x19b)));return _0x338173;}catch{throw CliErrors[_0xc04701(0x1b2)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x2e76b4);}}function remoteManifestOssPath(_0x328160){const _0xff40c8=a104_0x570e;if(!_0x328160||typeof _0x328160!==_0xff40c8(0x1b9)||Array['isArray'](_0x328160))return undefined;const _0x51e7f1=_0x328160[_0xff40c8(0x1ad)];return typeof _0x51e7f1===_0xff40c8(0x1aa)&&_0x51e7f1[_0xff40c8(0x1a2)]()?_0x51e7f1[_0xff40c8(0x1a2)]():undefined;}
1
+ (function(_0x510413,_0x456e65){const _0x36b61c=a110_0xd1f8,_0xb82b16=_0x510413();while(!![]){try{const _0x3ccecd=-parseInt(_0x36b61c(0xa4))/0x1+-parseInt(_0x36b61c(0x99))/0x2+-parseInt(_0x36b61c(0x96))/0x3*(-parseInt(_0x36b61c(0x8f))/0x4)+parseInt(_0x36b61c(0x95))/0x5+parseInt(_0x36b61c(0xa8))/0x6*(parseInt(_0x36b61c(0xab))/0x7)+parseInt(_0x36b61c(0x9c))/0x8*(-parseInt(_0x36b61c(0x8b))/0x9)+parseInt(_0x36b61c(0xa3))/0xa;if(_0x3ccecd===_0x456e65)break;else _0xb82b16['push'](_0xb82b16['shift']());}catch(_0x318927){_0xb82b16['push'](_0xb82b16['shift']());}}}(a110_0x17f6,0xca2cc));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a110_0x17f6(){const _0x306ebb=['map','object','length','zipSize','4889705CmfkvK','3585DhySDQ','userId','forkedFromVersion','1421496HLDoEY','manifest','tags','8KTKcaN','tenantCode','fromEntries','path','forkedFromSkillId','readonly','isArray','5163490CYbbfc','1029512dsmGMA','string','skillCode','personal','33906KDQogB','description','validation','1708WxauRq','Runtime\x20Skill\x20is\x20missing\x20skillCode.','version','trim','ossPath','files','6991119nQNhPQ','status','zipSha256','utf8','1580JWvHBy','hasUpstreamUpdate'];a110_0x17f6=function(){return _0x306ebb;};return a110_0x17f6();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a110_0xd1f8(_0x5468dd,_0x3eb4e9){_0x5468dd=_0x5468dd-0x88;const _0x17f6bd=a110_0x17f6();let _0xd1f8ed=_0x17f6bd[_0x5468dd];return _0xd1f8ed;}export function buildMetadata(_0xb05eb0,_0x204025,_0x458ad4,_0x4fbb99,_0x108a3b,_0x3ecad1,_0x28ea93){const _0x5ec5af=a110_0xd1f8,_0xe945e4=_0x3ecad1?normalizeLocalFiles(_0x3ecad1):[],_0x245682=!_0x28ea93&&_0xe945e4['length']>0x0?buildSkillPackage(_0xe945e4):undefined,_0x4d20a2=_0x28ea93?bufferSha256(_0x28ea93):_0x245682?.[_0x5ec5af(0x9a)][_0x5ec5af(0x8d)],_0x43ebc5=_0x28ea93?.['length']??_0x245682?.[_0x5ec5af(0x9a)][_0x5ec5af(0x94)],_0x3a7235=_0xe945e4[_0x5ec5af(0x93)]>0x0?Object[_0x5ec5af(0x9e)](_0xe945e4[_0x5ec5af(0x91)](_0x320b65=>[_0x320b65[_0x5ec5af(0x9f)],fileHash(_0x320b65)])):undefined;return{'schemaVersion':_0xe945e4[_0x5ec5af(0x93)]>0x0?0x2:0x1,'id':_0xb05eb0['id'],'appCode':_0x458ad4,'skillCode':requireSkillCode(_0xb05eb0),'skillName':_0xb05eb0['skillName'],'description':_0xb05eb0[_0x5ec5af(0xa9)],'scope':_0x204025,'readonly':_0x204025!==_0x5ec5af(0xa7)||_0xb05eb0[_0x5ec5af(0xa1)]===!![],'tenantCode':_0xb05eb0[_0x5ec5af(0x9d)],'userId':_0xb05eb0[_0x5ec5af(0x97)],'version':_0xb05eb0[_0x5ec5af(0xad)],'status':_0xb05eb0[_0x5ec5af(0x8c)],'tags':Array['isArray'](_0xb05eb0[_0x5ec5af(0x9b)])?_0xb05eb0['tags']:[],'hasUpstreamUpdate':_0xb05eb0[_0x5ec5af(0x90)],'forkedFromSkillId':_0xb05eb0[_0x5ec5af(0xa0)],'forkedFromVersion':_0xb05eb0[_0x5ec5af(0x98)],'sourceSessionId':_0xb05eb0['sourceSessionId'],'contentHash':_0x4fbb99,'fileHashes':_0x3a7235,'treeHash':_0xe945e4[_0x5ec5af(0x93)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xe945e4)):undefined,'ossPath':remoteManifestOssPath(_0xb05eb0[_0x5ec5af(0x8a)]),'zipSha256':_0x4d20a2,'zipSize':_0x43ebc5,'files':_0xe945e4[_0x5ec5af(0x93)]>0x0?_0xe945e4[_0x5ec5af(0x91)](_0xdeffca=>({'path':_0xdeffca[_0x5ec5af(0x9f)],'hash':fileHash(_0xdeffca),'size':fileContent(_0xdeffca)[_0x5ec5af(0x93)]})):undefined,'pulledAt':_0x108a3b??new Date()['toISOString']()};}export function requireSkillCode(_0x912ff8){const _0x46dfd6=a110_0xd1f8,_0x5c202c=_0x912ff8[_0x46dfd6(0xa6)]?.[_0x46dfd6(0x88)]();if(!_0x5c202c)throw CliErrors[_0x46dfd6(0xaa)](_0x46dfd6(0xac));return _0x5c202c;}export function readMetadataIfPresent(_0x53c847){const _0x38c59d=a110_0xd1f8;if(!existsSync(_0x53c847))return undefined;try{const _0x3c0e00=JSON['parse'](readFileSync(_0x53c847,_0x38c59d(0x8e)));return _0x3c0e00;}catch{throw CliErrors[_0x38c59d(0xaa)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x53c847);}}function remoteManifestOssPath(_0x26025e){const _0x4ec848=a110_0xd1f8;if(!_0x26025e||typeof _0x26025e!==_0x4ec848(0x92)||Array[_0x4ec848(0xa2)](_0x26025e))return undefined;const _0x7bc21b=_0x26025e[_0x4ec848(0x89)];return typeof _0x7bc21b===_0x4ec848(0xa5)&&_0x7bc21b[_0x4ec848(0x88)]()?_0x7bc21b[_0x4ec848(0x88)]():undefined;}
@@ -0,0 +1,11 @@
1
+ import type { RuntimeSkillScope, SkillSyncPaths, SkillSyncPathsOptions } from "./types.js";
2
+ /** Resolves all local roots involved in runtime Skill cache and link sync. */
3
+ export declare function resolveSkillSyncPaths(options?: SkillSyncPathsOptions): SkillSyncPaths;
4
+ /** Returns all user-level agent Skill roots that should receive runtime Skill links. */
5
+ export declare function runtimeAgentSkillRoots(paths: SkillSyncPaths): string[];
6
+ /** Returns the access-key partitioned runtime Skill cache root. */
7
+ export declare function getRuntimeSkillCacheRoot(env: "production" | "development" | "daily", accessKey: string, options?: SkillSyncPathsOptions): string;
8
+ /** Returns the managed cache directory for one app, scope, and skill code. */
9
+ export declare function getRuntimeSkillDir(env: "production" | "development" | "daily", accessKey: string, appCode: string, scope: RuntimeSkillScope, skillCode: string, options?: SkillSyncPathsOptions): string;
10
+ /** Validates a user or backend value before using it as one path segment. */
11
+ export declare function safePathSegment(value: string, label?: string): string;
@@ -1 +1 @@
1
- const a105_0x1456a9=a105_0x1a34;(function(_0x15f5a7,_0x478957){const _0x156272=a105_0x1a34,_0x1dd379=_0x15f5a7();while(!![]){try{const _0x2e1b3c=-parseInt(_0x156272(0x170))/0x1*(parseInt(_0x156272(0x172))/0x2)+-parseInt(_0x156272(0x17c))/0x3*(parseInt(_0x156272(0x167))/0x4)+parseInt(_0x156272(0x176))/0x5+-parseInt(_0x156272(0x169))/0x6*(parseInt(_0x156272(0x16c))/0x7)+parseInt(_0x156272(0x166))/0x8*(-parseInt(_0x156272(0x174))/0x9)+parseInt(_0x156272(0x168))/0xa+parseInt(_0x156272(0x165))/0xb;if(_0x2e1b3c===_0x478957)break;else _0x1dd379['push'](_0x1dd379['shift']());}catch(_0x3a4625){_0x1dd379['push'](_0x1dd379['shift']());}}}(a105_0x1129,0x3c294));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a105_0x1129(){const _0x1db454=['skills','10004676gaJboi','6232NeoYYG','226524qnRBxq','2414890BuzJBH','61866xyJKyg','path\x20segment','.workbuddy','77XRXZLI','CLAUDE_SKILL_ROOT','validation','.agents','1DCUFwK','trim','919514VtOOJu','filter','5337OOsjNs','homeDirName','1502165nliEHS','appCode','Unsafe\x20','claudeSkillsDir','skillCode','workbuddySkillsDir','9ayNRhd','includes','homeDir','agentsSkillsDir'];a105_0x1129=function(){return _0x1db454;};return a105_0x1129();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x442441={}){const _0x2b0a12=a105_0x1a34,_0x287516=_0x442441[_0x2b0a12(0x17e)]??homedir(),_0x3d154b=resolve(_0x287516,PRODUCT_CONFIG[_0x2b0a12(0x175)],'cache'),_0x57eb89=trimmedEnv('SKILL_ROOT'),_0x4b18d1=trimmedEnv(_0x2b0a12(0x16d)),_0x3acfd6=resolve(_0x287516,_0x2b0a12(0x16b)),_0x1fa0d0=_0x442441[_0x2b0a12(0x17b)]??(existsSync(_0x3acfd6)?resolve(_0x3acfd6,_0x2b0a12(0x164)):undefined);return{'homeDir':_0x287516,'cacheRoot':_0x3d154b,'managedRoot':resolve(_0x287516,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x442441[_0x2b0a12(0x163)]??_0x57eb89??resolve(_0x287516,_0x2b0a12(0x16f),_0x2b0a12(0x164)),'claudeSkillsDir':_0x442441[_0x2b0a12(0x179)]??_0x4b18d1??resolve(_0x287516,'.claude',_0x2b0a12(0x164)),'workbuddySkillsDir':_0x1fa0d0};}export function runtimeAgentSkillRoots(_0x43a9fd){const _0x5b0e0f=a105_0x1a34;return[_0x43a9fd[_0x5b0e0f(0x163)],_0x43a9fd['claudeSkillsDir'],_0x43a9fd['workbuddySkillsDir']][_0x5b0e0f(0x173)](_0x54f8ea=>Boolean(_0x54f8ea));}export function getRuntimeSkillCacheRoot(_0x23fc48,_0x21f4cd,_0x18a671={}){const _0x4b65d9=resolveSkillSyncPaths(_0x18a671);return resolve(_0x4b65d9['cacheRoot'],_0x23fc48,fingerprintAccessKey(_0x21f4cd),'skills');}export function getRuntimeSkillDir(_0x10f3c2,_0x2a055e,_0xbe4221,_0x5a85de,_0x8b9a11,_0x2637dc={}){const _0x247619=a105_0x1a34;return resolve(getRuntimeSkillCacheRoot(_0x10f3c2,_0x2a055e,_0x2637dc),safePathSegment(_0xbe4221,_0x247619(0x177)),_0x5a85de,safePathSegment(_0x8b9a11,_0x247619(0x17a)));}function a105_0x1a34(_0x92f736,_0x37df06){_0x92f736=_0x92f736-0x163;const _0x1129f9=a105_0x1129();let _0x1a3460=_0x1129f9[_0x92f736];return _0x1a3460;}export function safePathSegment(_0x5933c8,_0x9234f2=a105_0x1456a9(0x16a)){const _0x3319e6=a105_0x1456a9;if(!_0x5933c8||_0x5933c8[_0x3319e6(0x17d)]('/')||_0x5933c8['includes']('\x5c')||_0x5933c8[_0x3319e6(0x17d)]('..'))throw CliErrors[_0x3319e6(0x16e)](_0x3319e6(0x178)+_0x9234f2+'\x20for\x20local\x20path:\x20'+_0x5933c8);return _0x5933c8;}function trimmedEnv(_0x259ecf){const _0x49d87f=a105_0x1456a9,_0x355fd4=productEnv(_0x259ecf)?.[_0x49d87f(0x171)]();return _0x355fd4?_0x355fd4:undefined;}
1
+ const a111_0xe3a21=a111_0x657d;(function(_0x37f8bf,_0xac5c12){const _0x1caf09=a111_0x657d,_0x3728cc=_0x37f8bf();while(!![]){try{const _0x123ea2=-parseInt(_0x1caf09(0x121))/0x1+-parseInt(_0x1caf09(0x11e))/0x2*(-parseInt(_0x1caf09(0x117))/0x3)+parseInt(_0x1caf09(0x11c))/0x4*(parseInt(_0x1caf09(0x124))/0x5)+-parseInt(_0x1caf09(0x10d))/0x6*(parseInt(_0x1caf09(0x128))/0x7)+parseInt(_0x1caf09(0x120))/0x8*(parseInt(_0x1caf09(0x113))/0x9)+-parseInt(_0x1caf09(0x10e))/0xa*(parseInt(_0x1caf09(0x119))/0xb)+parseInt(_0x1caf09(0x12a))/0xc*(parseInt(_0x1caf09(0x12c))/0xd);if(_0x123ea2===_0xac5c12)break;else _0x3728cc['push'](_0x3728cc['shift']());}catch(_0x208707){_0x3728cc['push'](_0x3728cc['shift']());}}}(a111_0x418e,0x9edc1));function a111_0x657d(_0x345055,_0x28a60f){_0x345055=_0x345055-0x10b;const _0x418e55=a111_0x418e();let _0x657d4b=_0x418e55[_0x345055];return _0x657d4b;}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';export function resolveSkillSyncPaths(_0x15b0f8={}){const _0x4bdd34=a111_0x657d,_0xa8cec2=_0x15b0f8[_0x4bdd34(0x118)]??homedir(),_0x1e00e3=resolve(_0xa8cec2,PRODUCT_CONFIG[_0x4bdd34(0x127)],_0x4bdd34(0x10c)),_0x382140=trimmedEnv(_0x4bdd34(0x112)),_0x420712=trimmedEnv(_0x4bdd34(0x12b)),_0x3384f9=resolve(_0xa8cec2,_0x4bdd34(0x10f)),_0x44b320=_0x15b0f8[_0x4bdd34(0x125)]??(existsSync(_0x3384f9)?resolve(_0x3384f9,'skills'):undefined);return{'homeDir':_0xa8cec2,'cacheRoot':_0x1e00e3,'managedRoot':resolve(_0xa8cec2,PRODUCT_CONFIG[_0x4bdd34(0x127)]),'agentsSkillsDir':_0x15b0f8[_0x4bdd34(0x11f)]??_0x382140??resolve(_0xa8cec2,_0x4bdd34(0x123),'skills'),'claudeSkillsDir':_0x15b0f8[_0x4bdd34(0x126)]??_0x420712??resolve(_0xa8cec2,_0x4bdd34(0x115),_0x4bdd34(0x116)),'workbuddySkillsDir':_0x44b320};}function a111_0x418e(){const _0x3e6c4f=['69388puptzl','validation','path\x20segment','12YbQCkY','cacheRoot','1762vyseAD','agentsSkillsDir','1776344iYsEAK','710918rmFiqg','filter','.agents','925855nhYtEZ','workbuddySkillsDir','claudeSkillsDir','homeDirName','1270661nUxvWF','trim','9665364UypuaW','CLAUDE_SKILL_ROOT','26YzdABk','appCode','cache','18hwVPgE','1530GewQuA','.workbuddy','includes','skillCode','SKILL_ROOT','27mwHPsk','\x20for\x20local\x20path:\x20','.claude','skills','132TEVsIh','homeDir'];a111_0x418e=function(){return _0x3e6c4f;};return a111_0x418e();}export function runtimeAgentSkillRoots(_0xbc7d66){const _0x18ea40=a111_0x657d;return[_0xbc7d66[_0x18ea40(0x11f)],_0xbc7d66[_0x18ea40(0x126)],_0xbc7d66[_0x18ea40(0x125)]][_0x18ea40(0x122)](_0x3a9811=>Boolean(_0x3a9811));}export function getRuntimeSkillCacheRoot(_0xd23492,_0x410816,_0x5f3f50={}){const _0x2b6d1b=a111_0x657d,_0x483593=resolveSkillSyncPaths(_0x5f3f50);return resolve(_0x483593[_0x2b6d1b(0x11d)],_0xd23492,fingerprintAccessKey(_0x410816),_0x2b6d1b(0x116));}export function getRuntimeSkillDir(_0x339295,_0x1c7d28,_0x3206f6,_0xb8908c,_0x3da703,_0x312c4c={}){const _0x401c42=a111_0x657d;return resolve(getRuntimeSkillCacheRoot(_0x339295,_0x1c7d28,_0x312c4c),safePathSegment(_0x3206f6,_0x401c42(0x10b)),_0xb8908c,safePathSegment(_0x3da703,_0x401c42(0x111)));}export function safePathSegment(_0x596184,_0x81b56e=a111_0xe3a21(0x11b)){const _0x5144b9=a111_0xe3a21;if(!_0x596184||_0x596184[_0x5144b9(0x110)]('/')||_0x596184[_0x5144b9(0x110)]('\x5c')||_0x596184[_0x5144b9(0x110)]('..'))throw CliErrors[_0x5144b9(0x11a)]('Unsafe\x20'+_0x81b56e+_0x5144b9(0x114)+_0x596184);return _0x596184;}function trimmedEnv(_0xc197cb){const _0x1309e7=a111_0xe3a21,_0x37c6ca=productEnv(_0xc197cb)?.[_0x1309e7(0x129)]();return _0x37c6ca?_0x37c6ca:undefined;}
@@ -0,0 +1,33 @@
1
+ import type { PushDirectoryPayload, RuntimeSkillItem, RuntimeSkillMetadata, RuntimeSkillScope } from "./types.js";
2
+ export interface PushDirectoryIdentity {
3
+ dir: string;
4
+ skillCode: string;
5
+ metadata?: RuntimeSkillMetadata;
6
+ }
7
+ export interface PushDirectoryIdentityOptions {
8
+ allowAppCodeRetarget?: boolean;
9
+ ignoreInvalidMetadata?: boolean;
10
+ ignoreMetadataAppCodeMismatch?: boolean;
11
+ ignoreMetadataSkillCode?: boolean;
12
+ }
13
+ interface ReadPushDirectoryOptions extends PushDirectoryIdentityOptions {
14
+ ignoreMetadataForPayload?: boolean;
15
+ ignoreMetadataScope?: boolean;
16
+ targetScope?: Extract<RuntimeSkillScope, "personal" | "company">;
17
+ }
18
+ /** Resolves a local push directory and its target skillCode without enforcing scope. */
19
+ export declare function resolvePushDirectoryIdentity(dir: string, appCode: string, options?: PushDirectoryIdentityOptions): PushDirectoryIdentity;
20
+ /** Reads a local Skill directory and prepares the upsert payload for push. */
21
+ export declare function readPushDirectory(dir: string, appCode: string, options?: ReadPushDirectoryOptions): PushDirectoryPayload;
22
+ /** Refreshes local metadata from a remote Skill before deciding whether push can update it. */
23
+ export declare function refreshPushDirectoryMetadataFromRemote(dir: string, remote: RuntimeSkillItem, appCode: string, options?: {
24
+ refreshedAt?: string;
25
+ }): void;
26
+ /** Records backend save evidence back into a pushed local Skill directory. */
27
+ export declare function recordPushedRuntimeSkill(dir: string, saved: RuntimeSkillItem, appCode: string, options?: {
28
+ scope?: RuntimeSkillScope;
29
+ pushedAt?: string;
30
+ }): void;
31
+ /** Derives the runtime skillCode from a directory name, dropping app prefix if present. */
32
+ export declare function deriveSkillCodeFromDirectory(dir: string, appCode: string): string;
33
+ export {};
@@ -1 +1 @@
1
- function a106_0x5f13(_0x5442b8,_0x4625ac){_0x5442b8=_0x5442b8-0xbe;const _0x3ab3cd=a106_0x3ab3();let _0x5f1382=_0x3ab3cd[_0x5442b8];return _0x5f1382;}(function(_0xf123b1,_0x1e404f){const _0x2151b6=a106_0x5f13,_0x1ae781=_0xf123b1();while(!![]){try{const _0x59d822=-parseInt(_0x2151b6(0xf8))/0x1+-parseInt(_0x2151b6(0xcf))/0x2+parseInt(_0x2151b6(0xdc))/0x3*(-parseInt(_0x2151b6(0xfc))/0x4)+-parseInt(_0x2151b6(0xbe))/0x5*(-parseInt(_0x2151b6(0xe8))/0x6)+parseInt(_0x2151b6(0xd0))/0x7*(parseInt(_0x2151b6(0xc4))/0x8)+parseInt(_0x2151b6(0xee))/0x9+parseInt(_0x2151b6(0xd1))/0xa*(parseInt(_0x2151b6(0xc3))/0xb);if(_0x59d822===_0x1e404f)break;else _0x1ae781['push'](_0x1ae781['shift']());}catch(_0x2f3d01){_0x1ae781['push'](_0x1ae781['shift']());}}}(a106_0x3ab3,0xf3304));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0xde0447}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';function a106_0x3ab3(){const _0x154cea=['startsWith','skillName',',\x20or\x20directory\x20name.','builtin','number','allowAppCodeRetarget','1677921NxDDwL','filter','tags','files','Skill\x20directory\x20not\x20found:\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','object','appCode','scope','manifest','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','558aFNbdN','\x20name\x20for\x20SkillHub\x20slug\x20generation.','isArray','skillCode','ignoreMetadataSkillCode','Missing\x20','924300rVgUeP','description','boolean','trim','\x20has\x20scope=\x22','content','slice','(unknown)','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','displayName','34875lAZKso','ignoreMetadataAppCodeMismatch','metadata','Remote\x20Skill\x20','12tTbWVI','ignoreInvalidMetadata','match','42535UlazwE','Skill\x20metadata\x20appCode\x20\x22','validation','isDirectory','string','462HRBHbW','8176280ViMgty','ignoreMetadataScope','refreshedAt','length','version','Unable\x20to\x20resolve\x20skillCode\x20from\x20','personal','isFile','replace','sourceSessionId','utf8','154124XczAUg','7aEmtaP','207160wVifDR','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','targetScope','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','path'];a106_0x3ab3=function(){return _0x154cea;};return a106_0x3ab3();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x58d586,_0x55f695,_0x454fb0={}){const _0xd12260=a106_0x5f13,_0x36ec16=resolvePushDirectoryRoot(_0x58d586),_0x2ac901=readPushMetadataIfPresent(resolve(_0x36ec16,METADATA_FILE),{'ignoreInvalidMetadata':_0x454fb0[_0xd12260(0xfd)]});if(_0x2ac901?.['appCode']&&_0x2ac901['appCode']!==_0x55f695&&!_0x454fb0[_0xd12260(0xdb)]&&!_0x454fb0[_0xd12260(0xf9)])throw CliErrors[_0xd12260(0xc0)](_0xd12260(0xbf)+_0x2ac901[_0xd12260(0xe3)]+_0xd12260(0xd4)+_0x55f695+'\x22.');const _0x4d329e=resolvePushSkillCode(_0x36ec16,_0x55f695,_0x2ac901,_0x454fb0);if(!_0x4d329e)throw CliErrors[_0xd12260(0xc0)](_0xd12260(0xc9)+SKILL_FILE+',\x20'+METADATA_FILE+_0xd12260(0xd8));return{'dir':_0x36ec16,'skillCode':_0x4d329e,'metadata':_0x2ac901};}export function readPushDirectory(_0x38c176,_0x346535,_0x55f024={}){const _0x429c2c=a106_0x5f13,_0x7bb0db=resolvePushDirectoryIdentity(_0x38c176,_0x346535,_0x55f024),_0x4aae0f=_0x7bb0db['dir'],_0x2cfc7c=resolve(_0x4aae0f,SKILL_FILE);if(!existsSync(_0x2cfc7c)||!lstatSync(_0x2cfc7c)[_0x429c2c(0xcb)]())throw CliErrors[_0x429c2c(0xc0)](_0x429c2c(0xed)+SKILL_FILE+':\x20'+_0x2cfc7c);const _0x31a3a2=_0x7bb0db[_0x429c2c(0xfa)],_0x38b9c=_0x55f024[_0x429c2c(0xd3)]??_0x429c2c(0xca);if(!_0x55f024[_0x429c2c(0xc5)]&&_0x31a3a2?.[_0x429c2c(0xe4)]===_0x429c2c(0xd9))throw CliErrors['validation'](_0x429c2c(0xe1)+METADATA_FILE+_0x429c2c(0xf2)+_0x31a3a2[_0x429c2c(0xe4)]+'\x22.');if(!_0x55f024[_0x429c2c(0xc5)]&&_0x38b9c===_0x429c2c(0xca)&&_0x31a3a2?.[_0x429c2c(0xe4)]&&_0x31a3a2[_0x429c2c(0xe4)]!==_0x429c2c(0xca))throw CliErrors[_0x429c2c(0xc0)](_0x429c2c(0xd2)+METADATA_FILE+_0x429c2c(0xf2)+_0x31a3a2[_0x429c2c(0xe4)]+'\x22.',_0x429c2c(0xf6)+_0x4aae0f+_0x429c2c(0xe7));const _0xcaaa33=scanSkillDirectory(_0x4aae0f),_0x8f69d=buildSkillPackage(_0xcaaa33),_0x250c31=readFileSync(_0x2cfc7c,_0x429c2c(0xce)),_0x4405ac=_0x7bb0db['skillCode'],_0x304e8d=_0x55f024['ignoreMetadataForPayload']?undefined:_0x31a3a2,_0x23d161=readSkillDisplayName(_0x250c31);return{'skillCode':_0x4405ac,'metadata':_0x31a3a2,'frontmatterDisplayName':_0x23d161,'input':{'skillCode':_0x4405ac,'skillName':_0x23d161??_0x304e8d?.['skillName'],'description':_0x304e8d?.[_0x429c2c(0xef)],'content':_0x250c31,'files':_0x8f69d[_0x429c2c(0xe5)],'packageBase64':_0x8f69d['packageBase64'],'tags':_0x304e8d?.['tags'],'version':_0x304e8d?.[_0x429c2c(0xc8)],'sourceSessionId':_0x304e8d?.[_0x429c2c(0xcd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3ee03f,_0x147ad7,_0xd43f8e,_0x4195d0={}){const _0x3a17f9=a106_0x5f13,_0x119b43=resolvePushDirectoryRoot(_0x3ee03f),_0x363527=readPushMetadataIfPresent(resolve(_0x119b43,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2450cf=requireRemoteScope(_0x147ad7),_0x4f1659=readLocalSkillContent(_0x119b43),_0xf09870={..._0x147ad7,'appCode':_0x147ad7['appCode']??_0xd43f8e,'skillName':_0x147ad7['skillName']??_0x363527?.[_0x3a17f9(0xd7)],'description':_0x147ad7[_0x3a17f9(0xef)]??_0x363527?.['description'],'tags':Array[_0x3a17f9(0xea)](_0x147ad7['tags'])?_0x147ad7[_0x3a17f9(0xde)]:_0x363527?.[_0x3a17f9(0xde)],'sourceSessionId':_0x147ad7[_0x3a17f9(0xcd)]??_0x363527?.[_0x3a17f9(0xcd)],'content':_0x147ad7[_0x3a17f9(0xf3)]??_0x4f1659},_0x4005b1=buildMetadata(_0xf09870,_0x2450cf,_0xd43f8e,contentHash(_0x4f1659),_0x4195d0[_0x3a17f9(0xc6)]);writeJsonAtomic(resolve(_0x119b43,METADATA_FILE),_0x4005b1);}export function recordPushedRuntimeSkill(_0x5aa7c4,_0x527cb0,_0x1eaf27,_0x58b51c={}){const _0x22d082=a106_0x5f13,_0x572c7a=resolvePushDirectoryRoot(_0x5aa7c4),_0xe824a=scanSkillDirectory(_0x572c7a),_0x288cd6=_0xe824a['find'](_0xbd36a3=>_0xbd36a3['path']===SKILL_FILE),_0x157e54=_0x288cd6?fileText(_0x288cd6):'',_0x4af215=tryNormalizePackageManifest(_0x527cb0[_0x22d082(0xdf)]),_0x4da1a8={..._0x527cb0,'content':_0x527cb0[_0x22d082(0xf3)]??_0x157e54,'files':_0x4af215},_0x1e90a8=_0x4af215?normalizeLocalFiles(_0xe824a)[_0x22d082(0xdd)](_0x5316ad=>_0x4af215[_0x22d082(0xdf)]['some'](_0x331ee8=>_0x331ee8[_0x22d082(0xd5)]===_0x5316ad['path'])):undefined,_0x1aa8c5=buildMetadata(_0x4da1a8,_0x58b51c[_0x22d082(0xe4)]??_0x22d082(0xca),_0x1eaf27,contentHash(_0x4da1a8['content']??''),_0x58b51c['pushedAt'],_0x1e90a8);writeJsonAtomic(resolve(_0x572c7a,METADATA_FILE),_0x1aa8c5);}export function deriveSkillCodeFromDirectory(_0x239fc1,_0x558010){const _0x149b2a=a106_0x5f13,_0x209e6e=basename(resolve(_0x239fc1)),_0x439237=_0x558010+'--';return _0x209e6e[_0x149b2a(0xd6)](_0x439237)?_0x209e6e[_0x149b2a(0xf4)](_0x439237[_0x149b2a(0xc7)]):_0x209e6e;}function resolvePushSkillCode(_0x319921,_0x556700,_0x2ffb05,_0x53fe47){const _0x1f3d60=a106_0x5f13,_0x4959f4=deriveSkillCodeFromSkillFile(_0x319921)||deriveSkillCodeFromDirectory(_0x319921,_0x556700);if(_0x53fe47[_0x1f3d60(0xec)])return _0x4959f4;return _0x2ffb05?.[_0x1f3d60(0xeb)]?.[_0x1f3d60(0xf1)]()||_0x4959f4;}function deriveSkillCodeFromSkillFile(_0xf6e40e){const _0x367c46=a106_0x5f13,_0x1a4aff=resolve(_0xf6e40e,SKILL_FILE);if(!existsSync(_0x1a4aff)||!lstatSync(_0x1a4aff)[_0x367c46(0xcb)]())return undefined;const _0x324e70=readFileSync(_0x1a4aff,'utf8'),_0x31e540=_0x324e70[_0x367c46(0xfe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x31e540)return undefined;const _0x11c8a6=parseFrontmatterObject(_0x31e540[0x1]??''),_0x53edb8=scalarToString(_0x11c8a6?.['name']);return _0x53edb8?slugifySkillName(_0x53edb8):undefined;}function readSkillDisplayName(_0x357c6e){const _0x3a7492=a106_0x5f13,_0xd43589=_0x357c6e[_0x3a7492(0xfe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xd43589)return undefined;const _0x55cd9a=parseFrontmatterObject(_0xd43589[0x1]??'');return scalarToString(_0x55cd9a?.[_0x3a7492(0xf7)]);}function slugifySkillName(_0x3cd7a1){const _0x454cc7=a106_0x5f13,_0x1ef3b6=_0x3cd7a1['trim']()['toLowerCase']()[_0x454cc7(0xcc)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x454cc7(0xcc)](/^-+/,'')['replace'](/-+$/,'')[_0x454cc7(0xcc)](/-{2,}/g,'-');if(!_0x1ef3b6)throw CliErrors[_0x454cc7(0xc0)]('Invalid\x20'+SKILL_FILE+_0x454cc7(0xe9));return _0x1ef3b6;}function parseFrontmatterObject(_0x204429){const _0x373a53=a106_0x5f13;try{const _0x28cde0=a106_0xde0447(_0x204429);return _0x28cde0&&typeof _0x28cde0===_0x373a53(0xe2)&&!Array[_0x373a53(0xea)](_0x28cde0)?_0x28cde0:undefined;}catch{return undefined;}}function scalarToString(_0x3a3e18){const _0x4b1074=a106_0x5f13;if(typeof _0x3a3e18===_0x4b1074(0xc2))return _0x3a3e18[_0x4b1074(0xf1)]();if(typeof _0x3a3e18===_0x4b1074(0xda)||typeof _0x3a3e18===_0x4b1074(0xf0))return String(_0x3a3e18);return undefined;}function resolvePushDirectoryRoot(_0x4362ae){const _0x1d5d5f=a106_0x5f13,_0x3e446e=resolve(_0x4362ae);if(!existsSync(_0x3e446e))throw CliErrors[_0x1d5d5f(0xc0)](_0x1d5d5f(0xe0)+_0x4362ae);const _0x53c67b=lstatSync(_0x3e446e);if(_0x53c67b[_0x1d5d5f(0xc1)]())return _0x3e446e;if(_0x53c67b[_0x1d5d5f(0xe6)]()){const _0xac6faf=realpathSync(_0x3e446e);if(lstatSync(_0xac6faf)[_0x1d5d5f(0xc1)]())return _0xac6faf;}throw CliErrors['validation'](_0x1d5d5f(0xe0)+_0x4362ae);}function requireRemoteScope(_0x487bab){const _0x1cc338=a106_0x5f13;if(_0x487bab[_0x1cc338(0xe4)]==='personal'||_0x487bab['scope']==='company'||_0x487bab['scope']==='builtin')return _0x487bab[_0x1cc338(0xe4)];throw CliErrors[_0x1cc338(0xc0)](_0x1cc338(0xfb)+(_0x487bab['skillCode']||_0x1cc338(0xf5))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x487bab['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x59e987){const _0x296f0f=a106_0x5f13,_0x574251=resolve(_0x59e987,SKILL_FILE);return existsSync(_0x574251)&&lstatSync(_0x574251)[_0x296f0f(0xcb)]()?readFileSync(_0x574251,_0x296f0f(0xce)):'';}function readPushMetadataIfPresent(_0x406973,_0x120629={}){const _0x4c2a0c=a106_0x5f13;try{return readMetadataIfPresent(_0x406973);}catch(_0x2c11c2){if(_0x120629[_0x4c2a0c(0xfd)])return undefined;throw _0x2c11c2;}}
1
+ (function(_0x2f7f7a,_0x5b462c){const _0x38d204=a112_0x4d9d,_0x1d7133=_0x2f7f7a();while(!![]){try{const _0x3809e0=parseInt(_0x38d204(0x110))/0x1+-parseInt(_0x38d204(0x131))/0x2*(parseInt(_0x38d204(0x10c))/0x3)+parseInt(_0x38d204(0x12d))/0x4*(parseInt(_0x38d204(0x12b))/0x5)+-parseInt(_0x38d204(0x106))/0x6+-parseInt(_0x38d204(0x123))/0x7*(parseInt(_0x38d204(0x112))/0x8)+-parseInt(_0x38d204(0x11c))/0x9+parseInt(_0x38d204(0x133))/0xa*(parseInt(_0x38d204(0x119))/0xb);if(_0x3809e0===_0x5b462c)break;else _0x1d7133['push'](_0x1d7133['shift']());}catch(_0x328a6d){_0x1d7133['push'](_0x1d7133['shift']());}}}(a112_0x1273,0xd2190));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a112_0xabee2c}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(_0x2ba6e5,_0x405d57,_0x370593={}){const _0x3dd2a3=a112_0x4d9d,_0x6936a9=resolvePushDirectoryRoot(_0x2ba6e5),_0x3a500e=readPushMetadataIfPresent(resolve(_0x6936a9,METADATA_FILE),{'ignoreInvalidMetadata':_0x370593[_0x3dd2a3(0x10b)]});if(_0x3a500e?.[_0x3dd2a3(0x10d)]&&_0x3a500e['appCode']!==_0x405d57&&!_0x370593[_0x3dd2a3(0x11f)]&&!_0x370593['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x3dd2a3(0x101)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3a500e[_0x3dd2a3(0x10d)]+_0x3dd2a3(0x116)+_0x405d57+'\x22.');const _0x2f8786=resolvePushSkillCode(_0x6936a9,_0x405d57,_0x3a500e,_0x370593);if(!_0x2f8786)throw CliErrors[_0x3dd2a3(0x101)](_0x3dd2a3(0x10e)+SKILL_FILE+',\x20'+METADATA_FILE+_0x3dd2a3(0x124));return{'dir':_0x6936a9,'skillCode':_0x2f8786,'metadata':_0x3a500e};}function a112_0x4d9d(_0x50f7f8,_0x50cf5c){_0x50f7f8=_0x50f7f8-0xfa;const _0x127340=a112_0x1273();let _0x4d9d45=_0x127340[_0x50f7f8];return _0x4d9d45;}export function readPushDirectory(_0x203a80,_0x36e172,_0x163027={}){const _0x25870c=a112_0x4d9d,_0x3d3ab3=resolvePushDirectoryIdentity(_0x203a80,_0x36e172,_0x163027),_0x420906=_0x3d3ab3['dir'],_0x46112d=resolve(_0x420906,SKILL_FILE);if(!existsSync(_0x46112d)||!lstatSync(_0x46112d)['isFile']())throw CliErrors[_0x25870c(0x101)](_0x25870c(0x118)+SKILL_FILE+':\x20'+_0x46112d);const _0x11b5ae=_0x3d3ab3[_0x25870c(0x138)],_0x1c8ee6=_0x163027[_0x25870c(0x11d)]??_0x25870c(0x135);if(!_0x163027[_0x25870c(0x100)]&&_0x11b5ae?.[_0x25870c(0x108)]===_0x25870c(0x10f))throw CliErrors[_0x25870c(0x101)](_0x25870c(0x12c)+METADATA_FILE+_0x25870c(0x115)+_0x11b5ae[_0x25870c(0x108)]+'\x22.');if(!_0x163027[_0x25870c(0x100)]&&_0x1c8ee6===_0x25870c(0x135)&&_0x11b5ae?.[_0x25870c(0x108)]&&_0x11b5ae['scope']!=='personal')throw CliErrors['validation'](_0x25870c(0xff)+METADATA_FILE+_0x25870c(0x115)+_0x11b5ae[_0x25870c(0x108)]+'\x22.',_0x25870c(0x130)+_0x420906+_0x25870c(0x11a));const _0x2df4f5=scanSkillDirectory(_0x420906),_0x500241=buildSkillPackage(_0x2df4f5),_0x13787e=readFileSync(_0x46112d,_0x25870c(0x136)),_0xec7ef4=_0x3d3ab3[_0x25870c(0xfc)],_0xf4f439=_0x163027[_0x25870c(0x127)]?undefined:_0x11b5ae,_0x522862=readSkillDisplayName(_0x13787e);return{'skillCode':_0xec7ef4,'metadata':_0x11b5ae,'frontmatterDisplayName':_0x522862,'input':{'skillCode':_0xec7ef4,'skillName':_0x522862??_0xf4f439?.[_0x25870c(0xfd)],'description':_0xf4f439?.[_0x25870c(0x125)],'content':_0x13787e,'files':_0x500241[_0x25870c(0x12f)],'packageBase64':_0x500241['packageBase64'],'tags':_0xf4f439?.[_0x25870c(0x132)],'version':_0xf4f439?.[_0x25870c(0x11b)],'sourceSessionId':_0xf4f439?.[_0x25870c(0x113)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x349e5b,_0x366f68,_0x54890b,_0x498734={}){const _0x10bd63=a112_0x4d9d,_0x10df4f=resolvePushDirectoryRoot(_0x349e5b),_0x55350a=readPushMetadataIfPresent(resolve(_0x10df4f,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2fb22e=requireRemoteScope(_0x366f68),_0xfdc61=readLocalSkillContent(_0x10df4f),_0x107e6d={..._0x366f68,'appCode':_0x366f68[_0x10bd63(0x10d)]??_0x54890b,'skillName':_0x366f68[_0x10bd63(0xfd)]??_0x55350a?.[_0x10bd63(0xfd)],'description':_0x366f68[_0x10bd63(0x125)]??_0x55350a?.['description'],'tags':Array['isArray'](_0x366f68[_0x10bd63(0x132)])?_0x366f68[_0x10bd63(0x132)]:_0x55350a?.[_0x10bd63(0x132)],'sourceSessionId':_0x366f68[_0x10bd63(0x113)]??_0x55350a?.[_0x10bd63(0x113)],'content':_0x366f68[_0x10bd63(0x107)]??_0xfdc61},_0x4b193e=buildMetadata(_0x107e6d,_0x2fb22e,_0x54890b,contentHash(_0xfdc61),_0x498734[_0x10bd63(0xfe)]);writeJsonAtomic(resolve(_0x10df4f,METADATA_FILE),_0x4b193e);}export function recordPushedRuntimeSkill(_0x4ebd51,_0x348382,_0x3976b9,_0xa99dbf={}){const _0x58b365=a112_0x4d9d,_0x82f0ee=resolvePushDirectoryRoot(_0x4ebd51),_0x317c99=scanSkillDirectory(_0x82f0ee),_0x3428fa=_0x317c99[_0x58b365(0x122)](_0x125bdf=>_0x125bdf[_0x58b365(0x13b)]===SKILL_FILE),_0x483af9=_0x3428fa?fileText(_0x3428fa):'',_0x9eecc2=tryNormalizePackageManifest(_0x348382[_0x58b365(0x114)]),_0x3c4100={..._0x348382,'content':_0x348382[_0x58b365(0x107)]??_0x483af9,'files':_0x9eecc2},_0x13b075=_0x9eecc2?normalizeLocalFiles(_0x317c99)['filter'](_0x712718=>_0x9eecc2[_0x58b365(0x114)]['some'](_0x18a653=>_0x18a653[_0x58b365(0x13b)]===_0x712718[_0x58b365(0x13b)])):undefined,_0x2ed6c3=buildMetadata(_0x3c4100,_0xa99dbf['scope']??_0x58b365(0x135),_0x3976b9,contentHash(_0x3c4100[_0x58b365(0x107)]??''),_0xa99dbf[_0x58b365(0x139)],_0x13b075);writeJsonAtomic(resolve(_0x82f0ee,METADATA_FILE),_0x2ed6c3);}export function deriveSkillCodeFromDirectory(_0x310949,_0x3df946){const _0x1b29eb=a112_0x4d9d,_0xbb08e4=basename(resolve(_0x310949)),_0x5ced71=_0x3df946+'--';return _0xbb08e4[_0x1b29eb(0x13a)](_0x5ced71)?_0xbb08e4['slice'](_0x5ced71[_0x1b29eb(0xfa)]):_0xbb08e4;}function resolvePushSkillCode(_0x12e6ef,_0x19e240,_0x44afa5,_0x2116a9){const _0x214991=a112_0x4d9d,_0x2f9527=deriveSkillCodeFromSkillFile(_0x12e6ef)||deriveSkillCodeFromDirectory(_0x12e6ef,_0x19e240);if(_0x2116a9[_0x214991(0x12a)])return _0x2f9527;return _0x44afa5?.[_0x214991(0xfc)]?.[_0x214991(0x120)]()||_0x2f9527;}function deriveSkillCodeFromSkillFile(_0x13b7d7){const _0x3f0505=a112_0x4d9d,_0x45fd74=resolve(_0x13b7d7,SKILL_FILE);if(!existsSync(_0x45fd74)||!lstatSync(_0x45fd74)[_0x3f0505(0x109)]())return undefined;const _0x813420=readFileSync(_0x45fd74,'utf8'),_0x443479=_0x813420[_0x3f0505(0x137)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x443479)return undefined;const _0x4d6768=parseFrontmatterObject(_0x443479[0x1]??''),_0x40a0f2=scalarToString(_0x4d6768?.[_0x3f0505(0x104)]);return _0x40a0f2?slugifySkillName(_0x40a0f2):undefined;}function readSkillDisplayName(_0x1a515b){const _0x31dda9=a112_0x4d9d,_0x21e5c0=_0x1a515b[_0x31dda9(0x137)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x21e5c0)return undefined;const _0x19f738=parseFrontmatterObject(_0x21e5c0[0x1]??'');return scalarToString(_0x19f738?.[_0x31dda9(0x12e)]);}function slugifySkillName(_0x1a2c11){const _0x2e53af=a112_0x4d9d,_0x114a11=_0x1a2c11[_0x2e53af(0x120)]()['toLowerCase']()[_0x2e53af(0x103)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2e53af(0x103)](/^-+/,'')[_0x2e53af(0x103)](/-+$/,'')[_0x2e53af(0x103)](/-{2,}/g,'-');if(!_0x114a11)throw CliErrors[_0x2e53af(0x101)](_0x2e53af(0x126)+SKILL_FILE+_0x2e53af(0x121));return _0x114a11;}function parseFrontmatterObject(_0x55099d){const _0x1419b3=a112_0x4d9d;try{const _0x57afc9=a112_0xabee2c(_0x55099d);return _0x57afc9&&typeof _0x57afc9==='object'&&!Array[_0x1419b3(0x129)](_0x57afc9)?_0x57afc9:undefined;}catch{return undefined;}}function scalarToString(_0x26850b){const _0xb1f1e4=a112_0x4d9d;if(typeof _0x26850b===_0xb1f1e4(0x102))return _0x26850b[_0xb1f1e4(0x120)]();if(typeof _0x26850b===_0xb1f1e4(0x13c)||typeof _0x26850b===_0xb1f1e4(0x10a))return String(_0x26850b);return undefined;}function resolvePushDirectoryRoot(_0x3d5994){const _0x1caff4=a112_0x4d9d,_0x276c70=resolve(_0x3d5994);if(!existsSync(_0x276c70))throw CliErrors[_0x1caff4(0x101)](_0x1caff4(0x134)+_0x3d5994);const _0x4f0cb7=lstatSync(_0x276c70);if(_0x4f0cb7[_0x1caff4(0x117)]())return _0x276c70;if(_0x4f0cb7[_0x1caff4(0x11e)]()){const _0x525262=realpathSync(_0x276c70);if(lstatSync(_0x525262)['isDirectory']())return _0x525262;}throw CliErrors[_0x1caff4(0x101)](_0x1caff4(0x134)+_0x3d5994);}function requireRemoteScope(_0x40e6cd){const _0x12cc5b=a112_0x4d9d;if(_0x40e6cd['scope']===_0x12cc5b(0x135)||_0x40e6cd[_0x12cc5b(0x108)]===_0x12cc5b(0xfb)||_0x40e6cd[_0x12cc5b(0x108)]==='builtin')return _0x40e6cd[_0x12cc5b(0x108)];throw CliErrors[_0x12cc5b(0x101)](_0x12cc5b(0x105)+(_0x40e6cd[_0x12cc5b(0xfc)]||'(unknown)')+_0x12cc5b(0x128)+(_0x40e6cd[_0x12cc5b(0x108)]??_0x12cc5b(0x111))+'\x22.');}function readLocalSkillContent(_0x3eae3e){const _0x5c7897=a112_0x4d9d,_0x15d60b=resolve(_0x3eae3e,SKILL_FILE);return existsSync(_0x15d60b)&&lstatSync(_0x15d60b)[_0x5c7897(0x109)]()?readFileSync(_0x15d60b,'utf8'):'';}function readPushMetadataIfPresent(_0x50a3f7,_0x163f97={}){const _0x2027d5=a112_0x4d9d;try{return readMetadataIfPresent(_0x50a3f7);}catch(_0xccf138){if(_0x163f97[_0x2027d5(0x10b)])return undefined;throw _0xccf138;}}function a112_0x1273(){const _0x27971f=['Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataScope','validation','string','replace','name','Remote\x20Skill\x20','6892482xThBFh','content','scope','isFile','boolean','ignoreInvalidMetadata','48wnYaAj','appCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','builtin','1164829utDdko','unknown','336esmTdq','sourceSessionId','files','\x20has\x20scope=\x22','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','isDirectory','Missing\x20','11VJThag','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','version','8014050GgzNJC','targetScope','isSymbolicLink','allowAppCodeRetarget','trim','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','159383UsITMb',',\x20or\x20directory\x20name.','description','Invalid\x20','ignoreMetadataForPayload','\x20has\x20unsupported\x20scope\x20\x22','isArray','ignoreMetadataSkillCode','925535eALvfm','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','20zttVfG','displayName','manifest','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','141966GIuFPy','tags','29014190eMiMNT','Skill\x20directory\x20not\x20found:\x20','personal','utf8','match','metadata','pushedAt','startsWith','path','number','length','company','skillCode','skillName','refreshedAt'];a112_0x1273=function(){return _0x27971f;};return a112_0x1273();}
@@ -0,0 +1,5 @@
1
+ import type { RuntimeSkillScope } from "./types.js";
2
+ /** Normalizes requested scopes, applying the local-list default order. */
3
+ export declare function normalizeRuntimeSkillScopes(scopes: RuntimeSkillScope[] | undefined): RuntimeSkillScope[];
4
+ /** Checks whether an arbitrary metadata scope is one supported runtime scope. */
5
+ export declare function isRuntimeSkillScope(value: unknown): value is RuntimeSkillScope;
@@ -1 +1 @@
1
- function a107_0x2227(){const _0xe37dab=['121874OzFrOU','12987mAmlfV','5PQOKpm','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','13120370OgqbKO','personal','6669752hhkDpu','3655106pWpKKq','company','builtin','3EcShBL','7815402BVqoIx','500hUPQXW','3901770MeylAd','length','11LtsYSi'];a107_0x2227=function(){return _0xe37dab;};return a107_0x2227();}(function(_0x4e5a0b,_0x44bad6){const _0x3e8924=a107_0x464f,_0x51cc6e=_0x4e5a0b();while(!![]){try{const _0x93b40a=-parseInt(_0x3e8924(0x83))/0x1*(parseInt(_0x3e8924(0x89))/0x2)+-parseInt(_0x3e8924(0x8a))/0x3*(-parseInt(_0x3e8924(0x85))/0x4)+parseInt(_0x3e8924(0x8b))/0x5*(-parseInt(_0x3e8924(0x86))/0x6)+-parseInt(_0x3e8924(0x92))/0x7+parseInt(_0x3e8924(0x91))/0x8+-parseInt(_0x3e8924(0x84))/0x9+parseInt(_0x3e8924(0x8f))/0xa*(parseInt(_0x3e8924(0x88))/0xb);if(_0x93b40a===_0x44bad6)break;else _0x51cc6e['push'](_0x51cc6e['shift']());}catch(_0x4bdd93){_0x51cc6e['push'](_0x51cc6e['shift']());}}}(a107_0x2227,0x71187));function a107_0x464f(_0xfdeadd,_0x1416bf){_0xfdeadd=_0xfdeadd-0x83;const _0x222717=a107_0x2227();let _0x464fcc=_0x222717[_0xfdeadd];return _0x464fcc;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3b302f){const _0x5e08c2=a107_0x464f,_0x598455=_0x3b302f&&_0x3b302f[_0x5e08c2(0x87)]>0x0?_0x3b302f:[_0x5e08c2(0x90),_0x5e08c2(0x93),'builtin'],_0xfbb499=[];for(const _0x30aae0 of _0x598455){if(!isRuntimeSkillScope(_0x30aae0))throw CliErrors['validation'](_0x5e08c2(0x8d)+_0x30aae0);!_0xfbb499[_0x5e08c2(0x8c)](_0x30aae0)&&_0xfbb499[_0x5e08c2(0x8e)](_0x30aae0);}return _0xfbb499;}export function isRuntimeSkillScope(_0x5af264){const _0x183473=a107_0x464f;return _0x5af264===_0x183473(0x90)||_0x5af264===_0x183473(0x93)||_0x5af264===_0x183473(0x94);}
1
+ function a113_0x2c79(_0x32fe69,_0x447cba){_0x32fe69=_0x32fe69-0x178;const _0x453dd8=a113_0x453d();let _0x2c7907=_0x453dd8[_0x32fe69];return _0x2c7907;}(function(_0x3b8add,_0x1cdf7c){const _0x3c5690=a113_0x2c79,_0x29e718=_0x3b8add();while(!![]){try{const _0x1a9d46=-parseInt(_0x3c5690(0x17b))/0x1+-parseInt(_0x3c5690(0x178))/0x2+-parseInt(_0x3c5690(0x187))/0x3*(-parseInt(_0x3c5690(0x185))/0x4)+-parseInt(_0x3c5690(0x17a))/0x5*(parseInt(_0x3c5690(0x181))/0x6)+-parseInt(_0x3c5690(0x17f))/0x7*(-parseInt(_0x3c5690(0x188))/0x8)+-parseInt(_0x3c5690(0x17d))/0x9+parseInt(_0x3c5690(0x179))/0xa;if(_0x1a9d46===_0x1cdf7c)break;else _0x29e718['push'](_0x29e718['shift']());}catch(_0x2ac6aa){_0x29e718['push'](_0x29e718['shift']());}}}(a113_0x453d,0x60dc1));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2162c3){const _0x36f41f=a113_0x2c79,_0x24e8a3=_0x2162c3&&_0x2162c3[_0x36f41f(0x184)]>0x0?_0x2162c3:[_0x36f41f(0x17e),'company',_0x36f41f(0x186)],_0x4d024d=[];for(const _0x15533a of _0x24e8a3){if(!isRuntimeSkillScope(_0x15533a))throw CliErrors[_0x36f41f(0x17c)](_0x36f41f(0x183)+_0x15533a);!_0x4d024d['includes'](_0x15533a)&&_0x4d024d[_0x36f41f(0x182)](_0x15533a);}return _0x4d024d;}function a113_0x453d(){const _0x37e6b0=['16mnVbOC','1461670CruzuG','9673800MqHWUW','610arMNLa','240514FvkvCy','validation','1888443XeDLCd','personal','1780744icZvHP','company','22998ryjphF','push','Unsupported\x20runtime\x20Skill\x20scope:\x20','length','18220vpbsUL','builtin','375GEirRS'];a113_0x453d=function(){return _0x37e6b0;};return a113_0x453d();}export function isRuntimeSkillScope(_0x1d512a){const _0x42cbd9=a113_0x2c79;return _0x1d512a===_0x42cbd9(0x17e)||_0x1d512a===_0x42cbd9(0x180)||_0x1d512a===_0x42cbd9(0x186);}
@@ -0,0 +1,105 @@
1
+ import type { RuntimeSkillFile, RuntimeSkillFilesManifest, RuntimeSkillItem, RuntimeSkillUpsertInput } from "../../core/api-client.js";
2
+ export type RuntimeSkillScope = "personal" | "company" | "builtin";
3
+ export interface SkillSyncPathsOptions {
4
+ homeDir?: string;
5
+ agentsSkillsDir?: string;
6
+ claudeSkillsDir?: string;
7
+ workbuddySkillsDir?: string;
8
+ }
9
+ export interface SkillSyncPaths {
10
+ homeDir: string;
11
+ cacheRoot: string;
12
+ managedRoot: string;
13
+ agentsSkillsDir: string;
14
+ claudeSkillsDir: string;
15
+ workbuddySkillsDir?: string;
16
+ }
17
+ export interface MaterializedRuntimeSkill {
18
+ skill: RuntimeSkillItem;
19
+ scope: RuntimeSkillScope;
20
+ dir: string;
21
+ skillMdPath: string;
22
+ metadataPath: string;
23
+ contentHash: string;
24
+ changed: boolean;
25
+ }
26
+ export interface LocalRuntimeSkillListInput {
27
+ env: "production" | "development" | "daily";
28
+ accessKey: string;
29
+ appCode: string;
30
+ scopes?: RuntimeSkillScope[];
31
+ code?: string;
32
+ }
33
+ export interface LocalRuntimeSkillItem extends RuntimeSkillMetadata {
34
+ scope: RuntimeSkillScope;
35
+ source: "local";
36
+ dir: string;
37
+ cacheDir?: string;
38
+ skillMdPath: string;
39
+ metadataPath: string;
40
+ linkedPaths: string[];
41
+ }
42
+ export interface RuntimeSkillMetadata {
43
+ schemaVersion: 1 | 2;
44
+ id?: number;
45
+ appCode: string;
46
+ skillCode: string;
47
+ skillName?: string;
48
+ description?: string;
49
+ scope: string;
50
+ readonly: boolean;
51
+ tenantCode?: string;
52
+ userId?: number | string;
53
+ version?: string;
54
+ status?: string;
55
+ tags: string[];
56
+ hasUpstreamUpdate?: boolean;
57
+ forkedFromSkillId?: number;
58
+ forkedFromVersion?: string;
59
+ sourceSessionId?: string;
60
+ contentHash: string;
61
+ fileHashes?: Record<string, string>;
62
+ treeHash?: string;
63
+ ossPath?: string;
64
+ zipSha256?: string;
65
+ zipSize?: number;
66
+ files?: Array<{
67
+ path: string;
68
+ hash: string;
69
+ size: number;
70
+ }>;
71
+ pulledAt: string;
72
+ }
73
+ export interface LinkRuntimeSkillResult {
74
+ path: string;
75
+ target: string;
76
+ action: "created" | "updated" | "unchanged";
77
+ }
78
+ export interface GlobalRuntimeSkillLinkResult {
79
+ path: string;
80
+ target: string;
81
+ action: "created" | "updated" | "unchanged";
82
+ contentHash: string;
83
+ }
84
+ export interface PruneRuntimeSkillResult {
85
+ path: string;
86
+ action: "removed" | "skipped";
87
+ reason?: string;
88
+ }
89
+ export interface PushDirectoryPayload {
90
+ skillCode: string;
91
+ input: RuntimeSkillUpsertInput;
92
+ metadata?: RuntimeSkillMetadata;
93
+ frontmatterDisplayName?: string;
94
+ }
95
+ export interface LocalSkillFile {
96
+ path: string;
97
+ content?: string;
98
+ bytes?: Buffer;
99
+ }
100
+ export interface BuiltSkillPackage {
101
+ manifest: RuntimeSkillFilesManifest;
102
+ packageBytes: Buffer;
103
+ packageBase64: string;
104
+ }
105
+ export type { RuntimeSkillFile, RuntimeSkillFilesManifest, RuntimeSkillItem };
@@ -0,0 +1,9 @@
1
+ import type { LocalSkillFile } from "./types.js";
2
+ export interface ExtractedZipFile {
3
+ path: string;
4
+ bytes: Buffer;
5
+ }
6
+ /** Creates a deterministic stored zip archive for normalized Skill files. */
7
+ export declare function createDeterministicZipPackage(files: LocalSkillFile[]): Buffer;
8
+ /** Parses a zip package through fflate while preserving runtime Skill path safety checks. */
9
+ export declare function parseZipPackage(packageBytes: Buffer): ExtractedZipFile[];
@@ -1 +1 @@
1
- function a109_0x5769(_0x24c315,_0x35619d){_0x24c315=_0x24c315-0x99;const _0x5cd55a=a109_0x5cd5();let _0x5769dc=_0x5cd55a[_0x24c315];return _0x5769dc;}(function(_0x35c7df,_0x5024a5){const _0x1068fd=a109_0x5769,_0x2b5229=_0x35c7df();while(!![]){try{const _0x326099=parseInt(_0x1068fd(0xa0))/0x1*(-parseInt(_0x1068fd(0x9a))/0x2)+-parseInt(_0x1068fd(0xa9))/0x3+-parseInt(_0x1068fd(0x9f))/0x4+-parseInt(_0x1068fd(0xaa))/0x5*(parseInt(_0x1068fd(0xa3))/0x6)+parseInt(_0x1068fd(0xab))/0x7*(parseInt(_0x1068fd(0x9e))/0x8)+parseInt(_0x1068fd(0x9c))/0x9+parseInt(_0x1068fd(0xa5))/0xa;if(_0x326099===_0x5024a5)break;else _0x2b5229['push'](_0x2b5229['shift']());}catch(_0x51d9fe){_0x2b5229['push'](_0x2b5229['shift']());}}}(a109_0x5cd5,0x3d457));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x1a71fa){const _0x2848f2={};for(const _0x4e5d2c of normalizeLocalFiles(_0x1a71fa)){_0x2848f2[_0x4e5d2c['path']]=fileContent(_0x4e5d2c);}return Buffer['from'](zipSync(_0x2848f2,{'level':0x0,'mtime':ZIP_MTIME}));}function a109_0x5cd5(){const _0x21225a=['1343080ygsIxs','204593ekpBTM','from','sort','955752OlZvwc','object','10755780JjRVQe','map','length','validation_error','258561zSwHMf','15xjjWBh','392ehxwCn','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','2jbTlkd','validation','2071791YePmoW','code','7088CuNlSK'];a109_0x5cd5=function(){return _0x21225a;};return a109_0x5cd5();}export function parseZipPackage(_0x1bce5b){const _0x4eb972=a109_0x5769;if(_0x1bce5b[_0x4eb972(0xa7)]<0x16)throw CliErrors[_0x4eb972(0x9b)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x366702;try{_0x366702=unzipSync(_0x1bce5b,{'filter'(_0x473971){const _0x3bfba0=_0x4eb972,_0x55d378=normalizeSkillRelativePath(_0x473971['name']);if(_0x55d378[_0x3bfba0(0x99)]('/'))throw CliErrors[_0x3bfba0(0x9b)](_0x3bfba0(0xac)+_0x55d378);return!![];}});}catch(_0x4203e2){if(isRuntimeSkillValidationError(_0x4203e2))throw _0x4203e2;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x366702)[_0x4eb972(0xa6)](([_0x467eeb,_0x20dd35])=>({'path':normalizeSkillRelativePath(_0x467eeb),'bytes':Buffer[_0x4eb972(0xa1)](_0x20dd35)}))[_0x4eb972(0xa2)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x454108){const _0x1d3f4e=a109_0x5769;return typeof _0x454108===_0x1d3f4e(0xa4)&&_0x454108!==null&&'code'in _0x454108&&_0x454108[_0x1d3f4e(0x9d)]===_0x1d3f4e(0xa8);}
1
+ (function(_0x353b72,_0x3313d7){const _0x62372e=a115_0x136c,_0x1f1069=_0x353b72();while(!![]){try{const _0x4913a2=-parseInt(_0x62372e(0x1da))/0x1+parseInt(_0x62372e(0x1df))/0x2+-parseInt(_0x62372e(0x1d8))/0x3*(-parseInt(_0x62372e(0x1de))/0x4)+-parseInt(_0x62372e(0x1e0))/0x5+-parseInt(_0x62372e(0x1d9))/0x6*(parseInt(_0x62372e(0x1e6))/0x7)+parseInt(_0x62372e(0x1d4))/0x8*(parseInt(_0x62372e(0x1e2))/0x9)+-parseInt(_0x62372e(0x1dd))/0xa;if(_0x4913a2===_0x3313d7)break;else _0x1f1069['push'](_0x1f1069['shift']());}catch(_0x5c3451){_0x1f1069['push'](_0x1f1069['shift']());}}}(a115_0x35ce,0x89be1));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a115_0x35ce(){const _0x495d2d=['677408kqksTl','validation','sort','6356840gdJHZB','3399108niXKWU','1050676OhtePQ','419945goIqxb','endsWith','2013885THyNZn','from','validation_error','entries','14gXPAEa','code','name','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','40cayOTW','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','path','map','3NCIwGw','1597998tlbgwN'];a115_0x35ce=function(){return _0x495d2d;};return a115_0x35ce();}function a115_0x136c(_0x5aade7,_0xf7d7c6){_0x5aade7=_0x5aade7-0x1d2;const _0x35ce38=a115_0x35ce();let _0x136c74=_0x35ce38[_0x5aade7];return _0x136c74;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x200736){const _0x4597ad=a115_0x136c,_0x1cebae={};for(const _0x3d092b of normalizeLocalFiles(_0x200736)){_0x1cebae[_0x3d092b[_0x4597ad(0x1d6)]]=fileContent(_0x3d092b);}return Buffer[_0x4597ad(0x1e3)](zipSync(_0x1cebae,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x28b26f){const _0xf3c9dc=a115_0x136c;if(_0x28b26f[_0xf3c9dc(0x1d3)]<0x16)throw CliErrors[_0xf3c9dc(0x1db)](_0xf3c9dc(0x1d2));let _0x23dd4e;try{_0x23dd4e=unzipSync(_0x28b26f,{'filter'(_0x17d87b){const _0x44099c=_0xf3c9dc,_0x491c5b=normalizeSkillRelativePath(_0x17d87b[_0x44099c(0x1e8)]);if(_0x491c5b[_0x44099c(0x1e1)]('/'))throw CliErrors['validation'](_0x44099c(0x1d5)+_0x491c5b);return!![];}});}catch(_0x1b6a43){if(isRuntimeSkillValidationError(_0x1b6a43))throw _0x1b6a43;throw CliErrors['validation'](_0xf3c9dc(0x1d2));}return Object[_0xf3c9dc(0x1e5)](_0x23dd4e)[_0xf3c9dc(0x1d7)](([_0x5d3b86,_0xdc75f1])=>({'path':normalizeSkillRelativePath(_0x5d3b86),'bytes':Buffer['from'](_0xdc75f1)}))[_0xf3c9dc(0x1dc)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x34bfc5){const _0x3e6b87=a115_0x136c;return typeof _0x34bfc5==='object'&&_0x34bfc5!==null&&_0x3e6b87(0x1e7)in _0x34bfc5&&_0x34bfc5['code']===_0x3e6b87(0x1e4);}
@@ -0,0 +1,15 @@
1
+ import type { BuiltSkillPackage, LocalSkillFile, RuntimeSkillFile, RuntimeSkillFilesManifest } from "./types.js";
2
+ /** Builds a deterministic zip package and matching manifest for local pushes. */
3
+ export declare function buildSkillPackage(files: LocalSkillFile[]): BuiltSkillPackage;
4
+ /** Verifies a package against a manifest including zip-level byte evidence. */
5
+ export declare function verifyRuntimeSkillPackage(manifest: RuntimeSkillFilesManifest, packageBytes: Buffer): LocalSkillFile[];
6
+ /** Verifies bundle entries when SkillHub may have rebuilt the zip container. */
7
+ export declare function verifyRuntimeSkillBundle(manifest: RuntimeSkillFilesManifest, packageBytes: Buffer): LocalSkillFile[];
8
+ /** Normalizes a package manifest and returns undefined when it is absent. */
9
+ export declare function tryNormalizePackageManifest(manifest: RuntimeSkillFilesManifest | undefined): RuntimeSkillFilesManifest | undefined;
10
+ /** Requires package bytes for install. */
11
+ export declare function requirePackageBytes(skillCode: string, packageBytes: Buffer | undefined): Buffer;
12
+ /** Extracts a downloaded install package without consulting legacy content fields. */
13
+ export declare function extractDownloadedPackage(packageBytes: Buffer): LocalSkillFile[];
14
+ /** Converts local package files into manifest entries with hashes and sizes. */
15
+ export declare function localFilesToManifestFiles(files: LocalSkillFile[]): RuntimeSkillFile[];
@@ -1 +1 @@
1
- (function(_0x536d47,_0x3e82b6){const _0x1c507f=a110_0x5646,_0x2a8c15=_0x536d47();while(!![]){try{const _0x336f9b=-parseInt(_0x1c507f(0x19c))/0x1+-parseInt(_0x1c507f(0x191))/0x2*(-parseInt(_0x1c507f(0x196))/0x3)+parseInt(_0x1c507f(0x195))/0x4+-parseInt(_0x1c507f(0x18e))/0x5+-parseInt(_0x1c507f(0x183))/0x6+-parseInt(_0x1c507f(0x181))/0x7*(-parseInt(_0x1c507f(0x192))/0x8)+parseInt(_0x1c507f(0x190))/0x9;if(_0x336f9b===_0x3e82b6)break;else _0x2a8c15['push'](_0x2a8c15['shift']());}catch(_0x475936){_0x2a8c15['push'](_0x2a8c15['shift']());}}}(a110_0xbf45,0x56561));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(_0x3b3ac6){const _0x51baa5=a110_0x5646,_0x2c0c58=normalizeLocalFiles(_0x3b3ac6);if(!_0x2c0c58[_0x51baa5(0x197)](_0x3e35fa=>_0x3e35fa['path']===SKILL_FILE))throw CliErrors[_0x51baa5(0x1a1)]('Missing\x20'+SKILL_FILE+_0x51baa5(0x18c));const _0x50babd=localFilesToManifestFiles(_0x2c0c58),_0x63ed4b=createDeterministicZipPackage(_0x2c0c58);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x50babd),'zipSha256':bufferSha256(_0x63ed4b),'zipSize':_0x63ed4b[_0x51baa5(0x1a4)],'files':_0x50babd},'packageBytes':_0x63ed4b,'packageBase64':_0x63ed4b['toString'](_0x51baa5(0x186))};}export function verifyRuntimeSkillPackage(_0x37d771,_0x546895){const _0x59a8fb=a110_0x5646,_0x3504e2=normalizePackageManifest(_0x37d771,{'requireOssPath':![]});if(!_0x3504e2)throw CliErrors['validation'](_0x59a8fb(0x19a));return extractAndVerifyPackage(_0x3504e2,_0x546895);}export function verifyRuntimeSkillBundle(_0x743e5a,_0x52cfd6){const _0x134e67=a110_0x5646,_0x40211c=normalizePackageManifest(_0x743e5a,{'requireOssPath':![]});if(!_0x40211c)throw CliErrors[_0x134e67(0x1a1)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x40211c,_0x52cfd6);}function a110_0xbf45(){const _0x1f9dbd=['Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','string','length','toLowerCase','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','4179cQEoTQ','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','2881578Qlyyid','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','base64','files','ossPath','Runtime\x20Skill\x20package\x20is\x20missing\x20','push','Runtime\x20Skill\x20package\x20size\x20mismatch.','\x20in\x20Skill\x20file\x20package.','has','115200JMNGvR','bytes','329652pXorrl','38oMIVtw','8312ywFnoa','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','zipSize','2148156PihmsN','6666anuFuf','some','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','trim','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','zipSha256','379232DVbCui','path','treeSha256','map','isSafeInteger','validation'];a110_0xbf45=function(){return _0x1f9dbd;};return a110_0xbf45();}export function tryNormalizePackageManifest(_0x3a5952){return normalizePackageManifest(_0x3a5952,{'requireOssPath':![]});}export function requirePackageBytes(_0x2a55ae,_0x21563d){const _0xd304ef=a110_0x5646;if(!_0x21563d||_0x21563d[_0xd304ef(0x1a4)]===0x0)throw CliErrors[_0xd304ef(0x1a1)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x2a55ae);return _0x21563d;}export function extractDownloadedPackage(_0x441208){const _0x2984f9=a110_0x5646,_0xe88512=parseZipPackage(_0x441208)[_0x2984f9(0x19f)](_0xc0fc53=>({'path':_0xc0fc53['path'],'bytes':_0xc0fc53[_0x2984f9(0x18f)]}));if(!_0xe88512[_0x2984f9(0x197)](_0x56a196=>_0x56a196['path']===SKILL_FILE))throw CliErrors['validation'](_0x2984f9(0x189)+SKILL_FILE+'.');return normalizeLocalFiles(_0xe88512);}export function localFilesToManifestFiles(_0x246e58){const _0x15194a=a110_0x5646;return normalizeLocalFiles(_0x246e58)[_0x15194a(0x19f)](_0x323c01=>({'path':_0x323c01[_0x15194a(0x19d)],'sha256':fileHash(_0x323c01),'size':fileContent(_0x323c01)['length']}));}function normalizePackageManifest(_0x361a77,_0x1613b3){const _0x29fdd1=a110_0x5646;if(!_0x361a77||typeof _0x361a77!=='object'||Array['isArray'](_0x361a77))return undefined;const _0x5861ef=_0x361a77,_0x4448b7=typeof _0x5861ef[_0x29fdd1(0x188)]===_0x29fdd1(0x1a3)?_0x5861ef[_0x29fdd1(0x188)][_0x29fdd1(0x199)]():undefined;if(_0x1613b3['requireOssPath']&&!_0x4448b7)return undefined;if(!Array[_0x29fdd1(0x184)](_0x5861ef[_0x29fdd1(0x187)])||_0x5861ef[_0x29fdd1(0x187)]['length']===0x0)return undefined;if(!isSha256Hex(_0x5861ef['treeSha256']))throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x17f));if(!isSha256Hex(_0x5861ef[_0x29fdd1(0x19b)]))throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x180));if(!Number[_0x29fdd1(0x1a0)](_0x5861ef[_0x29fdd1(0x194)])||_0x5861ef[_0x29fdd1(0x194)]<0x0)throw CliErrors['validation'](_0x29fdd1(0x1a2));const _0x2e305c=normalizeManifestFiles(_0x5861ef['files']);if(!_0x2e305c['some'](_0x3d26ab=>_0x3d26ab[_0x29fdd1(0x19d)]===SKILL_FILE))throw CliErrors['validation'](_0x29fdd1(0x198)+SKILL_FILE+'.');const _0x4a25ec=fileTreeHash(_0x2e305c);if(_0x4a25ec!==_0x5861ef[_0x29fdd1(0x19e)]['toLowerCase']())throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x193));return{'schemaVersion':Number[_0x29fdd1(0x1a0)](_0x5861ef['schemaVersion'])?_0x5861ef['schemaVersion']:0x2,'ossPath':_0x4448b7,'treeSha256':_0x4a25ec,'zipSha256':_0x5861ef['zipSha256'][_0x29fdd1(0x17e)](),'zipSize':_0x5861ef[_0x29fdd1(0x194)],'files':_0x2e305c};}function extractAndVerifyPackage(_0x43f708,_0x229574){const _0x59bb74=a110_0x5646,_0x236834=normalizePackageManifest(_0x43f708,{'requireOssPath':![]});if(!_0x236834)throw CliErrors[_0x59bb74(0x1a1)](_0x59bb74(0x19a));if(_0x229574[_0x59bb74(0x1a4)]!==_0x236834['zipSize'])throw CliErrors[_0x59bb74(0x1a1)](_0x59bb74(0x18b));const _0x26dd11=bufferSha256(_0x229574);if(_0x26dd11!==_0x236834[_0x59bb74(0x19b)])throw CliErrors[_0x59bb74(0x1a1)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x236834,_0x229574);}function a110_0x5646(_0x3b74ab,_0x4c5c54){_0x3b74ab=_0x3b74ab-0x17e;const _0xbf453b=a110_0xbf45();let _0x5646e1=_0xbf453b[_0x3b74ab];return _0x5646e1;}function extractAndVerifyPackageFiles(_0x7ac61b,_0x336e7b){const _0x37a32c=a110_0x5646,_0x361a14=parseZipPackage(_0x336e7b);if(_0x361a14[_0x37a32c(0x1a4)]!==_0x7ac61b[_0x37a32c(0x187)]['length'])throw CliErrors[_0x37a32c(0x1a1)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x17851b=new Map();for(const _0x4cc45a of _0x361a14){if(_0x17851b[_0x37a32c(0x18d)](_0x4cc45a[_0x37a32c(0x19d)]))throw CliErrors[_0x37a32c(0x1a1)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x4cc45a['path']);_0x17851b['set'](_0x4cc45a[_0x37a32c(0x19d)],_0x4cc45a);}const _0x2ada46=[];for(const _0x34d465 of _0x7ac61b['files']){const _0x5366e1=_0x17851b['get'](_0x34d465[_0x37a32c(0x19d)]);if(!_0x5366e1)throw CliErrors[_0x37a32c(0x1a1)](_0x37a32c(0x185)+_0x34d465[_0x37a32c(0x19d)]);if(_0x5366e1['bytes'][_0x37a32c(0x1a4)]!==_0x34d465['size'])throw CliErrors['validation'](_0x37a32c(0x182)+_0x34d465['path']);const _0x2c8e0b=bufferSha256(_0x5366e1[_0x37a32c(0x18f)]);if(_0x2c8e0b!==_0x34d465['sha256'])throw CliErrors[_0x37a32c(0x1a1)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x34d465[_0x37a32c(0x19d)]);_0x2ada46[_0x37a32c(0x18a)]({'path':_0x34d465['path'],'bytes':_0x5366e1[_0x37a32c(0x18f)]});}return normalizeLocalFiles(_0x2ada46);}
1
+ (function(_0x212231,_0x1cb8b4){const _0x44da25=a116_0x11e3,_0x17927a=_0x212231();while(!![]){try{const _0x3d116e=-parseInt(_0x44da25(0x1c9))/0x1*(-parseInt(_0x44da25(0x1e9))/0x2)+-parseInt(_0x44da25(0x1db))/0x3+parseInt(_0x44da25(0x1d2))/0x4+-parseInt(_0x44da25(0x1e2))/0x5*(-parseInt(_0x44da25(0x1d1))/0x6)+parseInt(_0x44da25(0x1d9))/0x7+-parseInt(_0x44da25(0x1e5))/0x8+parseInt(_0x44da25(0x1d6))/0x9*(-parseInt(_0x44da25(0x1c5))/0xa);if(_0x3d116e===_0x1cb8b4)break;else _0x17927a['push'](_0x17927a['shift']());}catch(_0x464daf){_0x17927a['push'](_0x17927a['shift']());}}}(a116_0xa7bd,0xf0f4e));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(_0x25a151){const _0x4082af=a116_0x11e3,_0x49e3dd=normalizeLocalFiles(_0x25a151);if(!_0x49e3dd[_0x4082af(0x1c2)](_0x2984c8=>_0x2984c8[_0x4082af(0x1c8)]===SKILL_FILE))throw CliErrors[_0x4082af(0x1da)](_0x4082af(0x1d3)+SKILL_FILE+_0x4082af(0x1ca));const _0x5c5ab2=localFilesToManifestFiles(_0x49e3dd),_0x3594ed=createDeterministicZipPackage(_0x49e3dd);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c5ab2),'zipSha256':bufferSha256(_0x3594ed),'zipSize':_0x3594ed['length'],'files':_0x5c5ab2},'packageBytes':_0x3594ed,'packageBase64':_0x3594ed['toString'](_0x4082af(0x1c3))};}export function verifyRuntimeSkillPackage(_0x2e8765,_0x10ddcf){const _0x36ea50=normalizePackageManifest(_0x2e8765,{'requireOssPath':![]});if(!_0x36ea50)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x36ea50,_0x10ddcf);}function a116_0xa7bd(){const _0x146390=['2072224oUEktt','Missing\x20','zipSize','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','153hVmEFS','length','sha256','13171186XsjpYd','validation','2853879Myfbjf','ossPath','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','1090YULjpf','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','5872888rOOSZI','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','files','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','268EwLUZB','toLowerCase','map','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','push','treeSha256','trim','size','schemaVersion','Duplicate\x20Skill\x20package\x20entry:\x20','some','base64','isSafeInteger','1100860WfFpJx','get','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','path','5303JAWQFa','\x20in\x20Skill\x20file\x20package.','zipSha256','isArray','set','string','requireOssPath','bytes','39456dCpVps'];a116_0xa7bd=function(){return _0x146390;};return a116_0xa7bd();}export function verifyRuntimeSkillBundle(_0x3c999d,_0x2bd1e0){const _0x505a8b=a116_0x11e3,_0x5821b3=normalizePackageManifest(_0x3c999d,{'requireOssPath':![]});if(!_0x5821b3)throw CliErrors[_0x505a8b(0x1da)](_0x505a8b(0x1e6));return extractAndVerifyPackageFiles(_0x5821b3,_0x2bd1e0);}export function tryNormalizePackageManifest(_0x2c6543){return normalizePackageManifest(_0x2c6543,{'requireOssPath':![]});}export function requirePackageBytes(_0x234aa4,_0x4f5e07){const _0x47b82d=a116_0x11e3;if(!_0x4f5e07||_0x4f5e07['length']===0x0)throw CliErrors['validation'](_0x47b82d(0x1e1)+_0x234aa4);return _0x4f5e07;}export function extractDownloadedPackage(_0x592304){const _0x366acd=a116_0x11e3,_0x59ed84=parseZipPackage(_0x592304)[_0x366acd(0x1eb)](_0x556607=>({'path':_0x556607['path'],'bytes':_0x556607[_0x366acd(0x1d0)]}));if(!_0x59ed84[_0x366acd(0x1c2)](_0x2d4b85=>_0x2d4b85[_0x366acd(0x1c8)]===SKILL_FILE))throw CliErrors[_0x366acd(0x1da)](_0x366acd(0x1e3)+SKILL_FILE+'.');return normalizeLocalFiles(_0x59ed84);}export function localFilesToManifestFiles(_0x247cb1){const _0xcf738e=a116_0x11e3;return normalizeLocalFiles(_0x247cb1)['map'](_0x1373d2=>({'path':_0x1373d2[_0xcf738e(0x1c8)],'sha256':fileHash(_0x1373d2),'size':fileContent(_0x1373d2)[_0xcf738e(0x1d7)]}));}function normalizePackageManifest(_0x6de4c9,_0x4295f4){const _0x520072=a116_0x11e3;if(!_0x6de4c9||typeof _0x6de4c9!=='object'||Array['isArray'](_0x6de4c9))return undefined;const _0x4d7671=_0x6de4c9,_0x248312=typeof _0x4d7671[_0x520072(0x1dc)]===_0x520072(0x1ce)?_0x4d7671['ossPath'][_0x520072(0x1ef)]():undefined;if(_0x4295f4[_0x520072(0x1cf)]&&!_0x248312)return undefined;if(!Array[_0x520072(0x1cc)](_0x4d7671[_0x520072(0x1e7)])||_0x4d7671[_0x520072(0x1e7)][_0x520072(0x1d7)]===0x0)return undefined;if(!isSha256Hex(_0x4d7671[_0x520072(0x1ee)]))throw CliErrors['validation'](_0x520072(0x1e0));if(!isSha256Hex(_0x4d7671['zipSha256']))throw CliErrors[_0x520072(0x1da)](_0x520072(0x1c7));if(!Number[_0x520072(0x1c4)](_0x4d7671['zipSize'])||_0x4d7671['zipSize']<0x0)throw CliErrors[_0x520072(0x1da)](_0x520072(0x1ec));const _0x108f7d=normalizeManifestFiles(_0x4d7671['files']);if(!_0x108f7d[_0x520072(0x1c2)](_0x446e0c=>_0x446e0c[_0x520072(0x1c8)]===SKILL_FILE))throw CliErrors[_0x520072(0x1da)](_0x520072(0x1d5)+SKILL_FILE+'.');const _0x537b88=fileTreeHash(_0x108f7d);if(_0x537b88!==_0x4d7671[_0x520072(0x1ee)][_0x520072(0x1ea)]())throw CliErrors['validation'](_0x520072(0x1df));return{'schemaVersion':Number['isSafeInteger'](_0x4d7671[_0x520072(0x1c0)])?_0x4d7671[_0x520072(0x1c0)]:0x2,'ossPath':_0x248312,'treeSha256':_0x537b88,'zipSha256':_0x4d7671[_0x520072(0x1cb)][_0x520072(0x1ea)](),'zipSize':_0x4d7671[_0x520072(0x1d4)],'files':_0x108f7d};}function a116_0x11e3(_0x56bb8e,_0x184b40){_0x56bb8e=_0x56bb8e-0x1bf;const _0xa7bd22=a116_0xa7bd();let _0x11e3d2=_0xa7bd22[_0x56bb8e];return _0x11e3d2;}function extractAndVerifyPackage(_0x776ace,_0x223a55){const _0x8585f=a116_0x11e3,_0x2ba0d7=normalizePackageManifest(_0x776ace,{'requireOssPath':![]});if(!_0x2ba0d7)throw CliErrors[_0x8585f(0x1da)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x223a55[_0x8585f(0x1d7)]!==_0x2ba0d7[_0x8585f(0x1d4)])throw CliErrors[_0x8585f(0x1da)](_0x8585f(0x1de));const _0x23ce22=bufferSha256(_0x223a55);if(_0x23ce22!==_0x2ba0d7[_0x8585f(0x1cb)])throw CliErrors[_0x8585f(0x1da)](_0x8585f(0x1dd));return extractAndVerifyPackageFiles(_0x2ba0d7,_0x223a55);}function extractAndVerifyPackageFiles(_0x9b294a,_0x351edc){const _0x2f42cf=a116_0x11e3,_0x465ec6=parseZipPackage(_0x351edc);if(_0x465ec6['length']!==_0x9b294a[_0x2f42cf(0x1e7)][_0x2f42cf(0x1d7)])throw CliErrors[_0x2f42cf(0x1da)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x18e0c1=new Map();for(const _0x1244c2 of _0x465ec6){if(_0x18e0c1['has'](_0x1244c2['path']))throw CliErrors['validation'](_0x2f42cf(0x1c1)+_0x1244c2[_0x2f42cf(0x1c8)]);_0x18e0c1[_0x2f42cf(0x1cd)](_0x1244c2[_0x2f42cf(0x1c8)],_0x1244c2);}const _0x3e3bc4=[];for(const _0x2af639 of _0x9b294a[_0x2f42cf(0x1e7)]){const _0x14dd08=_0x18e0c1[_0x2f42cf(0x1c6)](_0x2af639[_0x2f42cf(0x1c8)]);if(!_0x14dd08)throw CliErrors[_0x2f42cf(0x1da)](_0x2f42cf(0x1e8)+_0x2af639[_0x2f42cf(0x1c8)]);if(_0x14dd08['bytes'][_0x2f42cf(0x1d7)]!==_0x2af639[_0x2f42cf(0x1bf)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x2af639[_0x2f42cf(0x1c8)]);const _0x194df3=bufferSha256(_0x14dd08[_0x2f42cf(0x1d0)]);if(_0x194df3!==_0x2af639[_0x2f42cf(0x1d8)])throw CliErrors[_0x2f42cf(0x1da)](_0x2f42cf(0x1e4)+_0x2af639[_0x2f42cf(0x1c8)]);_0x3e3bc4[_0x2f42cf(0x1ed)]({'path':_0x2af639['path'],'bytes':_0x14dd08[_0x2f42cf(0x1d0)]});}return normalizeLocalFiles(_0x3e3bc4);}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @fileoverview Public facade for runtime Skill local sync.
3
+ *
4
+ * The implementation is split by responsibility under `runtime-skill-sync/`.
5
+ * This entrypoint intentionally keeps the historical import path stable.
6
+ */
7
+ export { contentHash, fileTreeHash, } from "./runtime-skill-sync/hashing.js";
8
+ export { linkEffectiveRuntimeSkills, linkGlobalRuntimeSkills, pruneStaleRuntimeSkillCache, pruneStaleRuntimeSkillLinks, } from "./runtime-skill-sync/links.js";
9
+ export { listLocalRuntimeSkills } from "./runtime-skill-sync/list-local.js";
10
+ export { materializeRuntimeSkill } from "./runtime-skill-sync/materialize.js";
11
+ export { readMetadataIfPresent } from "./runtime-skill-sync/metadata.js";
12
+ export { getRuntimeSkillCacheRoot, getRuntimeSkillDir, resolveSkillSyncPaths, runtimeAgentSkillRoots, } from "./runtime-skill-sync/paths.js";
13
+ export { deriveSkillCodeFromDirectory, readPushDirectory, refreshPushDirectoryMetadataFromRemote, recordPushedRuntimeSkill, resolvePushDirectoryIdentity, } from "./runtime-skill-sync/push.js";
14
+ export type { BuiltSkillPackage, GlobalRuntimeSkillLinkResult, LinkRuntimeSkillResult, LocalRuntimeSkillItem, LocalRuntimeSkillListInput, LocalSkillFile, MaterializedRuntimeSkill, PruneRuntimeSkillResult, PushDirectoryPayload, RuntimeSkillFile, RuntimeSkillFilesManifest, RuntimeSkillItem, RuntimeSkillMetadata, RuntimeSkillScope, SkillSyncPaths, SkillSyncPathsOptions, } from "./runtime-skill-sync/types.js";
15
+ export { buildSkillPackage, verifyRuntimeSkillBundle, verifyRuntimeSkillPackage, } from "./runtime-skill-sync/zip-package.js";
@@ -1 +1 @@
1
- (function(_0x4bd59c,_0x13c7a9){var _0x1ed40b=a111_0x1f90,_0x2b60f5=_0x4bd59c();while(!![]){try{var _0x3773e0=-parseInt(_0x1ed40b(0x1d5))/0x1*(-parseInt(_0x1ed40b(0x1d7))/0x2)+parseInt(_0x1ed40b(0x1d3))/0x3*(parseInt(_0x1ed40b(0x1d2))/0x4)+parseInt(_0x1ed40b(0x1d0))/0x5*(parseInt(_0x1ed40b(0x1cb))/0x6)+-parseInt(_0x1ed40b(0x1cd))/0x7*(-parseInt(_0x1ed40b(0x1d1))/0x8)+parseInt(_0x1ed40b(0x1cf))/0x9*(-parseInt(_0x1ed40b(0x1d4))/0xa)+parseInt(_0x1ed40b(0x1ce))/0xb+parseInt(_0x1ed40b(0x1d6))/0xc*(-parseInt(_0x1ed40b(0x1cc))/0xd);if(_0x3773e0===_0x13c7a9)break;else _0x2b60f5['push'](_0x2b60f5['shift']());}catch(_0x349ae6){_0x2b60f5['push'](_0x2b60f5['shift']());}}}(a111_0x34f2,0x25ddc));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a111_0x34f2(){var _0x3b4874=['21fZNfQf','651970hKGOls','18xONmfZ','677595TYySuy','344944VxHCIm','789212fleqWd','3UvhuAA','1496230EqbRsD','1XfRAYJ','252aroDma','556658EPmRdW','6CFOzeH','213837MTSlOZ'];a111_0x34f2=function(){return _0x3b4874;};return a111_0x34f2();}export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a111_0x1f90(_0x52689d,_0x18ca24){_0x52689d=_0x52689d-0x1cb;var _0x34f2e6=a111_0x34f2();var _0x1f90f5=_0x34f2e6[_0x52689d];return _0x1f90f5;}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}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';
1
+ function a117_0x2ad7(_0x4d07cf,_0x32f9fe){_0x4d07cf=_0x4d07cf-0x11b;var _0x3ca236=a117_0x3ca2();var _0x2ad7e0=_0x3ca236[_0x4d07cf];return _0x2ad7e0;}(function(_0x977936,_0x41d3dd){var _0x4e4d5b=a117_0x2ad7,_0x583719=_0x977936();while(!![]){try{var _0x50242b=parseInt(_0x4e4d5b(0x11b))/0x1+parseInt(_0x4e4d5b(0x124))/0x2*(-parseInt(_0x4e4d5b(0x126))/0x3)+parseInt(_0x4e4d5b(0x11d))/0x4+-parseInt(_0x4e4d5b(0x125))/0x5*(-parseInt(_0x4e4d5b(0x121))/0x6)+parseInt(_0x4e4d5b(0x123))/0x7*(parseInt(_0x4e4d5b(0x122))/0x8)+parseInt(_0x4e4d5b(0x11c))/0x9*(parseInt(_0x4e4d5b(0x120))/0xa)+-parseInt(_0x4e4d5b(0x11e))/0xb*(parseInt(_0x4e4d5b(0x11f))/0xc);if(_0x50242b===_0x41d3dd)break;else _0x583719['push'](_0x583719['shift']());}catch(_0x234dfa){_0x583719['push'](_0x583719['shift']());}}}(a117_0x3ca2,0xe7f6c));function a117_0x3ca2(){var _0x22aa5=['378742rQPqZh','494jOuTCk','607030pKSUkL','8259MhNcsV','612744GHCVuy','1899rbKhEV','525932FRRHAq','121dVbCql','1601364XrPqLa','4670hJTqSs','66cBDuYc','136ZFXcTf'];a117_0x3ca2=function(){return _0x22aa5;};return a117_0x3ca2();}export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}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';
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @fileoverview jq filter integration — wires the framework's jq helper to Lovrabet's error factory.
3
+ *
4
+ * This module exists solely to create a jq filter function bound to `CliErrors`.
5
+ * The actual jq logic (binary resolution, exec, error handling) lives in the
6
+ * framework package. We re-export it here so commands can import from the
7
+ * runtime's utils rather than reaching into the framework.
8
+ *
9
+ * Why not import `applyJqFilter` directly from the framework: commands in the
10
+ * runtime CLI import from `@/utils/apply-jq-filter` rather than from the
11
+ * framework package. This module bridges the two by creating the bound function
12
+ * using the runtime's `CliErrors`.
13
+ */
14
+ /**
15
+ * A jq filter function pre-bound to Lovrabet's error factory.
16
+ *
17
+ * Usage:
18
+ * ```ts
19
+ * import { applyJqFilter } from "../utils/apply-jq-filter";
20
+ * const out = applyJqFilter(jsonInput, ".[].name");
21
+ * ```
22
+ *
23
+ * @see createJqFilter in `@lovrabet/cli-framework` for full documentation.
24
+ */
25
+ export declare const applyJqFilter: (jsonInput: string, expr: string) => string;
@@ -1 +1 @@
1
- (function(_0xb680ca,_0x573af1){const _0x39eb9b=a112_0x1821,_0x2d5302=_0xb680ca();while(!![]){try{const _0x2c1c51=-parseInt(_0x39eb9b(0x140))/0x1*(parseInt(_0x39eb9b(0x145))/0x2)+-parseInt(_0x39eb9b(0x142))/0x3+parseInt(_0x39eb9b(0x13f))/0x4*(parseInt(_0x39eb9b(0x141))/0x5)+-parseInt(_0x39eb9b(0x13d))/0x6+parseInt(_0x39eb9b(0x146))/0x7*(-parseInt(_0x39eb9b(0x13e))/0x8)+parseInt(_0x39eb9b(0x144))/0x9+parseInt(_0x39eb9b(0x143))/0xa;if(_0x2c1c51===_0x573af1)break;else _0x2d5302['push'](_0x2d5302['shift']());}catch(_0x262ed3){_0x2d5302['push'](_0x2d5302['shift']());}}}(a112_0x33fa,0x65d26));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a112_0x1821(_0x12d875,_0x35b8ce){_0x12d875=_0x12d875-0x13d;const _0x33fa09=a112_0x33fa();let _0x182105=_0x33fa09[_0x12d875];return _0x182105;}function a112_0x33fa(){const _0x2be85a=['5823zTBcpR','1961585NkmdWp','579369ywRoOn','16139380DtmPtK','286227FLtNMD','140JQBYWB','3704659yBjdeR','2946156vkfbOd','8DMhpDN','4BQvOnO'];a112_0x33fa=function(){return _0x2be85a;};return a112_0x33fa();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ function a118_0x4a8d(_0x245524,_0x1e821d){_0x245524=_0x245524-0x168;const _0x578235=a118_0x5782();let _0x4a8dea=_0x578235[_0x245524];return _0x4a8dea;}(function(_0x4e5c52,_0x12de8a){const _0x33736f=a118_0x4a8d,_0xb0c0d8=_0x4e5c52();while(!![]){try{const _0x160bf2=-parseInt(_0x33736f(0x169))/0x1*(parseInt(_0x33736f(0x16c))/0x2)+parseInt(_0x33736f(0x16e))/0x3+parseInt(_0x33736f(0x16d))/0x4*(-parseInt(_0x33736f(0x171))/0x5)+-parseInt(_0x33736f(0x16a))/0x6+parseInt(_0x33736f(0x172))/0x7*(-parseInt(_0x33736f(0x16f))/0x8)+parseInt(_0x33736f(0x170))/0x9+-parseInt(_0x33736f(0x168))/0xa*(-parseInt(_0x33736f(0x16b))/0xb);if(_0x160bf2===_0x12de8a)break;else _0xb0c0d8['push'](_0xb0c0d8['shift']());}catch(_0x23483e){_0xb0c0d8['push'](_0xb0c0d8['shift']());}}}(a118_0x5782,0x40451));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a118_0x5782(){const _0xcdf782=['29018tGtuXD','3504GuHLVT','327483wmdFxE','182568cJnFaW','1641843EJzkNl','110JarBKR','56fCoNVw','550EnDaOF','19VhBEYe','1846758AwJXMP','151393bxSFnS'];a118_0x5782=function(){return _0xcdf782;};return a118_0x5782();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});