@notus-os/mcp 0.1.1 → 0.1.2
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/bin/notusos-mcp.js +102 -16
- package/package.json +1 -1
package/dist/bin/notusos-mcp.js
CHANGED
|
@@ -132,7 +132,13 @@ async function runBrowserFlow(opts) {
|
|
|
132
132
|
const token = url.searchParams.get("token");
|
|
133
133
|
const receivedState = url.searchParams.get("state");
|
|
134
134
|
if (error2) {
|
|
135
|
-
res.writeHead(200, { "content-type": "text/html" }).end(
|
|
135
|
+
res.writeHead(200, { "content-type": "text/html" }).end(
|
|
136
|
+
resultPage({
|
|
137
|
+
variant: "cancelled",
|
|
138
|
+
heading: "Authorization cancelled",
|
|
139
|
+
body: "No token was issued. You can close this tab and try again from your terminal."
|
|
140
|
+
})
|
|
141
|
+
);
|
|
136
142
|
cleanup();
|
|
137
143
|
reject(new Error(`Authorization ${error2}`));
|
|
138
144
|
return;
|
|
@@ -144,10 +150,11 @@ async function runBrowserFlow(opts) {
|
|
|
144
150
|
return;
|
|
145
151
|
}
|
|
146
152
|
res.writeHead(200, { "content-type": "text/html" }).end(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"You
|
|
150
|
-
|
|
153
|
+
resultPage({
|
|
154
|
+
variant: "success",
|
|
155
|
+
heading: "You're connected",
|
|
156
|
+
body: "notusOS is ready to use in Claude Code. You can close this tab and head back to your terminal to start posting."
|
|
157
|
+
})
|
|
151
158
|
);
|
|
152
159
|
cleanup();
|
|
153
160
|
resolve({ token });
|
|
@@ -179,20 +186,99 @@ ${authorizeUrl.toString()}
|
|
|
179
186
|
});
|
|
180
187
|
});
|
|
181
188
|
}
|
|
182
|
-
function
|
|
189
|
+
function resultPage(opts) {
|
|
190
|
+
const icon = opts.variant === "success" ? `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>` : `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`;
|
|
191
|
+
const badgeBg = opts.variant === "success" ? "#722F37" : "#78716c";
|
|
183
192
|
return `<!doctype html>
|
|
193
|
+
<html lang="en">
|
|
194
|
+
<head>
|
|
184
195
|
<meta charset="utf-8">
|
|
185
|
-
<
|
|
196
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
197
|
+
<title>${opts.heading} \xB7 notusOS</title>
|
|
186
198
|
<style>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
199
|
+
:root { color-scheme: light; }
|
|
200
|
+
* { box-sizing: border-box; }
|
|
201
|
+
html, body { margin: 0; padding: 0; }
|
|
202
|
+
body {
|
|
203
|
+
min-height: 100vh;
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
padding: 24px;
|
|
208
|
+
background: #FAF7F3;
|
|
209
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
|
|
210
|
+
color: #1c1917;
|
|
211
|
+
-webkit-font-smoothing: antialiased;
|
|
212
|
+
}
|
|
213
|
+
.wrap {
|
|
214
|
+
width: 100%;
|
|
215
|
+
max-width: 420px;
|
|
216
|
+
text-align: center;
|
|
217
|
+
}
|
|
218
|
+
.logo {
|
|
219
|
+
width: 48px;
|
|
220
|
+
height: 48px;
|
|
221
|
+
margin: 0 auto 32px;
|
|
222
|
+
border-radius: 12px;
|
|
223
|
+
background: #722F37;
|
|
224
|
+
color: #fff;
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
font-size: 20px;
|
|
230
|
+
letter-spacing: -0.02em;
|
|
231
|
+
}
|
|
232
|
+
.card {
|
|
233
|
+
background: #fff;
|
|
234
|
+
border: 1px solid rgba(231, 229, 228, 0.8);
|
|
235
|
+
border-radius: 20px;
|
|
236
|
+
padding: 44px 32px 36px;
|
|
237
|
+
box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.04);
|
|
238
|
+
}
|
|
239
|
+
.badge {
|
|
240
|
+
width: 56px;
|
|
241
|
+
height: 56px;
|
|
242
|
+
margin: 0 auto 20px;
|
|
243
|
+
border-radius: 999px;
|
|
244
|
+
background: ${badgeBg};
|
|
245
|
+
color: #fff;
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
justify-content: center;
|
|
249
|
+
}
|
|
250
|
+
h1 {
|
|
251
|
+
margin: 0 0 10px;
|
|
252
|
+
font-size: 22px;
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
letter-spacing: -0.02em;
|
|
255
|
+
color: #1c1917;
|
|
256
|
+
}
|
|
257
|
+
p {
|
|
258
|
+
margin: 0;
|
|
259
|
+
font-size: 14px;
|
|
260
|
+
line-height: 1.55;
|
|
261
|
+
color: #78716c;
|
|
262
|
+
}
|
|
263
|
+
.hint {
|
|
264
|
+
margin-top: 28px;
|
|
265
|
+
font-size: 12px;
|
|
266
|
+
color: #a8a29e;
|
|
267
|
+
}
|
|
191
268
|
</style>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<
|
|
195
|
-
</div
|
|
269
|
+
</head>
|
|
270
|
+
<body>
|
|
271
|
+
<div class="wrap">
|
|
272
|
+
<div class="logo">n</div>
|
|
273
|
+
<div class="card">
|
|
274
|
+
<div class="badge">${icon}</div>
|
|
275
|
+
<h1>${opts.heading}</h1>
|
|
276
|
+
<p>${opts.body}</p>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="hint">You can close this tab.</div>
|
|
279
|
+
</div>
|
|
280
|
+
</body>
|
|
281
|
+
</html>`;
|
|
196
282
|
}
|
|
197
283
|
var DEFAULT_TIMEOUT_MS;
|
|
198
284
|
var init_browser_flow = __esm({
|
|
@@ -20484,7 +20570,7 @@ async function main() {
|
|
|
20484
20570
|
}
|
|
20485
20571
|
case "--version":
|
|
20486
20572
|
case "-v": {
|
|
20487
|
-
process.stderr.write("0.1.
|
|
20573
|
+
process.stderr.write("0.1.2\n");
|
|
20488
20574
|
return;
|
|
20489
20575
|
}
|
|
20490
20576
|
default: {
|