@mtreeai/msapling-cli 2.3.6-beta.53 → 2.3.6-beta.55

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 +21 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11880,19 +11880,10 @@ ${next.prompt}`
11880
11880
  }
11881
11881
  const journal = this.journal;
11882
11882
  let backendReachable = false;
11883
- let connectionTimeout = null;
11884
11883
  const controller = new AbortController();
11885
- let timedOut = false;
11886
11884
  try {
11887
- connectionTimeout = setTimeout(() => {
11888
- timedOut = true;
11889
- controller.abort();
11890
- }, 3e3);
11891
11885
  const backendStream = this.client.streamChat(params, controller.signal);
11892
11886
  for await (const chunk of backendStream) {
11893
- if (connectionTimeout) {
11894
- clearTimeout(connectionTimeout);
11895
- }
11896
11887
  backendReachable = true;
11897
11888
  yield chunk;
11898
11889
  }
@@ -11901,7 +11892,7 @@ ${next.prompt}`
11901
11892
  await this.onAuthFailure?.(error);
11902
11893
  throw error;
11903
11894
  }
11904
- const isAbortTimeout = timedOut || error?.name === "AbortError" && controller.signal.aborted;
11895
+ const isAbortTimeout = error?.status === 408 || error?.code === "timeout";
11905
11896
  const isNetworkError = isAbortTimeout || error?.code === "ECONNREFUSED" || error?.code === "ECONNRESET" || error?.code === "ETIMEDOUT" || error?.status >= 500;
11906
11897
  if (!isNetworkError) {
11907
11898
  throw error;
@@ -11916,14 +11907,18 @@ ${next.prompt}`
11916
11907
  };
11917
11908
  return;
11918
11909
  }
11919
- yield* this.streamLocal(chatId, userMessage, params, null, {
11920
- failIfUnavailable: false
11921
- });
11922
- return;
11923
- } finally {
11924
- if (connectionTimeout) {
11925
- clearTimeout(connectionTimeout);
11910
+ try {
11911
+ yield* this.streamLocal(chatId, userMessage, params, null, {
11912
+ failIfUnavailable: false
11913
+ });
11914
+ } catch (fallbackError) {
11915
+ const detail = fallbackError instanceof Error ? fallbackError.message : String(fallbackError);
11916
+ throw new Error(
11917
+ `Remote backend unavailable; local fallback failed: ${detail}`,
11918
+ { cause: fallbackError }
11919
+ );
11926
11920
  }
11921
+ return;
11927
11922
  }
11928
11923
  if (backendReachable && this.pendingSyncMaybeNeeded) {
11929
11924
  const pending = await journal.journalListPending();
@@ -16102,6 +16097,9 @@ var init_projectSettings = __esm({
16102
16097
  function resetModelCatalogCache() {
16103
16098
  catalogCache = /* @__PURE__ */ new WeakMap();
16104
16099
  }
16100
+ function modelPickerReadyMessage(_secretUrl) {
16101
+ return "Model picker opened in your browser (expires in five minutes).";
16102
+ }
16105
16103
  function price(value) {
16106
16104
  if (value === void 0 || value === null || value === "") return "?";
16107
16105
  const n2 = typeof value === "string" ? Number.parseFloat(value) : value;
@@ -16235,7 +16233,9 @@ var init_model = __esm({
16235
16233
  contextLength: model2.context_length ?? null
16236
16234
  }));
16237
16235
  const selected = context.pickModel ? await context.pickModel(pickerRows, current) : await openModelPicker(pickerRows, current, {
16238
- onReady: (url) => context.addMessage("system", `Model picker: ${url}`)
16236
+ // The URL fragment contains the one-time API credential. The
16237
+ // browser receives it directly; never persist it in chat logs.
16238
+ onReady: (url) => context.addMessage("system", modelPickerReadyMessage(url))
16239
16239
  });
16240
16240
  if (!selected) {
16241
16241
  context.addMessage("system", "Model selection cancelled or expired.");
@@ -18604,7 +18604,7 @@ var init_version = __esm({
18604
18604
  description: "Show version information for CLI and core packages",
18605
18605
  category: "debug",
18606
18606
  handler: async (_args, context) => {
18607
- const cliVersion = true ? "2.3.6-beta.53" : "(dev)";
18607
+ const cliVersion = true ? "2.3.6-beta.55" : "(dev)";
18608
18608
  const coreVersion = true ? "2.3.6-beta.43" : "(dev)";
18609
18609
  const runtime = process.version;
18610
18610
  context.addMessage("system", "MSapling Version Info");
@@ -18613,7 +18613,7 @@ var init_version = __esm({
18613
18613
  context.addMessage("system", row2("Core (@msapling/core)", coreVersion));
18614
18614
  context.addMessage("system", row2("Runtime (Node/Bun)", runtime));
18615
18615
  try {
18616
- const ts = "2026-08-12T03:02:20.879Z";
18616
+ const ts = "2026-08-12T06:20:51.782Z";
18617
18617
  if (ts && ts !== "__BUILD_TIMESTAMP__") {
18618
18618
  context.addMessage("system", row2("Build Timestamp", ts));
18619
18619
  }
@@ -23127,7 +23127,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
23127
23127
  var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
23128
23128
  /* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
23129
23129
  "\u25CF MSapling CLI v",
23130
- "2.3.6-beta.53"
23130
+ "2.3.6-beta.55"
23131
23131
  ] }),
23132
23132
  /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
23133
23133
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtreeai/msapling-cli",
3
- "version": "2.3.6-beta.53",
3
+ "version": "2.3.6-beta.55",
4
4
  "description": "MSapling CLI — React/Ink terminal client for the MSapling backend (chat, projects, MDrive, agent tools). Proprietary; redistribution prohibited.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "MSapling Team",