@ellery/savio 0.2.0 → 0.3.0
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 +4 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -85,13 +85,15 @@ var TokenRefreshError = class extends Error {
|
|
|
85
85
|
// src/login.ts
|
|
86
86
|
import { createServer } from "http";
|
|
87
87
|
import { randomBytes } from "crypto";
|
|
88
|
+
import { hostname } from "os";
|
|
88
89
|
import { URL as URL2 } from "url";
|
|
89
90
|
import open from "open";
|
|
90
91
|
var LOGIN_TIMEOUT_MS = 12e4;
|
|
91
92
|
async function browserLogin(serverUrl) {
|
|
92
93
|
const state = randomBytes(32).toString("hex");
|
|
93
94
|
const { port, token } = await startCallbackServer(state);
|
|
94
|
-
const
|
|
95
|
+
const host = hostname();
|
|
96
|
+
const authUrl = `${serverUrl}/cli-auth?port=${port}&state=${encodeURIComponent(state)}&hostname=${encodeURIComponent(host)}`;
|
|
95
97
|
process.stderr.write(`Opening browser to authorize...
|
|
96
98
|
`);
|
|
97
99
|
process.stderr.write(`If the browser doesn't open, visit:
|
|
@@ -232,7 +234,7 @@ async function startProxy(refreshToken, serverUrl) {
|
|
|
232
234
|
|
|
233
235
|
// src/index.ts
|
|
234
236
|
var DEFAULT_SERVER = "https://app.savio.so";
|
|
235
|
-
var program = new Command().name("savio").description("Savio MCP
|
|
237
|
+
var program = new Command().name("savio").description("Savio MCP server \u2014 browser auth and local stdio proxy").version("0.1.0");
|
|
236
238
|
program.command("proxy", { isDefault: true, hidden: true }).description("Start the MCP stdio proxy (default command)").action(async () => {
|
|
237
239
|
if (process.stdin.isTTY) {
|
|
238
240
|
program.outputHelp();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellery/savio",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Savio MCP
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Savio MCP server — browser auth and local stdio proxy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"savio": "./dist/index.js"
|