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: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename

## [Unreleased]

### Removed

- Profile files no longer accept a `workflow` field. Workflows start only from
slash commands; a leftover key is rejected on load rather than ignored. The
`--no-workflow` CLI flag is unchanged.

## [0.3.22] - 2026-09-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ Profiles supply per-project or named-profile overrides for `model`, `systemPromp
}
```

`resolveProfile` merges a named profile with the project profile, with **project profile field values overriding the named profile's**. The resolved `model` feeds into provider resolution and the director; `systemPromptExtensions` are appended to the system prompt. Workflow profile metadata is deprecated because workflows are started only by explicit slash commands. CLI flags (`--model`, `--profile`) still win over profile values during config resolution.
`resolveProfile` merges a named profile with the project profile, with **project profile field values overriding the named profile's**. The resolved `model` feeds into provider resolution and the director; `systemPromptExtensions` are appended to the system prompt. CLI flags (`--model`, `--profile`) still win over profile values during config resolution.

### Provider Configuration

Expand Down
3 changes: 0 additions & 3 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,6 @@ export interface Config {
*/
resumeMode?: "id" | "pick";

// Deprecated workflow profile metadata; workflows are manual-only slash commands.
workflow?: string;
// Deprecated no-op retained for CLI compatibility.
noWorkflow: boolean;
/**
Expand Down Expand Up @@ -988,7 +986,6 @@ export async function loadConfig(
noWorkflow,
...(resumeMode !== undefined ? { resumeMode, skipInitialTask } : {}),
...(resumePicker ? { resumePicker: true } : {}),
...(profile.workflow !== undefined ? { workflow: profile.workflow } : {}),
...(settings?.defaultProvider !== undefined
? { globalDefaultProvider: settings.defaultProvider }
: {}),
Expand Down
1 change: 0 additions & 1 deletion src/config/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const ProfileSchema = type({
"profile?": "string",
"model?": "string",
"systemPromptExtensions?": "string[]",
"workflow?": "string",
// Per-call inactivity timeout in milliseconds. If the provider yields no
// inference event for this many ms, the call is aborted and the user sees
// "Request timed out". Default in the inference harness is 120_000 (2 min).
Expand Down
8 changes: 8 additions & 0 deletions src/profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ test("loadProfile rejects unknown keys", async () => {
await expect(loadProfile(path)).rejects.toThrow(/unknownKey must be removed/);
});

test("loadProfile rejects a workflow field", async () => {
const dir = makeTmp();
await mkdir(dir, { recursive: true });
const path = join(dir, "profile.json");
await writeJson(path, { workflow: "build" });
await expect(loadProfile(path)).rejects.toThrow(/workflow must be removed/);
});

test("loadProfile rejects non-array systemPromptExtensions", async () => {
const dir = makeTmp();
await mkdir(dir, { recursive: true });
Expand Down
15 changes: 15 additions & 0 deletions tests/unit/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ test("loadConfig --no-auto disables auto mode", async () => {
});
});

test("loadConfig --no-workflow remains a recognized flag", async () => {
await withSettings(async ({ cwd, globalSettingsPath }) => {
const { impl } = offlineFetch();
const config = await loadConfig(
["--cwd", cwd, "--no-workflow", "do something"],
{
globalSettingsPath,
pricing: { fetchImpl: impl },
},
);
expect(config.configured).toBe(true);
if (config.configured) expect(config.noWorkflow).toBe(true);
});
});

test("loadConfig uses the injected pricing fetchImpl instead of the network", async () => {
await withSettings(async ({ cwd, globalSettingsPath }) => {
resetPricingMetadataRefreshForTests();
Expand Down
Loading