@@ -107,6 +107,21 @@ describe("normalizeClaudeBackendConfig", () => {
|
107 | 107 | "--permission-mode", |
108 | 108 | "bypassPermissions", |
109 | 109 | ]); |
| 110 | +expect(normalized.output).toBe("jsonl"); |
| 111 | +expect(normalized.liveSession).toBe("claude-stdio"); |
| 112 | +expect(normalized.input).toBe("stdin"); |
| 113 | +}); |
| 114 | + |
| 115 | +it("does not infer live stdio when explicit transport overrides are incompatible", () => { |
| 116 | +const normalized = normalizeClaudeBackendConfig({ |
| 117 | +command: "claude", |
| 118 | +output: "json", |
| 119 | +input: "arg", |
| 120 | +}); |
| 121 | + |
| 122 | +expect(normalized.output).toBe("json"); |
| 123 | +expect(normalized.liveSession).toBeUndefined(); |
| 124 | +expect(normalized.input).toBe("arg"); |
110 | 125 | }); |
111 | 126 | |
112 | 127 | it("is wired through the anthropic cli backend normalize hook", () => { |
@@ -129,12 +144,16 @@ describe("normalizeClaudeBackendConfig", () => {
|
129 | 144 | expect(normalized?.resumeArgs).toContain("bypassPermissions"); |
130 | 145 | expect(normalized?.resumeArgs).toContain("--setting-sources"); |
131 | 146 | expect(normalized?.resumeArgs).toContain("user"); |
| 147 | +expect(normalized?.liveSession).toBe("claude-stdio"); |
132 | 148 | }); |
133 | 149 | |
134 | 150 | it("leaves claude cli subscription-managed, restricts setting sources, and clears inherited env overrides", () => { |
135 | 151 | const backend = buildAnthropicCliBackend(); |
136 | 152 | |
137 | 153 | expect(backend.config.env).toBeUndefined(); |
| 154 | +expect(backend.config.liveSession).toBe("claude-stdio"); |
| 155 | +expect(backend.config.output).toBe("jsonl"); |
| 156 | +expect(backend.config.input).toBe("stdin"); |
138 | 157 | expect(backend.config.args).toContain("--setting-sources"); |
139 | 158 | expect(backend.config.args).toContain("user"); |
140 | 159 | expect(backend.config.resumeArgs).toContain("--setting-sources"); |
|