diff --git a/GraphcodeKit/Sources/Domain/NodSettings.swift b/GraphcodeKit/Sources/Domain/NodSettings.swift index 5757eeb1..7cc445b4 100644 --- a/GraphcodeKit/Sources/Domain/NodSettings.swift +++ b/GraphcodeKit/Sources/Domain/NodSettings.swift @@ -37,8 +37,8 @@ public struct NodSettings: Codable, Equatable, Sendable { public var messagesOtherLoops: MessagePolicy /// Shell patterns that run without asking, e.g. `swift test *`. public var shellAllowlist: [String] - /// Per-run cap for unattended loops (timed and composite children), in dollars; 0 is no - /// cap. Copilot reports premium requests instead and is capped by its plan. + /// Per-run cap for unattended loops (timed and composite children), in dollars; 0, the + /// default, is no cap. Copilot reports premium requests instead and is capped by its plan. public var spendCapUSD: Double /// MCP servers from the project's `.mcp.json` switched off for Nod, by name. The /// built-in graphcode server is always on and never listed here. @@ -55,7 +55,7 @@ public struct NodSettings: Codable, Equatable, Sendable { editsOutsideWorktree: Ask = .never, messagesOtherLoops: MessagePolicy = .draftForMe, shellAllowlist: [String] = [], - spendCapUSD: Double = 2, + spendCapUSD: Double = 0, disabledMCPServers: [String] = [] ) { self.engine = engine diff --git a/NodRuntime/src/settings.ts b/NodRuntime/src/settings.ts index 62cc504b..76d39c79 100644 --- a/NodRuntime/src/settings.ts +++ b/NodRuntime/src/settings.ts @@ -31,7 +31,7 @@ export const defaultSettings: NodSettings = { editsOutsideWorktree: "never", messagesOtherLoops: "draftForMe", shellAllowlist: [], - spendCapUSD: 2, + spendCapUSD: 0, disabledMCPServers: [], }; diff --git a/NodRuntime/test/defaults.test.ts b/NodRuntime/test/defaults.test.ts new file mode 100644 index 00000000..edbae451 --- /dev/null +++ b/NodRuntime/test/defaults.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from "bun:test"; +import { defaultSettings } from "../src/settings"; + +test("Nod runs uncapped unless a person sets a spend cap", () => { + expect(defaultSettings.spendCapUSD).toBe(0); +}); diff --git a/graphcode/Tests/NodBackendTests.swift b/graphcode/Tests/NodBackendTests.swift index 9bc000af..fca52a09 100644 --- a/graphcode/Tests/NodBackendTests.swift +++ b/graphcode/Tests/NodBackendTests.swift @@ -183,6 +183,7 @@ struct NodSettingsTests { #expect(settings.nod == NodSettings()) #expect(settings.nod.editsInWorktree == .auto) + #expect(settings.nod.spendCapUSD == 0) #expect(settings.nod.editsOutsideWorktree == .never) #expect(settings.nod.messagesOtherLoops == .draftForMe) }