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

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 +15 -20
  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();
@@ -18604,7 +18599,7 @@ var init_version = __esm({
18604
18599
  description: "Show version information for CLI and core packages",
18605
18600
  category: "debug",
18606
18601
  handler: async (_args, context) => {
18607
- const cliVersion = true ? "2.3.6-beta.53" : "(dev)";
18602
+ const cliVersion = true ? "2.3.6-beta.54" : "(dev)";
18608
18603
  const coreVersion = true ? "2.3.6-beta.43" : "(dev)";
18609
18604
  const runtime = process.version;
18610
18605
  context.addMessage("system", "MSapling Version Info");
@@ -18613,7 +18608,7 @@ var init_version = __esm({
18613
18608
  context.addMessage("system", row2("Core (@msapling/core)", coreVersion));
18614
18609
  context.addMessage("system", row2("Runtime (Node/Bun)", runtime));
18615
18610
  try {
18616
- const ts = "2026-08-12T03:02:20.879Z";
18611
+ const ts = "2026-08-12T06:13:46.315Z";
18617
18612
  if (ts && ts !== "__BUILD_TIMESTAMP__") {
18618
18613
  context.addMessage("system", row2("Build Timestamp", ts));
18619
18614
  }
@@ -23127,7 +23122,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
23127
23122
  var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
23128
23123
  /* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
23129
23124
  "\u25CF MSapling CLI v",
23130
- "2.3.6-beta.53"
23125
+ "2.3.6-beta.54"
23131
23126
  ] }),
23132
23127
  /* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
23133
23128
  ] });
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.54",
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",