rrce-workflow 0.3.8 → 0.3.9
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 +132 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4571,6 +4571,54 @@ var init_ConfigContext = __esm({
|
|
|
4571
4571
|
}
|
|
4572
4572
|
});
|
|
4573
4573
|
|
|
4574
|
+
// src/mcp/ui/ui-helpers.ts
|
|
4575
|
+
var getStatusIcon, getStatusColor, getChecklistProgress, getCheckbox, getProgressBar, getFolderIcon;
|
|
4576
|
+
var init_ui_helpers = __esm({
|
|
4577
|
+
"src/mcp/ui/ui-helpers.ts"() {
|
|
4578
|
+
"use strict";
|
|
4579
|
+
getStatusIcon = (status) => {
|
|
4580
|
+
const icons = {
|
|
4581
|
+
pending: "\u23F3",
|
|
4582
|
+
in_progress: "\u{1F504}",
|
|
4583
|
+
blocked: "\u{1F6AB}",
|
|
4584
|
+
complete: "\u2705"
|
|
4585
|
+
};
|
|
4586
|
+
return icons[status] || "\u25CB";
|
|
4587
|
+
};
|
|
4588
|
+
getStatusColor = (status) => {
|
|
4589
|
+
const colors = {
|
|
4590
|
+
pending: "yellow",
|
|
4591
|
+
in_progress: "yellow",
|
|
4592
|
+
blocked: "red",
|
|
4593
|
+
complete: "green"
|
|
4594
|
+
};
|
|
4595
|
+
return colors[status] || "white";
|
|
4596
|
+
};
|
|
4597
|
+
getChecklistProgress = (checklist) => {
|
|
4598
|
+
if (!checklist || checklist.length === 0) {
|
|
4599
|
+
return { completed: 0, total: 0, percentage: 0 };
|
|
4600
|
+
}
|
|
4601
|
+
const completed = checklist.filter((item) => item.status === "done").length;
|
|
4602
|
+
return {
|
|
4603
|
+
completed,
|
|
4604
|
+
total: checklist.length,
|
|
4605
|
+
percentage: Math.round(completed / checklist.length * 100)
|
|
4606
|
+
};
|
|
4607
|
+
};
|
|
4608
|
+
getCheckbox = (status) => {
|
|
4609
|
+
return status === "done" ? "\u2611" : "\u2610";
|
|
4610
|
+
};
|
|
4611
|
+
getProgressBar = (percentage, length = 10) => {
|
|
4612
|
+
const filled = Math.floor(percentage / 100 * length);
|
|
4613
|
+
const empty = length - filled;
|
|
4614
|
+
return "\u2588".repeat(filled) + "\u2591".repeat(empty);
|
|
4615
|
+
};
|
|
4616
|
+
getFolderIcon = (isOpen) => {
|
|
4617
|
+
return isOpen ? "\u{1F4C2}" : "\u{1F4C1}";
|
|
4618
|
+
};
|
|
4619
|
+
}
|
|
4620
|
+
});
|
|
4621
|
+
|
|
4574
4622
|
// src/mcp/ui/ProjectsView.tsx
|
|
4575
4623
|
import { useEffect as useEffect3, useMemo as useMemo3, useState as useState3 } from "react";
|
|
4576
4624
|
import { Box as Box4, Text as Text4, useInput as useInput2 } from "ink";
|
|
@@ -4585,11 +4633,7 @@ function projectKey(p) {
|
|
|
4585
4633
|
}
|
|
4586
4634
|
function formatProjectLabel(p, drift) {
|
|
4587
4635
|
const root = p.sourcePath ?? p.path;
|
|
4588
|
-
const driftLabel = drift?.hasDrift ? " [UPDATE AVAILABLE]" : "";
|
|
4589
4636
|
const label = `${p.name} (${p.source})${root ? ` - ${root}` : ""}`;
|
|
4590
|
-
if (drift?.hasDrift) {
|
|
4591
|
-
return `${label} ${driftLabel}`;
|
|
4592
|
-
}
|
|
4593
4637
|
return label;
|
|
4594
4638
|
}
|
|
4595
4639
|
var STATUS_CYCLE, ProjectsView;
|
|
@@ -4600,6 +4644,7 @@ var init_ProjectsView = __esm({
|
|
|
4600
4644
|
init_config();
|
|
4601
4645
|
init_tasks_fs();
|
|
4602
4646
|
init_ConfigContext();
|
|
4647
|
+
init_ui_helpers();
|
|
4603
4648
|
STATUS_CYCLE = ["pending", "in_progress", "blocked", "complete"];
|
|
4604
4649
|
ProjectsView = ({ config: initialConfig, projects: allProjects, onConfigChange }) => {
|
|
4605
4650
|
const { driftReports, checkAllDrift } = useConfig();
|
|
@@ -4795,8 +4840,20 @@ var init_ProjectsView = __esm({
|
|
|
4795
4840
|
}
|
|
4796
4841
|
return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "cyan", flexGrow: 1, children: [
|
|
4797
4842
|
/* @__PURE__ */ jsxs3(Box4, { justifyContent: "space-between", children: [
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
|
|
4843
|
+
/* @__PURE__ */ jsxs3(Box4, { children: [
|
|
4844
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "cyan", children: "\u2699 Tasks Mode" }),
|
|
4845
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " \u2022 " }),
|
|
4846
|
+
/* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4847
|
+
sortedProjects.length,
|
|
4848
|
+
" projects"
|
|
4849
|
+
] }),
|
|
4850
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " \u2022 " }),
|
|
4851
|
+
/* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4852
|
+
Object.values(taskCache).flat().length,
|
|
4853
|
+
" tasks"
|
|
4854
|
+
] })
|
|
4855
|
+
] }),
|
|
4856
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "t:Expose \u2191/\u2193:Nav Enter:Expand s:Status R:Refresh u:Drift" })
|
|
4800
4857
|
] }),
|
|
4801
4858
|
errorLine && /* @__PURE__ */ jsx5(Box4, { marginTop: 0, children: /* @__PURE__ */ jsx5(Text4, { color: "red", children: errorLine }) }),
|
|
4802
4859
|
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "row", flexGrow: 1, children: [
|
|
@@ -4812,12 +4869,14 @@ var init_ProjectsView = __esm({
|
|
|
4812
4869
|
/* @__PURE__ */ jsxs3(Box4, { children: [
|
|
4813
4870
|
/* @__PURE__ */ jsx5(Text4, { color: isSel ? "cyan" : "white", children: isSel ? "> " : " " }),
|
|
4814
4871
|
/* @__PURE__ */ jsxs3(Text4, { color: isSel ? "cyan" : "white", children: [
|
|
4815
|
-
isOpen
|
|
4872
|
+
getFolderIcon(isOpen),
|
|
4873
|
+
" ",
|
|
4816
4874
|
formatProjectLabel(row.project, drift)
|
|
4817
4875
|
] }),
|
|
4876
|
+
drift?.hasDrift && /* @__PURE__ */ jsx5(Text4, { color: "magenta", children: " \u26A0" }),
|
|
4818
4877
|
/* @__PURE__ */ jsxs3(Text4, { color: "dim", children: [
|
|
4819
4878
|
" ",
|
|
4820
|
-
count > 0 ? `
|
|
4879
|
+
count > 0 ? `(${count})` : ""
|
|
4821
4880
|
] })
|
|
4822
4881
|
] }),
|
|
4823
4882
|
isSel && drift?.hasDrift && /* @__PURE__ */ jsx5(Box4, { marginLeft: 4, children: /* @__PURE__ */ jsxs3(Text4, { color: "magenta", dimColor: true, italic: true, children: [
|
|
@@ -4832,51 +4891,89 @@ var init_ProjectsView = __esm({
|
|
|
4832
4891
|
/* @__PURE__ */ jsx5(Text4, { color: isSel ? "cyan" : "white", children: isSel ? "> " : " " }),
|
|
4833
4892
|
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: " - " }),
|
|
4834
4893
|
/* @__PURE__ */ jsx5(Text4, { color: isSel ? "cyan" : "white", children: taskLabel }),
|
|
4835
|
-
row.task.task_slug !== "__none__" && /* @__PURE__ */ jsx5(Text4, {
|
|
4894
|
+
row.task.task_slug !== "__none__" && /* @__PURE__ */ jsx5(Text4, { backgroundColor: getStatusColor(status), color: "black", children: ` ${getStatusIcon(status)} ${status.toUpperCase().replace("_", " ")} ` })
|
|
4836
4895
|
] }, `t:${projectKey(row.project)}:${row.task.task_slug}`);
|
|
4837
4896
|
}),
|
|
4838
4897
|
/* @__PURE__ */ jsx5(Box4, { marginTop: 1, children: /* @__PURE__ */ jsx5(Text4, { color: "gray", children: "\u25B2/\u25BC navigate \u2022 Enter expand/collapse \u2022 s cycle status \u2022 R refresh \u2022 t expose mode" }) })
|
|
4839
4898
|
] }),
|
|
4840
|
-
/* @__PURE__ */ jsx5(Box4, { flexDirection: "column", width: "45%", paddingLeft: 2, children: !selectedTask ? /* @__PURE__ */
|
|
4899
|
+
/* @__PURE__ */ jsx5(Box4, { flexDirection: "column", width: "45%", paddingLeft: 2, children: !selectedTask ? /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", justifyContent: "center", alignItems: "center", gap: 1, children: [
|
|
4900
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "dim", children: "\u2500 No Task Selected \u2500" }),
|
|
4901
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "Use \u2191/\u2193 to navigate, Enter to expand projects" }),
|
|
4902
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "Press 's' to cycle task status, 't' to switch modes" })
|
|
4903
|
+
] }) : /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", children: [
|
|
4841
4904
|
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "cyan", children: selectedTask.title || selectedTask.task_slug }),
|
|
4842
4905
|
selectedTask.summary && /* @__PURE__ */ jsx5(Text4, { children: selectedTask.summary }),
|
|
4843
|
-
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
4844
|
-
/* @__PURE__ */
|
|
4845
|
-
|
|
4846
|
-
/* @__PURE__ */
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4906
|
+
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, borderStyle: "single", borderColor: "dim", padding: 1, flexDirection: "column", children: [
|
|
4907
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "cyan", children: "\u{1F4CB} Status" }),
|
|
4908
|
+
/* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginTop: 0, children: [
|
|
4909
|
+
/* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4910
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "Status:" }),
|
|
4911
|
+
" ",
|
|
4912
|
+
/* @__PURE__ */ jsx5(Text4, { children: selectedTask.status || "unknown" })
|
|
4913
|
+
] }),
|
|
4914
|
+
/* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4915
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "Updated:" }),
|
|
4916
|
+
" ",
|
|
4917
|
+
/* @__PURE__ */ jsx5(Text4, { children: selectedTask.updated_at || "\u2014" })
|
|
4918
|
+
] }),
|
|
4919
|
+
/* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4920
|
+
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "Tags:" }),
|
|
4921
|
+
" ",
|
|
4922
|
+
" ",
|
|
4923
|
+
(() => {
|
|
4924
|
+
const tags = selectedTask.tags || [];
|
|
4925
|
+
return tags.length > 0 ? tags.map((tag, i) => /* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4926
|
+
/* @__PURE__ */ jsx5(Text4, { color: "cyan", children: tag }),
|
|
4927
|
+
i < tags.length - 1 && /* @__PURE__ */ jsx5(Text4, { color: "dim", children: ", " })
|
|
4928
|
+
] }, tag)) : /* @__PURE__ */ jsx5(Text4, { color: "dim", children: "\u2014" });
|
|
4929
|
+
})()
|
|
4930
|
+
] })
|
|
4855
4931
|
] })
|
|
4856
4932
|
] }),
|
|
4857
|
-
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
4858
|
-
/* @__PURE__ */ jsx5(Text4, { bold: true, children: "Checklist" }),
|
|
4933
|
+
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, borderStyle: "single", borderColor: "dim", padding: 1, flexDirection: "column", children: [
|
|
4934
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "cyan", children: "\u{1F4CB} Checklist" }),
|
|
4935
|
+
selectedTask.checklist && selectedTask.checklist.length > 0 && /* @__PURE__ */ jsx5(Box4, { marginTop: 0, flexDirection: "column", children: /* @__PURE__ */ jsxs3(Box4, { children: [
|
|
4936
|
+
/* @__PURE__ */ jsx5(Text4, { backgroundColor: "white", children: getProgressBar(getChecklistProgress(selectedTask.checklist).percentage) }),
|
|
4937
|
+
/* @__PURE__ */ jsxs3(Text4, { dimColor: true, children: [
|
|
4938
|
+
" ",
|
|
4939
|
+
" ",
|
|
4940
|
+
getChecklistProgress(selectedTask.checklist).completed,
|
|
4941
|
+
"/",
|
|
4942
|
+
getChecklistProgress(selectedTask.checklist).total,
|
|
4943
|
+
" (",
|
|
4944
|
+
getChecklistProgress(selectedTask.checklist).percentage,
|
|
4945
|
+
"%)"
|
|
4946
|
+
] })
|
|
4947
|
+
] }) }),
|
|
4859
4948
|
(selectedTask.checklist || []).length === 0 ? /* @__PURE__ */ jsx5(Text4, { color: "dim", children: "\u2014" }) : (selectedTask.checklist || []).slice(0, 12).map((c, i) => /* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4860
|
-
/* @__PURE__ */ jsx5(Text4, { color: "dim", children: "- " }),
|
|
4861
|
-
c.label || c.id || "item",
|
|
4862
|
-
" ",
|
|
4863
4949
|
/* @__PURE__ */ jsxs3(Text4, { color: "dim", children: [
|
|
4864
|
-
"
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4950
|
+
getCheckbox(c.status || "pending"),
|
|
4951
|
+
" "
|
|
4952
|
+
] }),
|
|
4953
|
+
c.label || c.id || "item"
|
|
4868
4954
|
] }, c.id || i))
|
|
4869
4955
|
] }),
|
|
4870
|
-
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
4871
|
-
/* @__PURE__ */ jsx5(Text4, { bold: true, children: "Agents" }),
|
|
4956
|
+
/* @__PURE__ */ jsxs3(Box4, { marginTop: 1, borderStyle: "single", borderColor: "dim", padding: 1, flexDirection: "column", children: [
|
|
4957
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: "cyan", children: "\u{1F916} Agents" }),
|
|
4872
4958
|
!selectedTask.agents ? /* @__PURE__ */ jsx5(Text4, { color: "dim", children: "\u2014" }) : Object.entries(selectedTask.agents).map(([agent, info]) => /* @__PURE__ */ jsxs3(Text4, { children: [
|
|
4873
4959
|
/* @__PURE__ */ jsxs3(Text4, { color: "dim", children: [
|
|
4874
4960
|
"- ",
|
|
4875
4961
|
agent,
|
|
4876
4962
|
": "
|
|
4877
4963
|
] }),
|
|
4878
|
-
info?.status
|
|
4879
|
-
info?.
|
|
4964
|
+
info?.status === "complete" && /* @__PURE__ */ jsx5(Text4, { color: "green", children: "\u2713" }),
|
|
4965
|
+
info?.status === "in_progress" && /* @__PURE__ */ jsx5(Text4, { color: "yellow", children: "\u27F3" }),
|
|
4966
|
+
info?.status === "pending" && /* @__PURE__ */ jsx5(Text4, { color: "dim", children: "\u25CB" }),
|
|
4967
|
+
info?.blocked && /* @__PURE__ */ jsx5(Text4, { color: "red", children: "\u2715" }),
|
|
4968
|
+
/* @__PURE__ */ jsxs3(Text4, { dimColor: true, children: [
|
|
4969
|
+
" ",
|
|
4970
|
+
info?.status || "\u2014"
|
|
4971
|
+
] }),
|
|
4972
|
+
info?.artifact && /* @__PURE__ */ jsxs3(Text4, { dimColor: true, children: [
|
|
4973
|
+
"(",
|
|
4974
|
+
info.artifact,
|
|
4975
|
+
")"
|
|
4976
|
+
] })
|
|
4880
4977
|
] }, agent))
|
|
4881
4978
|
] })
|
|
4882
4979
|
] }) })
|