Skip to main content

objectiveai_sdk/cli/command/
scope.rs

1//! Layer selectors required by every `config` command. Reads take
2//! exactly one of `--global` / `--state` / `--final`; mutations take
3//! exactly one of `--global` / `--state`. Semantics land in a later
4//! step — for now the flags are parsed, validated (exactly one), and
5//! carried on every Request.
6
7/// Which config layer a read targets.
8#[derive(
9    Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize, schemars::JsonSchema,
10)]
11#[schemars(rename = "cli.command.GetScope")]
12#[serde(rename_all = "snake_case")]
13pub enum GetScope {
14    Global,
15    State,
16    Final,
17}
18
19/// Which config layer a mutation targets.
20#[derive(
21    Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize, schemars::JsonSchema,
22)]
23#[schemars(rename = "cli.command.SetScope")]
24#[serde(rename_all = "snake_case")]
25pub enum SetScope {
26    Global,
27    State,
28}