Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions GraphcodeKit/Sources/Domain/NodSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodRuntime/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const defaultSettings: NodSettings = {
editsOutsideWorktree: "never",
messagesOtherLoops: "draftForMe",
shellAllowlist: [],
spendCapUSD: 2,
spendCapUSD: 0,
disabledMCPServers: [],
};

Expand Down
6 changes: 6 additions & 0 deletions NodRuntime/test/defaults.test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
1 change: 1 addition & 0 deletions graphcode/Tests/NodBackendTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Loading