diff --git a/bun.lock b/bun.lock index 56a1902fe..2ffe3abfc 100644 --- a/bun.lock +++ b/bun.lock @@ -231,10 +231,6 @@ "@types/semver": "catalog:", }, }, - "workflows/_stub": { - "name": "@corbits/workflows-stub", - "version": "0.0.0", - }, }, "overrides": { "@intx/agent": "workspace:*", @@ -318,8 +314,6 @@ "@corbits/provider-zen": ["@corbits/provider-zen@workspace:packages/zen"], - "@corbits/workflows-stub": ["@corbits/workflows-stub@workspace:workflows/_stub"], - "@corbits/xai-provider": ["@corbits/xai-provider@0.1.2", "", { "dependencies": { "arktype": "^2.2.3" }, "peerDependencies": { "@corbits/oauth-core": "^0.2.0", "@corbits/openai-responses": "^0.2.0", "@intx/inference": "^0.4.0", "@intx/types": "^0.4.0" } }, "sha512-4gCSLehuE922UG5DeAQLMA3iaq5MzSEgKNuq2Lb4aJqEYsQ85t8rTmu0DXs+T6mHNq2cbCI9eCF4aXuyv420iA=="], "@emnapi/core": ["@emnapi/core@1.11.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA=="], diff --git a/src/config.test.ts b/src/config.test.ts index 4224bf38a..06b3bb79a 100644 --- a/src/config.test.ts +++ b/src/config.test.ts @@ -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( [ diff --git a/src/config/index.ts b/src/config/index.ts index 05844ae1b..4faa5c0fd 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -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 — @@ -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 => { @@ -946,10 +943,6 @@ export async function loadConfig( auto = false; continue; } - if (arg === "--no-workflow") { - noWorkflow = true; - continue; - } if (arg === "-p") { command = "exec"; continue; @@ -1213,7 +1206,6 @@ export async function loadConfig( ...(director !== undefined ? { director } : {}), globalSettingsPath: effectiveSettingsPath, sessionId, - noWorkflow, ...(resumeMode !== undefined ? { resumeMode, diff --git a/src/config/settings.test.ts b/src/config/settings.test.ts index 47d0626e9..03526dbf5 100644 --- a/src/config/settings.test.ts +++ b/src/config/settings.test.ts @@ -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(); @@ -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 } }, @@ -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, diff --git a/src/config/settings.ts b/src/config/settings.ts index 6c0ac56d2..f099cdc29 100644 --- a/src/config/settings.ts +++ b/src/config/settings.ts @@ -81,9 +81,6 @@ export interface Settings { defaultProvider?: string; providers: Record; mcpServers?: MCPServerSettingsEntry[]; - // Per-phase model overrides keyed by profile name, then workflow step - // profile key; a step's `profile` selects the entry. - workflowProfiles?: Record>; // 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. @@ -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; @@ -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", @@ -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'", @@ -891,7 +883,6 @@ type OptionalLocalSettingsFields = { export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [ "defaultProvider", "mcpServers", - "workflowProfiles", "plugins", "pluginPaths", "hooks", @@ -900,7 +891,6 @@ export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [ "hiddenCommands", "onboarded", "lastChangelogVersion", - "compactionMode", "sessionMode", "agentModelFallback", "shell", @@ -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, @@ -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: diff --git a/src/session/assemble-runtime.ts b/src/session/assemble-runtime.ts index 23cf2446b..9278259d7 100644 --- a/src/session/assemble-runtime.ts +++ b/src/session/assemble-runtime.ts @@ -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; /** diff --git a/src/subagent/index.test.ts b/src/subagent/index.test.ts index a5f60602b..e2f9bcfd5 100644 --- a/src/subagent/index.test.ts +++ b/src/subagent/index.test.ts @@ -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"); }); @@ -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( diff --git a/src/subagent/stop-policy.ts b/src/subagent/stop-policy.ts index 7c798fb6c..859a063bf 100644 --- a/src/subagent/stop-policy.ts +++ b/src/subagent/stop-policy.ts @@ -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" diff --git a/src/tui/session-start.test.ts b/src/tui/session-start.test.ts index 85ab0fd4f..c685db475 100644 --- a/src/tui/session-start.test.ts +++ b/src/tui/session-start.test.ts @@ -138,7 +138,6 @@ function launchConfig(overrides: Partial = {}): Config { providers: [], mcpServerEntries: [], sessionId: "launch-session", - noWorkflow: false, ...overrides, } as Config; } diff --git a/workflows/_stub/package.json b/workflows/_stub/package.json deleted file mode 100644 index 1e5668d30..000000000 --- a/workflows/_stub/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@corbits/workflows-stub", - "version": "0.0.0", - "private": true, - "type": "module", - "license": "SEE LICENSE IN LICENSE.md" -}