@integrity-labs/agt-cli 0.28.310 → 0.28.312
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/bin/agt.js +3 -3
- package/dist/{chunk-J7PAEPOU.js → chunk-HC6V57PX.js} +2 -2
- package/dist/lib/manager-worker.js +23 -16
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/index.js +59 -42
- package/package.json +1 -1
- /package/dist/{chunk-J7PAEPOU.js.map → chunk-HC6V57PX.js.map} +0 -0
package/dist/mcp/index.js
CHANGED
|
@@ -21029,6 +21029,64 @@ function jsonSchemaPropertyToZod(prop) {
|
|
|
21029
21029
|
return external_exports.unknown();
|
|
21030
21030
|
}
|
|
21031
21031
|
|
|
21032
|
+
// src/kanban-list-render.ts
|
|
21033
|
+
var KANBAN_LIST_DISPLAY_ORDER = [
|
|
21034
|
+
"in_progress",
|
|
21035
|
+
"waiting",
|
|
21036
|
+
"needs_attention",
|
|
21037
|
+
"todo",
|
|
21038
|
+
"backlog",
|
|
21039
|
+
"done",
|
|
21040
|
+
"failed"
|
|
21041
|
+
];
|
|
21042
|
+
function kanbanStatusLabel(status) {
|
|
21043
|
+
const labels = {
|
|
21044
|
+
backlog: "Backlog",
|
|
21045
|
+
todo: "To Do",
|
|
21046
|
+
in_progress: "In Progress",
|
|
21047
|
+
// Named for what the reader must DO, not for the internal state. "Waiting"
|
|
21048
|
+
// alone reads as passive//ignorable; the whole failure mode here is a card
|
|
21049
|
+
// that is quietly owed something and gets skimmed past.
|
|
21050
|
+
waiting: "Waiting (blocked \u2014 needs a response)",
|
|
21051
|
+
needs_attention: "Needs Attention (stalled \u2014 nobody is driving this)",
|
|
21052
|
+
done: "Done",
|
|
21053
|
+
failed: "Failed"
|
|
21054
|
+
};
|
|
21055
|
+
return labels[status] ?? status;
|
|
21056
|
+
}
|
|
21057
|
+
function kanbanPriorityLabel(priority) {
|
|
21058
|
+
return priority === 1 ? "HIGH" : priority === 3 ? "LOW" : "MED";
|
|
21059
|
+
}
|
|
21060
|
+
function groupKanbanByStatus(items) {
|
|
21061
|
+
const groups = {};
|
|
21062
|
+
for (const item of items) {
|
|
21063
|
+
(groups[item.status] ??= []).push(item);
|
|
21064
|
+
}
|
|
21065
|
+
return groups;
|
|
21066
|
+
}
|
|
21067
|
+
function renderKanbanList(items) {
|
|
21068
|
+
if (!items.length) return "Board is empty.";
|
|
21069
|
+
const grouped = groupKanbanByStatus(items);
|
|
21070
|
+
const lines = [];
|
|
21071
|
+
const known = new Set(KANBAN_LIST_DISPLAY_ORDER);
|
|
21072
|
+
const unknown2 = Object.keys(grouped).filter((s) => !known.has(s));
|
|
21073
|
+
const order = [...KANBAN_LIST_DISPLAY_ORDER, ...unknown2];
|
|
21074
|
+
for (const status of order) {
|
|
21075
|
+
const group = grouped[status];
|
|
21076
|
+
if (!group?.length) continue;
|
|
21077
|
+
lines.push(`
|
|
21078
|
+
## ${kanbanStatusLabel(status)} (${group.length})`);
|
|
21079
|
+
for (const item of group) {
|
|
21080
|
+
const pri = kanbanPriorityLabel(item.priority);
|
|
21081
|
+
const est = item.estimated_minutes ? ` ~${item.estimated_minutes}min` : "";
|
|
21082
|
+
const del = item.deliverable ? ` \u2192 ${item.deliverable}` : "";
|
|
21083
|
+
const res = item.result ? ` \u2713 ${item.result}` : "";
|
|
21084
|
+
lines.push(`- [${pri}] ${item.title}${est}${del}${res} (id: ${item.id})`);
|
|
21085
|
+
}
|
|
21086
|
+
}
|
|
21087
|
+
return lines.join("\n");
|
|
21088
|
+
}
|
|
21089
|
+
|
|
21032
21090
|
// src/token-refresh-selection.ts
|
|
21033
21091
|
var REFRESH_WINDOW_MS = 10 * 6e4;
|
|
21034
21092
|
function selectIntegrationsToRefresh(input) {
|
|
@@ -21667,25 +21725,7 @@ server.tool(
|
|
|
21667
21725
|
const data = await apiPost("/host/my-kanban", {
|
|
21668
21726
|
agent_id: AGT_AGENT_ID
|
|
21669
21727
|
});
|
|
21670
|
-
|
|
21671
|
-
return { content: [{ type: "text", text: "Board is empty." }] };
|
|
21672
|
-
}
|
|
21673
|
-
const grouped = groupByStatus(data.items);
|
|
21674
|
-
const lines = [];
|
|
21675
|
-
for (const status of ["in_progress", "todo", "backlog", "done", "failed"]) {
|
|
21676
|
-
const items = grouped[status];
|
|
21677
|
-
if (!items?.length) continue;
|
|
21678
|
-
lines.push(`
|
|
21679
|
-
## ${statusLabel(status)} (${items.length})`);
|
|
21680
|
-
for (const item of items) {
|
|
21681
|
-
const pri = priorityLabel(item.priority);
|
|
21682
|
-
const est = item.estimated_minutes ? ` ~${item.estimated_minutes}min` : "";
|
|
21683
|
-
const del = item.deliverable ? ` \u2192 ${item.deliverable}` : "";
|
|
21684
|
-
const res = item.result ? ` \u2713 ${item.result}` : "";
|
|
21685
|
-
lines.push(`- [${pri}] ${item.title}${est}${del}${res} (id: ${item.id})`);
|
|
21686
|
-
}
|
|
21687
|
-
}
|
|
21688
|
-
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
21728
|
+
return { content: [{ type: "text", text: renderKanbanList(data.items) }] };
|
|
21689
21729
|
}
|
|
21690
21730
|
);
|
|
21691
21731
|
server.tool(
|
|
@@ -23530,29 +23570,6 @@ server.tool(
|
|
|
23530
23570
|
return { content: [{ type: "text", text: `Persisted \`${params.widget_id}\` on \`${params.slug}\` (refreshed ${result.refreshed_at}).` }] };
|
|
23531
23571
|
}
|
|
23532
23572
|
);
|
|
23533
|
-
function groupByStatus(items) {
|
|
23534
|
-
const groups = {};
|
|
23535
|
-
for (const item of items) {
|
|
23536
|
-
(groups[item.status] ??= []).push(item);
|
|
23537
|
-
}
|
|
23538
|
-
return groups;
|
|
23539
|
-
}
|
|
23540
|
-
function statusLabel(status) {
|
|
23541
|
-
const labels = {
|
|
23542
|
-
backlog: "Backlog",
|
|
23543
|
-
todo: "To Do",
|
|
23544
|
-
in_progress: "In Progress",
|
|
23545
|
-
waiting: "Waiting",
|
|
23546
|
-
done: "Done",
|
|
23547
|
-
failed: "Failed",
|
|
23548
|
-
// ENG-5723: reaper-only state; render it if the board carries one.
|
|
23549
|
-
needs_attention: "Needs attention"
|
|
23550
|
-
};
|
|
23551
|
-
return labels[status] ?? status;
|
|
23552
|
-
}
|
|
23553
|
-
function priorityLabel(priority) {
|
|
23554
|
-
return priority === 1 ? "HIGH" : priority === 3 ? "LOW" : "MED";
|
|
23555
|
-
}
|
|
23556
23573
|
async function discoverApiTools() {
|
|
23557
23574
|
if (!AGT_AGENT_ID) return [];
|
|
23558
23575
|
try {
|
package/package.json
CHANGED
|
File without changes
|