Skip to content

SMOODEV-2259: th api agents mint/update --extension for per-agent SEP extensions#163

Merged
brentrager merged 2 commits into
mainfrom
SMOODEV-2259-th-ext-flag
Jul 3, 2026
Merged

SMOODEV-2259: th api agents mint/update --extension for per-agent SEP extensions#163
brentrager merged 2 commits into
mainfrom
SMOODEV-2259-th-ext-flag

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

Per-agent SEP extension enablement (SMOODEV-2259) needs a way to set an agent's extensionConfig from the CLI. th api agents mint/update already carry toolConfig via --tool-config, but there was no equivalent for extensionConfig.

Solution

Add a --extension flag to both th api agents mint and th api agents update that carries the agent's extensionConfig JSON into the create/update request body, mirroring the existing --tool-config flag exactly:

  • Shape: {"enabledExtensions":[{"extensionId":"plan-mode","enabled":true,"config":{}}]}
  • @-prefix reads the JSON from a file; non-object input fails loudly (parse_json_object_flag).
  • extensionId is kebab-case (SEP extension name). Empty enabledExtensions = no extensions (fail-closed).
  • Threaded through build_mint_body / build_update_body (both pure, unit-tested) → extensionConfig key in the body.
  • Added to the update has_flags guard and the "nothing to update" bail message.

Verification

  • cargo test -p smooai-smooth-cli agents — all agents tests pass (17).
  • cargo fmt clean; cargo clippy --workspace (pre-commit hook) passes (only pre-existing pedantic/nursery warnings, none from this change).
  • Extended mint_body_carries_per_agent_config and update_body_maps_every_field to pass an extension payload and assert body["extensionConfig"].
  • Docs: docs/Engineering/Using-th-CLI.md agents section documents --extension beside --tool-config.

Part of SMOODEV-2259 (per-agent SEP extension enablement). Mirrors the SMOODEV-590 typed-flag pattern.

🤖 Generated with Claude Code

… extensions

Add a --extension flag to `th api agents mint` and `th api agents update`
that carries the agent's extensionConfig JSON
({"enabledExtensions":[{"extensionId,enabled,config?}]}) into the
create/update request body, mirroring the existing --tool-config flag for
toolConfig. This gives per-agent SEP extension enablement (SMOODEV-2259) the
same typed-flag ergonomics as the SMOODEV-590 per-agent config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9519700

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager brentrager enabled auto-merge (squash) July 3, 2026 15:47
@brentrager brentrager merged commit 66b4cb0 into main Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant