@nodii/dev 0.6.73 → 0.6.75
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/README.md +133 -7
- package/dist/cli.js +68 -14
- package/dist/core.js +2 -2
- package/dist/design.js +47 -3
- package/dist/doctor.js +17 -7
- package/dist/figma.js +44 -0
- package/dist/flags.js +1 -0
- package/dist/freeze.js +12 -0
- package/dist/gather.js +51 -23
- package/dist/harness.js +8 -4
- package/dist/hooks.js +1 -25
- package/dist/lanes.js +40 -16
- package/dist/managed-hooks.js +60 -9
- package/dist/nudges.js +166 -2
- package/dist/review.js +89 -5
- package/dist/safety.js +8 -1
- package/dist/session-kind.js +243 -0
- package/dist/setup.js +8 -6
- package/dist/surface.js +847 -0
- package/dist/vendor/render-templates.mjs +740 -0
- package/package.json +1 -1
package/dist/setup.js
CHANGED
|
@@ -3,7 +3,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
3
3
|
import { CliError, checkLogin } from "./core.js";
|
|
4
4
|
import { codexHooksFromClaude } from "./harness.js";
|
|
5
5
|
import { regroundingHooksSnippet, safetySettingsSnippet } from "./safety.js";
|
|
6
|
-
import { EMBED_MODEL,
|
|
6
|
+
import { EMBED_MODEL, pickerPin, setupOllama } from "./gather.js";
|
|
7
7
|
|
|
8
8
|
export const SKILL_PATH = ".claude/skills/nodii-build-workflow/SKILL.md";
|
|
9
9
|
const START = "<!-- nodii-dev build workflow:start -->";
|
|
@@ -119,21 +119,23 @@ export async function setupPlan(root = process.cwd()) {
|
|
|
119
119
|
return changes;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export async function setupCommand(flags, { root = process.cwd(), authCheck = checkLogin, pickerSetup = setupOllama } = {}) {
|
|
122
|
+
export async function setupCommand(flags, { root = process.cwd(), authCheck = checkLogin, pickerSetup = setupOllama, env = process.env } = {}) {
|
|
123
123
|
if (flags.yes && flags.check) throw new CliError("USAGE", "setup accepts either --yes or --check, not both.", 2);
|
|
124
124
|
const changes = await setupPlan(root);
|
|
125
125
|
let authenticated = true;
|
|
126
126
|
try { await authCheck(); } catch { authenticated = false; }
|
|
127
|
+
// A model name this CLI does not pin is a usage error, not a picker gap.
|
|
128
|
+
const pickerModel = pickerPin(env).name;
|
|
127
129
|
let pickerReady = true;
|
|
128
130
|
let pickerStatus;
|
|
129
|
-
try { pickerStatus = await pickerSetup({ check: !flags.yes }); }
|
|
131
|
+
try { pickerStatus = await pickerSetup({ check: !flags.yes, env }); }
|
|
130
132
|
catch (error) {
|
|
131
133
|
pickerReady = false;
|
|
132
134
|
pickerStatus = { code: error?.code ?? "PICKER_UNAVAILABLE", message: error?.message ?? String(error) };
|
|
133
135
|
}
|
|
134
136
|
// Only the section embedding pin is missing: the picker itself is ready.
|
|
135
137
|
const embedOnly = !pickerReady && String(pickerStatus.code).startsWith("EMBED_");
|
|
136
|
-
const missingModels = embedOnly ? [EMBED_MODEL] : [
|
|
138
|
+
const missingModels = embedOnly ? [EMBED_MODEL] : [pickerModel, EMBED_MODEL];
|
|
137
139
|
if (flags.check) {
|
|
138
140
|
const drift = [
|
|
139
141
|
...(changes.length ? [`Workflow harness drift: ${changes.map((x) => x.relative).join(", ")}`] : []),
|
|
@@ -145,7 +147,7 @@ export async function setupCommand(flags, { root = process.cwd(), authCheck = ch
|
|
|
145
147
|
if (!flags.yes) {
|
|
146
148
|
const preview = [
|
|
147
149
|
...(changes.length ? changes.map((x) => `${x.before === null ? "+ create" : "~ update"} ${x.relative}`) : ["No workflow changes."]),
|
|
148
|
-
pickerReady ? `Gather picker: ${
|
|
150
|
+
pickerReady ? `Gather picker: ${pickerModel} and ${EMBED_MODEL} are ready.` : `+ ${embedOnly ? "" : "install Ollama and "}pull ${missingModels.join(" and ")}`,
|
|
149
151
|
].join("\n");
|
|
150
152
|
return { payload: { dryRun: true, changed: [...changes.map((x) => x.relative), ...(!pickerReady ? missingModels.map((m) => `ollama:${m}`) : [])], authenticated, picker: pickerStatus }, human: `${preview}\n${authenticated ? "Authentication: ready." : "Authentication: not logged in; run `nodii-dev login`."}\nRun \`nodii-dev setup --yes\` to apply.` };
|
|
151
153
|
}
|
|
@@ -154,5 +156,5 @@ export async function setupCommand(flags, { root = process.cwd(), authCheck = ch
|
|
|
154
156
|
await mkdir(dirname(change.path), { recursive: true });
|
|
155
157
|
await writeFile(change.path, change.content);
|
|
156
158
|
}
|
|
157
|
-
return { payload: { applied: true, changed: [...changes.map((x) => x.relative), ...(pickerStatus.changed ?? []).map((x) => `ollama:${x}`)], authenticated, picker: pickerStatus }, human: `${changes.length ? `Applied: ${changes.map((x) => x.relative).join(", ")}` : "Workflow harness already current."}\nGather picker: ${
|
|
159
|
+
return { payload: { applied: true, changed: [...changes.map((x) => x.relative), ...(pickerStatus.changed ?? []).map((x) => `ollama:${x}`)], authenticated, picker: pickerStatus }, human: `${changes.length ? `Applied: ${changes.map((x) => x.relative).join(", ")}` : "Workflow harness already current."}\nGather picker: ${pickerModel} and ${EMBED_MODEL} ready on Ollama ${pickerStatus.version}.\n${authenticated ? "Authentication: ready." : "Not logged in; run `nodii-dev login`."}` };
|
|
158
160
|
}
|