@great-arrow/cli 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9483,7 +9483,7 @@ function isNodeError(value) {
|
|
|
9483
9483
|
|
|
9484
9484
|
// src/lib/version.ts
|
|
9485
9485
|
var CLI_PACKAGE_NAME = "@great-arrow/cli";
|
|
9486
|
-
var CLI_VERSION = "0.7.
|
|
9486
|
+
var CLI_VERSION = "0.7.3";
|
|
9487
9487
|
var GAD_INSTALL_VERSION = "2026.08.08";
|
|
9488
9488
|
var GAD_INSTALL_MIN_VERSION = "2026.06.22";
|
|
9489
9489
|
var GAD_INSTALL_HEADER = "X-GAD-Install-Version";
|
|
@@ -18127,6 +18127,10 @@ function itemLine(item) {
|
|
|
18127
18127
|
const detail = item.detail ? stripControlChars(String(item.detail)) : "";
|
|
18128
18128
|
return detail ? ` ${who} \u2014 ${detail}` : ` ${who}`;
|
|
18129
18129
|
}
|
|
18130
|
+
function liveLines(live) {
|
|
18131
|
+
if (!live) return [];
|
|
18132
|
+
return [live.activity?.line, live.spend?.line].filter((l) => typeof l === "string" && l.length > 0).map((l) => ` ${stripControlChars(l)}`);
|
|
18133
|
+
}
|
|
18130
18134
|
function count(n) {
|
|
18131
18135
|
return typeof n === "number" && Number.isFinite(n) ? n : 0;
|
|
18132
18136
|
}
|
|
@@ -18135,14 +18139,30 @@ function renderAgentsNow(payload) {
|
|
|
18135
18139
|
const groups = (Array.isArray(safe.working) ? safe.working : []).filter(
|
|
18136
18140
|
(g) => g && Array.isArray(g.items) && g.items.length > 0
|
|
18137
18141
|
);
|
|
18142
|
+
const sessions = (Array.isArray(safe.sessions) ? safe.sessions : []).filter(
|
|
18143
|
+
(s2) => s2 && typeof s2.name === "string"
|
|
18144
|
+
);
|
|
18145
|
+
const byId = new Map(
|
|
18146
|
+
(Array.isArray(safe.agents) ? safe.agents : []).map((a) => [a?.id, a])
|
|
18147
|
+
);
|
|
18138
18148
|
const counts = safe.counts ?? {};
|
|
18139
18149
|
const lines = [];
|
|
18140
|
-
if (groups.length === 0) {
|
|
18150
|
+
if (groups.length === 0 && sessions.length === 0) {
|
|
18141
18151
|
lines.push("No agent is working right now.");
|
|
18142
18152
|
} else {
|
|
18143
18153
|
for (const g of groups) {
|
|
18144
18154
|
lines.push(groupTitle(g.where, g.machine));
|
|
18145
|
-
for (const item of g.items)
|
|
18155
|
+
for (const item of g.items) {
|
|
18156
|
+
lines.push(itemLine(item));
|
|
18157
|
+
if (item.connectionId)
|
|
18158
|
+
lines.push(...liveLines(byId.get(item.connectionId)));
|
|
18159
|
+
}
|
|
18160
|
+
lines.push("");
|
|
18161
|
+
}
|
|
18162
|
+
for (const s2 of sessions) {
|
|
18163
|
+
lines.push(groupTitle(s2.where, s2.machine));
|
|
18164
|
+
lines.push(itemLine({ who: s2.name }));
|
|
18165
|
+
lines.push(...liveLines(s2));
|
|
18146
18166
|
lines.push("");
|
|
18147
18167
|
}
|
|
18148
18168
|
if (lines[lines.length - 1] === "") lines.pop();
|