@lovrabet/lovrabet-cli 2.1.13 → 2.1.14

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 (120) 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/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/function-name-adapter.js +1 -1
  41. package/lib/commands/service/index.js +1 -1
  42. package/lib/commands/service/registry.js +1 -1
  43. package/lib/commands/skill/commands/create.js +1 -1
  44. package/lib/commands/skill/commands/install.js +1 -1
  45. package/lib/commands/skill/commands/list.js +1 -1
  46. package/lib/commands/skill/commands/push.js +1 -1
  47. package/lib/commands/skill/commands/validate.js +1 -1
  48. package/lib/commands/skill/flags.js +1 -1
  49. package/lib/commands/skill/index.js +1 -1
  50. package/lib/commands/skill/manifest-helpers.js +1 -1
  51. package/lib/commands/skill/push-execute.js +1 -1
  52. package/lib/commands/skill/push-flow-helpers.js +1 -1
  53. package/lib/commands/skill/push-retarget.js +1 -1
  54. package/lib/commands/skill/scopes.js +1 -1
  55. package/lib/commands/skill/summary.js +1 -1
  56. package/lib/commands/skill/templates.js +1 -1
  57. package/lib/commands/skill/validate.js +1 -1
  58. package/lib/commands/sql/detail.js +1 -1
  59. package/lib/commands/sql/exec.js +1 -1
  60. package/lib/commands/sql/index.js +1 -1
  61. package/lib/commands/update.js +1 -1
  62. package/lib/commands/workspace/index.js +1 -1
  63. package/lib/config/schema.js +1 -1
  64. package/lib/constant/app.js +1 -1
  65. package/lib/constant/auth-mode.js +1 -1
  66. package/lib/constant/cli.js +1 -1
  67. package/lib/constant/defaults.js +1 -1
  68. package/lib/constant/distribution.js +1 -1
  69. package/lib/constant/domain.js +1 -1
  70. package/lib/constant/env.js +1 -1
  71. package/lib/constant/output.js +1 -1
  72. package/lib/constant/product.js +1 -1
  73. package/lib/constant/risk.js +1 -1
  74. package/lib/constant/url.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/db-resolver.js +1 -1
  78. package/lib/core/sdk-client.js +1 -1
  79. package/lib/errors.js +1 -1
  80. package/lib/framework/build-all-flags.js +1 -1
  81. package/lib/framework/dryrun.js +1 -1
  82. package/lib/framework/flags.js +1 -1
  83. package/lib/framework/help.js +1 -1
  84. package/lib/framework/index.js +1 -1
  85. package/lib/framework/output.js +1 -1
  86. package/lib/framework/preparse.js +1 -1
  87. package/lib/framework/rate-limit.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/lossless-json.js +1 -1
  115. package/lib/utils/params.js +1 -1
  116. package/lib/utils/platform.js +1 -1
  117. package/lib/utils/update-notice.js +1 -1
  118. package/lib/utils/version.js +1 -1
  119. package/lib/utils/write-cli-side-channel.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- const a105_0xe0dc74=a105_0x325b;(function(_0x4c6af9,_0x2652b4){const _0x50b74b=a105_0x325b,_0x1c8347=_0x4c6af9();while(!![]){try{const _0x43a120=-parseInt(_0x50b74b(0x1cd))/0x1*(parseInt(_0x50b74b(0x1c4))/0x2)+-parseInt(_0x50b74b(0x1cb))/0x3*(parseInt(_0x50b74b(0x1c5))/0x4)+-parseInt(_0x50b74b(0x1d0))/0x5+parseInt(_0x50b74b(0x1d1))/0x6*(-parseInt(_0x50b74b(0x1d8))/0x7)+-parseInt(_0x50b74b(0x1dc))/0x8+parseInt(_0x50b74b(0x1c1))/0x9*(-parseInt(_0x50b74b(0x1d4))/0xa)+parseInt(_0x50b74b(0x1da))/0xb*(parseInt(_0x50b74b(0x1d9))/0xc);if(_0x43a120===_0x2652b4)break;else _0x1c8347['push'](_0x1c8347['shift']());}catch(_0x58c281){_0x1c8347['push'](_0x1c8347['shift']());}}}(a105_0x1a0f,0x87475));function a105_0x1a0f(){const _0x3a3eb9=['claudeSkillsDir','validation','CLAUDE_SKILL_ROOT','Unsafe\x20','6LEkKoY','workbuddySkillsDir','49727FGuVYS','.claude','.workbuddy','3310940NcyKfd','150OYGEAJ','skillCode','path\x20segment','11053860SaIXFW','filter','skills','includes','110159kJZzzo','12BAmIcZ','44361361wmPrpQ','trim','5149864KEUdYJ','homeDirName','9QbATQs','agentsSkillsDir','.agents','12kILUPR','751312zvbJPX','cache'];a105_0x1a0f=function(){return _0x3a3eb9;};return a105_0x1a0f();}import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x58cccb={}){const _0x37eb8a=a105_0x325b,_0x15fbbf=_0x58cccb['homeDir']??homedir(),_0xd41ab6=resolve(_0x15fbbf,PRODUCT_CONFIG[_0x37eb8a(0x1dd)],_0x37eb8a(0x1c6)),_0x439cbf=trimmedEnv('SKILL_ROOT'),_0xda0346=trimmedEnv(_0x37eb8a(0x1c9)),_0x5b6348=resolve(_0x15fbbf,_0x37eb8a(0x1cf)),_0x11f64e=_0x58cccb[_0x37eb8a(0x1cc)]??(existsSync(_0x5b6348)?resolve(_0x5b6348,_0x37eb8a(0x1d6)):undefined);return{'homeDir':_0x15fbbf,'cacheRoot':_0xd41ab6,'managedRoot':resolve(_0x15fbbf,PRODUCT_CONFIG[_0x37eb8a(0x1dd)]),'agentsSkillsDir':_0x58cccb['agentsSkillsDir']??_0x439cbf??resolve(_0x15fbbf,_0x37eb8a(0x1c3),'skills'),'claudeSkillsDir':_0x58cccb[_0x37eb8a(0x1c7)]??_0xda0346??resolve(_0x15fbbf,_0x37eb8a(0x1ce),_0x37eb8a(0x1d6)),'workbuddySkillsDir':_0x11f64e};}export function runtimeAgentSkillRoots(_0x126acc){const _0x2c7d05=a105_0x325b;return[_0x126acc[_0x2c7d05(0x1c2)],_0x126acc[_0x2c7d05(0x1c7)],_0x126acc['workbuddySkillsDir']][_0x2c7d05(0x1d5)](_0xb7d92b=>Boolean(_0xb7d92b));}export function getRuntimeSkillCacheRoot(_0x31d5b1,_0xf4f589,_0x5a4527={}){const _0x5c7b37=a105_0x325b,_0x5b9db9=resolveSkillSyncPaths(_0x5a4527);return resolve(_0x5b9db9['cacheRoot'],_0x31d5b1,fingerprintAccessKey(_0xf4f589),_0x5c7b37(0x1d6));}export function getRuntimeSkillDir(_0xc5dc7c,_0x2ed650,_0x148141,_0x537b63,_0x39e3c7,_0x10b071={}){const _0x7da2c3=a105_0x325b;return resolve(getRuntimeSkillCacheRoot(_0xc5dc7c,_0x2ed650,_0x10b071),safePathSegment(_0x148141,'appCode'),_0x537b63,safePathSegment(_0x39e3c7,_0x7da2c3(0x1d2)));}export function safePathSegment(_0x1e21a8,_0x17f543=a105_0xe0dc74(0x1d3)){const _0x505b4b=a105_0xe0dc74;if(!_0x1e21a8||_0x1e21a8[_0x505b4b(0x1d7)]('/')||_0x1e21a8['includes']('\x5c')||_0x1e21a8[_0x505b4b(0x1d7)]('..'))throw CliErrors[_0x505b4b(0x1c8)](_0x505b4b(0x1ca)+_0x17f543+'\x20for\x20local\x20path:\x20'+_0x1e21a8);return _0x1e21a8;}function a105_0x325b(_0x12fcb4,_0xb873b5){_0x12fcb4=_0x12fcb4-0x1c1;const _0x1a0f6b=a105_0x1a0f();let _0x325ba4=_0x1a0f6b[_0x12fcb4];return _0x325ba4;}function trimmedEnv(_0x5a9e89){const _0x10ea76=a105_0xe0dc74,_0x17594b=productEnv(_0x5a9e89)?.[_0x10ea76(0x1db)]();return _0x17594b?_0x17594b:undefined;}
1
+ (function(_0x4e4981,_0x16abe3){const _0x1f4b96=a105_0x41a0,_0x12ddc8=_0x4e4981();while(!![]){try{const _0xe96db8=-parseInt(_0x1f4b96(0xc9))/0x1+parseInt(_0x1f4b96(0xcd))/0x2+-parseInt(_0x1f4b96(0xca))/0x3*(-parseInt(_0x1f4b96(0xc0))/0x4)+-parseInt(_0x1f4b96(0xc4))/0x5*(-parseInt(_0x1f4b96(0xd3))/0x6)+parseInt(_0x1f4b96(0xd9))/0x7*(parseInt(_0x1f4b96(0xcb))/0x8)+parseInt(_0x1f4b96(0xdb))/0x9+-parseInt(_0x1f4b96(0xc5))/0xa;if(_0xe96db8===_0x16abe3)break;else _0x12ddc8['push'](_0x12ddc8['shift']());}catch(_0xae0a59){_0x12ddc8['push'](_0x12ddc8['shift']());}}}(a105_0x38b4,0xe2776));function a105_0x41a0(_0xa3f9f2,_0x8adf15){_0xa3f9f2=_0xa3f9f2-0xbf;const _0x38b4fd=a105_0x38b4();let _0x41a062=_0x38b4fd[_0xa3f9f2];return _0x41a062;}import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';function a105_0x38b4(){const _0x84bf39=['\x20for\x20local\x20path:\x20','.workbuddy','1506251IiOEIQ','807NpCXNp','21224gOaajk','skillCode','1249982CwQnLn','SKILL_ROOT','Unsafe\x20','homeDirName','.claude','homeDir','295728TnTJMH','CLAUDE_SKILL_ROOT','.agents','agentsSkillsDir','cache','includes','1589jRkRgR','claudeSkillsDir','12974094NkqMUS','filter','skills','13672jHxITm','appCode','trim','workbuddySkillsDir','5zFAtCw','12036610bftRrE','validation'];a105_0x38b4=function(){return _0x84bf39;};return a105_0x38b4();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x5cdb07={}){const _0x312987=a105_0x41a0,_0x2ebc45=_0x5cdb07[_0x312987(0xd2)]??homedir(),_0x45850b=resolve(_0x2ebc45,PRODUCT_CONFIG[_0x312987(0xd0)],_0x312987(0xd7)),_0x2198df=trimmedEnv(_0x312987(0xce)),_0x324eab=trimmedEnv(_0x312987(0xd4)),_0x3431ea=resolve(_0x2ebc45,_0x312987(0xc8)),_0x461b02=_0x5cdb07[_0x312987(0xc3)]??(existsSync(_0x3431ea)?resolve(_0x3431ea,_0x312987(0xbf)):undefined);return{'homeDir':_0x2ebc45,'cacheRoot':_0x45850b,'managedRoot':resolve(_0x2ebc45,PRODUCT_CONFIG[_0x312987(0xd0)]),'agentsSkillsDir':_0x5cdb07[_0x312987(0xd6)]??_0x2198df??resolve(_0x2ebc45,_0x312987(0xd5),_0x312987(0xbf)),'claudeSkillsDir':_0x5cdb07[_0x312987(0xda)]??_0x324eab??resolve(_0x2ebc45,_0x312987(0xd1),_0x312987(0xbf)),'workbuddySkillsDir':_0x461b02};}export function runtimeAgentSkillRoots(_0x305c16){const _0x47c231=a105_0x41a0;return[_0x305c16[_0x47c231(0xd6)],_0x305c16['claudeSkillsDir'],_0x305c16['workbuddySkillsDir']][_0x47c231(0xdc)](_0x18ea53=>Boolean(_0x18ea53));}export function getRuntimeSkillCacheRoot(_0x42b219,_0x48f861,_0x1705ef={}){const _0x50834e=resolveSkillSyncPaths(_0x1705ef);return resolve(_0x50834e['cacheRoot'],_0x42b219,fingerprintAccessKey(_0x48f861),'skills');}export function getRuntimeSkillDir(_0x1812d9,_0x34c4e4,_0x1a94ce,_0x3fb207,_0x28a989,_0x14528c={}){const _0x27c59c=a105_0x41a0;return resolve(getRuntimeSkillCacheRoot(_0x1812d9,_0x34c4e4,_0x14528c),safePathSegment(_0x1a94ce,_0x27c59c(0xc1)),_0x3fb207,safePathSegment(_0x28a989,_0x27c59c(0xcc)));}export function safePathSegment(_0x22831a,_0x42d5fd='path\x20segment'){const _0x33542a=a105_0x41a0;if(!_0x22831a||_0x22831a[_0x33542a(0xd8)]('/')||_0x22831a[_0x33542a(0xd8)]('\x5c')||_0x22831a['includes']('..'))throw CliErrors[_0x33542a(0xc6)](_0x33542a(0xcf)+_0x42d5fd+_0x33542a(0xc7)+_0x22831a);return _0x22831a;}function trimmedEnv(_0x3c418a){const _0x34429a=a105_0x41a0,_0xdea26=productEnv(_0x3c418a)?.[_0x34429a(0xc2)]();return _0xdea26?_0xdea26:undefined;}
@@ -1 +1 @@
1
- (function(_0x10db44,_0x2e775c){const _0x3785e4=a106_0x35de,_0x222d19=_0x10db44();while(!![]){try{const _0x2a78bc=parseInt(_0x3785e4(0x115))/0x1*(parseInt(_0x3785e4(0x11f))/0x2)+-parseInt(_0x3785e4(0x108))/0x3*(parseInt(_0x3785e4(0x125))/0x4)+-parseInt(_0x3785e4(0x11b))/0x5*(parseInt(_0x3785e4(0x11e))/0x6)+parseInt(_0x3785e4(0x136))/0x7*(parseInt(_0x3785e4(0x10e))/0x8)+-parseInt(_0x3785e4(0x111))/0x9+parseInt(_0x3785e4(0x103))/0xa*(-parseInt(_0x3785e4(0x129))/0xb)+parseInt(_0x3785e4(0x141))/0xc;if(_0x2a78bc===_0x2e775c)break;else _0x222d19['push'](_0x222d19['shift']());}catch(_0x3b9107){_0x222d19['push'](_0x222d19['shift']());}}}(a106_0x2081,0x3ba9c));function a106_0x35de(_0x311dcb,_0x5b8024){_0x311dcb=_0x311dcb-0x103;const _0x208173=a106_0x2081();let _0x35de9c=_0x208173[_0x311dcb];return _0x35de9c;}function a106_0x2081(){const _0x597f61=['Unable\x20to\x20resolve\x20skillCode\x20from\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','slice','appCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20metadata\x20appCode\x20\x22','dir','unknown','14665896CshPsf','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','tags','length','60DvpBOP','Invalid\x20','utf8','scope','company','282165oFGkTq','Skill\x20directory\x20not\x20found:\x20','isDirectory','skillName','boolean','ignoreMetadataScope','176WAYqxi','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20has\x20scope=\x22','443997RnhCqV','pushedAt','isArray','allowAppCodeRetarget','81SxjVnk','description','filter','toLowerCase','sourceSessionId',',\x20or\x20directory\x20name.','215XOdfac','isFile','personal','67668sSuxEk','678MJpSRM','find','builtin','content','validation','path','16jddhzk','Remote\x20Skill\x20','object','manifest','201421GQWaGl','Missing\x20','skillCode','ignoreMetadataForPayload','match','metadata','replace','\x20name\x20for\x20SkillHub\x20slug\x20generation.','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','targetScope','version','\x20has\x20unsupported\x20scope\x20\x22','startsWith','4816idMpEF','(unknown)','trim'];a106_0x2081=function(){return _0x597f61;};return a106_0x2081();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x21443d}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(_0x1460db,_0x2ac8fe,_0x148375={}){const _0x59b231=a106_0x35de,_0x236427=resolvePushDirectoryRoot(_0x1460db),_0x5d03a6=readPushMetadataIfPresent(resolve(_0x236427,METADATA_FILE),{'ignoreInvalidMetadata':_0x148375['ignoreInvalidMetadata']});if(_0x5d03a6?.[_0x59b231(0x13c)]&&_0x5d03a6[_0x59b231(0x13c)]!==_0x2ac8fe&&!_0x148375[_0x59b231(0x114)]&&!_0x148375['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x59b231(0x123)](_0x59b231(0x13e)+_0x5d03a6[_0x59b231(0x13c)]+_0x59b231(0x142)+_0x2ac8fe+'\x22.');const _0x2e50bc=resolvePushSkillCode(_0x236427,_0x2ac8fe,_0x5d03a6,_0x148375);if(!_0x2e50bc)throw CliErrors['validation'](_0x59b231(0x139)+SKILL_FILE+',\x20'+METADATA_FILE+_0x59b231(0x11a));return{'dir':_0x236427,'skillCode':_0x2e50bc,'metadata':_0x5d03a6};}export function readPushDirectory(_0x500b3f,_0x38f8c7,_0x414498={}){const _0x36998a=a106_0x35de,_0xdda61e=resolvePushDirectoryIdentity(_0x500b3f,_0x38f8c7,_0x414498),_0x522c86=_0xdda61e[_0x36998a(0x13f)],_0x47dc4b=resolve(_0x522c86,SKILL_FILE);if(!existsSync(_0x47dc4b)||!lstatSync(_0x47dc4b)['isFile']())throw CliErrors['validation'](_0x36998a(0x12a)+SKILL_FILE+':\x20'+_0x47dc4b);const _0x2e1c7f=_0xdda61e[_0x36998a(0x12e)],_0x3dfae0=_0x414498[_0x36998a(0x132)]??_0x36998a(0x11d);if(!_0x414498['ignoreMetadataScope']&&_0x2e1c7f?.[_0x36998a(0x106)]===_0x36998a(0x121))throw CliErrors['validation'](_0x36998a(0x10f)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2e1c7f[_0x36998a(0x106)]+'\x22.');if(!_0x414498[_0x36998a(0x10d)]&&_0x3dfae0==='personal'&&_0x2e1c7f?.[_0x36998a(0x106)]&&_0x2e1c7f[_0x36998a(0x106)]!==_0x36998a(0x11d))throw CliErrors['validation'](_0x36998a(0x13d)+METADATA_FILE+_0x36998a(0x110)+_0x2e1c7f[_0x36998a(0x106)]+'\x22.',_0x36998a(0x13a)+_0x522c86+_0x36998a(0x131));const _0x4dd3f5=scanSkillDirectory(_0x522c86),_0x28dea4=buildSkillPackage(_0x4dd3f5),_0x593be0=readFileSync(_0x47dc4b,_0x36998a(0x105)),_0x284fc9=_0xdda61e[_0x36998a(0x12b)],_0x251938=_0x414498[_0x36998a(0x12c)]?undefined:_0x2e1c7f,_0x95edca=readSkillDisplayName(_0x593be0);return{'skillCode':_0x284fc9,'metadata':_0x2e1c7f,'frontmatterDisplayName':_0x95edca,'input':{'skillCode':_0x284fc9,'skillName':_0x95edca??_0x251938?.[_0x36998a(0x10b)],'description':_0x251938?.[_0x36998a(0x116)],'content':_0x593be0,'files':_0x28dea4[_0x36998a(0x128)],'packageBase64':_0x28dea4['packageBase64'],'tags':_0x251938?.[_0x36998a(0x144)],'version':_0x251938?.[_0x36998a(0x133)],'sourceSessionId':_0x251938?.[_0x36998a(0x119)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x387874,_0x54942b,_0x26bf6f,_0x31c0e1={}){const _0x27a33=a106_0x35de,_0x326c2e=resolvePushDirectoryRoot(_0x387874),_0x1b426a=readPushMetadataIfPresent(resolve(_0x326c2e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4a04d4=requireRemoteScope(_0x54942b),_0x1b791d=readLocalSkillContent(_0x326c2e),_0x576582={..._0x54942b,'appCode':_0x54942b[_0x27a33(0x13c)]??_0x26bf6f,'skillName':_0x54942b[_0x27a33(0x10b)]??_0x1b426a?.[_0x27a33(0x10b)],'description':_0x54942b[_0x27a33(0x116)]??_0x1b426a?.[_0x27a33(0x116)],'tags':Array[_0x27a33(0x113)](_0x54942b['tags'])?_0x54942b[_0x27a33(0x144)]:_0x1b426a?.[_0x27a33(0x144)],'sourceSessionId':_0x54942b['sourceSessionId']??_0x1b426a?.[_0x27a33(0x119)],'content':_0x54942b[_0x27a33(0x122)]??_0x1b791d},_0x1bd0f8=buildMetadata(_0x576582,_0x4a04d4,_0x26bf6f,contentHash(_0x1b791d),_0x31c0e1['refreshedAt']);writeJsonAtomic(resolve(_0x326c2e,METADATA_FILE),_0x1bd0f8);}export function recordPushedRuntimeSkill(_0x3bba85,_0x474dde,_0x5b9b0e,_0x31295e={}){const _0x185029=a106_0x35de,_0x59db8e=resolvePushDirectoryRoot(_0x3bba85),_0x51a7f7=scanSkillDirectory(_0x59db8e),_0x5121ad=_0x51a7f7[_0x185029(0x120)](_0x32dd27=>_0x32dd27[_0x185029(0x124)]===SKILL_FILE),_0x4fb5f2=_0x5121ad?fileText(_0x5121ad):'',_0x144f70=tryNormalizePackageManifest(_0x474dde[_0x185029(0x143)]),_0x4a3d26={..._0x474dde,'content':_0x474dde['content']??_0x4fb5f2,'files':_0x144f70},_0x4427f1=_0x144f70?normalizeLocalFiles(_0x51a7f7)[_0x185029(0x117)](_0x5a0357=>_0x144f70[_0x185029(0x143)]['some'](_0x5d61bc=>_0x5d61bc[_0x185029(0x124)]===_0x5a0357[_0x185029(0x124)])):undefined,_0x289c4b=buildMetadata(_0x4a3d26,_0x31295e[_0x185029(0x106)]??_0x185029(0x11d),_0x5b9b0e,contentHash(_0x4a3d26['content']??''),_0x31295e[_0x185029(0x112)],_0x4427f1);writeJsonAtomic(resolve(_0x59db8e,METADATA_FILE),_0x289c4b);}export function deriveSkillCodeFromDirectory(_0x4d7712,_0x477a9f){const _0x2f4757=a106_0x35de,_0x954a1e=basename(resolve(_0x4d7712)),_0x3ab379=_0x477a9f+'--';return _0x954a1e[_0x2f4757(0x135)](_0x3ab379)?_0x954a1e[_0x2f4757(0x13b)](_0x3ab379[_0x2f4757(0x145)]):_0x954a1e;}function resolvePushSkillCode(_0x4e26e3,_0x4795ab,_0xf4ec87,_0x394bfd){const _0x40876b=a106_0x35de,_0x39d554=deriveSkillCodeFromSkillFile(_0x4e26e3)||deriveSkillCodeFromDirectory(_0x4e26e3,_0x4795ab);if(_0x394bfd['ignoreMetadataSkillCode'])return _0x39d554;return _0xf4ec87?.[_0x40876b(0x12b)]?.[_0x40876b(0x138)]()||_0x39d554;}function deriveSkillCodeFromSkillFile(_0x5f05cc){const _0x263b0f=a106_0x35de,_0x999373=resolve(_0x5f05cc,SKILL_FILE);if(!existsSync(_0x999373)||!lstatSync(_0x999373)['isFile']())return undefined;const _0x1d4511=readFileSync(_0x999373,_0x263b0f(0x105)),_0x4448ce=_0x1d4511[_0x263b0f(0x12d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4448ce)return undefined;const _0x359be5=parseFrontmatterObject(_0x4448ce[0x1]??''),_0x50a613=scalarToString(_0x359be5?.['name']);return _0x50a613?slugifySkillName(_0x50a613):undefined;}function readSkillDisplayName(_0x5980cc){const _0x103de8=a106_0x35de,_0x24329e=_0x5980cc[_0x103de8(0x12d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x24329e)return undefined;const _0x522c91=parseFrontmatterObject(_0x24329e[0x1]??'');return scalarToString(_0x522c91?.['displayName']);}function slugifySkillName(_0x16a6f5){const _0x284e51=a106_0x35de,_0x273572=_0x16a6f5[_0x284e51(0x138)]()[_0x284e51(0x118)]()[_0x284e51(0x12f)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x284e51(0x12f)](/^-+/,'')[_0x284e51(0x12f)](/-+$/,'')[_0x284e51(0x12f)](/-{2,}/g,'-');if(!_0x273572)throw CliErrors[_0x284e51(0x123)](_0x284e51(0x104)+SKILL_FILE+_0x284e51(0x130));return _0x273572;}function parseFrontmatterObject(_0x51fe1f){const _0x26eec2=a106_0x35de;try{const _0x4107b5=a106_0x21443d(_0x51fe1f);return _0x4107b5&&typeof _0x4107b5===_0x26eec2(0x127)&&!Array[_0x26eec2(0x113)](_0x4107b5)?_0x4107b5:undefined;}catch{return undefined;}}function scalarToString(_0x5615ac){const _0x113a4d=a106_0x35de;if(typeof _0x5615ac==='string')return _0x5615ac[_0x113a4d(0x138)]();if(typeof _0x5615ac==='number'||typeof _0x5615ac===_0x113a4d(0x10c))return String(_0x5615ac);return undefined;}function resolvePushDirectoryRoot(_0x547274){const _0x3e415d=a106_0x35de,_0x1696f4=resolve(_0x547274);if(!existsSync(_0x1696f4))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x547274);const _0x2ab747=lstatSync(_0x1696f4);if(_0x2ab747['isDirectory']())return _0x1696f4;if(_0x2ab747['isSymbolicLink']()){const _0x17b79f=realpathSync(_0x1696f4);if(lstatSync(_0x17b79f)[_0x3e415d(0x10a)]())return _0x17b79f;}throw CliErrors[_0x3e415d(0x123)](_0x3e415d(0x109)+_0x547274);}function requireRemoteScope(_0x5bf53f){const _0x31b607=a106_0x35de;if(_0x5bf53f['scope']===_0x31b607(0x11d)||_0x5bf53f[_0x31b607(0x106)]===_0x31b607(0x107)||_0x5bf53f[_0x31b607(0x106)]===_0x31b607(0x121))return _0x5bf53f[_0x31b607(0x106)];throw CliErrors['validation'](_0x31b607(0x126)+(_0x5bf53f['skillCode']||_0x31b607(0x137))+_0x31b607(0x134)+(_0x5bf53f[_0x31b607(0x106)]??_0x31b607(0x140))+'\x22.');}function readLocalSkillContent(_0x9151ca){const _0x5e6e4f=a106_0x35de,_0x4b642d=resolve(_0x9151ca,SKILL_FILE);return existsSync(_0x4b642d)&&lstatSync(_0x4b642d)[_0x5e6e4f(0x11c)]()?readFileSync(_0x4b642d,_0x5e6e4f(0x105)):'';}function readPushMetadataIfPresent(_0x5a441b,_0x58decd={}){try{return readMetadataIfPresent(_0x5a441b);}catch(_0x2dbd9b){if(_0x58decd['ignoreInvalidMetadata'])return undefined;throw _0x2dbd9b;}}
1
+ (function(_0x2a6728,_0x18ae31){const _0xdcd6f=a106_0x10c2,_0x27c57c=_0x2a6728();while(!![]){try{const _0x127ccd=-parseInt(_0xdcd6f(0x107))/0x1+parseInt(_0xdcd6f(0x108))/0x2+parseInt(_0xdcd6f(0x13b))/0x3*(-parseInt(_0xdcd6f(0x109))/0x4)+-parseInt(_0xdcd6f(0x114))/0x5+parseInt(_0xdcd6f(0x137))/0x6*(parseInt(_0xdcd6f(0x10d))/0x7)+-parseInt(_0xdcd6f(0x10e))/0x8*(parseInt(_0xdcd6f(0x125))/0x9)+parseInt(_0xdcd6f(0x121))/0xa;if(_0x127ccd===_0x18ae31)break;else _0x27c57c['push'](_0x27c57c['shift']());}catch(_0x1581f8){_0x27c57c['push'](_0x27c57c['shift']());}}}(a106_0x112e,0x8c987));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x17c728}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(_0x11b303,_0x9ac694,_0x50543a={}){const _0x16272e=a106_0x10c2,_0x99c92b=resolvePushDirectoryRoot(_0x11b303),_0xe008b7=readPushMetadataIfPresent(resolve(_0x99c92b,METADATA_FILE),{'ignoreInvalidMetadata':_0x50543a[_0x16272e(0x136)]});if(_0xe008b7?.['appCode']&&_0xe008b7[_0x16272e(0x112)]!==_0x9ac694&&!_0x50543a[_0x16272e(0x12e)]&&!_0x50543a[_0x16272e(0x11a)])throw CliErrors[_0x16272e(0x105)](_0x16272e(0x117)+_0xe008b7[_0x16272e(0x112)]+_0x16272e(0x11e)+_0x9ac694+'\x22.');const _0x44986b=resolvePushSkillCode(_0x99c92b,_0x9ac694,_0xe008b7,_0x50543a);if(!_0x44986b)throw CliErrors[_0x16272e(0x105)](_0x16272e(0x10f)+SKILL_FILE+',\x20'+METADATA_FILE+_0x16272e(0x143));return{'dir':_0x99c92b,'skillCode':_0x44986b,'metadata':_0xe008b7};}export function readPushDirectory(_0x8c8afc,_0x132370,_0x4da106={}){const _0x19a349=a106_0x10c2,_0x4e3441=resolvePushDirectoryIdentity(_0x8c8afc,_0x132370,_0x4da106),_0x288550=_0x4e3441[_0x19a349(0x102)],_0x29695c=resolve(_0x288550,SKILL_FILE);if(!existsSync(_0x29695c)||!lstatSync(_0x29695c)['isFile']())throw CliErrors[_0x19a349(0x105)](_0x19a349(0x11d)+SKILL_FILE+':\x20'+_0x29695c);const _0x320858=_0x4e3441[_0x19a349(0x133)],_0x5e8dd2=_0x4da106['targetScope']??_0x19a349(0x120);if(!_0x4da106[_0x19a349(0x104)]&&_0x320858?.[_0x19a349(0x12f)]===_0x19a349(0x10c))throw CliErrors[_0x19a349(0x105)](_0x19a349(0x12c)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x320858['scope']+'\x22.');if(!_0x4da106[_0x19a349(0x104)]&&_0x5e8dd2===_0x19a349(0x120)&&_0x320858?.[_0x19a349(0x12f)]&&_0x320858[_0x19a349(0x12f)]!=='personal')throw CliErrors[_0x19a349(0x105)](_0x19a349(0x128)+METADATA_FILE+_0x19a349(0x142)+_0x320858[_0x19a349(0x12f)]+'\x22.',_0x19a349(0x118)+_0x288550+_0x19a349(0x12d));const _0x3105fc=scanSkillDirectory(_0x288550),_0x4e1f07=buildSkillPackage(_0x3105fc),_0x1df9cd=readFileSync(_0x29695c,_0x19a349(0x10a)),_0x289fd0=_0x4e3441[_0x19a349(0x11b)],_0x3f077e=_0x4da106['ignoreMetadataForPayload']?undefined:_0x320858,_0x5232f0=readSkillDisplayName(_0x1df9cd);return{'skillCode':_0x289fd0,'metadata':_0x320858,'frontmatterDisplayName':_0x5232f0,'input':{'skillCode':_0x289fd0,'skillName':_0x5232f0??_0x3f077e?.[_0x19a349(0x13a)],'description':_0x3f077e?.[_0x19a349(0x13f)],'content':_0x1df9cd,'files':_0x4e1f07[_0x19a349(0x123)],'packageBase64':_0x4e1f07[_0x19a349(0x110)],'tags':_0x3f077e?.[_0x19a349(0x119)],'version':_0x3f077e?.[_0x19a349(0x131)],'sourceSessionId':_0x3f077e?.[_0x19a349(0x116)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x142892,_0x3788b5,_0x205673,_0x660248={}){const _0x26d928=a106_0x10c2,_0x3746fb=resolvePushDirectoryRoot(_0x142892),_0x4b9438=readPushMetadataIfPresent(resolve(_0x3746fb,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2a6548=requireRemoteScope(_0x3788b5),_0xf65c9e=readLocalSkillContent(_0x3746fb),_0x1dca26={..._0x3788b5,'appCode':_0x3788b5[_0x26d928(0x112)]??_0x205673,'skillName':_0x3788b5['skillName']??_0x4b9438?.[_0x26d928(0x13a)],'description':_0x3788b5[_0x26d928(0x13f)]??_0x4b9438?.['description'],'tags':Array['isArray'](_0x3788b5[_0x26d928(0x119)])?_0x3788b5[_0x26d928(0x119)]:_0x4b9438?.[_0x26d928(0x119)],'sourceSessionId':_0x3788b5[_0x26d928(0x116)]??_0x4b9438?.[_0x26d928(0x116)],'content':_0x3788b5[_0x26d928(0x11c)]??_0xf65c9e},_0x1a9b61=buildMetadata(_0x1dca26,_0x2a6548,_0x205673,contentHash(_0xf65c9e),_0x660248['refreshedAt']);writeJsonAtomic(resolve(_0x3746fb,METADATA_FILE),_0x1a9b61);}export function recordPushedRuntimeSkill(_0x326883,_0x3a1148,_0x4053f8,_0x376bd7={}){const _0x690112=a106_0x10c2,_0x1326db=resolvePushDirectoryRoot(_0x326883),_0x38cbfa=scanSkillDirectory(_0x1326db),_0x66c18=_0x38cbfa[_0x690112(0x13d)](_0x1fa339=>_0x1fa339['path']===SKILL_FILE),_0x10f47c=_0x66c18?fileText(_0x66c18):'',_0x612fcc=tryNormalizePackageManifest(_0x3a1148[_0x690112(0x11f)]),_0x5beddf={..._0x3a1148,'content':_0x3a1148[_0x690112(0x11c)]??_0x10f47c,'files':_0x612fcc},_0x5660da=_0x612fcc?normalizeLocalFiles(_0x38cbfa)['filter'](_0x12949e=>_0x612fcc['files'][_0x690112(0x12a)](_0x3dcc93=>_0x3dcc93[_0x690112(0x127)]===_0x12949e[_0x690112(0x127)])):undefined,_0x5c10a0=buildMetadata(_0x5beddf,_0x376bd7[_0x690112(0x12f)]??_0x690112(0x120),_0x4053f8,contentHash(_0x5beddf['content']??''),_0x376bd7[_0x690112(0x126)],_0x5660da);writeJsonAtomic(resolve(_0x1326db,METADATA_FILE),_0x5c10a0);}function a106_0x112e(){const _0xe15677=['packageBase64','unknown','appCode','ignoreMetadataSkillCode','2723850cEfhtB','\x20name\x20for\x20SkillHub\x20slug\x20generation.','sourceSessionId','Skill\x20metadata\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','tags','ignoreMetadataAppCodeMismatch','skillCode','content','Missing\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','personal','24219030SHsycL','toLowerCase','manifest','Skill\x20directory\x20not\x20found:\x20','15732oNWbpK','pushedAt','path','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','number','some','trim','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','allowAppCodeRetarget','scope','replace','version','object','metadata','(unknown)','isFile','ignoreInvalidMetadata','2090526yBtCcd','length','Remote\x20Skill\x20','skillName','14322MzRFqH','isArray','find','\x20has\x20unsupported\x20scope\x20\x22','description','match','slice','\x20has\x20scope=\x22',',\x20or\x20directory\x20name.','dir','string','ignoreMetadataScope','validation','isDirectory','260147pixpaq','153914IqIJaV','948gdpOBC','utf8','company','builtin','14pbZiQy','3128KxpWFZ','Unable\x20to\x20resolve\x20skillCode\x20from\x20'];a106_0x112e=function(){return _0xe15677;};return a106_0x112e();}export function deriveSkillCodeFromDirectory(_0x27d8f5,_0x42041b){const _0x30bc5d=a106_0x10c2,_0x17b79a=basename(resolve(_0x27d8f5)),_0x4927f6=_0x42041b+'--';return _0x17b79a['startsWith'](_0x4927f6)?_0x17b79a[_0x30bc5d(0x141)](_0x4927f6[_0x30bc5d(0x138)]):_0x17b79a;}function resolvePushSkillCode(_0x39ac04,_0x11d8c9,_0x2da9a9,_0x41c048){const _0x436eea=a106_0x10c2,_0x1ce800=deriveSkillCodeFromSkillFile(_0x39ac04)||deriveSkillCodeFromDirectory(_0x39ac04,_0x11d8c9);if(_0x41c048[_0x436eea(0x113)])return _0x1ce800;return _0x2da9a9?.[_0x436eea(0x11b)]?.[_0x436eea(0x12b)]()||_0x1ce800;}function deriveSkillCodeFromSkillFile(_0x246f71){const _0x4fad95=a106_0x10c2,_0x401be2=resolve(_0x246f71,SKILL_FILE);if(!existsSync(_0x401be2)||!lstatSync(_0x401be2)[_0x4fad95(0x135)]())return undefined;const _0xcc7699=readFileSync(_0x401be2,_0x4fad95(0x10a)),_0x597764=_0xcc7699['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x597764)return undefined;const _0x359bcf=parseFrontmatterObject(_0x597764[0x1]??''),_0x4bf193=scalarToString(_0x359bcf?.['name']);return _0x4bf193?slugifySkillName(_0x4bf193):undefined;}function readSkillDisplayName(_0x51985b){const _0x4d4148=a106_0x10c2,_0x2a477d=_0x51985b[_0x4d4148(0x140)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a477d)return undefined;const _0xca8cd3=parseFrontmatterObject(_0x2a477d[0x1]??'');return scalarToString(_0xca8cd3?.['displayName']);}function slugifySkillName(_0x3de4fb){const _0x166ee=a106_0x10c2,_0x13ca07=_0x3de4fb[_0x166ee(0x12b)]()[_0x166ee(0x122)]()[_0x166ee(0x130)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x166ee(0x130)](/^-+/,'')['replace'](/-+$/,'')[_0x166ee(0x130)](/-{2,}/g,'-');if(!_0x13ca07)throw CliErrors[_0x166ee(0x105)]('Invalid\x20'+SKILL_FILE+_0x166ee(0x115));return _0x13ca07;}function parseFrontmatterObject(_0x38bafe){const _0x23783e=a106_0x10c2;try{const _0x201b22=a106_0x17c728(_0x38bafe);return _0x201b22&&typeof _0x201b22===_0x23783e(0x132)&&!Array[_0x23783e(0x13c)](_0x201b22)?_0x201b22:undefined;}catch{return undefined;}}function scalarToString(_0x41be03){const _0x4318fb=a106_0x10c2;if(typeof _0x41be03===_0x4318fb(0x103))return _0x41be03[_0x4318fb(0x12b)]();if(typeof _0x41be03===_0x4318fb(0x129)||typeof _0x41be03==='boolean')return String(_0x41be03);return undefined;}function a106_0x10c2(_0x2180dd,_0x41709a){_0x2180dd=_0x2180dd-0x102;const _0x112e79=a106_0x112e();let _0x10c2b1=_0x112e79[_0x2180dd];return _0x10c2b1;}function resolvePushDirectoryRoot(_0x37e606){const _0x28d7e6=a106_0x10c2,_0x3ed236=resolve(_0x37e606);if(!existsSync(_0x3ed236))throw CliErrors[_0x28d7e6(0x105)](_0x28d7e6(0x124)+_0x37e606);const _0x3e737d=lstatSync(_0x3ed236);if(_0x3e737d['isDirectory']())return _0x3ed236;if(_0x3e737d['isSymbolicLink']()){const _0x3114c1=realpathSync(_0x3ed236);if(lstatSync(_0x3114c1)[_0x28d7e6(0x106)]())return _0x3114c1;}throw CliErrors[_0x28d7e6(0x105)](_0x28d7e6(0x124)+_0x37e606);}function requireRemoteScope(_0x4b6bf1){const _0x40e7d9=a106_0x10c2;if(_0x4b6bf1[_0x40e7d9(0x12f)]===_0x40e7d9(0x120)||_0x4b6bf1[_0x40e7d9(0x12f)]===_0x40e7d9(0x10b)||_0x4b6bf1[_0x40e7d9(0x12f)]===_0x40e7d9(0x10c))return _0x4b6bf1['scope'];throw CliErrors['validation'](_0x40e7d9(0x139)+(_0x4b6bf1['skillCode']||_0x40e7d9(0x134))+_0x40e7d9(0x13e)+(_0x4b6bf1[_0x40e7d9(0x12f)]??_0x40e7d9(0x111))+'\x22.');}function readLocalSkillContent(_0xbc6ae8){const _0x596d40=a106_0x10c2,_0x5c78be=resolve(_0xbc6ae8,SKILL_FILE);return existsSync(_0x5c78be)&&lstatSync(_0x5c78be)[_0x596d40(0x135)]()?readFileSync(_0x5c78be,_0x596d40(0x10a)):'';}function readPushMetadataIfPresent(_0x8174db,_0x43aa5b={}){const _0x551e62=a106_0x10c2;try{return readMetadataIfPresent(_0x8174db);}catch(_0x3815e8){if(_0x43aa5b[_0x551e62(0x136)])return undefined;throw _0x3815e8;}}
@@ -1 +1 @@
1
- (function(_0x37b4b9,_0xb969b){const _0x27e38e=a107_0x2778,_0x992e85=_0x37b4b9();while(!![]){try{const _0x1996ec=-parseInt(_0x27e38e(0xf9))/0x1*(-parseInt(_0x27e38e(0xf6))/0x2)+-parseInt(_0x27e38e(0x100))/0x3*(parseInt(_0x27e38e(0xf4))/0x4)+-parseInt(_0x27e38e(0xfe))/0x5+-parseInt(_0x27e38e(0xf7))/0x6*(parseInt(_0x27e38e(0xfb))/0x7)+-parseInt(_0x27e38e(0xfc))/0x8*(parseInt(_0x27e38e(0xfd))/0x9)+parseInt(_0x27e38e(0xff))/0xa+-parseInt(_0x27e38e(0xef))/0xb*(-parseInt(_0x27e38e(0xf5))/0xc);if(_0x1996ec===_0xb969b)break;else _0x992e85['push'](_0x992e85['shift']());}catch(_0x49ac7c){_0x992e85['push'](_0x992e85['shift']());}}}(a107_0x3a99,0x20582));function a107_0x2778(_0x1b9113,_0x5da1ee){_0x1b9113=_0x1b9113-0xef;const _0x3a99c4=a107_0x3a99();let _0x27786d=_0x3a99c4[_0x1b9113];return _0x27786d;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0xde0315){const _0x4e21ee=a107_0x2778,_0x3f0409=_0xde0315&&_0xde0315[_0x4e21ee(0xfa)]>0x0?_0xde0315:['personal','company','builtin'],_0x1ef082=[];for(const _0xeb2a4b of _0x3f0409){if(!isRuntimeSkillScope(_0xeb2a4b))throw CliErrors[_0x4e21ee(0xf0)](_0x4e21ee(0xf1)+_0xeb2a4b);!_0x1ef082[_0x4e21ee(0xf8)](_0xeb2a4b)&&_0x1ef082[_0x4e21ee(0xf3)](_0xeb2a4b);}return _0x1ef082;}function a107_0x3a99(){const _0x4738ec=['personal','push','60OBuxcD','1692cpNINQ','223076ucXSQa','30762TLliVo','includes','1ogGilf','length','147PxPWSR','8DnMNKW','289647CIQrWp','814080eHbehJ','17100PsvlYe','6543rxeeEE','company','27665NHvlPl','validation','Unsupported\x20runtime\x20Skill\x20scope:\x20'];a107_0x3a99=function(){return _0x4738ec;};return a107_0x3a99();}export function isRuntimeSkillScope(_0x4955b7){const _0x331b5d=a107_0x2778;return _0x4955b7===_0x331b5d(0xf2)||_0x4955b7===_0x331b5d(0x101)||_0x4955b7==='builtin';}
1
+ (function(_0x3c2155,_0x507ce8){const _0x2e82f6=a107_0x1792,_0x557734=_0x3c2155();while(!![]){try{const _0x14d7dd=-parseInt(_0x2e82f6(0x92))/0x1+parseInt(_0x2e82f6(0x86))/0x2*(parseInt(_0x2e82f6(0x91))/0x3)+parseInt(_0x2e82f6(0x95))/0x4+-parseInt(_0x2e82f6(0x90))/0x5*(-parseInt(_0x2e82f6(0x8f))/0x6)+-parseInt(_0x2e82f6(0x8b))/0x7+-parseInt(_0x2e82f6(0x8a))/0x8*(parseInt(_0x2e82f6(0x87))/0x9)+-parseInt(_0x2e82f6(0x89))/0xa;if(_0x14d7dd===_0x507ce8)break;else _0x557734['push'](_0x557734['shift']());}catch(_0x5235e0){_0x557734['push'](_0x557734['shift']());}}}(a107_0x4c4a,0xcc91e));function a107_0x4c4a(){const _0x2121ad=['validation','company','builtin','6CLaLEJ','2328575CHHRYe','624OpwaZo','1418517SgQeQc','length','includes','6497508OpNcLF','13378RyxndX','45gPNzDb','Unsupported\x20runtime\x20Skill\x20scope:\x20','2289350TAPUPI','1183144KkBdgL','1795983QrBehw'];a107_0x4c4a=function(){return _0x2121ad;};return a107_0x4c4a();}function a107_0x1792(_0x101877,_0x26e19b){_0x101877=_0x101877-0x86;const _0x4c4a86=a107_0x4c4a();let _0x1792ea=_0x4c4a86[_0x101877];return _0x1792ea;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x35e5b7){const _0x31a40c=a107_0x1792,_0x20ee01=_0x35e5b7&&_0x35e5b7[_0x31a40c(0x93)]>0x0?_0x35e5b7:['personal',_0x31a40c(0x8d),_0x31a40c(0x8e)],_0x123ce8=[];for(const _0x348630 of _0x20ee01){if(!isRuntimeSkillScope(_0x348630))throw CliErrors[_0x31a40c(0x8c)](_0x31a40c(0x88)+_0x348630);!_0x123ce8[_0x31a40c(0x94)](_0x348630)&&_0x123ce8['push'](_0x348630);}return _0x123ce8;}export function isRuntimeSkillScope(_0x81c2d2){const _0x187378=a107_0x1792;return _0x81c2d2==='personal'||_0x81c2d2===_0x187378(0x8d)||_0x81c2d2===_0x187378(0x8e);}
@@ -1 +1 @@
1
- const a109_0x25ba12=a109_0x2c67;(function(_0xb63b42,_0x14abf3){const _0x29e474=a109_0x2c67,_0x45a1f8=_0xb63b42();while(!![]){try{const _0x593d38=parseInt(_0x29e474(0x18c))/0x1+parseInt(_0x29e474(0x184))/0x2*(-parseInt(_0x29e474(0x194))/0x3)+parseInt(_0x29e474(0x196))/0x4*(parseInt(_0x29e474(0x187))/0x5)+-parseInt(_0x29e474(0x18d))/0x6+-parseInt(_0x29e474(0x195))/0x7*(-parseInt(_0x29e474(0x192))/0x8)+parseInt(_0x29e474(0x186))/0x9+-parseInt(_0x29e474(0x18a))/0xa;if(_0x593d38===_0x14abf3)break;else _0x45a1f8['push'](_0x45a1f8['shift']());}catch(_0x45cc79){_0x45a1f8['push'](_0x45a1f8['shift']());}}}(a109_0x4477,0xb3877));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a109_0x25ba12(0x189));export function createDeterministicZipPackage(_0x18d4e4){const _0x1e8cb1=a109_0x25ba12,_0x20c2b1={};for(const _0x200862 of normalizeLocalFiles(_0x18d4e4)){_0x20c2b1[_0x200862[_0x1e8cb1(0x190)]]=fileContent(_0x200862);}return Buffer['from'](zipSync(_0x20c2b1,{'level':0x0,'mtime':ZIP_MTIME}));}function a109_0x2c67(_0x24c706,_0x438455){_0x24c706=_0x24c706-0x180;const _0x447759=a109_0x4477();let _0x2c6702=_0x447759[_0x24c706];return _0x2c6702;}function a109_0x4477(){const _0x5ee11e=['Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','sort','validation','64rVwbHn','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','13001985iQBbGv','35xQBvIO','map','1980-01-01T00:00:00.000Z','16699080IhIhjd','name','543543ySmcKo','3071214LmMbjp','from','validation_error','path','entries','8BSvYZH','code','77442BrXoTk','9622949CVAIXd','217292ofJDXk'];a109_0x4477=function(){return _0x5ee11e;};return a109_0x4477();}export function parseZipPackage(_0x3c14ac){const _0x4e8fc9=a109_0x25ba12;if(_0x3c14ac['length']<0x16)throw CliErrors[_0x4e8fc9(0x183)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x12e723;try{_0x12e723=unzipSync(_0x3c14ac,{'filter'(_0x251ffc){const _0x37b286=_0x4e8fc9,_0x16bea5=normalizeSkillRelativePath(_0x251ffc[_0x37b286(0x18b)]);if(_0x16bea5[_0x37b286(0x181)]('/'))throw CliErrors[_0x37b286(0x183)](_0x37b286(0x180)+_0x16bea5);return!![];}});}catch(_0x4bcc9f){if(isRuntimeSkillValidationError(_0x4bcc9f))throw _0x4bcc9f;throw CliErrors[_0x4e8fc9(0x183)](_0x4e8fc9(0x185));}return Object[_0x4e8fc9(0x191)](_0x12e723)[_0x4e8fc9(0x188)](([_0x458317,_0x5226f1])=>({'path':normalizeSkillRelativePath(_0x458317),'bytes':Buffer[_0x4e8fc9(0x18e)](_0x5226f1)}))[_0x4e8fc9(0x182)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x7e4de0){const _0x45935f=a109_0x25ba12;return typeof _0x7e4de0==='object'&&_0x7e4de0!==null&&_0x45935f(0x193)in _0x7e4de0&&_0x7e4de0[_0x45935f(0x193)]===_0x45935f(0x18f);}
1
+ const a109_0x14a41c=a109_0x77d6;function a109_0x77d6(_0x50f59d,_0x4ffac1){_0x50f59d=_0x50f59d-0x1a0;const _0x5d53e0=a109_0x5d53();let _0x77d6b0=_0x5d53e0[_0x50f59d];return _0x77d6b0;}(function(_0xa1791,_0x375185){const _0x153103=a109_0x77d6,_0x5f4952=_0xa1791();while(!![]){try{const _0x51afaa=-parseInt(_0x153103(0x1a7))/0x1+-parseInt(_0x153103(0x1ac))/0x2*(parseInt(_0x153103(0x1ae))/0x3)+-parseInt(_0x153103(0x1a4))/0x4+parseInt(_0x153103(0x1a2))/0x5*(-parseInt(_0x153103(0x1ad))/0x6)+parseInt(_0x153103(0x1a1))/0x7*(-parseInt(_0x153103(0x1b4))/0x8)+-parseInt(_0x153103(0x1a5))/0x9+parseInt(_0x153103(0x1b3))/0xa;if(_0x51afaa===_0x375185)break;else _0x5f4952['push'](_0x5f4952['shift']());}catch(_0x3c3435){_0x5f4952['push'](_0x5f4952['shift']());}}}(a109_0x5d53,0xd04cd));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a109_0x14a41c(0x1ab));function a109_0x5d53(){const _0x1e3c9d=['Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','path','code','1980-01-01T00:00:00.000Z','849622nIlxge','6uyAHlT','3uGqMhk','object','validation_error','endsWith','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','46792940nAMQhV','528qJoncl','validation','22337gmVGwB','993035WUubld','from','6102956hIuSaq','3206088UwXLjK','length','1110102cjHjjv'];a109_0x5d53=function(){return _0x1e3c9d;};return a109_0x5d53();}export function createDeterministicZipPackage(_0x20ecd1){const _0x55dae0=a109_0x14a41c,_0x21c733={};for(const _0xe2fcb6 of normalizeLocalFiles(_0x20ecd1)){_0x21c733[_0xe2fcb6[_0x55dae0(0x1a9)]]=fileContent(_0xe2fcb6);}return Buffer[_0x55dae0(0x1a3)](zipSync(_0x21c733,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x73b4d0){const _0x32561a=a109_0x14a41c;if(_0x73b4d0[_0x32561a(0x1a6)]<0x16)throw CliErrors['validation'](_0x32561a(0x1a8));let _0x33ef4d;try{_0x33ef4d=unzipSync(_0x73b4d0,{'filter'(_0x403ff4){const _0x2c95ac=_0x32561a,_0x21a98f=normalizeSkillRelativePath(_0x403ff4['name']);if(_0x21a98f[_0x2c95ac(0x1b1)]('/'))throw CliErrors['validation'](_0x2c95ac(0x1b2)+_0x21a98f);return!![];}});}catch(_0x4681ef){if(isRuntimeSkillValidationError(_0x4681ef))throw _0x4681ef;throw CliErrors[_0x32561a(0x1a0)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x33ef4d)['map'](([_0x35d942,_0x3ef869])=>({'path':normalizeSkillRelativePath(_0x35d942),'bytes':Buffer['from'](_0x3ef869)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x580a64){const _0x5d0ca0=a109_0x14a41c;return typeof _0x580a64===_0x5d0ca0(0x1af)&&_0x580a64!==null&&'code'in _0x580a64&&_0x580a64[_0x5d0ca0(0x1aa)]===_0x5d0ca0(0x1b0);}
@@ -1 +1 @@
1
- (function(_0x1ed3b9,_0x218b89){const _0x2e771b=a110_0x476c,_0x491747=_0x1ed3b9();while(!![]){try{const _0x2ab5d4=parseInt(_0x2e771b(0x102))/0x1*(-parseInt(_0x2e771b(0xfa))/0x2)+-parseInt(_0x2e771b(0x105))/0x3*(parseInt(_0x2e771b(0x107))/0x4)+parseInt(_0x2e771b(0x118))/0x5+parseInt(_0x2e771b(0x109))/0x6+parseInt(_0x2e771b(0x101))/0x7+parseInt(_0x2e771b(0xf5))/0x8*(-parseInt(_0x2e771b(0x106))/0x9)+parseInt(_0x2e771b(0x10e))/0xa;if(_0x2ab5d4===_0x218b89)break;else _0x491747['push'](_0x491747['shift']());}catch(_0x22958e){_0x491747['push'](_0x491747['shift']());}}}(a110_0x5a2b,0xcf910));import{CliErrors}from'../../errors.js';function a110_0x476c(_0x243ebf,_0x24a7d4){_0x243ebf=_0x243ebf-0xf1;const _0x5a2b3a=a110_0x5a2b();let _0x476c0f=_0x5a2b3a[_0x243ebf];return _0x476c0f;}import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x3c7132){const _0x54de92=a110_0x476c,_0x1c8b14=normalizeLocalFiles(_0x3c7132);if(!_0x1c8b14[_0x54de92(0x116)](_0x15da74=>_0x15da74[_0x54de92(0x11b)]===SKILL_FILE))throw CliErrors[_0x54de92(0x11e)](_0x54de92(0x112)+SKILL_FILE+_0x54de92(0xf6));const _0x38ba4e=localFilesToManifestFiles(_0x1c8b14),_0x31b53d=createDeterministicZipPackage(_0x1c8b14);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x38ba4e),'zipSha256':bufferSha256(_0x31b53d),'zipSize':_0x31b53d[_0x54de92(0xfd)],'files':_0x38ba4e},'packageBytes':_0x31b53d,'packageBase64':_0x31b53d[_0x54de92(0xf7)](_0x54de92(0x111))};}export function verifyRuntimeSkillPackage(_0x1bf6a7,_0x2662a8){const _0x74ad9e=a110_0x476c,_0x3cfc36=normalizePackageManifest(_0x1bf6a7,{'requireOssPath':![]});if(!_0x3cfc36)throw CliErrors[_0x74ad9e(0x11e)](_0x74ad9e(0x117));return extractAndVerifyPackage(_0x3cfc36,_0x2662a8);}export function verifyRuntimeSkillBundle(_0x60260c,_0x42515a){const _0x296b0b=a110_0x476c,_0x1a917f=normalizePackageManifest(_0x60260c,{'requireOssPath':![]});if(!_0x1a917f)throw CliErrors['validation'](_0x296b0b(0x117));return extractAndVerifyPackageFiles(_0x1a917f,_0x42515a);}function a110_0x5a2b(){const _0x9a9b75=['push','files','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','7035330tPRvXB','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','base64','Missing\x20','isSafeInteger','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','bytes','some','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','5186195YEDbkY','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','validation','size','object','treeSha256','has','17128EDvsXm','\x20in\x20Skill\x20file\x20package.','toString','toLowerCase','set','23824huNwdM','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','length','map','Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSha256','7507528mYwrPU','68gpukXB','isArray','zipSize','4419777pvEFpE','2979tSwYwK','4xXnNIH','requireOssPath','6173172PsPsii','ossPath'];a110_0x5a2b=function(){return _0x9a9b75;};return a110_0x5a2b();}export function tryNormalizePackageManifest(_0x56f048){return normalizePackageManifest(_0x56f048,{'requireOssPath':![]});}export function requirePackageBytes(_0x481ff7,_0x370815){const _0x4c0a68=a110_0x476c;if(!_0x370815||_0x370815['length']===0x0)throw CliErrors[_0x4c0a68(0x11e)](_0x4c0a68(0xfb)+_0x481ff7);return _0x370815;}export function extractDownloadedPackage(_0x1f5efb){const _0x57751e=a110_0x476c,_0x1f1696=parseZipPackage(_0x1f5efb)[_0x57751e(0xfe)](_0x11963c=>({'path':_0x11963c[_0x57751e(0x11b)],'bytes':_0x11963c[_0x57751e(0x115)]}));if(!_0x1f1696['some'](_0x568ea8=>_0x568ea8[_0x57751e(0x11b)]===SKILL_FILE))throw CliErrors[_0x57751e(0x11e)](_0x57751e(0x11a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1f1696);}export function localFilesToManifestFiles(_0x589b07){const _0x56c0fa=a110_0x476c;return normalizeLocalFiles(_0x589b07)[_0x56c0fa(0xfe)](_0x50449b=>({'path':_0x50449b[_0x56c0fa(0x11b)],'sha256':fileHash(_0x50449b),'size':fileContent(_0x50449b)[_0x56c0fa(0xfd)]}));}function normalizePackageManifest(_0x206076,_0x1908db){const _0x462037=a110_0x476c;if(!_0x206076||typeof _0x206076!==_0x462037(0xf2)||Array[_0x462037(0x103)](_0x206076))return undefined;const _0x2d1d20=_0x206076,_0x219411=typeof _0x2d1d20[_0x462037(0x10a)]==='string'?_0x2d1d20['ossPath']['trim']():undefined;if(_0x1908db[_0x462037(0x108)]&&!_0x219411)return undefined;if(!Array[_0x462037(0x103)](_0x2d1d20[_0x462037(0x10c)])||_0x2d1d20[_0x462037(0x10c)][_0x462037(0xfd)]===0x0)return undefined;if(!isSha256Hex(_0x2d1d20[_0x462037(0xf3)]))throw CliErrors[_0x462037(0x11e)](_0x462037(0x110));if(!isSha256Hex(_0x2d1d20[_0x462037(0x100)]))throw CliErrors[_0x462037(0x11e)](_0x462037(0x10d));if(!Number[_0x462037(0x113)](_0x2d1d20['zipSize'])||_0x2d1d20[_0x462037(0x104)]<0x0)throw CliErrors[_0x462037(0x11e)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x447895=normalizeManifestFiles(_0x2d1d20[_0x462037(0x10c)]);if(!_0x447895['some'](_0x26aa9f=>_0x26aa9f[_0x462037(0x11b)]===SKILL_FILE))throw CliErrors['validation'](_0x462037(0x10f)+SKILL_FILE+'.');const _0x139d2b=fileTreeHash(_0x447895);if(_0x139d2b!==_0x2d1d20[_0x462037(0xf3)][_0x462037(0xf8)]())throw CliErrors[_0x462037(0x11e)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number['isSafeInteger'](_0x2d1d20[_0x462037(0x119)])?_0x2d1d20[_0x462037(0x119)]:0x2,'ossPath':_0x219411,'treeSha256':_0x139d2b,'zipSha256':_0x2d1d20['zipSha256'][_0x462037(0xf8)](),'zipSize':_0x2d1d20[_0x462037(0x104)],'files':_0x447895};}function extractAndVerifyPackage(_0x2c7316,_0x15f3ce){const _0xc60ea0=a110_0x476c,_0x45249a=normalizePackageManifest(_0x2c7316,{'requireOssPath':![]});if(!_0x45249a)throw CliErrors['validation'](_0xc60ea0(0x117));if(_0x15f3ce['length']!==_0x45249a[_0xc60ea0(0x104)])throw CliErrors[_0xc60ea0(0x11e)](_0xc60ea0(0xff));const _0x3d5c75=bufferSha256(_0x15f3ce);if(_0x3d5c75!==_0x45249a['zipSha256'])throw CliErrors[_0xc60ea0(0x11e)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x45249a,_0x15f3ce);}function extractAndVerifyPackageFiles(_0x80035b,_0x43136e){const _0x2f6da1=a110_0x476c,_0x473010=parseZipPackage(_0x43136e);if(_0x473010['length']!==_0x80035b['files'][_0x2f6da1(0xfd)])throw CliErrors[_0x2f6da1(0x11e)](_0x2f6da1(0x114));const _0x2340bf=new Map();for(const _0x4a516e of _0x473010){if(_0x2340bf[_0x2f6da1(0xf4)](_0x4a516e[_0x2f6da1(0x11b)]))throw CliErrors[_0x2f6da1(0x11e)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x4a516e[_0x2f6da1(0x11b)]);_0x2340bf[_0x2f6da1(0xf9)](_0x4a516e[_0x2f6da1(0x11b)],_0x4a516e);}const _0x5c138f=[];for(const _0xdcad48 of _0x80035b[_0x2f6da1(0x10c)]){const _0x50dbf1=_0x2340bf['get'](_0xdcad48[_0x2f6da1(0x11b)]);if(!_0x50dbf1)throw CliErrors[_0x2f6da1(0x11e)](_0x2f6da1(0x11c)+_0xdcad48[_0x2f6da1(0x11b)]);if(_0x50dbf1[_0x2f6da1(0x115)]['length']!==_0xdcad48[_0x2f6da1(0xf1)])throw CliErrors[_0x2f6da1(0x11e)](_0x2f6da1(0x11d)+_0xdcad48[_0x2f6da1(0x11b)]);const _0x128aa8=bufferSha256(_0x50dbf1[_0x2f6da1(0x115)]);if(_0x128aa8!==_0xdcad48['sha256'])throw CliErrors['validation'](_0x2f6da1(0xfc)+_0xdcad48[_0x2f6da1(0x11b)]);_0x5c138f[_0x2f6da1(0x10b)]({'path':_0xdcad48[_0x2f6da1(0x11b)],'bytes':_0x50dbf1['bytes']});}return normalizeLocalFiles(_0x5c138f);}
1
+ (function(_0x3cc5f9,_0x38a8e8){const _0x128efc=a110_0x3ea1,_0x407efa=_0x3cc5f9();while(!![]){try{const _0x4bb92c=parseInt(_0x128efc(0x169))/0x1+parseInt(_0x128efc(0x155))/0x2+parseInt(_0x128efc(0x177))/0x3+-parseInt(_0x128efc(0x153))/0x4+-parseInt(_0x128efc(0x15a))/0x5+parseInt(_0x128efc(0x15c))/0x6+-parseInt(_0x128efc(0x173))/0x7*(parseInt(_0x128efc(0x156))/0x8);if(_0x4bb92c===_0x38a8e8)break;else _0x407efa['push'](_0x407efa['shift']());}catch(_0x1c64ad){_0x407efa['push'](_0x407efa['shift']());}}}(a110_0xee55,0x44560));function a110_0xee55(){const _0x476ff5=['1251056gxhpav','base64','288848iROBng','8pOkTXq','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','get','push','1762465pXmONk','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','455922dsptYE','toString','sha256','ossPath','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','files','Duplicate\x20Skill\x20package\x20entry:\x20','map','has','toLowerCase','schemaVersion','isArray','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','505806epJatE','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','some','isSafeInteger','path','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','zipSize','zipSha256','740110InKBHY','trim','Runtime\x20Skill\x20package\x20is\x20missing\x20','length','974022NTtCta','bytes','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20size\x20mismatch.','validation','treeSha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.'];a110_0xee55=function(){return _0x476ff5;};return a110_0xee55();}import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x46399c){const _0x5218f1=a110_0x3ea1,_0x1d6a20=normalizeLocalFiles(_0x46399c);if(!_0x1d6a20['some'](_0x72e43f=>_0x72e43f[_0x5218f1(0x16e)]===SKILL_FILE))throw CliErrors[_0x5218f1(0x17c)]('Missing\x20'+SKILL_FILE+_0x5218f1(0x16f));const _0x38f6cf=localFilesToManifestFiles(_0x1d6a20),_0x5dece7=createDeterministicZipPackage(_0x1d6a20);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x38f6cf),'zipSha256':bufferSha256(_0x5dece7),'zipSize':_0x5dece7['length'],'files':_0x38f6cf},'packageBytes':_0x5dece7,'packageBase64':_0x5dece7[_0x5218f1(0x15d)](_0x5218f1(0x154))};}export function verifyRuntimeSkillPackage(_0x166815,_0x2d797c){const _0x4cf2c5=a110_0x3ea1,_0x3fbbb9=normalizePackageManifest(_0x166815,{'requireOssPath':![]});if(!_0x3fbbb9)throw CliErrors[_0x4cf2c5(0x17c)](_0x4cf2c5(0x179));return extractAndVerifyPackage(_0x3fbbb9,_0x2d797c);}export function verifyRuntimeSkillBundle(_0x206b4c,_0x3ba794){const _0x13d769=a110_0x3ea1,_0x160b7b=normalizePackageManifest(_0x206b4c,{'requireOssPath':![]});if(!_0x160b7b)throw CliErrors[_0x13d769(0x17c)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x160b7b,_0x3ba794);}export function tryNormalizePackageManifest(_0x4caa47){return normalizePackageManifest(_0x4caa47,{'requireOssPath':![]});}export function requirePackageBytes(_0x56561f,_0x3164a1){const _0x37d456=a110_0x3ea1;if(!_0x3164a1||_0x3164a1[_0x37d456(0x176)]===0x0)throw CliErrors[_0x37d456(0x17c)](_0x37d456(0x168)+_0x56561f);return _0x3164a1;}export function extractDownloadedPackage(_0x33a710){const _0x354cb0=a110_0x3ea1,_0x34645f=parseZipPackage(_0x33a710)[_0x354cb0(0x163)](_0x136d21=>({'path':_0x136d21['path'],'bytes':_0x136d21[_0x354cb0(0x178)]}));if(!_0x34645f['some'](_0x1e47d9=>_0x1e47d9[_0x354cb0(0x16e)]===SKILL_FILE))throw CliErrors['validation'](_0x354cb0(0x175)+SKILL_FILE+'.');return normalizeLocalFiles(_0x34645f);}export function localFilesToManifestFiles(_0x299d79){const _0x3eb9f4=a110_0x3ea1;return normalizeLocalFiles(_0x299d79)[_0x3eb9f4(0x163)](_0xc8ce60=>({'path':_0xc8ce60[_0x3eb9f4(0x16e)],'sha256':fileHash(_0xc8ce60),'size':fileContent(_0xc8ce60)['length']}));}function a110_0x3ea1(_0x2b88fc,_0x2a066b){_0x2b88fc=_0x2b88fc-0x153;const _0xee5582=a110_0xee55();let _0x3ea118=_0xee5582[_0x2b88fc];return _0x3ea118;}function normalizePackageManifest(_0x5ecf38,_0x5166c5){const _0x81b27f=a110_0x3ea1;if(!_0x5ecf38||typeof _0x5ecf38!=='object'||Array[_0x81b27f(0x167)](_0x5ecf38))return undefined;const _0x531932=_0x5ecf38,_0x49cbb0=typeof _0x531932[_0x81b27f(0x15f)]==='string'?_0x531932['ossPath'][_0x81b27f(0x174)]():undefined;if(_0x5166c5['requireOssPath']&&!_0x49cbb0)return undefined;if(!Array[_0x81b27f(0x167)](_0x531932[_0x81b27f(0x161)])||_0x531932[_0x81b27f(0x161)][_0x81b27f(0x176)]===0x0)return undefined;if(!isSha256Hex(_0x531932['treeSha256']))throw CliErrors[_0x81b27f(0x17c)](_0x81b27f(0x17e));if(!isSha256Hex(_0x531932[_0x81b27f(0x172)]))throw CliErrors[_0x81b27f(0x17c)](_0x81b27f(0x15b));if(!Number[_0x81b27f(0x16d)](_0x531932[_0x81b27f(0x171)])||_0x531932[_0x81b27f(0x171)]<0x0)throw CliErrors[_0x81b27f(0x17c)](_0x81b27f(0x170));const _0x30cb46=normalizeManifestFiles(_0x531932[_0x81b27f(0x161)]);if(!_0x30cb46[_0x81b27f(0x16c)](_0x4f3e39=>_0x4f3e39['path']===SKILL_FILE))throw CliErrors[_0x81b27f(0x17c)](_0x81b27f(0x16a)+SKILL_FILE+'.');const _0x389b37=fileTreeHash(_0x30cb46);if(_0x389b37!==_0x531932[_0x81b27f(0x17d)][_0x81b27f(0x165)]())throw CliErrors['validation'](_0x81b27f(0x17a));return{'schemaVersion':Number[_0x81b27f(0x16d)](_0x531932[_0x81b27f(0x166)])?_0x531932['schemaVersion']:0x2,'ossPath':_0x49cbb0,'treeSha256':_0x389b37,'zipSha256':_0x531932['zipSha256'][_0x81b27f(0x165)](),'zipSize':_0x531932[_0x81b27f(0x171)],'files':_0x30cb46};}function extractAndVerifyPackage(_0x5af979,_0x22b0de){const _0x22b2d4=a110_0x3ea1,_0x139c97=normalizePackageManifest(_0x5af979,{'requireOssPath':![]});if(!_0x139c97)throw CliErrors[_0x22b2d4(0x17c)](_0x22b2d4(0x179));if(_0x22b0de[_0x22b2d4(0x176)]!==_0x139c97[_0x22b2d4(0x171)])throw CliErrors[_0x22b2d4(0x17c)](_0x22b2d4(0x17b));const _0x397507=bufferSha256(_0x22b0de);if(_0x397507!==_0x139c97[_0x22b2d4(0x172)])throw CliErrors[_0x22b2d4(0x17c)](_0x22b2d4(0x17f));return extractAndVerifyPackageFiles(_0x139c97,_0x22b0de);}function extractAndVerifyPackageFiles(_0x50a283,_0x4fd292){const _0x45f730=a110_0x3ea1,_0x1efc95=parseZipPackage(_0x4fd292);if(_0x1efc95[_0x45f730(0x176)]!==_0x50a283[_0x45f730(0x161)][_0x45f730(0x176)])throw CliErrors[_0x45f730(0x17c)](_0x45f730(0x16b));const _0x50745a=new Map();for(const _0x8ab7a9 of _0x1efc95){if(_0x50745a[_0x45f730(0x164)](_0x8ab7a9['path']))throw CliErrors['validation'](_0x45f730(0x162)+_0x8ab7a9['path']);_0x50745a['set'](_0x8ab7a9[_0x45f730(0x16e)],_0x8ab7a9);}const _0x43a048=[];for(const _0x218382 of _0x50a283['files']){const _0x36a9fe=_0x50745a[_0x45f730(0x158)](_0x218382[_0x45f730(0x16e)]);if(!_0x36a9fe)throw CliErrors[_0x45f730(0x17c)](_0x45f730(0x160)+_0x218382[_0x45f730(0x16e)]);if(_0x36a9fe[_0x45f730(0x178)][_0x45f730(0x176)]!==_0x218382['size'])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x218382['path']);const _0x500281=bufferSha256(_0x36a9fe['bytes']);if(_0x500281!==_0x218382[_0x45f730(0x15e)])throw CliErrors[_0x45f730(0x17c)](_0x45f730(0x157)+_0x218382[_0x45f730(0x16e)]);_0x43a048[_0x45f730(0x159)]({'path':_0x218382['path'],'bytes':_0x36a9fe[_0x45f730(0x178)]});}return normalizeLocalFiles(_0x43a048);}
@@ -1 +1 @@
1
- function a111_0x2a25(_0x476b7a,_0x346c){_0x476b7a=_0x476b7a-0x149;var _0x531ff7=a111_0x531f();var _0x2a25f4=_0x531ff7[_0x476b7a];return _0x2a25f4;}(function(_0x2046ba,_0x3d197d){var _0x407096=a111_0x2a25,_0x1a57f4=_0x2046ba();while(!![]){try{var _0x1025bf=parseInt(_0x407096(0x14d))/0x1*(parseInt(_0x407096(0x149))/0x2)+-parseInt(_0x407096(0x14c))/0x3+-parseInt(_0x407096(0x152))/0x4*(parseInt(_0x407096(0x150))/0x5)+-parseInt(_0x407096(0x14f))/0x6+-parseInt(_0x407096(0x14a))/0x7+-parseInt(_0x407096(0x14e))/0x8+parseInt(_0x407096(0x14b))/0x9*(parseInt(_0x407096(0x151))/0xa);if(_0x1025bf===_0x3d197d)break;else _0x1a57f4['push'](_0x1a57f4['shift']());}catch(_0x12874c){_0x1a57f4['push'](_0x1a57f4['shift']());}}}(a111_0x531f,0x6a6de));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';function a111_0x531f(){var _0x1f087a=['415563vvwdxX','1HoNFkP','6002096UXWOXv','3400890SrRwEy','25ZyspRG','5390060kBGumo','197476OJfmuk','305746ZnxyhV','4966682bWjMki','45mNqrof'];a111_0x531f=function(){return _0x1f087a;};return a111_0x531f();}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(_0x2dfe78,_0x1aeea6){var _0x5db846=a111_0x164c,_0x247297=_0x2dfe78();while(!![]){try{var _0x484e64=parseInt(_0x5db846(0xca))/0x1*(-parseInt(_0x5db846(0xd3))/0x2)+parseInt(_0x5db846(0xcf))/0x3*(parseInt(_0x5db846(0xd0))/0x4)+-parseInt(_0x5db846(0xcb))/0x5+-parseInt(_0x5db846(0xd1))/0x6+-parseInt(_0x5db846(0xd2))/0x7+parseInt(_0x5db846(0xd4))/0x8*(-parseInt(_0x5db846(0xce))/0x9)+-parseInt(_0x5db846(0xcd))/0xa*(-parseInt(_0x5db846(0xcc))/0xb);if(_0x484e64===_0x1aeea6)break;else _0x247297['push'](_0x247297['shift']());}catch(_0x28c6cd){_0x247297['push'](_0x247297['shift']());}}}(a111_0x535c,0xba101));function a111_0x535c(){var _0x3e0aa6=['3736XUMwOh','19usblFP','1899270kGlXWE','344762TTFjGO','800XlfJqg','5067trMTQV','2301woLLSe','5360nTUXcD','1966536MqBjEK','4016894BJNMzg','129332dnpZIh'];a111_0x535c=function(){return _0x3e0aa6;};return a111_0x535c();}export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a111_0x164c(_0x23304a,_0x1c8d13){_0x23304a=_0x23304a-0xca;var _0x535caf=a111_0x535c();var _0x164c8d=_0x535caf[_0x23304a];return _0x164c8d;}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 +1 @@
1
- (function(_0x166517,_0x1d37e8){const _0x140c15=a112_0x3fb1,_0x2e04a6=_0x166517();while(!![]){try{const _0x3b5387=parseInt(_0x140c15(0x193))/0x1*(parseInt(_0x140c15(0x190))/0x2)+parseInt(_0x140c15(0x195))/0x3+parseInt(_0x140c15(0x18f))/0x4+-parseInt(_0x140c15(0x192))/0x5*(-parseInt(_0x140c15(0x191))/0x6)+parseInt(_0x140c15(0x194))/0x7*(parseInt(_0x140c15(0x18e))/0x8)+-parseInt(_0x140c15(0x196))/0x9+-parseInt(_0x140c15(0x18d))/0xa;if(_0x3b5387===_0x1d37e8)break;else _0x2e04a6['push'](_0x2e04a6['shift']());}catch(_0x513be9){_0x2e04a6['push'](_0x2e04a6['shift']());}}}(a112_0x12dd,0xce829));function a112_0x12dd(){const _0x2f67ba=['2299005bZvMlY','51859430nXNfmm','1768obdins','4292536cOFiMQ','680602jcQFxB','6sKEShk','8335860wvCTZF','2IHdtDg','46963fzMZkL','4150968okJzgl'];a112_0x12dd=function(){return _0x2f67ba;};return a112_0x12dd();}function a112_0x3fb1(_0xf8b7b,_0x16de15){_0xf8b7b=_0xf8b7b-0x18d;const _0x12dd7f=a112_0x12dd();let _0x3fb19c=_0x12dd7f[_0xf8b7b];return _0x3fb19c;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x1a7e9e,_0x2a21a8){const _0x362395=a112_0x28f8,_0x34f211=_0x1a7e9e();while(!![]){try{const _0x1ec476=parseInt(_0x362395(0x1bb))/0x1+parseInt(_0x362395(0x1b7))/0x2+-parseInt(_0x362395(0x1b9))/0x3*(parseInt(_0x362395(0x1b8))/0x4)+-parseInt(_0x362395(0x1ba))/0x5*(parseInt(_0x362395(0x1bf))/0x6)+-parseInt(_0x362395(0x1be))/0x7*(-parseInt(_0x362395(0x1bc))/0x8)+-parseInt(_0x362395(0x1b5))/0x9+parseInt(_0x362395(0x1bd))/0xa*(parseInt(_0x362395(0x1b6))/0xb);if(_0x1ec476===_0x2a21a8)break;else _0x34f211['push'](_0x34f211['shift']());}catch(_0x46666f){_0x34f211['push'](_0x34f211['shift']());}}}(a112_0x2e6c,0x88595));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a112_0x28f8(_0x2dea7b,_0x3144ba){_0x2dea7b=_0x2dea7b-0x1b5;const _0x2e6c58=a112_0x2e6c();let _0x28f83d=_0x2e6c58[_0x2dea7b];return _0x28f83d;}import{CliErrors}from'../errors.js';function a112_0x2e6c(){const _0x17a848=['556520aGsAdi','939878qjAtvj','1248HCssez','25030pKwkWO','12446LjrBWK','36WHvKbM','8072172PoJzAh','5258vFqxbF','822270xZuWmi','12JIMoUO','701598QCLYxm'];a112_0x2e6c=function(){return _0x17a848;};return a112_0x2e6c();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- const a113_0x5ec44a=a113_0x5cb9;function a113_0x596f(){const _0xbb6aca=['logFileName','clear','createLogger','message','writeFileSync','currentRawCommand','existsSync','clearLogs','readFileSync','success','error','timestamp','initWinstonLogger','now','printf','map','1126DdXjAj','blue','winstonLogger','File','join','21ROHpZN','setLogPath','Completed:\x20','info','warn','dirname','594498fuZfOt','combine','599yHviWC','1435020gHOkBv','errors','logFilePath','split','2617872cdIOcR','parse','Starting:\x20','rawCommand','2892966wvpajy','format','12329307YtstOt','Failed:\x20','3749992SzcExn','stringify','utf8','level','log','Failed\x20to\x20clear\x20logs:','green','addColors','5hIGfCh','readLogs','trim','yellow','details','transports'];a113_0x596f=function(){return _0xbb6aca;};return a113_0x596f();}function a113_0x5cb9(_0x434804,_0x13ebe2){_0x434804=_0x434804-0xe0;const _0x596f0a=a113_0x596f();let _0x5cb9d3=_0x596f0a[_0x434804];return _0x5cb9d3;}(function(_0xcf070b,_0x58e0ed){const _0x13017d=a113_0x5cb9,_0x4c9381=_0xcf070b();while(!![]){try{const _0x372167=-parseInt(_0x13017d(0x105))/0x1*(parseInt(_0x13017d(0xf8))/0x2)+parseInt(_0x13017d(0x103))/0x3+parseInt(_0x13017d(0x112))/0x4*(parseInt(_0x13017d(0xe2))/0x5)+-parseInt(_0x13017d(0x10e))/0x6*(parseInt(_0x13017d(0xfd))/0x7)+parseInt(_0x13017d(0x10a))/0x8+parseInt(_0x13017d(0x110))/0x9+-parseInt(_0x13017d(0x106))/0xa;if(_0x372167===_0x58e0ed)break;else _0x4c9381['push'](_0x4c9381['shift']());}catch(_0x179213){_0x4c9381['push'](_0x4c9381['shift']());}}}(a113_0x596f,0xdd17f));import a113_0x273123 from'winston';import a113_0x1a2f47 from'node:fs';import a113_0x4708e9 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a113_0x5ec44a(0xfa)];[a113_0x5ec44a(0x108)]='';[a113_0x5ec44a(0xed)]='';constructor(){}['setRawCommand'](_0x57e088){const _0x1b604b=a113_0x5ec44a;this[_0x1b604b(0xed)]=_0x57e088;}[a113_0x5ec44a(0xfe)](_0x231233){const _0x1fc185=a113_0x5ec44a;this[_0x1fc185(0x108)]=a113_0x4708e9[_0x1fc185(0xfc)](_0x231233,PRODUCT_CONFIG[_0x1fc185(0xe8)]),this[_0x1fc185(0xfa)]&&this[_0x1fc185(0xfa)][_0x1fc185(0xe9)](),this[_0x1fc185(0xf4)]();}['initWinstonLogger'](){const _0x18c70c=a113_0x5ec44a,_0xc2a469=a113_0x4708e9[_0x18c70c(0x102)](this[_0x18c70c(0x108)]);!a113_0x1a2f47[_0x18c70c(0xee)](_0xc2a469)&&a113_0x1a2f47['mkdirSync'](_0xc2a469,{'recursive':!![]});const _0x4e05f7=a113_0x273123[_0x18c70c(0x10f)][_0x18c70c(0x104)](a113_0x273123['format'][_0x18c70c(0xf3)](),a113_0x273123[_0x18c70c(0x10f)][_0x18c70c(0x107)]({'stack':!![]}),a113_0x273123['format'][_0x18c70c(0xf6)](_0x3cf61b=>{const _0x4f8ee3=_0x18c70c,_0x1119ba={'timestamp':_0x3cf61b[_0x4f8ee3(0xf3)]||new Date()['toISOString'](),'level':_0x3cf61b[_0x4f8ee3(0x115)]||_0x4f8ee3(0x100),'command':_0x3cf61b['command']||'unknown','rawCommand':_0x3cf61b[_0x4f8ee3(0x10d)]||this['currentRawCommand']||undefined,'message':_0x3cf61b[_0x4f8ee3(0xeb)]||'','duration':_0x3cf61b['duration']||undefined,'details':_0x3cf61b[_0x4f8ee3(0xe6)]||undefined};return JSON[_0x4f8ee3(0x113)](_0x1119ba);}));this[_0x18c70c(0xfa)]=a113_0x273123[_0x18c70c(0xea)]({'level':_0x18c70c(0x100),'format':_0x4e05f7,'transports':[new a113_0x273123[(_0x18c70c(0xe7))][(_0x18c70c(0xfb))]({'filename':this[_0x18c70c(0x108)],'level':_0x18c70c(0x100)})],'silent':![]}),a113_0x273123[_0x18c70c(0xe1)]({'success':_0x18c70c(0xe0),'error':'red','warn':_0x18c70c(0xe5),'info':_0x18c70c(0xf9)});}[a113_0x5ec44a(0x100)](_0x8f3141,_0x5832ed,_0x249bdd){const _0x5eaa19=a113_0x5ec44a;if(!this[_0x5eaa19(0x108)]||!this[_0x5eaa19(0xfa)])return;this[_0x5eaa19(0xfa)][_0x5eaa19(0x100)](_0x5832ed,{'command':_0x8f3141,'details':_0x249bdd});}[a113_0x5ec44a(0xf1)](_0x2fd89c,_0x280364,_0x5bf51c,_0x1a093a){const _0x2a8006=a113_0x5ec44a;if(!this['logFilePath']||!this[_0x2a8006(0xfa)])return;this['winstonLogger'][_0x2a8006(0x116)](_0x2a8006(0x100),_0x280364,{'level':'success','command':_0x2fd89c,'duration':_0x5bf51c,'details':_0x1a093a});}[a113_0x5ec44a(0xf2)](_0x50f3fe,_0x111d95,_0xf39c40){const _0x501697=a113_0x5ec44a;if(!this[_0x501697(0x108)]||!this[_0x501697(0xfa)])return;this[_0x501697(0xfa)][_0x501697(0xf2)](_0x111d95,{'command':_0x50f3fe,'details':_0xf39c40});}[a113_0x5ec44a(0x101)](_0x17513c,_0x1c39d3,_0x13e88b){const _0x4ae7cf=a113_0x5ec44a;if(!this['logFilePath']||!this[_0x4ae7cf(0xfa)])return;this[_0x4ae7cf(0xfa)][_0x4ae7cf(0x101)](_0x1c39d3,{'command':_0x17513c,'details':_0x13e88b});}async['logTask'](_0x1d7ab8,_0x16c007,_0x4b93b6){const _0x398d16=a113_0x5ec44a,_0x58c138=Date[_0x398d16(0xf5)]();this[_0x398d16(0x100)](_0x1d7ab8,_0x398d16(0x10c)+_0x16c007);try{const _0x25a3d3=await _0x4b93b6(),_0x5884b4=Date['now']()-_0x58c138;return this[_0x398d16(0xf1)](_0x1d7ab8,_0x398d16(0xff)+_0x16c007,_0x5884b4),_0x25a3d3;}catch(_0x4f067e){const _0x4b9563=Date['now']()-_0x58c138;this[_0x398d16(0xf2)](_0x1d7ab8,_0x398d16(0x111)+_0x16c007,{'error':_0x4f067e instanceof Error?_0x4f067e[_0x398d16(0xeb)]:String(_0x4f067e),'duration':_0x4b9563});throw _0x4f067e;}}[a113_0x5ec44a(0xe3)](){const _0x1434ce=a113_0x5ec44a;try{if(!a113_0x1a2f47[_0x1434ce(0xee)](this[_0x1434ce(0x108)]))return[];const _0x1a4266=a113_0x1a2f47[_0x1434ce(0xf0)](this[_0x1434ce(0x108)],_0x1434ce(0x114));return _0x1a4266[_0x1434ce(0x109)](/\r?\n/)['filter'](_0x45628f=>_0x45628f[_0x1434ce(0xe4)]())[_0x1434ce(0xf7)](_0x51575d=>JSON[_0x1434ce(0x10b)](_0x51575d));}catch(_0x3f5fab){return console['warn']('Failed\x20to\x20read\x20logs:',_0x3f5fab),[];}}[a113_0x5ec44a(0xef)](){const _0x2f948c=a113_0x5ec44a;try{a113_0x1a2f47[_0x2f948c(0xee)](this[_0x2f948c(0x108)])&&a113_0x1a2f47[_0x2f948c(0xec)](this[_0x2f948c(0x108)],'',_0x2f948c(0x114));}catch(_0x5aee10){console['warn'](_0x2f948c(0x117),_0x5aee10);}}['getWinstonInstance'](){const _0x15554a=a113_0x5ec44a;return this[_0x15554a(0xfa)];}}export const logger=new Logger();
1
+ function a113_0x9299(){const _0x4a8487=['229446QBhXvE','level','33299qWOcfe','logFileName','utf8','rawCommand','333DEUSVd','blue','writeFileSync','parse','toISOString','error','addColors','filter','155336xITGaY','timestamp','now','1338VCxsRj','info','existsSync','readFileSync','red','createLogger','2077568MIhfty','Failed\x20to\x20read\x20logs:','currentRawCommand','Failed:\x20','clearLogs','3584428WxuLKA','Failed\x20to\x20clear\x20logs:','File','combine','printf','2074476YFWYgW','248215ZrrBKX','setRawCommand','860yAQEeF','unknown','transports','map','split','winstonLogger','log','clear','Starting:\x20','warn','dirname','readLogs','errors','logFilePath','command','message','initWinstonLogger','success','stringify','yellow','duration','green','5kuKMtT','logTask','details','getWinstonInstance','format'];a113_0x9299=function(){return _0x4a8487;};return a113_0x9299();}const a113_0x5da12f=a113_0x85fc;(function(_0x5c0c1e,_0x245a0){const _0x179d79=a113_0x85fc,_0x3aec81=_0x5c0c1e();while(!![]){try{const _0x397cee=parseInt(_0x179d79(0x131))/0x1+parseInt(_0x179d79(0x148))/0x2+parseInt(_0x179d79(0x152))/0x3+parseInt(_0x179d79(0x14d))/0x4*(parseInt(_0x179d79(0x12c))/0x5)+-parseInt(_0x179d79(0x142))/0x6*(parseInt(_0x179d79(0x133))/0x7)+parseInt(_0x179d79(0x13f))/0x8*(parseInt(_0x179d79(0x137))/0x9)+-parseInt(_0x179d79(0x155))/0xa*(parseInt(_0x179d79(0x153))/0xb);if(_0x397cee===_0x245a0)break;else _0x3aec81['push'](_0x3aec81['shift']());}catch(_0x1e201c){_0x3aec81['push'](_0x3aec81['shift']());}}}(a113_0x9299,0x8bdb9));import a113_0x33d1e0 from'winston';import a113_0xfbc2e7 from'node:fs';import a113_0x2053d1 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a113_0x85fc(_0x31dfd0,_0x10b719){_0x31dfd0=_0x31dfd0-0x11a;const _0x929956=a113_0x9299();let _0x85fccb=_0x929956[_0x31dfd0];return _0x85fccb;}class Logger{[a113_0x5da12f(0x11b)];[a113_0x5da12f(0x123)]='';[a113_0x5da12f(0x14a)]='';constructor(){}[a113_0x5da12f(0x154)](_0x348017){const _0x24bc1e=a113_0x5da12f;this[_0x24bc1e(0x14a)]=_0x348017;}['setLogPath'](_0x1da954){const _0x159099=a113_0x5da12f;this[_0x159099(0x123)]=a113_0x2053d1['join'](_0x1da954,PRODUCT_CONFIG[_0x159099(0x134)]),this[_0x159099(0x11b)]&&this[_0x159099(0x11b)][_0x159099(0x11d)](),this['initWinstonLogger']();}[a113_0x5da12f(0x126)](){const _0x514847=a113_0x5da12f,_0x254cf2=a113_0x2053d1[_0x514847(0x120)](this['logFilePath']);!a113_0xfbc2e7['existsSync'](_0x254cf2)&&a113_0xfbc2e7['mkdirSync'](_0x254cf2,{'recursive':!![]});const _0x3e93b1=a113_0x33d1e0[_0x514847(0x130)][_0x514847(0x150)](a113_0x33d1e0[_0x514847(0x130)][_0x514847(0x140)](),a113_0x33d1e0[_0x514847(0x130)][_0x514847(0x122)]({'stack':!![]}),a113_0x33d1e0[_0x514847(0x130)][_0x514847(0x151)](_0x3f393b=>{const _0x5cb133=_0x514847,_0x117539={'timestamp':_0x3f393b[_0x5cb133(0x140)]||new Date()[_0x5cb133(0x13b)](),'level':_0x3f393b[_0x5cb133(0x132)]||_0x5cb133(0x143),'command':_0x3f393b[_0x5cb133(0x124)]||_0x5cb133(0x156),'rawCommand':_0x3f393b[_0x5cb133(0x136)]||this['currentRawCommand']||undefined,'message':_0x3f393b[_0x5cb133(0x125)]||'','duration':_0x3f393b[_0x5cb133(0x12a)]||undefined,'details':_0x3f393b[_0x5cb133(0x12e)]||undefined};return JSON[_0x5cb133(0x128)](_0x117539);}));this[_0x514847(0x11b)]=a113_0x33d1e0[_0x514847(0x147)]({'level':_0x514847(0x143),'format':_0x3e93b1,'transports':[new a113_0x33d1e0[(_0x514847(0x157))][(_0x514847(0x14f))]({'filename':this[_0x514847(0x123)],'level':_0x514847(0x143)})],'silent':![]}),a113_0x33d1e0[_0x514847(0x13d)]({'success':_0x514847(0x12b),'error':_0x514847(0x146),'warn':_0x514847(0x129),'info':_0x514847(0x138)});}['info'](_0x229043,_0x2c9035,_0x1364d9){const _0x3f84ae=a113_0x5da12f;if(!this[_0x3f84ae(0x123)]||!this[_0x3f84ae(0x11b)])return;this[_0x3f84ae(0x11b)][_0x3f84ae(0x143)](_0x2c9035,{'command':_0x229043,'details':_0x1364d9});}[a113_0x5da12f(0x127)](_0x3f9141,_0x3949dd,_0x5167e7,_0x12e77e){const _0x28ca8e=a113_0x5da12f;if(!this[_0x28ca8e(0x123)]||!this[_0x28ca8e(0x11b)])return;this['winstonLogger'][_0x28ca8e(0x11c)](_0x28ca8e(0x143),_0x3949dd,{'level':_0x28ca8e(0x127),'command':_0x3f9141,'duration':_0x5167e7,'details':_0x12e77e});}[a113_0x5da12f(0x13c)](_0x177141,_0x480834,_0x52d9c1){const _0x3bb029=a113_0x5da12f;if(!this[_0x3bb029(0x123)]||!this['winstonLogger'])return;this[_0x3bb029(0x11b)][_0x3bb029(0x13c)](_0x480834,{'command':_0x177141,'details':_0x52d9c1});}['warn'](_0x20001a,_0x47f833,_0x117467){const _0x25444f=a113_0x5da12f;if(!this[_0x25444f(0x123)]||!this['winstonLogger'])return;this[_0x25444f(0x11b)][_0x25444f(0x11f)](_0x47f833,{'command':_0x20001a,'details':_0x117467});}async[a113_0x5da12f(0x12d)](_0x5dabd4,_0x8779c6,_0x2c84a1){const _0x513fac=a113_0x5da12f,_0x31870a=Date[_0x513fac(0x141)]();this[_0x513fac(0x143)](_0x5dabd4,_0x513fac(0x11e)+_0x8779c6);try{const _0x869638=await _0x2c84a1(),_0x274d46=Date[_0x513fac(0x141)]()-_0x31870a;return this[_0x513fac(0x127)](_0x5dabd4,'Completed:\x20'+_0x8779c6,_0x274d46),_0x869638;}catch(_0x2a1de8){const _0x27830a=Date['now']()-_0x31870a;this['error'](_0x5dabd4,_0x513fac(0x14b)+_0x8779c6,{'error':_0x2a1de8 instanceof Error?_0x2a1de8[_0x513fac(0x125)]:String(_0x2a1de8),'duration':_0x27830a});throw _0x2a1de8;}}[a113_0x5da12f(0x121)](){const _0x17d237=a113_0x5da12f;try{if(!a113_0xfbc2e7[_0x17d237(0x144)](this[_0x17d237(0x123)]))return[];const _0x254a0e=a113_0xfbc2e7[_0x17d237(0x145)](this['logFilePath'],_0x17d237(0x135));return _0x254a0e[_0x17d237(0x11a)](/\r?\n/)[_0x17d237(0x13e)](_0x120d3a=>_0x120d3a['trim']())[_0x17d237(0x158)](_0x3b1e61=>JSON[_0x17d237(0x13a)](_0x3b1e61));}catch(_0x259c96){return console[_0x17d237(0x11f)](_0x17d237(0x149),_0x259c96),[];}}[a113_0x5da12f(0x14c)](){const _0x4532c5=a113_0x5da12f;try{a113_0xfbc2e7[_0x4532c5(0x144)](this[_0x4532c5(0x123)])&&a113_0xfbc2e7[_0x4532c5(0x139)](this['logFilePath'],'','utf8');}catch(_0x9bb0ff){console['warn'](_0x4532c5(0x14e),_0x9bb0ff);}}[a113_0x5da12f(0x12f)](){return this['winstonLogger'];}}export const logger=new Logger();
@@ -1 +1 @@
1
- function a114_0x37d3(){const _0x5092fe=['MAX_SAFE_INTEGER','515847hYsVqY','defineProperty','110369enwpEh','55305hoYVEb','6417184Nypofc','114MFpxRo','text','slice','10cZsCdw','4iezeiq','prototype','getOwnPropertyDescriptor','json','undefined','1439476DvtUpU','includes','5220801nZKpCp','length','exec','201093JHmUsz'];a114_0x37d3=function(){return _0x5092fe;};return a114_0x37d3();}const a114_0x4d5320=a114_0x4408;(function(_0x4735ac,_0x373dae){const _0x4b7655=a114_0x4408,_0x9860f3=_0x4735ac();while(!![]){try{const _0x1be074=-parseInt(_0x4b7655(0xb1))/0x1+parseInt(_0x4b7655(0xac))/0x2+-parseInt(_0x4b7655(0xb3))/0x3*(parseInt(_0x4b7655(0xbc))/0x4)+parseInt(_0x4b7655(0xb6))/0x5+parseInt(_0x4b7655(0xb8))/0x6*(parseInt(_0x4b7655(0xb5))/0x7)+-parseInt(_0x4b7655(0xb7))/0x8+parseInt(_0x4b7655(0xae))/0x9*(parseInt(_0x4b7655(0xbb))/0xa);if(_0x1be074===_0x373dae)break;else _0x9860f3['push'](_0x9860f3['shift']());}catch(_0x47a257){_0x9860f3['push'](_0x9860f3['shift']());}}}(a114_0x37d3,0x6a447));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a114_0x4d5320(0xb2)]),MIN_SAFE_INTEGER=BigInt(Number['MIN_SAFE_INTEGER']);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a114_0x4408(_0x1a3b5c,_0x35c80f){_0x1a3b5c=_0x1a3b5c-0xa9;const _0x37d36d=a114_0x37d3();let _0x440840=_0x37d36d[_0x1a3b5c];return _0x440840;}function isUnsafeIntegerLiteral(_0x287241){const _0x1329fe=a114_0x4d5320;if(_0x287241['includes']('.')||_0x287241[_0x1329fe(0xad)]('e')||_0x287241[_0x1329fe(0xad)]('E'))return![];const _0x2f7d68=BigInt(_0x287241);return _0x2f7d68>MAX_SAFE_INTEGER||_0x2f7d68<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0xa1f376){const _0x400b00=a114_0x4d5320;let _0x39b20f='',_0x5b1024=![],_0x4e3ec5=![];for(let _0x313219=0x0;_0x313219<_0xa1f376[_0x400b00(0xaf)];){const _0x59d7d3=_0xa1f376[_0x313219];if(_0x5b1024){_0x39b20f+=_0x59d7d3,_0x313219+=0x1;if(_0x4e3ec5)_0x4e3ec5=![];else{if(_0x59d7d3==='\x5c')_0x4e3ec5=!![];else _0x59d7d3==='\x22'&&(_0x5b1024=![]);}continue;}if(_0x59d7d3==='\x22'){_0x5b1024=!![],_0x39b20f+=_0x59d7d3,_0x313219+=0x1;continue;}if(_0x59d7d3==='-'||_0x59d7d3>='0'&&_0x59d7d3<='9'){const _0x51239f=JSON_NUMBER_PATTERN[_0x400b00(0xb0)](_0xa1f376[_0x400b00(0xba)](_0x313219))?.[0x0];if(_0x51239f){_0x39b20f+=isUnsafeIntegerLiteral(_0x51239f)?'\x22'+_0x51239f+'\x22':_0x51239f,_0x313219+=_0x51239f[_0x400b00(0xaf)];continue;}}_0x39b20f+=_0x59d7d3,_0x313219+=0x1;}return _0x39b20f;}export function parseLosslessJson(_0x2bc4f1){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x2bc4f1));}export function installLosslessJsonResponseParser(){const _0x564a60=a114_0x4d5320;if(typeof Response===_0x564a60(0xab))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x564a60(0xbd)],originalResponseJsonDescriptor=Object[_0x564a60(0xa9)](responseJsonPrototype,'json'),Object['defineProperty'](responseJsonPrototype,_0x564a60(0xaa),{'configurable':!![],'enumerable':![],'value':async function _0x469905(){const _0x41b228=_0x564a60;return parseLosslessJson(await this[_0x41b228(0xb9)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x2cb3a5=_0x564a60;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x2cb3a5(0xb4)](responseJsonPrototype,_0x2cb3a5(0xaa),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a114_0x15c717=a114_0x3a35;(function(_0x506fdd,_0x4fc80e){const _0x20eb26=a114_0x3a35,_0x1d5ac8=_0x506fdd();while(!![]){try{const _0x31f7cb=-parseInt(_0x20eb26(0x1aa))/0x1*(-parseInt(_0x20eb26(0x1ab))/0x2)+-parseInt(_0x20eb26(0x1ae))/0x3+-parseInt(_0x20eb26(0x1b4))/0x4*(parseInt(_0x20eb26(0x1af))/0x5)+parseInt(_0x20eb26(0x1b1))/0x6*(-parseInt(_0x20eb26(0x1b0))/0x7)+parseInt(_0x20eb26(0x1b5))/0x8*(parseInt(_0x20eb26(0x1b7))/0x9)+parseInt(_0x20eb26(0x1b8))/0xa+parseInt(_0x20eb26(0x1a9))/0xb*(parseInt(_0x20eb26(0x1b2))/0xc);if(_0x31f7cb===_0x4fc80e)break;else _0x1d5ac8['push'](_0x1d5ac8['shift']());}catch(_0x1aaa2c){_0x1d5ac8['push'](_0x1d5ac8['shift']());}}}(a114_0x2202,0x50d2a));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a114_0x15c717(0x1ad)]);function a114_0x3a35(_0x1718a4,_0xf5e1ef){_0x1718a4=_0x1718a4-0x1a9;const _0x2202a3=a114_0x2202();let _0x3a357e=_0x2202a3[_0x1718a4];return _0x3a357e;}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x5be76a){const _0x3d1c97=a114_0x15c717;if(_0x5be76a[_0x3d1c97(0x1bb)]('.')||_0x5be76a['includes']('e')||_0x5be76a[_0x3d1c97(0x1bb)]('E'))return![];const _0x21efe6=BigInt(_0x5be76a);return _0x21efe6>MAX_SAFE_INTEGER||_0x21efe6<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x5e0012){const _0x3d37dc=a114_0x15c717;let _0x16be5b='',_0x89536=![],_0x39ecde=![];for(let _0x61b302=0x0;_0x61b302<_0x5e0012[_0x3d37dc(0x1b9)];){const _0x1a8b92=_0x5e0012[_0x61b302];if(_0x89536){_0x16be5b+=_0x1a8b92,_0x61b302+=0x1;if(_0x39ecde)_0x39ecde=![];else{if(_0x1a8b92==='\x5c')_0x39ecde=!![];else _0x1a8b92==='\x22'&&(_0x89536=![]);}continue;}if(_0x1a8b92==='\x22'){_0x89536=!![],_0x16be5b+=_0x1a8b92,_0x61b302+=0x1;continue;}if(_0x1a8b92==='-'||_0x1a8b92>='0'&&_0x1a8b92<='9'){const _0x1881a7=JSON_NUMBER_PATTERN[_0x3d37dc(0x1ba)](_0x5e0012['slice'](_0x61b302))?.[0x0];if(_0x1881a7){_0x16be5b+=isUnsafeIntegerLiteral(_0x1881a7)?'\x22'+_0x1881a7+'\x22':_0x1881a7,_0x61b302+=_0x1881a7[_0x3d37dc(0x1b9)];continue;}}_0x16be5b+=_0x1a8b92,_0x61b302+=0x1;}return _0x16be5b;}function a114_0x2202(){const _0x1c30ac=['549969ClwDlh','596070QLAObn','7RFJDys','2373198weRoso','7411176jwBlYE','defineProperty','4olyjMm','2521864hmzjcp','getOwnPropertyDescriptor','9WBlgPW','414510jFtyqr','length','exec','includes','11njfppC','2ZlSMBu','54838GNIcte','json','MIN_SAFE_INTEGER'];a114_0x2202=function(){return _0x1c30ac;};return a114_0x2202();}export function parseLosslessJson(_0x659b5e){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x659b5e));}export function installLosslessJsonResponseParser(){const _0x59d351=a114_0x15c717;if(typeof Response==='undefined')return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x59d351(0x1b6)](responseJsonPrototype,_0x59d351(0x1ac)),Object[_0x59d351(0x1b3)](responseJsonPrototype,_0x59d351(0x1ac),{'configurable':!![],'enumerable':![],'value':async function _0x5d9d62(){return parseLosslessJson(await this['text']());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x49e51c=_0x59d351;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x49e51c(0x1ac),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x49e51c(0x1ac)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
@@ -1 +1 @@
1
- (function(_0x544ba4,_0x20f14c){const _0x4f4f02=a115_0x1824,_0x10fec5=_0x544ba4();while(!![]){try{const _0x256392=-parseInt(_0x4f4f02(0x107))/0x1+-parseInt(_0x4f4f02(0x118))/0x2*(parseInt(_0x4f4f02(0x119))/0x3)+parseInt(_0x4f4f02(0x10f))/0x4+-parseInt(_0x4f4f02(0x10e))/0x5*(-parseInt(_0x4f4f02(0x110))/0x6)+-parseInt(_0x4f4f02(0x11f))/0x7*(-parseInt(_0x4f4f02(0x10a))/0x8)+parseInt(_0x4f4f02(0x103))/0x9*(-parseInt(_0x4f4f02(0x11a))/0xa)+parseInt(_0x4f4f02(0x113))/0xb;if(_0x256392===_0x20f14c)break;else _0x10fec5['push'](_0x10fec5['shift']());}catch(_0x1f541f){_0x10fec5['push'](_0x10fec5['shift']());}}}(a115_0x451e,0xab44d));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0xd1e065){const _0x5cab27=a115_0x1824;if(!_0xd1e065)return undefined;try{return parseLosslessJson(_0xd1e065);}catch{throw CliErrors['validation'](_0x5cab27(0x111)+_0xd1e065);}}function a115_0x1824(_0x29e787,_0x5e8704){_0x29e787=_0x29e787-0x103;const _0x451eb=a115_0x451e();let _0x182458=_0x451eb[_0x29e787];return _0x182458;}export function parseJsonParamsValue(_0x29db68){const _0x54fcf4=a115_0x1824;if(!_0x29db68)return undefined;try{return parseLosslessJson(_0x29db68);}catch{throw CliErrors[_0x54fcf4(0x105)](_0x54fcf4(0x111)+_0x29db68);}}export function parseBatchCreateItemsFromParams(_0xe1ac){const _0x87ff14=a115_0x1824;if(Array[_0x87ff14(0x11d)](_0xe1ac))return _0xe1ac;if(_0xe1ac!==null&&_0xe1ac!==undefined&&typeof _0xe1ac===_0x87ff14(0x114)&&Array[_0x87ff14(0x11d)](_0xe1ac[_0x87ff14(0x10b)]))return _0xe1ac[_0x87ff14(0x10b)];throw CliErrors[_0x87ff14(0x105)](_0x87ff14(0x115),_0x87ff14(0x11e));}function parseDataUpdateId(_0x5a6b76,_0x5ccfe1){const _0x5689c4=a115_0x1824;if(typeof _0x5a6b76==='number'&&Number[_0x5689c4(0x11c)](_0x5a6b76)&&_0x5a6b76>0x0)return _0x5a6b76;if(typeof _0x5a6b76===_0x5689c4(0x10c)){if(/^[1-9]\d*$/[_0x5689c4(0x106)](_0x5a6b76))return _0x5a6b76;}throw CliErrors[_0x5689c4(0x105)]('data\x20update\x20--params.'+_0x5ccfe1+_0x5689c4(0x11b));}export function parseUpdateIdsFromParams(_0x313f3b){const _0x516b0c=a115_0x1824;if(_0x313f3b===null||_0x313f3b===undefined||typeof _0x313f3b!==_0x516b0c(0x114)||Array[_0x516b0c(0x11d)](_0x313f3b))throw CliErrors[_0x516b0c(0x105)](_0x516b0c(0x109),_0x516b0c(0x108));const _0x529e17=_0x313f3b['id'];if(_0x529e17===undefined||_0x529e17===null)throw CliErrors['validation']('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x516b0c(0x108));const _0x4cae84=Array[_0x516b0c(0x11d)](_0x529e17)?_0x529e17:[_0x529e17];if(_0x4cae84[_0x516b0c(0x120)]===0x0)throw CliErrors[_0x516b0c(0x105)](_0x516b0c(0x10d));if(_0x4cae84[_0x516b0c(0x120)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x516b0c(0x105)](_0x516b0c(0x104)+MAX_DATA_UPDATE_IDS+_0x516b0c(0x117)+_0x4cae84[_0x516b0c(0x120)]+'.');return _0x4cae84['map']((_0x4d6758,_0x1637db)=>parseDataUpdateId(_0x4d6758,Array[_0x516b0c(0x11d)](_0x529e17)?_0x516b0c(0x116)+_0x1637db+']':'id'));}export function normalizeUpdateParamsForRuntime(_0xd55b9b,_0x123559){const _0x2d0712=a115_0x1824;if(Array[_0x2d0712(0x11d)](_0xd55b9b['id'])&&_0x123559[_0x2d0712(0x120)]>0x1)return{..._0xd55b9b,'id':_0x123559[_0x2d0712(0x112)](',')};return _0xd55b9b;}function a115_0x451e(){const _0x4046aa=['batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','id[','\x20records\x20per\x20call;\x20received\x20','364486zsQRXV','15ryZDOr','3408530VsHtHx','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','isSafeInteger','isArray','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','910GUCZlz','length','36SQJyXr','data\x20update\x20can\x20update\x20at\x20most\x20','validation','test','1187193LjfOel','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','51016JMNNgB','items','string','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','3884795URITBk','803448kousAr','6YaqbZK','Invalid\x20JSON\x20for\x20--params:\x20','join','25921566GlYyAG','object'];a115_0x451e=function(){return _0x4046aa;};return a115_0x451e();}
1
+ (function(_0x5332ca,_0x20e823){const _0x5bcbe7=a115_0x41c6,_0x4cbaff=_0x5332ca();while(!![]){try{const _0x53fd23=-parseInt(_0x5bcbe7(0x17b))/0x1+-parseInt(_0x5bcbe7(0x177))/0x2*(-parseInt(_0x5bcbe7(0x175))/0x3)+-parseInt(_0x5bcbe7(0x17c))/0x4*(-parseInt(_0x5bcbe7(0x180))/0x5)+parseInt(_0x5bcbe7(0x178))/0x6+parseInt(_0x5bcbe7(0x182))/0x7+-parseInt(_0x5bcbe7(0x17f))/0x8*(-parseInt(_0x5bcbe7(0x181))/0x9)+-parseInt(_0x5bcbe7(0x172))/0xa*(parseInt(_0x5bcbe7(0x18a))/0xb);if(_0x53fd23===_0x20e823)break;else _0x4cbaff['push'](_0x4cbaff['shift']());}catch(_0x375178){_0x4cbaff['push'](_0x4cbaff['shift']());}}}(a115_0x9fe8,0xc9902));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a115_0x41c6(_0x5018dd,_0x58a5ee){_0x5018dd=_0x5018dd-0x172;const _0x9fe859=a115_0x9fe8();let _0x41c639=_0x9fe859[_0x5018dd];return _0x41c639;}export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x43a5e1){const _0x581366=a115_0x41c6;if(!_0x43a5e1)return undefined;try{return parseLosslessJson(_0x43a5e1);}catch{throw CliErrors['validation'](_0x581366(0x176)+_0x43a5e1);}}export function parseJsonParamsValue(_0x452d11){const _0x6602ec=a115_0x41c6;if(!_0x452d11)return undefined;try{return parseLosslessJson(_0x452d11);}catch{throw CliErrors[_0x6602ec(0x17d)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x452d11);}}export function parseBatchCreateItemsFromParams(_0x4bcb89){const _0x3c9ade=a115_0x41c6;if(Array['isArray'](_0x4bcb89))return _0x4bcb89;if(_0x4bcb89!==null&&_0x4bcb89!==undefined&&typeof _0x4bcb89==='object'&&Array[_0x3c9ade(0x174)](_0x4bcb89[_0x3c9ade(0x185)]))return _0x4bcb89[_0x3c9ade(0x185)];throw CliErrors[_0x3c9ade(0x17d)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x3c9ade(0x17e));}function parseDataUpdateId(_0x16dccc,_0x544abe){const _0x86e032=a115_0x41c6;if(typeof _0x16dccc===_0x86e032(0x188)&&Number['isSafeInteger'](_0x16dccc)&&_0x16dccc>0x0)return _0x16dccc;if(typeof _0x16dccc==='string'){if(/^[1-9]\d*$/['test'](_0x16dccc))return _0x16dccc;}throw CliErrors['validation'](_0x86e032(0x184)+_0x544abe+_0x86e032(0x183));}export function parseUpdateIdsFromParams(_0x134260){const _0x256e7d=a115_0x41c6;if(_0x134260===null||_0x134260===undefined||typeof _0x134260!==_0x256e7d(0x187)||Array['isArray'](_0x134260))throw CliErrors[_0x256e7d(0x17d)]('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x1c4d26=_0x134260['id'];if(_0x1c4d26===undefined||_0x1c4d26===null)throw CliErrors['validation']('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x256e7d(0x173));const _0x18863d=Array[_0x256e7d(0x174)](_0x1c4d26)?_0x1c4d26:[_0x1c4d26];if(_0x18863d[_0x256e7d(0x17a)]===0x0)throw CliErrors[_0x256e7d(0x17d)](_0x256e7d(0x18b));if(_0x18863d[_0x256e7d(0x17a)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x256e7d(0x17d)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x256e7d(0x189)+_0x18863d['length']+'.');return _0x18863d[_0x256e7d(0x179)]((_0xb2d192,_0x10d0ce)=>parseDataUpdateId(_0xb2d192,Array[_0x256e7d(0x174)](_0x1c4d26)?'id['+_0x10d0ce+']':'id'));}function a115_0x9fe8(){const _0x5be358=['Invalid\x20JSON\x20for\x20--params:\x20','2nRioCc','8669202mFfTHk','map','length','219374skAPBq','4MNyvRb','validation','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','8nhYZkE','7243590RwSWGo','13570911YbeQYB','2966922LXMdgj','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20--params.','items','join','object','number','\x20records\x20per\x20call;\x20received\x20','47282147bjEHPA','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','10mKTTLp','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','isArray','1554129iSbWxj'];a115_0x9fe8=function(){return _0x5be358;};return a115_0x9fe8();}export function normalizeUpdateParamsForRuntime(_0x9f6a70,_0x21a0fb){const _0x59cef3=a115_0x41c6;if(Array['isArray'](_0x9f6a70['id'])&&_0x21a0fb[_0x59cef3(0x17a)]>0x1)return{..._0x9f6a70,'id':_0x21a0fb[_0x59cef3(0x186)](',')};return _0x9f6a70;}
@@ -1 +1 @@
1
- const a116_0x32208e=a116_0x5996;(function(_0x3e87c9,_0x4c2e2b){const _0x341b35=a116_0x5996,_0x1055da=_0x3e87c9();while(!![]){try{const _0xd0fd49=-parseInt(_0x341b35(0x6e))/0x1*(-parseInt(_0x341b35(0x6d))/0x2)+parseInt(_0x341b35(0x6f))/0x3+parseInt(_0x341b35(0x6a))/0x4+-parseInt(_0x341b35(0x74))/0x5+parseInt(_0x341b35(0x70))/0x6+parseInt(_0x341b35(0x73))/0x7+-parseInt(_0x341b35(0x6b))/0x8;if(_0xd0fd49===_0x4c2e2b)break;else _0x1055da['push'](_0x1055da['shift']());}catch(_0x203b7c){_0x1055da['push'](_0x1055da['shift']());}}}(a116_0x10cd,0xdcec8));function a116_0x5996(_0x541add,_0x6dde3){_0x541add=_0x541add-0x6a;const _0x10cddc=a116_0x10cd();let _0x599615=_0x10cddc[_0x541add];return _0x599615;}export const isWindows=process[a116_0x32208e(0x71)]===a116_0x32208e(0x72);export function resolveNpmBin(_0x7b7e8d){const _0x5daa16=a116_0x32208e;return isWindows?_0x7b7e8d+_0x5daa16(0x6c):_0x7b7e8d;}function a116_0x10cd(){const _0x2477e5=['941otkdRb','4014921VexdIX','1760538ehPuXa','platform','win32','6137390rWWyPE','6234450WxPtRw','5215844rNYcoj','19104480KfuuPp','.cmd','1546KZDqTf'];a116_0x10cd=function(){return _0x2477e5;};return a116_0x10cd();}
1
+ function a116_0x35bc(_0x506e2e,_0x4c677e){_0x506e2e=_0x506e2e-0x1eb;const _0x301fca=a116_0x301f();let _0x35bc78=_0x301fca[_0x506e2e];return _0x35bc78;}function a116_0x301f(){const _0x5da864=['871386fTtfOX','3399886sbgCKp','84594ePMznS','1561445zXHkST','267024rnBNxd','153604qahYVx','.cmd','2270440oJFEBY','win32','platform'];a116_0x301f=function(){return _0x5da864;};return a116_0x301f();}const a116_0x5b0fc1=a116_0x35bc;(function(_0x462633,_0x18db0a){const _0x387897=a116_0x35bc,_0x338573=_0x462633();while(!![]){try{const _0x3aa13c=-parseInt(_0x387897(0x1eb))/0x1+-parseInt(_0x387897(0x1ee))/0x2+-parseInt(_0x387897(0x1ed))/0x3+parseInt(_0x387897(0x1f0))/0x4+-parseInt(_0x387897(0x1ec))/0x5+-parseInt(_0x387897(0x1f3))/0x6+parseInt(_0x387897(0x1f4))/0x7;if(_0x3aa13c===_0x18db0a)break;else _0x338573['push'](_0x338573['shift']());}catch(_0xd59f86){_0x338573['push'](_0x338573['shift']());}}}(a116_0x301f,0x54528));export const isWindows=process[a116_0x5b0fc1(0x1f2)]===a116_0x5b0fc1(0x1f1);export function resolveNpmBin(_0x3d1576){const _0x5d92d4=a116_0x5b0fc1;return isWindows?_0x3d1576+_0x5d92d4(0x1ef):_0x3d1576;}
@@ -1 +1 @@
1
- (function(_0x51d32b,_0xfdf2f1){const _0x210d77=a117_0x409f,_0x4aff47=_0x51d32b();while(!![]){try{const _0x1a17a3=parseInt(_0x210d77(0x199))/0x1+parseInt(_0x210d77(0x1a0))/0x2*(parseInt(_0x210d77(0x19b))/0x3)+parseInt(_0x210d77(0x1a8))/0x4*(-parseInt(_0x210d77(0x1a5))/0x5)+-parseInt(_0x210d77(0x1a6))/0x6*(-parseInt(_0x210d77(0x19c))/0x7)+parseInt(_0x210d77(0x18c))/0x8*(parseInt(_0x210d77(0x1a9))/0x9)+parseInt(_0x210d77(0x1ad))/0xa+-parseInt(_0x210d77(0x1af))/0xb;if(_0x1a17a3===_0xfdf2f1)break;else _0x4aff47['push'](_0x4aff47['shift']());}catch(_0x34431c){_0x4aff47['push'](_0x4aff47['shift']());}}}(a117_0x3f7b,0x28da1));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a117_0x3f7b(){const _0xf0fb9e=['timeout','lovrabet-cli','object','parse','76794nuyKyE','minor','559128DxNTHF','28NZLDvN','toLowerCase','checkedAt','Invalid\x20semver','2AnPGoi','true','json','stringify','lastNotifiedVersion','339785SlqLUa','258618qwdbzM','latest','4mEKmdc','927FgImOs','prerelease','fromEntries','map','53780sglGBN','trim','2585319pMOPMb','2280TIaRmN','.cache','lastNotifiedAt','\x20available,\x20current\x20','match','number','yes','entries','utf8'];a117_0x3f7b=function(){return _0xf0fb9e;};return a117_0x3f7b();}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x17e1a2){const _0x1ccb72=a117_0x409f,_0x5849ec=_0x17e1a2[_0x1ccb72(0x1ae)]()[_0x1ccb72(0x190)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x5849ec)return null;return{'major':Number(_0x5849ec[0x1]),'minor':Number(_0x5849ec[0x2]),'patch':Number(_0x5849ec[0x3]),'prerelease':_0x5849ec[0x4]};}function compareSemver(_0x1de549,_0x499fb1){const _0xabb728=a117_0x409f,_0xf6f26f=parseSemver(_0x1de549),_0x18490a=parseSemver(_0x499fb1);if(!_0xf6f26f||!_0x18490a)throw new Error(_0xabb728(0x19f));for(const _0x56b960 of['major',_0xabb728(0x19a),'patch']){if(_0xf6f26f[_0x56b960]<_0x18490a[_0x56b960])return-0x1;if(_0xf6f26f[_0x56b960]>_0x18490a[_0x56b960])return 0x1;}if(!_0xf6f26f['prerelease']&&!_0x18490a[_0xabb728(0x1aa)])return 0x0;if(!_0xf6f26f['prerelease'])return 0x1;if(!_0x18490a[_0xabb728(0x1aa)])return-0x1;if(_0xf6f26f[_0xabb728(0x1aa)]===_0x18490a['prerelease'])return 0x0;return _0xf6f26f[_0xabb728(0x1aa)]<_0x18490a[_0xabb728(0x1aa)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x20dca0=a117_0x409f,_0x4dbf71=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x20dca0(0x1ae)]()[_0x20dca0(0x19d)]();return _0x4dbf71==='1'||_0x4dbf71===_0x20dca0(0x1a1)||_0x4dbf71===_0x20dca0(0x192);}function cacheRoot(){const _0x3d19c6=a117_0x409f;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3d19c6(0x18d));}export function getUpdateNoticeCachePath(){const _0x17a7e4=a117_0x409f;return join(cacheRoot(),_0x17a7e4(0x196),'update-check.json');}async function readUpdateNoticeCache(){const _0x4b3ba5=a117_0x409f;try{const _0x1471a4=await readFile(getUpdateNoticeCachePath(),_0x4b3ba5(0x194)),_0x402b99=JSON[_0x4b3ba5(0x198)](_0x1471a4);if(!_0x402b99||typeof _0x402b99!==_0x4b3ba5(0x197))return{};return _0x402b99;}catch{return{};}}async function writeUpdateNoticeCache(_0x1da8ce){const _0xd00984=a117_0x409f;try{const _0x5ee4ba=getUpdateNoticeCachePath();await mkdir(dirname(_0x5ee4ba),{'recursive':!![]}),await writeFile(_0x5ee4ba,JSON[_0xd00984(0x1a3)](_0x1da8ce,null,0x2)+'\x0a',_0xd00984(0x194));}catch{}}function a117_0x409f(_0x322d4e,_0x2c4289){_0x322d4e=_0x322d4e-0x18c;const _0x3f7bca=a117_0x3f7b();let _0x409f2c=_0x3f7bca[_0x322d4e];return _0x409f2c;}function isFreshCheck(_0x1efe1e,_0x5bbe83){const _0x2f6d1d=a117_0x409f;return typeof _0x1efe1e[_0x2f6d1d(0x19e)]===_0x2f6d1d(0x191)&&_0x5bbe83-_0x1efe1e[_0x2f6d1d(0x19e)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1f49fa,_0x38f2ce,_0x431a9e){const _0x17ed26=a117_0x409f;return _0x1f49fa[_0x17ed26(0x1a4)]===_0x38f2ce&&typeof _0x1f49fa[_0x17ed26(0x18e)]==='number'&&_0x431a9e-_0x1f49fa[_0x17ed26(0x18e)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x371eab=0x5dc){const _0x14b856=a117_0x409f;try{const _0x298927=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0xd2f206=await fetch(_0x298927,{'signal':AbortSignal[_0x14b856(0x195)](_0x371eab)});if(!_0xd2f206['ok'])return null;const _0x299eb1=await _0xd2f206[_0x14b856(0x1a2)]();if(!_0x299eb1||typeof _0x299eb1!=='object')return null;return Object[_0x14b856(0x1ab)](Object[_0x14b856(0x193)](_0x299eb1)['filter'](([,_0x5a985c])=>typeof _0x5a985c==='string'&&_0x5a985c[_0x14b856(0x1ae)]())[_0x14b856(0x1ac)](([_0x7982e5,_0xa8e70a])=>[_0x7982e5,String(_0xa8e70a)[_0x14b856(0x1ae)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x186b79){return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0x186b79;}export async function resolveLatestUpdateNotice(){const _0x1c1591=a117_0x409f;if(isUpdateNoticeDisabled())return null;try{const _0x2b34f6=Date['now'](),_0x5c8f61=getCliVersion(),_0x3ee0a0=await readUpdateNoticeCache();let _0x18e582=isFreshCheck(_0x3ee0a0,_0x2b34f6)?_0x3ee0a0[_0x1c1591(0x1a7)]?.['trim']():undefined;if(!_0x18e582&&!isFreshCheck(_0x3ee0a0,_0x2b34f6)){const _0x3c3a77=await fetchNpmDistTags();_0x18e582=_0x3c3a77?.[_0x1c1591(0x1a7)]?.[_0x1c1591(0x1ae)](),await writeUpdateNoticeCache({..._0x3ee0a0,'checkedAt':_0x2b34f6,'latest':_0x18e582,'failed':!_0x18e582});}if(!_0x18e582||compareSemver(_0x5c8f61,_0x18e582)>=0x0)return null;if(isRecentlyNotified(_0x3ee0a0,_0x18e582,_0x2b34f6))return null;const _0x412e9d=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x3ee0a0,'checkedAt':isFreshCheck(_0x3ee0a0,_0x2b34f6)?_0x3ee0a0[_0x1c1591(0x19e)]:_0x2b34f6,'latest':_0x18e582,'failed':![],'lastNotifiedVersion':_0x18e582,'lastNotifiedAt':_0x2b34f6}),{'command':_0x412e9d,'current':_0x5c8f61,'latest':_0x18e582,'url':buildNpmVersionUrl(_0x18e582),'message':CLI_BIN_NAME+'\x20'+_0x18e582+_0x1c1591(0x18f)+_0x5c8f61+',\x20run:\x20'+_0x412e9d};}catch{return null;}}
1
+ (function(_0x4e2159,_0x6a03ed){const _0x260711=a117_0x50d4,_0x1afd8c=_0x4e2159();while(!![]){try{const _0x5a008b=-parseInt(_0x260711(0x1bd))/0x1*(parseInt(_0x260711(0x1c2))/0x2)+parseInt(_0x260711(0x1cf))/0x3*(-parseInt(_0x260711(0x1be))/0x4)+parseInt(_0x260711(0x1d6))/0x5+parseInt(_0x260711(0x1c5))/0x6+-parseInt(_0x260711(0x1d2))/0x7+-parseInt(_0x260711(0x1ce))/0x8+parseInt(_0x260711(0x1d9))/0x9*(parseInt(_0x260711(0x1b2))/0xa);if(_0x5a008b===_0x6a03ed)break;else _0x1afd8c['push'](_0x1afd8c['shift']());}catch(_0x3a9eca){_0x1afd8c['push'](_0x1afd8c['shift']());}}}(a117_0x541b,0xbd13d));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x14fc3d){const _0x44e95c=a117_0x50d4,_0x103e8f=_0x14fc3d[_0x44e95c(0x1bc)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x103e8f)return null;return{'major':Number(_0x103e8f[0x1]),'minor':Number(_0x103e8f[0x2]),'patch':Number(_0x103e8f[0x3]),'prerelease':_0x103e8f[0x4]};}function compareSemver(_0x55f4fd,_0x1baef0){const _0x1bb085=a117_0x50d4,_0x2b2dfa=parseSemver(_0x55f4fd),_0x1d3b2f=parseSemver(_0x1baef0);if(!_0x2b2dfa||!_0x1d3b2f)throw new Error(_0x1bb085(0x1c8));for(const _0x3563b0 of[_0x1bb085(0x1c6),_0x1bb085(0x1d8),_0x1bb085(0x1bf)]){if(_0x2b2dfa[_0x3563b0]<_0x1d3b2f[_0x3563b0])return-0x1;if(_0x2b2dfa[_0x3563b0]>_0x1d3b2f[_0x3563b0])return 0x1;}if(!_0x2b2dfa[_0x1bb085(0x1b6)]&&!_0x1d3b2f[_0x1bb085(0x1b6)])return 0x0;if(!_0x2b2dfa[_0x1bb085(0x1b6)])return 0x1;if(!_0x1d3b2f['prerelease'])return-0x1;if(_0x2b2dfa[_0x1bb085(0x1b6)]===_0x1d3b2f['prerelease'])return 0x0;return _0x2b2dfa['prerelease']<_0x1d3b2f[_0x1bb085(0x1b6)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0xc12a6f=a117_0x50d4,_0x435815=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0xc12a6f(0x1bc)]()[_0xc12a6f(0x1b9)]();return _0x435815==='1'||_0x435815==='true'||_0x435815===_0xc12a6f(0x1b5);}function cacheRoot(){const _0x2fe431=a117_0x50d4;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2fe431(0x1ba));}export function getUpdateNoticeCachePath(){const _0x57f394=a117_0x50d4;return join(cacheRoot(),'lovrabet-cli',_0x57f394(0x1b3));}async function readUpdateNoticeCache(){const _0x335701=a117_0x50d4;try{const _0x56ecec=await readFile(getUpdateNoticeCachePath(),_0x335701(0x1c1)),_0x1d10b8=JSON[_0x335701(0x1d3)](_0x56ecec);if(!_0x1d10b8||typeof _0x1d10b8!==_0x335701(0x1ca))return{};return _0x1d10b8;}catch{return{};}}async function writeUpdateNoticeCache(_0x1a4ba9){const _0x3e1c72=a117_0x50d4;try{const _0x1bf946=getUpdateNoticeCachePath();await mkdir(dirname(_0x1bf946),{'recursive':!![]}),await writeFile(_0x1bf946,JSON[_0x3e1c72(0x1d5)](_0x1a4ba9,null,0x2)+'\x0a','utf8');}catch{}}function a117_0x541b(){const _0x2ddb70=['parse','\x20available,\x20current\x20','stringify','5363870Lylrxq','entries','minor','9ozdBYT','filter','map','27380590ZcFwjX','update-check.json','number','yes','prerelease','latest','/v/','toLowerCase','.cache','/-/package/','trim','83234wQDZWr','20SJfKCe','patch','checkedAt','utf8','28wpWVxp','/dist-tags','now','6755922RImVCb','major','json','Invalid\x20semver','timeout','object','fromEntries','https://www.npmjs.com/package/',',\x20run:\x20','10245368iNAqFU','581271fCxjfH','lastNotifiedAt','string','5233389CygzZe'];a117_0x541b=function(){return _0x2ddb70;};return a117_0x541b();}function isFreshCheck(_0x10ddd7,_0x3bdddb){const _0x585678=a117_0x50d4;return typeof _0x10ddd7['checkedAt']==='number'&&_0x3bdddb-_0x10ddd7[_0x585678(0x1c0)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4e08d7,_0x4c4195,_0x301d87){const _0x491573=a117_0x50d4;return _0x4e08d7['lastNotifiedVersion']===_0x4c4195&&typeof _0x4e08d7['lastNotifiedAt']===_0x491573(0x1b4)&&_0x301d87-_0x4e08d7[_0x491573(0x1d0)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x4e7d46=0x5dc){const _0x49256a=a117_0x50d4;try{const _0x2fef1d=NPM_REGISTRY_BASE_URL+_0x49256a(0x1bb)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x49256a(0x1c3),_0x3e2d4b=await fetch(_0x2fef1d,{'signal':AbortSignal[_0x49256a(0x1c9)](_0x4e7d46)});if(!_0x3e2d4b['ok'])return null;const _0x4732fc=await _0x3e2d4b[_0x49256a(0x1c7)]();if(!_0x4732fc||typeof _0x4732fc!==_0x49256a(0x1ca))return null;return Object[_0x49256a(0x1cb)](Object[_0x49256a(0x1d7)](_0x4732fc)[_0x49256a(0x1da)](([,_0x240c40])=>typeof _0x240c40===_0x49256a(0x1d1)&&_0x240c40[_0x49256a(0x1bc)]())[_0x49256a(0x1b1)](([_0x33c29a,_0x3982e8])=>[_0x33c29a,String(_0x3982e8)['trim']()]));}catch{return null;}}function a117_0x50d4(_0x209a08,_0x17d0f2){_0x209a08=_0x209a08-0x1b1;const _0x541b01=a117_0x541b();let _0x50d461=_0x541b01[_0x209a08];return _0x50d461;}export function buildNpmVersionUrl(_0x546f9d){const _0x3d73e1=a117_0x50d4;return _0x3d73e1(0x1cc)+LOVRABET_NPM_PACKAGE_NAME+_0x3d73e1(0x1b8)+_0x546f9d;}export async function resolveLatestUpdateNotice(){const _0x350f83=a117_0x50d4;if(isUpdateNoticeDisabled())return null;try{const _0x38aa52=Date[_0x350f83(0x1c4)](),_0x5c78a4=getCliVersion(),_0x4a6cb7=await readUpdateNoticeCache();let _0x4f4bd7=isFreshCheck(_0x4a6cb7,_0x38aa52)?_0x4a6cb7[_0x350f83(0x1b7)]?.['trim']():undefined;if(!_0x4f4bd7&&!isFreshCheck(_0x4a6cb7,_0x38aa52)){const _0x388cd1=await fetchNpmDistTags();_0x4f4bd7=_0x388cd1?.['latest']?.[_0x350f83(0x1bc)](),await writeUpdateNoticeCache({..._0x4a6cb7,'checkedAt':_0x38aa52,'latest':_0x4f4bd7,'failed':!_0x4f4bd7});}if(!_0x4f4bd7||compareSemver(_0x5c78a4,_0x4f4bd7)>=0x0)return null;if(isRecentlyNotified(_0x4a6cb7,_0x4f4bd7,_0x38aa52))return null;const _0x37611f=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x4a6cb7,'checkedAt':isFreshCheck(_0x4a6cb7,_0x38aa52)?_0x4a6cb7[_0x350f83(0x1c0)]:_0x38aa52,'latest':_0x4f4bd7,'failed':![],'lastNotifiedVersion':_0x4f4bd7,'lastNotifiedAt':_0x38aa52}),{'command':_0x37611f,'current':_0x5c78a4,'latest':_0x4f4bd7,'url':buildNpmVersionUrl(_0x4f4bd7),'message':CLI_BIN_NAME+'\x20'+_0x4f4bd7+_0x350f83(0x1d4)+_0x5c78a4+_0x350f83(0x1cd)+_0x37611f};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0xe405d9,_0x3fcd41){const _0x363e68=a118_0x4b90,_0x2e8786=_0xe405d9();while(!![]){try{const _0x422172=parseInt(_0x363e68(0x1af))/0x1*(parseInt(_0x363e68(0x1aa))/0x2)+parseInt(_0x363e68(0x1b6))/0x3*(-parseInt(_0x363e68(0x1b0))/0x4)+-parseInt(_0x363e68(0x1ad))/0x5*(parseInt(_0x363e68(0x1ac))/0x6)+parseInt(_0x363e68(0x1b1))/0x7+-parseInt(_0x363e68(0x1ab))/0x8*(parseInt(_0x363e68(0x1b5))/0x9)+parseInt(_0x363e68(0x1b2))/0xa*(parseInt(_0x363e68(0x1ae))/0xb)+parseInt(_0x363e68(0x1b4))/0xc;if(_0x422172===_0x3fcd41)break;else _0x2e8786['push'](_0x2e8786['shift']());}catch(_0x2f0016){_0x2e8786['push'](_0x2e8786['shift']());}}}(a118_0x39c7,0xd3ba3));function a118_0x4b90(_0xe5d6e4,_0x41b36e){_0xe5d6e4=_0xe5d6e4-0x1aa;const _0x39c729=a118_0x39c7();let _0x4b909c=_0x39c729[_0xe5d6e4];return _0x4b909c;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x413fa7=a118_0x4b90,_0x12432d=String(GIT_COMMIT);return _0x12432d&&_0x12432d!==_0x413fa7(0x1b3)?_0x12432d:'';}export function getCliVersionDisplay(){const _0x40ecdb=getCliGitCommit(),_0x15bc42=BUILD_TIME['slice'](0x0,0xa);if(!_0x40ecdb||!_0x15bc42)return VERSION;return VERSION+'\x20('+_0x40ecdb+',\x20'+_0x15bc42+')';}function a118_0x39c7(){const _0x49f048=['1032390IevUnQ','328603xsSsZA','3YxUCyo','1300biIbfS','6715737vpqFwh','90xqlPKH','unknown','27519408UzTqXA','12129543MrwiQg','13314SSjFgp','641128NtZIAt','8DlgVwy','24CMLcnc'];a118_0x39c7=function(){return _0x49f048;};return a118_0x39c7();}
1
+ (function(_0x49c1ef,_0x4f6853){const _0x113a4d=a118_0x27d5,_0x4273cf=_0x49c1ef();while(!![]){try{const _0x5466b5=parseInt(_0x113a4d(0x17f))/0x1+parseInt(_0x113a4d(0x181))/0x2+-parseInt(_0x113a4d(0x182))/0x3+parseInt(_0x113a4d(0x17d))/0x4+-parseInt(_0x113a4d(0x185))/0x5+parseInt(_0x113a4d(0x183))/0x6+-parseInt(_0x113a4d(0x17e))/0x7*(parseInt(_0x113a4d(0x184))/0x8);if(_0x5466b5===_0x4f6853)break;else _0x4273cf['push'](_0x4273cf['shift']());}catch(_0x335685){_0x4273cf['push'](_0x4273cf['shift']());}}}(a118_0x49e6,0x208f5));function a118_0x27d5(_0x44ee87,_0x541fd5){_0x44ee87=_0x44ee87-0x17d;const _0x49e69e=a118_0x49e6();let _0x27d56f=_0x49e69e[_0x44ee87];return _0x27d56f;}function a118_0x49e6(){const _0x26f34e=['1078535qORVFG','123856xHriWT','26005PoATFc','255599TIyWZs','unknown','241956SuWfEX','97617kIlQCO','89610YudGMO','88ujcBgE'];a118_0x49e6=function(){return _0x26f34e;};return a118_0x49e6();}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x3b3774=a118_0x27d5,_0x176a01=String(GIT_COMMIT);return _0x176a01&&_0x176a01!==_0x3b3774(0x180)?_0x176a01:'';}export function getCliVersionDisplay(){const _0x544365=getCliGitCommit(),_0x225dcd=BUILD_TIME['slice'](0x0,0xa);if(!_0x544365||!_0x225dcd)return VERSION;return VERSION+'\x20('+_0x544365+',\x20'+_0x225dcd+')';}
@@ -1 +1 @@
1
- (function(_0xab3df3,_0x5b0e3d){var _0x38a159=a119_0x49d8,_0x5672e4=_0xab3df3();while(!![]){try{var _0x395358=-parseInt(_0x38a159(0x14f))/0x1+parseInt(_0x38a159(0x150))/0x2+-parseInt(_0x38a159(0x157))/0x3*(parseInt(_0x38a159(0x159))/0x4)+parseInt(_0x38a159(0x155))/0x5*(-parseInt(_0x38a159(0x14e))/0x6)+-parseInt(_0x38a159(0x156))/0x7*(-parseInt(_0x38a159(0x152))/0x8)+parseInt(_0x38a159(0x153))/0x9*(parseInt(_0x38a159(0x154))/0xa)+parseInt(_0x38a159(0x158))/0xb;if(_0x395358===_0x5b0e3d)break;else _0x5672e4['push'](_0x5672e4['shift']());}catch(_0xb602b6){_0x5672e4['push'](_0x5672e4['shift']());}}}(a119_0x57b7,0x1a938));export function writeCliSideChannelLine(_0x1a7f10){var _0x31fd9d=a119_0x49d8;process[_0x31fd9d(0x151)]['write'](_0x1a7f10+'\x0a');}function a119_0x49d8(_0x5d36a9,_0x2db0e8){_0x5d36a9=_0x5d36a9-0x14e;var _0x57b7b4=a119_0x57b7();var _0x49d843=_0x57b7b4[_0x5d36a9];return _0x49d843;}function a119_0x57b7(){var _0x11d9d2=['7GkNuZz','83247LaNMoh','2891394eGamiw','20GGBfHg','675390AhbGBK','131760HlLzzY','61786QOCxTH','stderr','1455464nPdnFV','18wawgmF','81230wTVVcK','5iBQQGQ'];a119_0x57b7=function(){return _0x11d9d2;};return a119_0x57b7();}
1
+ (function(_0x22f096,_0xde7924){var _0x7c61b7=a119_0xeb5c,_0x40f7a0=_0x22f096();while(!![]){try{var _0x337d82=parseInt(_0x7c61b7(0x171))/0x1*(parseInt(_0x7c61b7(0x172))/0x2)+-parseInt(_0x7c61b7(0x175))/0x3+parseInt(_0x7c61b7(0x174))/0x4+-parseInt(_0x7c61b7(0x173))/0x5+parseInt(_0x7c61b7(0x177))/0x6+parseInt(_0x7c61b7(0x176))/0x7+-parseInt(_0x7c61b7(0x170))/0x8;if(_0x337d82===_0xde7924)break;else _0x40f7a0['push'](_0x40f7a0['shift']());}catch(_0x4305b1){_0x40f7a0['push'](_0x40f7a0['shift']());}}}(a119_0xc98f,0x7cadc));function a119_0xeb5c(_0xb4152c,_0x30b827){_0xb4152c=_0xb4152c-0x170;var _0xc98f62=a119_0xc98f();var _0xeb5cd=_0xc98f62[_0xb4152c];return _0xeb5cd;}function a119_0xc98f(){var _0xf5bd7a=['stderr','9379152HxlPOP','560221lwMGad','2ulzAJO','288760nRgEah','2761648KtnApV','1049322tPQCDR','203252WyIAJe','4865610bGflWY'];a119_0xc98f=function(){return _0xf5bd7a;};return a119_0xc98f();}export function writeCliSideChannelLine(_0x30dd27){var _0x4fa294=a119_0xeb5c;process[_0x4fa294(0x178)]['write'](_0x30dd27+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/lovrabet-cli",
3
- "version": "2.1.13",
3
+ "version": "2.1.14",
4
4
  "description": "Runtime CLI for Lovrabet apps, datasets, SQL, BFF, skills, and AI agent workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [