@lovrabet/lovrabet-cli 2.3.10 → 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.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 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b58e2,_0x3d8fe4){const _0x5ad971=a181_0x5e61,_0x3e1dff=_0x2b58e2();while(!![]){try{const _0x32fd8a=parseInt(_0x5ad971(0xc0))/0x1*(parseInt(_0x5ad971(0xcd))/0x2)+-parseInt(_0x5ad971(0xc2))/0x3*(parseInt(_0x5ad971(0xca))/0x4)+parseInt(_0x5ad971(0xbb))/0x5+parseInt(_0x5ad971(0xcc))/0x6*(parseInt(_0x5ad971(0xbd))/0x7)+parseInt(_0x5ad971(0xce))/0x8*(parseInt(_0x5ad971(0xd4))/0x9)+-parseInt(_0x5ad971(0xc6))/0xa+parseInt(_0x5ad971(0xd0))/0xb*(parseInt(_0x5ad971(0xd1))/0xc);if(_0x32fd8a===_0x3d8fe4)break;else _0x3e1dff['push'](_0x3e1dff['shift']());}catch(_0x3f3530){_0x3e1dff['push'](_0x3e1dff['shift']());}}}(a181_0x5bdc,0xd76c2));import{mkdir,readFile,writeFile}from'node:fs/promises';function a181_0x5bdc(){const _0x117694=['stableVersion','13659410RIlHPy','parse','https://www.npmjs.com/package/','/v/','112KGFgjX','true','26868HSKEHC','9636jrVmmM','8096yJDRfJ','number','1004399MUhnec','204HzdFTh','now','trim','711VrGfwF','lovrabet-cli','filter','stringify','join','currentVersion','upgradeMessage','belowMinimum','1849770HFiLia','toLowerCase','1778bFkyGy','object',',\x20run:\x20','34bUkkYO','lastNotifiedAt','113043Tnjncy','.cache','utf8'];a181_0x5bdc=function(){return _0x117694;};return a181_0x5bdc();}import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x4c06bb=a181_0x5e61,_0x6711a4=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x4c06bb(0xd3)]()[_0x4c06bb(0xbc)]();return _0x6711a4==='1'||_0x6711a4===_0x4c06bb(0xcb)||_0x6711a4==='yes';}function a181_0x5e61(_0x366884,_0x43f597){_0x366884=_0x366884-0xb5;const _0x5bdcb1=a181_0x5bdc();let _0x5e61e0=_0x5bdcb1[_0x366884];return _0x5e61e0;}function cacheRoot(){const _0x525358=a181_0x5e61;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x525358(0xc3));}export function getUpdateNoticeCachePath(){const _0x286d7c=a181_0x5e61;return join(cacheRoot(),_0x286d7c(0xd5),'update-check.json');}async function readUpdateNoticeCache(){const _0x1f662e=a181_0x5e61;try{const _0x37375c=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x5c2c4f=JSON[_0x1f662e(0xc7)](_0x37375c);if(!_0x5c2c4f||typeof _0x5c2c4f!==_0x1f662e(0xbe))return{};return _0x5c2c4f;}catch{return{};}}async function writeUpdateNoticeCache(_0x1bf729){const _0x364c19=a181_0x5e61;try{const _0x2c4fdc=getUpdateNoticeCachePath();await mkdir(dirname(_0x2c4fdc),{'recursive':!![]}),await writeFile(_0x2c4fdc,JSON[_0x364c19(0xb6)](_0x1bf729,null,0x2)+'\x0a',_0x364c19(0xc4));}catch{}}function isRecentlyNotified(_0x21d91e,_0x2f5cad,_0x25b3bc){const _0xecf46a=a181_0x5e61;return _0x21d91e['lastNotifiedVersion']===_0x2f5cad&&typeof _0x21d91e[_0xecf46a(0xc1)]===_0xecf46a(0xcf)&&_0x25b3bc-_0x21d91e[_0xecf46a(0xc1)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1646ef){const _0x58bbb3=a181_0x5e61;return _0x58bbb3(0xc8)+LOVRABET_NPM_PACKAGE_NAME+_0x58bbb3(0xc9)+_0x1646ef;}export async function resolveLatestUpdateNotice(_0xcafc23){const _0x41842c=a181_0x5e61;if(isUpdateNoticeDisabled())return null;try{const _0x5eddc5=Date[_0x41842c(0xd2)](),_0x35e819=_0xcafc23??await checkCliVersion(),_0xafc019=_0x35e819[_0x41842c(0xb8)],_0x58746a=_0x35e819[_0x41842c(0xc5)],_0x4fbe80=await readUpdateNoticeCache();if(!_0x58746a||!_0x35e819['needsUpgrade']||_0x35e819[_0x41842c(0xba)])return null;if(isRecentlyNotified(_0x4fbe80,_0x58746a,_0x5eddc5))return null;const _0x4444ae=getCliUpgradeCommand(_0x35e819);return await writeUpdateNoticeCache({..._0x4fbe80,'checkedAt':_0x5eddc5,'latest':_0x58746a,'failed':![],'lastNotifiedVersion':_0x58746a,'lastNotifiedAt':_0x5eddc5}),{'command':_0x4444ae,'current':_0xafc019,'latest':_0x58746a,'url':buildNpmVersionUrl(_0x58746a),'message':[_0x35e819[_0x41842c(0xb9)],CLI_BIN_NAME+'\x20'+_0x58746a+'\x20is\x20recommended,\x20current\x20'+_0xafc019+_0x41842c(0xbf)+_0x4444ae][_0x41842c(0xb5)](Boolean)[_0x41842c(0xb7)]('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a182_0x3b7e(_0x285bf8,_0x4e6f74){_0x285bf8=_0x285bf8-0x1d0;const _0x412ab8=a182_0x412a();let _0x3b7edc=_0x412ab8[_0x285bf8];return _0x3b7edc;}(function(_0x2acc10,_0x2f1361){const _0x442d58=a182_0x3b7e,_0xea4b93=_0x2acc10();while(!![]){try{const _0x1634f4=parseInt(_0x442d58(0x1df))/0x1*(-parseInt(_0x442d58(0x1da))/0x2)+parseInt(_0x442d58(0x1d9))/0x3*(-parseInt(_0x442d58(0x1d7))/0x4)+parseInt(_0x442d58(0x1d2))/0x5*(-parseInt(_0x442d58(0x1d0))/0x6)+-parseInt(_0x442d58(0x1d8))/0x7*(parseInt(_0x442d58(0x1d6))/0x8)+-parseInt(_0x442d58(0x1dc))/0x9*(-parseInt(_0x442d58(0x1d5))/0xa)+-parseInt(_0x442d58(0x1d1))/0xb*(-parseInt(_0x442d58(0x1db))/0xc)+parseInt(_0x442d58(0x1de))/0xd*(parseInt(_0x442d58(0x1d3))/0xe);if(_0x1634f4===_0x2f1361)break;else _0xea4b93['push'](_0xea4b93['shift']());}catch(_0x459c4b){_0xea4b93['push'](_0xea4b93['shift']());}}}(a182_0x412a,0x81fe2));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x377050=a182_0x3b7e,_0x477c72=String(GIT_COMMIT);return _0x477c72&&_0x477c72!==_0x377050(0x1dd)?_0x477c72:'';}export function getCliVersionDisplay(){const _0x2cb645=a182_0x3b7e,_0x5f1224=getCliGitCommit(),_0x41cc16=BUILD_TIME[_0x2cb645(0x1d4)](0x0,0xa);if(!_0x5f1224||!_0x41cc16)return VERSION;return VERSION+'\x20('+_0x5f1224+',\x20'+_0x41cc16+')';}function a182_0x412a(){const _0x43352f=['8qmSqNf','4cLRHgc','6458123dRPkJF','2008413GjTmKo','886dkUhwC','24PVBGRo','1588104UiWfrg','unknown','130BtLfRi','1997uPFPGV','510brWrxh','4828417olwurD','43525aixbFs','3525620NQqaff','slice','20RPFVYT'];a182_0x412a=function(){return _0x43352f;};return a182_0x412a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a183_0x55c3(_0x22cadc,_0x5f0022){_0x22cadc=_0x22cadc-0x150;var _0x6952e2=a183_0x6952();var _0x55c300=_0x6952e2[_0x22cadc];return _0x55c300;}(function(_0x22048d,_0x514478){var _0x2c5886=a183_0x55c3,_0x348dbf=_0x22048d();while(!![]){try{var _0x572760=parseInt(_0x2c5886(0x15a))/0x1*(-parseInt(_0x2c5886(0x151))/0x2)+-parseInt(_0x2c5886(0x150))/0x3*(parseInt(_0x2c5886(0x156))/0x4)+-parseInt(_0x2c5886(0x152))/0x5+parseInt(_0x2c5886(0x159))/0x6+parseInt(_0x2c5886(0x157))/0x7*(parseInt(_0x2c5886(0x155))/0x8)+-parseInt(_0x2c5886(0x153))/0x9+parseInt(_0x2c5886(0x154))/0xa;if(_0x572760===_0x514478)break;else _0x348dbf['push'](_0x348dbf['shift']());}catch(_0xef88b1){_0x348dbf['push'](_0x348dbf['shift']());}}}(a183_0x6952,0x31a37));export function writeCliSideChannelLine(_0x56d77f){var _0x33481a=a183_0x55c3;process['stderr'][_0x33481a(0x158)](_0x56d77f+'\x0a');}function a183_0x6952(){var _0x28d918=['4uYhhBv','1294180kdLcJV','304839WfHrzg','5835250DhHlnZ','2553304ZWSIJJ','16YPWQnV','7jxBkAb','write','1757784sjveHp','194767yoeBAt','232569YonnRB'];a183_0x6952=function(){return _0x28d918;};return a183_0x6952();}
|
package/package.json
CHANGED
package/skills/lovrabet/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lovrabet
|
|
3
3
|
displayName: Lovrabet 运行态 CLI
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.11
|
|
5
5
|
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、API 文档发现、数据集查询、Instant API 数据操作、可恢复 Excel 导入、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、审批待办与任务办理、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、api-doc、dataset、data filter、Excel 导入、data import-excel、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、approval、审批、待办、approve、reject、transfer、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
|
|
6
6
|
metadata:
|
|
7
7
|
requires:
|
|
@@ -379,7 +379,7 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
|
|
|
379
379
|
| 删除计划 | `lovrabet schedule delete --schedule-id <SCHEDULE_ID> --dry-run`,确认后加 `--yes` |
|
|
380
380
|
|
|
381
381
|
创建、立即运行和删除前,读取
|
|
382
|
-
[定时任务工作流](references/lovrabet-schedule-workflow.md)
|
|
382
|
+
[定时任务工作流](references/lovrabet-schedule-workflow.md)。创建前必须先完成其中的「检查任务能否无人值守完整执行」:从 `lovrabet schema` 导出 `risk == "read"` 的完整命令集合,确认 prompt 的完整执行流程(含条件分支、清理和自停步骤)不依赖 `write`/`high-risk-write` 命令或人工交互。
|
|
383
383
|
|
|
384
384
|
### 文件上传
|
|
385
385
|
|
|
@@ -463,7 +463,7 @@ lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
|
|
|
463
463
|
|
|
464
464
|
## 定时任务工作流
|
|
465
465
|
|
|
466
|
-
`lovrabet schedule` 用于校验、创建、查询、立即运行和删除当前应用下的 UTC
|
|
466
|
+
`lovrabet schedule` 用于校验、创建、查询、立即运行和删除当前应用下的 UTC 定时任务。定时任务无人值守自动执行:创建前必须先完成任务能力检查——从 `lovrabet schema` 导出 `risk == "read"` 的完整命令集合,确认完整执行流程(含条件分支、异常处理、通知、清理和自停步骤)不依赖 `write`/`high-risk-write` 命令或人工交互;`schedule validate` 只校验字段、时间、模型和 prompt 格式,不检查能力依赖。随后核对应用、执行时间、重复规则、标题、完整 prompt 和 model;创建、立即运行和删除都先执行 `--dry-run`,取得用户明确确认后再执行。详见 [定时任务工作流](references/lovrabet-schedule-workflow.md)。
|
|
467
467
|
|
|
468
468
|
## 应用级通知配置查询
|
|
469
469
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 创建和管理定时任务
|
|
2
2
|
|
|
3
|
-
使用 `lovrabet schedule`
|
|
3
|
+
使用 `lovrabet schedule` 校验、创建、查看、立即运行和删除当前应用的定时任务。定时任务到点无人值守自动执行,创建前必须先通过「检查任务能否无人值守完整执行」。
|
|
4
4
|
|
|
5
5
|
## 准备定时任务
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- 使用 `--model` 选择执行模型;默认 `deepseek-v4-flash-0731`,也可显式选择 `kimi/k3` 或 `deepseek-v4-pro-0813`。
|
|
13
13
|
- prompt 是完整、可重复执行的任务说明,不依赖当前对话中的临时上下文。
|
|
14
14
|
- prompt 不包含 AccessKey、密码或其他明文凭证。
|
|
15
|
+
- 任务的完整执行流程已通过「检查任务能否无人值守完整执行」,所需能力全部在 `{read}` 集合内。
|
|
15
16
|
|
|
16
17
|
定时任务分为:
|
|
17
18
|
|
|
@@ -26,6 +27,51 @@ minute hour day-of-month month day-of-week
|
|
|
26
27
|
|
|
27
28
|
支持数字、`*`、范围、列表和 step。不要使用秒字段、月份英文名或星期英文名。
|
|
28
29
|
|
|
30
|
+
## 检查任务能否无人值守完整执行
|
|
31
|
+
|
|
32
|
+
定时任务到点自动执行,没有用户在场确认、审批或补充信息;流程走到需要人工的步骤时无法继续,整次执行会失败。创建前必须确认:任务的完整执行流程可以由当前 CLI 标记为 `risk: "read"` 的能力完成。下文把 `lovrabet schema` 中 `risk == "read"` 的完整命令集合称为 `{read}` 能力集合。
|
|
33
|
+
|
|
34
|
+
`schedule validate` 只校验字段、时间、模型和 prompt 格式,不检查任务的能力依赖,不能替代本检查。
|
|
35
|
+
|
|
36
|
+
### 获取 `{read}` 能力集合
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
lovrabet schema --format compress --jq '[.data.services[] as $s | $s.commands[] | select(.risk == "read") | {service: $s.service, command}]'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- 同时记录同一输出中的 `cli.version` 和 `schemaVersion`,作为本次判断的依据。不同环境安装的 CLI 版本可能不同;不沿用其他环境的结论,不把某个版本的命令数量或清单当成固定事实。
|
|
43
|
+
- 过滤结果是完整可选范围,由任务需求选择必要子集;不要求任务用上全部命令,也不得自行缩小成“查询类命令”或固定的小清单。
|
|
44
|
+
- 按 `risk` 标签判断,不按命令名或副作用直觉判断:`skill install`、`skill create`、`file upload`、`sql exec`、`bff exec` 当前都标记为 `read`,不会因为会安装文件、执行脚本或产生业务产物而被排除;`schedule delete` 是 `high-risk-write`,不会因为用途是清理而被当作 `read`。
|
|
45
|
+
- 命令缺失 `risk`、值未知,或 schema 无法读取时,该命令按不可用处理,不猜为 `read`;未完成本检查前不进入创建。
|
|
46
|
+
- 需要某个命令的参数、认证或适用范围时,读取完整 schema 输出和该命令的 `--help`,不凭记忆推断。
|
|
47
|
+
- `{read}` 标签只界定无人值守任务的可选工具集合,不替代身份、RBAC、应用权限、业务授权和可信契约验证;`sql exec`、`bff exec` 等仍须遵循 SKILL.md 的标识来源与契约要求。
|
|
48
|
+
|
|
49
|
+
### 审查完整任务流程
|
|
50
|
+
|
|
51
|
+
对照 prompt 审查任务的完整执行流程,覆盖所有条件分支、异常与降级处理、到期或超时处理、通知、清理和自停步骤;不能只审查正常分支,也不能只看任务标题。仅某个条件分支需要的能力不合格时,同样判为不能创建。
|
|
52
|
+
|
|
53
|
+
任务流程不得依赖:
|
|
54
|
+
|
|
55
|
+
- `write` 或 `high-risk-write` 命令,例如 `schedule delete`、`schedule run`、`data delete`、重新创建计划或其他带 `--yes` 的管理执行。
|
|
56
|
+
- 人工确认、人工审批或在场用户补充数据。
|
|
57
|
+
- 创建时对话中的临时上下文。
|
|
58
|
+
|
|
59
|
+
不满足时,创建前向用户指出具体能力缺口——哪个步骤需要什么能力、为什么当前 `{read}` 集合没有——并停止创建。不接受“创建时用户确认过一次,未来自动执行均已授权”的推断,也不通过删除约束、省略用户要求或换一种描述,把不能完整执行的任务包装成可创建。
|
|
60
|
+
|
|
61
|
+
### 创建行为与自动执行行为
|
|
62
|
+
|
|
63
|
+
创建 schedule 本身是需要用户确认的 `high-risk-write` 管理操作,沿用本工作流的 dry-run 与确认流程;这不禁止用户正常创建合格的 `{read}` 任务。本节约束的是计划将来自动运行的任务内容,不是创建动作本身。
|
|
64
|
+
|
|
65
|
+
### 计划生命周期需求
|
|
66
|
+
|
|
67
|
+
用户要求“条件满足后自动停止”“到期自动清理”“自动删除本计划”这类行为时,先核对当前 CLI 是否提供可用的计划生命周期能力。当前 schedule 只有 validate/create/list/detail/run/delete,没有条件停用、到期清理或自动停用命令。
|
|
68
|
+
|
|
69
|
+
没有可用能力时,如实说明该完整需求当前不支持,并提出需要用户确认的替代方案,例如:计划持续运行并按周期报告结果,由用户确认后删除计划;或改用单次 `ONCE` 任务表达一次性检查。不要把删除或重建计划等管理动作写进运行 prompt,交给执行中的任务自行处理。
|
|
70
|
+
|
|
71
|
+
### 检查的边界
|
|
72
|
+
|
|
73
|
+
本检查是创建前的决策指引,不是运行时强制;不要向用户声称本工作流能在技术上保证自动执行时永远不会调用非 `read` 命令。执行结果仍按「检查完成结果」回读与披露。
|
|
74
|
+
|
|
29
75
|
## 校验周期任务
|
|
30
76
|
|
|
31
77
|
先校验输入,不创建计划:
|
|
@@ -58,6 +104,8 @@ lovrabet schedule validate \
|
|
|
58
104
|
|
|
59
105
|
## 创建定时任务
|
|
60
106
|
|
|
107
|
+
只有「检查任务能否无人值守完整执行」通过后才进入本节。
|
|
108
|
+
|
|
61
109
|
先预览:
|
|
62
110
|
|
|
63
111
|
```bash
|
|
@@ -175,6 +223,7 @@ Task 已取消”。
|
|
|
175
223
|
|
|
176
224
|
## 检查完成结果
|
|
177
225
|
|
|
226
|
+
- 创建前已记录能力检查结论:使用的 `cli.version`、`schemaVersion` 和判断结果。
|
|
178
227
|
- create 返回真实 `scheduleId`。
|
|
179
228
|
- list 或 detail 能查到新计划。
|
|
180
229
|
- run 返回 `taskId` 时只报告已进入队列。
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.3.
|
|
6
|
-
"skillVersion": "2.3.
|
|
5
|
+
"packageVersion": "2.3.11",
|
|
6
|
+
"skillVersion": "2.3.11",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"references/lovrabet-user-account.md",
|
|
43
43
|
"references/lovrabet-workspace.md"
|
|
44
44
|
],
|
|
45
|
-
"digest": "
|
|
45
|
+
"digest": "2a5a028418c12b245677053a925e267d4ec8e049a48a4476482fb03c5f8b7eb2"
|
|
46
46
|
}
|