SMOODEV-2259: th api agents mint/update --extension for per-agent SEP extensions#163
Merged
Conversation
… 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 detectedLatest commit: 9519700 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Per-agent SEP extension enablement (SMOODEV-2259) needs a way to set an agent's
extensionConfigfrom the CLI.th api agents mint/updatealready carrytoolConfigvia--tool-config, but there was no equivalent forextensionConfig.Solution
Add a
--extensionflag to bothth api agents mintandth api agents updatethat carries the agent'sextensionConfigJSON into the create/update request body, mirroring the existing--tool-configflag exactly:{"enabledExtensions":[{"extensionId":"plan-mode","enabled":true,"config":{}}]}@-prefix reads the JSON from a file; non-object input fails loudly (parse_json_object_flag).extensionIdis kebab-case (SEP extension name). EmptyenabledExtensions= no extensions (fail-closed).build_mint_body/build_update_body(both pure, unit-tested) →extensionConfigkey in the body.has_flagsguard and the "nothing to update" bail message.Verification
cargo test -p smooai-smooth-cli agents— all agents tests pass (17).cargo fmtclean;cargo clippy --workspace(pre-commit hook) passes (only pre-existing pedantic/nursery warnings, none from this change).mint_body_carries_per_agent_configandupdate_body_maps_every_fieldto pass an extension payload and assertbody["extensionConfig"].docs/Engineering/Using-th-CLI.mdagents section documents--extensionbeside--tool-config.Part of SMOODEV-2259 (per-agent SEP extension enablement). Mirrors the SMOODEV-590 typed-flag pattern.
🤖 Generated with Claude Code