@mobiman/vector 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/agents/vector-codebase-mapper.md +770 -0
- package/agents/vector-debugger.md +1338 -0
- package/agents/vector-executor.md +487 -0
- package/agents/vector-integration-checker.md +443 -0
- package/agents/vector-nyquist-auditor.md +176 -0
- package/agents/vector-phase-researcher.md +553 -0
- package/agents/vector-plan-checker.md +706 -0
- package/agents/vector-planner.md +1307 -0
- package/agents/vector-project-researcher.md +629 -0
- package/agents/vector-research-synthesizer.md +247 -0
- package/agents/vector-roadmapper.md +650 -0
- package/agents/vector-ui-auditor.md +439 -0
- package/agents/vector-ui-checker.md +300 -0
- package/agents/vector-ui-researcher.md +353 -0
- package/agents/vector-verifier.md +579 -0
- package/bin/install.cjs +2907 -0
- package/bin/install.cjs.map +1 -0
- package/bin/install.cts +3103 -0
- package/bin/install.d.cts +3 -0
- package/bin/install.d.cts.map +1 -0
- package/commands/vector/add-phase.md +43 -0
- package/commands/vector/add-tests.md +41 -0
- package/commands/vector/add-todo.md +47 -0
- package/commands/vector/audit-milestone.md +36 -0
- package/commands/vector/autonomous.md +41 -0
- package/commands/vector/check-todos.md +45 -0
- package/commands/vector/cleanup.md +18 -0
- package/commands/vector/complete-milestone.md +136 -0
- package/commands/vector/debug.md +168 -0
- package/commands/vector/discuss-phase.md +90 -0
- package/commands/vector/do.md +30 -0
- package/commands/vector/execute-phase.md +41 -0
- package/commands/vector/health.md +22 -0
- package/commands/vector/help.md +22 -0
- package/commands/vector/insert-phase.md +32 -0
- package/commands/vector/join-discord.md +18 -0
- package/commands/vector/list-phase-assumptions.md +46 -0
- package/commands/vector/map-codebase.md +71 -0
- package/commands/vector/new-milestone.md +44 -0
- package/commands/vector/new-project.md +42 -0
- package/commands/vector/pause-work.md +38 -0
- package/commands/vector/plan-milestone-gaps.md +34 -0
- package/commands/vector/plan-phase.md +45 -0
- package/commands/vector/progress.md +24 -0
- package/commands/vector/quick.md +47 -0
- package/commands/vector/reapply-patches.md +123 -0
- package/commands/vector/remove-phase.md +31 -0
- package/commands/vector/research-phase.md +190 -0
- package/commands/vector/resume-work.md +40 -0
- package/commands/vector/set-profile.md +12 -0
- package/commands/vector/settings.md +36 -0
- package/commands/vector/stats.md +18 -0
- package/commands/vector/ui-phase.md +34 -0
- package/commands/vector/ui-review.md +32 -0
- package/commands/vector/update.md +37 -0
- package/commands/vector/validate-phase.md +35 -0
- package/commands/vector/verify-work.md +38 -0
- package/core/bin/lib/commands.cjs +641 -0
- package/core/bin/lib/commands.cjs.map +1 -0
- package/core/bin/lib/commands.cts +712 -0
- package/core/bin/lib/commands.d.cts +23 -0
- package/core/bin/lib/commands.d.cts.map +1 -0
- package/core/bin/lib/config.cjs +281 -0
- package/core/bin/lib/config.cjs.map +1 -0
- package/core/bin/lib/config.cts +301 -0
- package/core/bin/lib/config.d.cts +50 -0
- package/core/bin/lib/config.d.cts.map +1 -0
- package/core/bin/lib/core.cjs +483 -0
- package/core/bin/lib/core.cjs.map +1 -0
- package/core/bin/lib/core.cts +544 -0
- package/core/bin/lib/core.d.cts +96 -0
- package/core/bin/lib/core.d.cts.map +1 -0
- package/core/bin/lib/frontmatter.cjs +341 -0
- package/core/bin/lib/frontmatter.cjs.map +1 -0
- package/core/bin/lib/frontmatter.cts +295 -0
- package/core/bin/lib/frontmatter.d.cts +18 -0
- package/core/bin/lib/frontmatter.d.cts.map +1 -0
- package/core/bin/lib/init.cjs +674 -0
- package/core/bin/lib/init.cjs.map +1 -0
- package/core/bin/lib/init.cts +775 -0
- package/core/bin/lib/init.d.cts +16 -0
- package/core/bin/lib/init.d.cts.map +1 -0
- package/core/bin/lib/milestone.cjs +210 -0
- package/core/bin/lib/milestone.cjs.map +1 -0
- package/core/bin/lib/milestone.cts +241 -0
- package/core/bin/lib/milestone.d.cts +11 -0
- package/core/bin/lib/milestone.d.cts.map +1 -0
- package/core/bin/lib/model-profiles.cjs +62 -0
- package/core/bin/lib/model-profiles.cjs.map +1 -0
- package/core/bin/lib/model-profiles.cts +66 -0
- package/core/bin/lib/model-profiles.d.cts +33 -0
- package/core/bin/lib/model-profiles.d.cts.map +1 -0
- package/core/bin/lib/phase.cjs +713 -0
- package/core/bin/lib/phase.cjs.map +1 -0
- package/core/bin/lib/phase.cts +914 -0
- package/core/bin/lib/phase.d.cts +21 -0
- package/core/bin/lib/phase.d.cts.map +1 -0
- package/core/bin/lib/roadmap.cjs +246 -0
- package/core/bin/lib/roadmap.cjs.map +1 -0
- package/core/bin/lib/roadmap.cts +311 -0
- package/core/bin/lib/roadmap.d.cts +7 -0
- package/core/bin/lib/roadmap.d.cts.map +1 -0
- package/core/bin/lib/state.cjs +709 -0
- package/core/bin/lib/state.cjs.map +1 -0
- package/core/bin/lib/state.cts +718 -0
- package/core/bin/lib/state.d.cts +47 -0
- package/core/bin/lib/state.d.cts.map +1 -0
- package/core/bin/lib/template.cjs +220 -0
- package/core/bin/lib/template.cjs.map +1 -0
- package/core/bin/lib/template.cts +229 -0
- package/core/bin/lib/template.d.cts +15 -0
- package/core/bin/lib/template.d.cts.map +1 -0
- package/core/bin/lib/verify.cjs +824 -0
- package/core/bin/lib/verify.cjs.map +1 -0
- package/core/bin/lib/verify.cts +829 -0
- package/core/bin/lib/verify.d.cts +17 -0
- package/core/bin/lib/verify.d.cts.map +1 -0
- package/core/bin/vector-tools.cjs +641 -0
- package/core/bin/vector-tools.cjs.map +1 -0
- package/core/bin/vector-tools.cts +603 -0
- package/core/bin/vector-tools.d.cts +128 -0
- package/core/bin/vector-tools.d.cts.map +1 -0
- package/core/references/checkpoints.md +776 -0
- package/core/references/continuation-format.md +249 -0
- package/core/references/decimal-phase-calculation.md +65 -0
- package/core/references/git-integration.md +248 -0
- package/core/references/git-planning-commit.md +38 -0
- package/core/references/model-profile-resolution.md +36 -0
- package/core/references/model-profiles.md +101 -0
- package/core/references/phase-argument-parsing.md +61 -0
- package/core/references/planning-config.md +200 -0
- package/core/references/questioning.md +162 -0
- package/core/references/tdd.md +263 -0
- package/core/references/ui-brand.md +160 -0
- package/core/references/verification-patterns.md +612 -0
- package/core/templates/DEBUG.md +164 -0
- package/core/templates/UAT.md +247 -0
- package/core/templates/UI-SPEC.md +100 -0
- package/core/templates/VALIDATION.md +76 -0
- package/core/templates/codebase/architecture.md +255 -0
- package/core/templates/codebase/concerns.md +310 -0
- package/core/templates/codebase/conventions.md +307 -0
- package/core/templates/codebase/integrations.md +280 -0
- package/core/templates/codebase/stack.md +186 -0
- package/core/templates/codebase/structure.md +285 -0
- package/core/templates/codebase/testing.md +480 -0
- package/core/templates/config.json +37 -0
- package/core/templates/context.md +352 -0
- package/core/templates/continue-here.md +78 -0
- package/core/templates/copilot-instructions.md +7 -0
- package/core/templates/debug-subagent-prompt.md +91 -0
- package/core/templates/discovery.md +146 -0
- package/core/templates/milestone-archive.md +123 -0
- package/core/templates/milestone.md +115 -0
- package/core/templates/phase-prompt.md +610 -0
- package/core/templates/planner-subagent-prompt.md +117 -0
- package/core/templates/project.md +184 -0
- package/core/templates/requirements.md +231 -0
- package/core/templates/research-project/ARCHITECTURE.md +204 -0
- package/core/templates/research-project/FEATURES.md +147 -0
- package/core/templates/research-project/PITFALLS.md +200 -0
- package/core/templates/research-project/STACK.md +120 -0
- package/core/templates/research-project/SUMMARY.md +170 -0
- package/core/templates/research.md +552 -0
- package/core/templates/retrospective.md +54 -0
- package/core/templates/roadmap.md +202 -0
- package/core/templates/state.md +176 -0
- package/core/templates/summary-complex.md +59 -0
- package/core/templates/summary-minimal.md +41 -0
- package/core/templates/summary-standard.md +48 -0
- package/core/templates/summary.md +248 -0
- package/core/templates/user-setup.md +311 -0
- package/core/templates/verification-report.md +322 -0
- package/core/workflows/add-phase.md +112 -0
- package/core/workflows/add-tests.md +351 -0
- package/core/workflows/add-todo.md +158 -0
- package/core/workflows/audit-milestone.md +332 -0
- package/core/workflows/autonomous.md +743 -0
- package/core/workflows/check-todos.md +177 -0
- package/core/workflows/cleanup.md +152 -0
- package/core/workflows/complete-milestone.md +766 -0
- package/core/workflows/diagnose-issues.md +219 -0
- package/core/workflows/discovery-phase.md +289 -0
- package/core/workflows/discuss-phase.md +762 -0
- package/core/workflows/do.md +104 -0
- package/core/workflows/execute-phase.md +468 -0
- package/core/workflows/execute-plan.md +483 -0
- package/core/workflows/health.md +159 -0
- package/core/workflows/help.md +513 -0
- package/core/workflows/insert-phase.md +130 -0
- package/core/workflows/list-phase-assumptions.md +178 -0
- package/core/workflows/map-codebase.md +316 -0
- package/core/workflows/new-milestone.md +386 -0
- package/core/workflows/new-project.md +1113 -0
- package/core/workflows/node-repair.md +92 -0
- package/core/workflows/pause-work.md +122 -0
- package/core/workflows/plan-milestone-gaps.md +274 -0
- package/core/workflows/plan-phase.md +666 -0
- package/core/workflows/progress.md +382 -0
- package/core/workflows/quick.md +717 -0
- package/core/workflows/remove-phase.md +155 -0
- package/core/workflows/research-phase.md +74 -0
- package/core/workflows/resume-project.md +307 -0
- package/core/workflows/settings.md +243 -0
- package/core/workflows/stats.md +60 -0
- package/core/workflows/transition.md +544 -0
- package/core/workflows/ui-phase.md +290 -0
- package/core/workflows/ui-review.md +157 -0
- package/core/workflows/update.md +320 -0
- package/core/workflows/validate-phase.md +167 -0
- package/core/workflows/verify-phase.md +243 -0
- package/core/workflows/verify-work.md +584 -0
- package/package.json +55 -0
- package/scripts/build-hooks.cjs +38 -0
- package/scripts/build-hooks.cjs.map +1 -0
- package/scripts/build-hooks.cts +41 -0
- package/scripts/build-hooks.d.cts +6 -0
- package/scripts/build-hooks.d.cts.map +1 -0
- package/scripts/run-tests.cjs +28 -0
- package/scripts/run-tests.cjs.map +1 -0
- package/scripts/run-tests.cts +28 -0
- package/scripts/run-tests.d.cts +3 -0
- package/scripts/run-tests.d.cts.map +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function cmdGenerateSlug(text: string | undefined, raw: boolean): void;
|
|
2
|
+
export declare function cmdCurrentTimestamp(format: string | undefined, raw: boolean): void;
|
|
3
|
+
export declare function cmdListTodos(cwd: string, area: string | undefined, raw: boolean): void;
|
|
4
|
+
export declare function cmdVerifyPathExists(cwd: string, targetPath: string | undefined, raw: boolean): void;
|
|
5
|
+
export declare function cmdHistoryDigest(cwd: string, raw: boolean): void;
|
|
6
|
+
export declare function cmdResolveModel(cwd: string, agentType: string | undefined, raw: boolean): void;
|
|
7
|
+
export declare function cmdCommit(cwd: string, message: string | undefined, files: string[] | undefined, raw: boolean, amend: boolean | undefined): void;
|
|
8
|
+
export declare function cmdSummaryExtract(cwd: string, summaryPath: string | undefined, fields: string[] | undefined, raw: boolean): void;
|
|
9
|
+
interface WebsearchOptions {
|
|
10
|
+
limit?: number;
|
|
11
|
+
freshness?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function cmdWebsearch(query: string | undefined, options: WebsearchOptions, raw: boolean): Promise<void>;
|
|
14
|
+
export declare function cmdProgressRender(cwd: string, format: string | undefined, raw: boolean): void;
|
|
15
|
+
export declare function cmdTodoComplete(cwd: string, filename: string | undefined, raw: boolean): void;
|
|
16
|
+
interface ScaffoldOptions {
|
|
17
|
+
phase?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function cmdScaffold(cwd: string, type: string, options: ScaffoldOptions, raw: boolean): void;
|
|
21
|
+
export declare function cmdStats(cwd: string, format: string | undefined, raw: boolean): void;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=commands.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.cts","sourceRoot":"","sources":["commands.cts"],"names":[],"mappings":"AASA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAY5E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,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C,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAyB7F;AAED,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAyDnG;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CA6JpF"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Config — Planning config CRUD operations
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ensureConfigFile = ensureConfigFile;
|
|
10
|
+
exports.cmdConfigEnsureSection = cmdConfigEnsureSection;
|
|
11
|
+
exports.setConfigValue = setConfigValue;
|
|
12
|
+
exports.cmdConfigSet = cmdConfigSet;
|
|
13
|
+
exports.cmdConfigGet = cmdConfigGet;
|
|
14
|
+
exports.cmdConfigSetModelProfile = cmdConfigSetModelProfile;
|
|
15
|
+
const fs_1 = __importDefault(require("fs"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const os_1 = __importDefault(require("os"));
|
|
18
|
+
const core_cjs_1 = require("./core.cjs");
|
|
19
|
+
const model_profiles_cjs_1 = require("./model-profiles.cjs");
|
|
20
|
+
const VALID_CONFIG_KEYS = new Set([
|
|
21
|
+
'mode', 'granularity', 'parallelization', 'commit_docs', 'model_profile',
|
|
22
|
+
'search_gitignored', 'brave_search',
|
|
23
|
+
'workflow.research', 'workflow.plan_check', 'workflow.verifier',
|
|
24
|
+
'workflow.nyquist_validation', 'workflow.ui_phase', 'workflow.ui_safety_gate',
|
|
25
|
+
'workflow._auto_chain_active',
|
|
26
|
+
'git.branching_strategy', 'git.phase_branch_template', 'git.milestone_branch_template',
|
|
27
|
+
'planning.commit_docs', 'planning.search_gitignored',
|
|
28
|
+
]);
|
|
29
|
+
const CONFIG_KEY_SUGGESTIONS = {
|
|
30
|
+
'workflow.nyquist_validation_enabled': 'workflow.nyquist_validation',
|
|
31
|
+
'agents.nyquist_validation_enabled': 'workflow.nyquist_validation',
|
|
32
|
+
'nyquist.validation_enabled': 'workflow.nyquist_validation',
|
|
33
|
+
};
|
|
34
|
+
function validateKnownConfigKeyPath(keyPath) {
|
|
35
|
+
const suggested = CONFIG_KEY_SUGGESTIONS[keyPath];
|
|
36
|
+
if (suggested) {
|
|
37
|
+
(0, core_cjs_1.error)(`Unknown config key: ${keyPath}. Did you mean ${suggested}?`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Ensures the config file exists (creates it if needed).
|
|
42
|
+
*
|
|
43
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
44
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
45
|
+
*/
|
|
46
|
+
function ensureConfigFile(cwd) {
|
|
47
|
+
const configPath = path_1.default.join(cwd, '.planning', 'config.json');
|
|
48
|
+
const planningDir = path_1.default.join(cwd, '.planning');
|
|
49
|
+
// Ensure .planning directory exists
|
|
50
|
+
try {
|
|
51
|
+
if (!fs_1.default.existsSync(planningDir)) {
|
|
52
|
+
fs_1.default.mkdirSync(planningDir, { recursive: true });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
(0, core_cjs_1.error)('Failed to create .planning directory: ' + err.message);
|
|
57
|
+
}
|
|
58
|
+
// Check if config already exists
|
|
59
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
60
|
+
return { created: false, reason: 'already_exists' };
|
|
61
|
+
}
|
|
62
|
+
// Detect Brave Search API key availability
|
|
63
|
+
const homedir = os_1.default.homedir();
|
|
64
|
+
const braveKeyFile = path_1.default.join(homedir, '.vector', 'brave_api_key');
|
|
65
|
+
const hasBraveSearch = !!(process.env.BRAVE_API_KEY || fs_1.default.existsSync(braveKeyFile));
|
|
66
|
+
// Load user-level defaults from ~/.vector/defaults.json if available
|
|
67
|
+
const globalDefaultsPath = path_1.default.join(homedir, '.vector', 'defaults.json');
|
|
68
|
+
let userDefaults = {};
|
|
69
|
+
try {
|
|
70
|
+
if (fs_1.default.existsSync(globalDefaultsPath)) {
|
|
71
|
+
userDefaults = JSON.parse(fs_1.default.readFileSync(globalDefaultsPath, 'utf-8'));
|
|
72
|
+
// Migrate deprecated "depth" key to "granularity"
|
|
73
|
+
if ('depth' in userDefaults && !('granularity' in userDefaults)) {
|
|
74
|
+
const depthToGranularity = { quick: 'coarse', standard: 'standard', comprehensive: 'fine' };
|
|
75
|
+
userDefaults.granularity = depthToGranularity[userDefaults.depth] || userDefaults.depth;
|
|
76
|
+
delete userDefaults.depth;
|
|
77
|
+
try {
|
|
78
|
+
fs_1.default.writeFileSync(globalDefaultsPath, JSON.stringify(userDefaults, null, 2), 'utf-8');
|
|
79
|
+
}
|
|
80
|
+
catch { }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (_err) {
|
|
85
|
+
// Ignore malformed global defaults, fall back to hardcoded
|
|
86
|
+
}
|
|
87
|
+
// Create default config (user-level defaults override hardcoded defaults)
|
|
88
|
+
const hardcoded = {
|
|
89
|
+
model_profile: 'balanced',
|
|
90
|
+
commit_docs: true,
|
|
91
|
+
search_gitignored: false,
|
|
92
|
+
branching_strategy: 'none',
|
|
93
|
+
phase_branch_template: 'vector/phase-{phase}-{slug}',
|
|
94
|
+
milestone_branch_template: 'vector/{milestone}-{slug}',
|
|
95
|
+
workflow: {
|
|
96
|
+
research: true,
|
|
97
|
+
plan_check: true,
|
|
98
|
+
verifier: true,
|
|
99
|
+
nyquist_validation: true,
|
|
100
|
+
},
|
|
101
|
+
parallelization: true,
|
|
102
|
+
brave_search: hasBraveSearch,
|
|
103
|
+
};
|
|
104
|
+
const defaults = {
|
|
105
|
+
...hardcoded,
|
|
106
|
+
...userDefaults,
|
|
107
|
+
workflow: { ...hardcoded.workflow, ...(userDefaults.workflow || {}) },
|
|
108
|
+
};
|
|
109
|
+
try {
|
|
110
|
+
fs_1.default.writeFileSync(configPath, JSON.stringify(defaults, null, 2), 'utf-8');
|
|
111
|
+
return { created: true, path: '.planning/config.json' };
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
(0, core_cjs_1.error)('Failed to create config.json: ' + err.message);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Command to ensure the config file exists (creates it if needed).
|
|
119
|
+
*
|
|
120
|
+
* Note that this exits the process (via `output()`) even in the happy path; use
|
|
121
|
+
* `ensureConfigFile()` directly if you need to avoid this.
|
|
122
|
+
*/
|
|
123
|
+
function cmdConfigEnsureSection(cwd, raw) {
|
|
124
|
+
const ensureConfigFileResult = ensureConfigFile(cwd);
|
|
125
|
+
if (ensureConfigFileResult.created) {
|
|
126
|
+
(0, core_cjs_1.output)(ensureConfigFileResult, raw, 'created');
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
(0, core_cjs_1.output)(ensureConfigFileResult, raw, 'exists');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Sets a value in the config file, allowing nested values via dot notation (e.g.,
|
|
134
|
+
* "workflow.research").
|
|
135
|
+
*
|
|
136
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
137
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
138
|
+
*/
|
|
139
|
+
function setConfigValue(cwd, keyPath, parsedValue) {
|
|
140
|
+
const configPath = path_1.default.join(cwd, '.planning', 'config.json');
|
|
141
|
+
// Load existing config or start with empty object
|
|
142
|
+
let config = {};
|
|
143
|
+
try {
|
|
144
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
145
|
+
config = JSON.parse(fs_1.default.readFileSync(configPath, 'utf-8'));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
(0, core_cjs_1.error)('Failed to read config.json: ' + err.message);
|
|
150
|
+
}
|
|
151
|
+
// Set nested value using dot notation (e.g., "workflow.research")
|
|
152
|
+
const keys = keyPath.split('.');
|
|
153
|
+
let current = config;
|
|
154
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
155
|
+
const key = keys[i];
|
|
156
|
+
if (current[key] === undefined || typeof current[key] !== 'object') {
|
|
157
|
+
current[key] = {};
|
|
158
|
+
}
|
|
159
|
+
current = current[key];
|
|
160
|
+
}
|
|
161
|
+
const previousValue = current[keys[keys.length - 1]]; // Capture previous value before overwriting
|
|
162
|
+
current[keys[keys.length - 1]] = parsedValue;
|
|
163
|
+
// Write back
|
|
164
|
+
try {
|
|
165
|
+
fs_1.default.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
166
|
+
return { updated: true, key: keyPath, value: parsedValue, previousValue };
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
(0, core_cjs_1.error)('Failed to write config.json: ' + err.message);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Command to set a value in the config file, allowing nested values via dot notation (e.g.,
|
|
174
|
+
* "workflow.research").
|
|
175
|
+
*
|
|
176
|
+
* Note that this exits the process (via `output()`) even in the happy path; use `setConfigValue()`
|
|
177
|
+
* directly if you need to avoid this.
|
|
178
|
+
*/
|
|
179
|
+
function cmdConfigSet(cwd, keyPath, value, raw) {
|
|
180
|
+
if (!keyPath) {
|
|
181
|
+
(0, core_cjs_1.error)('Usage: config-set <key.path> <value>');
|
|
182
|
+
}
|
|
183
|
+
validateKnownConfigKeyPath(keyPath);
|
|
184
|
+
if (!VALID_CONFIG_KEYS.has(keyPath)) {
|
|
185
|
+
(0, core_cjs_1.error)(`Unknown config key: "${keyPath}". Valid keys: ${[...VALID_CONFIG_KEYS].sort().join(', ')}`);
|
|
186
|
+
}
|
|
187
|
+
// Parse value (handle booleans and numbers)
|
|
188
|
+
let parsedValue = value;
|
|
189
|
+
if (value === 'true')
|
|
190
|
+
parsedValue = true;
|
|
191
|
+
else if (value === 'false')
|
|
192
|
+
parsedValue = false;
|
|
193
|
+
else if (value !== undefined && !isNaN(Number(value)) && value !== '')
|
|
194
|
+
parsedValue = Number(value);
|
|
195
|
+
const setConfigValueResult = setConfigValue(cwd, keyPath, parsedValue);
|
|
196
|
+
(0, core_cjs_1.output)(setConfigValueResult, raw, `${keyPath}=${parsedValue}`);
|
|
197
|
+
}
|
|
198
|
+
function cmdConfigGet(cwd, keyPath, raw) {
|
|
199
|
+
const configPath = path_1.default.join(cwd, '.planning', 'config.json');
|
|
200
|
+
if (!keyPath) {
|
|
201
|
+
(0, core_cjs_1.error)('Usage: config-get <key.path>');
|
|
202
|
+
}
|
|
203
|
+
let config = {};
|
|
204
|
+
try {
|
|
205
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
206
|
+
config = JSON.parse(fs_1.default.readFileSync(configPath, 'utf-8'));
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
(0, core_cjs_1.error)('No config.json found at ' + configPath);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (err) {
|
|
213
|
+
if (err.message.startsWith('No config.json'))
|
|
214
|
+
throw err;
|
|
215
|
+
(0, core_cjs_1.error)('Failed to read config.json: ' + err.message);
|
|
216
|
+
}
|
|
217
|
+
// Traverse dot-notation path (e.g., "workflow.auto_advance")
|
|
218
|
+
const keys = keyPath.split('.');
|
|
219
|
+
let current = config;
|
|
220
|
+
for (const key of keys) {
|
|
221
|
+
if (current === undefined || current === null || typeof current !== 'object') {
|
|
222
|
+
(0, core_cjs_1.error)(`Key not found: ${keyPath}`);
|
|
223
|
+
}
|
|
224
|
+
current = current[key];
|
|
225
|
+
}
|
|
226
|
+
if (current === undefined) {
|
|
227
|
+
(0, core_cjs_1.error)(`Key not found: ${keyPath}`);
|
|
228
|
+
}
|
|
229
|
+
(0, core_cjs_1.output)(current, raw, String(current));
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Command to set the model profile in the config file.
|
|
233
|
+
*
|
|
234
|
+
* Note that this exits the process (via `output()`) even in the happy path.
|
|
235
|
+
*/
|
|
236
|
+
function cmdConfigSetModelProfile(cwd, profile, raw) {
|
|
237
|
+
if (!profile) {
|
|
238
|
+
(0, core_cjs_1.error)(`Usage: config-set-model-profile <${model_profiles_cjs_1.VALID_PROFILES.join('|')}>`);
|
|
239
|
+
}
|
|
240
|
+
const normalizedProfile = profile.toLowerCase().trim();
|
|
241
|
+
if (!model_profiles_cjs_1.VALID_PROFILES.includes(normalizedProfile)) {
|
|
242
|
+
(0, core_cjs_1.error)(`Invalid profile '${profile}'. Valid profiles: ${model_profiles_cjs_1.VALID_PROFILES.join(', ')}`);
|
|
243
|
+
}
|
|
244
|
+
// Ensure config exists (create if needed)
|
|
245
|
+
ensureConfigFile(cwd);
|
|
246
|
+
// Set the model profile in the config
|
|
247
|
+
const { previousValue } = setConfigValue(cwd, 'model_profile', normalizedProfile);
|
|
248
|
+
const previousProfile = previousValue || 'balanced';
|
|
249
|
+
// Build result value / message and return
|
|
250
|
+
const agentToModelMap = (0, model_profiles_cjs_1.getAgentToModelMapForProfile)(normalizedProfile);
|
|
251
|
+
const result = {
|
|
252
|
+
updated: true,
|
|
253
|
+
profile: normalizedProfile,
|
|
254
|
+
previousProfile,
|
|
255
|
+
agentToModelMap,
|
|
256
|
+
};
|
|
257
|
+
const rawValue = getCmdConfigSetModelProfileResultMessage(normalizedProfile, previousProfile, agentToModelMap);
|
|
258
|
+
(0, core_cjs_1.output)(result, raw, rawValue);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Returns the message to display for the result of the `config-set-model-profile` command when
|
|
262
|
+
* displaying raw output.
|
|
263
|
+
*/
|
|
264
|
+
function getCmdConfigSetModelProfileResultMessage(normalizedProfile, previousProfile, agentToModelMap) {
|
|
265
|
+
const agentToModelTable = (0, model_profiles_cjs_1.formatAgentToModelMapAsTable)(agentToModelMap);
|
|
266
|
+
const didChange = previousProfile !== normalizedProfile;
|
|
267
|
+
const paragraphs = didChange
|
|
268
|
+
? [
|
|
269
|
+
`✓ Model profile set to: ${normalizedProfile} (was: ${previousProfile})`,
|
|
270
|
+
'Agents will now use:',
|
|
271
|
+
agentToModelTable,
|
|
272
|
+
'Next spawned agents will use the new profile.',
|
|
273
|
+
]
|
|
274
|
+
: [
|
|
275
|
+
`✓ Model profile is already set to: ${normalizedProfile}`,
|
|
276
|
+
'Agents are using:',
|
|
277
|
+
agentToModelTable,
|
|
278
|
+
];
|
|
279
|
+
return paragraphs.join('\n\n');
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.cjs","sourceRoot":"","sources":["config.cts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAyCH,4CAwEC;AAQD,wDAOC;AASD,wCAiCC;AASD,oCAmBC;AAED,oCAkCC;AAOD,4DA+BC;AA9QD,4CAAoB;AACpB,gDAAwB;AACxB,4CAAoB;AACpB,yCAA2C;AAC3C,6DAI8B;AAE9B,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe;IACxE,mBAAmB,EAAE,cAAc;IACnC,mBAAmB,EAAE,qBAAqB,EAAE,mBAAmB;IAC/D,6BAA6B,EAAE,mBAAmB,EAAE,yBAAyB;IAC7E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AE,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,SAAS,wCAAwC,CAC/C,iBAAyB,EACzB,eAAuB,EACvB,eAAuC;IAEvC,MAAM,iBAAiB,GAAG,IAAA,iDAA4B,EAAC,eAAe,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,eAAe,KAAK,iBAAiB,CAAC;IACxD,MAAM,UAAU,GAAG,SAAS;QAC1B,CAAC,CAAC;YACE,2BAA2B,iBAAiB,UAAU,eAAe,GAAG;YACxE,sBAAsB;YACtB,iBAAiB;YACjB,+CAA+C;SAChD;QACH,CAAC,CAAC;YACE,sCAAsC,iBAAiB,EAAE;YACzD,mBAAmB;YACnB,iBAAiB;SAClB,CAAC;IACN,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config — Planning config CRUD operations
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import os from 'os';
|
|
8
|
+
import { output, error } from './core.cjs';
|
|
9
|
+
import {
|
|
10
|
+
VALID_PROFILES,
|
|
11
|
+
getAgentToModelMapForProfile,
|
|
12
|
+
formatAgentToModelMapAsTable,
|
|
13
|
+
} from './model-profiles.cjs';
|
|
14
|
+
|
|
15
|
+
const VALID_CONFIG_KEYS = new Set([
|
|
16
|
+
'mode', 'granularity', 'parallelization', 'commit_docs', 'model_profile',
|
|
17
|
+
'search_gitignored', 'brave_search',
|
|
18
|
+
'workflow.research', 'workflow.plan_check', 'workflow.verifier',
|
|
19
|
+
'workflow.nyquist_validation', 'workflow.ui_phase', 'workflow.ui_safety_gate',
|
|
20
|
+
'workflow._auto_chain_active',
|
|
21
|
+
'git.branching_strategy', 'git.phase_branch_template', 'git.milestone_branch_template',
|
|
22
|
+
'planning.commit_docs', 'planning.search_gitignored',
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
const CONFIG_KEY_SUGGESTIONS: Record<string, string> = {
|
|
26
|
+
'workflow.nyquist_validation_enabled': 'workflow.nyquist_validation',
|
|
27
|
+
'agents.nyquist_validation_enabled': 'workflow.nyquist_validation',
|
|
28
|
+
'nyquist.validation_enabled': 'workflow.nyquist_validation',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function validateKnownConfigKeyPath(keyPath: string): void {
|
|
32
|
+
const suggested = CONFIG_KEY_SUGGESTIONS[keyPath];
|
|
33
|
+
if (suggested) {
|
|
34
|
+
error(`Unknown config key: ${keyPath}. Did you mean ${suggested}?`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Ensures the config file exists (creates it if needed).
|
|
40
|
+
*
|
|
41
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
42
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
43
|
+
*/
|
|
44
|
+
export function ensureConfigFile(cwd: string): { created: boolean; reason?: string; path?: string } {
|
|
45
|
+
const configPath = path.join(cwd, '.planning', 'config.json');
|
|
46
|
+
const planningDir = path.join(cwd, '.planning');
|
|
47
|
+
|
|
48
|
+
// Ensure .planning directory exists
|
|
49
|
+
try {
|
|
50
|
+
if (!fs.existsSync(planningDir)) {
|
|
51
|
+
fs.mkdirSync(planningDir, { recursive: true });
|
|
52
|
+
}
|
|
53
|
+
} catch (err) {
|
|
54
|
+
error('Failed to create .planning directory: ' + (err as Error).message);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Check if config already exists
|
|
58
|
+
if (fs.existsSync(configPath)) {
|
|
59
|
+
return { created: false, reason: 'already_exists' };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Detect Brave Search API key availability
|
|
63
|
+
const homedir = os.homedir();
|
|
64
|
+
const braveKeyFile = path.join(homedir, '.vector', 'brave_api_key');
|
|
65
|
+
const hasBraveSearch = !!(process.env.BRAVE_API_KEY || fs.existsSync(braveKeyFile));
|
|
66
|
+
|
|
67
|
+
// Load user-level defaults from ~/.vector/defaults.json if available
|
|
68
|
+
const globalDefaultsPath = path.join(homedir, '.vector', 'defaults.json');
|
|
69
|
+
let userDefaults: Record<string, unknown> = {};
|
|
70
|
+
try {
|
|
71
|
+
if (fs.existsSync(globalDefaultsPath)) {
|
|
72
|
+
userDefaults = JSON.parse(fs.readFileSync(globalDefaultsPath, 'utf-8'));
|
|
73
|
+
// Migrate deprecated "depth" key to "granularity"
|
|
74
|
+
if ('depth' in userDefaults && !('granularity' in userDefaults)) {
|
|
75
|
+
const depthToGranularity: Record<string, string> = { quick: 'coarse', standard: 'standard', comprehensive: 'fine' };
|
|
76
|
+
userDefaults.granularity = depthToGranularity[userDefaults.depth as string] || userDefaults.depth;
|
|
77
|
+
delete userDefaults.depth;
|
|
78
|
+
try {
|
|
79
|
+
fs.writeFileSync(globalDefaultsPath, JSON.stringify(userDefaults, null, 2), 'utf-8');
|
|
80
|
+
} catch {}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
} catch (_err) {
|
|
84
|
+
// Ignore malformed global defaults, fall back to hardcoded
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Create default config (user-level defaults override hardcoded defaults)
|
|
88
|
+
const hardcoded = {
|
|
89
|
+
model_profile: 'balanced',
|
|
90
|
+
commit_docs: true,
|
|
91
|
+
search_gitignored: false,
|
|
92
|
+
branching_strategy: 'none',
|
|
93
|
+
phase_branch_template: 'vector/phase-{phase}-{slug}',
|
|
94
|
+
milestone_branch_template: 'vector/{milestone}-{slug}',
|
|
95
|
+
workflow: {
|
|
96
|
+
research: true,
|
|
97
|
+
plan_check: true,
|
|
98
|
+
verifier: true,
|
|
99
|
+
nyquist_validation: true,
|
|
100
|
+
},
|
|
101
|
+
parallelization: true,
|
|
102
|
+
brave_search: hasBraveSearch,
|
|
103
|
+
};
|
|
104
|
+
const defaults = {
|
|
105
|
+
...hardcoded,
|
|
106
|
+
...userDefaults,
|
|
107
|
+
workflow: { ...hardcoded.workflow, ...((userDefaults.workflow as Record<string, unknown>) || {}) },
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
fs.writeFileSync(configPath, JSON.stringify(defaults, null, 2), 'utf-8');
|
|
112
|
+
return { created: true, path: '.planning/config.json' };
|
|
113
|
+
} catch (err) {
|
|
114
|
+
error('Failed to create config.json: ' + (err as Error).message);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Command to ensure the config file exists (creates it if needed).
|
|
120
|
+
*
|
|
121
|
+
* Note that this exits the process (via `output()`) even in the happy path; use
|
|
122
|
+
* `ensureConfigFile()` directly if you need to avoid this.
|
|
123
|
+
*/
|
|
124
|
+
export function cmdConfigEnsureSection(cwd: string, raw: boolean): void {
|
|
125
|
+
const ensureConfigFileResult = ensureConfigFile(cwd);
|
|
126
|
+
if (ensureConfigFileResult.created) {
|
|
127
|
+
output(ensureConfigFileResult, raw, 'created');
|
|
128
|
+
} else {
|
|
129
|
+
output(ensureConfigFileResult, raw, 'exists');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sets a value in the config file, allowing nested values via dot notation (e.g.,
|
|
135
|
+
* "workflow.research").
|
|
136
|
+
*
|
|
137
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
138
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
139
|
+
*/
|
|
140
|
+
export function setConfigValue(cwd: string, keyPath: string, parsedValue: unknown): { updated: boolean; key: string; value: unknown; previousValue: unknown } {
|
|
141
|
+
const configPath = path.join(cwd, '.planning', 'config.json');
|
|
142
|
+
|
|
143
|
+
// Load existing config or start with empty object
|
|
144
|
+
let config: Record<string, unknown> = {};
|
|
145
|
+
try {
|
|
146
|
+
if (fs.existsSync(configPath)) {
|
|
147
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
148
|
+
}
|
|
149
|
+
} catch (err) {
|
|
150
|
+
error('Failed to read config.json: ' + (err as Error).message);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Set nested value using dot notation (e.g., "workflow.research")
|
|
154
|
+
const keys = keyPath.split('.');
|
|
155
|
+
let current: Record<string, unknown> = config;
|
|
156
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
157
|
+
const key = keys[i];
|
|
158
|
+
if (current[key] === undefined || typeof current[key] !== 'object') {
|
|
159
|
+
current[key] = {};
|
|
160
|
+
}
|
|
161
|
+
current = current[key] as Record<string, unknown>;
|
|
162
|
+
}
|
|
163
|
+
const previousValue = current[keys[keys.length - 1]]; // Capture previous value before overwriting
|
|
164
|
+
current[keys[keys.length - 1]] = parsedValue;
|
|
165
|
+
|
|
166
|
+
// Write back
|
|
167
|
+
try {
|
|
168
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
169
|
+
return { updated: true, key: keyPath, value: parsedValue, previousValue };
|
|
170
|
+
} catch (err) {
|
|
171
|
+
error('Failed to write config.json: ' + (err as Error).message);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Command to set a value in the config file, allowing nested values via dot notation (e.g.,
|
|
177
|
+
* "workflow.research").
|
|
178
|
+
*
|
|
179
|
+
* Note that this exits the process (via `output()`) even in the happy path; use `setConfigValue()`
|
|
180
|
+
* directly if you need to avoid this.
|
|
181
|
+
*/
|
|
182
|
+
export function cmdConfigSet(cwd: string, keyPath: string | undefined, value: string | undefined, raw: boolean): void {
|
|
183
|
+
if (!keyPath) {
|
|
184
|
+
error('Usage: config-set <key.path> <value>');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
validateKnownConfigKeyPath(keyPath!);
|
|
188
|
+
|
|
189
|
+
if (!VALID_CONFIG_KEYS.has(keyPath!)) {
|
|
190
|
+
error(`Unknown config key: "${keyPath}". Valid keys: ${[...VALID_CONFIG_KEYS].sort().join(', ')}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Parse value (handle booleans and numbers)
|
|
194
|
+
let parsedValue: unknown = value;
|
|
195
|
+
if (value === 'true') parsedValue = true;
|
|
196
|
+
else if (value === 'false') parsedValue = false;
|
|
197
|
+
else if (value !== undefined && !isNaN(Number(value)) && value !== '') parsedValue = Number(value);
|
|
198
|
+
|
|
199
|
+
const setConfigValueResult = setConfigValue(cwd, keyPath!, parsedValue);
|
|
200
|
+
output(setConfigValueResult, raw, `${keyPath}=${parsedValue}`);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function cmdConfigGet(cwd: string, keyPath: string | undefined, raw: boolean): void {
|
|
204
|
+
const configPath = path.join(cwd, '.planning', 'config.json');
|
|
205
|
+
|
|
206
|
+
if (!keyPath) {
|
|
207
|
+
error('Usage: config-get <key.path>');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
let config: Record<string, unknown> = {};
|
|
211
|
+
try {
|
|
212
|
+
if (fs.existsSync(configPath)) {
|
|
213
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
214
|
+
} else {
|
|
215
|
+
error('No config.json found at ' + configPath);
|
|
216
|
+
}
|
|
217
|
+
} catch (err) {
|
|
218
|
+
if ((err as Error).message.startsWith('No config.json')) throw err;
|
|
219
|
+
error('Failed to read config.json: ' + (err as Error).message);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Traverse dot-notation path (e.g., "workflow.auto_advance")
|
|
223
|
+
const keys = keyPath!.split('.');
|
|
224
|
+
let current: unknown = config;
|
|
225
|
+
for (const key of keys) {
|
|
226
|
+
if (current === undefined || current === null || typeof current !== 'object') {
|
|
227
|
+
error(`Key not found: ${keyPath}`);
|
|
228
|
+
}
|
|
229
|
+
current = (current as Record<string, unknown>)[key];
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (current === undefined) {
|
|
233
|
+
error(`Key not found: ${keyPath}`);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
output(current, raw, String(current));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Command to set the model profile in the config file.
|
|
241
|
+
*
|
|
242
|
+
* Note that this exits the process (via `output()`) even in the happy path.
|
|
243
|
+
*/
|
|
244
|
+
export function cmdConfigSetModelProfile(cwd: string, profile: string | undefined, raw: boolean): void {
|
|
245
|
+
if (!profile) {
|
|
246
|
+
error(`Usage: config-set-model-profile <${VALID_PROFILES.join('|')}>`);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const normalizedProfile = profile!.toLowerCase().trim();
|
|
250
|
+
if (!VALID_PROFILES.includes(normalizedProfile)) {
|
|
251
|
+
error(`Invalid profile '${profile}'. Valid profiles: ${VALID_PROFILES.join(', ')}`);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Ensure config exists (create if needed)
|
|
255
|
+
ensureConfigFile(cwd);
|
|
256
|
+
|
|
257
|
+
// Set the model profile in the config
|
|
258
|
+
const { previousValue } = setConfigValue(cwd, 'model_profile', normalizedProfile);
|
|
259
|
+
const previousProfile = (previousValue as string) || 'balanced';
|
|
260
|
+
|
|
261
|
+
// Build result value / message and return
|
|
262
|
+
const agentToModelMap = getAgentToModelMapForProfile(normalizedProfile);
|
|
263
|
+
const result = {
|
|
264
|
+
updated: true,
|
|
265
|
+
profile: normalizedProfile,
|
|
266
|
+
previousProfile,
|
|
267
|
+
agentToModelMap,
|
|
268
|
+
};
|
|
269
|
+
const rawValue = getCmdConfigSetModelProfileResultMessage(
|
|
270
|
+
normalizedProfile,
|
|
271
|
+
previousProfile,
|
|
272
|
+
agentToModelMap
|
|
273
|
+
);
|
|
274
|
+
output(result, raw, rawValue);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Returns the message to display for the result of the `config-set-model-profile` command when
|
|
279
|
+
* displaying raw output.
|
|
280
|
+
*/
|
|
281
|
+
function getCmdConfigSetModelProfileResultMessage(
|
|
282
|
+
normalizedProfile: string,
|
|
283
|
+
previousProfile: string,
|
|
284
|
+
agentToModelMap: Record<string, string>
|
|
285
|
+
): string {
|
|
286
|
+
const agentToModelTable = formatAgentToModelMapAsTable(agentToModelMap);
|
|
287
|
+
const didChange = previousProfile !== normalizedProfile;
|
|
288
|
+
const paragraphs = didChange
|
|
289
|
+
? [
|
|
290
|
+
`✓ Model profile set to: ${normalizedProfile} (was: ${previousProfile})`,
|
|
291
|
+
'Agents will now use:',
|
|
292
|
+
agentToModelTable,
|
|
293
|
+
'Next spawned agents will use the new profile.',
|
|
294
|
+
]
|
|
295
|
+
: [
|
|
296
|
+
`✓ Model profile is already set to: ${normalizedProfile}`,
|
|
297
|
+
'Agents are using:',
|
|
298
|
+
agentToModelTable,
|
|
299
|
+
];
|
|
300
|
+
return paragraphs.join('\n\n');
|
|
301
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config — Planning config CRUD operations
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Ensures the config file exists (creates it if needed).
|
|
6
|
+
*
|
|
7
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
8
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ensureConfigFile(cwd: string): {
|
|
11
|
+
created: boolean;
|
|
12
|
+
reason?: string;
|
|
13
|
+
path?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Command to ensure the config file exists (creates it if needed).
|
|
17
|
+
*
|
|
18
|
+
* Note that this exits the process (via `output()`) even in the happy path; use
|
|
19
|
+
* `ensureConfigFile()` directly if you need to avoid this.
|
|
20
|
+
*/
|
|
21
|
+
export declare function cmdConfigEnsureSection(cwd: string, raw: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Sets a value in the config file, allowing nested values via dot notation (e.g.,
|
|
24
|
+
* "workflow.research").
|
|
25
|
+
*
|
|
26
|
+
* Does not call `output()`, so can be used as one step in a command without triggering `exit(0)` in
|
|
27
|
+
* the happy path. But note that `error()` will still `exit(1)` out of the process.
|
|
28
|
+
*/
|
|
29
|
+
export declare function setConfigValue(cwd: string, keyPath: string, parsedValue: unknown): {
|
|
30
|
+
updated: boolean;
|
|
31
|
+
key: string;
|
|
32
|
+
value: unknown;
|
|
33
|
+
previousValue: unknown;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Command to set a value in the config file, allowing nested values via dot notation (e.g.,
|
|
37
|
+
* "workflow.research").
|
|
38
|
+
*
|
|
39
|
+
* Note that this exits the process (via `output()`) even in the happy path; use `setConfigValue()`
|
|
40
|
+
* directly if you need to avoid this.
|
|
41
|
+
*/
|
|
42
|
+
export declare function cmdConfigSet(cwd: string, keyPath: string | undefined, value: string | undefined, raw: boolean): void;
|
|
43
|
+
export declare function cmdConfigGet(cwd: string, keyPath: string | undefined, raw: boolean): void;
|
|
44
|
+
/**
|
|
45
|
+
* Command to set the model profile in the config file.
|
|
46
|
+
*
|
|
47
|
+
* Note that this exits the process (via `output()`) even in the happy path.
|
|
48
|
+
*/
|
|
49
|
+
export declare function cmdConfigSetModelProfile(cwd: string, profile: string | undefined, raw: boolean): void;
|
|
50
|
+
//# sourceMappingURL=config.d.cts.map
|