feat: lightweight bootstrap context mode for heartbeat/cron runs (openclaw#26064) thanks @jose-velez
Verified: - pnpm build - pnpm check (fails on pre-existing unrelated repo issues in extensions/diffs and src/agents/tools/nodes-tool.test.ts) - pnpm vitest run src/agents/bootstrap-files.test.ts src/infra/heartbeat-runner.model-override.test.ts src/cli/cron-cli.test.ts - pnpm test:macmini (fails on pre-existing extensions/diffs import errors; touched suites pass) Co-authored-by: jose-velez <10926182+jose-velez@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -84,6 +84,7 @@ export function registerCronAddCommand(cron: Command) {
|
||||
.option("--thinking <level>", "Thinking level for agent jobs (off|minimal|low|medium|high)")
|
||||
.option("--model <model>", "Model override for agent jobs (provider/model or alias)")
|
||||
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
|
||||
.option("--light-context", "Use lightweight bootstrap context for agent jobs", false)
|
||||
.option("--announce", "Announce summary to a chat (subagent-style)", false)
|
||||
.option("--deliver", "Deprecated (use --announce). Announces a summary to a chat.")
|
||||
.option("--no-deliver", "Disable announce delivery and skip main-session summary")
|
||||
@@ -189,6 +190,7 @@ export function registerCronAddCommand(cron: Command) {
|
||||
: undefined,
|
||||
timeoutSeconds:
|
||||
timeoutSeconds && Number.isFinite(timeoutSeconds) ? timeoutSeconds : undefined,
|
||||
lightContext: opts.lightContext === true ? true : undefined,
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ export function registerCronEditCommand(cron: Command) {
|
||||
.option("--thinking <level>", "Thinking level for agent jobs")
|
||||
.option("--model <model>", "Model override for agent jobs")
|
||||
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
|
||||
.option("--light-context", "Enable lightweight bootstrap context for agent jobs")
|
||||
.option("--no-light-context", "Disable lightweight bootstrap context for agent jobs")
|
||||
.option("--announce", "Announce summary to a chat (subagent-style)")
|
||||
.option("--deliver", "Deprecated (use --announce). Announces a summary to a chat.")
|
||||
.option("--no-deliver", "Disable announce delivery")
|
||||
@@ -226,6 +228,7 @@ export function registerCronEditCommand(cron: Command) {
|
||||
Boolean(model) ||
|
||||
Boolean(thinking) ||
|
||||
hasTimeoutSeconds ||
|
||||
typeof opts.lightContext === "boolean" ||
|
||||
hasDeliveryModeFlag ||
|
||||
hasDeliveryTarget ||
|
||||
hasDeliveryAccount ||
|
||||
@@ -244,6 +247,12 @@ export function registerCronEditCommand(cron: Command) {
|
||||
assignIf(payload, "model", model, Boolean(model));
|
||||
assignIf(payload, "thinking", thinking, Boolean(thinking));
|
||||
assignIf(payload, "timeoutSeconds", timeoutSeconds, hasTimeoutSeconds);
|
||||
assignIf(
|
||||
payload,
|
||||
"lightContext",
|
||||
opts.lightContext,
|
||||
typeof opts.lightContext === "boolean",
|
||||
);
|
||||
patch.payload = payload;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user