Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
07d51d6
add new spec
lentil32 Apr 9, 2026
b613dcb
feat(cli): add source api proto contract
lentil32 Apr 9, 2026
399ca1a
feat(server): add source api domain skeleton
lentil32 Apr 9, 2026
b09478d
feat(cli-server): add source api auth actions
lentil32 Apr 9, 2026
103e34f
feat(server): finalize source api auth plans
lentil32 Apr 9, 2026
78cd1ee
feat(source-api): migrate github relay into adapter
lentil32 Apr 9, 2026
2f23e0a
feat(server): migrate GA source-api adapter
lentil32 Apr 9, 2026
e061446
feat(server): migrate mongodb source api adapter
lentil32 Apr 9, 2026
e6393bf
feat(server): migrate remaining source api adapters
lentil32 Apr 9, 2026
2cd3228
refactor(cli-server): cut Use from CLI proto service
lentil32 Apr 9, 2026
4c7d5d1
feat(cli-server): add source api transport handlers
lentil32 Apr 9, 2026
9ee9186
refactor(cli-server): remove use skill registry
lentil32 Apr 9, 2026
63a2974
test(cli-server): cover source api handlers
lentil32 Apr 9, 2026
e6640d3
feat(cli): cut over use to source api
lentil32 Apr 9, 2026
574a732
feat(cli): add source api pagination rendering
lentil32 Apr 9, 2026
fe401ee
feat(cli): support binary source api output
lentil32 Apr 9, 2026
a595d53
test(cli): cover source api field patch parsing
lentil32 Apr 9, 2026
8e9e1b7
test(cli): cover source api intent resolution
lentil32 Apr 9, 2026
4f932d7
test(cli): cover source api target inference
lentil32 Apr 9, 2026
27a2d05
test(cli): cover source api body rendering
lentil32 Apr 9, 2026
74281a1
test(cli): cover source api renderer options
lentil32 Apr 9, 2026
6b36f08
test(cli-server): cover source api connect failures
lentil32 Apr 9, 2026
c2f8fc7
fix(server): filter source api response headers
lentil32 Apr 9, 2026
278b3d5
fix(cli): honor silent source api json output
lentil32 Apr 9, 2026
c13a943
fix(cli): align source api json output
lentil32 Apr 9, 2026
80230af
fix(cli): preserve source api verbatim text output
lentil32 Apr 9, 2026
a2a3811
fix(cli): redact source api dry-run plans
lentil32 Apr 9, 2026
64a19c3
fix(cli): normalize source api dry runs
lentil32 Apr 9, 2026
392d716
fix(cli): keep source api describe mode for render flags
lentil32 Apr 9, 2026
be893ae
fix(cli): reject unsupported source API headers locally
lentil32 Apr 9, 2026
2eaaba6
fix(cli): reject unsupported source API input locally
lentil32 Apr 9, 2026
39142e7
fix(cli): enforce source API field syntax locally
lentil32 Apr 9, 2026
98f6a39
fix(cli): type source API normalize plan
lentil32 Apr 9, 2026
e4a52f5
fix(proto): require invariant cli response fields
lentil32 Apr 9, 2026
8fbf4ad
fix(proto): require source api policy envelopes
lentil32 Apr 9, 2026
2ebac85
refactor(proto): share source api invocation request
lentil32 Apr 9, 2026
634f773
fix(proto): expose source api org capabilities
lentil32 Apr 9, 2026
2a21ee3
fix(proto): forbid empty metadata sentinels
lentil32 Apr 9, 2026
dab7fff
refactor(cli): drop legacy query sanitization alias
lentil32 Apr 9, 2026
6771765
fix(proto): validate deterministic cli metadata
lentil32 Apr 9, 2026
7a8309c
fix(server): normalize source API content types
lentil32 Apr 9, 2026
0cfec10
fix(onequery-cli): tighten workflow output handling
lentil32 Apr 9, 2026
2546298
add plan
lentil32 Apr 10, 2026
c310b8e
refactor(server): remove legacy source query routes
lentil32 Apr 10, 2026
6aa0d0d
refactor(cli): make source api policy transport machine-readable
lentil32 Apr 10, 2026
0805ec5
feat(server): finalize source api policy plans
lentil32 Apr 10, 2026
dc0a3bb
refactor(cli-server): route source api execution through domain
lentil32 Apr 10, 2026
fbf4901
chore(cli-server): update source api default commands
lentil32 Apr 10, 2026
60877d3
chore(plan): mark repository cleanup complete
lentil32 Apr 10, 2026
2f2dacb
chore(plan): mark verification pass complete
lentil32 Apr 10, 2026
39ae488
remove plan
lentil32 Apr 10, 2026
59443ee
fix(server): add override to source api execution error cause
lentil32 Apr 10, 2026
7ac2ba8
fix(source-api): type request and permission errors
lentil32 Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions apps/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions apps/cli/crates/onequery-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ flate2 = "1.1.5"
getrandom = "0.3"
http = "1"
http-body = "1"
jaq-core = "3.0.0"
jaq-json = { version = "2.0.0", features = ["serde"] }
jaq-std = "3.0.0"
libc = "0.2.177"
path-absolutize = { workspace = true }
regress = "0.10"
Expand Down
51 changes: 45 additions & 6 deletions apps/cli/crates/onequery-cli/src/cli/args.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::path::PathBuf;

use clap::ArgAction;
use clap::Args;
use clap::Subcommand;

use crate::transport::source_connect_provider::SourceConnectProvider;
use crate::transport::use_source::UseSource;

#[derive(Debug, Clone, Subcommand)]
pub(crate) enum AuthSubcommand {
Expand Down Expand Up @@ -264,12 +264,51 @@ onequery query validate [OPTIONS] --source <SOURCE_KEY> --input <PATH|->

#[derive(Debug, Clone, Args, Eq, PartialEq)]
pub(crate) struct UseArgs {
/// Load skill content for this non-SQL source provider.
#[arg(long, value_name = "SOURCE", value_enum)]
pub source: UseSource,
/// Execute one provider-specific relay request from an inline JSON payload.
#[arg(long, value_name = "JSON")]
/// Describe or execute this connected source API.
#[arg(long, value_name = "SOURCE_KEY")]
pub source: String,
/// Override the inferred source API operation.
#[arg(long, value_name = "OPERATION")]
pub op: Option<String>,
/// Provide the selector or inferred operation target.
#[arg(value_name = "TARGET", allow_hyphen_values = true)]
pub target: Option<String>,
/// Override the HTTP method for `http_request` operations.
#[arg(short = 'X', long, value_name = "METHOD")]
pub method: Option<String>,
/// Add one request header using `KEY:VALUE`.
#[arg(short = 'H', long = "header", value_name = "KEY:VALUE", action = ArgAction::Append)]
pub headers: Vec<String>,
/// Add one string field patch using `KEY=VALUE`.
#[arg(short = 'f', long = "raw-field", value_name = "KEY=VALUE", action = ArgAction::Append)]
pub raw_fields: Vec<String>,
/// Add one typed field patch using `KEY=VALUE`.
#[arg(short = 'F', long = "field", value_name = "KEY=VALUE", action = ArgAction::Append)]
pub fields: Vec<String>,
/// Read the request body from a file path or stdin (`-`).
#[arg(long, value_name = "PATH|-")]
pub input: Option<String>,
/// Follow opaque source API pagination tokens.
#[arg(long, default_value_t = false)]
pub paginate: bool,
/// Combine paginated JSON bodies into one array before rendering.
#[arg(long, default_value_t = false)]
pub slurp: bool,
/// Cap the number of paginated requests the client follows.
#[arg(long, value_name = "N")]
pub max_pages: Option<u32>,
/// Include status and allowed response headers in text output.
#[arg(short = 'i', long = "include", default_value_t = false)]
pub include: bool,
/// Suppress body output.
#[arg(long, default_value_t = false)]
pub silent: bool,
/// Apply a JSON selection expression after response assembly.
#[arg(short = 'q', long = "jq", value_name = "EXPR")]
pub jq: Option<String>,
/// Print the normalized request plan without executing it.
#[arg(long, default_value_t = false)]
pub dry_run: bool,
}

#[derive(Debug, Clone, Subcommand)]
Expand Down
3 changes: 2 additions & 1 deletion apps/cli/crates/onequery-cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ mod raw;
#[path = "../cli_tests.rs"]
mod tests;

pub(crate) use crate::transport::use_source::UseSource;
pub(crate) use args::AuthImportArgs;
pub(crate) use args::AuthSessionSubcommand;
pub(crate) use args::AuthSubcommand;
pub(crate) use args::BackupArgs;
pub(crate) use args::DebugSubcommand;
pub(crate) use args::ListReadArgs;
pub(crate) use args::OrgSubcommand;
#[cfg(test)]
pub(crate) use args::PaginationArgs;
pub(crate) use args::QueryExecuteArgs;
pub(crate) use args::QueryInputArgs;
Expand All @@ -31,6 +31,7 @@ pub(crate) use args::UseArgs;
pub(crate) use model::Command;
pub(crate) use model::ConfigCommand;
pub(crate) use model::GatewayCommand;
#[cfg(test)]
pub(crate) use model::GlobalOptions;
pub(crate) use model::Invocation;
pub(crate) use model::ParseOutcome;
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/crates/onequery-cli/src/cli/model.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::config::RawCliConfigOverrides;
use crate::output::CommandOutput;
use crate::output::EffectiveOutputMode;
use crate::output::TerminalOutput;

use super::args::AuthSessionSubcommand;
use super::args::AuthSubcommand;
Expand All @@ -15,7 +15,7 @@ use super::args::UseArgs;
#[derive(Debug)]
pub(crate) enum ParseOutcome {
Invocation(Box<Invocation>),
Display(CommandOutput),
Display(TerminalOutput),
}

#[derive(Debug, Clone)]
Expand Down
Loading
Loading