@mtreeai/msapling-cli 2.3.6-beta.33 → 2.3.6-beta.34

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/index.js +16 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11279,15 +11279,18 @@ var init_usage = __esm({
11279
11279
  context.addMessage("system", JSON.stringify(user, null, 2));
11280
11280
  return;
11281
11281
  }
11282
+ const n = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
11283
+ const $ = (v) => "$" + n(v).toFixed(4);
11284
+ const k = (v) => n(v).toLocaleString();
11282
11285
  context.addMessage("system", "MSapling Usage Dashboard:");
11283
- context.addMessage("system", ` - Fuel Credits: $${user.fuel_credits.toFixed(4)}`);
11286
+ context.addMessage("system", ` - Fuel Credits: ${$(user.fuel_credits)}`);
11284
11287
  context.addMessage("system", ` - Daily Spending Limit: ${user.monthly_spending_limit ? "$" + user.monthly_spending_limit : "Unlimited"}`);
11285
11288
  context.addMessage("system", "\n[TRACK BREAKDOWN]");
11286
- context.addMessage("system", ` - BYOK: ${user.tokens_byok.toLocaleString()} tokens ($${user.cost_byok.toFixed(4)})`);
11287
- context.addMessage("system", ` - Ollama: ${user.tokens_ollama.toLocaleString()} tokens ($${user.cost_ollama.toFixed(4)})`);
11288
- context.addMessage("system", ` - Purchased: ${user.tokens_purchased.toLocaleString()} tokens ($${user.cost_purchased.toFixed(4)})`);
11289
- context.addMessage("system", ` - Subscription: ${user.tokens_subscription.toLocaleString()} tokens ($${user.cost_subscription.toFixed(4)})`);
11290
- context.addMessage("system", ` - Free: ${user.tokens_free.toLocaleString()} tokens ($${user.cost_free.toFixed(4)})`);
11289
+ context.addMessage("system", ` - BYOK: ${k(user.tokens_byok)} tokens (${$(user.cost_byok)})`);
11290
+ context.addMessage("system", ` - Ollama: ${k(user.tokens_ollama)} tokens (${$(user.cost_ollama)})`);
11291
+ context.addMessage("system", ` - Purchased: ${k(user.tokens_purchased)} tokens (${$(user.cost_purchased)})`);
11292
+ context.addMessage("system", ` - Subscription: ${k(user.tokens_subscription)} tokens (${$(user.cost_subscription)})`);
11293
+ context.addMessage("system", ` - Free: ${k(user.tokens_free)} tokens (${$(user.cost_free)})`);
11291
11294
  } catch (e) {
11292
11295
  context.addMessage("error", `Failed to fetch usage: ${e.message}`);
11293
11296
  }
@@ -12367,7 +12370,7 @@ var init_version = __esm({
12367
12370
  description: "Show version information for CLI and core packages",
12368
12371
  category: "debug",
12369
12372
  handler: async (_args, context) => {
12370
- const cliVersion = true ? "2.3.6-beta.33" : "(dev)";
12373
+ const cliVersion = true ? "2.3.6-beta.34" : "(dev)";
12371
12374
  const coreVersion = true ? "2.3.2" : "(dev)";
12372
12375
  const runtime = process.version;
12373
12376
  context.addMessage("system", "MSapling Version Info");
@@ -12376,7 +12379,7 @@ var init_version = __esm({
12376
12379
  context.addMessage("system", row2("Core (@msapling/core)", coreVersion));
12377
12380
  context.addMessage("system", row2("Runtime (Node/Bun)", runtime));
12378
12381
  try {
12379
- const ts = "2026-06-02T15:10:02.869Z";
12382
+ const ts = "2026-06-02T15:12:47.326Z";
12380
12383
  if (ts && ts !== "__BUILD_TIMESTAMP__") {
12381
12384
  context.addMessage("system", row2("Build Timestamp", ts));
12382
12385
  }
@@ -17893,7 +17896,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
17893
17896
  var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
17894
17897
  /* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
17895
17898
  "\u25CF MSapling CLI v",
17896
- "2.3.6-beta.33"
17899
+ "2.3.6-beta.34"
17897
17900
  ] }),
17898
17901
  /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
17899
17902
  ] });
@@ -18901,11 +18904,13 @@ function handleCliArgs(args2) {
18901
18904
  (async () => {
18902
18905
  const { runExec: runExec2 } = await Promise.resolve().then(() => (init_exec(), exec_exports));
18903
18906
  const exitCode = await runExec2(cmdStr);
18904
- process.exit(exitCode);
18907
+ process.exitCode = exitCode;
18908
+ setTimeout(() => process.exit(exitCode), 50).unref();
18905
18909
  })().catch((e) => {
18906
18910
  process.stderr.write(`[msapling-exec] fatal: ${e?.message ?? e}
18907
18911
  `);
18908
- process.exit(1);
18912
+ process.exitCode = 1;
18913
+ setTimeout(() => process.exit(1), 50).unref();
18909
18914
  });
18910
18915
  return false;
18911
18916
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtreeai/msapling-cli",
3
- "version": "2.3.6-beta.33",
3
+ "version": "2.3.6-beta.34",
4
4
  "description": "MSapling CLI — React/Ink terminal client for the MSapling backend (chat, projects, MDrive, agent tools). Proprietary; redistribution prohibited.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "MSapling Team",