gnosys 5.9.2 → 5.9.4
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/dist/cli.js +311 -147
- package/dist/cli.js.map +1 -1
- package/dist/lib/chat/index.d.ts.map +1 -1
- package/dist/lib/chat/index.js +5 -0
- package/dist/lib/chat/index.js.map +1 -1
- package/dist/lib/cleanup.d.ts +52 -0
- package/dist/lib/cleanup.d.ts.map +1 -0
- package/dist/lib/cleanup.js +168 -0
- package/dist/lib/cleanup.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +41 -2
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/dream.d.ts.map +1 -1
- package/dist/lib/dream.js +13 -2
- package/dist/lib/dream.js.map +1 -1
- package/dist/lib/paths.d.ts +8 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/paths.js +15 -0
- package/dist/lib/paths.js.map +1 -1
- package/dist/lib/remote.d.ts +11 -0
- package/dist/lib/remote.d.ts.map +1 -1
- package/dist/lib/remote.js +26 -2
- package/dist/lib/remote.js.map +1 -1
- package/dist/lib/remoteWizard.d.ts.map +1 -1
- package/dist/lib/remoteWizard.js +112 -52
- package/dist/lib/remoteWizard.js.map +1 -1
- package/dist/lib/setup/coldStart.d.ts +71 -0
- package/dist/lib/setup/coldStart.d.ts.map +1 -0
- package/dist/lib/setup/coldStart.js +122 -0
- package/dist/lib/setup/coldStart.js.map +1 -0
- package/dist/lib/setup/configSetRender.d.ts +26 -0
- package/dist/lib/setup/configSetRender.d.ts.map +1 -0
- package/dist/lib/setup/configSetRender.js +103 -0
- package/dist/lib/setup/configSetRender.js.map +1 -0
- package/dist/lib/setup/dreamRender.d.ts +44 -0
- package/dist/lib/setup/dreamRender.d.ts.map +1 -0
- package/dist/lib/setup/dreamRender.js +55 -0
- package/dist/lib/setup/dreamRender.js.map +1 -0
- package/dist/lib/setup/dreamState.d.ts +50 -0
- package/dist/lib/setup/dreamState.d.ts.map +1 -0
- package/dist/lib/setup/dreamState.js +68 -0
- package/dist/lib/setup/dreamState.js.map +1 -0
- package/dist/lib/setup/modelsRender.d.ts +25 -0
- package/dist/lib/setup/modelsRender.d.ts.map +1 -0
- package/dist/lib/setup/modelsRender.js +33 -0
- package/dist/lib/setup/modelsRender.js.map +1 -0
- package/dist/lib/setup/remoteRender.d.ts +43 -0
- package/dist/lib/setup/remoteRender.d.ts.map +1 -0
- package/dist/lib/setup/remoteRender.js +65 -0
- package/dist/lib/setup/remoteRender.js.map +1 -0
- package/dist/lib/setup/routingRender.d.ts +48 -0
- package/dist/lib/setup/routingRender.d.ts.map +1 -0
- package/dist/lib/setup/routingRender.js +114 -0
- package/dist/lib/setup/routingRender.js.map +1 -0
- package/dist/lib/setup/sections/ides.d.ts +8 -0
- package/dist/lib/setup/sections/ides.d.ts.map +1 -1
- package/dist/lib/setup/sections/ides.js +88 -33
- package/dist/lib/setup/sections/ides.js.map +1 -1
- package/dist/lib/setup/sections/preferences.d.ts +8 -0
- package/dist/lib/setup/sections/preferences.d.ts.map +1 -1
- package/dist/lib/setup/sections/preferences.js +54 -20
- package/dist/lib/setup/sections/preferences.js.map +1 -1
- package/dist/lib/setup/sections/routing.d.ts +0 -1
- package/dist/lib/setup/sections/routing.d.ts.map +1 -1
- package/dist/lib/setup/sections/routing.js +80 -38
- package/dist/lib/setup/sections/routing.js.map +1 -1
- package/dist/lib/setup/storePath.d.ts +30 -0
- package/dist/lib/setup/storePath.d.ts.map +1 -0
- package/dist/lib/setup/storePath.js +47 -0
- package/dist/lib/setup/storePath.js.map +1 -0
- package/dist/lib/setup/summary.d.ts +33 -19
- package/dist/lib/setup/summary.d.ts.map +1 -1
- package/dist/lib/setup/summary.js +148 -113
- package/dist/lib/setup/summary.js.map +1 -1
- package/dist/lib/setup/syncProjectsRender.d.ts +57 -0
- package/dist/lib/setup/syncProjectsRender.d.ts.map +1 -0
- package/dist/lib/setup/syncProjectsRender.js +184 -0
- package/dist/lib/setup/syncProjectsRender.js.map +1 -0
- package/dist/lib/setup/ui/diff.d.ts +19 -0
- package/dist/lib/setup/ui/diff.d.ts.map +1 -0
- package/dist/lib/setup/ui/diff.js +34 -0
- package/dist/lib/setup/ui/diff.js.map +1 -0
- package/dist/lib/setup/ui/footer.d.ts +11 -0
- package/dist/lib/setup/ui/footer.d.ts.map +1 -0
- package/dist/lib/setup/ui/footer.js +21 -0
- package/dist/lib/setup/ui/footer.js.map +1 -0
- package/dist/lib/setup/ui/header.d.ts +24 -0
- package/dist/lib/setup/ui/header.d.ts.map +1 -0
- package/dist/lib/setup/ui/header.js +49 -0
- package/dist/lib/setup/ui/header.js.map +1 -0
- package/dist/lib/setup/ui/index.d.ts +28 -0
- package/dist/lib/setup/ui/index.d.ts.map +1 -0
- package/dist/lib/setup/ui/index.js +19 -0
- package/dist/lib/setup/ui/index.js.map +1 -0
- package/dist/lib/setup/ui/menu.d.ts +27 -0
- package/dist/lib/setup/ui/menu.d.ts.map +1 -0
- package/dist/lib/setup/ui/menu.js +75 -0
- package/dist/lib/setup/ui/menu.js.map +1 -0
- package/dist/lib/setup/ui/panel.d.ts +23 -0
- package/dist/lib/setup/ui/panel.d.ts.map +1 -0
- package/dist/lib/setup/ui/panel.js +60 -0
- package/dist/lib/setup/ui/panel.js.map +1 -0
- package/dist/lib/setup/ui/prompt.d.ts +27 -0
- package/dist/lib/setup/ui/prompt.d.ts.map +1 -0
- package/dist/lib/setup/ui/prompt.js +38 -0
- package/dist/lib/setup/ui/prompt.js.map +1 -0
- package/dist/lib/setup/ui/safePrompt.d.ts +24 -0
- package/dist/lib/setup/ui/safePrompt.d.ts.map +1 -0
- package/dist/lib/setup/ui/safePrompt.js +71 -0
- package/dist/lib/setup/ui/safePrompt.js.map +1 -0
- package/dist/lib/setup/ui/spinner.d.ts +28 -0
- package/dist/lib/setup/ui/spinner.d.ts.map +1 -0
- package/dist/lib/setup/ui/spinner.js +87 -0
- package/dist/lib/setup/ui/spinner.js.map +1 -0
- package/dist/lib/setup/ui/status.d.ts +21 -0
- package/dist/lib/setup/ui/status.d.ts.map +1 -0
- package/dist/lib/setup/ui/status.js +49 -0
- package/dist/lib/setup/ui/status.js.map +1 -0
- package/dist/lib/setup/ui/table.d.ts +37 -0
- package/dist/lib/setup/ui/table.d.ts.map +1 -0
- package/dist/lib/setup/ui/table.js +82 -0
- package/dist/lib/setup/ui/table.js.map +1 -0
- package/dist/lib/setup/ui/title.d.ts +14 -0
- package/dist/lib/setup/ui/title.d.ts.map +1 -0
- package/dist/lib/setup/ui/title.js +24 -0
- package/dist/lib/setup/ui/title.js.map +1 -0
- package/dist/lib/setup/ui/tokens.d.ts +66 -0
- package/dist/lib/setup/ui/tokens.d.ts.map +1 -0
- package/dist/lib/setup/ui/tokens.js +87 -0
- package/dist/lib/setup/ui/tokens.js.map +1 -0
- package/dist/lib/setup.d.ts +38 -0
- package/dist/lib/setup.d.ts.map +1 -1
- package/dist/lib/setup.js +440 -308
- package/dist/lib/setup.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,23 +7,17 @@
|
|
|
7
7
|
* directly via `gnosys setup routing` or from the summary-first menu.
|
|
8
8
|
*/
|
|
9
9
|
import { loadConfig, updateConfig, resolveTaskModel, getProviderModel, } from "../../config.js";
|
|
10
|
-
|
|
10
|
+
import { safeQuestion } from "../ui/safePrompt.js";
|
|
11
|
+
import { Header } from "../ui/header.js";
|
|
12
|
+
import { Title } from "../ui/title.js";
|
|
13
|
+
import { Footer } from "../ui/footer.js";
|
|
14
|
+
import { printStatus } from "../ui/status.js";
|
|
15
|
+
import { classifyCost, renderRoutingTable, renderRoutingDiff, } from "../routingRender.js";
|
|
11
16
|
const DIM = "\x1b[2m";
|
|
12
|
-
const GREEN = "\x1b[32m";
|
|
13
17
|
const RESET = "\x1b[0m";
|
|
14
|
-
const CHECK = `${GREEN}✓${RESET}`;
|
|
15
|
-
export const TASK_DESCRIPTIONS = {
|
|
16
|
-
structuring: "adding memories, tagging",
|
|
17
|
-
synthesis: "Q&A answers, ask",
|
|
18
|
-
// v5.8.0 (#2): chat is its own task — was lumped under synthesis before.
|
|
19
|
-
chat: "interactive chat TUI",
|
|
20
|
-
vision: "images, PDFs",
|
|
21
|
-
transcription: "audio files",
|
|
22
|
-
dream: "idle consolidation",
|
|
23
|
-
};
|
|
24
18
|
const TASKS = ["structuring", "synthesis", "chat", "vision", "transcription"];
|
|
25
19
|
async function ask(rl, prompt) {
|
|
26
|
-
return (await rl
|
|
20
|
+
return (await safeQuestion(rl, prompt)).trim();
|
|
27
21
|
}
|
|
28
22
|
async function askYesNo(rl, prompt, defaultYes) {
|
|
29
23
|
const hint = defaultYes ? " [Y/n] " : " [y/N] ";
|
|
@@ -63,18 +57,22 @@ function buildEffectiveRouting(cfg) {
|
|
|
63
57
|
};
|
|
64
58
|
return out;
|
|
65
59
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Build the table-row payload from current routing data. Marks any
|
|
62
|
+
* task whose effective provider/model differs from the snapshot as
|
|
63
|
+
* `changed` so the renderer can highlight it (▶ in accent-hi).
|
|
64
|
+
*/
|
|
65
|
+
function buildTaskRows(routing, baseline, dreamEnabled) {
|
|
66
|
+
const rows = [];
|
|
71
67
|
for (const t of [...TASKS, "dream"]) {
|
|
72
68
|
const r = routing[t];
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
69
|
+
const uses = `${r.provider} / ${r.model}`;
|
|
70
|
+
const cost = t === "dream" && !dreamEnabled ? "free" : classifyCost(r.provider, r.model);
|
|
71
|
+
const base = baseline[t];
|
|
72
|
+
const changed = !base || base.provider !== r.provider || base.model !== r.model;
|
|
73
|
+
rows.push({ task: t, uses, cost, changed });
|
|
76
74
|
}
|
|
77
|
-
|
|
75
|
+
return rows;
|
|
78
76
|
}
|
|
79
77
|
/**
|
|
80
78
|
* Run the task-routing wizard. Reads current config, walks the 3-way choice
|
|
@@ -86,18 +84,24 @@ export async function runRoutingSetup(opts) {
|
|
|
86
84
|
const provider = cfg.llm.defaultProvider;
|
|
87
85
|
const model = getProviderModel(cfg, provider);
|
|
88
86
|
console.log("");
|
|
89
|
-
console.log(
|
|
87
|
+
console.log(Header(["gnosys", "setup", "routing"]));
|
|
90
88
|
console.log("");
|
|
91
|
-
console.log(
|
|
92
|
-
console.log(`(${BOLD}${provider} / ${model}${RESET}). Override per-task or keep defaults.`);
|
|
89
|
+
console.log(Title("Task routing", "each task can use a different model — overrides the default"));
|
|
93
90
|
console.log("");
|
|
94
91
|
const dreamEnabled = !!cfg.dream?.enabled;
|
|
95
|
-
const
|
|
96
|
-
|
|
92
|
+
const baseline = buildEffectiveRouting(cfg);
|
|
93
|
+
// Initial table: nothing has changed yet, so every row is `changed: false`.
|
|
94
|
+
const initialRows = buildTaskRows(baseline, baseline, dreamEnabled);
|
|
95
|
+
console.log(renderRoutingTable(initialRows));
|
|
96
|
+
console.log("");
|
|
97
|
+
// v5.9.4 Bug 5 — clearer option copy. Option 1 keeps current routing
|
|
98
|
+
// (skip, no changes). Option 2 customises individual tasks. Option 3
|
|
99
|
+
// CLEARS all task overrides so every task falls back to the default
|
|
100
|
+
// provider; we show a Diff() of what's being removed before committing.
|
|
97
101
|
const choice = await askChoice(opts.rl, "What would you like to do?", [
|
|
98
|
-
|
|
102
|
+
"Keep current routing (no changes)",
|
|
99
103
|
"Customize individual tasks",
|
|
100
|
-
"
|
|
104
|
+
"Reset all task overrides to use default",
|
|
101
105
|
], 0);
|
|
102
106
|
if (choice === 0) {
|
|
103
107
|
console.log(`${DIM}No changes.${RESET}`);
|
|
@@ -112,7 +116,7 @@ export async function runRoutingSetup(opts) {
|
|
|
112
116
|
if (choice === 1) {
|
|
113
117
|
// Customize each task
|
|
114
118
|
for (const t of TASKS) {
|
|
115
|
-
const current =
|
|
119
|
+
const current = baseline[t];
|
|
116
120
|
const keep = await askYesNo(opts.rl, `Keep ${t} → ${current.provider} / ${current.model}?`, true);
|
|
117
121
|
if (!keep) {
|
|
118
122
|
const p = await ask(opts.rl, ` Provider for ${t} (e.g. anthropic, openai, xai, ollama): `);
|
|
@@ -134,15 +138,33 @@ export async function runRoutingSetup(opts) {
|
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
else {
|
|
137
|
-
// choice === 2
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
// v5.9.4 Bug 5 — choice === 2 now means "reset all task overrides to use
|
|
142
|
+
// default". Show the user what's about to be cleared (the rows currently
|
|
143
|
+
// pinned to non-default providers) before committing.
|
|
144
|
+
const { Diff } = await import("../ui/diff.js");
|
|
145
|
+
const overridesBeingCleared = Object.entries(cfg.taskModels ?? {})
|
|
146
|
+
.filter(([, v]) => v.provider !== provider || v.model !== model)
|
|
147
|
+
.map(([task, v]) => ({
|
|
148
|
+
label: task,
|
|
149
|
+
from: `${v.provider} / ${v.model}`,
|
|
150
|
+
to: `${provider} / ${model} (default)`,
|
|
151
|
+
}));
|
|
152
|
+
if (overridesBeingCleared.length > 0) {
|
|
153
|
+
console.log("");
|
|
154
|
+
console.log(Diff(overridesBeingCleared));
|
|
155
|
+
console.log("");
|
|
140
156
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
dreamProvider = provider;
|
|
144
|
-
dreamModel = model;
|
|
157
|
+
else {
|
|
158
|
+
console.log(`${DIM}No overrides to clear — already using default everywhere.${RESET}`);
|
|
145
159
|
}
|
|
160
|
+
const confirmReset = await askYesNo(opts.rl, "Reset all task overrides?", true);
|
|
161
|
+
if (!confirmReset) {
|
|
162
|
+
console.log(`${DIM}Cancelled.${RESET}`);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
// Clear every overridden task back to default by deleting the keys.
|
|
166
|
+
for (const t of TASKS)
|
|
167
|
+
delete newTaskModels[t];
|
|
146
168
|
}
|
|
147
169
|
// Persist
|
|
148
170
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -155,8 +177,28 @@ export async function runRoutingSetup(opts) {
|
|
|
155
177
|
model: dreamModel,
|
|
156
178
|
},
|
|
157
179
|
});
|
|
180
|
+
// v5.9.3 Screen 4 — re-render the table with `▶` markers on changed rows
|
|
181
|
+
// followed by a Diff() block summarizing what shipped. Then a final
|
|
182
|
+
// status line that names the saved file.
|
|
183
|
+
const updatedCfg = await loadConfig(opts.directory);
|
|
184
|
+
const updatedRouting = buildEffectiveRouting(updatedCfg);
|
|
185
|
+
const finalRows = buildTaskRows(updatedRouting, baseline, dreamEnabledNew);
|
|
186
|
+
console.log("");
|
|
187
|
+
console.log(renderRoutingTable(finalRows));
|
|
188
|
+
console.log("");
|
|
189
|
+
const diffEntries = [];
|
|
190
|
+
for (const t of [...TASKS, "dream"]) {
|
|
191
|
+
const before = baseline[t];
|
|
192
|
+
const after = updatedRouting[t];
|
|
193
|
+
const fromStr = `${before.provider} / ${before.model}`;
|
|
194
|
+
const toStr = `${after.provider} / ${after.model}`;
|
|
195
|
+
diffEntries.push({ task: t, from: fromStr, to: toStr === fromStr ? null : toStr });
|
|
196
|
+
}
|
|
197
|
+
console.log(renderRoutingDiff(diffEntries));
|
|
158
198
|
console.log("");
|
|
159
|
-
|
|
199
|
+
printStatus("ok", "routing saved", `${opts.directory}/.gnosys/gnosys.json`);
|
|
200
|
+
// Footer hint (right-aligned) for any follow-up navigation in the menu flow.
|
|
201
|
+
console.log(Footer("press enter to return"));
|
|
160
202
|
return true;
|
|
161
203
|
}
|
|
162
204
|
//# sourceMappingURL=routing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../../src/lib/setup/sections/routing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../../src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ACpC,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,OAAgB,CAAC,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,QAAQ,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvD,MAAM,KAAK,GAAG,GAAG,KAAK,CAAC,QAAQ,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;QACnD,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,SAAS,sBAAsB,CAAC,CAAC;IAC5E,6EAA6E;IAC7E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared store-path resolution for setup wizards (v5.9.4 — Bug 10).
|
|
3
|
+
*
|
|
4
|
+
* Before v5.9.4, three call sites resolved which `gnosys.json` to read/
|
|
5
|
+
* write — `summary.ts::resolveActiveStorePath`, `setup.ts::loadExistingConfig`,
|
|
6
|
+
* and `setup.ts::pickStorePath` — each with subtly different rules. The
|
|
7
|
+
* model picker would read the global config while the summary panel was
|
|
8
|
+
* reading the project config (or vice versa), producing the v5.9.3 bug
|
|
9
|
+
* where `setup models` displayed `current: grok-4.20` while gnosys.json
|
|
10
|
+
* actually held `grok-4.3`.
|
|
11
|
+
*
|
|
12
|
+
* From v5.9.4 onward, any code that reads config + selects a store goes
|
|
13
|
+
* through `resolveActiveStorePath()` (read-only resolution) or
|
|
14
|
+
* `ensureActiveStorePath()` (write resolution — creates global home if
|
|
15
|
+
* neither store exists yet). Grep the codebase for `loadConfig(` and
|
|
16
|
+
* `updateConfig(` to confirm every caller routes through here.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Return the store path to READ from. Project-level `.gnosys/` is preferred
|
|
20
|
+
* when its `gnosys.json` exists; otherwise the global `~/.gnosys/` home.
|
|
21
|
+
* Does NOT create directories — safe to call when no config exists yet.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveActiveStorePath(projectDir: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Return the store path to WRITE to. Project-level if its `gnosys.json`
|
|
26
|
+
* exists, else the global home (created if missing). Distinct from
|
|
27
|
+
* `resolveActiveStorePath` only by the `mkdir` side-effect.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ensureActiveStorePath(projectDir: string): string;
|
|
30
|
+
//# sourceMappingURL=storePath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storePath.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/storePath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIjE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAQhE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared store-path resolution for setup wizards (v5.9.4 — Bug 10).
|
|
3
|
+
*
|
|
4
|
+
* Before v5.9.4, three call sites resolved which `gnosys.json` to read/
|
|
5
|
+
* write — `summary.ts::resolveActiveStorePath`, `setup.ts::loadExistingConfig`,
|
|
6
|
+
* and `setup.ts::pickStorePath` — each with subtly different rules. The
|
|
7
|
+
* model picker would read the global config while the summary panel was
|
|
8
|
+
* reading the project config (or vice versa), producing the v5.9.3 bug
|
|
9
|
+
* where `setup models` displayed `current: grok-4.20` while gnosys.json
|
|
10
|
+
* actually held `grok-4.3`.
|
|
11
|
+
*
|
|
12
|
+
* From v5.9.4 onward, any code that reads config + selects a store goes
|
|
13
|
+
* through `resolveActiveStorePath()` (read-only resolution) or
|
|
14
|
+
* `ensureActiveStorePath()` (write resolution — creates global home if
|
|
15
|
+
* neither store exists yet). Grep the codebase for `loadConfig(` and
|
|
16
|
+
* `updateConfig(` to confirm every caller routes through here.
|
|
17
|
+
*/
|
|
18
|
+
import fsSync from "fs";
|
|
19
|
+
import path from "path";
|
|
20
|
+
import { getGnosysHome } from "../paths.js";
|
|
21
|
+
/**
|
|
22
|
+
* Return the store path to READ from. Project-level `.gnosys/` is preferred
|
|
23
|
+
* when its `gnosys.json` exists; otherwise the global `~/.gnosys/` home.
|
|
24
|
+
* Does NOT create directories — safe to call when no config exists yet.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveActiveStorePath(projectDir) {
|
|
27
|
+
const projectStore = path.join(projectDir, ".gnosys");
|
|
28
|
+
if (fsSync.existsSync(path.join(projectStore, "gnosys.json")))
|
|
29
|
+
return projectStore;
|
|
30
|
+
return getGnosysHome();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Return the store path to WRITE to. Project-level if its `gnosys.json`
|
|
34
|
+
* exists, else the global home (created if missing). Distinct from
|
|
35
|
+
* `resolveActiveStorePath` only by the `mkdir` side-effect.
|
|
36
|
+
*/
|
|
37
|
+
export function ensureActiveStorePath(projectDir) {
|
|
38
|
+
const projectStore = path.join(projectDir, ".gnosys");
|
|
39
|
+
if (fsSync.existsSync(path.join(projectStore, "gnosys.json")))
|
|
40
|
+
return projectStore;
|
|
41
|
+
const globalStore = getGnosysHome();
|
|
42
|
+
if (!fsSync.existsSync(globalStore)) {
|
|
43
|
+
fsSync.mkdirSync(globalStore, { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
return globalStore;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=storePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storePath.js","sourceRoot":"","sources":["../../../src/lib/setup/storePath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,MAAM,MAAM,IAAI,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACtD,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAAE,OAAO,YAAY,CAAC;IACnF,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACtD,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAAE,OAAO,YAAY,CAAC;IACnF,MAAM,WAAW,GAAG,aAAa,EAAE,CAAC;IACpC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1,42 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Setup summary-first wizard (v5.
|
|
2
|
+
* Setup summary-first wizard (v5.9.3 redesign).
|
|
3
3
|
*
|
|
4
|
-
* When the user runs `gnosys setup` and a config already exists, the
|
|
5
|
-
* screen is the current settings summary. The user picks a
|
|
6
|
-
* to edit just that piece, returns to the
|
|
7
|
-
* the changed line
|
|
4
|
+
* When the user runs `gnosys setup` and a config already exists, the
|
|
5
|
+
* first screen is the current settings summary. The user picks a
|
|
6
|
+
* numbered option to edit just that piece, returns to the panel with
|
|
7
|
+
* `✓` next to the changed line for the rest of this sitting, and exits
|
|
8
|
+
* with `done` (Enter or `done`).
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* v5.9.3 changes:
|
|
11
|
+
* - Uses Phase A atoms: Header, Panel, Status, Footer, Prompt
|
|
12
|
+
* - Re-reads config from the ACTIVE store path (.gnosys/ if project
|
|
13
|
+
* scope, else ~/.gnosys/) before re-render — fixes the stale-display
|
|
14
|
+
* bug where switching provider via section 3 left the panel showing
|
|
15
|
+
* the old value because loadConfig was reading from project root
|
|
16
|
+
* rather than .gnosys/.
|
|
17
|
+
* - `[D]one` / `[E]xit` collapsed to single "done" action.
|
|
18
|
+
* - `maybeOfferProviderRepair` reworked to column-aligned detection
|
|
19
|
+
* block with no "pre-v5.8.4" history leak.
|
|
12
20
|
*/
|
|
13
21
|
import { Interface as ReadlineInterface } from "readline/promises";
|
|
14
22
|
import { type GnosysConfig } from "../config.js";
|
|
23
|
+
import { resolveActiveStorePath } from "./storePath.js";
|
|
15
24
|
/** Each summary line is a section the user can navigate into. */
|
|
16
25
|
export interface SummarySection {
|
|
17
|
-
/** Number key shown in the menu. */
|
|
18
26
|
key: string;
|
|
19
|
-
/** Label shown on the summary line (left side). */
|
|
20
27
|
label: string;
|
|
21
|
-
/** Current value — printed on the right side, dim. */
|
|
22
28
|
describe: (cfg: GnosysConfig) => string | Promise<string>;
|
|
23
|
-
/** Run when user picks this line. Returns true if a change was committed. */
|
|
24
29
|
edit: (rl: ReadlineInterface, cfg: GnosysConfig, projectDir: string) => Promise<boolean>;
|
|
25
30
|
}
|
|
31
|
+
export declare function buildSections(): SummarySection[];
|
|
26
32
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
33
|
+
* Render the panel body — one menu-shaped row per section. Returns the
|
|
34
|
+
* row strings (already colored) ready to hand to Panel().
|
|
29
35
|
*/
|
|
30
|
-
|
|
36
|
+
declare function renderPanelRows(cfg: GnosysConfig, sections: SummarySection[]): Promise<string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Build the `trailing` map of `✓` marks for sections edited this sitting.
|
|
39
|
+
*/
|
|
40
|
+
declare function buildTrailingMap(updated: Set<string>, sections: SummarySection[]): Record<number, string>;
|
|
31
41
|
export interface SummaryOptions {
|
|
32
|
-
/** Project directory the wizard operates on (default: cwd). */
|
|
33
42
|
directory?: string;
|
|
34
|
-
/** Optional pre-existing readline; useful when caller is already prompting. */
|
|
35
43
|
rl?: ReadlineInterface;
|
|
36
44
|
}
|
|
37
45
|
/**
|
|
38
|
-
* Run the summary-first wizard. Loops until the user picks
|
|
39
|
-
*
|
|
46
|
+
* Run the summary-first wizard. Loops until the user picks "done"
|
|
47
|
+
* (Enter or `done`). Returns true if any section was edited.
|
|
40
48
|
*/
|
|
41
49
|
export declare function runSummaryWizard(opts?: SummaryOptions): Promise<boolean>;
|
|
50
|
+
export declare const __test: {
|
|
51
|
+
resolveActiveStorePath: typeof resolveActiveStorePath;
|
|
52
|
+
renderPanelRows: typeof renderPanelRows;
|
|
53
|
+
buildTrailingMap: typeof buildTrailingMap;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
42
56
|
//# sourceMappingURL=summary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/summary.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"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