trantor 0.18.13 → 0.18.14

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": "trantor",
3
- "version": "0.18.13",
3
+ "version": "0.18.14",
4
4
  "description": "Trantor \u2014 the hub-world for AI agent crews: live message bus, presence, project Kanban/flow board + crew orchestration for independent AI coding agents (Claude, Codex, Gemini, Kimi, DeepSeek)",
5
5
  "mcpServers": {
6
6
  "relay": {
package/lib/balances.mjs CHANGED
@@ -120,7 +120,22 @@ export async function fetchBalances(env = process.env, opts = {}) {
120
120
  try { return { ...base, ok: true, ...(await a.fetch(env[envKey])) }; }
121
121
  catch (e) { return { ...base, ok: false, error: String(e?.message || e) }; }
122
122
  });
123
- return (await Promise.all(jobs)).filter(Boolean);
123
+ const rows = (await Promise.all(jobs)).filter(Boolean);
124
+ // Codex has no balance API to query — it authenticates by `codex login` and bills a
125
+ // subscription. The fleet list must still show it, honestly, or the header reads as if the
126
+ // seat does not exist. Evidence of configuration is the login artifact, not an env key.
127
+ if (!only || only.has("codex") || only.has("openai")) {
128
+ try {
129
+ const { existsSync } = await import("node:fs");
130
+ const { join } = await import("node:path");
131
+ const { homedir } = await import("node:os");
132
+ if (existsSync(join(homedir(), ".codex", "auth.json"))) {
133
+ rows.push({ provider: "codex", label: "Codex", kind: "subscription", via: "codex login",
134
+ ok: true, plan: "OpenAI subscription", note: "no balance API — flat subscription" });
135
+ }
136
+ } catch { /* no fs access → no row, never an error */ }
137
+ }
138
+ return rows;
124
139
  }
125
140
 
126
141
  // human one-liner for a credit entry (CLI + warning line)
@@ -131,6 +146,7 @@ export function fmtBalance(e) {
131
146
  const reset = e.resetTime ? ` · resets ${fmtReset(e.resetTime)}` : "";
132
147
  return `${e.label}${e.plan ? " (" + e.plan + ")" : ""}: ${e.remainingPct}% left${reset}`;
133
148
  }
149
+ if (e.kind === "subscription") return `${e.label}: ${e.plan || "subscription"} (${e.note || "no balance API"})`;
134
150
  const sym = e.currency === "CNY" ? "¥" : e.currency === "EUR" ? "€" : "$";
135
151
  if (e.unlimited || e.remaining == null) return `${e.label}: ${e.kind === "prepaid" ? "no limit / unknown" : e.kind}`;
136
152
  const amt = e.remaining.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.13",
3
+ "version": "0.18.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "trantor": "bin/cli.mjs"