nulladrift 0.1.3 → 0.1.5
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 +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,8 +13,17 @@ var red = wrap(31);
|
|
|
13
13
|
var green = wrap(32);
|
|
14
14
|
var yellow = wrap(33);
|
|
15
15
|
var blue = wrap(34);
|
|
16
|
+
function visibleControls(text) {
|
|
17
|
+
return text.replace(
|
|
18
|
+
// C0 and C1 controls and DEL, plus the bidirectional overrides and zero-width characters
|
|
19
|
+
// that change what a line appears to say without changing what it is.
|
|
20
|
+
// eslint-disable-next-line no-control-regex
|
|
21
|
+
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B-\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g,
|
|
22
|
+
(character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
16
25
|
function truncate(text, limit = 160) {
|
|
17
|
-
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
26
|
+
const collapsed = visibleControls(text).replace(/\s+/g, " ").trim();
|
|
18
27
|
return collapsed.length <= limit ? collapsed : `${collapsed.slice(0, limit - 1)}\u2026`;
|
|
19
28
|
}
|
|
20
29
|
|
|
@@ -660,7 +669,7 @@ import { dirname, join as join2 } from "path";
|
|
|
660
669
|
import { ClientCredentialsProvider, UnauthorizedError } from "@modelcontextprotocol/client";
|
|
661
670
|
|
|
662
671
|
// src/lib/version.ts
|
|
663
|
-
var VERSION = "0.1.
|
|
672
|
+
var VERSION = "0.1.5";
|
|
664
673
|
var USER_AGENT = `nulladrift/${VERSION}`;
|
|
665
674
|
|
|
666
675
|
// src/mcp/oauth.ts
|
|
@@ -1984,7 +1993,7 @@ var AUDIT_FAILURE_LABEL = {
|
|
|
1984
1993
|
};
|
|
1985
1994
|
var MARK2 = { high: "\u{1F534}", medium: "\u{1F7E0}", low: "\u26AA" };
|
|
1986
1995
|
function cell(text) {
|
|
1987
|
-
return text.replace(/\|/g, "\\|").replace(/`/g, "\\`").replace(/\r?\n/g, " ").trim();
|
|
1996
|
+
return visibleControls(text).replace(/\|/g, "\\|").replace(/`/g, "\\`").replace(/\r?\n/g, " ").trim();
|
|
1988
1997
|
}
|
|
1989
1998
|
function row(change2) {
|
|
1990
1999
|
const where = change2.member ? `${change2.server}/${change2.member}` : change2.server;
|