@lovrabet/lovrabet-cli 2.2.4-beta.2 → 2.2.4
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.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.d.ts +19 -0
- 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.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 +4 -4
- package/skills/lovrabet/references/lovrabet-ocr-workflow.md +17 -2
- package/skills/lovrabet.manifest.json +3 -3
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x3138a1=a149_0x573f;(function(_0x4ecd38,_0x131e09){const _0x45dc9f=a149_0x573f,_0x81878=_0x4ecd38();while(!![]){try{const _0x16cb61=parseInt(_0x45dc9f(0x119))/0x1*(parseInt(_0x45dc9f(0x118))/0x2)+-parseInt(_0x45dc9f(0x112))/0x3*(parseInt(_0x45dc9f(0x122))/0x4)+parseInt(_0x45dc9f(0x135))/0x5*(parseInt(_0x45dc9f(0x138))/0x6)+parseInt(_0x45dc9f(0x120))/0x7*(-parseInt(_0x45dc9f(0x127))/0x8)+parseInt(_0x45dc9f(0x129))/0x9+-parseInt(_0x45dc9f(0x13c))/0xa+-parseInt(_0x45dc9f(0x125))/0xb*(-parseInt(_0x45dc9f(0x139))/0xc);if(_0x16cb61===_0x131e09)break;else _0x81878['push'](_0x81878['shift']());}catch(_0x61cf43){_0x81878['push'](_0x81878['shift']());}}}(a149_0x9126,0x3be12));function a149_0x9126(){const _0x4b4d63=['split','unknown','printf','existsSync','getWinstonInstance','initWinstonLogger','writeFileSync','logFilePath','Failed\x20to\x20read\x20logs:','readLogs','format','25371rdGSDH','transports','combine','trim','red','winstonLogger','518422UmlaZF','1ihTHSH','success','parse','dirname','createLogger','addColors','yellow','344050vhpCFz','clearLogs','32fQdgeG','logTask','readFileSync','2667104fcgDrM','details','48BhklVk','mkdirSync','2191428bBtTdJ','Completed:\x20','filter','Failed\x20to\x20clear\x20logs:','setLogPath','logFileName','currentRawCommand','green','info','setRawCommand','clear','now','283595dfPpPA','map','duration','6wofetU','12InOaSi','log','command','1940640SJORxo','timestamp','utf8','blue','File','error','toISOString','warn'];a149_0x9126=function(){return _0x4b4d63;};return a149_0x9126();}function a149_0x573f(_0x172409,_0x313953){_0x172409=_0x172409-0x103;const _0x912634=a149_0x9126();let _0x573f0f=_0x912634[_0x172409];return _0x573f0f;}import a149_0x4528e2 from'winston';import a149_0x5d1ec2 from'node:fs';import a149_0x11070f from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a149_0x3138a1(0x117)];[a149_0x3138a1(0x10e)]='';[a149_0x3138a1(0x12f)]='';constructor(){}[a149_0x3138a1(0x132)](_0x3b1539){const _0x211b7f=a149_0x3138a1;this[_0x211b7f(0x12f)]=_0x3b1539;}[a149_0x3138a1(0x12d)](_0x54823f){const _0x52ae97=a149_0x3138a1;this['logFilePath']=a149_0x11070f['join'](_0x54823f,PRODUCT_CONFIG[_0x52ae97(0x12e)]),this[_0x52ae97(0x117)]&&this[_0x52ae97(0x117)][_0x52ae97(0x133)](),this['initWinstonLogger']();}[a149_0x3138a1(0x10c)](){const _0x4f3471=a149_0x3138a1,_0x3338f0=a149_0x11070f[_0x4f3471(0x11c)](this[_0x4f3471(0x10e)]);!a149_0x5d1ec2[_0x4f3471(0x10a)](_0x3338f0)&&a149_0x5d1ec2[_0x4f3471(0x128)](_0x3338f0,{'recursive':!![]});const _0x22aea3=a149_0x4528e2[_0x4f3471(0x111)][_0x4f3471(0x114)](a149_0x4528e2['format'][_0x4f3471(0x13d)](),a149_0x4528e2[_0x4f3471(0x111)]['errors']({'stack':!![]}),a149_0x4528e2[_0x4f3471(0x111)][_0x4f3471(0x109)](_0x2089c8=>{const _0x33608f=_0x4f3471,_0x1e72b1={'timestamp':_0x2089c8[_0x33608f(0x13d)]||new Date()[_0x33608f(0x105)](),'level':_0x2089c8['level']||_0x33608f(0x131),'command':_0x2089c8[_0x33608f(0x13b)]||_0x33608f(0x108),'rawCommand':_0x2089c8['rawCommand']||this[_0x33608f(0x12f)]||undefined,'message':_0x2089c8['message']||'','duration':_0x2089c8[_0x33608f(0x137)]||undefined,'details':_0x2089c8[_0x33608f(0x126)]||undefined};return JSON['stringify'](_0x1e72b1);}));this['winstonLogger']=a149_0x4528e2[_0x4f3471(0x11d)]({'level':_0x4f3471(0x131),'format':_0x22aea3,'transports':[new a149_0x4528e2[(_0x4f3471(0x113))][(_0x4f3471(0x103))]({'filename':this[_0x4f3471(0x10e)],'level':_0x4f3471(0x131)})],'silent':![]}),a149_0x4528e2[_0x4f3471(0x11e)]({'success':_0x4f3471(0x130),'error':_0x4f3471(0x116),'warn':_0x4f3471(0x11f),'info':_0x4f3471(0x13f)});}[a149_0x3138a1(0x131)](_0x46660d,_0x52a276,_0x103243){const _0x1efac1=a149_0x3138a1;if(!this[_0x1efac1(0x10e)]||!this[_0x1efac1(0x117)])return;this[_0x1efac1(0x117)][_0x1efac1(0x131)](_0x52a276,{'command':_0x46660d,'details':_0x103243});}['success'](_0x3712f0,_0x159818,_0x58719d,_0x15e9c9){const _0xd0fd35=a149_0x3138a1;if(!this[_0xd0fd35(0x10e)]||!this[_0xd0fd35(0x117)])return;this['winstonLogger'][_0xd0fd35(0x13a)](_0xd0fd35(0x131),_0x159818,{'level':_0xd0fd35(0x11a),'command':_0x3712f0,'duration':_0x58719d,'details':_0x15e9c9});}[a149_0x3138a1(0x104)](_0x177fba,_0xf895af,_0x407cd6){const _0x38184b=a149_0x3138a1;if(!this['logFilePath']||!this[_0x38184b(0x117)])return;this['winstonLogger']['error'](_0xf895af,{'command':_0x177fba,'details':_0x407cd6});}[a149_0x3138a1(0x106)](_0x97375,_0x5b9a0d,_0x5701a1){const _0x190723=a149_0x3138a1;if(!this[_0x190723(0x10e)]||!this['winstonLogger'])return;this['winstonLogger'][_0x190723(0x106)](_0x5b9a0d,{'command':_0x97375,'details':_0x5701a1});}async[a149_0x3138a1(0x123)](_0x37640d,_0x4e4c3b,_0x259fc9){const _0xffaeb3=a149_0x3138a1,_0x348a99=Date['now']();this[_0xffaeb3(0x131)](_0x37640d,'Starting:\x20'+_0x4e4c3b);try{const _0x4cc4d8=await _0x259fc9(),_0x59b8b9=Date[_0xffaeb3(0x134)]()-_0x348a99;return this[_0xffaeb3(0x11a)](_0x37640d,_0xffaeb3(0x12a)+_0x4e4c3b,_0x59b8b9),_0x4cc4d8;}catch(_0x48b4fa){const _0x3c1793=Date['now']()-_0x348a99;this[_0xffaeb3(0x104)](_0x37640d,'Failed:\x20'+_0x4e4c3b,{'error':_0x48b4fa instanceof Error?_0x48b4fa['message']:String(_0x48b4fa),'duration':_0x3c1793});throw _0x48b4fa;}}[a149_0x3138a1(0x110)](){const _0x11bfa7=a149_0x3138a1;try{if(!a149_0x5d1ec2['existsSync'](this['logFilePath']))return[];const _0x915581=a149_0x5d1ec2[_0x11bfa7(0x124)](this['logFilePath'],_0x11bfa7(0x13e));return _0x915581[_0x11bfa7(0x107)](/\r?\n/)[_0x11bfa7(0x12b)](_0x1bd542=>_0x1bd542[_0x11bfa7(0x115)]())[_0x11bfa7(0x136)](_0x3a1ebd=>JSON[_0x11bfa7(0x11b)](_0x3a1ebd));}catch(_0x47a04c){return console['warn'](_0x11bfa7(0x10f),_0x47a04c),[];}}[a149_0x3138a1(0x121)](){const _0xdf78d6=a149_0x3138a1;try{a149_0x5d1ec2['existsSync'](this[_0xdf78d6(0x10e)])&&a149_0x5d1ec2[_0xdf78d6(0x10d)](this['logFilePath'],'',_0xdf78d6(0x13e));}catch(_0x165123){console['warn'](_0xdf78d6(0x12c),_0x165123);}}[a149_0x3138a1(0x10b)](){const _0x828360=a149_0x3138a1;return this[_0x828360(0x117)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x9470aa=a150_0x158f;(function(_0x1afe3d,_0x30f5c1){const _0x4fcbdd=a150_0x158f,_0x1bc344=_0x1afe3d();while(!![]){try{const _0x89277a=parseInt(_0x4fcbdd(0xc1))/0x1*(-parseInt(_0x4fcbdd(0xad))/0x2)+parseInt(_0x4fcbdd(0xb6))/0x3*(-parseInt(_0x4fcbdd(0xb4))/0x4)+-parseInt(_0x4fcbdd(0xba))/0x5+parseInt(_0x4fcbdd(0xae))/0x6*(-parseInt(_0x4fcbdd(0xab))/0x7)+-parseInt(_0x4fcbdd(0xbc))/0x8*(parseInt(_0x4fcbdd(0xb8))/0x9)+-parseInt(_0x4fcbdd(0xb7))/0xa*(parseInt(_0x4fcbdd(0xaf))/0xb)+parseInt(_0x4fcbdd(0xb9))/0xc;if(_0x89277a===_0x30f5c1)break;else _0x1bc344['push'](_0x1bc344['shift']());}catch(_0x3fbd73){_0x1bc344['push'](_0x1bc344['shift']());}}}(a150_0x51d5,0xc0869));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a150_0x9470aa(0xbe)]),MIN_SAFE_INTEGER=BigInt(Number[a150_0x9470aa(0xac)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a150_0x158f(_0x3da527,_0x5ae575){_0x3da527=_0x3da527-0xaa;const _0x51d586=a150_0x51d5();let _0x158ff0=_0x51d586[_0x3da527];return _0x158ff0;}function a150_0x51d5(){const _0x14bb8c=['412446ACTtbb','2174330UTBmwM','4095ZepzJy','61869060VkPrla','2205470hRBKUX','length','13096knGwAv','defineProperty','MAX_SAFE_INTEGER','slice','json','5EwnFju','parse','21qVyfhi','MIN_SAFE_INTEGER','313856xHWpDT','1244052WutUps','55pURirq','prototype','text','includes','getOwnPropertyDescriptor','20SuCTJW','undefined'];a150_0x51d5=function(){return _0x14bb8c;};return a150_0x51d5();}function isUnsafeIntegerLiteral(_0x3d385e){const _0x57db1f=a150_0x9470aa;if(_0x3d385e[_0x57db1f(0xb2)]('.')||_0x3d385e[_0x57db1f(0xb2)]('e')||_0x3d385e[_0x57db1f(0xb2)]('E'))return![];const _0x90167e=BigInt(_0x3d385e);return _0x90167e>MAX_SAFE_INTEGER||_0x90167e<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x480ecb){const _0x4c0612=a150_0x9470aa;let _0x5d2331='',_0x110a21=![],_0x3d46b6=![];for(let _0x1378f5=0x0;_0x1378f5<_0x480ecb[_0x4c0612(0xbb)];){const _0x130982=_0x480ecb[_0x1378f5];if(_0x110a21){_0x5d2331+=_0x130982,_0x1378f5+=0x1;if(_0x3d46b6)_0x3d46b6=![];else{if(_0x130982==='\x5c')_0x3d46b6=!![];else _0x130982==='\x22'&&(_0x110a21=![]);}continue;}if(_0x130982==='\x22'){_0x110a21=!![],_0x5d2331+=_0x130982,_0x1378f5+=0x1;continue;}if(_0x130982==='-'||_0x130982>='0'&&_0x130982<='9'){const _0x30f304=JSON_NUMBER_PATTERN['exec'](_0x480ecb[_0x4c0612(0xbf)](_0x1378f5))?.[0x0];if(_0x30f304){_0x5d2331+=isUnsafeIntegerLiteral(_0x30f304)?'\x22'+_0x30f304+'\x22':_0x30f304,_0x1378f5+=_0x30f304['length'];continue;}}_0x5d2331+=_0x130982,_0x1378f5+=0x1;}return _0x5d2331;}export function parseLosslessJson(_0x33c5b9){const _0x214b82=a150_0x9470aa;return JSON[_0x214b82(0xaa)](quoteUnsafeIntegerLiterals(_0x33c5b9));}export function installLosslessJsonResponseParser(){const _0x1b86c0=a150_0x9470aa;if(typeof Response===_0x1b86c0(0xb5))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x1b86c0(0xb0)],originalResponseJsonDescriptor=Object[_0x1b86c0(0xb3)](responseJsonPrototype,_0x1b86c0(0xc0)),Object[_0x1b86c0(0xbd)](responseJsonPrototype,_0x1b86c0(0xc0),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x336dbb(){const _0x3fdb49=_0x1b86c0;return parseLosslessJson(await this[_0x3fdb49(0xb1)]());}}),restoreResponseJsonParser=()=>{const _0x97121e=_0x1b86c0;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x97121e(0xbd)](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype[_0x97121e(0xc0)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4eb7a,_0xecac03){const _0x57d83b=a151_0x4483,_0x4a808d=_0x4eb7a();while(!![]){try{const _0x156ce0=-parseInt(_0x57d83b(0xe7))/0x1+-parseInt(_0x57d83b(0xdc))/0x2+-parseInt(_0x57d83b(0xec))/0x3+parseInt(_0x57d83b(0xe8))/0x4*(parseInt(_0x57d83b(0xe2))/0x5)+-parseInt(_0x57d83b(0xf1))/0x6+-parseInt(_0x57d83b(0xf0))/0x7*(-parseInt(_0x57d83b(0xef))/0x8)+parseInt(_0x57d83b(0xe6))/0x9;if(_0x156ce0===_0xecac03)break;else _0x4a808d['push'](_0x4a808d['shift']());}catch(_0x28d347){_0x4a808d['push'](_0x4a808d['shift']());}}}(a151_0xdd87,0xd7800));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a151_0x4483(_0x2270fa,_0x16ae92){_0x2270fa=_0x2270fa-0xdc;const _0xdd876b=a151_0xdd87();let _0x448385=_0xdd876b[_0x2270fa];return _0x448385;}export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x3750e0){const _0x626cec=a151_0x4483;if(!_0x3750e0)return undefined;try{return parseLosslessJson(_0x3750e0);}catch{throw CliErrors[_0x626cec(0xdd)](_0x626cec(0xe1)+_0x3750e0);}}export function parseJsonParamsValue(_0x284d43){const _0x593a97=a151_0x4483;if(!_0x284d43)return undefined;try{return parseLosslessJson(_0x284d43);}catch{throw CliErrors[_0x593a97(0xdd)](_0x593a97(0xe1)+_0x284d43);}}export function parseBatchCreateItemsFromParams(_0x5ca5b5){const _0x815e22=a151_0x4483;if(Array[_0x815e22(0xeb)](_0x5ca5b5))return _0x5ca5b5;if(_0x5ca5b5!==null&&_0x5ca5b5!==undefined&&typeof _0x5ca5b5===_0x815e22(0xf3)&&Array[_0x815e22(0xeb)](_0x5ca5b5[_0x815e22(0xee)]))return _0x5ca5b5[_0x815e22(0xee)];throw CliErrors[_0x815e22(0xdd)](_0x815e22(0xe0),_0x815e22(0xdf));}function parseDataUpdateId(_0x4de5b2,_0x7ec3d){const _0x55a1ae=a151_0x4483;if(typeof _0x4de5b2===_0x55a1ae(0xe5)&&Number[_0x55a1ae(0xea)](_0x4de5b2)&&_0x4de5b2>0x0)return _0x4de5b2;if(typeof _0x4de5b2===_0x55a1ae(0xf5)){if(/^[1-9]\d*$/['test'](_0x4de5b2))return _0x4de5b2;}throw CliErrors[_0x55a1ae(0xdd)](_0x55a1ae(0xed)+_0x7ec3d+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a151_0xdd87(){const _0x11ab84=['object','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','string','id[','2285664sQdxhM','validation','length','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Invalid\x20JSON\x20for\x20--params:\x20','115070rrQksF','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20records\x20per\x20call;\x20received\x20','number','32712084KIiADp','215232FgnNtE','208NzNWkM','join','isSafeInteger','isArray','4998885xiQhBA','data\x20update\x20--params.','items','6274480AsJDYj','7lQrrKt','10252002CAGrcn','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27'];a151_0xdd87=function(){return _0x11ab84;};return a151_0xdd87();}export function parseUpdateIdsFromParams(_0x4ba625){const _0x3d9d34=a151_0x4483;if(_0x4ba625===null||_0x4ba625===undefined||typeof _0x4ba625!==_0x3d9d34(0xf3)||Array[_0x3d9d34(0xeb)](_0x4ba625))throw CliErrors[_0x3d9d34(0xdd)](_0x3d9d34(0xe3),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x3f27dc=_0x4ba625['id'];if(_0x3f27dc===undefined||_0x3f27dc===null)throw CliErrors[_0x3d9d34(0xdd)](_0x3d9d34(0xf4),_0x3d9d34(0xf2));const _0x3081b7=Array[_0x3d9d34(0xeb)](_0x3f27dc)?_0x3f27dc:[_0x3f27dc];if(_0x3081b7[_0x3d9d34(0xde)]===0x0)throw CliErrors[_0x3d9d34(0xdd)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x3081b7['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x3d9d34(0xdd)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x3d9d34(0xe4)+_0x3081b7[_0x3d9d34(0xde)]+'.');return _0x3081b7['map']((_0x3df484,_0x57d7f4)=>parseDataUpdateId(_0x3df484,Array[_0x3d9d34(0xeb)](_0x3f27dc)?_0x3d9d34(0xf6)+_0x57d7f4+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x45c656,_0xb022a){const _0x1e461f=a151_0x4483;if(Array[_0x1e461f(0xeb)](_0x45c656['id'])&&_0xb022a[_0x1e461f(0xde)]>0x1)return{..._0x45c656,'id':_0xb022a[_0x1e461f(0xe9)](',')};return _0x45c656;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a152_0x4e6a(_0x16eeef,_0x51d233){_0x16eeef=_0x16eeef-0xfe;const _0x4ab26f=a152_0x4ab2();let _0x4e6a4e=_0x4ab26f[_0x16eeef];return _0x4e6a4e;}const a152_0x43921f=a152_0x4e6a;(function(_0x48524d,_0x18e45d){const _0x12aa52=a152_0x4e6a,_0x678606=_0x48524d();while(!![]){try{const _0x1ac1e4=-parseInt(_0x12aa52(0x105))/0x1*(-parseInt(_0x12aa52(0x101))/0x2)+parseInt(_0x12aa52(0x107))/0x3+parseInt(_0x12aa52(0x100))/0x4+parseInt(_0x12aa52(0xff))/0x5+-parseInt(_0x12aa52(0x104))/0x6+-parseInt(_0x12aa52(0x102))/0x7*(parseInt(_0x12aa52(0x109))/0x8)+-parseInt(_0x12aa52(0xfe))/0x9;if(_0x1ac1e4===_0x18e45d)break;else _0x678606['push'](_0x678606['shift']());}catch(_0x5465c5){_0x678606['push'](_0x678606['shift']());}}}(a152_0x4ab2,0x2e74d));export const isWindows=process[a152_0x43921f(0x108)]===a152_0x43921f(0x106);export function resolveNpmBin(_0x3c890a){const _0x2810de=a152_0x43921f;return isWindows?_0x3c890a+_0x2810de(0x103):_0x3c890a;}function a152_0x4ab2(){const _0x4469c0=['580842TCCmRz','1521395SfbGSf','623640woYyhP','362dZSRiq','2947GAJrSC','.cmd','1100292kOqcyp','1531DAdUAU','win32','206577xbaCds','platform','6992RSfaOU'];a152_0x4ab2=function(){return _0x4469c0;};return a152_0x4ab2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a3b80,_0x54f04f){const _0x3b80e9=a153_0x6fef,_0x14d9d6=_0x3a3b80();while(!![]){try{const _0x591adf=-parseInt(_0x3b80e9(0x167))/0x1+parseInt(_0x3b80e9(0x180))/0x2+parseInt(_0x3b80e9(0x161))/0x3*(parseInt(_0x3b80e9(0x169))/0x4)+-parseInt(_0x3b80e9(0x17d))/0x5*(parseInt(_0x3b80e9(0x17c))/0x6)+parseInt(_0x3b80e9(0x171))/0x7+parseInt(_0x3b80e9(0x17e))/0x8+-parseInt(_0x3b80e9(0x162))/0x9*(parseInt(_0x3b80e9(0x168))/0xa);if(_0x591adf===_0x54f04f)break;else _0x14d9d6['push'](_0x14d9d6['shift']());}catch(_0x2a20fe){_0x14d9d6['push'](_0x14d9d6['shift']());}}}(a153_0x2f8c,0x71a4e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a153_0x2f8c(){const _0x38ea01=['5388272JGlqBY','lovrabet-cli','550404wfIPOH','now','/dist-tags','https://www.npmjs.com/package/','minor','9114GgVBeO','585hTtlsc','number','Invalid\x20semver','prerelease','major','178631duoSoc','176110aXJumf','1028xwNwjM','true','latest','patch','lastNotifiedVersion','object','parse','utf8','5417020evrJVE','fromEntries','match','\x20update','timeout','checkedAt','trim','map','string','/v/','filter','6yOkYtv','3572650TJfNuR'];a153_0x2f8c=function(){return _0x38ea01;};return a153_0x2f8c();}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x67980){const _0x35b1b5=a153_0x6fef,_0x519aab=_0x67980[_0x35b1b5(0x177)]()[_0x35b1b5(0x173)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x519aab)return null;return{'major':Number(_0x519aab[0x1]),'minor':Number(_0x519aab[0x2]),'patch':Number(_0x519aab[0x3]),'prerelease':_0x519aab[0x4]};}function compareSemver(_0x4326d7,_0x1adfb9){const _0x5eac42=a153_0x6fef,_0x3dd4ee=parseSemver(_0x4326d7),_0x55c986=parseSemver(_0x1adfb9);if(!_0x3dd4ee||!_0x55c986)throw new Error(_0x5eac42(0x164));for(const _0x3429a9 of[_0x5eac42(0x166),_0x5eac42(0x160),_0x5eac42(0x16c)]){if(_0x3dd4ee[_0x3429a9]<_0x55c986[_0x3429a9])return-0x1;if(_0x3dd4ee[_0x3429a9]>_0x55c986[_0x3429a9])return 0x1;}if(!_0x3dd4ee[_0x5eac42(0x165)]&&!_0x55c986[_0x5eac42(0x165)])return 0x0;if(!_0x3dd4ee[_0x5eac42(0x165)])return 0x1;if(!_0x55c986[_0x5eac42(0x165)])return-0x1;if(_0x3dd4ee['prerelease']===_0x55c986[_0x5eac42(0x165)])return 0x0;return _0x3dd4ee[_0x5eac42(0x165)]<_0x55c986['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x22afef=a153_0x6fef,_0x10455b=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()['toLowerCase']();return _0x10455b==='1'||_0x10455b===_0x22afef(0x16a)||_0x10455b==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x1f6db2=a153_0x6fef;return join(cacheRoot(),_0x1f6db2(0x17f),'update-check.json');}async function readUpdateNoticeCache(){const _0x129844=a153_0x6fef;try{const _0x599abc=await readFile(getUpdateNoticeCachePath(),_0x129844(0x170)),_0x35e04f=JSON[_0x129844(0x16f)](_0x599abc);if(!_0x35e04f||typeof _0x35e04f!=='object')return{};return _0x35e04f;}catch{return{};}}async function writeUpdateNoticeCache(_0x3145ae){const _0x59a8ba=a153_0x6fef;try{const _0x31cf3a=getUpdateNoticeCachePath();await mkdir(dirname(_0x31cf3a),{'recursive':!![]}),await writeFile(_0x31cf3a,JSON['stringify'](_0x3145ae,null,0x2)+'\x0a',_0x59a8ba(0x170));}catch{}}function a153_0x6fef(_0x518680,_0x2feec7){_0x518680=_0x518680-0x15d;const _0x2f8c8d=a153_0x2f8c();let _0x6fef54=_0x2f8c8d[_0x518680];return _0x6fef54;}function isFreshCheck(_0x35b587,_0x4f6f8a){const _0x37e25e=a153_0x6fef;return typeof _0x35b587[_0x37e25e(0x176)]===_0x37e25e(0x163)&&_0x4f6f8a-_0x35b587[_0x37e25e(0x176)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3be899,_0x17f313,_0x42dc65){const _0x389e89=a153_0x6fef;return _0x3be899[_0x389e89(0x16d)]===_0x17f313&&typeof _0x3be899['lastNotifiedAt']==='number'&&_0x42dc65-_0x3be899['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x1d0802=0x5dc){const _0x7a9d89=a153_0x6fef;try{const _0x5e025d=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x7a9d89(0x15e),_0x4659d2=await fetch(_0x5e025d,{'signal':AbortSignal[_0x7a9d89(0x175)](_0x1d0802)});if(!_0x4659d2['ok'])return null;const _0x34baca=await _0x4659d2['json']();if(!_0x34baca||typeof _0x34baca!==_0x7a9d89(0x16e))return null;return Object[_0x7a9d89(0x172)](Object['entries'](_0x34baca)[_0x7a9d89(0x17b)](([,_0x193676])=>typeof _0x193676===_0x7a9d89(0x179)&&_0x193676[_0x7a9d89(0x177)]())[_0x7a9d89(0x178)](([_0x580bb7,_0x2df473])=>[_0x580bb7,String(_0x2df473)[_0x7a9d89(0x177)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x242e20){const _0x2403cb=a153_0x6fef;return _0x2403cb(0x15f)+LOVRABET_NPM_PACKAGE_NAME+_0x2403cb(0x17a)+_0x242e20;}export async function resolveLatestUpdateNotice(){const _0x48e4f9=a153_0x6fef;if(isUpdateNoticeDisabled())return null;try{const _0x586937=Date[_0x48e4f9(0x15d)](),_0x52e02f=getCliVersion(),_0x4f03f9=await readUpdateNoticeCache();let _0x27b3f2=isFreshCheck(_0x4f03f9,_0x586937)?_0x4f03f9[_0x48e4f9(0x16b)]?.['trim']():undefined;if(!_0x27b3f2&&!isFreshCheck(_0x4f03f9,_0x586937)){const _0x5a3af2=await fetchNpmDistTags();_0x27b3f2=_0x5a3af2?.['latest']?.['trim'](),await writeUpdateNoticeCache({..._0x4f03f9,'checkedAt':_0x586937,'latest':_0x27b3f2,'failed':!_0x27b3f2});}if(!_0x27b3f2||compareSemver(_0x52e02f,_0x27b3f2)>=0x0)return null;if(isRecentlyNotified(_0x4f03f9,_0x27b3f2,_0x586937))return null;const _0x3fcb27=CLI_BIN_NAME+_0x48e4f9(0x174);return await writeUpdateNoticeCache({..._0x4f03f9,'checkedAt':isFreshCheck(_0x4f03f9,_0x586937)?_0x4f03f9['checkedAt']:_0x586937,'latest':_0x27b3f2,'failed':![],'lastNotifiedVersion':_0x27b3f2,'lastNotifiedAt':_0x586937}),{'command':_0x3fcb27,'current':_0x52e02f,'latest':_0x27b3f2,'url':buildNpmVersionUrl(_0x27b3f2),'message':CLI_BIN_NAME+'\x20'+_0x27b3f2+'\x20available,\x20current\x20'+_0x52e02f+',\x20run:\x20'+_0x3fcb27};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b038b,_0x42a6a3){const _0x3c46fa=a154_0x4e2d,_0x3b1e76=_0x5b038b();while(!![]){try{const _0x250e69=-parseInt(_0x3c46fa(0x1d7))/0x1*(-parseInt(_0x3c46fa(0x1d8))/0x2)+-parseInt(_0x3c46fa(0x1ce))/0x3*(parseInt(_0x3c46fa(0x1d6))/0x4)+parseInt(_0x3c46fa(0x1d0))/0x5+parseInt(_0x3c46fa(0x1d4))/0x6+-parseInt(_0x3c46fa(0x1d2))/0x7+-parseInt(_0x3c46fa(0x1d5))/0x8+parseInt(_0x3c46fa(0x1d1))/0x9;if(_0x250e69===_0x42a6a3)break;else _0x3b1e76['push'](_0x3b1e76['shift']());}catch(_0x3b3c8b){_0x3b1e76['push'](_0x3b1e76['shift']());}}}(a154_0x26ef,0x95dc9));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x213ebb=a154_0x4e2d,_0x2c19e6=String(GIT_COMMIT);return _0x2c19e6&&_0x2c19e6!==_0x213ebb(0x1d3)?_0x2c19e6:'';}export function getCliVersionDisplay(){const _0x525ac6=a154_0x4e2d,_0x30ccd2=getCliGitCommit(),_0x46d6bb=BUILD_TIME[_0x525ac6(0x1cf)](0x0,0xa);if(!_0x30ccd2||!_0x46d6bb)return VERSION;return VERSION+'\x20('+_0x30ccd2+',\x20'+_0x46d6bb+')';}function a154_0x4e2d(_0x29d7d8,_0x3559a8){_0x29d7d8=_0x29d7d8-0x1ce;const _0x26efc8=a154_0x26ef();let _0x4e2d75=_0x26efc8[_0x29d7d8];return _0x4e2d75;}function a154_0x26ef(){const _0x2ef2c7=['13535982tvVvbv','2117472hOuFqg','unknown','5840874VbROuC','8319984BztZWM','1428xHpAJI','1XnFjox','289886NLwmtf','5667yuHwUm','slice','41400IDULrd'];a154_0x26ef=function(){return _0x2ef2c7;};return a154_0x26ef();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x11eb45,_0xacf08b){var _0x528ef2=a155_0x517e,_0x3226cf=_0x11eb45();while(!![]){try{var _0x18944e=-parseInt(_0x528ef2(0x110))/0x1*(parseInt(_0x528ef2(0x10d))/0x2)+-parseInt(_0x528ef2(0x105))/0x3+parseInt(_0x528ef2(0x10c))/0x4+-parseInt(_0x528ef2(0x10f))/0x5*(-parseInt(_0x528ef2(0x10a))/0x6)+-parseInt(_0x528ef2(0x106))/0x7*(-parseInt(_0x528ef2(0x109))/0x8)+-parseInt(_0x528ef2(0x107))/0x9+-parseInt(_0x528ef2(0x10b))/0xa;if(_0x18944e===_0xacf08b)break;else _0x3226cf['push'](_0x3226cf['shift']());}catch(_0x56f78d){_0x3226cf['push'](_0x3226cf['shift']());}}}(a155_0x29de,0x2cc03));export function writeCliSideChannelLine(_0x358e29){var _0x3f94a3=a155_0x517e;process[_0x3f94a3(0x10e)][_0x3f94a3(0x108)](_0x358e29+'\x0a');}function a155_0x517e(_0x435db5,_0x1b6148){_0x435db5=_0x435db5-0x105;var _0x29de12=a155_0x29de();var _0x517e67=_0x29de12[_0x435db5];return _0x517e67;}function a155_0x29de(){var _0x4d4d99=['977108TIfrDs','6VebHdR','stderr','5ZsCMPP','34249etunfj','694905aPhRlX','84UFBaNM','937629FZWrUa','write','113536Dnycxi','1611684nKtbZj','613330BJWYgV'];a155_0x29de=function(){return _0x4d4d99;};return a155_0x29de();}
|
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.4
|
|
5
|
-
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、personal BFF
|
|
4
|
+
version: 2.2.4
|
|
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、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、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"]
|
|
@@ -326,7 +326,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
326
326
|
| **personal-bff** | `exec` | 按已知 ID 执行 personal BFF | write | AK |
|
|
327
327
|
| **file** | `upload` | 上传本地文件到当前运行态应用 | read | AK |
|
|
328
328
|
| **file** | `query-url` | 查询已上传文件的访问 URL,默认短效,可显式 3 年长期 | read | AK |
|
|
329
|
-
| **ocr** | `recognize` |
|
|
329
|
+
| **ocr** | `recognize` | 提取票证类业务材料中的文字与结构化字段 | read | AK |
|
|
330
330
|
| **kb** | `list` | 查看 personal 知识库条目 | read | AK |
|
|
331
331
|
| **kb** | `detail` | 查看 personal 知识库正文与 RAG 状态 | read | AK |
|
|
332
332
|
| **kb** | `create` | 从本地文件创建 personal 知识库 | write | AK |
|
|
@@ -539,7 +539,7 @@ lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
|
|
|
539
539
|
|
|
540
540
|
## OCR 识别工作流
|
|
541
541
|
|
|
542
|
-
`lovrabet ocr recognize`
|
|
542
|
+
`lovrabet ocr recognize` 面向发票、票据、证照等票证类业务材料的文字与结构化字段提取,不承接通用图片理解。普通照片、截图、商品图、设计稿或图表优先由 Agent 多模态能力处理;模型不能读取通用图片时,只有用户明确需要提取可见文字才使用 OCR 降级。当前服务端 `/client/ocr` 只接受 URL,识别本地文件时 CLI 会按上传、查询短效 URL、OCR 的顺序串联执行;OCR 中间 URL 不使用 `--long-term`。需要把识别结果写入数据集时,先用 `dataset detail` 确认字段,再按 `data create/update` 的 dry-run 和确认规则执行。详见 [OCR 识别工作流](references/lovrabet-ocr-workflow.md)。
|
|
543
543
|
|
|
544
544
|
## 定时任务工作流
|
|
545
545
|
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# OCR 识别工作流
|
|
2
2
|
|
|
3
|
-
`ocr`
|
|
3
|
+
`ocr` 命令用于提取远程 URL 或本地票证类业务材料中的文字与结构化字段。发票、票据、证照等是典型示例,不是票证类型的封闭白名单。
|
|
4
|
+
|
|
5
|
+
## 使用边界
|
|
6
|
+
|
|
7
|
+
图片本身不是 OCR 的触发条件。先判断用户处理的是否为票证类业务材料,再判断需要的是文字或结构化字段,还是通用画面理解。
|
|
8
|
+
|
|
9
|
+
| 任务 | 处理方式 |
|
|
10
|
+
|------|----------|
|
|
11
|
+
| 提取票证类材料的票面全文、关键字段或表格 | 使用 OCR;不要求用户必须说出“OCR” |
|
|
12
|
+
| 用户明确要求对票证材料执行 OCR 或文字识别 | 使用 OCR |
|
|
13
|
+
| 理解普通照片、UI 截图、商品图、设计稿或图表 | 当前模型支持多模态时由 Agent 直接处理,不调用 OCR |
|
|
14
|
+
| 当前模型不能读取通用图片,但用户只要求提取可见文字 | 仅将 OCR 作为明确的文字提取降级能力,并说明限制 |
|
|
15
|
+
| 当前模型不能读取图片,任务依赖物体、颜色、布局或视觉关系 | 不用 OCR 冒充视觉理解,向用户说明能力限制 |
|
|
16
|
+
| 图片只是附件,用户没有要求分析或提取 | 不调用 OCR |
|
|
17
|
+
|
|
18
|
+
按业务对象和任务输出路由,不按文件名、扩展名、MIME、某组关键词或 `scene` 枚举路由。已明确需要精确票证提取时可以直接使用专业 OCR,不必先做一次重复的多模态识别。`general` 是兼容的通用文字识别 scene,可用于未被专用 scene 覆盖的票证材料或用户明确要求的纯文字降级;它不是通用图片理解入口。
|
|
4
19
|
|
|
5
20
|
## 命令概览
|
|
6
21
|
|
|
@@ -22,7 +37,7 @@ OCR 识别不创建、更新或删除业务数据,因此 `ocr recognize` 的
|
|
|
22
37
|
| scene | 适用 |
|
|
23
38
|
|-------|------|
|
|
24
39
|
| `invoice` | 发票、票据 |
|
|
25
|
-
| `general` |
|
|
40
|
+
| `general` | 票证材料的通用文字识别;非通用图片理解 |
|
|
26
41
|
| `form` | 表格图片 |
|
|
27
42
|
| `idCard` | 证照、身份类图片 |
|
|
28
43
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.2.4
|
|
6
|
-
"skillVersion": "2.2.4
|
|
5
|
+
"packageVersion": "2.2.4",
|
|
6
|
+
"skillVersion": "2.2.4",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"references/lovrabet-user-account.md",
|
|
38
38
|
"references/lovrabet-workspace.md"
|
|
39
39
|
],
|
|
40
|
-
"digest": "
|
|
40
|
+
"digest": "0adedb098425ac827f3f356347a5b5378f9951f92ce27f4817aba57d4f827d0a"
|
|
41
41
|
}
|