@levr-one/cli 0.11.9 → 0.12.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.
Files changed (27) hide show
  1. package/README.md +17 -16
  2. package/dist/{addHandler-B_3UmMbj.js → addHandler-BIKNXipz.js} +700 -168
  3. package/dist/{appendHandler-KVsJMxpX.js → appendHandler-DtxLpPu6.js} +9 -9
  4. package/dist/{artifact-upload-BzLxue32.js → artifact-upload-BvBSevIx.js} +2 -2
  5. package/dist/{attachHandler-DQpK_pVa.js → attachHandler-DXZi2ILT.js} +9 -9
  6. package/dist/cli.js +56 -26
  7. package/dist/{connect-BgQmrL_0.js → connect-DVjgyfls.js} +3 -3
  8. package/dist/{currentHandler-u89l068v.js → currentHandler-QhCywr3S.js} +1 -1
  9. package/dist/{find-workspace-T4xuXwtS.js → find-workspace-Bl4rfr73.js} +1 -1
  10. package/dist/{importHandler-zw5GKb-S.js → importHandler-uFdalKtw.js} +6 -6
  11. package/dist/inspect-B8tG9g0q.js +1122 -0
  12. package/dist/inspect-BzBqSBO3.js +3 -0
  13. package/dist/{listHandler-YA-0RkwS.js → listHandler-BW92JLCl.js} +5 -5
  14. package/dist/{loginHandler-DE0L1ehF.js → loginHandler-C9Oi92IY.js} +15 -11
  15. package/dist/{logoutHandler-S4TFYFwz.js → logoutHandler-Cf5aI1wq.js} +2 -2
  16. package/dist/{pushHandler-DdNyVQ5t.js → pushHandler-CXFZt3SO.js} +8 -8
  17. package/dist/{resolve-token-7xb7kG7h.js → resolve-token-ByZq05Us.js} +2 -2
  18. package/dist/{resolve-workspace-CStHisUb.js → resolve-workspace-BbK3uYQc.js} +2 -2
  19. package/dist/{runHandler-BFDjtxbt.js → runHandler-itaAVn4U.js} +215 -25
  20. package/dist/{sdk-client-DYv-0CfA.js → sdk-client-B4FMd_Fa.js} +1 -1
  21. package/dist/{selectHandler-Cejme5nY.js → selectHandler-D6cvq60S.js} +5 -5
  22. package/dist/{statusHandler-BNiWlC7e.js → statusHandler-BQXn93-r.js} +3 -3
  23. package/dist/{token-refresh-DeusLK8H.js → token-refresh-CJB7Qlxy.js} +1 -1
  24. package/package.json +1 -1
  25. /package/dist/{env-CdwyPHGV.js → env-CvjMSRd7.js} +0 -0
  26. /package/dist/{sleep-BpJ39Ypm.js → sleep-CGBHjsj5.js} +0 -0
  27. /package/dist/{workspace-store-CnrxyYRB.js → workspace-store-Bmw104Qa.js} +0 -0
@@ -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";
@@ -106,8 +107,8 @@ const mcpAddCommand = buildCommand({
106
107
  docs: {
107
108
  brief: "Add the Levr MCP server to installed AI clients",
108
109
  fullDescription: `Detect MCP-capable clients on this machine (Claude Desktop,
109
- Claude Code, Cursor, Windsurf, Zed, VS Code, Gemini CLI, Codex CLI,
110
- Grok Build, Antigravity) and write the Levr MCP server into each one's config. The entry is credential-free — the client opens a browser to
110
+ Claude Code, Codex CLI, Grok Build, Antigravity, Gemini CLI, Cursor, Windsurf,
111
+ Zed, VS Code) and write the Levr MCP server into each one's config. The entry is credential-free — the client opens a browser to
111
112
  authorize with Levr the first time it connects.
112
113
 
113
114
  --scope decides where the entry lands:
@@ -115,8 +116,8 @@ authorize with Levr the first time it connects.
115
116
  project this repository, shared with everyone who checks it out
116
117
  local this repository, only you (Claude Code only)
117
118
 
118
- Not every client supports every scope — Claude Desktop, Windsurf, Codex CLI
119
- and Antigravity are user-only. A client you name with --client fails if it cannot honor the
119
+ Not every client supports every scope — Claude Desktop and Windsurf are user-only.
120
+ A client you name with --client fails if it cannot honor the
120
121
  scope you asked for; one picked up by --all or interactively falls back to
121
122
  the scope it does support, and the report says so.
122
123
 
@@ -136,12 +137,21 @@ Interactive by default; non-interactive when --all/--client/--yes is passed
136
137
  or when not running in a terminal (CI). Config edits preserve existing
137
138
  servers and comments, and re-running is a no-op.
138
139
 
140
+ Tool pre-approval (opt-in): for a client whose permission file has a
141
+ documented per-tool allow key (Claude Code, Cursor, Zed), the installer can
142
+ add entries that let your agent call Levr's non-destructive tools without
143
+ asking each time. It prints the exact file and every entry first, and asks
144
+ (default No). Non-interactively it writes them only with --preapprove-tools.
145
+ With --dry-run it prints what it would add and writes nothing. If a write
146
+ asked for with --preapprove-tools fails, the command exits 1.
147
+
139
148
  Examples:
140
149
  npx @levr-one/cli@latest mcp add # detect clients and pick interactively
141
150
  levr mcp add --all # set up every detected client
142
151
  levr mcp add --client cursor --yes
143
152
  levr mcp add --scope project # commit the config to this repo
144
153
  levr mcp add --dry-run # preview without writing
154
+ levr mcp add --client claude-code --yes --preapprove-tools
145
155
  levr mcp add --workspace acme # pin the entry to one workspace
146
156
  levr mcp add --workspace beta --replace # switch it to another
147
157
  levr mcp add --workspace beta --name levr-beta # add a second, side by side
@@ -204,12 +214,17 @@ Examples:
204
214
  kind: "boolean",
205
215
  optional: true,
206
216
  brief: "Switch an existing entry of this name to the new URL"
217
+ },
218
+ "preapprove-tools": {
219
+ kind: "boolean",
220
+ optional: true,
221
+ brief: "Non-interactive: also pre-approve Levr's non-destructive tools in the client's permission file"
207
222
  }
208
223
  },
209
224
  aliases: { y: "yes" }
210
225
  },
211
226
  loader: async () => {
212
- const { mcpAddHandler } = await import("./addHandler-B_3UmMbj.js");
227
+ const { mcpAddHandler } = await import("./addHandler-BIKNXipz.js");
213
228
  return mcpAddHandler;
214
229
  }
215
230
  });
@@ -258,7 +273,7 @@ Examples:
258
273
  aliases: { d: "device-code" }
259
274
  },
260
275
  loader: async () => {
261
- const { loginHandler } = await import("./loginHandler-DE0L1ehF.js");
276
+ const { loginHandler } = await import("./loginHandler-C9Oi92IY.js");
262
277
  return loginHandler;
263
278
  }
264
279
  });
@@ -277,7 +292,7 @@ Examples:
277
292
  },
278
293
  parameters: {},
279
294
  loader: async () => {
280
- const { logoutHandler } = await import("./logoutHandler-S4TFYFwz.js");
295
+ const { logoutHandler } = await import("./logoutHandler-Cf5aI1wq.js");
281
296
  return logoutHandler;
282
297
  }
283
298
  });
@@ -297,7 +312,7 @@ Examples:
297
312
  },
298
313
  parameters: {},
299
314
  loader: async () => {
300
- const { statusHandler } = await import("./statusHandler-BNiWlC7e.js");
315
+ const { statusHandler } = await import("./statusHandler-BQXn93-r.js");
301
316
  return statusHandler;
302
317
  }
303
318
  });
@@ -426,7 +441,7 @@ levr attach --manifest or later uploads.`
426
441
  }
427
442
  },
428
443
  loader: async () => {
429
- const { pushHandler } = await import("./pushHandler-DdNyVQ5t.js");
444
+ const { pushHandler } = await import("./pushHandler-CXFZt3SO.js");
430
445
  return pushHandler;
431
446
  }
432
447
  });
@@ -546,7 +561,7 @@ Examples:
546
561
  }
547
562
  },
548
563
  loader: async () => {
549
- const { importHandler } = await import("./importHandler-zw5GKb-S.js");
564
+ const { importHandler } = await import("./importHandler-uFdalKtw.js");
550
565
  return importHandler;
551
566
  }
552
567
  });
@@ -567,7 +582,7 @@ Examples:
567
582
  },
568
583
  parameters: {},
569
584
  loader: async () => {
570
- const { listHandler } = await import("./listHandler-YA-0RkwS.js");
585
+ const { listHandler } = await import("./listHandler-BW92JLCl.js");
571
586
  return listHandler;
572
587
  }
573
588
  });
@@ -605,7 +620,7 @@ Examples:
605
620
  flags: {}
606
621
  },
607
622
  loader: async () => {
608
- const { selectHandler } = await import("./selectHandler-Cejme5nY.js");
623
+ const { selectHandler } = await import("./selectHandler-D6cvq60S.js");
609
624
  return selectHandler;
610
625
  }
611
626
  });
@@ -622,7 +637,7 @@ Examples:
622
637
  },
623
638
  parameters: {},
624
639
  loader: async () => {
625
- const { currentHandler } = await import("./currentHandler-u89l068v.js");
640
+ const { currentHandler } = await import("./currentHandler-QhCywr3S.js");
626
641
  return currentHandler;
627
642
  }
628
643
  });
@@ -632,14 +647,21 @@ Examples:
632
647
  const gatesRunCommand = buildCommand({
633
648
  docs: {
634
649
  brief: "Run a deliverable's gate commands and report the raw results",
635
- fullDescription: `Verify a deliverable's gates, run every local command EXACTLY as the
636
- server returned it (/bin/bash -c, from the current directory — run it from the
637
- repo root), and report the raw exit code and output tails so the server can
638
- derive each verdict.
639
-
640
- Each command is printed before it runs; use --dry-run to read them first. The
641
- server validates every local command before handing it out: a command that
642
- 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.
643
665
 
644
666
  Guided gates are listed, not run: perform them and report what you observed
645
667
  with report_gate_results step_results[].
@@ -683,6 +705,11 @@ Examples:
683
705
  kind: "boolean",
684
706
  default: false,
685
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"
686
713
  }
687
714
  },
688
715
  aliases: {
@@ -691,7 +718,7 @@ Examples:
691
718
  }
692
719
  },
693
720
  loader: async () => {
694
- const { gatesRunHandler } = await import("./runHandler-BFDjtxbt.js");
721
+ const { gatesRunHandler } = await import("./runHandler-itaAVn4U.js");
695
722
  return gatesRunHandler;
696
723
  }
697
724
  });
@@ -804,7 +831,7 @@ Examples:
804
831
  }
805
832
  },
806
833
  loader: async () => {
807
- const { attachHandler } = await import("./attachHandler-DQpK_pVa.js");
834
+ const { attachHandler } = await import("./attachHandler-DXZi2ILT.js");
808
835
  return attachHandler;
809
836
  }
810
837
  });
@@ -880,14 +907,14 @@ Examples:
880
907
  }
881
908
  },
882
909
  loader: async () => {
883
- const { resultAppendHandler } = await import("./appendHandler-KVsJMxpX.js");
910
+ const { resultAppendHandler } = await import("./appendHandler-DtxLpPu6.js");
884
911
  return resultAppendHandler;
885
912
  }
886
913
  });
887
914
 
888
915
  //#endregion
889
916
  //#region package.json
890
- var version = "0.11.9";
917
+ var version = "0.12.0";
891
918
 
892
919
  //#endregion
893
920
  //#region src/app.ts
@@ -908,7 +935,10 @@ const workspaceRoutes = buildRouteMap({
908
935
  docs: { brief: "Manage workspace selection" }
909
936
  });
910
937
  const gatesRoutes = buildRouteMap({
911
- routes: { run: gatesRunCommand },
938
+ routes: {
939
+ inspect: gatesInspectCommand,
940
+ run: gatesRunCommand
941
+ },
912
942
  docs: { brief: "Run a deliverable's gates and report the raw results" }
913
943
  });
914
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";