@levr-one/cli 0.12.0 → 0.12.2

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.
@@ -2076,6 +2076,12 @@ function* installSteps(harness, mcpUrl, opts) {
2076
2076
  if (err instanceof UnsupportedConfigShapeError) return unsupportedShape(path$1, dryRun, scope, err.detail);
2077
2077
  throw err;
2078
2078
  }
2079
+ const shared = {};
2080
+ if (def.projectPath) {
2081
+ const root = resolveProjectRoot(env);
2082
+ const ignored = root.isRepo ? isGitIgnored(env, root.root, path$1) : void 0;
2083
+ if (ignored !== void 0) shared.gitIgnored = ignored;
2084
+ }
2079
2085
  if (alreadyConfigured) return {
2080
2086
  ok: true,
2081
2087
  wrote: false,
@@ -2083,7 +2089,8 @@ function* installSteps(harness, mcpUrl, opts) {
2083
2089
  alreadyConfigured: true,
2084
2090
  dryRun,
2085
2091
  scope,
2086
- preview: nextText
2092
+ preview: nextText,
2093
+ ...shared
2087
2094
  };
2088
2095
  const backupPath = backupPathFor(path$1, adapter.backupSuffix);
2089
2096
  if (dryRun) return {
@@ -2095,7 +2102,8 @@ function* installSteps(harness, mcpUrl, opts) {
2095
2102
  scope,
2096
2103
  preview: nextText,
2097
2104
  ...replaced,
2098
- ...backupPath ? { backupPath } : {}
2105
+ ...backupPath ? { backupPath } : {},
2106
+ ...shared
2099
2107
  };
2100
2108
  const finalText = nextText.endsWith("\n") ? nextText : `${nextText}\n`;
2101
2109
  try {
@@ -2114,7 +2122,8 @@ function* installSteps(harness, mcpUrl, opts) {
2114
2122
  scope,
2115
2123
  preview: finalText,
2116
2124
  ...replaced,
2117
- ...backupPath ? { backupPath } : {}
2125
+ ...backupPath ? { backupPath } : {},
2126
+ ...shared
2118
2127
  };
2119
2128
  }
2120
2129
  /**
@@ -2704,6 +2713,7 @@ function outcomeLine(o, dryRun, switchCommand, entryName) {
2704
2713
  const harness = getHarness(o.id);
2705
2714
  const scopeNote = harness ? scopeDef(harness, r.scope)?.note : void 0;
2706
2715
  const caveat = scopeNote ? ` [${scopeNote}]` : "";
2716
+ const unshared = r.gitIgnored === true && r.scope === "project" ? " [path is git-ignored — not shared via git]" : "";
2707
2717
  const note = (o.entryName ? ` [as ${o.entryName}]` : "") + (o.fallbackFrom ? ` [${o.fallbackFrom} scope unsupported — used ${r.scope}]` : "");
2708
2718
  const where = r.path ? ` → ${r.path}` : "";
2709
2719
  const backup = r.backupPath ? dryRun ? ` [original would be backed up to ${r.backupPath}]` : ` [original backed up to ${r.backupPath}]` : "";
@@ -2712,14 +2722,14 @@ function outcomeLine(o, dryRun, switchCommand, entryName) {
2712
2722
  if (o.entryName) return `${o.label}: failed [as ${o.entryName}] — ${failureText(o, void 0, o.entryName)}`;
2713
2723
  return `${o.label}: failed — ${failureText(o, switchCommand, entryName)}`;
2714
2724
  }
2715
- if (r.alreadyConfigured) return `${o.label}: already set up (${r.scope})${where}${note}${caveat}`;
2725
+ if (r.alreadyConfigured) return `${o.label}: already set up (${r.scope})${where}${note}${unshared}${caveat}`;
2716
2726
  if (r.command) {
2717
2727
  if (r.executed) return `${o.label}: installed (${r.scope}) via \`${r.command}\`${replaced}${note}${caveat}`;
2718
2728
  return `${o.label} (${r.scope}): run \`${r.command}\`${replaced}${note}${caveat}`;
2719
2729
  }
2720
- if (dryRun) return `${o.label}: would update (${r.scope})${where} (dry run — no changes)${backup}${replaced}${note}${caveat}`;
2721
- if (r.wrote) return `${o.label}: installed (${r.scope})${where}${backup}${replaced}${note}${caveat}`;
2722
- return `${o.label}: no change (${r.scope})${where}${note}${caveat}`;
2730
+ if (dryRun) return `${o.label}: would update (${r.scope})${where} (dry run — no changes)${backup}${replaced}${note}${unshared}${caveat}`;
2731
+ if (r.wrote) return `${o.label}: installed (${r.scope})${where}${backup}${replaced}${note}${unshared}${caveat}`;
2732
+ return `${o.label}: no change (${r.scope})${where}${note}${unshared}${caveat}`;
2723
2733
  }
2724
2734
  /** Render a report as a plain multi-line summary (used by the CLI + tests). */
2725
2735
  function formatReport(report) {
@@ -2743,7 +2753,9 @@ function nextStepsText(report) {
2743
2753
  if (report.dryRun) return "Dry run — re-run without --dry-run to apply these changes.";
2744
2754
  if (!report.outcomes.some((o) => o.result.ok && !o.result.alreadyConfigured && (o.result.wrote || o.result.executed || o.result.command))) return report.outcomes.some((o) => !o.result.ok) ? "Nothing was installed." : "Nothing to do.";
2745
2755
  const lines = ["Next: restart the client(s) above — each will prompt you to authorize", "Levr once in the browser. Then ask it: \"What issues are assigned to me?\""];
2746
- if (report.outcomes.some((o) => o.result.scope === "project" && o.result.wrote)) lines.push("", "Project-scoped config was written into this repository — commit it to", "share the Levr MCP with everyone who checks it out.");
2756
+ const projectWrites = report.outcomes.filter((o) => o.result.scope === "project" && o.result.wrote);
2757
+ if (projectWrites.some((o) => o.result.gitIgnored !== true)) lines.push("", "Project-scoped config was written into this repository — commit it to", "share the Levr MCP with everyone who checks it out.");
2758
+ if (projectWrites.some((o) => o.result.gitIgnored === true)) lines.push("", "A project-scoped file above is git-ignored, so it stays on this machine.", "To share it, un-ignore that path (a `!` rule in .gitignore) or use --scope user.");
2747
2759
  return lines.join("\n");
2748
2760
  }
2749
2761
 
@@ -2942,12 +2954,18 @@ function describeTool(tool) {
2942
2954
  /**
2943
2955
  * Who the permission file reaches (code review F-030): a `project` file sits
2944
2956
  * in the repository and is usually committed, so it grants the tools to
2945
- * everyone on the repo; a `local` file is personal, and when it is about to
2946
- * be created somewhere git does not ignore, the user is told so (we never
2947
- * edit their .gitignore).
2957
+ * everyone on the repo — unless the repository ignores it, in which case the
2958
+ * sharing claim is false and the note says the file stays on this machine,
2959
+ * matching the install line's `[path is git-ignored — not shared via git]`
2960
+ * (ENG-7147, mirrors ENG-7134); a `local` file is personal, and when it is
2961
+ * about to be created somewhere git does not ignore, the user is told so (we
2962
+ * never edit their .gitignore).
2948
2963
  */
2949
2964
  function sharingNote(plan) {
2950
- if (plan.scope === "project") return "This file is in your repository and is usually committed: these permissions are shared via git with everyone who uses this repo.";
2965
+ if (plan.scope === "project") {
2966
+ if (plan.gitIgnored === true) return "This file is in your repository but git-ignored, so these permissions stay on this machine. To share them, un-ignore that path (a `!` rule in .gitignore) or use --scope user.";
2967
+ return "This file is in your repository and is usually committed: these permissions are shared via git with everyone who uses this repo.";
2968
+ }
2951
2969
  if (plan.scope === "local") {
2952
2970
  const note = "This file is personal to you in this repository.";
2953
2971
  if (!plan.fileExists && plan.gitIgnored === false) return `${note} It does not exist yet and git does not ignore it, so it would be committed by a "git add" of that folder: add it to .gitignore if you do not want to share it.`;
package/dist/cli.js CHANGED
@@ -224,7 +224,7 @@ Examples:
224
224
  aliases: { y: "yes" }
225
225
  },
226
226
  loader: async () => {
227
- const { mcpAddHandler } = await import("./addHandler-BIKNXipz.js");
227
+ const { mcpAddHandler } = await import("./addHandler-LO6SChns.js");
228
228
  return mcpAddHandler;
229
229
  }
230
230
  });
@@ -914,7 +914,7 @@ Examples:
914
914
 
915
915
  //#endregion
916
916
  //#region package.json
917
- var version = "0.12.0";
917
+ var version = "0.12.2";
918
918
 
919
919
  //#endregion
920
920
  //#region src/app.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levr-one/cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "The command-line interface for Levr",
5
5
  "type": "module",
6
6
  "license": "MIT",