From 641acde6e5c840071d69dc8738ad78ca7077b14c Mon Sep 17 00:00:00 2001 From: Brett Chien Date: Thu, 27 Aug 2026 20:53:53 +0800 Subject: [PATCH] feat(studio-cp,oab-mcp): list_aws_profiles / list_k8s_contexts tools (studio#104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backs the "+ New fleet" console wizard's provider-specific `. `exists`/`error` are surfaced separately so the + /// console can tell "nothing configured yet" (show setup guidance) apart + /// from "found a config but couldn't read it" (show the raw error). + fn t_list_aws_profiles(&self, _args: &Map) -> Result { + let r = scp::list_aws_profiles(); + Ok(json!({ + "profiles": r.profiles.iter().map(|p| json!({ "name": p.name, "region": p.region })).collect::>(), + "source_path": r.source_path, + "exists": r.exists, + "error": r.error, + })) + } + + /// Local kubeconfig context discovery (studio#104): backs the New Fleet + /// wizard's k8s context `