@songsid/agend 2.4.0-beta.31 → 2.4.0-beta.32

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.
Files changed (59) hide show
  1. package/dist/build-provenance.json +1 -1
  2. package/dist/channel/mcp-tools.js +1 -1
  3. package/dist/channel/mcp-tools.js.map +1 -1
  4. package/dist/daemon.d.ts +9 -1
  5. package/dist/daemon.js +104 -25
  6. package/dist/daemon.js.map +1 -1
  7. package/dist/fleet-context.d.ts +2 -0
  8. package/dist/fleet-manager.d.ts +7 -0
  9. package/dist/fleet-manager.js +66 -7
  10. package/dist/fleet-manager.js.map +1 -1
  11. package/dist/general-knowledge/skills/concepts/SKILL.md +21 -2
  12. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -4
  13. package/dist/general-knowledge/skills/hub/SKILL.md +6 -0
  14. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +2 -0
  15. package/dist/hub/client.js +8 -2
  16. package/dist/hub/client.js.map +1 -1
  17. package/dist/hub/compose/member.d.ts +11 -0
  18. package/dist/hub/compose/member.js +15 -4
  19. package/dist/hub/compose/member.js.map +1 -1
  20. package/dist/hub/member/room-ask.d.ts +1 -0
  21. package/dist/hub/member/room-ask.js +11 -4
  22. package/dist/hub/member/room-ask.js.map +1 -1
  23. package/dist/hub/member-journal.d.ts +2 -0
  24. package/dist/hub/member-journal.js +5 -0
  25. package/dist/hub/member-journal.js.map +1 -1
  26. package/dist/hub/protocol.d.ts +7 -0
  27. package/dist/hub/protocol.js +8 -1
  28. package/dist/hub/protocol.js.map +1 -1
  29. package/dist/hub/representative.d.ts +4 -0
  30. package/dist/hub/representative.js +17 -4
  31. package/dist/hub/representative.js.map +1 -1
  32. package/dist/hub/server.js +6 -2
  33. package/dist/hub/server.js.map +1 -1
  34. package/dist/hub-reply-route.d.ts +36 -0
  35. package/dist/hub-reply-route.js +67 -0
  36. package/dist/hub-reply-route.js.map +1 -0
  37. package/dist/hub-report-target.d.ts +4 -0
  38. package/dist/locale.js +2 -2
  39. package/dist/locale.js.map +1 -1
  40. package/dist/outbound-handlers.d.ts +2 -0
  41. package/dist/outbound-handlers.js +22 -7
  42. package/dist/outbound-handlers.js.map +1 -1
  43. package/dist/outbound-schemas.d.ts +1 -0
  44. package/dist/outbound-schemas.js +1 -0
  45. package/dist/outbound-schemas.js.map +1 -1
  46. package/dist/topic-commands.js +6 -4
  47. package/dist/topic-commands.js.map +1 -1
  48. package/dist/turn-reply-guard.d.ts +3 -1
  49. package/dist/turn-reply-guard.js +3 -2
  50. package/dist/turn-reply-guard.js.map +1 -1
  51. package/dist/ui/hub-chat-store.js +9 -6
  52. package/dist/ui/hub-chat-strings.js +4 -2
  53. package/dist/ui/hub-room-strings.js +2 -2
  54. package/dist/ui/hub-room-thread.js +9 -3
  55. package/dist/ui/panel-chat.js +18 -5
  56. package/dist/ui/panel-hub.js +2 -2
  57. package/dist/ui/report-columns.js +137 -0
  58. package/dist/ui/shared/app.css +28 -2
  59. package/package.json +1 -1
@@ -206,23 +206,29 @@ export function toThreadMessages(messages, { meId, ids, direct = false, expanded
206
206
  const quotedId = m.replyTo || m.answerTo || "";
207
207
  const quoted = quotedId ? byId.get(quotedId) : null;
208
208
  const state = askState(askOf(m, messages)), sourceBadge = roomSource(author);
209
+ const neutralNoReply=direct&&state?.reason==="finished-without-answer";
210
+ const child=direct&&mine?messages.find(x=>x.answerTo===m.id&&x.author?.kind==="agent"):null;
211
+ const deliveredLine=direct&&mine&&state?.delivery==="processing"&&child?.author?.name?hroom("directDelivered",child.author.name):null;
212
+ if(m.stage==="not-answered"&&m.reasonCode==="finished-without-answer"){
213
+ out.push({boot:BOOT,id,role:"status",sender:"",text:hroom("noAnswerUnanswered",author.name||""),bare:true,progressOf:m.answerTo});continue;
214
+ }
209
215
  out.push({ boot: BOOT, id, role: kind === "person" && !author.via ? "user" : "agent", sender: authorLine(author, mine, direct), ts: iso(m.at), text: String(m.text || ""), mine,
210
216
  ...(sourceBadge ? { sourceBadge } : {}), ...(kind === "agent" && author.id ? { authorMember: String(author.id) } : {}),
211
217
  ...(kind === "person" && !mine && !author.via ? { person: true } : {}), // Lumen (spec §3): someone else's words, a bubble on the left
212
- roomMessage: m.id, ...(mine && state?.delivery ? { delivery: state.delivery } : {}),
218
+ roomMessage: m.id, ...(mine && state?.delivery && !neutralNoReply && !deliveredLine ? { delivery: state.delivery } : {}),
213
219
  // M-3125: a post's files, as the 1:1 chat maps them (images inline through the Hub's own route; HTML gets its preview card).
214
220
  ...(() => { const files = Array.isArray(m.files) ? m.files.map(hubFileAttachment).filter(Boolean) : []; return files.length ? { attachments: files } : {}; })(),
215
221
  ...(!direct && Array.isArray(m.reactions) && m.reactions.length ? { reactionBar: reactionBar(m.reactions, { meId, names }) } : {}),
216
222
  ...(!direct && kind !== "person" && m.buttons ? { buttons: roomButtons(m.buttons, meId) } : {}),
217
223
  ...(quotedId ? { replyTo: { boot: BOOT, id: num(quotedId), sender: quoted ? authorLine(quoted.author, quoted.author?.id === meId, direct) : "", text: quoted ? String(quoted.text || "").slice(0, 120) : "" } } : {}),
218
- ...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "owner-declined" ? hroom("noAnswerDeclined") : m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered"):hroom("noAnswer") } : {}) });
224
+ ...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "owner-declined" ? hroom("noAnswerDeclined") : m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered",author.name||""):hroom("noAnswer") } : {}) });
219
225
  if (kind === "person" && m.stage === "not-answered" && m.reasonCode === "share-needs-reshare")
220
226
  out.push({ boot: BOOT, id: num(`unavailable:${m.id}`), role: "status", sender: "", text: hroom("noAnswerReshare"), bare: true, wrap: true });
221
227
  if (foldAfter) out.push({ boot: BOOT, id: num(`expand:${foldAfter.arg}`), role: "status", sender: "", text: "", bare: true, fold: true, action: foldAfter });
222
228
  // Spec §10: once an @所有 Agent has answers, under the last one shown, 「請房間助理整理」 (it sends 「@房間助理 整理上面的回答」).
223
229
  if (summarise && lastShown && byId.get(m.answerTo)?.mentions?.includes("all"))
224
230
  out.push({ boot: BOOT, id: num(`summarise:${m.answerTo}`), role: "status", sender: "", text: "", bare: true, action: { label: hroom("askSummarise"), arg: `summarise:${m.answerTo}` } });
225
- const line = state?.line, why = !line && mine ? askReason(state?.reason) : "";
231
+ const line = deliveredLine || state?.line, why = !line && mine && !(neutralNoReply&&messages.some(x=>x.answerTo===m.id&&x.reasonCode==="finished-without-answer")) ? askReason(state?.reason) : "";
226
232
  // Its status, not an event: under it, without a time of its own.
227
233
  if (line) out.push({ boot: BOOT, id: id + 1, role: "status", sender: "", text: line, progressOf: m.id, bare: true });
228
234
  else if (why) out.push({ boot: BOOT, id: id + 1, role: "status", sender: "", text: why, progressOf: m.id, bare: true, wrap: state?.reason === "share-needs-reshare" });
@@ -1,6 +1,7 @@
1
1
  import { focusComposerStrip } from "/assets/composer-focus.js";
2
2
  import { previewReplyFile, replyPreviewLabel } from "./reply-file-preview.js";
3
3
  import { NativePaneRecovery } from "./native-pane-recovery.js";
4
+ import { applyColumns, ClearColumns, ColumnMenu, columnsActive, columnsLabel, loadColumns, NO_COLUMNS, saveColumns } from "./report-columns.js";
4
5
  import { GeneralLocation } from "./general-location.js";
5
6
  // #1408 step 1: the chat panel. Behind the session gate (/ui/js/), loaded by the app with a dynamic import in "full"
6
7
  // mode only. boot() runs once per page (the chat store must hear the stream from the first frame); <ChatPanel> mounts
@@ -1060,20 +1061,32 @@ function CommandReport({ report, command }) {
1060
1061
  wasExpanded.current = expanded;
1061
1062
  }, [expanded]);
1062
1063
  const query = filter.trim().toLocaleLowerCase();
1063
- const rows = command === "status" && query
1064
+ // M-3943: the status report's columns sort and filter like a spreadsheet's (report-columns.js), kept per browser.
1065
+ const status = command === "status";
1066
+ const [columns, setColumnsState] = useState(() => status ? loadColumns(command, report.columns.length) : NO_COLUMNS);
1067
+ const setColumns = (next) => { setColumnsState(next); saveColumns(command, report.columns.length, next); };
1068
+ const arranged = status && columnsActive(report.rows, columns);
1069
+ const matched = status && query
1064
1070
  ? report.rows.filter(row => row.some(value => value.toLocaleLowerCase().includes(query))) : report.rows;
1071
+ const rows = status ? applyColumns(matched, columns) : matched;
1072
+ const narrowed = !!query || rows.length !== report.rows.length;
1073
+ const colMenu = (label, i, triggerClass) => html`<${ColumnMenu} label=${label} col=${i} rows=${report.rows} state=${columns} onChange=${setColumns} triggerClass=${triggerClass} />`;
1074
+ const ariaSort = (i) => columns.sort?.col === i ? (columns.sort.dir === "asc" ? "ascending" : "descending") : undefined;
1065
1075
  const view = html`<section class=${`cmd-report cmd-report-${command}${expanded ? " cmd-report-expanded" : ""}`} aria-label=${report.title}>
1066
1076
  ${expanded ? null : html`<h3>${report.title}</h3>`}
1067
1077
  <div class="cmd-report-tools">
1068
- ${command === "status" ? html`<label class="field"><span class="sr-only">${t("chat.cmdReportFilter")}</span>
1078
+ ${status ? html`<label class="field"><span class="sr-only">${t("chat.cmdReportFilter")}</span>
1069
1079
  <input type="search" aria-label=${t("chat.cmdReportFilter")} placeholder=${t("chat.cmdReportFilter")}
1070
1080
  value=${filter} onInput=${e => setFilter(e.target.value)} /></label>` : null}
1081
+ ${arranged ? html`<${ClearColumns} onClear=${() => setColumns(NO_COLUMNS)} />` : null}
1071
1082
  ${expanded ? null : html`<button type="button" class="btn btn-sm btn-ghost" ref=${trigger} data-report-expand onClick=${() => setExpanded(true)}>${t("chat.cmdReportOpen")}</button>`}
1072
1083
  </div>
1073
- ${command === "status" ? html`<p class="note cmd-report-count">${query ? t("chat.cmdReportMatches", rows.length, report.rows.length) : t("chat.cmdReportCount", report.rows.length)}${report.notes[0] ? " · " + report.notes[0] : ""}</p>` : null}
1084
+ ${status ? html`<div class="report-col-bar" role="group" aria-label=${columnsLabel()}>${report.columns.map((label, i) => colMenu(label, i, "btn btn-sm btn-ghost report-col-chip"))}</div>` : null}
1085
+ ${status ? html`<p class="note cmd-report-count">${narrowed ? t("chat.cmdReportMatches", rows.length, report.rows.length) : t("chat.cmdReportCount", report.rows.length)}${report.notes[0] ? " · " + report.notes[0] : ""}</p>` : null}
1074
1086
  <div class="cmd-report-body" tabIndex="0" aria-label=${report.title}>
1075
- ${rows.length ? html`<table class=${command === "status" ? "us-table" : "cmd-metrics"}><thead><tr>${report.columns.map(label => html`<th scope="col">${label}</th>`)}</tr></thead>
1076
- <tbody>${rows.map(row => html`<tr>${row.map((value, i) => html`<td data-label=${report.columns[i]}>${value}</td>`)}</tr>`)}</tbody></table>` : query ? html`<p class="note">${t("chat.cmdReportEmpty")}</p>` : null}
1087
+ ${rows.length ? html`<table class=${status ? "us-table" : "cmd-metrics"}><thead><tr>${report.columns.map((label, i) => status
1088
+ ? html`<th scope="col" aria-sort=${ariaSort(i)}>${colMenu(label, i)}</th>` : html`<th scope="col">${label}</th>`)}</tr></thead>
1089
+ <tbody>${rows.map(row => html`<tr>${row.map((value, i) => html`<td data-label=${report.columns[i]}>${value}</td>`)}</tr>`)}</tbody></table>` : narrowed ? html`<p class="note">${t("chat.cmdReportEmpty")}</p>` : null}
1077
1090
  ${(command === "status" ? report.notes.slice(1) : report.notes).map(note => html`<p class="note">${note}</p>`)}
1078
1091
  </div>
1079
1092
  </section>`;
@@ -774,14 +774,14 @@ function HubRoomLoading({ error } = {}) {
774
774
  /** The thread's words are the fleet chat's; its delivery marks say the Hub's stages. */
775
775
  const threadT = (key, ...a) => (key.startsWith("chat.tick_") ? hc(key.slice(5), ...a) : t(key, ...a));
776
776
  const REASONS = { "share-needs-reshare": "reason_reshare", expired: "reason_expired", revoked: "reason_revoked", frozen: "reason_frozen", withdrawn: "reason_withdrawn" };
777
- const reasonText = (code, stage) => (stage === "uncertain" ? hc("uncertain") : hc("notAnswered", hc(REASONS[code] || "reason_unknown")));
777
+ const reasonText = (code, stage, agent) => (code==="finished-without-answer"?hc("finishedNoReply",agent||""):stage === "uncertain" ? hc("uncertain") : hc("notAnswered", hc(REASONS[code] || "reason_unknown")));
778
778
  async function copyText(text) { try { await navigator.clipboard.writeText(text); return true; } catch { return false; } }
779
779
 
780
780
  /** One room: its header, the thread, what blocks asking, the working line and the composer; the panel beside it. */
781
781
  function HubRoomView({ room: given }) {
782
782
  const s = useSession();
783
783
  const wide = useWide();
784
- const store = useMemo(() => createHubChatStore(given, { me: (s && s.displayName) || "", reason: reasonText }), [given.id]);
784
+ const store = useMemo(() => createHubChatStore(given, { me: (s && s.displayName) || "", reason: reasonText, progress: agent=>hc("deliveredNextTurn",agent) }), [given.id]);
785
785
  useEffect(() => () => store.stop(), [store]);
786
786
  const [, tick] = useState(0);
787
787
  useEffect(() => {
@@ -0,0 +1,137 @@
1
+ // M-3943: Excel-style column menus for the web status report. Each column sorts A → Z or Z → A and shows or hides its
2
+ // values with checkboxes; the choice is this browser's own (localStorage), so it survives a reload. Pure helpers first
3
+ // (sorting and filtering are tested without a page), then the menu.
4
+ import { html } from "/assets/app-html.js";
5
+ import { Menu } from "/assets/ui-menu.js";
6
+ import { Icon } from "/assets/ui-icons.js";
7
+ import { lang, register, t } from "/assets/app-i18n.js";
8
+
9
+ register("reportCols", {
10
+ en: { menu: "Sort and filter: {0}", asc: "Sort A to Z", desc: "Sort Z to A", show: "Filter by value", all: "Select all",
11
+ blank: "(Blank)", clear: "Clear filter", clearAll: "Clear sort and filters", columns: "Sort and filter" },
12
+ "zh-TW": { menu: "排序與篩選:{0}", asc: "從 A 到 Z 排序", desc: "從 Z 到 A 排序", show: "依值篩選", all: "全選",
13
+ blank: "(空白)", clear: "清除篩選", clearAll: "清除排序與篩選", columns: "排序與篩選" },
14
+ });
15
+ const rc = (key, ...args) => t(`reportCols.${key}`, ...args);
16
+
17
+ /** Cells that mean "nothing here": sorted last in both directions (as Excel does) and listed as (Blank). */
18
+ const BLANK = new Set(["", "-", "—"]);
19
+ export const isBlank = (value) => BLANK.has(String(value ?? "").trim());
20
+ /**
21
+ * The order text sorts in. Latin (and digits, symbols) before CJK in every language, as a spreadsheet does, so the same
22
+ * report sorts the same whatever the dashboard's language; Z to A is the exact reverse. Within each group, the
23
+ * dashboard's own language orders (not the browser's): zh-TW orders its characters its own way.
24
+ */
25
+ const CJK = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}]/u;
26
+ const collators = new Map();
27
+ function collator() {
28
+ const language = lang() || "en";
29
+ if (!collators.has(language)) collators.set(language, new Intl.Collator(language, { numeric: true, sensitivity: "base" }));
30
+ return collators.get(language);
31
+ }
32
+ export function compareText(a, b) {
33
+ const x = String(a ?? "").trim(), y = String(b ?? "").trim();
34
+ return (Number(CJK.test(x)) - Number(CJK.test(y))) || collator().compare(x, y);
35
+ }
36
+
37
+ /** The empty choice: no sort, nothing hidden. `hidden` maps a column index to the values it hides. */
38
+ export const NO_COLUMNS = Object.freeze({ sort: null, hidden: {} });
39
+
40
+ /** The rows a choice shows, in its order. A value no row has any more hides nothing; new values are shown. */
41
+ export function applyColumns(rows, state) {
42
+ const hidden = Object.entries(state?.hidden || {}).filter(([, values]) => values?.length);
43
+ let out = hidden.length ? rows.filter(row => hidden.every(([col, values]) => !values.includes(row[+col]))) : rows;
44
+ const sort = state?.sort;
45
+ if (sort && Number.isInteger(sort.col)) {
46
+ const dir = sort.dir === "desc" ? -1 : 1;
47
+ out = out.map((row, i) => [row, i]).sort(([a, i], [b, j]) => {
48
+ const ea = isBlank(a[sort.col]), eb = isBlank(b[sort.col]);
49
+ if (ea !== eb) return ea ? 1 : -1;
50
+ return dir * compareText(a[sort.col], b[sort.col]) || i - j;
51
+ }).map(([row]) => row);
52
+ }
53
+ return out;
54
+ }
55
+
56
+ /** A column's distinct values, in A → Z order with blanks last: the checkboxes of its menu. */
57
+ export function columnValues(rows, col) {
58
+ return [...new Set(rows.map(row => row[col] ?? ""))].sort((a, b) => (isBlank(a) - isBlank(b)) || compareText(a, b));
59
+ }
60
+
61
+ /** Whether a column hides anything the rows still have (a remembered value that is gone does not count). */
62
+ export function columnFiltered(rows, state, col) {
63
+ const values = state?.hidden?.[col];
64
+ return !!values?.length && rows.some(row => values.includes(row[col]));
65
+ }
66
+
67
+ /** Whether a choice changes anything for these rows: a sort, or a filter that hides a row. */
68
+ export const columnsActive = (rows, state) => !!state?.sort || rows.some(row => Object.entries(state?.hidden || {}).some(([col, values]) => values?.includes(row[+col])));
69
+
70
+ /** Toggle one value of a column; `all` shows every value when any is hidden, else hides them all. */
71
+ export function toggleValue(state, col, value, values) {
72
+ const hidden = new Set(state.hidden?.[col] || []);
73
+ if (value === undefined) {
74
+ const anyHidden = values.some(v => hidden.has(v));
75
+ return withHidden(state, col, anyHidden ? [] : values);
76
+ }
77
+ if (hidden.has(value)) hidden.delete(value); else hidden.add(value);
78
+ return withHidden(state, col, [...hidden]);
79
+ }
80
+ function withHidden(state, col, values) {
81
+ const hidden = { ...(state.hidden || {}) };
82
+ if (values.length) hidden[col] = values; else delete hidden[col];
83
+ return { ...state, hidden };
84
+ }
85
+
86
+ /**
87
+ * This browser's choice for a report, kept per command. It is tied to the report's column count: a report whose columns
88
+ * changed starts clean rather than sorting or hiding the wrong column. Storage can be missing or refuse (a private
89
+ * window): the menus still work, they just aren't kept.
90
+ */
91
+ const storageKey = (command) => `agend.reportColumns.${command}`;
92
+ export function loadColumns(command, columnCount) {
93
+ try {
94
+ const saved = JSON.parse(globalThis.localStorage?.getItem(storageKey(command)) || "null");
95
+ if (!saved || saved.columns !== columnCount) return NO_COLUMNS;
96
+ const sort = saved.sort && Number.isInteger(saved.sort.col) && saved.sort.col < columnCount && (saved.sort.dir === "asc" || saved.sort.dir === "desc")
97
+ ? { col: saved.sort.col, dir: saved.sort.dir } : null;
98
+ const hidden = {};
99
+ for (const [col, values] of Object.entries(saved.hidden || {})) {
100
+ if (+col >= 0 && +col < columnCount && Array.isArray(values)) hidden[col] = values.filter(v => typeof v === "string");
101
+ }
102
+ return { sort, hidden };
103
+ } catch { return NO_COLUMNS; }
104
+ }
105
+ export function saveColumns(command, columnCount, state) {
106
+ try {
107
+ if (!state.sort && !Object.keys(state.hidden || {}).length) globalThis.localStorage?.removeItem(storageKey(command));
108
+ else globalThis.localStorage?.setItem(storageKey(command), JSON.stringify({ columns: columnCount, sort: state.sort, hidden: state.hidden }));
109
+ } catch { /* not kept: the choice still applies on this page */ }
110
+ }
111
+
112
+ /** One column's menu: the two sorts, then a checkbox per value with Select all, then Clear filter. */
113
+ export function ColumnMenu({ label, col, rows, state, onChange, trigger, triggerClass }) {
114
+ const values = columnValues(rows, col);
115
+ const hidden = new Set(state.hidden?.[col] || []);
116
+ const sorted = state.sort?.col === col ? state.sort.dir : null;
117
+ const filtered = columnFiltered(rows, state, col);
118
+ const items = [
119
+ { key: "asc", label: rc("asc"), checked: sorted === "asc", onSelect: () => onChange({ ...state, sort: sorted === "asc" ? null : { col, dir: "asc" } }) },
120
+ { key: "desc", label: rc("desc"), checked: sorted === "desc", onSelect: () => onChange({ ...state, sort: sorted === "desc" ? null : { col, dir: "desc" } }) },
121
+ { key: "show", heading: true, label: rc("show") },
122
+ { key: "all", checkbox: true, label: rc("all"), checked: !values.some(v => hidden.has(v)), onSelect: () => onChange(toggleValue(state, col, undefined, values)) },
123
+ ...values.map(value => ({ key: `v:${value}`, checkbox: true, title: value, label: isBlank(value) ? `${value || ""} ${rc("blank")}`.trim() : value,
124
+ checked: !hidden.has(value), onSelect: () => onChange(toggleValue(state, col, value, values)) })),
125
+ { key: "clear", label: rc("clear"), disabled: !filtered, onSelect: () => onChange(withHidden(state, col, [])) },
126
+ ];
127
+ // Marks drawn as icons (a text arrow or funnel can be missing from the page's font): the sort's direction, a filter.
128
+ return html`<${Menu} items=${items} label=${rc("menu", label)} cls="agent-menu report-col-menu" fit topLayer active=${filtered || !!sorted}
129
+ triggerClass=${`${triggerClass || "report-col-btn"}${filtered ? " report-col-filtered" : ""}`}
130
+ trigger=${trigger ?? html`<span class="report-col-label">${label}</span><span class="report-col-mark" aria-hidden="true">${sorted ? html`<${Icon} name=${sorted === "asc" ? "up" : "down"} size=${14} />` : null}${filtered ? html`<${Icon} name="sliders" size=${14} />` : sorted ? null : html`<${Icon} name="chevron" size=${14} />`}</span>`} />`;
131
+ }
132
+
133
+ /** The tools-row button that puts a report back to its own order with every row shown. */
134
+ export function ClearColumns({ onClear }) {
135
+ return html`<button type="button" class="btn btn-sm btn-ghost" data-report-clear onClick=${onClear}>${rc("clearAll")}</button>`;
136
+ }
137
+ export const columnsLabel = () => rc("columns");
@@ -3247,13 +3247,35 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
3247
3247
  .cmd-report-expanded .cmd-report-body { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
3248
3248
  .cmd-report-tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
3249
3249
  .cmd-report-tools .field { flex: 1; min-width: 0; }
3250
- .cmd-report-status .us-table th:first-child { width: 28%; }
3251
- .cmd-report-status .us-table th:nth-child(3) { width: 20%; }
3250
+ .cmd-report-status .us-table th:first-child { width: 24%; }
3251
+ /* M-3943: Profile (3rd) beside Backend; Model (4th) keeps the room it had. */
3252
+ .cmd-report-status .us-table th:nth-child(3) { width: 12%; }
3253
+ .cmd-report-status .us-table th:nth-child(4) { width: 18%; }
3252
3254
  .cmd-report h3 { margin: 0 0 var(--s-2); font-size: var(--fs-sm); }
3253
3255
  .cmd-report .note { overflow-wrap: anywhere; white-space: pre-wrap; }
3254
3256
  .cmd-report table { table-layout: fixed; width: 100%; border-collapse: collapse; }
3255
3257
  .cmd-report td, .cmd-report th { overflow-wrap: anywhere; }
3256
3258
  .cmd-metrics td, .cmd-metrics th { padding: var(--s-2); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
3259
+ /* M-3943: each status column's sort and filter menu — the header itself on a desk, a row of buttons on a phone. */
3260
+ .report-col-menu { display: block; }
3261
+ .report-col-btn { display: flex; align-items: center; gap: var(--s-1); width: 100%; padding: 0; border: 0; background: none; color: inherit;
3262
+ font: inherit; font-weight: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
3263
+ .report-col-btn:hover, .report-col-btn:focus-visible { color: var(--accent); }
3264
+ .report-col-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
3265
+ .report-col-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
3266
+ .report-col-mark { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--text-3); }
3267
+ .report-col-mark .icon { display: block; }
3268
+ /* Value checkboxes read as boxes, ticked or not (the shared menu draws only the tick). */
3269
+ .report-col-menu [role=menuitemcheckbox] .menu-tick { width: 16px; height: 16px; box-sizing: border-box; justify-content: center; align-items: center;
3270
+ border: 1.5px solid var(--text-3); border-radius: 3px; }
3271
+ .report-col-menu [role=menuitemcheckbox][aria-checked=true] .menu-tick { border-color: var(--accent); }
3272
+ .report-col-menu [role=menuitemcheckbox] .menu-tick .icon { width: 12px; height: 12px; }
3273
+ /* A long list ends with room below its last item (Clear filter), not flush against the edge. */
3274
+ .report-col-menu > .menu-list { padding-bottom: var(--s-3); }
3275
+ .report-col-btn.active .report-col-mark, .report-col-chip.active, .report-col-chip.active .report-col-mark { color: var(--accent); }
3276
+ /* Open is not filtered: an open menu's button gets a plain fill; only a sort or filter turns a column the accent colour. */
3277
+ .cmd-report .report-col-btn[aria-expanded=true], .cmd-report .report-col-chip[aria-expanded=true] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
3278
+ .report-col-bar { display: none; }
3257
3279
  @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
3258
3280
  .cmd-report-body { max-height: 25vh; }
3259
3281
  .cmd-report-tools input, .cmd-report-tools .btn { min-height: var(--tap); }
@@ -3264,6 +3286,10 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
3264
3286
  .cmd-report-status .us-table tr { margin-bottom: var(--s-3); padding: var(--s-2); border-bottom: 1px solid var(--border); }
3265
3287
  .cmd-report-status .us-table td { display: flex; justify-content: space-between; gap: var(--s-3); border: 0; }
3266
3288
  .cmd-report-status .us-table td::before { content: attr(data-label); color: var(--text-3); flex-shrink: 0; }
3289
+ .report-col-bar { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-2); }
3290
+ .cmd-report-status .cmd-report-tools .field { flex-basis: 100%; }
3291
+ .report-col-chip { min-height: var(--tap); }
3292
+ .report-col-chip .report-col-label { overflow-wrap: normal; }
3267
3293
 
3268
3294
  }
3269
3295
  .cmd-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-ui); color: var(--text-2); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songsid/agend",
3
- "version": "2.4.0-beta.31",
3
+ "version": "2.4.0-beta.32",
4
4
  "description": "Multi-agent fleet daemon — run coding CLIs (Claude, Muse, Codex, OpenCode) from Discord or Telegram",
5
5
  "type": "module",
6
6
  "bin": {