@lovrabet/lovrabet-cli 2.3.0 → 2.3.1-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/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.d.ts +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.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +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 +6 -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 +7 -6
- package/skills/lovrabet/references/lovrabet-config.md +9 -8
- 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
|
-
const
|
|
1
|
+
const a66_0x34e0e8=a66_0x595f;(function(_0x20322d,_0x475be8){const _0x17ccb0=a66_0x595f,_0x13cc59=_0x20322d();while(!![]){try{const _0xd00441=-parseInt(_0x17ccb0(0x1e8))/0x1*(parseInt(_0x17ccb0(0x1d8))/0x2)+parseInt(_0x17ccb0(0x1d5))/0x3*(-parseInt(_0x17ccb0(0x1c7))/0x4)+parseInt(_0x17ccb0(0x1bb))/0x5*(parseInt(_0x17ccb0(0x1e9))/0x6)+-parseInt(_0x17ccb0(0x1c9))/0x7+parseInt(_0x17ccb0(0x1e0))/0x8*(-parseInt(_0x17ccb0(0x1be))/0x9)+-parseInt(_0x17ccb0(0x1eb))/0xa*(-parseInt(_0x17ccb0(0x1c6))/0xb)+parseInt(_0x17ccb0(0x1d6))/0xc*(parseInt(_0x17ccb0(0x1ce))/0xd);if(_0xd00441===_0x475be8)break;else _0x13cc59['push'](_0x13cc59['shift']());}catch(_0x36980e){_0x13cc59['push'](_0x13cc59['shift']());}}}(a66_0x33d3,0x27fb1));import{CliErrors}from'../../../errors.js';function a66_0x595f(_0x5c9987,_0x5b208b){_0x5c9987=_0x5c9987-0x1bb;const _0x33d3b5=a66_0x33d3();let _0x595f20=_0x33d3b5[_0x5c9987];return _0x595f20;}import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':a66_0x34e0e8(0x1cb),'command':a66_0x34e0e8(0x1e5),'description':a66_0x34e0e8(0x1d0),'risk':a66_0x34e0e8(0x1d1),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x19302f){return syncRuntimeSkills(_0x19302f);}};async function syncRuntimeSkills(_0x4f40c1){const _0x4a3ae6=a66_0x34e0e8,{downloadRuntimeSkillPackage:_0x1311d3,listRuntimeSkills:_0x5c1b2b}=await import(_0x4a3ae6(0x1e3)),{linkEffectiveRuntimeSkills:_0x365239,materializeRuntimeSkill:_0x5b00b0,pruneStaleRuntimeSkillCache:_0x467d92,pruneStaleRuntimeSkillLinks:_0x16d4c4,resolveRuntimeSkillInstallTarget:_0x39b4b5,reuseMaterializedRuntimeSkill:_0x1742e3}=await import(_0x4a3ae6(0x1e7)),_0x15faea=_0x4f40c1[_0x4a3ae6(0x1df)](_0x4a3ae6(0x1c2)),_0x38ec1e=normalizeSyncScopes(_0x4f40c1[_0x4a3ae6(0x1df)](_0x4a3ae6(0x1e2))),_0x486f46=_0x4f40c1['envName']??_0x4a3ae6(0x1d2),_0x3c17a4=_0x4f40c1[_0x4a3ae6(0x1bf)],_0x44fe6e=_0x4f40c1[_0x4a3ae6(0x1cd)](_0x4a3ae6(0x1d3));if(!_0x3c17a4)throw CliErrors[_0x4a3ae6(0x1d4)]('Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.');const _0x2e881b=_0x39b4b5(_0x4f40c1['appCode'],_0x4f40c1[_0x4a3ae6(0x1cd)](_0x4a3ae6(0x1e6))?'project':_0x4a3ae6(0x1e4)),_0x552673=_0x39b4b5(_0x4f40c1['appCode'],_0x2e881b[_0x4a3ae6(0x1e2)]==='project'?_0x4a3ae6(0x1e4):_0x4a3ae6(0x1e6)),_0x5a022d=await _0x5c1b2b({'appCode':_0x4f40c1[_0x4a3ae6(0x1ea)],'scope':_0x38ec1e[_0x4a3ae6(0x1dd)]===0x1?_0x38ec1e[0x0]:'all','code':_0x15faea[_0x4a3ae6(0x1db)]()||undefined}),_0x2f73af=_0x38ec1e[_0x4a3ae6(0x1bc)]('personal')?_0x5a022d[_0x4a3ae6(0x1c0)]:[],_0x2b4171=_0x38ec1e[_0x4a3ae6(0x1bc)](_0x4a3ae6(0x1dc))?_0x5a022d['company']:[],_0x4edef1=new Set([..._0x2f73af[_0x4a3ae6(0x1cf)](_0x215835=>_0x215835[_0x4a3ae6(0x1de)]?.[_0x4a3ae6(0x1db)]())[_0x4a3ae6(0x1ca)](_0x3b2352=>Boolean(_0x3b2352)),..._0x2b4171['map'](_0x42c448=>_0x42c448[_0x4a3ae6(0x1de)]?.[_0x4a3ae6(0x1db)]())[_0x4a3ae6(0x1ca)](_0x428dba=>Boolean(_0x428dba))]),_0x16ab1c=_0x15faea['trim']()?[_0x15faea['trim']()]:undefined,_0x5873a1=_0x38ec1e[_0x4a3ae6(0x1dd)]===0x2&&_0x38ec1e['includes'](_0x4a3ae6(0x1c0))&&_0x38ec1e[_0x4a3ae6(0x1bc)](_0x4a3ae6(0x1dc)),_0x1d2a5b=_0x5873a1?_0x16d4c4(_0x2e881b,_0x4edef1,_0x16ab1c):[],_0x457ad1=_0x467d92({'env':_0x486f46,'accessKey':_0x3c17a4,'appCode':_0x4f40c1[_0x4a3ae6(0x1ea)],'activeSkillCodes':_0x4edef1,'pruneSkillCodes':_0x16ab1c,'scopes':_0x38ec1e,'protectedLinkRoots':_0x552673[_0x4a3ae6(0x1c1)]}),_0x460c58=[..._0x2f73af['map'](_0x2f8a2e=>({'skill':_0x2f8a2e,'scope':_0x4a3ae6(0x1c0)})),..._0x2b4171[_0x4a3ae6(0x1cf)](_0xffa8a4=>({'skill':_0xffa8a4,'scope':_0x4a3ae6(0x1dc)}))],_0x2bc03c=await mapConcurrent(_0x460c58,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x49b552,scope:_0x2a2200})=>{const _0xb3d1a7=_0x1742e3(_0x49b552,_0x2a2200,{'env':_0x486f46,'accessKey':_0x3c17a4,'appCode':_0x4f40c1['appCode']});if(_0xb3d1a7)return _0xb3d1a7;return _0x5b00b0(_0x49b552,_0x2a2200,{'env':_0x486f46,'accessKey':_0x3c17a4,'appCode':_0x4f40c1['appCode'],'force':_0x44fe6e,'packageBytes':await downloadSkillPackage(_0x49b552,_0x2a2200,_0x4f40c1['appCode'],_0x1311d3)});}),_0xe80b0=_0x365239(_0x2bc03c,_0x2e881b),_0x21f9ad=countLinkActions(_0xe80b0);return{'ok':!![],'data':{'appCode':_0x4f40c1[_0x4a3ae6(0x1ea)],..._0x2e881b['scope']===_0x4a3ae6(0x1e6)?{'installTarget':{'scope':_0x2e881b[_0x4a3ae6(0x1e2)],'skillRoots':[..._0x2e881b[_0x4a3ae6(0x1c1)]]}}:{},'personal':_0x2f73af[_0x4a3ae6(0x1dd)],'company':_0x2b4171[_0x4a3ae6(0x1dd)],'materialized':_0x2bc03c[_0x4a3ae6(0x1dd)],'links':{'total':_0xe80b0[_0x4a3ae6(0x1dd)],'created':_0x21f9ad[_0x4a3ae6(0x1c8)]??0x0,'updated':_0x21f9ad[_0x4a3ae6(0x1cc)]??0x0,'unchanged':_0x21f9ad['unchanged']??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x1d2a5b[_0x4a3ae6(0x1ca)](_0x3412de=>_0x3412de[_0x4a3ae6(0x1c4)]===_0x4a3ae6(0x1c5))[_0x4a3ae6(0x1dd)],'cacheDirs':_0x457ad1[_0x4a3ae6(0x1ca)](_0x119dca=>_0x119dca[_0x4a3ae6(0x1c4)]===_0x4a3ae6(0x1c5))[_0x4a3ae6(0x1dd)],'skipped':[..._0x1d2a5b,..._0x457ad1][_0x4a3ae6(0x1ca)](_0xbcf93b=>_0xbcf93b[_0x4a3ae6(0x1c4)]===_0x4a3ae6(0x1d7))[_0x4a3ae6(0x1dd)]},'skills':{'personal':_0x2f73af[_0x4a3ae6(0x1cf)](summarizeRuntimeSkill),'company':_0x2b4171['map'](summarizeRuntimeSkill)}},'message':_0x4a3ae6(0x1da)+_0x2f73af['length']+_0x4a3ae6(0x1c3)+_0x2b4171[_0x4a3ae6(0x1dd)]+'\x20company\x20Skill(s).'};}async function mapConcurrent(_0x73d0b1,_0x79c595,_0x436efd){const _0x127e92=a66_0x34e0e8,_0x53ec4e=new Array(_0x73d0b1[_0x127e92(0x1dd)]);let _0x3411bb=0x0;const _0x52ae96=Array['from']({'length':Math[_0x127e92(0x1d9)](_0x79c595,_0x73d0b1[_0x127e92(0x1dd)])},async()=>{while(_0x3411bb<_0x73d0b1['length']){const _0x168921=_0x3411bb;_0x3411bb+=0x1,_0x53ec4e[_0x168921]=await _0x436efd(_0x73d0b1[_0x168921]);}});return await Promise[_0x127e92(0x1bd)](_0x52ae96),_0x53ec4e;}function a66_0x33d3(){const _0x5198c2=['20ZgTjHP','includes','all','390231cCQUtD','accessKey','personal','skillRoots','code','\x20personal\x20and\x20','action','removed','24365DeiVpm','634308Fydtxh','created','1186612BvvQby','filter','skill','updated','bool','13GEpSvJ','map','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','read','production','force','authRequired','6JgCExr','7274472eNoqqg','skipped','22882oXiPjQ','min','Installed\x20','trim','company','length','skillCode','str','40JQvJLj','version','scope','../../../core/api-client.js','global','install','project','../../../skills/runtime-skill-sync.js','8xZLolC','475662DuiERs','appCode','160HNqJjQ'];a66_0x33d3=function(){return _0x5198c2;};return a66_0x33d3();}async function downloadSkillPackage(_0x227ca5,_0xa64d89,_0x376f1d,_0x28b7cf){const _0x3a61ba=a66_0x34e0e8,_0x33c2f8=_0x227ca5[_0x3a61ba(0x1e1)]?.[_0x3a61ba(0x1db)]();return _0x33c2f8?_0x28b7cf(_0xa64d89,_0x227ca5[_0x3a61ba(0x1de)],_0x376f1d,_0x33c2f8):_0x28b7cf(_0xa64d89,_0x227ca5[_0x3a61ba(0x1de)],_0x376f1d);}function countLinkActions(_0x104720){return _0x104720['reduce']((_0x3e3752,_0xaceee3)=>{const _0xa9b36a=a66_0x595f;return _0x3e3752[_0xaceee3[_0xa9b36a(0x1c4)]]=(_0x3e3752[_0xaceee3[_0xa9b36a(0x1c4)]]??0x0)+0x1,_0x3e3752;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0xed4ea9=a67_0x4d4e;(function(_0x47a06f,_0x1e4e7a){const _0x25355a=a67_0x4d4e,_0x1777ca=_0x47a06f();while(!![]){try{const _0x359cc9=-parseInt(_0x25355a(0xab))/0x1*(-parseInt(_0x25355a(0xaf))/0x2)+-parseInt(_0x25355a(0x9b))/0x3*(-parseInt(_0x25355a(0xa2))/0x4)+parseInt(_0x25355a(0x95))/0x5*(-parseInt(_0x25355a(0x9f))/0x6)+-parseInt(_0x25355a(0x9d))/0x7+parseInt(_0x25355a(0xa6))/0x8+-parseInt(_0x25355a(0x96))/0x9*(parseInt(_0x25355a(0x8d))/0xa)+-parseInt(_0x25355a(0x8c))/0xb*(-parseInt(_0x25355a(0x94))/0xc);if(_0x359cc9===_0x1e4e7a)break;else _0x1777ca['push'](_0x1777ca['shift']());}catch(_0x2aa7d0){_0x1777ca['push'](_0x1777ca['shift']());}}}(a67_0x429c,0x8d8b8));function a67_0x4d4e(_0x42b1bb,_0x5447e1){_0x42b1bb=_0x42b1bb-0x8c;const _0x429cb2=a67_0x429c();let _0x4d4e22=_0x429cb2[_0x42b1bb];return _0x4d4e22;}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a67_0x429c(){const _0x33c760=['Listed\x20','388698urzhUH','appCode','code','12KexJXi','filter','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','global','3427600UMoxQJ','accessKey','skill','\x20local\x20Skill(s).','../../../skills/runtime-skill-sync.js','586361uLIHgM','read','../../../core/api-client.js','envName','2ipPZDm','bool','builtin','1453727ndhTfo','200930SoiITx','scope','remote','trim','company','personal','length','156AFBmru','70LhLceO','162hIoYoL','local','map','list','project','126501RyOGVK','\x20remote\x20Skill(s).','7076643CBshYk'];a67_0x429c=function(){return _0x33c760;};return a67_0x429c();}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a67_0xed4ea9(0xa8),'command':a67_0xed4ea9(0x99),'description':a67_0xed4ea9(0xa4),'risk':a67_0xed4ea9(0xac),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x160a4f){const _0x1f3893=a67_0xed4ea9,_0x2328f4=_0x160a4f['str'](_0x1f3893(0xa1)),_0x5b0e1b=normalizeListScope(_0x160a4f['str'](_0x1f3893(0x8e)));if(_0x160a4f['bool'](_0x1f3893(0x97))){const _0x24b0b2=_0x160a4f[_0x1f3893(0xa7)];if(!_0x24b0b2)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x464910,resolveRuntimeSkillInstallTarget:_0x213355}=await import(_0x1f3893(0xaa)),_0x516397=_0x213355(_0x160a4f[_0x1f3893(0xa0)],_0x160a4f[_0x1f3893(0xb0)](_0x1f3893(0x9a))?_0x1f3893(0x9a):_0x1f3893(0xa5)),_0x389c13=_0x464910({'env':_0x160a4f[_0x1f3893(0xae)]??'production','accessKey':_0x24b0b2,'appCode':_0x160a4f[_0x1f3893(0xa0)],'scopes':listScopeToRuntimeScopes(_0x5b0e1b),'code':_0x2328f4[_0x1f3893(0x90)]()||undefined},_0x516397),_0x269dc5=groupLocalRuntimeSkills(_0x389c13);return{'ok':!![],'data':{'appCode':_0x160a4f[_0x1f3893(0xa0)],'source':'local',..._0x516397[_0x1f3893(0x8e)]===_0x1f3893(0x9a)?{'installScope':_0x516397['scope']}:{},'scope':_0x5b0e1b,'total':_0x389c13[_0x1f3893(0x93)],'personal':_0x269dc5['personal'][_0x1f3893(0x93)],'company':_0x269dc5[_0x1f3893(0x91)][_0x1f3893(0x93)],'items':_0x389c13[_0x1f3893(0x98)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x269dc5[_0x1f3893(0x92)][_0x1f3893(0x98)](summarizeLocalRuntimeSkill),'company':_0x269dc5[_0x1f3893(0x91)][_0x1f3893(0x98)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x389c13[_0x1f3893(0x93)]+_0x1f3893(0xa9)};}const {listRuntimeSkills:_0xe66aaa}=await import(_0x1f3893(0xad)),_0x13bf77=await _0xe66aaa({'appCode':_0x160a4f['appCode'],'scope':listScopeToRemoteScope(_0x5b0e1b),'code':_0x2328f4[_0x1f3893(0x90)]()||undefined}),_0x43efc7=shouldListScope(_0x5b0e1b,_0x1f3893(0x92))?_0x13bf77[_0x1f3893(0x92)]??[]:[],_0x323dc1=shouldListScope(_0x5b0e1b,_0x1f3893(0x91))?_0x13bf77[_0x1f3893(0x91)]??[]:[],_0xc5650d=[..._0x43efc7,..._0x323dc1];return{'ok':!![],'data':{'appCode':_0x160a4f[_0x1f3893(0xa0)],'source':_0x1f3893(0x8f),'scope':_0x5b0e1b,'total':_0xc5650d[_0x1f3893(0x93)],'personal':_0x43efc7['length'],'company':_0x323dc1[_0x1f3893(0x93)],'items':_0xc5650d[_0x1f3893(0x98)](summarizeRuntimeSkill),'skills':{'personal':_0x43efc7[_0x1f3893(0x98)](summarizeRuntimeSkill),'company':_0x323dc1[_0x1f3893(0x98)](summarizeRuntimeSkill)}},'message':_0x1f3893(0x9e)+_0xc5650d[_0x1f3893(0x93)]+_0x1f3893(0x9c)};}};function groupLocalRuntimeSkills(_0x48c20c){const _0x4c7353=a67_0xed4ea9;return{'personal':_0x48c20c[_0x4c7353(0xa3)](_0x3a3c85=>_0x3a3c85[_0x4c7353(0x8e)]===_0x4c7353(0x92)),'company':_0x48c20c['filter'](_0x5f5941=>_0x5f5941[_0x4c7353(0x8e)]===_0x4c7353(0x91)),'builtin':_0x48c20c[_0x4c7353(0xa3)](_0x543880=>_0x543880[_0x4c7353(0x8e)]===_0x4c7353(0xb1))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a68_0x1972(){const _0x36a3a3=['1410668ZARcVY','616260KlKdjG','478088vHjPhN','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope,\x20or\x20submit\x20a\x20company-scope\x20version\x20for\x20review','61825zSifGX','write','84665JPYrhR','2976903RVPxJd','skill','Reads\x20local\x20Skill\x20content:\x20personal\x20scope\x20is\x20saved\x20immediately;\x20company\x20scope\x20submits\x20a\x20new\x20version\x20for\x20review.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20directory\x20path\x20or\x20Skill\x20body.','296436vSRUWr','8YiVsrU','92UNYNQo','push'];a68_0x1972=function(){return _0x36a3a3;};return a68_0x1972();}const a68_0x4c45ba=a68_0x44da;function a68_0x44da(_0x378e95,_0x3a9eda){_0x378e95=_0x378e95-0x185;const _0x19720c=a68_0x1972();let _0x44daa3=_0x19720c[_0x378e95];return _0x44daa3;}(function(_0x2908f8,_0xda74a3){const _0x21b2b4=a68_0x44da,_0x341fce=_0x2908f8();while(!![]){try{const _0x4092b2=-parseInt(_0x21b2b4(0x186))/0x1+-parseInt(_0x21b2b4(0x190))/0x2+parseInt(_0x21b2b4(0x18f))/0x3+parseInt(_0x21b2b4(0x18c))/0x4*(-parseInt(_0x21b2b4(0x192))/0x5)+parseInt(_0x21b2b4(0x18a))/0x6+parseInt(_0x21b2b4(0x18e))/0x7*(parseInt(_0x21b2b4(0x18b))/0x8)+parseInt(_0x21b2b4(0x187))/0x9;if(_0x4092b2===_0xda74a3)break;else _0x341fce['push'](_0x341fce['shift']());}catch(_0x5a53f8){_0x341fce['push'](_0x341fce['shift']());}}}(a68_0x1972,0x2bb45));import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a68_0x4c45ba(0x188),'command':a68_0x4c45ba(0x18d),'description':a68_0x4c45ba(0x191),'risk':a68_0x4c45ba(0x185),'confirmationDescription':a68_0x4c45ba(0x189),'flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a69_0x48ab(_0x43361c,_0x4e14d2){_0x43361c=_0x43361c-0x12b;const _0x3fb24c=a69_0x3fb2();let _0x48ab35=_0x3fb24c[_0x43361c];return _0x48ab35;}function a69_0x3fb2(){const _0x3a69d8=['8dAIaFO','248138olJGuw','81866kUegRg','6190XTMvRa','2791233rkvYFo','skill','424NpAdgv','3990000HvkAaX','8303760ImVLcJ','2701320gwpXDe','errors','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','str','read','strict','970UcwLbY','11vPoFkB','type','dir','warnings','validate','Skill\x20validation\x20passed.'];a69_0x3fb2=function(){return _0x3a69d8;};return a69_0x3fb2();}const a69_0x39d7fd=a69_0x48ab;(function(_0x3d66c6,_0x11723e){const _0x106d8f=a69_0x48ab,_0x10c95b=_0x3d66c6();while(!![]){try{const _0x283c51=-parseInt(_0x106d8f(0x12b))/0x1*(parseInt(_0x106d8f(0x133))/0x2)+-parseInt(_0x106d8f(0x135))/0x3+parseInt(_0x106d8f(0x137))/0x4*(-parseInt(_0x106d8f(0x134))/0x5)+-parseInt(_0x106d8f(0x13a))/0x6+-parseInt(_0x106d8f(0x138))/0x7*(parseInt(_0x106d8f(0x131))/0x8)+parseInt(_0x106d8f(0x139))/0x9+parseInt(_0x106d8f(0x140))/0xa*(parseInt(_0x106d8f(0x132))/0xb);if(_0x283c51===_0x11723e)break;else _0x10c95b['push'](_0x10c95b['shift']());}catch(_0x2fe70e){_0x10c95b['push'](_0x10c95b['shift']());}}}(a69_0x3fb2,0x8d454));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a69_0x39d7fd(0x136),'command':a69_0x39d7fd(0x12f),'description':a69_0x39d7fd(0x13c),'risk':a69_0x39d7fd(0x13e),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x272c56){const _0x2d1da2=a69_0x39d7fd,_0x5f9351=_0x272c56['bool'](_0x2d1da2(0x13f)),_0xd297c3=validateSkillDirectory(_0x272c56[_0x2d1da2(0x13d)](_0x2d1da2(0x12d)),{'strict':_0x5f9351});return throwIfSkillValidationFailed(_0xd297c3,_0x5f9351),{'ok':!![],'data':{'dir':_0xd297c3[_0x2d1da2(0x12d)],'type':_0xd297c3[_0x2d1da2(0x12c)],'errors':_0xd297c3[_0x2d1da2(0x13b)],'warnings':_0xd297c3[_0x2d1da2(0x12e)]},'message':_0x2d1da2(0x130)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x60cf7,_0x161ef4){const _0x10afa5=a70_0x40a4,_0x98d8ce=_0x60cf7();while(!![]){try{const _0x5333cd=-parseInt(_0x10afa5(0x10b))/0x1+parseInt(_0x10afa5(0xf4))/0x2+parseInt(_0x10afa5(0xf5))/0x3+parseInt(_0x10afa5(0x10a))/0x4+parseInt(_0x10afa5(0xfa))/0x5*(-parseInt(_0x10afa5(0x103))/0x6)+-parseInt(_0x10afa5(0xf6))/0x7+parseInt(_0x10afa5(0x100))/0x8*(parseInt(_0x10afa5(0xfd))/0x9);if(_0x5333cd===_0x161ef4)break;else _0x98d8ce['push'](_0x98d8ce['shift']());}catch(_0x52b53c){_0x98d8ce['push'](_0x98d8ce['shift']());}}}(a70_0x2541,0x5ba62));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';function a70_0x40a4(_0x6584c9,_0xb2c2b9){_0x6584c9=_0x6584c9-0xf2;const _0x2541fb=a70_0x2541();let _0x40a477=_0x2541fb[_0x6584c9];return _0x40a477;}import{resolve}from'node:path';import{JSDOM}from'jsdom';import{CliErrors}from'../../errors.js';let mermaidApiPromise;export async function readRequiredSkillDiagram(_0x4b624e){const _0x38cfcd=a70_0x40a4;return(await readRequiredSkillDiagramInput(_0x4b624e))[_0x38cfcd(0x108)];}export async function readRequiredSkillDiagramInput(_0x202b15){const _0x45da5a=a70_0x40a4,_0x28fe4b=_0x202b15[_0x45da5a(0x104)]();if(!_0x28fe4b)throw CliErrors[_0x45da5a(0x101)]('--diagram-file\x20is\x20required\x20when\x20publishing\x20a\x20Skill\x20version.',_0x45da5a(0x105));let _0x3bc585,_0x216797;if(_0x28fe4b==='-')try{_0x3bc585=readFileSync(0x0,'utf8');}catch{throw CliErrors[_0x45da5a(0x101)](_0x45da5a(0x107));}else{const _0x595b26=resolve(_0x28fe4b);if(!existsSync(_0x595b26))throw CliErrors[_0x45da5a(0x101)](_0x45da5a(0xff)+_0x595b26);if(!statSync(_0x595b26)[_0x45da5a(0x109)]())throw CliErrors[_0x45da5a(0x101)](_0x45da5a(0xf8)+_0x595b26);_0x216797=realpathSync(_0x595b26),_0x3bc585=readFileSync(_0x216797,_0x45da5a(0xfb));}return{'diagram':{'schemaVersion':0x1,'mermaid':await validateAndCanonicalizeMermaid(_0x3bc585)},'sourceFilePath':_0x216797};}export async function validateAndCanonicalizeMermaid(_0x483a69){const _0x234264=a70_0x40a4,_0x2438c0=_0x483a69[_0x234264(0x102)](/\r\n/g,'\x0a')[_0x234264(0x102)](/\r/g,'\x0a')[_0x234264(0x102)](/\n+$/,'')+'\x0a';try{const _0x57acff=await loadMermaidApi();await _0x57acff[_0x234264(0xf2)](_0x2438c0);}catch{throw diagramValidationError();}return _0x2438c0;}function a70_0x2541(){const _0x5a978c=['Unable\x20to\x20read\x20Mermaid\x20flowchart\x20from\x20standard\x20input.','diagram','isFile','2994808GJrrFr','531929fvlUPf','parse','Mermaid\x20syntax\x20validation\x20failed.','322256qBpIOc','2123433kWuDRe','5061210VNqGcj','defineProperties','Mermaid\x20flowchart\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','document','7820FLBSxb','utf8','default','1141056lHEYhG','mermaid','Mermaid\x20flowchart\x20file\x20not\x20found:\x20','16jlucNq','validation','replace','924NGpdvf','trim','Generate\x20a\x20Mermaid\x20flowchart\x20and\x20pass\x20--diagram-file\x20<path>,\x20or\x20use\x20--diagram-file\x20-\x20for\x20standard\x20input.','window'];a70_0x2541=function(){return _0x5a978c;};return a70_0x2541();}function loadMermaidApi(){return mermaidApiPromise??=((async()=>{const _0xf046a9=a70_0x40a4;if(!(_0xf046a9(0x106)in globalThis)||!(_0xf046a9(0xf9)in globalThis)){const _0x16ab73=new JSDOM('');Object[_0xf046a9(0xf7)](globalThis,{'window':{'configurable':!![],'value':_0x16ab73['window']},'document':{'configurable':!![],'value':_0x16ab73[_0xf046a9(0x106)][_0xf046a9(0xf9)]}});}return(await import(_0xf046a9(0xfe)))[_0xf046a9(0xfc)];})()),mermaidApiPromise;}function diagramValidationError(){const _0x1e0c1d=a70_0x40a4;return CliErrors[_0x1e0c1d(0x101)](_0x1e0c1d(0xf3),'Fix\x20the\x20Mermaid\x20syntax\x20reported\x20by\x20your\x20editor\x20or\x20preview\x20tool,\x20then\x20retry\x20with\x20the\x20same\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x129298=a71_0x46a7;(function(_0x19a634,_0x28a379){const _0x247958=a71_0x46a7,_0x795dd6=_0x19a634();while(!![]){try{const _0x293177=parseInt(_0x247958(0x93))/0x1+-parseInt(_0x247958(0x7e))/0x2*(-parseInt(_0x247958(0x6f))/0x3)+-parseInt(_0x247958(0x71))/0x4*(-parseInt(_0x247958(0x77))/0x5)+-parseInt(_0x247958(0x70))/0x6*(-parseInt(_0x247958(0x8a))/0x7)+parseInt(_0x247958(0x7d))/0x8+-parseInt(_0x247958(0x8e))/0x9*(-parseInt(_0x247958(0x8d))/0xa)+-parseInt(_0x247958(0x72))/0xb;if(_0x293177===_0x28a379)break;else _0x795dd6['push'](_0x795dd6['shift']());}catch(_0x2328e0){_0x795dd6['push'](_0x795dd6['shift']());}}}(a71_0x1d7f,0xbc510));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a71_0x129298(0x8b),'type':'string','description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a71_0x129298(0x7a),'type':a71_0x129298(0x82),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a71_0x129298(0x7b),'personal','company']};function a71_0x46a7(_0x54ac08,_0x51b785){_0x54ac08=_0x54ac08-0x6e;const _0x1d7f0f=a71_0x1d7f();let _0x46a740=_0x1d7f0f[_0x54ac08];return _0x46a740;}export const PUSH_SCOPE_FLAG={'name':a71_0x129298(0x7a),'type':a71_0x129298(0x82),'description':'Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','default':a71_0x129298(0x8f),'enum':[a71_0x129298(0x8f),a71_0x129298(0x88)]};function a71_0x1d7f(){const _0x1e3ecd=['version','boolean','215YhmvgI','confirm-warnings','Local\x20Skill\x20directory\x20containing\x20SKILL.md','scope','all','expected-diagram-revision','11879624AXvHpU','4ASApzJ','type','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','diagram-file','string','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','skill-code','force','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','company','Exact\x20Skill\x20version\x20whose\x20diagram\x20is\x20being\x20managed','763TfWhyC','code','Exact\x20Skill\x20scope:\x20personal\x20or\x20company','30babgyx','1346607jheCoy','personal','UTF-8\x20Mermaid\x20flowchart\x20file;\x20the\x20selected\x20file\x20is\x20excluded\x20from\x20the\x20Skill\x20package;\x20use\x20-\x20for\x20stdin','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','Expected\x20current\x20diagram\x20revision;\x20use\x200\x20for\x20the\x20first\x20diagram','740972ZEIImT','name','364773VWWWPc','31854JkvroP','98008MDhMeg','41567889hQOItG','a\x20lowercase\x20sha256:<64\x20hex\x20characters>\x20fingerprint','dir'];a71_0x1d7f=function(){return _0x1e3ecd;};return a71_0x1d7f();}export const LIST_SCOPE_FLAG={'name':a71_0x129298(0x7a),'type':a71_0x129298(0x82),'description':a71_0x129298(0x83),'enum':[a71_0x129298(0x7b),'personal',a71_0x129298(0x88)]};export const LOCAL_FLAG={'name':'local','type':a71_0x129298(0x76),'description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'};export const DIR_FLAG={'name':a71_0x129298(0x74),'type':a71_0x129298(0x82),'required':!![],'description':a71_0x129298(0x79)};export const DIAGRAM_FILE_FLAG={'name':a71_0x129298(0x81),'type':a71_0x129298(0x82),'required':!![],'description':a71_0x129298(0x90)};export const DIAGRAM_SKILL_CODE_FLAG={'name':a71_0x129298(0x84),'type':a71_0x129298(0x82),'required':!![],'description':'Exact\x20Skill\x20code\x20whose\x20version\x20diagram\x20is\x20being\x20managed'};export const DIAGRAM_VERSION_FLAG={'name':a71_0x129298(0x75),'type':a71_0x129298(0x82),'required':!![],'description':a71_0x129298(0x89)};export const DIAGRAM_SCOPE_FLAG={'name':'scope','type':a71_0x129298(0x82),'required':!![],'enum':['personal','company'],'description':a71_0x129298(0x8c)};export const SOURCE_FINGERPRINT_FLAG={'name':'source-fingerprint','type':'string','required':!![],'description':'Server-reported\x20SkillVersion\x20source\x20fingerprint','pattern':{'regex':/^sha256:[0-9a-f]{64}$/,'description':a71_0x129298(0x73)}};export const EXPECTED_DIAGRAM_REVISION_FLAG={'name':a71_0x129298(0x7c),'type':'number','required':!![],'description':a71_0x129298(0x92)};export const CREATE_NAME_FLAG={'name':a71_0x129298(0x6e),'type':'string','required':!![],'description':a71_0x129298(0x87),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a71_0x129298(0x91)}};export const TYPE_FLAG={'name':a71_0x129298(0x7f),'type':a71_0x129298(0x82),'description':a71_0x129298(0x86),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':'target','type':a71_0x129298(0x82),'description':'Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a71_0x129298(0x85),'type':a71_0x129298(0x76),'description':'Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists'};export const PROJECT_TARGET_FLAG={'name':'project','type':a71_0x129298(0x76),'description':'Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories'};export const CONFIRM_WARNINGS_FLAG={'name':a71_0x129298(0x78),'type':'boolean','description':a71_0x129298(0x80)};export const STRICT_FLAG={'name':'strict','type':a71_0x129298(0x76),'description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42e494,_0x4991e6){const _0x30858c=a72_0x3cd1,_0x5370ac=_0x42e494();while(!![]){try{const _0x286b4f=-parseInt(_0x30858c(0x18c))/0x1+parseInt(_0x30858c(0x18e))/0x2+-parseInt(_0x30858c(0x18d))/0x3*(-parseInt(_0x30858c(0x189))/0x4)+-parseInt(_0x30858c(0x18b))/0x5+-parseInt(_0x30858c(0x190))/0x6+parseInt(_0x30858c(0x18a))/0x7+parseInt(_0x30858c(0x18f))/0x8;if(_0x286b4f===_0x4991e6)break;else _0x5370ac['push'](_0x5370ac['shift']());}catch(_0x4c7003){_0x5370ac['push'](_0x5370ac['shift']());}}}(a72_0xa31a,0x4b923));function a72_0x3cd1(_0x48df09,_0xe04cc5){_0x48df09=_0x48df09-0x189;const _0xa31a5d=a72_0xa31a();let _0x3cd125=_0xa31a5d[_0x48df09];return _0x3cd125;}import{createCommand}from'./commands/create.js';import{diagramPushCommand,diagramShowCommand,diagramValidateCommand}from'./commands/diagram.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';function a72_0xa31a(){const _0x41531f=['3zfnEuP','561220SAgKEN','157376OmVFLE','402972HyRftE','183016fttAKa','4162151yYhYDM','323525UXSITL','499223EqXiCr'];a72_0xa31a=function(){return _0x41531f;};return a72_0xa31a();}import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand,diagramValidateCommand,diagramPushCommand,diagramShowCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a73_0x3381(_0x2a2d9c,_0x1cadd3){_0x2a2d9c=_0x2a2d9c-0xdd;var _0x8a4c67=a73_0x8a4c();var _0x338151=_0x8a4c67[_0x2a2d9c];return _0x338151;}(function(_0x35af91,_0xe924d3){var _0x1e867b=a73_0x3381,_0x17559b=_0x35af91();while(!![]){try{var _0x1b77a7=parseInt(_0x1e867b(0xec))/0x1+parseInt(_0x1e867b(0xde))/0x2*(parseInt(_0x1e867b(0xe0))/0x3)+parseInt(_0x1e867b(0xe4))/0x4+parseInt(_0x1e867b(0xe3))/0x5*(parseInt(_0x1e867b(0xe9))/0x6)+-parseInt(_0x1e867b(0xe2))/0x7+-parseInt(_0x1e867b(0xe8))/0x8*(-parseInt(_0x1e867b(0xee))/0x9)+-parseInt(_0x1e867b(0xed))/0xa*(parseInt(_0x1e867b(0xe5))/0xb);if(_0x1b77a7===_0xe924d3)break;else _0x17559b['push'](_0x17559b['shift']());}catch(_0xd701bb){_0x17559b['push'](_0x17559b['shift']());}}}(a73_0x8a4c,0x5a6dc));export function isPackageBackedManifest(_0x2ac643){var _0x4cf9c5=a73_0x3381;return!!_0x2ac643&&typeof _0x2ac643==='object'&&!Array[_0x4cf9c5(0xe7)](_0x2ac643)&&typeof _0x2ac643[_0x4cf9c5(0xdf)]==='string'&&_0x2ac643[_0x4cf9c5(0xdf)]['length']>0x0&&Array[_0x4cf9c5(0xe7)](_0x2ac643[_0x4cf9c5(0xe6)]);}function a73_0x8a4c(){var _0x3f24dd=['49288CHVnXm','167502dSOWNN','object','some','67592qUXcCn','2812070oifTqA','36VySxXa','path','2HjKNXv','ossPath','787653XatTWP','SKILL.md','789453lPVSrj','70tfLuaK','75028YBVZUZ','11sroVaN','files','isArray'];a73_0x8a4c=function(){return _0x3f24dd;};return a73_0x8a4c();}export function isMultiFileManifest(_0xaad8f5){var _0x28bacf=a73_0x3381;return!!_0xaad8f5&&typeof _0xaad8f5===_0x28bacf(0xea)&&!Array[_0x28bacf(0xe7)](_0xaad8f5)&&Array[_0x28bacf(0xe7)](_0xaad8f5[_0x28bacf(0xe6)])&&_0xaad8f5[_0x28bacf(0xe6)][_0x28bacf(0xeb)](_0x25c8ae=>_0x25c8ae[_0x28bacf(0xdd)]!==_0x28bacf(0xe1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x390d15,_0x4ba801){const _0x348f9d=a74_0x39ec,_0x1ba0c7=_0x390d15();while(!![]){try{const _0x5ca3bd=-parseInt(_0x348f9d(0x103))/0x1*(-parseInt(_0x348f9d(0xd2))/0x2)+-parseInt(_0x348f9d(0xf1))/0x3*(-parseInt(_0x348f9d(0xd3))/0x4)+parseInt(_0x348f9d(0xcc))/0x5*(parseInt(_0x348f9d(0xd1))/0x6)+parseInt(_0x348f9d(0xde))/0x7*(parseInt(_0x348f9d(0xf0))/0x8)+-parseInt(_0x348f9d(0xee))/0x9+-parseInt(_0x348f9d(0xdc))/0xa+parseInt(_0x348f9d(0x105))/0xb*(-parseInt(_0x348f9d(0xf6))/0xc);if(_0x5ca3bd===_0x4ba801)break;else _0x1ba0c7['push'](_0x1ba0c7['shift']());}catch(_0x58f1b4){_0x1ba0c7['push'](_0x1ba0c7['shift']());}}}(a74_0x158d,0xe60f9));function a74_0x39ec(_0x259490,_0x100a91){_0x259490=_0x259490-0xcb;const _0x158d2b=a74_0x158d();let _0x39ecd1=_0x158d2b[_0x259490];return _0x39ecd1;}import{CliErrors}from'../../errors.js';function a74_0x158d(){const _0x139560=['POST','payload','status','company','3794976ntEzCr','validation','\x20has\x20scope=\x22','/publish/validate','appCode','diagram-file','resolvedVersion','files','warnings','NAMESPACE_ONLY','confirm-warnings','existing','input','14mxZHCL','authRequired','33PVWdUx','confirmWarnings','../../core/api-client.js','frontmatterDisplayName','864285PEkgxU','metadata','/api/cli/v1/skills/','resolvedSlug','Created\x20personal\x20Skill\x20','24WYwZLr','160508jyeeVJ','10596bcVCAw','identical','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','savedSkill','valid','errors','scope','Updated\x20personal\x20Skill\x20','trim','9795340XChknK','diagramValidated','81193cfreol','\x20for\x20review','../../skills/runtime-skill-sync.js','version','unknown','\x20version\x20','Submitted\x20company\x20Skill\x20','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','skillCode','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','accessKey','str','publishInput','PRIVATE','Personal','dir','7604721UWKKYp','personal','496kLPBSb','1338CBojKK'];a74_0x158d=function(){return _0x139560;};return a74_0x158d();}import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x34c365){const _0xbc898c=a74_0x39ec,{getRuntimeSkillByCode:_0xdc7ee2,validateRuntimeSkillPublish:_0x44dbac}=await import(_0xbc898c(0x107)),{readPushDirectory:_0x554569,resolvePushDirectoryIdentity:_0x5096af}=await import(_0xbc898c(0xe0));if(!_0x34c365[_0xbc898c(0xe8)])throw CliErrors[_0xbc898c(0x104)]();const _0x48194b=resolvePushScope(_0x34c365),_0x53716d=validateSkillDirectory(_0x34c365[_0xbc898c(0xe9)](_0xbc898c(0xed)));throwIfSkillValidationFailed(_0x53716d);const {diagram:_0x2f191f,sourceFilePath:_0x2185f0}=await readRequiredSkillDiagramInput(_0x34c365[_0xbc898c(0xe9)](_0xbc898c(0xfb))),_0x387b6b=diagramPackageExclusion(_0x2185f0),_0x2d1525=_0x5096af(_0x53716d[_0xbc898c(0xed)],_0x34c365[_0xbc898c(0xfa)],remoteFirstMetadataOptions()),_0x5e2836=await _0xdc7ee2(_0x34c365[_0xbc898c(0xfa)],_0x2d1525[_0xbc898c(0xe6)]);throwIfBuiltinPushTarget(_0x5e2836);if(_0x48194b===_0xbc898c(0xf5)){const _0xf3194c=_0x554569(_0x53716d[_0xbc898c(0xed)],_0x34c365[_0xbc898c(0xfa)],{...remoteMissingCompanyReadOptions(),..._0x387b6b}),_0x3c799e=await _0x44dbac(_0x34c365[_0xbc898c(0xfa)],withDiagram(_0xf3194c['input'],_0x2f191f),{'visibility':'NAMESPACE_ONLY'});return{'method':_0xbc898c(0xf2),'url':_0xbc898c(0xce)+_0x34c365[_0xbc898c(0xfa)]+_0xbc898c(0xf9),'body':{'skillCode':_0xf3194c[_0xbc898c(0xe6)],'visibility':_0xbc898c(0xff),'valid':_0x3c799e[_0xbc898c(0xd7)],'errors':_0x3c799e[_0xbc898c(0xd8)],'warnings':_0x3c799e[_0xbc898c(0xfe)],'resolvedSlug':_0x3c799e[_0xbc898c(0xcf)],'resolvedVersion':_0x3c799e[_0xbc898c(0xfc)],'diagramValidated':_0x3c799e[_0xbc898c(0xdd)]},'description':_0xbc898c(0xe5)};}if(_0x5e2836&&_0x5e2836['scope']!==_0xbc898c(0xef))throw CliErrors[_0xbc898c(0xf7)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x2d1525[_0xbc898c(0xe6)]+_0xbc898c(0xf8)+(_0x5e2836[_0xbc898c(0xd9)]??_0xbc898c(0xe2))+'\x22.');const _0x22f1de=_0x554569(_0x53716d['dir'],_0x34c365[_0xbc898c(0xfa)],{..._0x5e2836?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x387b6b}),_0x38dc2e=await _0x44dbac(_0x34c365[_0xbc898c(0xfa)],withDiagram(_0x22f1de[_0xbc898c(0x102)],_0x2f191f),{'visibility':'PRIVATE'});return{'method':'POST','url':_0xbc898c(0xce)+_0x34c365['appCode']+'/publish/validate','body':{'skillCode':_0x22f1de['skillCode'],'visibility':_0xbc898c(0xeb),'valid':_0x38dc2e[_0xbc898c(0xd7)],'errors':_0x38dc2e[_0xbc898c(0xd8)],'warnings':_0x38dc2e[_0xbc898c(0xfe)],'resolvedSlug':_0x38dc2e[_0xbc898c(0xcf)],'resolvedVersion':_0x38dc2e[_0xbc898c(0xfc)],'diagramValidated':_0x38dc2e['diagramValidated']},'description':_0xbc898c(0xd5)};}export async function skillPushExecute(_0x4f725c){const _0x48af5e=a74_0x39ec,{createPersonalRuntimeSkill:_0x5d5d59,downloadRuntimeSkillPackage:_0x2429bd,getRuntimeSkillByCode:_0x27ac51,publishCompanyRuntimeSkill:_0x1f4928,updatePersonalRuntimeSkill:_0x542856,validateRuntimeSkillPublish:_0x43565e}=await import(_0x48af5e(0x107)),{verifyRuntimeSkillPackage:_0x1f676e,verifyRuntimeSkillBundle:_0x53b670,readPushDirectory:_0xa85b56,refreshPushDirectoryMetadataFromRemote:_0x51eb31,recordPushedRuntimeSkill:_0x158ded,resolvePushDirectoryIdentity:_0x2b2080}=await import(_0x48af5e(0xe0));if(!_0x4f725c[_0x48af5e(0xe8)])throw CliErrors['authRequired']();const _0xf5b4c2=resolvePushScope(_0x4f725c),_0x3c3ebd=_0x4f725c['bool'](_0x48af5e(0x100))||_0x4f725c['bool'](_0x48af5e(0x106)),_0xb7da5d=validateSkillDirectory(_0x4f725c['str'](_0x48af5e(0xed)));throwIfSkillValidationFailed(_0xb7da5d);const {diagram:_0x2eb64d,sourceFilePath:_0x5bdfca}=await readRequiredSkillDiagramInput(_0x4f725c[_0x48af5e(0xe9)](_0x48af5e(0xfb))),_0x522b27=diagramPackageExclusion(_0x5bdfca),_0x4b97cb=_0xb7da5d[_0x48af5e(0xed)];let _0x4b3309;if(_0xf5b4c2===_0x48af5e(0xf5)){const _0x254469=_0x2b2080(_0x4b97cb,_0x4f725c[_0x48af5e(0xfa)],remoteFirstMetadataOptions()),_0x28b570=await _0x27ac51(_0x4f725c['appCode'],_0x254469[_0x48af5e(0xe6)]);throwIfBuiltinPushTarget(_0x28b570);if(_0x28b570)_0x51eb31(_0x4b97cb,_0x28b570,_0x4f725c[_0x48af5e(0xfa)]);const _0x3413b9=_0xa85b56(_0x4b97cb,_0x4f725c[_0x48af5e(0xfa)],{..._0x28b570?{'targetScope':'company','ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x522b27});_0x4b3309={'scope':_0x48af5e(0xf5),'payload':_0x3413b9,'publishInput':withDiagram(_0x3413b9[_0x48af5e(0x102)],_0x2eb64d),'remoteForPreflight':_0x28b570,'warnings':[]};}else{const _0x5b2061=_0x4f725c[_0x48af5e(0xe9)]('appcode')[_0x48af5e(0xdb)](),_0x3ba8ee=Boolean(_0x5b2061),_0x32fb7c=allowRetargetArgs(_0x3ba8ee),_0x286f3e=_0x2b2080(_0x4b97cb,_0x4f725c['appCode'],{...remoteFirstMetadataOptions(),..._0x32fb7c[0x0]}),_0x25b63e=await _0x27ac51(_0x4f725c[_0x48af5e(0xfa)],_0x286f3e[_0x48af5e(0xe6)]);throwIfBuiltinPushTarget(_0x25b63e);if(_0x25b63e){if(_0x25b63e['scope']!==_0x48af5e(0xef)){if(_0x3ba8ee)throw CliErrors[_0x48af5e(0xf7)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x286f3e[_0x48af5e(0xe6)]+_0x48af5e(0xf8)+(_0x25b63e[_0x48af5e(0xd9)]??_0x48af5e(0xe2))+'\x22.');_0x51eb31(_0x4b97cb,_0x25b63e,_0x4f725c[_0x48af5e(0xfa)]);}else!_0x3ba8ee&&_0x51eb31(_0x4b97cb,_0x25b63e,_0x4f725c[_0x48af5e(0xfa)]);}const _0x456d1e=_0xa85b56(_0x4b97cb,_0x4f725c[_0x48af5e(0xfa)],{..._0x25b63e?remotePersonalReadOptions(_0x3ba8ee,_0x32fb7c[0x0]):remoteMissingPersonalReadOptions(_0x32fb7c[0x0]),..._0x522b27}),_0xd57423=_0x25b63e?.[_0x48af5e(0xd9)]===_0x48af5e(0xef)&&_0x25b63e[_0x48af5e(0xe6)]===_0x456d1e['skillCode']?_0x25b63e:undefined,_0x3ca710=_0x3ba8ee&&_0xd57423?withRetargetExistingMetadata(_0x456d1e['input'],_0xd57423,{'preferInputSkillName':Boolean(_0x456d1e[_0x48af5e(0xcb)])}):_0x456d1e[_0x48af5e(0x102)],_0x1ce4b9=_0x3ba8ee?buildRetargetWarning(_0x286f3e[_0x48af5e(0xcd)],_0x4f725c['appCode']):[];_0x4b3309={'scope':_0x48af5e(0xef),'payload':_0x456d1e,'publishInput':withDiagram(_0x3ca710,_0x2eb64d),'remoteForPreflight':_0xd57423,'existing':_0xd57423,'warnings':[..._0xb7da5d['warnings'],..._0x1ce4b9]};}const _0x3455f0=await runRemoteContentPreflight({'scope':_0x4b3309[_0x48af5e(0xd9)],'remote':_0x4b3309['remoteForPreflight'],'publishInput':_0x4b3309[_0x48af5e(0xea)],'skillCode':_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)],'appCode':_0x4f725c[_0x48af5e(0xfa)],'downloadRuntimeSkillPackage':_0x2429bd,'verifyRuntimeSkillBundle':_0x53b670});if(_0x3455f0[_0x48af5e(0xf4)]===_0x48af5e(0xd4))return _0x4b3309['scope']==='company'?_0x158ded(_0x4b97cb,_0x3455f0['savedSkill'],_0x4f725c[_0x48af5e(0xfa)],{'scope':_0x48af5e(0xf5)}):_0x158ded(_0x4b97cb,_0x3455f0[_0x48af5e(0xd6)],_0x4f725c[_0x48af5e(0xfa)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3455f0['savedSkill']),'scope':_0x4b3309['scope'],..._0x4b3309['scope']===_0x48af5e(0xef)?{'warnings':_0x4b3309[_0x48af5e(0xfe)]}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x4b3309[_0x48af5e(0xd9)])+'\x20Skill\x20'+_0x4b3309[_0x48af5e(0xf3)]['skillCode']+_0x48af5e(0xe7)};if(_0x4b3309[_0x48af5e(0xd9)]===_0x48af5e(0xf5)){const _0x4b6cf2=await _0x43565e(_0x4f725c[_0x48af5e(0xfa)],_0x4b3309[_0x48af5e(0xea)],{'visibility':_0x48af5e(0xff)});throwIfPublishValidationFailed(_0x48af5e(0xf5),_0x4b3309['payload'][_0x48af5e(0xe6)],_0x4b6cf2),throwIfUnconfirmedPublishWarnings(_0x48af5e(0xf5),_0x4b3309[_0x48af5e(0xf3)]['skillCode'],_0x4b6cf2[_0x48af5e(0xfe)],_0x3c3ebd);const _0x46710e=await _0x1f4928(_0x4f725c[_0x48af5e(0xfa)],_0x4b3309[_0x48af5e(0xea)],{'confirmWarnings':_0x3c3ebd});return _0x158ded(_0x4b97cb,{..._0x46710e,'files':_0x4b3309[_0x48af5e(0xea)]['files']},_0x4f725c['appCode'],{'scope':_0x48af5e(0xf5)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x46710e),'scope':_0x48af5e(0xf5),'reviewState':'submitted','submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x4b6cf2[_0x48af5e(0xfe)]}},'message':_0x48af5e(0xe4)+_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)]+_0x48af5e(0xe3)+(_0x46710e[_0x48af5e(0xe1)]??'(unknown)')+_0x48af5e(0xdf)};}const _0x141d95=await _0x43565e(_0x4f725c[_0x48af5e(0xfa)],_0x4b3309[_0x48af5e(0xea)],{'visibility':_0x48af5e(0xeb)});throwIfPublishValidationFailed(_0x48af5e(0xef),_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)],_0x141d95),throwIfUnconfirmedPublishWarnings(_0x48af5e(0xef),_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)],_0x141d95[_0x48af5e(0xfe)],_0x3c3ebd);const _0x457862={'confirmWarnings':_0x3c3ebd},_0x320f82=_0x4b3309['existing']?await _0x542856(_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)],_0x4f725c[_0x48af5e(0xfa)],_0x4b3309[_0x48af5e(0xea)],_0x457862):await _0x5d5d59(_0x4f725c['appCode'],_0x4b3309[_0x48af5e(0xea)],_0x457862);let _0x5786fa=_0x320f82;if(isMultiFileManifest(_0x4b3309[_0x48af5e(0xea)][_0x48af5e(0xfd)])){const _0x2e0db6=await _0x2429bd(_0x48af5e(0xef),_0x320f82[_0x48af5e(0xe6)]||_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)],_0x4f725c[_0x48af5e(0xfa)]);_0x53b670(_0x4b3309[_0x48af5e(0xea)][_0x48af5e(0xfd)],_0x2e0db6),_0x5786fa={..._0x320f82,'files':_0x4b3309['publishInput'][_0x48af5e(0xfd)]};}else{if(isPackageBackedManifest(_0x320f82[_0x48af5e(0xfd)])){const _0x5614bb=await _0x2429bd('personal',_0x320f82['skillCode']||_0x4b3309[_0x48af5e(0xf3)]['skillCode'],_0x4f725c[_0x48af5e(0xfa)]);_0x1f676e(_0x320f82[_0x48af5e(0xfd)],_0x5614bb);}}return _0x158ded(_0x4b97cb,_0x5786fa,_0x4f725c[_0x48af5e(0xfa)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x320f82),'warnings':_0x4b3309['warnings'],'validation':{'warnings':_0x141d95[_0x48af5e(0xfe)]},'diagramBound':!![]},'message':_0x4b3309[_0x48af5e(0x101)]?_0x48af5e(0xda)+_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)]:_0x48af5e(0xd0)+_0x4b3309[_0x48af5e(0xf3)][_0x48af5e(0xe6)]};}function scopeLabel(_0x1eac9d){const _0x30ca5e=a74_0x39ec;return _0x1eac9d===_0x30ca5e(0xf5)?'Company':_0x30ca5e(0xec);}function withDiagram(_0x48d97b,_0x465c7){return{..._0x48d97b,'diagram':_0x465c7};}function diagramPackageExclusion(_0x2e15a6){return _0x2e15a6?{'excludedFilePaths':[_0x2e15a6]}:{};}
|
|
1
|
+
(function(_0x4b05a9,_0x3e22c7){const _0x599658=a74_0x4afb,_0x20b62e=_0x4b05a9();while(!![]){try{const _0x1628be=-parseInt(_0x599658(0x114))/0x1+-parseInt(_0x599658(0x12e))/0x2+parseInt(_0x599658(0xfc))/0x3*(-parseInt(_0x599658(0x121))/0x4)+-parseInt(_0x599658(0x125))/0x5*(parseInt(_0x599658(0x10e))/0x6)+parseInt(_0x599658(0x123))/0x7+-parseInt(_0x599658(0xfd))/0x8*(-parseInt(_0x599658(0x10f))/0x9)+parseInt(_0x599658(0x107))/0xa*(parseInt(_0x599658(0x110))/0xb);if(_0x1628be===_0x3e22c7)break;else _0x20b62e['push'](_0x20b62e['shift']());}catch(_0x36ec4f){_0x20b62e['push'](_0x20b62e['shift']());}}}(a74_0x18de,0xc7ac0));function a74_0x4afb(_0x32c8ef,_0x42acb8){_0x32c8ef=_0x32c8ef-0xf7;const _0x18def7=a74_0x18de();let _0x4afb04=_0x18def7[_0x32c8ef];return _0x4afb04;}import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';function a74_0x18de(){const _0x22216c=['personal','8342425daJaJD','appcode','3290ABpgKq','input','diagram-file','Updated\x20personal\x20Skill\x20','/api/cli/v1/skills/','\x20has\x20scope=\x22','identical','NAMESPACE_ONLY','appCode','2634398BsmMlD','savedSkill','confirm-warnings','\x20for\x20review','frontmatterDisplayName','unknown','validation','metadata','valid','resolvedSlug','submitted','56082RfwdhE','1843768cRSjAn','POST','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','../../skills/runtime-skill-sync.js','skillCode','resolvedVersion','remoteForPreflight','Personal','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','dir','39674170hEDebt','accessKey','/publish/validate','files','str','bool','PRIVATE','10722ucKxTF','9xorRwB','11imyETs','existing','scope','publishInput','1031898cJHuxI','company','confirmWarnings','authRequired','../../core/api-client.js','errors','\x20Skill\x20','payload','(unknown)','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','diagramValidated','Submitted\x20company\x20Skill\x20','warnings','224isfhTE'];a74_0x18de=function(){return _0x22216c;};return a74_0x18de();}import{summarizeRuntimeSkill}from'./summary.js';import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x4933a6){const _0x2e63af=a74_0x4afb,{getRuntimeSkillByCode:_0x276511,validateRuntimeSkillPublish:_0x2ae58b}=await import(_0x2e63af(0x118)),{readPushDirectory:_0x4400e3,resolvePushDirectoryIdentity:_0x228c35}=await import(_0x2e63af(0x100));if(!_0x4933a6[_0x2e63af(0x108)])throw CliErrors[_0x2e63af(0x117)]();const _0x19ca4e=resolvePushScope(_0x4933a6),_0x5356e9=validateSkillDirectory(_0x4933a6[_0x2e63af(0x10b)](_0x2e63af(0x106)));throwIfSkillValidationFailed(_0x5356e9);const {diagram:_0xf6cf08,sourceFilePath:_0x2a2371}=await readRequiredSkillDiagramInput(_0x4933a6[_0x2e63af(0x10b)](_0x2e63af(0x127))),_0x5786de=diagramPackageExclusion(_0x2a2371),_0x22c968=_0x228c35(_0x5356e9[_0x2e63af(0x106)],_0x4933a6[_0x2e63af(0x12d)],remoteFirstMetadataOptions()),_0x2e1f20=await _0x276511(_0x4933a6[_0x2e63af(0x12d)],_0x22c968['skillCode']);throwIfBuiltinPushTarget(_0x2e1f20);if(_0x19ca4e===_0x2e63af(0x115)){const _0x1abe5a=_0x4400e3(_0x5356e9['dir'],_0x4933a6['appCode'],{...remoteMissingCompanyReadOptions(),..._0x5786de}),_0x3dacf3=await _0x2ae58b(_0x4933a6['appCode'],withDiagram(_0x1abe5a[_0x2e63af(0x126)],_0xf6cf08),{'visibility':'NAMESPACE_ONLY'});return{'method':_0x2e63af(0xfe),'url':_0x2e63af(0x129)+_0x4933a6[_0x2e63af(0x12d)]+_0x2e63af(0x109),'body':{'skillCode':_0x1abe5a[_0x2e63af(0x101)],'visibility':_0x2e63af(0x12c),'valid':_0x3dacf3[_0x2e63af(0xf9)],'errors':_0x3dacf3['errors'],'warnings':_0x3dacf3[_0x2e63af(0x120)],'resolvedSlug':_0x3dacf3['resolvedSlug'],'resolvedVersion':_0x3dacf3[_0x2e63af(0x102)],'diagramValidated':_0x3dacf3[_0x2e63af(0x11e)]},'description':_0x2e63af(0xff)};}if(_0x2e1f20&&_0x2e1f20[_0x2e63af(0x112)]!==_0x2e63af(0x122))throw CliErrors[_0x2e63af(0xf7)](_0x2e63af(0x11d)+_0x22c968[_0x2e63af(0x101)]+'\x20has\x20scope=\x22'+(_0x2e1f20[_0x2e63af(0x112)]??_0x2e63af(0x133))+'\x22.');const _0xea0d72=_0x4400e3(_0x5356e9[_0x2e63af(0x106)],_0x4933a6[_0x2e63af(0x12d)],{..._0x2e1f20?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x5786de}),_0x4a5406=await _0x2ae58b(_0x4933a6[_0x2e63af(0x12d)],withDiagram(_0xea0d72[_0x2e63af(0x126)],_0xf6cf08),{'visibility':'PRIVATE'});return{'method':_0x2e63af(0xfe),'url':'/api/cli/v1/skills/'+_0x4933a6[_0x2e63af(0x12d)]+_0x2e63af(0x109),'body':{'skillCode':_0xea0d72[_0x2e63af(0x101)],'visibility':_0x2e63af(0x10d),'valid':_0x4a5406[_0x2e63af(0xf9)],'errors':_0x4a5406[_0x2e63af(0x119)],'warnings':_0x4a5406['warnings'],'resolvedSlug':_0x4a5406[_0x2e63af(0xfa)],'resolvedVersion':_0x4a5406[_0x2e63af(0x102)],'diagramValidated':_0x4a5406[_0x2e63af(0x11e)]},'description':_0x2e63af(0x105)};}export async function skillPushExecute(_0x29289a){const _0x882a02=a74_0x4afb,{createPersonalRuntimeSkill:_0x53aefb,downloadRuntimeSkillPackage:_0xb574c0,getRuntimeSkillByCode:_0x46d25a,publishCompanyRuntimeSkill:_0x478585,updatePersonalRuntimeSkill:_0x2d9c5b,validateRuntimeSkillPublish:_0x3fa8cc}=await import(_0x882a02(0x118)),{verifyRuntimeSkillPackage:_0x2e7b49,verifyRuntimeSkillBundle:_0x21ef6e,readPushDirectory:_0xfbab97,refreshPushDirectoryMetadataFromRemote:_0x30410f,recordPushedRuntimeSkill:_0x12d6b5,resolvePushDirectoryIdentity:_0x11f482}=await import(_0x882a02(0x100));if(!_0x29289a[_0x882a02(0x108)])throw CliErrors[_0x882a02(0x117)]();const _0x10ddae=resolvePushScope(_0x29289a),_0x3ec934=_0x29289a[_0x882a02(0x10c)](_0x882a02(0x130))||_0x29289a[_0x882a02(0x10c)](_0x882a02(0x116)),_0x1f1c85=validateSkillDirectory(_0x29289a[_0x882a02(0x10b)](_0x882a02(0x106)));throwIfSkillValidationFailed(_0x1f1c85);const {diagram:_0x451851,sourceFilePath:_0x3f1649}=await readRequiredSkillDiagramInput(_0x29289a[_0x882a02(0x10b)](_0x882a02(0x127))),_0x4a6749=diagramPackageExclusion(_0x3f1649),_0x4dec83=_0x1f1c85[_0x882a02(0x106)];let _0x53a06d;if(_0x10ddae===_0x882a02(0x115)){const _0x1eb25f=_0x11f482(_0x4dec83,_0x29289a[_0x882a02(0x12d)],remoteFirstMetadataOptions()),_0x1e23af=await _0x46d25a(_0x29289a[_0x882a02(0x12d)],_0x1eb25f[_0x882a02(0x101)]);throwIfBuiltinPushTarget(_0x1e23af);if(_0x1e23af)_0x30410f(_0x4dec83,_0x1e23af,_0x29289a[_0x882a02(0x12d)]);const _0x3ab3fe=_0xfbab97(_0x4dec83,_0x29289a[_0x882a02(0x12d)],{..._0x1e23af?{'targetScope':_0x882a02(0x115),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x4a6749});_0x53a06d={'scope':_0x882a02(0x115),'payload':_0x3ab3fe,'publishInput':withDiagram(_0x3ab3fe['input'],_0x451851),'remoteForPreflight':_0x1e23af,'warnings':[]};}else{const _0x2bea34=_0x29289a[_0x882a02(0x10b)](_0x882a02(0x124))['trim'](),_0x5b9541=Boolean(_0x2bea34),_0x369849=allowRetargetArgs(_0x5b9541),_0x5a38a7=_0x11f482(_0x4dec83,_0x29289a[_0x882a02(0x12d)],{...remoteFirstMetadataOptions(),..._0x369849[0x0]}),_0x4669b2=await _0x46d25a(_0x29289a[_0x882a02(0x12d)],_0x5a38a7['skillCode']);throwIfBuiltinPushTarget(_0x4669b2);if(_0x4669b2){if(_0x4669b2[_0x882a02(0x112)]!==_0x882a02(0x122)){if(_0x5b9541)throw CliErrors['validation'](_0x882a02(0x11d)+_0x5a38a7[_0x882a02(0x101)]+_0x882a02(0x12a)+(_0x4669b2['scope']??_0x882a02(0x133))+'\x22.');_0x30410f(_0x4dec83,_0x4669b2,_0x29289a[_0x882a02(0x12d)]);}else!_0x5b9541&&_0x30410f(_0x4dec83,_0x4669b2,_0x29289a[_0x882a02(0x12d)]);}const _0x25a550=_0xfbab97(_0x4dec83,_0x29289a['appCode'],{..._0x4669b2?remotePersonalReadOptions(_0x5b9541,_0x369849[0x0]):remoteMissingPersonalReadOptions(_0x369849[0x0]),..._0x4a6749}),_0x3e8df8=_0x4669b2?.[_0x882a02(0x112)]==='personal'&&_0x4669b2['skillCode']===_0x25a550[_0x882a02(0x101)]?_0x4669b2:undefined,_0x130217=_0x5b9541&&_0x3e8df8?withRetargetExistingMetadata(_0x25a550['input'],_0x3e8df8,{'preferInputSkillName':Boolean(_0x25a550[_0x882a02(0x132)])}):_0x25a550[_0x882a02(0x126)],_0x2d208b=_0x5b9541?buildRetargetWarning(_0x5a38a7[_0x882a02(0xf8)],_0x29289a['appCode']):[];_0x53a06d={'scope':'personal','payload':_0x25a550,'publishInput':withDiagram(_0x130217,_0x451851),'remoteForPreflight':_0x3e8df8,'existing':_0x3e8df8,'warnings':[..._0x1f1c85[_0x882a02(0x120)],..._0x2d208b]};}const _0x438f38=await runRemoteContentPreflight({'scope':_0x53a06d[_0x882a02(0x112)],'remote':_0x53a06d[_0x882a02(0x103)],'publishInput':_0x53a06d[_0x882a02(0x113)],'skillCode':_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)],'appCode':_0x29289a['appCode'],'downloadRuntimeSkillPackage':_0xb574c0,'verifyRuntimeSkillBundle':_0x21ef6e});if(_0x438f38['status']===_0x882a02(0x12b))return _0x53a06d[_0x882a02(0x112)]===_0x882a02(0x115)?_0x12d6b5(_0x4dec83,_0x438f38[_0x882a02(0x12f)],_0x29289a[_0x882a02(0x12d)],{'scope':'company'}):_0x12d6b5(_0x4dec83,_0x438f38[_0x882a02(0x12f)],_0x29289a[_0x882a02(0x12d)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x438f38['savedSkill']),'scope':_0x53a06d[_0x882a02(0x112)],..._0x53a06d[_0x882a02(0x112)]===_0x882a02(0x122)?{'warnings':_0x53a06d[_0x882a02(0x120)]}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x53a06d[_0x882a02(0x112)])+_0x882a02(0x11a)+_0x53a06d['payload'][_0x882a02(0x101)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x53a06d[_0x882a02(0x112)]===_0x882a02(0x115)){const _0x49b68b=await _0x3fa8cc(_0x29289a[_0x882a02(0x12d)],_0x53a06d[_0x882a02(0x113)],{'visibility':_0x882a02(0x12c)});throwIfPublishValidationFailed(_0x882a02(0x115),_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)],_0x49b68b),throwIfUnconfirmedPublishWarnings(_0x882a02(0x115),_0x53a06d['payload'][_0x882a02(0x101)],_0x49b68b[_0x882a02(0x120)],_0x3ec934);const _0x39f7dc=await _0x478585(_0x29289a[_0x882a02(0x12d)],_0x53a06d[_0x882a02(0x113)],{'confirmWarnings':_0x3ec934});return _0x12d6b5(_0x4dec83,{..._0x39f7dc,'files':_0x53a06d[_0x882a02(0x113)][_0x882a02(0x10a)]},_0x29289a[_0x882a02(0x12d)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x39f7dc),'scope':_0x882a02(0x115),'reviewState':_0x882a02(0xfb),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x49b68b['warnings']}},'message':_0x882a02(0x11f)+_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)]+'\x20version\x20'+(_0x39f7dc['version']??_0x882a02(0x11c))+_0x882a02(0x131)};}const _0x5c4c26=await _0x3fa8cc(_0x29289a[_0x882a02(0x12d)],_0x53a06d[_0x882a02(0x113)],{'visibility':_0x882a02(0x10d)});throwIfPublishValidationFailed(_0x882a02(0x122),_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)],_0x5c4c26),throwIfUnconfirmedPublishWarnings('personal',_0x53a06d['payload'][_0x882a02(0x101)],_0x5c4c26['warnings'],_0x3ec934);const _0x2ba874={'confirmWarnings':_0x3ec934},_0x45029d=_0x53a06d[_0x882a02(0x111)]?await _0x2d9c5b(_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)],_0x29289a[_0x882a02(0x12d)],_0x53a06d[_0x882a02(0x113)],_0x2ba874):await _0x53aefb(_0x29289a[_0x882a02(0x12d)],_0x53a06d['publishInput'],_0x2ba874);let _0x50cc16=_0x45029d;if(isMultiFileManifest(_0x53a06d[_0x882a02(0x113)]['files'])){const _0xee1d4f=await _0xb574c0('personal',_0x45029d[_0x882a02(0x101)]||_0x53a06d[_0x882a02(0x11b)]['skillCode'],_0x29289a['appCode']);_0x21ef6e(_0x53a06d[_0x882a02(0x113)]['files'],_0xee1d4f),_0x50cc16={..._0x45029d,'files':_0x53a06d[_0x882a02(0x113)]['files']};}else{if(isPackageBackedManifest(_0x45029d['files'])){const _0x27d576=await _0xb574c0(_0x882a02(0x122),_0x45029d[_0x882a02(0x101)]||_0x53a06d[_0x882a02(0x11b)]['skillCode'],_0x29289a[_0x882a02(0x12d)]);_0x2e7b49(_0x45029d[_0x882a02(0x10a)],_0x27d576);}}return _0x12d6b5(_0x4dec83,_0x50cc16,_0x29289a[_0x882a02(0x12d)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x45029d),'warnings':_0x53a06d[_0x882a02(0x120)],'validation':{'warnings':_0x5c4c26['warnings']},'diagramBound':!![]},'message':_0x53a06d['existing']?_0x882a02(0x128)+_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)]:'Created\x20personal\x20Skill\x20'+_0x53a06d[_0x882a02(0x11b)][_0x882a02(0x101)]};}function scopeLabel(_0x5512b6){const _0x203bca=a74_0x4afb;return _0x5512b6==='company'?'Company':_0x203bca(0x104);}function withDiagram(_0x40cb07,_0x235302){return{..._0x40cb07,'diagram':_0x235302};}function diagramPackageExclusion(_0x305dff){return _0x305dff?{'excludedFilePaths':[_0x305dff]}:{};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x5d81f6,_0x1fd4de){const _0x464e3a=a75_0x51ac,_0x3b167f=_0x5d81f6();while(!![]){try{const _0x5573ec=parseInt(_0x464e3a(0x1ec))/0x1*(-parseInt(_0x464e3a(0x1f2))/0x2)+-parseInt(_0x464e3a(0x1ed))/0x3*(-parseInt(_0x464e3a(0x1f7))/0x4)+-parseInt(_0x464e3a(0x1f4))/0x5+-parseInt(_0x464e3a(0x1e8))/0x6+parseInt(_0x464e3a(0x1dd))/0x7*(-parseInt(_0x464e3a(0x1d6))/0x8)+-parseInt(_0x464e3a(0x1dc))/0x9+-parseInt(_0x464e3a(0x1de))/0xa*(-parseInt(_0x464e3a(0x1fc))/0xb);if(_0x5573ec===_0x1fd4de)break;else _0x3b167f['push'](_0x3b167f['shift']());}catch(_0x193a90){_0x3b167f['push'](_0x3b167f['shift']());}}}(a75_0x2e3d,0xde38e));function a75_0x2e3d(){const _0x3db0c4=['skill-metadata-appcode-retargeted','\x20Skill\x20push\x20validation\x20failed\x20for\x20','1SvQzbb','27lKYPBk','validation','errors','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','different','3487006xZVMxv','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','3597560ZbLcHl','appCode','Local\x20Skill\x20metadata\x20appCode\x20','717636pLQkul','builtin','publishInput','warning','lovrabet.skill.json','76773389tNDUFe','company','str','Personal','remote','valid','scope','length','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','files','8BLNYqs','personal','Company','skillCode','SkillHub\x20validation\x20returned\x20invalid.','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','15715116Wayvnc','12604991RzuqUY','10xzSMrS','join','Review\x20each\x20warning\x20before\x20continuing.','\x20cannot\x20be\x20pushed.','downloadRuntimeSkillPackage','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','(unknown)','identical','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','not-applicable','10044036cNPbiS','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20'];a75_0x2e3d=function(){return _0x3db0c4;};return a75_0x2e3d();}import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x2e29fb){const _0xc995d3=a75_0x51ac,_0x17229e=_0x2e29fb[_0xc995d3(0x1fe)](_0xc995d3(0x202))||_0xc995d3(0x1d7);if(_0x17229e===_0xc995d3(0x1d7)||_0x17229e==='company')return _0x17229e;throw CliErrors[_0xc995d3(0x1ee)](_0xc995d3(0x1db)+_0x17229e+'\x22.');}export function allowRetargetArgs(_0xea9f61){return _0xea9f61?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}function a75_0x51ac(_0x29a9d0,_0x57c97c){_0x29a9d0=_0x29a9d0-0x1d5;const _0x2e3da0=a75_0x2e3d();let _0x51ac4a=_0x2e3da0[_0x29a9d0];return _0x51ac4a;}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0xe1fd51=a75_0x51ac;return{'targetScope':_0xe1fd51(0x1fd),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x4cff40={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x4cff40};}export function remotePersonalReadOptions(_0x189c60,_0x64b8e2={}){return{'ignoreInvalidMetadata':!![],..._0x189c60?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x64b8e2};}export function throwIfBuiltinPushTarget(_0x5b1874){const _0x11a51d=a75_0x51ac;if(_0x5b1874?.['scope']!==_0x11a51d(0x1f8))return;throw CliErrors[_0x11a51d(0x1ee)]('Builtin\x20Skill\x20'+(_0x5b1874[_0x11a51d(0x1d9)]??_0x11a51d(0x1e4))+_0x11a51d(0x1e1),_0x11a51d(0x1e3));}export function throwIfPublishValidationFailed(_0x3a3083,_0x57c5bd,_0x570a9c){const _0x23b05d=a75_0x51ac;if(_0x570a9c['errors'][_0x23b05d(0x203)]===0x0&&(_0x570a9c[_0x23b05d(0x201)]||_0x570a9c['warnings'][_0x23b05d(0x203)]>0x0))return;const _0x218f34=_0x570a9c[_0x23b05d(0x1ef)][_0x23b05d(0x203)]>0x0?_0x570a9c[_0x23b05d(0x1ef)][_0x23b05d(0x1df)](';\x20'):_0x23b05d(0x1da),_0x4e67c2=_0x3a3083===_0x23b05d(0x1fd)?'Company':_0x23b05d(0x1ff);throw CliErrors[_0x23b05d(0x1ee)](_0x4e67c2+_0x23b05d(0x1eb)+_0x57c5bd+'.',_0x218f34);}export function throwIfUnconfirmedPublishWarnings(_0x2e8a3e,_0xfc5424,_0x46c159,_0x42e4db){const _0x63bf53=a75_0x51ac;if(_0x46c159[_0x63bf53(0x203)]===0x0||_0x42e4db)return;const _0x2bf5b7=_0x2e8a3e==='company'?_0x63bf53(0x1d8):_0x63bf53(0x1ff);throw CliErrors[_0x63bf53(0x1ee)](_0x2bf5b7+_0x63bf53(0x1e9)+_0xfc5424+'.',[_0x63bf53(0x1e0),_0x63bf53(0x1e6),_0x63bf53(0x1f0),'Warnings:\x20'+_0x46c159[_0x63bf53(0x1df)](';\x20')][_0x63bf53(0x1df)]('\x20'));}export function buildRetargetWarning(_0x1f7362,_0x2a07f1){const _0x4fdb54=a75_0x51ac;if(!_0x1f7362?.['appCode']||_0x1f7362['appCode']===_0x2a07f1)return[];return[{'level':_0x4fdb54(0x1fa),'ruleId':_0x4fdb54(0x1ea),'file':_0x4fdb54(0x1fb),'message':_0x4fdb54(0x1f6)+_0x1f7362[_0x4fdb54(0x1f5)]+_0x4fdb54(0x204)+_0x2a07f1+'\x20after\x20successful\x20push.','suggestion':_0x4fdb54(0x1f3)}];}export async function runRemoteContentPreflight(_0x8b678){const _0x56e657=a75_0x51ac;if(!_0x8b678[_0x56e657(0x200)]||_0x8b678[_0x56e657(0x200)][_0x56e657(0x202)]!==_0x8b678[_0x56e657(0x202)]||!_0x8b678['publishInput']['files'])return{'status':_0x56e657(0x1e7)};const _0x4e81d2=_0x8b678[_0x56e657(0x200)]['skillCode']||_0x8b678[_0x56e657(0x1d9)];if(!_0x4e81d2)return{'status':_0x56e657(0x1e7)};const _0x23b79f=await _0x8b678[_0x56e657(0x1e2)](_0x8b678[_0x56e657(0x202)],_0x4e81d2,_0x8b678['appCode'],_0x8b678[_0x56e657(0x200)]['version']);try{_0x8b678['verifyRuntimeSkillBundle'](_0x8b678[_0x56e657(0x1f9)][_0x56e657(0x1d5)],_0x23b79f);}catch{return{'status':_0x56e657(0x1f1)};}return{'status':_0x56e657(0x1e5),'savedSkill':{..._0x8b678['remote'],'content':_0x8b678['publishInput']['content'],'files':_0x8b678['publishInput'][_0x56e657(0x1d5)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x5b76(_0x21d9ce,_0x10411c){_0x21d9ce=_0x21d9ce-0x73;const _0xcda53=a76_0xcda5();let _0x5b7646=_0xcda53[_0x21d9ce];return _0x5b7646;}(function(_0x20d71c,_0x4eebab){const _0x4c0f69=a76_0x5b76,_0x24cd24=_0x20d71c();while(!![]){try{const _0x4ab392=parseInt(_0x4c0f69(0x7d))/0x1+-parseInt(_0x4c0f69(0x83))/0x2*(-parseInt(_0x4c0f69(0x77))/0x3)+-parseInt(_0x4c0f69(0x79))/0x4*(-parseInt(_0x4c0f69(0x89))/0x5)+-parseInt(_0x4c0f69(0x7e))/0x6+-parseInt(_0x4c0f69(0x8a))/0x7*(-parseInt(_0x4c0f69(0x7c))/0x8)+parseInt(_0x4c0f69(0x8b))/0x9*(parseInt(_0x4c0f69(0x8c))/0xa)+-parseInt(_0x4c0f69(0x82))/0xb*(parseInt(_0x4c0f69(0x78))/0xc);if(_0x4ab392===_0x4eebab)break;else _0x24cd24['push'](_0x24cd24['shift']());}catch(_0x52712b){_0x24cd24['push'](_0x24cd24['shift']());}}}(a76_0xcda5,0xf345b));export function withRetargetExistingMetadata(_0x56c405,_0x5988bf,_0x2395b7={}){const _0x3f3d26=a76_0x5b76,_0x2e4a18=_0x2395b7[_0x3f3d26(0x74)]?_0x56c405['skillName']??_0x5988bf[_0x3f3d26(0x7a)]:_0x5988bf[_0x3f3d26(0x7a)]??_0x56c405[_0x3f3d26(0x7a)];return{..._0x56c405,'skillName':_0x2e4a18,'description':_0x5988bf[_0x3f3d26(0x81)]??_0x56c405[_0x3f3d26(0x81)],'tags':Array[_0x3f3d26(0x85)](_0x5988bf['tags'])?_0x5988bf['tags']:_0x56c405[_0x3f3d26(0x7f)],'version':_0x5988bf[_0x3f3d26(0x76)]??_0x56c405[_0x3f3d26(0x76)],'sourceSessionId':_0x5988bf[_0x3f3d26(0x73)]??_0x56c405[_0x3f3d26(0x73)]};}export function buildRetargetWarning(_0x4f18b8,_0x330607){const _0x391a13=a76_0x5b76;if(!_0x4f18b8?.[_0x391a13(0x88)]||_0x4f18b8['appCode']===_0x330607)return[];return[{'level':_0x391a13(0x75),'ruleId':_0x391a13(0x7b),'file':'lovrabet.skill.json','message':_0x391a13(0x86)+_0x4f18b8[_0x391a13(0x88)]+_0x391a13(0x87)+_0x330607+_0x391a13(0x80),'suggestion':_0x391a13(0x84)}];}function a76_0xcda5(){const _0x256282=['1089413CYEAkv','11516028FSyJzS','tags','\x20after\x20successful\x20push.','description','6798132VNCZsI','18rmwHoO','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','isArray','Local\x20Skill\x20metadata\x20appCode\x20','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','appCode','440VtDjOb','602JePmTr','207DvtNyA','463630VtLEPK','sourceSessionId','preferInputSkillName','warning','version','160377Iuxyyn','36yZnBBB','23296trouZs','skillName','skill-metadata-appcode-retargeted','150736UXbRwD'];a76_0xcda5=function(){return _0x256282;};return a76_0xcda5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x4029(){const _0xb3f410=['company','797466QLqvIk','2834942MQMdWJ','2122376BRwvtL','personal','trim','9qqCQuu','1830495XHwuAq','7guwWCh','all','4QoWbyY','633444ognXjn','71vNkHvO','1084290WEBpwI','8996PXGhoq'];a77_0x4029=function(){return _0xb3f410;};return a77_0x4029();}(function(_0x215ee8,_0x5f5cd6){const _0x39dc7f=a77_0x408d,_0x125405=_0x215ee8();while(!![]){try{const _0x4b4fe0=-parseInt(_0x39dc7f(0x1c2))/0x1*(-parseInt(_0x39dc7f(0x1c4))/0x2)+-parseInt(_0x39dc7f(0x1c1))/0x3+parseInt(_0x39dc7f(0x1cf))/0x4*(-parseInt(_0x39dc7f(0x1cc))/0x5)+parseInt(_0x39dc7f(0x1c6))/0x6*(-parseInt(_0x39dc7f(0x1cd))/0x7)+parseInt(_0x39dc7f(0x1c8))/0x8*(parseInt(_0x39dc7f(0x1cb))/0x9)+parseInt(_0x39dc7f(0x1c3))/0xa+parseInt(_0x39dc7f(0x1c7))/0xb;if(_0x4b4fe0===_0x5f5cd6)break;else _0x125405['push'](_0x125405['shift']());}catch(_0x698995){_0x125405['push'](_0x125405['shift']());}}}(a77_0x4029,0x3ac08));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x2d7d4d){const _0x3a3ce8=a77_0x408d,_0x34ec72=_0x2d7d4d[_0x3a3ce8(0x1ca)]();if(!_0x34ec72||_0x34ec72===_0x3a3ce8(0x1ce))return[_0x3a3ce8(0x1c9),_0x3a3ce8(0x1c5)];if(_0x34ec72===_0x3a3ce8(0x1c9)||_0x34ec72===_0x3a3ce8(0x1c5))return[_0x34ec72];throw CliErrors['validation']('Unsupported\x20Skill\x20sync\x20scope:\x20'+_0x2d7d4d);}export function normalizeListScope(_0x596089){const _0x5db03d=a77_0x408d,_0x3942a0=_0x596089[_0x5db03d(0x1ca)]();if(!_0x3942a0)return _0x5db03d(0x1ce);if(_0x3942a0===_0x5db03d(0x1c9)||_0x3942a0==='company'||_0x3942a0===_0x5db03d(0x1ce))return _0x3942a0;throw CliErrors['validation']('Unsupported\x20Skill\x20list\x20scope:\x20'+_0x596089);}export function shouldListScope(_0x2c90c0,_0x1e4d49){const _0x4fd8b6=a77_0x408d;if(_0x2c90c0===_0x4fd8b6(0x1ce))return!![];return _0x2c90c0===_0x1e4d49;}export function listScopeToRuntimeScopes(_0x1b96b6){const _0x5abf0b=a77_0x408d;if(_0x1b96b6===_0x5abf0b(0x1ce))return[_0x5abf0b(0x1c9),_0x5abf0b(0x1c5)];return[_0x1b96b6==='company'?_0x5abf0b(0x1c5):_0x1b96b6];}function a77_0x408d(_0x2bc147,_0x148de9){_0x2bc147=_0x2bc147-0x1c1;const _0x402900=a77_0x4029();let _0x408d28=_0x402900[_0x2bc147];return _0x408d28;}export function listScopeToRemoteScope(_0x12020f){return _0x12020f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a78_0x57df(_0x1c8040,_0x3a3f9f){_0x1c8040=_0x1c8040-0x146;var _0x2fba42=a78_0x2fba();var _0x57dfa3=_0x2fba42[_0x1c8040];return _0x57dfa3;}(function(_0x458a2e,_0x36bcfe){var _0x28a252=a78_0x57df,_0x43de94=_0x458a2e();while(!![]){try{var _0xdf8190=-parseInt(_0x28a252(0x14c))/0x1+-parseInt(_0x28a252(0x14b))/0x2*(-parseInt(_0x28a252(0x14a))/0x3)+-parseInt(_0x28a252(0x14f))/0x4*(-parseInt(_0x28a252(0x146))/0x5)+-parseInt(_0x28a252(0x14d))/0x6+parseInt(_0x28a252(0x148))/0x7+parseInt(_0x28a252(0x149))/0x8+-parseInt(_0x28a252(0x154))/0x9*(parseInt(_0x28a252(0x151))/0xa);if(_0xdf8190===_0x36bcfe)break;else _0x43de94['push'](_0x43de94['shift']());}catch(_0x9f7bd2){_0x43de94['push'](_0x43de94['shift']());}}}(a78_0x2fba,0x87a26));export function summarizeRuntimeSkill(_0x2953bc){var _0x189662=a78_0x57df;return{'id':_0x2953bc['id'],'skillCode':_0x2953bc[_0x189662(0x15c)],'skillName':_0x2953bc['skillName'],'scope':_0x2953bc[_0x189662(0x158)],'version':_0x2953bc[_0x189662(0x155)],'readonly':_0x2953bc[_0x189662(0x153)]};}export function summarizeLocalRuntimeSkill(_0x1390c0){var _0x2f03e7=a78_0x57df;return{'id':_0x1390c0['id'],'skillCode':_0x1390c0[_0x2f03e7(0x15c)],'skillName':_0x1390c0[_0x2f03e7(0x14e)],'scope':_0x1390c0['scope'],'appCode':_0x1390c0[_0x2f03e7(0x150)],'version':_0x1390c0[_0x2f03e7(0x155)],'status':_0x1390c0[_0x2f03e7(0x157)],'readonly':_0x1390c0[_0x2f03e7(0x153)],'tags':_0x1390c0['tags'],'dir':_0x1390c0[_0x2f03e7(0x147)],'cacheDir':_0x1390c0[_0x2f03e7(0x15a)],'skillMdPath':_0x1390c0[_0x2f03e7(0x152)],'metadataPath':_0x1390c0[_0x2f03e7(0x15b)],'linkedPaths':_0x1390c0[_0x2f03e7(0x156)],'contentHash':_0x1390c0[_0x2f03e7(0x15d)],'treeHash':_0x1390c0['treeHash'],'pulledAt':_0x1390c0[_0x2f03e7(0x159)]};}function a78_0x2fba(){var _0x22316a=['skillCode','contentHash','5xGinBF','dir','6115907dgEaFP','7168456AnuHge','6ChEWPZ','319226zNdWQw','731098dzovCh','295626LZDrrg','skillName','2414692ZqeWHr','appCode','10XymEZm','skillMdPath','readonly','12210570gzRYUg','version','linkedPaths','status','scope','pulledAt','cacheDir','metadataPath'];a78_0x2fba=function(){return _0x22316a;};return a78_0x2fba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x5288b4=a79_0x4151;(function(_0x48f8fa,_0x29f9e7){const _0x149c23=a79_0x4151,_0xf5a8b3=_0x48f8fa();while(!![]){try{const _0x11d26a=-parseInt(_0x149c23(0x139))/0x1+parseInt(_0x149c23(0x12e))/0x2+-parseInt(_0x149c23(0x11d))/0x3+parseInt(_0x149c23(0x136))/0x4*(-parseInt(_0x149c23(0x12d))/0x5)+-parseInt(_0x149c23(0x140))/0x6+-parseInt(_0x149c23(0x134))/0x7*(-parseInt(_0x149c23(0x12a))/0x8)+-parseInt(_0x149c23(0x118))/0x9*(parseInt(_0x149c23(0x123))/0xa);if(_0x11d26a===_0x29f9e7)break;else _0xf5a8b3['push'](_0xf5a8b3['shift']());}catch(_0x372ced){_0xf5a8b3['push'](_0xf5a8b3['shift']());}}}(a79_0x5cfd,0x34f1f));function a79_0x5cfd(){const _0x2e8c7d=['6966bFWYmF','Use\x20one\x20of:\x20','\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','48090ezKTDY','---\x0aname:\x20','test','skillName','includes','read','330XKXTaX','Invalid\x20Skill\x20name:\x20','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','Unsupported\x20Skill\x20type:\x20','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','write','22592mbcABA','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','1151170hruyxE','728140mvscMY','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、Backend\x20Function\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20Backend\x20Function\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','type','749NurRLi','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','4AlwZSG','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','56898fRwZFh','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20Backend\x20Function、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','SKILL.md','validation','toISOString','trim','\x0a\x20\x20created:\x20\x22','724026ToMiVd','#\x20Output\x20Contract\x0a\x0a'];a79_0x5cfd=function(){return _0x2e8c7d;};return a79_0x5cfd();}import{CliErrors}from'../../errors.js';function a79_0x4151(_0x38fd0c,_0x24fabc){_0x38fd0c=_0x38fd0c-0x117;const _0x5cfdad=a79_0x5cfd();let _0x41513d=_0x5cfdad[_0x38fd0c];return _0x41513d;}export const SKILL_TYPES=[a79_0x5288b4(0x129),a79_0x5288b4(0x122)];export const DEFAULT_SKILL_TARGET='.agents/skills';export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE='references/runtime-contract.md';export const OUTPUT_CONTRACT_FILE='references/output-contract.md';export function validateSkillName(_0x11062e){const _0x1899b5=a79_0x5288b4,_0x13313e=_0x11062e[_0x1899b5(0x13e)]();if(!SKILL_NAME_PATTERN[_0x1899b5(0x11f)](_0x13313e))throw CliErrors['validation'](_0x1899b5(0x124)+_0x11062e+_0x1899b5(0x137),_0x1899b5(0x11b));return _0x13313e;}export function normalizeSkillTemplateType(_0x486ad0){const _0x18c1d1=a79_0x5288b4,_0x573c5b=(_0x486ad0||_0x18c1d1(0x129))[_0x18c1d1(0x13e)]()||_0x18c1d1(0x129);if(SKILL_TYPES[_0x18c1d1(0x121)](_0x573c5b))return _0x573c5b;throw CliErrors[_0x18c1d1(0x13c)](_0x18c1d1(0x127)+_0x486ad0,_0x18c1d1(0x119)+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x5aa775){const _0x53fe2e=a79_0x5288b4,_0x12773b=validateSkillName(_0x5aa775[_0x53fe2e(0x120)]),_0x5ca4f6=normalizeSkillTemplateType(_0x5aa775[_0x53fe2e(0x133)]),_0x2991a0=_0x5aa775['timestamp']??new Date()[_0x53fe2e(0x13d)]();return{'skillName':_0x12773b,'type':_0x5ca4f6,'files':[{'path':_0x53fe2e(0x13b),'content':renderSkillMd(_0x12773b,_0x5ca4f6,_0x2991a0)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x12773b,_0x5ca4f6)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x12773b,_0x5ca4f6)}]};}function renderSkillMd(_0x27bbfb,_0x11aea9,_0x1918da){const _0x5f1e95=a79_0x5288b4,_0x4402dc=typeWorkflow(_0x11aea9);return _0x5f1e95(0x11e)+_0x27bbfb+_0x5f1e95(0x11a)+_0x11aea9+_0x5f1e95(0x13f)+_0x1918da+_0x5f1e95(0x131)+_0x27bbfb+_0x5f1e95(0x12f)+_0x4402dc+'\x0a\x0a'+businessStateSection(_0x11aea9)+_0x5f1e95(0x135);}function renderRuntimeContract(_0x4c6f1e,_0x38ae92){const _0x3a6867=a79_0x5288b4,_0x245d6a=_0x38ae92===_0x3a6867(0x129)?_0x3a6867(0x126):'';return'#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。'+_0x4c6f1e+'\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type='+_0x38ae92+_0x3a6867(0x132)+_0x245d6a+_0x3a6867(0x130);}function renderOutputContract(_0x133ab0,_0x37a2f2){const _0x2535fc=a79_0x5288b4,_0x30d2dc=_0x37a2f2===_0x2535fc(0x129)?_0x2535fc(0x138):_0x37a2f2+_0x2535fc(0x125);return _0x2535fc(0x117)+_0x133ab0+_0x2535fc(0x12b)+_0x30d2dc+_0x2535fc(0x128);}function typeWorkflow(_0x1ef904){const _0x4cec2f=a79_0x5288b4;if(_0x1ef904===_0x4cec2f(0x122))return _0x4cec2f(0x11c);return _0x4cec2f(0x12c);}function businessStateSection(_0x4d6400){const _0x5db2b5=a79_0x5288b4;if(_0x4d6400!=='write')return'';return _0x5db2b5(0x13a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a80_0x3ada00=a80_0x2b9c;(function(_0x136d50,_0x218957){const _0x1f291c=a80_0x2b9c,_0xef22c0=_0x136d50();while(!![]){try{const _0xc67cc3=-parseInt(_0x1f291c(0x18c))/0x1*(-parseInt(_0x1f291c(0x195))/0x2)+parseInt(_0x1f291c(0x1b9))/0x3+-parseInt(_0x1f291c(0x1c6))/0x4*(parseInt(_0x1f291c(0x1d6))/0x5)+-parseInt(_0x1f291c(0x1c5))/0x6+-parseInt(_0x1f291c(0x1a6))/0x7*(-parseInt(_0x1f291c(0x19f))/0x8)+-parseInt(_0x1f291c(0x1de))/0x9*(parseInt(_0x1f291c(0x1af))/0xa)+parseInt(_0x1f291c(0x1c2))/0xb;if(_0xc67cc3===_0x218957)break;else _0xef22c0['push'](_0xef22c0['shift']());}catch(_0x230255){_0xef22c0['push'](_0xef22c0['shift']());}}}(a80_0x58d6,0x4d26f));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';function a80_0x2b9c(_0x62ef8e,_0x57cb9c){_0x62ef8e=_0x62ef8e-0x188;const _0x58d6aa=a80_0x58d6();let _0x2b9c36=_0x58d6aa[_0x62ef8e];return _0x2b9c36;}import{parse as a80_0x193f90}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a80_0x3ada00(0x1e1),SUPPORTED_SKILL_TYPES=new Set([a80_0x3ada00(0x1d0),a80_0x3ada00(0x1ab)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a80_0x58d6(){const _0x5395ff=['example-recommended','377628zfIVNd','Frontmatter\x20description\x20is\x20empty.','auth','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','push','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','false','string','frontmatter-required','11704847AVNaUn','has','slice','2047926mPfqYf','24sTPPsX','filter','Set\x20metadata.type\x20to\x20write\x20or\x20read.','warning','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','bff','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','dataset','SKILL.md\x20is\x20not\x20a\x20file.','isFile','write','match','logs','\x20Fix:\x20','example','Add\x20frontmatter\x20with\x20name\x20and\x20description.','288785PofzTx','internal','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','section','trim','display-name-recommended','artifact','length','99DlTSVA','sql','service','SKILL.md','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','test','message','hasFrontmatter','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','raw','Skill\x20validation\x20failed:\x0a','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','9931YtSSHu','Missing\x20SKILL.md.','SKILL.md\x20must\x20start\x20with\x20frontmatter.','structure-complete','validation','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','metadata','type','displayName','6fudBxv','utf8','schema','error','number','boolean','isArray','map','suggestion','file','8zUZITo','toUpperCase','level','isDirectory','name','path','data','237517AKwqFS','object','join','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','internal-skill','read','true','flatMap','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','227090tTYenA','Skill\x20directory\x20not\x20found:\x20','description-required','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','line','split','project','ruleId','description'];a80_0x58d6=function(){return _0x5395ff;};return a80_0x58d6();}export function validateSkillDirectory(_0x49d5b7,_0x1269ff={}){const _0x4f67c0=a80_0x3ada00,_0x2eca66=resolveSkillDirectoryRoot(_0x49d5b7),_0x487c77=[],_0x5da323=loadRequiredSkillFile(_0x2eca66,_0x487c77),_0x45856b=_0x5da323?parseFrontmatter(_0x5da323['content']):{'hasFrontmatter':![]};_0x5da323&&validateFrontmatter(_0x5da323[_0x4f67c0(0x1a4)],_0x45856b,_0x487c77);validateRuntimeCliReferences(_0x2eca66,_0x487c77);const _0x1f65cb=_0x487c77['filter'](_0x2b5706=>_0x2b5706[_0x4f67c0(0x1a1)]===_0x4f67c0(0x198)),_0x43eb2f=_0x487c77['filter'](_0x1a236e=>_0x1a236e['level']==='warning');return{'ok':_0x1f65cb[_0x4f67c0(0x1dd)]===0x0,'dir':_0x2eca66,'type':_0x45856b[_0x4f67c0(0x193)],'errors':_0x1f65cb,'warnings':_0x43eb2f};}function resolveSkillDirectoryRoot(_0x1ceb22){const _0x247f4d=a80_0x3ada00,_0x4da6ed=resolve(_0x1ceb22);if(!existsSync(_0x4da6ed))throw CliErrors[_0x247f4d(0x190)]('Skill\x20directory\x20not\x20found:\x20'+_0x1ceb22);const _0x12479b=lstatSync(_0x4da6ed);if(_0x12479b[_0x247f4d(0x1a2)]())return _0x4da6ed;if(_0x12479b['isSymbolicLink']()){const _0x32f902=realpathSync(_0x4da6ed);if(lstatSync(_0x32f902)['isDirectory']())return _0x32f902;}throw CliErrors[_0x247f4d(0x190)](_0x247f4d(0x1b0)+_0x1ceb22);}export function throwIfSkillValidationFailed(_0x4c1fa3,_0x30c39b=![]){const _0x225378=a80_0x3ada00;if(_0x4c1fa3['ok'])return;const _0x898402=_0x4c1fa3['errors'][_0x225378(0x19c)](_0x274c1c=>{const _0x282556=_0x225378,_0x3af107=_0x274c1c[_0x282556(0x1d9)]?'#'+_0x274c1c[_0x282556(0x1d9)]:'';return _0x274c1c[_0x282556(0x1a1)][_0x282556(0x1a0)]()+'\x20'+_0x274c1c[_0x282556(0x1b6)]+'\x20'+_0x274c1c[_0x282556(0x19e)]+_0x3af107+':\x20'+_0x274c1c[_0x282556(0x1e4)]+_0x282556(0x1d3)+_0x274c1c[_0x282556(0x19d)];});throw CliErrors[_0x225378(0x190)](_0x225378(0x18a)+_0x898402[_0x225378(0x1a8)]('\x0a'),_0x225378(0x1be));}function loadRequiredSkillFile(_0x3bae2e,_0x4e99c0){const _0x94417c=a80_0x3ada00,_0x5334c4=resolve(_0x3bae2e,SKILL_FILE);if(!existsSync(_0x5334c4))return _0x4e99c0[_0x94417c(0x1bd)](issue(_0x94417c(0x198),_0x94417c(0x18f),SKILL_FILE,_0x94417c(0x18d),_0x94417c(0x1ae))),undefined;const _0x199016=lstatSync(_0x5334c4);if(_0x199016['isSymbolicLink']())return _0x4e99c0['push'](issue(_0x94417c(0x198),_0x94417c(0x18f),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x94417c(0x1ca))),undefined;if(!_0x199016[_0x94417c(0x1cf)]())return _0x4e99c0[_0x94417c(0x1bd)](issue('error',_0x94417c(0x18f),SKILL_FILE,_0x94417c(0x1ce),_0x94417c(0x18b))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5334c4,_0x94417c(0x196))};}function validateFrontmatter(_0x9996,_0x237cae,_0x18d399){const _0x3eaa14=a80_0x3ada00;if(!_0x237cae[_0x3eaa14(0x1e5)]){_0x18d399[_0x3eaa14(0x1bd)](issue(_0x3eaa14(0x198),'frontmatter-required',_0x9996,_0x3eaa14(0x18e),_0x3eaa14(0x1d5)));return;}!_0x237cae[_0x3eaa14(0x1a3)]?.[_0x3eaa14(0x1da)]()&&_0x18d399[_0x3eaa14(0x1bd)](issue(_0x3eaa14(0x198),_0x3eaa14(0x1c1),_0x9996,'Frontmatter\x20name\x20is\x20missing.',_0x3eaa14(0x1b2))),!_0x237cae['displayName']?.['trim']()&&_0x18d399[_0x3eaa14(0x1bd)](issue(_0x3eaa14(0x1c9),_0x3eaa14(0x1db),_0x9996,'Frontmatter\x20displayName\x20is\x20missing.',_0x3eaa14(0x1d8))),!_0x237cae[_0x3eaa14(0x1d4)]?.['trim']()&&_0x18d399[_0x3eaa14(0x1bd)](issue(_0x3eaa14(0x1c9),_0x3eaa14(0x1b8),_0x9996,'Frontmatter\x20example\x20is\x20missing.',_0x3eaa14(0x188))),!_0x237cae[_0x3eaa14(0x1b7)]?.[_0x3eaa14(0x1da)]()&&_0x18d399[_0x3eaa14(0x1bd)](issue(_0x3eaa14(0x198),_0x3eaa14(0x1b1),_0x9996,_0x3eaa14(0x1ba),_0x3eaa14(0x1e2))),_0x237cae[_0x3eaa14(0x1d7)]===!![]&&_0x18d399['push'](issue(_0x3eaa14(0x198),_0x3eaa14(0x1aa),_0x9996,_0x3eaa14(0x1cc),_0x3eaa14(0x191))),_0x237cae['type']?.[_0x3eaa14(0x1da)]()&&!SUPPORTED_SKILL_TYPES[_0x3eaa14(0x1c3)](_0x237cae[_0x3eaa14(0x193)])&&_0x18d399[_0x3eaa14(0x1bd)](issue('error',_0x3eaa14(0x1c1),_0x9996,_0x3eaa14(0x1a9),_0x3eaa14(0x1c8)));}function validateRuntimeCliReferences(_0x123dc8,_0x291b97){const _0x186705=a80_0x3ada00;for(const _0x1014e7 of findRabetbaseCliInvocations(_0x123dc8)){_0x291b97[_0x186705(0x1bd)](issue(_0x186705(0x1c9),'rabetbase-cli-reference',_0x1014e7[_0x186705(0x19e)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x186705(0x1bc),'L'+_0x1014e7[_0x186705(0x1b3)]));}}function findRabetbaseCliInvocations(_0x1d88ac){const _0x3a637e=a80_0x3ada00;return scanSkillDirectory(_0x1d88ac)['filter'](_0x5f056a=>TEXT_SKILL_FILE_PATTERN[_0x3a637e(0x1e3)](_0x5f056a[_0x3a637e(0x1a4)]))[_0x3a637e(0x1ad)](_0x18fcb4=>{const _0x17b058=_0x3a637e,_0x5c991a=fileText(_0x18fcb4);return _0x5c991a[_0x17b058(0x1b4)](/\r?\n/)[_0x17b058(0x19c)]((_0x578e48,_0x4a8ac6)=>({'file':_0x18fcb4[_0x17b058(0x1a4)],'line':_0x4a8ac6+0x1,'text':_0x578e48}))[_0x17b058(0x1c7)](({text:_0x2bc170})=>isRabetbaseCliInvocation(_0x2bc170))[_0x17b058(0x19c)](({file:_0x21bbe8,line:_0x5a6f1c})=>({'file':_0x21bbe8,'line':_0x5a6f1c}));});}const RABETBASE_SUBCOMMANDS=[a80_0x3ada00(0x1cd),a80_0x3ada00(0x1df),a80_0x3ada00(0x1cb),'page',a80_0x3ada00(0x1b5),'app',a80_0x3ada00(0x197),a80_0x3ada00(0x1e0),a80_0x3ada00(0x1dc),'kb','config','workspace',a80_0x3ada00(0x1a5),a80_0x3ada00(0x1bb),a80_0x3ada00(0x1d2),'registry'],RABETBASE_INVOCATION=new RegExp(String[a80_0x3ada00(0x189)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a80_0x3ada00(0x189)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x1b368f){const _0x394b80=a80_0x3ada00,_0x27b800=_0x1b368f['search'](/\brabetbase\b/i);if(_0x27b800<0x0)return![];const _0x3b756c=_0x1b368f[_0x394b80(0x1c4)](_0x27b800)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x394b80(0x1e3)](_0x3b756c);}function parseFrontmatter(_0x451876){const _0x39daf0=a80_0x3ada00,_0x1e3347=_0x451876[_0x39daf0(0x1d1)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1e3347)return{'hasFrontmatter':![]};const _0x4199c0=_0x1e3347[0x1]??'',_0x2591b0={'hasFrontmatter':!![]};let _0x5dee99;try{_0x5dee99=a80_0x193f90(_0x4199c0);}catch{return _0x2591b0;}const _0x803d0=asRecord(_0x5dee99);if(!_0x803d0)return _0x2591b0;_0x2591b0[_0x39daf0(0x1a3)]=scalarToString(_0x803d0[_0x39daf0(0x1a3)]),_0x2591b0['displayName']=scalarToString(_0x803d0[_0x39daf0(0x194)]),_0x2591b0['description']=scalarToString(_0x803d0[_0x39daf0(0x1b7)]),_0x2591b0[_0x39daf0(0x1d4)]=scalarToString(_0x803d0[_0x39daf0(0x1d4)]);const _0x22f080=asRecord(_0x803d0[_0x39daf0(0x192)]);return _0x22f080&&(_0x2591b0[_0x39daf0(0x193)]=scalarToString(_0x22f080[_0x39daf0(0x193)]),_0x2591b0[_0x39daf0(0x1d7)]=scalarToBoolean(_0x22f080['internal'])),_0x2591b0;}function asRecord(_0x58505a){const _0x69d8e=a80_0x3ada00;if(_0x58505a&&typeof _0x58505a===_0x69d8e(0x1a7)&&!Array[_0x69d8e(0x19b)](_0x58505a))return _0x58505a;return undefined;}function scalarToString(_0x2f267f){const _0x5c12d3=a80_0x3ada00;if(typeof _0x2f267f===_0x5c12d3(0x1c0))return _0x2f267f[_0x5c12d3(0x1da)]();if(typeof _0x2f267f===_0x5c12d3(0x199)||typeof _0x2f267f===_0x5c12d3(0x19a))return String(_0x2f267f);return undefined;}function scalarToBoolean(_0x1ceea7){const _0x5c1416=a80_0x3ada00;if(typeof _0x1ceea7===_0x5c1416(0x19a))return _0x1ceea7;if(typeof _0x1ceea7===_0x5c1416(0x1c0))return cleanBoolean(_0x1ceea7);return undefined;}function cleanBoolean(_0x27781b){const _0x454db5=a80_0x3ada00,_0x421c8f=_0x27781b[_0x454db5(0x1da)]()['toLowerCase']();if(_0x421c8f===_0x454db5(0x1ac))return!![];if(_0x421c8f===_0x454db5(0x1bf))return![];return undefined;}function issue(_0x46bb33,_0x1a2a42,_0x43d3a4,_0x34e60f,_0x1b2165,_0x344a37){return{'level':_0x46bb33,'ruleId':_0x1a2a42,'file':_0x43d3a4,'section':_0x344a37,'message':_0x34e60f,'suggestion':_0x1b2165};}
|
|
1
|
+
const a80_0x412443=a80_0x2683;(function(_0x3f63d1,_0x5055aa){const _0x2b6e33=a80_0x2683,_0x5e0b58=_0x3f63d1();while(!![]){try{const _0x3b2b39=parseInt(_0x2b6e33(0x1f6))/0x1*(-parseInt(_0x2b6e33(0x1cc))/0x2)+parseInt(_0x2b6e33(0x1d2))/0x3*(-parseInt(_0x2b6e33(0x1c8))/0x4)+-parseInt(_0x2b6e33(0x1db))/0x5*(parseInt(_0x2b6e33(0x1d7))/0x6)+parseInt(_0x2b6e33(0x219))/0x7+-parseInt(_0x2b6e33(0x1f7))/0x8*(-parseInt(_0x2b6e33(0x1de))/0x9)+parseInt(_0x2b6e33(0x1ec))/0xa*(parseInt(_0x2b6e33(0x1e1))/0xb)+-parseInt(_0x2b6e33(0x204))/0xc*(parseInt(_0x2b6e33(0x1f4))/0xd);if(_0x3b2b39===_0x5055aa)break;else _0x5e0b58['push'](_0x5e0b58['shift']());}catch(_0x3e5fa8){_0x5e0b58['push'](_0x5e0b58['shift']());}}}(a80_0x3aef,0x6ed9f));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';function a80_0x2683(_0x163a77,_0xc8e7cb){_0x163a77=_0x163a77-0x1c3;const _0x3aef88=a80_0x3aef();let _0x2683c0=_0x3aef88[_0x163a77];return _0x2683c0;}import{parse as a80_0x439127}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a80_0x412443(0x1c5),a80_0x412443(0x1d3)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x3aae37,_0x1ea7f2={}){const _0x4e6ab7=a80_0x412443,_0x28e6df=resolveSkillDirectoryRoot(_0x3aae37),_0x4126bb=[],_0x372743=loadRequiredSkillFile(_0x28e6df,_0x4126bb),_0x16e834=_0x372743?parseFrontmatter(_0x372743[_0x4e6ab7(0x1c7)]):{'hasFrontmatter':![]};_0x372743&&validateFrontmatter(_0x372743[_0x4e6ab7(0x1d9)],_0x16e834,_0x4126bb);validateRuntimeCliReferences(_0x28e6df,_0x4126bb);const _0x275353=_0x4126bb[_0x4e6ab7(0x1c9)](_0x1b7110=>_0x1b7110[_0x4e6ab7(0x201)]===_0x4e6ab7(0x220)),_0xd1a73c=_0x4126bb[_0x4e6ab7(0x1c9)](_0x4963b6=>_0x4963b6[_0x4e6ab7(0x201)]===_0x4e6ab7(0x1d0));return{'ok':_0x275353[_0x4e6ab7(0x20a)]===0x0,'dir':_0x28e6df,'type':_0x16e834[_0x4e6ab7(0x1ee)],'errors':_0x275353,'warnings':_0xd1a73c};}function resolveSkillDirectoryRoot(_0x410d1e){const _0x36ca91=a80_0x412443,_0x156dce=resolve(_0x410d1e);if(!existsSync(_0x156dce))throw CliErrors[_0x36ca91(0x1ef)](_0x36ca91(0x20c)+_0x410d1e);const _0x2f90d2=lstatSync(_0x156dce);if(_0x2f90d2[_0x36ca91(0x202)]())return _0x156dce;if(_0x2f90d2[_0x36ca91(0x216)]()){const _0x1aef8e=realpathSync(_0x156dce);if(lstatSync(_0x1aef8e)['isDirectory']())return _0x1aef8e;}throw CliErrors['validation'](_0x36ca91(0x20c)+_0x410d1e);}export function throwIfSkillValidationFailed(_0x5be768,_0x644802=![]){const _0x4a2515=a80_0x412443;if(_0x5be768['ok'])return;const _0x31cd63=_0x5be768[_0x4a2515(0x217)]['map'](_0x368e27=>{const _0x1afd92=_0x4a2515,_0x2610a0=_0x368e27[_0x1afd92(0x1fb)]?'#'+_0x368e27[_0x1afd92(0x1fb)]:'';return _0x368e27[_0x1afd92(0x201)][_0x1afd92(0x21c)]()+'\x20'+_0x368e27[_0x1afd92(0x1f9)]+'\x20'+_0x368e27[_0x1afd92(0x20d)]+_0x2610a0+':\x20'+_0x368e27['message']+'\x20Fix:\x20'+_0x368e27[_0x1afd92(0x1f5)];});throw CliErrors['validation'](_0x4a2515(0x1f1)+_0x31cd63[_0x4a2515(0x218)]('\x0a'),_0x4a2515(0x1fe));}function loadRequiredSkillFile(_0x50db72,_0x1fd931){const _0x343987=a80_0x412443,_0x4dbdbe=resolve(_0x50db72,SKILL_FILE);if(!existsSync(_0x4dbdbe))return _0x1fd931['push'](issue(_0x343987(0x220),_0x343987(0x1df),SKILL_FILE,_0x343987(0x215),_0x343987(0x1f0))),undefined;const _0x509cb1=lstatSync(_0x4dbdbe);if(_0x509cb1[_0x343987(0x216)]())return _0x1fd931[_0x343987(0x1c4)](issue(_0x343987(0x220),_0x343987(0x1df),SKILL_FILE,_0x343987(0x20e),_0x343987(0x205))),undefined;if(!_0x509cb1[_0x343987(0x1e6)]())return _0x1fd931[_0x343987(0x1c4)](issue('error',_0x343987(0x1df),SKILL_FILE,_0x343987(0x1d5),_0x343987(0x1fa))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x4dbdbe,_0x343987(0x1c6))};}function validateFrontmatter(_0x37a348,_0x2739c7,_0x2e4513){const _0x420bb6=a80_0x412443;if(!_0x2739c7[_0x420bb6(0x1ce)]){_0x2e4513['push'](issue(_0x420bb6(0x220),_0x420bb6(0x1e5),_0x37a348,_0x420bb6(0x1e7),_0x420bb6(0x1ea)));return;}!_0x2739c7['name']?.['trim']()&&_0x2e4513[_0x420bb6(0x1c4)](issue(_0x420bb6(0x220),_0x420bb6(0x1e5),_0x37a348,_0x420bb6(0x208),_0x420bb6(0x223))),!_0x2739c7[_0x420bb6(0x1d1)]?.[_0x420bb6(0x1e8)]()&&_0x2e4513[_0x420bb6(0x1c4)](issue(_0x420bb6(0x1d0),_0x420bb6(0x1eb),_0x37a348,_0x420bb6(0x1da),_0x420bb6(0x207))),!_0x2739c7['example']?.[_0x420bb6(0x1e8)]()&&_0x2e4513[_0x420bb6(0x1c4)](issue(_0x420bb6(0x1d0),_0x420bb6(0x214),_0x37a348,'Frontmatter\x20example\x20is\x20missing.',_0x420bb6(0x1e2))),!_0x2739c7[_0x420bb6(0x21f)]?.[_0x420bb6(0x1e8)]()&&_0x2e4513[_0x420bb6(0x1c4)](issue(_0x420bb6(0x220),'description-required',_0x37a348,_0x420bb6(0x21d),'Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.')),_0x2739c7[_0x420bb6(0x1d4)]===!![]&&_0x2e4513['push'](issue(_0x420bb6(0x220),'internal-skill',_0x37a348,_0x420bb6(0x1c3),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x2739c7[_0x420bb6(0x1ee)]?.['trim']()&&!SUPPORTED_SKILL_TYPES[_0x420bb6(0x1ff)](_0x2739c7[_0x420bb6(0x1ee)])&&_0x2e4513[_0x420bb6(0x1c4)](issue(_0x420bb6(0x220),_0x420bb6(0x1e5),_0x37a348,'metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.',_0x420bb6(0x1cf)));}function validateRuntimeCliReferences(_0xeff83e,_0x357b01){const _0x1814f0=a80_0x412443;for(const _0x3f3a88 of findRabetbaseCliInvocations(_0xeff83e)){_0x357b01[_0x1814f0(0x1c4)](issue('warning',_0x1814f0(0x1e0),_0x3f3a88[_0x1814f0(0x20d)],_0x1814f0(0x222),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x3f3a88[_0x1814f0(0x21e)]));}}function findRabetbaseCliInvocations(_0x3bd222){const _0x37346a=a80_0x412443;return scanSkillDirectory(_0x3bd222)['filter'](_0x3070d0=>TEXT_SKILL_FILE_PATTERN[_0x37346a(0x1e3)](_0x3070d0[_0x37346a(0x1d9)]))[_0x37346a(0x1e4)](_0x385434=>{const _0x25642d=_0x37346a,_0x4008f6=fileText(_0x385434);return _0x4008f6[_0x25642d(0x1fc)](/\r?\n/)[_0x25642d(0x1d8)]((_0x43dc34,_0x5735f5)=>({'file':_0x385434[_0x25642d(0x1d9)],'line':_0x5735f5+0x1,'text':_0x43dc34}))[_0x25642d(0x1c9)](({text:_0x52e057})=>isRabetbaseCliInvocation(_0x52e057))['map'](({file:_0x50cb53,line:_0x39fb18})=>({'file':_0x50cb53,'line':_0x39fb18}));});}const RABETBASE_SUBCOMMANDS=[a80_0x412443(0x21a),a80_0x412443(0x1dd),a80_0x412443(0x20b),a80_0x412443(0x1cb),'project','app',a80_0x412443(0x1e9),a80_0x412443(0x21b),a80_0x412443(0x1ed),'kb','config',a80_0x412443(0x206),a80_0x412443(0x209),a80_0x412443(0x1ca),a80_0x412443(0x1d6),'registry'],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a80_0x412443(0x218)]('|')})\b`+String[a80_0x412443(0x221)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function a80_0x3aef(){const _0x556c66=['length','bff','Skill\x20directory\x20not\x20found:\x20','file','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','match','slice','metadata','boolean','false','example-recommended','Missing\x20SKILL.md.','isSymbolicLink','errors','join','6260737QAKxnA','dataset','service','toUpperCase','Frontmatter\x20description\x20is\x20empty.','line','description','error','raw','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','push','write','utf8','content','1433724qHBUTR','filter','auth','page','265570geIRPB','example','hasFrontmatter','Set\x20metadata.type\x20to\x20write\x20or\x20read.','warning','displayName','3YiqMYE','read','internal','SKILL.md\x20is\x20not\x20a\x20file.','logs','362658OUQMqu','map','path','Frontmatter\x20displayName\x20is\x20missing.','5dbJrTe','name','sql','4998780niyIsa','structure-complete','rabetbase-cli-reference','8718941VWkXRc','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','test','flatMap','frontmatter-required','isFile','SKILL.md\x20must\x20start\x20with\x20frontmatter.','trim','schema','Add\x20frontmatter\x20with\x20name\x20and\x20description.','display-name-recommended','10HfUrPR','artifact','type','validation','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Skill\x20validation\x20failed:\x0a','search','isArray','39MMpYCB','suggestion','6kmtNfp','8thAOZo','string','ruleId','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','section','split','true','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','has','number','level','isDirectory','toLowerCase','2291244auDkfZ','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','workspace','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','Frontmatter\x20name\x20is\x20missing.','data'];a80_0x3aef=function(){return _0x556c66;};return a80_0x3aef();}function isRabetbaseCliInvocation(_0x16cba7){const _0x1f0798=a80_0x412443,_0x4ee841=_0x16cba7[_0x1f0798(0x1f2)](/\brabetbase\b/i);if(_0x4ee841<0x0)return![];const _0x4c98aa=_0x16cba7[_0x1f0798(0x210)](_0x4ee841)[_0x1f0798(0x1fc)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x1f0798(0x1e3)](_0x4c98aa);}function parseFrontmatter(_0x110b2a){const _0x4b8002=a80_0x412443,_0x199ab7=_0x110b2a[_0x4b8002(0x20f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x199ab7)return{'hasFrontmatter':![]};const _0x222471=_0x199ab7[0x1]??'',_0x541055={'hasFrontmatter':!![]};let _0x5f254f;try{_0x5f254f=a80_0x439127(_0x222471);}catch{return _0x541055;}const _0x8c4fb8=asRecord(_0x5f254f);if(!_0x8c4fb8)return _0x541055;_0x541055[_0x4b8002(0x1dc)]=scalarToString(_0x8c4fb8['name']),_0x541055['displayName']=scalarToString(_0x8c4fb8['displayName']),_0x541055[_0x4b8002(0x21f)]=scalarToString(_0x8c4fb8[_0x4b8002(0x21f)]),_0x541055[_0x4b8002(0x1cd)]=scalarToString(_0x8c4fb8[_0x4b8002(0x1cd)]);const _0x59c7bd=asRecord(_0x8c4fb8[_0x4b8002(0x211)]);return _0x59c7bd&&(_0x541055[_0x4b8002(0x1ee)]=scalarToString(_0x59c7bd[_0x4b8002(0x1ee)]),_0x541055[_0x4b8002(0x1d4)]=scalarToBoolean(_0x59c7bd['internal'])),_0x541055;}function asRecord(_0x311d43){const _0x199cfe=a80_0x412443;if(_0x311d43&&typeof _0x311d43==='object'&&!Array[_0x199cfe(0x1f3)](_0x311d43))return _0x311d43;return undefined;}function scalarToString(_0x55e86f){const _0x1ddfc7=a80_0x412443;if(typeof _0x55e86f===_0x1ddfc7(0x1f8))return _0x55e86f[_0x1ddfc7(0x1e8)]();if(typeof _0x55e86f===_0x1ddfc7(0x200)||typeof _0x55e86f===_0x1ddfc7(0x212))return String(_0x55e86f);return undefined;}function scalarToBoolean(_0x5bf213){const _0x3e19a8=a80_0x412443;if(typeof _0x5bf213===_0x3e19a8(0x212))return _0x5bf213;if(typeof _0x5bf213==='string')return cleanBoolean(_0x5bf213);return undefined;}function cleanBoolean(_0x13ed7c){const _0x5de343=a80_0x412443,_0x46d165=_0x13ed7c[_0x5de343(0x1e8)]()[_0x5de343(0x203)]();if(_0x46d165===_0x5de343(0x1fd))return!![];if(_0x46d165===_0x5de343(0x213))return![];return undefined;}function issue(_0x2ed98f,_0x35d7fd,_0x459274,_0xffec34,_0x2e2141,_0x1a5713){return{'level':_0x2ed98f,'ruleId':_0x35d7fd,'file':_0x459274,'section':_0x1a5713,'message':_0xffec34,'suggestion':_0x2e2141};}
|