@levr-one/cli 0.10.22 → 0.11.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.
@@ -1,12 +1,12 @@
1
- import { appendActualResult, createComment } from "./sdk-client-CTvYVr7D.js";
1
+ import { appendActualResult, createComment } from "./sdk-client-DYv-0CfA.js";
2
2
  import "./env-CdwyPHGV.js";
3
3
  import "./token-refresh-DeusLK8H.js";
4
4
  import "./resolve-token-7xb7kG7h.js";
5
5
  import "./workspace-store-CnrxyYRB.js";
6
- import "./resolve-workspace-B3Gz3-Vh.js";
7
- import { connect } from "./connect-DX41Im8c.js";
6
+ import "./resolve-workspace-CStHisUb.js";
7
+ import { connect } from "./connect-BgQmrL_0.js";
8
8
  import "./sleep-BpJ39Ypm.js";
9
- import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-CF2iXUiR.js";
9
+ import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-BzLxue32.js";
10
10
  import { readFileSync } from "node:fs";
11
11
  import { basename } from "node:path";
12
12
 
package/dist/cli.js CHANGED
@@ -120,6 +120,16 @@ and Antigravity are user-only. A client you name with --client fails if it canno
120
120
  scope you asked for; one picked up by --all or interactively falls back to
121
121
  the scope it does support, and the report says so.
122
122
 
123
+ --workspace pins the entry to one workspace (its MCP URL ends in
124
+ /w/<url_key>). Pass the workspace's url_key or its name. Without it, an
125
+ interactive run with several workspaces asks which one; a non-interactive run
126
+ writes the unpinned URL and lists the --workspace choices.
127
+
128
+ The entry is called "levr" unless you pass --name. An entry of that name that
129
+ already points somewhere else is left alone: re-run with --replace to switch it
130
+ to the new URL, or pick another --name to keep both side by side. Two entries
131
+ means every Levr tool appears twice in that client, once per workspace.
132
+
123
133
  Interactive by default; non-interactive when --all/--client/--yes is passed
124
134
  or when not running in a terminal (CI). Config edits preserve existing
125
135
  servers and comments, and re-running is a no-op.
@@ -130,6 +140,9 @@ Examples:
130
140
  levr mcp add --client cursor --yes
131
141
  levr mcp add --scope project # commit the config to this repo
132
142
  levr mcp add --dry-run # preview without writing
143
+ levr mcp add --workspace acme # pin the entry to one workspace
144
+ levr mcp add --workspace beta --replace # switch it to another
145
+ levr mcp add --workspace beta --name levr-beta # add a second, side by side
133
146
  levr mcp add --url <mcp-url> # target a non-default MCP server`
134
147
  },
135
148
  parameters: {
@@ -170,12 +183,31 @@ Examples:
170
183
  brief: "MCP server URL (default derived from the API server)",
171
184
  placeholder: "url",
172
185
  optional: true
186
+ },
187
+ workspace: {
188
+ kind: "parsed",
189
+ parse: String,
190
+ brief: "Pin the entry to this workspace (url_key or name)",
191
+ placeholder: "url_key|name",
192
+ optional: true
193
+ },
194
+ name: {
195
+ kind: "parsed",
196
+ parse: String,
197
+ brief: "Name of the client entry (default: levr)",
198
+ placeholder: "entry",
199
+ optional: true
200
+ },
201
+ replace: {
202
+ kind: "boolean",
203
+ optional: true,
204
+ brief: "Switch an existing entry of this name to the new URL"
173
205
  }
174
206
  },
175
207
  aliases: { y: "yes" }
176
208
  },
177
209
  loader: async () => {
178
- const { mcpAddHandler } = await import("./addHandler-DUulKXOX.js");
210
+ const { mcpAddHandler } = await import("./addHandler-Dh4elBBV.js");
179
211
  return mcpAddHandler;
180
212
  }
181
213
  });
@@ -213,7 +245,7 @@ Examples:
213
245
  aliases: { d: "device-code" }
214
246
  },
215
247
  loader: async () => {
216
- const { loginHandler } = await import("./loginHandler-DSznhtmk.js");
248
+ const { loginHandler } = await import("./loginHandler-DzyfdKc2.js");
217
249
  return loginHandler;
218
250
  }
219
251
  });
@@ -252,7 +284,7 @@ Examples:
252
284
  },
253
285
  parameters: {},
254
286
  loader: async () => {
255
- const { statusHandler } = await import("./statusHandler-p6CmwgjS.js");
287
+ const { statusHandler } = await import("./statusHandler-B_xmACZl.js");
256
288
  return statusHandler;
257
289
  }
258
290
  });
@@ -381,7 +413,7 @@ levr attach --manifest or later uploads.`
381
413
  }
382
414
  },
383
415
  loader: async () => {
384
- const { pushHandler } = await import("./pushHandler-Q9Cbo2HC.js");
416
+ const { pushHandler } = await import("./pushHandler-DRFf9Zeu.js");
385
417
  return pushHandler;
386
418
  }
387
419
  });
@@ -501,7 +533,7 @@ Examples:
501
533
  }
502
534
  },
503
535
  loader: async () => {
504
- const { importHandler } = await import("./importHandler-CUUroX_n.js");
536
+ const { importHandler } = await import("./importHandler-D2_Ol-Vp.js");
505
537
  return importHandler;
506
538
  }
507
539
  });
@@ -522,7 +554,7 @@ Examples:
522
554
  },
523
555
  parameters: {},
524
556
  loader: async () => {
525
- const { listHandler } = await import("./listHandler-CB_9cISi.js");
557
+ const { listHandler } = await import("./listHandler-hmLz8zm8.js");
526
558
  return listHandler;
527
559
  }
528
560
  });
@@ -555,7 +587,7 @@ Examples:
555
587
  flags: {}
556
588
  },
557
589
  loader: async () => {
558
- const { selectHandler } = await import("./selectHandler-CdOVuuTa.js");
590
+ const { selectHandler } = await import("./selectHandler-DNb1KJvM.js");
559
591
  return selectHandler;
560
592
  }
561
593
  });
@@ -641,7 +673,7 @@ Examples:
641
673
  }
642
674
  },
643
675
  loader: async () => {
644
- const { gatesRunHandler } = await import("./runHandler-DmRAoyJc.js");
676
+ const { gatesRunHandler } = await import("./runHandler-CCxnGJjS.js");
645
677
  return gatesRunHandler;
646
678
  }
647
679
  });
@@ -754,7 +786,7 @@ Examples:
754
786
  }
755
787
  },
756
788
  loader: async () => {
757
- const { attachHandler } = await import("./attachHandler-DgVCvhz7.js");
789
+ const { attachHandler } = await import("./attachHandler-DQpK_pVa.js");
758
790
  return attachHandler;
759
791
  }
760
792
  });
@@ -830,14 +862,14 @@ Examples:
830
862
  }
831
863
  },
832
864
  loader: async () => {
833
- const { resultAppendHandler } = await import("./appendHandler-u-NvHPDW.js");
865
+ const { resultAppendHandler } = await import("./appendHandler-9WDDNkkA.js");
834
866
  return resultAppendHandler;
835
867
  }
836
868
  });
837
869
 
838
870
  //#endregion
839
871
  //#region package.json
840
- var version = "0.10.22";
872
+ var version = "0.11.1";
841
873
 
842
874
  //#endregion
843
875
  //#region src/app.ts
@@ -1,6 +1,6 @@
1
- import { client, configureClient } from "./sdk-client-CTvYVr7D.js";
1
+ import { client, configureClient } from "./sdk-client-DYv-0CfA.js";
2
2
  import { resolveToken } from "./resolve-token-7xb7kG7h.js";
3
- import { resolveWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
3
+ import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
4
4
 
5
5
  //#region src/utils/connect.ts
6
6
  /**
@@ -1,9 +1,9 @@
1
- import { authGetProfileV1, configureClient, teamFindAllV1, testCaseImportCommitV1, testCaseImportPreviewV1 } from "./sdk-client-CTvYVr7D.js";
1
+ import { authGetProfileV1, client, configureClient } from "./sdk-client-DYv-0CfA.js";
2
2
  import { getApiUrl, getTeamId } from "./env-CdwyPHGV.js";
3
3
  import "./token-refresh-DeusLK8H.js";
4
4
  import { resolveToken } from "./resolve-token-7xb7kG7h.js";
5
5
  import "./workspace-store-CnrxyYRB.js";
6
- import { resolveWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
6
+ import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
7
7
  import chalk from "chalk";
8
8
  import { createReadStream } from "node:fs";
9
9
  import { basename } from "node:path";
@@ -11,6 +11,53 @@ import { readFile, writeFile } from "node:fs/promises";
11
11
  import { createInterface } from "node:readline/promises";
12
12
  import ora from "ora";
13
13
 
14
+ //#region ../sdk-public/dist/gen/team/functions.js
15
+ /** GET /v1/team */
16
+ const teamFindAllV1 = (options) => {
17
+ return (options?.client ?? client).get({
18
+ security: [{
19
+ scheme: "bearer",
20
+ type: "http"
21
+ }],
22
+ url: "/v1/team",
23
+ ...options
24
+ });
25
+ };
26
+
27
+ //#endregion
28
+ //#region ../sdk-public/dist/gen/test-case-import/functions.js
29
+ /** POST /v1/test-case-import/preview */
30
+ const testCaseImportPreviewV1 = (options) => {
31
+ return (options?.client ?? client).post({
32
+ security: [{
33
+ scheme: "bearer",
34
+ type: "http"
35
+ }],
36
+ url: "/v1/test-case-import/preview",
37
+ bodySerializer: (body) => {
38
+ const fd = new FormData();
39
+ if (body && typeof body === "object") for (const [k, v] of Object.entries(body)) {
40
+ if (v == null) continue;
41
+ fd.append(k, v instanceof Blob ? v : String(v));
42
+ }
43
+ return fd;
44
+ },
45
+ ...options
46
+ });
47
+ };
48
+ /** POST /v1/test-case-import/commit */
49
+ const testCaseImportCommitV1 = (options) => {
50
+ return (options?.client ?? client).post({
51
+ security: [{
52
+ scheme: "bearer",
53
+ type: "http"
54
+ }],
55
+ url: "/v1/test-case-import/commit",
56
+ ...options
57
+ });
58
+ };
59
+
60
+ //#endregion
14
61
  //#region src/commands/resolve-team.ts
15
62
  /**
16
63
  * The importing team — NOT the same thing as the `teams` column in the file.
@@ -1,4 +1,4 @@
1
- import { authGetSitesV1, configureClient } from "./sdk-client-CTvYVr7D.js";
1
+ import { authGetSitesV1, configureClient } from "./sdk-client-DYv-0CfA.js";
2
2
  import "./env-CdwyPHGV.js";
3
3
  import "./token-refresh-DeusLK8H.js";
4
4
  import { resolveToken } from "./resolve-token-7xb7kG7h.js";
@@ -1,7 +1,7 @@
1
- import { configureClient } from "./sdk-client-CTvYVr7D.js";
1
+ import { configureClient } from "./sdk-client-DYv-0CfA.js";
2
2
  import { CLI_CLIENT_ID, getApiUrl, getAuthUrl, setSessionApiUrl, writeCredentials } from "./env-CdwyPHGV.js";
3
3
  import "./workspace-store-CnrxyYRB.js";
4
- import { autoSelectWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
4
+ import { autoSelectWorkspace } from "./resolve-workspace-CStHisUb.js";
5
5
  import { sleep } from "./sleep-BpJ39Ypm.js";
6
6
  import chalk from "chalk";
7
7
  import { createHash, randomBytes } from "node:crypto";
@@ -1,11 +1,11 @@
1
- import { client, configureClient, uploadImport } from "./sdk-client-CTvYVr7D.js";
1
+ import { client, configureClient, uploadImport } from "./sdk-client-DYv-0CfA.js";
2
2
  import { getApiUrl, getAutomationSourceIdOverride, getSourceOverride, getTeamId } from "./env-CdwyPHGV.js";
3
3
  import "./token-refresh-DeusLK8H.js";
4
4
  import { resolveToken } from "./resolve-token-7xb7kG7h.js";
5
5
  import "./workspace-store-CnrxyYRB.js";
6
- import { resolveWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
6
+ import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
7
7
  import "./sleep-BpJ39Ypm.js";
8
- import { resolveArtifactPath, uploadArtifactFile } from "./artifact-upload-CF2iXUiR.js";
8
+ import { resolveArtifactPath, uploadArtifactFile } from "./artifact-upload-BzLxue32.js";
9
9
  import { readFileSync, statSync, writeFileSync } from "node:fs";
10
10
  import { basename, dirname, resolve } from "node:path";
11
11
  import { execSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- import { authGetSitesV1 } from "./sdk-client-CTvYVr7D.js";
1
+ import { authGetSitesV1 } from "./sdk-client-DYv-0CfA.js";
2
2
  import { clearWorkspace, loadWorkspace, saveWorkspace } from "./workspace-store-CnrxyYRB.js";
3
3
 
4
4
  //#region src/workspace/resolve-workspace.ts
@@ -86,4 +86,4 @@ async function resolveWorkspace(flagValue) {
86
86
  }
87
87
 
88
88
  //#endregion
89
- export { autoSelectWorkspace, resolveWorkspace };
89
+ export { autoSelectWorkspace, fetchSites, resolveWorkspace };
@@ -1,13 +1,52 @@
1
- import { client, configureClient, issueFindAllV1, issueGateVerificationReportGateResultsV1, issueGateVerificationVerifyGatesV1 } from "./sdk-client-CTvYVr7D.js";
1
+ import { client, configureClient } from "./sdk-client-DYv-0CfA.js";
2
2
  import "./env-CdwyPHGV.js";
3
3
  import "./token-refresh-DeusLK8H.js";
4
4
  import { resolveToken } from "./resolve-token-7xb7kG7h.js";
5
5
  import "./workspace-store-CnrxyYRB.js";
6
- import { resolveWorkspace } from "./resolve-workspace-B3Gz3-Vh.js";
6
+ import { resolveWorkspace } from "./resolve-workspace-CStHisUb.js";
7
7
  import { existsSync } from "node:fs";
8
8
  import { constants as constants$1 } from "node:os";
9
9
  import { spawnSync } from "node:child_process";
10
10
 
11
+ //#region ../sdk-public/dist/gen/issue/functions.js
12
+ /** GET /v1/issue */
13
+ const issueFindAllV1 = (options) => {
14
+ return (options?.client ?? client).get({
15
+ security: [{
16
+ scheme: "bearer",
17
+ type: "http"
18
+ }],
19
+ url: "/v1/issue",
20
+ ...options
21
+ });
22
+ };
23
+
24
+ //#endregion
25
+ //#region ../sdk-public/dist/gen/issue-gate-verification/functions.js
26
+ /** POST /v1/issue/{id}/verify-gates */
27
+ const issueGateVerificationVerifyGatesV1 = (options) => {
28
+ return (options?.client ?? client).post({
29
+ security: [{
30
+ scheme: "bearer",
31
+ type: "http"
32
+ }],
33
+ url: "/v1/issue/{id}/verify-gates",
34
+ ...options
35
+ });
36
+ };
37
+ /** POST /v1/issue/{id}/gate-results */
38
+ const issueGateVerificationReportGateResultsV1 = (options) => {
39
+ return (options?.client ?? client).post({
40
+ security: [{
41
+ scheme: "bearer",
42
+ type: "http"
43
+ }],
44
+ url: "/v1/issue/{id}/gate-results",
45
+ ...options
46
+ });
47
+ };
48
+
49
+ //#endregion
11
50
  //#region src/commands/gates/gate-runner.ts
12
51
  /**
13
52
  * ENG-5967 F — run a deliverable's gate `local_commands` and build the