

























@@ -42,45 +42,22 @@ export async function probeGatewayStatus(opts: {
4242enabled: opts.json !== true,
4343},
4444async () => {
45-if (opts.requireRpc) {
46-const { callGateway } = await import("../../gateway/call.js");
47-await callGateway({
48-url: opts.url,
49-token: opts.token,
50-password: opts.password,
51-tlsFingerprint: opts.tlsFingerprint,
52-method: "status",
53-timeoutMs: opts.timeoutMs,
54- ...(opts.configPath ? { configPath: opts.configPath } : {}),
55-});
56-const { probeGateway } = await loadProbeGatewayModule();
57-const authProbe = await probeGateway({
58-url: opts.url,
59-auth: {
60-token: opts.token,
61-password: opts.password,
62-},
63-tlsFingerprint: opts.tlsFingerprint,
64-timeoutMs: opts.timeoutMs,
65-includeDetails: false,
66-}).catch(() => null);
67-return { ok: true as const, authProbe };
68-}
6945const { probeGateway } = await loadProbeGatewayModule();
70-return await probeGateway({
46+const probe = await probeGateway({
7147url: opts.url,
7248auth: {
7349token: opts.token,
7450password: opts.password,
7551},
7652tlsFingerprint: opts.tlsFingerprint,
7753timeoutMs: opts.timeoutMs,
78-includeDetails: false,
54+includeDetails: opts.requireRpc === true,
55+detailLevel: opts.requireRpc === true ? "full" : "none",
7956});
57+return probe;
8058},
8159);
82-const auth =
83-"auth" in result ? result.auth : "authProbe" in result ? result.authProbe?.auth : undefined;
60+const auth = result.auth;
8461if (result.ok) {
8562return {
8663ok: true,
@@ -89,8 +66,8 @@ export async function probeGatewayStatus(opts: {
8966kind === "read"
9067 ? auth?.capability && auth.capability !== "unknown"
9168 ? auth.capability
92- : // The status RPC proves read access even when a follow-up hello probe
93-// cannot recover richer scope metadata.
69+ : // A successful detailed probe performs read RPCs, so it proves read access
70+// even when hello metadata cannot recover richer scope metadata.
9471"read_only"
9572 : auth?.capability,
9673 auth,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。