@noir-ai/cli 1.10.0 → 1.10.1-beta.1
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/bin.js +9 -18
- package/dist/bin.js.map +1 -1
- package/dist/tui/index.js +13 -22
- package/dist/tui/index.js.map +1 -1
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -616,13 +616,13 @@ async function daemonRestart(opts) {
|
|
|
616
616
|
|
|
617
617
|
// src/commands/handoff.ts
|
|
618
618
|
import { mkdirSync, writeFileSync } from "fs";
|
|
619
|
-
import { join
|
|
619
|
+
import { join } from "path";
|
|
620
620
|
import {
|
|
621
621
|
defaultHandoffBlock,
|
|
622
622
|
hostLaunchDirective,
|
|
623
623
|
resolveAdapter
|
|
624
624
|
} from "@noir-ai/adapters";
|
|
625
|
-
import { loadProjectInfo as loadProjectInfo5, NOIR_DIR } from "@noir-ai/core";
|
|
625
|
+
import { loadProjectInfo as loadProjectInfo5, NOIR_DIR, resolveArtifactPath } from "@noir-ai/core";
|
|
626
626
|
|
|
627
627
|
// src/commands/status.ts
|
|
628
628
|
import { loadProjectInfo as loadProjectInfo3, NOIR_VERSION as NOIR_VERSION2 } from "@noir-ai/core";
|
|
@@ -791,9 +791,7 @@ async function status(opts) {
|
|
|
791
791
|
// src/commands/task.ts
|
|
792
792
|
import { spawnSync } from "child_process";
|
|
793
793
|
import { createHash } from "crypto";
|
|
794
|
-
import {
|
|
795
|
-
import { join } from "path";
|
|
796
|
-
import { loadProjectInfo as loadProjectInfo4 } from "@noir-ai/core";
|
|
794
|
+
import { loadProjectInfo as loadProjectInfo4, nextArtifactSequence } from "@noir-ai/core";
|
|
797
795
|
import {
|
|
798
796
|
PHASES,
|
|
799
797
|
TASK_CLASSES,
|
|
@@ -820,15 +818,8 @@ function writeDoneArtifacts(opts, taskId) {
|
|
|
820
818
|
const project = loadProjectInfo4(process.cwd());
|
|
821
819
|
const conflict = { conflictPolicy: "preserve", interactive: false };
|
|
822
820
|
writeChangelogStub(project.root, `- ${taskId}: completed (verify gate passed)`, conflict);
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
try {
|
|
826
|
-
const files = readdirSync(decisionsDir);
|
|
827
|
-
const nums = files.map((f) => Number.parseInt(f.replace(/\D.*$/, ""), 10)).filter((n) => Number.isFinite(n) && n > 0);
|
|
828
|
-
if (nums.length > 0) nextN = Math.max(...nums) + 1;
|
|
829
|
-
} catch {
|
|
830
|
-
}
|
|
831
|
-
writeDecisionStub(project.root, nextN, taskId, conflict);
|
|
821
|
+
const nextN = nextArtifactSequence(project.root, "adr");
|
|
822
|
+
writeDecisionStub(project.root, nextN, taskId, void 0, conflict);
|
|
832
823
|
} catch {
|
|
833
824
|
tip("document-phase artifacts could not be written (use --no-artifacts to skip)", opts);
|
|
834
825
|
}
|
|
@@ -1398,7 +1389,7 @@ function resolveDirective(root, p) {
|
|
|
1398
1389
|
}
|
|
1399
1390
|
function handoffFilePath(root, taskId, projectId) {
|
|
1400
1391
|
const id = typeof taskId === "string" && taskId.length > 0 ? taskId : projectId;
|
|
1401
|
-
return
|
|
1392
|
+
return resolveArtifactPath(root, "handoff", { taskId: id });
|
|
1402
1393
|
}
|
|
1403
1394
|
async function extractSeeds(opts, probe, query) {
|
|
1404
1395
|
if (!probe.running) return { context: null, memory: null };
|
|
@@ -1464,7 +1455,7 @@ async function handoff(opts) {
|
|
|
1464
1455
|
const md = renderMarkdown(full);
|
|
1465
1456
|
if (opts.write === true) {
|
|
1466
1457
|
const path = handoffFilePath(project.root, task?.taskId, project.id);
|
|
1467
|
-
mkdirSync(
|
|
1458
|
+
mkdirSync(join(project.root, NOIR_DIR, "handoff"), { recursive: true });
|
|
1468
1459
|
writeFileSync(path, md, "utf8");
|
|
1469
1460
|
info(`handoff written to ${path}`, opts);
|
|
1470
1461
|
return;
|
|
@@ -3047,10 +3038,10 @@ function createProgram() {
|
|
|
3047
3038
|
function buildHandoffOptions(g) {
|
|
3048
3039
|
return { ...toCliOptions(g), ...g.write === true ? { write: true } : {} };
|
|
3049
3040
|
}
|
|
3050
|
-
program2.command("handoff").description("emit a ready-to-paste host handoff prompt").option("--write", "persist to .noir/handoff
|
|
3041
|
+
program2.command("handoff").description("emit a ready-to-paste host handoff prompt").option("--write", "persist to .noir/handoff/HO-<NNNN>-<id>.md (gitignored)").action(async (...args) => {
|
|
3051
3042
|
await handoff(buildHandoffOptions(trailingCmd(args).optsWithGlobals()));
|
|
3052
3043
|
});
|
|
3053
|
-
program2.command("wrap").description("session-end alias for `noir handoff`").option("--write", "persist to .noir/handoff
|
|
3044
|
+
program2.command("wrap").description("session-end alias for `noir handoff`").option("--write", "persist to .noir/handoff/HO-<NNNN>-<id>.md (gitignored)").action(async (...args) => {
|
|
3054
3045
|
await handoff(buildHandoffOptions(trailingCmd(args).optsWithGlobals()));
|
|
3055
3046
|
});
|
|
3056
3047
|
program2.command("release").description("guided release orchestrator over the patch-release flow").argument("[version]", "target version, e.g. 1.10.0").option("--channel <channel>", "beta (default) | stable").option("--dry-run", "print the checklist without executing any steps").action(async (...args) => {
|