@lovrabet/lovrabet-cli 2.1.23-beta.2 → 2.1.23-beta.4

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 (139) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.d.ts +2 -8
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/ocr/index.js +1 -1
  37. package/lib/commands/personal-bff/index.js +1 -1
  38. package/lib/commands/registry.js +1 -1
  39. package/lib/commands/schedule/index.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/function-name-adapter.js +1 -1
  43. package/lib/commands/service/index.js +1 -1
  44. package/lib/commands/service/registry.js +1 -1
  45. package/lib/commands/skill/commands/create.js +1 -1
  46. package/lib/commands/skill/commands/diagram.js +1 -1
  47. package/lib/commands/skill/commands/install.js +1 -1
  48. package/lib/commands/skill/commands/list.js +1 -1
  49. package/lib/commands/skill/commands/push.js +1 -1
  50. package/lib/commands/skill/commands/validate.js +1 -1
  51. package/lib/commands/skill/diagram.d.ts +6 -0
  52. package/lib/commands/skill/diagram.js +1 -1
  53. package/lib/commands/skill/flags.js +1 -1
  54. package/lib/commands/skill/index.js +1 -1
  55. package/lib/commands/skill/manifest-helpers.js +1 -1
  56. package/lib/commands/skill/push-execute.js +1 -1
  57. package/lib/commands/skill/push-flow-helpers.js +1 -1
  58. package/lib/commands/skill/push-retarget.js +1 -1
  59. package/lib/commands/skill/scopes.js +1 -1
  60. package/lib/commands/skill/summary.js +1 -1
  61. package/lib/commands/skill/templates.js +1 -1
  62. package/lib/commands/skill/validate.js +1 -1
  63. package/lib/commands/sql/detail.js +1 -1
  64. package/lib/commands/sql/exec.js +1 -1
  65. package/lib/commands/sql/index.js +1 -1
  66. package/lib/commands/update.js +1 -1
  67. package/lib/commands/workspace/index.js +1 -1
  68. package/lib/config/schema.js +1 -1
  69. package/lib/constant/app.js +1 -1
  70. package/lib/constant/auth-mode.js +1 -1
  71. package/lib/constant/cli.js +1 -1
  72. package/lib/constant/defaults.js +1 -1
  73. package/lib/constant/distribution.js +1 -1
  74. package/lib/constant/domain.js +1 -1
  75. package/lib/constant/env.js +1 -1
  76. package/lib/constant/output.js +1 -1
  77. package/lib/constant/product.d.ts +14 -0
  78. package/lib/constant/product.js +1 -1
  79. package/lib/constant/risk.js +1 -1
  80. package/lib/constant/url.js +1 -1
  81. package/lib/context.js +1 -1
  82. package/lib/core/api-client.js +1 -1
  83. package/lib/core/db-resolver.js +1 -1
  84. package/lib/core/sdk-client.js +1 -1
  85. package/lib/errors.js +1 -1
  86. package/lib/framework/build-all-flags.js +1 -1
  87. package/lib/framework/dryrun.js +1 -1
  88. package/lib/framework/flags.js +1 -1
  89. package/lib/framework/help.js +1 -1
  90. package/lib/framework/index.js +1 -1
  91. package/lib/framework/output.js +1 -1
  92. package/lib/framework/preparse.js +1 -1
  93. package/lib/framework/rate-limit.js +1 -1
  94. package/lib/framework/raw-flags.js +1 -1
  95. package/lib/framework/response.js +1 -1
  96. package/lib/framework/runner-confirmation.js +1 -1
  97. package/lib/framework/runner-error.js +1 -1
  98. package/lib/framework/runner.js +1 -1
  99. package/lib/framework/schema-export.js +1 -1
  100. package/lib/framework/service-order.js +1 -1
  101. package/lib/framework/types.js +1 -1
  102. package/lib/generated/build-info.d.ts +4 -4
  103. package/lib/generated/build-info.js +1 -1
  104. package/lib/help.js +1 -1
  105. package/lib/runtime/confirmation.js +1 -1
  106. package/lib/runtime/event.js +1 -1
  107. package/lib/runtime/index.js +1 -1
  108. package/lib/runtime/queue.js +1 -1
  109. package/lib/runtime/resolve.js +1 -1
  110. package/lib/skills/npx-skills-add.d.ts +30 -0
  111. package/lib/skills/npx-skills-add.js +1 -1
  112. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  113. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  114. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  115. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  116. package/lib/skills/runtime-skill-sync/links.js +1 -1
  117. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  118. package/lib/skills/runtime-skill-sync/local-files.d.ts +4 -1
  119. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  120. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  121. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  122. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  123. package/lib/skills/runtime-skill-sync/push.d.ts +1 -0
  124. package/lib/skills/runtime-skill-sync/push.js +1 -1
  125. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  126. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  127. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  128. package/lib/skills/runtime-skill-sync.js +1 -1
  129. package/lib/skills/skill-presence.d.ts +48 -0
  130. package/lib/skills/skill-presence.js +1 -0
  131. package/lib/utils/apply-jq-filter.js +1 -1
  132. package/lib/utils/logger.js +1 -1
  133. package/lib/utils/lossless-json.js +1 -1
  134. package/lib/utils/params.js +1 -1
  135. package/lib/utils/platform.js +1 -1
  136. package/lib/utils/update-notice.js +1 -1
  137. package/lib/utils/version.js +1 -1
  138. package/lib/utils/write-cli-side-channel.js +1 -1
  139. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
1
  import type { LocalSkillFile, RuntimeSkillFile } from "./types.js";
2
+ export interface ScanSkillDirectoryOptions {
3
+ excludedFilePaths?: readonly string[];
4
+ }
2
5
  /** Converts a local file entry into bytes for hashing, packaging, or writes. */
3
6
  export declare function fileContent(file: LocalSkillFile): Buffer;
4
7
  /** Decodes a local file entry as UTF-8 text for SKILL.md and metadata logic. */
@@ -8,7 +11,7 @@ export declare function normalizeLocalFiles(files: LocalSkillFile[] | undefined)
8
11
  /** Normalizes remote manifest entries and validates hash and size metadata. */
9
12
  export declare function normalizeManifestFiles(files: RuntimeSkillFile[] | undefined): RuntimeSkillFile[];
10
13
  /** Scans a Skill directory into normalized package entries while skipping local-only files. */
11
- export declare function scanSkillDirectory(dir: string): LocalSkillFile[];
14
+ export declare function scanSkillDirectory(dir: string, options?: ScanSkillDirectoryOptions): LocalSkillFile[];
12
15
  /** Sorts SKILL.md first and then keeps the remaining file paths deterministic. */
13
16
  export declare function compareSkillFiles(a: {
14
17
  path: string;
@@ -1 +1 @@
1
- (function(_0x4ccdc4,_0x2b09de){const _0x13c190=a113_0x1e3e,_0x20abd4=_0x4ccdc4();while(!![]){try{const _0x5677db=-parseInt(_0x13c190(0x144))/0x1+-parseInt(_0x13c190(0x160))/0x2*(parseInt(_0x13c190(0x149))/0x3)+parseInt(_0x13c190(0x14f))/0x4+-parseInt(_0x13c190(0x13a))/0x5+parseInt(_0x13c190(0x15c))/0x6*(parseInt(_0x13c190(0x166))/0x7)+parseInt(_0x13c190(0x13b))/0x8*(parseInt(_0x13c190(0x15a))/0x9)+parseInt(_0x13c190(0x15b))/0xa*(-parseInt(_0x13c190(0x146))/0xb);if(_0x5677db===_0x2b09de)break;else _0x20abd4['push'](_0x20abd4['shift']());}catch(_0x417164){_0x20abd4['push'](_0x20abd4['shift']());}}}(a113_0x1adb,0xc8808));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0xc577f8){const _0x56ff62=a113_0x1e3e;return _0xc577f8['bytes']??Buffer['from'](_0xc577f8[_0x56ff62(0x13e)]??'',_0x56ff62(0x154));}function a113_0x1adb(){const _0x5c7b41=['split','isArray','size','isDirectory','98624erDaPY','isSymbolicLink','803GDcdnC','test','length','89703BwmQfc','set','toLowerCase','from','Duplicate\x20Skill\x20file\x20path:\x20','isSafeInteger','2428016ZoZKCW','compare','sort','push','object','utf8','has','bytes','path','trim','isBuffer','621TZAaWJ','24820mSZhDB','12wrWgZy','startsWith','string','validation','14ZKoluC','toString','isFile','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','name','values','2768339JzfPpK','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','7344480hevurV','160152WlvSvy','replace','Skill\x20file\x20path\x20must\x20be\x20text.','content','includes'];a113_0x1adb=function(){return _0x5c7b41;};return a113_0x1adb();}export function fileText(_0x5f3884){const _0x30808d=a113_0x1e3e;return fileContent(_0x5f3884)[_0x30808d(0x161)](_0x30808d(0x154));}function a113_0x1e3e(_0x197953,_0x381b28){_0x197953=_0x197953-0x13a;const _0x1adb48=a113_0x1adb();let _0x1e3ef1=_0x1adb48[_0x197953];return _0x1e3ef1;}export function normalizeLocalFiles(_0x23d2f0){const _0xcf875f=a113_0x1e3e;if(!Array[_0xcf875f(0x141)](_0x23d2f0)||_0x23d2f0[_0xcf875f(0x148)]===0x0)return[];const _0x196736=new Map();for(const _0x27a24f of _0x23d2f0){if(!_0x27a24f||typeof _0x27a24f!==_0xcf875f(0x153)||typeof _0x27a24f[_0xcf875f(0x157)]!==_0xcf875f(0x15e))throw CliErrors[_0xcf875f(0x15f)](_0xcf875f(0x13d));const _0x51b0a4=normalizeSkillRelativePath(_0x27a24f[_0xcf875f(0x157)]);if(_0x196736[_0xcf875f(0x155)](_0x51b0a4))throw CliErrors[_0xcf875f(0x15f)](_0xcf875f(0x14d)+_0x51b0a4);if(_0x27a24f[_0xcf875f(0x156)]!==undefined&&!Buffer[_0xcf875f(0x159)](_0x27a24f[_0xcf875f(0x156)]))throw CliErrors[_0xcf875f(0x15f)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x51b0a4);if(_0x27a24f[_0xcf875f(0x156)]===undefined&&typeof _0x27a24f['content']!==_0xcf875f(0x15e))throw CliErrors['validation'](_0xcf875f(0x168)+_0x51b0a4);const _0x1b6581=fileContent(_0x27a24f);_0x196736[_0xcf875f(0x14a)](_0x51b0a4,{'path':_0x51b0a4,'bytes':_0x1b6581});}return Array[_0xcf875f(0x14c)](_0x196736[_0xcf875f(0x165)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x5668a5){const _0x574e91=a113_0x1e3e;if(!Array[_0x574e91(0x141)](_0x5668a5)||_0x5668a5[_0x574e91(0x148)]===0x0)return[];const _0x1f6032=new Map();for(const _0x14a66e of _0x5668a5){if(!_0x14a66e||typeof _0x14a66e!==_0x574e91(0x153)||typeof _0x14a66e['path']!==_0x574e91(0x15e))throw CliErrors[_0x574e91(0x15f)](_0x574e91(0x13d));const _0x4fe50c=normalizeSkillRelativePath(_0x14a66e[_0x574e91(0x157)]);if(_0x1f6032[_0x574e91(0x155)](_0x4fe50c))throw CliErrors[_0x574e91(0x15f)](_0x574e91(0x14d)+_0x4fe50c);if(!isSha256Hex(_0x14a66e['sha256']))throw CliErrors[_0x574e91(0x15f)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x4fe50c);if(!Number[_0x574e91(0x14e)](_0x14a66e[_0x574e91(0x142)])||_0x14a66e[_0x574e91(0x142)]<0x0)throw CliErrors['validation']('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x4fe50c);_0x1f6032['set'](_0x4fe50c,{'path':_0x4fe50c,'sha256':_0x14a66e['sha256'][_0x574e91(0x14b)](),'size':_0x14a66e[_0x574e91(0x142)]});}return Array[_0x574e91(0x14c)](_0x1f6032[_0x574e91(0x165)]())[_0x574e91(0x151)](compareSkillFiles);}export function scanSkillDirectory(_0x53276e){const _0x1b1578=realpathSync(_0x53276e),_0x5e16af=[];function _0x50e0c1(_0x1ddea8){const _0xa657a9=a113_0x1e3e,_0x53b302=readdirSync(_0x1ddea8,{'withFileTypes':!![]})[_0xa657a9(0x151)]((_0x1bea69,_0x2e4e3b)=>_0x1bea69[_0xa657a9(0x164)]['localeCompare'](_0x2e4e3b[_0xa657a9(0x164)]));for(const _0xe94968 of _0x53b302){if(_0xe94968[_0xa657a9(0x143)]()&&IGNORED_DIR_NAMES[_0xa657a9(0x155)](_0xe94968[_0xa657a9(0x164)]))continue;if(IGNORED_FILE_NAMES['has'](_0xe94968['name']))continue;const _0x522e41=resolve(_0x1ddea8,_0xe94968[_0xa657a9(0x164)]);if(_0xe94968[_0xa657a9(0x145)]())throw CliErrors[_0xa657a9(0x15f)](_0xa657a9(0x163)+_0x522e41);const _0xc4146b=toPosixPath(relative(_0x1b1578,_0x522e41));if(_0xe94968[_0xa657a9(0x143)]()){_0x50e0c1(_0x522e41);continue;}if(!_0xe94968[_0xa657a9(0x162)]())continue;validateSkillRelativePath(_0xc4146b);const _0x5912f6=readFileSync(_0x522e41);_0x5e16af[_0xa657a9(0x152)]({'path':_0xc4146b,'bytes':_0x5912f6});}}return _0x50e0c1(_0x1b1578),normalizeLocalFiles(_0x5e16af);}export function compareSkillFiles(_0x2800f4,_0x50b437){const _0x5bbbd4=a113_0x1e3e;if(_0x2800f4[_0x5bbbd4(0x157)]===SKILL_FILE)return _0x50b437['path']===SKILL_FILE?0x0:-0x1;if(_0x50b437[_0x5bbbd4(0x157)]===SKILL_FILE)return 0x1;return Buffer[_0x5bbbd4(0x150)](Buffer[_0x5bbbd4(0x14c)](_0x2800f4[_0x5bbbd4(0x157)],_0x5bbbd4(0x154)),Buffer[_0x5bbbd4(0x14c)](_0x50b437[_0x5bbbd4(0x157)],_0x5bbbd4(0x154)));}export function normalizeSkillRelativePath(_0x39c470){const _0x56d6c8=a113_0x1e3e,_0x4f8638=toPosixPath(_0x39c470[_0x56d6c8(0x158)]());return validateSkillRelativePath(_0x4f8638),_0x4f8638;}export function validateSkillRelativePath(_0x4ee745){const _0x56f696=a113_0x1e3e;if(!_0x4ee745||_0x4ee745[_0x56f696(0x15d)]('/')||_0x4ee745[_0x56f696(0x13f)]('//'))throw CliErrors[_0x56f696(0x15f)](_0x56f696(0x167)+_0x4ee745);for(const _0x258a89 of _0x4ee745[_0x56f696(0x140)]('/')){if(!_0x258a89||_0x258a89==='.'||_0x258a89==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x4ee745);}}export function toPosixPath(_0x173870){const _0xb0940c=a113_0x1e3e;return _0x173870[_0xb0940c(0x13c)](/\\/g,'/');}export function isSha256Hex(_0x34a0ae){const _0x40df63=a113_0x1e3e;return typeof _0x34a0ae==='string'&&/^[a-fA-F0-9]{64}$/[_0x40df63(0x147)](_0x34a0ae);}
1
+ (function(_0x21b400,_0x401315){const _0x508b44=a113_0x4088,_0x19d594=_0x21b400();while(!![]){try{const _0xa0de16=-parseInt(_0x508b44(0x1d4))/0x1*(parseInt(_0x508b44(0x1dc))/0x2)+parseInt(_0x508b44(0x1d5))/0x3+parseInt(_0x508b44(0x1c7))/0x4+-parseInt(_0x508b44(0x1ca))/0x5*(-parseInt(_0x508b44(0x1d3))/0x6)+-parseInt(_0x508b44(0x1ce))/0x7*(parseInt(_0x508b44(0x1d1))/0x8)+parseInt(_0x508b44(0x1cf))/0x9+parseInt(_0x508b44(0x1b1))/0xa*(-parseInt(_0x508b44(0x1b0))/0xb);if(_0xa0de16===_0x401315)break;else _0x19d594['push'](_0x19d594['shift']());}catch(_0x3feedb){_0x19d594['push'](_0x19d594['shift']());}}}(a113_0x47d6,0xf0acf));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';function a113_0x47d6(){const _0x2a8227=['20805Evzhgy','toString','set','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','string','isArray','6EvqBcj','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','11OCODXB','2100710impSFZ','content','path','values','compare','isFile','isDirectory','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20file\x20size\x20is\x20invalid:\x20','split','trim','size','sort','validation','isSafeInteger','add','name','startsWith','replace','from','includes','303324Bvlapj','sha256','isBuffer','6274855UYOsMn','utf8','object','bytes','1384782FfBoyc','4439844CJDybN','has','16YDBvVB','toLowerCase','6rFxKPO','79841BrgeAI'];a113_0x47d6=function(){return _0x2a8227;};return a113_0x47d6();}import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x1d2eb5){const _0x1cbc87=a113_0x4088;return _0x1d2eb5['bytes']??Buffer[_0x1cbc87(0x1c5)](_0x1d2eb5['content']??'',_0x1cbc87(0x1cb));}export function fileText(_0x542d27){const _0x51d0fb=a113_0x4088;return fileContent(_0x542d27)[_0x51d0fb(0x1d6)](_0x51d0fb(0x1cb));}export function normalizeLocalFiles(_0x49ab2d){const _0x1cf4ac=a113_0x4088;if(!Array[_0x1cf4ac(0x1db)](_0x49ab2d)||_0x49ab2d['length']===0x0)return[];const _0x44527b=new Map();for(const _0x4710f5 of _0x49ab2d){if(!_0x4710f5||typeof _0x4710f5!==_0x1cf4ac(0x1cc)||typeof _0x4710f5[_0x1cf4ac(0x1b3)]!==_0x1cf4ac(0x1da))throw CliErrors[_0x1cf4ac(0x1bf)](_0x1cf4ac(0x1b9));const _0x29d705=normalizeSkillRelativePath(_0x4710f5[_0x1cf4ac(0x1b3)]);if(_0x44527b[_0x1cf4ac(0x1d0)](_0x29d705))throw CliErrors[_0x1cf4ac(0x1bf)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x29d705);if(_0x4710f5[_0x1cf4ac(0x1cd)]!==undefined&&!Buffer[_0x1cf4ac(0x1c9)](_0x4710f5[_0x1cf4ac(0x1cd)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x29d705);if(_0x4710f5[_0x1cf4ac(0x1cd)]===undefined&&typeof _0x4710f5[_0x1cf4ac(0x1b2)]!=='string')throw CliErrors[_0x1cf4ac(0x1bf)](_0x1cf4ac(0x1d8)+_0x29d705);const _0x2a5956=fileContent(_0x4710f5);_0x44527b[_0x1cf4ac(0x1d7)](_0x29d705,{'path':_0x29d705,'bytes':_0x2a5956});}return Array['from'](_0x44527b['values']())[_0x1cf4ac(0x1be)](compareSkillFiles);}export function normalizeManifestFiles(_0x5b7d57){const _0x5c2b78=a113_0x4088;if(!Array['isArray'](_0x5b7d57)||_0x5b7d57[_0x5c2b78(0x1d9)]===0x0)return[];const _0x2743f1=new Map();for(const _0x30b0c0 of _0x5b7d57){if(!_0x30b0c0||typeof _0x30b0c0!==_0x5c2b78(0x1cc)||typeof _0x30b0c0['path']!=='string')throw CliErrors[_0x5c2b78(0x1bf)](_0x5c2b78(0x1b9));const _0x3caa73=normalizeSkillRelativePath(_0x30b0c0[_0x5c2b78(0x1b3)]);if(_0x2743f1[_0x5c2b78(0x1d0)](_0x3caa73))throw CliErrors[_0x5c2b78(0x1bf)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3caa73);if(!isSha256Hex(_0x30b0c0[_0x5c2b78(0x1c8)]))throw CliErrors['validation'](_0x5c2b78(0x1de)+_0x3caa73);if(!Number[_0x5c2b78(0x1c0)](_0x30b0c0['size'])||_0x30b0c0[_0x5c2b78(0x1bd)]<0x0)throw CliErrors[_0x5c2b78(0x1bf)](_0x5c2b78(0x1ba)+_0x3caa73);_0x2743f1[_0x5c2b78(0x1d7)](_0x3caa73,{'path':_0x3caa73,'sha256':_0x30b0c0[_0x5c2b78(0x1c8)][_0x5c2b78(0x1d2)](),'size':_0x30b0c0[_0x5c2b78(0x1bd)]});}return Array[_0x5c2b78(0x1c5)](_0x2743f1[_0x5c2b78(0x1b4)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x497895,_0x6e29a5={}){const _0x22758e=realpathSync(_0x497895),_0x2da997=canonicalExcludedFilePaths(_0x6e29a5['excludedFilePaths']),_0xd95ded=[];function _0x5e5067(_0x33db34){const _0x1de538=a113_0x4088,_0x12addb=readdirSync(_0x33db34,{'withFileTypes':!![]})[_0x1de538(0x1be)]((_0x3bd0f2,_0x2b2e72)=>_0x3bd0f2[_0x1de538(0x1c2)]['localeCompare'](_0x2b2e72[_0x1de538(0x1c2)]));for(const _0x57b2f7 of _0x12addb){if(_0x57b2f7[_0x1de538(0x1b7)]()&&IGNORED_DIR_NAMES[_0x1de538(0x1d0)](_0x57b2f7[_0x1de538(0x1c2)]))continue;if(IGNORED_FILE_NAMES[_0x1de538(0x1d0)](_0x57b2f7[_0x1de538(0x1c2)]))continue;const _0x2b9913=resolve(_0x33db34,_0x57b2f7['name']);if(isExcludedFilePath(_0x2b9913,_0x2da997))continue;if(_0x57b2f7['isSymbolicLink']())throw CliErrors[_0x1de538(0x1bf)](_0x1de538(0x1b8)+_0x2b9913);const _0x243c1f=toPosixPath(relative(_0x22758e,_0x2b9913));if(_0x57b2f7['isDirectory']()){_0x5e5067(_0x2b9913);continue;}if(!_0x57b2f7[_0x1de538(0x1b6)]())continue;validateSkillRelativePath(_0x243c1f);const _0x1900d6=readFileSync(_0x2b9913);_0xd95ded['push']({'path':_0x243c1f,'bytes':_0x1900d6});}}return _0x5e5067(_0x22758e),normalizeLocalFiles(_0xd95ded);}function canonicalExcludedFilePaths(_0x256d79){const _0x1e8708=a113_0x4088,_0x645927=new Set();for(const _0x329090 of _0x256d79??[]){const _0x45cf39=resolve(_0x329090);_0x645927[_0x1e8708(0x1c1)](_0x45cf39);try{_0x645927[_0x1e8708(0x1c1)](realpathSync(_0x45cf39));}catch{}}return _0x645927;}function isExcludedFilePath(_0x2cf15a,_0x43d9b9){const _0x55fb84=a113_0x4088;if(_0x43d9b9['has'](_0x2cf15a))return!![];if(_0x43d9b9[_0x55fb84(0x1bd)]===0x0)return![];try{return _0x43d9b9[_0x55fb84(0x1d0)](realpathSync(_0x2cf15a));}catch{return![];}}function a113_0x4088(_0x3329ca,_0x3972a8){_0x3329ca=_0x3329ca-0x1b0;const _0x47d6c6=a113_0x47d6();let _0x4088a9=_0x47d6c6[_0x3329ca];return _0x4088a9;}export function compareSkillFiles(_0x122852,_0x1ae003){const _0x2a6b09=a113_0x4088;if(_0x122852['path']===SKILL_FILE)return _0x1ae003[_0x2a6b09(0x1b3)]===SKILL_FILE?0x0:-0x1;if(_0x1ae003['path']===SKILL_FILE)return 0x1;return Buffer[_0x2a6b09(0x1b5)](Buffer[_0x2a6b09(0x1c5)](_0x122852[_0x2a6b09(0x1b3)],'utf8'),Buffer['from'](_0x1ae003[_0x2a6b09(0x1b3)],_0x2a6b09(0x1cb)));}export function normalizeSkillRelativePath(_0x1d0e09){const _0x49546a=a113_0x4088,_0x2e426d=toPosixPath(_0x1d0e09[_0x49546a(0x1bc)]());return validateSkillRelativePath(_0x2e426d),_0x2e426d;}export function validateSkillRelativePath(_0x52810a){const _0x209f79=a113_0x4088;if(!_0x52810a||_0x52810a[_0x209f79(0x1c3)]('/')||_0x52810a[_0x209f79(0x1c6)]('//'))throw CliErrors[_0x209f79(0x1bf)](_0x209f79(0x1dd)+_0x52810a);for(const _0x28cb0e of _0x52810a[_0x209f79(0x1bb)]('/')){if(!_0x28cb0e||_0x28cb0e==='.'||_0x28cb0e==='..')throw CliErrors['validation'](_0x209f79(0x1dd)+_0x52810a);}}export function toPosixPath(_0x33e21c){const _0x5c81ef=a113_0x4088;return _0x33e21c[_0x5c81ef(0x1c4)](/\\/g,'/');}export function isSha256Hex(_0x1ce271){const _0x15e183=a113_0x4088;return typeof _0x1ce271===_0x15e183(0x1da)&&/^[a-fA-F0-9]{64}$/['test'](_0x1ce271);}
@@ -1 +1 @@
1
- (function(_0x2286ce,_0x2fc36a){const _0x433f9e=a114_0x355b,_0x60d088=_0x2286ce();while(!![]){try{const _0x58ec7c=parseInt(_0x433f9e(0x16d))/0x1*(-parseInt(_0x433f9e(0x151))/0x2)+parseInt(_0x433f9e(0x13d))/0x3*(parseInt(_0x433f9e(0x16a))/0x4)+parseInt(_0x433f9e(0x15c))/0x5+parseInt(_0x433f9e(0x16f))/0x6+-parseInt(_0x433f9e(0x13b))/0x7+parseInt(_0x433f9e(0x140))/0x8+-parseInt(_0x433f9e(0x16e))/0x9;if(_0x58ec7c===_0x2fc36a)break;else _0x60d088['push'](_0x60d088['shift']());}catch(_0x19f77f){_0x60d088['push'](_0x60d088['shift']());}}}(a114_0x3d4f,0x608c0));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(_0x251e87,_0x5666bb,_0x29311e){const _0x3eb5fa=a114_0x355b,_0xd83eb5=requireSkillCode(_0x251e87),_0x2d3b3e=requirePackageBytes(_0xd83eb5,_0x29311e[_0x3eb5fa(0x146)]),_0x4c9b37=extractDownloadedPackage(_0x2d3b3e),_0x1c090f=_0x4c9b37[_0x3eb5fa(0x15f)](_0x375dad=>_0x375dad['path']===SKILL_FILE);if(!_0x1c090f)throw CliErrors['validation'](_0x3eb5fa(0x15d)+SKILL_FILE+':\x20'+_0xd83eb5);const _0xbfba7a=withMaterializedSkillFrontmatter(_0x4c9b37,_0x251e87,_0xd83eb5),_0x481538=_0xbfba7a[_0x3eb5fa(0x15f)](_0x530e6a=>_0x530e6a[_0x3eb5fa(0x168)]===SKILL_FILE),_0x433b2f=fileText(_0x481538),_0x30de54=getRuntimeSkillDir(_0x29311e['env'],_0x29311e[_0x3eb5fa(0x148)],_0x29311e[_0x3eb5fa(0x144)],_0x5666bb,_0xd83eb5,_0x29311e[_0x3eb5fa(0x166)]),_0x3fbc39=resolve(_0x30de54,SKILL_FILE),_0x458299=resolve(_0x30de54,METADATA_FILE),_0xcca2ab=contentHash(_0x433b2f),_0x4d6e3b=readMetadataIfPresent(_0x458299)?.[_0x3eb5fa(0x155)];ensurePulledFilesCanBeOverwritten(_0x30de54,_0x458299,_0xbfba7a,_0x29311e[_0x3eb5fa(0x159)]===!![]),mkdirSync(_0x30de54,{'recursive':!![],'mode':0x1c0});const _0x522e4b=existsSync(_0x3fbc39)?readFileSync(_0x3fbc39,_0x3eb5fa(0x14e)):undefined;return materializeFiles(_0x30de54,_0xbfba7a),removeStaleManagedFiles(_0x30de54,_0x4d6e3b,_0xbfba7a),writeJsonAtomic(_0x458299,buildMetadata(_0x251e87,_0x5666bb,_0x29311e[_0x3eb5fa(0x144)],_0xcca2ab,_0x29311e[_0x3eb5fa(0x14f)],_0xbfba7a,_0x2d3b3e)),{'skill':_0x251e87,'scope':_0x5666bb,'dir':_0x30de54,'skillMdPath':_0x3fbc39,'metadataPath':_0x458299,'contentHash':_0xcca2ab,'changed':_0x522e4b!==_0x433b2f};}function withMaterializedSkillFrontmatter(_0x5fd946,_0x5d7fb7,_0x385c66){const _0x371c18=a114_0x355b,_0x5302c5=skillDisplayName(_0x5d7fb7,_0x385c66),_0x3126ca=_0x5d7fb7[_0x371c18(0x169)]?.['trim']()||_0x5302c5||_0x385c66;return normalizeLocalFiles(_0x5fd946)[_0x371c18(0x154)](_0x568901=>{const _0x1a2a85=_0x371c18,_0x137a9b=fileText(_0x568901);if(_0x568901['path']!==SKILL_FILE)return _0x568901;if(hasYamlFrontmatter(_0x137a9b))return{'path':_0x568901[_0x1a2a85(0x168)],'content':withSyncedDisplayName(_0x137a9b,_0x5302c5)};return{'path':_0x568901['path'],'content':prependSkillFrontmatter(_0x137a9b,{'name':_0x385c66,'displayName':_0x5302c5,'description':_0x3126ca})};});}function hasYamlFrontmatter(_0x2f4753){const _0x3a201c=a114_0x355b;return/^\uFEFF?---\s*\r?\n/[_0x3a201c(0x160)](_0x2f4753);}function a114_0x355b(_0x1202f2,_0x1a5d60){_0x1202f2=_0x1202f2-0x13b;const _0x3d4fdf=a114_0x3d4f();let _0x355b97=_0x3d4fdf[_0x1202f2];return _0x355b97;}function prependSkillFrontmatter(_0x9a0d86,_0x5d069c){const _0x59834a=a114_0x355b,_0xb20360=_0x9a0d86['replace'](/^\uFEFF/,'');return[_0x59834a(0x14b),'name:\x20'+yamlString(_0x5d069c[_0x59834a(0x156)]),_0x5d069c[_0x59834a(0x152)]?_0x59834a(0x13c)+yamlString(_0x5d069c[_0x59834a(0x152)]):undefined,_0x59834a(0x147)+yamlString(_0x5d069c['description']),_0x59834a(0x14b),'',_0xb20360][_0x59834a(0x15e)](_0x6de432=>_0x6de432!==undefined)[_0x59834a(0x143)]('\x0a');}function a114_0x3d4f(){const _0x108f11=['3034157zhIRQT','displayName:\x20','510171MukEje','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','validation','6211968eWhrQv','.\x20Changed\x20file:\x20','slice','join','appCode','length','packageBytes','description:\x20','accessKey','match','contentHash','---','errors','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','utf8','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','230pqadIu','displayName','contents','map','fileHashes','name','flow','replace','force','trimEnd','keys','3491655QhYCCO','Runtime\x20Skill\x20package\x20is\x20missing\x20','filter','find','test','has','trim','isFile','stringify','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','paths','\x0a---\x0a\x0a','path','description','8UmRWum','entries','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','2449QfEElD','13178466VUEaDA','4559250LFyyes'];a114_0x3d4f=function(){return _0x108f11;};return a114_0x3d4f();}function yamlString(_0x3d9689){const _0x2898a9=a114_0x355b;return JSON[_0x2898a9(0x164)](_0x3d9689[_0x2898a9(0x158)](/\r/g,'')[_0x2898a9(0x162)]());}function skillDisplayName(_0x11b901,_0x28e273){const _0x338c1b=a114_0x355b,_0x4c928c=_0x11b901['skillName']?.[_0x338c1b(0x162)]();return _0x4c928c||_0x28e273;}function withSyncedDisplayName(_0x566a36,_0x5c11fc){const _0x176cbe=a114_0x355b,_0x3052b1=_0x566a36[_0x176cbe(0x149)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3052b1)return _0x566a36;const _0x1d8a7c=_0x3052b1[0x1]??'',_0x48e7e7=_0x3052b1[0x2]??'',_0xb2490a=parseDocument(_0x48e7e7);if(_0xb2490a[_0x176cbe(0x14c)][_0x176cbe(0x145)]>0x0||!isMap(_0xb2490a[_0x176cbe(0x153)]))return _0x566a36;if(_0x5c11fc)_0xb2490a['set']('displayName',_0x5c11fc);else{if(_0xb2490a[_0x176cbe(0x161)](_0x176cbe(0x152)))_0xb2490a['delete'](_0x176cbe(0x152));else return _0x566a36;}forceBlockCollections(_0xb2490a[_0x176cbe(0x153)]);const _0x2d178e=_0xb2490a['toString']({'lineWidth':0x0})[_0x176cbe(0x15a)](),_0x591d75=_0x566a36[_0x176cbe(0x142)](_0x3052b1[0x0][_0x176cbe(0x145)])[_0x176cbe(0x158)](/^\r?\n/,'');return _0x1d8a7c+'---\x0a'+_0x2d178e+_0x176cbe(0x167)+_0x591d75;}function forceBlockCollections(_0x102868){if(!isNode(_0x102868))return;visit(_0x102868,(_0xd0b7c3,_0x59621d)=>{const _0x37bcd4=a114_0x355b;isCollection(_0x59621d)&&(_0x59621d[_0x37bcd4(0x157)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x337ed4,_0x2ec649,_0x252ca9,_0x2d3344){const _0x130b4c=a114_0x355b;if(_0x2d3344||!existsSync(_0x2ec649))return;const _0x55151f=readMetadataIfPresent(_0x2ec649);if(!_0x55151f)return;const _0x30958a=_0x55151f[_0x130b4c(0x155)]&&Object['keys'](_0x55151f[_0x130b4c(0x155)])[_0x130b4c(0x145)]>0x0?_0x55151f[_0x130b4c(0x155)]:undefined;if(_0x30958a)for(const [_0x59f424,_0x2e2545]of Object[_0x130b4c(0x16b)](_0x30958a)){const _0xd26362=resolveManagedFilePath(_0x337ed4,_0x59f424);if(!existsSync(_0xd26362))throw CliErrors[_0x130b4c(0x13f)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x337ed4,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x59f424);const _0x31086e=lstatSync(_0xd26362);if(!_0x31086e[_0x130b4c(0x163)]())throw CliErrors[_0x130b4c(0x13f)](_0x130b4c(0x14d)+_0x337ed4,_0x130b4c(0x13e)+_0x59f424);const _0xa1c8b3=bufferSha256(readFileSync(_0xd26362));if(_0xa1c8b3!==_0x2e2545)throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x337ed4+_0x130b4c(0x141)+_0x59f424,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x59f424);}else{const _0x4c8c02=resolve(_0x337ed4,SKILL_FILE);if(existsSync(_0x4c8c02)&&_0x55151f[_0x130b4c(0x14a)]){const _0x36453c=contentHash(readFileSync(_0x4c8c02,'utf8'));if(_0x36453c!==_0x55151f[_0x130b4c(0x14a)])throw CliErrors[_0x130b4c(0x13f)](_0x130b4c(0x16c)+_0x4c8c02,_0x130b4c(0x150));}}for(const _0x379773 of normalizeLocalFiles(_0x252ca9)){if(_0x30958a?.[_0x379773['path']])continue;if(!_0x30958a&&_0x379773[_0x130b4c(0x168)]===SKILL_FILE)continue;const _0x143ecb=resolveManagedFilePath(_0x337ed4,_0x379773[_0x130b4c(0x168)]);if(!existsSync(_0x143ecb))continue;const _0x48218d=lstatSync(_0x143ecb);if(!_0x48218d[_0x130b4c(0x163)]())throw CliErrors['validation'](_0x130b4c(0x14d)+_0x337ed4,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x379773[_0x130b4c(0x168)]);const _0x4f9557=bufferSha256(readFileSync(_0x143ecb));if(_0x4f9557!==fileHash(_0x379773))throw CliErrors[_0x130b4c(0x13f)](_0x130b4c(0x14d)+_0x337ed4,_0x130b4c(0x165)+_0x379773['path']);}}function materializeFiles(_0x9176fc,_0x26565f){const _0x94064=a114_0x355b;for(const _0xe82021 of normalizeLocalFiles(_0x26565f)){const _0x1a2b69=resolveManagedFilePath(_0x9176fc,_0xe82021[_0x94064(0x168)]);mkdirSync(dirname(_0x1a2b69),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1a2b69,fileContent(_0xe82021),0x180);}}function removeStaleManagedFiles(_0x352bdd,_0x8ec83e,_0x59ded6){const _0x225757=a114_0x355b;if(!_0x8ec83e)return;const _0x1e8091=new Set(normalizeLocalFiles(_0x59ded6)[_0x225757(0x154)](_0x191933=>_0x191933['path']));for(const _0x328907 of Object[_0x225757(0x15b)](_0x8ec83e)){if(_0x1e8091[_0x225757(0x161)](_0x328907))continue;const _0x5c7cec=resolveManagedFilePath(_0x352bdd,_0x328907);existsSync(_0x5c7cec)&&lstatSync(_0x5c7cec)[_0x225757(0x163)]()&&rmSync(_0x5c7cec,{'force':!![]});}}
1
+ (function(_0x1c3478,_0x46dd0a){const _0x5e2fbe=a114_0x3896,_0x364c04=_0x1c3478();while(!![]){try{const _0x1c7900=parseInt(_0x5e2fbe(0xb8))/0x1+-parseInt(_0x5e2fbe(0xde))/0x2+parseInt(_0x5e2fbe(0xbc))/0x3*(-parseInt(_0x5e2fbe(0xb9))/0x4)+-parseInt(_0x5e2fbe(0xcf))/0x5+parseInt(_0x5e2fbe(0xc2))/0x6+-parseInt(_0x5e2fbe(0xb7))/0x7*(parseInt(_0x5e2fbe(0xd1))/0x8)+parseInt(_0x5e2fbe(0xd2))/0x9;if(_0x1c7900===_0x46dd0a)break;else _0x364c04['push'](_0x364c04['shift']());}catch(_0x3379c5){_0x364c04['push'](_0x364c04['shift']());}}}(a114_0x70d4,0x7c853));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';function a114_0x3896(_0x34537a,_0x1d32c3){_0x34537a=_0x34537a-0xae;const _0x70d4b5=a114_0x70d4();let _0x389661=_0x70d4b5[_0x34537a];return _0x389661;}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';function a114_0x70d4(){const _0x6771a=['---\x0a','fileHashes','appCode','5066100aYJyJX','test','36128vaQJvN','16699131dJxEuW','displayName:\x20','validation','contentHash','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','isFile','entries','toString','Runtime\x20Skill\x20package\x20is\x20missing\x20','paths','keys','displayName','1467010jlgAKX','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','contents','delete','description','force','replace','join','name:\x20','---','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','find','length','map','path','826vOXdEW','408777uyfOaX','1532bSVgVG','errors','slice','141uuQyeU','utf8','description:\x20','.\x20Changed\x20file:\x20','skillName','trim','3260478bWSovY','set','pulledAt','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','name','has','stringify','accessKey','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','flow'];a114_0x70d4=function(){return _0x6771a;};return a114_0x70d4();}export function materializeRuntimeSkill(_0x3c2314,_0x48c7a5,_0x2eff45){const _0x2b92d2=a114_0x3896,_0x42943f=requireSkillCode(_0x3c2314),_0x3a0cc5=requirePackageBytes(_0x42943f,_0x2eff45['packageBytes']),_0x1f9a01=extractDownloadedPackage(_0x3a0cc5),_0x44bfd0=_0x1f9a01[_0x2b92d2(0xb3)](_0x4b3f65=>_0x4b3f65[_0x2b92d2(0xb6)]===SKILL_FILE);if(!_0x44bfd0)throw CliErrors[_0x2b92d2(0xd4)](_0x2b92d2(0xda)+SKILL_FILE+':\x20'+_0x42943f);const _0x203f85=withMaterializedSkillFrontmatter(_0x1f9a01,_0x3c2314,_0x42943f),_0x4115d6=_0x203f85[_0x2b92d2(0xb3)](_0x32b48e=>_0x32b48e[_0x2b92d2(0xb6)]===SKILL_FILE),_0x5cbf0d=fileText(_0x4115d6),_0x4155c2=getRuntimeSkillDir(_0x2eff45['env'],_0x2eff45[_0x2b92d2(0xc9)],_0x2eff45[_0x2b92d2(0xce)],_0x48c7a5,_0x42943f,_0x2eff45[_0x2b92d2(0xdb)]),_0x139d22=resolve(_0x4155c2,SKILL_FILE),_0x311b87=resolve(_0x4155c2,METADATA_FILE),_0x3ea1ba=contentHash(_0x5cbf0d),_0x4ad39a=readMetadataIfPresent(_0x311b87)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x4155c2,_0x311b87,_0x203f85,_0x2eff45[_0x2b92d2(0xe3)]===!![]),mkdirSync(_0x4155c2,{'recursive':!![],'mode':0x1c0});const _0x4490c5=existsSync(_0x139d22)?readFileSync(_0x139d22,_0x2b92d2(0xbd)):undefined;return materializeFiles(_0x4155c2,_0x203f85),removeStaleManagedFiles(_0x4155c2,_0x4ad39a,_0x203f85),writeJsonAtomic(_0x311b87,buildMetadata(_0x3c2314,_0x48c7a5,_0x2eff45[_0x2b92d2(0xce)],_0x3ea1ba,_0x2eff45[_0x2b92d2(0xc4)],_0x203f85,_0x3a0cc5)),{'skill':_0x3c2314,'scope':_0x48c7a5,'dir':_0x4155c2,'skillMdPath':_0x139d22,'metadataPath':_0x311b87,'contentHash':_0x3ea1ba,'changed':_0x4490c5!==_0x5cbf0d};}function withMaterializedSkillFrontmatter(_0x37fc4f,_0x4986d7,_0x48f76f){const _0x51af25=a114_0x3896,_0x3fed38=skillDisplayName(_0x4986d7,_0x48f76f),_0xae4885=_0x4986d7[_0x51af25(0xe2)]?.[_0x51af25(0xc1)]()||_0x3fed38||_0x48f76f;return normalizeLocalFiles(_0x37fc4f)[_0x51af25(0xb5)](_0x346d9c=>{const _0x438e79=_0x51af25,_0x263064=fileText(_0x346d9c);if(_0x346d9c['path']!==SKILL_FILE)return _0x346d9c;if(hasYamlFrontmatter(_0x263064))return{'path':_0x346d9c[_0x438e79(0xb6)],'content':withSyncedDisplayName(_0x263064,_0x3fed38)};return{'path':_0x346d9c[_0x438e79(0xb6)],'content':prependSkillFrontmatter(_0x263064,{'name':_0x48f76f,'displayName':_0x3fed38,'description':_0xae4885})};});}function hasYamlFrontmatter(_0x23c84e){const _0x346aac=a114_0x3896;return/^\uFEFF?---\s*\r?\n/[_0x346aac(0xd0)](_0x23c84e);}function prependSkillFrontmatter(_0x4b17db,_0x4e31a6){const _0x3444a1=a114_0x3896,_0xc034ae=_0x4b17db[_0x3444a1(0xae)](/^\uFEFF/,'');return[_0x3444a1(0xb1),_0x3444a1(0xb0)+yamlString(_0x4e31a6[_0x3444a1(0xc6)]),_0x4e31a6[_0x3444a1(0xdd)]?_0x3444a1(0xd3)+yamlString(_0x4e31a6[_0x3444a1(0xdd)]):undefined,_0x3444a1(0xbe)+yamlString(_0x4e31a6[_0x3444a1(0xe2)]),_0x3444a1(0xb1),'',_0xc034ae]['filter'](_0x4e9365=>_0x4e9365!==undefined)[_0x3444a1(0xaf)]('\x0a');}function yamlString(_0x14162a){const _0x224970=a114_0x3896;return JSON[_0x224970(0xc8)](_0x14162a['replace'](/\r/g,'')[_0x224970(0xc1)]());}function skillDisplayName(_0x5a77d6,_0x2b7baf){const _0x1d683f=a114_0x3896,_0x4f5286=_0x5a77d6[_0x1d683f(0xc0)]?.['trim']();return _0x4f5286||_0x2b7baf;}function withSyncedDisplayName(_0x5d8f7f,_0x1c1daf){const _0x1c5d53=a114_0x3896,_0x449b33=_0x5d8f7f['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x449b33)return _0x5d8f7f;const _0x1e9feb=_0x449b33[0x1]??'',_0x15bcdb=_0x449b33[0x2]??'',_0xfb0f77=parseDocument(_0x15bcdb);if(_0xfb0f77[_0x1c5d53(0xba)]['length']>0x0||!isMap(_0xfb0f77[_0x1c5d53(0xe0)]))return _0x5d8f7f;if(_0x1c1daf)_0xfb0f77[_0x1c5d53(0xc3)](_0x1c5d53(0xdd),_0x1c1daf);else{if(_0xfb0f77[_0x1c5d53(0xc7)](_0x1c5d53(0xdd)))_0xfb0f77[_0x1c5d53(0xe1)](_0x1c5d53(0xdd));else return _0x5d8f7f;}forceBlockCollections(_0xfb0f77[_0x1c5d53(0xe0)]);const _0x53eb1e=_0xfb0f77[_0x1c5d53(0xd9)]({'lineWidth':0x0})['trimEnd'](),_0x1fb6c1=_0x5d8f7f[_0x1c5d53(0xbb)](_0x449b33[0x0][_0x1c5d53(0xb4)])[_0x1c5d53(0xae)](/^\r?\n/,'');return _0x1e9feb+_0x1c5d53(0xcc)+_0x53eb1e+'\x0a---\x0a\x0a'+_0x1fb6c1;}function forceBlockCollections(_0x5f2989){if(!isNode(_0x5f2989))return;visit(_0x5f2989,(_0x17b1f8,_0x3184c3)=>{const _0x343413=a114_0x3896;isCollection(_0x3184c3)&&(_0x3184c3[_0x343413(0xcb)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x206bc7,_0x392cac,_0x19de24,_0x3f3731){const _0x43e504=a114_0x3896;if(_0x3f3731||!existsSync(_0x392cac))return;const _0x5d1fd6=readMetadataIfPresent(_0x392cac);if(!_0x5d1fd6)return;const _0x5dc56e=_0x5d1fd6[_0x43e504(0xcd)]&&Object['keys'](_0x5d1fd6[_0x43e504(0xcd)])['length']>0x0?_0x5d1fd6[_0x43e504(0xcd)]:undefined;if(_0x5dc56e)for(const [_0x20fdda,_0x28c7f3]of Object[_0x43e504(0xd8)](_0x5dc56e)){const _0x1d6e99=resolveManagedFilePath(_0x206bc7,_0x20fdda);if(!existsSync(_0x1d6e99))throw CliErrors[_0x43e504(0xd4)](_0x43e504(0xdf)+_0x206bc7,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x20fdda);const _0x3e7bb6=lstatSync(_0x1d6e99);if(!_0x3e7bb6[_0x43e504(0xd7)]())throw CliErrors[_0x43e504(0xd4)](_0x43e504(0xdf)+_0x206bc7,_0x43e504(0xb2)+_0x20fdda);const _0x4a5b91=bufferSha256(readFileSync(_0x1d6e99));if(_0x4a5b91!==_0x28c7f3)throw CliErrors['validation'](_0x43e504(0xdf)+_0x206bc7+_0x43e504(0xbf)+_0x20fdda,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x20fdda);}else{const _0x5d2b74=resolve(_0x206bc7,SKILL_FILE);if(existsSync(_0x5d2b74)&&_0x5d1fd6[_0x43e504(0xd5)]){const _0x13b7fe=contentHash(readFileSync(_0x5d2b74,_0x43e504(0xbd)));if(_0x13b7fe!==_0x5d1fd6[_0x43e504(0xd5)])throw CliErrors['validation'](_0x43e504(0xc5)+_0x5d2b74,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x310677 of normalizeLocalFiles(_0x19de24)){if(_0x5dc56e?.[_0x310677['path']])continue;if(!_0x5dc56e&&_0x310677[_0x43e504(0xb6)]===SKILL_FILE)continue;const _0x4d1ddc=resolveManagedFilePath(_0x206bc7,_0x310677[_0x43e504(0xb6)]);if(!existsSync(_0x4d1ddc))continue;const _0xaf22ff=lstatSync(_0x4d1ddc);if(!_0xaf22ff['isFile']())throw CliErrors['validation'](_0x43e504(0xdf)+_0x206bc7,_0x43e504(0xd6)+_0x310677['path']);const _0x11990c=bufferSha256(readFileSync(_0x4d1ddc));if(_0x11990c!==fileHash(_0x310677))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x206bc7,_0x43e504(0xca)+_0x310677[_0x43e504(0xb6)]);}}function materializeFiles(_0x3e8a5f,_0x2872a0){const _0x4aa0b0=a114_0x3896;for(const _0xfea0aa of normalizeLocalFiles(_0x2872a0)){const _0x18a25f=resolveManagedFilePath(_0x3e8a5f,_0xfea0aa[_0x4aa0b0(0xb6)]);mkdirSync(dirname(_0x18a25f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x18a25f,fileContent(_0xfea0aa),0x180);}}function removeStaleManagedFiles(_0x5584f6,_0x52d9ec,_0x4cc375){const _0x30d81b=a114_0x3896;if(!_0x52d9ec)return;const _0x5239ec=new Set(normalizeLocalFiles(_0x4cc375)[_0x30d81b(0xb5)](_0x4d7c9f=>_0x4d7c9f[_0x30d81b(0xb6)]));for(const _0x27ce51 of Object[_0x30d81b(0xdc)](_0x52d9ec)){if(_0x5239ec[_0x30d81b(0xc7)](_0x27ce51))continue;const _0x4c0915=resolveManagedFilePath(_0x5584f6,_0x27ce51);existsSync(_0x4c0915)&&lstatSync(_0x4c0915)[_0x30d81b(0xd7)]()&&rmSync(_0x4c0915,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0xc5077d,_0x146d15){const _0x92cae6=a115_0x20cd,_0x14a6e7=_0xc5077d();while(!![]){try{const _0x482565=-parseInt(_0x92cae6(0xe9))/0x1+-parseInt(_0x92cae6(0xcc))/0x2*(parseInt(_0x92cae6(0xd2))/0x3)+-parseInt(_0x92cae6(0xe5))/0x4+-parseInt(_0x92cae6(0xd4))/0x5*(parseInt(_0x92cae6(0xd3))/0x6)+parseInt(_0x92cae6(0xda))/0x7+-parseInt(_0x92cae6(0xcd))/0x8*(-parseInt(_0x92cae6(0xce))/0x9)+-parseInt(_0x92cae6(0xc9))/0xa*(-parseInt(_0x92cae6(0xd9))/0xb);if(_0x482565===_0x146d15)break;else _0x14a6e7['push'](_0x14a6e7['shift']());}catch(_0x1fa890){_0x14a6e7['push'](_0x14a6e7['shift']());}}}(a115_0x8f7a,0xdf115));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a115_0x8f7a(){const _0x4844db=['zipSha256','userId','isArray','hasUpstreamUpdate','string','2190468kcmZxN','Runtime\x20Skill\x20is\x20missing\x20skillCode.','object','Invalid\x20','1141604BRCZta','zipSize','manifest','ossPath','skillCode','220BHwbGy','skillName','tags','2BbnrhQ','756696lKRWBn','54vurRwt','length','sourceSessionId','map','2073021AjBBUF','18wnKpbg','2418835Ixklmr','personal','trim','utf8','tenantCode','1268597kXqfHO','11483486sEAFmi','files','forkedFromVersion','fromEntries','readonly','parse'];a115_0x8f7a=function(){return _0x4844db;};return a115_0x8f7a();}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a115_0x20cd(_0x5110c9,_0x504abd){_0x5110c9=_0x5110c9-0xc8;const _0x8f7a9d=a115_0x8f7a();let _0x20cda7=_0x8f7a9d[_0x5110c9];return _0x20cda7;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x1a5432,_0x272411,_0x4b2df1,_0x45e84a,_0x1bada5,_0x125203,_0x4cbc61){const _0x234ca5=a115_0x20cd,_0x2be9e7=_0x125203?normalizeLocalFiles(_0x125203):[],_0x1dadf4=!_0x4cbc61&&_0x2be9e7[_0x234ca5(0xcf)]>0x0?buildSkillPackage(_0x2be9e7):undefined,_0x405465=_0x4cbc61?bufferSha256(_0x4cbc61):_0x1dadf4?.['manifest'][_0x234ca5(0xe0)],_0x30e1b3=_0x4cbc61?.[_0x234ca5(0xcf)]??_0x1dadf4?.[_0x234ca5(0xeb)][_0x234ca5(0xea)],_0x201311=_0x2be9e7[_0x234ca5(0xcf)]>0x0?Object[_0x234ca5(0xdd)](_0x2be9e7[_0x234ca5(0xd1)](_0x445b67=>[_0x445b67['path'],fileHash(_0x445b67)])):undefined;return{'schemaVersion':_0x2be9e7[_0x234ca5(0xcf)]>0x0?0x2:0x1,'id':_0x1a5432['id'],'appCode':_0x4b2df1,'skillCode':requireSkillCode(_0x1a5432),'skillName':_0x1a5432[_0x234ca5(0xca)],'description':_0x1a5432['description'],'scope':_0x272411,'readonly':_0x272411!==_0x234ca5(0xd5)||_0x1a5432[_0x234ca5(0xde)]===!![],'tenantCode':_0x1a5432[_0x234ca5(0xd8)],'userId':_0x1a5432[_0x234ca5(0xe1)],'version':_0x1a5432['version'],'status':_0x1a5432['status'],'tags':Array[_0x234ca5(0xe2)](_0x1a5432[_0x234ca5(0xcb)])?_0x1a5432[_0x234ca5(0xcb)]:[],'hasUpstreamUpdate':_0x1a5432[_0x234ca5(0xe3)],'forkedFromSkillId':_0x1a5432['forkedFromSkillId'],'forkedFromVersion':_0x1a5432[_0x234ca5(0xdc)],'sourceSessionId':_0x1a5432[_0x234ca5(0xd0)],'contentHash':_0x45e84a,'fileHashes':_0x201311,'treeHash':_0x2be9e7[_0x234ca5(0xcf)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2be9e7)):undefined,'ossPath':remoteManifestOssPath(_0x1a5432[_0x234ca5(0xdb)]),'zipSha256':_0x405465,'zipSize':_0x30e1b3,'files':_0x2be9e7[_0x234ca5(0xcf)]>0x0?_0x2be9e7[_0x234ca5(0xd1)](_0x213cdc=>({'path':_0x213cdc['path'],'hash':fileHash(_0x213cdc),'size':fileContent(_0x213cdc)['length']})):undefined,'pulledAt':_0x1bada5??new Date()['toISOString']()};}export function requireSkillCode(_0x28cafa){const _0xee2dd0=a115_0x20cd,_0x47e193=_0x28cafa[_0xee2dd0(0xc8)]?.['trim']();if(!_0x47e193)throw CliErrors['validation'](_0xee2dd0(0xe6));return _0x47e193;}export function readMetadataIfPresent(_0x36d64a){const _0x5b4956=a115_0x20cd;if(!existsSync(_0x36d64a))return undefined;try{const _0x1681c5=JSON[_0x5b4956(0xdf)](readFileSync(_0x36d64a,_0x5b4956(0xd7)));return _0x1681c5;}catch{throw CliErrors['validation'](_0x5b4956(0xe8)+METADATA_FILE+':\x20'+_0x36d64a);}}function remoteManifestOssPath(_0x2ff472){const _0x2a4da6=a115_0x20cd;if(!_0x2ff472||typeof _0x2ff472!==_0x2a4da6(0xe7)||Array[_0x2a4da6(0xe2)](_0x2ff472))return undefined;const _0x2534cd=_0x2ff472[_0x2a4da6(0xec)];return typeof _0x2534cd===_0x2a4da6(0xe4)&&_0x2534cd[_0x2a4da6(0xd6)]()?_0x2534cd[_0x2a4da6(0xd6)]():undefined;}
1
+ (function(_0x3f21da,_0x27d9e9){const _0x270fff=a115_0x264c,_0x40b6e1=_0x3f21da();while(!![]){try{const _0x30031a=-parseInt(_0x270fff(0x1bc))/0x1*(parseInt(_0x270fff(0x1da))/0x2)+parseInt(_0x270fff(0x1d5))/0x3+-parseInt(_0x270fff(0x1c4))/0x4+parseInt(_0x270fff(0x1c6))/0x5*(parseInt(_0x270fff(0x1bb))/0x6)+-parseInt(_0x270fff(0x1c8))/0x7+-parseInt(_0x270fff(0x1cd))/0x8+-parseInt(_0x270fff(0x1be))/0x9*(-parseInt(_0x270fff(0x1d8))/0xa);if(_0x30031a===_0x27d9e9)break;else _0x40b6e1['push'](_0x40b6e1['shift']());}catch(_0x12f4e0){_0x40b6e1['push'](_0x40b6e1['shift']());}}}(a115_0x3be1,0x1ec90));import{existsSync,readFileSync}from'node:fs';function a115_0x3be1(){const _0x4ac930=['226658CBjlDh','userId','manifest','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','959748ITFzDu','2YqydGd','tenantCode','5347926gWjJBO','isArray','path','personal','readonly','sourceSessionId','654712lTibRh','parse','5aoNZkN','ossPath','844886BGOhAb','description','zipSize','zipSha256','map','1832912nxnIHG','skillName','tags','validation','string','skillCode','toISOString','status','336216CbGzZQ','trim','length','10hVHsro','utf8'];a115_0x3be1=function(){return _0x4ac930;};return a115_0x3be1();}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';function a115_0x264c(_0x41d80e,_0x43d22d){_0x41d80e=_0x41d80e-0x1b9;const _0x3be1e8=a115_0x3be1();let _0x264c40=_0x3be1e8[_0x41d80e];return _0x264c40;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2e51b0,_0x48218d,_0x599486,_0xc47e10,_0x1e735b,_0xa6fea8,_0x12733c){const _0xb641aa=a115_0x264c,_0x318375=_0xa6fea8?normalizeLocalFiles(_0xa6fea8):[],_0x1a794f=!_0x12733c&&_0x318375['length']>0x0?buildSkillPackage(_0x318375):undefined,_0x3f4a86=_0x12733c?bufferSha256(_0x12733c):_0x1a794f?.['manifest'][_0xb641aa(0x1cb)],_0x3d566b=_0x12733c?.[_0xb641aa(0x1d7)]??_0x1a794f?.[_0xb641aa(0x1dc)][_0xb641aa(0x1ca)],_0x3b944a=_0x318375[_0xb641aa(0x1d7)]>0x0?Object['fromEntries'](_0x318375[_0xb641aa(0x1cc)](_0x31cc5d=>[_0x31cc5d[_0xb641aa(0x1c0)],fileHash(_0x31cc5d)])):undefined;return{'schemaVersion':_0x318375[_0xb641aa(0x1d7)]>0x0?0x2:0x1,'id':_0x2e51b0['id'],'appCode':_0x599486,'skillCode':requireSkillCode(_0x2e51b0),'skillName':_0x2e51b0[_0xb641aa(0x1ce)],'description':_0x2e51b0[_0xb641aa(0x1c9)],'scope':_0x48218d,'readonly':_0x48218d!==_0xb641aa(0x1c1)||_0x2e51b0[_0xb641aa(0x1c2)]===!![],'tenantCode':_0x2e51b0[_0xb641aa(0x1bd)],'userId':_0x2e51b0[_0xb641aa(0x1db)],'version':_0x2e51b0['version'],'status':_0x2e51b0[_0xb641aa(0x1d4)],'tags':Array[_0xb641aa(0x1bf)](_0x2e51b0['tags'])?_0x2e51b0[_0xb641aa(0x1cf)]:[],'hasUpstreamUpdate':_0x2e51b0['hasUpstreamUpdate'],'forkedFromSkillId':_0x2e51b0[_0xb641aa(0x1b9)],'forkedFromVersion':_0x2e51b0['forkedFromVersion'],'sourceSessionId':_0x2e51b0[_0xb641aa(0x1c3)],'contentHash':_0xc47e10,'fileHashes':_0x3b944a,'treeHash':_0x318375[_0xb641aa(0x1d7)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x318375)):undefined,'ossPath':remoteManifestOssPath(_0x2e51b0['files']),'zipSha256':_0x3f4a86,'zipSize':_0x3d566b,'files':_0x318375[_0xb641aa(0x1d7)]>0x0?_0x318375[_0xb641aa(0x1cc)](_0x2956f8=>({'path':_0x2956f8[_0xb641aa(0x1c0)],'hash':fileHash(_0x2956f8),'size':fileContent(_0x2956f8)[_0xb641aa(0x1d7)]})):undefined,'pulledAt':_0x1e735b??new Date()[_0xb641aa(0x1d3)]()};}export function requireSkillCode(_0x22bf70){const _0x4bae38=a115_0x264c,_0x513669=_0x22bf70[_0x4bae38(0x1d2)]?.['trim']();if(!_0x513669)throw CliErrors[_0x4bae38(0x1d0)](_0x4bae38(0x1ba));return _0x513669;}export function readMetadataIfPresent(_0x427622){const _0x1c6364=a115_0x264c;if(!existsSync(_0x427622))return undefined;try{const _0x21d1f9=JSON[_0x1c6364(0x1c5)](readFileSync(_0x427622,_0x1c6364(0x1d9)));return _0x21d1f9;}catch{throw CliErrors[_0x1c6364(0x1d0)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x427622);}}function remoteManifestOssPath(_0x378868){const _0x4ad03a=a115_0x264c;if(!_0x378868||typeof _0x378868!=='object'||Array[_0x4ad03a(0x1bf)](_0x378868))return undefined;const _0x35bb39=_0x378868[_0x4ad03a(0x1c7)];return typeof _0x35bb39===_0x4ad03a(0x1d1)&&_0x35bb39[_0x4ad03a(0x1d6)]()?_0x35bb39[_0x4ad03a(0x1d6)]():undefined;}
@@ -1 +1 @@
1
- const a116_0x15ae89=a116_0x4c70;(function(_0x1dab00,_0x465d3f){const _0x20a6b5=a116_0x4c70,_0x31cff6=_0x1dab00();while(!![]){try{const _0x23a6d6=parseInt(_0x20a6b5(0xff))/0x1+-parseInt(_0x20a6b5(0xea))/0x2+-parseInt(_0x20a6b5(0x103))/0x3+-parseInt(_0x20a6b5(0xf5))/0x4+parseInt(_0x20a6b5(0xfa))/0x5*(parseInt(_0x20a6b5(0xfd))/0x6)+parseInt(_0x20a6b5(0xeb))/0x7+parseInt(_0x20a6b5(0xf1))/0x8;if(_0x23a6d6===_0x465d3f)break;else _0x31cff6['push'](_0x31cff6['shift']());}catch(_0x4dfb71){_0x31cff6['push'](_0x31cff6['shift']());}}}(a116_0x5152,0xd575b));import{existsSync}from'node:fs';function a116_0x4c70(_0x4fa889,_0x1bea9f){_0x4fa889=_0x4fa889-0xea;const _0x515276=a116_0x5152();let _0x4c70f8=_0x515276[_0x4fa889];return _0x4c70f8;}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(_0x4107f9={}){const _0x3dbab5=a116_0x4c70,_0x5a6f2e=_0x4107f9[_0x3dbab5(0xfb)]??homedir(),_0x545165=resolve(_0x5a6f2e,PRODUCT_CONFIG[_0x3dbab5(0x105)],_0x3dbab5(0x106)),_0x5cac10=trimmedEnv(_0x3dbab5(0xf0)),_0x576355=trimmedEnv(_0x3dbab5(0xfc)),_0x42a72f=resolve(_0x5a6f2e,'.workbuddy'),_0x100e74=_0x4107f9[_0x3dbab5(0x101)]??(existsSync(_0x42a72f)?resolve(_0x42a72f,'skills'):undefined);return{'homeDir':_0x5a6f2e,'cacheRoot':_0x545165,'managedRoot':resolve(_0x5a6f2e,PRODUCT_CONFIG[_0x3dbab5(0x105)]),'agentsSkillsDir':_0x4107f9['agentsSkillsDir']??_0x5cac10??resolve(_0x5a6f2e,_0x3dbab5(0xf6),_0x3dbab5(0xec)),'claudeSkillsDir':_0x4107f9[_0x3dbab5(0xf2)]??_0x576355??resolve(_0x5a6f2e,_0x3dbab5(0x102),'skills'),'workbuddySkillsDir':_0x100e74};}export function runtimeAgentSkillRoots(_0xc33117){const _0x319451=a116_0x4c70;return[_0xc33117[_0x319451(0x100)],_0xc33117[_0x319451(0xf2)],_0xc33117[_0x319451(0x101)]][_0x319451(0xf7)](_0x317e9b=>Boolean(_0x317e9b));}export function getRuntimeSkillCacheRoot(_0x1d9d21,_0x55c98e,_0x5066d5={}){const _0x801095=a116_0x4c70,_0x473d63=resolveSkillSyncPaths(_0x5066d5);return resolve(_0x473d63[_0x801095(0xf9)],_0x1d9d21,fingerprintAccessKey(_0x55c98e),'skills');}export function getRuntimeSkillDir(_0x5eabff,_0x2e8ecc,_0x35a6d5,_0x5effe7,_0x1ef17c,_0x503315={}){const _0x5083b3=a116_0x4c70;return resolve(getRuntimeSkillCacheRoot(_0x5eabff,_0x2e8ecc,_0x503315),safePathSegment(_0x35a6d5,_0x5083b3(0xef)),_0x5effe7,safePathSegment(_0x1ef17c,_0x5083b3(0xfe)));}function a116_0x5152(){const _0x2660f4=['22355120jvDpKR','claudeSkillsDir','trim','includes','4020848fOUvyW','.agents','filter','path\x20segment','cacheRoot','105bdDpJM','homeDir','CLAUDE_SKILL_ROOT','62166MtcXqP','skillCode','716960KjPUyU','agentsSkillsDir','workbuddySkillsDir','.claude','5211360iFxFLx','Unsafe\x20','homeDirName','cache','2527824jsiYHZ','8061508NnbUVq','skills','validation','\x20for\x20local\x20path:\x20','appCode','SKILL_ROOT'];a116_0x5152=function(){return _0x2660f4;};return a116_0x5152();}export function safePathSegment(_0x3d716b,_0x373914=a116_0x15ae89(0xf8)){const _0x4d4e5d=a116_0x15ae89;if(!_0x3d716b||_0x3d716b[_0x4d4e5d(0xf4)]('/')||_0x3d716b[_0x4d4e5d(0xf4)]('\x5c')||_0x3d716b['includes']('..'))throw CliErrors[_0x4d4e5d(0xed)](_0x4d4e5d(0x104)+_0x373914+_0x4d4e5d(0xee)+_0x3d716b);return _0x3d716b;}function trimmedEnv(_0x270627){const _0xf450d5=a116_0x15ae89,_0xb638bf=productEnv(_0x270627)?.[_0xf450d5(0xf3)]();return _0xb638bf?_0xb638bf:undefined;}
1
+ const a116_0x33a1c0=a116_0x85c4;(function(_0x33f268,_0x43ad7c){const _0xc4e5fa=a116_0x85c4,_0x303240=_0x33f268();while(!![]){try{const _0x43373b=-parseInt(_0xc4e5fa(0x17f))/0x1*(-parseInt(_0xc4e5fa(0x18b))/0x2)+-parseInt(_0xc4e5fa(0x186))/0x3+-parseInt(_0xc4e5fa(0x195))/0x4*(parseInt(_0xc4e5fa(0x18d))/0x5)+-parseInt(_0xc4e5fa(0x17e))/0x6+-parseInt(_0xc4e5fa(0x17d))/0x7+parseInt(_0xc4e5fa(0x18a))/0x8+parseInt(_0xc4e5fa(0x18e))/0x9;if(_0x43373b===_0x43ad7c)break;else _0x303240['push'](_0x303240['shift']());}catch(_0x5b188f){_0x303240['push'](_0x303240['shift']());}}}(a116_0x4e87,0x62080));import{existsSync}from'node:fs';function a116_0x4e87(){const _0x1f9a2d=['4270734pBiJyu','1glVsgw','trim','SKILL_ROOT','claudeSkillsDir','.claude','appCode','Unsafe\x20','951948fKasVe','includes','cacheRoot','\x20for\x20local\x20path:\x20','5196296cDPCfu','238708EyjEkX','homeDirName','5JWdAQf','8703531gJiFje','.workbuddy','skillCode','homeDir','agentsSkillsDir','skills','CLAUDE_SKILL_ROOT','1132388kjXhSW','path\x20segment','validation','155484RRQmIg'];a116_0x4e87=function(){return _0x1f9a2d;};return a116_0x4e87();}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(_0x495988={}){const _0x3db5e2=a116_0x85c4,_0x544b92=_0x495988[_0x3db5e2(0x191)]??homedir(),_0x2d7f6c=resolve(_0x544b92,PRODUCT_CONFIG[_0x3db5e2(0x18c)],'cache'),_0x5477d9=trimmedEnv(_0x3db5e2(0x181)),_0x51e091=trimmedEnv(_0x3db5e2(0x194)),_0x1fcb84=resolve(_0x544b92,_0x3db5e2(0x18f)),_0x68eb72=_0x495988['workbuddySkillsDir']??(existsSync(_0x1fcb84)?resolve(_0x1fcb84,_0x3db5e2(0x193)):undefined);return{'homeDir':_0x544b92,'cacheRoot':_0x2d7f6c,'managedRoot':resolve(_0x544b92,PRODUCT_CONFIG[_0x3db5e2(0x18c)]),'agentsSkillsDir':_0x495988[_0x3db5e2(0x192)]??_0x5477d9??resolve(_0x544b92,'.agents',_0x3db5e2(0x193)),'claudeSkillsDir':_0x495988[_0x3db5e2(0x182)]??_0x51e091??resolve(_0x544b92,_0x3db5e2(0x183),'skills'),'workbuddySkillsDir':_0x68eb72};}export function runtimeAgentSkillRoots(_0xef472){const _0x2648a0=a116_0x85c4;return[_0xef472[_0x2648a0(0x192)],_0xef472[_0x2648a0(0x182)],_0xef472['workbuddySkillsDir']]['filter'](_0x62c0d6=>Boolean(_0x62c0d6));}export function getRuntimeSkillCacheRoot(_0x13bbf2,_0x15386e,_0x174019={}){const _0x1e6145=a116_0x85c4,_0x2bc690=resolveSkillSyncPaths(_0x174019);return resolve(_0x2bc690[_0x1e6145(0x188)],_0x13bbf2,fingerprintAccessKey(_0x15386e),_0x1e6145(0x193));}function a116_0x85c4(_0x5dd6bf,_0x31e2ca){_0x5dd6bf=_0x5dd6bf-0x17b;const _0x4e87b9=a116_0x4e87();let _0x85c4c4=_0x4e87b9[_0x5dd6bf];return _0x85c4c4;}export function getRuntimeSkillDir(_0x59fee8,_0x273664,_0x2aa6ca,_0x1e368b,_0x471497,_0x3129ed={}){const _0x1be50d=a116_0x85c4;return resolve(getRuntimeSkillCacheRoot(_0x59fee8,_0x273664,_0x3129ed),safePathSegment(_0x2aa6ca,_0x1be50d(0x184)),_0x1e368b,safePathSegment(_0x471497,_0x1be50d(0x190)));}export function safePathSegment(_0x2de0ec,_0x23dca2=a116_0x33a1c0(0x17b)){const _0x310e7b=a116_0x33a1c0;if(!_0x2de0ec||_0x2de0ec[_0x310e7b(0x187)]('/')||_0x2de0ec[_0x310e7b(0x187)]('\x5c')||_0x2de0ec[_0x310e7b(0x187)]('..'))throw CliErrors[_0x310e7b(0x17c)](_0x310e7b(0x185)+_0x23dca2+_0x310e7b(0x189)+_0x2de0ec);return _0x2de0ec;}function trimmedEnv(_0x222596){const _0x2d698b=a116_0x33a1c0,_0x1cb036=productEnv(_0x222596)?.[_0x2d698b(0x180)]();return _0x1cb036?_0x1cb036:undefined;}
@@ -11,6 +11,7 @@ export interface PushDirectoryIdentityOptions {
11
11
  ignoreMetadataSkillCode?: boolean;
12
12
  }
13
13
  interface ReadPushDirectoryOptions extends PushDirectoryIdentityOptions {
14
+ excludedFilePaths?: readonly string[];
14
15
  ignoreMetadataForPayload?: boolean;
15
16
  ignoreMetadataScope?: boolean;
16
17
  targetScope?: Extract<RuntimeSkillScope, "personal" | "company">;
@@ -1 +1 @@
1
- (function(_0x1080a7,_0x513623){const _0xcce7b9=a117_0x2db5,_0xeaee8a=_0x1080a7();while(!![]){try{const _0x4ac1f5=parseInt(_0xcce7b9(0x80))/0x1*(parseInt(_0xcce7b9(0x9f))/0x2)+-parseInt(_0xcce7b9(0x73))/0x3+-parseInt(_0xcce7b9(0x7d))/0x4+parseInt(_0xcce7b9(0x7b))/0x5+-parseInt(_0xcce7b9(0x78))/0x6*(-parseInt(_0xcce7b9(0xa4))/0x7)+parseInt(_0xcce7b9(0x9a))/0x8+-parseInt(_0xcce7b9(0x7e))/0x9*(parseInt(_0xcce7b9(0x7c))/0xa);if(_0x4ac1f5===_0x513623)break;else _0xeaee8a['push'](_0xeaee8a['shift']());}catch(_0x48e1aa){_0xeaee8a['push'](_0xeaee8a['shift']());}}}(a117_0xacfe,0xa94a2));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a117_0x437ab2}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(_0x57aea9,_0x287bac,_0x105c8a={}){const _0x49d45e=a117_0x2db5,_0x2c69a1=resolvePushDirectoryRoot(_0x57aea9),_0x1fff91=readPushMetadataIfPresent(resolve(_0x2c69a1,METADATA_FILE),{'ignoreInvalidMetadata':_0x105c8a[_0x49d45e(0xa7)]});if(_0x1fff91?.[_0x49d45e(0x84)]&&_0x1fff91[_0x49d45e(0x84)]!==_0x287bac&&!_0x105c8a[_0x49d45e(0xa1)]&&!_0x105c8a[_0x49d45e(0x95)])throw CliErrors[_0x49d45e(0x71)](_0x49d45e(0x70)+_0x1fff91[_0x49d45e(0x84)]+_0x49d45e(0x8e)+_0x287bac+'\x22.');const _0x32d44e=resolvePushSkillCode(_0x2c69a1,_0x287bac,_0x1fff91,_0x105c8a);if(!_0x32d44e)throw CliErrors[_0x49d45e(0x71)](_0x49d45e(0x83)+SKILL_FILE+',\x20'+METADATA_FILE+_0x49d45e(0x8a));return{'dir':_0x2c69a1,'skillCode':_0x32d44e,'metadata':_0x1fff91};}export function readPushDirectory(_0x2fd77e,_0x3e8c05,_0x227151={}){const _0x1fcc80=a117_0x2db5,_0x47d4f1=resolvePushDirectoryIdentity(_0x2fd77e,_0x3e8c05,_0x227151),_0x567f78=_0x47d4f1['dir'],_0x131f00=resolve(_0x567f78,SKILL_FILE);if(!existsSync(_0x131f00)||!lstatSync(_0x131f00)['isFile']())throw CliErrors['validation'](_0x1fcc80(0xab)+SKILL_FILE+':\x20'+_0x131f00);const _0x18b4f6=_0x47d4f1['metadata'],_0x94cdc=_0x227151[_0x1fcc80(0x89)]??_0x1fcc80(0x72);if(!_0x227151[_0x1fcc80(0xaf)]&&_0x18b4f6?.[_0x1fcc80(0x7f)]===_0x1fcc80(0x6d))throw CliErrors[_0x1fcc80(0x71)](_0x1fcc80(0x9b)+METADATA_FILE+_0x1fcc80(0xa2)+_0x18b4f6[_0x1fcc80(0x7f)]+'\x22.');if(!_0x227151[_0x1fcc80(0xaf)]&&_0x94cdc==='personal'&&_0x18b4f6?.[_0x1fcc80(0x7f)]&&_0x18b4f6['scope']!=='personal')throw CliErrors[_0x1fcc80(0x71)](_0x1fcc80(0xae)+METADATA_FILE+_0x1fcc80(0xa2)+_0x18b4f6[_0x1fcc80(0x7f)]+'\x22.',_0x1fcc80(0x93)+_0x567f78+_0x1fcc80(0x87));const _0x25c87d=scanSkillDirectory(_0x567f78),_0x1da097=buildSkillPackage(_0x25c87d),_0x5b082e=readFileSync(_0x131f00,_0x1fcc80(0xa5)),_0x5289e7=_0x47d4f1[_0x1fcc80(0x92)],_0x1d9073=_0x227151['ignoreMetadataForPayload']?undefined:_0x18b4f6,_0x32e457=readSkillDisplayName(_0x5b082e);return{'skillCode':_0x5289e7,'metadata':_0x18b4f6,'frontmatterDisplayName':_0x32e457,'input':{'skillCode':_0x5289e7,'skillName':_0x32e457??_0x1d9073?.[_0x1fcc80(0x97)],'description':_0x1d9073?.[_0x1fcc80(0x75)],'content':_0x5b082e,'files':_0x1da097[_0x1fcc80(0x8f)],'packageBase64':_0x1da097[_0x1fcc80(0x8c)],'tags':_0x1d9073?.['tags'],'version':_0x1d9073?.['version'],'sourceSessionId':_0x1d9073?.[_0x1fcc80(0x90)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1ace7f,_0x490613,_0x313574,_0x30ff73={}){const _0x4bff4a=a117_0x2db5,_0x29ab58=resolvePushDirectoryRoot(_0x1ace7f),_0x35ba49=readPushMetadataIfPresent(resolve(_0x29ab58,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x562e70=requireRemoteScope(_0x490613),_0x3bcfb6=readLocalSkillContent(_0x29ab58),_0x2d838b={..._0x490613,'appCode':_0x490613[_0x4bff4a(0x84)]??_0x313574,'skillName':_0x490613['skillName']??_0x35ba49?.[_0x4bff4a(0x97)],'description':_0x490613[_0x4bff4a(0x75)]??_0x35ba49?.[_0x4bff4a(0x75)],'tags':Array[_0x4bff4a(0x86)](_0x490613[_0x4bff4a(0x6e)])?_0x490613[_0x4bff4a(0x6e)]:_0x35ba49?.[_0x4bff4a(0x6e)],'sourceSessionId':_0x490613['sourceSessionId']??_0x35ba49?.[_0x4bff4a(0x90)],'content':_0x490613['content']??_0x3bcfb6},_0x3dabf2=buildMetadata(_0x2d838b,_0x562e70,_0x313574,contentHash(_0x3bcfb6),_0x30ff73[_0x4bff4a(0x85)]);writeJsonAtomic(resolve(_0x29ab58,METADATA_FILE),_0x3dabf2);}export function recordPushedRuntimeSkill(_0x43742f,_0x19b1ff,_0x62fd28,_0x33b1a6={}){const _0x30fe49=a117_0x2db5,_0x509bbe=resolvePushDirectoryRoot(_0x43742f),_0x59fdd8=scanSkillDirectory(_0x509bbe),_0x4c9c3d=_0x59fdd8['find'](_0x4b8d72=>_0x4b8d72['path']===SKILL_FILE),_0xe3da7b=_0x4c9c3d?fileText(_0x4c9c3d):'',_0x1c36e5=tryNormalizePackageManifest(_0x19b1ff[_0x30fe49(0xa8)]),_0x1092a2={..._0x19b1ff,'content':_0x19b1ff[_0x30fe49(0xaa)]??_0xe3da7b,'files':_0x1c36e5},_0x55e758=_0x1c36e5?normalizeLocalFiles(_0x59fdd8)[_0x30fe49(0x8d)](_0x4d51d9=>_0x1c36e5['files'][_0x30fe49(0x96)](_0x4ad26b=>_0x4ad26b['path']===_0x4d51d9['path'])):undefined,_0x2fbf48=buildMetadata(_0x1092a2,_0x33b1a6[_0x30fe49(0x7f)]??_0x30fe49(0x72),_0x62fd28,contentHash(_0x1092a2[_0x30fe49(0xaa)]??''),_0x33b1a6['pushedAt'],_0x55e758);writeJsonAtomic(resolve(_0x509bbe,METADATA_FILE),_0x2fbf48);}export function deriveSkillCodeFromDirectory(_0x1ad926,_0x49984d){const _0x10b058=a117_0x2db5,_0x22cc0e=basename(resolve(_0x1ad926)),_0x4b5390=_0x49984d+'--';return _0x22cc0e[_0x10b058(0xa0)](_0x4b5390)?_0x22cc0e[_0x10b058(0x94)](_0x4b5390[_0x10b058(0x6c)]):_0x22cc0e;}function resolvePushSkillCode(_0xd45499,_0x288718,_0x10f137,_0x6b14b8){const _0x3f8822=a117_0x2db5,_0x202cab=deriveSkillCodeFromSkillFile(_0xd45499)||deriveSkillCodeFromDirectory(_0xd45499,_0x288718);if(_0x6b14b8[_0x3f8822(0x9c)])return _0x202cab;return _0x10f137?.[_0x3f8822(0x92)]?.['trim']()||_0x202cab;}function deriveSkillCodeFromSkillFile(_0x16326b){const _0x112b77=a117_0x2db5,_0x4868b8=resolve(_0x16326b,SKILL_FILE);if(!existsSync(_0x4868b8)||!lstatSync(_0x4868b8)[_0x112b77(0x79)]())return undefined;const _0x304ef2=readFileSync(_0x4868b8,_0x112b77(0xa5)),_0x273a10=_0x304ef2['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x273a10)return undefined;const _0x3e2f64=parseFrontmatterObject(_0x273a10[0x1]??''),_0x2e0012=scalarToString(_0x3e2f64?.[_0x112b77(0x88)]);return _0x2e0012?slugifySkillName(_0x2e0012):undefined;}function readSkillDisplayName(_0x281954){const _0xe5489c=a117_0x2db5,_0x300ba8=_0x281954[_0xe5489c(0x8b)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x300ba8)return undefined;const _0x3c1bc5=parseFrontmatterObject(_0x300ba8[0x1]??'');return scalarToString(_0x3c1bc5?.[_0xe5489c(0xa6)]);}function slugifySkillName(_0x4d573a){const _0x4dac6c=a117_0x2db5,_0x732bd4=_0x4d573a['trim']()[_0x4dac6c(0xa9)]()[_0x4dac6c(0x91)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4dac6c(0x91)](/^-+/,'')[_0x4dac6c(0x91)](/-+$/,'')[_0x4dac6c(0x91)](/-{2,}/g,'-');if(!_0x732bd4)throw CliErrors[_0x4dac6c(0x71)](_0x4dac6c(0x77)+SKILL_FILE+_0x4dac6c(0x9d));return _0x732bd4;}function parseFrontmatterObject(_0x5dfe4a){const _0x2f011f=a117_0x2db5;try{const _0x15a438=a117_0x437ab2(_0x5dfe4a);return _0x15a438&&typeof _0x15a438===_0x2f011f(0x74)&&!Array[_0x2f011f(0x86)](_0x15a438)?_0x15a438:undefined;}catch{return undefined;}}function scalarToString(_0x2a5d9c){const _0x59934b=a117_0x2db5;if(typeof _0x2a5d9c===_0x59934b(0x98))return _0x2a5d9c[_0x59934b(0x81)]();if(typeof _0x2a5d9c===_0x59934b(0x99)||typeof _0x2a5d9c===_0x59934b(0x9e))return String(_0x2a5d9c);return undefined;}function resolvePushDirectoryRoot(_0x42f93a){const _0x34da09=a117_0x2db5,_0x550f78=resolve(_0x42f93a);if(!existsSync(_0x550f78))throw CliErrors[_0x34da09(0x71)](_0x34da09(0xa3)+_0x42f93a);const _0xb8a182=lstatSync(_0x550f78);if(_0xb8a182['isDirectory']())return _0x550f78;if(_0xb8a182[_0x34da09(0xac)]()){const _0x5b0dbf=realpathSync(_0x550f78);if(lstatSync(_0x5b0dbf)[_0x34da09(0x6f)]())return _0x5b0dbf;}throw CliErrors['validation'](_0x34da09(0xa3)+_0x42f93a);}function a117_0x2db5(_0x2af7f8,_0x34d9a0){_0x2af7f8=_0x2af7f8-0x6c;const _0xacfeed=a117_0xacfe();let _0x2db53c=_0xacfeed[_0x2af7f8];return _0x2db53c;}function requireRemoteScope(_0x3a067){const _0x59cdea=a117_0x2db5;if(_0x3a067[_0x59cdea(0x7f)]==='personal'||_0x3a067['scope']===_0x59cdea(0x82)||_0x3a067[_0x59cdea(0x7f)]===_0x59cdea(0x6d))return _0x3a067['scope'];throw CliErrors[_0x59cdea(0x71)]('Remote\x20Skill\x20'+(_0x3a067[_0x59cdea(0x92)]||_0x59cdea(0x76))+_0x59cdea(0x7a)+(_0x3a067[_0x59cdea(0x7f)]??_0x59cdea(0xad))+'\x22.');}function readLocalSkillContent(_0x2e66be){const _0x4a9c9e=a117_0x2db5,_0xa4cc5c=resolve(_0x2e66be,SKILL_FILE);return existsSync(_0xa4cc5c)&&lstatSync(_0xa4cc5c)[_0x4a9c9e(0x79)]()?readFileSync(_0xa4cc5c,_0x4a9c9e(0xa5)):'';}function a117_0xacfe(){const _0x3224c4=['appCode','refreshedAt','isArray','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','name','targetScope',',\x20or\x20directory\x20name.','match','packageBase64','filter','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','manifest','sourceSessionId','replace','skillCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','slice','ignoreMetadataAppCodeMismatch','some','skillName','string','number','9790520nNnpiS','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataSkillCode','\x20name\x20for\x20SkillHub\x20slug\x20generation.','boolean','334744Bqpwwf','startsWith','allowAppCodeRetarget','\x20has\x20scope=\x22','Skill\x20directory\x20not\x20found:\x20','2821931VBotpl','utf8','displayName','ignoreInvalidMetadata','files','toLowerCase','content','Missing\x20','isSymbolicLink','unknown','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataScope','length','builtin','tags','isDirectory','Skill\x20metadata\x20appCode\x20\x22','validation','personal','1699905Otggvt','object','description','(unknown)','Invalid\x20','18udFjwi','isFile','\x20has\x20unsupported\x20scope\x20\x22','320040zFHczo','933390NreQqf','3300836vJgMpY','72HirmWQ','scope','2DUdORP','trim','company','Unable\x20to\x20resolve\x20skillCode\x20from\x20'];a117_0xacfe=function(){return _0x3224c4;};return a117_0xacfe();}function readPushMetadataIfPresent(_0xb331d5,_0x2f8486={}){const _0x95bcc6=a117_0x2db5;try{return readMetadataIfPresent(_0xb331d5);}catch(_0x32b008){if(_0x2f8486[_0x95bcc6(0xa7)])return undefined;throw _0x32b008;}}
1
+ (function(_0x325041,_0x27a230){const _0x516c0b=a117_0x101d,_0x48304d=_0x325041();while(!![]){try{const _0x3f8d29=parseInt(_0x516c0b(0xa2))/0x1+-parseInt(_0x516c0b(0xa6))/0x2*(-parseInt(_0x516c0b(0xd2))/0x3)+parseInt(_0x516c0b(0xb3))/0x4*(-parseInt(_0x516c0b(0xd5))/0x5)+parseInt(_0x516c0b(0xc5))/0x6+-parseInt(_0x516c0b(0xc2))/0x7+parseInt(_0x516c0b(0xaa))/0x8*(parseInt(_0x516c0b(0xd0))/0x9)+-parseInt(_0x516c0b(0xba))/0xa;if(_0x3f8d29===_0x27a230)break;else _0x48304d['push'](_0x48304d['shift']());}catch(_0x45304a){_0x48304d['push'](_0x48304d['shift']());}}}(a117_0x4dba,0x91e0a));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a117_0x208fe1}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';function a117_0x4dba(){const _0x316446=['8ZAcERf','skillCode','metadata','Unable\x20to\x20resolve\x20skillCode\x20from\x20','validation','sourceSessionId','skillName',',\x20or\x20directory\x20name.','refreshedAt','670696BdMwTg','slice','Skill\x20directory\x20not\x20found:\x20','personal','\x20name\x20for\x20SkillHub\x20slug\x20generation.','allowAppCodeRetarget','some','2777750pPslYf','filter','string','tags','scope','isSymbolicLink','utf8','targetScope','8027166AIvpKH','\x20has\x20unsupported\x20scope\x20\x22','Skill\x20metadata\x20appCode\x20\x22','6823974QhDUWs','isFile','ignoreMetadataScope','description','boolean','ignoreMetadataAppCodeMismatch','toLowerCase','Missing\x20','files','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','\x20has\x20scope=\x22','7598034xRwkjq','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','60cfKmDg','builtin','match','30ITguvw','replace','ignoreMetadataForPayload','appCode','path','company','pushedAt','dir','trim','name','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','object','ignoreInvalidMetadata','395496KysNfC','packageBase64','number','unknown','65102GSJWhK','find','content','startsWith'];a117_0x4dba=function(){return _0x316446;};return a117_0x4dba();}import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';function a117_0x101d(_0x4ede56,_0x40dbc8){_0x4ede56=_0x4ede56-0x9c;const _0x4dba55=a117_0x4dba();let _0x101de1=_0x4dba55[_0x4ede56];return _0x101de1;}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x1369f5,_0x50d30e,_0x392334={}){const _0xbace37=a117_0x101d,_0xf880ab=resolvePushDirectoryRoot(_0x1369f5),_0x4ce99c=readPushMetadataIfPresent(resolve(_0xf880ab,METADATA_FILE),{'ignoreInvalidMetadata':_0x392334[_0xbace37(0xa1)]});if(_0x4ce99c?.[_0xbace37(0xd8)]&&_0x4ce99c['appCode']!==_0x50d30e&&!_0x392334[_0xbace37(0xb8)]&&!_0x392334[_0xbace37(0xca)])throw CliErrors[_0xbace37(0xae)](_0xbace37(0xc4)+_0x4ce99c[_0xbace37(0xd8)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x50d30e+'\x22.');const _0x58cda9=resolvePushSkillCode(_0xf880ab,_0x50d30e,_0x4ce99c,_0x392334);if(!_0x58cda9)throw CliErrors[_0xbace37(0xae)](_0xbace37(0xad)+SKILL_FILE+',\x20'+METADATA_FILE+_0xbace37(0xb1));return{'dir':_0xf880ab,'skillCode':_0x58cda9,'metadata':_0x4ce99c};}export function readPushDirectory(_0x424d47,_0x3b578d,_0x6beffc={}){const _0x12942a=a117_0x101d,_0x174a82=resolvePushDirectoryIdentity(_0x424d47,_0x3b578d,_0x6beffc),_0x2809b1=_0x174a82[_0x12942a(0x9c)],_0x8646d8=resolve(_0x2809b1,SKILL_FILE);if(!existsSync(_0x8646d8)||!lstatSync(_0x8646d8)[_0x12942a(0xc6)]())throw CliErrors[_0x12942a(0xae)](_0x12942a(0xcc)+SKILL_FILE+':\x20'+_0x8646d8);const _0x3e1a8e=_0x174a82[_0x12942a(0xac)],_0x42957b=_0x6beffc[_0x12942a(0xc1)]??_0x12942a(0xb6);if(!_0x6beffc[_0x12942a(0xc7)]&&_0x3e1a8e?.[_0x12942a(0xbe)]===_0x12942a(0xd3))throw CliErrors[_0x12942a(0xae)](_0x12942a(0xd1)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x3e1a8e[_0x12942a(0xbe)]+'\x22.');if(!_0x6beffc['ignoreMetadataScope']&&_0x42957b===_0x12942a(0xb6)&&_0x3e1a8e?.[_0x12942a(0xbe)]&&_0x3e1a8e[_0x12942a(0xbe)]!==_0x12942a(0xb6))throw CliErrors[_0x12942a(0xae)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x12942a(0xcf)+_0x3e1a8e['scope']+'\x22.',_0x12942a(0xce)+_0x2809b1+_0x12942a(0x9f));const _0x268e92=scanSkillDirectory(_0x2809b1,{'excludedFilePaths':_0x6beffc['excludedFilePaths']}),_0x4b3dd6=buildSkillPackage(_0x268e92),_0x578968=readFileSync(_0x8646d8,_0x12942a(0xc0)),_0x191dce=_0x174a82[_0x12942a(0xab)],_0x29a09b=_0x6beffc[_0x12942a(0xd7)]?undefined:_0x3e1a8e,_0x4ecf05=readSkillDisplayName(_0x578968);return{'skillCode':_0x191dce,'metadata':_0x3e1a8e,'frontmatterDisplayName':_0x4ecf05,'input':{'skillCode':_0x191dce,'skillName':_0x4ecf05??_0x29a09b?.[_0x12942a(0xb0)],'description':_0x29a09b?.['description'],'content':_0x578968,'files':_0x4b3dd6['manifest'],'packageBase64':_0x4b3dd6[_0x12942a(0xa3)],'tags':_0x29a09b?.[_0x12942a(0xbd)],'version':_0x29a09b?.['version'],'sourceSessionId':_0x29a09b?.[_0x12942a(0xaf)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x409da0,_0x32b84c,_0xc2bedd,_0x32c615={}){const _0x335346=a117_0x101d,_0x184b32=resolvePushDirectoryRoot(_0x409da0),_0x28d63f=readPushMetadataIfPresent(resolve(_0x184b32,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x50fce4=requireRemoteScope(_0x32b84c),_0x2b855a=readLocalSkillContent(_0x184b32),_0x2cafb6={..._0x32b84c,'appCode':_0x32b84c[_0x335346(0xd8)]??_0xc2bedd,'skillName':_0x32b84c['skillName']??_0x28d63f?.[_0x335346(0xb0)],'description':_0x32b84c[_0x335346(0xc8)]??_0x28d63f?.['description'],'tags':Array['isArray'](_0x32b84c['tags'])?_0x32b84c['tags']:_0x28d63f?.[_0x335346(0xbd)],'sourceSessionId':_0x32b84c[_0x335346(0xaf)]??_0x28d63f?.[_0x335346(0xaf)],'content':_0x32b84c[_0x335346(0xa8)]??_0x2b855a},_0x3f68b7=buildMetadata(_0x2cafb6,_0x50fce4,_0xc2bedd,contentHash(_0x2b855a),_0x32c615[_0x335346(0xb2)]);writeJsonAtomic(resolve(_0x184b32,METADATA_FILE),_0x3f68b7);}export function recordPushedRuntimeSkill(_0x306197,_0x1f0046,_0x4771fd,_0x2f7b3e={}){const _0x15c3b7=a117_0x101d,_0x473aea=resolvePushDirectoryRoot(_0x306197),_0x2a2dcd=scanSkillDirectory(_0x473aea),_0x2024c0=_0x2a2dcd[_0x15c3b7(0xa7)](_0x5eb63a=>_0x5eb63a[_0x15c3b7(0xd9)]===SKILL_FILE),_0x126041=_0x2024c0?fileText(_0x2024c0):'',_0x30aa26=tryNormalizePackageManifest(_0x1f0046['files']),_0x47c99f={..._0x1f0046,'content':_0x1f0046[_0x15c3b7(0xa8)]??_0x126041,'files':_0x30aa26},_0x315c10=_0x30aa26?normalizeLocalFiles(_0x2a2dcd)[_0x15c3b7(0xbb)](_0x384a58=>_0x30aa26[_0x15c3b7(0xcd)][_0x15c3b7(0xb9)](_0x1bc605=>_0x1bc605[_0x15c3b7(0xd9)]===_0x384a58['path'])):undefined,_0x1f905b=buildMetadata(_0x47c99f,_0x2f7b3e['scope']??'personal',_0x4771fd,contentHash(_0x47c99f[_0x15c3b7(0xa8)]??''),_0x2f7b3e[_0x15c3b7(0xdb)],_0x315c10);writeJsonAtomic(resolve(_0x473aea,METADATA_FILE),_0x1f905b);}export function deriveSkillCodeFromDirectory(_0x1e89c7,_0x44b376){const _0x265b26=a117_0x101d,_0x269bfc=basename(resolve(_0x1e89c7)),_0x28206b=_0x44b376+'--';return _0x269bfc[_0x265b26(0xa9)](_0x28206b)?_0x269bfc[_0x265b26(0xb4)](_0x28206b['length']):_0x269bfc;}function resolvePushSkillCode(_0x41bfd7,_0x164456,_0x2fcff8,_0x4b7acc){const _0x20af29=a117_0x101d,_0x1a938a=deriveSkillCodeFromSkillFile(_0x41bfd7)||deriveSkillCodeFromDirectory(_0x41bfd7,_0x164456);if(_0x4b7acc['ignoreMetadataSkillCode'])return _0x1a938a;return _0x2fcff8?.[_0x20af29(0xab)]?.[_0x20af29(0x9d)]()||_0x1a938a;}function deriveSkillCodeFromSkillFile(_0x3011a6){const _0x15ffcb=a117_0x101d,_0x75954b=resolve(_0x3011a6,SKILL_FILE);if(!existsSync(_0x75954b)||!lstatSync(_0x75954b)[_0x15ffcb(0xc6)]())return undefined;const _0x41bc1f=readFileSync(_0x75954b,_0x15ffcb(0xc0)),_0x24d7a8=_0x41bc1f[_0x15ffcb(0xd4)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x24d7a8)return undefined;const _0x255019=parseFrontmatterObject(_0x24d7a8[0x1]??''),_0x5f1dff=scalarToString(_0x255019?.[_0x15ffcb(0x9e)]);return _0x5f1dff?slugifySkillName(_0x5f1dff):undefined;}function readSkillDisplayName(_0x2fdad3){const _0xb3d9a8=_0x2fdad3['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xb3d9a8)return undefined;const _0x1ba427=parseFrontmatterObject(_0xb3d9a8[0x1]??'');return scalarToString(_0x1ba427?.['displayName']);}function slugifySkillName(_0xcb48d){const _0x959280=a117_0x101d,_0x555647=_0xcb48d[_0x959280(0x9d)]()[_0x959280(0xcb)]()[_0x959280(0xd6)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x959280(0xd6)](/^-+/,'')['replace'](/-+$/,'')[_0x959280(0xd6)](/-{2,}/g,'-');if(!_0x555647)throw CliErrors[_0x959280(0xae)]('Invalid\x20'+SKILL_FILE+_0x959280(0xb7));return _0x555647;}function parseFrontmatterObject(_0x417ed6){const _0x3ff636=a117_0x101d;try{const _0xa69520=a117_0x208fe1(_0x417ed6);return _0xa69520&&typeof _0xa69520===_0x3ff636(0xa0)&&!Array['isArray'](_0xa69520)?_0xa69520:undefined;}catch{return undefined;}}function scalarToString(_0x479e18){const _0x14bf05=a117_0x101d;if(typeof _0x479e18===_0x14bf05(0xbc))return _0x479e18[_0x14bf05(0x9d)]();if(typeof _0x479e18===_0x14bf05(0xa4)||typeof _0x479e18===_0x14bf05(0xc9))return String(_0x479e18);return undefined;}function resolvePushDirectoryRoot(_0x3f17db){const _0x5c3e80=a117_0x101d,_0x4da063=resolve(_0x3f17db);if(!existsSync(_0x4da063))throw CliErrors[_0x5c3e80(0xae)](_0x5c3e80(0xb5)+_0x3f17db);const _0x486957=lstatSync(_0x4da063);if(_0x486957['isDirectory']())return _0x4da063;if(_0x486957[_0x5c3e80(0xbf)]()){const _0x1f6502=realpathSync(_0x4da063);if(lstatSync(_0x1f6502)['isDirectory']())return _0x1f6502;}throw CliErrors['validation'](_0x5c3e80(0xb5)+_0x3f17db);}function requireRemoteScope(_0x3862ce){const _0x4c3cfd=a117_0x101d;if(_0x3862ce['scope']===_0x4c3cfd(0xb6)||_0x3862ce[_0x4c3cfd(0xbe)]===_0x4c3cfd(0xda)||_0x3862ce[_0x4c3cfd(0xbe)]==='builtin')return _0x3862ce[_0x4c3cfd(0xbe)];throw CliErrors['validation']('Remote\x20Skill\x20'+(_0x3862ce[_0x4c3cfd(0xab)]||'(unknown)')+_0x4c3cfd(0xc3)+(_0x3862ce[_0x4c3cfd(0xbe)]??_0x4c3cfd(0xa5))+'\x22.');}function readLocalSkillContent(_0x49e7b9){const _0x1c148a=a117_0x101d,_0x3810c9=resolve(_0x49e7b9,SKILL_FILE);return existsSync(_0x3810c9)&&lstatSync(_0x3810c9)['isFile']()?readFileSync(_0x3810c9,_0x1c148a(0xc0)):'';}function readPushMetadataIfPresent(_0x4250cb,_0x1ce144={}){const _0x5ae8d0=a117_0x101d;try{return readMetadataIfPresent(_0x4250cb);}catch(_0x22dff5){if(_0x1ce144[_0x5ae8d0(0xa1)])return undefined;throw _0x22dff5;}}
@@ -1 +1 @@
1
- function a118_0x1a9d(){const _0x213221=['10809qzDewi','1140926MeLbai','4gwaeXZ','includes','6203930bRrOGa','7093752ITfxik','personal','length','9449341IhxoPD','company','Unsupported\x20runtime\x20Skill\x20scope:\x20','validation','21VzcDeF','builtin','1887108WVnrmj','3940yWJzeF','354654oPaKyW','1VunvGB'];a118_0x1a9d=function(){return _0x213221;};return a118_0x1a9d();}(function(_0x5740a0,_0x580b57){const _0x1cd412=a118_0x34df,_0x213acf=_0x5740a0();while(!![]){try{const _0x27c8f7=parseInt(_0x1cd412(0x18c))/0x1*(parseInt(_0x1cd412(0x18e))/0x2)+-parseInt(_0x1cd412(0x189))/0x3+parseInt(_0x1cd412(0x18f))/0x4*(parseInt(_0x1cd412(0x191))/0x5)+-parseInt(_0x1cd412(0x18b))/0x6*(-parseInt(_0x1cd412(0x187))/0x7)+parseInt(_0x1cd412(0x180))/0x8+parseInt(_0x1cd412(0x18d))/0x9*(-parseInt(_0x1cd412(0x18a))/0xa)+-parseInt(_0x1cd412(0x183))/0xb;if(_0x27c8f7===_0x580b57)break;else _0x213acf['push'](_0x213acf['shift']());}catch(_0x574847){_0x213acf['push'](_0x213acf['shift']());}}}(a118_0x1a9d,0xdf272));function a118_0x34df(_0x24a0fe,_0x54f819){_0x24a0fe=_0x24a0fe-0x180;const _0x1a9dfc=a118_0x1a9d();let _0x34df0e=_0x1a9dfc[_0x24a0fe];return _0x34df0e;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4e4844){const _0x5a8e54=a118_0x34df,_0xace53b=_0x4e4844&&_0x4e4844[_0x5a8e54(0x182)]>0x0?_0x4e4844:[_0x5a8e54(0x181),'company',_0x5a8e54(0x188)],_0x1a9157=[];for(const _0x1913ca of _0xace53b){if(!isRuntimeSkillScope(_0x1913ca))throw CliErrors[_0x5a8e54(0x186)](_0x5a8e54(0x185)+_0x1913ca);!_0x1a9157[_0x5a8e54(0x190)](_0x1913ca)&&_0x1a9157['push'](_0x1913ca);}return _0x1a9157;}export function isRuntimeSkillScope(_0x5b5db6){const _0x17739a=a118_0x34df;return _0x5b5db6==='personal'||_0x5b5db6===_0x17739a(0x184)||_0x5b5db6===_0x17739a(0x188);}
1
+ function a118_0x2d5d(){const _0x10fd20=['personal','11luPjan','3908VYjGVQ','596708NAiFXV','length','44546ahUDtK','company','12zvfgko','680175gEdmyu','1095bUtoZk','includes','builtin','push','88248JnCDuW','1903120WUTvAK','819819pAukGV'];a118_0x2d5d=function(){return _0x10fd20;};return a118_0x2d5d();}(function(_0x3946be,_0x5c8977){const _0x3df3d5=a118_0x53eb,_0x4305b6=_0x3946be();while(!![]){try{const _0x19100e=parseInt(_0x3df3d5(0x14c))/0x1*(-parseInt(_0x3df3d5(0x150))/0x2)+-parseInt(_0x3df3d5(0x14a))/0x3+-parseInt(_0x3df3d5(0x14d))/0x4*(-parseInt(_0x3df3d5(0x144))/0x5)+parseInt(_0x3df3d5(0x142))/0x6*(parseInt(_0x3df3d5(0x14e))/0x7)+parseInt(_0x3df3d5(0x148))/0x8+parseInt(_0x3df3d5(0x143))/0x9+parseInt(_0x3df3d5(0x149))/0xa;if(_0x19100e===_0x5c8977)break;else _0x4305b6['push'](_0x4305b6['shift']());}catch(_0xfdafa){_0x4305b6['push'](_0x4305b6['shift']());}}}(a118_0x2d5d,0x22ef5));function a118_0x53eb(_0xfa8607,_0x45020e){_0xfa8607=_0xfa8607-0x141;const _0x2d5d7e=a118_0x2d5d();let _0x53ebc4=_0x2d5d7e[_0xfa8607];return _0x53ebc4;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x30c1fc){const _0x54e958=a118_0x53eb,_0xbbdf16=_0x30c1fc&&_0x30c1fc[_0x54e958(0x14f)]>0x0?_0x30c1fc:['personal',_0x54e958(0x141),_0x54e958(0x146)],_0xb5c1e8=[];for(const _0x2ecf4d of _0xbbdf16){if(!isRuntimeSkillScope(_0x2ecf4d))throw CliErrors['validation']('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x2ecf4d);!_0xb5c1e8[_0x54e958(0x145)](_0x2ecf4d)&&_0xb5c1e8[_0x54e958(0x147)](_0x2ecf4d);}return _0xb5c1e8;}export function isRuntimeSkillScope(_0x5d396a){const _0x4c2385=a118_0x53eb;return _0x5d396a===_0x4c2385(0x14b)||_0x5d396a===_0x4c2385(0x141)||_0x5d396a===_0x4c2385(0x146);}
@@ -1 +1 @@
1
- const a120_0x52a746=a120_0x4eda;function a120_0x5858(){const _0x4fd8d6=['from','836UoZPDU','38390CjgcJD','1980-01-01T00:00:00.000Z','592810ZARDTn','name','validation','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','code','295iJLJAm','endsWith','map','object','234waPqiC','36763932mbxQnQ','length','2278oVXuXF','692972aWLpso','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation_error','2850NPJlIS','60FrZjTL','10389bgeKLs','sort','3640tsknDw','entries'];a120_0x5858=function(){return _0x4fd8d6;};return a120_0x5858();}(function(_0x4469b2,_0x4daced){const _0x58c4ae=a120_0x4eda,_0x18d7b8=_0x4469b2();while(!![]){try{const _0x5f2cfb=-parseInt(_0x58c4ae(0x11b))/0x1*(-parseInt(_0x58c4ae(0x108))/0x2)+parseInt(_0x58c4ae(0x10e))/0x3*(-parseInt(_0x58c4ae(0x113))/0x4)+-parseInt(_0x58c4ae(0x116))/0x5*(parseInt(_0x58c4ae(0x10d))/0x6)+parseInt(_0x58c4ae(0x109))/0x7+-parseInt(_0x58c4ae(0x110))/0x8*(-parseInt(_0x58c4ae(0x11f))/0x9)+-parseInt(_0x58c4ae(0x10c))/0xa*(parseInt(_0x58c4ae(0x114))/0xb)+parseInt(_0x58c4ae(0x106))/0xc;if(_0x5f2cfb===_0x4daced)break;else _0x18d7b8['push'](_0x18d7b8['shift']());}catch(_0x4024c5){_0x18d7b8['push'](_0x18d7b8['shift']());}}}(a120_0x5858,0x940f7));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a120_0x52a746(0x115));function a120_0x4eda(_0x19f6f7,_0x43078b){_0x19f6f7=_0x19f6f7-0x106;const _0x585839=a120_0x5858();let _0x4edae5=_0x585839[_0x19f6f7];return _0x4edae5;}export function createDeterministicZipPackage(_0x1082b8){const _0x1686bf=a120_0x52a746,_0x282999={};for(const _0x10cddb of normalizeLocalFiles(_0x1082b8)){_0x282999[_0x10cddb['path']]=fileContent(_0x10cddb);}return Buffer[_0x1686bf(0x112)](zipSync(_0x282999,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x11d6b8){const _0x3e7d3a=a120_0x52a746;if(_0x11d6b8[_0x3e7d3a(0x107)]<0x16)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x385d39;try{_0x385d39=unzipSync(_0x11d6b8,{'filter'(_0x36a141){const _0x83a98f=_0x3e7d3a,_0x211680=normalizeSkillRelativePath(_0x36a141[_0x83a98f(0x117)]);if(_0x211680[_0x83a98f(0x11c)]('/'))throw CliErrors[_0x83a98f(0x118)](_0x83a98f(0x119)+_0x211680);return!![];}});}catch(_0x1cfbc4){if(isRuntimeSkillValidationError(_0x1cfbc4))throw _0x1cfbc4;throw CliErrors[_0x3e7d3a(0x118)](_0x3e7d3a(0x10a));}return Object[_0x3e7d3a(0x111)](_0x385d39)[_0x3e7d3a(0x11d)](([_0x178dcc,_0x405345])=>({'path':normalizeSkillRelativePath(_0x178dcc),'bytes':Buffer[_0x3e7d3a(0x112)](_0x405345)}))[_0x3e7d3a(0x10f)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x2be14b){const _0x131d0d=a120_0x52a746;return typeof _0x2be14b===_0x131d0d(0x11e)&&_0x2be14b!==null&&_0x131d0d(0x11a)in _0x2be14b&&_0x2be14b['code']===_0x131d0d(0x10b);}
1
+ const a120_0xd3dd8c=a120_0x37c1;function a120_0x37c1(_0x47351b,_0x4c1c47){_0x47351b=_0x47351b-0x1cf;const _0x598092=a120_0x5980();let _0x37c150=_0x598092[_0x47351b];return _0x37c150;}(function(_0x5e1a0c,_0x1a28ac){const _0xcd79e1=a120_0x37c1,_0x3eec2d=_0x5e1a0c();while(!![]){try{const _0x2f606b=-parseInt(_0xcd79e1(0x1d6))/0x1*(-parseInt(_0xcd79e1(0x1d5))/0x2)+parseInt(_0xcd79e1(0x1e4))/0x3+parseInt(_0xcd79e1(0x1e0))/0x4*(parseInt(_0xcd79e1(0x1da))/0x5)+-parseInt(_0xcd79e1(0x1e2))/0x6*(parseInt(_0xcd79e1(0x1d2))/0x7)+-parseInt(_0xcd79e1(0x1d4))/0x8*(-parseInt(_0xcd79e1(0x1d0))/0x9)+parseInt(_0xcd79e1(0x1dc))/0xa+-parseInt(_0xcd79e1(0x1d9))/0xb;if(_0x2f606b===_0x1a28ac)break;else _0x3eec2d['push'](_0x3eec2d['shift']());}catch(_0xd71a06){_0x3eec2d['push'](_0x3eec2d['shift']());}}}(a120_0x5980,0x455b4));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a120_0x5980(){const _0x4e6d33=['155NPMWAQ','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','3565010PgBXZW','from','code','map','62324LitmIa','path','4818hCsMLh','validation','181848YZFFMQ','length','name','endsWith','171tYzVye','object','196qDCJkJ','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','205800RfNrJV','3842WQteXx','293UMaRgW','entries','1980-01-01T00:00:00.000Z','18097068tKGZzP'];a120_0x5980=function(){return _0x4e6d33;};return a120_0x5980();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a120_0xd3dd8c(0x1d8));export function createDeterministicZipPackage(_0x4dd35d){const _0x106a37=a120_0xd3dd8c,_0x21a793={};for(const _0x10f36b of normalizeLocalFiles(_0x4dd35d)){_0x21a793[_0x10f36b[_0x106a37(0x1e1)]]=fileContent(_0x10f36b);}return Buffer['from'](zipSync(_0x21a793,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x22de47){const _0x496bc1=a120_0xd3dd8c;if(_0x22de47[_0x496bc1(0x1e5)]<0x16)throw CliErrors[_0x496bc1(0x1e3)](_0x496bc1(0x1db));let _0xd5f62e;try{_0xd5f62e=unzipSync(_0x22de47,{'filter'(_0x2fd400){const _0xd0f661=_0x496bc1,_0x33cb69=normalizeSkillRelativePath(_0x2fd400[_0xd0f661(0x1e6)]);if(_0x33cb69[_0xd0f661(0x1cf)]('/'))throw CliErrors[_0xd0f661(0x1e3)](_0xd0f661(0x1d3)+_0x33cb69);return!![];}});}catch(_0x477a28){if(isRuntimeSkillValidationError(_0x477a28))throw _0x477a28;throw CliErrors[_0x496bc1(0x1e3)](_0x496bc1(0x1db));}return Object[_0x496bc1(0x1d7)](_0xd5f62e)[_0x496bc1(0x1df)](([_0xb64227,_0x20b730])=>({'path':normalizeSkillRelativePath(_0xb64227),'bytes':Buffer[_0x496bc1(0x1dd)](_0x20b730)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x3f8037){const _0x7e2420=a120_0xd3dd8c;return typeof _0x3f8037===_0x7e2420(0x1d1)&&_0x3f8037!==null&&_0x7e2420(0x1de)in _0x3f8037&&_0x3f8037['code']==='validation_error';}
@@ -1 +1 @@
1
- (function(_0x2af825,_0x41394b){const _0x1d9550=a121_0x1e3a,_0x486783=_0x2af825();while(!![]){try{const _0xeb553=parseInt(_0x1d9550(0x10e))/0x1+-parseInt(_0x1d9550(0x111))/0x2*(-parseInt(_0x1d9550(0x11e))/0x3)+-parseInt(_0x1d9550(0x108))/0x4*(-parseInt(_0x1d9550(0x10f))/0x5)+parseInt(_0x1d9550(0x118))/0x6+-parseInt(_0x1d9550(0x102))/0x7*(-parseInt(_0x1d9550(0x110))/0x8)+-parseInt(_0x1d9550(0x10d))/0x9+-parseInt(_0x1d9550(0x11c))/0xa;if(_0xeb553===_0x41394b)break;else _0x486783['push'](_0x486783['shift']());}catch(_0x33088a){_0x486783['push'](_0x486783['shift']());}}}(a121_0x1900,0x9bbd7));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';function a121_0x1900(){const _0x59ea54=['62FrTKlT','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','treeSha256','path','map','5007198dbGIrx','push','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','19809890IjfPaH','has','61623goQQVX','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','length','sha256','get','base64','string','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','zipSize','isSafeInteger','set','schemaVersion','bytes','validation','\x20in\x20Skill\x20file\x20package.','Missing\x20','toString','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','requireOssPath','357yCAusE','zipSha256','ossPath','files','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','44hECFtl','Runtime\x20Skill\x20package\x20size\x20mismatch.','toLowerCase','isArray','some','7227378HapSIP','480694tbOqnw','576565QVTLME','31608iWQgls'];a121_0x1900=function(){return _0x59ea54;};return a121_0x1900();}export function buildSkillPackage(_0x1de808){const _0x59e5fd=a121_0x1e3a,_0x325329=normalizeLocalFiles(_0x1de808);if(!_0x325329[_0x59e5fd(0x10c)](_0x4625d1=>_0x4625d1[_0x59e5fd(0x116)]===SKILL_FILE))throw CliErrors[_0x59e5fd(0xfb)](_0x59e5fd(0xfd)+SKILL_FILE+_0x59e5fd(0xfc));const _0x5512f8=localFilesToManifestFiles(_0x325329),_0x4875b2=createDeterministicZipPackage(_0x325329);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5512f8),'zipSha256':bufferSha256(_0x4875b2),'zipSize':_0x4875b2[_0x59e5fd(0x120)],'files':_0x5512f8},'packageBytes':_0x4875b2,'packageBase64':_0x4875b2[_0x59e5fd(0xfe)](_0x59e5fd(0xf3))};}function a121_0x1e3a(_0x23ec1e,_0x2c2751){_0x23ec1e=_0x23ec1e-0xf3;const _0x1900f6=a121_0x1900();let _0x1e3ab1=_0x1900f6[_0x23ec1e];return _0x1e3ab1;}export function verifyRuntimeSkillPackage(_0x5006fe,_0x38f1e9){const _0x590c04=a121_0x1e3a,_0x2fee16=normalizePackageManifest(_0x5006fe,{'requireOssPath':![]});if(!_0x2fee16)throw CliErrors[_0x590c04(0xfb)](_0x590c04(0x100));return extractAndVerifyPackage(_0x2fee16,_0x38f1e9);}export function verifyRuntimeSkillBundle(_0x58ff8d,_0x5ba31a){const _0x533169=a121_0x1e3a,_0x53853e=normalizePackageManifest(_0x58ff8d,{'requireOssPath':![]});if(!_0x53853e)throw CliErrors[_0x533169(0xfb)](_0x533169(0x100));return extractAndVerifyPackageFiles(_0x53853e,_0x5ba31a);}export function tryNormalizePackageManifest(_0x2544f5){return normalizePackageManifest(_0x2544f5,{'requireOssPath':![]});}export function requirePackageBytes(_0x1857a8,_0x126b4d){const _0x2e2ee9=a121_0x1e3a;if(!_0x126b4d||_0x126b4d[_0x2e2ee9(0x120)]===0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x1857a8);return _0x126b4d;}export function extractDownloadedPackage(_0x27e4a0){const _0x2ff521=a121_0x1e3a,_0x276610=parseZipPackage(_0x27e4a0)[_0x2ff521(0x117)](_0x14c9c0=>({'path':_0x14c9c0[_0x2ff521(0x116)],'bytes':_0x14c9c0['bytes']}));if(!_0x276610[_0x2ff521(0x10c)](_0x154613=>_0x154613[_0x2ff521(0x116)]===SKILL_FILE))throw CliErrors[_0x2ff521(0xfb)](_0x2ff521(0x11a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x276610);}export function localFilesToManifestFiles(_0x277116){const _0x3d782d=a121_0x1e3a;return normalizeLocalFiles(_0x277116)[_0x3d782d(0x117)](_0x4523b2=>({'path':_0x4523b2[_0x3d782d(0x116)],'sha256':fileHash(_0x4523b2),'size':fileContent(_0x4523b2)[_0x3d782d(0x120)]}));}function normalizePackageManifest(_0x43d89f,_0x477fa7){const _0x187455=a121_0x1e3a;if(!_0x43d89f||typeof _0x43d89f!=='object'||Array[_0x187455(0x10b)](_0x43d89f))return undefined;const _0x3e7bb6=_0x43d89f,_0x3889b9=typeof _0x3e7bb6[_0x187455(0x104)]===_0x187455(0xf4)?_0x3e7bb6[_0x187455(0x104)]['trim']():undefined;if(_0x477fa7[_0x187455(0x101)]&&!_0x3889b9)return undefined;if(!Array[_0x187455(0x10b)](_0x3e7bb6[_0x187455(0x105)])||_0x3e7bb6[_0x187455(0x105)]['length']===0x0)return undefined;if(!isSha256Hex(_0x3e7bb6[_0x187455(0x115)]))throw CliErrors['validation'](_0x187455(0x107));if(!isSha256Hex(_0x3e7bb6[_0x187455(0x103)]))throw CliErrors[_0x187455(0xfb)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x187455(0xf7)](_0x3e7bb6[_0x187455(0xf6)])||_0x3e7bb6[_0x187455(0xf6)]<0x0)throw CliErrors[_0x187455(0xfb)](_0x187455(0x113));const _0x568d18=normalizeManifestFiles(_0x3e7bb6[_0x187455(0x105)]);if(!_0x568d18['some'](_0x1d2d1a=>_0x1d2d1a[_0x187455(0x116)]===SKILL_FILE))throw CliErrors['validation'](_0x187455(0x112)+SKILL_FILE+'.');const _0x55e4ea=fileTreeHash(_0x568d18);if(_0x55e4ea!==_0x3e7bb6[_0x187455(0x115)][_0x187455(0x10a)]())throw CliErrors[_0x187455(0xfb)](_0x187455(0x106));return{'schemaVersion':Number[_0x187455(0xf7)](_0x3e7bb6[_0x187455(0xf9)])?_0x3e7bb6[_0x187455(0xf9)]:0x2,'ossPath':_0x3889b9,'treeSha256':_0x55e4ea,'zipSha256':_0x3e7bb6[_0x187455(0x103)][_0x187455(0x10a)](),'zipSize':_0x3e7bb6[_0x187455(0xf6)],'files':_0x568d18};}function extractAndVerifyPackage(_0x4839e8,_0x5b334e){const _0x3f2fac=a121_0x1e3a,_0x2daa87=normalizePackageManifest(_0x4839e8,{'requireOssPath':![]});if(!_0x2daa87)throw CliErrors['validation'](_0x3f2fac(0x100));if(_0x5b334e['length']!==_0x2daa87[_0x3f2fac(0xf6)])throw CliErrors[_0x3f2fac(0xfb)](_0x3f2fac(0x109));const _0x1eeb0e=bufferSha256(_0x5b334e);if(_0x1eeb0e!==_0x2daa87[_0x3f2fac(0x103)])throw CliErrors[_0x3f2fac(0xfb)](_0x3f2fac(0x11b));return extractAndVerifyPackageFiles(_0x2daa87,_0x5b334e);}function extractAndVerifyPackageFiles(_0x35af32,_0x4209d1){const _0xd2258f=a121_0x1e3a,_0x54e0e3=parseZipPackage(_0x4209d1);if(_0x54e0e3[_0xd2258f(0x120)]!==_0x35af32[_0xd2258f(0x105)][_0xd2258f(0x120)])throw CliErrors[_0xd2258f(0xfb)](_0xd2258f(0x11f));const _0x3ca0a8=new Map();for(const _0x2e62ca of _0x54e0e3){if(_0x3ca0a8[_0xd2258f(0x11d)](_0x2e62ca['path']))throw CliErrors[_0xd2258f(0xfb)](_0xd2258f(0x114)+_0x2e62ca[_0xd2258f(0x116)]);_0x3ca0a8[_0xd2258f(0xf8)](_0x2e62ca[_0xd2258f(0x116)],_0x2e62ca);}const _0x4f2770=[];for(const _0x4a1611 of _0x35af32[_0xd2258f(0x105)]){const _0x4de50a=_0x3ca0a8[_0xd2258f(0x122)](_0x4a1611[_0xd2258f(0x116)]);if(!_0x4de50a)throw CliErrors['validation'](_0xd2258f(0xf5)+_0x4a1611[_0xd2258f(0x116)]);if(_0x4de50a[_0xd2258f(0xfa)][_0xd2258f(0x120)]!==_0x4a1611['size'])throw CliErrors[_0xd2258f(0xfb)](_0xd2258f(0xff)+_0x4a1611[_0xd2258f(0x116)]);const _0x3bbdf7=bufferSha256(_0x4de50a[_0xd2258f(0xfa)]);if(_0x3bbdf7!==_0x4a1611[_0xd2258f(0x121)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x4a1611[_0xd2258f(0x116)]);_0x4f2770[_0xd2258f(0x119)]({'path':_0x4a1611['path'],'bytes':_0x4de50a[_0xd2258f(0xfa)]});}return normalizeLocalFiles(_0x4f2770);}
1
+ (function(_0x270d82,_0x899f04){const _0x2e2bc3=a121_0x250f,_0x13f073=_0x270d82();while(!![]){try{const _0x5d3d72=parseInt(_0x2e2bc3(0x181))/0x1*(-parseInt(_0x2e2bc3(0x168))/0x2)+parseInt(_0x2e2bc3(0x171))/0x3+parseInt(_0x2e2bc3(0x17c))/0x4*(parseInt(_0x2e2bc3(0x17f))/0x5)+parseInt(_0x2e2bc3(0x165))/0x6*(-parseInt(_0x2e2bc3(0x182))/0x7)+-parseInt(_0x2e2bc3(0x177))/0x8*(parseInt(_0x2e2bc3(0x161))/0x9)+parseInt(_0x2e2bc3(0x15f))/0xa*(-parseInt(_0x2e2bc3(0x162))/0xb)+parseInt(_0x2e2bc3(0x183))/0xc;if(_0x5d3d72===_0x899f04)break;else _0x13f073['push'](_0x13f073['shift']());}catch(_0x44672c){_0x13f073['push'](_0x13f073['shift']());}}}(a121_0x38b1,0x8d198));import{CliErrors}from'../../errors.js';function a121_0x250f(_0x211074,_0x578a5d){_0x211074=_0x211074-0x158;const _0x38b1=a121_0x38b1();let _0x250f20=_0x38b1[_0x211074];return _0x250f20;}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';function a121_0x38b1(){const _0x4f3897=['5659030JBoDQx','validation','195728jlyYZC','6411419jYikLP','12706404MfETUm','Duplicate\x20Skill\x20package\x20entry:\x20','bytes','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','base64','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','sha256','zipSha256','isArray','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','370xujiDu','length','18GKucsb','99902dMjsiX','has','treeSha256','6ojoVMt','schemaVersion','toLowerCase','2qaIZpI','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','ossPath','files','map','set','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isSafeInteger','toString','2300502hVXEQI','some','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','\x20in\x20Skill\x20file\x20package.','path','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','3727536btBKRl','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','push','Missing\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','4yNcMBp','Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSize'];a121_0x38b1=function(){return _0x4f3897;};return a121_0x38b1();}export function buildSkillPackage(_0x6f6beb){const _0x96a3b5=a121_0x250f,_0x3f762e=normalizeLocalFiles(_0x6f6beb);if(!_0x3f762e[_0x96a3b5(0x172)](_0x425b64=>_0x425b64['path']===SKILL_FILE))throw CliErrors[_0x96a3b5(0x180)](_0x96a3b5(0x17a)+SKILL_FILE+_0x96a3b5(0x174));const _0x16036a=localFilesToManifestFiles(_0x3f762e),_0x1a5747=createDeterministicZipPackage(_0x3f762e);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x16036a),'zipSha256':bufferSha256(_0x1a5747),'zipSize':_0x1a5747[_0x96a3b5(0x160)],'files':_0x16036a},'packageBytes':_0x1a5747,'packageBase64':_0x1a5747[_0x96a3b5(0x170)](_0x96a3b5(0x158))};}export function verifyRuntimeSkillPackage(_0xd2118a,_0x4c4f0f){const _0x3dd626=a121_0x250f,_0x4c8184=normalizePackageManifest(_0xd2118a,{'requireOssPath':![]});if(!_0x4c8184)throw CliErrors[_0x3dd626(0x180)](_0x3dd626(0x178));return extractAndVerifyPackage(_0x4c8184,_0x4c4f0f);}export function verifyRuntimeSkillBundle(_0x5b6be1,_0x5e2b28){const _0x4e0532=a121_0x250f,_0x529bc6=normalizePackageManifest(_0x5b6be1,{'requireOssPath':![]});if(!_0x529bc6)throw CliErrors[_0x4e0532(0x180)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x529bc6,_0x5e2b28);}export function tryNormalizePackageManifest(_0xba168f){return normalizePackageManifest(_0xba168f,{'requireOssPath':![]});}export function requirePackageBytes(_0x5709b5,_0xac1dc4){const _0x16033d=a121_0x250f;if(!_0xac1dc4||_0xac1dc4[_0x16033d(0x160)]===0x0)throw CliErrors[_0x16033d(0x180)](_0x16033d(0x16e)+_0x5709b5);return _0xac1dc4;}export function extractDownloadedPackage(_0x260a75){const _0x138084=a121_0x250f,_0x188391=parseZipPackage(_0x260a75)[_0x138084(0x16c)](_0x47f18b=>({'path':_0x47f18b[_0x138084(0x175)],'bytes':_0x47f18b[_0x138084(0x185)]}));if(!_0x188391['some'](_0x162399=>_0x162399[_0x138084(0x175)]===SKILL_FILE))throw CliErrors[_0x138084(0x180)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x188391);}export function localFilesToManifestFiles(_0x467550){const _0x2a2fab=a121_0x250f;return normalizeLocalFiles(_0x467550)[_0x2a2fab(0x16c)](_0x2eb300=>({'path':_0x2eb300[_0x2a2fab(0x175)],'sha256':fileHash(_0x2eb300),'size':fileContent(_0x2eb300)[_0x2a2fab(0x160)]}));}function normalizePackageManifest(_0x1c7d1c,_0x56b2fb){const _0x823090=a121_0x250f;if(!_0x1c7d1c||typeof _0x1c7d1c!=='object'||Array[_0x823090(0x15d)](_0x1c7d1c))return undefined;const _0x339920=_0x1c7d1c,_0x264ebf=typeof _0x339920[_0x823090(0x16a)]==='string'?_0x339920['ossPath']['trim']():undefined;if(_0x56b2fb['requireOssPath']&&!_0x264ebf)return undefined;if(!Array[_0x823090(0x15d)](_0x339920['files'])||_0x339920[_0x823090(0x16b)][_0x823090(0x160)]===0x0)return undefined;if(!isSha256Hex(_0x339920[_0x823090(0x164)]))throw CliErrors['validation'](_0x823090(0x17b));if(!isSha256Hex(_0x339920[_0x823090(0x15c)]))throw CliErrors[_0x823090(0x180)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x823090(0x16f)](_0x339920[_0x823090(0x17e)])||_0x339920[_0x823090(0x17e)]<0x0)throw CliErrors[_0x823090(0x180)](_0x823090(0x173));const _0x4f716d=normalizeManifestFiles(_0x339920[_0x823090(0x16b)]);if(!_0x4f716d[_0x823090(0x172)](_0x4bee28=>_0x4bee28[_0x823090(0x175)]===SKILL_FILE))throw CliErrors[_0x823090(0x180)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x5ad7f3=fileTreeHash(_0x4f716d);if(_0x5ad7f3!==_0x339920[_0x823090(0x164)]['toLowerCase']())throw CliErrors['validation'](_0x823090(0x15e));return{'schemaVersion':Number[_0x823090(0x16f)](_0x339920[_0x823090(0x166)])?_0x339920[_0x823090(0x166)]:0x2,'ossPath':_0x264ebf,'treeSha256':_0x5ad7f3,'zipSha256':_0x339920[_0x823090(0x15c)][_0x823090(0x167)](),'zipSize':_0x339920['zipSize'],'files':_0x4f716d};}function extractAndVerifyPackage(_0x4ab681,_0x58952a){const _0x4489fe=a121_0x250f,_0x2e988d=normalizePackageManifest(_0x4ab681,{'requireOssPath':![]});if(!_0x2e988d)throw CliErrors[_0x4489fe(0x180)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x58952a[_0x4489fe(0x160)]!==_0x2e988d[_0x4489fe(0x17e)])throw CliErrors[_0x4489fe(0x180)](_0x4489fe(0x17d));const _0x45313b=bufferSha256(_0x58952a);if(_0x45313b!==_0x2e988d[_0x4489fe(0x15c)])throw CliErrors[_0x4489fe(0x180)](_0x4489fe(0x169));return extractAndVerifyPackageFiles(_0x2e988d,_0x58952a);}function extractAndVerifyPackageFiles(_0x1c510b,_0x2f6dbf){const _0x17225c=a121_0x250f,_0x3595ac=parseZipPackage(_0x2f6dbf);if(_0x3595ac[_0x17225c(0x160)]!==_0x1c510b['files'][_0x17225c(0x160)])throw CliErrors[_0x17225c(0x180)](_0x17225c(0x186));const _0x4df591=new Map();for(const _0x479535 of _0x3595ac){if(_0x4df591[_0x17225c(0x163)](_0x479535['path']))throw CliErrors[_0x17225c(0x180)](_0x17225c(0x184)+_0x479535['path']);_0x4df591[_0x17225c(0x16d)](_0x479535[_0x17225c(0x175)],_0x479535);}const _0xb45074=[];for(const _0x158a2c of _0x1c510b[_0x17225c(0x16b)]){const _0x43dac1=_0x4df591['get'](_0x158a2c[_0x17225c(0x175)]);if(!_0x43dac1)throw CliErrors[_0x17225c(0x180)](_0x17225c(0x15a)+_0x158a2c[_0x17225c(0x175)]);if(_0x43dac1['bytes'][_0x17225c(0x160)]!==_0x158a2c['size'])throw CliErrors[_0x17225c(0x180)](_0x17225c(0x159)+_0x158a2c[_0x17225c(0x175)]);const _0x100361=bufferSha256(_0x43dac1['bytes']);if(_0x100361!==_0x158a2c[_0x17225c(0x15b)])throw CliErrors[_0x17225c(0x180)](_0x17225c(0x176)+_0x158a2c['path']);_0xb45074[_0x17225c(0x179)]({'path':_0x158a2c[_0x17225c(0x175)],'bytes':_0x43dac1[_0x17225c(0x185)]});}return normalizeLocalFiles(_0xb45074);}
@@ -1 +1 @@
1
- (function(_0x11acbf,_0x4d7948){var _0x5572cd=a122_0x1a5d,_0x1472d7=_0x11acbf();while(!![]){try{var _0x2062c9=parseInt(_0x5572cd(0xb4))/0x1*(-parseInt(_0x5572cd(0xae))/0x2)+parseInt(_0x5572cd(0xb1))/0x3*(-parseInt(_0x5572cd(0xb5))/0x4)+-parseInt(_0x5572cd(0xac))/0x5*(-parseInt(_0x5572cd(0xb2))/0x6)+-parseInt(_0x5572cd(0xb0))/0x7*(parseInt(_0x5572cd(0xb6))/0x8)+-parseInt(_0x5572cd(0xaf))/0x9*(parseInt(_0x5572cd(0xb8))/0xa)+-parseInt(_0x5572cd(0xad))/0xb+-parseInt(_0x5572cd(0xb7))/0xc*(-parseInt(_0x5572cd(0xb3))/0xd);if(_0x2062c9===_0x4d7948)break;else _0x1472d7['push'](_0x1472d7['shift']());}catch(_0xa72d33){_0x1472d7['push'](_0x1472d7['shift']());}}}(a122_0x4436,0xccf86));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a122_0x1a5d(_0x19a55a,_0x1c3fbd){_0x19a55a=_0x19a55a-0xac;var _0x443659=a122_0x4436();var _0x1a5d2d=_0x443659[_0x19a55a];return _0x1a5d2d;}export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';function a122_0x4436(){var _0x56df73=['4934040pTXhmA','5064sMJopc','9070IDpxRJ','206310PoHdIN','1809929zSEyvb','1158xaYxbp','11628UJQCYp','14Hneqlt','3621564FobCJi','120jaVhdB','127231nJWowI','585SGUHaW','4DAgSvL'];a122_0x4436=function(){return _0x56df73;};return a122_0x4436();}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(_0x37bed0,_0x2b81f8){var _0x20e6c9=a122_0x20d2,_0x42ad3b=_0x37bed0();while(!![]){try{var _0x20f5b8=parseInt(_0x20e6c9(0x19b))/0x1+-parseInt(_0x20e6c9(0x1a1))/0x2*(-parseInt(_0x20e6c9(0x19a))/0x3)+-parseInt(_0x20e6c9(0x199))/0x4+parseInt(_0x20e6c9(0x19c))/0x5*(-parseInt(_0x20e6c9(0x19d))/0x6)+-parseInt(_0x20e6c9(0x1a0))/0x7*(parseInt(_0x20e6c9(0x19e))/0x8)+-parseInt(_0x20e6c9(0x19f))/0x9+parseInt(_0x20e6c9(0x1a2))/0xa;if(_0x20f5b8===_0x2b81f8)break;else _0x42ad3b['push'](_0x42ad3b['shift']());}catch(_0x267634){_0x42ad3b['push'](_0x42ad3b['shift']());}}}(a122_0x2873,0xa2a59));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';function a122_0x20d2(_0x15190e,_0x20c111){_0x15190e=_0x15190e-0x199;var _0x2873d9=a122_0x2873();var _0x20d2bd=_0x2873d9[_0x15190e];return _0x20d2bd;}function a122_0x2873(){var _0x4508fb=['3DBgYhR','581258NfKPkh','10COUlmu','3557748BJmLBc','8kCqVDF','1543329PFJoxa','9242366qtfssC','1494032wPfHXE','31695060TUAdMQ','4615376AMmahH'];a122_0x2873=function(){return _0x4508fb;};return a122_0x2873();}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,48 @@
1
+ /**
2
+ * @fileoverview Global Skill install-state resolution, decoupled from the external `skills` CLI.
3
+ *
4
+ * Only reasonably trustworthy signals are used, and "confirmed missing" is kept
5
+ * distinct from "cannot tell":
6
+ * - artifact probe: `<globalSkillsDir>/<name>/SKILL.md`, what consumers actually resolve
7
+ * - install bookkeeping: the `skills` CLI's own `~/.agents/.skill-lock.json`
8
+ *
9
+ * Directory layout is owned by the external tool, so a stale layout assumption must
10
+ * resolve to `unverifiable` (pass through with a reason) rather than `absent` (fail).
11
+ * Only when both the artifact probe and the bookkeeping agree is the skill `absent`.
12
+ */
13
+ /** Install bookkeeping file written by the `skills` CLI, relative to HOME. */
14
+ export declare const SKILL_LOCK_RELATIVE_PATH: string;
15
+ /** Known global Skill directories, relative to HOME, in probe order. */
16
+ export declare const GLOBAL_SKILLS_DIR_RELATIVE_PATHS: string[];
17
+ /**
18
+ * Install state of a global Skill.
19
+ *
20
+ * `unverifiable` is deliberate: local assumptions were not sufficient to decide, so
21
+ * callers should pass through instead of failing.
22
+ */
23
+ export type SkillPresence = {
24
+ state: "present";
25
+ path: string;
26
+ } | {
27
+ state: "absent";
28
+ checked: string[];
29
+ } | {
30
+ state: "unverifiable";
31
+ reason: string;
32
+ };
33
+ export interface ResolveSkillPresenceOptions {
34
+ /** Override candidate global Skill directories (isolated environments or tests). */
35
+ globalSkillsDirs?: string[];
36
+ /** Override the `skills` CLI bookkeeping file path. */
37
+ lockFile?: string;
38
+ /** Override HOME. Tests only. */
39
+ home?: string;
40
+ }
41
+ /**
42
+ * Resolves whether a global Skill is currently discoverable by consumers.
43
+ *
44
+ * @param skillName - Global Skill name (its directory name), e.g. `lovrabet`.
45
+ * @param options - Probe overrides for isolated environments or tests.
46
+ * @returns `present`, `absent`, or `unverifiable`.
47
+ */
48
+ export declare function resolveInstalledSkill(skillName: string, options?: ResolveSkillPresenceOptions): SkillPresence;
@@ -0,0 +1 @@
1
+ const a123_0x410e5d=a123_0x536a;function a123_0x536a(_0x486786,_0x1b2ded){_0x486786=_0x486786-0xff;const _0x241ab1=a123_0x241a();let _0x536a89=_0x241ab1[_0x486786];return _0x536a89;}(function(_0x45f4ec,_0x560638){const _0x5a683e=a123_0x536a,_0x5c22c1=_0x45f4ec();while(!![]){try{const _0x11526d=parseInt(_0x5a683e(0x101))/0x1+parseInt(_0x5a683e(0x114))/0x2*(-parseInt(_0x5a683e(0x10d))/0x3)+-parseInt(_0x5a683e(0x119))/0x4+-parseInt(_0x5a683e(0x118))/0x5*(parseInt(_0x5a683e(0x108))/0x6)+-parseInt(_0x5a683e(0x104))/0x7+-parseInt(_0x5a683e(0x11d))/0x8+parseInt(_0x5a683e(0x112))/0x9*(parseInt(_0x5a683e(0x109))/0xa);if(_0x11526d===_0x560638)break;else _0x5c22c1['push'](_0x5c22c1['shift']());}catch(_0x4b8356){_0x5c22c1['push'](_0x5c22c1['shift']());}}}(a123_0x241a,0xb7dc4));function a123_0x241a(){const _0x543fe8=['recorded','1397678ZQlRcm','\x20is\x20unreadable:\x20','.agents','reason','4494340ikrbTN','2855176hqGZTG','home','skills','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','11825712ElPOfp','object','join','utf8','map','version','666990tbdwqx','absent','find','4394222qZKKpH','.skill-lock.json','\x20has\x20no\x20skills\x20map','unverifiable','6XEzxbU','8670670iphUmF','.claude','present','SKILL.md','6aYtlAr','kind','\x20uses\x20unsupported\x20version\x20','includes','unusable','54UNgJVi'];a123_0x241a=function(){return _0x543fe8;};return a123_0x241a();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a123_0x410e5d(0x116),a123_0x410e5d(0x105));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a123_0x410e5d(0x116),'skills'),join(a123_0x410e5d(0x10a),a123_0x410e5d(0x11b))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x5ac107,_0xfcd586){const _0xeaed4d=a123_0x410e5d;if(!existsSync(_0x5ac107))return{'kind':'not-recorded'};let _0x2de980;try{_0x2de980=JSON['parse'](readFileSync(_0x5ac107,_0xeaed4d(0x120)));}catch(_0x4159a1){return{'kind':_0xeaed4d(0x111),'reason':_0x5ac107+_0xeaed4d(0x115)+_0x4159a1['message']};}const _0x535098=_0x2de980;if(typeof _0x535098?.[_0xeaed4d(0x100)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0xeaed4d(0x110)](_0x535098[_0xeaed4d(0x100)]))return{'kind':_0xeaed4d(0x111),'reason':_0x5ac107+_0xeaed4d(0x10f)+String(_0x535098?.[_0xeaed4d(0x100)])};if(!_0x535098[_0xeaed4d(0x11b)]||typeof _0x535098[_0xeaed4d(0x11b)]!==_0xeaed4d(0x11e))return{'kind':'unusable','reason':_0x5ac107+_0xeaed4d(0x106)};return _0x535098[_0xeaed4d(0x11b)][_0xfcd586]?{'kind':_0xeaed4d(0x113)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x20cf34,_0x239bfb){const _0x5a00c2=a123_0x410e5d,_0x18d44b=_0x239bfb?.[_0x5a00c2(0x11a)]??homedir(),_0x17d5db=_0x239bfb?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x5a00c2(0xff)](_0xc5c5de=>join(_0x18d44b,_0xc5c5de)),_0x4d4bd2=_0x239bfb?.['lockFile']??join(_0x18d44b,SKILL_LOCK_RELATIVE_PATH),_0x57d32b=_0x17d5db['map'](_0x27de41=>join(_0x27de41,_0x20cf34,_0x5a00c2(0x10c))),_0x385d30=_0x57d32b[_0x5a00c2(0x103)](_0x498463=>existsSync(_0x498463));if(_0x385d30)return{'state':_0x5a00c2(0x10b),'path':_0x385d30};const _0x736bb7=readLockLookup(_0x4d4bd2,_0x20cf34);if(_0x736bb7['kind']===_0x5a00c2(0x111))return{'state':_0x5a00c2(0x107),'reason':_0x736bb7[_0x5a00c2(0x117)]};if(_0x736bb7[_0x5a00c2(0x10e)]===_0x5a00c2(0x113))return{'state':_0x5a00c2(0x107),'reason':_0x4d4bd2+'\x20records\x20\x22'+_0x20cf34+_0x5a00c2(0x11c)+('('+_0x57d32b[_0x5a00c2(0x11f)](',\x20')+')')};return{'state':_0x5a00c2(0x102),'checked':_0x57d32b};}
@@ -1 +1 @@
1
- function a123_0x16bc(){const _0x3cc0d6=['469umHxvN','20331bpDNvA','55758telYzV','1659110HtPWtW','1283512iHPmKg','1353480RglrpM','7296UpfnsA','192794hMrnzR','680475aMXFrR'];a123_0x16bc=function(){return _0x3cc0d6;};return a123_0x16bc();}(function(_0x4e4cd1,_0x4e0788){const _0x1c18ec=a123_0x5509,_0x582488=_0x4e4cd1();while(!![]){try{const _0xf93238=parseInt(_0x1c18ec(0x113))/0x1+parseInt(_0x1c18ec(0x112))/0x2+parseInt(_0x1c18ec(0x119))/0x3+parseInt(_0x1c18ec(0x118))/0x4+parseInt(_0x1c18ec(0x117))/0x5+parseInt(_0x1c18ec(0x116))/0x6*(parseInt(_0x1c18ec(0x114))/0x7)+parseInt(_0x1c18ec(0x111))/0x8*(-parseInt(_0x1c18ec(0x115))/0x9);if(_0xf93238===_0x4e0788)break;else _0x582488['push'](_0x582488['shift']());}catch(_0x3fdf79){_0x582488['push'](_0x582488['shift']());}}}(a123_0x16bc,0x6c313));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a123_0x5509(_0x33f326,_0x520641){_0x33f326=_0x33f326-0x111;const _0x16bcf0=a123_0x16bc();let _0x55094f=_0x16bcf0[_0x33f326];return _0x55094f;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x2487b3,_0x5d4eb3){const _0x41d509=a124_0x45df,_0x523fd9=_0x2487b3();while(!![]){try{const _0xf63dec=parseInt(_0x41d509(0x6c))/0x1*(parseInt(_0x41d509(0x66))/0x2)+-parseInt(_0x41d509(0x6d))/0x3+parseInt(_0x41d509(0x71))/0x4*(parseInt(_0x41d509(0x69))/0x5)+-parseInt(_0x41d509(0x67))/0x6+-parseInt(_0x41d509(0x68))/0x7*(-parseInt(_0x41d509(0x6a))/0x8)+-parseInt(_0x41d509(0x6b))/0x9*(parseInt(_0x41d509(0x6f))/0xa)+-parseInt(_0x41d509(0x70))/0xb*(-parseInt(_0x41d509(0x6e))/0xc);if(_0xf63dec===_0x5d4eb3)break;else _0x523fd9['push'](_0x523fd9['shift']());}catch(_0x352972){_0x523fd9['push'](_0x523fd9['shift']());}}}(a124_0xe5d0,0x3665a));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a124_0x45df(_0x30a3c3,_0x46bc4b){_0x30a3c3=_0x30a3c3-0x66;const _0xe5d0f2=a124_0xe5d0();let _0x45df11=_0xe5d0f2[_0x30a3c3];return _0x45df11;}function a124_0xe5d0(){const _0xf9cbbf=['8090dwgJjY','11najEmG','72IkvhJD','14rfaMNY','1263036qQFueM','353479Nldwxl','118835ISsOrP','40AENENN','3186wiTXzQ','40163bRGRSa','936591zjQXQJ','845604PfaYUk'];a124_0xe5d0=function(){return _0xf9cbbf;};return a124_0xe5d0();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- const a124_0x2aac6a=a124_0x4b2c;(function(_0x266ff1,_0x54ef4e){const _0x15b407=a124_0x4b2c,_0x3d197=_0x266ff1();while(!![]){try{const _0x5e248e=parseInt(_0x15b407(0x1f2))/0x1*(-parseInt(_0x15b407(0x1e5))/0x2)+-parseInt(_0x15b407(0x1fe))/0x3*(-parseInt(_0x15b407(0x1d5))/0x4)+parseInt(_0x15b407(0x1d6))/0x5*(parseInt(_0x15b407(0x1fb))/0x6)+parseInt(_0x15b407(0x1e2))/0x7*(parseInt(_0x15b407(0x209))/0x8)+-parseInt(_0x15b407(0x20b))/0x9+parseInt(_0x15b407(0x1d8))/0xa*(parseInt(_0x15b407(0x1fd))/0xb)+parseInt(_0x15b407(0x1df))/0xc;if(_0x5e248e===_0x54ef4e)break;else _0x3d197['push'](_0x3d197['shift']());}catch(_0x7f2bd6){_0x3d197['push'](_0x3d197['shift']());}}}(a124_0x35dd,0xa7300));function a124_0x35dd(){const _0x44128b=['200472gqnXnL','readLogs','command','Completed:\x20','existsSync','filter','log','unknown','rawCommand','errors','stringify','message','yellow','4XLtTeL','clearLogs','currentRawCommand','createLogger','success','parse','format','logFilePath','red','210Dyvttw','dirname','209vJSWly','284244jRtchj','clear','warn','File','getWinstonInstance','green','duration','split','printf','toISOString','details','71016oTEnil','initWinstonLogger','11158893fvNUFr','error','mkdirSync','now','timestamp','logTask','info','44saQmuV','62085xdbDAF','Failed\x20to\x20read\x20logs:','151610GysLum','setLogPath','setRawCommand','addColors','readFileSync','trim','logFileName','1722240TIkrRC','map','utf8','329hUVDUe','Failed\x20to\x20clear\x20logs:','winstonLogger'];a124_0x35dd=function(){return _0x44128b;};return a124_0x35dd();}import a124_0x383e89 from'winston';import a124_0x5d6290 from'node:fs';import a124_0x2819eb from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a124_0x2aac6a(0x1e4)];[a124_0x2aac6a(0x1f9)]='';[a124_0x2aac6a(0x1f4)]='';constructor(){}[a124_0x2aac6a(0x1da)](_0x59f610){const _0x5db644=a124_0x2aac6a;this[_0x5db644(0x1f4)]=_0x59f610;}[a124_0x2aac6a(0x1d9)](_0x9239e6){const _0x139779=a124_0x2aac6a;this[_0x139779(0x1f9)]=a124_0x2819eb['join'](_0x9239e6,PRODUCT_CONFIG[_0x139779(0x1de)]),this['winstonLogger']&&this[_0x139779(0x1e4)][_0x139779(0x1ff)](),this[_0x139779(0x20a)]();}[a124_0x2aac6a(0x20a)](){const _0xf6c3dc=a124_0x2aac6a,_0xabd571=a124_0x2819eb[_0xf6c3dc(0x1fc)](this['logFilePath']);!a124_0x5d6290['existsSync'](_0xabd571)&&a124_0x5d6290[_0xf6c3dc(0x20d)](_0xabd571,{'recursive':!![]});const _0x230ee8=a124_0x383e89[_0xf6c3dc(0x1f8)]['combine'](a124_0x383e89['format'][_0xf6c3dc(0x20f)](),a124_0x383e89[_0xf6c3dc(0x1f8)][_0xf6c3dc(0x1ee)]({'stack':!![]}),a124_0x383e89[_0xf6c3dc(0x1f8)][_0xf6c3dc(0x206)](_0x2fe3c7=>{const _0x3e8ad0=_0xf6c3dc,_0x125058={'timestamp':_0x2fe3c7['timestamp']||new Date()[_0x3e8ad0(0x207)](),'level':_0x2fe3c7['level']||_0x3e8ad0(0x1d4),'command':_0x2fe3c7[_0x3e8ad0(0x1e7)]||_0x3e8ad0(0x1ec),'rawCommand':_0x2fe3c7[_0x3e8ad0(0x1ed)]||this[_0x3e8ad0(0x1f4)]||undefined,'message':_0x2fe3c7[_0x3e8ad0(0x1f0)]||'','duration':_0x2fe3c7[_0x3e8ad0(0x204)]||undefined,'details':_0x2fe3c7[_0x3e8ad0(0x208)]||undefined};return JSON[_0x3e8ad0(0x1ef)](_0x125058);}));this[_0xf6c3dc(0x1e4)]=a124_0x383e89[_0xf6c3dc(0x1f5)]({'level':_0xf6c3dc(0x1d4),'format':_0x230ee8,'transports':[new a124_0x383e89['transports'][(_0xf6c3dc(0x201))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a124_0x383e89[_0xf6c3dc(0x1db)]({'success':_0xf6c3dc(0x203),'error':_0xf6c3dc(0x1fa),'warn':_0xf6c3dc(0x1f1),'info':'blue'});}['info'](_0x559ef7,_0xf5c134,_0xa172e1){const _0x4a6667=a124_0x2aac6a;if(!this[_0x4a6667(0x1f9)]||!this[_0x4a6667(0x1e4)])return;this[_0x4a6667(0x1e4)][_0x4a6667(0x1d4)](_0xf5c134,{'command':_0x559ef7,'details':_0xa172e1});}['success'](_0x2da72d,_0x4d755d,_0x5f0ff5,_0x57ff0a){const _0x443442=a124_0x2aac6a;if(!this[_0x443442(0x1f9)]||!this[_0x443442(0x1e4)])return;this[_0x443442(0x1e4)][_0x443442(0x1eb)](_0x443442(0x1d4),_0x4d755d,{'level':'success','command':_0x2da72d,'duration':_0x5f0ff5,'details':_0x57ff0a});}[a124_0x2aac6a(0x20c)](_0x11ca84,_0x193bfa,_0x4d3038){const _0x243473=a124_0x2aac6a;if(!this[_0x243473(0x1f9)]||!this[_0x243473(0x1e4)])return;this[_0x243473(0x1e4)][_0x243473(0x20c)](_0x193bfa,{'command':_0x11ca84,'details':_0x4d3038});}[a124_0x2aac6a(0x200)](_0x3eecf,_0x4f3671,_0x11e0a5){const _0x359e5c=a124_0x2aac6a;if(!this[_0x359e5c(0x1f9)]||!this[_0x359e5c(0x1e4)])return;this[_0x359e5c(0x1e4)][_0x359e5c(0x200)](_0x4f3671,{'command':_0x3eecf,'details':_0x11e0a5});}async[a124_0x2aac6a(0x210)](_0x370cf7,_0x50efe8,_0x1ce486){const _0x54601f=a124_0x2aac6a,_0x906ccb=Date['now']();this[_0x54601f(0x1d4)](_0x370cf7,'Starting:\x20'+_0x50efe8);try{const _0x4a5747=await _0x1ce486(),_0x501969=Date[_0x54601f(0x20e)]()-_0x906ccb;return this[_0x54601f(0x1f6)](_0x370cf7,_0x54601f(0x1e8)+_0x50efe8,_0x501969),_0x4a5747;}catch(_0x3312a0){const _0x4fcca1=Date['now']()-_0x906ccb;this[_0x54601f(0x20c)](_0x370cf7,'Failed:\x20'+_0x50efe8,{'error':_0x3312a0 instanceof Error?_0x3312a0[_0x54601f(0x1f0)]:String(_0x3312a0),'duration':_0x4fcca1});throw _0x3312a0;}}[a124_0x2aac6a(0x1e6)](){const _0xf11a2a=a124_0x2aac6a;try{if(!a124_0x5d6290[_0xf11a2a(0x1e9)](this['logFilePath']))return[];const _0x251ddb=a124_0x5d6290[_0xf11a2a(0x1dc)](this[_0xf11a2a(0x1f9)],_0xf11a2a(0x1e1));return _0x251ddb[_0xf11a2a(0x205)](/\r?\n/)[_0xf11a2a(0x1ea)](_0x49bd4c=>_0x49bd4c[_0xf11a2a(0x1dd)]())[_0xf11a2a(0x1e0)](_0x48bb68=>JSON[_0xf11a2a(0x1f7)](_0x48bb68));}catch(_0x3dcfa2){return console[_0xf11a2a(0x200)](_0xf11a2a(0x1d7),_0x3dcfa2),[];}}[a124_0x2aac6a(0x1f3)](){const _0x348d00=a124_0x2aac6a;try{a124_0x5d6290[_0x348d00(0x1e9)](this['logFilePath'])&&a124_0x5d6290['writeFileSync'](this['logFilePath'],'',_0x348d00(0x1e1));}catch(_0x33f200){console[_0x348d00(0x200)](_0x348d00(0x1e3),_0x33f200);}}[a124_0x2aac6a(0x202)](){const _0x3d26e5=a124_0x2aac6a;return this[_0x3d26e5(0x1e4)];}}function a124_0x4b2c(_0x1c5ef0,_0x31e86f){_0x1c5ef0=_0x1c5ef0-0x1d4;const _0x35dde7=a124_0x35dd();let _0x4b2c62=_0x35dde7[_0x1c5ef0];return _0x4b2c62;}export const logger=new Logger();
1
+ const a125_0x196a2d=a125_0x3409;function a125_0x4342(){const _0x19b02d=['logFileName','error','yellow','duration','Failed:\x20','green','initWinstonLogger','blue','1366536JkhALO','timestamp','toISOString','setLogPath','existsSync','warn','Completed:\x20','red','827508tDhblk','792345qvTYfB','readLogs','Starting:\x20','Failed\x20to\x20read\x20logs:','now','269730aTzpgb','join','5QfLWZz','format','errors','currentRawCommand','addColors','log','3NDkajF','430BoXaHo','message','printf','stringify','readFileSync','1336664WLdYDp','mkdirSync','Failed\x20to\x20clear\x20logs:','writeFileSync','2559711GTPaja','createLogger','info','154552fVnkAD','clear','winstonLogger','command','success','setRawCommand','clearLogs','logFilePath','utf8'];a125_0x4342=function(){return _0x19b02d;};return a125_0x4342();}(function(_0x1c3dc3,_0xcbb35a){const _0x4fce43=a125_0x3409,_0x4a6bab=_0x1c3dc3();while(!![]){try{const _0x4e0908=-parseInt(_0x4fce43(0x140))/0x1+-parseInt(_0x4fce43(0x137))/0x2+parseInt(_0x4fce43(0x119))/0x3*(-parseInt(_0x4fce43(0x126))/0x4)+-parseInt(_0x4fce43(0x147))/0x5*(-parseInt(_0x4fce43(0x13f))/0x6)+parseInt(_0x4fce43(0x123))/0x7+parseInt(_0x4fce43(0x11f))/0x8+-parseInt(_0x4fce43(0x145))/0x9*(-parseInt(_0x4fce43(0x11a))/0xa);if(_0x4e0908===_0xcbb35a)break;else _0x4a6bab['push'](_0x4a6bab['shift']());}catch(_0x3f88c6){_0x4a6bab['push'](_0x4a6bab['shift']());}}}(a125_0x4342,0x6cacd));import a125_0x1fc991 from'winston';import a125_0x58b4d8 from'node:fs';function a125_0x3409(_0x36cbf6,_0x403d7b){_0x36cbf6=_0x36cbf6-0x119;const _0x434253=a125_0x4342();let _0x3409c2=_0x434253[_0x36cbf6];return _0x3409c2;}import a125_0x4c7419 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a125_0x196a2d(0x128)];[a125_0x196a2d(0x12d)]='';[a125_0x196a2d(0x14a)]='';constructor(){}[a125_0x196a2d(0x12b)](_0x203ab6){this['currentRawCommand']=_0x203ab6;}[a125_0x196a2d(0x13a)](_0x17abc1){const _0x1c9f0a=a125_0x196a2d;this[_0x1c9f0a(0x12d)]=a125_0x4c7419[_0x1c9f0a(0x146)](_0x17abc1,PRODUCT_CONFIG[_0x1c9f0a(0x12f)]),this[_0x1c9f0a(0x128)]&&this[_0x1c9f0a(0x128)][_0x1c9f0a(0x127)](),this[_0x1c9f0a(0x135)]();}[a125_0x196a2d(0x135)](){const _0x107ea6=a125_0x196a2d,_0x16ddb7=a125_0x4c7419['dirname'](this[_0x107ea6(0x12d)]);!a125_0x58b4d8[_0x107ea6(0x13b)](_0x16ddb7)&&a125_0x58b4d8[_0x107ea6(0x120)](_0x16ddb7,{'recursive':!![]});const _0x22904b=a125_0x1fc991['format']['combine'](a125_0x1fc991[_0x107ea6(0x148)][_0x107ea6(0x138)](),a125_0x1fc991[_0x107ea6(0x148)][_0x107ea6(0x149)]({'stack':!![]}),a125_0x1fc991[_0x107ea6(0x148)][_0x107ea6(0x11c)](_0x3a3e18=>{const _0x1ab322=_0x107ea6,_0x577c5f={'timestamp':_0x3a3e18['timestamp']||new Date()[_0x1ab322(0x139)](),'level':_0x3a3e18['level']||_0x1ab322(0x125),'command':_0x3a3e18[_0x1ab322(0x129)]||'unknown','rawCommand':_0x3a3e18['rawCommand']||this[_0x1ab322(0x14a)]||undefined,'message':_0x3a3e18[_0x1ab322(0x11b)]||'','duration':_0x3a3e18[_0x1ab322(0x132)]||undefined,'details':_0x3a3e18['details']||undefined};return JSON[_0x1ab322(0x11d)](_0x577c5f);}));this[_0x107ea6(0x128)]=a125_0x1fc991[_0x107ea6(0x124)]({'level':'info','format':_0x22904b,'transports':[new a125_0x1fc991['transports']['File']({'filename':this[_0x107ea6(0x12d)],'level':'info'})],'silent':![]}),a125_0x1fc991[_0x107ea6(0x14b)]({'success':_0x107ea6(0x134),'error':_0x107ea6(0x13e),'warn':_0x107ea6(0x131),'info':_0x107ea6(0x136)});}['info'](_0x3c3cfa,_0xa10d9e,_0x2e7554){const _0x222f56=a125_0x196a2d;if(!this[_0x222f56(0x12d)]||!this[_0x222f56(0x128)])return;this[_0x222f56(0x128)][_0x222f56(0x125)](_0xa10d9e,{'command':_0x3c3cfa,'details':_0x2e7554});}[a125_0x196a2d(0x12a)](_0x1a4bf8,_0x557b95,_0x342a20,_0x4b4208){const _0xe1efc4=a125_0x196a2d;if(!this[_0xe1efc4(0x12d)]||!this[_0xe1efc4(0x128)])return;this[_0xe1efc4(0x128)][_0xe1efc4(0x14c)](_0xe1efc4(0x125),_0x557b95,{'level':_0xe1efc4(0x12a),'command':_0x1a4bf8,'duration':_0x342a20,'details':_0x4b4208});}[a125_0x196a2d(0x130)](_0x2a7233,_0x53d10d,_0x221ecf){const _0x491266=a125_0x196a2d;if(!this[_0x491266(0x12d)]||!this[_0x491266(0x128)])return;this[_0x491266(0x128)][_0x491266(0x130)](_0x53d10d,{'command':_0x2a7233,'details':_0x221ecf});}[a125_0x196a2d(0x13c)](_0x59b9b2,_0x597136,_0x4d8b56){const _0x596907=a125_0x196a2d;if(!this['logFilePath']||!this[_0x596907(0x128)])return;this[_0x596907(0x128)][_0x596907(0x13c)](_0x597136,{'command':_0x59b9b2,'details':_0x4d8b56});}async['logTask'](_0xcd78da,_0x325ecb,_0xd9b328){const _0x5e21f5=a125_0x196a2d,_0xab85b5=Date[_0x5e21f5(0x144)]();this[_0x5e21f5(0x125)](_0xcd78da,_0x5e21f5(0x142)+_0x325ecb);try{const _0x52c64f=await _0xd9b328(),_0x480ceb=Date[_0x5e21f5(0x144)]()-_0xab85b5;return this[_0x5e21f5(0x12a)](_0xcd78da,_0x5e21f5(0x13d)+_0x325ecb,_0x480ceb),_0x52c64f;}catch(_0x406fa5){const _0x1b6a29=Date[_0x5e21f5(0x144)]()-_0xab85b5;this['error'](_0xcd78da,_0x5e21f5(0x133)+_0x325ecb,{'error':_0x406fa5 instanceof Error?_0x406fa5['message']:String(_0x406fa5),'duration':_0x1b6a29});throw _0x406fa5;}}[a125_0x196a2d(0x141)](){const _0x48fd9c=a125_0x196a2d;try{if(!a125_0x58b4d8['existsSync'](this[_0x48fd9c(0x12d)]))return[];const _0xaf8b6a=a125_0x58b4d8[_0x48fd9c(0x11e)](this[_0x48fd9c(0x12d)],_0x48fd9c(0x12e));return _0xaf8b6a['split'](/\r?\n/)['filter'](_0x1c1478=>_0x1c1478['trim']())['map'](_0x4e5a99=>JSON['parse'](_0x4e5a99));}catch(_0x441db4){return console['warn'](_0x48fd9c(0x143),_0x441db4),[];}}[a125_0x196a2d(0x12c)](){const _0xf0c746=a125_0x196a2d;try{a125_0x58b4d8['existsSync'](this[_0xf0c746(0x12d)])&&a125_0x58b4d8[_0xf0c746(0x122)](this[_0xf0c746(0x12d)],'',_0xf0c746(0x12e));}catch(_0x508765){console[_0xf0c746(0x13c)](_0xf0c746(0x121),_0x508765);}}['getWinstonInstance'](){return this['winstonLogger'];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a125_0x5db6a4=a125_0xeb3b;(function(_0x1fd703,_0x507974){const _0x414834=a125_0xeb3b,_0x1c7544=_0x1fd703();while(!![]){try{const _0x349f5f=parseInt(_0x414834(0x121))/0x1*(-parseInt(_0x414834(0x11e))/0x2)+-parseInt(_0x414834(0x126))/0x3+-parseInt(_0x414834(0x11c))/0x4+parseInt(_0x414834(0x11d))/0x5*(parseInt(_0x414834(0x129))/0x6)+-parseInt(_0x414834(0x12d))/0x7+-parseInt(_0x414834(0x122))/0x8*(parseInt(_0x414834(0x12b))/0x9)+-parseInt(_0x414834(0x123))/0xa*(-parseInt(_0x414834(0x12c))/0xb);if(_0x349f5f===_0x507974)break;else _0x1c7544['push'](_0x1c7544['shift']());}catch(_0x360f3d){_0x1c7544['push'](_0x1c7544['shift']());}}}(a125_0x4a8d,0x93b4a));function a125_0xeb3b(_0x4985ed,_0x27d9a8){_0x4985ed=_0x4985ed-0x11c;const _0x4a8da4=a125_0x4a8d();let _0xeb3b20=_0x4a8da4[_0x4985ed];return _0xeb3b20;}function a125_0x4a8d(){const _0x1354fb=['text','876pHhZoy','prototype','33057YgNBSJ','3266791EVpkKo','6900565ifwAwm','json','defineProperty','3146404bDAnyJ','19120DqDXqz','1151618YTCQkK','MIN_SAFE_INTEGER','includes','1hBToDE','1816NWPnNr','130gOAvTO','undefined','getOwnPropertyDescriptor','1896237DtYUHc','length'];a125_0x4a8d=function(){return _0x1354fb;};return a125_0x4a8d();}const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a125_0x5db6a4(0x11f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x6a6778){const _0x561d16=a125_0x5db6a4;if(_0x6a6778[_0x561d16(0x120)]('.')||_0x6a6778[_0x561d16(0x120)]('e')||_0x6a6778[_0x561d16(0x120)]('E'))return![];const _0x59554b=BigInt(_0x6a6778);return _0x59554b>MAX_SAFE_INTEGER||_0x59554b<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x111af6){const _0x5305d1=a125_0x5db6a4;let _0x1b7652='',_0x1501ca=![],_0x493861=![];for(let _0x4416b0=0x0;_0x4416b0<_0x111af6['length'];){const _0x26368f=_0x111af6[_0x4416b0];if(_0x1501ca){_0x1b7652+=_0x26368f,_0x4416b0+=0x1;if(_0x493861)_0x493861=![];else{if(_0x26368f==='\x5c')_0x493861=!![];else _0x26368f==='\x22'&&(_0x1501ca=![]);}continue;}if(_0x26368f==='\x22'){_0x1501ca=!![],_0x1b7652+=_0x26368f,_0x4416b0+=0x1;continue;}if(_0x26368f==='-'||_0x26368f>='0'&&_0x26368f<='9'){const _0x4fa706=JSON_NUMBER_PATTERN['exec'](_0x111af6['slice'](_0x4416b0))?.[0x0];if(_0x4fa706){_0x1b7652+=isUnsafeIntegerLiteral(_0x4fa706)?'\x22'+_0x4fa706+'\x22':_0x4fa706,_0x4416b0+=_0x4fa706[_0x5305d1(0x127)];continue;}}_0x1b7652+=_0x26368f,_0x4416b0+=0x1;}return _0x1b7652;}export function parseLosslessJson(_0x4909e9){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x4909e9));}export function installLosslessJsonResponseParser(){const _0x3fbebc=a125_0x5db6a4;if(typeof Response===_0x3fbebc(0x124))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x3fbebc(0x12a)],originalResponseJsonDescriptor=Object[_0x3fbebc(0x125)](responseJsonPrototype,'json'),Object[_0x3fbebc(0x12f)](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x1f8af9(){const _0x1ebbec=_0x3fbebc;return parseLosslessJson(await this[_0x1ebbec(0x128)]());}}),restoreResponseJsonParser=()=>{const _0x3619df=_0x3fbebc;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x3619df(0x12e),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a126_0x178625=a126_0x2014;(function(_0x30f9f9,_0x5eaca2){const _0x29a8ba=a126_0x2014,_0x45f5c0=_0x30f9f9();while(!![]){try{const _0x334cc6=-parseInt(_0x29a8ba(0x17e))/0x1+-parseInt(_0x29a8ba(0x182))/0x2+-parseInt(_0x29a8ba(0x18a))/0x3*(parseInt(_0x29a8ba(0x185))/0x4)+-parseInt(_0x29a8ba(0x186))/0x5*(parseInt(_0x29a8ba(0x180))/0x6)+-parseInt(_0x29a8ba(0x181))/0x7+-parseInt(_0x29a8ba(0x17a))/0x8+-parseInt(_0x29a8ba(0x18b))/0x9*(-parseInt(_0x29a8ba(0x188))/0xa);if(_0x334cc6===_0x5eaca2)break;else _0x45f5c0['push'](_0x45f5c0['shift']());}catch(_0x400a7d){_0x45f5c0['push'](_0x45f5c0['shift']());}}}(a126_0x411c,0xdc5eb));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a126_0x178625(0x189)]),MIN_SAFE_INTEGER=BigInt(Number[a126_0x178625(0x183)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x4141d){const _0xbfcd39=a126_0x178625;if(_0x4141d[_0xbfcd39(0x187)]('.')||_0x4141d['includes']('e')||_0x4141d['includes']('E'))return![];const _0x2939ed=BigInt(_0x4141d);return _0x2939ed>MAX_SAFE_INTEGER||_0x2939ed<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x2a4e6b){const _0x57cb2a=a126_0x178625;let _0x3901a0='',_0x21747b=![],_0x366d47=![];for(let _0x5bc811=0x0;_0x5bc811<_0x2a4e6b[_0x57cb2a(0x17d)];){const _0x19889e=_0x2a4e6b[_0x5bc811];if(_0x21747b){_0x3901a0+=_0x19889e,_0x5bc811+=0x1;if(_0x366d47)_0x366d47=![];else{if(_0x19889e==='\x5c')_0x366d47=!![];else _0x19889e==='\x22'&&(_0x21747b=![]);}continue;}if(_0x19889e==='\x22'){_0x21747b=!![],_0x3901a0+=_0x19889e,_0x5bc811+=0x1;continue;}if(_0x19889e==='-'||_0x19889e>='0'&&_0x19889e<='9'){const _0x4a61fd=JSON_NUMBER_PATTERN['exec'](_0x2a4e6b['slice'](_0x5bc811))?.[0x0];if(_0x4a61fd){_0x3901a0+=isUnsafeIntegerLiteral(_0x4a61fd)?'\x22'+_0x4a61fd+'\x22':_0x4a61fd,_0x5bc811+=_0x4a61fd['length'];continue;}}_0x3901a0+=_0x19889e,_0x5bc811+=0x1;}return _0x3901a0;}function a126_0x411c(){const _0x5c7c59=['json','undefined','length','1165267YqUZPB','getOwnPropertyDescriptor','2318316RVGFZR','8457715eGYCiu','173674hNAuqJ','MIN_SAFE_INTEGER','defineProperty','5063572pYaCnz','15RJomaw','includes','1910wujyja','MAX_SAFE_INTEGER','3dQOWbd','315738kvJVoO','7301016fLyeOA'];a126_0x411c=function(){return _0x5c7c59;};return a126_0x411c();}export function parseLosslessJson(_0x9210ec){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x9210ec));}function a126_0x2014(_0x1b3f7d,_0x3bccb2){_0x1b3f7d=_0x1b3f7d-0x17a;const _0x411cb3=a126_0x411c();let _0x2014e5=_0x411cb3[_0x1b3f7d];return _0x2014e5;}export function installLosslessJsonResponseParser(){const _0x245a73=a126_0x178625;if(typeof Response===_0x245a73(0x17c))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x245a73(0x17f)](responseJsonPrototype,_0x245a73(0x17b)),Object[_0x245a73(0x184)](responseJsonPrototype,_0x245a73(0x17b),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x33105d(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x257436=_0x245a73;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype[_0x257436(0x17b)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}