From 399eb1eaa75dc9979ca643e1abf3aca6ac097c61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 09:04:05 +0000 Subject: [PATCH] refactor(ado-proxy): split catalog operations() into capability groups Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/ado_proxy/catalog.rs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/ado_proxy/catalog.rs b/src/ado_proxy/catalog.rs index 576823db..74767a54 100644 --- a/src/ado_proxy/catalog.rs +++ b/src/ado_proxy/catalog.rs @@ -249,6 +249,17 @@ pub fn catalog() -> Catalog { } pub fn operations() -> Vec { + let mut ops = discovery_operations(); + ops.extend(core_operations()); + ops.extend(repos_operations()); + ops.extend(pipelines_operations()); + ops.extend(boards_operations()); + ops +} + +/// Discovery-capability operations: organization/area/resource-area +/// bootstrap probes issued before any data call. +fn discovery_operations() -> Vec { vec![ Operation { id: "discovery.host-options", @@ -325,6 +336,12 @@ pub fn operations() -> Vec { Json, &["connectOptions", "lastChangeId", "lastChangeId64"] ), + ] +} + +/// Core-capability operations: project metadata lookups. +fn core_operations() -> Vec { + vec![ get!( "core.project-get", Core, @@ -352,6 +369,13 @@ pub fn operations() -> Vec { "getDefaultTeamImageUrl", ] ), + ] +} + +/// Repos-capability operations: git repository, ref, item, commit, and +/// pull-request read paths. +fn repos_operations() -> Vec { + vec![ get!( "repos.repository-get", Repos, @@ -498,6 +522,13 @@ pub fn operations() -> Vec { Json, NO_QUERY ), + ] +} + +/// Pipelines-capability operations: build definition, build, timeline, and +/// pipeline run read paths. +fn pipelines_operations() -> Vec { + vec![ get!( "pipelines.definitions-list", Pipelines, @@ -601,6 +632,13 @@ pub fn operations() -> Vec { Json, NO_QUERY ), + ] +} + +/// Boards-capability operations: work-item, comment, update, and revision +/// read paths. +fn boards_operations() -> Vec { + vec![ get!( "boards.work-item-get", Boards,