@runalabs/rill-cli 0.1.8 → 0.1.9

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 (2) hide show
  1. package/dist/cli.js +8 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -15448,6 +15448,9 @@ var ControlPlaneClient = class {
15448
15448
  // src/analytics.ts
15449
15449
  var commandCategories = /* @__PURE__ */ new Map([
15450
15450
  ["doctor", "doctor"],
15451
+ ["record", "cloud_record"],
15452
+ ["run status", "cloud_run_status"],
15453
+ ["run cancel", "cloud_run_cancel"],
15451
15454
  ["record start", "record_start"],
15452
15455
  ["record stop", "record_stop"],
15453
15456
  ["record status", "record_status"],
@@ -15797,6 +15800,7 @@ var record2 = program.command("record").description("Run a cloud browser from a
15797
15800
  const options = program.opts();
15798
15801
  const token = await loadCredential(options.apiUrl) ?? await authorize(true);
15799
15802
  const client = new ControlPlaneClient(options.apiUrl, token);
15803
+ if (!activeTelemetry) await startCliTelemetry(client, "cloud_record");
15800
15804
  const id = commandOptions.id ?? crypto.randomUUID();
15801
15805
  process.stderr.write(`Run ID: ${id}
15802
15806
  `);
@@ -15961,11 +15965,14 @@ program.hook("preAction", async (_command, actionCommand) => {
15961
15965
  const token = await loadCredential(options.apiUrl).catch(() => null);
15962
15966
  if (!token) return;
15963
15967
  const client = new ControlPlaneClient(options.apiUrl, token);
15968
+ await startCliTelemetry(client, command);
15969
+ });
15970
+ async function startCliTelemetry(client, command) {
15964
15971
  const session = await client.agentSession().catch(() => null);
15965
15972
  if (!session?.analyticsEnabled) return;
15966
15973
  activeTelemetry = { client, command, startedAt: Date.now() };
15967
15974
  await client.reportCliCommand({ phase: "started", command, cliVersion: CLI_VERSION, os: process.platform, arch: process.arch }).catch(() => void 0);
15968
- });
15975
+ }
15969
15976
  program.hook("postAction", async () => {
15970
15977
  await finishCliTelemetry(process.exitCode ? new Error("command_reported_failure: Command returned a failure status.") : null);
15971
15978
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runalabs/rill-cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Record, inspect, and share agent-controlled browser runs with Rill.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {