@viewert/mcp 0.1.4 → 0.1.6
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/README.md +7 -1
- package/dist/setup.js +11 -2
- package/package.json +1 -1
- package/src/setup.ts +9 -2
package/README.md
CHANGED
|
@@ -11,7 +11,13 @@ Connects Claude Desktop, Cursor, Windsurf, or any MCP client to your Viewert Lib
|
|
|
11
11
|
### Option A — One-command setup (recommended)
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx
|
|
14
|
+
npx --package=@viewert/mcp viewert-mcp-setup
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or if you already have the package installed globally:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
viewert-mcp-setup
|
|
15
21
|
```
|
|
16
22
|
|
|
17
23
|
The interactive wizard will:
|
package/dist/setup.js
CHANGED
|
@@ -84,8 +84,12 @@ function askSecret(question) {
|
|
|
84
84
|
rl.resume();
|
|
85
85
|
resolve(input);
|
|
86
86
|
};
|
|
87
|
+
const redraw = () => {
|
|
88
|
+
// Clear the current line and redraw question + masked input
|
|
89
|
+
process.stdout.write('\r\x1b[2K' + question + '*'.repeat(input.length));
|
|
90
|
+
};
|
|
87
91
|
const onData = (chunk) => {
|
|
88
|
-
|
|
92
|
+
const isPaste = chunk.length > 1;
|
|
89
93
|
for (const ch of chunk) {
|
|
90
94
|
if (ch === '\r' || ch === '\n') {
|
|
91
95
|
finish();
|
|
@@ -103,9 +107,14 @@ function askSecret(question) {
|
|
|
103
107
|
}
|
|
104
108
|
else if (ch >= ' ') {
|
|
105
109
|
input += ch;
|
|
106
|
-
|
|
110
|
+
if (!isPaste)
|
|
111
|
+
process.stdout.write('*');
|
|
107
112
|
}
|
|
108
113
|
}
|
|
114
|
+
// After processing a paste chunk, redraw the whole line cleanly
|
|
115
|
+
// so any terminal echo of the plaintext gets overwritten
|
|
116
|
+
if (isPaste)
|
|
117
|
+
redraw();
|
|
109
118
|
};
|
|
110
119
|
process.stdin.on('data', onData);
|
|
111
120
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewert/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "MCP server for Viewert Librams — expose AI-enabled Vellums as context to any MCP-compatible AI client",
|
|
5
5
|
"keywords": ["mcp", "viewert", "libram", "ai-context", "model-context-protocol"],
|
|
6
6
|
"license": "MIT",
|
package/src/setup.ts
CHANGED
|
@@ -95,8 +95,12 @@ function askSecret(question: string): Promise<string> {
|
|
|
95
95
|
rl.resume()
|
|
96
96
|
resolve(input)
|
|
97
97
|
}
|
|
98
|
+
const redraw = () => {
|
|
99
|
+
// Clear the current line and redraw question + masked input
|
|
100
|
+
process.stdout.write('\r\x1b[2K' + question + '*'.repeat(input.length))
|
|
101
|
+
}
|
|
98
102
|
const onData = (chunk: string) => {
|
|
99
|
-
|
|
103
|
+
const isPaste = chunk.length > 1
|
|
100
104
|
for (const ch of chunk) {
|
|
101
105
|
if (ch === '\r' || ch === '\n') {
|
|
102
106
|
finish()
|
|
@@ -111,9 +115,12 @@ function askSecret(question: string): Promise<string> {
|
|
|
111
115
|
}
|
|
112
116
|
} else if (ch >= ' ') {
|
|
113
117
|
input += ch
|
|
114
|
-
process.stdout.write('*')
|
|
118
|
+
if (!isPaste) process.stdout.write('*')
|
|
115
119
|
}
|
|
116
120
|
}
|
|
121
|
+
// After processing a paste chunk, redraw the whole line cleanly
|
|
122
|
+
// so any terminal echo of the plaintext gets overwritten
|
|
123
|
+
if (isPaste) redraw()
|
|
117
124
|
}
|
|
118
125
|
process.stdin.on('data', onData)
|
|
119
126
|
})
|