@noir-ai/create 1.19.2-beta.1 → 1.19.3-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/index.js CHANGED
@@ -333,11 +333,11 @@ function hostAgnosticEntries(ctx) {
333
333
  {
334
334
  // init creates the REAL env file, not just the example. The body is
335
335
  // all-comment, so the file parses to an EMPTY overlay and creating it
336
- // changes no behaviour — it exists so the user never has to copy the
336
+ // changes no behaviour: it exists so the user never has to copy the
337
337
  // example by hand. `fileMode: 0o600` because the file holds tokens the
338
338
  // moment the user edits it. The mode is applied when the file is created;
339
339
  // a copy that predates this contract (or that an editor saved by rename)
340
- // has its mode re-asserted on every init/sync/create run — see `ensureOwnerOnly`.
340
+ // has its mode re-asserted on every init/sync/create run: see `ensureOwnerOnly`.
341
341
  path: P.env,
342
342
  mode: "skipIfExists",
343
343
  template: "config.env.tmpl",
@@ -361,7 +361,7 @@ function hostAgnosticEntries(ctx) {
361
361
  description: "AI working-rules seed"
362
362
  },
363
363
  {
364
- // The `.noir/` runtime map — what init just wrote,
364
+ // The `.noir/` runtime map: what init just wrote,
365
365
  // what appears later (and which command creates it), and where to go
366
366
  // next. Host-agnostic: it describes the canonical store, which every
367
367
  // host shares. Co-owned (README_BLOCK) so user notes survive while the
@@ -1041,7 +1041,7 @@ var envPointer = {
1041
1041
  const rel = ".noir/config.yml";
1042
1042
  const abs = join6(ctx.root, ".noir", "config.yml");
1043
1043
  if (!existsSync5(abs)) {
1044
- result.notes.push(`${rel}: absent \u2014 the template seed carries the pointer`);
1044
+ result.notes.push(`${rel}: absent: the template seed carries the pointer`);
1045
1045
  return result;
1046
1046
  }
1047
1047
  let prev;
@@ -1049,7 +1049,7 @@ var envPointer = {
1049
1049
  prev = readFileSync5(abs, "utf8");
1050
1050
  } catch (err) {
1051
1051
  result.conflicts.push(rel);
1052
- result.notes.push(`${rel}: unreadable (${errorMessage(err)}) \u2014 left untouched`);
1052
+ result.notes.push(`${rel}: unreadable (${errorMessage(err)}): left untouched`);
1053
1053
  return result;
1054
1054
  }
1055
1055
  if (prev.includes(ENV_POINTER_MARKER)) {
@@ -1065,7 +1065,7 @@ var envPointer = {
1065
1065
  writeFileSync2(abs, appendSeparated(prev, ENV_POINTER_BLOCK), "utf8");
1066
1066
  } catch (err) {
1067
1067
  result.conflicts.push(rel);
1068
- result.notes.push(`${rel}: write failed (${errorMessage(err)}) \u2014 left untouched`);
1068
+ result.notes.push(`${rel}: write failed (${errorMessage(err)}): left untouched`);
1069
1069
  return result;
1070
1070
  }
1071
1071
  result.changed.push(rel);
@@ -1085,12 +1085,12 @@ var envTemplates = {
1085
1085
  const result = { changed: [], conflicts: [], notes: [] };
1086
1086
  for (const seed of DOC_SEEDS) {
1087
1087
  if (seed.kind === "rulesSeed" && ctx.rulesEnabled === false) {
1088
- result.notes.push(`${seed.rel}: skipped \u2014 the working-rules switch is off`);
1088
+ result.notes.push(`${seed.rel}: skipped: the working-rules switch is off`);
1089
1089
  continue;
1090
1090
  }
1091
1091
  const abs = join6(ctx.root, seed.rel);
1092
1092
  if (!existsSync5(abs)) {
1093
- result.notes.push(`${seed.rel}: absent \u2014 nothing to refresh`);
1093
+ result.notes.push(`${seed.rel}: absent: nothing to refresh`);
1094
1094
  continue;
1095
1095
  }
1096
1096
  let prev;
@@ -1098,12 +1098,12 @@ var envTemplates = {
1098
1098
  prev = readFileSync5(abs, "utf8");
1099
1099
  } catch (err) {
1100
1100
  result.conflicts.push(seed.rel);
1101
- result.notes.push(`${seed.rel}: unreadable (${errorMessage(err)}) \u2014 left untouched`);
1101
+ result.notes.push(`${seed.rel}: unreadable (${errorMessage(err)}): left untouched`);
1102
1102
  continue;
1103
1103
  }
1104
1104
  const current = render(loadTemplate(seed.template), {});
1105
1105
  if (!isStaleSeed(seed.kind, prev, current)) {
1106
- result.notes.push(`${seed.rel}: user-owned or already current \u2014 left untouched`);
1106
+ result.notes.push(`${seed.rel}: user-owned or already current: left untouched`);
1107
1107
  continue;
1108
1108
  }
1109
1109
  if (ctx.dryRun) {
@@ -1115,7 +1115,7 @@ var envTemplates = {
1115
1115
  refreshSeed(abs, current);
1116
1116
  } catch (err) {
1117
1117
  result.conflicts.push(seed.rel);
1118
- result.notes.push(`${seed.rel}: refresh failed (${errorMessage(err)}) \u2014 left untouched`);
1118
+ result.notes.push(`${seed.rel}: refresh failed (${errorMessage(err)}): left untouched`);
1119
1119
  continue;
1120
1120
  }
1121
1121
  result.changed.push(seed.rel);
@@ -1142,7 +1142,7 @@ var workspaceBridge = {
1142
1142
  const result = { changed: [], conflicts: [], notes: [] };
1143
1143
  const name = readWorkspaceMarker2(ctx.root);
1144
1144
  if (name === null) {
1145
- result.notes.push("not joined to a workspace \u2014 nothing to rewrite");
1145
+ result.notes.push("not joined to a workspace: nothing to rewrite");
1146
1146
  return result;
1147
1147
  }
1148
1148
  const target = mcpConfigPath(ctx.root);
@@ -1155,17 +1155,17 @@ var workspaceBridge = {
1155
1155
  config = JSON.parse(readFileSync5(target.abs, "utf8"));
1156
1156
  } catch (err) {
1157
1157
  result.conflicts.push(target.rel);
1158
- result.notes.push(`${target.rel}: unreadable (${errorMessage(err)}) \u2014 left untouched`);
1158
+ result.notes.push(`${target.rel}: unreadable (${errorMessage(err)}): left untouched`);
1159
1159
  return result;
1160
1160
  }
1161
1161
  const servers = config.mcpServers;
1162
1162
  if (typeof servers !== "object" || servers === null || Array.isArray(servers)) {
1163
- result.notes.push(`${target.rel}: no mcpServers block \u2014 left untouched`);
1163
+ result.notes.push(`${target.rel}: no mcpServers block: left untouched`);
1164
1164
  return result;
1165
1165
  }
1166
1166
  const entry = servers.noir;
1167
1167
  if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
1168
- result.notes.push(`${target.rel}: no noir entry \u2014 left untouched`);
1168
+ result.notes.push(`${target.rel}: no noir entry: left untouched`);
1169
1169
  return result;
1170
1170
  }
1171
1171
  const entryObj = entry;
@@ -1175,7 +1175,7 @@ var workspaceBridge = {
1175
1175
  const isRepoScopedStdio = typeof entryObj.command === "string" && !namesWorkspace;
1176
1176
  if (!isHttpPointer && !isRepoScopedStdio) {
1177
1177
  result.notes.push(
1178
- namesWorkspace ? `${target.rel}: already reaches Noir over the bridge \u2014 left untouched` : `${target.rel}: noir entry is not a transport this migration owns \u2014 left untouched`
1178
+ namesWorkspace ? `${target.rel}: already reaches Noir over the bridge: left untouched` : `${target.rel}: noir entry is not a transport this migration owns: left untouched`
1179
1179
  );
1180
1180
  return result;
1181
1181
  }
@@ -1192,7 +1192,7 @@ var workspaceBridge = {
1192
1192
  noir: {
1193
1193
  command: resolveNoirCommand2(),
1194
1194
  // The argv comes from the adapters' own helper, so this rewrite lands
1195
- // on exactly the entry a fresh join writes — the name is the whole
1195
+ // on exactly the entry a fresh join writes: the name is the whole
1196
1196
  // address, and the bridge resolves the daemon (and reads its token)
1197
1197
  // itself, so none of that is written into a committed config file.
1198
1198
  args: noirStdioArgs(name),
@@ -1205,7 +1205,7 @@ var workspaceBridge = {
1205
1205
  `);
1206
1206
  } catch (err) {
1207
1207
  result.conflicts.push(target.rel);
1208
- result.notes.push(`${target.rel}: write failed (${errorMessage(err)}) \u2014 left untouched`);
1208
+ result.notes.push(`${target.rel}: write failed (${errorMessage(err)}): left untouched`);
1209
1209
  return result;
1210
1210
  }
1211
1211
  result.changed.push(target.rel);
@@ -1229,7 +1229,7 @@ var hookCommand = {
1229
1229
  } catch (err) {
1230
1230
  result.conflicts.push(settingsRel);
1231
1231
  result.notes.push(
1232
- `${settingsRel}: unreadable (${errorMessage(err)}) \u2014 command left untouched`
1232
+ `${settingsRel}: unreadable (${errorMessage(err)}): command left untouched`
1233
1233
  );
1234
1234
  settings = {};
1235
1235
  }
@@ -1266,11 +1266,11 @@ var hookCommand = {
1266
1266
  result.notes.push(`${settingsRel}: hook now routes through \`noir hook\``);
1267
1267
  } catch (err) {
1268
1268
  result.conflicts.push(settingsRel);
1269
- result.notes.push(`${settingsRel}: write failed (${errorMessage(err)}) \u2014 left untouched`);
1269
+ result.notes.push(`${settingsRel}: write failed (${errorMessage(err)}): left untouched`);
1270
1270
  }
1271
1271
  }
1272
1272
  } else {
1273
- result.notes.push(`${settingsRel}: absent \u2014 nothing to migrate`);
1273
+ result.notes.push(`${settingsRel}: absent: nothing to migrate`);
1274
1274
  }
1275
1275
  const runnerRel = ".noir/hooks/noir-session-start.mjs";
1276
1276
  const runnerPath = join6(ctx.root, ".noir", "hooks", "noir-session-start.mjs");
@@ -1303,7 +1303,7 @@ function applyHookEvents(ctx, rel, abs, events, createIfMissing) {
1303
1303
  let settings;
1304
1304
  if (!existsSync5(abs)) {
1305
1305
  if (!createIfMissing) {
1306
- return { note: `${rel}: absent \u2014 nothing to migrate`, changed: false, conflict: false };
1306
+ return { note: `${rel}: absent: nothing to migrate`, changed: false, conflict: false };
1307
1307
  }
1308
1308
  settings = {};
1309
1309
  } else {
@@ -1311,7 +1311,7 @@ function applyHookEvents(ctx, rel, abs, events, createIfMissing) {
1311
1311
  settings = JSON.parse(readFileSync5(abs, "utf8"));
1312
1312
  } catch (err) {
1313
1313
  return {
1314
- note: `${rel}: unreadable (${errorMessage(err)}) \u2014 left untouched`,
1314
+ note: `${rel}: unreadable (${errorMessage(err)}): left untouched`,
1315
1315
  changed: false,
1316
1316
  conflict: true
1317
1317
  };
@@ -1321,7 +1321,7 @@ function applyHookEvents(ctx, rel, abs, events, createIfMissing) {
1321
1321
  if (typeof existing !== "object" || existing === null || Array.isArray(existing)) {
1322
1322
  if (!createIfMissing) {
1323
1323
  return {
1324
- note: `${rel}: no hooks object \u2014 nothing to migrate`,
1324
+ note: `${rel}: no hooks object: nothing to migrate`,
1325
1325
  changed: false,
1326
1326
  conflict: false
1327
1327
  };
@@ -1348,7 +1348,7 @@ function applyHookEvents(ctx, rel, abs, events, createIfMissing) {
1348
1348
  return { note: `${rel}: appended enforcement events`, changed: true, conflict: false };
1349
1349
  } catch (err) {
1350
1350
  return {
1351
- note: `${rel}: write failed (${errorMessage(err)}) \u2014 left untouched`,
1351
+ note: `${rel}: write failed (${errorMessage(err)}): left untouched`,
1352
1352
  changed: false,
1353
1353
  conflict: true
1354
1354
  };
@@ -1823,7 +1823,7 @@ async function scaffold(opts) {
1823
1823
  command,
1824
1824
  stack,
1825
1825
  // The project's own working-rules switch: a project that set
1826
- // `rules.enabled: false` gets no `.noir/rules/RULES.md` — not on the first
1826
+ // `rules.enabled: false` gets no `.noir/rules/RULES.md`: not on the first
1827
1827
  // scaffold, and not backfilled by an upgrade. Unchanged (enabled) whenever
1828
1828
  // the config is absent or says nothing about rules.
1829
1829
  rulesEnabled: readConfiguredRulesEnabled(opts.root)
@@ -1902,12 +1902,12 @@ async function scaffold(opts) {
1902
1902
  }
1903
1903
  if (resolution !== void 0 && resolution !== "merge") {
1904
1904
  process.stderr.write(
1905
- `noir: managed-region conflict in ${relPath} \u2014 wrote inline markers; resolve manually.
1905
+ `noir: managed-region conflict in ${relPath}: wrote inline markers; resolve manually.
1906
1906
  `
1907
1907
  );
1908
1908
  } else {
1909
1909
  process.stderr.write(
1910
- `noir: managed-region conflict in ${relPath} \u2014 wrote inline markers; resolve manually.
1910
+ `noir: managed-region conflict in ${relPath}: wrote inline markers; resolve manually.
1911
1911
  `
1912
1912
  );
1913
1913
  }
@@ -2007,7 +2007,7 @@ async function scaffold(opts) {
2007
2007
  continue;
2008
2008
  }
2009
2009
  process.stderr.write(
2010
- `noir: managed-region conflict in ${entry.path} \u2014 wrote inline markers; resolve manually.
2010
+ `noir: managed-region conflict in ${entry.path}: wrote inline markers; resolve manually.
2011
2011
  `
2012
2012
  );
2013
2013
  }