Skip to content

feat(cron): apply configured default tools before approval - #187798

Merged
giodl73-repo merged 5 commits into
mainfrom
fix/routine-default-tools
Oct 29, 2026
Merged

giodl73-repo merged 5 commits into
mainfrom
fix/routine-default-tools

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #187767.

What Problem This Solves

An automation created with an explicit tool list can omit a prerequisite such as read, leaving it unable to follow its instructions when it runs.

User Impact

Operators can configure cron.defaultTools. For example, ["execute_code"] becomes ["execute_code", "read"] before the existing creator-capability and approval checks. Defaults never grant unavailable tools. The request-level toolsAllowMode: "exact" opts out, and [] remains tool-less.

Unset configuration, omitted/null selections, saved jobs, unrelated edits, CLI/direct Gateway writes, and already approved request shapes keep their existing behavior. Existing automations need an intentional tool-selection revision. Hosts must integrate and enable the setting separately.

Why This Change Was Made

One pure resolver serves the native automation tool and the narrow openclaw/plugin-sdk/cron-tool-defaults subpath so hosts can construct the same selection before binding approval. Only the concrete selection is persisted; execution-authority provenance is unchanged.

The optional configuration adds two core schema paths (array and item). SDK budgets increase only by the approved one subpath, two exports and one callable. Supporting repairs keep generated snapshots portable on Windows, update the browser test fixture for its existing navigation contract, and use the emitter's canonical path key when rendering SDK declarations. They do not change production browser guards or expand tool permissions.

Evidence

  • Native add/update reproductions failed before the fix; all 13 final native cases pass, including creator restrictions, exact/empty selections, flat requests and unrelated edits. Config (68), schema (45), SDK resolver (2), prompt snapshots (13) and affected browser fixture (10) cases passed on their recorded source revisions; subsequent repairs preserve those inputs.
  • The existing real-emission fixture reproduced the Windows declaration lookup failure. The repaired owner suite passed 20 tests with one existing Windows process-join skip. Scoped formatting, generated config documentation and SDK export registration checks passed.
  • Independent local Codex review through P2 covered the production change and each subsequent repair with no actionable findings. Local ClawSweeper reviewed the production range with no actionable correctness or security findings. Hosted ClawSweeper's input-safety rejection is not a review verdict and was not overridden.
  • Final-head canonical SDK comparison completed with exit 0 and successful cleanup at 2026-10-29 22:05 UTC: 20121545966a5212dc3783a0375333fb6cd29eeb to 47db914b3815620bc3bef787d6ea77fcd0450203. Acknowledgement: 7071bd34. One new subpath, two added exports, no removed entrypoints/exports or changed existing export signatures. The 963 reachable-export changes derive from five additive declaration changes: the resolver/type, its native adapter, and the optional configuration schema in two views.
  • Required CI is green on 47db914b3815620bc3bef787d6ea77fcd0450203, including CI gate, type/lint jobs, and dependency/security review. No manual CI retries were requested.

Known local limitation: the standalone SDK source-budget report counts 161 entrypoints / 3843 exports / 2227 callables against the narrowly adjusted ceilings 159 / 3824 / 2215. The base has 160 entrypoints against its prior ceiling of 158; exact aggregate base export/callable counts were not independently reproduced. The successful semantic comparison establishes only the intended additive API delta; this PR does not absorb aggregate excess into its budget. Some local typed-lint/type attempts were blocked by shared dependency or artifact-lock boundaries; final-head hosted type/lint checks passed. A live scheduled-model run and host enablement are not claimed.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts agents Agent runtime and tooling size: M labels Oct 29, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 29, 2026
@giodl73-repo
giodl73-repo marked this pull request as ready for review October 29, 2026 17:28
@giodl73-repo
giodl73-repo merged commit 7c3ae94 into main Oct 29, 2026
249 of 250 checks passed
@giodl73-repo
giodl73-repo deleted the fix/routine-default-tools branch October 29, 2026 22:27
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
…187798)

* feat(cron): apply configured default tools before approval

* chore(sdk): budget the approved cron tool defaults API

* test(cron): refresh default-tool snapshots and repair portable generation

* test(browser): model CDP events in WebAuthn fixture

* fix(plugin-sdk): canonicalize emitted declaration lookup

---------

Co-authored-by: Gio Della-Libera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: browser scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Configurable default tools for newly constructed automations

1 participant