Deepen query dispatch seam with Command Topology Module (#3078)

* Deepen query dispatch seam with command topology module

* Stabilize SDK parity defaults and integration test gating

* docs(architecture): record pre-project config policy and e2e gate

* refactor(query): stop injecting native adapter in CLI dispatch path

* fix(config): align workflow auto-chain typing and docs
This commit is contained in:
Tom Boucher
2026-05-03 18:11:38 -04:00
committed by GitHub
parent 9c92c32f6e
commit 5e21bf7567
27 changed files with 260 additions and 121 deletions

View File

@@ -16,6 +16,7 @@
* ```
*/
import { existsSync } from 'node:fs';
import { readFile } from 'node:fs/promises';
import { GSDError, ErrorClassification } from '../errors.js';
import { loadConfig } from '../config.js';
@@ -174,6 +175,8 @@ export const resolveModel: QueryHandler = async (args, projectDir, workstream) =
throw new GSDError('agent-type required', ErrorClassification.Validation);
}
const configFilePath = planningPaths(projectDir, workstream).config;
const configExists = existsSync(configFilePath);
const config = await loadConfig(projectDir, workstream);
const profile = String(config.model_profile || 'balanced').toLowerCase();
@@ -188,9 +191,9 @@ export const resolveModel: QueryHandler = async (args, projectDir, workstream) =
return { data: result };
}
// resolve_model_ids: "omit" -- return empty string
// No project config (or explicit omit policy) -> return empty model id (CJS parity)
const resolveModelIds = (config as Record<string, unknown>).resolve_model_ids;
if (resolveModelIds === 'omit') {
if (!configExists || resolveModelIds === 'omit') {
const agentModels = MODEL_PROFILES[agentType];
const result = agentModels
? { model: '', profile }