@mtreeai/msapling-cli 2.3.6-beta.26 → 2.3.6-beta.27
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.
- package/dist/index.js +30 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59,6 +59,28 @@ __export(src_exports, {
|
|
|
59
59
|
MSaplingClient: () => MSaplingClient,
|
|
60
60
|
MSaplingError: () => MSaplingError
|
|
61
61
|
});
|
|
62
|
+
function normalizeDetail(detail) {
|
|
63
|
+
if (detail == null) return "";
|
|
64
|
+
if (typeof detail === "string") return detail;
|
|
65
|
+
if (Array.isArray(detail)) {
|
|
66
|
+
return detail.map((d) => {
|
|
67
|
+
if (!d || typeof d !== "object") return String(d);
|
|
68
|
+
const o = d;
|
|
69
|
+
const loc = Array.isArray(o.loc) ? o.loc.join(".") : "";
|
|
70
|
+
return [o.msg, loc && `(${loc})`].filter(Boolean).join(" ");
|
|
71
|
+
}).filter(Boolean).join("; ");
|
|
72
|
+
}
|
|
73
|
+
if (typeof detail === "object") {
|
|
74
|
+
const o = detail;
|
|
75
|
+
if (typeof o.msg === "string") return o.msg;
|
|
76
|
+
try {
|
|
77
|
+
return JSON.stringify(detail);
|
|
78
|
+
} catch {
|
|
79
|
+
return String(detail);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return String(detail);
|
|
83
|
+
}
|
|
62
84
|
var MSaplingError, MSaplingClient;
|
|
63
85
|
var init_src = __esm({
|
|
64
86
|
"../api-client/src/index.ts"() {
|
|
@@ -143,7 +165,7 @@ var init_src = __esm({
|
|
|
143
165
|
let code = "unknown";
|
|
144
166
|
try {
|
|
145
167
|
const err = await response.json();
|
|
146
|
-
detail = err.detail || detail;
|
|
168
|
+
detail = normalizeDetail(err.detail) || detail;
|
|
147
169
|
code = err.code || code;
|
|
148
170
|
} catch (e) {
|
|
149
171
|
}
|
|
@@ -771,7 +793,10 @@ var init_src = __esm({
|
|
|
771
793
|
}
|
|
772
794
|
if (!response.ok) {
|
|
773
795
|
const err = await response.json().catch(() => ({ detail: response.statusText }));
|
|
774
|
-
throw new MSaplingError(
|
|
796
|
+
throw new MSaplingError(
|
|
797
|
+
normalizeDetail(err.detail) || "Stream request failed",
|
|
798
|
+
response.status
|
|
799
|
+
);
|
|
775
800
|
}
|
|
776
801
|
if (!response.body) throw new Error("No response body");
|
|
777
802
|
const reader = response.body.getReader();
|
|
@@ -10607,7 +10632,7 @@ var init_version = __esm({
|
|
|
10607
10632
|
description: "Show version information for CLI and core packages",
|
|
10608
10633
|
category: "debug",
|
|
10609
10634
|
handler: async (_args, context) => {
|
|
10610
|
-
const cliVersion = true ? "2.3.6-beta.
|
|
10635
|
+
const cliVersion = true ? "2.3.6-beta.27" : "(dev)";
|
|
10611
10636
|
const coreVersion = true ? "2.3.2" : "(dev)";
|
|
10612
10637
|
const runtime = process.version;
|
|
10613
10638
|
context.addMessage("system", "MSapling Version Info");
|
|
@@ -10616,7 +10641,7 @@ var init_version = __esm({
|
|
|
10616
10641
|
context.addMessage("system", row2("Core (@msapling/core)", coreVersion));
|
|
10617
10642
|
context.addMessage("system", row2("Runtime (Node/Bun)", runtime));
|
|
10618
10643
|
try {
|
|
10619
|
-
const ts = "2026-05-
|
|
10644
|
+
const ts = "2026-05-29T00:38:48.242Z";
|
|
10620
10645
|
if (ts && ts !== "__BUILD_TIMESTAMP__") {
|
|
10621
10646
|
context.addMessage("system", row2("Build Timestamp", ts));
|
|
10622
10647
|
}
|
|
@@ -15029,7 +15054,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
15029
15054
|
var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
|
|
15030
15055
|
/* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
|
|
15031
15056
|
"\u25CF MSapling CLI v",
|
|
15032
|
-
"2.3.6-beta.
|
|
15057
|
+
"2.3.6-beta.27"
|
|
15033
15058
|
] }),
|
|
15034
15059
|
/* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
|
|
15035
15060
|
] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtreeai/msapling-cli",
|
|
3
|
-
"version": "2.3.6-beta.
|
|
3
|
+
"version": "2.3.6-beta.27",
|
|
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",
|