Expand description
Clap-derive dispatcher for greentic-deployer op … (A3).
Owns the OpCommand clap tree + the dispatch_op entry point. The
actual per-noun command logic lives in cli::env/cli::env_packs/etc;
this module is the wiring layer that converts argv → typed payloads →
library calls and prints the JSON envelope to stdout.
Structs§
- Bundle
Deploy Args - Args for
op deploy. All fields are optional at the clap layer so--answers/--schemakeep working unchanged; the dispatcher builds aBundleDeployPayloadonly when args are supplied, and requires--bundleon that direct path. - EnvApply
Args - Args for
op env apply. The manifest itself arrives via the global--answers <PATH>flag (it IS the verb’s payload); these flags only shape how the plan is executed. - EnvApply
Revision Args - Args for
op env apply-revision <env_id> <revision_id> [--kind <descriptor>]. Surgical single-revision counterpart ofreconcile: brings ONE revision’s worker resources into agreement with its recorded lifecycle (present → apply, absent → tear down). Assumes the env-level set (namespace, router) already exists —reconcileestablishes that. - EnvApply
Traffic Args - Args for
op env apply-traffic <env_id> <deployment_id> [--kind <descriptor>]. Pushes the deployment’s recorded traffic split to its live ALB listener (AWS-ECS only). Record the split first withop traffic set. - EnvCreate
Args - Args for
op env createandop env update. All fields are optional at the clap layer so--answers/--schemakeep working unchanged; the dispatcher builds anEnvCreatePayloadonly when the required inline flags are supplied, otherwise handsNoneto the library function (resolve_payloadthen defers to--answers). - EnvInit
Args - Args for
op env init. Only--public-urlis settable inline; init is otherwise an idempotent bootstrap of the canonicallocalenv. If the env already exists, an inline--public-urlis NOT applied — useop env set-public-url(orop config set --public-url) to mutate an existing env’s URL. - EnvReconcile
Args - Args for
op env reconcile. Applies desired state to the live cluster — the apply-side counterpart ofrender(userenderfor a no-side-effect preview). - EnvRender
Args - Args for
op env render <env_id> [--kind <descriptor>] [--output <dir>]. Read-only: renders without applying.--answers/--schemapayload machinery does not apply — the inputs are these three direct args. - EnvSet
Public UrlArgs - Args for
op env set-public-url <env_id> <URL>. Both fields are required positional — this verb only sets the public URL, no other host_config fields.--answersis rejected: this is a dedicated single-purpose verb, not anop config setalias. - EnvUpdate
Args - Args for
op env update. Update accepts the metadata fields only. URL changes go throughop env set-public-url(single-field verb) orop config set --public-url(URL inside a multi-field host_config update); listen-addr changes throughop config set --listen-addr. - Messaging
Endpoint AddArgs - Inline-flag form of
messaging.endpoint add. When all required fields (--env,--provider-type,--provider-id,--display-name,--idempotency-key,--updated-by) are present, the payload is built directly from these flags. Otherwise dispatch falls through to--answers <PATH>/--schema, matching thetrust-root addprecedent. - Messaging
Endpoint Link Bundle Args - Inline-flag form of
messaging.endpoint link-bundleandunlink-bundle. When all four required fields are present the payload is built directly; otherwise dispatch falls through to--answers/--schema. - Messaging
Endpoint Remove Args - Inline-flag form of
messaging.endpoint removeandrotate-webhook-secret. When all four required fields are present the payload is built directly; otherwise dispatch falls through to--answers/--schema. - Messaging
Endpoint SetWelcome Flow Args - Inline-flag form of
messaging.endpoint set-welcome-flow. When all six required fields are present the payload is built directly; otherwise dispatch falls through to--answers/--schema. - OpCommand
greentic-deployer op …. Mirrors thegtc op …surface; the gtc-side passthrough shells out togreentic-operator op …, which dispatches through the sameOpCommandclap tree.- Payload
Arg - Revision
Stage Args - Args for
op revisions stage. All fields are optional at the clap layer so--answers/--payload-json/--schemakeep working unchanged; the dispatcher builds aRevisionStagePayloadonly when the positional args are supplied, otherwise handsNoneto the library function. - Traffic
SetArgs - Args for
op traffic set. All fields are optional at the clap layer so that--answers/--payload-json/--schemacontinue to work unchanged; the dispatcher builds aTrafficSetPayloadonly when the required clap args are supplied, and otherwise handsNoneto the library function so it can resolve the payload from--answers. - Traffic
Target Args - Trust
Root AddArgs - Trust
Root Remove Args - Updates
Apply Args - Updates
Config SetArgs - Updates
Enroll Args - Updates
GetArgs - Updates
Plan Build Args - Updates
Recover Args
Enums§
- Bundles
Verb - Config
Verb - Credentials
Verb - EnvPacks
Verb - EnvVerb
- Extensions
Verb - Messaging
Endpoint Verb - Messaging
Noun - OpNoun
- Revisions
Verb - Secrets
Verb - Traffic
Verb - Trust
Root Verb - Updates
Verb
Functions§
- build_
store - Build a
LocalFsStorehonoring--store-root, falling back to the per-user default. - dispatch_
op - Top-level dispatcher. The verb modules each load their own payload via
--answersor--payload-json; this function only routes argv into the right library call. - dispatch_
op_ with_ registry - Phase D plug-in entry point — register handlers on the registry, then
call this. The
credentialsnoun (and any future noun that resolves handlers through the registry) will see every handler the caller registered. - noun_
verb_ labels - Map an
OpNounto its(noun, verb)static label pair for envelope rendering. Kept in lockstep with the verb enums above; adding a new noun/verb requires extending the match here too. - print_
error - Print a typed error in the JSON envelope and return the same error so the caller can map it to the process exit code.
- print_
outcome - Print an
OpOutcometo stdout as compact JSON and returnOk(()).