Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

chore: keep main.zig at the 600-line ceiling

justrach0393342ca5fb
diff --git a/src/main.zig b/src/main.zig
index 44b146d7..dfd23201 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -126,8 +126,7 @@ test { // unit_tests' root is main.zig only, so reference every split-out module
}
const prompts = @import("prompts.zig");
const schema = @import("schema.zig");
-// The provider/keys core (ProviderSpec/provider_specs, Provider, Keys) lives in provider.zig; provider_specs/Keys stay local aliases for main()'s credential setup and tests.
-const provider_mod = @import("provider.zig");
+const provider_mod = @import("provider.zig"); // The provider/keys core (ProviderSpec/provider_specs, Provider, Keys) lives in provider.zig; provider_specs/Keys stay local aliases for main()'s credential setup and tests.
const provider_specs = provider_mod.provider_specs;
pub const Keys = provider_mod.Keys;
// Approvals (command/tool approval gate) + confinedPath/noSymlinkEscape live in approvals.zig; main() constructs one directly for the session.
@@ -573,8 +572,7 @@ const subagent = @import("subagent.zig");
const agentJobsReap = subagent.agentJobsReap; // #276 P0-3: background subagents die with the session, mirroring jobsReap
const workflow = @import("workflow_test.zig"); // the engine's tests live here (workflow.zig hit the 600-line cap)
const exec = @import("exec.zig");
-// ── Unit tests (`zig build test`) ──────────────────────────────────────────
-test { // pull in tests from imported modules (mcp.zig)
+test { // ── Unit tests (`zig build test`): pull in tests from imported modules (mcp.zig)
_ = @import("mcp.zig");
_ = @import("mcp_rpc.zig");
_ = @import("main_test.zig");