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:
@@ -251,34 +251,8 @@ pub(crate) async fn spawn_session_actor(
|
||||
.as_ref()
|
||||
.map(kigi_workspace::permission::resolution::deny_read_globs_from_config)
|
||||
.unwrap_or_default();
|
||||
let hub_permission = if kigi_workspace::permission::hitl_permission_live_enabled() {
|
||||
let server = match workspace_ops.workspace_handle() {
|
||||
Some(handle) => handle.hub_server_blocking().await,
|
||||
None => None,
|
||||
};
|
||||
let transport = server
|
||||
.and_then(|server| {
|
||||
kigi_workspace::permission::ToolServerPermissionTransport::from_session_id(
|
||||
server,
|
||||
session_info.id.0.as_ref(),
|
||||
)
|
||||
})
|
||||
.map(|t| {
|
||||
std::sync::Arc::new(t)
|
||||
as std::sync::Arc<dyn kigi_workspace::permission::PermissionHookTransport>
|
||||
});
|
||||
if transport.is_none() {
|
||||
tracing::debug!(
|
||||
session_id = % session_info.id.0,
|
||||
"hitl permission live enabled but no remote transport available; using local prompt"
|
||||
);
|
||||
}
|
||||
transport
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let (permissions, _permission_events_rx) =
|
||||
kigi_workspace::permission::spawn_permission_manager_with_hub(
|
||||
kigi_workspace::permission::spawn_permission_manager(
|
||||
session_info.id.clone(),
|
||||
gateway.clone(),
|
||||
tool_context.cwd.clone(),
|
||||
@@ -289,7 +263,6 @@ pub(crate) async fn spawn_session_actor(
|
||||
session_yolo_mode,
|
||||
session_client_identifier.clone(),
|
||||
crate::util::config::remember_tool_approvals_from_disk(),
|
||||
hub_permission,
|
||||
);
|
||||
if crate::util::config::auto_mode_session_active(
|
||||
crate::util::config::auto_permission_mode_enabled_from_disk(),
|
||||
@@ -975,11 +948,6 @@ pub(crate) async fn spawn_session_actor(
|
||||
let (goal_update_tx, goal_update_rx) = tokio::sync::mpsc::unbounded_channel::<
|
||||
kigi_tools::implementations::grok_build::update_goal::UpdateGoalEnvelope,
|
||||
>();
|
||||
let obs_bridge = {
|
||||
let sid = kigi_tool_protocol::SessionId::new(&*session_info.id.0)
|
||||
.unwrap_or_else(|_| kigi_tool_protocol::SessionId::new("unknown").expect("valid"));
|
||||
kigi_computer_hub_sdk::ObservabilityBridge::new(None, sid)
|
||||
};
|
||||
let mut effective_config = crate::config::load_effective_config()
|
||||
.ok()
|
||||
.and_then(|raw| crate::agent::config::Config::new_from_toml_cfg(&raw).ok())
|
||||
@@ -1199,7 +1167,6 @@ pub(crate) async fn spawn_session_actor(
|
||||
events: crate::session::events::EventTracker::new(
|
||||
&crate::session::persistence::session_dir(&session_info),
|
||||
),
|
||||
observability_bridge: obs_bridge,
|
||||
current_turn_number: std::cell::Cell::new(0),
|
||||
last_recap_main_turn: std::cell::Cell::new(0),
|
||||
recap_in_flight: std::cell::Cell::new(false),
|
||||
|
||||
Reference in New Issue
Block a user