@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-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/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.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -0
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -0
- package/lib/commands/notification/shared.d.ts +13 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.d.ts +2 -0
- package/lib/commands/permit/dataset-get.js +1 -0
- package/lib/commands/permit/dataset-set.d.ts +2 -0
- package/lib/commands/permit/dataset-set.js +1 -0
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.d.ts +52 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.d.ts +33 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -0
- 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/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +161 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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/apply-jq-filter.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 +19 -6
- package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-auth.md +1 -5
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
- package/skills/lovrabet.manifest.json +5 -3
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a149_0x22db59=a149_0x2a94;(function(_0x3386bd,_0x32187b){const _0x388755=a149_0x2a94,_0xf403a=_0x3386bd();while(!![]){try{const _0x24e227=-parseInt(_0x388755(0xac))/0x1+-parseInt(_0x388755(0xc4))/0x2+parseInt(_0x388755(0xad))/0x3+-parseInt(_0x388755(0xbc))/0x4+parseInt(_0x388755(0xaa))/0x5*(parseInt(_0x388755(0xa5))/0x6)+parseInt(_0x388755(0xbb))/0x7*(parseInt(_0x388755(0xa4))/0x8)+parseInt(_0x388755(0xbf))/0x9*(parseInt(_0x388755(0xba))/0xa);if(_0x24e227===_0x32187b)break;else _0xf403a['push'](_0xf403a['shift']());}catch(_0x179a5f){_0xf403a['push'](_0xf403a['shift']());}}}(a149_0x2bf8,0xcb5f9));import a149_0x2a1b49 from'winston';function a149_0x2a94(_0xffae88,_0x5759b9){_0xffae88=_0xffae88-0x9e;const _0x2bf82f=a149_0x2bf8();let _0x2a941f=_0x2bf82f[_0xffae88];return _0x2a941f;}import a149_0x2a2ec2 from'node:fs';import a149_0x16678e from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a149_0x2bf8(){const _0x41bc50=['3542598TSEqPq','initWinstonLogger','transports','rawCommand','log','unknown','setRawCommand','readFileSync','info','getWinstonInstance','trim','Starting:\x20','join','19280840eMmhsD','4403QCqohy','6044140AdShUW','parse','stringify','9LVWSnI','green','currentRawCommand','printf','errors','1637674kCMnrl','logTask','existsSync','timestamp','warn','red','details','logFilePath','writeFileSync','clear','message','level','Completed:\x20','setLogPath','winstonLogger','logFileName','command','filter','now','error','readLogs','utf8','toISOString','Failed:\x20','10232avZOUI','801744LRFnuv','format','yellow','success','mkdirSync','30nHBryO','duration','1552296OnNPSa'];a149_0x2bf8=function(){return _0x41bc50;};return a149_0x2bf8();}class Logger{['winstonLogger'];[a149_0x22db59(0xcb)]='';[a149_0x22db59(0xc1)]='';constructor(){}[a149_0x22db59(0xb3)](_0x3f05d0){const _0x54808f=a149_0x22db59;this[_0x54808f(0xc1)]=_0x3f05d0;}[a149_0x22db59(0xd1)](_0x3087b2){const _0x506c91=a149_0x22db59;this[_0x506c91(0xcb)]=a149_0x16678e[_0x506c91(0xb9)](_0x3087b2,PRODUCT_CONFIG[_0x506c91(0xd3)]),this[_0x506c91(0xd2)]&&this['winstonLogger'][_0x506c91(0xcd)](),this[_0x506c91(0xae)]();}['initWinstonLogger'](){const _0x2581c9=a149_0x22db59,_0x467133=a149_0x16678e['dirname'](this[_0x2581c9(0xcb)]);!a149_0x2a2ec2[_0x2581c9(0xc6)](_0x467133)&&a149_0x2a2ec2[_0x2581c9(0xa9)](_0x467133,{'recursive':!![]});const _0x15aafd=a149_0x2a1b49[_0x2581c9(0xa6)]['combine'](a149_0x2a1b49[_0x2581c9(0xa6)]['timestamp'](),a149_0x2a1b49[_0x2581c9(0xa6)][_0x2581c9(0xc3)]({'stack':!![]}),a149_0x2a1b49[_0x2581c9(0xa6)][_0x2581c9(0xc2)](_0x14d66f=>{const _0x3b4db7=_0x2581c9,_0xc05e61={'timestamp':_0x14d66f[_0x3b4db7(0xc7)]||new Date()[_0x3b4db7(0xa2)](),'level':_0x14d66f[_0x3b4db7(0xcf)]||'info','command':_0x14d66f[_0x3b4db7(0xd4)]||_0x3b4db7(0xb2),'rawCommand':_0x14d66f[_0x3b4db7(0xb0)]||this[_0x3b4db7(0xc1)]||undefined,'message':_0x14d66f[_0x3b4db7(0xce)]||'','duration':_0x14d66f[_0x3b4db7(0xab)]||undefined,'details':_0x14d66f[_0x3b4db7(0xca)]||undefined};return JSON[_0x3b4db7(0xbe)](_0xc05e61);}));this[_0x2581c9(0xd2)]=a149_0x2a1b49['createLogger']({'level':_0x2581c9(0xb5),'format':_0x15aafd,'transports':[new a149_0x2a1b49[(_0x2581c9(0xaf))]['File']({'filename':this[_0x2581c9(0xcb)],'level':_0x2581c9(0xb5)})],'silent':![]}),a149_0x2a1b49['addColors']({'success':_0x2581c9(0xc0),'error':_0x2581c9(0xc9),'warn':_0x2581c9(0xa7),'info':'blue'});}[a149_0x22db59(0xb5)](_0x4f4a02,_0x44ec3d,_0x409a38){const _0xaedcca=a149_0x22db59;if(!this[_0xaedcca(0xcb)]||!this['winstonLogger'])return;this[_0xaedcca(0xd2)][_0xaedcca(0xb5)](_0x44ec3d,{'command':_0x4f4a02,'details':_0x409a38});}['success'](_0x506004,_0x233876,_0x3392f6,_0x5777d9){const _0x3dad7e=a149_0x22db59;if(!this[_0x3dad7e(0xcb)]||!this['winstonLogger'])return;this['winstonLogger'][_0x3dad7e(0xb1)](_0x3dad7e(0xb5),_0x233876,{'level':_0x3dad7e(0xa8),'command':_0x506004,'duration':_0x3392f6,'details':_0x5777d9});}['error'](_0x50adb4,_0x2b935e,_0x236ed5){const _0x1215ca=a149_0x22db59;if(!this[_0x1215ca(0xcb)]||!this[_0x1215ca(0xd2)])return;this[_0x1215ca(0xd2)][_0x1215ca(0x9f)](_0x2b935e,{'command':_0x50adb4,'details':_0x236ed5});}[a149_0x22db59(0xc8)](_0x4a3ff7,_0xd695fb,_0x5377bf){const _0x1dad41=a149_0x22db59;if(!this[_0x1dad41(0xcb)]||!this[_0x1dad41(0xd2)])return;this['winstonLogger'][_0x1dad41(0xc8)](_0xd695fb,{'command':_0x4a3ff7,'details':_0x5377bf});}async[a149_0x22db59(0xc5)](_0x29e354,_0x98c989,_0x5516a5){const _0x3f3e8c=a149_0x22db59,_0xb99dec=Date['now']();this[_0x3f3e8c(0xb5)](_0x29e354,_0x3f3e8c(0xb8)+_0x98c989);try{const _0x5b6b6d=await _0x5516a5(),_0x57dd95=Date[_0x3f3e8c(0x9e)]()-_0xb99dec;return this['success'](_0x29e354,_0x3f3e8c(0xd0)+_0x98c989,_0x57dd95),_0x5b6b6d;}catch(_0x2eb2f2){const _0x2b3f05=Date[_0x3f3e8c(0x9e)]()-_0xb99dec;this[_0x3f3e8c(0x9f)](_0x29e354,_0x3f3e8c(0xa3)+_0x98c989,{'error':_0x2eb2f2 instanceof Error?_0x2eb2f2['message']:String(_0x2eb2f2),'duration':_0x2b3f05});throw _0x2eb2f2;}}[a149_0x22db59(0xa0)](){const _0x13666d=a149_0x22db59;try{if(!a149_0x2a2ec2['existsSync'](this['logFilePath']))return[];const _0x22de7b=a149_0x2a2ec2[_0x13666d(0xb4)](this['logFilePath'],_0x13666d(0xa1));return _0x22de7b['split'](/\r?\n/)[_0x13666d(0xd5)](_0x5a8ceb=>_0x5a8ceb[_0x13666d(0xb7)]())['map'](_0x11121e=>JSON[_0x13666d(0xbd)](_0x11121e));}catch(_0x456707){return console[_0x13666d(0xc8)]('Failed\x20to\x20read\x20logs:',_0x456707),[];}}['clearLogs'](){const _0x1c687c=a149_0x22db59;try{a149_0x2a2ec2['existsSync'](this[_0x1c687c(0xcb)])&&a149_0x2a2ec2[_0x1c687c(0xcc)](this[_0x1c687c(0xcb)],'',_0x1c687c(0xa1));}catch(_0x9749bb){console[_0x1c687c(0xc8)]('Failed\x20to\x20clear\x20logs:',_0x9749bb);}}[a149_0x22db59(0xb6)](){const _0x36fe7f=a149_0x22db59;return this[_0x36fe7f(0xd2)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x24f27a=a150_0x1f14;(function(_0x57835b,_0x5c5fdc){const _0x3559c5=a150_0x1f14,_0x434217=_0x57835b();while(!![]){try{const _0x137386=-parseInt(_0x3559c5(0x84))/0x1+parseInt(_0x3559c5(0x77))/0x2*(parseInt(_0x3559c5(0x7f))/0x3)+-parseInt(_0x3559c5(0x83))/0x4*(-parseInt(_0x3559c5(0x70))/0x5)+parseInt(_0x3559c5(0x73))/0x6*(-parseInt(_0x3559c5(0x7c))/0x7)+parseInt(_0x3559c5(0x7d))/0x8+-parseInt(_0x3559c5(0x7b))/0x9+-parseInt(_0x3559c5(0x82))/0xa*(-parseInt(_0x3559c5(0x80))/0xb);if(_0x137386===_0x5c5fdc)break;else _0x434217['push'](_0x434217['shift']());}catch(_0x519316){_0x434217['push'](_0x434217['shift']());}}}(a150_0x34a2,0x21ddc));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a150_0x24f27a(0x7e)]);function a150_0x34a2(){const _0x47fbef=['prototype','json','undefined','2eirEfa','length','text','parse','297576JVgewn','154952VjVTVY','695432cnDRsr','MIN_SAFE_INTEGER','15501kMIyBD','2714558Ssfbpi','defineProperty','10nrYrmG','73552mUlyKA','199418yhMgKl','75gSXrAq','exec','includes','66AqLWdf'];a150_0x34a2=function(){return _0x47fbef;};return a150_0x34a2();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a150_0x1f14(_0x5cc568,_0x5e9468){_0x5cc568=_0x5cc568-0x70;const _0x34a253=a150_0x34a2();let _0x1f142d=_0x34a253[_0x5cc568];return _0x1f142d;}function isUnsafeIntegerLiteral(_0x2182e7){const _0x12a849=a150_0x24f27a;if(_0x2182e7[_0x12a849(0x72)]('.')||_0x2182e7['includes']('e')||_0x2182e7[_0x12a849(0x72)]('E'))return![];const _0x553e17=BigInt(_0x2182e7);return _0x553e17>MAX_SAFE_INTEGER||_0x553e17<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x412370){const _0x15b6dc=a150_0x24f27a;let _0xcf693a='',_0x256c27=![],_0x5415b7=![];for(let _0x4dad82=0x0;_0x4dad82<_0x412370[_0x15b6dc(0x78)];){const _0x34d7e1=_0x412370[_0x4dad82];if(_0x256c27){_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;if(_0x5415b7)_0x5415b7=![];else{if(_0x34d7e1==='\x5c')_0x5415b7=!![];else _0x34d7e1==='\x22'&&(_0x256c27=![]);}continue;}if(_0x34d7e1==='\x22'){_0x256c27=!![],_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;continue;}if(_0x34d7e1==='-'||_0x34d7e1>='0'&&_0x34d7e1<='9'){const _0x49c541=JSON_NUMBER_PATTERN[_0x15b6dc(0x71)](_0x412370['slice'](_0x4dad82))?.[0x0];if(_0x49c541){_0xcf693a+=isUnsafeIntegerLiteral(_0x49c541)?'\x22'+_0x49c541+'\x22':_0x49c541,_0x4dad82+=_0x49c541[_0x15b6dc(0x78)];continue;}}_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;}return _0xcf693a;}export function parseLosslessJson(_0x5b5d54){const _0x3a1ac8=a150_0x24f27a;return JSON[_0x3a1ac8(0x7a)](quoteUnsafeIntegerLiterals(_0x5b5d54));}export function installLosslessJsonResponseParser(){const _0x3d40bd=a150_0x24f27a;if(typeof Response===_0x3d40bd(0x76))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x3d40bd(0x74)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x3d40bd(0x75)),Object[_0x3d40bd(0x81)](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x24de6a(){const _0x27f86d=_0x3d40bd;return parseLosslessJson(await this[_0x27f86d(0x79)]());}}),restoreResponseJsonParser=()=>{const _0xc10625=_0x3d40bd;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0xc10625(0x81)](responseJsonPrototype,_0xc10625(0x75),originalResponseJsonDescriptor):delete responseJsonPrototype[_0xc10625(0x75)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x3cfea1,_0x2d86e0){const _0x5c35a4=a151_0x46f4,_0x592932=_0x3cfea1();while(!![]){try{const _0xcbd620=parseInt(_0x5c35a4(0xce))/0x1*(parseInt(_0x5c35a4(0xd3))/0x2)+-parseInt(_0x5c35a4(0xd7))/0x3*(-parseInt(_0x5c35a4(0xc6))/0x4)+parseInt(_0x5c35a4(0xc2))/0x5+parseInt(_0x5c35a4(0xd0))/0x6+parseInt(_0x5c35a4(0xc5))/0x7*(-parseInt(_0x5c35a4(0xc4))/0x8)+parseInt(_0x5c35a4(0xd2))/0x9*(-parseInt(_0x5c35a4(0xd1))/0xa)+-parseInt(_0x5c35a4(0xcb))/0xb;if(_0xcbd620===_0x2d86e0)break;else _0x592932['push'](_0x592932['shift']());}catch(_0x5a713e){_0x592932['push'](_0x592932['shift']());}}}(a151_0x2f33,0xad591));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a151_0x2f33(){const _0x3fff15=['data\x20update\x20--params.','8210328YSYnyO','563430lfBJHm','45GiFLZx','61478eRryQE','Invalid\x20JSON\x20for\x20--params:\x20','isArray','number','308001XhGGwV','test','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','items','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','data\x20update\x20can\x20update\x20at\x20most\x20','447555eWgLwi','validation','9664KfbtCk','5327XGvaED','44QqsZfK','object','length','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','9805103ahVyRA','id[','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','7IHLCkI'];a151_0x2f33=function(){return _0x3fff15;};return a151_0x2f33();}export const MAX_DATA_UPDATE_IDS=0x3e8;function a151_0x46f4(_0x5d33b1,_0x21e827){_0x5d33b1=_0x5d33b1-0xc2;const _0x2f3396=a151_0x2f33();let _0x46f46b=_0x2f3396[_0x5d33b1];return _0x46f46b;}export function parseJsonParams(_0x351292){const _0x191711=a151_0x46f4;if(!_0x351292)return undefined;try{return parseLosslessJson(_0x351292);}catch{throw CliErrors[_0x191711(0xc3)](_0x191711(0xd4)+_0x351292);}}export function parseJsonParamsValue(_0x42838f){const _0xface29=a151_0x46f4;if(!_0x42838f)return undefined;try{return parseLosslessJson(_0x42838f);}catch{throw CliErrors[_0xface29(0xc3)](_0xface29(0xd4)+_0x42838f);}}export function parseBatchCreateItemsFromParams(_0x16523e){const _0x3ce304=a151_0x46f4;if(Array[_0x3ce304(0xd5)](_0x16523e))return _0x16523e;if(_0x16523e!==null&&_0x16523e!==undefined&&typeof _0x16523e===_0x3ce304(0xc7)&&Array['isArray'](_0x16523e[_0x3ce304(0xda)]))return _0x16523e['items'];throw CliErrors[_0x3ce304(0xc3)](_0x3ce304(0xdc),_0x3ce304(0xcd));}function parseDataUpdateId(_0x259c9f,_0x30224a){const _0x3fbfcd=a151_0x46f4;if(typeof _0x259c9f===_0x3fbfcd(0xd6)&&Number['isSafeInteger'](_0x259c9f)&&_0x259c9f>0x0)return _0x259c9f;if(typeof _0x259c9f==='string'){if(/^[1-9]\d*$/[_0x3fbfcd(0xd8)](_0x259c9f))return _0x259c9f;}throw CliErrors[_0x3fbfcd(0xc3)](_0x3fbfcd(0xcf)+_0x30224a+_0x3fbfcd(0xca));}export function parseUpdateIdsFromParams(_0x4dcd5a){const _0x2aafcd=a151_0x46f4;if(_0x4dcd5a===null||_0x4dcd5a===undefined||typeof _0x4dcd5a!=='object'||Array['isArray'](_0x4dcd5a))throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xdb),_0x2aafcd(0xc9));const _0x2319a5=_0x4dcd5a['id'];if(_0x2319a5===undefined||_0x2319a5===null)throw CliErrors[_0x2aafcd(0xc3)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x4a7946=Array[_0x2aafcd(0xd5)](_0x2319a5)?_0x2319a5:[_0x2319a5];if(_0x4a7946[_0x2aafcd(0xc8)]===0x0)throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xd9));if(_0x4a7946[_0x2aafcd(0xc8)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xdd)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x4a7946[_0x2aafcd(0xc8)]+'.');return _0x4a7946['map']((_0x592633,_0x56ba04)=>parseDataUpdateId(_0x592633,Array[_0x2aafcd(0xd5)](_0x2319a5)?_0x2aafcd(0xcc)+_0x56ba04+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x395b95,_0x5abc98){const _0x55b090=a151_0x46f4;if(Array[_0x55b090(0xd5)](_0x395b95['id'])&&_0x5abc98[_0x55b090(0xc8)]>0x1)return{..._0x395b95,'id':_0x5abc98['join'](',')};return _0x395b95;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x36257b=a152_0x1ace;(function(_0x5db5e6,_0x21b445){const _0x4b0ceb=a152_0x1ace,_0x4b11ba=_0x5db5e6();while(!![]){try{const _0x2bbf3c=parseInt(_0x4b0ceb(0x6d))/0x1*(parseInt(_0x4b0ceb(0x75))/0x2)+parseInt(_0x4b0ceb(0x77))/0x3*(-parseInt(_0x4b0ceb(0x74))/0x4)+-parseInt(_0x4b0ceb(0x76))/0x5+parseInt(_0x4b0ceb(0x72))/0x6*(-parseInt(_0x4b0ceb(0x6f))/0x7)+-parseInt(_0x4b0ceb(0x6e))/0x8+-parseInt(_0x4b0ceb(0x71))/0x9+parseInt(_0x4b0ceb(0x70))/0xa;if(_0x2bbf3c===_0x21b445)break;else _0x4b11ba['push'](_0x4b11ba['shift']());}catch(_0x5c4938){_0x4b11ba['push'](_0x4b11ba['shift']());}}}(a152_0x3792,0x86b5a));function a152_0x1ace(_0x4ada19,_0x21b527){_0x4ada19=_0x4ada19-0x6d;const _0x3792cd=a152_0x3792();let _0x1aced7=_0x3792cd[_0x4ada19];return _0x1aced7;}function a152_0x3792(){const _0x321970=['31863770VLrvlh','1999665mXtAYI','18gEIfKU','.cmd','550456mTGsbl','1138exTkgj','3642140yASHuo','12YmCDBm','win32','157KWRgzA','6758080Mubdlk','882259Rlgmwg'];a152_0x3792=function(){return _0x321970;};return a152_0x3792();}export const isWindows=process['platform']===a152_0x36257b(0x78);export function resolveNpmBin(_0x3c763a){const _0x3e8426=a152_0x36257b;return isWindows?_0x3c763a+_0x3e8426(0x73):_0x3c763a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x218295,_0x50af71){const _0x44391f=a153_0x1a18,_0x7810d0=_0x218295();while(!![]){try{const _0x1092d1=parseInt(_0x44391f(0xfd))/0x1*(parseInt(_0x44391f(0xf6))/0x2)+-parseInt(_0x44391f(0x112))/0x3+parseInt(_0x44391f(0x101))/0x4+-parseInt(_0x44391f(0xf8))/0x5+parseInt(_0x44391f(0xfa))/0x6+-parseInt(_0x44391f(0x116))/0x7+parseInt(_0x44391f(0x107))/0x8;if(_0x1092d1===_0x50af71)break;else _0x7810d0['push'](_0x7810d0['shift']());}catch(_0x21fd23){_0x7810d0['push'](_0x7810d0['shift']());}}}(a153_0xdbdd,0x6a87a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a153_0xdbdd(){const _0x3b51c7=['\x20update','3575844NobQPJ','checkedAt','Invalid\x20semver','103xuOWmn','true','major','yes','1820724VUvJpu','minor','latest',',\x20run:\x20','number','prerelease','6413312eqeXPL','json','trim','object','lastNotifiedAt','/v/','\x20available,\x20current\x20','fromEntries','now','timeout','patch','1034979HCUiDo','filter','/dist-tags','update-check.json','5477150oozCeW','/-/package/','map','string','6866qSXFUl','.cache','3213145VuOgXm'];a153_0xdbdd=function(){return _0x3b51c7;};return a153_0xdbdd();}import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0xe7e3e6){const _0x1ac624=a153_0x1a18,_0x309738=_0xe7e3e6[_0x1ac624(0x109)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x309738)return null;return{'major':Number(_0x309738[0x1]),'minor':Number(_0x309738[0x2]),'patch':Number(_0x309738[0x3]),'prerelease':_0x309738[0x4]};}function a153_0x1a18(_0x1ca3c6,_0x5a5590){_0x1ca3c6=_0x1ca3c6-0xf3;const _0xdbdd69=a153_0xdbdd();let _0x1a18a3=_0xdbdd69[_0x1ca3c6];return _0x1a18a3;}function compareSemver(_0x4a47d6,_0x1fc3b2){const _0x23cb92=a153_0x1a18,_0x402dc1=parseSemver(_0x4a47d6),_0x477f85=parseSemver(_0x1fc3b2);if(!_0x402dc1||!_0x477f85)throw new Error(_0x23cb92(0xfc));for(const _0x4a5737 of[_0x23cb92(0xff),_0x23cb92(0x102),_0x23cb92(0x111)]){if(_0x402dc1[_0x4a5737]<_0x477f85[_0x4a5737])return-0x1;if(_0x402dc1[_0x4a5737]>_0x477f85[_0x4a5737])return 0x1;}if(!_0x402dc1['prerelease']&&!_0x477f85[_0x23cb92(0x106)])return 0x0;if(!_0x402dc1[_0x23cb92(0x106)])return 0x1;if(!_0x477f85['prerelease'])return-0x1;if(_0x402dc1[_0x23cb92(0x106)]===_0x477f85['prerelease'])return 0x0;return _0x402dc1[_0x23cb92(0x106)]<_0x477f85['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x47bb6f=a153_0x1a18,_0x542f12=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x47bb6f(0x109)]()['toLowerCase']();return _0x542f12==='1'||_0x542f12===_0x47bb6f(0xfe)||_0x542f12===_0x47bb6f(0x100);}function cacheRoot(){const _0x46495d=a153_0x1a18;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x46495d(0xf7));}export function getUpdateNoticeCachePath(){const _0x33a594=a153_0x1a18;return join(cacheRoot(),'lovrabet-cli',_0x33a594(0x115));}async function readUpdateNoticeCache(){const _0x14353a=a153_0x1a18;try{const _0x1cf84e=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2ddab7=JSON['parse'](_0x1cf84e);if(!_0x2ddab7||typeof _0x2ddab7!==_0x14353a(0x10a))return{};return _0x2ddab7;}catch{return{};}}async function writeUpdateNoticeCache(_0x2f420d){try{const _0x19029a=getUpdateNoticeCachePath();await mkdir(dirname(_0x19029a),{'recursive':!![]}),await writeFile(_0x19029a,JSON['stringify'](_0x2f420d,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x243f8d,_0x57409e){const _0x4ac802=a153_0x1a18;return typeof _0x243f8d[_0x4ac802(0xfb)]===_0x4ac802(0x105)&&_0x57409e-_0x243f8d[_0x4ac802(0xfb)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1139e4,_0x10dbc7,_0x4acd85){const _0xb66904=a153_0x1a18;return _0x1139e4['lastNotifiedVersion']===_0x10dbc7&&typeof _0x1139e4[_0xb66904(0x10b)]==='number'&&_0x4acd85-_0x1139e4[_0xb66904(0x10b)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x2639b5=0x5dc){const _0x466bad=a153_0x1a18;try{const _0x3fb6ff=NPM_REGISTRY_BASE_URL+_0x466bad(0xf3)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x466bad(0x114),_0x3aa0f1=await fetch(_0x3fb6ff,{'signal':AbortSignal[_0x466bad(0x110)](_0x2639b5)});if(!_0x3aa0f1['ok'])return null;const _0x3c59a4=await _0x3aa0f1[_0x466bad(0x108)]();if(!_0x3c59a4||typeof _0x3c59a4!==_0x466bad(0x10a))return null;return Object[_0x466bad(0x10e)](Object['entries'](_0x3c59a4)[_0x466bad(0x113)](([,_0xa3bc23])=>typeof _0xa3bc23===_0x466bad(0xf5)&&_0xa3bc23[_0x466bad(0x109)]())[_0x466bad(0xf4)](([_0x29a117,_0x532a1d])=>[_0x29a117,String(_0x532a1d)[_0x466bad(0x109)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x224c69){const _0x598451=a153_0x1a18;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x598451(0x10c)+_0x224c69;}export async function resolveLatestUpdateNotice(){const _0x1f0896=a153_0x1a18;if(isUpdateNoticeDisabled())return null;try{const _0x5e84a0=Date[_0x1f0896(0x10f)](),_0x155556=getCliVersion(),_0x29e8d5=await readUpdateNoticeCache();let _0x11f1e2=isFreshCheck(_0x29e8d5,_0x5e84a0)?_0x29e8d5[_0x1f0896(0x103)]?.[_0x1f0896(0x109)]():undefined;if(!_0x11f1e2&&!isFreshCheck(_0x29e8d5,_0x5e84a0)){const _0x53ea8d=await fetchNpmDistTags();_0x11f1e2=_0x53ea8d?.[_0x1f0896(0x103)]?.[_0x1f0896(0x109)](),await writeUpdateNoticeCache({..._0x29e8d5,'checkedAt':_0x5e84a0,'latest':_0x11f1e2,'failed':!_0x11f1e2});}if(!_0x11f1e2||compareSemver(_0x155556,_0x11f1e2)>=0x0)return null;if(isRecentlyNotified(_0x29e8d5,_0x11f1e2,_0x5e84a0))return null;const _0x509936=CLI_BIN_NAME+_0x1f0896(0xf9);return await writeUpdateNoticeCache({..._0x29e8d5,'checkedAt':isFreshCheck(_0x29e8d5,_0x5e84a0)?_0x29e8d5['checkedAt']:_0x5e84a0,'latest':_0x11f1e2,'failed':![],'lastNotifiedVersion':_0x11f1e2,'lastNotifiedAt':_0x5e84a0}),{'command':_0x509936,'current':_0x155556,'latest':_0x11f1e2,'url':buildNpmVersionUrl(_0x11f1e2),'message':CLI_BIN_NAME+'\x20'+_0x11f1e2+_0x1f0896(0x10d)+_0x155556+_0x1f0896(0x104)+_0x509936};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5b393b,_0x3a40c5){const _0x6460d7=a154_0x2f96,_0x4e6abd=_0x5b393b();while(!![]){try{const _0x3af9dd=-parseInt(_0x6460d7(0x193))/0x1*(parseInt(_0x6460d7(0x19b))/0x2)+-parseInt(_0x6460d7(0x196))/0x3*(parseInt(_0x6460d7(0x195))/0x4)+-parseInt(_0x6460d7(0x19a))/0x5+-parseInt(_0x6460d7(0x192))/0x6+-parseInt(_0x6460d7(0x191))/0x7*(parseInt(_0x6460d7(0x19d))/0x8)+-parseInt(_0x6460d7(0x19e))/0x9*(parseInt(_0x6460d7(0x197))/0xa)+parseInt(_0x6460d7(0x194))/0xb*(parseInt(_0x6460d7(0x199))/0xc);if(_0x3af9dd===_0x3a40c5)break;else _0x4e6abd['push'](_0x4e6abd['shift']());}catch(_0x742f7c){_0x4e6abd['push'](_0x4e6abd['shift']());}}}(a154_0x12ad,0xec89b));function a154_0x12ad(){const _0x51e536=['11186hAXYCQ','9143064iIvxeV','6KBoesC','2658546ruwtbV','90884SuxXPe','57gMYYVo','678070xOQaWv','unknown','252cQhMHS','2663445UMMoNd','224474JEpWQl','slice','3712wPDAys','27swXviz'];a154_0x12ad=function(){return _0x51e536;};return a154_0x12ad();}function a154_0x2f96(_0xbca88a,_0xcfe9a4){_0xbca88a=_0xbca88a-0x191;const _0x12ad8e=a154_0x12ad();let _0x2f9691=_0x12ad8e[_0xbca88a];return _0x2f9691;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x43a459=a154_0x2f96,_0x35b819=String(GIT_COMMIT);return _0x35b819&&_0x35b819!==_0x43a459(0x198)?_0x35b819:'';}export function getCliVersionDisplay(){const _0x342aba=a154_0x2f96,_0x3795fe=getCliGitCommit(),_0x4b1f50=BUILD_TIME[_0x342aba(0x19c)](0x0,0xa);if(!_0x3795fe||!_0x4b1f50)return VERSION;return VERSION+'\x20('+_0x3795fe+',\x20'+_0x4b1f50+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a155_0x6799(){var _0xf479e4=['20kxNKQm','1440805qzUyNQ','569744UKbPsp','99MCOEyU','stderr','644835VDiDDy','write','3RTzggN','11bRWLGi','3606000zqLurU','1598478cDvVdV','3887540EekwGk','368086vZqqBu'];a155_0x6799=function(){return _0xf479e4;};return a155_0x6799();}function a155_0xfde0(_0x28668d,_0x1e4d00){_0x28668d=_0x28668d-0x167;var _0x6799db=a155_0x6799();var _0xfde07=_0x6799db[_0x28668d];return _0xfde07;}(function(_0x51a81e,_0x2ab1f3){var _0x28dd9c=a155_0xfde0,_0x1b8be6=_0x51a81e();while(!![]){try{var _0x817bcf=parseInt(_0x28dd9c(0x16c))/0x1*(parseInt(_0x28dd9c(0x171))/0x2)+parseInt(_0x28dd9c(0x16a))/0x3*(parseInt(_0x28dd9c(0x172))/0x4)+-parseInt(_0x28dd9c(0x173))/0x5+parseInt(_0x28dd9c(0x16e))/0x6+-parseInt(_0x28dd9c(0x16f))/0x7+-parseInt(_0x28dd9c(0x167))/0x8*(parseInt(_0x28dd9c(0x168))/0x9)+-parseInt(_0x28dd9c(0x170))/0xa*(parseInt(_0x28dd9c(0x16d))/0xb);if(_0x817bcf===_0x2ab1f3)break;else _0x1b8be6['push'](_0x1b8be6['shift']());}catch(_0x18aec1){_0x1b8be6['push'](_0x1b8be6['shift']());}}}(a155_0x6799,0x83a33));export function writeCliSideChannelLine(_0x301730){var _0x4afce3=a155_0xfde0;process[_0x4afce3(0x169)][_0x4afce3(0x16b)](_0x301730+'\x0a');}
|
package/package.json
CHANGED
package/skills/lovrabet/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lovrabet
|
|
3
3
|
displayName: Lovrabet 运行态 CLI
|
|
4
|
-
version: 2.2.
|
|
5
|
-
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet
|
|
4
|
+
version: 2.2.4-beta.1
|
|
5
|
+
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、personal BFF、文件上传、OCR 识别、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、发票识别、图片识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
|
|
6
6
|
metadata:
|
|
7
7
|
requires:
|
|
8
8
|
bins: ["lovrabet"]
|
|
@@ -12,7 +12,7 @@ metadata:
|
|
|
12
12
|
|
|
13
13
|
# Lovrabet 运行态 CLI
|
|
14
14
|
|
|
15
|
-
面向业务系统运行态的 AI
|
|
15
|
+
面向业务系统运行态的 AI 操作套件。它把应用目录、业务角色与权限、数据集、Instant API 数据操作、Custom SQL、Backend Function、文件上传、OCR、定时任务和诊断能力收束成稳定命令,让业务人员、交付实施、业务运维和 AI Agent 可以从客户、订单、库存、工单、发票和附件等真实业务对象出发,完成查询、核对、执行、识别、联调和排障。
|
|
16
16
|
|
|
17
17
|
它不是让团队重新学习一套后台路径,而是把企业系统里的数据、规则、接口和历史经验整理成 AI 可以理解、调用、审计和复用的业务操作入口。
|
|
18
18
|
|
|
@@ -24,6 +24,7 @@ metadata:
|
|
|
24
24
|
|
|
25
25
|
- 流程 / 决策:
|
|
26
26
|
- [应用决议](guides/app-resolution.md)
|
|
27
|
+
- [运行态角色与权限](guides/role-and-permission-workflow.md)
|
|
27
28
|
- [数据集与数据流程](guides/dataset-and-data-workflow.md)
|
|
28
29
|
- [Custom SQL 与 Backend Function 流程](guides/sql-and-bff-workflow.md)
|
|
29
30
|
- [排障](guides/troubleshooting.md)
|
|
@@ -40,10 +41,9 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
|
|
|
40
41
|
|
|
41
42
|
## 认证
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
只支持 **User Access Key(client-ak)**。优先级:**CLI flags > 环境变量 > 配置文件**。
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
2. **Cookie**:历史兼容读取,已不是推荐主路径;新文档与 Agent 指导默认按 AK 流程处理
|
|
46
|
+
`.lovrabet.json` 或 `LOVRABET_ACCESS_KEY` 配置 **`accessKey`**(适合 CI);所有需要认证的运行态命令均使用该身份。
|
|
47
47
|
|
|
48
48
|
详见 [认证参考](references/lovrabet-auth.md)。
|
|
49
49
|
|
|
@@ -111,6 +111,7 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
|
|
|
111
111
|
- `dataset detail` 核对当前数据集字段、关联和操作信息。
|
|
112
112
|
- `sql detail` 核对当前应用下的 Custom SQL 名称、数据库和 SQL 内容。它不单独证明业务口径、参数约束或副作用。
|
|
113
113
|
- `bff detail` 按当前 `appCode + functionName` 解析运行态 Backend Function ENDPOINT,只返回名称、描述、版本和更新时间等元数据,不返回输入输出、函数类型或副作用契约。
|
|
114
|
+
- `notification config-list` 按当前应用和渠道类型查询应用级通知配置,只返回用于选择配置的安全身份字段和 `configCode`;它不返回渠道地址或凭证,也不证明后续通知发送已经获得授权。
|
|
114
115
|
- 后续新增能力如果通过 schema、manifest、签名元数据或其他已注册入口提供可信契约,按该适配器验证,不强制仿造 `detail` 命令。
|
|
115
116
|
|
|
116
117
|
参数值、执行意图和执行授权可以由用户明确提供;参数结构、输入输出和真实副作用必须来自可信业务 Skill 或平台已确认契约。技术契约无法补齐时保持未知,不自动执行。
|
|
@@ -278,6 +279,11 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
278
279
|
| **config** | `get` | 读取配置项 | read | 本地 |
|
|
279
280
|
| **config** | `set` | 写入配置项 | write | 本地 |
|
|
280
281
|
| **config** | `delete` | 删除配置项 | write | 本地 |
|
|
282
|
+
| **role** | `list` / `detail` | 查询当前应用的业务角色 | read | AK |
|
|
283
|
+
| **role** | `create` / `update` / `delete` | 管理当前应用的自定义业务角色 | high-risk-write | AK |
|
|
284
|
+
| **role** | `user-add` / `user-remove` | 调整业务角色成员 | high-risk-write | AK |
|
|
285
|
+
| **permit** | `page-get` / `role-menus` / `dataset-get` | 查询页面、菜单和数据集权限 | read | AK |
|
|
286
|
+
| **permit** | `page-set` / `role-menus-set` / `dataset-set` | 调整页面、菜单和数据集权限 | high-risk-write | AK |
|
|
281
287
|
| **service** | `validate` | 校验 Service Tree manifest 或本地 registry | read | 本地 |
|
|
282
288
|
| **service** | `import` | 导入 Service Tree manifest 或 registry 到 `~/.lovrabet/service.json` | write | 本地 |
|
|
283
289
|
| **service** | `export` | 从本地 registry 导出 Service Tree manifest | write | 本地 |
|
|
@@ -310,6 +316,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
310
316
|
| **sql** | `exec` | 执行 Custom SQL | read | AK |
|
|
311
317
|
| **bff** | `detail` | 查看 Backend Function 详情 | read | AK |
|
|
312
318
|
| **bff** | `exec` | 执行 Backend Function | read | AK |
|
|
319
|
+
| **notification** | `config-list` | 查询当前应用的应用级通知渠道配置和 configCode | read | AK |
|
|
313
320
|
| **app-config** | `get` | 按 key 获取当前应用的运行态 app-config value | read | AK |
|
|
314
321
|
| **user-account** | `bind` | 按 provider 绑定当前 AccessKey 所属用户的外部账号 | write | AK |
|
|
315
322
|
| **personal-bff** | `list` | 查看当前用户 personal BFF | read | AK |
|
|
@@ -422,6 +429,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
422
429
|
| 执行 Custom SQL | `lovrabet sql exec --sqlcode <code> --params '{"key":"value"}'` |
|
|
423
430
|
| 查看 Backend Function | `lovrabet bff detail --name <functionName>` |
|
|
424
431
|
| 执行 Backend Function | `lovrabet bff exec --name <functionName> --params '{"key":"value"}'` |
|
|
432
|
+
| 查询应用级通知配置 | `lovrabet notification config-list [--type EMAIL|FEISHU|DINGTALK|WECOM|WEBHOOK]` |
|
|
425
433
|
| 获取运行态 app-config value | `lovrabet app-config get <key>` |
|
|
426
434
|
| Agent 使用 app-config value | Agent 调用 `lovrabet app-config get <key>` 获取并在当前任务中消费 |
|
|
427
435
|
| 查看 personal BFF | `lovrabet personal-bff detail --id <id>` |
|
|
@@ -537,6 +545,10 @@ lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
|
|
|
537
545
|
|
|
538
546
|
`lovrabet schedule` 用于校验、创建、查询、立即运行和删除当前应用下的 UTC 定时任务。创建前必须核对应用、执行时间、重复规则、标题、完整 prompt 和 channel;创建、立即运行和删除都先执行 `--dry-run`,取得用户明确确认后再执行。详见 [定时任务工作流](references/lovrabet-schedule-workflow.md)。
|
|
539
547
|
|
|
548
|
+
## 应用级通知配置查询
|
|
549
|
+
|
|
550
|
+
`lovrabet notification config-list` 按当前应用和渠道类型查询应用级通知配置,用于获得已存在配置的 `configCode`。`--type` 默认 `EMAIL`;返回结果只用于选择配置,不发送通知,也不修改渠道。多个候选无法唯一判断时,向用户确认,不要默认取第一条。完整参数、安全输出和 `configCode` / `channelCode` 边界见 [应用级通知配置查询](references/lovrabet-notification-config-list.md)。
|
|
551
|
+
|
|
540
552
|
## Skill 与知识库边界
|
|
541
553
|
|
|
542
554
|
`lovrabet app-config get <key>` 按当前 appCode 和 key 返回运行态 app-config value。它不支持 `--reveal`,不提供 set/delete/list 管理入口。该返回值可能包含敏感信息,不要把它写入本地配置、缓存、日志、命令参数或业务 Skill 入参。
|
|
@@ -698,6 +710,7 @@ personal KB 使用文件型 create/update。更新前先 `kb detail` 查看正
|
|
|
698
710
|
| Instant API | [instant-api-workflow.md](references/instant-api-workflow.md) |
|
|
699
711
|
| Custom SQL 工作流 | [lovrabet-sql-workflow.md](references/lovrabet-sql-workflow.md) |
|
|
700
712
|
| Backend Function 工作流 | [lovrabet-bff-workflow.md](references/lovrabet-bff-workflow.md) |
|
|
713
|
+
| 应用级通知配置查询 | [lovrabet-notification-config-list.md](references/lovrabet-notification-config-list.md) |
|
|
701
714
|
| app-config value 查询 | [lovrabet-app-config.md](references/lovrabet-app-config.md) |
|
|
702
715
|
| 用户级外部账号绑定 | [lovrabet-user-account.md](references/lovrabet-user-account.md) |
|
|
703
716
|
| 文件上传工作流 | [lovrabet-file-workflow.md](references/lovrabet-file-workflow.md) |
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# 运行态角色与权限
|
|
2
|
+
|
|
3
|
+
用于管理业务人员的角色、角色成员,以及页面、菜单和数据集权限。
|
|
4
|
+
|
|
5
|
+
只在目标应用、角色、人员和资源都能唯一确认时执行写入。推荐顺序是:**先读取,再预览,最后确认写入**。
|
|
6
|
+
|
|
7
|
+
## 开始前
|
|
8
|
+
|
|
9
|
+
1. 使用明确的 `--appcode <code>`、`--app <name>` 或已经确认的当前应用。
|
|
10
|
+
2. 使用 `lovrabet role list` 获取真实角色 ID 和类型。
|
|
11
|
+
3. 写操作先加 `--dry-run` 检查目标和变更内容。
|
|
12
|
+
4. 只有用户明确授权后才去掉 `--dry-run` 并加 `--yes`。
|
|
13
|
+
|
|
14
|
+
角色名称可能重复。命令接受角色名称时,如果不能唯一匹配,应改用角色 ID。
|
|
15
|
+
|
|
16
|
+
## 角色
|
|
17
|
+
|
|
18
|
+
### 查询角色
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
lovrabet role list --format compress
|
|
22
|
+
lovrabet role list --type CUSTOM --name 销售 --format compress
|
|
23
|
+
lovrabet role detail --id <roleId> --format compress
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`role list` 返回内置角色和自定义角色。`builtin=true` 表示不能通过角色更新或删除命令修改。
|
|
27
|
+
|
|
28
|
+
### 创建和修改自定义角色
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
lovrabet role create --name <roleName> --remark <remark> --dry-run --format compress
|
|
32
|
+
lovrabet role create --name <roleName> --remark <remark> --yes --format compress
|
|
33
|
+
|
|
34
|
+
lovrabet role update --id <roleId> --name <newName> --dry-run --format compress
|
|
35
|
+
lovrabet role update --id <roleId> --remark <newRemark> --yes --format compress
|
|
36
|
+
|
|
37
|
+
lovrabet role delete --id <roleId> --dry-run --format compress
|
|
38
|
+
lovrabet role delete --id <roleId> --yes --format compress
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- 只能创建、更新和删除 CUSTOM 角色。
|
|
42
|
+
- 备注只能设置为非空内容,不能用空字符串清除。
|
|
43
|
+
- 删除可能影响已有成员和权限;必须先确认角色确实不再使用。
|
|
44
|
+
|
|
45
|
+
## 角色成员
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
lovrabet role user-add --role <roleId|exactName> --user <userId> --expect-user-count <count> --dry-run --format compress
|
|
49
|
+
lovrabet role user-add --role <roleId|exactName> --user <userId> --expect-user-count <count> --yes --format compress
|
|
50
|
+
|
|
51
|
+
lovrabet role user-remove --role <roleId|exactName> --user <userId> --expect-user-count <count> --dry-run --format compress
|
|
52
|
+
lovrabet role user-remove --role <roleId|exactName> --user <userId> --expect-user-count <count> --yes --format compress
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `--user` 使用数字用户 ID;添加时该人员必须已经属于目标应用。
|
|
56
|
+
- `--expect-user-count` 用于防止读取后成员数量已变化,建议每次写入都提供。
|
|
57
|
+
- 重复添加已有成员或移出不存在的成员不会重复写入。
|
|
58
|
+
- OWNER 成员不能用这些命令调整。
|
|
59
|
+
- 如果人员身份不明确,停止写入并要求用户确认数字用户 ID。
|
|
60
|
+
|
|
61
|
+
## 页面权限
|
|
62
|
+
|
|
63
|
+
先读取页面权限:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
lovrabet permit page-get --menu-id <menuId> --format compress
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
只设置明确指定的权限槽位,其他槽位保持不变:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
lovrabet permit page-set --menu-id <menuId> --menu-roles <roleIdsOrNames> --dry-run --format compress
|
|
73
|
+
lovrabet permit page-set --menu-id <menuId> --row-roles SELF --yes --format compress
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
可用参数:
|
|
77
|
+
|
|
78
|
+
- `--menu-roles`
|
|
79
|
+
- `--create-roles`
|
|
80
|
+
- `--update-roles`
|
|
81
|
+
- `--delete-roles`
|
|
82
|
+
- `--detail-roles`
|
|
83
|
+
- `--export-roles`
|
|
84
|
+
- `--row-roles`
|
|
85
|
+
|
|
86
|
+
多个角色用英文逗号分隔。`SELF` 只用于 `--row-roles`。
|
|
87
|
+
|
|
88
|
+
## 菜单权限
|
|
89
|
+
|
|
90
|
+
查看一个角色的菜单访问结果:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
lovrabet permit role-menus --role <roleId|exactName> --format compress
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
授权或撤权:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
lovrabet permit role-menus-set --role <roleId|exactName> --grant --menus <menuIds> --dry-run --format compress
|
|
100
|
+
lovrabet permit role-menus-set --role <roleId|exactName> --revoke --menus <menuIds> --yes --format compress
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`--grant` 与 `--revoke` 必须且只能选择一个。多个菜单 ID 用英文逗号分隔。
|
|
104
|
+
|
|
105
|
+
## 数据集权限
|
|
106
|
+
|
|
107
|
+
查看一个角色的数据集权限:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
lovrabet permit dataset-get --role <roleId|exactName> --format compress
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
授权或撤权:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
lovrabet permit dataset-set --role <roleId|exactName> --grant --datasets <datasetCodes> --actions <actions> --dry-run --format compress
|
|
117
|
+
lovrabet permit dataset-set --role <roleId|exactName> --revoke --datasets <datasetCodes> --actions <actions> --yes --format compress
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
动作值:
|
|
121
|
+
|
|
122
|
+
- `DATA_CREATE`
|
|
123
|
+
- `DATA_UPDATE`
|
|
124
|
+
- `DATA_DELETE`
|
|
125
|
+
- `DATA_DETAIL`
|
|
126
|
+
- `DATA_EXPORT`
|
|
127
|
+
- `DATA_ROW`
|
|
128
|
+
|
|
129
|
+
多个数据集或动作使用英文逗号分隔。
|
|
130
|
+
|
|
131
|
+
## 安全边界
|
|
132
|
+
|
|
133
|
+
- 只有 ADMIN 或 OWNER 可以执行页面、菜单和数据集权限写入。
|
|
134
|
+
- ADMIN 和 OWNER 拥有完整运行权限,不作为页面、菜单或数据集权限调整目标。
|
|
135
|
+
- 权限设置只修改显式选择的页面槽位、菜单或数据集动作。
|
|
136
|
+
- 菜单或数据集权限不能撤销最后一个角色;需要先为另一个角色授权,再执行撤权。
|
|
137
|
+
- dry-run 只预览请求,不代表已经获得授权,也不代表变更已经生效。
|
|
138
|
+
- 写入后重新执行对应读取命令,核对角色、成员或权限结果。
|
|
139
|
+
- 遇到权限不足、目标不存在、成员数量变化或候选不唯一时停止,不更换身份、不猜测目标。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# auth — 认证管理
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lovrabet CLI 只使用 User Access Key(client-ak)认证。
|
|
4
4
|
|
|
5
5
|
## auth login — 保存 accessKey
|
|
6
6
|
|
|
@@ -126,10 +126,6 @@ CLI flag (--access-key)
|
|
|
126
126
|
|
|
127
127
|
`auth login` / `auth init` 本身都不会主动把应用目录写进 `.lovrabet.json`。
|
|
128
128
|
|
|
129
|
-
## Cookie
|
|
130
|
-
|
|
131
|
-
Cookie 仍保留历史兼容读取,但不再是推荐主路径。新的 Agent 指导和用户文档应默认使用 AK 流程。
|
|
132
|
-
|
|
133
129
|
## 参考
|
|
134
130
|
|
|
135
131
|
- [SKILL.md](../SKILL.md)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# lovrabet notification config-list
|
|
2
|
+
|
|
3
|
+
只读查询当前应用的应用级通知渠道配置,主要用于获得已存在通知配置的 `configCode`。
|
|
4
|
+
|
|
5
|
+
## 命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
lovrabet notification config-list --format compress
|
|
9
|
+
lovrabet notification config-list --type EMAIL --format compress
|
|
10
|
+
lovrabet notification config-list --type EMAIL --appcode <appCode> --format json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`--type` 默认 `EMAIL`,支持:
|
|
14
|
+
|
|
15
|
+
- `EMAIL`
|
|
16
|
+
- `FEISHU`
|
|
17
|
+
- `DINGTALK`
|
|
18
|
+
- `WECOM`
|
|
19
|
+
- `WEBHOOK`
|
|
20
|
+
|
|
21
|
+
类型值使用大写。完整参数写法为 `--type EMAIL|FEISHU|DINGTALK|WECOM|WEBHOOK`。
|
|
22
|
+
|
|
23
|
+
## 安全输出
|
|
24
|
+
|
|
25
|
+
每个配置项只返回用于识别和选择配置的字段:
|
|
26
|
+
|
|
27
|
+
- `id`
|
|
28
|
+
- `configCode`
|
|
29
|
+
- `configName`
|
|
30
|
+
- `channelType`
|
|
31
|
+
- `description`
|
|
32
|
+
- `createTime`
|
|
33
|
+
- `updateTime`
|
|
34
|
+
|
|
35
|
+
该命令不会输出 `endpointUrl`、`channelConfig`、SMTP 用户名或密码、token、secret、连接超时和人员身份审计字段。若任一配置缺少可用的 `configCode`、`configName` 或 `channelType`,命令返回错误,不把残缺记录包装成成功结果。
|
|
36
|
+
|
|
37
|
+
示例输出:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"ok": true,
|
|
42
|
+
"data": {
|
|
43
|
+
"appCode": "app-xxxxx",
|
|
44
|
+
"channelType": "EMAIL",
|
|
45
|
+
"count": 1,
|
|
46
|
+
"configs": [
|
|
47
|
+
{
|
|
48
|
+
"id": 7,
|
|
49
|
+
"configCode": "ncc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
50
|
+
"configName": "官方邮件",
|
|
51
|
+
"channelType": "EMAIL",
|
|
52
|
+
"description": "业务通知邮件",
|
|
53
|
+
"createTime": "2026-07-01T00:00:00Z",
|
|
54
|
+
"updateTime": "2026-07-02T00:00:00Z"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"message": "Found 1 EMAIL notification config(s)"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 选择与消费边界
|
|
63
|
+
|
|
64
|
+
- `configCode` 是应用级通知渠道配置编码,可供已确认契约的通知型 Backend Function 使用。
|
|
65
|
+
- dataset 级通知通道的 `channelCode` 不能替代应用级 `configCode`。
|
|
66
|
+
- 没有结果时,不要猜测或从其他应用复制配置编码。
|
|
67
|
+
- 多个候选能够根据用户明确给出的配置名称或用途唯一匹配时,使用该项;多个候选仍无法判断时,向用户确认,不要默认取第一条。
|
|
68
|
+
- 查询结果不代表已经授权发送通知。发送前仍须确认目标应用、Backend Function 契约、`configCode`、接收对象、消息摘要和真实外发副作用。
|
|
69
|
+
- 该命令不会发送通知,也不会创建、更新或删除平台配置。
|
|
70
|
+
|
|
71
|
+
## 失败处理
|
|
72
|
+
|
|
73
|
+
- AccessKey 无效或无权访问目标应用时,先用 `lovrabet auth info` 核对当前身份,再确认应用权限。
|
|
74
|
+
- 应用不明确时,显式传入 `--app` 或 `--appcode`;不要修改本地配置来抬高权限或切换到未经授权的应用。
|
|
75
|
+
- 渠道类型不支持时,使用上面列出的五种大写值之一。
|
|
76
|
+
- 查询失败时保持 `configCode` 未知,不继续执行依赖该编码的通知发送。
|
|
77
|
+
|
|
78
|
+
## 参考
|
|
79
|
+
|
|
80
|
+
- [Backend Function 工作流](lovrabet-bff-workflow.md)
|
|
81
|
+
- [输出格式与 --jq](lovrabet-output-format-jq.md)
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.2.
|
|
6
|
-
"skillVersion": "2.2.
|
|
5
|
+
"packageVersion": "2.2.4-beta.1",
|
|
6
|
+
"skillVersion": "2.2.4-beta.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
10
10
|
"guides/dataset-and-data-workflow.md",
|
|
11
|
+
"guides/role-and-permission-workflow.md",
|
|
11
12
|
"guides/sql-and-bff-workflow.md",
|
|
12
13
|
"guides/troubleshooting.md",
|
|
13
14
|
"references/dataset-discovery-workflow.md",
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
"references/lovrabet-file-workflow.md",
|
|
23
24
|
"references/lovrabet-kb-workflow.md",
|
|
24
25
|
"references/lovrabet-logs.md",
|
|
26
|
+
"references/lovrabet-notification-config-list.md",
|
|
25
27
|
"references/lovrabet-ocr-workflow.md",
|
|
26
28
|
"references/lovrabet-output-format-jq.md",
|
|
27
29
|
"references/lovrabet-personal-bff-workflow.md",
|
|
@@ -35,5 +37,5 @@
|
|
|
35
37
|
"references/lovrabet-user-account.md",
|
|
36
38
|
"references/lovrabet-workspace.md"
|
|
37
39
|
],
|
|
38
|
-
"digest": "
|
|
40
|
+
"digest": "b07c87877407779445d49a9849d7dc963a2c715439b2efc9bd0fe4ee7aa0700b"
|
|
39
41
|
}
|