🤖 feat(cli): add transcend policy deactivate subcommand#264
Merged
Utsav-Patel merged 5 commits intoJul 7, 2026
Merged
Conversation
Mirror the `activate` subcommand layout to take a policy bundle's active
version offline by bundle name. Resolves `--bundle-name` to the parent
bundle UUID internally, then POSTs
`v1/policy-engine/policy-bundles/{id}/deactivate` (no body). Rewrites the
monolith 409 (no active version) to reference the user-supplied bundle
name, and fails CLI-side on unknown bundle names before hitting the API.
@transcend-io/airgap.js-types
@transcend-io/cli
@transcend-io/internationalization
@transcend-io/privacy-types
@transcend-io/sdk
@transcend-io/type-utils
@transcend-io/utils
@transcend-io/mcp
@transcend-io/mcp-server-admin
@transcend-io/mcp-server-assessment
@transcend-io/mcp-server-base
@transcend-io/mcp-server-consent
@transcend-io/mcp-server-discovery
@transcend-io/mcp-server-docs
@transcend-io/mcp-server-dsr
@transcend-io/mcp-server-inventory
@transcend-io/mcp-server-preferences
@transcend-io/mcp-server-workflows
commit: |
Rename the camelCase CLI flags across the policy command group to kebab-case (e.g. --bundleName -> --bundle-name, --transcendUrl -> --transcend-url, --policyBundleId -> --policy-bundle-id, --dryRun -> --dry-run). Single-word flags (--auth, --json, --version, --dir, --limit, --offset, --after, --description, --pkg, --input, --bundle) are unchanged. stricli has no per-command case-style toggle, so this is done by defining the flag keys as kebab-case strings in each policy command.ts. stricli then displays and accepts --kebab-case (and rejects --camelCase input with a "did you mean" suggestion). Scoped to the policy command group only -- no global app config change, so request/consent/inventory/admin/migration commands are unaffected. Impl functions keep camelCase local variable names via destructuring renaming, so internal logic and the shared helpers are unchanged. README command docs regenerated.
8 tasks
MadDataScience
approved these changes
Jul 7, 2026
MadDataScience
left a comment
Contributor
There was a problem hiding this comment.
I'm guessing flagName isn't an option here, but just wanted to check
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.
Related Issues
Public Changelog
transcend policy deactivate --bundle-name <name>to take a policy bundle's currently active version offline, completing the publish/activate/list/versions/deactivate lifecycle tooling.transcend policy *CLI flags are now kebab-case (e.g.--bundle-name,--transcend-url,--policy-bundle-id,--dry-run) instead of camelCase. Single-word flags (--auth,--json,--version,--dir,--limit,--offset,--after,--description) are unchanged.Internal Changelog
transcend policy deactivatesubcommand — resolves--bundle-nameto the parent bundle UUID, POSTsv1/policy-engine/policy-bundles/{id}/deactivate, rewrites monolith 409 (no active version) to reference the user-supplied name, and fails CLI-side on unknown bundles. Pairs with transcend-io/main#45480.activate,deactivate,versions,list,publish); scoped to policy only — other command groups are unaffected.Implementation details
Key files
packages/cli/src/commands/policy/deactivate/{command,impl,readme}.ts— new deactivate subcommandpackages/cli/src/commands/policy/deactivate/tests/impl.test.ts— mocked-client unit tests (happy path, JSON, unknown bundle, 409 rewrite, non-409 surfacing)packages/cli/src/commands/policy/{activate,deactivate,versions,list,publish}/{command,impl,readme}.ts— kebab-case flag renamespackages/cli/src/commands/policy/types.ts—DeactivatePolicyBundleResponse({ bundle, version })packages/cli/src/commands/policy/routes.ts— registersdeactivatein the policy command grouppackages/cli/README.md— regenerated command docs (policy sections only)Notes
buildPolicyEngineClient,resolveBundleIdByName,formatPolicyBundleVersionSummary,printResult, andformatPolicyEngineRequestErrorfromcommands/policy/helpers/.ActivatePolicyEngineBundles(same as activate).--policy-bundle-idor--dry-runflags on deactivate (per ticket).command.ts; stricli displays and accepts--kebab-caseand rejects--camelCasewith a "did you mean" suggestion.scanner.caseStyle: "allow-kebab-for-camel"toggle was intentionally avoided to limit blast radius.