@mtreeai/msapling-cli 2.3.6-beta.10 → 2.3.6-beta.11

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 +35 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10391,6 +10391,37 @@ var init_outputStyle = __esm({
10391
10391
  }
10392
10392
  });
10393
10393
 
10394
+ // src/commands/totp.ts
10395
+ var totpCommand;
10396
+ var init_totp = __esm({
10397
+ "src/commands/totp.ts"() {
10398
+ "use strict";
10399
+ init_esm_shims();
10400
+ totpCommand = {
10401
+ name: "totp",
10402
+ args: "<code>",
10403
+ description: "Step up the current session with a 6-digit TOTP code",
10404
+ category: "auth",
10405
+ handler: async (args2, context) => {
10406
+ const code = (args2[0] || "").trim();
10407
+ if (!/^\d{6}$/.test(code)) {
10408
+ context.addMessage("error", "Usage: /totp <6-digit code>");
10409
+ return;
10410
+ }
10411
+ try {
10412
+ const result = await context.client.verifyLoginTotp(code);
10413
+ await context.storage.saveToken(result.token);
10414
+ context.client.setToken(result.token);
10415
+ await context.refreshOverview();
10416
+ context.addMessage("system", "TOTP verified \u2014 session now fully authenticated.");
10417
+ } catch (err) {
10418
+ context.addMessage("error", `TOTP verification failed: ${err}`);
10419
+ }
10420
+ }
10421
+ };
10422
+ }
10423
+ });
10424
+
10394
10425
  // src/commands/index.ts
10395
10426
  var commands_exports = {};
10396
10427
  __export(commands_exports, {
@@ -10438,6 +10469,7 @@ var init_commands = __esm({
10438
10469
  init_note();
10439
10470
  init_todo();
10440
10471
  init_outputStyle();
10472
+ init_totp();
10441
10473
  commands = [
10442
10474
  loginCommand,
10443
10475
  unlockCommand,
@@ -10470,7 +10502,8 @@ var init_commands = __esm({
10470
10502
  planCommand,
10471
10503
  noteCommand,
10472
10504
  todoCommand,
10473
- outputStyleCommand
10505
+ outputStyleCommand,
10506
+ totpCommand
10474
10507
  ];
10475
10508
  }
10476
10509
  });
@@ -13255,7 +13288,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
13255
13288
  var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
13256
13289
  /* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
13257
13290
  "\u25CF MSapling CLI v",
13258
- "2.3.6-beta.10"
13291
+ "2.3.6-beta.11"
13259
13292
  ] }),
13260
13293
  /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
13261
13294
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtreeai/msapling-cli",
3
- "version": "2.3.6-beta.10",
3
+ "version": "2.3.6-beta.11",
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",