@noir-ai/cli 1.14.0 → 1.15.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/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { C as CliOptions } from './output-BNE9htEm.js';
1
+ import { C as CliOptions } from './output-2T2lGR7a.js';
2
2
  import { HostId } from '@noir-ai/adapters';
3
3
  import { ScaffoldResult } from '@noir-ai/create';
4
+ import { SkillConflict } from '@noir-ai/skills';
4
5
 
5
6
  /** Options accepted by `doctor`: the global flags + the opt-in `--dedup`. */
6
7
  interface DoctorOptions extends CliOptions {
@@ -26,28 +27,54 @@ interface InitOptions {
26
27
  * absent. That backfills seeds added to the manifest after this project was
27
28
  * initialized without ever touching a user-owned file. */
28
29
  upgrade?: boolean;
29
- /** S10 target host. Defaults to `'claude'` (the regression anchor). Drives
30
- * both scaffold emission (the manifest's host-specific half) and skills
31
- * emission (skipped for hosts with no `skillsDir`). */
30
+ /** Target host. Resolution order: this explicit `--host <id>` value > the
31
+ * `host:` field of an existing `.noir/config.yml` > `'claude'` (the default,
32
+ * and the regression anchor for a project that has no config yet). Reading
33
+ * the configured host matters for `--upgrade`/`--force`, which re-emit into
34
+ * a project that already chose a host: emitting under the default instead
35
+ * would write a spurious claude surface and refresh none of the artifacts
36
+ * the project actually uses. An absent or unreadable config degrades to the
37
+ * default rather than failing the run.
38
+ * Drives both scaffold emission (the manifest's host-specific half) and
39
+ * skills emission (skipped for hosts with no `skillsDir`). */
32
40
  host?: HostId;
33
- /** SP-A: re-scaffold even if already initialized (bypasses the
41
+ /** Re-scaffold even if already initialized (bypasses the
34
42
  * already-initialized no-op guard in scaffold()). */
35
43
  force?: boolean;
36
- /** F1: `--dry-run`/`--preview` — report the planned writes to stderr
44
+ /** `--dry-run`/`--preview` — report the planned writes to stderr
37
45
  * (via {@link reportPlannedWrites}) without touching disk. The scaffold
38
46
  * engine already supports this; the CLI just surfaces it. */
39
47
  dryRun?: boolean;
40
- /** F1: alias for `--dry-run`. Kept on the options bag so direct callers can
48
+ /** Alias for `--dry-run`. Kept on the options bag so direct callers can
41
49
  * pass either spelling; the bin collapses both flags before dispatch. */
42
50
  preview?: boolean;
43
51
  }
44
52
  /**
45
- * Initialize Noir in `root`. Returns the {@link ScaffoldResult} (with
46
- * structured `conflicts[]` + any dedup records appended) so `--json`
47
- * callers can surface conflict detail. `undefined` when the already-initialized
48
- * guard short-circuited (a no-op).
53
+ * The {@link ScaffoldResult} plus the skill pack's own report. The scaffold's
54
+ * `conflicts[]` covers the files the manifest owns; skills are emitted outside
55
+ * the manifest, so their conflicts and their stale leftovers would otherwise
56
+ * be invisible to a `--json` consumer.
49
57
  */
50
- declare function init(root: string, opts: InitOptions): Promise<ScaffoldResult | undefined>;
58
+ interface InitResult extends ScaffoldResult {
59
+ /** One record per skill file that existed AND differed from the compiled
60
+ * bytes, with the resolution that was applied — including the files a
61
+ * non-interactive run left alone. Always an array once skills emission has
62
+ * run; absent on the `--dry-run` and already-initialized paths, which stop
63
+ * before emission. */
64
+ skillConflicts?: SkillConflict[];
65
+ /** Names of the skills left with the user's own bytes because a differing
66
+ * file was preserved. Empty when every skill is current — the `--json`
67
+ * counterpart of the stderr line that warns about stale skills. */
68
+ preservedSkills?: string[];
69
+ }
70
+ /**
71
+ * Initialize Noir in `root`. Returns the {@link InitResult} (the
72
+ * {@link ScaffoldResult} with structured `conflicts[]`, any dedup records, and
73
+ * the skill pack's conflicts/stale names) so `--json` callers can surface
74
+ * conflict detail. `undefined` when the already-initialized guard
75
+ * short-circuited (a no-op).
76
+ */
77
+ declare function init(root: string, opts: InitOptions): Promise<InitResult | undefined>;
51
78
 
52
79
  declare function serve(opts: {
53
80
  stdio: boolean;