rovloom 0.5.0 → 0.6.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/README.md +8 -0
- package/dist/src/admin/index.js +1 -1
- package/dist/src/{chunk-smpevv7n.js → chunk-0dqx2mmz.js} +9 -16
- package/dist/src/{chunk-rwpynx2j.js → chunk-0qgk7mhz.js} +12 -11
- package/dist/src/{chunk-erdq0rn8.js → chunk-3dvn33c4.js} +57 -58
- package/dist/src/chunk-5b8g62kw.js +438 -0
- package/dist/src/{chunk-64ftwe9b.js → chunk-8ykrqhxh.js} +8 -2
- package/dist/src/{chunk-9y36gntb.js → chunk-9zkq0kc8.js} +10 -5
- package/dist/src/{chunk-5n8csngz.js → chunk-d2kz25f2.js} +156 -11
- package/dist/src/{chunk-ympzv86c.js → chunk-ez7d5dac.js} +13 -4
- package/dist/src/{chunk-emcefrc1.js → chunk-g27b2gmx.js} +3 -4
- package/dist/src/{chunk-abd4envz.js → chunk-gyvqqnjb.js} +30 -57
- package/dist/src/{chunk-e7x51y0t.js → chunk-jf4r0r44.js} +2 -2
- package/dist/src/{chunk-4etdq0cp.js → chunk-jka7v3wb.js} +4 -7
- package/dist/src/{chunk-xhq21g24.js → chunk-m9c1pnv9.js} +3 -3
- package/dist/src/{chunk-7k9g0x5e.js → chunk-mg0fd6ph.js} +1 -1
- package/dist/src/{chunk-0ake7e4r.js → chunk-n6wtjyfb.js} +6 -14
- package/dist/src/{chunk-nyn75b8v.js → chunk-qjh9x872.js} +30 -1
- package/dist/src/{chunk-r0nfthsf.js → chunk-s3ydr65k.js} +2 -2
- package/dist/src/{chunk-ybte82d3.js → chunk-srfbjwtk.js} +4 -3
- package/dist/src/{chunk-sj24fpz3.js → chunk-ssp57p43.js} +24 -28
- package/dist/src/{chunk-ebm3kvnq.js → chunk-wxqhscsw.js} +26 -3
- package/dist/src/{chunk-7q96e161.js → chunk-x0td5wn4.js} +6 -12
- package/dist/src/{chunk-9yg6x3gt.js → chunk-ytpfmcp1.js} +4 -3
- package/dist/src/{chunk-fnakrk0a.js → chunk-yv9px0f5.js} +22 -25
- package/dist/src/{chunk-n073xnr1.js → chunk-zjkjjm81.js} +43 -46
- package/dist/src/cli/index.js +23 -15
- package/dist/src/cli/main.js +14 -9
- package/dist/src/mcp/index.js +6 -5
- package/dist/src/runtime/index.js +2 -2
- package/dist/src/service/index.js +3 -4
- package/dist/src/store.js +1 -1
- package/dist/src/webui/index.js +1095 -156
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
cliMessages2
|
|
4
|
+
} from "./chunk-5b8g62kw.js";
|
|
2
5
|
import {
|
|
3
6
|
isRole,
|
|
4
7
|
servicePlatform,
|
|
@@ -10,15 +13,6 @@ import {
|
|
|
10
13
|
|
|
11
14
|
// src/service/command.ts
|
|
12
15
|
var actions = new Set(["install", "uninstall", "start", "restart", "stop"]);
|
|
13
|
-
var SERVICE_HELP2 = `service install --role gateway|connector [--executable ABS] [--config ABS] --workdir ABS --user ACCOUNT
|
|
14
|
-
service uninstall|start|restart|stop --role gateway|connector
|
|
15
|
-
install registers boot startup without starting; uninstall only revokes future boot startup and preserves running instances and their control records.
|
|
16
|
-
Omitted --executable uses the current standalone binary; a different binary is rejected.
|
|
17
|
-
Omitted --config uses the same current-user role file as foreground startup. Installation fixes its absolute path; background startup does not select another home.
|
|
18
|
-
Linux uses systemd system units; macOS uses system LaunchDaemons; Windows uses boot-triggered tasks, not SCM services or login tasks.
|
|
19
|
-
Gateway services support Linux systemd, macOS system LaunchDaemons and Windows boot-triggered tasks; the local native Connector service supports Linux x64, Windows x64 and macOS (x64 / arm64).
|
|
20
|
-
Windows uses the explicitly selected existing user with S4U, without storing a password or requiring login. It does not provide an interactive desktop or Windows network credentials/EFS access. Running services receive a local shutdown request; queued/start-racing tasks return service_busy without forced termination; uninstall never stops it.
|
|
21
|
-
`;
|
|
22
16
|
function parseServiceCommand2(args, platform, resolveDefaultConfig, executable) {
|
|
23
17
|
if (args[0] !== "service") {
|
|
24
18
|
return;
|
|
@@ -64,7 +58,7 @@ async function handleServiceCommand2(args, host) {
|
|
|
64
58
|
}
|
|
65
59
|
try {
|
|
66
60
|
if (args.length === 2 && args[1] === "--help") {
|
|
67
|
-
host.diagnostic(
|
|
61
|
+
host.diagnostic(cliMessages2(host.language)["help.service"]);
|
|
68
62
|
return 0;
|
|
69
63
|
}
|
|
70
64
|
const request = parseServiceCommand2(args, servicePlatform(host.platform), host.resolveDefaultConfig, host.executable);
|
|
@@ -79,6 +73,6 @@ async function handleServiceCommand2(args, host) {
|
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
75
|
|
|
82
|
-
export {
|
|
76
|
+
export { parseServiceCommand2, handleServiceCommand2 };
|
|
83
77
|
|
|
84
|
-
//# debugId=
|
|
78
|
+
//# debugId=D7F60C51F033ABF664756E2164756E21
|
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
writeAdminFiles2,
|
|
4
4
|
managementSourceExists2,
|
|
5
5
|
handleAdminCommand2
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import"./chunk-
|
|
6
|
+
} from "./chunk-yv9px0f5.js";
|
|
7
|
+
import"./chunk-wxqhscsw.js";
|
|
8
8
|
import"./chunk-1bf0wmgk.js";
|
|
9
9
|
import"./chunk-z7kkfrgz.js";
|
|
10
10
|
import"./chunk-hpzr94hm.js";
|
|
11
|
+
import"./chunk-5b8g62kw.js";
|
|
11
12
|
import"./chunk-3nnahj0j.js";
|
|
12
13
|
import"./chunk-0y5542k8.js";
|
|
13
14
|
import"./chunk-g7pnjzkk.js";
|
|
@@ -21,4 +22,4 @@ export {
|
|
|
21
22
|
writeAdminFiles2 as writeAdminFiles
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
//# debugId=
|
|
25
|
+
//# debugId=989933E8EAB2EB1A64756E2164756E21
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
fields2,
|
|
5
5
|
boundedJson2
|
|
6
6
|
} from "./chunk-qt9m2kg2.js";
|
|
7
|
+
import {
|
|
8
|
+
cliMessages2,
|
|
9
|
+
formatMessage2
|
|
10
|
+
} from "./chunk-5b8g62kw.js";
|
|
7
11
|
import {
|
|
8
12
|
setupFileStamp,
|
|
9
13
|
writeSetupFile,
|
|
@@ -15,13 +19,12 @@ import {
|
|
|
15
19
|
issueAdmin,
|
|
16
20
|
revokeAdmin,
|
|
17
21
|
summarizeAdmins
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-wxqhscsw.js";
|
|
19
23
|
import {
|
|
20
24
|
resolveRoleConfigPath2
|
|
21
25
|
} from "./chunk-1bf0wmgk.js";
|
|
22
26
|
import {
|
|
23
|
-
runtimeReference
|
|
24
|
-
readRuntimeJson
|
|
27
|
+
runtimeReference
|
|
25
28
|
} from "./chunk-z7kkfrgz.js";
|
|
26
29
|
import {
|
|
27
30
|
CLI_ERROR_CODES,
|
|
@@ -33,18 +36,8 @@ import {
|
|
|
33
36
|
} from "./chunk-6n9s7nfe.js";
|
|
34
37
|
|
|
35
38
|
// src/cli/admin-command.ts
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
rovloom admin create [--principal ID] [--ttl-days N] [--config /absolute/path/gateway.json]
|
|
39
|
-
rovloom admin revoke [--principal ID] [--config /absolute/path/gateway.json]
|
|
40
|
-
|
|
41
|
-
\u7BA1\u7406\u9875\uFF08\u9ED8\u8BA4 http://127.0.0.1:9445/\uFF09\u7528 HTTP Basic \u767B\u5F55\uFF1A\u7528\u6237\u540D\u662F\u7BA1\u7406\u5458 ID\uFF08\u9ED8\u8BA4 admin\uFF09\uFF0C\u5BC6\u7801\u662F create \u8F93\u51FA\u7684\u53E3\u4EE4\u3002
|
|
42
|
-
\u53E3\u4EE4\u539F\u503C\u53EA\u5728 create \u65F6\u5199\u5230 stdout \u4E00\u6B21\uFF08Gateway \u53EA\u4FDD\u5B58 SHA-256 \u6458\u8981\uFF09\uFF1B\u5176\u4F59\u4FE1\u606F\u5199\u5230 stderr\u3002\u4E22\u5931\u53E3\u4EE4\u5C31\u518D create \u4E00\u6B21\uFF1A
|
|
43
|
-
\u540C\u540D\u7BA1\u7406\u5458\u88AB\u91CD\u65B0\u7B7E\u53D1\uFF0C\u65E7\u53E3\u4EE4\u4E0E\u5DF2\u767B\u5F55\u7684\u6D4F\u89C8\u5668\u4F1A\u8BDD\u7ACB\u5373\u5931\u6548\u3002revoke \u5220\u9664\u7BA1\u7406\u5458\uFF0C\u540C\u6837\u7ACB\u5373\u751F\u6548\u3002\u4FEE\u6539\u65E0\u9700\u91CD\u542F Gateway\u3002
|
|
44
|
-
\u7BA1\u7406\u5458\u4E0D\u80FD\u8C03\u7528 MCP\uFF0C\u4E5F\u4E0E MCP \u4EE4\u724C\u3001\u8BBE\u5907\u51ED\u636E\u4E92\u4E0D\u901A\u7528\uFF1B\u6709\u6548\u671F\u9ED8\u8BA4 ${DEFAULT_ADMIN_TTL_DAYS} \u5929\uFF081-365\uFF09\u3002
|
|
45
|
-
\u53EF\u5728\u9996\u6B21\u914D\u5BF9\u524D\u521B\u5EFA\uFF1A\u5168\u65B0 Gateway \u4F1A\u81EA\u884C\u521D\u59CB\u5316\u7A7A\u7684 MCP \u8C03\u7528\u65B9\u6CE8\u518C\u8868\uFF0C\u968F\u540E\u5373\u53EF\u5728\u7BA1\u7406\u9875
|
|
46
|
-
\u5728\u7EBF\u914D\u5BF9\u9996\u53F0 Connector\uFF08\u65B0\u5EFA\u7533\u8BF7\uFF0C\u8BBE\u5907\u8FD0\u884C rovloom connector --claim\uFF09\u3002
|
|
47
|
-
`;
|
|
39
|
+
import { mkdirSync } from "fs";
|
|
40
|
+
import { dirname } from "path";
|
|
48
41
|
function parse(args) {
|
|
49
42
|
const sub = args[1];
|
|
50
43
|
if (!sub || !["list", "create", "revoke"].includes(sub)) {
|
|
@@ -117,6 +110,7 @@ function callersStamp(path) {
|
|
|
117
110
|
function writeAdminFiles2(config, principal, at, days) {
|
|
118
111
|
const callersPath = runtimeReference(config.state_dir, "mcp-callers");
|
|
119
112
|
const managementPath = runtimeReference(config.state_dir, "management");
|
|
113
|
+
mkdirSync(dirname(managementPath), { recursive: true, mode: 448 });
|
|
120
114
|
const stamp = callersStamp(callersPath);
|
|
121
115
|
const callers = parseRegistry(readSetupJson(callersPath, REGISTRY_MAX_BYTES) ?? emptyCallerRegistry(callerResource(config)));
|
|
122
116
|
const { file, exists } = loadManagement(managementPath, config.management_port);
|
|
@@ -136,7 +130,7 @@ function managementSourceExists2(config) {
|
|
|
136
130
|
async function handleAdminCommand2(args, io, environment, now = Date.now) {
|
|
137
131
|
try {
|
|
138
132
|
if (args.length === 2 && args[1] === "--help") {
|
|
139
|
-
io.stderr.write(
|
|
133
|
+
io.stderr.write(formatMessage2(cliMessages2(io.language)["help.admin"], { ttlDays: DEFAULT_ADMIN_TTL_DAYS }));
|
|
140
134
|
return 0;
|
|
141
135
|
}
|
|
142
136
|
const flags = parse(args);
|
|
@@ -150,15 +144,19 @@ async function handleAdminCommand2(args, io, environment, now = Date.now) {
|
|
|
150
144
|
const principal = flags.principal ?? "admin";
|
|
151
145
|
if (flags.sub === "create") {
|
|
152
146
|
const issued = writeAdminFiles2(config, principal, at, flags.days);
|
|
153
|
-
io.stderr.write(
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
io.stderr.write(formatMessage2(cliMessages2(io.language)["admin.create.created"], {
|
|
148
|
+
principal,
|
|
149
|
+
expires: new Date(issued.expires_at).toISOString()
|
|
150
|
+
}) + formatMessage2(cliMessages2(io.language)["admin.create.login"], {
|
|
151
|
+
url: "http://127.0.0.1:" + config.management_port + "/",
|
|
152
|
+
user: principal
|
|
153
|
+
}));
|
|
156
154
|
io.stdout.write(issued.secret + `
|
|
157
155
|
`);
|
|
158
156
|
return 0;
|
|
159
157
|
}
|
|
160
|
-
const
|
|
161
|
-
const callers = parseRegistry(
|
|
158
|
+
const registryStamp = callersStamp(callersPath);
|
|
159
|
+
const callers = parseRegistry(readSetupJson(callersPath, REGISTRY_MAX_BYTES) ?? emptyCallerRegistry(callerResource(config)));
|
|
162
160
|
const { file, exists } = loadManagement(managementPath, config.management_port);
|
|
163
161
|
if (flags.sub === "list") {
|
|
164
162
|
for (const row of summarizeAdmins(file, at)) {
|
|
@@ -170,9 +168,8 @@ login at http://127.0.0.1:` + config.management_port + '/ with user "' + princip
|
|
|
170
168
|
const stamp = exists ? setupFileStamp(managementPath) : undefined;
|
|
171
169
|
const revoked = revokeAdmin(callers, file, principal);
|
|
172
170
|
writeSetupFile(managementPath, boundedJson2(revoked.management, 65536), true, stamp);
|
|
173
|
-
writeSetupFile(callersPath, boundedJson2(revoked.callers, REGISTRY_MAX_BYTES), true,
|
|
174
|
-
io.stderr.write("revoked
|
|
175
|
-
`);
|
|
171
|
+
writeSetupFile(callersPath, boundedJson2(revoked.callers, REGISTRY_MAX_BYTES), true, registryStamp);
|
|
172
|
+
io.stderr.write(formatMessage2(cliMessages2(io.language)["admin.revoked"], { principal }));
|
|
176
173
|
return 0;
|
|
177
174
|
} catch (error) {
|
|
178
175
|
if (error instanceof CliError2 && CLI_ERROR_CODES.includes(error.code)) {
|
|
@@ -188,4 +185,4 @@ login at http://127.0.0.1:` + config.management_port + '/ with user "' + princip
|
|
|
188
185
|
|
|
189
186
|
export { writeAdminFiles2, managementSourceExists2, handleAdminCommand2 };
|
|
190
187
|
|
|
191
|
-
//# debugId=
|
|
188
|
+
//# debugId=0EB59DEAE24D22AB64756E2164756E21
|
|
@@ -30,10 +30,14 @@ import {
|
|
|
30
30
|
checkedRemoteLuvusConfig,
|
|
31
31
|
createPinnedRemoteLuvus
|
|
32
32
|
} from "./chunk-5s2emvww.js";
|
|
33
|
+
import {
|
|
34
|
+
cliMessages2,
|
|
35
|
+
formatMessage2
|
|
36
|
+
} from "./chunk-5b8g62kw.js";
|
|
33
37
|
import {
|
|
34
38
|
writeAdminFiles2,
|
|
35
39
|
managementSourceExists2
|
|
36
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-yv9px0f5.js";
|
|
37
41
|
import {
|
|
38
42
|
setupFileStamp,
|
|
39
43
|
writeSetupFile,
|
|
@@ -42,7 +46,7 @@ import {
|
|
|
42
46
|
REGISTRY_MAX_BYTES,
|
|
43
47
|
parseRegistry,
|
|
44
48
|
isAdminPlaceholder
|
|
45
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-wxqhscsw.js";
|
|
46
50
|
import {
|
|
47
51
|
readRuntimeConfig2
|
|
48
52
|
} from "./chunk-bspzg8er.js";
|
|
@@ -608,12 +612,12 @@ class SetupApproval {
|
|
|
608
612
|
if (!["issued", "paired", "native_approved"].includes(previous.phase) || previous.phase === "issued" && Date.now() >= previous.expires_at) {
|
|
609
613
|
throw new CliError2("configuration_required");
|
|
610
614
|
}
|
|
611
|
-
if (!await this.terminal.confirm("
|
|
615
|
+
if (!await this.terminal.confirm(cliMessages2(this.terminal.io.language)["setup.approval.resumeConfirm"])) {
|
|
612
616
|
throw new CliError2("configuration_required");
|
|
613
617
|
}
|
|
614
618
|
return { plan: previous };
|
|
615
619
|
}
|
|
616
|
-
if (!await this.terminal.confirm(
|
|
620
|
+
if (!await this.terminal.confirm(cliMessages2(this.terminal.io.language)["setup.approval.pairConfirm"])) {
|
|
617
621
|
return { declined: true };
|
|
618
622
|
}
|
|
619
623
|
const now = Date.now();
|
|
@@ -669,7 +673,10 @@ class SetupApproval {
|
|
|
669
673
|
if (device.status === "revoked") {
|
|
670
674
|
throw new CliError2("configuration_required");
|
|
671
675
|
}
|
|
672
|
-
if (!await this.terminal.confirm(
|
|
676
|
+
if (!await this.terminal.confirm(formatMessage2(cliMessages2(this.terminal.io.language)["setup.approval.repairDeviceConfirm"], {
|
|
677
|
+
name: device.name,
|
|
678
|
+
machine
|
|
679
|
+
}))) {
|
|
673
680
|
throw new CliError2("configuration_required");
|
|
674
681
|
}
|
|
675
682
|
for (let attempt = 0;; attempt++) {
|
|
@@ -836,7 +843,7 @@ function publishFirstCallers(path, resource, authorization, caller) {
|
|
|
836
843
|
return;
|
|
837
844
|
}
|
|
838
845
|
const registry = parseRegistry(previous, resource);
|
|
839
|
-
const kept = registry.callers.filter((entry) => isAdminPlaceholder(entry) || boundedJson2(entry, REGISTRY_MAX_BYTES) === boundedJson2(caller, REGISTRY_MAX_BYTES));
|
|
846
|
+
const kept = registry.callers.filter((entry) => isAdminPlaceholder(entry) || entry.scope === "gateway" || boundedJson2(entry, REGISTRY_MAX_BYTES) === boundedJson2(caller, REGISTRY_MAX_BYTES));
|
|
840
847
|
if (kept.length !== registry.callers.length) {
|
|
841
848
|
throw new CliError2("configuration_required");
|
|
842
849
|
}
|
|
@@ -880,43 +887,34 @@ class GatewaySetup {
|
|
|
880
887
|
this.#begun = true;
|
|
881
888
|
const active = this.approval.active();
|
|
882
889
|
if (active?.repair && active.phase === "configured") {
|
|
883
|
-
this.terminal.show(
|
|
884
|
-
`);
|
|
890
|
+
this.terminal.show(cliMessages2(this.terminal.io.language)["setup.gateway.resumeRePairing"]);
|
|
885
891
|
} else {
|
|
886
892
|
const issued = await this.approval.issueRepair();
|
|
887
|
-
this.terminal.show("
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
\u5728\u8BE5\u8BBE\u5907\u4E0A\u505C\u6B62 Connector\uFF0C\u8FD0\u884C rovloom connector --repair \u5E76\u8F93\u5165\u6B64\u7801\uFF1B\u65E7\u51ED\u636E\u5DF2\u5931\u6548\u3002
|
|
893
|
-
`);
|
|
893
|
+
this.terminal.show(formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.repairCodeBlock"], {
|
|
894
|
+
mcpUrl,
|
|
895
|
+
endpoint: gateway.transport.url.replace(/\/connector$/, ""),
|
|
896
|
+
code: issued.code
|
|
897
|
+
}));
|
|
894
898
|
}
|
|
895
899
|
}
|
|
896
900
|
const current = this.approval.active();
|
|
897
901
|
if (!this.#begun && (current?.phase === "ready" ? this.options.addDevice === true : current?.phase !== "configured")) {
|
|
898
902
|
this.#begun = true;
|
|
899
|
-
this.terminal.show("
|
|
900
|
-
|
|
901
|
-
|
|
903
|
+
this.terminal.show(formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.endpoints"], {
|
|
904
|
+
mcpUrl,
|
|
905
|
+
endpoint: gateway.transport.url.replace(/\/connector$/, "")
|
|
906
|
+
}));
|
|
902
907
|
const issued = await this.approval.issue();
|
|
903
908
|
if (issued.declined) {
|
|
904
909
|
const page = this.config.management_enabled ? "http://127.0.0.1:" + this.config.management_port + "/" : "";
|
|
905
|
-
this.terminal.show(
|
|
906
|
-
` + (page ? "Finish first pairing from the management page: create the administrator with `rovloom admin create`, sign in at " + page + ", create a pairing application, then run `rovloom connector --claim` on the device. / \u5728\u7BA1\u7406\u9875\u5B8C\u6210\u9996\u6B21\u914D\u5BF9\uFF1A\u5148\u7528 `rovloom admin create` \u521B\u5EFA\u7BA1\u7406\u5458\uFF0C\u767B\u5F55 " + page + " \u65B0\u5EFA\u914D\u5BF9\u7533\u8BF7\uFF0C\u518D\u5728\u8BBE\u5907\u4E0A\u8FD0\u884C `rovloom connector --claim`\u3002\n" : `Management is disabled; enable it or rerun to pair from this terminal. / \u7BA1\u7406\u9875\u672A\u542F\u7528\uFF1B\u8BF7\u542F\u7528\u540E\u91CD\u8BD5\u6216\u5728\u672C\u7EC8\u7AEF\u5B8C\u6210\u914D\u5BF9\u3002
|
|
907
|
-
`));
|
|
910
|
+
this.terminal.show(cliMessages2(this.terminal.io.language)["setup.gateway.unpairedRunning"] + (page ? formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.managementFirstPairing"], { page }) : cliMessages2(this.terminal.io.language)["setup.gateway.managementDisabled"]));
|
|
908
911
|
this.terminal.finishQuestions();
|
|
909
912
|
return;
|
|
910
913
|
}
|
|
911
914
|
if (issued.code) {
|
|
912
|
-
this.terminal.show(
|
|
913
|
-
` + issued.code + `
|
|
914
|
-
Run rovloom connector in another local terminal and enter the Gateway address and code.
|
|
915
|
-
\u5728 Connector \u7684\u672C\u5730\u7EC8\u7AEF\u8F93\u5165 Gateway \u5730\u5740\u4E0E\u8BE5\u7801\uFF1B\u968F\u540E\u56DE\u5230\u6B64\u7EC8\u7AEF\u6279\u51C6\u5B9E\u6D4B\u5B89\u88C5\u3002
|
|
916
|
-
`);
|
|
915
|
+
this.terminal.show(formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.pairingCodeBlock"], { code: issued.code }));
|
|
917
916
|
} else {
|
|
918
|
-
this.terminal.show(
|
|
919
|
-
`);
|
|
917
|
+
this.terminal.show(cliMessages2(this.terminal.io.language)["setup.gateway.resumingExisting"]);
|
|
920
918
|
}
|
|
921
919
|
}
|
|
922
920
|
const plan = this.approval.active();
|
|
@@ -938,8 +936,7 @@ Run rovloom connector in another local terminal and enter the Gateway address an
|
|
|
938
936
|
}
|
|
939
937
|
if (device?.authenticated && device.ready && (plan.providers ?? ["luvus"]).every((kind) => device.providers.some((entry) => entry.provider_id === kind && entry.ready))) {
|
|
940
938
|
this.approval.finishReady(plan.attempt_id);
|
|
941
|
-
this.terminal.show(
|
|
942
|
-
`);
|
|
939
|
+
this.terminal.show(cliMessages2(this.terminal.io.language)["setup.gateway.connectorReady"]);
|
|
943
940
|
clearInterval(this.#timer);
|
|
944
941
|
this.#timer = undefined;
|
|
945
942
|
}
|
|
@@ -971,7 +968,9 @@ Run rovloom connector in another local terminal and enter the Gateway address an
|
|
|
971
968
|
})) {
|
|
972
969
|
throw new CliError2("configuration_required");
|
|
973
970
|
}
|
|
974
|
-
await this.approval.approveNative(request.plan.attempt_id, kinds, fingerprint,
|
|
971
|
+
await this.approval.approveNative(request.plan.attempt_id, kinds, fingerprint, formatMessage2(cliMessages2(this.terminal.io.language)["setup.prompt.gatewayNativeInstallations"], {
|
|
972
|
+
entries: reviewed.map((entry) => entry.kind + " " + entry.label + ", Target " + boundedJson2(entry.target) + ", binary SHA-256 " + entry.binary_sha256).join("; ")
|
|
973
|
+
}), request.signal);
|
|
975
974
|
this.terminal.assertOwner();
|
|
976
975
|
if (request.signal.aborted) {
|
|
977
976
|
throw new CliError2("configuration_required");
|
|
@@ -1040,23 +1039,21 @@ Run rovloom connector in another local terminal and enter the Gateway address an
|
|
|
1040
1039
|
const page = "http://127.0.0.1:" + this.config.management_port + "/";
|
|
1041
1040
|
try {
|
|
1042
1041
|
const admin = writeAdminFiles2(this.config, "admin", Date.now());
|
|
1043
|
-
adminNote =
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
(Shown once; run rovloom admin create to re-issue. / \u53EA\u663E\u793A\u4E00\u6B21\uFF1B\u4E22\u5931\u540E\u8FD0\u884C rovloom admin create \u91CD\u65B0\u7B7E\u53D1\u3002)`;
|
|
1042
|
+
adminNote = formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.adminBlock"], {
|
|
1043
|
+
page,
|
|
1044
|
+
secret: admin.secret
|
|
1045
|
+
});
|
|
1048
1046
|
} catch {
|
|
1049
|
-
adminNote =
|
|
1050
|
-
Management administrator was not created; run rovloom admin create. / \u672A\u80FD\u521B\u5EFA\u7BA1\u7406\u9875\u7BA1\u7406\u5458\uFF0C\u8BF7\u7A0D\u540E\u8FD0\u884C rovloom admin create\u3002`;
|
|
1047
|
+
adminNote = cliMessages2(this.terminal.io.language)["setup.gateway.adminNotCreated"];
|
|
1051
1048
|
}
|
|
1052
1049
|
}
|
|
1053
|
-
this.terminal.show(
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1050
|
+
this.terminal.show(formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.nativeSaved"], {
|
|
1051
|
+
clientPath,
|
|
1052
|
+
url: this.config.mcp_public_url ?? resource,
|
|
1053
|
+
targets: boundedJson2(reviewed.map((entry) => entry.target))
|
|
1054
|
+
}) + (additional ? cliMessages2(this.terminal.io.language)["setup.gateway.bearerAdditional"] : formatMessage2(cliMessages2(this.terminal.io.language)["setup.gateway.bearerSecret"], {
|
|
1055
|
+
token: client.token
|
|
1056
|
+
})) + adminNote + `
|
|
1060
1057
|
`);
|
|
1061
1058
|
setImmediate(() => this.#reload?.());
|
|
1062
1059
|
return { state: "configured", fingerprint };
|
|
@@ -1114,4 +1111,4 @@ function mergeSetupProviders(path, entries) {
|
|
|
1114
1111
|
|
|
1115
1112
|
export { setupSessions, setupTarget, setupProviderKinds, selectedSetupPolicies, setupReference, setupSessionsFor, setupReply, requestJson, device, reviewSetupManifest, publishSetupSchemas, publish, publishFirstCallers, GatewaySetup, mergeSetupCallers, mergeSetupProviders };
|
|
1116
1113
|
|
|
1117
|
-
//# debugId=
|
|
1114
|
+
//# debugId=0EFB955908D6EDF264756E2164756E21
|
package/dist/src/cli/index.js
CHANGED
|
@@ -5,18 +5,23 @@ import"../chunk-qt9m2kg2.js";
|
|
|
5
5
|
import"../chunk-9tt13dm0.js";
|
|
6
6
|
import"../chunk-g7pnjzkk.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
resolveCliLanguage2,
|
|
9
|
+
cliMessages2,
|
|
10
|
+
formatMessage2
|
|
11
|
+
} from "../chunk-5b8g62kw.js";
|
|
12
|
+
import {
|
|
13
|
+
cliHelp2,
|
|
9
14
|
parseCommand2,
|
|
10
15
|
runCli2
|
|
11
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-gyvqqnjb.js";
|
|
12
17
|
import {
|
|
13
18
|
Store2
|
|
14
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-qjh9x872.js";
|
|
15
20
|
import"../chunk-09f9q26d.js";
|
|
16
21
|
import {
|
|
17
22
|
FacadeServiceError2
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import"../chunk-
|
|
23
|
+
} from "../chunk-0dqx2mmz.js";
|
|
24
|
+
import"../chunk-9zkq0kc8.js";
|
|
20
25
|
import {
|
|
21
26
|
Router2
|
|
22
27
|
} from "../chunk-y4hksha9.js";
|
|
@@ -27,7 +32,7 @@ import"../chunk-0xgpxdgc.js";
|
|
|
27
32
|
import {
|
|
28
33
|
resolveGatewayPrincipal,
|
|
29
34
|
StoreGatewayService2
|
|
30
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-mg0fd6ph.js";
|
|
31
36
|
import"../chunk-zj48jvfe.js";
|
|
32
37
|
import"../chunk-8nv79bhy.js";
|
|
33
38
|
import"../chunk-zxsz6g14.js";
|
|
@@ -38,28 +43,28 @@ import {
|
|
|
38
43
|
} from "../chunk-zjzrcc59.js";
|
|
39
44
|
import"../chunk-d4ejrtjq.js";
|
|
40
45
|
import"../chunk-5s2emvww.js";
|
|
41
|
-
import"../chunk-
|
|
42
|
-
import"../chunk-
|
|
46
|
+
import"../chunk-jka7v3wb.js";
|
|
47
|
+
import"../chunk-ez7d5dac.js";
|
|
43
48
|
import"../chunk-5h82060k.js";
|
|
44
49
|
import"../chunk-863tk45b.js";
|
|
45
50
|
import"../chunk-zb641qa3.js";
|
|
46
51
|
import"../chunk-ttsrctxg.js";
|
|
47
52
|
import"../chunk-5svt6rwr.js";
|
|
48
53
|
import"../chunk-2tn0r64b.js";
|
|
49
|
-
import"../chunk-
|
|
50
|
-
import"../chunk-
|
|
54
|
+
import"../chunk-yv9px0f5.js";
|
|
55
|
+
import"../chunk-zjkjjm81.js";
|
|
51
56
|
import {
|
|
52
57
|
createRuntimeCliRuntime2,
|
|
53
58
|
MANAGEMENT_COOKIE_NAME2,
|
|
54
59
|
MANAGEMENT_BOOTSTRAP_META2,
|
|
55
60
|
createManagementPageInitializer2,
|
|
56
61
|
createProductionCliRuntime2
|
|
57
|
-
} from "../chunk-
|
|
58
|
-
import"../chunk-
|
|
62
|
+
} from "../chunk-d2kz25f2.js";
|
|
63
|
+
import"../chunk-wxqhscsw.js";
|
|
59
64
|
import {
|
|
60
65
|
readRuntimeConfig2
|
|
61
66
|
} from "../chunk-bspzg8er.js";
|
|
62
|
-
import"../chunk-
|
|
67
|
+
import"../chunk-8ykrqhxh.js";
|
|
63
68
|
import {
|
|
64
69
|
resolveRoleConfigPath2
|
|
65
70
|
} from "../chunk-1bf0wmgk.js";
|
|
@@ -206,9 +211,10 @@ function createTransportCliRuntime(host) {
|
|
|
206
211
|
}
|
|
207
212
|
export {
|
|
208
213
|
CliError2 as CliError,
|
|
209
|
-
HELP2 as HELP,
|
|
210
214
|
MANAGEMENT_BOOTSTRAP_META2 as MANAGEMENT_BOOTSTRAP_META,
|
|
211
215
|
MANAGEMENT_COOKIE_NAME2 as MANAGEMENT_COOKIE_NAME,
|
|
216
|
+
cliHelp2 as cliHelp,
|
|
217
|
+
cliMessages2 as cliMessages,
|
|
212
218
|
configDocument2 as configDocument,
|
|
213
219
|
configTemplate2 as configTemplate,
|
|
214
220
|
createManagementPageInitializer2 as createManagementPageInitializer,
|
|
@@ -216,12 +222,14 @@ export {
|
|
|
216
222
|
createRuntimeCliRuntime2 as createRuntimeCliRuntime,
|
|
217
223
|
createStoreCliRuntime,
|
|
218
224
|
createTransportCliRuntime,
|
|
225
|
+
formatMessage2 as formatMessage,
|
|
219
226
|
parseCommand2 as parseCommand,
|
|
220
227
|
parseConfig2 as parseConfig,
|
|
221
228
|
readConfig2 as readConfig,
|
|
222
229
|
readRuntimeConfig2 as readRuntimeConfig,
|
|
230
|
+
resolveCliLanguage2 as resolveCliLanguage,
|
|
223
231
|
resolveRoleConfigPath2 as resolveRoleConfigPath,
|
|
224
232
|
runCli2 as runCli
|
|
225
233
|
};
|
|
226
234
|
|
|
227
|
-
//# debugId=
|
|
235
|
+
//# debugId=E0A8FE0C7070424764756E2164756E21
|
package/dist/src/cli/main.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
+
import {
|
|
4
|
+
resolveCliLanguage2,
|
|
5
|
+
cliMessages2,
|
|
6
|
+
formatMessage2
|
|
7
|
+
} from "../chunk-5b8g62kw.js";
|
|
3
8
|
import"../chunk-d71r315c.js";
|
|
4
9
|
import {
|
|
5
10
|
parseNativeJson2
|
|
@@ -10,13 +15,13 @@ import"../chunk-g7pnjzkk.js";
|
|
|
10
15
|
import {
|
|
11
16
|
parseCommand2,
|
|
12
17
|
runCli2
|
|
13
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-gyvqqnjb.js";
|
|
14
19
|
import {
|
|
15
20
|
createNativeServiceBackend2,
|
|
16
21
|
ServiceManager2
|
|
17
22
|
} from "../chunk-ttm3c0jh.js";
|
|
18
23
|
import"../chunk-bspzg8er.js";
|
|
19
|
-
import"../chunk-
|
|
24
|
+
import"../chunk-8ykrqhxh.js";
|
|
20
25
|
import {
|
|
21
26
|
resolveRoleConfigPath2
|
|
22
27
|
} from "../chunk-1bf0wmgk.js";
|
|
@@ -53,8 +58,7 @@ function bunSupported(version, minimum = MINIMUM_BUN) {
|
|
|
53
58
|
return true;
|
|
54
59
|
}
|
|
55
60
|
if (!bunSupported(process.versions.bun)) {
|
|
56
|
-
process.stderr.write(
|
|
57
|
-
`);
|
|
61
|
+
process.stderr.write(formatMessage2(cliMessages2(resolveCliLanguage2(process.env))["guard.bunUnsupported"], { minimum: MINIMUM_BUN }));
|
|
58
62
|
process.exit(1);
|
|
59
63
|
}
|
|
60
64
|
|
|
@@ -300,10 +304,10 @@ async function control(role) {
|
|
|
300
304
|
}
|
|
301
305
|
async function product() {
|
|
302
306
|
if (!runtime) {
|
|
303
|
-
const { createProductSources } = await import("../chunk-
|
|
304
|
-
const { CliSetup } = await import("../chunk-
|
|
307
|
+
const { createProductSources } = await import("../chunk-jf4r0r44.js");
|
|
308
|
+
const { CliSetup } = await import("../chunk-3dvn33c4.js");
|
|
305
309
|
setup = new CliSetup;
|
|
306
|
-
runtime = (await import("../chunk-
|
|
310
|
+
runtime = (await import("../chunk-0qgk7mhz.js")).createProductionCliRuntime(createProductSources(), setup);
|
|
307
311
|
}
|
|
308
312
|
return runtime;
|
|
309
313
|
}
|
|
@@ -312,7 +316,8 @@ try {
|
|
|
312
316
|
stdin: process.stdin,
|
|
313
317
|
stdout: process.stdout,
|
|
314
318
|
stderr: process.stderr,
|
|
315
|
-
signal: stop.signal
|
|
319
|
+
signal: stop.signal,
|
|
320
|
+
language: resolveCliLanguage2(process.env)
|
|
316
321
|
}, {
|
|
317
322
|
...process.argv[2] === "service" && process.argv[3] !== "--help" ? { service: createProductServiceHost() } : {},
|
|
318
323
|
prepare: async (config, path, io, options) => (await product()).prepare(config, path, io, options),
|
|
@@ -343,4 +348,4 @@ try {
|
|
|
343
348
|
}
|
|
344
349
|
}
|
|
345
350
|
|
|
346
|
-
//# debugId=
|
|
351
|
+
//# debugId=80EA4F16E6397DC764756E2164756E21
|
package/dist/src/mcp/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
HTTP_BODY_BYTES2,
|
|
6
6
|
createHttpFacade2,
|
|
7
7
|
startHttpFacade2
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-9zkq0kc8.js";
|
|
9
9
|
import {
|
|
10
10
|
StoreGatewayService2,
|
|
11
11
|
RuntimeGatewayService2
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-mg0fd6ph.js";
|
|
13
13
|
import {
|
|
14
14
|
MAX_MCP_BYTES2,
|
|
15
15
|
MAX_RESULT_BYTES2,
|
|
@@ -18,11 +18,12 @@ import {
|
|
|
18
18
|
toolDefinition2,
|
|
19
19
|
parseToolArguments2,
|
|
20
20
|
FacadeServiceError2
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-0dqx2mmz.js";
|
|
22
22
|
import {
|
|
23
23
|
MCP_REVISION2,
|
|
24
24
|
PRODUCT_VERSION2
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-s3ydr65k.js";
|
|
26
|
+
import"../chunk-5b8g62kw.js";
|
|
26
27
|
import"../chunk-zj48jvfe.js";
|
|
27
28
|
import"../chunk-0xgpxdgc.js";
|
|
28
29
|
import"../chunk-gbsbwssz.js";
|
|
@@ -57,4 +58,4 @@ export {
|
|
|
57
58
|
toolNames2 as toolNames
|
|
58
59
|
};
|
|
59
60
|
|
|
60
|
-
//# debugId=
|
|
61
|
+
//# debugId=000CCA32D906A2E664756E2164756E21
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
attachExistingLuvus2,
|
|
16
16
|
LuvusProductionStartupError2,
|
|
17
17
|
createLuvusProductionSources2
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-jka7v3wb.js";
|
|
19
19
|
import {
|
|
20
20
|
initializeManagedLuvusRoot2,
|
|
21
21
|
openManagedLuvusRoot2,
|
|
@@ -43,7 +43,7 @@ import"../chunk-gbsbwssz.js";
|
|
|
43
43
|
import"../chunk-q5pgbwb3.js";
|
|
44
44
|
import"../chunk-57ayxqnb.js";
|
|
45
45
|
import"../chunk-3nnahj0j.js";
|
|
46
|
-
import"../chunk-
|
|
46
|
+
import"../chunk-qjh9x872.js";
|
|
47
47
|
import"../chunk-zdxww7ms.js";
|
|
48
48
|
import"../chunk-0pewfj89.js";
|
|
49
49
|
import"../chunk-0y5542k8.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import"../chunk-5b8g62kw.js";
|
|
2
3
|
import {
|
|
3
|
-
SERVICE_HELP2,
|
|
4
4
|
parseServiceCommand2,
|
|
5
5
|
handleServiceCommand2
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-x0td5wn4.js";
|
|
7
7
|
import {
|
|
8
8
|
createNativeServiceBackend2,
|
|
9
9
|
ServiceManager2
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
ServiceError2
|
|
13
13
|
} from "../chunk-wqknkynm.js";
|
|
14
14
|
export {
|
|
15
|
-
SERVICE_HELP2 as SERVICE_HELP,
|
|
16
15
|
ServiceError2 as ServiceError,
|
|
17
16
|
ServiceManager2 as ServiceManager,
|
|
18
17
|
createNativeServiceBackend2 as createNativeServiceBackend,
|
|
@@ -20,4 +19,4 @@ export {
|
|
|
20
19
|
parseServiceCommand2 as parseServiceCommand
|
|
21
20
|
};
|
|
22
21
|
|
|
23
|
-
//# debugId=
|
|
22
|
+
//# debugId=89E2AB8CB22A102364756E2164756E21
|