Skip to content

refactor(cli): consolidate image option validation - #129463

Merged
steipete merged 1 commit into
mainfrom
codex/refactor-backup-command-dispatch
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/refactor-backup-command-dispatch

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Image-generation CLI options repeated the same lowercasing, allowed-value checks, and operator-facing error formatting in four separate validators, with four unnecessary type assertions.

Why This Change Was Made

Consolidate image output format, background, quality, and OpenAI moderation validation into one typed, image-owner-local helper. Reuse the existing human-readable list formatter so every allowed value, option default, case/whitespace normalization rule, provider payload, and exact existing rejection message stays unchanged.

User Impact

No user-visible behavior changes. Image commands retain the same options and errors while production code shrinks by 24 lines and the assertion-safety ratchet improves from 21 to 17.

Evidence

  • node scripts/run-vitest.mjs src/cli/capability-cli.test.ts src/cli/capability-cli.lazy.test.ts src/cli/cli-utils.test.ts: 243 tests passed, including valid image generation/edit options and all five exact invalid-option error messages.
  • Real Commander registration fingerprint is unchanged across all 24 audio, image, video, speech, web, and embedding command leaves, including all five image leaves, options, defaults, argument contracts, and help text.
  • ./node_modules/.bin/oxlint src/cli/capability-cli/image.ts passes; the assertion-safety ratchet, all changed-code guards, production typechecking, and core-test typechecking pass.
  • The frozen branch baseline predates the already-landed doctor-test lint fix on current main (ecf063), so the final whole-tree lint step reports the known unrelated src/commands/doctor-auth.profile-health.test.ts:179 missing-sort-comparator violation. No unrelated doctor code is changed here; the exact GitHub merge-ref CI must pass before landing.
  • Fresh automated review and separate independent source review report no findings.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 16:44
@steipete
steipete force-pushed the codex/refactor-backup-command-dispatch branch 2 times, most recently from 1e2f4db to fd1c96d Compare August 25, 2026 20:52
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 7:04 PM ET / 23:04 UTC.

ClawSweeper review

What this changes

The branch replaces four repeated image CLI validators with one typed helper and updates the assertion-safety baseline.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking code finding: the refactor preserves image-option normalization, unions, payload routing, and error text. This maintainer-authored PR remains behind main with failed exact-head checks, so it needs a refreshed branch and clean merge-result CI before landing.

Priority: P3
Reviewed head: fd1c96d75e438b6a839f3b13bbbe011f0a1e0fce

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation is coherent and well-covered by existing behavior tests; exact-head merge CI remains the material landing gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored internal refactor, so the external-contributor real-behavior-proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored internal refactor, so the external-contributor real-behavior-proof gate does not apply.
Evidence reviewed 6 items Current-main behavior: Current main still contains the four separate validators, so this cleanup is not already implemented.
Behavior-preserving helper: The PR normalizes through the existing lowercase coercion, matches only tuple values, and uses each pre-existing field-specific label.
Type and message contracts: The tuples match the image-generation unions, and the shared formatter produces the prior two-, three-, and four-value error wording.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw capability image generate --help

Result: PASS (completed)

$ node scripts/run-node.mjs capability image generate --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 110.96 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 14.4s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 4447ms (slowest: built plugin control-plane loads 3653ms)
│
◇

OpenClaw 2026.8.1 (fd1c96d) — All your chats, one OpenClaw.

Usage: openclaw infer image generate [options]

Generate images

Options:
  --agent ‹id›                 Agent whose saved provider auth is used (default: agents.defaults.systemAgent.agentId, then the sole agent)
  --aspect-ratio ‹ratio›       Aspect ratio hint like 16:9
  --background ‹value›         Background hint: transparent, opaque, or auto
  --count ‹n›                  Number of images
  -h, --help                   Display help for command
  --json                       Output JSON (default: false)
  --model ‹provid
… output truncated …

Assertions:

  • PASS expect_output: --output-format

How this fits together

OpenClaw’s image CLI converts command options into typed image-provider request fields. Invalid values stop before provider dispatch with operator-facing errors, while valid values flow to generation or edit providers.

flowchart LR
  A[Image CLI command] --> B[Raw option values]
  B --> C[Typed option validation]
  C --> D{Allowed normalized value?}
  D -->|yes| E[Image provider request]
  D -->|no| F[CLI error message]
  E --> G[Generated or edited image]
Loading

Before merge

  • Resolve merge risk (P1) - The branch must be refreshed without losing current-main assertion-baseline entries, then revalidated on an exact merge result; the supplied check rollup is not green.
  • Complete next step (P2) - The remaining action is normal maintainer merge preparation and exact-head CI validation, not a bounded repair job.
Agent review details

Security

None.

PR surface

Source -24, Other 0. Total -24 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 29 53 -24
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 2 30 54 -24

Review metrics

Metric Value Why it matters
Production vs support LOC production +29/-53 (net -24); assertion baseline +1/-1; tests +0/-0 The patch is a net-negative behavior-preserving extraction; the baseline change records the reduced assertion count.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase or otherwise refresh onto current main, retain both the assertion reduction and current baseline changes, then land once exact-head merge CI is green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase or otherwise refresh onto current main, retain both the assertion reduction and current baseline changes, then land once exact-head merge CI is green.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a behavior-preserving refactor, and the existing CLI boundary tests define the preserved contract.

Is this the best way to solve the issue?

Yes: the helper remains image-owner-local, eliminates repeated assertions, and retains the existing typed value sets and error contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5b0c094258bc.

Labels

Label justifications:

  • P3: This is a small internal CLI cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored internal refactor, so the external-contributor real-behavior-proof gate does not apply.

Evidence

What I checked:

  • Current-main behavior: Current main still contains the four separate validators, so this cleanup is not already implemented. (src/cli/capability-cli/image.ts:235, 5b0c094258bc)
  • Behavior-preserving helper: The PR normalizes through the existing lowercase coercion, matches only tuple values, and uses each pre-existing field-specific label. (src/cli/capability-cli/image.ts:238, fd1c96d75e43)
  • Type and message contracts: The tuples match the image-generation unions, and the shared formatter produces the prior two-, three-, and four-value error wording. (src/image-generation/types.ts:18, fd1c96d75e43)
  • Existing boundary coverage: Existing CLI tests exercise generate/edit payload forwarding and assert all five invalid-option messages exactly. (src/cli/capability-cli.test.ts:2427, fd1c96d75e43)
  • History and ownership: Direct file history shows Peter Steinberger repeatedly maintaining this CLI surface, including the capability-command split and recent inference-owner fixes. (src/cli/capability-cli/image.ts:238, fd1c96d75e43)
  • Merge-readiness state: The supplied PR state is clean-but-behind, and its exact-head check rollup includes failures; the prior review’s refresh-and-clean-CI rank-up move remains outstanding. (fd1c96d75e43)

Likely related people:

  • steipete: Peter Steinberger authored this refactor and eight of the retained direct file-history entries, including the capability-command split and recent image/inference ownership fixes. (role: primary CLI surface contributor; confidence: high; commits: fd1c96d75e43, 9c065c895e78, 4994f7bacf30; files: src/cli/capability-cli/image.ts, src/cli/capability-cli.ts)
  • Omar Shahine: Recent direct history includes the agent-selection inference change that touches this command family. (role: recent adjacent contributor; confidence: medium; commits: 641ccba793bc; files: src/cli/capability-cli/image.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the branch against current main and obtain a green exact-head merge-result run.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T22:21:18.780Z sha fd1c96d :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/refactor-backup-command-dispatch branch from fd1c96d to 873aeac Compare August 26, 2026 00:00
@steipete
steipete merged commit c1bab39 into main Aug 26, 2026
131 checks passed
@steipete
steipete deleted the codex/refactor-backup-command-dispatch branch August 26, 2026 00:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 26, 2026
PR #129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.
steipete added a commit that referenced this pull request Aug 26, 2026
PR #129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
steipete added a commit that referenced this pull request Aug 26, 2026
PR #129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.
steipete added a commit that referenced this pull request Aug 26, 2026
PR #129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.
steipete added a commit that referenced this pull request Aug 26, 2026
)

* feat(secrets): agent-requested credentials the model never sees

The new main-session secrets tool lets the agent request a credential by
name: the human enters the value in a masked question card (Control UI,
/ask/<id> deep link, iOS/macOS/Android), and the gateway diverts the
answer straight into the shared secret store at question.resolve. The
record, broadcast, waitAnswer, tool result, transcript, and model context
only ever carry a synthetic stored marker.

- protocol: additive secretStore binding, secretStoreExisting replacement
  metadata, and resolve-time secretStoreAllowedHosts (since 2026.8)
- gateway: store-bound question validation, admin-gated minting (blocks
  questions-scope self-answer escalation past secrets.store.set), shared
  redaction-first store write service reused by secrets.store.set
- tool: secrets request/list/delete; write-only by design, delete carries
  verified agent runtime identity; channel delivery is link-only so chat
  text is never captured as a secret
- Control UI: masked composer card with requester identity, store banner,
  editable allowed hosts, replacement warning, retry-on-validation-error,
  a standalone /ask/<id> page, and a named startup-JS baseline bump
- mobile: SecureField / password transformation for isSecret questions,
  no answer echo in terminal summaries; new native string registered in
  the locale-refresh inventory (generated artifacts stay workflow-owned)
- regression: claimed harness secret input stays out of session transcripts

Live-proven on an isolated dev gateway: real model turn, masked entry via
Playwright, value present only in secret_store_entries, absent from every
transcript, log, and the DOM.

* chore(protocol): regenerate protocol models and tool display

* fix(cli): read image string options through a typed helper

PR #129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.

* chore(protocol): refresh Swift models against current main

* chore(i18n): re-baseline the native inventory on current main

* docs(secrets): state the default-on tool policy and how to disable it

* fix(secrets): tell the model what the store actually does

The shipped tool description named the three actions and nothing else,
and no parameter carried a description. The model could not tell that
request blocks a human, that reason is shown to that human, what secret
and env select, or - the silent-failure case - that a secret stored with
no allowedHosts can never be substituted, so a successful request could
produce a permanently unusable credential. Move the description to the
presets module beside ask_user and document every parameter.

* refactor(agents): share one blocking-question lifecycle between tools

ask_user and secrets each carried their own registration, wait, and
cancel logic, and they had diverged: ask_user recovers an answer that
lands between its wait timeout and the cancel, while secrets discarded
it and reported no_answer even though the Gateway had already stored the
credential. One shared canceller and answer reader fixes that race for
both, folds the two divergent gateway-call types into one, and drops two
type assertions in favour of the canonical record guard (ask_user's
assertion baseline shrinks 11 -> 8).

Net +49 production lines: the shared module costs more than the
duplication it removes, and buys the correctness fix plus a single owner
for question lifecycle.

* fix(ui): keep the allowed-hosts field readable as an input

Main's composer restructure moved the free-text input styling into the
option-row context, so the store-request hosts field - which sits outside
a row - lost its border and read as static text. It is the one field the
operator is meant to review and edit before releasing a credential, so
give it its own border and focus ring.

* fix(secrets): close two credential-boundary holes in agent requests

Requests are now protected-secret only. list renders env values, so an
agent could request kind=env, watch a human type it into a masked box
under a no-visibility promise, then read it straight back; the tool text
even claimed values are never returned. Environment values stay operator
-set in Settings or the CLI, where they are agent-readable by design.

Store-bound questions are also bound to the run that requested them. The
resolve path authorized only the answering client, so a terminated or
replaced agent run could still have a credential written on its behalf -
the recorded runId was provenance, not closure-bound authority. Minting
now requires a runId and resolution revalidates that exact live run
immediately before the store write, with no await in between, failing
closed as QUESTION_REQUESTER_INACTIVE.

Both reported by ClawSweeper as P1 credential-boundary findings.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…claw#129670)

* feat(secrets): agent-requested credentials the model never sees

The new main-session secrets tool lets the agent request a credential by
name: the human enters the value in a masked question card (Control UI,
/ask/<id> deep link, iOS/macOS/Android), and the gateway diverts the
answer straight into the shared secret store at question.resolve. The
record, broadcast, waitAnswer, tool result, transcript, and model context
only ever carry a synthetic stored marker.

- protocol: additive secretStore binding, secretStoreExisting replacement
  metadata, and resolve-time secretStoreAllowedHosts (since 2026.8)
- gateway: store-bound question validation, admin-gated minting (blocks
  questions-scope self-answer escalation past secrets.store.set), shared
  redaction-first store write service reused by secrets.store.set
- tool: secrets request/list/delete; write-only by design, delete carries
  verified agent runtime identity; channel delivery is link-only so chat
  text is never captured as a secret
- Control UI: masked composer card with requester identity, store banner,
  editable allowed hosts, replacement warning, retry-on-validation-error,
  a standalone /ask/<id> page, and a named startup-JS baseline bump
- mobile: SecureField / password transformation for isSecret questions,
  no answer echo in terminal summaries; new native string registered in
  the locale-refresh inventory (generated artifacts stay workflow-owned)
- regression: claimed harness secret input stays out of session transcripts

Live-proven on an isolated dev gateway: real model turn, masked entry via
Playwright, value present only in secret_store_entries, absent from every
transcript, log, and the DOM.

* chore(protocol): regenerate protocol models and tool display

* fix(cli): read image string options through a typed helper

PR openclaw#129463 added four commander option narrowings in image.ts without
SAFETY coverage, leaving the assertion-safety ratchet red (21 > 17) for
every branch on current main. Replace the casts with a typeof-checked
read so the assertions are removed rather than annotated; each value is
still validated by its normalizer. SAFETY comments cannot work in this
file: the ratchet's raw scanner never rescans template tokens, so
comments after the first substitution template are unreadable to it.

* chore(protocol): refresh Swift models against current main

* chore(i18n): re-baseline the native inventory on current main

* docs(secrets): state the default-on tool policy and how to disable it

* fix(secrets): tell the model what the store actually does

The shipped tool description named the three actions and nothing else,
and no parameter carried a description. The model could not tell that
request blocks a human, that reason is shown to that human, what secret
and env select, or - the silent-failure case - that a secret stored with
no allowedHosts can never be substituted, so a successful request could
produce a permanently unusable credential. Move the description to the
presets module beside ask_user and document every parameter.

* refactor(agents): share one blocking-question lifecycle between tools

ask_user and secrets each carried their own registration, wait, and
cancel logic, and they had diverged: ask_user recovers an answer that
lands between its wait timeout and the cancel, while secrets discarded
it and reported no_answer even though the Gateway had already stored the
credential. One shared canceller and answer reader fixes that race for
both, folds the two divergent gateway-call types into one, and drops two
type assertions in favour of the canonical record guard (ask_user's
assertion baseline shrinks 11 -> 8).

Net +49 production lines: the shared module costs more than the
duplication it removes, and buys the correctness fix plus a single owner
for question lifecycle.

* fix(ui): keep the allowed-hosts field readable as an input

Main's composer restructure moved the free-text input styling into the
option-row context, so the store-request hosts field - which sits outside
a row - lost its border and read as static text. It is the one field the
operator is meant to review and edit before releasing a credential, so
give it its own border and focus ring.

* fix(secrets): close two credential-boundary holes in agent requests

Requests are now protected-secret only. list renders env values, so an
agent could request kind=env, watch a human type it into a masked box
under a no-visibility promise, then read it straight back; the tool text
even claimed values are never returned. Environment values stay operator
-set in Settings or the CLI, where they are agent-readable by design.

Store-bound questions are also bound to the run that requested them. The
resolve path authorized only the answering client, so a terminated or
replaced agent run could still have a credential written on its behalf -
the recorded runId was provenance, not closure-bound authority. Minting
now requires a runId and resolution revalidates that exact live run
immediately before the store write, with no await in between, failing
closed as QUESTION_REQUESTER_INACTIVE.

Both reported by ClawSweeper as P1 credential-boundary findings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant