@lovrabet/lovrabet-cli 2.3.0 → 2.3.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +3 -3
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +0 -16
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.d.ts +2 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-config-commands.md +2 -2
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +2 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +3 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +32 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x560b42,_0x477829){const _0x2788ab=a149_0xb94a,_0x44dc67=_0x560b42();while(!![]){try{const _0x208471=parseInt(_0x2788ab(0x188))/0x1+-parseInt(_0x2788ab(0x18a))/0x2*(-parseInt(_0x2788ab(0x189))/0x3)+-parseInt(_0x2788ab(0x1a9))/0x4*(-parseInt(_0x2788ab(0x18b))/0x5)+parseInt(_0x2788ab(0x181))/0x6+-parseInt(_0x2788ab(0x196))/0x7+-parseInt(_0x2788ab(0x184))/0x8*(-parseInt(_0x2788ab(0x19a))/0x9)+parseInt(_0x2788ab(0x198))/0xa*(-parseInt(_0x2788ab(0x18e))/0xb);if(_0x208471===_0x477829)break;else _0x44dc67['push'](_0x44dc67['shift']());}catch(_0x40136c){_0x44dc67['push'](_0x44dc67['shift']());}}}(a149_0x176f,0xb0668));function a149_0xb94a(_0x13ab1a,_0x2fa5b3){_0x13ab1a=_0x13ab1a-0x180;const _0x176f59=a149_0x176f();let _0xb94ae4=_0x176f59[_0x13ab1a];return _0xb94ae4;}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(_0x3be32f){const _0x464f01=a149_0xb94a,_0x148e9c=normalizeLocalFiles(_0x3be32f);if(!_0x148e9c['some'](_0x3d36d3=>_0x3d36d3[_0x464f01(0x1a1)]===SKILL_FILE))throw CliErrors['validation'](_0x464f01(0x182)+SKILL_FILE+_0x464f01(0x187));const _0xced7e0=localFilesToManifestFiles(_0x148e9c),_0x5ca0d9=createDeterministicZipPackage(_0x148e9c);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0xced7e0),'zipSha256':bufferSha256(_0x5ca0d9),'zipSize':_0x5ca0d9[_0x464f01(0x19d)],'files':_0xced7e0},'packageBytes':_0x5ca0d9,'packageBase64':_0x5ca0d9['toString']('base64')};}export function verifyRuntimeSkillPackage(_0x33a359,_0x68e7f2){const _0x5ad9b7=a149_0xb94a,_0x17ee84=normalizePackageManifest(_0x33a359,{'requireOssPath':![]});if(!_0x17ee84)throw CliErrors[_0x5ad9b7(0x192)](_0x5ad9b7(0x18c));return extractAndVerifyPackage(_0x17ee84,_0x68e7f2);}export function verifyRuntimeSkillBundle(_0x53c5a9,_0x106767){const _0x4606d9=a149_0xb94a,_0x3924f7=normalizePackageManifest(_0x53c5a9,{'requireOssPath':![]});if(!_0x3924f7)throw CliErrors[_0x4606d9(0x192)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x3924f7,_0x106767);}export function tryNormalizePackageManifest(_0x132dcd){return normalizePackageManifest(_0x132dcd,{'requireOssPath':![]});}export function requirePackageBytes(_0x296a96,_0x9673d0){const _0x27ac79=a149_0xb94a;if(!_0x9673d0||_0x9673d0[_0x27ac79(0x19d)]===0x0)throw CliErrors['validation'](_0x27ac79(0x1a2)+_0x296a96);return _0x9673d0;}export function extractDownloadedPackage(_0x1d4f24){const _0x3bc47f=a149_0xb94a,_0x3d0c9b=parseZipPackage(_0x1d4f24)[_0x3bc47f(0x19c)](_0x4c5da0=>({'path':_0x4c5da0[_0x3bc47f(0x1a1)],'bytes':_0x4c5da0[_0x3bc47f(0x190)]}));if(!_0x3d0c9b[_0x3bc47f(0x19e)](_0x432f52=>_0x432f52[_0x3bc47f(0x1a1)]===SKILL_FILE))throw CliErrors[_0x3bc47f(0x192)](_0x3bc47f(0x199)+SKILL_FILE+'.');return normalizeLocalFiles(_0x3d0c9b);}export function localFilesToManifestFiles(_0x1c7cfe){const _0x1599e1=a149_0xb94a;return normalizeLocalFiles(_0x1c7cfe)[_0x1599e1(0x19c)](_0x5dbc2f=>({'path':_0x5dbc2f['path'],'sha256':fileHash(_0x5dbc2f),'size':fileContent(_0x5dbc2f)[_0x1599e1(0x19d)]}));}function normalizePackageManifest(_0x1b08ad,_0x55ad67){const _0x495cef=a149_0xb94a;if(!_0x1b08ad||typeof _0x1b08ad!==_0x495cef(0x1a3)||Array['isArray'](_0x1b08ad))return undefined;const _0x1f5e4=_0x1b08ad,_0x41123c=typeof _0x1f5e4['ossPath']===_0x495cef(0x1ad)?_0x1f5e4[_0x495cef(0x1ae)][_0x495cef(0x1a7)]():undefined;if(_0x55ad67[_0x495cef(0x18f)]&&!_0x41123c)return undefined;if(!Array['isArray'](_0x1f5e4[_0x495cef(0x1a5)])||_0x1f5e4[_0x495cef(0x1a5)][_0x495cef(0x19d)]===0x0)return undefined;if(!isSha256Hex(_0x1f5e4[_0x495cef(0x1ac)]))throw CliErrors[_0x495cef(0x192)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x1f5e4[_0x495cef(0x194)]))throw CliErrors[_0x495cef(0x192)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number['isSafeInteger'](_0x1f5e4[_0x495cef(0x18d)])||_0x1f5e4[_0x495cef(0x18d)]<0x0)throw CliErrors[_0x495cef(0x192)](_0x495cef(0x1a6));const _0x3f41f8=normalizeManifestFiles(_0x1f5e4[_0x495cef(0x1a5)]);if(!_0x3f41f8['some'](_0x10d41d=>_0x10d41d[_0x495cef(0x1a1)]===SKILL_FILE))throw CliErrors[_0x495cef(0x192)](_0x495cef(0x183)+SKILL_FILE+'.');const _0x24ecb8=fileTreeHash(_0x3f41f8);if(_0x24ecb8!==_0x1f5e4[_0x495cef(0x1ac)][_0x495cef(0x186)]())throw CliErrors['validation'](_0x495cef(0x185));return{'schemaVersion':Number['isSafeInteger'](_0x1f5e4[_0x495cef(0x195)])?_0x1f5e4[_0x495cef(0x195)]:0x2,'ossPath':_0x41123c,'treeSha256':_0x24ecb8,'zipSha256':_0x1f5e4['zipSha256'][_0x495cef(0x186)](),'zipSize':_0x1f5e4[_0x495cef(0x18d)],'files':_0x3f41f8};}function extractAndVerifyPackage(_0x37a8a4,_0x24beba){const _0x9e9a42=a149_0xb94a,_0x3e4c31=normalizePackageManifest(_0x37a8a4,{'requireOssPath':![]});if(!_0x3e4c31)throw CliErrors[_0x9e9a42(0x192)](_0x9e9a42(0x18c));if(_0x24beba['length']!==_0x3e4c31[_0x9e9a42(0x18d)])throw CliErrors['validation'](_0x9e9a42(0x1a4));const _0x203c91=bufferSha256(_0x24beba);if(_0x203c91!==_0x3e4c31[_0x9e9a42(0x194)])throw CliErrors['validation'](_0x9e9a42(0x197));return extractAndVerifyPackageFiles(_0x3e4c31,_0x24beba);}function extractAndVerifyPackageFiles(_0x24c337,_0x1555dc){const _0x13ad46=a149_0xb94a,_0x21d63e=parseZipPackage(_0x1555dc);if(_0x21d63e[_0x13ad46(0x19d)]!==_0x24c337[_0x13ad46(0x1a5)]['length'])throw CliErrors[_0x13ad46(0x192)](_0x13ad46(0x191));const _0x3cd034=new Map();for(const _0x5ac604 of _0x21d63e){if(_0x3cd034[_0x13ad46(0x19b)](_0x5ac604[_0x13ad46(0x1a1)]))throw CliErrors[_0x13ad46(0x192)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x5ac604[_0x13ad46(0x1a1)]);_0x3cd034[_0x13ad46(0x1a0)](_0x5ac604[_0x13ad46(0x1a1)],_0x5ac604);}const _0x233118=[];for(const _0xe3d852 of _0x24c337['files']){const _0xb57372=_0x3cd034[_0x13ad46(0x19f)](_0xe3d852['path']);if(!_0xb57372)throw CliErrors[_0x13ad46(0x192)](_0x13ad46(0x1aa)+_0xe3d852[_0x13ad46(0x1a1)]);if(_0xb57372[_0x13ad46(0x190)][_0x13ad46(0x19d)]!==_0xe3d852['size'])throw CliErrors[_0x13ad46(0x192)](_0x13ad46(0x1ab)+_0xe3d852['path']);const _0x5b8d63=bufferSha256(_0xb57372[_0x13ad46(0x190)]);if(_0x5b8d63!==_0xe3d852[_0x13ad46(0x193)])throw CliErrors[_0x13ad46(0x192)](_0x13ad46(0x1a8)+_0xe3d852[_0x13ad46(0x1a1)]);_0x233118[_0x13ad46(0x180)]({'path':_0xe3d852[_0x13ad46(0x1a1)],'bytes':_0xb57372[_0x13ad46(0x190)]});}return normalizeLocalFiles(_0x233118);}function a149_0x176f(){const _0x37cf69=['path','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','object','Runtime\x20Skill\x20package\x20size\x20mismatch.','files','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','trim','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','52FvXxSi','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','treeSha256','string','ossPath','push','2395356cwXQob','Missing\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','378296FMkILx','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','toLowerCase','\x20in\x20Skill\x20file\x20package.','1337904gbyvza','4049847aVAJwz','2iyxIGb','306540CwAlPD','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','zipSize','22FOueeA','requireOssPath','bytes','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','validation','sha256','zipSha256','schemaVersion','3261972oukAUI','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','16551410gfBDUV','Runtime\x20Skill\x20package\x20is\x20missing\x20','117rTzkUb','has','map','length','some','get','set'];a149_0x176f=function(){return _0x37cf69;};return a149_0x176f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f7f46,_0x46bb98){var _0x3faffa=a150_0x13c4,_0x1944c9=_0x4f7f46();while(!![]){try{var _0xc64023=parseInt(_0x3faffa(0x16a))/0x1*(-parseInt(_0x3faffa(0x170))/0x2)+-parseInt(_0x3faffa(0x16c))/0x3+parseInt(_0x3faffa(0x171))/0x4*(-parseInt(_0x3faffa(0x167))/0x5)+-parseInt(_0x3faffa(0x16d))/0x6*(-parseInt(_0x3faffa(0x16f))/0x7)+parseInt(_0x3faffa(0x166))/0x8+-parseInt(_0x3faffa(0x168))/0x9*(parseInt(_0x3faffa(0x16e))/0xa)+parseInt(_0x3faffa(0x16b))/0xb*(parseInt(_0x3faffa(0x169))/0xc);if(_0xc64023===_0x46bb98)break;else _0x1944c9['push'](_0x1944c9['shift']());}catch(_0x457531){_0x1944c9['push'](_0x1944c9['shift']());}}}(a150_0x2cb6,0x524d1));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a150_0x2cb6(){var _0x3f12b5=['24YdMETo','68164AFqmMl','2814792XWTxcZ','10WkjKBD','136917BXsrdt','12ciPKaE','52187SJpkDN','8891300vrFasU','1279287DYodJq','2334QHBCNc','100UnbZPR','7483XTGuNW'];a150_0x2cb6=function(){return _0x3f12b5;};return a150_0x2cb6();}function a150_0x13c4(_0x330718,_0xd38251){_0x330718=_0x330718-0x166;var _0x2cb662=a150_0x2cb6();var _0x13c48f=_0x2cb662[_0x330718];return _0x13c48f;}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a151_0x227c36=a151_0xd040;(function(_0x20030d,_0xed971b){const _0x20ecb1=a151_0xd040,_0x16cd94=_0x20030d();while(!![]){try{const _0x20f22a=parseInt(_0x20ecb1(0x183))/0x1*(-parseInt(_0x20ecb1(0x17c))/0x2)+-parseInt(_0x20ecb1(0x19a))/0x3*(parseInt(_0x20ecb1(0x199))/0x4)+-parseInt(_0x20ecb1(0x180))/0x5*(parseInt(_0x20ecb1(0x186))/0x6)+parseInt(_0x20ecb1(0x198))/0x7*(parseInt(_0x20ecb1(0x17e))/0x8)+parseInt(_0x20ecb1(0x194))/0x9*(-parseInt(_0x20ecb1(0x184))/0xa)+-parseInt(_0x20ecb1(0x1a0))/0xb+parseInt(_0x20ecb1(0x17b))/0xc*(parseInt(_0x20ecb1(0x187))/0xd);if(_0x20f22a===_0xed971b)break;else _0x16cd94['push'](_0x16cd94['shift']());}catch(_0x6db5b7){_0x16cd94['push'](_0x16cd94['shift']());}}}(a151_0x1414,0xa50b0));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a151_0x227c36(0x17f));function a151_0xd040(_0x1f3ee9,_0x10c581){_0x1f3ee9=_0x1f3ee9-0x17b;const _0x1414ae=a151_0x1414();let _0xd040ab=_0x1414ae[_0x1f3ee9];return _0xd040ab;}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a151_0x227c36(0x182),a151_0x227c36(0x189)),join(a151_0x227c36(0x181),a151_0x227c36(0x189))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x29f6a1,_0x48ed5e){const _0x3fe47f=a151_0x227c36;if(!existsSync(_0x29f6a1))return{'kind':_0x3fe47f(0x185)};let _0x46718e;try{_0x46718e=JSON[_0x3fe47f(0x193)](readFileSync(_0x29f6a1,_0x3fe47f(0x19b)));}catch(_0x5b56e6){return{'kind':_0x3fe47f(0x19e),'reason':_0x29f6a1+_0x3fe47f(0x18d)+_0x5b56e6[_0x3fe47f(0x19d)]};}const _0x51cf2a=_0x46718e;if(typeof _0x51cf2a?.[_0x3fe47f(0x18a)]!==_0x3fe47f(0x18b)||!SUPPORTED_LOCK_VERSIONS[_0x3fe47f(0x196)](_0x51cf2a[_0x3fe47f(0x18a)]))return{'kind':_0x3fe47f(0x19e),'reason':_0x29f6a1+_0x3fe47f(0x190)+String(_0x51cf2a?.[_0x3fe47f(0x18a)])};if(!_0x51cf2a['skills']||typeof _0x51cf2a[_0x3fe47f(0x189)]!=='object')return{'kind':_0x3fe47f(0x19e),'reason':_0x29f6a1+_0x3fe47f(0x192)};return _0x51cf2a[_0x3fe47f(0x189)][_0x48ed5e]?{'kind':_0x3fe47f(0x191)}:{'kind':_0x3fe47f(0x185)};}export function resolveInstalledSkill(_0x47cf8d,_0x51b285){const _0x343ce7=a151_0x227c36,_0x1bd0f6=_0x51b285?.[_0x343ce7(0x17d)]??homedir(),_0x271da3=_0x51b285?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x343ce7(0x197)](_0x4d8fd2=>join(_0x1bd0f6,_0x4d8fd2)),_0x53578a=_0x51b285?.[_0x343ce7(0x1a1)]??join(_0x1bd0f6,SKILL_LOCK_RELATIVE_PATH),_0x3d8a4a=_0x271da3[_0x343ce7(0x197)](_0x474eef=>join(_0x474eef,_0x47cf8d,'SKILL.md')),_0x1e458f=_0x3d8a4a[_0x343ce7(0x195)](_0x4289ad=>existsSync(_0x4289ad));if(_0x1e458f)return{'state':_0x343ce7(0x188),'path':_0x1e458f};const _0x147bef=readLockLookup(_0x53578a,_0x47cf8d);if(_0x147bef[_0x343ce7(0x18e)]==='unusable')return{'state':_0x343ce7(0x19f),'reason':_0x147bef['reason']};if(_0x147bef[_0x343ce7(0x18e)]===_0x343ce7(0x191))return{'state':_0x343ce7(0x19f),'reason':_0x53578a+_0x343ce7(0x18c)+_0x47cf8d+_0x343ce7(0x19c)+('('+_0x3d8a4a['join'](',\x20')+')')};return{'state':_0x343ce7(0x18f),'checked':_0x3d8a4a};}function a151_0x1414(){const _0xd5d54e=['present','skills','version','number','\x20records\x20\x22','\x20is\x20unreadable:\x20','kind','absent','\x20uses\x20unsupported\x20version\x20','recorded','\x20has\x20no\x20skills\x20map','parse','3715695kqkuBa','find','includes','map','3208436GZoDAb','4577908MUDrWo','3tSpQtO','utf8','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','message','unusable','unverifiable','4362501fBAfdB','lockFile','32231076zbBWCo','14ryHvXT','home','16GIuQVp','.skill-lock.json','400255vpQovv','.claude','.agents','81775nPByFY','10LlGOxw','not-recorded','30WBtTAG','13iuZInQ'];a151_0x1414=function(){return _0xd5d54e;};return a151_0x1414();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a152_0x39e5d5=a152_0x12c2;function a152_0x12c2(_0x44c21c,_0x427159){_0x44c21c=_0x44c21c-0x1ab;const _0x1335cd=a152_0x1335();let _0x12c2d4=_0x1335cd[_0x44c21c];return _0x12c2d4;}(function(_0x472920,_0x28ba48){const _0x2a2398=a152_0x12c2,_0x400df9=_0x472920();while(!![]){try{const _0x9c48a2=parseInt(_0x2a2398(0x1b4))/0x1*(parseInt(_0x2a2398(0x1ba))/0x2)+parseInt(_0x2a2398(0x1ab))/0x3*(-parseInt(_0x2a2398(0x1c0))/0x4)+parseInt(_0x2a2398(0x1bb))/0x5*(-parseInt(_0x2a2398(0x1b1))/0x6)+-parseInt(_0x2a2398(0x1c3))/0x7+parseInt(_0x2a2398(0x1bc))/0x8*(parseInt(_0x2a2398(0x1b9))/0x9)+-parseInt(_0x2a2398(0x1b0))/0xa+-parseInt(_0x2a2398(0x1ad))/0xb*(-parseInt(_0x2a2398(0x1be))/0xc);if(_0x9c48a2===_0x28ba48)break;else _0x400df9['push'](_0x400df9['shift']());}catch(_0x50d0b7){_0x400df9['push'](_0x400df9['shift']());}}}(a152_0x1335,0x3fc7f));const REDACTED_ACCESS_KEY=a152_0x39e5d5(0x1ac);export function maskCliAccessKey(_0x54a805){const _0x3ad303=a152_0x39e5d5;if(typeof _0x54a805!==_0x3ad303(0x1c2)||_0x54a805[_0x3ad303(0x1c1)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x54a805[_0x3ad303(0x1b5)](0x0,0x8)+'*'[_0x3ad303(0x1c6)](_0x54a805['length']-0x8);}export function redactCliConfigCredentials(_0x23a22d){const _0x1696ac=a152_0x39e5d5,_0x1479ef={..._0x23a22d};return Object[_0x1696ac(0x1bd)]['hasOwnProperty'][_0x1696ac(0x1af)](_0x1479ef,_0x1696ac(0x1b8))&&(_0x1479ef[_0x1696ac(0x1b8)]=maskCliAccessKey(_0x1479ef[_0x1696ac(0x1b8)])),_0x1479ef['apps']&&typeof _0x1479ef[_0x1696ac(0x1b6)]===_0x1696ac(0x1ae)&&!Array[_0x1696ac(0x1b2)](_0x1479ef[_0x1696ac(0x1b6)])&&(_0x1479ef['apps']=redactLegacyAppCredentials(_0x1479ef[_0x1696ac(0x1b6)])),_0x1479ef;}export function redactCliConfigValue(_0x2b3551,_0x576fcf){const _0x1ae317=a152_0x39e5d5;if(_0x2b3551===_0x1ae317(0x1b8)||/^apps\.[^.]+\.accessKey$/['test'](_0x2b3551))return maskCliAccessKey(_0x576fcf);if(_0x2b3551==='apps'&&_0x576fcf&&typeof _0x576fcf===_0x1ae317(0x1ae)&&!Array[_0x1ae317(0x1b2)](_0x576fcf))return redactLegacyAppCredentials(_0x576fcf);if(/^apps\.[^.]+$/[_0x1ae317(0x1c4)](_0x2b3551)&&_0x576fcf&&typeof _0x576fcf===_0x1ae317(0x1ae)&&!Array[_0x1ae317(0x1b2)](_0x576fcf)){const _0x408988=_0x576fcf;return Object[_0x1ae317(0x1bd)][_0x1ae317(0x1b7)][_0x1ae317(0x1af)](_0x408988,_0x1ae317(0x1b8))?{..._0x408988,'accessKey':maskCliAccessKey(_0x408988[_0x1ae317(0x1b8)])}:_0x576fcf;}return _0x576fcf;}function a152_0x1335(){const _0x86d695=['325LntktN','8LYpKGH','prototype','136044qUXHRj','map','1430836SHulsw','length','string','2357929XXkLrc','test','entries','repeat','3yuOesw','<redacted>','737cRHPVF','object','call','3522740YjrEtc','23910FDXtqU','isArray','fromEntries','43100TvdJwR','slice','apps','hasOwnProperty','accessKey','3776607cvNrTm','18UvxJIT'];a152_0x1335=function(){return _0x86d695;};return a152_0x1335();}function redactLegacyAppCredentials(_0x5d8708){const _0x165bf6=a152_0x39e5d5;return Object[_0x165bf6(0x1b3)](Object[_0x165bf6(0x1c5)](_0x5d8708)[_0x165bf6(0x1bf)](([_0xb892c6,_0x5930aa])=>{const _0x4000e1=_0x165bf6;if(!_0x5930aa||typeof _0x5930aa!=='object'||Array[_0x4000e1(0x1b2)](_0x5930aa))return[_0xb892c6,_0x5930aa];const _0x3ddda2={..._0x5930aa};return Object['prototype']['hasOwnProperty'][_0x4000e1(0x1af)](_0x3ddda2,_0x4000e1(0x1b8))&&(_0x3ddda2['accessKey']=maskCliAccessKey(_0x3ddda2[_0x4000e1(0x1b8)])),[_0xb892c6,_0x3ddda2];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0xdc0d(){const _0x1828de=['114710cVKfPD','14102656inHSez','23789953cQkDOj','747hNIREq','2369875ylLqKP','3201919PiHNFG','4553988aLDRix','16uaJMCr','6nSqzMw','103158nKatVO','1kAgToG'];a153_0xdc0d=function(){return _0x1828de;};return a153_0xdc0d();}function a153_0x20d5(_0x1f7e1a,_0x424654){_0x1f7e1a=_0x1f7e1a-0x158;const _0xdc0df4=a153_0xdc0d();let _0x20d5f7=_0xdc0df4[_0x1f7e1a];return _0x20d5f7;}(function(_0x1432e9,_0x54dea3){const _0x5f10cf=a153_0x20d5,_0xd3be15=_0x1432e9();while(!![]){try{const _0x1eeb41=-parseInt(_0x5f10cf(0x15f))/0x1*(-parseInt(_0x5f10cf(0x15e))/0x2)+parseInt(_0x5f10cf(0x15b))/0x3+-parseInt(_0x5f10cf(0x15c))/0x4*(-parseInt(_0x5f10cf(0x159))/0x5)+-parseInt(_0x5f10cf(0x15d))/0x6*(-parseInt(_0x5f10cf(0x15a))/0x7)+-parseInt(_0x5f10cf(0x161))/0x8+parseInt(_0x5f10cf(0x158))/0x9*(parseInt(_0x5f10cf(0x160))/0xa)+-parseInt(_0x5f10cf(0x162))/0xb;if(_0x1eeb41===_0x54dea3)break;else _0xd3be15['push'](_0xd3be15['shift']());}catch(_0x446239){_0xd3be15['push'](_0xd3be15['shift']());}}}(a153_0xdc0d,0xe7cb6));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47e4cd,_0x1a4e79){const _0x5b32da=a154_0x3ea3,_0x15dee8=_0x47e4cd();while(!![]){try{const _0x533de1=parseInt(_0x5b32da(0x126))/0x1+-parseInt(_0x5b32da(0x119))/0x2*(parseInt(_0x5b32da(0x11e))/0x3)+parseInt(_0x5b32da(0x127))/0x4+parseInt(_0x5b32da(0x125))/0x5+parseInt(_0x5b32da(0x120))/0x6+-parseInt(_0x5b32da(0x12c))/0x7+-parseInt(_0x5b32da(0x118))/0x8*(-parseInt(_0x5b32da(0x117))/0x9);if(_0x533de1===_0x1a4e79)break;else _0x15dee8['push'](_0x15dee8['shift']());}catch(_0x454c5e){_0x15dee8['push'](_0x15dee8['shift']());}}}(a154_0x299a,0x5dbf3));import a154_0x57fa2b from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x310c2c,_0x1d578d){const _0xa4aee=a154_0x3ea3,_0x1b5830=a154_0x57fa2b[_0xa4aee(0x115)](_0x310c2c)===_0x310c2c,_0x29b443=_0x1d578d?.[_0xa4aee(0x122)]??null,_0x58412a=_0x1d578d?.[_0xa4aee(0x128)]??null,_0x40920a=Boolean(_0x1b5830&&_0x29b443&&a154_0x57fa2b['lt'](_0x310c2c,_0x29b443)),_0x1c3718=Boolean(_0x1b5830&&_0x58412a&&a154_0x57fa2b['lt'](_0x310c2c,_0x58412a));return{'currentVersion':_0x310c2c,'stableVersion':_0x29b443,'minimumVersion':_0x58412a,'needsUpgrade':_0x40920a||_0x1c3718,'belowMinimum':_0x1c3718,'upgradeMessage':_0x1d578d?.[_0xa4aee(0x116)],'minimumVersionMessage':_0x1d578d?.[_0xa4aee(0x123)]};}function a154_0x299a(){const _0x109683=['69220IyUQZq','minimumVersion','join','belowMinimum','filter','1712690DJqSOJ','Minimum\x20supported:\x20','valid','upgradeMessage','215334NhnUew','216RMucmc','4DdNAmO','currentVersion','validation','unavailable','npm\x20install\x20-g\x20','1009491tsdqbP','latest','953202DOwqHQ','Upgrade\x20command:\x20','stableVersion','minimumVersionMessage','Current\x20version:\x20','1030695NNZaQL','273338NtRETk'];a154_0x299a=function(){return _0x109683;};return a154_0x299a();}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a154_0x3ea3(_0x3f87d7,_0x1abd94){_0x3f87d7=_0x3f87d7-0x115;const _0x299a9f=a154_0x299a();let _0x3ea3e6=_0x299a9f[_0x3f87d7];return _0x3ea3e6;}export function getCliUpgradeCommand(_0x255a39){const _0x679183=a154_0x3ea3;return _0x679183(0x11d)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x255a39[_0x679183(0x122)]??_0x679183(0x11f));}export function assertCliVersionSupported(_0x31c291){const _0x2bdf3c=a154_0x3ea3;if(!_0x31c291[_0x2bdf3c(0x12a)])return;const _0x330dcd=[_0x31c291['minimumVersionMessage'],_0x2bdf3c(0x124)+_0x31c291[_0x2bdf3c(0x11a)],_0x2bdf3c(0x12d)+_0x31c291['minimumVersion'],'Recommended\x20stable:\x20'+(_0x31c291[_0x2bdf3c(0x122)]??_0x2bdf3c(0x11c)),_0x2bdf3c(0x121)+getCliUpgradeCommand(_0x31c291)][_0x2bdf3c(0x12b)](Boolean)[_0x2bdf3c(0x129)]('\x0a');throw CliErrors[_0x2bdf3c(0x11b)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x330dcd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e4522,_0x5ea68e){const _0x1964ed=a155_0x5d04,_0x27435b=_0x3e4522();while(!![]){try{const _0x13e2c7=parseInt(_0x1964ed(0xac))/0x1+-parseInt(_0x1964ed(0xab))/0x2*(-parseInt(_0x1964ed(0xa7))/0x3)+parseInt(_0x1964ed(0xa1))/0x4+-parseInt(_0x1964ed(0x9d))/0x5*(parseInt(_0x1964ed(0x9b))/0x6)+parseInt(_0x1964ed(0xa2))/0x7*(parseInt(_0x1964ed(0x9e))/0x8)+-parseInt(_0x1964ed(0xaa))/0x9*(parseInt(_0x1964ed(0x98))/0xa)+-parseInt(_0x1964ed(0x9a))/0xb;if(_0x13e2c7===_0x5ea68e)break;else _0x27435b['push'](_0x27435b['shift']());}catch(_0x498720){_0x27435b['push'](_0x27435b['shift']());}}}(a155_0x540b,0x6bcb7));import a155_0x5bb0ed from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x3fc817){const _0x296403=a155_0x5d04;return typeof _0x3fc817===_0x296403(0xa9)&&_0x3fc817['trim']()?_0x3fc817[_0x296403(0x9c)]():null;}function pickStrictSemver(_0x20a268){const _0x45e43a=pickString(_0x20a268);return _0x45e43a&&a155_0x5bb0ed['valid'](_0x45e43a)===_0x45e43a?_0x45e43a:null;}export function normalizeCliVersionPolicy(_0x22f364){const _0xa476e8=a155_0x5d04;if(!_0x22f364||typeof _0x22f364!==_0xa476e8(0xa3))return null;const _0xd1f12e=_0x22f364,_0x1883e6=_0xd1f12e['cli']&&typeof _0xd1f12e[_0xa476e8(0x96)]===_0xa476e8(0xa3)?_0xd1f12e[_0xa476e8(0x96)]:_0xd1f12e,_0x3ea576=pickStrictSemver(_0x1883e6['stableVersion']??_0x1883e6['latestVersion']??_0x1883e6[_0xa476e8(0xa5)]),_0x194956=pickStrictSemver(_0x1883e6[_0xa476e8(0x97)]??_0x1883e6[_0xa476e8(0xa8)]);if(!_0x3ea576&&!_0x194956)return null;if(_0x3ea576&&_0x194956&&a155_0x5bb0ed['gt'](_0x194956,_0x3ea576))return null;return{'stableVersion':_0x3ea576,'minimumVersion':_0x194956,'upgradeMessage':pickString(_0x1883e6[_0xa476e8(0x99)])??undefined,'minimumVersionMessage':pickString(_0x1883e6['minimumVersionMessage'])??undefined};}function a155_0x540b(){const _0x571176=['cli','minimumVersion','587010jsHYJC','upgradeMessage','1353132EwoyPv','25476OJysrD','trim','140LdasBX','8YtJMzO','timeout','json','3383564iCPtJU','2655772PpMbgf','object','now','recommendedVersion','finally','685563tcTrhb','minVersion','string','126SkUwwe','2mwaMVf','51433FPxbrg'];a155_0x540b=function(){return _0x571176;};return a155_0x540b();}function a155_0x5d04(_0xbae86b,_0x4d5176){_0xbae86b=_0xbae86b-0x96;const _0x540bb0=a155_0x540b();let _0x5d04da=_0x540bb0[_0xbae86b];return _0x5d04da;}export async function fetchCliVersionPolicy(){const _0x98b98=a155_0x5d04;try{const _0x5d5425=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':AbortSignal[_0x98b98(0x9f)](FETCH_TIMEOUT_MS)});if(!_0x5d5425['ok'])return null;return normalizeCliVersionPolicy(await _0x5d5425[_0x98b98(0xa0)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x23257e=a155_0x5d04,_0x4576d1=Date[_0x23257e(0xa4)]();if(hasCachedPolicy){const _0x47b7e8=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x4576d1-cachedAt<_0x47b7e8)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()['then'](_0x2517ec=>{const _0x57d9ac=_0x23257e;return cachedPolicy=_0x2517ec,cachedAt=Date[_0x57d9ac(0xa4)](),hasCachedPolicy=!![],_0x2517ec;})[_0x23257e(0xa6)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x143a4b=a156_0x5b55;function a156_0x5b55(_0x5c81f8,_0x51bd1c){_0x5c81f8=_0x5c81f8-0x1ee;const _0x731675=a156_0x7316();let _0x5b55af=_0x731675[_0x5c81f8];return _0x5b55af;}(function(_0x1eefba,_0x4c5663){const _0x1a3572=a156_0x5b55,_0x217d60=_0x1eefba();while(!![]){try{const _0x4bb584=parseInt(_0x1a3572(0x210))/0x1*(parseInt(_0x1a3572(0x22a))/0x2)+parseInt(_0x1a3572(0x219))/0x3+parseInt(_0x1a3572(0x20a))/0x4*(parseInt(_0x1a3572(0x222))/0x5)+-parseInt(_0x1a3572(0x1f4))/0x6+-parseInt(_0x1a3572(0x1f9))/0x7*(-parseInt(_0x1a3572(0x20b))/0x8)+-parseInt(_0x1a3572(0x21b))/0x9*(parseInt(_0x1a3572(0x224))/0xa)+-parseInt(_0x1a3572(0x215))/0xb;if(_0x4bb584===_0x4c5663)break;else _0x217d60['push'](_0x217d60['shift']());}catch(_0x42b20a){_0x217d60['push'](_0x217d60['shift']());}}}(a156_0x7316,0x61761));import a156_0x3781fc from'winston';function a156_0x7316(){const _0x2ca8b3=['1508yNarlu','1016PAsmOW','unknown','duration','setRawCommand','filter','1MkbhoE','blue','logFileName','dirname','stringify','4014384TfEnfD','printf','format','message','639810pmMkBk','File','162wYnzuc','yellow','map','addColors','Failed:\x20','Failed\x20to\x20read\x20logs:','initWinstonLogger','4735BhDBrY','level','392970HeSrbb','winstonLogger','success','combine','createLogger','mkdirSync','1568472KMddSk','existsSync','utf8','errors','parse','currentRawCommand','toISOString','3778002PnsUGW','details','rawCommand','readFileSync','split','41153RvTQoL','error','trim','clear','Starting:\x20','warn','now','setLogPath','join','logFilePath','red','clearLogs','timestamp','info','Failed\x20to\x20clear\x20logs:','Completed:\x20','logTask'];a156_0x7316=function(){return _0x2ca8b3;};return a156_0x7316();}import a156_0x560a8b from'node:fs';import a156_0x4fc9d5 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a156_0x143a4b(0x202)]='';['currentRawCommand']='';constructor(){}[a156_0x143a4b(0x20e)](_0x4a9d71){const _0x495092=a156_0x143a4b;this[_0x495092(0x1f2)]=_0x4a9d71;}[a156_0x143a4b(0x200)](_0x54cc40){const _0x254311=a156_0x143a4b;this['logFilePath']=a156_0x4fc9d5[_0x254311(0x201)](_0x54cc40,PRODUCT_CONFIG[_0x254311(0x212)]),this['winstonLogger']&&this['winstonLogger'][_0x254311(0x1fc)](),this[_0x254311(0x221)]();}['initWinstonLogger'](){const _0x1b1671=a156_0x143a4b,_0xfc7fb0=a156_0x4fc9d5[_0x1b1671(0x213)](this[_0x1b1671(0x202)]);!a156_0x560a8b[_0x1b1671(0x1ee)](_0xfc7fb0)&&a156_0x560a8b[_0x1b1671(0x229)](_0xfc7fb0,{'recursive':!![]});const _0xa97afd=a156_0x3781fc[_0x1b1671(0x217)][_0x1b1671(0x227)](a156_0x3781fc[_0x1b1671(0x217)][_0x1b1671(0x205)](),a156_0x3781fc['format'][_0x1b1671(0x1f0)]({'stack':!![]}),a156_0x3781fc[_0x1b1671(0x217)][_0x1b1671(0x216)](_0x3e2bb8=>{const _0x3fee5e=_0x1b1671,_0x1ab845={'timestamp':_0x3e2bb8[_0x3fee5e(0x205)]||new Date()[_0x3fee5e(0x1f3)](),'level':_0x3e2bb8[_0x3fee5e(0x223)]||_0x3fee5e(0x206),'command':_0x3e2bb8['command']||_0x3fee5e(0x20c),'rawCommand':_0x3e2bb8[_0x3fee5e(0x1f6)]||this['currentRawCommand']||undefined,'message':_0x3e2bb8[_0x3fee5e(0x218)]||'','duration':_0x3e2bb8[_0x3fee5e(0x20d)]||undefined,'details':_0x3e2bb8[_0x3fee5e(0x1f5)]||undefined};return JSON[_0x3fee5e(0x214)](_0x1ab845);}));this['winstonLogger']=a156_0x3781fc[_0x1b1671(0x228)]({'level':_0x1b1671(0x206),'format':_0xa97afd,'transports':[new a156_0x3781fc['transports'][(_0x1b1671(0x21a))]({'filename':this[_0x1b1671(0x202)],'level':_0x1b1671(0x206)})],'silent':![]}),a156_0x3781fc[_0x1b1671(0x21e)]({'success':'green','error':_0x1b1671(0x203),'warn':_0x1b1671(0x21c),'info':_0x1b1671(0x211)});}[a156_0x143a4b(0x206)](_0x319dfe,_0x292156,_0x29dd13){const _0x121355=a156_0x143a4b;if(!this[_0x121355(0x202)]||!this['winstonLogger'])return;this['winstonLogger'][_0x121355(0x206)](_0x292156,{'command':_0x319dfe,'details':_0x29dd13});}[a156_0x143a4b(0x226)](_0x410b1d,_0x2e1d38,_0x2e4389,_0x171f97){const _0x52ca40=a156_0x143a4b;if(!this[_0x52ca40(0x202)]||!this[_0x52ca40(0x225)])return;this[_0x52ca40(0x225)]['log'](_0x52ca40(0x206),_0x2e1d38,{'level':_0x52ca40(0x226),'command':_0x410b1d,'duration':_0x2e4389,'details':_0x171f97});}['error'](_0x15f3bc,_0xa887f8,_0x3bb5af){const _0x198a96=a156_0x143a4b;if(!this[_0x198a96(0x202)]||!this[_0x198a96(0x225)])return;this[_0x198a96(0x225)][_0x198a96(0x1fa)](_0xa887f8,{'command':_0x15f3bc,'details':_0x3bb5af});}[a156_0x143a4b(0x1fe)](_0xac1332,_0x1adc76,_0x118363){const _0x3e2a29=a156_0x143a4b;if(!this[_0x3e2a29(0x202)]||!this[_0x3e2a29(0x225)])return;this['winstonLogger']['warn'](_0x1adc76,{'command':_0xac1332,'details':_0x118363});}async[a156_0x143a4b(0x209)](_0x586f86,_0x5a6daf,_0x35c0ae){const _0x96c8ab=a156_0x143a4b,_0x581972=Date[_0x96c8ab(0x1ff)]();this['info'](_0x586f86,_0x96c8ab(0x1fd)+_0x5a6daf);try{const _0x47fd60=await _0x35c0ae(),_0x564378=Date[_0x96c8ab(0x1ff)]()-_0x581972;return this[_0x96c8ab(0x226)](_0x586f86,_0x96c8ab(0x208)+_0x5a6daf,_0x564378),_0x47fd60;}catch(_0x18c52f){const _0x3807ee=Date[_0x96c8ab(0x1ff)]()-_0x581972;this[_0x96c8ab(0x1fa)](_0x586f86,_0x96c8ab(0x21f)+_0x5a6daf,{'error':_0x18c52f instanceof Error?_0x18c52f['message']:String(_0x18c52f),'duration':_0x3807ee});throw _0x18c52f;}}['readLogs'](){const _0x479747=a156_0x143a4b;try{if(!a156_0x560a8b[_0x479747(0x1ee)](this[_0x479747(0x202)]))return[];const _0x330d36=a156_0x560a8b[_0x479747(0x1f7)](this['logFilePath'],_0x479747(0x1ef));return _0x330d36[_0x479747(0x1f8)](/\r?\n/)[_0x479747(0x20f)](_0xcb10cc=>_0xcb10cc[_0x479747(0x1fb)]())[_0x479747(0x21d)](_0x3aa44c=>JSON[_0x479747(0x1f1)](_0x3aa44c));}catch(_0x1d589){return console[_0x479747(0x1fe)](_0x479747(0x220),_0x1d589),[];}}[a156_0x143a4b(0x204)](){const _0x523bda=a156_0x143a4b;try{a156_0x560a8b[_0x523bda(0x1ee)](this[_0x523bda(0x202)])&&a156_0x560a8b['writeFileSync'](this[_0x523bda(0x202)],'',_0x523bda(0x1ef));}catch(_0x3c9b86){console[_0x523bda(0x1fe)](_0x523bda(0x207),_0x3c9b86);}}['getWinstonInstance'](){const _0x28e6ec=a156_0x143a4b;return this[_0x28e6ec(0x225)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x220a3d=a157_0x2bbd;(function(_0x5ef106,_0x13b41f){const _0x564f2e=a157_0x2bbd,_0x5ca8a0=_0x5ef106();while(!![]){try{const _0x3ee181=parseInt(_0x564f2e(0x164))/0x1+-parseInt(_0x564f2e(0x166))/0x2*(parseInt(_0x564f2e(0x175))/0x3)+parseInt(_0x564f2e(0x16b))/0x4+parseInt(_0x564f2e(0x171))/0x5*(-parseInt(_0x564f2e(0x169))/0x6)+-parseInt(_0x564f2e(0x170))/0x7+-parseInt(_0x564f2e(0x177))/0x8*(-parseInt(_0x564f2e(0x176))/0x9)+-parseInt(_0x564f2e(0x168))/0xa;if(_0x3ee181===_0x13b41f)break;else _0x5ca8a0['push'](_0x5ca8a0['shift']());}catch(_0x38edc0){_0x5ca8a0['push'](_0x5ca8a0['shift']());}}}(a157_0xc6ef,0x80add));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a157_0x220a3d(0x167)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x1f5625){const _0xc37861=a157_0x220a3d;if(_0x1f5625[_0xc37861(0x162)]('.')||_0x1f5625[_0xc37861(0x162)]('e')||_0x1f5625[_0xc37861(0x162)]('E'))return![];const _0x5145b8=BigInt(_0x1f5625);return _0x5145b8>MAX_SAFE_INTEGER||_0x5145b8<MIN_SAFE_INTEGER;}function a157_0x2bbd(_0x52ac94,_0x5cd648){_0x52ac94=_0x52ac94-0x162;const _0xc6ef75=a157_0xc6ef();let _0x2bbd49=_0xc6ef75[_0x52ac94];return _0x2bbd49;}function quoteUnsafeIntegerLiterals(_0x167753){const _0x26642d=a157_0x220a3d;let _0x42684d='',_0x3cb290=![],_0x3682e9=![];for(let _0x3b345d=0x0;_0x3b345d<_0x167753[_0x26642d(0x16e)];){const _0xad594f=_0x167753[_0x3b345d];if(_0x3cb290){_0x42684d+=_0xad594f,_0x3b345d+=0x1;if(_0x3682e9)_0x3682e9=![];else{if(_0xad594f==='\x5c')_0x3682e9=!![];else _0xad594f==='\x22'&&(_0x3cb290=![]);}continue;}if(_0xad594f==='\x22'){_0x3cb290=!![],_0x42684d+=_0xad594f,_0x3b345d+=0x1;continue;}if(_0xad594f==='-'||_0xad594f>='0'&&_0xad594f<='9'){const _0x526683=JSON_NUMBER_PATTERN[_0x26642d(0x16c)](_0x167753[_0x26642d(0x16a)](_0x3b345d))?.[0x0];if(_0x526683){_0x42684d+=isUnsafeIntegerLiteral(_0x526683)?'\x22'+_0x526683+'\x22':_0x526683,_0x3b345d+=_0x526683[_0x26642d(0x16e)];continue;}}_0x42684d+=_0xad594f,_0x3b345d+=0x1;}return _0x42684d;}export function parseLosslessJson(_0x18c0d3){const _0x127fb7=a157_0x220a3d;return JSON[_0x127fb7(0x173)](quoteUnsafeIntegerLiterals(_0x18c0d3));}export function installLosslessJsonResponseParser(){const _0xa2b6a1=a157_0x220a3d;if(typeof Response===_0xa2b6a1(0x172))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0xa2b6a1(0x16d)],originalResponseJsonDescriptor=Object[_0xa2b6a1(0x16f)](responseJsonPrototype,_0xa2b6a1(0x163)),Object[_0xa2b6a1(0x165)](responseJsonPrototype,_0xa2b6a1(0x163),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x1cb641(){const _0x598199=_0xa2b6a1;return parseLosslessJson(await this[_0x598199(0x174)]());}}),restoreResponseJsonParser=()=>{const _0x434005=_0xa2b6a1;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x434005(0x165)](responseJsonPrototype,_0x434005(0x163),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x434005(0x163)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a157_0xc6ef(){const _0x752098=['MIN_SAFE_INTEGER','1808640UepSxb','4887354gNtleb','slice','1584844YOqnsP','exec','prototype','length','getOwnPropertyDescriptor','832916aRJeFi','5McgzMm','undefined','parse','text','63ntFPes','18ZDVITe','2392648ZLLpJa','includes','json','759898ndYpTY','defineProperty','10742ABARic'];a157_0xc6ef=function(){return _0x752098;};return a157_0xc6ef();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a158_0x1969(_0x3b8332,_0x38b43d){_0x3b8332=_0x3b8332-0x14c;const _0x5d990d=a158_0x5d99();let _0x19699f=_0x5d990d[_0x3b8332];return _0x19699f;}function a158_0x5d99(){const _0x16b581=['isArray','object','join','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','648248tstKPm','number','data\x20update\x20can\x20update\x20at\x20most\x20','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Invalid\x20JSON\x20for\x20--params:\x20','673835zTDzzS','666804rtVPiQ','72988vGmldl','string','606528VcHFTg','data\x20update\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','id[','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','14432710nycsyu','validation','7OHUBgu','1144266KPkMkF','length','map','9VtQPzM','items','95zYXZRl'];a158_0x5d99=function(){return _0x16b581;};return a158_0x5d99();}(function(_0x2aab44,_0x179e90){const _0x2b0c23=a158_0x1969,_0x466cc7=_0x2aab44();while(!![]){try{const _0x24a9e7=-parseInt(_0x2b0c23(0x159))/0x1+-parseInt(_0x2b0c23(0x15a))/0x2+parseInt(_0x2b0c23(0x15d))/0x3+-parseInt(_0x2b0c23(0x15b))/0x4*(parseInt(_0x2b0c23(0x14f))/0x5)+parseInt(_0x2b0c23(0x166))/0x6*(parseInt(_0x2b0c23(0x165))/0x7)+-parseInt(_0x2b0c23(0x154))/0x8+parseInt(_0x2b0c23(0x14d))/0x9*(parseInt(_0x2b0c23(0x163))/0xa);if(_0x24a9e7===_0x179e90)break;else _0x466cc7['push'](_0x466cc7['shift']());}catch(_0x5262c5){_0x466cc7['push'](_0x466cc7['shift']());}}}(a158_0x5d99,0x61f2d));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x262635){const _0x3174ee=a158_0x1969;if(!_0x262635)return undefined;try{return parseLosslessJson(_0x262635);}catch{throw CliErrors['validation'](_0x3174ee(0x158)+_0x262635);}}export function parseJsonParamsValue(_0x2b2176){const _0x495ce8=a158_0x1969;if(!_0x2b2176)return undefined;try{return parseLosslessJson(_0x2b2176);}catch{throw CliErrors[_0x495ce8(0x164)](_0x495ce8(0x158)+_0x2b2176);}}export function parseBatchCreateItemsFromParams(_0x138ea1){const _0x2fb724=a158_0x1969;if(Array[_0x2fb724(0x150)](_0x138ea1))return _0x138ea1;if(_0x138ea1!==null&&_0x138ea1!==undefined&&typeof _0x138ea1===_0x2fb724(0x151)&&Array[_0x2fb724(0x150)](_0x138ea1[_0x2fb724(0x14e)]))return _0x138ea1[_0x2fb724(0x14e)];throw CliErrors[_0x2fb724(0x164)](_0x2fb724(0x157),_0x2fb724(0x162));}function parseDataUpdateId(_0x58e6f8,_0x551cdc){const _0x45f432=a158_0x1969;if(typeof _0x58e6f8===_0x45f432(0x155)&&Number['isSafeInteger'](_0x58e6f8)&&_0x58e6f8>0x0)return _0x58e6f8;if(typeof _0x58e6f8===_0x45f432(0x15c)){if(/^[1-9]\d*$/['test'](_0x58e6f8))return _0x58e6f8;}throw CliErrors[_0x45f432(0x164)](_0x45f432(0x15e)+_0x551cdc+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}export function parseUpdateIdsFromParams(_0x22e5aa){const _0x3ea45b=a158_0x1969;if(_0x22e5aa===null||_0x22e5aa===undefined||typeof _0x22e5aa!==_0x3ea45b(0x151)||Array['isArray'](_0x22e5aa))throw CliErrors[_0x3ea45b(0x164)]('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 _0x21e3f6=_0x22e5aa['id'];if(_0x21e3f6===undefined||_0x21e3f6===null)throw CliErrors[_0x3ea45b(0x164)](_0x3ea45b(0x160),_0x3ea45b(0x15f));const _0x1dffb2=Array[_0x3ea45b(0x150)](_0x21e3f6)?_0x21e3f6:[_0x21e3f6];if(_0x1dffb2[_0x3ea45b(0x167)]===0x0)throw CliErrors['validation'](_0x3ea45b(0x153));if(_0x1dffb2['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x3ea45b(0x164)](_0x3ea45b(0x156)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x1dffb2[_0x3ea45b(0x167)]+'.');return _0x1dffb2[_0x3ea45b(0x14c)]((_0xe1b991,_0x2a6388)=>parseDataUpdateId(_0xe1b991,Array[_0x3ea45b(0x150)](_0x21e3f6)?_0x3ea45b(0x161)+_0x2a6388+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x1e207e,_0xeda221){const _0x2eed76=a158_0x1969;if(Array[_0x2eed76(0x150)](_0x1e207e['id'])&&_0xeda221[_0x2eed76(0x167)]>0x1)return{..._0x1e207e,'id':_0xeda221[_0x2eed76(0x152)](',')};return _0x1e207e;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x246f40=a159_0xb78f;function a159_0x4d72(){const _0x38758d=['.cmd','4293738punCXF','1081569Tvfzei','250108LOGHCR','platform','2762207znoybQ','2627895VgAzEQ','1356960TzhgeW','137601vPybSc'];a159_0x4d72=function(){return _0x38758d;};return a159_0x4d72();}(function(_0x4f838c,_0x514e62){const _0x3b701d=a159_0xb78f,_0x34b446=_0x4f838c();while(!![]){try{const _0x50c7f0=parseInt(_0x3b701d(0x1c0))/0x1+parseInt(_0x3b701d(0x1c4))/0x2+-parseInt(_0x3b701d(0x1c3))/0x3+-parseInt(_0x3b701d(0x1bf))/0x4+parseInt(_0x3b701d(0x1c7))/0x5+parseInt(_0x3b701d(0x1c2))/0x6+-parseInt(_0x3b701d(0x1c6))/0x7;if(_0x50c7f0===_0x514e62)break;else _0x34b446['push'](_0x34b446['shift']());}catch(_0x14cac6){_0x34b446['push'](_0x34b446['shift']());}}}(a159_0x4d72,0x63f95));function a159_0xb78f(_0x5e9445,_0x29301a){_0x5e9445=_0x5e9445-0x1bf;const _0x4d72f0=a159_0x4d72();let _0xb78fd1=_0x4d72f0[_0x5e9445];return _0xb78fd1;}export const isWindows=process[a159_0x246f40(0x1c5)]==='win32';export function resolveNpmBin(_0x1573b9){const _0xa0c9d2=a159_0x246f40;return isWindows?_0x1573b9+_0xa0c9d2(0x1c1):_0x1573b9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15a985,_0x16c069){const _0x1f0c59=a160_0x2d68,_0x4da810=_0x15a985();while(!![]){try{const _0x3dbef7=parseInt(_0x1f0c59(0x109))/0x1+-parseInt(_0x1f0c59(0x112))/0x2*(parseInt(_0x1f0c59(0x101))/0x3)+-parseInt(_0x1f0c59(0x108))/0x4+-parseInt(_0x1f0c59(0x10d))/0x5+-parseInt(_0x1f0c59(0x10c))/0x6+-parseInt(_0x1f0c59(0x103))/0x7*(parseInt(_0x1f0c59(0x11b))/0x8)+-parseInt(_0x1f0c59(0x10e))/0x9*(-parseInt(_0x1f0c59(0x104))/0xa);if(_0x3dbef7===_0x16c069)break;else _0x4da810['push'](_0x4da810['shift']());}catch(_0xeb2d55){_0x4da810['push'](_0x4da810['shift']());}}}(a160_0x44ef,0xd7729));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a160_0x44ef(){const _0x39e5c8=['needsUpgrade','1231864HLfhLS','10467LhvuPC','upgradeMessage','35AdKlmE','16790QmUIIY','currentVersion','lastNotifiedAt','.cache','849600UsIpOI','1047599vFVBmN','join','filter','5751924IWwQOD','2030760UUJRRz','14913uLryWk','stringify',',\x20run:\x20','update-check.json','344JepaHh','parse','true','stableVersion','lovrabet-cli','/v/','trim','utf8'];a160_0x44ef=function(){return _0x39e5c8;};return a160_0x44ef();}import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0xc845f8=a160_0x2d68,_0x5acb8=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0xc845f8(0x118)]()['toLowerCase']();return _0x5acb8==='1'||_0x5acb8===_0xc845f8(0x114)||_0x5acb8==='yes';}function a160_0x2d68(_0x196d88,_0x4054f5){_0x196d88=_0x196d88-0x101;const _0x44ef6c=a160_0x44ef();let _0x2d68a0=_0x44ef6c[_0x196d88];return _0x2d68a0;}function cacheRoot(){const _0x1af5ec=a160_0x2d68;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x1af5ec(0x107));}export function getUpdateNoticeCachePath(){const _0x2b18c7=a160_0x2d68;return join(cacheRoot(),_0x2b18c7(0x116),_0x2b18c7(0x111));}async function readUpdateNoticeCache(){const _0x525c05=a160_0x2d68;try{const _0x17be4e=await readFile(getUpdateNoticeCachePath(),_0x525c05(0x119)),_0x2d6f49=JSON[_0x525c05(0x113)](_0x17be4e);if(!_0x2d6f49||typeof _0x2d6f49!=='object')return{};return _0x2d6f49;}catch{return{};}}async function writeUpdateNoticeCache(_0x527434){const _0x5efbbd=a160_0x2d68;try{const _0x3e9bca=getUpdateNoticeCachePath();await mkdir(dirname(_0x3e9bca),{'recursive':!![]}),await writeFile(_0x3e9bca,JSON[_0x5efbbd(0x10f)](_0x527434,null,0x2)+'\x0a',_0x5efbbd(0x119));}catch{}}function isRecentlyNotified(_0x37a85c,_0x393558,_0x421b3a){const _0x230a04=a160_0x2d68;return _0x37a85c['lastNotifiedVersion']===_0x393558&&typeof _0x37a85c[_0x230a04(0x106)]==='number'&&_0x421b3a-_0x37a85c[_0x230a04(0x106)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x318941){const _0x346864=a160_0x2d68;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x346864(0x117)+_0x318941;}export async function resolveLatestUpdateNotice(_0x42e33c){const _0x2751f0=a160_0x2d68;if(isUpdateNoticeDisabled())return null;try{const _0x57204b=Date['now'](),_0x11b710=_0x42e33c??await checkCliVersion(),_0x432fdb=_0x11b710[_0x2751f0(0x105)],_0x29fb78=_0x11b710[_0x2751f0(0x115)],_0x40e0e6=await readUpdateNoticeCache();if(!_0x29fb78||!_0x11b710[_0x2751f0(0x11a)]||_0x11b710['belowMinimum'])return null;if(isRecentlyNotified(_0x40e0e6,_0x29fb78,_0x57204b))return null;const _0x5cd525=getCliUpgradeCommand(_0x11b710);return await writeUpdateNoticeCache({..._0x40e0e6,'checkedAt':_0x57204b,'latest':_0x29fb78,'failed':![],'lastNotifiedVersion':_0x29fb78,'lastNotifiedAt':_0x57204b}),{'command':_0x5cd525,'current':_0x432fdb,'latest':_0x29fb78,'url':buildNpmVersionUrl(_0x29fb78),'message':[_0x11b710[_0x2751f0(0x102)],CLI_BIN_NAME+'\x20'+_0x29fb78+'\x20is\x20recommended,\x20current\x20'+_0x432fdb+_0x2751f0(0x110)+_0x5cd525][_0x2751f0(0x10b)](Boolean)[_0x2751f0(0x10a)]('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a161_0x2c71(){const _0x32ee14=['40296289glINoW','26jrgqbA','5bYxvqW','7280dpCqRt','2863hWBAwR','269628EmdFcv','1018844dJOKgk','27qpuKTj','22568qZQDiO','5705556fsFoie','5233170gQAFIc','unknown'];a161_0x2c71=function(){return _0x32ee14;};return a161_0x2c71();}function a161_0x3ec1(_0x274f85,_0x445346){_0x274f85=_0x274f85-0x1da;const _0x2c718c=a161_0x2c71();let _0x3ec1da=_0x2c718c[_0x274f85];return _0x3ec1da;}(function(_0x2eb4fd,_0xf9b991){const _0x390f76=a161_0x3ec1,_0x58cad8=_0x2eb4fd();while(!![]){try{const _0x5a7140=-parseInt(_0x390f76(0x1e4))/0x1+parseInt(_0x390f76(0x1df))/0x2*(-parseInt(_0x390f76(0x1e3))/0x3)+parseInt(_0x390f76(0x1db))/0x4*(parseInt(_0x390f76(0x1e0))/0x5)+-parseInt(_0x390f76(0x1dc))/0x6+parseInt(_0x390f76(0x1e2))/0x7*(-parseInt(_0x390f76(0x1da))/0x8)+-parseInt(_0x390f76(0x1e5))/0x9*(-parseInt(_0x390f76(0x1e1))/0xa)+parseInt(_0x390f76(0x1de))/0xb;if(_0x5a7140===_0xf9b991)break;else _0x58cad8['push'](_0x58cad8['shift']());}catch(_0xebe0e4){_0x58cad8['push'](_0x58cad8['shift']());}}}(a161_0x2c71,0xd6840));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x4a9e3b=a161_0x3ec1,_0x2ab3e0=String(GIT_COMMIT);return _0x2ab3e0&&_0x2ab3e0!==_0x4a9e3b(0x1dd)?_0x2ab3e0:'';}export function getCliVersionDisplay(){const _0x569d3a=getCliGitCommit(),_0x3a19a=BUILD_TIME['slice'](0x0,0xa);if(!_0x569d3a||!_0x3a19a)return VERSION;return VERSION+'\x20('+_0x569d3a+',\x20'+_0x3a19a+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d1dc8,_0x2bb295){var _0x1c0e1f=a162_0x5483,_0x4abff2=_0x3d1dc8();while(!![]){try{var _0x3de46e=parseInt(_0x1c0e1f(0xd1))/0x1+parseInt(_0x1c0e1f(0xd0))/0x2*(parseInt(_0x1c0e1f(0xd2))/0x3)+parseInt(_0x1c0e1f(0xd4))/0x4+parseInt(_0x1c0e1f(0xcc))/0x5+-parseInt(_0x1c0e1f(0xce))/0x6*(-parseInt(_0x1c0e1f(0xca))/0x7)+-parseInt(_0x1c0e1f(0xc9))/0x8+parseInt(_0x1c0e1f(0xcd))/0x9*(-parseInt(_0x1c0e1f(0xcb))/0xa);if(_0x3de46e===_0x2bb295)break;else _0x4abff2['push'](_0x4abff2['shift']());}catch(_0x42e693){_0x4abff2['push'](_0x4abff2['shift']());}}}(a162_0x36bf,0x6223d));export function writeCliSideChannelLine(_0x52528a){var _0x3256f=a162_0x5483;process[_0x3256f(0xd3)][_0x3256f(0xcf)](_0x52528a+'\x0a');}function a162_0x5483(_0x68268e,_0x556e2a){_0x68268e=_0x68268e-0xc9;var _0x36bf60=a162_0x36bf();var _0x548353=_0x36bf60[_0x68268e];return _0x548353;}function a162_0x36bf(){var _0x1f0dc1=['10jzfBtX','448310CXoCLl','5234067VAqkoa','1566GMKasb','write','4754uhehic','747768GnThiz','612ClxDUs','stderr','493768GTrhTM','5458072kNReOd','5901gKohbS'];a162_0x36bf=function(){return _0x1f0dc1;};return a162_0x36bf();}
|
package/package.json
CHANGED
package/skills/lovrabet/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lovrabet
|
|
3
3
|
displayName: Lovrabet 运行态 CLI
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.1-beta.2
|
|
5
5
|
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
|
|
6
6
|
metadata:
|
|
7
7
|
requires:
|
|
@@ -331,7 +331,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
331
331
|
| **kb** | `detail` | 查看 personal 知识库正文与 RAG 状态 | read | AK |
|
|
332
332
|
| **kb** | `create` | 从本地文件创建 personal 知识库 | write | AK |
|
|
333
333
|
| **kb** | `update` | 从本地文件更新 personal 知识库 | write | AK |
|
|
334
|
-
| **kb** | `search` |
|
|
334
|
+
| **kb** | `search` | 检索可见公共、公司和个人知识 | read | AK |
|
|
335
335
|
| **schedule** | `validate` | 校验 UTC 定时任务,不创建计划 | read | AK |
|
|
336
336
|
| **schedule** | `create` | 创建周期或单次定时任务(需确认) | high-risk-write | AK |
|
|
337
337
|
| **schedule** | `list` | 分页查看当前应用的定时任务 | read | AK |
|
|
@@ -435,6 +435,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
435
435
|
| 查看 Personal Backend Function | `lovrabet personal-bff detail --id <id>` |
|
|
436
436
|
| 创建 Personal Backend Function | `lovrabet personal-bff create --name loadOrders --file ./load-orders.js --dry-run` |
|
|
437
437
|
| 执行 Personal Backend Function | `lovrabet personal-bff exec --id <id> --params '{"key":"value"}'` |
|
|
438
|
+
| 页面调用 Personal Backend Function | 先用 CLI 核对返回契约,再按 [Personal Backend Function 工作流](references/lovrabet-personal-bff-workflow.md) 使用 `client.personal.bff.execute({ scriptId, params })`;禁止用可选调用静默吞掉能力缺失 |
|
|
438
439
|
|
|
439
440
|
### Personal Backend Function 与知识库
|
|
440
441
|
|
|
@@ -96,7 +96,7 @@ Personal Backend Function 是当前用户在当前应用下维护的个人脚本
|
|
|
96
96
|
2. `lovrabet personal-bff detail --id <id>` 查看现有脚本后再更新
|
|
97
97
|
3. 从本地脚本文件 `create` 或 `update`
|
|
98
98
|
4. `lovrabet personal-bff exec --id <id> --params '<json>' --format compress` 确认返回形状
|
|
99
|
-
5.
|
|
99
|
+
5. 页面接入时使用 `client.personal.bff.execute({ scriptId, params })`,并按 [Personal Backend Function 工作流](../references/lovrabet-personal-bff-workflow.md) 做能力检测、认证隔离和返回形状校验
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
lovrabet personal-bff create --name loadOrders --file ./load-orders.js --dry-run
|
|
@@ -39,9 +39,9 @@ Domain 文件必须是 JSON 对象,只允许以下五个字段,且至少提
|
|
|
39
39
|
|
|
40
40
|
也可以用 `--user-domain`、`--api-domain`、`--runtime-domain`、`--skill-domain`、`--kb-domain` 逐项传入;显式 flag 覆盖文件里的同名字段。所有值必须是无账号、路径、query 和 fragment 的 HTTPS origin。
|
|
41
41
|
|
|
42
|
-
进入独立部署模式会删除全局 `region` 和旧 Domain 字段,再写入本次提供的 Domain。未提供的 Domain 仍按默认 `cn` 节点和当前 `env` 回退到 Lovrabet
|
|
42
|
+
进入独立部署模式会删除全局 `region` 和旧 Domain 字段,再写入本次提供的 Domain。未提供的 Domain 仍按默认 `cn` 节点和当前 `env` 回退到 Lovrabet 公共服务。企业部署需要所有请求进入私有服务时,应完整提供五个 Domain;KB Service 下游地址由 Runtime Java 独立配置。
|
|
43
43
|
|
|
44
|
-
两种模式都保留 AccessKey、env、format、locale、应用绑定等其他全局配置。当前目录 `.lovrabet.json` 的同名字段仍会覆盖全局配置;初始化后用 `lovrabet doctor` 核对最终生效的 region
|
|
44
|
+
两种模式都保留 AccessKey、env、format、locale、应用绑定等其他全局配置。当前目录 `.lovrabet.json` 的同名字段仍会覆盖全局配置;初始化后用 `lovrabet doctor` 核对最终生效的 region 和 API Endpoint。
|
|
45
45
|
|
|
46
46
|
## config list — 查看完整配置
|
|
47
47
|
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
| `apiDomain` | string | 节点内置值 | 平台 API HTTPS origin 覆盖 |
|
|
61
61
|
| `runtimeDomain` | string | 节点内置值 | 普通 Runtime HTTPS origin 覆盖 |
|
|
62
62
|
| `skillDomain` | string | 节点默认 | SkillHub HTTPS origin 覆盖 |
|
|
63
|
-
| `kbDomain` | string | 节点默认 |
|
|
63
|
+
| `kbDomain` | string | 节点默认 | Personal KB 管理与 `kb search` Runtime 网关 HTTPS origin 覆盖 |
|
|
64
64
|
|
|
65
|
-
五个 Domain 各自独立覆盖同名服务地址。没有显式配置的字段按 `region` 和 `env` 使用内置值;`development` 与 `daily`
|
|
65
|
+
五个 Domain 各自独立覆盖同名服务地址。没有显式配置的字段按 `region` 和 `env` 使用内置值;`development` 与 `daily` 共用非生产地址。KB Service 下游地址由 Runtime Java 配置管理。当前开放的官方节点如下:
|
|
66
66
|
|
|
67
67
|
| region | env | userDomain | apiDomain | runtimeDomain | skillDomain | kbDomain |
|
|
68
68
|
|--------|-----|------------|-----------|---------------|-------------|----------|
|
|
@@ -10,7 +10,9 @@ lovrabet kb detail --id <id> --format compress
|
|
|
10
10
|
lovrabet kb search --query "订单审批" --topk 5 --format compress
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`kb search`
|
|
13
|
+
`kb search` 只携带当前 AK,通过 `kbDomain` 调用固定 Runtime 搜索网关;Runtime 再按其 Java 环境配置访问 KB Service。返回范围是 `public/company/personal`,使用 `scope` 区分来源。
|
|
14
|
+
|
|
15
|
+
结构化输出固定为 `data: { schemaVersion:2, profile:"runtime", total, strategyFingerprint, timingsMs, hits }`。`--topk` 可选且必须是 1–50 的整数;命中完整保留 `documentId/revision/chunkId/scope/title/text/tags/rank/rawScore/finalScore/scoreKind` 的服务端顺序和值,不输出 legacy 别名。无命中是 `total:0/hits:[]` 的成功;字段、rank、score、timing、`no-store` 或 scope 漂移都会以脱敏错误失败。
|
|
14
16
|
|
|
15
17
|
## 业务执行中的 KB 消费
|
|
16
18
|
|
|
@@ -134,3 +134,35 @@ lovrabet personal-bff exec --id <id> --params '{"status":"active"}' --format com
|
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
确认字段、空态和错误形状后,再按下游调用方的契约完成接入。
|
|
137
|
+
|
|
138
|
+
### 前端 SDK 调用
|
|
139
|
+
|
|
140
|
+
页面通过 `client.personal.bff.execute({ scriptId, params })` 调用已经确认的 Personal Backend Function。`scriptId` 必须是 `list`、`detail`、`create` 或前序可信上下文得到的正整数,并且属于当前用户和当前应用;不要猜测 ID。
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
interface OrderSummary {
|
|
144
|
+
total: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const personalBff = lovrabetClient?.personal?.bff;
|
|
148
|
+
if (typeof personalBff?.execute !== "function") {
|
|
149
|
+
throw new Error("client.personal.bff.execute is not available");
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const summary = await personalBff.execute<OrderSummary>({
|
|
153
|
+
scriptId: 123,
|
|
154
|
+
params: { status: "active" },
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
if (!summary || typeof summary.total !== "number") {
|
|
158
|
+
throw new Error("Unexpected Personal Backend Function response");
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
安全边界:
|
|
163
|
+
|
|
164
|
+
- 浏览器使用当前登录 Cookie,不在前端源码、构建变量、页面配置或日志中保存 Cookie、Client AK、SecretKey 或 token。
|
|
165
|
+
- 服务端使用 Client AK 时,凭据只保存在服务端,并显式设置 `authMode: "client-ak"`;Personal Backend Function 不支持 OpenAPI。
|
|
166
|
+
- 可选链只用于读取能力。禁止使用 `lovrabetClient?.personal?.bff?.execute?.(...)`,因为方法缺失时会静默得到 `undefined`。
|
|
167
|
+
- 能力不存在时明确失败,并升级到包含 `client.personal.bff.execute` 的 SDK 版本。检测通过后通过 `personalBff.execute(...)` 调用,不要提取方法后裸调用。
|
|
168
|
+
- SDK 直接返回个人函数的业务结果,不带 `execSuccess` 或 `execResult`。按前序 CLI 验证得到的返回契约检查必需字段和空态,不用 `result === undefined` 猜测 SDK 能力是否存在。
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.3.
|
|
6
|
-
"skillVersion": "2.3.
|
|
5
|
+
"packageVersion": "2.3.1-beta.2",
|
|
6
|
+
"skillVersion": "2.3.1-beta.2",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"references/lovrabet-user-account.md",
|
|
38
38
|
"references/lovrabet-workspace.md"
|
|
39
39
|
],
|
|
40
|
-
"digest": "
|
|
40
|
+
"digest": "3a473f03db5d7d55bc3007abf7659e5d9dbe90a6b65f729d751c68c79510c059"
|
|
41
41
|
}
|