@runfusion/fusion 0.25.0 → 0.27.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 +28004 -16888
- package/dist/client/assets/AgentDetailView-B7QRcHJH.css +1 -0
- package/dist/client/assets/AgentDetailView-DwLmRXTY.js +18 -0
- package/dist/client/assets/{AgentsView-B3jYk8Kt.js → AgentsView-D-N6aA0P.js} +12 -7
- package/dist/client/assets/ChatView-DnCdKu8Z.js +1 -0
- package/dist/client/assets/{DevServerView-DyGDEiBP.js → DevServerView-BiA1nYtt.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-D5UIeIl6.js → DirectoryPicker-DvBviDG6.js} +1 -1
- package/dist/client/assets/{DocumentsView-DNHu1T8K.js → DocumentsView-BWXOxpuq.js} +1 -1
- package/dist/client/assets/{EvalsView-CpRobtDi.js → EvalsView-CJFbtL7i.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-DOY_oZi7.js → ExperimentalAgentOnboardingModal-DuGIPd0B.js} +1 -1
- package/dist/client/assets/InsightsView-BBpRiolN.js +11 -0
- package/dist/client/assets/{MemoryView-PSc5lGJt.js → MemoryView-48LuNkKk.js} +2 -2
- package/dist/client/assets/NodesView-CGQWSNZM.js +14 -0
- package/dist/client/assets/{PiExtensionsManager-DL_QcN56.js → PiExtensionsManager-i-7UL2oh.js} +2 -2
- package/dist/client/assets/PluginManager-DoSAykD6.js +1 -0
- package/dist/client/assets/{ResearchView-BzCcDAS4.css → ResearchView-BEI4ZSGs.css} +1 -1
- package/dist/client/assets/ResearchView-XZuRtOxE.js +1 -0
- package/dist/client/assets/SettingsModal-Ci0_sqbU.css +1 -0
- package/dist/client/assets/{SettingsModal-CUCyaAyE.js → SettingsModal-CmeF8CN4.js} +1 -1
- package/dist/client/assets/SettingsModal-DBcjf9Bu.js +31 -0
- package/dist/client/assets/SettingsModal-DWKgRxBA.css +1 -0
- package/dist/client/assets/{SetupWizardModal-BKscasuh.js → SetupWizardModal-CgtvpMX9.js} +1 -1
- package/dist/client/assets/{SkillsView-BdELqTy7.js → SkillsView-DErYRumF.js} +1 -1
- package/dist/client/assets/StashRecoveryView-B_8WIQEo.css +1 -0
- package/dist/client/assets/StashRecoveryView-QJrNS4Vg.js +1 -0
- package/dist/client/assets/{TodoView-DFNGBDNV.js → TodoView-BD9NRwq0.js} +2 -2
- package/dist/client/assets/createLucideIcon-BazL2hk5.js +21 -0
- package/dist/client/assets/dashboard-view-BWGH_fAq.js +63 -0
- package/dist/client/assets/dashboard-view-BoTzlP8b.css +1 -0
- package/dist/client/assets/dashboard-view-DdGlfuu-.css +1 -0
- package/dist/client/assets/dashboard-view-Ws9_ZnKu.js +21 -0
- package/dist/client/assets/{folder-open-k1xmUMyr.js → folder-open-CHSlllzf.js} +1 -1
- package/dist/client/assets/index-DCovGm5b.css +1 -0
- package/dist/client/assets/index-bEwSVl7B.js +692 -0
- package/dist/client/assets/{star-ne32r3Y4.js → star-BgVwWAPz.js} +1 -1
- package/dist/client/assets/{upload-MS-2Gx53.js → upload-CAzycxr9.js} +1 -1
- package/dist/client/assets/{users-C519GSjH.js → users-CZnxCCCJ.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/droid-cli/src/__tests__/index.test.ts +228 -0
- package/dist/extension.js +15810 -10205
- package/dist/pi-claude-cli/package.json +1 -1
- package/dist/pi-claude-cli/src/__tests__/provider.test.ts +36 -22
- package/dist/pi-claude-cli/src/provider.ts +7 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/manifest.json +24 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +44 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/TestRunnerPanel.test.tsx +99 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/config-flow.test.ts +91 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/dashboard-view.test.tsx +40 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/dashboard-views.test.ts +46 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/draft-store.test.ts +50 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/fixtures/exec-mock.ts +80 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/fixtures/fixtures.test.ts +40 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/fixtures/registry.ts +82 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/generator.test.ts +54 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/manage-view.test.tsx +98 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/manifest.test.ts +36 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/registration.test.ts +29 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/run-routes.test.ts +98 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/runner.test.ts +55 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/runtime-availability.test.ts +61 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/validation.test.ts +30 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/wizard-routes.test.ts +61 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/__tests__/workflow-integration.test.ts +19 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/dashboard-view.css +43 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/dashboard-view.tsx +49 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/generation/generator.ts +95 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/generation/redact.ts +9 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/generation/runner.ts +79 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/generation/types.ts +31 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/index.ts +58 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/manage/EditDraftModal.tsx +75 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/manage/useDrafts.ts +73 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/manage-view.css +79 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/manage-view.tsx +122 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/routes/wizard-routes.ts +272 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/run/TestRunnerPanel.css +70 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/run/TestRunnerPanel.tsx +98 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/run/useRunGeneratedCli.ts +37 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/runtime/__tests__/executor-runtime-env.test.ts +191 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/runtime/executor-runtime-env.ts +75 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/storage/draft-store.ts +85 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/store/__tests__/cli-press-store.test.ts +128 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/store/__tests__/credentials.test.ts +62 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/store/cli-press-store.ts +427 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/store/cli-press-types.ts +110 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/store/credentials.ts +95 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/wizard/steps.tsx +55 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/wizard/types.ts +33 -0
- package/dist/plugins/fusion-plugin-cli-printing-press/src/wizard/validation.ts +63 -0
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/manifest.json +10 -0
- package/dist/plugins/fusion-plugin-reports/package.json +18 -2
- package/dist/plugins/fusion-plugin-reports/src/__tests__/approval.test.ts +164 -0
- package/dist/plugins/fusion-plugin-reports/src/__tests__/manifest.test.ts +14 -0
- package/dist/plugins/fusion-plugin-reports/src/__tests__/routes-approval.test.ts +109 -0
- package/dist/plugins/fusion-plugin-reports/src/__tests__/scaffold.test.ts +60 -0
- package/dist/plugins/fusion-plugin-reports/src/__tests__/share-blocks.test.ts +83 -0
- package/dist/plugins/fusion-plugin-reports/src/aggregation.ts +23 -0
- package/dist/plugins/fusion-plugin-reports/src/approval.ts +97 -0
- package/dist/plugins/fusion-plugin-reports/src/cadence.ts +23 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/ReportsView.css +82 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/ReportsView.tsx +24 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/ReportComparisonDrawer.test.tsx +12 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/ReportDetailPanel.test.tsx +12 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/ReportFiltersBar.test.tsx +14 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/ReportsView.test.tsx +27 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/api.test.ts +19 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/useReportSectionDiff.test.ts +11 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/__tests__/useReports.test.ts +13 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/api.ts +85 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportApprovalPanel.css +59 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportApprovalPanel.tsx +58 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportComparisonDrawer.tsx +21 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportDetailPanel.tsx +29 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportEmptyState.tsx +3 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportFiltersBar.tsx +19 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ReportListItem.tsx +8 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ShareBlocksPanel.css +29 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/ShareBlocksPanel.tsx +43 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/__tests__/ReportApprovalPanel.test.tsx +38 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/components/__tests__/ShareBlocksPanel.test.tsx +24 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/test-setup.ts +18 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/types.ts +22 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/useReportPreview.ts +44 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/useReportSectionDiff.ts +59 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/useReports.ts +71 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard/useViewportMode.ts +13 -0
- package/dist/plugins/fusion-plugin-reports/src/dashboard-view.tsx +6 -0
- package/dist/plugins/fusion-plugin-reports/src/index.ts +48 -2
- package/dist/plugins/fusion-plugin-reports/src/pipeline.ts +58 -0
- package/dist/plugins/fusion-plugin-reports/src/render/__tests__/escape.test.ts +20 -0
- package/dist/plugins/fusion-plugin-reports/src/render/__tests__/html-template.test.ts +110 -0
- package/dist/plugins/fusion-plugin-reports/src/render/__tests__/standalone-html.test.ts +66 -0
- package/dist/plugins/fusion-plugin-reports/src/render/escape.ts +12 -0
- package/dist/plugins/fusion-plugin-reports/src/render/html-styles.ts +40 -0
- package/dist/plugins/fusion-plugin-reports/src/render/html-template.ts +137 -0
- package/dist/plugins/fusion-plugin-reports/src/render/index.ts +4 -0
- package/dist/plugins/fusion-plugin-reports/src/render/standalone-html.ts +75 -0
- package/dist/plugins/fusion-plugin-reports/src/report-schema.ts +31 -0
- package/dist/plugins/fusion-plugin-reports/src/routes/__tests__/report-export-routes.test.ts +104 -0
- package/dist/plugins/fusion-plugin-reports/src/routes/report-approval-routes.ts +98 -0
- package/dist/plugins/fusion-plugin-reports/src/routes/report-export-routes.ts +77 -0
- package/dist/plugins/fusion-plugin-reports/src/routes/report-list-routes.ts +72 -0
- package/dist/plugins/fusion-plugin-reports/src/runs-store.ts +69 -0
- package/dist/plugins/fusion-plugin-reports/src/share-blocks.ts +82 -0
- package/dist/plugins/fusion-plugin-reports/src/store/report-store.ts +51 -2
- package/dist/plugins/fusion-plugin-reports/src/store/report-types.ts +6 -1
- package/dist/plugins/fusion-plugin-roadmap/bundled.js +1672 -0
- package/dist/plugins/fusion-plugin-roadmap/manifest.json +1 -1
- 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/skill/fusion/references/engine-tools.md +1 -1
- package/skill/fusion/references/extension-tools.md +3 -3
- package/skill/fusion/references/fusion-capabilities.md +1 -1
- package/dist/client/assets/AgentDetailView-BwJaLqZh.css +0 -1
- package/dist/client/assets/AgentDetailView-ZbHEbYRT.js +0 -18
- package/dist/client/assets/ChatView-DhPkiEGs.js +0 -1
- package/dist/client/assets/InsightsView-vp0RE8Mg.js +0 -11
- package/dist/client/assets/NodesView-DMj6HGeC.js +0 -14
- package/dist/client/assets/PluginManager-BtYKm8IT.js +0 -1
- package/dist/client/assets/ResearchView-BhWqfdV0.js +0 -1
- package/dist/client/assets/SettingsModal-BAgB4_AR.js +0 -31
- package/dist/client/assets/SettingsModal-BNSrO1M9.css +0 -1
- package/dist/client/assets/SettingsModal-DzsLquBu.css +0 -1
- package/dist/client/assets/index-Qq2JOOWx.css +0 -1
- package/dist/client/assets/index-TFYXEVpn.js +0 -692
- 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.css +0 -1299
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roadmap-routes.js","sourceRoot":"","sources":["roadmap-routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,UAAU,IAAI,oBAAoB,EAClC,uBAAuB,IAAI,iCAAiC,EAC5D,8BAA8B,EAC9B,uBAAuB,EACvB,eAAe,IAAI,yBAAyB,EAC5C,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAwB,CAAC;AAE9D,SAAS,eAAe,CAAC,GAAkB;IACzC,MAAM,qBAAqB,GAAG,GAAG,CAAC,SAEjC,CAAC;IAEF,IAAI,OAAO,qBAAqB,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;QAChE,OAAO,qBAAqB,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,CAAC,SAAmB,CAAC;IACpC,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5D,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ion/core";
|
|
2
|
-
|
|
3
|
-
interface RouteRequest {
|
|
4
|
-
params: Record<string, string>;
|
|
5
|
-
query?: Record<string, string | string[] | undefined>;
|
|
6
|
-
body?: unknown;
|
|
7
|
-
}
|
|
8
|
-
import { RoadmapStore } from "../store/roadmap-store.js";
|
|
9
|
-
import {
|
|
10
|
-
generateFeatureSuggestions,
|
|
11
|
-
generateMilestoneSuggestions,
|
|
12
|
-
SUGGESTION_TIMEOUT_MS,
|
|
13
|
-
ParseError as SuggestionParseError,
|
|
14
|
-
ServiceUnavailableError as SuggestionServiceUnavailableError,
|
|
15
|
-
validateFeatureSuggestionInput,
|
|
16
|
-
validateSuggestionInput,
|
|
17
|
-
ValidationError as SuggestionValidationError,
|
|
18
|
-
} from "./roadmap-suggestions.js";
|
|
19
|
-
|
|
20
|
-
const roadmapStoreCache = new WeakMap<object, RoadmapStore>();
|
|
21
|
-
|
|
22
|
-
function resolveProjectId(req: RouteRequest): string | undefined {
|
|
23
|
-
const queryProjectId = paramValue(req.query?.projectId);
|
|
24
|
-
if (queryProjectId.trim()) return queryProjectId.trim();
|
|
25
|
-
const bodyProjectId = req.body && typeof req.body === "object"
|
|
26
|
-
? (req.body as { projectId?: unknown }).projectId
|
|
27
|
-
: undefined;
|
|
28
|
-
if (typeof bodyProjectId === "string" && bodyProjectId.trim()) return bodyProjectId.trim();
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function getRoadmapStore(req: RouteRequest, ctx: PluginContext): Promise<RoadmapStore> {
|
|
33
|
-
const projectId = resolveProjectId(req);
|
|
34
|
-
const scopedTaskStore = projectId && ctx.resolveProjectTaskStore
|
|
35
|
-
? await ctx.resolveProjectTaskStore(projectId)
|
|
36
|
-
: ctx.taskStore;
|
|
37
|
-
|
|
38
|
-
const taskStoreWithRoadmaps = scopedTaskStore as PluginContext["taskStore"] & {
|
|
39
|
-
getRoadmapStore?: () => RoadmapStore;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
if (typeof taskStoreWithRoadmaps.getRoadmapStore === "function") {
|
|
43
|
-
return taskStoreWithRoadmaps.getRoadmapStore();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const key = scopedTaskStore as object;
|
|
47
|
-
const cached = roadmapStoreCache.get(key);
|
|
48
|
-
if (cached) return cached;
|
|
49
|
-
const store = new RoadmapStore(scopedTaskStore.getDatabase());
|
|
50
|
-
roadmapStoreCache.set(key, store);
|
|
51
|
-
return store;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function asRequest(req: unknown): RouteRequest {
|
|
55
|
-
return req as RouteRequest;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function paramValue(value: string | string[] | undefined): string {
|
|
59
|
-
if (Array.isArray(value)) return value[0] ?? "";
|
|
60
|
-
return value ?? "";
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function badRequest(message: string): PluginRouteResponse {
|
|
64
|
-
return { status: 400, body: { error: message } };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function notFound(message: string): PluginRouteResponse {
|
|
68
|
-
return { status: 404, body: { error: message } };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function serverError(message: string): PluginRouteResponse {
|
|
72
|
-
return { status: 500, body: { error: message } };
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function noContent(): PluginRouteResponse {
|
|
76
|
-
return { status: 204 };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function routeHandler<T>(handler: (req: RouteRequest, ctx: PluginContext, roadmapStore: RoadmapStore) => Promise<T | PluginRouteResponse> | T | PluginRouteResponse) {
|
|
80
|
-
return async (req: unknown, ctx: PluginContext): Promise<T | PluginRouteResponse> => {
|
|
81
|
-
const routeRequest = asRequest(req);
|
|
82
|
-
const roadmapStore = await getRoadmapStore(routeRequest, ctx);
|
|
83
|
-
try {
|
|
84
|
-
return await handler(routeRequest, ctx, roadmapStore);
|
|
85
|
-
} catch (error) {
|
|
86
|
-
if (error instanceof Error && error.message.toLowerCase().includes("not found")) {
|
|
87
|
-
return notFound(error.message);
|
|
88
|
-
}
|
|
89
|
-
return serverError(error instanceof Error ? error.message : "Internal server error");
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function validateTitle(title: unknown): string {
|
|
95
|
-
if (!title || typeof title !== "string" || !title.trim()) {
|
|
96
|
-
throw new Error("title is required");
|
|
97
|
-
}
|
|
98
|
-
if (title.length > 200) {
|
|
99
|
-
throw new Error("title must not exceed 200 characters");
|
|
100
|
-
}
|
|
101
|
-
return title.trim();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function validateDescription(desc: unknown): string | undefined {
|
|
105
|
-
if (desc === undefined || desc === null) return undefined;
|
|
106
|
-
if (typeof desc !== "string") {
|
|
107
|
-
throw new Error("description must be a string");
|
|
108
|
-
}
|
|
109
|
-
if (desc.length > 5000) {
|
|
110
|
-
throw new Error("description must not exceed 5000 characters");
|
|
111
|
-
}
|
|
112
|
-
return desc.trim() || undefined;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function validateStringArray(arr: unknown, fieldName: string): string[] {
|
|
116
|
-
if (!Array.isArray(arr)) {
|
|
117
|
-
throw new Error(`${fieldName} must be an array`);
|
|
118
|
-
}
|
|
119
|
-
if (!arr.every((item) => typeof item === "string")) {
|
|
120
|
-
throw new Error(`${fieldName} must be an array of strings`);
|
|
121
|
-
}
|
|
122
|
-
return arr;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function createRoadmapPluginRoutes(): PluginRouteDefinition[] {
|
|
126
|
-
return [
|
|
127
|
-
{
|
|
128
|
-
method: "GET",
|
|
129
|
-
path: "/roadmaps",
|
|
130
|
-
handler: routeHandler((_req, _ctx, roadmapStore) => roadmapStore.listRoadmaps()),
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
method: "POST",
|
|
134
|
-
path: "/roadmaps",
|
|
135
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
136
|
-
const body = req.body as { title: string; description?: string };
|
|
137
|
-
try {
|
|
138
|
-
return {
|
|
139
|
-
status: 201,
|
|
140
|
-
body: roadmapStore.createRoadmap({
|
|
141
|
-
title: validateTitle(body?.title),
|
|
142
|
-
description: validateDescription(body?.description),
|
|
143
|
-
}),
|
|
144
|
-
};
|
|
145
|
-
} catch (error) {
|
|
146
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
147
|
-
}
|
|
148
|
-
}),
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
method: "GET",
|
|
152
|
-
path: "/roadmaps/:roadmapId",
|
|
153
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
154
|
-
const roadmap = roadmapStore.getRoadmapWithHierarchy(paramValue(req.params.roadmapId));
|
|
155
|
-
return roadmap ? roadmap : notFound(`Roadmap ${paramValue(req.params.roadmapId)} not found`);
|
|
156
|
-
}),
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
method: "PATCH",
|
|
160
|
-
path: "/roadmaps/:roadmapId",
|
|
161
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
162
|
-
const body = req.body as { title?: string; description?: string };
|
|
163
|
-
try {
|
|
164
|
-
return roadmapStore.updateRoadmap(paramValue(req.params.roadmapId), {
|
|
165
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
166
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
167
|
-
});
|
|
168
|
-
} catch (error) {
|
|
169
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
170
|
-
}
|
|
171
|
-
}),
|
|
172
|
-
},
|
|
173
|
-
{ method: "DELETE", path: "/roadmaps/:roadmapId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
174
|
-
roadmapStore.deleteRoadmap(paramValue(req.params.roadmapId));
|
|
175
|
-
return noContent();
|
|
176
|
-
}) },
|
|
177
|
-
{
|
|
178
|
-
method: "POST",
|
|
179
|
-
path: "/roadmaps/:roadmapId/milestones",
|
|
180
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
181
|
-
const body = req.body as { title: string; description?: string };
|
|
182
|
-
try {
|
|
183
|
-
return {
|
|
184
|
-
status: 201,
|
|
185
|
-
body: roadmapStore.createMilestone(paramValue(req.params.roadmapId), {
|
|
186
|
-
title: validateTitle(body?.title),
|
|
187
|
-
description: validateDescription(body?.description),
|
|
188
|
-
}),
|
|
189
|
-
};
|
|
190
|
-
} catch (error) {
|
|
191
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
192
|
-
}
|
|
193
|
-
}),
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
method: "POST",
|
|
197
|
-
path: "/roadmaps/:roadmapId/milestones/reorder",
|
|
198
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
199
|
-
try {
|
|
200
|
-
const body = req.body as { orderedMilestoneIds: string[] };
|
|
201
|
-
roadmapStore.reorderMilestones({ roadmapId: paramValue(req.params.roadmapId), orderedMilestoneIds: validateStringArray(body?.orderedMilestoneIds, "orderedMilestoneIds") });
|
|
202
|
-
return noContent();
|
|
203
|
-
} catch (error) {
|
|
204
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
205
|
-
}
|
|
206
|
-
}),
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
method: "PATCH",
|
|
210
|
-
path: "/roadmaps/milestones/:milestoneId",
|
|
211
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
212
|
-
const body = req.body as { title?: string; description?: string };
|
|
213
|
-
try {
|
|
214
|
-
return roadmapStore.updateMilestone(paramValue(req.params.milestoneId), {
|
|
215
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
216
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
217
|
-
});
|
|
218
|
-
} catch (error) {
|
|
219
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
220
|
-
}
|
|
221
|
-
}),
|
|
222
|
-
},
|
|
223
|
-
{ method: "DELETE", path: "/roadmaps/milestones/:milestoneId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
224
|
-
roadmapStore.deleteMilestone(paramValue(req.params.milestoneId));
|
|
225
|
-
return noContent();
|
|
226
|
-
}) },
|
|
227
|
-
{
|
|
228
|
-
method: "POST",
|
|
229
|
-
path: "/roadmaps/milestones/:milestoneId/features",
|
|
230
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
231
|
-
const body = req.body as { title: string; description?: string };
|
|
232
|
-
try {
|
|
233
|
-
return {
|
|
234
|
-
status: 201,
|
|
235
|
-
body: roadmapStore.createFeature(paramValue(req.params.milestoneId), {
|
|
236
|
-
title: validateTitle(body?.title),
|
|
237
|
-
description: validateDescription(body?.description),
|
|
238
|
-
}),
|
|
239
|
-
};
|
|
240
|
-
} catch (error) {
|
|
241
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
242
|
-
}
|
|
243
|
-
}),
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
method: "POST",
|
|
247
|
-
path: "/roadmaps/milestones/:milestoneId/features/reorder",
|
|
248
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
249
|
-
try {
|
|
250
|
-
const body = req.body as { orderedFeatureIds: string[] };
|
|
251
|
-
const milestone = roadmapStore.getMilestone(paramValue(req.params.milestoneId));
|
|
252
|
-
if (!milestone) return notFound(`Milestone ${paramValue(req.params.milestoneId)} not found`);
|
|
253
|
-
roadmapStore.reorderFeatures({ roadmapId: milestone.roadmapId, milestoneId: paramValue(req.params.milestoneId), orderedFeatureIds: validateStringArray(body?.orderedFeatureIds, "orderedFeatureIds") });
|
|
254
|
-
return noContent();
|
|
255
|
-
} catch (error) {
|
|
256
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
257
|
-
}
|
|
258
|
-
}),
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
method: "PATCH",
|
|
262
|
-
path: "/roadmaps/features/:featureId",
|
|
263
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
264
|
-
const body = req.body as { title?: string; description?: string };
|
|
265
|
-
try {
|
|
266
|
-
return roadmapStore.updateFeature(paramValue(req.params.featureId), {
|
|
267
|
-
title: body.title !== undefined ? validateTitle(body.title) : undefined,
|
|
268
|
-
description: body.description !== undefined ? validateDescription(body.description) : undefined,
|
|
269
|
-
});
|
|
270
|
-
} catch (error) {
|
|
271
|
-
return badRequest(error instanceof Error ? error.message : "Invalid input");
|
|
272
|
-
}
|
|
273
|
-
}),
|
|
274
|
-
},
|
|
275
|
-
{ method: "DELETE", path: "/roadmaps/features/:featureId", handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
276
|
-
roadmapStore.deleteFeature(paramValue(req.params.featureId));
|
|
277
|
-
return noContent();
|
|
278
|
-
}) },
|
|
279
|
-
{
|
|
280
|
-
method: "POST",
|
|
281
|
-
path: "/roadmaps/features/:featureId/move",
|
|
282
|
-
handler: routeHandler((req, _ctx, roadmapStore) => {
|
|
283
|
-
const body = req.body as { targetMilestoneId: string; targetIndex: number };
|
|
284
|
-
if (!body?.targetMilestoneId) return badRequest("targetMilestoneId is required");
|
|
285
|
-
if (typeof body.targetIndex !== "number") return badRequest("targetIndex must be a number");
|
|
286
|
-
|
|
287
|
-
const feature = roadmapStore.getFeature(paramValue(req.params.featureId));
|
|
288
|
-
if (!feature) return notFound(`Feature ${paramValue(req.params.featureId)} not found`);
|
|
289
|
-
const fromMilestone = roadmapStore.getMilestone(feature.milestoneId);
|
|
290
|
-
if (!fromMilestone) return notFound(`Source milestone ${feature.milestoneId} not found`);
|
|
291
|
-
const toMilestone = roadmapStore.getMilestone(body.targetMilestoneId);
|
|
292
|
-
if (!toMilestone) return notFound(`Target milestone ${body.targetMilestoneId} not found`);
|
|
293
|
-
|
|
294
|
-
roadmapStore.moveFeature({
|
|
295
|
-
roadmapId: fromMilestone.roadmapId,
|
|
296
|
-
featureId: paramValue(req.params.featureId),
|
|
297
|
-
fromMilestoneId: feature.milestoneId,
|
|
298
|
-
toMilestoneId: body.targetMilestoneId,
|
|
299
|
-
targetOrderIndex: body.targetIndex,
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
return noContent();
|
|
303
|
-
}),
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
method: "POST",
|
|
307
|
-
path: "/roadmaps/:roadmapId/suggestions/milestones",
|
|
308
|
-
handler: routeHandler(async (req, ctx, roadmapStore) => {
|
|
309
|
-
const roadmap = roadmapStore.getRoadmap(paramValue(req.params.roadmapId));
|
|
310
|
-
if (!roadmap) return notFound(`Roadmap ${paramValue(req.params.roadmapId)} not found`);
|
|
311
|
-
|
|
312
|
-
try {
|
|
313
|
-
validateSuggestionInput(req.body);
|
|
314
|
-
} catch (error) {
|
|
315
|
-
if (error instanceof SuggestionValidationError) return badRequest(error.message);
|
|
316
|
-
throw error;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
try {
|
|
320
|
-
const body = req.body as { goalPrompt: string; count?: number };
|
|
321
|
-
const suggestions = await generateMilestoneSuggestions(
|
|
322
|
-
body.goalPrompt,
|
|
323
|
-
body.count,
|
|
324
|
-
ctx.taskStore.getRootDir(),
|
|
325
|
-
undefined,
|
|
326
|
-
undefined,
|
|
327
|
-
ctx.createAiSession,
|
|
328
|
-
);
|
|
329
|
-
return { suggestions };
|
|
330
|
-
} catch (error) {
|
|
331
|
-
if (error instanceof SuggestionParseError) return serverError(error.message);
|
|
332
|
-
if (error instanceof SuggestionServiceUnavailableError) {
|
|
333
|
-
return { status: 503, body: { error: error.message } };
|
|
334
|
-
}
|
|
335
|
-
throw error;
|
|
336
|
-
}
|
|
337
|
-
}),
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
method: "POST",
|
|
341
|
-
path: "/roadmaps/milestones/:milestoneId/suggestions/features",
|
|
342
|
-
handler: routeHandler(async (req, ctx, roadmapStore) => {
|
|
343
|
-
const milestone = roadmapStore.getMilestone(paramValue(req.params.milestoneId));
|
|
344
|
-
if (!milestone) return notFound(`Milestone ${paramValue(req.params.milestoneId)} not found`);
|
|
345
|
-
const roadmap = roadmapStore.getRoadmap(milestone.roadmapId);
|
|
346
|
-
if (!roadmap) return notFound(`Roadmap ${milestone.roadmapId} not found`);
|
|
347
|
-
|
|
348
|
-
try {
|
|
349
|
-
validateFeatureSuggestionInput(req.body);
|
|
350
|
-
} catch (error) {
|
|
351
|
-
if (error instanceof SuggestionValidationError) return badRequest(error.message);
|
|
352
|
-
throw error;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
try {
|
|
356
|
-
const body = req.body as { prompt?: string; count?: number };
|
|
357
|
-
const suggestions = await generateFeatureSuggestions(
|
|
358
|
-
{
|
|
359
|
-
roadmapTitle: roadmap.title,
|
|
360
|
-
roadmapDescription: roadmap.description,
|
|
361
|
-
milestoneTitle: milestone.title,
|
|
362
|
-
milestoneDescription: milestone.description,
|
|
363
|
-
existingFeatureTitles: roadmapStore.listFeatures(milestone.id).map((feature) => feature.title),
|
|
364
|
-
},
|
|
365
|
-
body.count,
|
|
366
|
-
body.prompt,
|
|
367
|
-
ctx.taskStore.getRootDir(),
|
|
368
|
-
undefined,
|
|
369
|
-
undefined,
|
|
370
|
-
ctx.createAiSession,
|
|
371
|
-
);
|
|
372
|
-
return { suggestions };
|
|
373
|
-
} catch (error) {
|
|
374
|
-
if (error instanceof SuggestionParseError) return serverError(error.message);
|
|
375
|
-
if (error instanceof SuggestionServiceUnavailableError) {
|
|
376
|
-
return { status: 503, body: { error: error.message } };
|
|
377
|
-
}
|
|
378
|
-
throw error;
|
|
379
|
-
}
|
|
380
|
-
}),
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
method: "GET",
|
|
384
|
-
path: "/roadmaps/:roadmapId/export",
|
|
385
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getRoadmapExport(paramValue(req.params.roadmapId))),
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
method: "GET",
|
|
389
|
-
path: "/roadmaps/:roadmapId/handoff",
|
|
390
|
-
handler: routeHandler((req, _ctx, roadmapStore) => ({
|
|
391
|
-
mission: roadmapStore.getMissionPlanningHandoff(paramValue(req.params.roadmapId)),
|
|
392
|
-
features: roadmapStore.listFeatureTaskPlanningHandoffs(paramValue(req.params.roadmapId)),
|
|
393
|
-
})),
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
method: "GET",
|
|
397
|
-
path: "/roadmaps/:roadmapId/handoff/mission",
|
|
398
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getMissionPlanningHandoff(paramValue(req.params.roadmapId))),
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
method: "GET",
|
|
402
|
-
path: "/roadmaps/:roadmapId/milestones/:milestoneId/features/:featureId/handoff/task",
|
|
403
|
-
handler: routeHandler((req, _ctx, roadmapStore) => roadmapStore.getRoadmapFeatureHandoff(paramValue(req.params.roadmapId), paramValue(req.params.milestoneId), paramValue(req.params.featureId))),
|
|
404
|
-
},
|
|
405
|
-
];
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export { SUGGESTION_TIMEOUT_MS };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { CreateAiSessionFactory } from "@fusion/core";
|
|
2
|
-
type LegacyCreateFnAgent = (options: {
|
|
3
|
-
cwd: string;
|
|
4
|
-
systemPrompt: string;
|
|
5
|
-
tools?: "coding" | "readonly";
|
|
6
|
-
defaultProvider?: string;
|
|
7
|
-
defaultModelId?: string;
|
|
8
|
-
onThinking?: () => void;
|
|
9
|
-
onText?: () => void;
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
session: {
|
|
12
|
-
prompt(text: string): Promise<void>;
|
|
13
|
-
state: {
|
|
14
|
-
messages: Array<{
|
|
15
|
-
role: string;
|
|
16
|
-
content?: string | Array<{
|
|
17
|
-
type: string;
|
|
18
|
-
text: string;
|
|
19
|
-
}>;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
dispose?: () => void;
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
25
|
-
export interface GenerateMilestoneSuggestionsInput {
|
|
26
|
-
goalPrompt: string;
|
|
27
|
-
count?: number;
|
|
28
|
-
}
|
|
29
|
-
export interface MilestoneSuggestion {
|
|
30
|
-
title: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare const MILESTONE_SUGGESTION_SYSTEM_PROMPT = "You are a milestone planning assistant for a product roadmap system.\n\nYour job is to suggest logical milestones that would help achieve a user's roadmap goal.\n\n## Guidelines\n\n1. **Think about phases**: Break the goal into logical phases\n2. **Use clear titles**: Milestone titles should be concise and descriptive\n3. **Add context**: Include a brief description explaining what this milestone encompasses\n4. **Order matters**: List milestones in the order they should be completed\n5. **Realistic scope**: Each milestone should be achievable in 2-4 weeks\n\n## Output Format\n\nRespond with ONLY a valid JSON array of milestone suggestions.";
|
|
34
|
-
export declare const SUGGESTION_TIMEOUT_MS = 120000;
|
|
35
|
-
export declare function validateSuggestionInput(input: unknown): asserts input is GenerateMilestoneSuggestionsInput;
|
|
36
|
-
export declare function generateMilestoneSuggestions(goalPrompt: string, count?: number, rootDir?: string, modelProvider?: string, modelId?: string, createAiSession?: CreateAiSessionFactory): Promise<MilestoneSuggestion[]>;
|
|
37
|
-
export interface GenerateFeatureSuggestionsInput {
|
|
38
|
-
prompt?: string;
|
|
39
|
-
count?: number;
|
|
40
|
-
}
|
|
41
|
-
export interface FeatureSuggestion {
|
|
42
|
-
title: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface FeatureSuggestionContext {
|
|
46
|
-
roadmapTitle: string;
|
|
47
|
-
roadmapDescription?: string;
|
|
48
|
-
milestoneTitle: string;
|
|
49
|
-
milestoneDescription?: string;
|
|
50
|
-
existingFeatureTitles: string[];
|
|
51
|
-
}
|
|
52
|
-
export declare const FEATURE_SUGGESTION_SYSTEM_PROMPT = "You are a feature planning assistant for a product roadmap system.";
|
|
53
|
-
export declare function validateFeatureSuggestionInput(input: unknown): asserts input is GenerateFeatureSuggestionsInput;
|
|
54
|
-
export declare function generateFeatureSuggestions(context: FeatureSuggestionContext, count?: number, prompt?: string, rootDir?: string, modelProvider?: string, modelId?: string, createAiSession?: CreateAiSessionFactory): Promise<FeatureSuggestion[]>;
|
|
55
|
-
export declare class ValidationError extends Error {
|
|
56
|
-
constructor(message: string);
|
|
57
|
-
}
|
|
58
|
-
export declare class ParseError extends Error {
|
|
59
|
-
constructor(message: string);
|
|
60
|
-
}
|
|
61
|
-
export declare class ServiceUnavailableError extends Error {
|
|
62
|
-
constructor(message: string);
|
|
63
|
-
}
|
|
64
|
-
export declare function __resetSuggestionState(): void;
|
|
65
|
-
export declare function __setCreateFnAgent(mock: LegacyCreateFnAgent | undefined): void;
|
|
66
|
-
export declare function __setCreateAiSessionFactory(mock: CreateAiSessionFactory | undefined): void;
|
|
67
|
-
export {};
|
|
68
|
-
//# sourceMappingURL=roadmap-suggestions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roadmap-suggestions.d.ts","sourceRoot":"","sources":["roadmap-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,KAAK,OAAO,CAAC;IACZ,OAAO,EAAE;QACP,MAAM,C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