airgate 0.1.7 → 0.1.8

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/airgate.mjs +38 -3
  2. package/package.json +1 -1
package/dist/airgate.mjs CHANGED
@@ -797,6 +797,9 @@ var Api = class {
797
797
  sendVerification() {
798
798
  return this.request("POST", "/v1/auth/verify/send", { body: {} });
799
799
  }
800
+ reportBug(text2, expected, context) {
801
+ return this.request("POST", "/v1/bugs", { body: { text: text2, ...expected ? { expected } : {}, ...context ? { context } : {} } });
802
+ }
800
803
  terminalUrl(id, cols, rows2) {
801
804
  const q = new URLSearchParams({ token: this.tokenForUrl(), cols: String(cols), rows: String(rows2), client: this.client });
802
805
  return `${this.gateway.replace(/^http/, "ws")}/v1/pods/${enc(id)}/terminal?${q}`;
@@ -7380,6 +7383,11 @@ var secrets = {
7380
7383
  import { spawnSync } from "node:child_process";
7381
7384
  import { rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
7382
7385
  import { resolve as resolve4 } from "node:path";
7386
+
7387
+ // src/version.ts
7388
+ var VERSION = "0.1.8";
7389
+
7390
+ // src/commands/team.ts
7383
7391
  async function checkSimilar(ctx, task2) {
7384
7392
  const similar = await ctx.api.similar(task2).catch(() => []);
7385
7393
  if (!similar.length || ctx.json) return { go: true, similar };
@@ -7796,6 +7804,35 @@ var verify = {
7796
7804
  ctx.ui.out(r.sent ? `sent to ${me.user.email}. open the link in it.` : "this gateway can't send email; ask whoever runs it");
7797
7805
  }
7798
7806
  };
7807
+ var bug = {
7808
+ name: "bug",
7809
+ aliases: ["report"],
7810
+ group: "account",
7811
+ usage: '"<what happened>" [--expected "<what you expected>"]',
7812
+ summary: "report a bug: a person reads every report, and you get an email when it changes",
7813
+ example: 'airgate bug "airgate down said the patch was empty after a crew"',
7814
+ notes: [
7815
+ "it sends your words plus the cli version, your OS and node version, and the folder name (never its contents). --no-context sends only your words.",
7816
+ "or pipe a longer report in: airgate bug < report.txt"
7817
+ ],
7818
+ flags: {
7819
+ expected: { type: "string", value: "text", help: "what you expected instead" },
7820
+ "no-context": { type: "boolean", help: "don't send the cli version, OS and folder name" }
7821
+ },
7822
+ async run(ctx) {
7823
+ let text2 = ctx.args.positionals.join(" ").trim();
7824
+ if (!text2 && !ctx.io.stdin.isTTY) {
7825
+ const chunks = [];
7826
+ for await (const c of ctx.io.stdin) chunks.push(Buffer.from(c));
7827
+ text2 = Buffer.concat(chunks).toString("utf8").trim();
7828
+ }
7829
+ if (text2.length < 5) throw new UsageError('airgate bug "<what happened>"', 'a sentence is enough; add --expected "<what you expected>"');
7830
+ const context = bool(ctx.args, "no-context") ? void 0 : { cli: VERSION, os: `${process.platform} ${process.arch}`, node: process.version, folder: ctx.io.cwd.split("/").pop() ?? "" };
7831
+ const r = await ctx.api.reportBug(text2.slice(0, 8e3), str(ctx.args, "expected"), context);
7832
+ if (ctx.json) return ctx.ui.json(r);
7833
+ ctx.ui.out(`${ctx.ui.c("ok", "reported")} ${r.bug.id}. a person reads it; you get an email when it changes.`);
7834
+ }
7835
+ };
7799
7836
 
7800
7837
  // src/commands/pods.ts
7801
7838
  import { execFileSync } from "node:child_process";
@@ -8352,9 +8389,6 @@ var log = {
8352
8389
  // src/commands/mcp.ts
8353
8390
  import { createInterface } from "node:readline";
8354
8391
 
8355
- // src/version.ts
8356
- var VERSION = "0.1.7";
8357
-
8358
8392
  // src/commands/updown.ts
8359
8393
  import { appendFileSync, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync5, realpathSync as realpathSync2, statSync as statSync2, writeFileSync as writeFileSync4 } from "node:fs";
8360
8394
  import { homedir as homedir2 } from "node:os";
@@ -12684,6 +12718,7 @@ var COMMANDS = [
12684
12718
  reset,
12685
12719
  deleteAccount,
12686
12720
  verify,
12721
+ bug,
12687
12722
  team,
12688
12723
  github,
12689
12724
  pods,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airgate",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Give your AI its own computer: the airgate command line.",
5
5
  "type": "module",
6
6
  "bin": {