@levr-one/cli 0.11.10 → 0.12.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.
Files changed (26) hide show
  1. package/dist/{addHandler-DR6q5U_R.js → addHandler-QVX0ltyN.js} +27 -15
  2. package/dist/{appendHandler-KVsJMxpX.js → appendHandler-DtxLpPu6.js} +9 -9
  3. package/dist/{artifact-upload-BzLxue32.js → artifact-upload-BvBSevIx.js} +2 -2
  4. package/dist/{attachHandler-DQpK_pVa.js → attachHandler-DXZi2ILT.js} +9 -9
  5. package/dist/cli.js +38 -22
  6. package/dist/{connect-BgQmrL_0.js → connect-DVjgyfls.js} +3 -3
  7. package/dist/{currentHandler-u89l068v.js → currentHandler-QhCywr3S.js} +1 -1
  8. package/dist/{find-workspace-T4xuXwtS.js → find-workspace-Bl4rfr73.js} +1 -1
  9. package/dist/{importHandler-zw5GKb-S.js → importHandler-uFdalKtw.js} +6 -6
  10. package/dist/inspect-B8tG9g0q.js +1122 -0
  11. package/dist/inspect-BzBqSBO3.js +3 -0
  12. package/dist/{listHandler-YA-0RkwS.js → listHandler-BW92JLCl.js} +5 -5
  13. package/dist/{loginHandler-DE0L1ehF.js → loginHandler-C9Oi92IY.js} +15 -11
  14. package/dist/{logoutHandler-S4TFYFwz.js → logoutHandler-Cf5aI1wq.js} +2 -2
  15. package/dist/{pushHandler-DdNyVQ5t.js → pushHandler-CXFZt3SO.js} +8 -8
  16. package/dist/{resolve-token-7xb7kG7h.js → resolve-token-ByZq05Us.js} +2 -2
  17. package/dist/{resolve-workspace-CStHisUb.js → resolve-workspace-BbK3uYQc.js} +2 -2
  18. package/dist/{runHandler-BFDjtxbt.js → runHandler-itaAVn4U.js} +215 -25
  19. package/dist/{sdk-client-DYv-0CfA.js → sdk-client-B4FMd_Fa.js} +1 -1
  20. package/dist/{selectHandler-Cejme5nY.js → selectHandler-D6cvq60S.js} +5 -5
  21. package/dist/{statusHandler-BNiWlC7e.js → statusHandler-BQXn93-r.js} +3 -3
  22. package/dist/{token-refresh-DeusLK8H.js → token-refresh-CJB7Qlxy.js} +1 -1
  23. package/package.json +1 -1
  24. /package/dist/{env-CdwyPHGV.js → env-CvjMSRd7.js} +0 -0
  25. /package/dist/{sleep-BpJ39Ypm.js → sleep-CGBHjsj5.js} +0 -0
  26. /package/dist/{workspace-store-CnrxyYRB.js → workspace-store-Bmw104Qa.js} +0 -0
@@ -1,10 +1,10 @@
1
- import { configureClient } from "./sdk-client-DYv-0CfA.js";
2
- import { getApiUrl } from "./env-CdwyPHGV.js";
3
- import "./token-refresh-DeusLK8H.js";
4
- import { resolveToken } from "./resolve-token-7xb7kG7h.js";
5
- import "./workspace-store-CnrxyYRB.js";
6
- import { fetchSites } from "./resolve-workspace-CStHisUb.js";
7
- import { describeWorkspaces, findWorkspaceByKeyOrName, isScopedMcpUrl, resolveMcpUrl, scopedMcpUrl, servedBySessionApi } from "./find-workspace-T4xuXwtS.js";
1
+ import { configureClient } from "./sdk-client-B4FMd_Fa.js";
2
+ import { getApiUrl } from "./env-CvjMSRd7.js";
3
+ import "./token-refresh-CJB7Qlxy.js";
4
+ import { resolveToken } from "./resolve-token-ByZq05Us.js";
5
+ import "./workspace-store-Bmw104Qa.js";
6
+ import { fetchSites } from "./resolve-workspace-BbK3uYQc.js";
7
+ import { describeWorkspaces, findWorkspaceByKeyOrName, isScopedMcpUrl, resolveMcpUrl, scopedMcpUrl, servedBySessionApi } from "./find-workspace-Bl4rfr73.js";
8
8
  import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
9
9
  import { basename, delimiter, dirname, join, resolve } from "node:path";
10
10
  import { homedir } from "node:os";
@@ -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
 
@@ -1,12 +1,12 @@
1
- import { appendActualResult } from "./sdk-client-DYv-0CfA.js";
2
- import "./env-CdwyPHGV.js";
3
- import "./token-refresh-DeusLK8H.js";
4
- import "./resolve-token-7xb7kG7h.js";
5
- import "./workspace-store-CnrxyYRB.js";
6
- import "./resolve-workspace-CStHisUb.js";
7
- import { connect } from "./connect-BgQmrL_0.js";
8
- import "./sleep-BpJ39Ypm.js";
9
- import { embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-BzLxue32.js";
1
+ import { appendActualResult } from "./sdk-client-B4FMd_Fa.js";
2
+ import "./env-CvjMSRd7.js";
3
+ import "./token-refresh-CJB7Qlxy.js";
4
+ import "./resolve-token-ByZq05Us.js";
5
+ import "./workspace-store-Bmw104Qa.js";
6
+ import "./resolve-workspace-BbK3uYQc.js";
7
+ import { connect } from "./connect-DVjgyfls.js";
8
+ import "./sleep-CGBHjsj5.js";
9
+ import { embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-BvBSevIx.js";
10
10
  import { readFileSync } from "node:fs";
11
11
  import { basename } from "node:path";
12
12
 
@@ -1,5 +1,5 @@
1
- import { uploadAttachment } from "./sdk-client-DYv-0CfA.js";
2
- import { sleep } from "./sleep-BpJ39Ypm.js";
1
+ import { uploadAttachment } from "./sdk-client-B4FMd_Fa.js";
2
+ import { sleep } from "./sleep-CGBHjsj5.js";
3
3
  import { constants, promises, readlinkSync, realpathSync, statSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import process from "node:process";
@@ -1,12 +1,12 @@
1
- import { appendActualResult, createComment } from "./sdk-client-DYv-0CfA.js";
2
- import "./env-CdwyPHGV.js";
3
- import "./token-refresh-DeusLK8H.js";
4
- import "./resolve-token-7xb7kG7h.js";
5
- import "./workspace-store-CnrxyYRB.js";
6
- import "./resolve-workspace-CStHisUb.js";
7
- import { connect } from "./connect-BgQmrL_0.js";
8
- import "./sleep-BpJ39Ypm.js";
9
- import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-BzLxue32.js";
1
+ import { appendActualResult, createComment } from "./sdk-client-B4FMd_Fa.js";
2
+ import "./env-CvjMSRd7.js";
3
+ import "./token-refresh-CJB7Qlxy.js";
4
+ import "./resolve-token-ByZq05Us.js";
5
+ import "./workspace-store-Bmw104Qa.js";
6
+ import "./resolve-workspace-BbK3uYQc.js";
7
+ import { connect } from "./connect-DVjgyfls.js";
8
+ import "./sleep-CGBHjsj5.js";
9
+ import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-BvBSevIx.js";
10
10
  import { readFileSync } from "node:fs";
11
11
  import { basename } from "node:path";
12
12
 
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { COMPLETION_SHELLS } from "./completionHandler-O2G_WZLf.js";
3
+ import { gatesInspectCommand } from "./inspect-B8tG9g0q.js";
3
4
  import { buildApplication, buildCommand, buildRouteMap, proposeCompletions, run, text_en } from "@stricli/core";
4
5
  import chalk from "chalk";
5
6
  import { existsSync, readFileSync } from "node:fs";
@@ -223,7 +224,7 @@ Examples:
223
224
  aliases: { y: "yes" }
224
225
  },
225
226
  loader: async () => {
226
- const { mcpAddHandler } = await import("./addHandler-DR6q5U_R.js");
227
+ const { mcpAddHandler } = await import("./addHandler-QVX0ltyN.js");
227
228
  return mcpAddHandler;
228
229
  }
229
230
  });
@@ -272,7 +273,7 @@ Examples:
272
273
  aliases: { d: "device-code" }
273
274
  },
274
275
  loader: async () => {
275
- const { loginHandler } = await import("./loginHandler-DE0L1ehF.js");
276
+ const { loginHandler } = await import("./loginHandler-C9Oi92IY.js");
276
277
  return loginHandler;
277
278
  }
278
279
  });
@@ -291,7 +292,7 @@ Examples:
291
292
  },
292
293
  parameters: {},
293
294
  loader: async () => {
294
- const { logoutHandler } = await import("./logoutHandler-S4TFYFwz.js");
295
+ const { logoutHandler } = await import("./logoutHandler-Cf5aI1wq.js");
295
296
  return logoutHandler;
296
297
  }
297
298
  });
@@ -311,7 +312,7 @@ Examples:
311
312
  },
312
313
  parameters: {},
313
314
  loader: async () => {
314
- const { statusHandler } = await import("./statusHandler-BNiWlC7e.js");
315
+ const { statusHandler } = await import("./statusHandler-BQXn93-r.js");
315
316
  return statusHandler;
316
317
  }
317
318
  });
@@ -440,7 +441,7 @@ levr attach --manifest or later uploads.`
440
441
  }
441
442
  },
442
443
  loader: async () => {
443
- const { pushHandler } = await import("./pushHandler-DdNyVQ5t.js");
444
+ const { pushHandler } = await import("./pushHandler-CXFZt3SO.js");
444
445
  return pushHandler;
445
446
  }
446
447
  });
@@ -560,7 +561,7 @@ Examples:
560
561
  }
561
562
  },
562
563
  loader: async () => {
563
- const { importHandler } = await import("./importHandler-zw5GKb-S.js");
564
+ const { importHandler } = await import("./importHandler-uFdalKtw.js");
564
565
  return importHandler;
565
566
  }
566
567
  });
@@ -581,7 +582,7 @@ Examples:
581
582
  },
582
583
  parameters: {},
583
584
  loader: async () => {
584
- const { listHandler } = await import("./listHandler-YA-0RkwS.js");
585
+ const { listHandler } = await import("./listHandler-BW92JLCl.js");
585
586
  return listHandler;
586
587
  }
587
588
  });
@@ -619,7 +620,7 @@ Examples:
619
620
  flags: {}
620
621
  },
621
622
  loader: async () => {
622
- const { selectHandler } = await import("./selectHandler-Cejme5nY.js");
623
+ const { selectHandler } = await import("./selectHandler-D6cvq60S.js");
623
624
  return selectHandler;
624
625
  }
625
626
  });
@@ -636,7 +637,7 @@ Examples:
636
637
  },
637
638
  parameters: {},
638
639
  loader: async () => {
639
- const { currentHandler } = await import("./currentHandler-u89l068v.js");
640
+ const { currentHandler } = await import("./currentHandler-QhCywr3S.js");
640
641
  return currentHandler;
641
642
  }
642
643
  });
@@ -646,14 +647,21 @@ Examples:
646
647
  const gatesRunCommand = buildCommand({
647
648
  docs: {
648
649
  brief: "Run a deliverable's gate commands and report the raw results",
649
- fullDescription: `Verify a deliverable's gates, run every local command EXACTLY as the
650
- server returned it (/bin/bash -c, from the current directory — run it from the
651
- repo root), and report the raw exit code and output tails so the server can
652
- derive each verdict.
653
-
654
- Each command is printed before it runs; use --dry-run to read them first. The
655
- server validates every local command before handing it out: a command that
656
- fails its check comes back as a verification error, never as a command to run.
650
+ fullDescription: `Verify a deliverable's gates, run every local command from the current
651
+ directory (run it from the repo root), and report the raw exit code and output
652
+ tails so the server can derive each verdict.
653
+
654
+ File checks (inspect ops, printed as \`npx @levr-one/cli gates inspect '…'\`)
655
+ run inside this CLI and spawn nothing. Every other command runs EXACTLY as the
656
+ server returned it, in /bin/bash -c (or sh).
657
+
658
+ Each command is printed before it runs; use --dry-run to read them first. A
659
+ dry run runs nothing locally and shows, per command, where it would run
660
+ (\`runs\`) and the server's approval (\`approval\`). It still calls the
661
+ server's verify, which records state there. A \`confirm\` approval is not
662
+ prompted for yet: the command runs. The server validates every local command
663
+ before handing it out: a command that fails its check comes back as a
664
+ verification error, never as a command to run.
657
665
 
658
666
  Guided gates are listed, not run: perform them and report what you observed
659
667
  with report_gate_results step_results[].
@@ -697,6 +705,11 @@ Examples:
697
705
  kind: "boolean",
698
706
  default: false,
699
707
  brief: "Show detailed output"
708
+ },
709
+ ci: {
710
+ kind: "boolean",
711
+ default: false,
712
+ brief: "Declare this run is CI. On GitHub Actions, attach an OIDC token (audience levr:<workspace_id>); without one the server records the run as unverified"
700
713
  }
701
714
  },
702
715
  aliases: {
@@ -705,7 +718,7 @@ Examples:
705
718
  }
706
719
  },
707
720
  loader: async () => {
708
- const { gatesRunHandler } = await import("./runHandler-BFDjtxbt.js");
721
+ const { gatesRunHandler } = await import("./runHandler-itaAVn4U.js");
709
722
  return gatesRunHandler;
710
723
  }
711
724
  });
@@ -818,7 +831,7 @@ Examples:
818
831
  }
819
832
  },
820
833
  loader: async () => {
821
- const { attachHandler } = await import("./attachHandler-DQpK_pVa.js");
834
+ const { attachHandler } = await import("./attachHandler-DXZi2ILT.js");
822
835
  return attachHandler;
823
836
  }
824
837
  });
@@ -894,14 +907,14 @@ Examples:
894
907
  }
895
908
  },
896
909
  loader: async () => {
897
- const { resultAppendHandler } = await import("./appendHandler-KVsJMxpX.js");
910
+ const { resultAppendHandler } = await import("./appendHandler-DtxLpPu6.js");
898
911
  return resultAppendHandler;
899
912
  }
900
913
  });
901
914
 
902
915
  //#endregion
903
916
  //#region package.json
904
- var version = "0.11.10";
917
+ var version = "0.12.1";
905
918
 
906
919
  //#endregion
907
920
  //#region src/app.ts
@@ -922,7 +935,10 @@ const workspaceRoutes = buildRouteMap({
922
935
  docs: { brief: "Manage workspace selection" }
923
936
  });
924
937
  const gatesRoutes = buildRouteMap({
925
- routes: { run: gatesRunCommand },
938
+ routes: {
939
+ inspect: gatesInspectCommand,
940
+ run: gatesRunCommand
941
+ },
926
942
  docs: { brief: "Run a deliverable's gates and report the raw results" }
927
943
  });
928
944
  const resultRoutes = buildRouteMap({
@@ -1,6 +1,6 @@
1
- import { client, configureClient } from "./sdk-client-DYv-0CfA.js";
2
- import { resolveToken } from "./resolve-token-7xb7kG7h.js";
3
- import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
1
+ import { client, configureClient } from "./sdk-client-B4FMd_Fa.js";
2
+ import { resolveToken } from "./resolve-token-ByZq05Us.js";
3
+ import { resolveWorkspace } from "./resolve-workspace-BbK3uYQc.js";
4
4
 
5
5
  //#region src/utils/connect.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { loadWorkspace } from "./workspace-store-CnrxyYRB.js";
1
+ import { loadWorkspace } from "./workspace-store-Bmw104Qa.js";
2
2
 
3
3
  //#region src/commands/workspace/currentHandler.ts
4
4
  function currentHandler() {
@@ -1,4 +1,4 @@
1
- import { getApiUrl } from "./env-CdwyPHGV.js";
1
+ import { getApiUrl } from "./env-CvjMSRd7.js";
2
2
 
3
3
  //#region src/mcp/url.ts
4
4
  const KNOWN_MCP_URLS = {
@@ -1,9 +1,9 @@
1
- import { authGetProfileV1, client, configureClient } from "./sdk-client-DYv-0CfA.js";
2
- import { getApiUrl, getTeamId } from "./env-CdwyPHGV.js";
3
- import "./token-refresh-DeusLK8H.js";
4
- import { resolveToken } from "./resolve-token-7xb7kG7h.js";
5
- import "./workspace-store-CnrxyYRB.js";
6
- import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
1
+ import { authGetProfileV1, client, configureClient } from "./sdk-client-B4FMd_Fa.js";
2
+ import { getApiUrl, getTeamId } from "./env-CvjMSRd7.js";
3
+ import "./token-refresh-CJB7Qlxy.js";
4
+ import { resolveToken } from "./resolve-token-ByZq05Us.js";
5
+ import "./workspace-store-Bmw104Qa.js";
6
+ import { resolveWorkspace } from "./resolve-workspace-BbK3uYQc.js";
7
7
  import chalk from "chalk";
8
8
  import { createReadStream } from "node:fs";
9
9
  import { basename } from "node:path";