@dotobokuri/fleet-console 1.62.0 → 1.63.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 +1 -0
- package/dist/cli.mjs +60 -18
- package/dist/client/assets/{_baseUniq-B6CLI4cf.js → _baseUniq-CVUU389k.js} +1 -1
- package/dist/client/assets/{arc-r3CRqUQ5.js → arc-Fg3WjPoW.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-CJfgw2eJ.js → architectureDiagram-Q4EWVU46-gAB_QWIv.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-CkBuOBUs.js → blockDiagram-DXYQGD6D-DCY_3CSv.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-Ln5TenJL.js → c4Diagram-AHTNJAMY-2ai4d9rg.js} +1 -1
- package/dist/client/assets/channel-DlA1BRCV.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-BiYTw90k.js → chunk-4BX2VUAB-C-sjgNCE.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-nPQaGu1w.js → chunk-4TB4RGXK-Co7w9KaD.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BU2oCJkl.js → chunk-55IACEB6-Dspr2174.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-Ej7y6KOv.js → chunk-EDXVE4YY-UzzG0ax3.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-hOkBpfhE.js → chunk-FMBD7UC4-DKXcUQqJ.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-Cv43HwvT.js → chunk-OYMX7WX6-vW--qrkP.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-Bi7AEJxb.js → chunk-QZHKN3VN-DyE-yBhf.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-CBwmJdga.js → chunk-YZCP3GAM-C7LLTO2-.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-rBpGSdtk.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-rBpGSdtk.js +1 -0
- package/dist/client/assets/clone-_1aYWCbr.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-ERDn7bly.js → cose-bilkent-S5V4N54A-BkDNeJiw.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-DapcbnEu.js → dagre-KV5264BT-DqeN9oF3.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-DbRBVaVH.js → diagram-5BDNPKRD-BXzt4-3Y.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-CLP0MwBH.js → diagram-G4DWMVQ6-DbzDYVOf.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-BMZ9AsEI.js → diagram-MMDJMWI5-wPQu3o7B.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-DtPPkZ2y.js → diagram-TYMM5635-C-vwFwzf.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-DIvbhhTb.js → erDiagram-SMLLAGMA-CcukuTgN.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-C_R3RpTk.js → flowDiagram-DWJPFMVM-BT8ZNr2Y.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-eaIqpHsY.js → ganttDiagram-T4ZO3ILL-B_wNcZrL.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-CYCsHY_E.js → gitGraphDiagram-UUTBAWPF-dUwwvDSd.js} +1 -1
- package/dist/client/assets/{graph-HfvOsgk2.js → graph-C4i_jr7e.js} +1 -1
- package/dist/client/assets/index-BXtDpU36.js +465 -0
- package/dist/client/assets/index-CLb_APbh.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-rmDH5YRZ.js → infoDiagram-42DDH7IO-Bf2KPu0t.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-EAZO3mIY.js → ishikawaDiagram-UXIWVN3A-DjHChg2o.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-4vWYlXOF.js → journeyDiagram-VCZTEJTY-B08epGYF.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-CkkSfsbD.js → kanban-definition-6JOO6SKY-BFasXRgc.js} +1 -1
- package/dist/client/assets/{layout-DWbhbrdO.js → layout-Q_W10VzL.js} +1 -1
- package/dist/client/assets/{linear-BjRBsqi0.js → linear-Dy4fc5kq.js} +1 -1
- package/dist/client/assets/{mermaid.core-RuG-kUU2.js → mermaid.core-OtTy8N5f.js} +4 -4
- package/dist/client/assets/{min-D--jZrv5.js → min-DODD7JTz.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-fLwhQBcX.js → mindmap-definition-QFDTVHPH-DMhpsiYD.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-DJkWnAQK.js → pieDiagram-DEJITSTG-C5usaVgs.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-Kd4q9kEz.js → quadrantDiagram-34T5L4WZ-B-b2NvBz.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-Bgrtq8Kh.js → requirementDiagram-MS252O5E-D6_4jY3n.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-BW9BdQ-8.js → sankeyDiagram-XADWPNL6-B6imEhCV.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-KpgcxIJb.js → sequenceDiagram-FGHM5R23-BRHNnuqK.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-CNaCHtL2.js → stateDiagram-FHFEXIEX-RiIddIHL.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CsHfIgMa.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-MGPKEXGI.js → timeline-definition-GMOUNBTQ-BhP14Blt.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-bDOCVDJ1.js → vennDiagram-DHZGUBPP-CtzwrBNs.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-DuvLJQPg.js → wardley-RL74JXVD-TXsee18-.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-BdBIEtIl.js → wardleyDiagram-NUSXRM2D-CrJP7pf7.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-vycMI6c3.js → xychartDiagram-5P7HB3ND-rB-PigjI.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/fleet-plugins/ledger/routes.mjs +7 -12
- package/dist/fleet-plugins/quota/routes.mjs +7 -12
- package/dist/fleet-plugins/scuttlebutt/routes.mjs +44 -15
- package/dist/fleet-plugins/terminal/routes.mjs +300 -88
- package/dist/fleet.mjs +443 -222
- package/package.json +1 -1
- package/dist/client/assets/channel-DBCxCWtI.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-QQSWiJjR.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-QQSWiJjR.js +0 -1
- package/dist/client/assets/clone-vom5rXcJ.js +0 -1
- package/dist/client/assets/index-C2erdgSj.css +0 -1
- package/dist/client/assets/index-CrEYBugN.js +0 -465
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-D3k4sLJ4.js +0 -1
package/dist/fleet.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import os3__default, { tmpdir } from 'node:os';
|
|
|
4
4
|
import * as path24 from 'node:path';
|
|
5
5
|
import path24__default, { join, resolve, relative, sep } from 'node:path';
|
|
6
6
|
import * as fs9 from 'node:fs';
|
|
7
|
-
import fs9__default, { mkdirSync, mkdtempSync, writeFileSync, rmSync, chmodSync, renameSync, readdirSync,
|
|
7
|
+
import fs9__default, { mkdirSync, mkdtempSync, writeFileSync, rmSync, chmodSync, renameSync, readdirSync, existsSync, lstatSync, accessSync, constants as constants$1, realpathSync, openSync, closeSync, readFileSync } from 'node:fs';
|
|
8
8
|
import crypto9, { randomUUID as randomUUID$1, createHash as createHash$1 } from 'node:crypto';
|
|
9
9
|
import http from 'node:http';
|
|
10
|
-
import { spawn, execFileSync } from 'node:child_process';
|
|
10
|
+
import { spawn, execFileSync, execFile as execFile$1 } from 'node:child_process';
|
|
11
11
|
import { builtinModules, createRequire } from 'node:module';
|
|
12
12
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
13
13
|
import * as fs32 from 'fs';
|
|
@@ -1536,6 +1536,40 @@ var init_check = __esm({
|
|
|
1536
1536
|
init_registry2();
|
|
1537
1537
|
}
|
|
1538
1538
|
});
|
|
1539
|
+
|
|
1540
|
+
// cli/update/check-report.ts
|
|
1541
|
+
var check_report_exports = {};
|
|
1542
|
+
__export(check_report_exports, {
|
|
1543
|
+
runFleetUpdateCheck: () => runFleetUpdateCheck
|
|
1544
|
+
});
|
|
1545
|
+
async function runFleetUpdateCheck(io) {
|
|
1546
|
+
const release = readFleetCliRelease();
|
|
1547
|
+
if (release.channel === "local") {
|
|
1548
|
+
io.stdout.write(`Fleet is running from a local development build (v${release.version}) \u2014 nothing to update here.
|
|
1549
|
+
`);
|
|
1550
|
+
return 0;
|
|
1551
|
+
}
|
|
1552
|
+
const result = await checkUpdateStatus(release, { forceRefresh: true }).catch(() => ({ status: "unavailable" }));
|
|
1553
|
+
if (result.status === "current") {
|
|
1554
|
+
io.stdout.write(`Fleet is already on the latest version (v${release.version}).
|
|
1555
|
+
`);
|
|
1556
|
+
return 0;
|
|
1557
|
+
}
|
|
1558
|
+
if (result.status === "update") {
|
|
1559
|
+
io.stdout.write(`A newer Fleet version is available: v${result.latest} (installed v${release.version}).
|
|
1560
|
+
Run fleet update to install it.
|
|
1561
|
+
`);
|
|
1562
|
+
return 0;
|
|
1563
|
+
}
|
|
1564
|
+
io.stdout.write("Could not reach the npm registry to check for updates.\n");
|
|
1565
|
+
return 1;
|
|
1566
|
+
}
|
|
1567
|
+
var init_check_report = __esm({
|
|
1568
|
+
"cli/update/check-report.ts"() {
|
|
1569
|
+
init_release();
|
|
1570
|
+
init_check();
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1539
1573
|
async function stopRunningConsoleBeforeUpdate(io, deps = {}) {
|
|
1540
1574
|
const env = deps.env ?? process.env;
|
|
1541
1575
|
const siblingCliPath = deps.siblingCliPath ?? resolveSiblingConsoleCliPath();
|
|
@@ -21905,8 +21939,8 @@ function isClaudeTextBlock(block) {
|
|
|
21905
21939
|
}
|
|
21906
21940
|
function claudeSkillNameFromBody(text) {
|
|
21907
21941
|
const breakAt = text.indexOf("\n");
|
|
21908
|
-
const
|
|
21909
|
-
const directory =
|
|
21942
|
+
const firstLine2 = breakAt === -1 ? text : text.slice(0, breakAt);
|
|
21943
|
+
const directory = firstLine2.slice(CLAUDE_SKILL_BODY_PREFIX.length).trim();
|
|
21910
21944
|
const segments = directory.split("/").filter((segment) => segment.length > 0);
|
|
21911
21945
|
return segments[segments.length - 1] ?? "";
|
|
21912
21946
|
}
|
|
@@ -22188,12 +22222,12 @@ var benchmarks_default = {
|
|
|
22188
22222
|
};
|
|
22189
22223
|
var models_default = {
|
|
22190
22224
|
version: 1,
|
|
22191
|
-
updatedAt: "2026-08-
|
|
22225
|
+
updatedAt: "2026-08-17T00:00:00Z",
|
|
22192
22226
|
providers: {
|
|
22193
22227
|
codex: {
|
|
22194
22228
|
name: "Codex",
|
|
22195
22229
|
defaultModel: "gpt-5.6-sol",
|
|
22196
|
-
source: "codex app-server model/list (codex-cli 0.147.0, 2026-08-11
|
|
22230
|
+
source: "codex app-server model/list (codex-cli 0.147.0, observed 2026-08-11) for model/effort/service-tier; Fleet catalog effort ladders are capped at max because harness launch capabilities are not model rungs; contextWindow=272000 is codex debug models context_window/max_context_window (codex-cli 0.146.0, observed 2026-08-02)",
|
|
22197
22231
|
models: [
|
|
22198
22232
|
{
|
|
22199
22233
|
modelId: "gpt-5.6-sol",
|
|
@@ -22207,8 +22241,7 @@ var models_default = {
|
|
|
22207
22241
|
"medium",
|
|
22208
22242
|
"high",
|
|
22209
22243
|
"xhigh",
|
|
22210
|
-
"max"
|
|
22211
|
-
"ultra"
|
|
22244
|
+
"max"
|
|
22212
22245
|
]
|
|
22213
22246
|
},
|
|
22214
22247
|
aliases: [
|
|
@@ -22230,8 +22263,7 @@ var models_default = {
|
|
|
22230
22263
|
"medium",
|
|
22231
22264
|
"high",
|
|
22232
22265
|
"xhigh",
|
|
22233
|
-
"max"
|
|
22234
|
-
"ultra"
|
|
22266
|
+
"max"
|
|
22235
22267
|
]
|
|
22236
22268
|
},
|
|
22237
22269
|
aliases: [
|
|
@@ -22251,8 +22283,7 @@ var models_default = {
|
|
|
22251
22283
|
"medium",
|
|
22252
22284
|
"high",
|
|
22253
22285
|
"xhigh",
|
|
22254
|
-
"max"
|
|
22255
|
-
"ultra"
|
|
22286
|
+
"max"
|
|
22256
22287
|
]
|
|
22257
22288
|
},
|
|
22258
22289
|
aliases: [
|
|
@@ -22274,8 +22305,7 @@ var models_default = {
|
|
|
22274
22305
|
"medium",
|
|
22275
22306
|
"high",
|
|
22276
22307
|
"xhigh",
|
|
22277
|
-
"max"
|
|
22278
|
-
"ultra"
|
|
22308
|
+
"max"
|
|
22279
22309
|
]
|
|
22280
22310
|
},
|
|
22281
22311
|
aliases: [
|
|
@@ -22807,8 +22837,7 @@ var GATEWAY_REASONING_EFFORTS = [
|
|
|
22807
22837
|
"medium",
|
|
22808
22838
|
"high",
|
|
22809
22839
|
"xhigh",
|
|
22810
|
-
"max"
|
|
22811
|
-
"ultra"
|
|
22840
|
+
"max"
|
|
22812
22841
|
];
|
|
22813
22842
|
var GatewayEffortUpstreamModelIdsSchema = external_exports.partialRecord(
|
|
22814
22843
|
external_exports.enum(GATEWAY_REASONING_EFFORTS),
|
|
@@ -23235,8 +23264,7 @@ var ANTHROPIC_EFFORT_RUNGS = /* @__PURE__ */ new Set([
|
|
|
23235
23264
|
"medium",
|
|
23236
23265
|
"high",
|
|
23237
23266
|
"xhigh",
|
|
23238
|
-
"max"
|
|
23239
|
-
"ultra"
|
|
23267
|
+
"max"
|
|
23240
23268
|
]);
|
|
23241
23269
|
function freezeGatewayModelEffort(effort) {
|
|
23242
23270
|
if (!effort?.supported) return UNSUPPORTED_GATEWAY_MODEL_EFFORT;
|
|
@@ -33957,11 +33985,10 @@ var GENERAL_PURPOSE_AGENT_PROMPT = [
|
|
|
33957
33985
|
].join("\n");
|
|
33958
33986
|
var FLEET_PLUGIN_NAME = "fleet";
|
|
33959
33987
|
function exposedEffortLadder(modelId, ladder, exposure) {
|
|
33960
|
-
const deliverable = ladder.filter((rung) => rung !== "ultra");
|
|
33961
33988
|
const chosen = exposure?.[modelId];
|
|
33962
|
-
if (chosen === void 0 || chosen.length === 0) return
|
|
33963
|
-
const narrowed =
|
|
33964
|
-
return narrowed.length > 0 ? narrowed :
|
|
33989
|
+
if (chosen === void 0 || chosen.length === 0) return ladder;
|
|
33990
|
+
const narrowed = ladder.filter((rung) => chosen.includes(rung));
|
|
33991
|
+
return narrowed.length > 0 ? narrowed : ladder;
|
|
33965
33992
|
}
|
|
33966
33993
|
function buildGatewayCustomAgents(exposed, exposure) {
|
|
33967
33994
|
const agents = {};
|
|
@@ -37201,9 +37228,9 @@ async function writeAtomic(filePath, content, paths) {
|
|
|
37201
37228
|
await rename(tempPath, filePath);
|
|
37202
37229
|
}
|
|
37203
37230
|
function summarizeWikiEntry(body2) {
|
|
37204
|
-
const
|
|
37205
|
-
if (!
|
|
37206
|
-
return normalizeSummaryWhitespace(
|
|
37231
|
+
const firstLine2 = body2.split(/\r?\n/).map((line) => line.trim()).find((line) => line.length > 0);
|
|
37232
|
+
if (!firstLine2) return "";
|
|
37233
|
+
return normalizeSummaryWhitespace(firstLine2).slice(0, 160);
|
|
37207
37234
|
}
|
|
37208
37235
|
function normalizeSummaryWhitespace(value) {
|
|
37209
37236
|
return value.replace(/\s+/g, " ").trim();
|
|
@@ -46969,9 +46996,11 @@ var AUTH_CLI_OPTIONS = Object.keys(AUTH_CLI_DEFINITIONS).map((value) => ({
|
|
|
46969
46996
|
label: AUTH_CLI_DEFINITIONS[value].label
|
|
46970
46997
|
}));
|
|
46971
46998
|
async function runAuthLoginFlow(argv, io, deps) {
|
|
46972
|
-
const selectedCli =
|
|
46973
|
-
if (
|
|
46974
|
-
const
|
|
46999
|
+
const selectedCli = resolveAuthCliId(argv[0], io);
|
|
47000
|
+
if (selectedCli === "invalid") return 1;
|
|
47001
|
+
const chosen = selectedCli ?? await promptForCli();
|
|
47002
|
+
if (!chosen) return cancelAuthCommand();
|
|
47003
|
+
const definition = AUTH_CLI_DEFINITIONS[chosen];
|
|
46975
47004
|
const apiKey = await Ce({
|
|
46976
47005
|
message: `Enter the ${definition.shortName} API key`,
|
|
46977
47006
|
mask: "*"
|
|
@@ -46996,6 +47025,15 @@ function getAuthCliOptions() {
|
|
|
46996
47025
|
function parseAuthCliId(value) {
|
|
46997
47026
|
return value !== void 0 && value in AUTH_CLI_DEFINITIONS ? value : void 0;
|
|
46998
47027
|
}
|
|
47028
|
+
function resolveAuthCliId(value, io) {
|
|
47029
|
+
if (value === void 0) return void 0;
|
|
47030
|
+
const parsed = parseAuthCliId(value);
|
|
47031
|
+
if (parsed) return parsed;
|
|
47032
|
+
io.stderr.write(`Unknown fleet auth provider: ${value}
|
|
47033
|
+
Use kimi or opencode.
|
|
47034
|
+
`);
|
|
47035
|
+
return "invalid";
|
|
47036
|
+
}
|
|
46999
47037
|
async function promptForCli() {
|
|
47000
47038
|
const selected = await xe({
|
|
47001
47039
|
message: "Select an authentication provider",
|
|
@@ -47049,12 +47087,14 @@ async function listAuthProviders(io, deps) {
|
|
|
47049
47087
|
return 0;
|
|
47050
47088
|
}
|
|
47051
47089
|
async function logoutAuthProvider(argv, io, deps) {
|
|
47052
|
-
const selectedCli =
|
|
47053
|
-
if (
|
|
47090
|
+
const selectedCli = resolveAuthCliId(argv[0], io);
|
|
47091
|
+
if (selectedCli === "invalid") return 1;
|
|
47092
|
+
const chosen = selectedCli ?? await promptForLogoutCli();
|
|
47093
|
+
if (!chosen) {
|
|
47054
47094
|
me("Authentication cancelled.");
|
|
47055
47095
|
return 1;
|
|
47056
47096
|
}
|
|
47057
|
-
const definition = AUTH_CLI_DEFINITIONS[
|
|
47097
|
+
const definition = AUTH_CLI_DEFINITIONS[chosen];
|
|
47058
47098
|
await deps.authService.deleteApiKey(definition.providerId);
|
|
47059
47099
|
io.stdout.write(`${definition.label} signed out.
|
|
47060
47100
|
`);
|
|
@@ -47121,6 +47161,14 @@ var ASCII_FLEET_BANNER = [
|
|
|
47121
47161
|
|
|
47122
47162
|
// cli/cli-args.ts
|
|
47123
47163
|
init_release();
|
|
47164
|
+
function isFleetVersionArg(value) {
|
|
47165
|
+
return value === "--version" || value === "-v" || value === "version";
|
|
47166
|
+
}
|
|
47167
|
+
function buildFleetVersionText(release = readFleetCliRelease()) {
|
|
47168
|
+
return `@dotobokuri/fleet-console ${release.version} (${release.channel})
|
|
47169
|
+
Claude Code version: fleet cli --version
|
|
47170
|
+
`;
|
|
47171
|
+
}
|
|
47124
47172
|
var HELP_BANNER_INDENT = " ";
|
|
47125
47173
|
function buildFleetHelpText(options = {}) {
|
|
47126
47174
|
const release = options.release ?? readFleetCliRelease();
|
|
@@ -47137,16 +47185,23 @@ function buildFleetHelpText(options = {}) {
|
|
|
47137
47185
|
` ${command("fleet cli", colorEnabled)} ${dim("[claude args...]", colorEnabled)}`,
|
|
47138
47186
|
` ${command("fleet console", colorEnabled)} ${dim("[start|stop|restart|status] [--help]", colorEnabled)}`,
|
|
47139
47187
|
` ${command("fleet auth", colorEnabled)} ${dim("login|list|logout", colorEnabled)}`,
|
|
47140
|
-
` ${command("fleet update", colorEnabled)}`,
|
|
47188
|
+
` ${command("fleet update", colorEnabled)} ${dim("[--check]", colorEnabled)}`,
|
|
47189
|
+
` ${command("fleet version", colorEnabled)}`,
|
|
47190
|
+
` ${command("fleet doctor", colorEnabled)}`,
|
|
47191
|
+
` ${command("fleet status", colorEnabled)}`,
|
|
47141
47192
|
"",
|
|
47142
47193
|
section("COMMANDS", colorEnabled),
|
|
47143
47194
|
` ${command("cli", colorEnabled)} ${dim("Launch Claude Code through the thin Fleet gateway (synonym of bare fleet).", colorEnabled)}`,
|
|
47144
47195
|
` ${command("console", colorEnabled)} ${dim("Manage the local Fleet Console server.", colorEnabled)}`,
|
|
47145
47196
|
` ${command("auth", colorEnabled)} ${dim("Manage AI Gateway provider authentication.", colorEnabled)}`,
|
|
47146
47197
|
` ${command("update", colorEnabled)} ${dim("Update the Fleet Console package (owns fleet and fleet-console).", colorEnabled)}`,
|
|
47198
|
+
` ${command("version", colorEnabled)} ${dim("Print the Fleet package version and exit.", colorEnabled)}`,
|
|
47199
|
+
` ${command("doctor", colorEnabled)} ${dim("Report install, PATH, auth, and Console health without changing anything.", colorEnabled)}`,
|
|
47200
|
+
` ${command("status", colorEnabled)} ${dim("Show the local Fleet Console server status (same as fleet console status).", colorEnabled)}`,
|
|
47147
47201
|
"",
|
|
47148
47202
|
section("OPTIONS", colorEnabled),
|
|
47149
47203
|
` ${option("-h, --help", colorEnabled)} ${dim("Show this help message and exit.", colorEnabled)}`,
|
|
47204
|
+
` ${option("-v, --version", colorEnabled)} ${dim("Print the Fleet package version and exit.", colorEnabled)}`,
|
|
47150
47205
|
` ${dim("Unrecognized arguments are passed through to Claude Code.", colorEnabled)}`,
|
|
47151
47206
|
""
|
|
47152
47207
|
];
|
|
@@ -47154,6 +47209,196 @@ function buildFleetHelpText(options = {}) {
|
|
|
47154
47209
|
return colorEnabled ? text : stripAnsi(text);
|
|
47155
47210
|
}
|
|
47156
47211
|
|
|
47212
|
+
// cli/doctor.ts
|
|
47213
|
+
init_src();
|
|
47214
|
+
init_release();
|
|
47215
|
+
var DESKTOP_PROTOCOL_VERSION = 1;
|
|
47216
|
+
var DESKTOP_RESOURCE_ROOT_ENV = "FLEET_CONSOLE_RESOURCE_ROOT";
|
|
47217
|
+
var DESKTOP_OWNER_ID_ENV = "FLEET_CONSOLE_OWNER_ID";
|
|
47218
|
+
var DESKTOP_OWNER_KIND_ENV = "FLEET_CONSOLE_OWNER_KIND";
|
|
47219
|
+
var DESKTOP_PROTOCOL_VERSION_ENV = "FLEET_CONSOLE_PROTOCOL_VERSION";
|
|
47220
|
+
var DESKTOP_RESOURCE_ROOT_MARKER = ".fleet-console-resource-root";
|
|
47221
|
+
var DESKTOP_DEVELOPMENT_ENV = "FLEET_CONSOLE_DESKTOP_DEVELOPMENT";
|
|
47222
|
+
var LOCK_DIR_NAME3 = "fleet-console";
|
|
47223
|
+
var LOCK_FILE_NAME = "console.lock";
|
|
47224
|
+
var CONSOLE_DATA_DIR_NAME = "console";
|
|
47225
|
+
var CONSOLE_STATE_FILE_NAME = "state.json";
|
|
47226
|
+
var CONSOLE_SETTINGS_FILE_NAME = "settings.json";
|
|
47227
|
+
var CONSOLE_CAPTURES_DIR_NAME = "captures";
|
|
47228
|
+
function isDesktopDevelopmentEnvironment(env) {
|
|
47229
|
+
return env[DESKTOP_DEVELOPMENT_ENV] === "1";
|
|
47230
|
+
}
|
|
47231
|
+
function resolveCanonicalStableConsolePaths(input) {
|
|
47232
|
+
const dir = input.consoleDirOverride ?? path24__default.join(input.tmpDir, `${LOCK_DIR_NAME3}-${input.uid}-stable`);
|
|
47233
|
+
const dataDir = input.consoleDirOverride ?? path24__default.join(input.fleetDataDir, CONSOLE_DATA_DIR_NAME);
|
|
47234
|
+
return {
|
|
47235
|
+
dir,
|
|
47236
|
+
lockFile: path24__default.join(dir, LOCK_FILE_NAME),
|
|
47237
|
+
dataDir,
|
|
47238
|
+
stateFile: path24__default.join(dataDir, CONSOLE_STATE_FILE_NAME),
|
|
47239
|
+
settingsFile: path24__default.join(dataDir, CONSOLE_SETTINGS_FILE_NAME),
|
|
47240
|
+
capturesDir: path24__default.join(dataDir, CONSOLE_CAPTURES_DIR_NAME)
|
|
47241
|
+
};
|
|
47242
|
+
}
|
|
47243
|
+
function resolveCanonicalLocalConsolePaths(input) {
|
|
47244
|
+
const dir = path24__default.join(path24__default.resolve(input.packageRoot, "..", ".."), ".fleet", CONSOLE_DATA_DIR_NAME);
|
|
47245
|
+
return {
|
|
47246
|
+
dir,
|
|
47247
|
+
lockFile: path24__default.join(dir, LOCK_FILE_NAME),
|
|
47248
|
+
dataDir: dir,
|
|
47249
|
+
stateFile: path24__default.join(dir, CONSOLE_STATE_FILE_NAME),
|
|
47250
|
+
settingsFile: path24__default.join(dir, CONSOLE_SETTINGS_FILE_NAME),
|
|
47251
|
+
capturesDir: path24__default.join(dir, CONSOLE_CAPTURES_DIR_NAME)
|
|
47252
|
+
};
|
|
47253
|
+
}
|
|
47254
|
+
function isDesktopResourceRootMarkerValid(content) {
|
|
47255
|
+
return content.trim() === String(DESKTOP_PROTOCOL_VERSION);
|
|
47256
|
+
}
|
|
47257
|
+
|
|
47258
|
+
// core/host/desktop-protocol.ts
|
|
47259
|
+
function readDesktopProtocolEnvironment(env = process.env, deps = {}) {
|
|
47260
|
+
const resourceRoot = env[DESKTOP_RESOURCE_ROOT_ENV];
|
|
47261
|
+
const ownerId = env[DESKTOP_OWNER_ID_ENV];
|
|
47262
|
+
const ownerKind = env[DESKTOP_OWNER_KIND_ENV];
|
|
47263
|
+
const protocolVersion = env[DESKTOP_PROTOCOL_VERSION_ENV];
|
|
47264
|
+
const values = [resourceRoot, ownerId, ownerKind, protocolVersion];
|
|
47265
|
+
if (values.every((value) => value === void 0)) return null;
|
|
47266
|
+
if (values.some((value) => !value)) throw new Error("desktop_protocol_environment_incomplete");
|
|
47267
|
+
if (ownerKind !== "desktop") throw new Error("desktop_owner_kind_invalid");
|
|
47268
|
+
if (!isSafeOwnerId(ownerId)) throw new Error("desktop_owner_id_invalid");
|
|
47269
|
+
if (protocolVersion !== String(DESKTOP_PROTOCOL_VERSION)) throw new Error("desktop_protocol_version_unsupported");
|
|
47270
|
+
const resolvedRoot = isDesktopDevelopmentEnvironment2(env) ? validateDesktopDevelopmentResourceRoot(resourceRoot) : validateDesktopResourceRoot(resourceRoot, deps.expectedPackageRoot);
|
|
47271
|
+
return { owner: { kind: "desktop", id: ownerId, protocolVersion: DESKTOP_PROTOCOL_VERSION }, resourceRoot: resolvedRoot };
|
|
47272
|
+
}
|
|
47273
|
+
function isDesktopDevelopmentEnvironment2(env = process.env) {
|
|
47274
|
+
return isDesktopDevelopmentEnvironment(env);
|
|
47275
|
+
}
|
|
47276
|
+
function validateDesktopResourceRoot(root, expectedPackageRoot = resolveDesktopProtocolPackageRoot()) {
|
|
47277
|
+
if (!path24__default.isAbsolute(root)) throw new Error("desktop_resource_root_not_absolute");
|
|
47278
|
+
const resolvedRoot = fs9__default.realpathSync(root);
|
|
47279
|
+
const expectedRoot = fs9__default.realpathSync(expectedPackageRoot);
|
|
47280
|
+
if (resolvedRoot !== expectedRoot) throw new Error("desktop_resource_root_invalid");
|
|
47281
|
+
const markerPath = path24__default.join(resolvedRoot, DESKTOP_RESOURCE_ROOT_MARKER);
|
|
47282
|
+
const marker = fs9__default.readFileSync(markerPath, "utf8");
|
|
47283
|
+
if (!isDesktopResourceRootMarkerValid(marker)) throw new Error("desktop_resource_root_marker_invalid");
|
|
47284
|
+
return resolvedRoot;
|
|
47285
|
+
}
|
|
47286
|
+
function validateDesktopDevelopmentResourceRoot(root) {
|
|
47287
|
+
if (!path24__default.isAbsolute(root)) throw new Error("desktop_resource_root_not_absolute");
|
|
47288
|
+
let resolvedRoot;
|
|
47289
|
+
try {
|
|
47290
|
+
resolvedRoot = fs9__default.realpathSync(root);
|
|
47291
|
+
} catch {
|
|
47292
|
+
throw new Error("desktop_development_resource_root_invalid");
|
|
47293
|
+
}
|
|
47294
|
+
const expectedRoot = fs9__default.realpathSync(resolveDesktopProtocolPackageRoot());
|
|
47295
|
+
if (resolvedRoot !== expectedRoot) throw new Error("desktop_development_resource_root_invalid");
|
|
47296
|
+
return resolvedRoot;
|
|
47297
|
+
}
|
|
47298
|
+
function resolveDesktopProtocolPackageRoot() {
|
|
47299
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
47300
|
+
for (const candidate of ["../package.json", "../../package.json"]) {
|
|
47301
|
+
try {
|
|
47302
|
+
return path24__default.dirname(requireFromHere.resolve(candidate));
|
|
47303
|
+
} catch (error51) {
|
|
47304
|
+
if (error51.code !== "MODULE_NOT_FOUND") throw error51;
|
|
47305
|
+
}
|
|
47306
|
+
}
|
|
47307
|
+
throw new Error("fleet_console_package_json_not_found");
|
|
47308
|
+
}
|
|
47309
|
+
function isSafeOwnerId(value) {
|
|
47310
|
+
return value.length > 0 && value.length <= 256 && /^[A-Za-z0-9._-]+$/.test(value);
|
|
47311
|
+
}
|
|
47312
|
+
function readFleetConsoleRelease(env = process.env) {
|
|
47313
|
+
const desktop = readDesktopProtocolEnvironment(env);
|
|
47314
|
+
if (desktop) return readReleaseAt(desktop.resourceRoot, readPackageChannel(desktop.resourceRoot));
|
|
47315
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
47316
|
+
const packageJsonPath = resolvePackageJsonPath(requireFromHere);
|
|
47317
|
+
const packageRoot = path24__default.dirname(packageJsonPath);
|
|
47318
|
+
return readReleaseAt(packageRoot, readPackageChannel(packageRoot, requireFromHere), requireFromHere);
|
|
47319
|
+
}
|
|
47320
|
+
function readPackageChannel(packageRoot, requireFromHere = createRequire(import.meta.url)) {
|
|
47321
|
+
const pkg = requireFromHere(path24__default.join(packageRoot, "package.json"));
|
|
47322
|
+
return pkg.private === true ? "local" : "stable";
|
|
47323
|
+
}
|
|
47324
|
+
function readReleaseAt(packageRoot, channel, requireFromHere = createRequire(import.meta.url)) {
|
|
47325
|
+
const packageJsonPath = path24__default.join(packageRoot, "package.json");
|
|
47326
|
+
const pkg = requireFromHere(packageJsonPath);
|
|
47327
|
+
return { channel, version: pkg.version ?? "", packageRoot };
|
|
47328
|
+
}
|
|
47329
|
+
function resolvePackageJsonPath(requireFromHere) {
|
|
47330
|
+
for (const candidate of ["../package.json", "../../package.json"]) {
|
|
47331
|
+
try {
|
|
47332
|
+
return requireFromHere.resolve(candidate);
|
|
47333
|
+
} catch (error51) {
|
|
47334
|
+
if (error51.code !== "MODULE_NOT_FOUND") throw error51;
|
|
47335
|
+
}
|
|
47336
|
+
}
|
|
47337
|
+
throw new Error("fleet_console_package_json_not_found");
|
|
47338
|
+
}
|
|
47339
|
+
|
|
47340
|
+
// core/host/paths.ts
|
|
47341
|
+
var CONSOLE_RUNTIME_DIR_NAME = "console";
|
|
47342
|
+
var CONSOLE_DATA_DIR_NAME2 = "console";
|
|
47343
|
+
var CONSOLE_STATE_FILE_NAME2 = "state.json";
|
|
47344
|
+
var CONSOLE_SETTINGS_FILE_NAME2 = "settings.json";
|
|
47345
|
+
var CONSOLE_DATA_DIR_ENV = "FLEET_CONSOLE_DATA_DIR";
|
|
47346
|
+
var LEGACY_CONSOLE_DATA_DIR_ENV = "FLEET_CONSOLE_DIR";
|
|
47347
|
+
function readConsoleDirOverride(env) {
|
|
47348
|
+
return env[CONSOLE_DATA_DIR_ENV] ?? env[LEGACY_CONSOLE_DATA_DIR_ENV];
|
|
47349
|
+
}
|
|
47350
|
+
function createConsolePaths(deps = {}) {
|
|
47351
|
+
const env = deps.env ?? process.env;
|
|
47352
|
+
const base = readConsoleDirOverride(env) ?? defaultConsoleBaseDir(deps);
|
|
47353
|
+
return { dir: base, lockFile: path24__default.join(base, "console.lock") };
|
|
47354
|
+
}
|
|
47355
|
+
function createConsoleDataPaths(deps = {}) {
|
|
47356
|
+
const dir = defaultConsoleDataBaseDir(deps);
|
|
47357
|
+
return {
|
|
47358
|
+
dir,
|
|
47359
|
+
stateFile: path24__default.join(dir, CONSOLE_STATE_FILE_NAME2),
|
|
47360
|
+
settingsFile: path24__default.join(dir, CONSOLE_SETTINGS_FILE_NAME2)
|
|
47361
|
+
};
|
|
47362
|
+
}
|
|
47363
|
+
function defaultConsoleBaseDir(deps) {
|
|
47364
|
+
let release;
|
|
47365
|
+
const channel = deps.channel ?? (release = readFleetConsoleRelease()).channel;
|
|
47366
|
+
if (channel === "local") {
|
|
47367
|
+
const packageRoot = deps.packageRoot ?? (release ??= readFleetConsoleRelease()).packageRoot;
|
|
47368
|
+
return localConsoleDir(packageRoot);
|
|
47369
|
+
}
|
|
47370
|
+
const uid = deps.uid ?? (typeof process.getuid === "function" ? process.getuid() : 0);
|
|
47371
|
+
return resolveCanonicalStableConsolePaths({
|
|
47372
|
+
tmpDir: os3__default.tmpdir(),
|
|
47373
|
+
uid,
|
|
47374
|
+
fleetDataDir: getFleetDataDir()
|
|
47375
|
+
}).dir;
|
|
47376
|
+
}
|
|
47377
|
+
function defaultConsoleDataBaseDir(deps) {
|
|
47378
|
+
if (deps.fleetDataDir !== void 0) {
|
|
47379
|
+
return path24__default.join(deps.fleetDataDir, CONSOLE_DATA_DIR_NAME2);
|
|
47380
|
+
}
|
|
47381
|
+
const env = deps.env ?? process.env;
|
|
47382
|
+
const override = readConsoleDirOverride(env);
|
|
47383
|
+
if (override) {
|
|
47384
|
+
return override;
|
|
47385
|
+
}
|
|
47386
|
+
let release;
|
|
47387
|
+
const channel = deps.channel ?? (release = readFleetConsoleRelease()).channel;
|
|
47388
|
+
if (channel === "local") {
|
|
47389
|
+
const packageRoot = deps.packageRoot ?? (release ??= readFleetConsoleRelease()).packageRoot;
|
|
47390
|
+
return localConsoleDir(packageRoot);
|
|
47391
|
+
}
|
|
47392
|
+
return resolveCanonicalStableConsolePaths({
|
|
47393
|
+
tmpDir: os3__default.tmpdir(),
|
|
47394
|
+
uid: typeof process.getuid === "function" ? process.getuid() : 0,
|
|
47395
|
+
fleetDataDir: getFleetDataDir()
|
|
47396
|
+
}).dataDir;
|
|
47397
|
+
}
|
|
47398
|
+
function localConsoleDir(packageRoot) {
|
|
47399
|
+
return path24__default.join(path24__default.resolve(packageRoot, "..", ".."), ".fleet", CONSOLE_RUNTIME_DIR_NAME);
|
|
47400
|
+
}
|
|
47401
|
+
|
|
47157
47402
|
// core/host/console-lifecycle.ts
|
|
47158
47403
|
init_src();
|
|
47159
47404
|
var SPAWN_GRACE_MS = 250;
|
|
@@ -47269,6 +47514,9 @@ function createConsoleHealthClient(deps = {}) {
|
|
|
47269
47514
|
}
|
|
47270
47515
|
return { probe };
|
|
47271
47516
|
}
|
|
47517
|
+
|
|
47518
|
+
// core/host/console-lifecycle.ts
|
|
47519
|
+
init_release();
|
|
47272
47520
|
var LOCK_DIR_MODE = 448;
|
|
47273
47521
|
var LOCK_FILE_MODE = 384;
|
|
47274
47522
|
function createConsoleLock(deps = {}) {
|
|
@@ -47370,192 +47618,6 @@ function createConsoleLock(deps = {}) {
|
|
|
47370
47618
|
}
|
|
47371
47619
|
return { ensureLockDir, readLock: readLock2, writeLock, removeLock, assertLockModes, assertTrustedLock };
|
|
47372
47620
|
}
|
|
47373
|
-
var DESKTOP_PROTOCOL_VERSION = 1;
|
|
47374
|
-
var DESKTOP_RESOURCE_ROOT_ENV = "FLEET_CONSOLE_RESOURCE_ROOT";
|
|
47375
|
-
var DESKTOP_OWNER_ID_ENV = "FLEET_CONSOLE_OWNER_ID";
|
|
47376
|
-
var DESKTOP_OWNER_KIND_ENV = "FLEET_CONSOLE_OWNER_KIND";
|
|
47377
|
-
var DESKTOP_PROTOCOL_VERSION_ENV = "FLEET_CONSOLE_PROTOCOL_VERSION";
|
|
47378
|
-
var DESKTOP_RESOURCE_ROOT_MARKER = ".fleet-console-resource-root";
|
|
47379
|
-
var DESKTOP_DEVELOPMENT_ENV = "FLEET_CONSOLE_DESKTOP_DEVELOPMENT";
|
|
47380
|
-
var LOCK_DIR_NAME3 = "fleet-console";
|
|
47381
|
-
var LOCK_FILE_NAME = "console.lock";
|
|
47382
|
-
var CONSOLE_DATA_DIR_NAME = "console";
|
|
47383
|
-
var CONSOLE_STATE_FILE_NAME = "state.json";
|
|
47384
|
-
var CONSOLE_SETTINGS_FILE_NAME = "settings.json";
|
|
47385
|
-
var CONSOLE_CAPTURES_DIR_NAME = "captures";
|
|
47386
|
-
function isDesktopDevelopmentEnvironment(env) {
|
|
47387
|
-
return env[DESKTOP_DEVELOPMENT_ENV] === "1";
|
|
47388
|
-
}
|
|
47389
|
-
function resolveCanonicalStableConsolePaths(input) {
|
|
47390
|
-
const dir = input.consoleDirOverride ?? path24__default.join(input.tmpDir, `${LOCK_DIR_NAME3}-${input.uid}-stable`);
|
|
47391
|
-
const dataDir = input.consoleDirOverride ?? path24__default.join(input.fleetDataDir, CONSOLE_DATA_DIR_NAME);
|
|
47392
|
-
return {
|
|
47393
|
-
dir,
|
|
47394
|
-
lockFile: path24__default.join(dir, LOCK_FILE_NAME),
|
|
47395
|
-
dataDir,
|
|
47396
|
-
stateFile: path24__default.join(dataDir, CONSOLE_STATE_FILE_NAME),
|
|
47397
|
-
settingsFile: path24__default.join(dataDir, CONSOLE_SETTINGS_FILE_NAME),
|
|
47398
|
-
capturesDir: path24__default.join(dataDir, CONSOLE_CAPTURES_DIR_NAME)
|
|
47399
|
-
};
|
|
47400
|
-
}
|
|
47401
|
-
function resolveCanonicalLocalConsolePaths(input) {
|
|
47402
|
-
const dir = path24__default.join(path24__default.resolve(input.packageRoot, "..", ".."), ".fleet", CONSOLE_DATA_DIR_NAME);
|
|
47403
|
-
return {
|
|
47404
|
-
dir,
|
|
47405
|
-
lockFile: path24__default.join(dir, LOCK_FILE_NAME),
|
|
47406
|
-
dataDir: dir,
|
|
47407
|
-
stateFile: path24__default.join(dir, CONSOLE_STATE_FILE_NAME),
|
|
47408
|
-
settingsFile: path24__default.join(dir, CONSOLE_SETTINGS_FILE_NAME),
|
|
47409
|
-
capturesDir: path24__default.join(dir, CONSOLE_CAPTURES_DIR_NAME)
|
|
47410
|
-
};
|
|
47411
|
-
}
|
|
47412
|
-
function isDesktopResourceRootMarkerValid(content) {
|
|
47413
|
-
return content.trim() === String(DESKTOP_PROTOCOL_VERSION);
|
|
47414
|
-
}
|
|
47415
|
-
|
|
47416
|
-
// core/host/desktop-protocol.ts
|
|
47417
|
-
function readDesktopProtocolEnvironment(env = process.env, deps = {}) {
|
|
47418
|
-
const resourceRoot = env[DESKTOP_RESOURCE_ROOT_ENV];
|
|
47419
|
-
const ownerId = env[DESKTOP_OWNER_ID_ENV];
|
|
47420
|
-
const ownerKind = env[DESKTOP_OWNER_KIND_ENV];
|
|
47421
|
-
const protocolVersion = env[DESKTOP_PROTOCOL_VERSION_ENV];
|
|
47422
|
-
const values = [resourceRoot, ownerId, ownerKind, protocolVersion];
|
|
47423
|
-
if (values.every((value) => value === void 0)) return null;
|
|
47424
|
-
if (values.some((value) => !value)) throw new Error("desktop_protocol_environment_incomplete");
|
|
47425
|
-
if (ownerKind !== "desktop") throw new Error("desktop_owner_kind_invalid");
|
|
47426
|
-
if (!isSafeOwnerId(ownerId)) throw new Error("desktop_owner_id_invalid");
|
|
47427
|
-
if (protocolVersion !== String(DESKTOP_PROTOCOL_VERSION)) throw new Error("desktop_protocol_version_unsupported");
|
|
47428
|
-
const resolvedRoot = isDesktopDevelopmentEnvironment2(env) ? validateDesktopDevelopmentResourceRoot(resourceRoot) : validateDesktopResourceRoot(resourceRoot, deps.expectedPackageRoot);
|
|
47429
|
-
return { owner: { kind: "desktop", id: ownerId, protocolVersion: DESKTOP_PROTOCOL_VERSION }, resourceRoot: resolvedRoot };
|
|
47430
|
-
}
|
|
47431
|
-
function isDesktopDevelopmentEnvironment2(env = process.env) {
|
|
47432
|
-
return isDesktopDevelopmentEnvironment(env);
|
|
47433
|
-
}
|
|
47434
|
-
function validateDesktopResourceRoot(root, expectedPackageRoot = resolveDesktopProtocolPackageRoot()) {
|
|
47435
|
-
if (!path24__default.isAbsolute(root)) throw new Error("desktop_resource_root_not_absolute");
|
|
47436
|
-
const resolvedRoot = fs9__default.realpathSync(root);
|
|
47437
|
-
const expectedRoot = fs9__default.realpathSync(expectedPackageRoot);
|
|
47438
|
-
if (resolvedRoot !== expectedRoot) throw new Error("desktop_resource_root_invalid");
|
|
47439
|
-
const markerPath = path24__default.join(resolvedRoot, DESKTOP_RESOURCE_ROOT_MARKER);
|
|
47440
|
-
const marker = fs9__default.readFileSync(markerPath, "utf8");
|
|
47441
|
-
if (!isDesktopResourceRootMarkerValid(marker)) throw new Error("desktop_resource_root_marker_invalid");
|
|
47442
|
-
return resolvedRoot;
|
|
47443
|
-
}
|
|
47444
|
-
function validateDesktopDevelopmentResourceRoot(root) {
|
|
47445
|
-
if (!path24__default.isAbsolute(root)) throw new Error("desktop_resource_root_not_absolute");
|
|
47446
|
-
let resolvedRoot;
|
|
47447
|
-
try {
|
|
47448
|
-
resolvedRoot = fs9__default.realpathSync(root);
|
|
47449
|
-
} catch {
|
|
47450
|
-
throw new Error("desktop_development_resource_root_invalid");
|
|
47451
|
-
}
|
|
47452
|
-
const expectedRoot = fs9__default.realpathSync(resolveDesktopProtocolPackageRoot());
|
|
47453
|
-
if (resolvedRoot !== expectedRoot) throw new Error("desktop_development_resource_root_invalid");
|
|
47454
|
-
return resolvedRoot;
|
|
47455
|
-
}
|
|
47456
|
-
function resolveDesktopProtocolPackageRoot() {
|
|
47457
|
-
const requireFromHere = createRequire(import.meta.url);
|
|
47458
|
-
for (const candidate of ["../package.json", "../../package.json"]) {
|
|
47459
|
-
try {
|
|
47460
|
-
return path24__default.dirname(requireFromHere.resolve(candidate));
|
|
47461
|
-
} catch (error51) {
|
|
47462
|
-
if (error51.code !== "MODULE_NOT_FOUND") throw error51;
|
|
47463
|
-
}
|
|
47464
|
-
}
|
|
47465
|
-
throw new Error("fleet_console_package_json_not_found");
|
|
47466
|
-
}
|
|
47467
|
-
function isSafeOwnerId(value) {
|
|
47468
|
-
return value.length > 0 && value.length <= 256 && /^[A-Za-z0-9._-]+$/.test(value);
|
|
47469
|
-
}
|
|
47470
|
-
function readFleetConsoleRelease(env = process.env) {
|
|
47471
|
-
const desktop = readDesktopProtocolEnvironment(env);
|
|
47472
|
-
if (desktop) return readReleaseAt(desktop.resourceRoot, readPackageChannel(desktop.resourceRoot));
|
|
47473
|
-
const requireFromHere = createRequire(import.meta.url);
|
|
47474
|
-
const packageJsonPath = resolvePackageJsonPath(requireFromHere);
|
|
47475
|
-
const packageRoot = path24__default.dirname(packageJsonPath);
|
|
47476
|
-
return readReleaseAt(packageRoot, readPackageChannel(packageRoot, requireFromHere), requireFromHere);
|
|
47477
|
-
}
|
|
47478
|
-
function readPackageChannel(packageRoot, requireFromHere = createRequire(import.meta.url)) {
|
|
47479
|
-
const pkg = requireFromHere(path24__default.join(packageRoot, "package.json"));
|
|
47480
|
-
return pkg.private === true ? "local" : "stable";
|
|
47481
|
-
}
|
|
47482
|
-
function readReleaseAt(packageRoot, channel, requireFromHere = createRequire(import.meta.url)) {
|
|
47483
|
-
const packageJsonPath = path24__default.join(packageRoot, "package.json");
|
|
47484
|
-
const pkg = requireFromHere(packageJsonPath);
|
|
47485
|
-
return { channel, version: pkg.version ?? "", packageRoot };
|
|
47486
|
-
}
|
|
47487
|
-
function resolvePackageJsonPath(requireFromHere) {
|
|
47488
|
-
for (const candidate of ["../package.json", "../../package.json"]) {
|
|
47489
|
-
try {
|
|
47490
|
-
return requireFromHere.resolve(candidate);
|
|
47491
|
-
} catch (error51) {
|
|
47492
|
-
if (error51.code !== "MODULE_NOT_FOUND") throw error51;
|
|
47493
|
-
}
|
|
47494
|
-
}
|
|
47495
|
-
throw new Error("fleet_console_package_json_not_found");
|
|
47496
|
-
}
|
|
47497
|
-
|
|
47498
|
-
// core/host/paths.ts
|
|
47499
|
-
var CONSOLE_RUNTIME_DIR_NAME = "console";
|
|
47500
|
-
var CONSOLE_DATA_DIR_NAME2 = "console";
|
|
47501
|
-
var CONSOLE_STATE_FILE_NAME2 = "state.json";
|
|
47502
|
-
var CONSOLE_SETTINGS_FILE_NAME2 = "settings.json";
|
|
47503
|
-
var CONSOLE_DATA_DIR_ENV = "FLEET_CONSOLE_DATA_DIR";
|
|
47504
|
-
var LEGACY_CONSOLE_DATA_DIR_ENV = "FLEET_CONSOLE_DIR";
|
|
47505
|
-
function readConsoleDirOverride(env) {
|
|
47506
|
-
return env[CONSOLE_DATA_DIR_ENV] ?? env[LEGACY_CONSOLE_DATA_DIR_ENV];
|
|
47507
|
-
}
|
|
47508
|
-
function createConsolePaths(deps = {}) {
|
|
47509
|
-
const env = deps.env ?? process.env;
|
|
47510
|
-
const base = readConsoleDirOverride(env) ?? defaultConsoleBaseDir(deps);
|
|
47511
|
-
return { dir: base, lockFile: path24__default.join(base, "console.lock") };
|
|
47512
|
-
}
|
|
47513
|
-
function createConsoleDataPaths(deps = {}) {
|
|
47514
|
-
const dir = defaultConsoleDataBaseDir(deps);
|
|
47515
|
-
return {
|
|
47516
|
-
dir,
|
|
47517
|
-
stateFile: path24__default.join(dir, CONSOLE_STATE_FILE_NAME2),
|
|
47518
|
-
settingsFile: path24__default.join(dir, CONSOLE_SETTINGS_FILE_NAME2)
|
|
47519
|
-
};
|
|
47520
|
-
}
|
|
47521
|
-
function defaultConsoleBaseDir(deps) {
|
|
47522
|
-
let release;
|
|
47523
|
-
const channel = deps.channel ?? (release = readFleetConsoleRelease()).channel;
|
|
47524
|
-
if (channel === "local") {
|
|
47525
|
-
const packageRoot = deps.packageRoot ?? (release ??= readFleetConsoleRelease()).packageRoot;
|
|
47526
|
-
return localConsoleDir(packageRoot);
|
|
47527
|
-
}
|
|
47528
|
-
const uid = deps.uid ?? (typeof process.getuid === "function" ? process.getuid() : 0);
|
|
47529
|
-
return resolveCanonicalStableConsolePaths({
|
|
47530
|
-
tmpDir: os3__default.tmpdir(),
|
|
47531
|
-
uid,
|
|
47532
|
-
fleetDataDir: getFleetDataDir()
|
|
47533
|
-
}).dir;
|
|
47534
|
-
}
|
|
47535
|
-
function defaultConsoleDataBaseDir(deps) {
|
|
47536
|
-
if (deps.fleetDataDir !== void 0) {
|
|
47537
|
-
return path24__default.join(deps.fleetDataDir, CONSOLE_DATA_DIR_NAME2);
|
|
47538
|
-
}
|
|
47539
|
-
const env = deps.env ?? process.env;
|
|
47540
|
-
const override = readConsoleDirOverride(env);
|
|
47541
|
-
if (override) {
|
|
47542
|
-
return override;
|
|
47543
|
-
}
|
|
47544
|
-
let release;
|
|
47545
|
-
const channel = deps.channel ?? (release = readFleetConsoleRelease()).channel;
|
|
47546
|
-
if (channel === "local") {
|
|
47547
|
-
const packageRoot = deps.packageRoot ?? (release ??= readFleetConsoleRelease()).packageRoot;
|
|
47548
|
-
return localConsoleDir(packageRoot);
|
|
47549
|
-
}
|
|
47550
|
-
return resolveCanonicalStableConsolePaths({
|
|
47551
|
-
tmpDir: os3__default.tmpdir(),
|
|
47552
|
-
uid: typeof process.getuid === "function" ? process.getuid() : 0,
|
|
47553
|
-
fleetDataDir: getFleetDataDir()
|
|
47554
|
-
}).dataDir;
|
|
47555
|
-
}
|
|
47556
|
-
function localConsoleDir(packageRoot) {
|
|
47557
|
-
return path24__default.join(path24__default.resolve(packageRoot, "..", ".."), ".fleet", CONSOLE_RUNTIME_DIR_NAME);
|
|
47558
|
-
}
|
|
47559
47621
|
|
|
47560
47622
|
// sdk/operations/launch-variants.ts
|
|
47561
47623
|
function readLaunchVariantGroups(value) {
|
|
@@ -50576,6 +50638,32 @@ async function createIsolatedClaudeConfigDir(tempRoot = tmpdir()) {
|
|
|
50576
50638
|
}
|
|
50577
50639
|
};
|
|
50578
50640
|
}
|
|
50641
|
+
function readVendorContextUsage(response) {
|
|
50642
|
+
if (typeof response !== "object" || response === null) return null;
|
|
50643
|
+
const usage4 = response;
|
|
50644
|
+
if (typeof usage4.totalTokens !== "number" || typeof usage4.maxTokens !== "number") return null;
|
|
50645
|
+
const rows = Array.isArray(usage4.categories) ? usage4.categories : [];
|
|
50646
|
+
const memory = Array.isArray(usage4.memoryFiles) ? usage4.memoryFiles : [];
|
|
50647
|
+
const mcp = Array.isArray(usage4.mcpTools) ? usage4.mcpTools : [];
|
|
50648
|
+
return {
|
|
50649
|
+
total: usage4.totalTokens,
|
|
50650
|
+
max: usage4.maxTokens,
|
|
50651
|
+
model: typeof usage4.model === "string" ? usage4.model : "",
|
|
50652
|
+
compactAt: usage4.isAutoCompactEnabled === true && typeof usage4.autoCompactThreshold === "number" ? usage4.autoCompactThreshold : null,
|
|
50653
|
+
categories: rows.flatMap((row) => {
|
|
50654
|
+
const entry = row;
|
|
50655
|
+
return typeof entry?.name === "string" && typeof entry.tokens === "number" ? [{ name: entry.name, tokens: entry.tokens, deferred: entry.isDeferred === true }] : [];
|
|
50656
|
+
}),
|
|
50657
|
+
memoryFiles: memory.flatMap((row) => {
|
|
50658
|
+
const entry = row;
|
|
50659
|
+
return typeof entry?.path === "string" && typeof entry.tokens === "number" ? [{ path: entry.path, tokens: entry.tokens }] : [];
|
|
50660
|
+
}),
|
|
50661
|
+
mcpTools: mcp.flatMap((row) => {
|
|
50662
|
+
const entry = row;
|
|
50663
|
+
return typeof entry?.name === "string" && typeof entry.tokens === "number" ? [{ name: entry.name, server: typeof entry.serverName === "string" ? entry.serverName : "", tokens: entry.tokens }] : [];
|
|
50664
|
+
})
|
|
50665
|
+
};
|
|
50666
|
+
}
|
|
50579
50667
|
function runVendorQuery(input) {
|
|
50580
50668
|
const run = query({
|
|
50581
50669
|
prompt: input.prompt,
|
|
@@ -50583,6 +50671,14 @@ function runVendorQuery(input) {
|
|
|
50583
50671
|
});
|
|
50584
50672
|
let closed = false;
|
|
50585
50673
|
return {
|
|
50674
|
+
async getContextUsage() {
|
|
50675
|
+
if (closed || typeof run.getContextUsage !== "function") return null;
|
|
50676
|
+
try {
|
|
50677
|
+
return readVendorContextUsage(await run.getContextUsage());
|
|
50678
|
+
} catch {
|
|
50679
|
+
return null;
|
|
50680
|
+
}
|
|
50681
|
+
},
|
|
50586
50682
|
[Symbol.asyncIterator]() {
|
|
50587
50683
|
const iterator = run[Symbol.asyncIterator]();
|
|
50588
50684
|
return {
|
|
@@ -50683,7 +50779,8 @@ async function createClaudeGatewaySdk(options) {
|
|
|
50683
50779
|
} finally {
|
|
50684
50780
|
release();
|
|
50685
50781
|
}
|
|
50686
|
-
}
|
|
50782
|
+
},
|
|
50783
|
+
getContextUsage: () => run.getContextUsage()
|
|
50687
50784
|
};
|
|
50688
50785
|
active = tracked;
|
|
50689
50786
|
return tracked;
|
|
@@ -57055,7 +57152,6 @@ function createConsoleStalePolicy(deps = {}) {
|
|
|
57055
57152
|
// core/host/console-lifecycle.ts
|
|
57056
57153
|
var FIXED_HOST = "127.0.0.1";
|
|
57057
57154
|
var HELP_BANNER_INDENT2 = " ";
|
|
57058
|
-
var DEFAULT_HELP_RELEASE = "local";
|
|
57059
57155
|
function parseConsoleCliMode(argv) {
|
|
57060
57156
|
if (argv.length === 0) return "start";
|
|
57061
57157
|
const [first, ...rest] = argv;
|
|
@@ -57082,7 +57178,8 @@ Run 'fleet console --help' for usage.`);
|
|
|
57082
57178
|
}
|
|
57083
57179
|
function buildConsoleHelpText(options = {}) {
|
|
57084
57180
|
const colorEnabled = resolveColorEnabled(options);
|
|
57085
|
-
const
|
|
57181
|
+
const release = options.release ?? formatConsoleHelpRelease();
|
|
57182
|
+
const subtitle = `Fleet Console \xB7 ${release}`;
|
|
57086
57183
|
const lines = [
|
|
57087
57184
|
...ASCII_FLEET_BANNER.map(
|
|
57088
57185
|
(line, index) => `${HELP_BANNER_INDENT2}${paint(GRADIENT_COLORS[index] ?? FLEET_COMMAND, line, colorEnabled)}`
|
|
@@ -57115,6 +57212,10 @@ function buildConsoleHelpText(options = {}) {
|
|
|
57115
57212
|
const text = lines.join("\n");
|
|
57116
57213
|
return colorEnabled ? text : stripAnsi(text);
|
|
57117
57214
|
}
|
|
57215
|
+
function formatConsoleHelpRelease() {
|
|
57216
|
+
const release = readFleetCliRelease();
|
|
57217
|
+
return `${release.version} \xB7 ${release.channel}`;
|
|
57218
|
+
}
|
|
57118
57219
|
function createConsoleDaemonLifecycle(deps = {}) {
|
|
57119
57220
|
const env = deps.env ?? V2.env;
|
|
57120
57221
|
const childEnv = env.FLEET_CONSOLE_NO_SYSTEM_CA === "1" ? env : withNodeSystemCa(env);
|
|
@@ -57265,11 +57366,108 @@ function resolveDefaultServerModulePath2() {
|
|
|
57265
57366
|
return fileURLToPath(import.meta.url);
|
|
57266
57367
|
}
|
|
57267
57368
|
|
|
57369
|
+
// cli/doctor.ts
|
|
57370
|
+
var CLAUDE_COMMAND = "claude";
|
|
57371
|
+
var SEMVER_PATTERN = /(\d+\.\d+\.\d+)/;
|
|
57372
|
+
var VERSION_PROBE_TIMEOUT_MS = 5e3;
|
|
57373
|
+
var DOCTOR_HELP_TEXT = `fleet doctor \u2014 Diagnose Fleet
|
|
57374
|
+
|
|
57375
|
+
Usage:
|
|
57376
|
+
fleet doctor
|
|
57377
|
+
`;
|
|
57378
|
+
async function dispatchDoctorCommand(argv, io, deps) {
|
|
57379
|
+
const extra = argv[1];
|
|
57380
|
+
if (extra === "--help" || extra === "-h") {
|
|
57381
|
+
io.stdout.write(DOCTOR_HELP_TEXT);
|
|
57382
|
+
return 0;
|
|
57383
|
+
}
|
|
57384
|
+
if (extra !== void 0) {
|
|
57385
|
+
io.stderr.write(`Unknown fleet doctor command: ${extra}
|
|
57386
|
+
`);
|
|
57387
|
+
io.stdout.write(DOCTOR_HELP_TEXT);
|
|
57388
|
+
return 1;
|
|
57389
|
+
}
|
|
57390
|
+
io.stdout.write(`${await buildFleetDoctorText(deps)}
|
|
57391
|
+
`);
|
|
57392
|
+
return 0;
|
|
57393
|
+
}
|
|
57394
|
+
async function buildFleetDoctorText(deps) {
|
|
57395
|
+
const env = deps.env ?? process.env;
|
|
57396
|
+
const release = deps.release ?? readFleetCliRelease();
|
|
57397
|
+
const dataDir = deps.dataDir ?? getFleetDataDir(env);
|
|
57398
|
+
const lockFile = deps.lockFile ?? createConsolePaths({ env }).lockFile;
|
|
57399
|
+
const resolveBinary2 = deps.resolveBinary ?? ((command2, processEnv) => resolvePathBinary(command2, processEnv));
|
|
57400
|
+
const runVersion = deps.runVersion ?? execFileVersion;
|
|
57401
|
+
const readConsoleStatus = deps.readConsoleStatus ?? runConsoleStatus;
|
|
57402
|
+
const signedIn = new Set(await deps.authService.listProviderIds());
|
|
57403
|
+
const binary = await describeClaudeBinary(resolveBinary2(CLAUDE_COMMAND, env), runVersion);
|
|
57404
|
+
const consoleLine = await readConsoleStatusLine(readConsoleStatus);
|
|
57405
|
+
return [
|
|
57406
|
+
formatRow("package", `@dotobokuri/fleet-console ${release.version} (${release.channel})`),
|
|
57407
|
+
formatRow("data", dataDir),
|
|
57408
|
+
formatRow("binary", binary),
|
|
57409
|
+
formatRow("kimi", signedIn.has(AUTH_CLI_DEFINITIONS.kimi.providerId) ? "signed in" : "signed out"),
|
|
57410
|
+
formatRow("opencode", signedIn.has(AUTH_CLI_DEFINITIONS.opencode.providerId) ? "signed in" : "signed out"),
|
|
57411
|
+
formatRow("console", stripConsolePrefix(consoleLine)),
|
|
57412
|
+
formatRow("lock", lockFile)
|
|
57413
|
+
].join("\n");
|
|
57414
|
+
}
|
|
57415
|
+
async function describeClaudeBinary(resolved, runVersion) {
|
|
57416
|
+
if (!resolved) return `${CLAUDE_COMMAND} (not on PATH)`;
|
|
57417
|
+
const displayPath = displayBinaryPath(resolved);
|
|
57418
|
+
try {
|
|
57419
|
+
const output = await runVersion(resolved.bin, [...resolved.prefixArgs, "--version"]);
|
|
57420
|
+
const version2 = output.match(SEMVER_PATTERN)?.[1];
|
|
57421
|
+
return version2 ? `${displayPath} ${version2}` : `${displayPath} (version unknown)`;
|
|
57422
|
+
} catch {
|
|
57423
|
+
return `${displayPath} (version unknown)`;
|
|
57424
|
+
}
|
|
57425
|
+
}
|
|
57426
|
+
function displayBinaryPath(resolved) {
|
|
57427
|
+
const shim = [...resolved.prefixArgs].reverse().map((arg) => arg.trim()).find((arg) => {
|
|
57428
|
+
const lower = arg.toLowerCase();
|
|
57429
|
+
return lower.endsWith(".cmd") || lower.endsWith(".bat");
|
|
57430
|
+
});
|
|
57431
|
+
return shim ?? resolved.bin;
|
|
57432
|
+
}
|
|
57433
|
+
function execFileVersion(bin, args) {
|
|
57434
|
+
return new Promise((resolve3, reject) => {
|
|
57435
|
+
execFile$1(bin, [...args], { timeout: VERSION_PROBE_TIMEOUT_MS }, (error51, stdout, stderr) => {
|
|
57436
|
+
if (error51) {
|
|
57437
|
+
reject(error51);
|
|
57438
|
+
return;
|
|
57439
|
+
}
|
|
57440
|
+
resolve3(`${stdout}${stderr}`);
|
|
57441
|
+
});
|
|
57442
|
+
});
|
|
57443
|
+
}
|
|
57444
|
+
function formatRow(key, value) {
|
|
57445
|
+
return `${key.padEnd(10)}${value}`;
|
|
57446
|
+
}
|
|
57447
|
+
async function readConsoleStatusLine(readConsoleStatus) {
|
|
57448
|
+
try {
|
|
57449
|
+
return firstLine(await readConsoleStatus());
|
|
57450
|
+
} catch (error51) {
|
|
57451
|
+
const reason = error51 instanceof Error ? error51.message : String(error51);
|
|
57452
|
+
return `unreadable (${firstLine(reason)})`;
|
|
57453
|
+
}
|
|
57454
|
+
}
|
|
57455
|
+
function firstLine(text) {
|
|
57456
|
+
return text.split("\n")[0] ?? text;
|
|
57457
|
+
}
|
|
57458
|
+
function stripConsolePrefix(line) {
|
|
57459
|
+
return line.replace(/^Fleet Console server:\s*/, "");
|
|
57460
|
+
}
|
|
57461
|
+
|
|
57462
|
+
// cli/fleet-dispatch.ts
|
|
57463
|
+
init_release();
|
|
57464
|
+
|
|
57268
57465
|
// cli/update/dispatcher.ts
|
|
57269
57466
|
var UPDATE_HELP_TEXT = `fleet update \u2014 Update Fleet
|
|
57270
57467
|
|
|
57271
57468
|
Usage:
|
|
57272
57469
|
fleet update
|
|
57470
|
+
fleet update --check
|
|
57273
57471
|
`;
|
|
57274
57472
|
async function dispatchUpdateCommand(argv, io, options = {}) {
|
|
57275
57473
|
const command2 = argv[1];
|
|
@@ -57277,6 +57475,16 @@ async function dispatchUpdateCommand(argv, io, options = {}) {
|
|
|
57277
57475
|
io.stdout.write(UPDATE_HELP_TEXT);
|
|
57278
57476
|
return 0;
|
|
57279
57477
|
}
|
|
57478
|
+
if (command2 === "--check") {
|
|
57479
|
+
if (argv[2] !== void 0) {
|
|
57480
|
+
io.stderr.write(`Unknown fleet update option: ${argv[2]}
|
|
57481
|
+
`);
|
|
57482
|
+
io.stdout.write(UPDATE_HELP_TEXT);
|
|
57483
|
+
return 1;
|
|
57484
|
+
}
|
|
57485
|
+
const { runFleetUpdateCheck: runFleetUpdateCheck2 } = await Promise.resolve().then(() => (init_check_report(), check_report_exports));
|
|
57486
|
+
return runFleetUpdateCheck2(io);
|
|
57487
|
+
}
|
|
57280
57488
|
if (command2 !== void 0) {
|
|
57281
57489
|
io.stderr.write(`Unknown fleet update command: ${command2}
|
|
57282
57490
|
`);
|
|
@@ -57294,10 +57502,15 @@ function classifyFleetArgv(argv) {
|
|
|
57294
57502
|
if (command2 === "update") return { kind: "update", argv };
|
|
57295
57503
|
if (command2 === "auth") return { kind: "auth", argv };
|
|
57296
57504
|
if (command2 === "console") return { kind: "console", consoleArgv: argv.slice(1) };
|
|
57505
|
+
if (command2 === "doctor") return { kind: "doctor", argv };
|
|
57506
|
+
if (command2 === "status") return { kind: "console", consoleArgv: ["status", ...argv.slice(1)] };
|
|
57297
57507
|
const passthroughArgv = command2 === "cli" ? argv.slice(1) : argv;
|
|
57298
57508
|
if (passthroughArgv[0] === "--help" || passthroughArgv[0] === "-h") {
|
|
57299
57509
|
return { kind: "help", passthroughArgs: passthroughArgv.slice(1) };
|
|
57300
57510
|
}
|
|
57511
|
+
if (command2 !== "cli" && isFleetVersionArg(passthroughArgv[0])) {
|
|
57512
|
+
return { kind: "version" };
|
|
57513
|
+
}
|
|
57301
57514
|
return { kind: "passthrough", passthroughArgs: [...passthroughArgv] };
|
|
57302
57515
|
}
|
|
57303
57516
|
async function dispatchFleetArgv(argv, options) {
|
|
@@ -57315,11 +57528,15 @@ async function dispatchFleetArgv(argv, options) {
|
|
|
57315
57528
|
if (dispatch.kind === "auth") {
|
|
57316
57529
|
return await auth(dispatch.argv, io, createInfra());
|
|
57317
57530
|
}
|
|
57531
|
+
if (dispatch.kind === "doctor") {
|
|
57532
|
+
return await dispatchDoctorCommand(dispatch.argv, io, { env, authService: createInfra().authService });
|
|
57533
|
+
}
|
|
57318
57534
|
if (dispatch.kind === "console") {
|
|
57319
57535
|
try {
|
|
57320
57536
|
const mode = parseConsoleCliMode(dispatch.consoleArgv);
|
|
57321
57537
|
if (mode === "help") {
|
|
57322
|
-
|
|
57538
|
+
const release = readFleetCliRelease();
|
|
57539
|
+
io.stdout.write(`${buildConsoleHelpText({ env, isTTY: io.stdout.isTTY, release: `${release.version} \xB7 ${release.channel}` })}
|
|
57323
57540
|
`);
|
|
57324
57541
|
return 0;
|
|
57325
57542
|
}
|
|
@@ -57355,6 +57572,10 @@ ${await runConsoleStatus()}
|
|
|
57355
57572
|
io.stdout.write(buildFleetHelpText({ env, isTTY: io.stdout.isTTY }));
|
|
57356
57573
|
return 0;
|
|
57357
57574
|
}
|
|
57575
|
+
if (dispatch.kind === "version") {
|
|
57576
|
+
io.stdout.write(buildFleetVersionText());
|
|
57577
|
+
return 0;
|
|
57578
|
+
}
|
|
57358
57579
|
await runAppImpl({ passthroughArgs: dispatch.passthroughArgs });
|
|
57359
57580
|
return 0;
|
|
57360
57581
|
}
|