M2 audit: excise the Computer Hub stack — Kigi's last remote-cloud surface
Removed root-and-branch for the zero-egress guarantee (the hub was xAI's remote-workspace/cloud-sandbox service): - Crates deleted: kigi-computer-hub-core, kigi-computer-hub-sdk, kigi-computer-hub-mcp-adapter, kigi-workspace-client (hub-proxied workspace RPC client), and kigi-tracing (its sole network path was the OTLP gRPC exporter; zero consumers remained). kigi-tracing-macros (purely local) stays. - kigi-workspace: every hub surface deleted — hub server/channel/auth, HITL-over-hub permissions, donation/metrics pumps, file upload RPCs, hub tool-snapshot merge (resolve pipeline is MCP-only now), WorkspaceOps::Proxy. Local worktrees, sessions, leader IPC, MCP, and the ACP permission prompt path are untouched; LocalRegistry re-homed into kigi-tool-runtime on the existing ToolDyn types so in-process tool dispatch is unchanged. - kigi-shell: leader workspace-exposure control surface (incl. the wss://computer-hub... URL), [hub] config, ObservabilityBridge, hub WebSocket proxy, dead OTLP config knobs. ClientMode::Headless (never constructed) removed. - kigi-tui/bin: hidden `kigi workspace` command removed (`kigi worktree` stays). - Renames: --xai-api-base-url → --api-base-url / KIGI_API_BASE_URL / [endpoints] api_base_url (serde alias keeps old configs working; the flag feeds BYOK/custom-endpoint routing, not main inference); grok_version → kigi_version in inspect/models-cache/trace metadata (old caches self-heal via version-mismatch refetch). - Dependency tree: dropped fastrace*, opentelemetry-otlp/http/proto, tokio-tungstenite from the workspace; fixed the 4 real useless_format violations the fastrace lint allowance was masking and removed the allowance. - marketplaceAllowlist kept: it gates the LOCAL plugin-marketplace feature, not an xAI service. Known §9 leftover (deliberate, for the M3 sweep): the BYOK default base URL string. Gates: workspace check/clippy 0/0, fmt, deny ok; suites green (workspace 1042, shell 4918, tui 6634, tools 2608, tool-runtime 47, mcp 154).
This commit is contained in:
@@ -1059,11 +1059,11 @@ fn apply_requirements_inner(
|
||||
enforce_str!("models", "default", config.models.default);
|
||||
enforce_str!("cli", "channel", config.cli.channel);
|
||||
enforce_str!("cli", "minimum_version", config.cli.minimum_version);
|
||||
if let Some(val) = req_str(req, "endpoints", "xai_api_base_url")
|
||||
&& config.endpoints.xai_api_base_url != val
|
||||
if let Some(val) = req_str(req, "endpoints", "api_base_url")
|
||||
&& config.endpoints.api_base_url != val
|
||||
{
|
||||
config.endpoints.xai_api_base_url = val.to_owned();
|
||||
push("endpoints.xai_api_base_url", val.to_owned());
|
||||
config.endpoints.api_base_url = val.to_owned();
|
||||
push("endpoints.api_base_url", val.to_owned());
|
||||
}
|
||||
if let Some(val) = req_str(req, "endpoints", "coding_api_base_url")
|
||||
&& config.endpoints.coding_api_base_url.as_deref() != Some(val)
|
||||
|
||||
@@ -2490,7 +2490,7 @@ fn enterprise_two_file_merge_routes_deployment_key_to_proxy() {
|
||||
let managed = toml::from_str(
|
||||
r#"
|
||||
[endpoints]
|
||||
xai_api_base_url = "https://inference.acme-corp.example/xai/v1"
|
||||
api_base_url = "https://inference.acme-corp.example/xai/v1"
|
||||
coding_api_base_url = "https://cli-chat-proxy.kigi.com/v1"
|
||||
|
||||
[model.kigi-build]
|
||||
@@ -2511,7 +2511,7 @@ telemetry = false
|
||||
|
||||
[endpoints]
|
||||
deployment_key = "xai-token-ENTERPRISE"
|
||||
xai_api_base_url = "https://inference.acme-corp.example/xai/v1"
|
||||
api_base_url = "https://inference.acme-corp.example/xai/v1"
|
||||
"#,
|
||||
)
|
||||
.unwrap();
|
||||
@@ -2586,13 +2586,13 @@ fn config_layers_system_managed_lowest_priority() {
|
||||
#[test]
|
||||
fn apply_requirements_value_overrides_user_settings() {
|
||||
let raw_config: toml::Value = toml::from_str(
|
||||
"[cli]\nauto_update = true\nchannel = \"beta\"\n\n[features]\nfeedback = true\nlsp_tools = true\nweb_fetch = true\nwrite_file = true\n\n[ui]\nyolo = true\n\n[models]\ndefault = \"user-model\"\n\n[endpoints]\ncoding_api_base_url = \"https://user-proxy.example/v1\"\nxai_api_base_url = \"https://user-api.example/v1\"\nmodels_base_url = \"https://user-models.example/v1\"\nmodels_list_url = \"https://user-models.example/v1/models\"\n",
|
||||
"[cli]\nauto_update = true\nchannel = \"beta\"\n\n[features]\nfeedback = true\nlsp_tools = true\nweb_fetch = true\nwrite_file = true\n\n[ui]\nyolo = true\n\n[models]\ndefault = \"user-model\"\n\n[endpoints]\ncoding_api_base_url = \"https://user-proxy.example/v1\"\napi_base_url = \"https://user-api.example/v1\"\nmodels_base_url = \"https://user-models.example/v1\"\nmodels_list_url = \"https://user-models.example/v1/models\"\n",
|
||||
)
|
||||
.unwrap();
|
||||
let mut cfg = crate::agent::config::Config::new_from_toml_cfg(&raw_config).unwrap();
|
||||
cfg.default_yolo_mode = true;
|
||||
let requirements: toml::Value = toml::from_str(
|
||||
"[cli]\nauto_update = false\nchannel = \"stable\"\n\n[features]\nfeedback = false\nlsp_tools = false\nweb_fetch = false\nwrite_file = false\nremote_fetch = false\n\n[ui]\nyolo = false\n\n[models]\ndefault = \"managed-model\"\n\n[endpoints]\ncoding_api_base_url = \"https://managed-proxy.example/v1\"\nxai_api_base_url = \"https://managed-api.example/v1\"\nmodels_base_url = \"https://managed-models.example/v1\"\nmodels_list_url = \"https://managed-models.example/v1/models\"\ndeployment_key = \"enterprise-deploy-key-should-not-log\"\n",
|
||||
"[cli]\nauto_update = false\nchannel = \"stable\"\n\n[features]\nfeedback = false\nlsp_tools = false\nweb_fetch = false\nwrite_file = false\nremote_fetch = false\n\n[ui]\nyolo = false\n\n[models]\ndefault = \"managed-model\"\n\n[endpoints]\ncoding_api_base_url = \"https://managed-proxy.example/v1\"\napi_base_url = \"https://managed-api.example/v1\"\nmodels_base_url = \"https://managed-models.example/v1\"\nmodels_list_url = \"https://managed-models.example/v1/models\"\ndeployment_key = \"enterprise-deploy-key-should-not-log\"\n",
|
||||
)
|
||||
.unwrap();
|
||||
let source = RequirementSource::Requirements {
|
||||
@@ -2617,7 +2617,7 @@ fn apply_requirements_value_overrides_user_settings() {
|
||||
Some("https://managed-proxy.example/v1"), cfg.endpoints.coding_api_base_url
|
||||
.as_deref()
|
||||
);
|
||||
assert_eq!("https://managed-api.example/v1", cfg.endpoints.xai_api_base_url);
|
||||
assert_eq!("https://managed-api.example/v1", cfg.endpoints.api_base_url);
|
||||
assert_eq!(
|
||||
Some("https://managed-models.example/v1"), cfg.endpoints.models_base_url
|
||||
.as_deref()
|
||||
|
||||
Reference in New Issue
Block a user