@bugbug-io/cli 14.8.0 → 14.10.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.
package/AGENTS.md CHANGED
@@ -25,7 +25,7 @@ packages/cli/
25
25
  ```
26
26
 
27
27
  Command domains under `src/features/`: `auth`, `init`, `install`, `profiles`,
28
- `project`, `shorthands`, `suiteRuns`, `suites`, `testRuns`, `tests`, `tui`.
28
+ `project`, `shorthands`, `suiteRuns`, `suites`, `tags`, `testRuns`, `tests`, `tui`.
29
29
 
30
30
  ## Architecture
31
31
 
package/README.md CHANGED
@@ -99,9 +99,12 @@ bugbug tests list -s "login" # Filter tests by name
99
99
  bugbug tests show <testId> # Show test details
100
100
  bugbug tests run <testId> # Run a test (waits for completion by default)
101
101
  bugbug tests run <testId> --profile "Production"
102
+ bugbug tests run <testId> --tag smoke --tag critical
102
103
  bugbug tests run <testId> --variable FOO=bar --variable BAZ=qux
103
104
  bugbug tests run <testId> --no-wait # Queue the run and exit immediately
104
105
  bugbug tests run <testId> --reporter junit --output-path report.xml
106
+ bugbug tests tags set <testId> --tag smoke # Replace test tags by name
107
+ bugbug tests tags set <testId> # Clear test tags
105
108
  bugbug tests export <testId> --format yaml
106
109
  bugbug tests export <testId> --format zip -o test.zip
107
110
  bugbug tests import test.yaml # Import a test from YAML or ZIP
@@ -114,6 +117,10 @@ bugbug testruns show <runId> # Show the result of a test run
114
117
  bugbug testruns logs <runId> # Get logs for a test run
115
118
  bugbug testruns stop <runId> # Stop a running test run
116
119
  bugbug testruns report <runId> -o out.xml # Get the JUnit XML report
120
+ bugbug testruns tags set <runId> --tag flaky
121
+ bugbug testruns tags set <runId> # Clear directly assigned run tags
122
+ bugbug testruns notes set <runId> "Retried successfully"
123
+ bugbug testruns notes set <runId> # Clear run notes
117
124
  ```
118
125
 
119
126
  ### Suites
@@ -124,7 +131,10 @@ bugbug suites list -s "checkout" # Filter suites by name
124
131
  bugbug suites show <suiteId> # Show suite details
125
132
  bugbug suites run <suiteId> # Run a suite (waits for completion by default)
126
133
  bugbug suites run <suiteId> --profile "Production" --variable FOO=bar
134
+ bugbug suites run <suiteId> --tag smoke
127
135
  bugbug suites run <suiteId> --no-wait
136
+ bugbug suites tags set <suiteId> --tag regression
137
+ bugbug suites tags set <suiteId> # Clear suite tags
128
138
  ```
129
139
 
130
140
  ### Suite Runs
@@ -133,6 +143,10 @@ bugbug suites run <suiteId> --no-wait
133
143
  bugbug suiteruns show <runId> # Show the result of a suite run
134
144
  bugbug suiteruns stop <runId> # Stop a running suite run
135
145
  bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
146
+ bugbug suiteruns tags set <runId> --tag nightly
147
+ bugbug suiteruns tags set <runId> # Clear directly assigned run tags
148
+ bugbug suiteruns notes set <runId> "Nightly follow-up"
149
+ bugbug suiteruns notes set <runId> # Clear run notes
136
150
  ```
137
151
 
138
152
  ### Profiles
@@ -141,6 +155,13 @@ bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
141
155
  bugbug profiles list # List run profiles
142
156
  ```
143
157
 
158
+ ### Tags
159
+
160
+ ```bash
161
+ bugbug tags list # List tags in the active project
162
+ bugbug --json tags list # Emit tag details as JSON
163
+ ```
164
+
144
165
  ### AI Clients (plugin: MCP + Skills)
145
166
 
146
167
  ```bash
@@ -62,7 +62,7 @@ import {
62
62
  waitForSuiteRun,
63
63
  waitForTestRun,
64
64
  writeReportXml
65
- } from "./chunk-THKXEYLX.js";
65
+ } from "./chunk-Q2VWHHIF.js";
66
66
  import "./chunk-XLIBEETK.js";
67
67
  import "./chunk-3PJ4ZE2N.js";
68
68
  import {
@@ -11130,5 +11130,5 @@ react-router/dist/development/index.mjs:
11130
11130
  * @license MIT
11131
11131
  *)
11132
11132
  */
11133
- //# sourceMappingURL=NavigatorApp-JYXOTJV6.js.map
11133
+ //# sourceMappingURL=NavigatorApp-PYBO2OGJ.js.map
11134
11134
  //# debugId=9e90a61c-d567-5034-bd9e-55c33ff018a1
@@ -12,7 +12,7 @@ var startNavigator = async (opts = {}) => {
12
12
  const [{ render }, React, { NavigatorApp }] = await Promise.all([
13
13
  import("./render-CSMURV5U.js"),
14
14
  importReact(),
15
- import("./NavigatorApp-JYXOTJV6.js")
15
+ import("./NavigatorApp-PYBO2OGJ.js")
16
16
  ]);
17
17
  const element = React.createElement(
18
18
  NavigatorApp,
@@ -27,5 +27,5 @@ var startNavigator = async (opts = {}) => {
27
27
  export {
28
28
  startNavigator
29
29
  };
30
- //# sourceMappingURL=app-HRSH6OZ5.js.map
30
+ //# sourceMappingURL=app-FCCURCWQ.js.map
31
31
  //# debugId=cecc8c80-302a-54e0-a1fb-74d6bb70c0a1
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="809b0c55-999e-5bb6-a08b-81bba34a0dc9")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="76099ed2-f97e-5d85-a9c5-1f6961ded32f")}catch(e){}}();
3
3
  import { createRequire as __nodeCreateRequire } from 'node:module';
4
4
  const require = __nodeCreateRequire(import.meta.url);
5
5
  import {
@@ -8930,7 +8930,7 @@ var require_main = __commonJS({
8930
8930
  // ../core/package.json
8931
8931
  var package_default = {
8932
8932
  name: "@bugbug-io/core",
8933
- version: "14.8.0",
8933
+ version: "14.10.0",
8934
8934
  private: true,
8935
8935
  type: "module",
8936
8936
  main: "dist/index.js",
@@ -57448,6 +57448,7 @@ var SuitesModule = class {
57448
57448
  timeout,
57449
57449
  onProgress,
57450
57450
  profileName,
57451
+ tags,
57451
57452
  variables,
57452
57453
  ...runOptions
57453
57454
  } = options;
@@ -57456,6 +57457,7 @@ var SuitesModule = class {
57456
57457
  body: {
57457
57458
  suiteId,
57458
57459
  runProfileId,
57460
+ tags,
57459
57461
  variables: variables ?? [],
57460
57462
  triggeredBy: this.#client.getConfig().triggeredBy
57461
57463
  },
@@ -57479,6 +57481,30 @@ var SuitesModule = class {
57479
57481
  pathParams: { id: runId },
57480
57482
  ...options
57481
57483
  });
57484
+ /**
57485
+ * Replace tags assigned directly to a suite by tag name.
57486
+ */
57487
+ setTags = async (suiteId, tags, options = {}) => this.#client.put("/suites/{id}/tags/", {
57488
+ pathParams: { id: suiteId },
57489
+ body: { tags },
57490
+ ...options
57491
+ });
57492
+ /**
57493
+ * Replace tags assigned directly to a suite run by tag name. Inherited tags remain unchanged.
57494
+ */
57495
+ setRunTags = async (runId, tags, options = {}) => this.#client.put("/suiteruns/{id}/tags/", {
57496
+ pathParams: { id: runId },
57497
+ body: { tags },
57498
+ ...options
57499
+ });
57500
+ /**
57501
+ * Replace notes on a suite run. Pass null to clear the notes.
57502
+ */
57503
+ setRunNotes = async (runId, notes, options = {}) => this.#client.patch("/suiteruns/{id}/", {
57504
+ pathParams: { id: runId },
57505
+ body: { notes },
57506
+ ...options
57507
+ });
57482
57508
  /**
57483
57509
  * Get list of suite runs.
57484
57510
  *
@@ -57611,6 +57637,18 @@ var SuitesModule = class {
57611
57637
  return this.getRun(runId, requestOptions);
57612
57638
  };
57613
57639
  };
57640
+ var TagsModule = class {
57641
+ #client;
57642
+ constructor(client) {
57643
+ this.#client = client;
57644
+ }
57645
+ /**
57646
+ * Fetch every tag in the active project.
57647
+ *
57648
+ * @returns All project tags with their color and test/suite usage counts.
57649
+ */
57650
+ getAll = async (options = {}) => this.#client.get("/tags/", options);
57651
+ };
57614
57652
  function buildTestImportFormData(payload, fmt2) {
57615
57653
  const form = new FormData();
57616
57654
  const filename = fmt2 === "yaml" ? "test.yaml" : "test.zip";
@@ -57735,12 +57773,13 @@ var TestsModule = class {
57735
57773
  * Run a test by ID
57736
57774
  */
57737
57775
  #run = async (testId, options = {}) => {
57738
- const { profileName, variables, ...requestOptions } = options;
57776
+ const { profileName, tags, variables, ...requestOptions } = options;
57739
57777
  const runProfileId = profileName ? await this.#profiles.resolveId(profileName, requestOptions) : void 0;
57740
57778
  return this.#client.post("/testruns/", {
57741
57779
  body: {
57742
57780
  testId,
57743
57781
  runProfileId,
57782
+ tags,
57744
57783
  variables: variables ?? [],
57745
57784
  triggeredBy: this.#client.getConfig().triggeredBy
57746
57785
  },
@@ -57800,6 +57839,30 @@ var TestsModule = class {
57800
57839
  pathParams: { id: runId },
57801
57840
  ...options
57802
57841
  });
57842
+ /**
57843
+ * Replace tags assigned directly to a test by tag name.
57844
+ */
57845
+ setTags = async (testId, tags, options = {}) => this.#client.put("/tests/{id}/tags/", {
57846
+ pathParams: { id: testId },
57847
+ body: { tags },
57848
+ ...options
57849
+ });
57850
+ /**
57851
+ * Replace tags assigned directly to a test run by tag name. Inherited tags remain unchanged.
57852
+ */
57853
+ setRunTags = async (runId, tags, options = {}) => this.#client.put("/testruns/{id}/tags/", {
57854
+ pathParams: { id: runId },
57855
+ body: { tags },
57856
+ ...options
57857
+ });
57858
+ /**
57859
+ * Replace notes on a test run. Pass null to clear the notes.
57860
+ */
57861
+ setRunNotes = async (runId, notes, options = {}) => this.#client.patch("/testruns/{id}/", {
57862
+ pathParams: { id: runId },
57863
+ body: { notes },
57864
+ ...options
57865
+ });
57803
57866
  /**
57804
57867
  * Request cancellation of an in-progress test run.
57805
57868
  *
@@ -58270,7 +58333,7 @@ var readEnvFiles2 = (cwd) => {
58270
58333
  var buildUserAgent2 = (clientType, version) => `BugBug ${clientType.toUpperCase()} ${version}`;
58271
58334
  var package_default2 = {
58272
58335
  name: "@bugbug-io/core",
58273
- version: "14.8.0",
58336
+ version: "14.10.0",
58274
58337
  private: true,
58275
58338
  type: "module",
58276
58339
  main: "dist/index.js",
@@ -59485,6 +59548,7 @@ var BugBugSDK = class {
59485
59548
  #client;
59486
59549
  tests;
59487
59550
  suites;
59551
+ tags;
59488
59552
  profiles;
59489
59553
  config;
59490
59554
  groups;
@@ -59504,6 +59568,7 @@ var BugBugSDK = class {
59504
59568
  this.#client = new BugBugApiClient(config);
59505
59569
  this.tests = new TestsModule(this.#client);
59506
59570
  this.suites = new SuitesModule(this.#client);
59571
+ this.tags = new TagsModule(this.#client);
59507
59572
  this.profiles = new ProfilesModule(this.#client);
59508
59573
  this.config = new ConfigModule(this.#client);
59509
59574
  this.groups = new GroupsModule(this.#client);
@@ -64615,6 +64680,12 @@ var stopSuiteRun = async (runId) => {
64615
64680
  const run = await getSdk().suites.stopRun(runId);
64616
64681
  return toRunState(run);
64617
64682
  };
64683
+ var setSuiteRunTags = async (runId, tags) => {
64684
+ await getSdk().suites.setRunTags(runId, tags);
64685
+ };
64686
+ var setSuiteRunNotes = async (runId, notes) => {
64687
+ await getSdk().suites.setRunNotes(runId, notes);
64688
+ };
64618
64689
  var getSuiteRunJunitReport = async (runId) => getSdk().suites.downloadRunJunitReport(runId, { timeout: 6e5 });
64619
64690
 
64620
64691
  // ../core/dist/utils/variables.js
@@ -64683,6 +64754,7 @@ var getSuiteDetails = async (suiteId) => {
64683
64754
  var runSuite = async (suiteId, options = {}) => {
64684
64755
  const result = await getSdk().suites.startRun(suiteId, {
64685
64756
  profileName: options.profile,
64757
+ tags: options.tags,
64686
64758
  variables: toOverrideArray(options.variables)
64687
64759
  });
64688
64760
  return {
@@ -64692,6 +64764,9 @@ var runSuite = async (suiteId, options = {}) => {
64692
64764
  webappUrl: result.webappUrl
64693
64765
  };
64694
64766
  };
64767
+ var setSuiteTags = async (suiteId, tags) => {
64768
+ await getSdk().suites.setTags(suiteId, tags);
64769
+ };
64695
64770
  var waitForSuiteRun = async (runId, intervalMs = 4e3, onStatusChange, timeoutMs) => {
64696
64771
  const result = await getSdk().suites.watchRunProgress(
64697
64772
  runId,
@@ -64730,6 +64805,12 @@ var stopTestRun = async (runId) => {
64730
64805
  const run = await getSdk().tests.stopRun(runId);
64731
64806
  return toRunState(run);
64732
64807
  };
64808
+ var setTestRunTags = async (runId, tags) => {
64809
+ await getSdk().tests.setRunTags(runId, tags);
64810
+ };
64811
+ var setTestRunNotes = async (runId, notes) => {
64812
+ await getSdk().tests.setRunNotes(runId, notes);
64813
+ };
64733
64814
  var getTestRunJunitReport = async (runId) => getSdk().tests.downloadRunJunitReport(runId, { timeout: 3e5 });
64734
64815
  var listTestRunDebugArtifacts = async (runId) => getSdk().tests.listRunDebugArtifacts(runId);
64735
64816
 
@@ -64775,6 +64856,7 @@ var getTestDetails = async (testId) => {
64775
64856
  var runTest = async (testId, options = {}) => {
64776
64857
  const result = await getSdk().tests.startRun(testId, {
64777
64858
  profileName: options.profile,
64859
+ tags: options.tags,
64778
64860
  variables: toOverrideArray(options.variables)
64779
64861
  });
64780
64862
  return {
@@ -64784,6 +64866,9 @@ var runTest = async (testId, options = {}) => {
64784
64866
  webappUrl: result.webappUrl
64785
64867
  };
64786
64868
  };
64869
+ var setTestTags = async (testId, tags) => {
64870
+ await getSdk().tests.setTags(testId, tags);
64871
+ };
64787
64872
  var waitForTestRun = async (runId, intervalMs = 4e3, onStatusChange, timeoutMs) => {
64788
64873
  const result = await getSdk().tests.watchRunProgress(
64789
64874
  runId,
@@ -64917,6 +65002,7 @@ export {
64917
65002
  runClientCommand,
64918
65003
  openExternalUrl,
64919
65004
  formatRunStatus,
65005
+ getSdk,
64920
65006
  updateSdkConfig,
64921
65007
  login,
64922
65008
  logout,
@@ -64935,24 +65021,29 @@ export {
64935
65021
  formatInlineRunReport,
64936
65022
  formatFinalResults,
64937
65023
  getRunErrorMessage,
65024
+ getVariablesMap,
64938
65025
  listSuiteRuns,
64939
65026
  getSuiteRunDetails,
64940
65027
  getSuiteRunTestRuns,
64941
65028
  getSuiteRun,
64942
65029
  stopSuiteRun,
65030
+ setSuiteRunTags,
65031
+ setSuiteRunNotes,
64943
65032
  getSuiteRunJunitReport,
64944
- getVariablesMap,
64945
65033
  listSuites,
64946
65034
  getSuite,
64947
65035
  loadSuiteTableResources,
64948
65036
  getSuiteDetails,
64949
65037
  runSuite,
65038
+ setSuiteTags,
64950
65039
  waitForSuiteRun,
64951
65040
  listTestRuns,
64952
65041
  getTestRunDetails,
64953
65042
  getTestRunLogs,
64954
65043
  getTestRun,
64955
65044
  stopTestRun,
65045
+ setTestRunTags,
65046
+ setTestRunNotes,
64956
65047
  getTestRunJunitReport,
64957
65048
  listTestRunDebugArtifacts,
64958
65049
  listTests,
@@ -64960,6 +65051,7 @@ export {
64960
65051
  loadTestTableResources,
64961
65052
  getTestDetails,
64962
65053
  runTest,
65054
+ setTestTags,
64963
65055
  waitForTestRun,
64964
65056
  detectFormat,
64965
65057
  exportTest,
@@ -64967,5 +65059,5 @@ export {
64967
65059
  formatErrorMessage,
64968
65060
  showError
64969
65061
  };
64970
- //# sourceMappingURL=chunk-THKXEYLX.js.map
64971
- //# debugId=809b0c55-999e-5bb6-a08b-81bba34a0dc9
65062
+ //# sourceMappingURL=chunk-Q2VWHHIF.js.map
65063
+ //# debugId=76099ed2-f97e-5d85-a9c5-1f6961ded32f
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03b125b9-8603-59a2-ae27-037a7a852604")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6f67254d-fe25-50b8-9beb-c00c0a09bd79")}catch(e){}}();
4
4
  import { createRequire as __nodeCreateRequire } from 'node:module';
5
5
  const require = __nodeCreateRequire(import.meta.url);
6
6
  import {
@@ -23,6 +23,7 @@ import {
23
23
  formatInlineRunReport,
24
24
  getCliConfig,
25
25
  getIdentity,
26
+ getSdk,
26
27
  getSuite,
27
28
  getSuiteRun,
28
29
  getSuiteRunJunitReport,
@@ -48,6 +49,12 @@ import {
48
49
  runSuite,
49
50
  runTest,
50
51
  setSentryTag,
52
+ setSuiteRunNotes,
53
+ setSuiteRunTags,
54
+ setSuiteTags,
55
+ setTestRunNotes,
56
+ setTestRunTags,
57
+ setTestTags,
51
58
  showError,
52
59
  startSentrySpan,
53
60
  stopSuiteRun,
@@ -56,7 +63,7 @@ import {
56
63
  waitForSuiteRun,
57
64
  waitForTestRun,
58
65
  writeReportXml
59
- } from "./chunk-THKXEYLX.js";
66
+ } from "./chunk-Q2VWHHIF.js";
60
67
  import "./chunk-XLIBEETK.js";
61
68
  import "./chunk-3PJ4ZE2N.js";
62
69
  import {
@@ -3596,31 +3603,9 @@ var getExistingRunReportAction = async (runId, opts, adapter) => {
3596
3603
  }
3597
3604
  };
3598
3605
 
3599
- // src/features/suiteRuns/suiteRuns.command.ts
3600
- var SUITE_RUN_ACTION_ADAPTER = {
3601
- kind: "suite",
3602
- runLabel: "suite run",
3603
- getRun: getSuiteRun,
3604
- getJunitReport: getSuiteRunJunitReport,
3605
- stopRun: stopSuiteRun
3606
- };
3607
- var registerSuiteRunShowCommand = (parent, commandName = "show") => parent.command(`${commandName} <runId>`).description("Show suite run details").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the suite report").action(
3608
- (runId, opts) => getExistingRunResultAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
3609
- );
3610
- var registerSuiteRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a suite run").action((runId) => stopExistingRunAction(runId, SUITE_RUN_ACTION_ADAPTER));
3611
- var registerSuiteRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML report for a suite run").option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
3612
- (runId, opts) => getExistingRunReportAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
3613
- );
3614
- var registerSuiteRunsCommand = (program3) => {
3615
- const suiteruns = program3.command("suiteruns").description("Suite run commands");
3616
- registerSuiteRunShowCommand(suiteruns, "show");
3617
- registerSuiteRunStopCommand(suiteruns, "stop");
3618
- registerSuiteRunReportCommand(suiteruns, "report");
3619
- return suiteruns;
3620
- };
3621
-
3622
3606
  // src/utils/runAction.ts
3623
3607
  var collectRunVariableOption = (val, prev = []) => prev.concat(val);
3608
+ var collectTagOption = (val, prev = []) => prev.concat(val);
3624
3609
  var parseTimeoutMinutes = (value) => {
3625
3610
  const minutes = Number(value);
3626
3611
  if (!Number.isFinite(minutes) || minutes <= 0) {
@@ -3648,6 +3633,7 @@ var runResourceAction = async (resourceId, opts, adapter) => {
3648
3633
  }
3649
3634
  const runResult = await adapter.runResource(resourceId, {
3650
3635
  profile: opts.profile,
3636
+ tags: opts.tags?.length ? opts.tags : void 0,
3651
3637
  variables: Object.keys(variables).length ? variables : void 0
3652
3638
  });
3653
3639
  if (mode === "plain") {
@@ -3709,6 +3695,73 @@ var runResourceAction = async (resourceId, opts, adapter) => {
3709
3695
  }
3710
3696
  };
3711
3697
 
3698
+ // src/features/suiteRuns/suiteRuns.command.ts
3699
+ var SUITE_RUN_ACTION_ADAPTER = {
3700
+ kind: "suite",
3701
+ runLabel: "suite run",
3702
+ getRun: getSuiteRun,
3703
+ getJunitReport: getSuiteRunJunitReport,
3704
+ stopRun: stopSuiteRun
3705
+ };
3706
+ var registerSuiteRunShowCommand = (parent, commandName = "show") => parent.command(`${commandName} <runId>`).description("Show suite run details").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the suite report").action(
3707
+ (runId, opts) => getExistingRunResultAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
3708
+ );
3709
+ var registerSuiteRunStopCommand = (parent, commandName = "stop") => parent.command(`${commandName} <runId>`).description("Stop a suite run").action((runId) => stopExistingRunAction(runId, SUITE_RUN_ACTION_ADAPTER));
3710
+ var registerSuiteRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML report for a suite run").option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
3711
+ (runId, opts) => getExistingRunReportAction(runId, opts, SUITE_RUN_ACTION_ADAPTER)
3712
+ );
3713
+ var registerSuiteRunTagsCommand = (parent, commandName = "tags") => {
3714
+ const tags = parent.command(commandName).description("Manage suite run tags");
3715
+ tags.command("set <runId>").description("Replace directly assigned suite run tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (runId, opts) => {
3716
+ const mode = resolveOutputMode();
3717
+ const tagNames = opts.tag ?? [];
3718
+ try {
3719
+ await setSuiteRunTags(runId, tagNames);
3720
+ if (mode === "json") {
3721
+ printJson({ runId, tags: tagNames });
3722
+ } else if (mode === "plain") {
3723
+ process.stdout.write(
3724
+ `Set tags for suite run ${runId}: ${tagNames.join(", ") || "(none)"}
3725
+ `
3726
+ );
3727
+ }
3728
+ } catch (err) {
3729
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
3730
+ exitWith(EXIT_GENERAL_ERROR);
3731
+ }
3732
+ });
3733
+ return tags;
3734
+ };
3735
+ var registerSuiteRunNotesCommand = (parent, commandName = "notes") => {
3736
+ const notes = parent.command(commandName).description("Manage suite run notes");
3737
+ notes.command("set <runId> [notes]").description("Replace suite run notes. Omit notes to clear them.").action(async (runId, value) => {
3738
+ const mode = resolveOutputMode();
3739
+ const runNotes = value ?? null;
3740
+ try {
3741
+ await setSuiteRunNotes(runId, runNotes);
3742
+ if (mode === "json") {
3743
+ printJson({ runId, notes: runNotes });
3744
+ } else if (mode === "plain") {
3745
+ process.stdout.write(`Set notes for suite run ${runId}: ${runNotes ?? "(none)"}
3746
+ `);
3747
+ }
3748
+ } catch (err) {
3749
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
3750
+ exitWith(EXIT_GENERAL_ERROR);
3751
+ }
3752
+ });
3753
+ return notes;
3754
+ };
3755
+ var registerSuiteRunsCommand = (program3) => {
3756
+ const suiteruns = program3.command("suiteruns").description("Suite run commands");
3757
+ registerSuiteRunShowCommand(suiteruns, "show");
3758
+ registerSuiteRunStopCommand(suiteruns, "stop");
3759
+ registerSuiteRunReportCommand(suiteruns, "report");
3760
+ registerSuiteRunTagsCommand(suiteruns, "tags");
3761
+ registerSuiteRunNotesCommand(suiteruns, "notes");
3762
+ return suiteruns;
3763
+ };
3764
+
3712
3765
  // src/features/suites/suites.formatters.tsx
3713
3766
  var suitesListOutputFormatters = {
3714
3767
  toPlain(suites) {
@@ -3765,7 +3818,7 @@ var registerSuiteShowCommand = (parent, commandName = "show") => parent.command(
3765
3818
  exitWith(EXIT_GENERAL_ERROR);
3766
3819
  }
3767
3820
  });
3768
- var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <suiteId>`).description("Execute a test suite by ID").option("-p, --profile <name>", "Profile name to use").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
3821
+ var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <suiteId>`).description("Execute a test suite by ID").option("-p, --profile <name>", "Profile name to use").option("--tag <name>", "Assign a tag to the run (repeatable)", collectTagOption, []).option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
3769
3822
  "--variable <key=value>",
3770
3823
  "Override variables (repeatable)",
3771
3824
  collectRunVariableOption,
@@ -3773,7 +3826,7 @@ var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`$
3773
3826
  ).option("--no-wait", "Queue the run and exit without waiting for completion").option("--timeout <minutes>", "Maximum wait time in minutes", parseTimeoutMinutes).action(
3774
3827
  (suiteId, opts) => runResourceAction(
3775
3828
  suiteId,
3776
- { ...opts, variables: opts.variable ?? [] },
3829
+ { ...opts, tags: opts.tag, variables: opts.variable ?? [] },
3777
3830
  {
3778
3831
  kind: "suite",
3779
3832
  entityLabel: "suite",
@@ -3784,10 +3837,33 @@ var registerSuiteRunCommand = (parent, commandName = "run") => parent.command(`$
3784
3837
  }
3785
3838
  )
3786
3839
  );
3840
+ var registerSuiteTagsCommand = (parent, commandName = "tags") => {
3841
+ const tags = parent.command(commandName).description("Manage suite tags");
3842
+ tags.command("set <suiteId>").description("Replace suite tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (suiteId, opts) => {
3843
+ const mode = resolveOutputMode();
3844
+ const tagNames = opts.tag ?? [];
3845
+ try {
3846
+ await setSuiteTags(suiteId, tagNames);
3847
+ if (mode === "json") {
3848
+ printJson({ suiteId, tags: tagNames });
3849
+ } else if (mode === "plain") {
3850
+ process.stdout.write(
3851
+ `Set tags for suite ${suiteId}: ${tagNames.join(", ") || "(none)"}
3852
+ `
3853
+ );
3854
+ }
3855
+ } catch (err) {
3856
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
3857
+ exitWith(EXIT_GENERAL_ERROR);
3858
+ }
3859
+ });
3860
+ return tags;
3861
+ };
3787
3862
  var registerSuitesCommand = (program3) => {
3788
3863
  const suites = program3.command("suites").description("Test suite commands");
3789
3864
  registerSuiteShowCommand(suites, "show");
3790
3865
  registerSuiteRunCommand(suites, "run");
3866
+ registerSuiteTagsCommand(suites, "tags");
3791
3867
  registerSuitesListCommand(suites, "list");
3792
3868
  return suites;
3793
3869
  };
@@ -3825,12 +3901,56 @@ var registerTestRunStopCommand = (parent, commandName = "stop") => parent.comman
3825
3901
  var registerTestRunReportCommand = (parent, commandName = "report") => parent.command(`${commandName} <runId>`).description("Get JUnit XML report for a test run").option("-o, --output <file>", "Output file path (prints to stdout if omitted)").action(
3826
3902
  (runId, opts) => getExistingRunReportAction(runId, opts, TEST_RUN_ACTION_ADAPTER)
3827
3903
  );
3904
+ var registerTestRunTagsCommand = (parent, commandName = "tags") => {
3905
+ const tags = parent.command(commandName).description("Manage test run tags");
3906
+ tags.command("set <runId>").description("Replace directly assigned test run tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (runId, opts) => {
3907
+ const mode = resolveOutputMode();
3908
+ const tagNames = opts.tag ?? [];
3909
+ try {
3910
+ await setTestRunTags(runId, tagNames);
3911
+ if (mode === "json") {
3912
+ printJson({ runId, tags: tagNames });
3913
+ } else if (mode === "plain") {
3914
+ process.stdout.write(
3915
+ `Set tags for test run ${runId}: ${tagNames.join(", ") || "(none)"}
3916
+ `
3917
+ );
3918
+ }
3919
+ } catch (err) {
3920
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
3921
+ exitWith(EXIT_GENERAL_ERROR);
3922
+ }
3923
+ });
3924
+ return tags;
3925
+ };
3926
+ var registerTestRunNotesCommand = (parent, commandName = "notes") => {
3927
+ const notes = parent.command(commandName).description("Manage test run notes");
3928
+ notes.command("set <runId> [notes]").description("Replace test run notes. Omit notes to clear them.").action(async (runId, value) => {
3929
+ const mode = resolveOutputMode();
3930
+ const runNotes = value ?? null;
3931
+ try {
3932
+ await setTestRunNotes(runId, runNotes);
3933
+ if (mode === "json") {
3934
+ printJson({ runId, notes: runNotes });
3935
+ } else if (mode === "plain") {
3936
+ process.stdout.write(`Set notes for test run ${runId}: ${runNotes ?? "(none)"}
3937
+ `);
3938
+ }
3939
+ } catch (err) {
3940
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
3941
+ exitWith(EXIT_GENERAL_ERROR);
3942
+ }
3943
+ });
3944
+ return notes;
3945
+ };
3828
3946
  var registerTestRunsCommand = (program3) => {
3829
3947
  const testruns = program3.command("testruns").description("Test run commands");
3830
3948
  registerTestRunShowCommand(testruns, "show");
3831
3949
  registerTestRunStopCommand(testruns, "stop");
3832
3950
  registerTestRunLogsCommand(testruns, "logs");
3833
3951
  registerTestRunReportCommand(testruns, "report");
3952
+ registerTestRunTagsCommand(testruns, "tags");
3953
+ registerTestRunNotesCommand(testruns, "notes");
3834
3954
  return testruns;
3835
3955
  };
3836
3956
 
@@ -3888,7 +4008,7 @@ var registerTestShowCommand = (parent, commandName = "show") => parent.command(`
3888
4008
  exitWith(EXIT_GENERAL_ERROR);
3889
4009
  }
3890
4010
  });
3891
- var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <testId>`).description("Execute a test by ID").option("-p, --profile <name>", "Profile name to use").option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
4011
+ var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${commandName} <testId>`).description("Execute a test by ID").option("-p, --profile <name>", "Profile name to use").option("--tag <name>", "Assign a tag to the run (repeatable)", collectTagOption, []).option("--reporter <name>", "Reporter to use: inline or junit", "inline").option("--output-path <path>", "Path to save the test report").option(
3892
4012
  "--variable <key=value>",
3893
4013
  "Override variables (repeatable)",
3894
4014
  collectRunVariableOption,
@@ -3896,7 +4016,7 @@ var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${
3896
4016
  ).option("--no-wait", "Queue the run and exit without waiting for completion").option("--timeout <minutes>", "Maximum wait time in minutes", parseTimeoutMinutes).action(
3897
4017
  (testId, opts) => runResourceAction(
3898
4018
  testId,
3899
- { ...opts, variables: opts.variable ?? [] },
4019
+ { ...opts, tags: opts.tag, variables: opts.variable ?? [] },
3900
4020
  {
3901
4021
  kind: "test",
3902
4022
  entityLabel: "test",
@@ -3907,6 +4027,26 @@ var registerTestRunCommand = (parent, commandName = "run") => parent.command(`${
3907
4027
  }
3908
4028
  )
3909
4029
  );
4030
+ var registerTestTagsCommand = (parent, commandName = "tags") => {
4031
+ const tags = parent.command(commandName).description("Manage test tags");
4032
+ tags.command("set <testId>").description("Replace test tags by name. Omit --tag to clear tags.").option("--tag <name>", "Tag name to assign (repeatable)", collectTagOption, []).action(async (testId, opts) => {
4033
+ const mode = resolveOutputMode();
4034
+ const tagNames = opts.tag ?? [];
4035
+ try {
4036
+ await setTestTags(testId, tagNames);
4037
+ if (mode === "json") {
4038
+ printJson({ testId, tags: tagNames });
4039
+ } else if (mode === "plain") {
4040
+ process.stdout.write(`Set tags for test ${testId}: ${tagNames.join(", ") || "(none)"}
4041
+ `);
4042
+ }
4043
+ } catch (err) {
4044
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
4045
+ exitWith(EXIT_GENERAL_ERROR);
4046
+ }
4047
+ });
4048
+ return tags;
4049
+ };
3910
4050
  var registerTestExportCommand = (parent, commandName = "export") => parent.command(`${commandName} <testId>`).description("Export a single test as YAML or ZIP").option("--format <fmt>", "Output format: yaml or zip", "yaml").option("-o, --output <file>", "Output file path (defaults to bugbug-test-<testId>.<fmt>)").action(async (testId, opts) => {
3911
4051
  const mode = resolveOutputMode();
3912
4052
  try {
@@ -3956,6 +4096,7 @@ var registerTestsCommand = (program3) => {
3956
4096
  const tests = program3.command("tests").description("Test commands");
3957
4097
  registerTestShowCommand(tests, "show");
3958
4098
  registerTestRunCommand(tests, "run");
4099
+ registerTestTagsCommand(tests, "tags");
3959
4100
  registerTestsListCommand(tests, "list");
3960
4101
  registerTestExportCommand(tests, "export");
3961
4102
  registerTestImportCommand(tests, "import");
@@ -4009,6 +4150,46 @@ var registerShorthandCommands = (program3) => {
4009
4150
  registerImportShorthand(program3);
4010
4151
  };
4011
4152
 
4153
+ // src/features/tags/tags.formatters.ts
4154
+ var tagsListOutputFormatters = {
4155
+ toPlain(tags) {
4156
+ return renderTable(
4157
+ tags,
4158
+ [
4159
+ { header: "Id", get: (tag) => tag.id },
4160
+ { header: "Name", get: (tag) => tag.name },
4161
+ { header: "Color", get: (tag) => tag.color },
4162
+ { header: "Tests", get: (tag) => String(tag.testsCount) },
4163
+ { header: "Suites", get: (tag) => String(tag.suitesCount) }
4164
+ ],
4165
+ { emptyMessage: "No tags found." }
4166
+ );
4167
+ },
4168
+ toJson(tags) {
4169
+ return tags;
4170
+ }
4171
+ };
4172
+
4173
+ // src/features/tags/tags.service.ts
4174
+ var listTags = async () => getSdk().tags.getAll();
4175
+
4176
+ // src/features/tags/tags.command.ts
4177
+ var registerTagsListCommand = (parent) => parent.command("list").description("List tags in the active project").action(async () => {
4178
+ const mode = resolveOutputMode();
4179
+ try {
4180
+ const tags = await listTags();
4181
+ await renderOutput(mode, tags, tagsListOutputFormatters);
4182
+ } catch (err) {
4183
+ emitError(mode, { error: err instanceof Error ? err.message : String(err) });
4184
+ exitWith(EXIT_GENERAL_ERROR);
4185
+ }
4186
+ });
4187
+ var registerTagsCommand = (program3) => {
4188
+ const tags = program3.command("tags").description("Project tag commands");
4189
+ registerTagsListCommand(tags);
4190
+ return tags;
4191
+ };
4192
+
4012
4193
  // src/utils/command.ts
4013
4194
  var TRACKED_COMMANDS = {
4014
4195
  "bugbug tests run": "testId",
@@ -4238,6 +4419,7 @@ registerTestsCommand(program2);
4238
4419
  registerTestRunsCommand(program2);
4239
4420
  registerSuitesCommand(program2);
4240
4421
  registerSuiteRunsCommand(program2);
4422
+ registerTagsCommand(program2);
4241
4423
  registerProfilesCommand(program2);
4242
4424
  registerProjectCommand(program2);
4243
4425
  registerAuthCommands(program2);
@@ -4254,7 +4436,7 @@ program2.exitOverride();
4254
4436
  });
4255
4437
  analytics.trackEvent("cli_session_started");
4256
4438
  if (startupMode.type === "commandline" && await shouldRedirectUnauthenticatedCommandToInit(process.argv, hasUsableSession)) {
4257
- const { startNavigator } = await import("./app-HRSH6OZ5.js");
4439
+ const { startNavigator } = await import("./app-FCCURCWQ.js");
4258
4440
  await startNavigator({
4259
4441
  initialRoute: "/init",
4260
4442
  initialRouteState: {
@@ -4266,7 +4448,7 @@ program2.exitOverride();
4266
4448
  return;
4267
4449
  }
4268
4450
  if (startupMode.type === "navigator") {
4269
- const { startNavigator } = await import("./app-HRSH6OZ5.js");
4451
+ const { startNavigator } = await import("./app-FCCURCWQ.js");
4270
4452
  await startNavigator({
4271
4453
  initialRoute: startupMode.route,
4272
4454
  token: config.token,
@@ -4303,4 +4485,4 @@ program2.exitOverride();
4303
4485
  }
4304
4486
  })();
4305
4487
  //# sourceMappingURL=index.js.map
4306
- //# debugId=03b125b9-8603-59a2-ae27-037a7a852604
4488
+ //# debugId=6f67254d-fe25-50b8-9beb-c00c0a09bd79
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bugbug-io/cli",
3
- "version": "14.8.0",
3
+ "version": "14.10.0",
4
4
  "description": "BugBug CLI for test automation, CI workflows, and AI-agent plugin installation",
5
5
  "type": "module",
6
6
  "bin": {