@thxgg/steward 0.1.13 → 0.1.15

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 (88) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-k8zG74W.js +61 -0
  3. package/.output/public/_nuxt/B-5VWizU.js +1 -0
  4. package/.output/public/_nuxt/{Bq6edYSd.js → BDqHART1.js} +1 -1
  5. package/.output/public/_nuxt/BMAq0QVD.js +42 -0
  6. package/.output/public/_nuxt/BPeTf9dd.js +1 -0
  7. package/.output/public/_nuxt/{dOaEkD-3.js → BubpH_wW.js} +1 -1
  8. package/.output/public/_nuxt/C2HGkiSP.js +1 -0
  9. package/.output/public/_nuxt/CMu9GKTH.js +4 -0
  10. package/.output/public/_nuxt/{BZ1iIOYp.js → CVvrkZkq.js} +1 -1
  11. package/.output/public/_nuxt/C_NevjZD.js +3 -0
  12. package/.output/public/_nuxt/Detail.CzXXlavD.css +1 -0
  13. package/.output/public/_nuxt/_prd_.KTotLoF_.css +1 -0
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/c1a7997d-8d53-4718-ad03-a977e05e2523.json +1 -0
  16. package/.output/public/_nuxt/entry.LcDOtJnR.css +1 -0
  17. package/.output/public/_nuxt/{BFv4l3hn.js → nYTZJhvT.js} +1 -1
  18. package/.output/public/_nuxt/{kTT8NKtq.js → qKRNa41x.js} +1 -1
  19. package/.output/public/_nuxt/qt5OEWHC.js +1 -0
  20. package/.output/public/_nuxt/{C897Egk9.js → uTyw4SRK.js} +1 -1
  21. package/.output/public/_nuxt/{DoNqd8jQ.js → wbj-mIhK.js} +1 -1
  22. package/.output/server/chunks/_/task-graph.mjs +196 -0
  23. package/.output/server/chunks/_/task-graph.mjs.map +1 -0
  24. package/.output/server/chunks/build/{_prd_-CkKfJB6U.mjs → Detail-DC-KJQ1f.mjs} +911 -1688
  25. package/.output/server/chunks/build/Detail-DC-KJQ1f.mjs.map +1 -0
  26. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs +4 -0
  27. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs.map +1 -0
  28. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs +10 -0
  29. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs.map +1 -0
  30. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs +8 -0
  31. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs.map +1 -0
  32. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs +1596 -0
  33. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{default-B5nw9_Xg.mjs → default-DWCOHHTE.mjs} +32 -20
  36. package/.output/server/chunks/build/default-DWCOHHTE.mjs.map +1 -0
  37. package/.output/server/chunks/build/{index-CTpuP9Mj.mjs → index-CckL_NBD.mjs} +2 -2
  38. package/.output/server/chunks/build/index-CckL_NBD.mjs.map +1 -0
  39. package/.output/server/chunks/build/{index-D21S97KB.mjs → index-QVeSHT3L.mjs} +3 -3
  40. package/.output/server/chunks/build/index-QVeSHT3L.mjs.map +1 -0
  41. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs +205 -0
  42. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs.map +1 -0
  43. package/.output/server/chunks/build/server.mjs +12 -3
  44. package/.output/server/chunks/build/styles.mjs +2 -2
  45. package/.output/server/chunks/build/{usePrd-YhvN6Ary.mjs → usePrd-SqcxGyFU.mjs} +20 -2
  46. package/.output/server/chunks/build/usePrd-SqcxGyFU.mjs.map +1 -0
  47. package/.output/server/chunks/nitro/nitro.mjs +620 -588
  48. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs +41 -0
  49. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs.map +1 -0
  50. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs +42 -0
  51. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs.map +1 -0
  52. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/progress.get.mjs +1 -1
  53. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks/_taskId/commits.get.mjs +1 -1
  54. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks.get.mjs +1 -1
  55. package/.output/server/chunks/routes/api/repos/_repoId/prds.get.mjs +1 -1
  56. package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
  57. package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
  58. package/.output/server/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs +207 -0
  59. package/.output/server/node_modules/@vue-flow/controls/package.json +77 -0
  60. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +10186 -0
  61. package/.output/server/node_modules/@vue-flow/core/package.json +95 -0
  62. package/.output/server/package.json +4 -1
  63. package/README.md +10 -1
  64. package/dist/app/types/graph.js +1 -0
  65. package/dist/host/src/mcp.js +2 -0
  66. package/dist/host/src/prompts.js +127 -0
  67. package/dist/server/utils/task-graph.js +190 -0
  68. package/docs/MCP.md +13 -1
  69. package/package.json +5 -1
  70. package/.output/public/_nuxt/BuQdImno.js +0 -1
  71. package/.output/public/_nuxt/CMUOpExW.js +0 -3
  72. package/.output/public/_nuxt/DE885CbX.js +0 -1
  73. package/.output/public/_nuxt/DomrzX-T.js +0 -76
  74. package/.output/public/_nuxt/R2cvz8mH.js +0 -4
  75. package/.output/public/_nuxt/_prd_.DYvuV73Q.css +0 -1
  76. package/.output/public/_nuxt/builds/meta/2ad99048-24f9-4cf6-8622-6c088fe0a244.json +0 -1
  77. package/.output/public/_nuxt/entry.Dk19PK4d.css +0 -1
  78. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs +0 -4
  79. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs.map +0 -1
  80. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs +0 -8
  81. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs.map +0 -1
  82. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs +0 -10
  83. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs.map +0 -1
  84. package/.output/server/chunks/build/_prd_-CkKfJB6U.mjs.map +0 -1
  85. package/.output/server/chunks/build/default-B5nw9_Xg.mjs.map +0 -1
  86. package/.output/server/chunks/build/index-CTpuP9Mj.mjs.map +0 -1
  87. package/.output/server/chunks/build/index-D21S97KB.mjs.map +0 -1
  88. package/.output/server/chunks/build/usePrd-YhvN6Ary.mjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { g as useThemeMode, b as useRoute, _ as __nuxt_component_0, a as useRouter } from './server.mjs';
2
- import { defineComponent, ref, provide, mergeProps, isRef, unref, withCtx, createVNode, useModel, watch, computed, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, createCommentVNode, mergeModels, renderSlot, reactive, useSSRContext } from 'vue';
2
+ import { defineComponent, ref, provide, mergeProps, isRef, unref, withCtx, createVNode, useModel, computed, watch, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, createCommentVNode, mergeModels, renderSlot, reactive, useSSRContext } from 'vue';
3
3
  import { ssrRenderAttrs, ssrRenderComponent, ssrRenderSlot, ssrRenderList, ssrInterpolate } from 'vue/server-renderer';
4
- import { FileText, Folder, Check, Monitor, Sun, Moon, LayoutGrid, Keyboard, RefreshCw, Search, X } from 'lucide-vue-next';
4
+ import { FileText, Folder, Check, Monitor, Sun, Moon, GitBranch, Keyboard, RefreshCw, Search, X } from 'lucide-vue-next';
5
5
  import { useForwardPropsEmits, useForwardProps, ListboxFilter, ListboxContent, Primitive, useId, ListboxGroup, ListboxGroupLabel, ListboxItem, Separator, DialogRoot, DialogPortal, DialogContent as DialogContent$1, DialogClose, DialogTitle as DialogTitle$1, DialogDescription as DialogDescription$1, createContext, useFilter, ListboxRoot, DialogOverlay as DialogOverlay$1, DialogTrigger } from 'reka-ui';
6
6
  import { reactiveOmit, useCurrentElement } from '@vueuse/core';
7
- import { a as usePrd, u as useRepos, c as cn, b as useToast } from './usePrd-YhvN6Ary.mjs';
7
+ import { a as usePrd, u as useRepos, c as cn, b as useToast } from './usePrd-SqcxGyFU.mjs';
8
8
  import '../nitro/nitro.mjs';
9
9
  import 'node:http';
10
10
  import 'node:https';
@@ -1180,7 +1180,19 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1180
1180
  const { prds } = usePrd();
1181
1181
  const { repos, currentRepoId, selectRepo, refreshGitRepos } = useRepos();
1182
1182
  const { showSuccess, showError } = useToast();
1183
+ const TAB_ORDER = ["document", "board", "graph"];
1184
+ const TAB_LABELS = {
1185
+ document: "Document",
1186
+ board: "Task Board",
1187
+ graph: "Graph"
1188
+ };
1183
1189
  const currentTab = ref("document");
1190
+ const nextTab = computed(() => {
1191
+ const index = TAB_ORDER.indexOf(currentTab.value);
1192
+ const safeIndex = index >= 0 ? index : 0;
1193
+ return TAB_ORDER[(safeIndex + 1) % TAB_ORDER.length];
1194
+ });
1195
+ const nextTabLabel = computed(() => TAB_LABELS[nextTab.value]);
1184
1196
  function navigateToPrd(slug) {
1185
1197
  if (!currentRepoId.value) return;
1186
1198
  router.push(`/${currentRepoId.value}/${slug}`);
@@ -1196,7 +1208,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1196
1208
  open.value = false;
1197
1209
  }
1198
1210
  function toggleTab() {
1199
- const newTab = currentTab.value === "document" ? "board" : "document";
1211
+ const newTab = nextTab.value;
1200
1212
  currentTab.value = newTab;
1201
1213
  open.value = false;
1202
1214
  }
@@ -1412,17 +1424,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1412
1424
  _: 1
1413
1425
  }, _parent4, _scopeId3));
1414
1426
  _push4(ssrRenderComponent(unref(CommandItem), {
1415
- value: `switch-tab ${unref(currentTab) === "document" ? "task board" : "document"}`,
1427
+ value: `switch-tab ${unref(nextTabLabel).toLowerCase()}`,
1416
1428
  onSelect: toggleTab
1417
1429
  }, {
1418
1430
  default: withCtx((_4, _push5, _parent5, _scopeId4) => {
1419
1431
  if (_push5) {
1420
- _push5(ssrRenderComponent(unref(LayoutGrid), { class: "size-4" }, null, _parent5, _scopeId4));
1421
- _push5(`<span class="flex-1"${_scopeId4}>Switch to ${ssrInterpolate(unref(currentTab) === "document" ? "Task Board" : "Document")}</span><div class="ml-auto flex items-center gap-1"${_scopeId4}><kbd class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"${_scopeId4}>${ssrInterpolate(unref(modKey))}</kbd><kbd class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"${_scopeId4}>\\</kbd></div>`);
1432
+ _push5(ssrRenderComponent(unref(GitBranch), { class: "size-4" }, null, _parent5, _scopeId4));
1433
+ _push5(`<span class="flex-1"${_scopeId4}>Switch to ${ssrInterpolate(unref(nextTabLabel))}</span><div class="ml-auto flex items-center gap-1"${_scopeId4}><kbd class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"${_scopeId4}>${ssrInterpolate(unref(modKey))}</kbd><kbd class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"${_scopeId4}>\\</kbd></div>`);
1422
1434
  } else {
1423
1435
  return [
1424
- createVNode(unref(LayoutGrid), { class: "size-4" }),
1425
- createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(currentTab) === "document" ? "Task Board" : "Document"), 1),
1436
+ createVNode(unref(GitBranch), { class: "size-4" }),
1437
+ createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(nextTabLabel)), 1),
1426
1438
  createVNode("div", { class: "ml-auto flex items-center gap-1" }, [
1427
1439
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, toDisplayString(unref(modKey)), 1),
1428
1440
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, "\\")
@@ -1505,12 +1517,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1505
1517
  _: 1
1506
1518
  }),
1507
1519
  createVNode(unref(CommandItem), {
1508
- value: `switch-tab ${unref(currentTab) === "document" ? "task board" : "document"}`,
1520
+ value: `switch-tab ${unref(nextTabLabel).toLowerCase()}`,
1509
1521
  onSelect: toggleTab
1510
1522
  }, {
1511
1523
  default: withCtx(() => [
1512
- createVNode(unref(LayoutGrid), { class: "size-4" }),
1513
- createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(currentTab) === "document" ? "Task Board" : "Document"), 1),
1524
+ createVNode(unref(GitBranch), { class: "size-4" }),
1525
+ createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(nextTabLabel)), 1),
1514
1526
  createVNode("div", { class: "ml-auto flex items-center gap-1" }, [
1515
1527
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, toDisplayString(unref(modKey)), 1),
1516
1528
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, "\\")
@@ -1633,12 +1645,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1633
1645
  _: 1
1634
1646
  }),
1635
1647
  createVNode(unref(CommandItem), {
1636
- value: `switch-tab ${unref(currentTab) === "document" ? "task board" : "document"}`,
1648
+ value: `switch-tab ${unref(nextTabLabel).toLowerCase()}`,
1637
1649
  onSelect: toggleTab
1638
1650
  }, {
1639
1651
  default: withCtx(() => [
1640
- createVNode(unref(LayoutGrid), { class: "size-4" }),
1641
- createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(currentTab) === "document" ? "Task Board" : "Document"), 1),
1652
+ createVNode(unref(GitBranch), { class: "size-4" }),
1653
+ createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(nextTabLabel)), 1),
1642
1654
  createVNode("div", { class: "ml-auto flex items-center gap-1" }, [
1643
1655
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, toDisplayString(unref(modKey)), 1),
1644
1656
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, "\\")
@@ -1767,12 +1779,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1767
1779
  _: 1
1768
1780
  }),
1769
1781
  createVNode(unref(CommandItem), {
1770
- value: `switch-tab ${unref(currentTab) === "document" ? "task board" : "document"}`,
1782
+ value: `switch-tab ${unref(nextTabLabel).toLowerCase()}`,
1771
1783
  onSelect: toggleTab
1772
1784
  }, {
1773
1785
  default: withCtx(() => [
1774
- createVNode(unref(LayoutGrid), { class: "size-4" }),
1775
- createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(currentTab) === "document" ? "Task Board" : "Document"), 1),
1786
+ createVNode(unref(GitBranch), { class: "size-4" }),
1787
+ createVNode("span", { class: "flex-1" }, "Switch to " + toDisplayString(unref(nextTabLabel)), 1),
1776
1788
  createVNode("div", { class: "ml-auto flex items-center gap-1" }, [
1777
1789
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, toDisplayString(unref(modKey)), 1),
1778
1790
  createVNode("kbd", { class: "inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground" }, "\\")
@@ -1855,7 +1867,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1855
1867
  name: "Actions",
1856
1868
  shortcuts: [
1857
1869
  { keys: [modKey.value, "."], description: "Cycle theme mode (light/dark/system)" },
1858
- { keys: [modKey.value, "\\"], description: "Switch between Document and Task Board" },
1870
+ { keys: [modKey.value, "\\"], description: "Cycle Document, Task Board, and Graph tabs" },
1859
1871
  { keys: [modKey.value, ","], description: "Add repository" }
1860
1872
  ]
1861
1873
  },
@@ -2240,4 +2252,4 @@ _sfc_main.setup = (props, ctx) => {
2240
2252
  };
2241
2253
 
2242
2254
  export { _sfc_main as default };
2243
- //# sourceMappingURL=default-B5nw9_Xg.mjs.map
2255
+ //# sourceMappingURL=default-DWCOHHTE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-DWCOHHTE.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/default-DWCOHHTE.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -2,7 +2,7 @@ import { cva } from 'class-variance-authority';
2
2
  import { defineComponent, unref, mergeProps, withCtx, renderSlot, useSSRContext } from 'vue';
3
3
  import { ssrRenderComponent, ssrRenderSlot } from 'vue/server-renderer';
4
4
  import { Primitive } from 'reka-ui';
5
- import { c as cn } from './usePrd-YhvN6Ary.mjs';
5
+ import { c as cn } from './usePrd-SqcxGyFU.mjs';
6
6
 
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "Button",
@@ -73,4 +73,4 @@ const buttonVariants = cva(
73
73
  );
74
74
 
75
75
  export { Button as B };
76
- //# sourceMappingURL=index-CTpuP9Mj.mjs.map
76
+ //# sourceMappingURL=index-CckL_NBD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CckL_NBD.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-CckL_NBD.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, ref, computed, watch, mergeProps, unref, isRef, withCtx, createVNode, createTextVNode, openBlock, createBlock, useSSRContext } from 'vue';
2
2
  import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrIncludeBooleanAttr, ssrRenderList, ssrGetDynamicModelProps } from 'vue/server-renderer';
3
3
  import { FolderOpen, Folder, ArrowRight, FileText } from 'lucide-vue-next';
4
- import { B as Button } from './index-CTpuP9Mj.mjs';
4
+ import { B as Button } from './index-CckL_NBD.mjs';
5
5
  import { useVModel } from '@vueuse/core';
6
- import { u as useRepos, a as usePrd, c as cn } from './usePrd-YhvN6Ary.mjs';
6
+ import { u as useRepos, a as usePrd, c as cn } from './usePrd-SqcxGyFU.mjs';
7
7
  import { a as useRouter } from './server.mjs';
8
8
  import 'class-variance-authority';
9
9
  import 'reka-ui';
@@ -253,4 +253,4 @@ _sfc_main.setup = (props, ctx) => {
253
253
  };
254
254
 
255
255
  export { _sfc_main as default };
256
- //# sourceMappingURL=index-D21S97KB.mjs.map
256
+ //# sourceMappingURL=index-QVeSHT3L.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-QVeSHT3L.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-QVeSHT3L.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -0,0 +1,205 @@
1
+ import { _ as __nuxt_component_0$2, a as __nuxt_component_1 } from './Detail-DC-KJQ1f.mjs';
2
+ import { defineComponent, computed, ref, inject, watch, mergeProps, unref, withCtx, createVNode, createTextVNode, isRef, useSSRContext } from 'vue';
3
+ import { ssrRenderAttrs, ssrRenderComponent } from 'vue/server-renderer';
4
+ import { GitBranch, RefreshCw } from 'lucide-vue-next';
5
+ import { B as Button } from './index-CckL_NBD.mjs';
6
+ import { b as useRoute } from './server.mjs';
7
+ import { u as useRepos, a as usePrd, b as useToast } from './usePrd-SqcxGyFU.mjs';
8
+ import '@vueuse/core';
9
+ import '@vue-flow/background';
10
+ import '@vue-flow/controls';
11
+ import '@vue-flow/core';
12
+ import 'shiki/bundle/web';
13
+ import './_plugin-vue_export-helper-1tPrXgE0.mjs';
14
+ import 'reka-ui';
15
+ import 'class-variance-authority';
16
+ import './nuxt-link-SvT1nf8Z.mjs';
17
+ import '../nitro/nitro.mjs';
18
+ import 'node:http';
19
+ import 'node:https';
20
+ import 'node:events';
21
+ import 'node:buffer';
22
+ import 'node:fs';
23
+ import 'node:path';
24
+ import 'node:crypto';
25
+ import 'node:os';
26
+ import 'node:url';
27
+ import '../routes/renderer.mjs';
28
+ import 'vue-bundle-renderer/runtime';
29
+ import 'unhead/server';
30
+ import 'devalue';
31
+ import 'unhead/utils';
32
+ import 'vue-router';
33
+ import 'clsx';
34
+ import 'tailwind-merge';
35
+ import 'vue-sonner';
36
+ import '@vue/shared';
37
+ import 'perfect-debounce';
38
+
39
+ const _sfc_main = /* @__PURE__ */ defineComponent({
40
+ __name: "repo-graph",
41
+ __ssrInlineRender: true,
42
+ setup(__props) {
43
+ const route = useRoute();
44
+ const { selectRepo } = useRepos();
45
+ const { fetchRepoGraph, fetchTasks, fetchTaskCommits } = usePrd();
46
+ const { showError } = useToast();
47
+ const repoId = computed(() => route.params.repo);
48
+ const graph = ref(null);
49
+ const graphLoading = ref(false);
50
+ const graphError = ref(null);
51
+ const tasksByPrd = ref({});
52
+ const selectedTask = ref(null);
53
+ const selectedTaskPrdSlug = ref(null);
54
+ const detailOpen = ref(false);
55
+ const selectedTaskCommits = ref([]);
56
+ function cacheTasksForPrd(slug, tasks) {
57
+ tasksByPrd.value = {
58
+ ...tasksByPrd.value,
59
+ [slug]: tasks
60
+ };
61
+ }
62
+ async function getTasksForPrd(slug) {
63
+ if (Object.prototype.hasOwnProperty.call(tasksByPrd.value, slug)) {
64
+ return tasksByPrd.value[slug] ?? null;
65
+ }
66
+ const tasks = await fetchTasks(slug);
67
+ cacheTasksForPrd(slug, tasks);
68
+ return tasks;
69
+ }
70
+ const taskTitles = computed(() => {
71
+ const map = /* @__PURE__ */ new Map();
72
+ const sourcePrdSlug = selectedTaskPrdSlug.value;
73
+ if (!sourcePrdSlug) {
74
+ return map;
75
+ }
76
+ const sourceTasks = tasksByPrd.value[sourcePrdSlug] ?? null;
77
+ if (!sourceTasks?.tasks) {
78
+ return map;
79
+ }
80
+ for (const task of sourceTasks.tasks) {
81
+ map.set(task.id, task.title);
82
+ }
83
+ return map;
84
+ });
85
+ async function loadGraph(force = false) {
86
+ if (!repoId.value) {
87
+ return;
88
+ }
89
+ if (!force && graph.value) {
90
+ return;
91
+ }
92
+ graphLoading.value = true;
93
+ graphError.value = null;
94
+ try {
95
+ selectRepo(repoId.value);
96
+ const payload = await fetchRepoGraph();
97
+ if (!payload) {
98
+ graphError.value = "Failed to load repository graph.";
99
+ return;
100
+ }
101
+ graph.value = payload;
102
+ } finally {
103
+ graphLoading.value = false;
104
+ }
105
+ }
106
+ async function handleGraphTaskClick(payload) {
107
+ const sourceTasks = await getTasksForPrd(payload.prdSlug);
108
+ const task = sourceTasks?.tasks.find((entry) => entry.id === payload.taskId);
109
+ if (!task) {
110
+ showError("Task unavailable", `Could not find ${payload.taskId} in ${payload.prdSlug}.`);
111
+ return;
112
+ }
113
+ selectedTask.value = task;
114
+ selectedTaskPrdSlug.value = payload.prdSlug;
115
+ detailOpen.value = true;
116
+ selectedTaskCommits.value = [];
117
+ selectedTaskCommits.value = await fetchTaskCommits(payload.prdSlug, task.id);
118
+ }
119
+ const fileChangeEvent = inject("fileChangeEvent", ref(null));
120
+ watch(
121
+ () => fileChangeEvent.value,
122
+ async (event) => {
123
+ if (!event) {
124
+ return;
125
+ }
126
+ if (event.category !== "tasks" && event.category !== "progress" && event.category !== "prd") {
127
+ return;
128
+ }
129
+ if (event.category === "tasks" || event.category === "progress") {
130
+ tasksByPrd.value = {};
131
+ }
132
+ await loadGraph(true);
133
+ }
134
+ );
135
+ watch(repoId, async () => {
136
+ graph.value = null;
137
+ graphError.value = null;
138
+ tasksByPrd.value = {};
139
+ if (!repoId.value) {
140
+ return;
141
+ }
142
+ selectRepo(repoId.value);
143
+ await loadGraph(true);
144
+ });
145
+ return (_ctx, _push, _parent, _attrs) => {
146
+ const _component_GraphExplorer = __nuxt_component_0$2;
147
+ const _component_TasksDetail = __nuxt_component_1;
148
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full p-4 md:p-6" }, _attrs))}><div class="mx-auto max-w-[1500px] space-y-4"><div class="flex flex-wrap items-center justify-between gap-3"><div><h1 class="flex items-center gap-2 text-2xl font-bold tracking-tight">`);
149
+ _push(ssrRenderComponent(unref(GitBranch), { class: "size-5" }, null, _parent));
150
+ _push(` Repository Graph </h1><p class="mt-1 text-sm text-muted-foreground"> Dependency graph across PRDs with task state in this repository. </p></div>`);
151
+ _push(ssrRenderComponent(unref(Button), {
152
+ variant: "outline",
153
+ size: "sm",
154
+ class: "h-8",
155
+ onClick: ($event) => loadGraph(true)
156
+ }, {
157
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
158
+ if (_push2) {
159
+ _push2(ssrRenderComponent(unref(RefreshCw), {
160
+ class: ["mr-1.5 size-3.5", { "animate-spin": unref(graphLoading) }]
161
+ }, null, _parent2, _scopeId));
162
+ _push2(` Refresh `);
163
+ } else {
164
+ return [
165
+ createVNode(unref(RefreshCw), {
166
+ class: ["mr-1.5 size-3.5", { "animate-spin": unref(graphLoading) }]
167
+ }, null, 8, ["class"]),
168
+ createTextVNode(" Refresh ")
169
+ ];
170
+ }
171
+ }),
172
+ _: 1
173
+ }, _parent));
174
+ _push(`</div><div class="h-[calc(100vh-220px)] min-h-[500px] motion-safe:transition-[opacity,transform] motion-safe:duration-200 motion-safe:ease-[var(--ease-out-cubic)] motion-reduce:transition-none">`);
175
+ _push(ssrRenderComponent(_component_GraphExplorer, {
176
+ payload: unref(graph),
177
+ scope: "repo",
178
+ loading: unref(graphLoading),
179
+ error: unref(graphError),
180
+ onTaskClick: handleGraphTaskClick
181
+ }, null, _parent));
182
+ _push(`</div></div>`);
183
+ _push(ssrRenderComponent(_component_TasksDetail, {
184
+ open: unref(detailOpen),
185
+ "onUpdate:open": ($event) => isRef(detailOpen) ? detailOpen.value = $event : null,
186
+ task: unref(selectedTask),
187
+ "task-titles": unref(taskTitles),
188
+ commits: unref(selectedTaskCommits),
189
+ "repo-id": unref(repoId),
190
+ "task-prd-slug": unref(selectedTaskPrdSlug),
191
+ "current-prd-slug": null
192
+ }, null, _parent));
193
+ _push(`</div>`);
194
+ };
195
+ }
196
+ });
197
+ const _sfc_setup = _sfc_main.setup;
198
+ _sfc_main.setup = (props, ctx) => {
199
+ const ssrContext = useSSRContext();
200
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/[repo]/repo-graph.vue");
201
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
202
+ };
203
+
204
+ export { _sfc_main as default };
205
+ //# sourceMappingURL=repo-graph-CTEkxiYd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-graph-CTEkxiYd.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/repo-graph-CTEkxiYd.js"],"names":["__nuxt_component_0"],"mappings":"","x_google_ignoreList":[0]}
@@ -415,6 +415,9 @@ function getRouteRules(arg) {
415
415
  return {};
416
416
  }
417
417
  }
418
+ const __nuxt_page_meta$1 = {
419
+ ssr: false
420
+ };
418
421
  const __nuxt_page_meta = {
419
422
  ssr: false
420
423
  };
@@ -422,13 +425,19 @@ const _routes = [
422
425
  {
423
426
  name: "index",
424
427
  path: "/",
425
- component: () => import('./index-D21S97KB.mjs')
428
+ component: () => import('./index-QVeSHT3L.mjs')
426
429
  },
427
430
  {
428
431
  name: "repo-prd",
429
432
  path: "/:repo()/:prd()",
433
+ meta: __nuxt_page_meta$1 || {},
434
+ component: () => import('./_prd_-C1C4GAhW.mjs')
435
+ },
436
+ {
437
+ name: "repo-repo-graph",
438
+ path: "/:repo()/repo-graph",
430
439
  meta: __nuxt_page_meta || {},
431
- component: () => import('./_prd_-CkKfJB6U.mjs')
440
+ component: () => import('./repo-graph-CTEkxiYd.mjs')
432
441
  }
433
442
  ];
434
443
  const _wrapInTransition = (props, children) => {
@@ -842,7 +851,7 @@ const plugins = [
842
851
  plugin_server_9Ca9_HhnjAGwBWpwAydRauMHxWoxTDY60BrArRnXN_A
843
852
  ];
844
853
  const layouts = {
845
- default: defineAsyncComponent(() => import('./default-B5nw9_Xg.mjs').then((m) => m.default || m))
854
+ default: defineAsyncComponent(() => import('./default-DWCOHHTE.mjs').then((m) => m.default || m))
846
855
  };
847
856
  const routeRulesMatcher = _routeRulesMatcher;
848
857
  const LayoutLoader = defineComponent({
@@ -8,9 +8,9 @@ const styles = {
8
8
  "components/prd/Viewer.vue?vue&type=style&index=0&lang.css": () => import('./Viewer-styles.CshnetGw.mjs').then(interopDefault),
9
9
  "components/tasks/Column.vue": () => import('./Column-styles.fAtZNsCt.mjs').then(interopDefault),
10
10
  "components/tasks/Column.vue?vue&type=style&index=0&scoped=a1317eba&lang.css": () => import('./Column-styles.fAtZNsCt.mjs').then(interopDefault),
11
- "components/git/DiffViewer.vue": () => import('./DiffViewer-styles.cLfMOdMh.mjs').then(interopDefault),
11
+ "components/git/DiffViewer.vue": () => import('./DiffViewer-styles.CkSjCQ0r.mjs').then(interopDefault),
12
12
  "components/git/DiffViewer.vue?vue&type=style&index=1&lang.css": () => import('./DiffViewer-styles.0AbHFl6N.mjs').then(interopDefault),
13
- "components/git/DiffViewer.vue?vue&type=style&index=0&scoped=2678ccde&lang.css": () => import('./DiffViewer-styles.CoMVrk_N.mjs').then(interopDefault)
13
+ "components/git/DiffViewer.vue?vue&type=style&index=0&scoped=13d918cc&lang.css": () => import('./DiffViewer-styles.FJJuYjYB.mjs').then(interopDefault)
14
14
  };
15
15
 
16
16
  export { styles as default };
@@ -548,6 +548,22 @@ function usePrd() {
548
548
  return [];
549
549
  }
550
550
  }
551
+ async function fetchPrdGraph(slug) {
552
+ if (!currentRepoId.value) return null;
553
+ try {
554
+ return await $fetch(`/api/repos/${currentRepoId.value}/prd/${slug}/graph`);
555
+ } catch {
556
+ return null;
557
+ }
558
+ }
559
+ async function fetchRepoGraph() {
560
+ if (!currentRepoId.value) return null;
561
+ try {
562
+ return await $fetch(`/api/repos/${currentRepoId.value}/graph`);
563
+ } catch {
564
+ return null;
565
+ }
566
+ }
551
567
  return {
552
568
  prds,
553
569
  prdsStatus,
@@ -555,9 +571,11 @@ function usePrd() {
555
571
  fetchDocument,
556
572
  fetchTasks,
557
573
  fetchProgress,
558
- fetchTaskCommits
574
+ fetchTaskCommits,
575
+ fetchPrdGraph,
576
+ fetchRepoGraph
559
577
  };
560
578
  }
561
579
 
562
580
  export { usePrd as a, useToast as b, cn as c, useRepos as u };
563
- //# sourceMappingURL=usePrd-YhvN6Ary.mjs.map
581
+ //# sourceMappingURL=usePrd-SqcxGyFU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrd-SqcxGyFU.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/usePrd-SqcxGyFU.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}