gnosys 5.9.2 → 5.9.3
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 +7 -1
- package/dist/lib/config.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/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/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 +44 -0
- package/dist/lib/setup/routingRender.d.ts.map +1 -0
- package/dist/lib/setup/routingRender.js +97 -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 +49 -27
- 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 +40 -19
- 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 +49 -29
- package/dist/lib/setup/sections/routing.js.map +1 -1
- 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 +135 -105
- package/dist/lib/setup/summary.js.map +1 -1
- package/dist/lib/setup/syncProjectsRender.d.ts +56 -0
- package/dist/lib/setup/syncProjectsRender.d.ts.map +1 -0
- package/dist/lib/setup/syncProjectsRender.js +168 -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 +26 -0
- package/dist/lib/setup/ui/index.d.ts.map +1 -0
- package/dist/lib/setup/ui/index.js +18 -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 +53 -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/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 +7 -0
- package/dist/lib/setup.d.ts.map +1 -1
- package/dist/lib/setup.js +204 -230
- package/dist/lib/setup.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys config set` (Screen 13).
|
|
3
|
+
*
|
|
4
|
+
* Provides:
|
|
5
|
+
* - Schema/key validation against a known set of config keys
|
|
6
|
+
* - Levenshtein-based "did you mean?" suggestion on typo
|
|
7
|
+
* - Helpers to label the active store as `(project)` or `(global)`
|
|
8
|
+
*
|
|
9
|
+
* Output rendering is deferred to the cli.ts action so we don't drag the
|
|
10
|
+
* full config schema into this module — but the validator and the
|
|
11
|
+
* suggestion logic are pure and snapshot-testable.
|
|
12
|
+
*/
|
|
13
|
+
import path from "path";
|
|
14
|
+
/**
|
|
15
|
+
* Known top-level keys accepted by `gnosys config set`. Mirrors the switch
|
|
16
|
+
* cases in cli.ts; keep these in sync when a new branch is added.
|
|
17
|
+
*/
|
|
18
|
+
export const KNOWN_CONFIG_KEYS = [
|
|
19
|
+
"provider",
|
|
20
|
+
"model",
|
|
21
|
+
"task",
|
|
22
|
+
"ollama-url",
|
|
23
|
+
"ollama-model",
|
|
24
|
+
"anthropic-model",
|
|
25
|
+
"groq-model",
|
|
26
|
+
"openai-model",
|
|
27
|
+
"openai-url",
|
|
28
|
+
"lmstudio-url",
|
|
29
|
+
"lmstudio-model",
|
|
30
|
+
"xai-model",
|
|
31
|
+
"mistral-model",
|
|
32
|
+
"custom-url",
|
|
33
|
+
"custom-model",
|
|
34
|
+
"custom-key",
|
|
35
|
+
"recall",
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Validate a user-supplied config key. Returns the closest known key
|
|
39
|
+
* (by edit distance) when the input doesn't match exactly. The caller
|
|
40
|
+
* uses the suggestion to render a `did you mean X?` hint.
|
|
41
|
+
*/
|
|
42
|
+
export function suggestConfigKey(input) {
|
|
43
|
+
if (KNOWN_CONFIG_KEYS.includes(input))
|
|
44
|
+
return null;
|
|
45
|
+
let best = null;
|
|
46
|
+
let bestDist = Infinity;
|
|
47
|
+
for (const candidate of KNOWN_CONFIG_KEYS) {
|
|
48
|
+
const d = levenshtein(input, candidate);
|
|
49
|
+
if (d < bestDist) {
|
|
50
|
+
bestDist = d;
|
|
51
|
+
best = candidate;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Only suggest when the edit distance is small enough to be plausibly
|
|
55
|
+
// a typo. Anything > 3 is a wild miss — don't suggest.
|
|
56
|
+
return bestDist <= 3 ? best : null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Classify a store path as `project` or `global`. Used to label both the
|
|
60
|
+
* Diff row and the "saved" status line so the user always knows which
|
|
61
|
+
* store was touched.
|
|
62
|
+
*
|
|
63
|
+
* The convention: store paths under `~/.gnosys` (the central user store)
|
|
64
|
+
* count as global; everything else is project-scoped.
|
|
65
|
+
*/
|
|
66
|
+
export function classifyStore(storePath, homeDir) {
|
|
67
|
+
const globalPath = path.join(homeDir, ".gnosys");
|
|
68
|
+
// Normalize both sides for the comparison so symlinks / trailing slashes
|
|
69
|
+
// don't trip a false negative.
|
|
70
|
+
const norm = path.resolve(storePath);
|
|
71
|
+
return norm === path.resolve(globalPath) ? "global" : "project";
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Compute the Levenshtein edit distance between two strings. Small inputs
|
|
75
|
+
* only — config keys are at most ~20 chars.
|
|
76
|
+
*/
|
|
77
|
+
export function levenshtein(a, b) {
|
|
78
|
+
if (a === b)
|
|
79
|
+
return 0;
|
|
80
|
+
if (a.length === 0)
|
|
81
|
+
return b.length;
|
|
82
|
+
if (b.length === 0)
|
|
83
|
+
return a.length;
|
|
84
|
+
const m = a.length;
|
|
85
|
+
const n = b.length;
|
|
86
|
+
const prev = new Array(n + 1);
|
|
87
|
+
const curr = new Array(n + 1);
|
|
88
|
+
for (let j = 0; j <= n; j++)
|
|
89
|
+
prev[j] = j;
|
|
90
|
+
for (let i = 1; i <= m; i++) {
|
|
91
|
+
curr[0] = i;
|
|
92
|
+
for (let j = 1; j <= n; j++) {
|
|
93
|
+
const cost = a.charCodeAt(i - 1) === b.charCodeAt(j - 1) ? 0 : 1;
|
|
94
|
+
curr[j] = Math.min(curr[j - 1] + 1, // insertion
|
|
95
|
+
prev[j] + 1, // deletion
|
|
96
|
+
prev[j - 1] + cost);
|
|
97
|
+
}
|
|
98
|
+
for (let j = 0; j <= n; j++)
|
|
99
|
+
prev[j] = curr[j];
|
|
100
|
+
}
|
|
101
|
+
return prev[n];
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=configSetRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configSetRender.js","sourceRoot":"","sources":["../../../src/lib/setup/configSetRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,UAAU;IACV,OAAO;IACP,MAAM;IACN,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,QAAQ;CACT,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,IAAI,GAAkB,IAAI,CAAC;IAC/B,IAAI,QAAQ,GAAG,QAAQ,CAAC;IACxB,KAAK,MAAM,SAAS,IAAI,iBAAiB,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,GAAG,QAAQ,EAAE,CAAC;YACjB,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C,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAChB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAY,YAAY;YACvC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAgB,WAAW;YACtC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CACnB,CAAC;QACJ,CAAC;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup dream` (Screen 7).
|
|
3
|
+
*
|
|
4
|
+
* The wizard runs inside `runDreamSetup` (in `setup.ts`); this module
|
|
5
|
+
* owns only the pure helpers that are easy to snapshot-test:
|
|
6
|
+
*
|
|
7
|
+
* - buildDreamDiffRows: the 4-row before/after summary printed at the
|
|
8
|
+
* end of the three-step flow
|
|
9
|
+
* - renderThresholdsBlock: the static "thresholds + sub-tasks" panel
|
|
10
|
+
* rendered on screen 7.2 with default values inside fake `[N ]`
|
|
11
|
+
* fields
|
|
12
|
+
*/
|
|
13
|
+
export interface DreamDiffRow {
|
|
14
|
+
label: string;
|
|
15
|
+
from: string;
|
|
16
|
+
to: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DreamSettings {
|
|
19
|
+
provider: string;
|
|
20
|
+
model?: string;
|
|
21
|
+
machine: string;
|
|
22
|
+
idleMinutes: number;
|
|
23
|
+
maxRuntimeMinutes: number;
|
|
24
|
+
selfCritique: boolean;
|
|
25
|
+
generateSummaries: boolean;
|
|
26
|
+
discoverRelationships: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the four canonical rows for the post-save Diff block. Always
|
|
30
|
+
* emits the same four labels so users have a consistent footprint
|
|
31
|
+
* across machines.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildDreamDiffRows(prev: Partial<DreamSettings> | null, next: DreamSettings): DreamDiffRow[];
|
|
34
|
+
/**
|
|
35
|
+
* Render the static thresholds/sub-tasks block from screen 7.2. Returns
|
|
36
|
+
* an array of lines (no trailing newline). The wizard prints these
|
|
37
|
+
* before asking for `enter | e`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderThresholdsBlock(idleMinutes: number, maxRuntimeMinutes: number, minMemories: number, subs: {
|
|
40
|
+
selfCritique: boolean;
|
|
41
|
+
generateSummaries: boolean;
|
|
42
|
+
discoverRelationships: boolean;
|
|
43
|
+
}): string[];
|
|
44
|
+
//# sourceMappingURL=dreamRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dreamRender.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/dreamRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,aAAa,GAAG,YAAY,EAAE,CAiB3G;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,GAC1F,MAAM,EAAE,CAaV"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup dream` (Screen 7).
|
|
3
|
+
*
|
|
4
|
+
* The wizard runs inside `runDreamSetup` (in `setup.ts`); this module
|
|
5
|
+
* owns only the pure helpers that are easy to snapshot-test:
|
|
6
|
+
*
|
|
7
|
+
* - buildDreamDiffRows: the 4-row before/after summary printed at the
|
|
8
|
+
* end of the three-step flow
|
|
9
|
+
* - renderThresholdsBlock: the static "thresholds + sub-tasks" panel
|
|
10
|
+
* rendered on screen 7.2 with default values inside fake `[N ]`
|
|
11
|
+
* fields
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Build the four canonical rows for the post-save Diff block. Always
|
|
15
|
+
* emits the same four labels so users have a consistent footprint
|
|
16
|
+
* across machines.
|
|
17
|
+
*/
|
|
18
|
+
export function buildDreamDiffRows(prev, next) {
|
|
19
|
+
const prevProvider = prev?.provider ? `${prev.provider}${prev.model ? " / " + prev.model : ""}` : "—";
|
|
20
|
+
const nextProvider = `${next.provider}${next.model ? " / " + next.model : ""}`;
|
|
21
|
+
return [
|
|
22
|
+
{ label: "provider", from: prevProvider, to: nextProvider },
|
|
23
|
+
{ label: "machine", from: prev?.machine ?? "—", to: next.machine },
|
|
24
|
+
{
|
|
25
|
+
label: "idle threshold",
|
|
26
|
+
from: prev?.idleMinutes !== undefined ? `${prev.idleMinutes} min` : "—",
|
|
27
|
+
to: `${next.idleMinutes} min`,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "max runtime",
|
|
31
|
+
from: prev?.maxRuntimeMinutes !== undefined ? `${prev.maxRuntimeMinutes} min` : "—",
|
|
32
|
+
to: `${next.maxRuntimeMinutes} min`,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Render the static thresholds/sub-tasks block from screen 7.2. Returns
|
|
38
|
+
* an array of lines (no trailing newline). The wizard prints these
|
|
39
|
+
* before asking for `enter | e`.
|
|
40
|
+
*/
|
|
41
|
+
export function renderThresholdsBlock(idleMinutes, maxRuntimeMinutes, minMemories, subs) {
|
|
42
|
+
const fmt = (n) => String(n).padEnd(3);
|
|
43
|
+
return [
|
|
44
|
+
` when to run`,
|
|
45
|
+
` idle threshold [${fmt(idleMinutes)}] minutes wait this long before starting`,
|
|
46
|
+
` max runtime [${fmt(maxRuntimeMinutes)}] minutes cap each cycle to avoid runaway`,
|
|
47
|
+
` min memories [${fmt(minMemories)}] only run if there's enough new material`,
|
|
48
|
+
"",
|
|
49
|
+
` what to do`,
|
|
50
|
+
` ${subs.selfCritique ? "✓" : "○"} self-critique review and re-rank existing memories`,
|
|
51
|
+
` ${subs.generateSummaries ? "✓" : "○"} generate summaries produce a "what changed today" digest`,
|
|
52
|
+
` ${subs.discoverRelationships ? "✓" : "○"} discover relationships link related memories explicitly`,
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=dreamRender.js.map
|
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AC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAmB,EACnB,iBAAyB,EACzB,WAAmB,EACnB,IAA2F;IAE3F,MAAM,GAAG,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvD,OAAO;QACL,gBAAgB;QAChB,2BAA2B,GAAG,CAAC,WAAW,CAAC,+CAA+C;QAC1F,2BAA2B,GAAG,CAAC,iBAAiB,CAAC,gDAAgD;QACjG,2BAA2B,GAAG,CAAC,WAAW,CAAC,wDAAwD;QACnG,EAAE;QACF,eAAe;QACf,QAAQ,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,8DAA8D;QACnG,QAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,+DAA+D;QACzG,QAAQ,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,4DAA4D;KAC3G,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup models` (Screen 3).
|
|
3
|
+
*
|
|
4
|
+
* Currently only owns the small pre-save diff-row builder. The rest of
|
|
5
|
+
* the screen's chrome (Header, Title, Spinner, Diff, Status) lives in
|
|
6
|
+
* `runModelsSetup` and is composed inline so we don't drag the entire
|
|
7
|
+
* provider/model picker through a render layer it doesn't need.
|
|
8
|
+
*/
|
|
9
|
+
export interface ModelDiffRow {
|
|
10
|
+
label: string;
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the Diff rows for the pre-save block. Always returns at least
|
|
16
|
+
* two rows (`provider` + `model`) so the user can see what landed in
|
|
17
|
+
* gnosys.json, even when nothing actually changed.
|
|
18
|
+
*
|
|
19
|
+
* - If the new provider differs from the current one, emit the row.
|
|
20
|
+
* - If the new model differs from the current one, emit the row.
|
|
21
|
+
* - When neither changed, emit two rows showing the (unchanged) values
|
|
22
|
+
* so the diff block isn't empty.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildModelsDiffRows(currentProvider: string | undefined, currentModel: string | undefined, newProvider: string, newModel: string): ModelDiffRow[];
|
|
25
|
+
//# sourceMappingURL=modelsRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelsRender.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/modelsRender.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,YAAY,EAAE,CAahB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup models` (Screen 3).
|
|
3
|
+
*
|
|
4
|
+
* Currently only owns the small pre-save diff-row builder. The rest of
|
|
5
|
+
* the screen's chrome (Header, Title, Spinner, Diff, Status) lives in
|
|
6
|
+
* `runModelsSetup` and is composed inline so we don't drag the entire
|
|
7
|
+
* provider/model picker through a render layer it doesn't need.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Build the Diff rows for the pre-save block. Always returns at least
|
|
11
|
+
* two rows (`provider` + `model`) so the user can see what landed in
|
|
12
|
+
* gnosys.json, even when nothing actually changed.
|
|
13
|
+
*
|
|
14
|
+
* - If the new provider differs from the current one, emit the row.
|
|
15
|
+
* - If the new model differs from the current one, emit the row.
|
|
16
|
+
* - When neither changed, emit two rows showing the (unchanged) values
|
|
17
|
+
* so the diff block isn't empty.
|
|
18
|
+
*/
|
|
19
|
+
export function buildModelsDiffRows(currentProvider, currentModel, newProvider, newModel) {
|
|
20
|
+
const rows = [];
|
|
21
|
+
if (currentProvider && currentProvider !== newProvider) {
|
|
22
|
+
rows.push({ label: "provider", from: currentProvider, to: newProvider });
|
|
23
|
+
}
|
|
24
|
+
if (currentModel && currentModel !== newModel) {
|
|
25
|
+
rows.push({ label: "model", from: currentModel, to: newModel });
|
|
26
|
+
}
|
|
27
|
+
if (rows.length === 0) {
|
|
28
|
+
rows.push({ label: "provider", from: currentProvider ?? "(unset)", to: newProvider });
|
|
29
|
+
rows.push({ label: "model", from: currentModel ?? "(unset)", to: newModel });
|
|
30
|
+
}
|
|
31
|
+
return rows;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=modelsRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelsRender.js","sourceRoot":"","sources":["../../../src/lib/setup/modelsRender.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,eAAmC,EACnC,YAAgC,EAChC,WAAmB,EACnB,QAAgB;IAEhB,MAAM,IAAI,GAAmB,EAAE,CAAC;IAChC,IAAI,eAAe,IAAI,eAAe,KAAK,WAAW,EAAE,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,YAAY,IAAI,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,IAAI,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QACtF,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,IAAI,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync mode picked in the hierarchical mode menu. Persisted to the
|
|
3
|
+
* `remote_mode` meta key so other tooling can read it back.
|
|
4
|
+
*/
|
|
5
|
+
export type SyncMode = "read-write" | "pull-only" | "push-only";
|
|
6
|
+
/** Description for each mode — shown as the meta column in the picker. */
|
|
7
|
+
export declare const SYNC_MODE_LABELS: Record<SyncMode, string>;
|
|
8
|
+
/**
|
|
9
|
+
* Render the validation summary as a bullet list of `✓`/`✗` rows.
|
|
10
|
+
*
|
|
11
|
+
* Replaces `showValidationSummary` in the wizard. Each check is one
|
|
12
|
+
* Status() line — easier to scan than the old col-aligned text dump.
|
|
13
|
+
*/
|
|
14
|
+
export interface ValidationSummaryInput {
|
|
15
|
+
pathExists: boolean;
|
|
16
|
+
writable: boolean;
|
|
17
|
+
sqliteCompatible: boolean;
|
|
18
|
+
latencyMs: number | null;
|
|
19
|
+
existing?: {
|
|
20
|
+
found: boolean;
|
|
21
|
+
memoryCount: number | null;
|
|
22
|
+
lastModified: string | null;
|
|
23
|
+
};
|
|
24
|
+
warnings: string[];
|
|
25
|
+
errors: string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function renderValidationSummary(v: ValidationSummaryInput): string;
|
|
28
|
+
/**
|
|
29
|
+
* Render the leading Header + current-status line for the remote wizard.
|
|
30
|
+
* Returns a multi-line string the wizard can print as-is.
|
|
31
|
+
*/
|
|
32
|
+
export declare function renderRemoteIntro(localActive: number, localArchived: number, currentRemote: string | null): string;
|
|
33
|
+
/**
|
|
34
|
+
* Render the final Diff block summarizing what changed at the end of
|
|
35
|
+
* the wizard run.
|
|
36
|
+
*/
|
|
37
|
+
export interface RemoteDiffInput {
|
|
38
|
+
previousRemote: string | null;
|
|
39
|
+
newRemote: string;
|
|
40
|
+
mode: SyncMode;
|
|
41
|
+
}
|
|
42
|
+
export declare function renderRemoteDiff(d: RemoteDiffInput): string;
|
|
43
|
+
//# sourceMappingURL=remoteRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteRender.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/remoteRender.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhE,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAIrD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACvF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAgBzE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,MAAM,CAWR;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAW3D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup remote` (Screen 6).
|
|
3
|
+
*
|
|
4
|
+
* The wizard's flow is in `lib/remoteWizard.ts`; this module owns only
|
|
5
|
+
* the pure render functions and the sync-mode picker payload so the
|
|
6
|
+
* layout can be snapshot-tested without spinning up an interactive
|
|
7
|
+
* readline.
|
|
8
|
+
*/
|
|
9
|
+
import { c, color, glyph } from "./ui/tokens.js";
|
|
10
|
+
import { Header } from "./ui/header.js";
|
|
11
|
+
import { Status } from "./ui/status.js";
|
|
12
|
+
/** Description for each mode — shown as the meta column in the picker. */
|
|
13
|
+
export const SYNC_MODE_LABELS = {
|
|
14
|
+
"read-write": "this machine reads and writes",
|
|
15
|
+
"pull-only": "read remote, never write",
|
|
16
|
+
"push-only": "write to remote, never read locally",
|
|
17
|
+
};
|
|
18
|
+
export function renderValidationSummary(v) {
|
|
19
|
+
const lines = [];
|
|
20
|
+
lines.push(Status(v.pathExists ? "ok" : "fail", "path exists"));
|
|
21
|
+
lines.push(Status(v.writable ? "ok" : "fail", "writable"));
|
|
22
|
+
lines.push(Status(v.sqliteCompatible ? "ok" : "fail", "sqlite compatible"));
|
|
23
|
+
if (v.latencyMs !== null) {
|
|
24
|
+
lines.push(Status("ok", "latency", `${v.latencyMs} ms`));
|
|
25
|
+
}
|
|
26
|
+
if (v.existing?.found) {
|
|
27
|
+
const date = v.existing.lastModified ? v.existing.lastModified.split("T")[0] : "unknown";
|
|
28
|
+
const count = v.existing.memoryCount ?? "?";
|
|
29
|
+
lines.push(Status("ok", "found existing remote", `${count} memories · last write ${date}`));
|
|
30
|
+
}
|
|
31
|
+
for (const w of v.warnings)
|
|
32
|
+
lines.push(Status("warn", w));
|
|
33
|
+
for (const e of v.errors)
|
|
34
|
+
lines.push(Status("fail", e));
|
|
35
|
+
return lines.join("\n");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Render the leading Header + current-status line for the remote wizard.
|
|
39
|
+
* Returns a multi-line string the wizard can print as-is.
|
|
40
|
+
*/
|
|
41
|
+
export function renderRemoteIntro(localActive, localArchived, currentRemote) {
|
|
42
|
+
const lines = [];
|
|
43
|
+
lines.push(Header(["gnosys", "setup", "remote"]));
|
|
44
|
+
lines.push("");
|
|
45
|
+
lines.push(` ${color(c.text, "Multi-machine sync")}`);
|
|
46
|
+
lines.push(` ${color(c.textDim, "share your memory store across machines via a path on a NAS, iCloud, Dropbox, etc.")}`);
|
|
47
|
+
lines.push("");
|
|
48
|
+
const remoteTxt = currentRemote ?? "not configured";
|
|
49
|
+
lines.push(` ${color(c.textDim, "local DB")} ${color(c.text, `~/.gnosys/gnosys.db (${localActive} active, ${localArchived} archived)`)}`);
|
|
50
|
+
lines.push(` ${color(c.textDim, "current")} ${color(c.text, remoteTxt)}`);
|
|
51
|
+
return lines.join("\n");
|
|
52
|
+
}
|
|
53
|
+
export function renderRemoteDiff(d) {
|
|
54
|
+
const lines = [];
|
|
55
|
+
const indent = " ";
|
|
56
|
+
const arrow = color(c.textGhost, glyph.arrow);
|
|
57
|
+
const fromR = color(c.textMid, (d.previousRemote ?? "not configured").padEnd(20));
|
|
58
|
+
const labelR = color(c.textDim, "remote".padEnd(8));
|
|
59
|
+
lines.push(`${indent}${labelR} ${fromR} ${arrow} ${color(c.accentHi, d.newRemote)}`);
|
|
60
|
+
const labelM = color(c.textDim, "mode".padEnd(8));
|
|
61
|
+
const fromM = color(c.textMid, "—".padEnd(20));
|
|
62
|
+
lines.push(`${indent}${labelM} ${fromM} ${arrow} ${color(c.accentHi, d.mode)}`);
|
|
63
|
+
return lines.join("\n");
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=remoteRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteRender.js","sourceRoot":"","sources":["../../../src/lib/setup/remoteRender.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQxC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,YAAY,EAAE,+BAA+B;IAC7C,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,qCAAqC;CACnD,CAAC;AAkBF,MAAM,UAAU,uBAAuB,CAAC,CAAyB;IAC/D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IAChE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC3D,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,CAAC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AAC;IAClD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Cost-tier bucket. `free` = ollama / lmstudio (always $0). */
|
|
2
|
+
export type CostTier = "free" | "$" | "$$" | "$$$";
|
|
3
|
+
/**
|
|
4
|
+
* Classify a provider/model pair into a `$ / $$ / $$$ / free` bucket. The
|
|
5
|
+
* heuristic is the average of input + output pricing from PROVIDER_TIERS:
|
|
6
|
+
*
|
|
7
|
+
* free local providers (ollama, lmstudio) and any model
|
|
8
|
+
* whose registered cost is 0/0
|
|
9
|
+
* $ avg < 1.0 (cheap cloud — groq, gpt-mini, xai-mini)
|
|
10
|
+
* $$ avg < 5.0 (mid — sonnet, gpt-5, grok-flagship)
|
|
11
|
+
* $$$ otherwise (premium — opus, mistral-large)
|
|
12
|
+
*
|
|
13
|
+
* Falls back to `$$` when the model isn't registered (unknown — conservative
|
|
14
|
+
* mid-tier so the user notices unknown spend).
|
|
15
|
+
*/
|
|
16
|
+
export declare function classifyCost(provider: string, model: string): CostTier;
|
|
17
|
+
/** One row in the task-routing table. */
|
|
18
|
+
export interface TaskRow {
|
|
19
|
+
task: string;
|
|
20
|
+
/** "provider / model" — pre-formatted. */
|
|
21
|
+
uses: string;
|
|
22
|
+
cost: CostTier;
|
|
23
|
+
/** When true, the row gets a `▶` marker in accent-hi (changed). */
|
|
24
|
+
changed?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Render the task-routing table block (title + columnar table). Returns
|
|
28
|
+
* the full multi-line string with no trailing newline.
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderRoutingTable(rows: TaskRow[]): string;
|
|
31
|
+
/**
|
|
32
|
+
* Render the final diff block — one row per task, showing either
|
|
33
|
+
* `from → to` (changed) or `(unchanged)`. Always emits a row per task
|
|
34
|
+
* so the user has a full picture.
|
|
35
|
+
*/
|
|
36
|
+
export interface DiffEntry {
|
|
37
|
+
task: string;
|
|
38
|
+
/** "provider / model" before the edit. */
|
|
39
|
+
from: string;
|
|
40
|
+
/** "provider / model" after the edit, or null when unchanged. */
|
|
41
|
+
to: string | null;
|
|
42
|
+
}
|
|
43
|
+
export declare function renderRoutingDiff(entries: DiffEntry[]): string;
|
|
44
|
+
//# sourceMappingURL=routingRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routingRender.d.ts","sourceRoot":"","sources":["../../../src/lib/setup/routingRender.ts"],"names":[],"mappings":"AASA,gEAAgE;AAChE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAUtE;AAED,yCAAyC;AACzC,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAuB1D;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAgB9D"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers for `gnosys setup routing` (Screen 4).
|
|
3
|
+
*
|
|
4
|
+
* Provides the cost-tier table + diff renderers used by the wizard. Pure
|
|
5
|
+
* string output for snapshot-testability.
|
|
6
|
+
*/
|
|
7
|
+
import { c, color, glyph, width } from "./ui/tokens.js";
|
|
8
|
+
import { PROVIDER_TIERS } from "../setup.js";
|
|
9
|
+
/**
|
|
10
|
+
* Classify a provider/model pair into a `$ / $$ / $$$ / free` bucket. The
|
|
11
|
+
* heuristic is the average of input + output pricing from PROVIDER_TIERS:
|
|
12
|
+
*
|
|
13
|
+
* free local providers (ollama, lmstudio) and any model
|
|
14
|
+
* whose registered cost is 0/0
|
|
15
|
+
* $ avg < 1.0 (cheap cloud — groq, gpt-mini, xai-mini)
|
|
16
|
+
* $$ avg < 5.0 (mid — sonnet, gpt-5, grok-flagship)
|
|
17
|
+
* $$$ otherwise (premium — opus, mistral-large)
|
|
18
|
+
*
|
|
19
|
+
* Falls back to `$$` when the model isn't registered (unknown — conservative
|
|
20
|
+
* mid-tier so the user notices unknown spend).
|
|
21
|
+
*/
|
|
22
|
+
export function classifyCost(provider, model) {
|
|
23
|
+
if (provider === "ollama" || provider === "lmstudio")
|
|
24
|
+
return "free";
|
|
25
|
+
const tiers = PROVIDER_TIERS[provider] ?? [];
|
|
26
|
+
const tier = tiers.find((t) => t.model === model);
|
|
27
|
+
if (!tier)
|
|
28
|
+
return "$$";
|
|
29
|
+
const avg = (tier.input + tier.output) / 2;
|
|
30
|
+
if (avg === 0)
|
|
31
|
+
return "free";
|
|
32
|
+
if (avg < 1.0)
|
|
33
|
+
return "$";
|
|
34
|
+
if (avg < 5.0)
|
|
35
|
+
return "$$";
|
|
36
|
+
return "$$$";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Render the task-routing table block (title + columnar table). Returns
|
|
40
|
+
* the full multi-line string with no trailing newline.
|
|
41
|
+
*/
|
|
42
|
+
export function renderRoutingTable(rows) {
|
|
43
|
+
const W = width();
|
|
44
|
+
const taskW = Math.max("task".length, ...rows.map((r) => r.task.length)) + 2;
|
|
45
|
+
const usesW = Math.max("uses".length, ...rows.map((r) => r.uses.length)) + 2;
|
|
46
|
+
const indent = " ";
|
|
47
|
+
const lines = [];
|
|
48
|
+
const head = `${indent}${color(c.textDim, "task".padEnd(taskW))}${color(c.textDim, "uses".padEnd(usesW))}${color(c.textDim, "cost".padStart(6))}`;
|
|
49
|
+
lines.push(head);
|
|
50
|
+
// Rule under the header.
|
|
51
|
+
const ruleLen = Math.max(1, W - indent.length);
|
|
52
|
+
lines.push(`${indent}${color(c.textGhost, glyph.ruleLight.repeat(ruleLen - 2))}`);
|
|
53
|
+
for (const r of rows) {
|
|
54
|
+
const marker = r.changed ? color(c.accentHi, glyph.selection) : " ";
|
|
55
|
+
const taskTxt = r.changed
|
|
56
|
+
? color(c.accentHi, r.task.padEnd(taskW - 2))
|
|
57
|
+
: color(c.text, r.task.padEnd(taskW - 2));
|
|
58
|
+
const usesTxt = r.changed
|
|
59
|
+
? color(c.accentHi, r.uses.padEnd(usesW))
|
|
60
|
+
: color(c.text, r.uses.padEnd(usesW));
|
|
61
|
+
const costTxt = color(costColor(r.cost), r.cost.padStart(6));
|
|
62
|
+
lines.push(`${indent}${marker} ${taskTxt}${usesTxt}${costTxt}`);
|
|
63
|
+
}
|
|
64
|
+
return lines.join("\n");
|
|
65
|
+
}
|
|
66
|
+
export function renderRoutingDiff(entries) {
|
|
67
|
+
if (entries.length === 0)
|
|
68
|
+
return "";
|
|
69
|
+
const taskW = Math.max(...entries.map((e) => e.task.length));
|
|
70
|
+
const fromW = Math.max(...entries.map((e) => e.from.length));
|
|
71
|
+
const indent = " ";
|
|
72
|
+
const arrow = color(c.textGhost, glyph.arrow);
|
|
73
|
+
const lines = [];
|
|
74
|
+
for (const e of entries) {
|
|
75
|
+
const taskTxt = color(c.textDim, e.task.padEnd(taskW));
|
|
76
|
+
if (e.to === null || e.to === e.from) {
|
|
77
|
+
lines.push(`${indent}${taskTxt} ${color(c.textMid, e.from.padEnd(fromW))} ${color(c.textDim, "(unchanged)")}`);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
lines.push(`${indent}${taskTxt} ${color(c.textMid, e.from.padEnd(fromW))} ${arrow} ${color(c.accentHi, e.to)}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return lines.join("\n");
|
|
84
|
+
}
|
|
85
|
+
function costColor(t) {
|
|
86
|
+
switch (t) {
|
|
87
|
+
case "free":
|
|
88
|
+
return c.ok;
|
|
89
|
+
case "$":
|
|
90
|
+
return c.text;
|
|
91
|
+
case "$$":
|
|
92
|
+
return c.warn;
|
|
93
|
+
case "$$$":
|
|
94
|
+
return c.fail;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=routingRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routingRender.js","sourceRoot":"","sources":["../../../src/lib/setup/routingRender.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,KAAa;IAC1D,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC;IACpE,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,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,CAAC,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;QACrH,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,OAAO,MAAM,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACxH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,SAAS,CAAC,CAAW;IAC5B,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,MAAM;YACT,OAAO,CAAC,CAAC,EAAE,CAAC;QACd,KAAK,GAAG;YACN,OAAO,CAAC,CAAC,IAAI,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,CAAC,CAAC,IAAI,CAAC;QAChB,KAAK,KAAK;YACR,OAAO,CAAC,CAAC,IAAI,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -14,6 +14,14 @@ export interface IdesSetupOptions {
|
|
|
14
14
|
/**
|
|
15
15
|
* Run the IDE-integration wizard. Detects which IDEs are present in the
|
|
16
16
|
* project directory and lets the user pick which to wire up.
|
|
17
|
+
*
|
|
18
|
+
* v5.9.3 redesign:
|
|
19
|
+
* - Uses Header() + Title() + footer hint for "all / skip" instead of
|
|
20
|
+
* burying those as menu items.
|
|
21
|
+
* - Status column with ● (filled, accent) for "detected" and ○ (hollow,
|
|
22
|
+
* text-dim) for "will create" or "will use user-level".
|
|
23
|
+
* - Final line: `2 ides configured · 0 errors`.
|
|
24
|
+
*
|
|
17
25
|
* Returns true if at least one IDE config was written.
|
|
18
26
|
*/
|
|
19
27
|
export declare function runIdesSetup(opts: IdesSetupOptions): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ides.d.ts","sourceRoot":"","sources":["../../../../src/lib/setup/sections/ides.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA2BnE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,iBAAiB,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AA2BD
|
|
1
|
+
{"version":3,"file":"ides.d.ts","sourceRoot":"","sources":["../../../../src/lib/setup/sections/ides.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA2BnE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,iBAAiB,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AA2BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CA2F3E"}
|