@getgavel/cli 0.1.29 → 0.1.31

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,6 +1,6 @@
1
1
  {
2
2
  "name": "gavel",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "displayName": "Gavel",
5
5
  "description": "Gavel in Claude Code: your person's chat in Gavel reaches your sessions at once (Gavel's bridge, started with each session), the end-of-turn reminder of what's waiting for you, and how to work with Gavel.",
6
6
  "author": { "name": "Gavel", "url": "https://getgavel.ai" },
@@ -22,13 +22,17 @@ export function claudeSignIn(file, folder, native) {
22
22
  return null;
23
23
  const type = String(account.organizationType ?? "");
24
24
  const limit = String(account.userRateLimitTier ?? "");
25
- const tier = type === "claude_max" ? (/20x/.test(limit) ? "Max 20x" : "Max 5x")
26
- : type === "claude_pro" ? "Pro"
27
- : type === "claude_enterprise" ? "Enterprise"
28
- : null;
25
+ // Anthropic's names since Nov 1, 2026: Max (was 5x) and Ultra (was 20x). planDisplayName says which when
26
+ // it names one Gavel knows; else 20x in either rate-limit tier is Ultra, and any other Max is Max.
27
+ const named = String(account.planDisplayName ?? "").trim().toLowerCase();
28
+ const tier = /^(ultra|max|pro)$/.test(named) && type !== "claude_team" && type !== "claude_enterprise" ? named[0].toUpperCase() + named.slice(1)
29
+ : type === "claude_max" ? (/20x/.test(`${account.organizationRateLimitTier ?? ""} ${limit}`) ? "Ultra" : "Max")
30
+ : type === "claude_pro" ? "Pro"
31
+ : type === "claude_enterprise" ? "Enterprise"
32
+ : null;
29
33
  // A Team seat with Max limits is Premium; otherwise it doesn't say whether it's Standard or Premium.
30
34
  const team = type === "claude_team" ? (/max/.test(limit) ? "Team Premium" : null) : undefined;
31
- const choices = type === "claude_team" ? (team ? [] : ["Team", "Team Premium"]) : tier ? [] : ["Pro", "Max 5x", "Max 20x", "Team", "Team Premium", "Enterprise"];
35
+ const choices = type === "claude_team" ? (team ? [] : ["Team", "Team Premium"]) : tier ? [] : ["Pro", "Max", "Ultra", "Team", "Team Premium", "Enterprise"];
32
36
  return {
33
37
  provider: "anthropic", key: hash("claude", account.accountUuid, typeof account.organizationUuid === "string" ? account.organizationUuid : ""),
34
38
  tier: team ?? tier, choices, domain: domainOf(account.emailAddress),
@@ -55,10 +59,10 @@ export function codexSignIn(folder, native) {
55
59
  if (!account)
56
60
  return null;
57
61
  const plan = String(auth.chatgpt_plan_type ?? "");
58
- const tier = plan === "plus" ? "Plus" : plan === "pro" ? "Pro" : plan === "team" || plan === "business" ? "Business" : plan === "enterprise" ? "Enterprise" : null;
62
+ const tier = plan === "plus" ? "Plus" : plan === "pro" ? "Pro 200" : plan === "promax" ? "Pro 500" : plan === "team" || plan === "business" ? "Business" : plan === "enterprise" ? "Enterprise" : null;
59
63
  return {
60
64
  provider: "openai", key: hash("codex", account, typeof auth.chatgpt_user_id === "string" ? auth.chatgpt_user_id : ""),
61
- tier, choices: tier ? [] : ["Plus", "Pro", "Business", "Enterprise"], domain: domainOf(claims.email), org: null, folder, native,
65
+ tier, choices: tier ? [] : ["Plus", "Pro 100", "Pro 200", "Pro 500", "Business", "Enterprise"], domain: domainOf(claims.email), org: null, folder, native,
62
66
  };
63
67
  }
64
68
  // Every sign-in on this machine: the native ones, and each of Gavel's own profile folders.
@@ -172,6 +176,10 @@ export async function connectAccounts(local, options, io) {
172
176
  say("No Claude Code or Codex sign-in on this machine. Sign in to either, or run gavel connect --add claude (or codex).");
173
177
  return 1;
174
178
  }
179
+ if (options.label !== undefined && signIns.length !== 1) {
180
+ say(`--label names one account, and this machine has ${signIns.length}: connect them without it, then name each in Settings › You › Your accounts.`);
181
+ return 1;
182
+ }
175
183
  const machineId = planMachine(local.home, true);
176
184
  if (!machineId)
177
185
  throw new Error("This machine's Gavel ID couldn't be read.");
@@ -182,8 +190,8 @@ export async function connectAccounts(local, options, io) {
182
190
  const items = [];
183
191
  for (const signIn of signIns) {
184
192
  const tier = signIn.tier ?? (options.tier && signIn.choices.includes(options.tier) ? options.tier : await askTier(local, signIn, ask));
185
- const label = `${product(signIn.provider)} ${tier}${signIn.org ? ` · ${signIn.org}` : signIn.domain ? ` (${signIn.domain})` : ""}`;
186
- items.push({ signIn, body: { planId: ids.find((id) => known(id) === signIn.key) ?? null, provider: signIn.provider, tier, label, domain: signIn.domain } });
193
+ const label = options.label ?? `${product(signIn.provider)} ${tier}${signIn.org ? ` · ${signIn.org}` : signIn.domain ? ` (${signIn.domain})` : ""}`;
194
+ items.push({ signIn, body: { planId: ids.find((id) => known(id) === signIn.key) ?? null, provider: signIn.provider, tier, label, domain: signIn.domain, ...(options.label !== undefined ? { named: true } : {}) } });
187
195
  }
188
196
  const res = await http(`${base}/v1/plans/connect`, {
189
197
  method: "POST", headers: { "content-type": "application/json" },
@@ -212,7 +220,7 @@ export async function connectAccounts(local, options, io) {
212
220
  const match = matchAccount(signIn, tier, accounts, known);
213
221
  const name = `${product(signIn.provider)} ${tier}${signIn.org ? ` · ${signIn.org}` : signIn.domain ? ` (${signIn.domain})` : ""}`;
214
222
  const body = {
215
- provider: signIn.provider, tier, label: match?.label ?? name,
223
+ provider: signIn.provider, tier, label: options.label ?? match?.label ?? name,
216
224
  // An account's own price stays; the list price is Gavel's to say.
217
225
  monthlyCents: match && match.monthlyCents !== match.listCents && !match.seatId ? match.monthlyCents : null,
218
226
  ...(signIn.domain ? { domain: signIn.domain } : {}),
package/dist/gavel.js CHANGED
@@ -33,7 +33,7 @@ const USAGE = `gavel: Gavel from the command line (https://getgavel.ai/agents)
33
33
  what's waiting for you in Gavel, in one line, or nothing;
34
34
  --hook answers as that software's end-of-turn hook (run by
35
35
  the hook, not by hand); always exits 0
36
- gavel connect [--code <code>] [--add claude|codex] [--tier <plan>] [--server <name>]
36
+ gavel connect [--code <code>] [--add claude|codex] [--tier <plan>] [--label <name>] [--server <name>]
37
37
  the Claude Code and Codex sign-ins on this machine become
38
38
  your accounts in Gavel, once (D-1349), with the one-time
39
39
  code from Settings › You › Your accounts (from any folder,
@@ -77,7 +77,7 @@ const USAGE = `gavel: Gavel from the command line (https://getgavel.ai/agents)
77
77
  gavel revise <D-12> --file decision.json a draft the editor sent back, fixed (the whole ask again)
78
78
  gavel todo --file todo.json ask a person to do something: title, steps, why (MCP ask_to_do's input)
79
79
  gavel get <D-12>
80
- gavel subscribe (<D-12> | --item <W-12> [--stop true] | --quiet answer,decision|none)
80
+ gavel subscribe (<D-12> | --item <W-12> [--stop true] | --column Queued [--stop true] | --quiet answer,decision|none)
81
81
  follow a decision you didn't ask (wait returns its answer
82
82
  to you too), or a work item: what happens to it wakes you;
83
83
  --stop true stops following the item; --quiet: answers to
@@ -324,14 +324,14 @@ const FLAGS = {
324
324
  waiting: ["hook", "server", "file"],
325
325
  bridge: ["harness", "server"],
326
326
  plans: ["plan", "claim", "server"],
327
- connect: ["add", "tier", "server", "code"],
327
+ connect: ["add", "tier", "server", "code", "label"],
328
328
  "actions-env": [],
329
329
  search: ["query", "area", "status", "limit"],
330
330
  ask: ["file"],
331
331
  revise: ["file"],
332
332
  todo: ["file"],
333
333
  get: [],
334
- subscribe: ["item", "stop", "quiet"],
334
+ subscribe: ["item", "column", "stop", "quiet"],
335
335
  wait: ["timeout"],
336
336
  withdraw: ["reason"],
337
337
  attach: ["file"],
@@ -1089,7 +1089,7 @@ export function toRequest(argv) {
1089
1089
  upTo(0);
1090
1090
  if (f.add !== undefined && f.add !== "claude" && f.add !== "codex")
1091
1091
  throw new UsageError("--add takes claude or codex");
1092
- return { connect: { ...(f.add ? { add: f.add } : {}), ...(f.tier ? { tier: f.tier } : {}), ...(f.server ? { server: f.server } : {}), ...(f.code ? { code: f.code } : {}) } };
1092
+ return { connect: { ...(f.add ? { add: f.add } : {}), ...(f.tier ? { tier: f.tier } : {}), ...(f.server ? { server: f.server } : {}), ...(f.code ? { code: f.code } : {}), ...(f.label !== undefined ? { label: f.label } : {}) } };
1093
1093
  }
1094
1094
  case "plans":
1095
1095
  upTo(1);
@@ -1170,6 +1170,11 @@ export function toRequest(argv) {
1170
1170
  }
1171
1171
  if (f.stop !== undefined && f.stop !== "true" && f.stop !== "false")
1172
1172
  throw new UsageError("--stop is true or false");
1173
+ if (f.column !== undefined) {
1174
+ if (p.length || f.item !== undefined)
1175
+ throw new UsageError("give one: a decision, --item or --column");
1176
+ return { method: f.stop === "true" ? "DELETE" : "POST", path: `/v1/work/columns/${encodeURIComponent(f.column)}/follow` };
1177
+ }
1173
1178
  if (f.item === undefined) {
1174
1179
  if (f.stop !== undefined)
1175
1180
  throw new UsageError("--stop goes with --item: following a decision ends with its answer");
@@ -1935,7 +1940,9 @@ export function wakeLine(item) {
1935
1940
  case "task":
1936
1941
  return item.type === "ready"
1937
1942
  ? `GAVEL_WAKE task ${item.ref} ready: what it waited on is finished: gavel work show ${item.ref}`
1938
- : `GAVEL_WAKE task ${item.ref} ${item.type ?? "changed"} by someone else: gavel work show ${item.ref}`;
1943
+ : item.type === "new"
1944
+ ? `GAVEL_WAKE task ${item.ref} new in a column you follow, with no one on it: gavel work show ${item.ref}, then give it to a free builder`
1945
+ : `GAVEL_WAKE task ${item.ref} ${item.type ?? "changed"} by someone else: gavel work show ${item.ref}`;
1939
1946
  case "replaced":
1940
1947
  return `GAVEL_WAKE replaced ${item.ref}: it no longer holds, ${item.type ?? "a newer decision"} replaces it: gavel get ${item.type ?? item.ref}, and follow that one`;
1941
1948
  case "budget":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getgavel/cli",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "The gavel command: an agent's Gavel from a shell (pair, ask, wait, watch and the rest)",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://getgavel.ai/agents",