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: 0 additions & 6 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1744,12 +1744,10 @@ describe("buildProviderCatalog", () => {
web: "exa",
hiddenCommands: ["help"],
onboarded: true,
compactionMode: "pruning",
sessionMode: "orchestrator",
agentModelFallback: "none",
shell: { timeoutMs: 30_000, maxTimeoutMs: 120_000 },
tools: { timeoutMs: 60_000 },
workflowProfiles: { fast: { implement: "fp-large" } },
};
const settings = providerCatalogToSettings(
[
Expand Down
8 changes: 0 additions & 8 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ export interface Config {
*/
modelOverride?: boolean;

// Deprecated no-op retained for CLI compatibility.
noWorkflow: boolean;
/**
* Runtime settings view for provider resolution, including OAuth
* projections never written to settings.json. Not for saveGlobalSettings —
Expand Down Expand Up @@ -884,7 +882,6 @@ export async function loadConfig(
let provider: string | undefined;
let model: string | undefined;
let profileFlag: string | undefined;
let noWorkflow = false;
const positional: string[] = [];

const requireValue = (flag: string, value: string | undefined): string => {
Expand Down Expand Up @@ -946,10 +943,6 @@ export async function loadConfig(
auto = false;
continue;
}
if (arg === "--no-workflow") {
noWorkflow = true;
continue;
}
if (arg === "-p") {
command = "exec";
continue;
Expand Down Expand Up @@ -1213,7 +1206,6 @@ export async function loadConfig(
...(director !== undefined ? { director } : {}),
globalSettingsPath: effectiveSettingsPath,
sessionId,
noWorkflow,
...(resumeMode !== undefined
? {
resumeMode,
Expand Down
17 changes: 0 additions & 17 deletions src/config/settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,6 @@ 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 Expand Up @@ -419,7 +404,6 @@ test("loadSettings cannot silently drop a known optional key", async () => {
defaultProvider: "p",
mcpServers: [{ name: "s", command: "echo" }],
tiers: { fast: { provider: "p", model: "m" } },
workflowProfiles: { default: { implement: "m" } },
plugins: { "plug-a": { enabled: true } },
pluginPaths: ["/tmp/plugin"],
hooks: { "/tmp/hook.ts": { enabled: false } },
Expand All @@ -428,7 +412,6 @@ test("loadSettings cannot silently drop a known optional key", async () => {
hiddenCommands: ["/help"],
onboarded: true,
lastChangelogVersion: "0.1.0",
compactionMode: "pruning" as const,
subagentMaxTurns: 20,
sessionMode: "orchestrator" as const,
agentModelFallback: "none" as const,
Expand Down
17 changes: 0 additions & 17 deletions src/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ export interface Settings {
defaultProvider?: string;
providers: Record<string, ProviderSettings>;
mcpServers?: MCPServerSettingsEntry[];
// Per-phase model overrides keyed by profile name, then workflow step
// profile key; a step's `profile` selects the entry.
workflowProfiles?: Record<string, Record<string, string>>;
// Per-plugin config keyed by plugin id: enabled flag plus manifest-declared
// credentials (e.g. an Exa API key). Global-only because it carries secrets;
// the /plugins UI writes it.
Expand Down Expand Up @@ -111,9 +108,6 @@ export interface Settings {
// Last package version whose release notes were shown (or stamped on first
// interactive install).
lastChangelogVersion?: string;
// Deprecated: compaction is always the evidence-backed LLM handoff now.
// Legacy values still load but are ignored; new writes omit this field.
compactionMode?: "llm" | "pruning";
// Deprecated: orchestrator is the only product path. Legacy values still
// load but are ignored.
sessionMode?: SessionMode;
Expand Down Expand Up @@ -656,7 +650,6 @@ const SettingsSchema = type({
// Model tiers were removed; older files may still carry this key. Accepted
// and ignored so the file loads, then dropped on next save.
"tiers?": "unknown",
"workflowProfiles?": type({ "[string]": type({ "[string]": "string" }) }),
"plugins?": type({
"[string]": type({
"enabled?": "boolean",
Expand All @@ -671,7 +664,6 @@ const SettingsSchema = type({
"hiddenCommands?": "string[]",
"onboarded?": "boolean",
"lastChangelogVersion?": "string",
"compactionMode?": "'llm' | 'pruning'",
// Legacy disk values still load; product resolve ignores them.
"sessionMode?": "'single' | 'orchestrator'",

Expand Down Expand Up @@ -891,7 +883,6 @@ type OptionalLocalSettingsFields = {
export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [
"defaultProvider",
"mcpServers",
"workflowProfiles",
"plugins",
"pluginPaths",
"hooks",
Expand All @@ -900,7 +891,6 @@ export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [
"hiddenCommands",
"onboarded",
"lastChangelogVersion",
"compactionMode",
"sessionMode",
"agentModelFallback",
"shell",
Expand Down Expand Up @@ -1089,9 +1079,6 @@ function normalizeParsedSettings(path: string, parsed: unknown): Settings {
s.mcpServers !== undefined
? normalizeMcpServers(s.mcpServers)
: undefined,
workflowProfiles: s.workflowProfiles as
| Settings["workflowProfiles"]
| undefined,
plugins: s.plugins as Settings["plugins"] | undefined,
pluginPaths: s.pluginPaths as string[] | undefined,
hooks: s.hooks as Settings["hooks"] | undefined,
Expand All @@ -1104,10 +1091,6 @@ function normalizeParsedSettings(path: string, parsed: unknown): Settings {
s.lastChangelogVersion.trim().length > 0
? s.lastChangelogVersion.trim()
: undefined,
compactionMode:
s.compactionMode === "llm" || s.compactionMode === "pruning"
? s.compactionMode
: undefined,
// Drop legacy "single"; keep only explicit orchestrator if present.
sessionMode: s.sessionMode === "orchestrator" ? "orchestrator" : undefined,
agentModelFallback:
Expand Down
7 changes: 4 additions & 3 deletions src/session/assemble-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,10 @@ export interface ChatAgentWiring {
getSources: () => InferenceSource[];
getDefaultSource: () => string;
/**
* Read at each build so a compaction-mode toggle is visible on rebuild.
* assemble passes the completeness gate as `wrapPruning` so fold-commit
* side effects (stub notice, onFolded prune) run only after a fold lands.
* Read at each build so operator-side compaction changes are visible on
* rebuild. assemble passes the completeness gate as `wrapPruning` so
* fold-commit side effects (stub notice, onFolded prune) run only after a
* fold lands.
*/
getCompactor: (wrapPruning?: (pruning: Compactor) => Compactor) => Compactor;
/**
Expand Down
6 changes: 3 additions & 3 deletions src/subagent/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ describe("sub-agent stop helpers", () => {
evaluateSubAgentStop({
hasToolCalls: false,
lastAssistantText: SUMMARY_ONLY_NARRATION,
incompleteReportNudgeFired: true,
// The nudge bumps the cycle count (nudge-director wraps up here).
toolLessNarrationCycles: 2,
}),
).toBe("incomplete-report-stop");
});
Expand All @@ -362,13 +363,12 @@ describe("sub-agent stop helpers", () => {
).toBe("stop");
});

test("evaluateSubAgentStop spiral uses toolLessNarrationCycles over the deprecated flag", () => {
test("evaluateSubAgentStop nudges once on the first tool-less turn, then stops at the cap", () => {
expect(
evaluateSubAgentStop({
hasToolCalls: false,
lastAssistantText: SUMMARY_ONLY_NARRATION,
toolLessNarrationCycles: 1,
incompleteReportNudgeFired: true,
}),
).toBe("incomplete-report");
expect(
Expand Down
11 changes: 2 additions & 9 deletions src/subagent/stop-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,10 @@ export function evaluateSubAgentStop(input: {
thrashState?: ThrashState;
/** Final assistant text; missing envelope nudges once then salvages. */
lastAssistantText: string;
/** 1-based tool-less turn count; falls back to `incompleteReportNudgeFired` when omitted. */
/** 1-based tool-less turn count; start at 1 for the first completed tool-less turn. */
toolLessNarrationCycles?: number;
/**
* @deprecated Prefer `toolLessNarrationCycles`. True after the one-shot
* incomplete-report wrap-up nudge has been injected.
*/
incompleteReportNudgeFired?: boolean;
}): SubAgentStopReason | null {
const spiralCycles =
input.toolLessNarrationCycles ??
(input.incompleteReportNudgeFired === true ? 2 : 1);
const spiralCycles = input.toolLessNarrationCycles ?? 1;
const spiralStop = (): SubAgentStopReason =>
evaluateToolLessNarrationSpiral(spiralCycles) === "stop"
? "incomplete-report-stop"
Expand Down
1 change: 0 additions & 1 deletion src/tui/session-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ function launchConfig(overrides: Partial<Config> = {}): Config {
providers: [],
mcpServerEntries: [],
sessionId: "launch-session",
noWorkflow: false,
...overrides,
} as Config;
}
Expand Down
7 changes: 0 additions & 7 deletions workflows/_stub/package.json

This file was deleted.

Loading