@songsid/agend 2.4.0-beta.14 → 2.4.0-beta.16
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/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +3 -0
- package/dist/accounts-view.js.map +1 -1
- package/dist/auth-api.js +5 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +6 -1
- package/dist/backend/claude-code.js +63 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/kiro.js +6 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +2 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/classic-channel-manager.d.ts +1 -0
- package/dist/classic-channel-manager.js +4 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +62 -0
- package/dist/claude-credential-launch.js +304 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +56 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +51 -0
- package/dist/claude-credential-vault.js +252 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +82 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +7 -6
- package/dist/cli-audited.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/config-validator.js +9 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-api.d.ts +2 -1
- package/dist/contact-auth-api.js +15 -5
- package/dist/contact-auth-api.js.map +1 -1
- package/dist/contact-auth-policy.d.ts +5 -0
- package/dist/contact-auth-policy.js +2 -0
- package/dist/contact-auth-policy.js.map +1 -1
- package/dist/contact-auth-store.d.ts +12 -1
- package/dist/contact-auth-store.js +67 -5
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +27 -1
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +59 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +48 -3
- package/dist/fleet-manager.js +446 -27
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +16 -6
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +23 -5
- package/dist/host-monitoring-config.d.ts +14 -0
- package/dist/host-monitoring-config.js +31 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +1 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +19 -1
- package/dist/locale.js.map +1 -1
- package/dist/needs-you-hub.js +3 -0
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +2 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.js +2 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/settings-api.d.ts +12 -0
- package/dist/settings-api.js +146 -7
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +2 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +13 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +98 -88
- package/dist/topic-commands.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui/accounts-view.js +12 -6
- package/dist/ui/backend-signin.js +3 -1
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/claude-credentials.js +112 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +9 -2
- package/dist/ui/contact-auth-strings.js +78 -16
- package/dist/ui/contact-authorizations.js +47 -26
- package/dist/ui/contact-needs.js +22 -6
- package/dist/ui/contact-permissions.js +55 -10
- package/dist/ui/contact-tool-groups.js +39 -0
- package/dist/ui/fleet-canvas.js +3 -2
- package/dist/ui/fleet-office-card.js +414 -41
- package/dist/ui/fleet-office-dialogue.js +3 -3
- package/dist/ui/fleet-office-pack.d.ts +67 -1
- package/dist/ui/fleet-office-pack.js +412 -18
- package/dist/ui/fleet-office-play.js +262 -3
- package/dist/ui/fleet-office-skin.js +67 -20
- package/dist/ui/fleet-office-zones.js +19 -1
- package/dist/ui/fleet-office.js +393 -47
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +47 -3
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-needs.js +7 -4
- package/dist/ui/panel-settings.js +2 -1
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +1 -1
- package/dist/ui/settings-appearance.js +6 -1
- package/dist/ui/settings-host-monitoring.js +51 -0
- package/dist/ui/settings-registry.js +1 -1
- package/dist/ui/settings-shared.js +3 -2
- package/dist/ui/shared/app-i18n.js +4 -0
- package/dist/ui/shared/app-shell.js +16 -7
- package/dist/ui/shared/app.css +266 -27
- package/dist/ui/shared/app.js +7 -1
- package/dist/ui/shared/chat-strings.js +8 -2
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/office-dialogue.css +12 -0
- package/dist/ui/shared/preview-panel.js +44 -18
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/theme-picker.js +46 -0
- package/dist/ui/shared/theme.js +47 -4
- package/dist/ui/shared/tokens.css +273 -0
- package/dist/ui/shared/ui-confirm.js +5 -2
- package/dist/ui/shared/usage-dialog.js +9 -34
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +14 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +5 -1
- package/dist/web-api.js +29 -9
- package/dist/web-api.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +5 -2
- package/dist/web-commands.js +4 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-office-skins.d.ts +7 -2
- package/dist/web-office-skins.js +42 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session.d.ts +20 -1
- package/dist/web-session.js +27 -0
- package/dist/web-session.js.map +1 -1
- package/dist/web-terminal.d.ts +4 -0
- package/dist/web-terminal.js +16 -1
- package/dist/web-terminal.js.map +1 -1
- package/package.json +1 -1
package/dist/topic-commands.js
CHANGED
|
@@ -18,7 +18,7 @@ import { formatCents } from "./cost-guard.js";
|
|
|
18
18
|
import { truncateDisplay, MODEL_DISPLAY_WIDTH_MAX } from "./ls-rows.js";
|
|
19
19
|
import { getTmuxSessionName } from "./paths.js";
|
|
20
20
|
import { tmuxArgs as tmuxArgsFor, tmuxBinary, tmuxEnvOption } from "./tmux-binary.js";
|
|
21
|
-
import { t, getLocale } from "./locale.js";
|
|
21
|
+
import { t, getLocale, tForLocale } from "./locale.js";
|
|
22
22
|
import { commandSpec, decideCommand, telegramMenu } from "./command-table.js";
|
|
23
23
|
import { runVisibilityCommand } from "./cross-instance-notice.js";
|
|
24
24
|
import { clampContextPercent, parseContextPercent, parseTokenContextRatio, } from "./context-percent.js";
|
|
@@ -273,17 +273,12 @@ const SYSINFO_BACKEND_LABEL_KEYS = {
|
|
|
273
273
|
antigravity: "sysinfo.backend_cli_antigravity",
|
|
274
274
|
muse: "sysinfo.backend_cli_muse",
|
|
275
275
|
};
|
|
276
|
-
function
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const version = info?.version
|
|
283
|
-
?? (info?.probing ? t("sysinfo.cli_version_probing") : t("sysinfo.cli_version_unknown"));
|
|
284
|
-
return `- ${label}: ${version}`;
|
|
285
|
-
}),
|
|
286
|
-
];
|
|
276
|
+
function backendCliRows(versions, translate = t) {
|
|
277
|
+
return SYSINFO_BACKEND_IDS.map(id => {
|
|
278
|
+
const info = versions?.[id];
|
|
279
|
+
return [translate(SYSINFO_BACKEND_LABEL_KEYS[id]), info?.version
|
|
280
|
+
?? (info?.probing ? translate("sysinfo.cli_version_probing") : translate("sysinfo.cli_version_unknown"))];
|
|
281
|
+
});
|
|
287
282
|
}
|
|
288
283
|
/**
|
|
289
284
|
* Board 0340ec89: agy's own `/compact` summarizes the conversation (verified live on 1.3.6: "Conversation compacted ·
|
|
@@ -1472,10 +1467,10 @@ export class TopicCommands {
|
|
|
1472
1467
|
displayName: instances[name]?.display_name,
|
|
1473
1468
|
})));
|
|
1474
1469
|
}
|
|
1475
|
-
/**
|
|
1476
|
-
|
|
1470
|
+
/** Collect once for the platform text and the web report. */
|
|
1471
|
+
collectStatus(translate = t) {
|
|
1477
1472
|
if (!this.ctx.fleetConfig)
|
|
1478
|
-
return
|
|
1473
|
+
return { rows: [], notes: [], empty: translate("status.no_config") };
|
|
1479
1474
|
const rows = [];
|
|
1480
1475
|
let pausedCount = 0;
|
|
1481
1476
|
const fleetNames = new Set(Object.keys(this.ctx.fleetConfig.instances));
|
|
@@ -1507,15 +1502,15 @@ export class TopicCommands {
|
|
|
1507
1502
|
// old Status icon column duplicated it (⏸/⏸, 🟢/🟢); IPC duplicated it
|
|
1508
1503
|
// too (✗ exactly when State is stopped/crashed/—) and stays queryable
|
|
1509
1504
|
// via /api/fleet's per-instance `ipc` flag.
|
|
1510
|
-
const stateLabel = status === "paused" || costPaused || executionState === "paused" ? `⏸ ${
|
|
1511
|
-
: status === "stopped" ? `✗ ${
|
|
1512
|
-
: status === "crashed" ? `🔴 ${
|
|
1513
|
-
: executionState === "idle" ? `🟢 ${
|
|
1514
|
-
: executionState === "working" ? `🔵 ${
|
|
1515
|
-
: executionState === "stuck" ? `🔴 ${
|
|
1505
|
+
const stateLabel = status === "paused" || costPaused || executionState === "paused" ? `⏸ ${translate("state.paused")}`
|
|
1506
|
+
: status === "stopped" ? `✗ ${translate("state.stopped")}`
|
|
1507
|
+
: status === "crashed" ? `🔴 ${translate("state.crashed")}`
|
|
1508
|
+
: executionState === "idle" ? `🟢 ${translate("state.idle")}`
|
|
1509
|
+
: executionState === "working" ? `🔵 ${translate("state.working")}`
|
|
1510
|
+
: executionState === "stuck" ? `🔴 ${translate("state.stuck")}`
|
|
1516
1511
|
// Running but no execution snapshot yet: the old Status
|
|
1517
1512
|
// column showed 🟢 here — say running, never idle or "—".
|
|
1518
|
-
: `🟢 ${
|
|
1513
|
+
: `🟢 ${translate("state.running")}`;
|
|
1519
1514
|
const displayName = labels.get(name) ?? name;
|
|
1520
1515
|
// Model: same source as /ctx — live statusline for claude-code, the
|
|
1521
1516
|
// effective resolver otherwise — capped so one long name cannot blow
|
|
@@ -1527,37 +1522,68 @@ export class TopicCommands {
|
|
|
1527
1522
|
// "-" distinguishes "backend has no effort setting" from an unset one:
|
|
1528
1523
|
// an empty cell would read as missing data rather than not-applicable.
|
|
1529
1524
|
const effort = this.ctx.resolveInstanceEffort?.(name).effort ?? "-";
|
|
1530
|
-
rows.push(
|
|
1525
|
+
rows.push([displayName, backend, model, contextStr, effort, stateLabel]);
|
|
1531
1526
|
}
|
|
1532
1527
|
if (rows.length === 0)
|
|
1533
|
-
return
|
|
1534
|
-
const lines = [
|
|
1535
|
-
`## ${t("status.title")}`,
|
|
1536
|
-
"",
|
|
1537
|
-
t("status.table_header"),
|
|
1538
|
-
"|----------|---------|-------|-----|--------|-------|",
|
|
1539
|
-
...rows,
|
|
1540
|
-
"",
|
|
1541
|
-
t("status.paused_count", pausedCount),
|
|
1542
|
-
];
|
|
1528
|
+
return { rows: [], notes: [], empty: translate("status.no_instances") };
|
|
1529
|
+
const lines = [translate("status.paused_count", pausedCount)];
|
|
1543
1530
|
const limitCents = this.ctx.costGuard?.getLimitCents() ?? 0;
|
|
1544
1531
|
const totalCents = this.ctx.costGuard?.getFleetTotalCents() ?? 0;
|
|
1545
1532
|
if (limitCents > 0) {
|
|
1546
|
-
lines.push("",
|
|
1533
|
+
lines.push("", translate("status.daily_cost", formatCents(totalCents), formatCents(limitCents)));
|
|
1547
1534
|
}
|
|
1548
1535
|
// Adapter states (only show if any are not connected)
|
|
1549
1536
|
const adapterStates = this.ctx.getAdapterStates?.();
|
|
1550
1537
|
if (adapterStates && adapterStates.size > 0) {
|
|
1551
1538
|
const issues = [...adapterStates.entries()].filter(([, s]) => s.status !== "connected");
|
|
1552
1539
|
if (issues.length > 0) {
|
|
1553
|
-
lines.push("", `**${
|
|
1540
|
+
lines.push("", `**${translate("status.adapters")}**`);
|
|
1554
1541
|
for (const [id, s] of adapterStates) {
|
|
1555
1542
|
const icon = s.status === "connected" ? "✅" : s.status === "retrying" ? "🔄" : "❌";
|
|
1556
1543
|
lines.push(` ${icon} ${id}: ${s.status}${s.lastError ? ` (${s.lastError.slice(0, 60)})` : ""}`);
|
|
1557
1544
|
}
|
|
1558
1545
|
}
|
|
1559
1546
|
}
|
|
1560
|
-
return lines
|
|
1547
|
+
return { rows, notes: lines };
|
|
1548
|
+
}
|
|
1549
|
+
/** Platform text keeps its existing columns and formatting. */
|
|
1550
|
+
async getStatusText() {
|
|
1551
|
+
const data = this.collectStatus();
|
|
1552
|
+
if (data.empty)
|
|
1553
|
+
return data.empty;
|
|
1554
|
+
return [
|
|
1555
|
+
`## ${t("status.title")}`, "", t("status.table_header"),
|
|
1556
|
+
"|----------|---------|-------|-----|--------|-------|",
|
|
1557
|
+
...data.rows.map(row => `| ${row.join(" | ")} |`), "", ...data.notes,
|
|
1558
|
+
].join("\n");
|
|
1559
|
+
}
|
|
1560
|
+
/** No Markdown parsing and no cost column in the web payload, including its text fallback. */
|
|
1561
|
+
async getWebReport(command, locale = getLocale()) {
|
|
1562
|
+
const say = (key, ...args) => tForLocale(locale, key, ...args);
|
|
1563
|
+
let report;
|
|
1564
|
+
if (command === "status") {
|
|
1565
|
+
const data = this.collectStatus(say);
|
|
1566
|
+
const headers = say("status.table_header").split("|").map(x => x.trim()).filter(Boolean);
|
|
1567
|
+
report = {
|
|
1568
|
+
title: say("status.title"),
|
|
1569
|
+
columns: [...headers.slice(0, 5), headers[headers.length - 1]],
|
|
1570
|
+
rows: data.rows.map(row => [...row.slice(0, 5), row[row.length - 1].replace(/^[⏸✗🔴🟢🔵]\s*/u, "")]),
|
|
1571
|
+
notes: data.empty ? [data.empty] : data.notes.map(line => line.replace(/\*\*/g, "")),
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
else {
|
|
1575
|
+
const data = this.collectSysInfo(this.ctx.getBackendCliVersionSnapshot?.(), locale);
|
|
1576
|
+
report = {
|
|
1577
|
+
title: say("sysinfo.title"),
|
|
1578
|
+
columns: [say("sysinfo.metric"), say("sysinfo.value")],
|
|
1579
|
+
rows: [...data.metrics, ...data.backends],
|
|
1580
|
+
notes: [...data.summary, ...data.resources.map(([label, url]) => `${label}: ${url}`)],
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
return { report, text: [
|
|
1584
|
+
report.title, report.columns.join(" · "),
|
|
1585
|
+
...report.rows.map(row => row.join(" · ")), ...report.notes,
|
|
1586
|
+
].join("\n") };
|
|
1561
1587
|
}
|
|
1562
1588
|
async handleSysInfoCommand(msg) {
|
|
1563
1589
|
const adapter = this.getReplyAdapter(msg);
|
|
@@ -1590,64 +1616,48 @@ export class TopicCommands {
|
|
|
1590
1616
|
const backendCliVersions = this.ctx.getBackendCliVersionSnapshot?.();
|
|
1591
1617
|
return this.getSysInfoText({ ...opts, backendCliVersions });
|
|
1592
1618
|
}
|
|
1593
|
-
|
|
1619
|
+
collectSysInfo(versions, locale = getLocale()) {
|
|
1620
|
+
const say = (key, ...args) => tForLocale(locale, key, ...args);
|
|
1594
1621
|
const info = this.ctx.getSysInfo();
|
|
1595
1622
|
const upHours = Math.floor(info.uptime_seconds / 3600);
|
|
1596
1623
|
const upMins = Math.floor((info.uptime_seconds % 3600) / 60);
|
|
1597
1624
|
const require = createRequire(import.meta.url);
|
|
1598
1625
|
const agendVersion = require("../package.json").version ?? "unknown";
|
|
1599
|
-
const tipsLang =
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
`
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
""
|
|
1629
|
-
...resources,
|
|
1630
|
-
].join("\n");
|
|
1631
|
-
}
|
|
1632
|
-
// Telegram (default): markdown table
|
|
1626
|
+
const tipsLang = locale === "zh-TW" ? "zh" : "en";
|
|
1627
|
+
return {
|
|
1628
|
+
metrics: [
|
|
1629
|
+
["AgEnD", `v${agendVersion}`],
|
|
1630
|
+
["OS", `${process.platform} ${osRelease()} (${process.arch})`],
|
|
1631
|
+
["Node", process.version],
|
|
1632
|
+
["tmux", tmuxVersion()],
|
|
1633
|
+
[say("sysinfo.uptime"), `${upHours}h ${upMins}m`],
|
|
1634
|
+
[say("sysinfo.memory"), `${info.memory_mb.rss} MB RSS`],
|
|
1635
|
+
[say("sysinfo.heap"), `${info.memory_mb.heapUsed} / ${info.memory_mb.heapTotal} MB`],
|
|
1636
|
+
],
|
|
1637
|
+
backends: backendCliRows(versions, say),
|
|
1638
|
+
summary: [
|
|
1639
|
+
`${say("sysinfo.instances")}: ${info.running_count} ${say("sysinfo.running")}, ${info.paused_count} ${say("sysinfo.paused")}`,
|
|
1640
|
+
...(info.fleet_mem_mb !== null ? [`${say("sysinfo.fleet_mem")}: ${(info.fleet_mem_mb / 1024).toFixed(1)} GB`] : []),
|
|
1641
|
+
`${say("sysinfo.system_mem")}: ${info.system_mem_gb.used} / ${info.system_mem_gb.total} GB`,
|
|
1642
|
+
],
|
|
1643
|
+
resources: [
|
|
1644
|
+
[say("sysinfo.docs"), "https://songsid.github.io/AgEnD"],
|
|
1645
|
+
[say("sysinfo.tips"), `https://songsid.github.io/AgEnD/tips-${tipsLang}.html`],
|
|
1646
|
+
[say("sysinfo.github"), "https://github.com/songsid/AgEnD"],
|
|
1647
|
+
],
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
getSysInfoText(opts) {
|
|
1651
|
+
const data = this.collectSysInfo(opts?.backendCliVersions);
|
|
1652
|
+
const metrics = opts?.platform === "discord"
|
|
1653
|
+
? data.metrics.map(([key, value]) => `${key}: ${value}`)
|
|
1654
|
+
: ["", `| ${t("sysinfo.metric")} | ${t("sysinfo.value")} |`, "|--------|-------|",
|
|
1655
|
+
...data.metrics.map(row => `| ${row.join(" | ")} |`)];
|
|
1633
1656
|
return [
|
|
1634
|
-
`## ${t("sysinfo.title")}`,
|
|
1635
|
-
"",
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
`| AgEnD | v${agendVersion} |`,
|
|
1639
|
-
`| OS | ${process.platform} ${osRelease()} (${process.arch}) |`,
|
|
1640
|
-
`| Node | ${process.version} |`,
|
|
1641
|
-
`| tmux | ${tmuxVersion()} |`,
|
|
1642
|
-
`| ${t("sysinfo.uptime")} | ${upHours}h ${upMins}m |`,
|
|
1643
|
-
`| ${t("sysinfo.memory")} | ${info.memory_mb.rss} MB RSS |`,
|
|
1644
|
-
`| ${t("sysinfo.heap")} | ${info.memory_mb.heapUsed} / ${info.memory_mb.heapTotal} MB |`,
|
|
1645
|
-
"",
|
|
1646
|
-
...backendVersions,
|
|
1647
|
-
"",
|
|
1648
|
-
...summaryLines,
|
|
1649
|
-
"",
|
|
1650
|
-
...resources,
|
|
1657
|
+
`## ${t("sysinfo.title")}`, ...metrics, "",
|
|
1658
|
+
`**${t("sysinfo.backend_clis")}**`, ...data.backends.map(([key, value]) => `- ${key}: ${value}`),
|
|
1659
|
+
"", ...data.summary, "", `📚 **${t("sysinfo.resources")}**`,
|
|
1660
|
+
...data.resources.map(([key, url]) => `- ${key}: ${url}`),
|
|
1651
1661
|
].join("\n");
|
|
1652
1662
|
}
|
|
1653
1663
|
async handleUpdateCommand(msg) {
|