omnigraph/crates/omnigraph-cli
aaltshuler 25d74d689d refactor(cli): GraphClient enum + read verbs (RFC-009 Phase 3a)
The embedded-vs-remote split gets one home: a GraphClient enum
(Embedded { uri } | Remote { http, base_url, token }) with a resolve()
factory that absorbs the shared preamble (apply_server_flag -> token ->
URI/remoteness) and a verb method per command. The five uniform read
forks — branch list, commit list, commit show, schema show, snapshot —
collapse from per-command if-graph-is-remote else to one line each
(main.rs: -113/+47). Behavior identical per verb (local reads still open
WITHOUT policy, as today); the Phase-1 parity matrix is the referee and
passes textually unchanged.

Enum, not the RFC trait: only two variants ever, and inherent async
methods avoid async_trait boxing and the apply_schema closure that is not
object-safe (3b) — same one-body-two-impls collapse, less ceremony.

Scope: the uniform reads only. The query verb (policy-open + operator-
alias early-return + param merge) joins the write verbs in 3b;
export/streaming and graphs-list in 3c, where the now-shared
execute_*_remote/execute_* pairs get retired.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 17:44:49 +03:00
..
src refactor(cli): GraphClient enum + read verbs (RFC-009 Phase 3a) 2026-06-13 17:44:49 +03:00
tests test(cli): the embedded/remote parity matrix (RFC-009 Phase 1) 2026-06-12 17:50:46 +03:00
Cargo.toml refactor(cli): consume omnigraph-api-types directly; unify the load mapping 2026-06-13 17:05:32 +03:00