@runfusion/fusion 0.24.0 → 0.26.0
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/README.md +6 -0
- package/dist/bin.js +18646 -15669
- package/dist/client/assets/AgentDetailView-Cv-vgOj3.js +18 -0
- package/dist/client/assets/{AgentsView-BkB9FiMT.js → AgentsView-D6Zi5zfP.js} +4 -4
- package/dist/client/assets/ChatView-CAHjY9uO.js +1 -0
- package/dist/client/assets/{DevServerView-BkvtjZBa.js → DevServerView--_WBvIDQ.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-BK-KbnhP.js → DirectoryPicker-xedtR-Rd.js} +1 -1
- package/dist/client/assets/{DocumentsView-BEg1CQAk.js → DocumentsView-Bg2oaZks.js} +1 -1
- package/dist/client/assets/{EvalsView-Berf9bQm.js → EvalsView-B3uOCXfr.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-jcInE50G.js → ExperimentalAgentOnboardingModal-Bx6yXVS5.js} +1 -1
- package/dist/client/assets/{InsightsView-BX5bSF1J.js → InsightsView-Q1zvtF4F.js} +1 -1
- package/dist/client/assets/MemoryView-xcN_eouf.js +2 -0
- package/dist/client/assets/MemoryView-zaXewZzi.css +1 -0
- package/dist/client/assets/{NodesView-DLUOBLf6.js → NodesView-RxXg58_Q.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-COlJf0Kx.js → PiExtensionsManager-Cc8aAZXg.js} +2 -2
- package/dist/client/assets/PluginManager-BEkyBajl.js +1 -0
- package/dist/client/assets/{ResearchView-BzCcDAS4.css → ResearchView-BEI4ZSGs.css} +1 -1
- package/dist/client/assets/ResearchView-CERNf7sJ.js +1 -0
- package/dist/client/assets/{SettingsModal-yRqM4DV8.js → SettingsModal-B1r0yASu.js} +1 -1
- package/dist/client/assets/SettingsModal-BLsac7CJ.js +31 -0
- package/dist/client/assets/SettingsModal-Cis-4Lot.css +1 -0
- package/dist/client/assets/{SetupWizardModal-uUZk3TKT.js → SetupWizardModal-D1q548_L.js} +1 -1
- package/dist/client/assets/{SkillsView-CP8JX0P_.js → SkillsView-ClLM6u6p.js} +1 -1
- package/dist/client/assets/StashRecoveryView-B_8WIQEo.css +1 -0
- package/dist/client/assets/StashRecoveryView-ze0pEZ5U.js +1 -0
- package/dist/client/assets/{TodoView-DCRIkDZ-.js → TodoView-CTmIfy2M.js} +1 -1
- package/dist/client/assets/{dashboard-view-lR7YYmSC.js → dashboard-view-4xAN3yO5.js} +2 -2
- package/dist/client/assets/{folder-open-DHjELt8-.js → folder-open-BZuKESeq.js} +1 -1
- package/dist/client/assets/index-Bdw6llW6.js +692 -0
- package/dist/client/assets/index-CZGlyJuS.css +1 -0
- package/dist/client/assets/{star-DYesq1AV.js → star-D75YKEq-.js} +1 -1
- package/dist/client/assets/{upload-DTWF3Db5.js → upload-BYYTgWFj.js} +1 -1
- package/dist/client/assets/{users--syrel4l.js → users-RS90Aii3.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/droid-cli/package.json +1 -1
- package/dist/extension.js +5640 -3618
- package/dist/pi-claude-cli/package.json +1 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/manifest.json +6 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +26 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/manifest.test.ts +20 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/index.ts +14 -0
- package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +9 -11
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +30 -0
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +3 -28
- package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +899 -895
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +68 -71
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +47 -50
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +155 -109
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/src/index.ts +49 -3
- package/dist/plugins/fusion-plugin-reports/src/report-schema.ts +38 -0
- package/dist/plugins/fusion-plugin-reports/src/store/__tests__/report-schema.test.ts +66 -0
- package/dist/plugins/fusion-plugin-reports/src/store/__tests__/report-store.test.ts +177 -0
- package/dist/plugins/fusion-plugin-reports/src/store/report-store.ts +341 -0
- package/dist/plugins/fusion-plugin-reports/src/store/report-types.ts +77 -0
- package/dist/plugins/fusion-plugin-roadmap/{src/dashboard/RoadmapsView.css → bundled.css} +13 -219
- package/dist/plugins/fusion-plugin-roadmap/bundled.js +29535 -0
- package/dist/plugins/fusion-plugin-roadmap/package.json +4 -41
- package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
- package/package.json +2 -3
- package/dist/client/assets/AgentDetailView-gy_5SUj2.js +0 -18
- package/dist/client/assets/ChatView-B_-B8fqu.js +0 -1
- package/dist/client/assets/MemoryView-CKElJY_3.js +0 -2
- package/dist/client/assets/MemoryView-DiajLXby.css +0 -1
- package/dist/client/assets/PluginManager-CfW55BF4.js +0 -1
- package/dist/client/assets/ResearchView-B256Lr8I.js +0 -1
- package/dist/client/assets/SettingsModal-BeA_nQtW.js +0 -31
- package/dist/client/assets/SettingsModal-DzsLquBu.css +0 -1
- package/dist/client/assets/index-CQyVRLOb.js +0 -692
- package/dist/client/assets/index-CxA2Nn0_.css +0 -1
- package/dist/plugins/fusion-plugin-dependency-graph/src/DependencyGraph.css +0 -58
- package/dist/plugins/fusion-plugin-dependency-graph/src/DependencyGraph.tsx +0 -301
- package/dist/plugins/fusion-plugin-dependency-graph/src/GraphHighlight.css +0 -27
- package/dist/plugins/fusion-plugin-dependency-graph/src/GraphTaskNode.css +0 -157
- package/dist/plugins/fusion-plugin-dependency-graph/src/GraphTaskNode.tsx +0 -126
- package/dist/plugins/fusion-plugin-dependency-graph/src/GraphToolbar.css +0 -35
- package/dist/plugins/fusion-plugin-dependency-graph/src/GraphToolbar.tsx +0 -36
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.highlighting.test.tsx +0 -112
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.persistence.test.tsx +0 -115
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.test.tsx +0 -128
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphTaskNode.drag.test.tsx +0 -82
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphTaskNode.test.tsx +0 -307
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphToolbar.test.tsx +0 -60
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/edges.test.tsx +0 -75
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/filtering.test.tsx +0 -62
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/filters.test.ts +0 -78
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/graphPositionStorage.test.ts +0 -95
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/host-integration.test.ts +0 -74
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/index.test.ts +0 -58
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/interactions.test.tsx +0 -121
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/layout.test.ts +0 -70
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/persistence.test.tsx +0 -89
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphData.test.ts +0 -86
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphInteraction.test.ts +0 -167
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphPositions.test.ts +0 -66
- package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useNodeDrag.test.ts +0 -81
- package/dist/plugins/fusion-plugin-dependency-graph/src/dashboard-interop.d.ts +0 -35
- package/dist/plugins/fusion-plugin-dependency-graph/src/dashboard-view.tsx +0 -19
- package/dist/plugins/fusion-plugin-dependency-graph/src/edges.tsx +0 -70
- package/dist/plugins/fusion-plugin-dependency-graph/src/filters.ts +0 -8
- package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/__tests__/useDependencyChain.test.ts +0 -53
- package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useDependencyChain.ts +0 -60
- package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useGraphPositions.ts +0 -45
- package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useNodeDrag.ts +0 -114
- package/dist/plugins/fusion-plugin-dependency-graph/src/index.ts +0 -24
- package/dist/plugins/fusion-plugin-dependency-graph/src/layout.ts +0 -91
- package/dist/plugins/fusion-plugin-dependency-graph/src/styles/drag.css +0 -15
- package/dist/plugins/fusion-plugin-dependency-graph/src/types.ts +0 -21
- package/dist/plugins/fusion-plugin-dependency-graph/src/useGraphData.ts +0 -17
- package/dist/plugins/fusion-plugin-dependency-graph/src/useGraphInteraction.ts +0 -292
- package/dist/plugins/fusion-plugin-dependency-graph/src/utils/graphPositionStorage.ts +0 -65
- package/dist/plugins/fusion-plugin-roadmap/src/__tests__/api-client.test.ts +0 -101
- package/dist/plugins/fusion-plugin-roadmap/src/__tests__/index.test.ts +0 -92
- package/dist/plugins/fusion-plugin-roadmap/src/__tests__/roadmap-routes.test.ts +0 -48
- package/dist/plugins/fusion-plugin-roadmap/src/__tests__/roadmap-suggestions.test.ts +0 -31
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/RoadmapsView.tsx +0 -2559
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/__tests__/RoadmapsView.test.tsx +0 -1144
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/__tests__/useRoadmaps.test.ts +0 -1756
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/api.ts +0 -70
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/test-setup.ts +0 -7
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/types.ts +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/useConfirm.ts +0 -8
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/useRoadmaps.ts +0 -1188
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard/useViewportMode.ts +0 -20
- package/dist/plugins/fusion-plugin-roadmap/src/dashboard-view.tsx +0 -6
- package/dist/plugins/fusion-plugin-roadmap/src/index.ts +0 -74
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-routes.ts +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-schema.ts +0 -41
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-suggestions.d.ts +0 -15
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-suggestions.ts +0 -15
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-types.d.ts +0 -283
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-types.d.ts.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-types.js +0 -21
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-types.js.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/roadmap-types.ts +0 -310
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-routes.d.ts +0 -5
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-routes.d.ts.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-routes.js +0 -361
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-routes.js.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-routes.ts +0 -408
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.d.ts +0 -68
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.d.ts.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.js +0 -300
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.js.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.ts +0 -381
- package/dist/plugins/fusion-plugin-roadmap/src/server/index.d.ts +0 -3
- package/dist/plugins/fusion-plugin-roadmap/src/server/index.ts +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-handoff.test.ts +0 -445
- package/dist/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-ordering.test.ts +0 -334
- package/dist/plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts +0 -1318
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-handoff.ts +0 -163
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-ordering.d.ts +0 -37
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-ordering.d.ts.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-ordering.js +0 -188
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-ordering.js.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-ordering.ts +0 -311
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-store.d.ts +0 -299
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-store.d.ts.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-store.js +0 -765
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-store.js.map +0 -1
- package/dist/plugins/fusion-plugin-roadmap/src/store/roadmap-store.ts +0 -1001
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone roadmap planning types.
|
|
3
|
-
*
|
|
4
|
-
* This model is intentionally separate from the mission hierarchy so roadmap
|
|
5
|
-
* work can evolve independently of `MissionStore`/`MissionManager`.
|
|
6
|
-
*
|
|
7
|
-
* Core ordering invariants:
|
|
8
|
-
* - milestone ordering is scoped to a single roadmap and must be contiguous + 0-based
|
|
9
|
-
* - feature ordering is scoped to a single milestone and must be contiguous + 0-based
|
|
10
|
-
* - cross-milestone feature moves must renumber both the source and target
|
|
11
|
-
* milestone deterministically after the move
|
|
12
|
-
* - whenever stored order data is incomplete or conflicting, consumers should
|
|
13
|
-
* repair it using a stable tie-breaker (`createdAt`, then `id`, both ASC)
|
|
14
|
-
*
|
|
15
|
-
* These contracts are persistence-agnostic and UI-agnostic. They define the
|
|
16
|
-
* canonical domain surface that downstream storage, API, and dashboard work use.
|
|
17
|
-
*
|
|
18
|
-
* @module roadmap-types
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A standalone roadmap container.
|
|
23
|
-
*
|
|
24
|
-
* Roadmaps do not reuse mission lifecycle or mission status concepts. They are
|
|
25
|
-
* lightweight planning artifacts that own ordered milestones.
|
|
26
|
-
*/
|
|
27
|
-
export interface Roadmap {
|
|
28
|
-
/** Unique identifier (for example `RM-01HXYZ...`) */
|
|
29
|
-
id: string;
|
|
30
|
-
/** Display title shown in roadmap lists and detail views */
|
|
31
|
-
title: string;
|
|
32
|
-
/** Optional long-form planning context for the roadmap */
|
|
33
|
-
description?: string;
|
|
34
|
-
/** ISO-8601 timestamp of creation */
|
|
35
|
-
createdAt: string;
|
|
36
|
-
/** ISO-8601 timestamp of last update */
|
|
37
|
-
updatedAt: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* A milestone within a roadmap.
|
|
42
|
-
*
|
|
43
|
-
* `orderIndex` is the canonical persisted ordering field. It is always scoped to
|
|
44
|
-
* the parent roadmap and must remain contiguous + 0-based after reorder flows.
|
|
45
|
-
*/
|
|
46
|
-
export interface RoadmapMilestone {
|
|
47
|
-
/** Unique identifier (for example `RMS-01HXYZ...`) */
|
|
48
|
-
id: string;
|
|
49
|
-
/** Parent roadmap ID */
|
|
50
|
-
roadmapId: string;
|
|
51
|
-
/** Display title for the milestone */
|
|
52
|
-
title: string;
|
|
53
|
-
/** Optional description of the milestone's goals */
|
|
54
|
-
description?: string;
|
|
55
|
-
/** 0-based contiguous ordering within the roadmap */
|
|
56
|
-
orderIndex: number;
|
|
57
|
-
/** ISO-8601 timestamp of creation */
|
|
58
|
-
createdAt: string;
|
|
59
|
-
/** ISO-8601 timestamp of last update */
|
|
60
|
-
updatedAt: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* A feature within a roadmap milestone.
|
|
65
|
-
*
|
|
66
|
-
* `orderIndex` is scoped to the parent milestone. Cross-milestone moves must
|
|
67
|
-
* update `milestoneId` and then normalize both affected milestone lists back to
|
|
68
|
-
* contiguous 0-based order.
|
|
69
|
-
*/
|
|
70
|
-
export interface RoadmapFeature {
|
|
71
|
-
/** Unique identifier (for example `RF-01HXYZ...`) */
|
|
72
|
-
id: string;
|
|
73
|
-
/** Parent milestone ID */
|
|
74
|
-
milestoneId: string;
|
|
75
|
-
/** Display title for the feature */
|
|
76
|
-
title: string;
|
|
77
|
-
/** Optional description of the feature's intent */
|
|
78
|
-
description?: string;
|
|
79
|
-
/** 0-based contiguous ordering within the parent milestone */
|
|
80
|
-
orderIndex: number;
|
|
81
|
-
/** ISO-8601 timestamp of creation */
|
|
82
|
-
createdAt: string;
|
|
83
|
-
/** ISO-8601 timestamp of last update */
|
|
84
|
-
updatedAt: string;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// ── CRUD Input Types ────────────────────────────────────────────────
|
|
88
|
-
|
|
89
|
-
/** Input for creating a roadmap. */
|
|
90
|
-
export interface RoadmapCreateInput {
|
|
91
|
-
/** Display title of the roadmap (required) */
|
|
92
|
-
title: string;
|
|
93
|
-
/** Optional roadmap description */
|
|
94
|
-
description?: string;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/** Input for updating roadmap metadata. Ordering is handled by dedicated move/reorder DTOs. */
|
|
98
|
-
export interface RoadmapUpdateInput {
|
|
99
|
-
/** Updated display title */
|
|
100
|
-
title?: string;
|
|
101
|
-
/** Updated roadmap description */
|
|
102
|
-
description?: string;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/** Input for creating a milestone inside a roadmap. */
|
|
106
|
-
export interface RoadmapMilestoneCreateInput {
|
|
107
|
-
/** Display title of the milestone (required) */
|
|
108
|
-
title: string;
|
|
109
|
-
/** Optional milestone description */
|
|
110
|
-
description?: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Input for updating milestone metadata. Ordering is handled separately. */
|
|
114
|
-
export interface RoadmapMilestoneUpdateInput {
|
|
115
|
-
/** Updated milestone title */
|
|
116
|
-
title?: string;
|
|
117
|
-
/** Updated milestone description */
|
|
118
|
-
description?: string;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** Input for creating a feature inside a milestone. */
|
|
122
|
-
export interface RoadmapFeatureCreateInput {
|
|
123
|
-
/** Display title of the feature (required) */
|
|
124
|
-
title: string;
|
|
125
|
-
/** Optional feature description */
|
|
126
|
-
description?: string;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** Input for updating feature metadata. Ordering is handled separately. */
|
|
130
|
-
export interface RoadmapFeatureUpdateInput {
|
|
131
|
-
/** Updated feature title */
|
|
132
|
-
title?: string;
|
|
133
|
-
/** Updated feature description */
|
|
134
|
-
description?: string;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ── Ordering / Move Payload Types ───────────────────────────────────
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Explicit reorder payload for milestones within a roadmap.
|
|
141
|
-
*
|
|
142
|
-
* `orderedMilestoneIds` must contain the full set of milestone IDs for the
|
|
143
|
-
* roadmap exactly once. Consumers should reject partial or duplicate lists.
|
|
144
|
-
*/
|
|
145
|
-
export interface RoadmapMilestoneReorderInput {
|
|
146
|
-
/** Roadmap whose milestone sequence is being rewritten */
|
|
147
|
-
roadmapId: string;
|
|
148
|
-
/** Complete milestone ID sequence in final order */
|
|
149
|
-
orderedMilestoneIds: string[];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Explicit reorder payload for features within a single milestone.
|
|
154
|
-
*
|
|
155
|
-
* `orderedFeatureIds` must contain the full set of feature IDs for the milestone
|
|
156
|
-
* exactly once. The resulting `orderIndex` values must be normalized to 0-based
|
|
157
|
-
* contiguous order.
|
|
158
|
-
*/
|
|
159
|
-
export interface RoadmapFeatureReorderInput {
|
|
160
|
-
/** Parent roadmap for integrity validation */
|
|
161
|
-
roadmapId: string;
|
|
162
|
-
/** Milestone whose internal feature ordering is being rewritten */
|
|
163
|
-
milestoneId: string;
|
|
164
|
-
/** Complete feature ID sequence in final order */
|
|
165
|
-
orderedFeatureIds: string[];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Explicit move payload for relocating a feature, including cross-milestone moves.
|
|
170
|
-
*
|
|
171
|
-
* `targetOrderIndex` is the desired insertion position in the destination
|
|
172
|
-
* milestone before final normalization. Consumers should clamp out-of-range
|
|
173
|
-
* values and must deterministically renumber both source and destination
|
|
174
|
-
* milestones after the move.
|
|
175
|
-
*/
|
|
176
|
-
export interface RoadmapFeatureMoveInput {
|
|
177
|
-
/** Parent roadmap for integrity validation */
|
|
178
|
-
roadmapId: string;
|
|
179
|
-
/** Feature being moved */
|
|
180
|
-
featureId: string;
|
|
181
|
-
/** Current milestone that owns the feature */
|
|
182
|
-
fromMilestoneId: string;
|
|
183
|
-
/** Destination milestone after the move */
|
|
184
|
-
toMilestoneId: string;
|
|
185
|
-
/** Requested insertion index in the destination milestone */
|
|
186
|
-
targetOrderIndex: number;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Result of a feature move operation after deterministic renumbering.
|
|
191
|
-
*
|
|
192
|
-
* `affectedFeatures` contains the canonical post-move feature records for the
|
|
193
|
-
* source and target milestones. When a feature is moved within the same
|
|
194
|
-
* milestone, `sourceMilestoneFeatures` and `targetMilestoneFeatures` will be
|
|
195
|
-
* the same normalized list.
|
|
196
|
-
*/
|
|
197
|
-
export interface RoadmapFeatureMoveResult {
|
|
198
|
-
/** The moved feature after `milestoneId` and `orderIndex` updates */
|
|
199
|
-
movedFeature: RoadmapFeature;
|
|
200
|
-
/** Canonical post-move features for the affected milestone scope */
|
|
201
|
-
affectedFeatures: RoadmapFeature[];
|
|
202
|
-
/** Canonical feature list for the source milestone after the move */
|
|
203
|
-
sourceMilestoneFeatures: RoadmapFeature[];
|
|
204
|
-
/** Canonical feature list for the destination milestone after the move */
|
|
205
|
-
targetMilestoneFeatures: RoadmapFeature[];
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// ── Composite Read Models ───────────────────────────────────────────
|
|
209
|
-
|
|
210
|
-
/** Milestone with all of its ordered features loaded. */
|
|
211
|
-
export interface RoadmapMilestoneWithFeatures extends RoadmapMilestone {
|
|
212
|
-
/** Features belonging to this milestone */
|
|
213
|
-
features: RoadmapFeature[];
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/** Full roadmap hierarchy loaded in roadmap → milestone → feature order. */
|
|
217
|
-
export interface RoadmapWithHierarchy extends Roadmap {
|
|
218
|
-
/** Ordered milestones with ordered features */
|
|
219
|
-
milestones: RoadmapMilestoneWithFeatures[];
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// ── Export / Handoff Contracts ──────────────────────────────────────
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Flat export payload for persistence, APIs, import/export, and sync jobs.
|
|
226
|
-
*
|
|
227
|
-
* This shape intentionally keeps entities separate so downstream persistence
|
|
228
|
-
* layers can upsert by table/collection without first denormalizing a nested
|
|
229
|
-
* hierarchy.
|
|
230
|
-
*/
|
|
231
|
-
export interface RoadmapExportBundle {
|
|
232
|
-
/** Roadmap being exported */
|
|
233
|
-
roadmap: Roadmap;
|
|
234
|
-
/** Ordered milestones for the roadmap */
|
|
235
|
-
milestones: RoadmapMilestone[];
|
|
236
|
-
/** Ordered features for the roadmap's milestones */
|
|
237
|
-
features: RoadmapFeature[];
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Source metadata carried forward when a roadmap feature is converted into a
|
|
242
|
-
* task-planning input or other downstream artifact.
|
|
243
|
-
*/
|
|
244
|
-
export interface RoadmapFeatureSourceRef {
|
|
245
|
-
/** Source roadmap ID */
|
|
246
|
-
roadmapId: string;
|
|
247
|
-
/** Source milestone ID */
|
|
248
|
-
milestoneId: string;
|
|
249
|
-
/** Source feature ID */
|
|
250
|
-
featureId: string;
|
|
251
|
-
/** Human-readable roadmap title for prompt context */
|
|
252
|
-
roadmapTitle: string;
|
|
253
|
-
/** Human-readable milestone title for prompt context */
|
|
254
|
-
milestoneTitle: string;
|
|
255
|
-
/** Canonical milestone order at handoff time */
|
|
256
|
-
milestoneOrderIndex: number;
|
|
257
|
-
/** Canonical feature order at handoff time */
|
|
258
|
-
featureOrderIndex: number;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Handoff payload for converting a single roadmap feature into task planning
|
|
263
|
-
* flows without coupling the task system to roadmap persistence details.
|
|
264
|
-
*/
|
|
265
|
-
export interface RoadmapFeatureTaskPlanningHandoff {
|
|
266
|
-
/** Source lineage and ordering context */
|
|
267
|
-
source: RoadmapFeatureSourceRef;
|
|
268
|
-
/** Title to seed the downstream task or planning prompt */
|
|
269
|
-
title: string;
|
|
270
|
-
/** Optional description to seed the downstream task or planning prompt */
|
|
271
|
-
description?: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/** Source-preserving milestone payload used for mission conversion handoffs. */
|
|
275
|
-
export interface RoadmapMissionPlanningMilestoneHandoff {
|
|
276
|
-
/** Source roadmap milestone ID */
|
|
277
|
-
sourceMilestoneId: string;
|
|
278
|
-
/** Canonical milestone title */
|
|
279
|
-
title: string;
|
|
280
|
-
/** Optional milestone description */
|
|
281
|
-
description?: string;
|
|
282
|
-
/** Canonical milestone ordering within the roadmap */
|
|
283
|
-
orderIndex: number;
|
|
284
|
-
/** Ordered roadmap features that belong to this milestone */
|
|
285
|
-
features: Array<{
|
|
286
|
-
/** Source roadmap feature ID */
|
|
287
|
-
sourceFeatureId: string;
|
|
288
|
-
/** Canonical feature title */
|
|
289
|
-
title: string;
|
|
290
|
-
/** Optional feature description */
|
|
291
|
-
description?: string;
|
|
292
|
-
/** Canonical feature ordering within the milestone */
|
|
293
|
-
orderIndex: number;
|
|
294
|
-
}>;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Handoff payload for converting a standalone roadmap into mission planning
|
|
299
|
-
* structures while preserving source IDs and deterministic order.
|
|
300
|
-
*/
|
|
301
|
-
export interface RoadmapMissionPlanningHandoff {
|
|
302
|
-
/** Source roadmap ID */
|
|
303
|
-
sourceRoadmapId: string;
|
|
304
|
-
/** Canonical roadmap title */
|
|
305
|
-
title: string;
|
|
306
|
-
/** Optional roadmap description */
|
|
307
|
-
description?: string;
|
|
308
|
-
/** Ordered milestone breakdown captured at handoff time */
|
|
309
|
-
milestones: RoadmapMissionPlanningMilestoneHandoff[];
|
|
310
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PluginRouteDefinition } from "@fusion/core";
|
|
2
|
-
import { SUGGESTION_TIMEOUT_MS } from "./roadmap-suggestions.js";
|
|
3
|
-
export declare function createRoadmapPluginRoutes(): PluginRouteDefinition[];
|
|
4
|
-
export { SUGGESTION_TIMEOUT_MS };
|
|
5
|
-
//# sourceMappingURL=roadmap-routes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roadmap-routes.d.ts","sourceRoot":"","sources":["roadmap-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,qBAAqB,EAAuB,MAAM,cAAc,CAAC;AAG9F,OAAO,EAQL,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAsFlC,wBAAgB,yBAAyB,IAAI,qBAAqB,EAAE,CAyRnE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import { RoadmapStore } from "../store/roadmap-store.js";
|
|
2
|
-
import { generateFeatureSuggestions, generateMilestoneSuggestions, SUGGESTION_TIMEOUT_MS, ParseError as SuggestionParseError, ServiceUnavailableError as SuggestionServiceUnavailableError, validateFeatureSuggestionInput, validateSuggestionInput, ValidationError as SuggestionValidationError, } from "./roadmap-suggestions.js";
|
|
3
|
-
const roadmapStoreCache = new WeakMap();
|
|
4
|
-
function getRoadmapStore(ctx) {
|
|
5
|
-
const taskStoreWithRoadmaps = ctx.taskStore;
|
|
6
|
-
if (typeof taskStoreWithRoadmaps.getRoadmapStore === "function") {
|
|
7
|
-
return taskStoreWithRoadmaps.getRoadmapStore();
|
|
8
|
-
}
|
|
9
|
-
const key = ctx.taskStore;
|
|
10
|
-
const cached = roadmapStoreCache.get(key);
|
|
11
|
-
if (cached)
|
|
12
|
-
return cached;
|
|
13
|
-
const store = new RoadmapStore(ctx.taskStore.getDatabase());
|
|
14
|
-
roadmapStoreCache.set(key, store);
|
|
15
|
-
return store;
|
|
16
|
-
}
|
|
17
|
-
function asRequest(req) {
|
|
18
|
-
return req;
|
|
19
|
-
}
|
|
20
|
-
function badRequest(message) {
|
|
21
|
-
return { status: 400, body: { error: message } };
|
|
22
|
-
}
|
|
23
|
-
function notFound(message) {
|
|
24
|
-
return { status: 404, body: { error: message } };
|
|
25
|
-
}
|
|
26
|
-
function serverError(message) {
|
|
27
|
-
return { status: 500, body: { error: message } };
|
|
28
|
-
}
|
|
29
|
-
function noContent() {
|
|
30
|
-
return { status: 204 };
|
|
31
|
-
}
|
|
32
|
-
function routeHandler(handler) {
|
|
33
|
-
return async (req, ctx) => {
|
|
34
|
-
const roadmapStore = getRoadmapStore(ctx);
|
|
35
|
-
try {
|
|
36
|
-
return await handler(asRequest(req), ctx, roadmapStore);
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
if (error instanceof Error && error.message.toLowerCase().includes("not found")) {
|
|
40
|
-
return notFound(error.message);
|
|
41
|
-
}
|
|
42
|
-
return serverError(error instanceof Error ? error.message : "Internal server error");
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function validateTitle(title) {
|
|
47
|
-
if (!title || typeof title !== "string" || !title.trim()) {
|
|
48
|
-
throw new Error("title is required");
|
|
49
|
-
}
|
|
50
|
-
if (title.length > 200) {
|
|
51
|
-
throw new Error("title must not exceed 200 characters");
|
|
52
|
-
}
|
|
53
|
-
return title.trim();
|
|
54
|
-
}
|
|
55
|
-
function validateDescription(desc) {
|
|
56
|
-
if (desc === undefined || desc === null)
|
|
57
|
-
return undefined;
|
|
58
|
-
if (typeof desc !== "string") {
|
|
59
|
-
throw new Error("description must be a string");
|
|
60
|
-
}
|
|
61
|
-
if (desc.length > 5000) {
|
|
62
|
-
throw new Error("description must not exceed 5000 characters");
|
|
63
|
-
}
|
|
64
|
-
return desc.trim() || undefined;
|
|
65
|
-
}
|
|
66
|
-
function validateStringArray(arr, fieldName) {
|
|
67
|
-
if (!Array.isArray(arr)) {
|
|
68
|
-
throw new Error(`${fieldName} must be an array`);
|
|
69
|
-
}
|
|
70
|
-
if (!arr.every((item) => typeof item === "string")) {
|
|
71
|
-
throw new Error(`${fieldName} must be an array of strings`);
|
|
72
|
-
}
|
|
73
|
-
return arr;
|
|
74
|
-
}
|
|
75
|
-
export function createRoadmapPluginRoutes() {
|
|
76
|
-
return [
|
|
77
|
-
{
|
|
78
|
-
method: "GET",
|
|
79
|
-
path: "/roadmaps",
|
|
80
|
-
handler: routeHandler((_req, _ctx, roadmapStore) => roadmapStore.listRoadmaps()),
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
method: "POST",
|
|
84
|
-
path: "/roadmaps",
|
|
85
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
86
|
-
const body = req.body;
|
|
87
|
-
try {
|
|
88
|
-
return {
|
|
89
|
-
status: 201,
|
|
90
|
-
body: roadmapStore.createRoadmap({
|
|
91
|
-
title: validateTitle(body?.title),
|
|
92
|
-
description: validateDescription(body?.description),
|
|
93
|
-
}),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
98
|
-
}
|
|
99
|
-
}),
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
method: "GET",
|
|
103
|
-
path: "/roadmaps/:roadmapId",
|
|
104
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
105
|
-
const roadmap = roadmapStore.getRoadmapWithHierarchy(req.params.roadmapId);
|
|
106
|
-
return roadmap ? roadmap : notFound(`Roadmap ${req.params.roadmapId} not found`);
|
|
107
|
-
}),
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
method: "PATCH",
|
|
111
|
-
path: "/roadmaps/:roadmapId",
|
|
112
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
113
|
-
const body = req.body;
|
|
114
|
-
try {
|
|
115
|
-
return roadmapStore.updateRoadmap(req.params.roadmapId, {
|
|
116
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
117
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
122
|
-
}
|
|
123
|
-
}),
|
|
124
|
-
},
|
|
125
|
-
{ method: "DELETE", path: "/roadmaps/:roadmapId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
126
|
-
roadmapStore.deleteRoadmap(req.params.roadmapId);
|
|
127
|
-
return noContent();
|
|
128
|
-
}) },
|
|
129
|
-
{
|
|
130
|
-
method: "POST",
|
|
131
|
-
path: "/roadmaps/:roadmapId/milestones",
|
|
132
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
133
|
-
const body = req.body;
|
|
134
|
-
try {
|
|
135
|
-
return {
|
|
136
|
-
status: 201,
|
|
137
|
-
body: roadmapStore.createMilestone(req.params.roadmapId, {
|
|
138
|
-
title: validateTitle(body?.title),
|
|
139
|
-
description: validateDescription(body?.description),
|
|
140
|
-
}),
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
catch (error) {
|
|
144
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
145
|
-
}
|
|
146
|
-
}),
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
method: "POST",
|
|
150
|
-
path: "/roadmaps/:roadmapId/milestones/reorder",
|
|
151
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
152
|
-
try {
|
|
153
|
-
const body = req.body;
|
|
154
|
-
roadmapStore.reorderMilestones({ roadmapId: req.params.roadmapId, orderedMilestoneIds: validateStringArray(body?.orderedMilestoneIds, "orderedMilestoneIds") });
|
|
155
|
-
return noContent();
|
|
156
|
-
}
|
|
157
|
-
catch (error) {
|
|
158
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
159
|
-
}
|
|
160
|
-
}),
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
method: "PATCH",
|
|
164
|
-
path: "/roadmaps/milestones/:milestoneId",
|
|
165
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
166
|
-
const body = req.body;
|
|
167
|
-
try {
|
|
168
|
-
return roadmapStore.updateMilestone(req.params.milestoneId, {
|
|
169
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
170
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
catch (error) {
|
|
174
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
175
|
-
}
|
|
176
|
-
}),
|
|
177
|
-
},
|
|
178
|
-
{ method: "DELETE", path: "/roadmaps/milestones/:milestoneId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
179
|
-
roadmapStore.deleteMilestone(req.params.milestoneId);
|
|
180
|
-
return noContent();
|
|
181
|
-
}) },
|
|
182
|
-
{
|
|
183
|
-
method: "POST",
|
|
184
|
-
path: "/roadmaps/milestones/:milestoneId/features",
|
|
185
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
186
|
-
const body = req.body;
|
|
187
|
-
try {
|
|
188
|
-
return {
|
|
189
|
-
status: 201,
|
|
190
|
-
body: roadmapStore.createFeature(req.params.milestoneId, {
|
|
191
|
-
title: validateTitle(body?.title),
|
|
192
|
-
description: validateDescription(body?.description),
|
|
193
|
-
}),
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
198
|
-
}
|
|
199
|
-
}),
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
method: "POST",
|
|
203
|
-
path: "/roadmaps/milestones/:milestoneId/features/reorder",
|
|
204
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
205
|
-
try {
|
|
206
|
-
const body = req.body;
|
|
207
|
-
const milestone = roadmapStore.getMilestone(req.params.milestoneId);
|
|
208
|
-
if (!milestone)
|
|
209
|
-
return notFound(`Milestone ${req.params.milestoneId} not found`);
|
|
210
|
-
roadmapStore.reorderFeatures({ roadmapId: milestone.roadmapId, milestoneId: req.params.milestoneId, orderedFeatureIds: validateStringArray(body?.orderedFeatureIds, "orderedFeatureIds") });
|
|
211
|
-
return noContent();
|
|
212
|
-
}
|
|
213
|
-
catch (error) {
|
|
214
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
215
|
-
}
|
|
216
|
-
}),
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
method: "PATCH",
|
|
220
|
-
path: "/roadmaps/features/:featureId",
|
|
221
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
222
|
-
const body = req.body;
|
|
223
|
-
try {
|
|
224
|
-
return roadmapStore.updateFeature(req.params.featureId, {
|
|
225
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
226
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
catch (error) {
|
|
230
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
231
|
-
}
|
|
232
|
-
}),
|
|
233
|
-
},
|
|
234
|
-
{ method: "DELETE", path: "/roadmaps/features/:featureId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
235
|
-
roadmapStore.deleteFeature(req.params.featureId);
|
|
236
|
-
return noContent();
|
|
237
|
-
}) },
|
|
238
|
-
{
|
|
239
|
-
method: "POST",
|
|
240
|
-
path: "/roadmaps/features/:featureId/move",
|
|
241
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
242
|
-
const body = req.body;
|
|
243
|
-
if (!body?.targetMilestoneId)
|
|
244
|
-
return badRequest("targetMilestoneId is required");
|
|
245
|
-
if (typeof body.targetIndex !== "number")
|
|
246
|
-
return badRequest("targetIndex must be a number");
|
|
247
|
-
const feature = roadmapStore.getFeature(req.params.featureId);
|
|
248
|
-
if (!feature)
|
|
249
|
-
return notFound(`Feature ${req.params.featureId} not found`);
|
|
250
|
-
const fromMilestone = roadmapStore.getMilestone(feature.milestoneId);
|
|
251
|
-
if (!fromMilestone)
|
|
252
|
-
return notFound(`Source milestone ${feature.milestoneId} not found`);
|
|
253
|
-
const toMilestone = roadmapStore.getMilestone(body.targetMilestoneId);
|
|
254
|
-
if (!toMilestone)
|
|
255
|
-
return notFound(`Target milestone ${body.targetMilestoneId} not found`);
|
|
256
|
-
roadmapStore.moveFeature({
|
|
257
|
-
roadmapId: fromMilestone.roadmapId,
|
|
258
|
-
featureId: req.params.featureId,
|
|
259
|
-
fromMilestoneId: feature.milestoneId,
|
|
260
|
-
toMilestoneId: body.targetMilestoneId,
|
|
261
|
-
targetOrderIndex: body.targetIndex,
|
|
262
|
-
});
|
|
263
|
-
return noContent();
|
|
264
|
-
}),
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
method: "POST",
|
|
268
|
-
path: "/roadmaps/:roadmapId/suggestions/milestones",
|
|
269
|
-
handler: routeHandler(async (req, ctx, roadmapStore) => {
|
|
270
|
-
const roadmap = roadmapStore.getRoadmap(req.params.roadmapId);
|
|
271
|
-
if (!roadmap)
|
|
272
|
-
return notFound(`Roadmap ${req.params.roadmapId} not found`);
|
|
273
|
-
try {
|
|
274
|
-
validateSuggestionInput(req.body);
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
if (error instanceof SuggestionValidationError)
|
|
278
|
-
return badRequest(error.message);
|
|
279
|
-
throw error;
|
|
280
|
-
}
|
|
281
|
-
try {
|
|
282
|
-
const body = req.body;
|
|
283
|
-
const suggestions = await generateMilestoneSuggestions(body.goalPrompt, body.count, ctx.taskStore.getRootDir(), undefined, undefined, ctx.createAiSession);
|
|
284
|
-
return { suggestions };
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
if (error instanceof SuggestionParseError)
|
|
288
|
-
return serverError(error.message);
|
|
289
|
-
if (error instanceof SuggestionServiceUnavailableError) {
|
|
290
|
-
return { status: 503, body: { error: error.message } };
|
|
291
|
-
}
|
|
292
|
-
throw error;
|
|
293
|
-
}
|
|
294
|
-
}),
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
method: "POST",
|
|
298
|
-
path: "/roadmaps/milestones/:milestoneId/suggestions/features",
|
|
299
|
-
handler: routeHandler(async (req, ctx, roadmapStore) => {
|
|
300
|
-
const milestone = roadmapStore.getMilestone(req.params.milestoneId);
|
|
301
|
-
if (!milestone)
|
|
302
|
-
return notFound(`Milestone ${req.params.milestoneId} not found`);
|
|
303
|
-
const roadmap = roadmapStore.getRoadmap(milestone.roadmapId);
|
|
304
|
-
if (!roadmap)
|
|
305
|
-
return notFound(`Roadmap ${milestone.roadmapId} not found`);
|
|
306
|
-
try {
|
|
307
|
-
validateFeatureSuggestionInput(req.body);
|
|
308
|
-
}
|
|
309
|
-
catch (error) {
|
|
310
|
-
if (error instanceof SuggestionValidationError)
|
|
311
|
-
return badRequest(error.message);
|
|
312
|
-
throw error;
|
|
313
|
-
}
|
|
314
|
-
try {
|
|
315
|
-
const body = req.body;
|
|
316
|
-
const suggestions = await generateFeatureSuggestions({
|
|
317
|
-
roadmapTitle: roadmap.title,
|
|
318
|
-
roadmapDescription: roadmap.description,
|
|
319
|
-
milestoneTitle: milestone.title,
|
|
320
|
-
milestoneDescription: milestone.description,
|
|
321
|
-
existingFeatureTitles: roadmapStore.listFeatures(milestone.id).map((feature) => feature.title),
|
|
322
|
-
}, body.count, body.prompt, ctx.taskStore.getRootDir(), undefined, undefined, ctx.createAiSession);
|
|
323
|
-
return { suggestions };
|
|
324
|
-
}
|
|
325
|
-
catch (error) {
|
|
326
|
-
if (error instanceof SuggestionParseError)
|
|
327
|
-
return serverError(error.message);
|
|
328
|
-
if (error instanceof SuggestionServiceUnavailableError) {
|
|
329
|
-
return { status: 503, body: { error: error.message } };
|
|
330
|
-
}
|
|
331
|
-
throw error;
|
|
332
|
-
}
|
|
333
|
-
}),
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
method: "GET",
|
|
337
|
-
path: "/roadmaps/:roadmapId/export",
|
|
338
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getRoadmapExport(req.params.roadmapId)),
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
method: "GET",
|
|
342
|
-
path: "/roadmaps/:roadmapId/handoff",
|
|
343
|
-
handler: routeHandler((req, _ctx, roadmapStore) => ({
|
|
344
|
-
mission: roadmapStore.getMissionPlanningHandoff(req.params.roadmapId),
|
|
345
|
-
features: roadmapStore.listFeatureTaskPlanningHandoffs(req.params.roadmapId),
|
|
346
|
-
})),
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
method: "GET",
|
|
350
|
-
path: "/roadmaps/:roadmapId/handoff/mission",
|
|
351
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getMissionPlanningHandoff(req.params.roadmapId)),
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
method: "GET",
|
|
355
|
-
path: "/roadmaps/:roadmapId/milestones/:milestoneId/features/:featureId/handoff/task",
|
|
356
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getRoadmapFeatureHandoff(req.params.roadmapId, req.params.milestoneId, req.params.featureId)),
|
|
357
|
-
},
|
|
358
|
-
];
|
|
359
|
-
}
|
|
360
|
-
export { SUGGESTION_TIMEOUT_MS };
|
|
361
|
-
//# sourceMappingURL=roadmap-routes.js.map
|