fix(config): align SDK runtime-state key validation with CJS
This commit is contained in:
@@ -23,7 +23,7 @@ import { homedir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { GSDError, ErrorClassification } from '../errors.js';
|
||||
import { VALID_PROFILES, getAgentToModelMapForProfile } from './config-query.js';
|
||||
import { VALID_CONFIG_KEYS, DYNAMIC_KEY_PATTERNS } from './config-schema.js';
|
||||
import { VALID_CONFIG_KEYS, RUNTIME_STATE_KEYS, DYNAMIC_KEY_PATTERNS } from './config-schema.js';
|
||||
import { planningPaths } from './helpers.js';
|
||||
import { acquireStateLock, releaseStateLock } from './state-mutation.js';
|
||||
import { maskIfSecret } from './secrets.js';
|
||||
@@ -86,6 +86,7 @@ const CONFIG_KEY_SUGGESTIONS: Record<string, string> = {
|
||||
*/
|
||||
export function isValidConfigKey(keyPath: string): { valid: boolean; suggestion?: string } {
|
||||
if (VALID_CONFIG_KEYS.has(keyPath)) return { valid: true };
|
||||
if (RUNTIME_STATE_KEYS.has(keyPath)) return { valid: true };
|
||||
|
||||
// Dynamic patterns — all sourced from shared config-schema (#2653).
|
||||
// Covers agent_skills.*, review.models.*, features.*,
|
||||
|
||||
Reference in New Issue
Block a user