@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/approval/index.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- 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.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 +83 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- 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.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/positive-safe-integer.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- 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/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x418e22=a126_0x47cb;function a126_0x47cb(_0x5c77c8,_0x209c64){_0x5c77c8=_0x5c77c8-0x106;const _0x228928=a126_0x2289();let _0x47cb2f=_0x228928[_0x5c77c8];return _0x47cb2f;}(function(_0x58dc44,_0x5a8640){const _0x15897a=a126_0x47cb,_0xa06882=_0x58dc44();while(!![]){try{const _0x1f6c1a=parseInt(_0x15897a(0x10b))/0x1+parseInt(_0x15897a(0x116))/0x2+-parseInt(_0x15897a(0x11f))/0x3+parseInt(_0x15897a(0x10d))/0x4*(parseInt(_0x15897a(0x11d))/0x5)+parseInt(_0x15897a(0x109))/0x6*(-parseInt(_0x15897a(0x11b))/0x7)+-parseInt(_0x15897a(0x11a))/0x8+-parseInt(_0x15897a(0x111))/0x9*(parseInt(_0x15897a(0x10e))/0xa);if(_0x1f6c1a===_0x5a8640)break;else _0xa06882['push'](_0xa06882['shift']());}catch(_0xb9be5){_0xa06882['push'](_0xa06882['shift']());}}}(a126_0x2289,0x4a98f));export const ROUTING_CATALOG_DIGEST=a126_0x418e22(0x10c);export const DEFAULT_REGION='cn';function a126_0x2289(){const _0x328413=['1237200JeRYbc','china','https://api.lovrabet.ai','indonesia','https://daily-api.lovrabet.com','12SnYzfh','https://skills.lovrabet.com','318039LNjamA','41caa63f2eaa9f96327376df380668b835ef80916584dc754147daf394c2c513','1216092TwhUJP','8860YDckLh','https://daily-runtime.lovrabet.com','https://skills-daily.lovrabet.com','666SBeKVJ','https://api.lovrabet.com','https://skills.lovrabet.ai','https://user.lovrabet.id','https://runtime.lovrabet.com','920812BMqZet','https://runtime.lovrabet.id','Indonesia','https://user-daily.lovrabet.com','2175472UTtZCs','1158647GtEIVA','https://user.lovrabet.com','10ysKKBl','https://api.lovrabet.id'];a126_0x2289=function(){return _0x328413;};return a126_0x2289();}export const REGION_VALUES=['cn','id','global'];export const ENABLED_REGION_VALUES=['cn','id'];export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':'Mainland\x20China','aliases':[a126_0x418e22(0x120)],'serviceDomains':{'production':{'user':a126_0x418e22(0x11c),'api':a126_0x418e22(0x112),'runtime':a126_0x418e22(0x115),'skill':a126_0x418e22(0x10a)},'daily':{'user':a126_0x418e22(0x119),'api':a126_0x418e22(0x108),'runtime':a126_0x418e22(0x10f),'skill':a126_0x418e22(0x110)}}},'id':{'enabled':!![],'label':a126_0x418e22(0x118),'aliases':[a126_0x418e22(0x107)],'serviceDomains':{'production':{'user':a126_0x418e22(0x114),'api':a126_0x418e22(0x11e),'runtime':a126_0x418e22(0x117),'skill':'https://skills.lovrabet.id'}}},'global':{'enabled':![],'label':'Global','aliases':[],'serviceDomains':{'production':{'user':'https://user.lovrabet.ai','api':a126_0x418e22(0x106),'runtime':'https://runtime.lovrabet.ai','skill':a126_0x418e22(0x113)}}}};export const REGION_ALIASES={'china':'cn','indonesia':'id'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a127_0x8f7ab9=a127_0x163d;(function(_0x44e1ea,_0x4792c7){const _0x598535=a127_0x163d,_0x37c366=_0x44e1ea();while(!![]){try{const _0x3853ec=parseInt(_0x598535(0x18f))/0x1*(-parseInt(_0x598535(0x19a))/0x2)+-parseInt(_0x598535(0x19f))/0x3*(-parseInt(_0x598535(0x19b))/0x4)+parseInt(_0x598535(0x193))/0x5*(-parseInt(_0x598535(0x19e))/0x6)+parseInt(_0x598535(0x191))/0x7+-parseInt(_0x598535(0x198))/0x8*(-parseInt(_0x598535(0x197))/0x9)+parseInt(_0x598535(0x19c))/0xa+parseInt(_0x598535(0x190))/0xb;if(_0x3853ec===_0x4792c7)break;else _0x37c366['push'](_0x37c366['shift']());}catch(_0x23fbcc){_0x37c366['push'](_0x37c366['shift']());}}}(a127_0x2222,0x89e52));function a127_0x163d(_0x1e008b,_0x2748c4){_0x1e008b=_0x1e008b-0x18e;const _0x222200=a127_0x2222();let _0x163d1b=_0x222200[_0x1e008b];return _0x163d1b;}export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a127_0x8f7ab9(0x19d);export const ENTERPRISE_ROUTING_PROTOCOL=a127_0x8f7ab9(0x18e);export const ENTERPRISE_ROUTING_KIND=a127_0x8f7ab9(0x196);export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a127_0x8f7ab9(0x192),a127_0x8f7ab9(0x199),'runtimeDomain',a127_0x8f7ab9(0x194)];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a127_0x8f7ab9(0x192),'apiDomain',a127_0x8f7ab9(0x195),a127_0x8f7ab9(0x194)];function a127_0x2222(){const _0x3239bb=['10965860zSjeon','51e352a2636c432b76d331cc9ff81c215d7cbe3d1d07ab7bd7bedb7bdb91631c','24NuPZCv','32022SgDMcE','lovrabet-routing/v1','1087789VAPfos','7856475fPpfFQ','146034tCLcyh','userDomain','324470XwCNox','skillDomain','runtimeDomain','enterprise','144XRBOXz','2896ucdWNh','apiDomain','2Eqmdlp','28ptOVJT'];a127_0x2222=function(){return _0x3239bb;};return a127_0x2222();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d7409,_0x2da0cf){const _0x427111=a128_0x360a,_0x2385ac=_0x4d7409();while(!![]){try{const _0x259241=parseInt(_0x427111(0x1cc))/0x1*(parseInt(_0x427111(0x1cd))/0x2)+-parseInt(_0x427111(0x1c9))/0x3*(-parseInt(_0x427111(0x1cf))/0x4)+-parseInt(_0x427111(0x1d0))/0x5+-parseInt(_0x427111(0x1c5))/0x6*(parseInt(_0x427111(0x1cb))/0x7)+parseInt(_0x427111(0x1d1))/0x8+parseInt(_0x427111(0x1c2))/0x9*(parseInt(_0x427111(0x1c3))/0xa)+parseInt(_0x427111(0x1c6))/0xb*(-parseInt(_0x427111(0x1ca))/0xc);if(_0x259241===_0x2da0cf)break;else _0x2385ac['push'](_0x2385ac['shift']());}catch(_0xd59619){_0x2385ac['push'](_0x2385ac['shift']());}}}(a128_0x3f32,0x71a3f));import{jsx as a128_0x8e3029,jsxs as a128_0x2714ca}from'react/jsx-runtime';import{useEffect}from'react';function a128_0x360a(_0x300b69,_0x1b1ca6){_0x300b69=_0x300b69-0x1c2;const _0x3f32ec=a128_0x3f32();let _0x360a1a=_0x3f32ec[_0x300b69];return _0x360a1a;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x5caa91=a128_0x360a,{exit:_0x5476cd}=useApp();return useEffect(()=>{_0x5476cd();},[_0x5476cd]),a128_0x2714ca(Box,{'flexDirection':_0x5caa91(0x1ce),'marginTop':0x1,'marginBottom':0x1,'children':[a128_0x8e3029(Box,{'children':a128_0x8e3029(Text,{'bold':!![],'color':_0x5caa91(0x1c7),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a128_0x2714ca(Box,{'marginTop':0x1,'children':[a128_0x8e3029(Text,{'dimColor':!![],'children':_0x5caa91(0x1d2)}),a128_0x8e3029(Text,{'bold':!![],'color':_0x5caa91(0x1c7),'children':CLI_BIN_NAME+_0x5caa91(0x1c4)}),a128_0x8e3029(Text,{'dimColor':!![],'children':_0x5caa91(0x1c8)})]})]});}function a128_0x3f32(){const _0xd616a=['1781195fOlUrm','1923400qHVmEP','\x20\x20Use\x20','324nrhsHb','219540jAvRjZ','\x20--help','621546DRxUzh','13455145JzyEqV','green','\x20to\x20view\x20available\x20commands.','1208121WKmwie','12YeTAHE','35HOCQIR','1YtJCWM','1453354UGnDAK','column','8UxbmER'];a128_0x3f32=function(){return _0xd616a;};return a128_0x3f32();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16814c,_0x3a256f){const _0x5ee55f=a129_0x3857,_0x59f4c2=_0x16814c();while(!![]){try{const _0x3da7ba=parseInt(_0x5ee55f(0x183))/0x1*(-parseInt(_0x5ee55f(0x17f))/0x2)+-parseInt(_0x5ee55f(0x186))/0x3+parseInt(_0x5ee55f(0x17b))/0x4+-parseInt(_0x5ee55f(0x17e))/0x5*(parseInt(_0x5ee55f(0x18c))/0x6)+parseInt(_0x5ee55f(0x188))/0x7*(-parseInt(_0x5ee55f(0x178))/0x8)+-parseInt(_0x5ee55f(0x17d))/0x9+parseInt(_0x5ee55f(0x17a))/0xa;if(_0x3da7ba===_0x3a256f)break;else _0x59f4c2['push'](_0x59f4c2['shift']());}catch(_0x66d52){_0x59f4c2['push'](_0x59f4c2['shift']());}}}(a129_0x3f59,0x6eb31));function a129_0x3857(_0xea6c34,_0x4a5ac1){_0xea6c34=_0xea6c34-0x175;const _0x3f5914=a129_0x3f59();let _0x385725=_0x3f5914[_0xea6c34];return _0x385725;}import{installBuiltinSkill}from'./skills/builtin-skill.js';function a129_0x3f59(){const _0x184005=['already\x20current','FAILED','18jNEZzA','code','skillVersion','[BUILTIN_SKILL_INSTALL_','8152LkPdpl','SOURCE_INVALID','32450860VkgNnJ','356260RwLGFl','Lovrabet\x20Built-in\x20Skill\x20','2098971dgSrOD','1464515CBMiUC','5030hypZJJ','repairCommand','\x20at\x20','log','235hRPKIE','\x20via\x20skills@latest','warn','1879482GQHMZo','error','3787WzmgJK','installedPath'];a129_0x3f59=function(){return _0x184005;};return a129_0x3f59();}export async function runPostinstall(_0x2ad75a={}){const _0x24da4=a129_0x3857,_0x46e88f=installBuiltinSkill(_0x2ad75a);if(_0x46e88f['ok']){const _0x7cfe60=_0x46e88f['changed']?'installed':_0x24da4(0x18a),_0x8dbcd6=_0x46e88f[_0x24da4(0x189)]?_0x24da4(0x181)+_0x46e88f[_0x24da4(0x189)]:_0x24da4(0x184);return console[_0x24da4(0x182)](_0x24da4(0x17c)+_0x46e88f[_0x24da4(0x176)]+'\x20'+_0x7cfe60+_0x8dbcd6),_0x46e88f;}const _0x47aafb=_0x24da4(0x177)+(_0x46e88f[_0x24da4(0x175)]??_0x24da4(0x18b))+']\x20'+(_0x46e88f[_0x24da4(0x187)]??'Installation\x20failed')+'.\x20'+('Repair\x20with:\x20'+_0x46e88f[_0x24da4(0x180)]);if(_0x46e88f['code']===_0x24da4(0x179))throw new Error(_0x47aafb);return console[_0x24da4(0x185)](_0x47aafb),_0x46e88f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x462ad7,_0x3443a3){const _0x108ad4=a130_0x27f8,_0x191d96=_0x462ad7();while(!![]){try{const _0x1fe2d0=parseInt(_0x108ad4(0x1cb))/0x1+-parseInt(_0x108ad4(0x1c3))/0x2+parseInt(_0x108ad4(0x1c1))/0x3*(parseInt(_0x108ad4(0x1c7))/0x4)+-parseInt(_0x108ad4(0x1c6))/0x5+parseInt(_0x108ad4(0x1ce))/0x6*(parseInt(_0x108ad4(0x1cc))/0x7)+parseInt(_0x108ad4(0x1ca))/0x8+parseInt(_0x108ad4(0x1c0))/0x9;if(_0x1fe2d0===_0x3443a3)break;else _0x191d96['push'](_0x191d96['shift']());}catch(_0x12ddd6){_0x191d96['push'](_0x191d96['shift']());}}}(a130_0x2d60,0x9a191));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x5466bf,_0x4ac82a,_0x1bb13f){const _0x367523=a130_0x27f8,_0xe71137=normalizeText(_0x5466bf['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x25e830=normalizeText(_0x5466bf[_0x367523(0x1c5)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x4ac82a,'risk':requireWriteRisk(_0x5466bf),'description':_0xe71137||_0x25e830||_0x367523(0x1c8),..._0x1bb13f?{'signal':_0x1bb13f}:{}};}function a130_0x27f8(_0x370e46,_0x5b1ba6){_0x370e46=_0x370e46-0x1c0;const _0x2d60fb=a130_0x2d60();let _0x27f83d=_0x2d60fb[_0x370e46];return _0x27f83d;}function requireWriteRisk(_0x12c20f){const _0xfe967c=a130_0x27f8;if(_0x12c20f[_0xfe967c(0x1d0)]===_0xfe967c(0x1cf)||_0x12c20f[_0xfe967c(0x1d0)]===_0xfe967c(0x1c2))return _0x12c20f[_0xfe967c(0x1d0)];throw new Error(_0xfe967c(0x1d1));}function a130_0x2d60(){const _0x3082a4=['high-risk-write','1963080fzZqDo','slice','description','2432775fczgAQ','4xuMrfb','Run\x20this\x20write\x20operation','replace','4214944dlFLIm','72746cdKATn','581287qMsqIf','string','54qOONjw','write','risk','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','2103372YNupNc','1555767mPRUPP'];a130_0x2d60=function(){return _0x3082a4;};return a130_0x2d60();}function normalizeText(_0x2cc620,_0x1c3667){const _0x136dce=a130_0x27f8;if(typeof _0x2cc620!==_0x136dce(0x1cd))return'';return _0x2cc620[_0x136dce(0x1c9)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x136dce(0x1c9)](/\s+/g,'\x20')['trim']()[_0x136dce(0x1c4)](0x0,_0x1c3667);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x43cb8f,_0x40135f){const _0x1bb4b1=a131_0x5ce2,_0x40d92e=_0x43cb8f();while(!![]){try{const _0x24a5fc=parseInt(_0x1bb4b1(0x1dc))/0x1*(parseInt(_0x1bb4b1(0x1d2))/0x2)+-parseInt(_0x1bb4b1(0x1cf))/0x3*(parseInt(_0x1bb4b1(0x1da))/0x4)+-parseInt(_0x1bb4b1(0x1e1))/0x5+-parseInt(_0x1bb4b1(0x1df))/0x6+parseInt(_0x1bb4b1(0x1e0))/0x7*(-parseInt(_0x1bb4b1(0x1e3))/0x8)+-parseInt(_0x1bb4b1(0x1de))/0x9*(-parseInt(_0x1bb4b1(0x1e2))/0xa)+parseInt(_0x1bb4b1(0x1d5))/0xb*(parseInt(_0x1bb4b1(0x1d6))/0xc);if(_0x24a5fc===_0x40135f)break;else _0x40d92e['push'](_0x40d92e['shift']());}catch(_0x256c11){_0x40d92e['push'](_0x40d92e['shift']());}}}(a131_0x5669,0x94ab1));export function canonicalLovrabetOperation(_0x43764d){const _0x45e6cc=a131_0x5ce2;return[_0x43764d[_0x45e6cc(0x1d4)],..._0x43764d[_0x45e6cc(0x1d3)][_0x45e6cc(0x1dd)]()[_0x45e6cc(0x1d8)](/\s+/)][_0x45e6cc(0x1d9)](Boolean)['join']('.');}function a131_0x5ce2(_0x453149,_0xac3cc5){_0x453149=_0x453149-0x1cf;const _0x5669a4=a131_0x5669();let _0x5ce2a5=_0x5669a4[_0x453149];return _0x5ce2a5;}function a131_0x5669(){const _0x10b3e1=['risk','686856uMAkOU','command','service','33429XCRIQI','8268rtHvIA','high-risk-write','split','filter','4iaIpOv','lovrabet.write.completed','1UuZhRC','trim','36eWYKPQ','452826iHMXgO','3101pSCQdz','4372560ldoFHB','22190Pmsyxa','384qhKAZu','2597949DCfyrS','writeEventSubject'];a131_0x5669=function(){return _0x10b3e1;};return a131_0x5669();}export function createLovrabetWriteMetadata(_0x2454c6,_0x5cec79,_0x1a8d96,_0x58c60a){const _0x53a23f=a131_0x5ce2;if(_0x58c60a||_0x1a8d96['ok']!==!![]||_0x2454c6[_0x53a23f(0x1d1)]!=='write'&&_0x2454c6[_0x53a23f(0x1d1)]!==_0x53a23f(0x1d7))return undefined;const _0x433e1c=_0x2454c6[_0x53a23f(0x1d0)]?.(_0x1a8d96),_0x3b61a0={'type':_0x53a23f(0x1db),'operation':_0x5cec79,'risk':_0x2454c6[_0x53a23f(0x1d1)],..._0x433e1c?{'subject':_0x433e1c}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x3b61a0}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e6943,_0x2aedf4){const _0x66b0f2=a132_0x5191,_0x51f0f3=_0x3e6943();while(!![]){try{const _0x177680=parseInt(_0x66b0f2(0x78))/0x1+-parseInt(_0x66b0f2(0x88))/0x2*(-parseInt(_0x66b0f2(0x82))/0x3)+-parseInt(_0x66b0f2(0x8e))/0x4*(parseInt(_0x66b0f2(0x76))/0x5)+parseInt(_0x66b0f2(0x98))/0x6*(-parseInt(_0x66b0f2(0x87))/0x7)+parseInt(_0x66b0f2(0x99))/0x8*(parseInt(_0x66b0f2(0x8a))/0x9)+-parseInt(_0x66b0f2(0x7c))/0xa+-parseInt(_0x66b0f2(0x79))/0xb;if(_0x177680===_0x2aedf4)break;else _0x51f0f3['push'](_0x51f0f3['shift']());}catch(_0x98cef1){_0x51f0f3['push'](_0x51f0f3['shift']());}}}(a132_0x57c5,0xc9be4));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';function a132_0x57c5(){const _0x2b509d=['high-risk-write','present','aborted','AbortError','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','command','24ebluaf','8lvzORm','execute','2318695MjRuOH','data','1089919yMqChN','12189485JZCyRS','stringify','isNonInteractive','8539040xtTSHG','signal','definition','message','yes','confirm','1652358KbRsRZ','dryRun','rawFlags','confirmation','write','445256YPwVcr','6PNdEAl','format','6878457NBkYNd','result','risk','reason','4gBfyig','riskLevel','args','dry-run'];a132_0x57c5=function(){return _0x2b509d;};return a132_0x57c5();}function a132_0x5191(_0x523724,_0x579e6d){_0x523724=_0x523724-0x75;const _0x57c5a7=a132_0x57c5();let _0x5191c5=_0x57c5a7[_0x523724];return _0x5191c5;}import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x523c02,command:_0x23b3db,risk:_0x6f650f,dryRun:_0x489e89}){const _0x29d6de=a132_0x5191;return JSON[_0x29d6de(0x7a)]({'ok':_0x523c02['ok'],'command':_0x23b3db,'risk':_0x6f650f,..._0x489e89?{'dryRun':!![]}:{},..._0x523c02['data']!==undefined?{'data':_0x523c02[_0x29d6de(0x77)]}:{},..._0x523c02[_0x29d6de(0x7f)]?{'message':_0x523c02[_0x29d6de(0x7f)]}:{}});}};export async function invokeLovrabet(_0x2da4cb,_0x33758f){const _0x525512=a132_0x5191;throwIfAborted(_0x33758f[_0x525512(0x7d)]);const _0xb39fb4=await resolveLovrabetInvocation(_0x2da4cb),_0x460ee8=canonicalLovrabetOperation(_0xb39fb4[_0x525512(0x7e)]);return await confirmWriteBeforeQueue(_0xb39fb4[_0x525512(0x7e)],_0xb39fb4[_0x525512(0x84)],_0x460ee8,_0x33758f),runSerialized(async()=>{const _0x30df14=_0x525512;throwIfAborted(_0x33758f[_0x30df14(0x7d)]);const _0x40d93f={},_0x51e66c=buildConfigFromFlags(_0xb39fb4['rawFlags']);await initGlobalEnvironment(_0x51e66c);const _0x2d8f6a=createPipelineEnv(_0x51e66c,{..._0xb39fb4[_0x30df14(0x84)],'yes':_0xb39fb4[_0x30df14(0x7e)]['risk']===_0x30df14(0x92)?!![]:_0xb39fb4[_0x30df14(0x84)][_0x30df14(0x80)],'nonInteractive':!![]});_0x2d8f6a['args']=_0xb39fb4[_0x30df14(0x90)],_0x2d8f6a[_0x30df14(0x7b)]=!![],_0x2d8f6a[_0x30df14(0x8f)]=_0x30df14(0x92);const _0x50f0cd=withAbortSignal(_0xb39fb4[_0x30df14(0x7e)],_0x33758f[_0x30df14(0x7d)]),_0x3e30f7=createLovrabetRunnerAdapter({'formatOutput'(_0x199494,_0x38d7fe){const _0x1f327c=_0x30df14;_0x40d93f[_0x1f327c(0x8b)]=_0x199494,_0x40d93f['command']=_0x38d7fe['command'],_0x40d93f[_0x1f327c(0x8c)]=_0x38d7fe['risk'],_0x40d93f[_0x1f327c(0x89)]=_0x38d7fe['format'],_0x40d93f[_0x1f327c(0x83)]=_0x38d7fe[_0x1f327c(0x83)]===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.');}});try{await runCommand(_0x50f0cd,_0x2d8f6a,_0x3e30f7);if(!_0x40d93f[_0x30df14(0x8b)]||!_0x40d93f[_0x30df14(0x97)]||!_0x40d93f[_0x30df14(0x8c)]||!_0x40d93f[_0x30df14(0x89)])throw new Error(_0x30df14(0x96));const _0x134f10=_0x33758f['presentation']??defaultPresentation,_0x2ae124=_0x40d93f[_0x30df14(0x83)]===!![],_0x46f048={'result':_0x40d93f[_0x30df14(0x8b)],'command':_0x40d93f['command'],'operation':_0x460ee8,'risk':_0x40d93f[_0x30df14(0x8c)],'format':_0x40d93f['format'],'dryRun':_0x2ae124},_0x2d42e1=createLovrabetWriteMetadata(_0xb39fb4[_0x30df14(0x7e)],_0x460ee8,_0x40d93f[_0x30df14(0x8b)],_0x2ae124);let _0x5b3c47;try{_0x5b3c47=await _0x134f10[_0x30df14(0x93)](_0x46f048);}catch(_0x309b81){if(!_0x2d42e1||_0x134f10===defaultPresentation)throw _0x309b81;_0x5b3c47=await defaultPresentation[_0x30df14(0x93)](_0x46f048);}return{'operation':_0x460ee8,'risk':_0x40d93f[_0x30df14(0x8c)],'mode':_0x2ae124?_0x30df14(0x91):_0x30df14(0x75),'result':_0x40d93f['result'],'output':_0x5b3c47,..._0x2d42e1?{'metadata':_0x2d42e1}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x15bea5,_0x3e90f2,_0x27c563,_0x55adf8){const _0x282f5a=a132_0x5191;if(_0x3e90f2['dryRun']===!![]||_0x15bea5[_0x282f5a(0x8c)]!==_0x282f5a(0x86)&&_0x15bea5[_0x282f5a(0x8c)]!==_0x282f5a(0x92))return;await _0x55adf8[_0x282f5a(0x85)][_0x282f5a(0x81)](buildLovrabetConfirmationRequest(_0x15bea5,_0x27c563,_0x55adf8[_0x282f5a(0x7d)]));}function withAbortSignal(_0x30608e,_0x265153){return{..._0x30608e,async 'execute'(_0x2135d4){const _0x4ef72d=a132_0x5191;return throwIfAborted(_0x265153),_0x30608e[_0x4ef72d(0x75)]({..._0x2135d4,'signal':_0x265153});}};}function throwIfAborted(_0x5d2cd6){const _0x586340=a132_0x5191;if(_0x5d2cd6?.[_0x586340(0x94)])throw _0x5d2cd6[_0x586340(0x8d)]instanceof Error?_0x5d2cd6[_0x586340(0x8d)]:new DOMException('Lovrabet\x20invocation\x20aborted.',_0x586340(0x95));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x495de3=a133_0xa0be;(function(_0x41a8a8,_0x260e10){const _0x3fbe29=a133_0xa0be,_0x16c444=_0x41a8a8();while(!![]){try{const _0x29a33b=parseInt(_0x3fbe29(0x12b))/0x1+-parseInt(_0x3fbe29(0x128))/0x2+-parseInt(_0x3fbe29(0x125))/0x3*(-parseInt(_0x3fbe29(0x12a))/0x4)+parseInt(_0x3fbe29(0x12d))/0x5+-parseInt(_0x3fbe29(0x129))/0x6*(parseInt(_0x3fbe29(0x126))/0x7)+parseInt(_0x3fbe29(0x124))/0x8+parseInt(_0x3fbe29(0x12c))/0x9;if(_0x29a33b===_0x260e10)break;else _0x16c444['push'](_0x16c444['shift']());}catch(_0x3f9ae1){_0x16c444['push'](_0x16c444['shift']());}}}(a133_0x5c4d,0xe40f3));function a133_0xa0be(_0x201ecb,_0x488280){_0x201ecb=_0x201ecb-0x123;const _0x5c4df0=a133_0x5c4d();let _0xa0be36=_0x5c4df0[_0x201ecb];return _0xa0be36;}let tail=Promise[a133_0x495de3(0x127)]();function a133_0x5c4d(){const _0x3b772f=['resolve','3308840RQiEBW','3750636VDjhtH','7192JRCEoy','966778GbLKpK','18173916GOemgH','331025npPATJ','catch','3026480zyjZQQ','681hKcbsV','14FppkEL'];a133_0x5c4d=function(){return _0x3b772f;};return a133_0x5c4d();}export async function runSerialized(_0x4c72d9){const _0x1a5efb=a133_0x495de3,_0x12e0e6=tail;let _0xb647f3;tail=new Promise(_0x524010=>{_0xb647f3=_0x524010;}),await _0x12e0e6[_0x1a5efb(0x123)](()=>undefined);try{return await _0x4c72d9();}finally{_0xb647f3();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29304a,_0x2cd1e7){const _0x485952=a134_0x5c7b,_0x5bac39=_0x29304a();while(!![]){try{const _0x2e6183=-parseInt(_0x485952(0xa7))/0x1*(parseInt(_0x485952(0xa3))/0x2)+parseInt(_0x485952(0xaa))/0x3+parseInt(_0x485952(0x99))/0x4*(-parseInt(_0x485952(0xa9))/0x5)+-parseInt(_0x485952(0xa0))/0x6*(parseInt(_0x485952(0x9a))/0x7)+parseInt(_0x485952(0x9e))/0x8*(parseInt(_0x485952(0xa8))/0x9)+-parseInt(_0x485952(0x9f))/0xa*(-parseInt(_0x485952(0xa6))/0xb)+-parseInt(_0x485952(0xad))/0xc;if(_0x2e6183===_0x2cd1e7)break;else _0x5bac39['push'](_0x5bac39['shift']());}catch(_0x2b1ccb){_0x5bac39['push'](_0x5bac39['shift']());}}}(a134_0x4fe0,0x18cf8));import a134_0x192331 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';function a134_0x4fe0(){const _0x45d5ec=['735084hncDGl','85TBkGtr','538554jHjsuM','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','slice','910380rKgYYS','hint','unknownCommand','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','join','assign','flatMap','17412tSZyfg','21XveQdG','flags','definition','../commands/registry.js','16BqwhRk','155830QraugQ','258702drZHmH','defaultCommand','input','82304cpQbuJ','validation','../framework/preparse.js','143gBfrJe','4twTZcY'];a134_0x4fe0=function(){return _0x45d5ec;};return a134_0x4fe0();}function a134_0x5c7b(_0x1d10f9,_0x2ef548){_0x1d10f9=_0x1d10f9-0x93;const _0x4fe0d9=a134_0x4fe0();let _0x5c7bcf=_0x4fe0d9[_0x1d10f9];return _0x5c7bcf;}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x574994){const _0x416410=a134_0x5c7b,_0x5a1a3a=a134_0x192331('',{'importMeta':import.meta,'argv':_0x574994,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x2ee639=[..._0x5a1a3a[_0x416410(0xa2)]],_0x2b3ed3=_0x5a1a3a[_0x416410(0x9b)];await correctFlags(_0x2b3ed3);const _0x5dc821=_0x2ee639[0x0];if(!_0x5dc821)throw CliErrors[_0x416410(0xa4)](_0x416410(0xab));const _0x3e9a48=resolveRemovedCommand(_0x5dc821,_0x2ee639[0x1]);if(_0x3e9a48)throw CliErrors[_0x416410(0xa4)](_0x3e9a48['message'],_0x3e9a48[_0x416410(0x93)]);if(!isKnownService(_0x5dc821)){const _0x5b998c=resolveDynamicServiceCommand(_0x2ee639,_0x2b3ed3);if(!_0x5b998c)throw CliErrors[_0x416410(0x94)](_0x2ee639[_0x416410(0x96)]('\x20'));return Object[_0x416410(0x97)](_0x2b3ed3,_0x5b998c[_0x416410(0x9b)]),{'definition':_0x5b998c[_0x416410(0x9c)],'rawFlags':_0x2b3ed3,'args':_0x5b998c['args']};}const _0xaa62a1=getServiceEntry(_0x5dc821),_0x1fbb3f=_0x2ee639[0x1]||_0xaa62a1[_0x416410(0xa1)];if(!_0x1fbb3f)throw CliErrors[_0x416410(0xa4)](_0x416410(0x95)+_0x5dc821+'\x22.');const _0x4bdb51=findDefinition(_0x5dc821,_0x1fbb3f);if(!_0x4bdb51)throw CliErrors[_0x416410(0x94)](_0x5dc821+'\x20'+_0x1fbb3f);return{'definition':_0x4bdb51,'rawFlags':_0x2b3ed3,'args':_0x2ee639[_0x416410(0xac)](0x2)};}async function correctFlags(_0x344f89){const _0xba9a7c=a134_0x5c7b;try{const {correctFlags:_0x3edbb7}=await import(_0xba9a7c(0xa5)),{getAllDefinitions:_0x5cb578}=await import(_0xba9a7c(0x9d)),_0x515e9d=_0x5cb578()[_0xba9a7c(0x98)](_0x1033d4=>_0x1033d4[_0xba9a7c(0x9b)]??[]),_0x442a0c=_0x3edbb7(_0x344f89,_0x515e9d);Object[_0xba9a7c(0x97)](_0x344f89,_0x442a0c[_0xba9a7c(0x9b)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a136_0xd55a32=a136_0xb34a;function a136_0x4b35(){const _0x2dd3a4=['digest','message','length','root','pipe','hex','539620LNrBbC','isSymbolicLink','status','files','path','lovrabet','reason','SKILL.md','SOURCE_INVALID','flatMap','current','skillVersion','version','489048vDIzJb','unknown','6HwdYcG','manifest','present','installedPath','lovrabet\x20cli-skill\x20install','error','missing','987736jZKrlV','762912gJxAnA','name','102830ZDFwzS','3zTKPLf','includes','home','state','update','split','packageVersion','parse','content_mismatch','stdio','skills@latest\x20exited\x20','skills','10898EINLgA','every','INSTALL_FAILED','VERIFY_FAILED','skipped','unverifiable','Unsafe\x20manifest\x20path:\x20','sha256','absent','version_mismatch','Symbolic\x20link\x20is\x20not\x20allowed:\x20','packageRoot','package.json','utf8','18uNruZc','509068zvjkDM'];a136_0x4b35=function(){return _0x2dd3a4;};return a136_0x4b35();}(function(_0xe63ec7,_0x2c9c4e){const _0x4d65c3=a136_0xb34a,_0xe5e610=_0xe63ec7();while(!![]){try{const _0x5b5b45=parseInt(_0x4d65c3(0xed))/0x1*(-parseInt(_0x4d65c3(0xd6))/0x2)+-parseInt(_0x4d65c3(0xe1))/0x3*(parseInt(_0x4d65c3(0xc0))/0x4)+parseInt(_0x4d65c3(0xc7))/0x5+-parseInt(_0x4d65c3(0xde))/0x6+parseInt(_0x4d65c3(0xd4))/0x7+-parseInt(_0x4d65c3(0xdd))/0x8*(-parseInt(_0x4d65c3(0xbf))/0x9)+parseInt(_0x4d65c3(0xe0))/0xa;if(_0x5b5b45===_0x2c9c4e)break;else _0xe5e610['push'](_0xe5e610['shift']());}catch(_0x3e7ea0){_0xe5e610['push'](_0xe5e610['shift']());}}}(a136_0x4b35,0x241b4));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a136_0xd55a32(0xda),SKILL_NAME=a136_0xd55a32(0xcc);function frontmatterValue(_0x59ff7a,_0x19b330){return _0x59ff7a['match'](new RegExp('^'+_0x19b330+':\x5cs*(.+)$','m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x1a233d,_0x443366=_0x1a233d){const _0x598098=a136_0xd55a32;return readdirSync(_0x443366,{'withFileTypes':!![]})[_0x598098(0xd0)](_0x57cbc3=>{const _0x1eebff=_0x598098,_0x282a56=join(_0x443366,_0x57cbc3['name']),_0x20e88d=lstatSync(_0x282a56);if(_0x20e88d[_0x1eebff(0xc8)]())throw new Error(_0x1eebff(0xbb)+_0x282a56);if(_0x20e88d['isDirectory']())return listFiles(_0x1a233d,_0x282a56);if(!_0x20e88d['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x282a56);return[relative(_0x1a233d,_0x282a56)[_0x1eebff(0xe6)](sep)['join']('/')];})['sort']((_0x10c80e,_0x4a8422)=>_0x10c80e<_0x4a8422?-0x1:_0x10c80e>_0x4a8422?0x1:0x0);}function digestFiles(_0x9acb05,_0x370029){const _0x458dff=a136_0xd55a32,_0x4be19b=createHash(_0x458dff(0xb8));for(const _0xf68f3e of _0x370029){if(_0xf68f3e['startsWith']('/')||_0xf68f3e[_0x458dff(0xe6)]('/')[_0x458dff(0xe2)]('..')||_0xf68f3e[_0x458dff(0xe2)]('\x5c'))throw new Error(_0x458dff(0xb7)+_0xf68f3e);_0x4be19b['update'](_0xf68f3e),_0x4be19b[_0x458dff(0xe5)]('\x00'),_0x4be19b[_0x458dff(0xe5)](readFileSync(join(_0x9acb05,..._0xf68f3e[_0x458dff(0xe6)]('/')))),_0x4be19b[_0x458dff(0xe5)]('\x00');}return _0x4be19b[_0x458dff(0xc1)](_0x458dff(0xc6));}function a136_0xb34a(_0x2bc9c7,_0x1a2c85){_0x2bc9c7=_0x2bc9c7-0xb5;const _0x4b350f=a136_0x4b35();let _0xb34aec=_0x4b350f[_0x2bc9c7];return _0xb34aec;}function sameFiles(_0x33d8aa,_0x54e9d7){const _0x289016=a136_0xd55a32;return _0x33d8aa[_0x289016(0xc3)]===_0x54e9d7[_0x289016(0xc3)]&&_0x33d8aa[_0x289016(0xee)]((_0x1aa870,_0x38c9b8)=>_0x1aa870===_0x54e9d7[_0x38c9b8]);}function readSource(_0x119b48){const _0x4bbf47=a136_0xd55a32,_0xd0349a=JSON[_0x4bbf47(0xe8)](readFileSync(join(_0x119b48,_0x4bbf47(0xbd)),_0x4bbf47(0xbe))),_0x1589f6=JSON[_0x4bbf47(0xe8)](readFileSync(join(_0x119b48,_0x4bbf47(0xec),'lovrabet.manifest.json'),'utf8')),_0x581925=join(_0x119b48,_0x4bbf47(0xec),SKILL_NAME),_0x26f249=frontmatterValue(readFileSync(join(_0x581925,'SKILL.md'),'utf8'),_0x4bbf47(0xd3)),_0x39b591=listFiles(_0x581925);if(_0x1589f6['schemaVersion']!==0x1||_0x1589f6[_0x4bbf47(0xdf)]!==SKILL_NAME||!_0xd0349a[_0x4bbf47(0xd3)]||_0x1589f6[_0x4bbf47(0xe7)]!==_0xd0349a[_0x4bbf47(0xd3)]||_0x1589f6[_0x4bbf47(0xd2)]!==_0xd0349a[_0x4bbf47(0xd3)]||_0x26f249!==_0xd0349a[_0x4bbf47(0xd3)]||!sameFiles(_0x39b591,_0x1589f6[_0x4bbf47(0xca)])||digestFiles(_0x581925,_0x39b591)!==_0x1589f6[_0x4bbf47(0xc1)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0xd0349a[_0x4bbf47(0xd3)],'skillVersion':_0x26f249,'root':_0x581925,'manifest':_0x1589f6};}function installedSkillPath(_0x1f2276){const _0x310bde=a136_0xd55a32,_0x1f2a6a=resolveInstalledSkill(SKILL_NAME,{'home':_0x1f2276});if(_0x1f2a6a[_0x310bde(0xe4)]==='present')return{'state':_0x310bde(0xd8),'path':dirname(_0x1f2a6a[_0x310bde(0xcb)])};if(_0x1f2a6a[_0x310bde(0xe4)]===_0x310bde(0xb9))return{'state':'missing'};return{'state':'unverifiable','reason':_0x1f2a6a['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x522025,_0x13140e={}){const _0x44cefd=a136_0xd55a32,_0x141276=installedSkillPath(_0x13140e[_0x44cefd(0xe3)]??homedir());if(_0x141276['state']==='missing')return{'state':_0x44cefd(0xdc),'expectedVersion':_0x522025,'repairCommand':REPAIR_COMMAND};if(_0x141276['state']===_0x44cefd(0xb6))return{'state':'unverifiable','expectedVersion':_0x522025,'reason':_0x141276['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x1720d2=frontmatterValue(readFileSync(join(_0x141276[_0x44cefd(0xcb)],_0x44cefd(0xce)),_0x44cefd(0xbe)),_0x44cefd(0xd3));return{'state':_0x1720d2===_0x522025?_0x44cefd(0xd1):_0x44cefd(0xba),'expectedVersion':_0x522025,'skillVersion':_0x1720d2,'installedPath':_0x141276['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x4532b1){return{'state':_0x44cefd(0xb6),'expectedVersion':_0x522025,'installedPath':_0x141276[_0x44cefd(0xcb)],'reason':_0x4532b1 instanceof Error?_0x4532b1[_0x44cefd(0xc2)]:String(_0x4532b1),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0xddf956={}){const _0x15c5d2=a136_0xd55a32,_0x1491ca=_0xddf956['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x4a7f09;try{_0x4a7f09=readSource(_0x1491ca);}catch(_0x195268){return{'state':'unverifiable','packageVersion':'unknown','reason':_0x195268 instanceof Error?_0x195268['message']:String(_0x195268),'repairCommand':REPAIR_COMMAND};}const _0x17e206=installedSkillPath(_0xddf956[_0x15c5d2(0xe3)]??homedir());if(_0x17e206[_0x15c5d2(0xe4)]===_0x15c5d2(0xdc))return{'state':_0x15c5d2(0xdc),'packageVersion':_0x4a7f09['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x17e206[_0x15c5d2(0xe4)]==='unverifiable')return{'state':'unverifiable','packageVersion':_0x4a7f09[_0x15c5d2(0xe7)],'reason':_0x17e206[_0x15c5d2(0xcd)],'repairCommand':REPAIR_COMMAND};try{const _0x529208=frontmatterValue(readFileSync(join(_0x17e206['path'],'SKILL.md'),'utf8'),_0x15c5d2(0xd3));if(_0x529208!==_0x4a7f09['skillVersion'])return{'state':_0x15c5d2(0xba),'packageVersion':_0x4a7f09[_0x15c5d2(0xe7)],'skillVersion':_0x529208,'installedPath':_0x17e206[_0x15c5d2(0xcb)],'repairCommand':REPAIR_COMMAND};const _0x5b58f1=listFiles(_0x17e206['path']),_0x1c7b4c=digestFiles(_0x17e206['path'],_0x5b58f1);return{'state':sameFiles(_0x5b58f1,_0x4a7f09[_0x15c5d2(0xd7)][_0x15c5d2(0xca)])&&_0x1c7b4c===_0x4a7f09[_0x15c5d2(0xd7)][_0x15c5d2(0xc1)]?_0x15c5d2(0xd1):_0x15c5d2(0xe9),'packageVersion':_0x4a7f09[_0x15c5d2(0xe7)],'skillVersion':_0x529208,'installedPath':_0x17e206[_0x15c5d2(0xcb)],'digest':_0x1c7b4c,'repairCommand':REPAIR_COMMAND};}catch(_0x38af49){return{'state':_0x15c5d2(0xb6),'packageVersion':_0x4a7f09['packageVersion'],'installedPath':_0x17e206[_0x15c5d2(0xcb)],'reason':_0x38af49 instanceof Error?_0x38af49[_0x15c5d2(0xc2)]:String(_0x38af49),'repairCommand':REPAIR_COMMAND};}}function failure(_0x24d68f,_0x8026e7,_0x4fbcfd,_0xd98375){const _0x362483=a136_0xd55a32;return{'ok':![],'code':_0x24d68f,'packageVersion':_0x8026e7[_0x362483(0xe7)],'skillVersion':_0x8026e7[_0x362483(0xd2)],'installedPath':_0xd98375,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4fbcfd instanceof Error?_0x4fbcfd['message']:String(_0x4fbcfd)};}export function installBuiltinSkill(_0x1fb1f0={}){const _0x1569a3=a136_0xd55a32,_0x23d7de=_0x1fb1f0[_0x1569a3(0xbc)]??DEFAULT_PACKAGE_ROOT,_0x2229cf=_0x1fb1f0['home']??homedir();let _0x411c47;try{_0x411c47=readSource(_0x23d7de);}catch(_0x230db5){return failure(_0x1569a3(0xcf),{'packageVersion':_0x1569a3(0xd5),'skillVersion':'unknown'},_0x230db5);}const _0x200696=inspectBuiltinSkill({'packageRoot':_0x23d7de,'home':_0x2229cf}),_0x1f74b8=runNpxSkillsAddGlobal(_0x23d7de,_0x411c47[_0x1569a3(0xc4)],{'stdio':_0x1fb1f0[_0x1569a3(0xea)]??_0x1569a3(0xc5),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x2229cf}});if(_0x1f74b8[_0x1569a3(0xb5)])return{'ok':!![],'packageVersion':_0x411c47['packageVersion'],'skillVersion':_0x411c47[_0x1569a3(0xd2)],'installedPath':_0x200696['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x1f74b8['ok'])return failure(_0x1569a3(0xef),_0x411c47,_0x1f74b8[_0x1569a3(0xdb)]??_0x1569a3(0xeb)+_0x1f74b8[_0x1569a3(0xc9)]);const _0x29ca82=inspectBuiltinSkill({'packageRoot':_0x23d7de,'home':_0x2229cf});if(_0x29ca82[_0x1569a3(0xe4)]!==_0x1569a3(0xd1))return failure(_0x1569a3(0xf0),_0x411c47,_0x29ca82[_0x1569a3(0xcd)]??'Installed\x20Skill\x20state\x20is\x20'+_0x29ca82[_0x1569a3(0xe4)],_0x29ca82[_0x1569a3(0xd9)]);return{'ok':!![],'packageVersion':_0x411c47[_0x1569a3(0xe7)],'skillVersion':_0x411c47[_0x1569a3(0xd2)],'installedPath':_0x29ca82[_0x1569a3(0xd9)],'changed':_0x200696[_0x1569a3(0xe4)]!=='current','repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x2049db=a137_0x4436;(function(_0x24ca49,_0x563bd7){const _0x4a04d1=a137_0x4436,_0x38c9e3=_0x24ca49();while(!![]){try{const _0x2e279f=-parseInt(_0x4a04d1(0x1c2))/0x1*(-parseInt(_0x4a04d1(0x1ba))/0x2)+parseInt(_0x4a04d1(0x1a4))/0x3+parseInt(_0x4a04d1(0x19b))/0x4+parseInt(_0x4a04d1(0x1ae))/0x5+parseInt(_0x4a04d1(0x1a9))/0x6+-parseInt(_0x4a04d1(0x1c6))/0x7+-parseInt(_0x4a04d1(0x1c8))/0x8;if(_0x2e279f===_0x563bd7)break;else _0x38c9e3['push'](_0x38c9e3['shift']());}catch(_0x54855b){_0x38c9e3['push'](_0x38c9e3['shift']());}}}(a137_0x5072,0x91acd));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a137_0x382dcd}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a137_0x5072(){const _0x3471f1=['INSTALL_PARTIAL','present','SPAWN_FAILED','796335FlzQhV','CHILD_EXIT_NONZERO','stderr','npm_config_global','reason','1119348crpMdv','signal','npx\x20terminated\x20by\x20signal\x20','match','join','1641015vmcOwG','absent','code','!\x20Could\x20not\x20verify\x20\x22','\x22\x20install\x20state:\x20','ENOENT','npx','skipNpxSkillsEnvSuffix','CHILD_TERMINATED','NPM_CONFIG_GLOBAL','exitCode','pipe','2016516aJruol','trim','warn','SKILL_NOT_INSTALLED','skills@latest','Installer\x20reported\x20','filter','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','1hLRiba','exit\x20','globalSkillName','message','5421612KlDvDG','state','8271528MHNenl','NPX_NOT_FOUND','npx\x20failed\x20to\x20start','unknown','log','2466712StNCQU','Skill\x20\x22','stdout','failed','stdio','shortMessage'];a137_0x5072=function(){return _0x3471f1;};return a137_0x5072();}function a137_0x4436(_0x12bcf7,_0x6ac867){_0x12bcf7=_0x12bcf7-0x19b;const _0x50726f=a137_0x5072();let _0x443660=_0x50726f[_0x12bcf7];return _0x443660;}export const LOVRABET_SKILL_SOURCE=a137_0x382dcd;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG['internalSkillSource'];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a137_0x2049db(0x1c4)];export function resolveGlobalSkillName(_0x490a91){const _0x4b7814=a137_0x2049db;switch(_0x490a91[_0x4b7814(0x1bb)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a137_0x2049db(0x1b5)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x38f3a3,_0x100ad1,_0x2197bb){return{'ok':![],'status':_0x100ad1,'code':_0x38f3a3,'error':'['+_0x38f3a3+']\x20'+_0x2197bb};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x420893,_0x50b8d9=LOVRABET_SKILL_SOURCE,_0x29d15d){const _0x52ae81=a137_0x2049db;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x31fb3b=['-y',_0x52ae81(0x1be),'add',_0x50b8d9,'-g','-y'],_0x357166=[_0x52ae81(0x1b4),..._0x31fb3b][_0x52ae81(0x1ad)]('\x20');console[_0x52ae81(0x1cc)]('*\x20'+_0x357166);const _0x2b215f={...process.env};delete _0x2b215f[_0x52ae81(0x1a7)],delete _0x2b215f[_0x52ae81(0x1b7)];const _0x12c017=execaSync(_0x52ae81(0x1b4),_0x31fb3b,{'cwd':_0x420893,'stdio':'pipe','env':_0x2b215f,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x52f2cd=[_0x12c017[_0x52ae81(0x19d)]?String(_0x12c017[_0x52ae81(0x19d)]):'',_0x12c017['stderr']?String(_0x12c017[_0x52ae81(0x1a6)]):''][_0x52ae81(0x1c0)](Boolean)['join']('\x0a')[_0x52ae81(0x1bb)](),_0x55b3bb=_0x12c017[_0x52ae81(0x1b8)]??null;_0x29d15d?.[_0x52ae81(0x19f)]!==_0x52ae81(0x1b9)&&_0x52f2cd&&console[_0x52ae81(0x1cc)](_0x52f2cd);if(_0x12c017['code']){const _0x5ab782=_0x12c017[_0x52ae81(0x1b0)]===_0x52ae81(0x1b3)?_0x52ae81(0x1c9):_0x12c017[_0x52ae81(0x1b0)]==='EPERM'||_0x12c017[_0x52ae81(0x1b0)]==='EACCES'?'PERMISSION_DENIED':_0x52ae81(0x1a3);return failure(_0x5ab782,_0x55b3bb,_0x12c017[_0x52ae81(0x1a0)]??_0x12c017[_0x52ae81(0x1c5)]??_0x12c017['code']);}if(_0x12c017[_0x52ae81(0x1aa)])return failure(_0x52ae81(0x1b6),_0x55b3bb,_0x52ae81(0x1ab)+_0x12c017[_0x52ae81(0x1aa)]);if(_0x12c017[_0x52ae81(0x19e)]&&_0x55b3bb===null)return failure(_0x52ae81(0x1a3),_0x55b3bb,_0x12c017[_0x52ae81(0x1a0)]??_0x12c017[_0x52ae81(0x1c5)]??_0x52ae81(0x1ca));if(_0x55b3bb!==0x0)return failure(_0x52ae81(0x1a5),_0x55b3bb,_0x52f2cd||_0x12c017[_0x52ae81(0x1a0)]||_0x52ae81(0x1c3)+(_0x55b3bb??_0x52ae81(0x1cb)));const _0x2443fd=_0x29d15d?.['expectedSkillName']??resolveGlobalSkillName(_0x50b8d9),_0x1f9448=_0x2443fd?resolveInstalledSkill(_0x2443fd,_0x29d15d?.['presence']):undefined,_0x2ee133=_0x52f2cd[_0x52ae81(0x1ac)](/Failed to install\s+(\d+)/i);if(_0x2ee133&&Number(_0x2ee133[0x1])>0x0){const _0x2f7a88=_0x52ae81(0x1bf)+_0x2ee133[0x1]+'\x20failed\x20target(s)'+(_0x52f2cd?':\x0a'+_0x52f2cd:'');if(_0x1f9448?.[_0x52ae81(0x1c7)]===_0x52ae81(0x1a2))return console['warn']('!\x20'+_0x2f7a88),{'ok':!![],'status':0x0};return failure(_0x52ae81(0x1a1),0x0,_0x2f7a88);}if(_0x2443fd&&_0x1f9448){if(_0x1f9448[_0x52ae81(0x1c7)]===_0x52ae81(0x1af))return failure(_0x52ae81(0x1bd),0x0,_0x52ae81(0x19c)+_0x2443fd+_0x52ae81(0x1c1)+_0x1f9448['checked'][_0x52ae81(0x1ad)](',\x20')+')');_0x1f9448[_0x52ae81(0x1c7)]==='unverifiable'&&console[_0x52ae81(0x1bc)](_0x52ae81(0x1b1)+_0x2443fd+_0x52ae81(0x1b2)+_0x1f9448[_0x52ae81(0x1a8)]);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a138_0x2f07(){const _0x210b1d=['181576DxZWrM','842WwuNae','coverage','12823320aGUNTI','build','1203935dogCVw','lovrabet.skill.json','4036XWBcsx','.svn','.turbo','520914loAAMQ','.git','SKILL.md','.cache','.hg','.next','1005uirDBT','899eDbJmf','dist','.DS_Store','2678112lbQjrf','119CigfkB'];a138_0x2f07=function(){return _0x210b1d;};return a138_0x2f07();}const a138_0x2eb80e=a138_0x4bd1;(function(_0x539216,_0xfe03de){const _0x549a20=a138_0x4bd1,_0x4b5943=_0x539216();while(!![]){try{const _0x4e1a53=parseInt(_0x549a20(0xde))/0x1*(-parseInt(_0x549a20(0xe4))/0x2)+-parseInt(_0x549a20(0xdd))/0x3*(parseInt(_0x549a20(0xd4))/0x4)+parseInt(_0x549a20(0xd2))/0x5+parseInt(_0x549a20(0xd7))/0x6+-parseInt(_0x549a20(0xe2))/0x7*(parseInt(_0x549a20(0xe3))/0x8)+-parseInt(_0x549a20(0xe1))/0x9+parseInt(_0x549a20(0xd0))/0xa;if(_0x4e1a53===_0xfe03de)break;else _0x4b5943['push'](_0x4b5943['shift']());}catch(_0x5dea1b){_0x4b5943['push'](_0x4b5943['shift']());}}}(a138_0x2f07,0x3346b));export const METADATA_FILE=a138_0x2eb80e(0xd3);export const SKILL_FILE=a138_0x2eb80e(0xd9);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a138_0x2eb80e(0xe0)]);function a138_0x4bd1(_0x574de1,_0x583d6a){_0x574de1=_0x574de1-0xd0;const _0x2f0759=a138_0x2f07();let _0x4bd16c=_0x2f0759[_0x574de1];return _0x4bd16c;}export const IGNORED_DIR_NAMES=new Set([a138_0x2eb80e(0xd8),a138_0x2eb80e(0xdb),a138_0x2eb80e(0xd5),'node_modules',a138_0x2eb80e(0xdc),a138_0x2eb80e(0xdf),a138_0x2eb80e(0xd1),a138_0x2eb80e(0xe5),a138_0x2eb80e(0xd6),a138_0x2eb80e(0xda)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x392932,_0x1c15db){const _0x54129f=a139_0x3ead,_0x4ce113=_0x392932();while(!![]){try{const _0x22457f=-parseInt(_0x54129f(0x85))/0x1*(-parseInt(_0x54129f(0x7c))/0x2)+parseInt(_0x54129f(0x80))/0x3*(parseInt(_0x54129f(0x89))/0x4)+parseInt(_0x54129f(0x83))/0x5+-parseInt(_0x54129f(0x8b))/0x6+parseInt(_0x54129f(0x88))/0x7+-parseInt(_0x54129f(0x84))/0x8+parseInt(_0x54129f(0x7e))/0x9;if(_0x22457f===_0x1c15db)break;else _0x4ce113['push'](_0x4ce113['shift']());}catch(_0x1bce34){_0x4ce113['push'](_0x4ce113['shift']());}}}(a139_0x4e06,0xddc67));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a139_0x3ead(_0x2caeaf,_0x18b82c){_0x2caeaf=_0x2caeaf-0x7c;const _0x4e0627=a139_0x4e06();let _0x3ead02=_0x4e0627[_0x2caeaf];return _0x3ead02;}export function resolveManagedFilePath(_0xe9a218,_0x2beafa){const _0xfa65de=a139_0x3ead,_0x29d6d1=normalizeSkillRelativePath(_0x2beafa),_0x5b3972=realOrResolved(_0xe9a218),_0x4c5ca7=resolve(_0x5b3972,..._0x29d6d1[_0xfa65de(0x87)]('/'));if(!isPathInside(_0x4c5ca7,_0x5b3972))throw CliErrors[_0xfa65de(0x86)](_0xfa65de(0x81)+_0x2beafa);return ensureNoSymlinkInManagedPath(_0x5b3972,_0x29d6d1),_0x4c5ca7;}export function ensureNoSymlinkInManagedPath(_0x42e80d,_0x5b1a99){const _0x475ac1=a139_0x3ead;let _0x2ada73=_0x42e80d;for(const _0x3e09a4 of _0x5b1a99[_0x475ac1(0x87)]('/')){_0x2ada73=resolve(_0x2ada73,_0x3e09a4);const _0xeca461=lstatIfPresent(_0x2ada73);if(_0xeca461?.[_0x475ac1(0x8a)]())throw CliErrors['validation'](_0x475ac1(0x82)+_0x5b1a99);}}export function isDanglingSymlink(_0x3f3426){const _0x59e539=a139_0x3ead;try{return lstatSync(_0x3f3426)[_0x59e539(0x8a)]();}catch{return![];}}export function resolveSymlinkTarget(_0x1a4221){const _0x29677a=readlinkSync(_0x1a4221);return isAbsolute(_0x29677a)?_0x29677a:resolve(dirname(_0x1a4221),_0x29677a);}export function isPathInside(_0x58c79c,_0x5ec0de){const _0x47122f=a139_0x3ead,_0x3ea34c=_0x58c79c[_0x47122f(0x8c)](sep)?_0x58c79c:''+_0x58c79c+sep,_0x398183=_0x5ec0de[_0x47122f(0x8c)](sep)?_0x5ec0de:''+_0x5ec0de+sep;return _0x58c79c===_0x5ec0de||_0x3ea34c[_0x47122f(0x8e)](_0x398183);}export function realOrResolved(_0x29132f){try{return realpathSync(_0x29132f);}catch{return resolve(_0x29132f);}}export function lstatIfPresent(_0x320c87){try{return lstatSync(_0x320c87);}catch{return undefined;}}export function writeTextAtomic(_0x245f13,_0x3540ec,_0x1aea46){const _0x9accc0=a139_0x3ead;writeBytesAtomic(_0x245f13,Buffer[_0x9accc0(0x8d)](_0x3540ec,_0x9accc0(0x7f)),_0x1aea46);}export function writeBytesAtomic(_0x402ef1,_0x65605a,_0x545c00){const _0x5d894c=_0x402ef1+'.tmp';try{writeFileSync(_0x5d894c,_0x65605a,{'mode':_0x545c00}),renameSync(_0x5d894c,_0x402ef1);}catch(_0x51d654){try{rmSync(_0x5d894c,{'force':!![]});}catch{}throw _0x51d654;}}export function writeJsonAtomic(_0x54c6d9,_0x245157){const _0x5020cb=a139_0x3ead;writeTextAtomic(_0x54c6d9,JSON[_0x5020cb(0x7d)](_0x245157,null,0x2)+'\x0a',0x180);}function a139_0x4e06(){const _0x3b8367=['stringify','4683177sIACqG','utf8','690rdHcfq','Unsafe\x20Skill\x20file\x20path:\x20','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','7330180wPkKfN','11557904VjgvkL','60505QeMRDj','validation','split','1974266Uxdudr','4216XufrtL','isSymbolicLink','5665698dEJxES','endsWith','from','startsWith','26kcsAvE'];a139_0x4e06=function(){return _0x3b8367;};return a139_0x4e06();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4408f8,_0x567ce4){const _0x45f163=a140_0x1c77,_0x570f4c=_0x4408f8();while(!![]){try{const _0x118c51=-parseInt(_0x45f163(0x1f6))/0x1+parseInt(_0x45f163(0x1fe))/0x2*(parseInt(_0x45f163(0x1fa))/0x3)+parseInt(_0x45f163(0x1f1))/0x4*(parseInt(_0x45f163(0x1f9))/0x5)+-parseInt(_0x45f163(0x1fd))/0x6*(parseInt(_0x45f163(0x1f2))/0x7)+parseInt(_0x45f163(0x1f4))/0x8*(-parseInt(_0x45f163(0x1fc))/0x9)+-parseInt(_0x45f163(0x1ee))/0xa+parseInt(_0x45f163(0x1f3))/0xb*(parseInt(_0x45f163(0x1fb))/0xc);if(_0x118c51===_0x567ce4)break;else _0x570f4c['push'](_0x570f4c['shift']());}catch(_0x459f7b){_0x570f4c['push'](_0x570f4c['shift']());}}}(a140_0x35e2,0x1b077));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a140_0x35e2(){const _0x48c052=['1749256YfEjkv','size','206269LxNVlg','path','sha256','5aKchrt','12VJlIMC','42732epqZCL','9Tnfede','6hJiWFK','3262TMEtVB','digest','946240UOxqzr','hex','update','121076ukXIGn','307657HnfhmN','1969GxFzkt'];a140_0x35e2=function(){return _0x48c052;};return a140_0x35e2();}function a140_0x1c77(_0x158139,_0x268ea2){_0x158139=_0x158139-0x1ed;const _0x35e247=a140_0x35e2();let _0x1c7720=_0x35e247[_0x158139];return _0x1c7720;}export function contentHash(_0x24ca1d){const _0x427a34=a140_0x1c77;return createHash('sha256')[_0x427a34(0x1f0)](_0x24ca1d)[_0x427a34(0x1ed)](_0x427a34(0x1ef));}export function fileHash(_0x58f896){return bufferSha256(fileContent(_0x58f896));}export function bufferSha256(_0x5f2193){const _0x2fdf19=a140_0x1c77;return createHash(_0x2fdf19(0x1f8))[_0x2fdf19(0x1f0)](_0x5f2193)[_0x2fdf19(0x1ed)](_0x2fdf19(0x1ef));}export function fileTreeHash(_0x135e08){const _0x1cfd26=a140_0x1c77,_0x29be8f=createHash(_0x1cfd26(0x1f8));for(const _0x535a02 of normalizeManifestFiles(_0x135e08)){_0x29be8f[_0x1cfd26(0x1f0)](_0x535a02[_0x1cfd26(0x1f7)]),_0x29be8f[_0x1cfd26(0x1f0)]('\x00'),_0x29be8f[_0x1cfd26(0x1f0)](_0x535a02[_0x1cfd26(0x1f8)]),_0x29be8f[_0x1cfd26(0x1f0)]('\x00'),_0x29be8f['update'](String(_0x535a02[_0x1cfd26(0x1f5)])),_0x29be8f[_0x1cfd26(0x1f0)]('\x00');}return _0x29be8f[_0x1cfd26(0x1ed)](_0x1cfd26(0x1ef));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a141_0x1224(){const _0x2d01a6=['4185360ZGUGdq','freeze','557463SaXGpD','17764360eQHrzK','cwd','49992vVJGHa','global','managedRoot','skills','.agents','674TPRfLR','333YeQQOG','11MToUBE','12iancgH','7593YTJnuE','2953622gtDKzO','1089336pnKbvY'];a141_0x1224=function(){return _0x2d01a6;};return a141_0x1224();}const a141_0x608b43=a141_0x353c;function a141_0x353c(_0x29338a,_0x431147){_0x29338a=_0x29338a-0x1d3;const _0x1224c1=a141_0x1224();let _0x353c25=_0x1224c1[_0x29338a];return _0x353c25;}(function(_0x5a66f5,_0xc47f13){const _0x3bf0e1=a141_0x353c,_0x2728a1=_0x5a66f5();while(!![]){try{const _0x6d2afd=-parseInt(_0x3bf0e1(0x1d4))/0x1+parseInt(_0x3bf0e1(0x1dc))/0x2*(parseInt(_0x3bf0e1(0x1e0))/0x3)+parseInt(_0x3bf0e1(0x1e2))/0x4+-parseInt(_0x3bf0e1(0x1e3))/0x5+parseInt(_0x3bf0e1(0x1df))/0x6*(-parseInt(_0x3bf0e1(0x1e1))/0x7)+-parseInt(_0x3bf0e1(0x1d7))/0x8*(parseInt(_0x3bf0e1(0x1dd))/0x9)+parseInt(_0x3bf0e1(0x1d5))/0xa*(parseInt(_0x3bf0e1(0x1de))/0xb);if(_0x6d2afd===_0xc47f13)break;else _0x2728a1['push'](_0x2728a1['shift']());}catch(_0x49cb8e){_0x2728a1['push'](_0x2728a1['shift']());}}}(a141_0x1224,0x697cd));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x5f1bcf,_0x47f54d=a141_0x608b43(0x1d8),_0x54a1e2={}){const _0x3b1ede=a141_0x608b43,_0x5e7965=resolveSkillSyncPaths(_0x54a1e2),_0x1ac82d=safePathSegment(_0x5f1bcf,'appCode'),_0x15584d=_0x47f54d==='project'?[resolve(_0x54a1e2[_0x3b1ede(0x1d6)]??process['cwd'](),_0x3b1ede(0x1db),_0x3b1ede(0x1da))]:runtimeAgentSkillRoots(_0x5e7965);return Object[_0x3b1ede(0x1d3)]({'scope':_0x47f54d,'appCode':_0x1ac82d,'skillRoots':Object[_0x3b1ede(0x1d3)](_0x15584d),'managedRoot':_0x5e7965[_0x3b1ede(0x1d9)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a141_0x43b936=a141_0x1571;(function(_0x570382,_0x1f7e00){const _0x547639=a141_0x1571,_0x26469a=_0x570382();while(!![]){try{const _0x3eba58=-parseInt(_0x547639(0x103))/0x1+-parseInt(_0x547639(0x109))/0x2*(-parseInt(_0x547639(0xe6))/0x3)+-parseInt(_0x547639(0x10b))/0x4+parseInt(_0x547639(0xd9))/0x5+parseInt(_0x547639(0x104))/0x6*(-parseInt(_0x547639(0xf4))/0x7)+parseInt(_0x547639(0xea))/0x8*(parseInt(_0x547639(0x101))/0x9)+parseInt(_0x547639(0xff))/0xa;if(_0x3eba58===_0x1f7e00)break;else _0x26469a['push'](_0x26469a['shift']());}catch(_0xc0a455){_0x26469a['push'](_0x26469a['shift']());}}}(a141_0x5f41,0xd4128));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a141_0x945652 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';function a141_0x5f41(){const _0x24d9ad=['Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skillRoots','isDirectory','has','metadata-mismatch','1043ZcrAln','push','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','scope','set','name','validation','runtime-observe','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','map','7196510LdFWtR','pruneSkillCodes','2495925QwUpKN','scopes','1509278ZCmRVT','5754jQtUMV','project','company','builtin','accessKey','16YviTgS','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','280232XmBLpO','lovrabet','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','length','protectedLinkRoots','agentsSkillsDir','filter','dir','447190giCNKI','get','unchanged','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','trim','skipped','created','managedRoot','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','removed','env','skillCode','460176nlMygC','metadataPath','contentHash','personal','16yqEXcW','skill','updated','appCode','isSymbolicLink'];a141_0x5f41=function(){return _0x24d9ad;};return a141_0x5f41();}const {copySync,ensureDirSync,removeSync}=a141_0x945652,RESERVED_PROJECT_SKILL_CODES=new Set([a141_0x43b936(0x10c),a141_0x43b936(0xfc),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x1634a1,_0x13ca88){const _0xfcb71f=a141_0x43b936,_0x2f0054=new Map();for(const _0x56352d of _0x1634a1){const _0x1af7dc=_0x56352d[_0xfcb71f(0xeb)][_0xfcb71f(0xe5)];if(!_0x1af7dc)continue;const _0x11ffaf=_0x2f0054[_0xfcb71f(0xda)](_0x1af7dc);(!_0x11ffaf||_0x56352d[_0xfcb71f(0xf8)]===_0xfcb71f(0xe9))&&_0x2f0054[_0xfcb71f(0xf9)](_0x1af7dc,_0x56352d);}const _0x47cb9c=[];for(const _0x2da968 of _0x2f0054['values']()){const _0x2a31bc=requireSkillCode(_0x2da968['skill']),_0x5130ef=readMetadataIfPresent(_0x2da968[_0xfcb71f(0xe7)]);if(_0x5130ef?.[_0xfcb71f(0xed)]!==_0x13ca88[_0xfcb71f(0xed)]||_0x5130ef[_0xfcb71f(0xe5)]!==_0x2a31bc)throw CliErrors[_0xfcb71f(0xfb)](_0xfcb71f(0xf6)+_0x13ca88[_0xfcb71f(0xed)]+':\x20'+_0x2da968[_0xfcb71f(0xe7)]);const _0x1cccd3=runtimeSkillLinkName(_0x13ca88,_0x2a31bc);for(const _0x6e0639 of _0x13ca88['skillRoots']){_0x47cb9c['push'](ensureManagedSymlink(resolve(_0x6e0639,_0x1cccd3),_0x2da968[_0xfcb71f(0xd8)],_0x13ca88,_0x2a31bc));}}return _0x47cb9c;}export function pruneStaleRuntimeSkillLinks(_0x11e2da,_0x4393e0,_0x57dbc1){const _0x3b6d68=a141_0x43b936,_0x4bb534=new Set([..._0x4393e0][_0x3b6d68(0xfe)](_0x475b4d=>_0x475b4d[_0x3b6d68(0xdd)]())[_0x3b6d68(0xd7)](Boolean)),_0x25c3b0=_0x57dbc1?new Set([..._0x57dbc1]['map'](_0x3ae8e7=>_0x3ae8e7[_0x3b6d68(0xdd)]())[_0x3b6d68(0xd7)](Boolean)):undefined,_0x188e5c=[];for(const _0x50403d of _0x11e2da[_0x3b6d68(0xf0)]){for(const _0x49b6bd of managedTargetSkillLinkPaths(_0x50403d,_0x11e2da)){const _0x4cf207=runtimeSkillCodeFromLink(_0x11e2da,_0x49b6bd);if(_0x25c3b0&&!_0x25c3b0[_0x3b6d68(0xf2)](_0x4cf207))continue;if(_0x4bb534[_0x3b6d68(0xf2)](_0x4cf207))continue;_0x188e5c['push'](removeManagedSkillLink(_0x49b6bd,_0x11e2da,_0x4cf207));}}return _0x188e5c;}export function pruneStaleRuntimeSkillCache(_0x595e56,_0x342739={}){const _0x310956=a141_0x43b936,_0x45fef0=new Set([..._0x595e56['activeSkillCodes']][_0x310956(0xfe)](_0x256631=>_0x256631[_0x310956(0xdd)]())[_0x310956(0xd7)](Boolean)),_0x191418=_0x595e56[_0x310956(0x100)]?new Set([..._0x595e56[_0x310956(0x100)]][_0x310956(0xfe)](_0x2187f3=>_0x2187f3[_0x310956(0xdd)]())[_0x310956(0xd7)](Boolean)):undefined,_0x4c0b00=_0x595e56[_0x310956(0x102)]??[_0x310956(0xe9),_0x310956(0x106)],_0x206997=resolve(getRuntimeSkillCacheRoot(_0x595e56[_0x310956(0xe4)],_0x595e56[_0x310956(0x108)],_0x342739),safePathSegment(_0x595e56[_0x310956(0xed)],_0x310956(0xed))),_0x34af49=[];for(const _0x5992a9 of _0x4c0b00){const _0x18196c=resolve(_0x206997,_0x5992a9);if(!existsSync(_0x18196c))continue;for(const _0xf3eacf of readdirSync(_0x18196c,{'withFileTypes':!![]})){if(!_0xf3eacf['isDirectory']())continue;const _0x1fb408=_0xf3eacf[_0x310956(0xfa)];if(_0x191418&&!_0x191418['has'](_0x1fb408))continue;if(_0x45fef0[_0x310956(0xf2)](_0x1fb408))continue;const _0x56e5f2=resolve(_0x18196c,_0x1fb408),_0x138d48=readMetadataIfPresent(resolve(_0x56e5f2,METADATA_FILE));if(_0x138d48?.[_0x310956(0xed)]!==_0x595e56['appCode']||_0x138d48[_0x310956(0xf8)]!==_0x5992a9||_0x138d48['skillCode']!==_0x1fb408){_0x34af49[_0x310956(0xf5)]({'path':_0x56e5f2,'action':'skipped','reason':_0x310956(0xf3)});continue;}if(isLinkedFromAnyRoot(_0x56e5f2,_0x595e56[_0x310956(0xd5)]??[])){_0x34af49[_0x310956(0xf5)]({'path':_0x56e5f2,'action':_0x310956(0xde),'reason':'linked-from-protected-root'});continue;}removeSync(_0x56e5f2),_0x34af49[_0x310956(0xf5)]({'path':_0x56e5f2,'action':'removed'});}}return _0x34af49;}export function linkGlobalRuntimeSkills(_0x218c76,_0xb56663={}){const _0x23d072=a141_0x43b936,_0x2ee043=resolveSkillSyncPaths(_0xb56663),_0x1a9592=[];for(const _0xe1eb52 of _0x218c76){if(_0xe1eb52[_0x23d072(0xf8)]!==_0x23d072(0x107))throw CliErrors[_0x23d072(0xfb)](_0x23d072(0xdc)+_0xe1eb52[_0x23d072(0xf8)]);const _0x1ca21a=requireSkillCode(_0xe1eb52[_0x23d072(0xeb)]),_0x15210a=copyManagedSkillDirectory(_0xe1eb52[_0x23d072(0xd8)],resolve(_0x2ee043[_0x23d072(0xd6)],_0x1ca21a));_0x1a9592[_0x23d072(0xf5)]({..._0x15210a,'contentHash':_0xe1eb52[_0x23d072(0xe8)]});}return _0x1a9592;}function ensureManagedSymlink(_0x2039a9,_0x52d1d0,_0x14510e,_0x591c4a){const _0x2a8681=a141_0x43b936;mkdirSync(dirname(_0x2039a9),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2039a9)||isDanglingSymlink(_0x2039a9)){const _0x3259c1=lstatSync(_0x2039a9);if(!_0x3259c1[_0x2a8681(0xee)]())throw CliErrors[_0x2a8681(0xfb)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x2039a9);const _0x3e69cc=resolveSymlinkTarget(_0x2039a9);if(!isPathInside(realOrResolved(_0x3e69cc),realOrResolved(_0x14510e[_0x2a8681(0xe0)])))throw CliErrors[_0x2a8681(0xfb)](_0x2a8681(0xef)+_0x2039a9);if(realOrResolved(_0x3e69cc)===realOrResolved(_0x52d1d0))return{'path':_0x2039a9,'target':_0x52d1d0,'action':'unchanged'};const _0x14bf54=readMetadataIfPresent(resolve(_0x3e69cc,METADATA_FILE));if(_0x14510e['scope']==='project'&&(_0x14bf54?.[_0x2a8681(0xed)]!==_0x14510e[_0x2a8681(0xed)]||_0x14bf54[_0x2a8681(0xe5)]!==_0x591c4a))throw CliErrors['validation'](_0x2a8681(0xf7)+_0x2039a9);return unlinkSync(_0x2039a9),symlinkSync(_0x52d1d0,_0x2039a9,'dir'),{'path':_0x2039a9,'target':_0x52d1d0,'action':_0x2a8681(0xec)};}return symlinkSync(_0x52d1d0,_0x2039a9,_0x2a8681(0xd8)),{'path':_0x2039a9,'target':_0x52d1d0,'action':_0x2a8681(0xdf)};}function managedTargetSkillLinkPaths(_0x1deee7,_0x10adea){const _0x332357=a141_0x43b936;if(!existsSync(_0x1deee7))return[];const _0x4e400f=_0x10adea[_0x332357(0xed)]+'--';return readdirSync(_0x1deee7,{'withFileTypes':!![]})[_0x332357(0xd7)](_0x2547fa=>_0x10adea['scope']===_0x332357(0x105)||_0x2547fa[_0x332357(0xfa)]['startsWith'](_0x4e400f))[_0x332357(0xfe)](_0x38d30a=>resolve(_0x1deee7,_0x38d30a['name']));}function a141_0x1571(_0x1fe9d9,_0x2d5ddb){_0x1fe9d9=_0x1fe9d9-0xd4;const _0x5f41b6=a141_0x5f41();let _0x1571c5=_0x5f41b6[_0x1fe9d9];return _0x1571c5;}function removeManagedSkillLink(_0x11dd40,_0x7bc7cd,_0x453ac1){const _0x33f7b8=a141_0x43b936,_0x37c7e0=lstatIfPresent(_0x11dd40);if(!_0x37c7e0?.['isSymbolicLink']())return{'path':_0x11dd40,'action':_0x33f7b8(0xde),'reason':'not-managed-symlink'};const _0x53f911=resolveSymlinkTarget(_0x11dd40);if(!isPathInside(realOrResolved(_0x53f911),realOrResolved(_0x7bc7cd['managedRoot'])))return{'path':_0x11dd40,'action':'skipped','reason':'external-symlink'};const _0x43f531=readMetadataIfPresent(resolve(_0x53f911,METADATA_FILE));if(_0x7bc7cd[_0x33f7b8(0xf8)]==='project'&&(_0x43f531?.['appCode']!==_0x7bc7cd[_0x33f7b8(0xed)]||_0x43f531[_0x33f7b8(0xe5)]!==_0x453ac1))return{'path':_0x11dd40,'action':'skipped','reason':_0x33f7b8(0xf3)};return unlinkSync(_0x11dd40),{'path':_0x11dd40,'action':_0x33f7b8(0xe3)};}function isLinkedFromAnyRoot(_0x880525,_0x1d5a33){const _0x4f52d5=a141_0x43b936,_0x5cb203=realOrResolved(_0x880525);for(const _0x1438eb of _0x1d5a33){if(!existsSync(_0x1438eb))continue;for(const _0x5ab9e7 of readdirSync(_0x1438eb,{'withFileTypes':!![]})){if(!_0x5ab9e7[_0x4f52d5(0xee)]())continue;const _0xec4b51=resolve(_0x1438eb,_0x5ab9e7[_0x4f52d5(0xfa)]);if(realOrResolved(resolveSymlinkTarget(_0xec4b51))===_0x5cb203)return!![];}}return![];}function runtimeSkillLinkName(_0x50b3a0,_0x12a737){const _0x1f15b0=a141_0x43b936,_0x5ab87a=safePathSegment(_0x12a737,_0x1f15b0(0xe5));if(_0x50b3a0[_0x1f15b0(0xf8)]===_0x1f15b0(0x105)&&RESERVED_PROJECT_SKILL_CODES[_0x1f15b0(0xf2)](_0x5ab87a))throw CliErrors['validation'](_0x1f15b0(0xe2)+_0x5ab87a);return _0x50b3a0[_0x1f15b0(0xf8)]===_0x1f15b0(0x105)?_0x5ab87a:_0x50b3a0[_0x1f15b0(0xed)]+'--'+_0x5ab87a;}function runtimeSkillCodeFromLink(_0x1d0446,_0x3369f0){const _0x14c603=a141_0x43b936,_0x4ae6cc=basename(_0x3369f0);return _0x1d0446[_0x14c603(0xf8)]===_0x14c603(0x105)?_0x4ae6cc:_0x4ae6cc['slice']((_0x1d0446['appCode']+'--')[_0x14c603(0xd4)]);}export function copyManagedSkillDirectory(_0x5af521,_0x347b6e){const _0x5902f1=a141_0x43b936,_0x59b72d=resolve(_0x347b6e,METADATA_FILE),_0x251901=existsSync(_0x347b6e);if(_0x251901){const _0x12ea20=lstatSync(_0x347b6e);if(_0x12ea20[_0x5902f1(0xee)]())throw CliErrors[_0x5902f1(0xfb)](_0x5902f1(0x10a)+_0x347b6e);if(!_0x12ea20[_0x5902f1(0xf1)]())throw CliErrors[_0x5902f1(0xfb)](_0x5902f1(0x10d)+_0x347b6e);const _0x13a97a=readMetadataIfPresent(_0x59b72d);if(_0x13a97a?.['scope']!==_0x5902f1(0x107))throw CliErrors[_0x5902f1(0xfb)](_0x5902f1(0xfd)+_0x347b6e);}ensureDirSync(dirname(_0x347b6e));const _0x2dc318=_0x251901?readMetadataIfPresent(_0x59b72d)?.['contentHash']:undefined,_0x59f4bd=readMetadataIfPresent(resolve(_0x5af521,METADATA_FILE))?.[_0x5902f1(0xe8)];return _0x251901&&removeSync(_0x347b6e),copySkillDirectory(_0x5af521,_0x347b6e),{'path':_0x347b6e,'target':_0x5af521,'action':!_0x251901?_0x5902f1(0xdf):_0x2dc318===_0x59f4bd?_0x5902f1(0xdb):_0x5902f1(0xec)};}function copySkillDirectory(_0x1ebb50,_0x139d03){copySync(_0x1ebb50,_0x139d03,{'dereference':![],'overwrite':!![],'filter'(_0x3169d3){const _0x2f2c15=a141_0x1571;if(lstatSync(_0x3169d3)['isSymbolicLink']())throw CliErrors[_0x2f2c15(0xfb)](_0x2f2c15(0xe1)+_0x3169d3);return!![];}});}
|
|
1
|
+
const a142_0x706cd3=a142_0x3a61;(function(_0x18b933,_0xcf2d0e){const _0x1527b7=a142_0x3a61,_0x173529=_0x18b933();while(!![]){try{const _0xf041b=-parseInt(_0x1527b7(0x1de))/0x1*(parseInt(_0x1527b7(0x1da))/0x2)+parseInt(_0x1527b7(0x1ed))/0x3*(-parseInt(_0x1527b7(0x1ba))/0x4)+parseInt(_0x1527b7(0x1c5))/0x5*(-parseInt(_0x1527b7(0x1d0))/0x6)+-parseInt(_0x1527b7(0x1b3))/0x7*(-parseInt(_0x1527b7(0x1eb))/0x8)+-parseInt(_0x1527b7(0x1b2))/0x9+parseInt(_0x1527b7(0x1db))/0xa*(-parseInt(_0x1527b7(0x1dd))/0xb)+parseInt(_0x1527b7(0x1cc))/0xc*(parseInt(_0x1527b7(0x1df))/0xd);if(_0xf041b===_0xcf2d0e)break;else _0x173529['push'](_0x173529['shift']());}catch(_0x18edc4){_0x173529['push'](_0x173529['shift']());}}}(a142_0xfb12,0xa9478));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a142_0x3797da from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a142_0x3a61(_0x1abe55,_0x4149b8){_0x1abe55=_0x1abe55-0x1af;const _0xfb12e=a142_0xfb12();let _0x3a615b=_0xfb12e[_0x1abe55];return _0x3a615b;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a142_0x3797da,RESERVED_PROJECT_SKILL_CODES=new Set([a142_0x706cd3(0x1be),a142_0x706cd3(0x1e1),a142_0x706cd3(0x1e5)]);export function linkEffectiveRuntimeSkills(_0x4267a7,_0x357078){const _0x7ee390=a142_0x706cd3,_0x19a8b7=new Map();for(const _0x55f9f4 of _0x4267a7){const _0x1ca302=_0x55f9f4['skill'][_0x7ee390(0x1ef)];if(!_0x1ca302)continue;const _0x12c602=_0x19a8b7['get'](_0x1ca302);(!_0x12c602||_0x55f9f4[_0x7ee390(0x1ca)]===_0x7ee390(0x1d3))&&_0x19a8b7[_0x7ee390(0x1c9)](_0x1ca302,_0x55f9f4);}const _0x1657a1=[];for(const _0x54644f of _0x19a8b7[_0x7ee390(0x1d5)]()){const _0x568854=requireSkillCode(_0x54644f[_0x7ee390(0x1b4)]),_0xcad3a4=readMetadataIfPresent(_0x54644f['metadataPath']);if(_0xcad3a4?.[_0x7ee390(0x1b7)]!==_0x357078[_0x7ee390(0x1b7)]||_0xcad3a4[_0x7ee390(0x1ef)]!==_0x568854)throw CliErrors['validation'](_0x7ee390(0x1c7)+_0x357078[_0x7ee390(0x1b7)]+':\x20'+_0x54644f[_0x7ee390(0x1d7)]);const _0x3e8557=runtimeSkillLinkName(_0x357078,_0x568854);for(const _0x4212a1 of _0x357078[_0x7ee390(0x1b6)]){_0x1657a1['push'](ensureManagedSymlink(resolve(_0x4212a1,_0x3e8557),_0x54644f[_0x7ee390(0x1c3)],_0x357078,_0x568854));}}return _0x1657a1;}export function pruneStaleRuntimeSkillLinks(_0x2565c1,_0x35b00e,_0x2a6a41){const _0x30d6bf=a142_0x706cd3,_0x4c86af=new Set([..._0x35b00e][_0x30d6bf(0x1c8)](_0xff60e7=>_0xff60e7[_0x30d6bf(0x1cb)]())[_0x30d6bf(0x1e9)](Boolean)),_0x9f66=_0x2a6a41?new Set([..._0x2a6a41][_0x30d6bf(0x1c8)](_0x2ac16f=>_0x2ac16f[_0x30d6bf(0x1cb)]())['filter'](Boolean)):undefined,_0xed203d=[];for(const _0x417627 of _0x2565c1[_0x30d6bf(0x1b6)]){for(const _0x57e312 of managedTargetSkillLinkPaths(_0x417627,_0x2565c1)){const _0x4e33c6=runtimeSkillCodeFromLink(_0x2565c1,_0x57e312);if(_0x9f66&&!_0x9f66['has'](_0x4e33c6))continue;if(_0x4c86af[_0x30d6bf(0x1bb)](_0x4e33c6))continue;_0xed203d[_0x30d6bf(0x1c0)](removeManagedSkillLink(_0x57e312,_0x2565c1,_0x4e33c6));}}return _0xed203d;}export function pruneStaleRuntimeSkillCache(_0x145774,_0x1b0d7e={}){const _0x266a81=a142_0x706cd3,_0x2471b8=new Set([..._0x145774[_0x266a81(0x1d6)]][_0x266a81(0x1c8)](_0x576c00=>_0x576c00['trim']())['filter'](Boolean)),_0x5a9328=_0x145774[_0x266a81(0x1bc)]?new Set([..._0x145774[_0x266a81(0x1bc)]][_0x266a81(0x1c8)](_0x3c40b4=>_0x3c40b4[_0x266a81(0x1cb)]())[_0x266a81(0x1e9)](Boolean)):undefined,_0x40d6e7=_0x145774[_0x266a81(0x1d4)]??[_0x266a81(0x1d3),'company'],_0x1d9f76=resolve(getRuntimeSkillCacheRoot(_0x145774[_0x266a81(0x1b8)],_0x145774[_0x266a81(0x1e7)],_0x1b0d7e),safePathSegment(_0x145774[_0x266a81(0x1b7)],'appCode')),_0x2cdb71=[];for(const _0x5ba93f of _0x40d6e7){const _0xd643ce=resolve(_0x1d9f76,_0x5ba93f);if(!existsSync(_0xd643ce))continue;for(const _0x3bc09b of readdirSync(_0xd643ce,{'withFileTypes':!![]})){if(!_0x3bc09b['isDirectory']())continue;const _0x28e3aa=_0x3bc09b['name'];if(_0x5a9328&&!_0x5a9328[_0x266a81(0x1bb)](_0x28e3aa))continue;if(_0x2471b8[_0x266a81(0x1bb)](_0x28e3aa))continue;const _0x939447=resolve(_0xd643ce,_0x28e3aa),_0x53b74d=readMetadataIfPresent(resolve(_0x939447,METADATA_FILE));if(_0x53b74d?.['appCode']!==_0x145774[_0x266a81(0x1b7)]||_0x53b74d[_0x266a81(0x1ca)]!==_0x5ba93f||_0x53b74d[_0x266a81(0x1ef)]!==_0x28e3aa){_0x2cdb71[_0x266a81(0x1c0)]({'path':_0x939447,'action':_0x266a81(0x1ec),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x939447,_0x145774[_0x266a81(0x1c6)]??[])){_0x2cdb71['push']({'path':_0x939447,'action':_0x266a81(0x1ec),'reason':_0x266a81(0x1d1)});continue;}removeSync(_0x939447),_0x2cdb71['push']({'path':_0x939447,'action':_0x266a81(0x1c1)});}}return _0x2cdb71;}function a142_0xfb12(){const _0x391b50=['Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','lovrabet','project','push','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','1390SxDsau','protectedLinkRoots','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','map','set','scope','trim','12MGLhbw','agentsSkillsDir','managedRoot','slice','11292brXCsH','linked-from-protected-root','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','personal','scopes','values','activeSkillCodes','metadataPath','not-managed-symlink','isDirectory','4764EWleMQ','40RHKwsn','startsWith','2459820mgklyD','120PjbYHb','33683299qLWNQS','builtin','runtime-observe','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','created','contentHash','secret-retriever','isSymbolicLink','accessKey','external-symlink','filter','name','9986216UdNbvU','skipped','21378aimmZJ','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','skillCode','length','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','validation','12083868mjFGBv','7HtWgla','skill','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skillRoots','appCode','env','unchanged','56TMAtvI','has','pruneSkillCodes'];a142_0xfb12=function(){return _0x391b50;};return a142_0xfb12();}export function linkGlobalRuntimeSkills(_0x1ff66f,_0x22bec2={}){const _0x228a08=a142_0x706cd3,_0x533fa4=resolveSkillSyncPaths(_0x22bec2),_0x5c773f=[];for(const _0x3bcdbb of _0x1ff66f){if(_0x3bcdbb[_0x228a08(0x1ca)]!==_0x228a08(0x1e0))throw CliErrors[_0x228a08(0x1b1)](_0x228a08(0x1e2)+_0x3bcdbb[_0x228a08(0x1ca)]);const _0x24d44c=requireSkillCode(_0x3bcdbb[_0x228a08(0x1b4)]),_0x1628a0=copyManagedSkillDirectory(_0x3bcdbb[_0x228a08(0x1c3)],resolve(_0x533fa4[_0x228a08(0x1cd)],_0x24d44c));_0x5c773f[_0x228a08(0x1c0)]({..._0x1628a0,'contentHash':_0x3bcdbb[_0x228a08(0x1e4)]});}return _0x5c773f;}function ensureManagedSymlink(_0x417d43,_0x23f025,_0x2ef464,_0x49fdb1){const _0xe3889e=a142_0x706cd3;mkdirSync(dirname(_0x417d43),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x417d43)||isDanglingSymlink(_0x417d43)){const _0x4bebc5=lstatSync(_0x417d43);if(!_0x4bebc5[_0xe3889e(0x1e6)]())throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1bd)+_0x417d43);const _0xc55d06=resolveSymlinkTarget(_0x417d43);if(!isPathInside(realOrResolved(_0xc55d06),realOrResolved(_0x2ef464[_0xe3889e(0x1ce)])))throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1c4)+_0x417d43);if(realOrResolved(_0xc55d06)===realOrResolved(_0x23f025))return{'path':_0x417d43,'target':_0x23f025,'action':_0xe3889e(0x1b9)};const _0x553925=readMetadataIfPresent(resolve(_0xc55d06,METADATA_FILE));if(_0x2ef464[_0xe3889e(0x1ca)]===_0xe3889e(0x1bf)&&(_0x553925?.[_0xe3889e(0x1b7)]!==_0x2ef464[_0xe3889e(0x1b7)]||_0x553925['skillCode']!==_0x49fdb1))throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1af)+_0x417d43);return unlinkSync(_0x417d43),symlinkSync(_0x23f025,_0x417d43,_0xe3889e(0x1c3)),{'path':_0x417d43,'target':_0x23f025,'action':'updated'};}return symlinkSync(_0x23f025,_0x417d43,_0xe3889e(0x1c3)),{'path':_0x417d43,'target':_0x23f025,'action':_0xe3889e(0x1e3)};}function managedTargetSkillLinkPaths(_0xa448e3,_0x5e2d2a){const _0x316dc6=a142_0x706cd3;if(!existsSync(_0xa448e3))return[];const _0x571e81=_0x5e2d2a[_0x316dc6(0x1b7)]+'--';return readdirSync(_0xa448e3,{'withFileTypes':!![]})['filter'](_0x2869c6=>_0x5e2d2a[_0x316dc6(0x1ca)]===_0x316dc6(0x1bf)||_0x2869c6['name'][_0x316dc6(0x1dc)](_0x571e81))[_0x316dc6(0x1c8)](_0x55d242=>resolve(_0xa448e3,_0x55d242[_0x316dc6(0x1ea)]));}function removeManagedSkillLink(_0x5e26b3,_0x561b10,_0x52a578){const _0x4676b8=a142_0x706cd3,_0x34842e=lstatIfPresent(_0x5e26b3);if(!_0x34842e?.[_0x4676b8(0x1e6)]())return{'path':_0x5e26b3,'action':'skipped','reason':_0x4676b8(0x1d8)};const _0x2fb399=resolveSymlinkTarget(_0x5e26b3);if(!isPathInside(realOrResolved(_0x2fb399),realOrResolved(_0x561b10['managedRoot'])))return{'path':_0x5e26b3,'action':_0x4676b8(0x1ec),'reason':_0x4676b8(0x1e8)};const _0x2726eb=readMetadataIfPresent(resolve(_0x2fb399,METADATA_FILE));if(_0x561b10[_0x4676b8(0x1ca)]===_0x4676b8(0x1bf)&&(_0x2726eb?.[_0x4676b8(0x1b7)]!==_0x561b10[_0x4676b8(0x1b7)]||_0x2726eb[_0x4676b8(0x1ef)]!==_0x52a578))return{'path':_0x5e26b3,'action':_0x4676b8(0x1ec),'reason':'metadata-mismatch'};return unlinkSync(_0x5e26b3),{'path':_0x5e26b3,'action':_0x4676b8(0x1c1)};}function isLinkedFromAnyRoot(_0x4f3de4,_0x542f8b){const _0x1dfea2=a142_0x706cd3,_0x268615=realOrResolved(_0x4f3de4);for(const _0x50259c of _0x542f8b){if(!existsSync(_0x50259c))continue;for(const _0x5b72b7 of readdirSync(_0x50259c,{'withFileTypes':!![]})){if(!_0x5b72b7[_0x1dfea2(0x1e6)]())continue;const _0xfc4f5a=resolve(_0x50259c,_0x5b72b7[_0x1dfea2(0x1ea)]);if(realOrResolved(resolveSymlinkTarget(_0xfc4f5a))===_0x268615)return!![];}}return![];}function runtimeSkillLinkName(_0x2f777a,_0x2f7172){const _0x26bcc8=a142_0x706cd3,_0x24b0fc=safePathSegment(_0x2f7172,_0x26bcc8(0x1ef));if(_0x2f777a[_0x26bcc8(0x1ca)]==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x26bcc8(0x1bb)](_0x24b0fc))throw CliErrors[_0x26bcc8(0x1b1)](_0x26bcc8(0x1d2)+_0x24b0fc);return _0x2f777a[_0x26bcc8(0x1ca)]===_0x26bcc8(0x1bf)?_0x24b0fc:_0x2f777a[_0x26bcc8(0x1b7)]+'--'+_0x24b0fc;}function runtimeSkillCodeFromLink(_0x1a7235,_0x474082){const _0x5d4299=a142_0x706cd3,_0x26e283=basename(_0x474082);return _0x1a7235['scope']===_0x5d4299(0x1bf)?_0x26e283:_0x26e283[_0x5d4299(0x1cf)]((_0x1a7235['appCode']+'--')[_0x5d4299(0x1f0)]);}export function copyManagedSkillDirectory(_0xfdd47,_0x8fe6d){const _0x42941b=a142_0x706cd3,_0x3fcc32=resolve(_0x8fe6d,METADATA_FILE),_0x38e5a8=existsSync(_0x8fe6d);if(_0x38e5a8){const _0x12a897=lstatSync(_0x8fe6d);if(_0x12a897['isSymbolicLink']())throw CliErrors[_0x42941b(0x1b1)](_0x42941b(0x1c2)+_0x8fe6d);if(!_0x12a897[_0x42941b(0x1d9)]())throw CliErrors['validation'](_0x42941b(0x1b5)+_0x8fe6d);const _0x1c8ac7=readMetadataIfPresent(_0x3fcc32);if(_0x1c8ac7?.[_0x42941b(0x1ca)]!=='builtin')throw CliErrors['validation'](_0x42941b(0x1b0)+_0x8fe6d);}ensureDirSync(dirname(_0x8fe6d));const _0x2676d9=_0x38e5a8?readMetadataIfPresent(_0x3fcc32)?.['contentHash']:undefined,_0x2665c1=readMetadataIfPresent(resolve(_0xfdd47,METADATA_FILE))?.[_0x42941b(0x1e4)];return _0x38e5a8&&removeSync(_0x8fe6d),copySkillDirectory(_0xfdd47,_0x8fe6d),{'path':_0x8fe6d,'target':_0xfdd47,'action':!_0x38e5a8?_0x42941b(0x1e3):_0x2676d9===_0x2665c1?_0x42941b(0x1b9):'updated'};}function copySkillDirectory(_0x5f59ae,_0x1ac000){copySync(_0x5f59ae,_0x1ac000,{'dereference':![],'overwrite':!![],'filter'(_0x202ac0){const _0x1bd405=a142_0x3a61;if(lstatSync(_0x202ac0)[_0x1bd405(0x1e6)]())throw CliErrors[_0x1bd405(0x1b1)](_0x1bd405(0x1ee)+_0x202ac0);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11b114,_0x492f88){const _0x465f75=a143_0x3b6a,_0x314ec7=_0x11b114();while(!![]){try{const _0x35045d=parseInt(_0x465f75(0x145))/0x1+-parseInt(_0x465f75(0x149))/0x2+-parseInt(_0x465f75(0x127))/0x3*(-parseInt(_0x465f75(0x12c))/0x4)+parseInt(_0x465f75(0x153))/0x5+-parseInt(_0x465f75(0x144))/0x6*(-parseInt(_0x465f75(0x129))/0x7)+-parseInt(_0x465f75(0x14b))/0x8*(parseInt(_0x465f75(0x130))/0x9)+parseInt(_0x465f75(0x12d))/0xa*(parseInt(_0x465f75(0x136))/0xb);if(_0x35045d===_0x492f88)break;else _0x314ec7['push'](_0x314ec7['shift']());}catch(_0x1b2d59){_0x314ec7['push'](_0x314ec7['shift']());}}}(a143_0x4683,0x964d7));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a143_0x3b6a(_0x52ec7a,_0x48a18a){_0x52ec7a=_0x52ec7a-0x127;const _0x4683a2=a143_0x4683();let _0x3b6acb=_0x4683a2[_0x52ec7a];return _0x3b6acb;}import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x312b29,_0x2dc70e,_0x7818e4={}){const _0x1267b7=a143_0x3b6a,_0x198990=safePathSegment(_0x312b29[_0x1267b7(0x14d)],_0x1267b7(0x14d));if(_0x2dc70e[_0x1267b7(0x14d)]!==_0x198990)throw CliErrors[_0x1267b7(0x157)](_0x1267b7(0x12e)+_0x2dc70e['appCode']+_0x1267b7(0x148)+_0x198990);const _0x33d2f3=normalizeRuntimeSkillScopes(_0x312b29[_0x1267b7(0x142)]),_0x502109=new Set(_0x33d2f3),_0x8ce80b=_0x312b29[_0x1267b7(0x14a)]?.['trim'](),_0x5d0d4d=new Map(),_0x5ecb02=resolve(getRuntimeSkillCacheRoot(_0x312b29['env'],_0x312b29[_0x1267b7(0x147)],_0x7818e4),_0x198990);for(const _0x367dbd of _0x33d2f3){for(const _0x551c81 of localSkillEntryDirs(resolve(_0x5ecb02,_0x367dbd))){collectLocalRuntimeSkill(_0x5d0d4d,_0x551c81,{'appCode':_0x198990,'scopes':_0x502109,'code':_0x8ce80b,'source':_0x1267b7(0x132)});}}for(const _0x59c75c of _0x2dc70e[_0x1267b7(0x150)]){for(const _0xf278cf of localSkillLinkCandidates(_0x59c75c,_0x2dc70e,_0x502109)){collectLocalRuntimeSkill(_0x5d0d4d,_0xf278cf,{'appCode':_0x198990,'scopes':_0x502109,'code':_0x8ce80b,'source':_0x1267b7(0x143),'linkedPath':_0xf278cf});}}return Array[_0x1267b7(0x140)](_0x5d0d4d[_0x1267b7(0x154)]())[_0x1267b7(0x155)](compareLocalRuntimeSkills);}function a143_0x4683(){const _0x354627=['skillMdPath','tags','filter','trim','name','dir','from','push','scopes','link','6483168MfWTJk','40701qIKiJY','includes','accessKey','\x20!=\x20','2072646DHgGer','code','8104ASBcmB','project','appCode','skillCode','linkedPaths','skillRoots','scope','linkedPath','2929055gEIjEB','values','sort','isDirectory','validation','24TyWoqV','cacheDir','7ldbKvg','source','local','349436YQiMkr','470jgJivl','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','get','9981qQrjyX','isSymbolicLink','cache','map','set','localeCompare','86471gHMdzb','isArray','metadataPath','has'];a143_0x4683=function(){return _0x354627;};return a143_0x4683();}function localSkillEntryDirs(_0x2b0c40){const _0x1401d0=a143_0x3b6a;if(!existsSync(_0x2b0c40))return[];return readdirSync(_0x2b0c40,{'withFileTypes':!![]})['filter'](_0x2857e0=>_0x2857e0[_0x1401d0(0x156)]()||_0x2857e0[_0x1401d0(0x131)]())[_0x1401d0(0x133)](_0x15fcc8=>resolve(_0x2b0c40,_0x15fcc8[_0x1401d0(0x13e)]));}function localSkillLinkCandidates(_0x4a0369,_0x445898,_0x384de6){const _0x439739=a143_0x3b6a;if(!existsSync(_0x4a0369))return[];const _0x25409b=_0x445898[_0x439739(0x14d)]+'--';return readdirSync(_0x4a0369,{'withFileTypes':!![]})[_0x439739(0x13c)](_0x3ffb7f=>_0x3ffb7f['isDirectory']()||_0x3ffb7f[_0x439739(0x131)]())[_0x439739(0x13c)](_0x5c4352=>_0x445898[_0x439739(0x151)]===_0x439739(0x14c)||_0x5c4352['name']['startsWith'](_0x25409b)||_0x384de6[_0x439739(0x139)]('builtin'))['map'](_0x229a3f=>resolve(_0x4a0369,_0x229a3f[_0x439739(0x13e)]));}function collectLocalRuntimeSkill(_0x4dc427,_0xd5d2a4,_0x17a3ab){const _0x439b2f=a143_0x3b6a,_0x45164a=resolve(_0xd5d2a4,METADATA_FILE),_0x2fe369=readMetadataIfPresent(_0x45164a);if(!_0x2fe369)return;if(_0x2fe369[_0x439b2f(0x14d)]!==_0x17a3ab[_0x439b2f(0x14d)])return;if(!isRuntimeSkillScope(_0x2fe369[_0x439b2f(0x151)])||!_0x17a3ab[_0x439b2f(0x142)][_0x439b2f(0x139)](_0x2fe369[_0x439b2f(0x151)]))return;const _0x5105d5=_0x2fe369[_0x439b2f(0x14e)]?.[_0x439b2f(0x13d)]();if(!_0x5105d5)return;if(_0x17a3ab[_0x439b2f(0x14a)]&&_0x5105d5!==_0x17a3ab[_0x439b2f(0x14a)])return;const _0x288af6=_0x2fe369[_0x439b2f(0x151)]+':'+_0x5105d5,_0x2f7358=_0x17a3ab[_0x439b2f(0x152)]?[_0x17a3ab[_0x439b2f(0x152)]]:[],_0x52ccdb=_0x4dc427[_0x439b2f(0x12f)](_0x288af6);if(_0x52ccdb){_0x17a3ab[_0x439b2f(0x12a)]==='cache'&&(_0x52ccdb[_0x439b2f(0x13f)]=_0xd5d2a4,_0x52ccdb[_0x439b2f(0x128)]=_0xd5d2a4,_0x52ccdb[_0x439b2f(0x13a)]=resolve(_0xd5d2a4,SKILL_FILE),_0x52ccdb[_0x439b2f(0x138)]=_0x45164a);for(const _0xd4da19 of _0x2f7358){!_0x52ccdb[_0x439b2f(0x14f)][_0x439b2f(0x146)](_0xd4da19)&&_0x52ccdb['linkedPaths'][_0x439b2f(0x141)](_0xd4da19);}_0x52ccdb[_0x439b2f(0x14f)][_0x439b2f(0x155)]();return;}_0x4dc427[_0x439b2f(0x134)](_0x288af6,{..._0x2fe369,'tags':Array[_0x439b2f(0x137)](_0x2fe369[_0x439b2f(0x13b)])?_0x2fe369[_0x439b2f(0x13b)]:[],'scope':_0x2fe369[_0x439b2f(0x151)],'source':_0x439b2f(0x12b),'dir':_0xd5d2a4,'cacheDir':_0x17a3ab[_0x439b2f(0x12a)]==='cache'?_0xd5d2a4:undefined,'skillMdPath':resolve(_0xd5d2a4,SKILL_FILE),'metadataPath':_0x45164a,'linkedPaths':_0x2f7358});}function compareLocalRuntimeSkills(_0x41ed08,_0x34eb0c){const _0x2f8509=a143_0x3b6a,_0x12ac49={'personal':0x0,'company':0x1,'builtin':0x2};return _0x12ac49[_0x41ed08[_0x2f8509(0x151)]]-_0x12ac49[_0x34eb0c[_0x2f8509(0x151)]]||_0x41ed08['skillCode'][_0x2f8509(0x135)](_0x34eb0c[_0x2f8509(0x14e)])||_0x41ed08['dir'][_0x2f8509(0x135)](_0x34eb0c[_0x2f8509(0x13f)]);}
|