@ourroadmaps/mcp 0.1.0 → 0.3.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/dist/index.js +1181 -120
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -19504,7 +19504,6 @@ class StdioServerTransport {
|
|
|
19504
19504
|
});
|
|
19505
19505
|
}
|
|
19506
19506
|
}
|
|
19507
|
-
|
|
19508
19507
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
19509
19508
|
var exports_external = {};
|
|
19510
19509
|
__export(exports_external, {
|
|
@@ -23478,6 +23477,340 @@ var coerce = {
|
|
|
23478
23477
|
date: (arg) => ZodDate2.create({ ...arg, coerce: true })
|
|
23479
23478
|
};
|
|
23480
23479
|
var NEVER2 = INVALID2;
|
|
23480
|
+
// ../../packages/shared/src/schemas/constants.ts
|
|
23481
|
+
var HORIZONS = [
|
|
23482
|
+
"inbox",
|
|
23483
|
+
"now",
|
|
23484
|
+
"next",
|
|
23485
|
+
"later",
|
|
23486
|
+
"someday",
|
|
23487
|
+
"icebox",
|
|
23488
|
+
"done",
|
|
23489
|
+
"cancelled"
|
|
23490
|
+
];
|
|
23491
|
+
var horizonSchema = exports_external.enum(HORIZONS);
|
|
23492
|
+
var ROADMAP_STATUSES = [
|
|
23493
|
+
"not_started",
|
|
23494
|
+
"planning",
|
|
23495
|
+
"needs_review",
|
|
23496
|
+
"approved",
|
|
23497
|
+
"in_progress",
|
|
23498
|
+
"done",
|
|
23499
|
+
"cancelled"
|
|
23500
|
+
];
|
|
23501
|
+
var roadmapStatusSchema = exports_external.enum(ROADMAP_STATUSES);
|
|
23502
|
+
var EFFORT_SIZES = ["xs", "s", "m", "l", "xl"];
|
|
23503
|
+
var effortSchema = exports_external.enum(EFFORT_SIZES);
|
|
23504
|
+
var DATE_GRANULARITIES = ["day", "month", "quarter", "half-year", "year"];
|
|
23505
|
+
var dateGranularitySchema = exports_external.enum(DATE_GRANULARITIES);
|
|
23506
|
+
var PRD_STATUSES = ["draft", "completed"];
|
|
23507
|
+
var prdStatusSchema = exports_external.enum(PRD_STATUSES);
|
|
23508
|
+
var IDEA_STATUSES = ["new", "under-review", "planned", "declined", "done"];
|
|
23509
|
+
var ideaStatusSchema = exports_external.enum(IDEA_STATUSES);
|
|
23510
|
+
var FEATURE_TYPES = ["area", "feature"];
|
|
23511
|
+
var featureTypeSchema = exports_external.enum(FEATURE_TYPES);
|
|
23512
|
+
var PRODUCT_TYPES = [
|
|
23513
|
+
"brand",
|
|
23514
|
+
"product",
|
|
23515
|
+
"app",
|
|
23516
|
+
"marketing_site",
|
|
23517
|
+
"landing_page",
|
|
23518
|
+
"service"
|
|
23519
|
+
];
|
|
23520
|
+
var productTypeSchema = exports_external.enum(PRODUCT_TYPES);
|
|
23521
|
+
var AUDIENCE_TYPES = ["stakeholder", "user_persona"];
|
|
23522
|
+
var audienceTypeSchema = exports_external.enum(AUDIENCE_TYPES);
|
|
23523
|
+
var BRAINSTORM_MEDIA_TYPES = ["image", "video"];
|
|
23524
|
+
var brainstormMediaTypeSchema = exports_external.enum(BRAINSTORM_MEDIA_TYPES);
|
|
23525
|
+
|
|
23526
|
+
// ../../packages/shared/src/schemas/audience.ts
|
|
23527
|
+
var audienceSchema = exports_external.object({
|
|
23528
|
+
id: exports_external.string().uuid(),
|
|
23529
|
+
organizationId: exports_external.string(),
|
|
23530
|
+
type: audienceTypeSchema,
|
|
23531
|
+
role: exports_external.string().nullable(),
|
|
23532
|
+
likes: exports_external.string().nullable(),
|
|
23533
|
+
dislikes: exports_external.string().nullable(),
|
|
23534
|
+
priorities: exports_external.string().nullable(),
|
|
23535
|
+
order: exports_external.number().int(),
|
|
23536
|
+
deletedAt: exports_external.string().nullable(),
|
|
23537
|
+
createdAt: exports_external.string()
|
|
23538
|
+
});
|
|
23539
|
+
var createAudienceSchema = exports_external.object({
|
|
23540
|
+
type: audienceTypeSchema,
|
|
23541
|
+
role: exports_external.string().min(1),
|
|
23542
|
+
likes: exports_external.string().nullable().optional(),
|
|
23543
|
+
dislikes: exports_external.string().nullable().optional(),
|
|
23544
|
+
priorities: exports_external.string().nullable().optional()
|
|
23545
|
+
});
|
|
23546
|
+
var updateAudienceSchema = exports_external.object({
|
|
23547
|
+
type: audienceTypeSchema.optional(),
|
|
23548
|
+
role: exports_external.string().min(1).optional(),
|
|
23549
|
+
likes: exports_external.string().nullable().optional(),
|
|
23550
|
+
dislikes: exports_external.string().nullable().optional(),
|
|
23551
|
+
priorities: exports_external.string().nullable().optional(),
|
|
23552
|
+
order: exports_external.number().int().optional()
|
|
23553
|
+
});
|
|
23554
|
+
var audienceListSchema = exports_external.array(audienceSchema);
|
|
23555
|
+
// ../../packages/shared/src/schemas/context.ts
|
|
23556
|
+
var domainContextSchema = exports_external.object({
|
|
23557
|
+
definitions: exports_external.record(exports_external.string(), exports_external.string()),
|
|
23558
|
+
schemas: exports_external.record(exports_external.string(), exports_external.array(exports_external.string()))
|
|
23559
|
+
});
|
|
23560
|
+
// ../../packages/shared/src/schemas/feature.ts
|
|
23561
|
+
var featureOutcomeSchema = exports_external.object({
|
|
23562
|
+
id: exports_external.string().uuid(),
|
|
23563
|
+
description: exports_external.string(),
|
|
23564
|
+
order: exports_external.number().int(),
|
|
23565
|
+
createdAt: exports_external.string(),
|
|
23566
|
+
updatedAt: exports_external.string()
|
|
23567
|
+
});
|
|
23568
|
+
var featureSchema = exports_external.object({
|
|
23569
|
+
id: exports_external.string().uuid(),
|
|
23570
|
+
organizationId: exports_external.string(),
|
|
23571
|
+
type: featureTypeSchema,
|
|
23572
|
+
name: exports_external.string(),
|
|
23573
|
+
parentId: exports_external.string().uuid().nullable(),
|
|
23574
|
+
order: exports_external.number().int(),
|
|
23575
|
+
isExpanded: exports_external.boolean(),
|
|
23576
|
+
deletedAt: exports_external.string().nullable(),
|
|
23577
|
+
createdAt: exports_external.string(),
|
|
23578
|
+
createdBy: exports_external.string()
|
|
23579
|
+
});
|
|
23580
|
+
var roadmapLinkSchema = exports_external.object({
|
|
23581
|
+
id: exports_external.string().uuid(),
|
|
23582
|
+
roadmapId: exports_external.string().uuid(),
|
|
23583
|
+
roadmap: exports_external.object({
|
|
23584
|
+
id: exports_external.string().uuid(),
|
|
23585
|
+
title: exports_external.string(),
|
|
23586
|
+
status: exports_external.string(),
|
|
23587
|
+
horizon: exports_external.string()
|
|
23588
|
+
}),
|
|
23589
|
+
createdAt: exports_external.string()
|
|
23590
|
+
});
|
|
23591
|
+
var featureWithRelationsSchema = featureSchema.extend({
|
|
23592
|
+
outcomes: exports_external.array(featureOutcomeSchema),
|
|
23593
|
+
roadmapLinks: exports_external.array(roadmapLinkSchema),
|
|
23594
|
+
children: exports_external.array(featureSchema).optional()
|
|
23595
|
+
});
|
|
23596
|
+
var createFeatureSchema = exports_external.object({
|
|
23597
|
+
name: exports_external.string().min(1),
|
|
23598
|
+
description: exports_external.string().nullable().optional(),
|
|
23599
|
+
type: featureTypeSchema.optional(),
|
|
23600
|
+
parentId: exports_external.string().uuid().nullable().optional()
|
|
23601
|
+
});
|
|
23602
|
+
var updateFeatureSchema = exports_external.object({
|
|
23603
|
+
name: exports_external.string().min(1).optional(),
|
|
23604
|
+
description: exports_external.string().nullable().optional(),
|
|
23605
|
+
type: featureTypeSchema.optional(),
|
|
23606
|
+
parentId: exports_external.string().uuid().nullable().optional(),
|
|
23607
|
+
order: exports_external.number().int().optional()
|
|
23608
|
+
});
|
|
23609
|
+
var saveFeatureOutcomesSchema = exports_external.object({
|
|
23610
|
+
outcomes: exports_external.array(exports_external.object({
|
|
23611
|
+
id: exports_external.string().uuid().optional(),
|
|
23612
|
+
description: exports_external.string()
|
|
23613
|
+
}))
|
|
23614
|
+
});
|
|
23615
|
+
var featureListSchema = exports_external.array(featureSchema);
|
|
23616
|
+
// ../../packages/shared/src/schemas/idea.ts
|
|
23617
|
+
var ideaSchema = exports_external.object({
|
|
23618
|
+
id: exports_external.string().uuid(),
|
|
23619
|
+
organizationId: exports_external.string(),
|
|
23620
|
+
title: exports_external.string(),
|
|
23621
|
+
description: exports_external.string().nullable(),
|
|
23622
|
+
status: ideaStatusSchema,
|
|
23623
|
+
source: exports_external.string().nullable(),
|
|
23624
|
+
submittedBy: exports_external.string().nullable(),
|
|
23625
|
+
value: effortSchema.nullable(),
|
|
23626
|
+
effort: effortSchema.nullable(),
|
|
23627
|
+
order: exports_external.number().int(),
|
|
23628
|
+
createdAt: exports_external.string(),
|
|
23629
|
+
createdBy: exports_external.string()
|
|
23630
|
+
});
|
|
23631
|
+
var createIdeaSchema = exports_external.object({
|
|
23632
|
+
title: exports_external.string().min(1),
|
|
23633
|
+
description: exports_external.string().nullable().optional(),
|
|
23634
|
+
status: ideaStatusSchema.optional(),
|
|
23635
|
+
effort: effortSchema.nullable().optional(),
|
|
23636
|
+
source: exports_external.string().nullable().optional()
|
|
23637
|
+
});
|
|
23638
|
+
var updateIdeaSchema = exports_external.object({
|
|
23639
|
+
title: exports_external.string().min(1).optional(),
|
|
23640
|
+
description: exports_external.string().nullable().optional(),
|
|
23641
|
+
status: ideaStatusSchema.optional(),
|
|
23642
|
+
effort: effortSchema.nullable().optional(),
|
|
23643
|
+
source: exports_external.string().nullable().optional(),
|
|
23644
|
+
order: exports_external.number().int().optional()
|
|
23645
|
+
});
|
|
23646
|
+
var ideaListSchema = exports_external.array(ideaSchema);
|
|
23647
|
+
// ../../packages/shared/src/schemas/product.ts
|
|
23648
|
+
var productSchema = exports_external.object({
|
|
23649
|
+
id: exports_external.string().uuid(),
|
|
23650
|
+
organizationId: exports_external.string(),
|
|
23651
|
+
parentId: exports_external.string().uuid().nullable(),
|
|
23652
|
+
type: productTypeSchema,
|
|
23653
|
+
name: exports_external.string(),
|
|
23654
|
+
order: exports_external.number().int(),
|
|
23655
|
+
isExpanded: exports_external.boolean(),
|
|
23656
|
+
deletedAt: exports_external.string().nullable(),
|
|
23657
|
+
createdAt: exports_external.string()
|
|
23658
|
+
});
|
|
23659
|
+
var createProductSchema = exports_external.object({
|
|
23660
|
+
name: exports_external.string().min(1),
|
|
23661
|
+
description: exports_external.string().nullable().optional(),
|
|
23662
|
+
type: productTypeSchema,
|
|
23663
|
+
parentId: exports_external.string().uuid().nullable().optional()
|
|
23664
|
+
});
|
|
23665
|
+
var updateProductSchema = exports_external.object({
|
|
23666
|
+
name: exports_external.string().min(1).optional(),
|
|
23667
|
+
description: exports_external.string().nullable().optional(),
|
|
23668
|
+
type: productTypeSchema.optional(),
|
|
23669
|
+
parentId: exports_external.string().uuid().nullable().optional(),
|
|
23670
|
+
order: exports_external.number().int().optional()
|
|
23671
|
+
});
|
|
23672
|
+
var productListSchema = exports_external.array(productSchema);
|
|
23673
|
+
// ../../packages/shared/src/schemas/roadmap.ts
|
|
23674
|
+
var flexibleDateSchema = exports_external.object({
|
|
23675
|
+
value: exports_external.string(),
|
|
23676
|
+
granularity: dateGranularitySchema
|
|
23677
|
+
});
|
|
23678
|
+
var labelSchema = exports_external.object({
|
|
23679
|
+
id: exports_external.string().uuid(),
|
|
23680
|
+
type: exports_external.enum(["category", "location", "label"]),
|
|
23681
|
+
name: exports_external.string(),
|
|
23682
|
+
color: exports_external.string().nullable(),
|
|
23683
|
+
address: exports_external.string().nullable()
|
|
23684
|
+
});
|
|
23685
|
+
var appSchema = exports_external.object({
|
|
23686
|
+
id: exports_external.string().uuid(),
|
|
23687
|
+
name: exports_external.string()
|
|
23688
|
+
});
|
|
23689
|
+
var roadmapSchema = exports_external.object({
|
|
23690
|
+
id: exports_external.string().uuid(),
|
|
23691
|
+
organizationId: exports_external.string(),
|
|
23692
|
+
title: exports_external.string(),
|
|
23693
|
+
horizon: horizonSchema.nullable(),
|
|
23694
|
+
status: roadmapStatusSchema.nullable(),
|
|
23695
|
+
value: effortSchema.nullable(),
|
|
23696
|
+
effort: effortSchema.nullable(),
|
|
23697
|
+
order: exports_external.number().int(),
|
|
23698
|
+
estimatedSeconds: exports_external.number().int().nullable(),
|
|
23699
|
+
date: flexibleDateSchema.nullable(),
|
|
23700
|
+
target: flexibleDateSchema.nullable(),
|
|
23701
|
+
completedAt: exports_external.string().nullable(),
|
|
23702
|
+
createdAt: exports_external.string(),
|
|
23703
|
+
createdBy: exports_external.string(),
|
|
23704
|
+
prompt: exports_external.string().nullable(),
|
|
23705
|
+
labels: exports_external.array(labelSchema),
|
|
23706
|
+
apps: exports_external.array(appSchema)
|
|
23707
|
+
});
|
|
23708
|
+
var createRoadmapSchema = exports_external.object({
|
|
23709
|
+
title: exports_external.string().min(1),
|
|
23710
|
+
status: roadmapStatusSchema.optional(),
|
|
23711
|
+
horizon: horizonSchema.optional(),
|
|
23712
|
+
value: effortSchema.nullable().optional(),
|
|
23713
|
+
effort: effortSchema.nullable().optional(),
|
|
23714
|
+
estimatedSeconds: exports_external.number().int().nullable().optional(),
|
|
23715
|
+
date: flexibleDateSchema.nullable().optional(),
|
|
23716
|
+
target: flexibleDateSchema.nullable().optional(),
|
|
23717
|
+
prompt: exports_external.string().nullable().optional(),
|
|
23718
|
+
brainstormNotes: exports_external.string().nullable().optional()
|
|
23719
|
+
});
|
|
23720
|
+
var updateRoadmapSchema = exports_external.object({
|
|
23721
|
+
title: exports_external.string().min(1).optional(),
|
|
23722
|
+
status: roadmapStatusSchema.optional(),
|
|
23723
|
+
horizon: horizonSchema.optional(),
|
|
23724
|
+
value: effortSchema.nullable().optional(),
|
|
23725
|
+
effort: effortSchema.nullable().optional(),
|
|
23726
|
+
order: exports_external.number().int().optional(),
|
|
23727
|
+
estimatedSeconds: exports_external.number().int().nullable().optional(),
|
|
23728
|
+
date: flexibleDateSchema.nullable().optional(),
|
|
23729
|
+
target: flexibleDateSchema.nullable().optional(),
|
|
23730
|
+
prompt: exports_external.string().nullable().optional(),
|
|
23731
|
+
brainstormNotes: exports_external.string().nullable().optional()
|
|
23732
|
+
});
|
|
23733
|
+
var prdOutcomeSchema = exports_external.object({
|
|
23734
|
+
id: exports_external.string().uuid(),
|
|
23735
|
+
description: exports_external.string(),
|
|
23736
|
+
status: prdStatusSchema,
|
|
23737
|
+
order: exports_external.number().int(),
|
|
23738
|
+
completedAt: exports_external.string().nullable()
|
|
23739
|
+
});
|
|
23740
|
+
var prdSchema = exports_external.object({
|
|
23741
|
+
id: exports_external.string().uuid(),
|
|
23742
|
+
what: exports_external.string().nullable(),
|
|
23743
|
+
why: exports_external.string().nullable(),
|
|
23744
|
+
outcomes: exports_external.array(prdOutcomeSchema)
|
|
23745
|
+
});
|
|
23746
|
+
var savePrdInputSchema = exports_external.object({
|
|
23747
|
+
what: exports_external.string().nullable(),
|
|
23748
|
+
why: exports_external.string().nullable(),
|
|
23749
|
+
status: prdStatusSchema,
|
|
23750
|
+
outcomes: exports_external.array(exports_external.object({
|
|
23751
|
+
id: exports_external.string().uuid().optional(),
|
|
23752
|
+
description: exports_external.string(),
|
|
23753
|
+
order: exports_external.number().int().min(0)
|
|
23754
|
+
}))
|
|
23755
|
+
});
|
|
23756
|
+
var brainstormMediaSchema = exports_external.object({
|
|
23757
|
+
id: exports_external.string().uuid(),
|
|
23758
|
+
mediaUrl: exports_external.string(),
|
|
23759
|
+
mediaType: brainstormMediaTypeSchema,
|
|
23760
|
+
description: exports_external.string().nullable(),
|
|
23761
|
+
order: exports_external.number().int(),
|
|
23762
|
+
createdAt: exports_external.string()
|
|
23763
|
+
});
|
|
23764
|
+
var wireframeSchema = exports_external.object({
|
|
23765
|
+
id: exports_external.string().uuid(),
|
|
23766
|
+
description: exports_external.string().nullable(),
|
|
23767
|
+
imageUrl: exports_external.string().nullable(),
|
|
23768
|
+
order: exports_external.number().int()
|
|
23769
|
+
});
|
|
23770
|
+
var featureLinkSchema = exports_external.object({
|
|
23771
|
+
id: exports_external.string().uuid(),
|
|
23772
|
+
featureId: exports_external.string().uuid(),
|
|
23773
|
+
feature: exports_external.object({
|
|
23774
|
+
id: exports_external.string().uuid(),
|
|
23775
|
+
name: exports_external.string(),
|
|
23776
|
+
type: exports_external.enum(["area", "feature"])
|
|
23777
|
+
}),
|
|
23778
|
+
createdAt: exports_external.string()
|
|
23779
|
+
});
|
|
23780
|
+
var roadmapDetailSchema = roadmapSchema.extend({
|
|
23781
|
+
prd: prdSchema.nullable(),
|
|
23782
|
+
wireframes: exports_external.array(wireframeSchema),
|
|
23783
|
+
brainstormMedia: exports_external.array(brainstormMediaSchema),
|
|
23784
|
+
brainstormNotes: exports_external.string().nullable(),
|
|
23785
|
+
featureLinks: exports_external.array(featureLinkSchema)
|
|
23786
|
+
});
|
|
23787
|
+
var roadmapListSchema = exports_external.array(roadmapSchema);
|
|
23788
|
+
// ../../packages/shared/src/schemas/scenario.ts
|
|
23789
|
+
var scenarioSchema = exports_external.object({
|
|
23790
|
+
id: exports_external.string().uuid(),
|
|
23791
|
+
title: exports_external.string().min(1),
|
|
23792
|
+
given: exports_external.string().nullable(),
|
|
23793
|
+
when: exports_external.string().nullable(),
|
|
23794
|
+
then: exports_external.string().nullable(),
|
|
23795
|
+
order: exports_external.number().int(),
|
|
23796
|
+
createdAt: exports_external.string().datetime(),
|
|
23797
|
+
updatedAt: exports_external.string().datetime()
|
|
23798
|
+
});
|
|
23799
|
+
var createScenarioSchema = exports_external.object({
|
|
23800
|
+
title: exports_external.string().min(1),
|
|
23801
|
+
given: exports_external.string().nullable().optional(),
|
|
23802
|
+
when: exports_external.string().nullable().optional(),
|
|
23803
|
+
then: exports_external.string().nullable().optional(),
|
|
23804
|
+
roadmapId: exports_external.string().uuid()
|
|
23805
|
+
});
|
|
23806
|
+
var updateScenarioSchema = exports_external.object({
|
|
23807
|
+
title: exports_external.string().min(1).optional(),
|
|
23808
|
+
given: exports_external.string().nullable().optional(),
|
|
23809
|
+
when: exports_external.string().nullable().optional(),
|
|
23810
|
+
then: exports_external.string().nullable().optional(),
|
|
23811
|
+
order: exports_external.number().int().optional()
|
|
23812
|
+
});
|
|
23813
|
+
var scenarioListSchema = exports_external.array(scenarioSchema);
|
|
23481
23814
|
// src/auth.ts
|
|
23482
23815
|
function getCredentials() {
|
|
23483
23816
|
const apiKey = process.env.ROADMAPS_API_KEY;
|
|
@@ -23541,6 +23874,11 @@ class ApiClient {
|
|
|
23541
23874
|
});
|
|
23542
23875
|
return response.data;
|
|
23543
23876
|
}
|
|
23877
|
+
async deleteRoadmap(id) {
|
|
23878
|
+
await this.request(`/v1/roadmaps/${id}`, {
|
|
23879
|
+
method: "DELETE"
|
|
23880
|
+
});
|
|
23881
|
+
}
|
|
23544
23882
|
async savePrd(roadmapId, data) {
|
|
23545
23883
|
const response = await this.request(`/v1/roadmaps/${roadmapId}/prd`, {
|
|
23546
23884
|
method: "POST",
|
|
@@ -23563,6 +23901,18 @@ class ApiClient {
|
|
|
23563
23901
|
});
|
|
23564
23902
|
return response.data;
|
|
23565
23903
|
}
|
|
23904
|
+
async updateFeature(id, data) {
|
|
23905
|
+
const response = await this.request(`/v1/features/${id}`, {
|
|
23906
|
+
method: "PATCH",
|
|
23907
|
+
body: JSON.stringify(data)
|
|
23908
|
+
});
|
|
23909
|
+
return response.data;
|
|
23910
|
+
}
|
|
23911
|
+
async deleteFeature(id) {
|
|
23912
|
+
await this.request(`/v1/features/${id}`, {
|
|
23913
|
+
method: "DELETE"
|
|
23914
|
+
});
|
|
23915
|
+
}
|
|
23566
23916
|
async addFeatureOutcome(featureId, content) {
|
|
23567
23917
|
await this.request(`/v1/features/${featureId}/outcomes`, {
|
|
23568
23918
|
method: "POST",
|
|
@@ -23590,14 +23940,99 @@ class ApiClient {
|
|
|
23590
23940
|
});
|
|
23591
23941
|
return response.data;
|
|
23592
23942
|
}
|
|
23943
|
+
async updateIdea(id, data) {
|
|
23944
|
+
const response = await this.request(`/v1/ideas/${id}`, {
|
|
23945
|
+
method: "PATCH",
|
|
23946
|
+
body: JSON.stringify(data)
|
|
23947
|
+
});
|
|
23948
|
+
return response.data;
|
|
23949
|
+
}
|
|
23950
|
+
async deleteIdea(id) {
|
|
23951
|
+
await this.request(`/v1/ideas/${id}`, {
|
|
23952
|
+
method: "DELETE"
|
|
23953
|
+
});
|
|
23954
|
+
}
|
|
23593
23955
|
async listProducts() {
|
|
23594
23956
|
const response = await this.request("/v1/products");
|
|
23595
23957
|
return response.data;
|
|
23596
23958
|
}
|
|
23959
|
+
async createProduct(data) {
|
|
23960
|
+
const response = await this.request("/v1/products", {
|
|
23961
|
+
method: "POST",
|
|
23962
|
+
body: JSON.stringify(data)
|
|
23963
|
+
});
|
|
23964
|
+
return response.data;
|
|
23965
|
+
}
|
|
23966
|
+
async updateProduct(id, data) {
|
|
23967
|
+
const response = await this.request(`/v1/products/${id}`, {
|
|
23968
|
+
method: "PATCH",
|
|
23969
|
+
body: JSON.stringify(data)
|
|
23970
|
+
});
|
|
23971
|
+
return response.data;
|
|
23972
|
+
}
|
|
23973
|
+
async deleteProduct(id) {
|
|
23974
|
+
const response = await this.request(`/v1/products/${id}`, {
|
|
23975
|
+
method: "DELETE"
|
|
23976
|
+
});
|
|
23977
|
+
return response.data;
|
|
23978
|
+
}
|
|
23597
23979
|
async listAudiences() {
|
|
23598
23980
|
const response = await this.request("/v1/audiences");
|
|
23599
23981
|
return response.data;
|
|
23600
23982
|
}
|
|
23983
|
+
async createAudience(data) {
|
|
23984
|
+
const response = await this.request("/v1/audiences", {
|
|
23985
|
+
method: "POST",
|
|
23986
|
+
body: JSON.stringify(data)
|
|
23987
|
+
});
|
|
23988
|
+
return response.data;
|
|
23989
|
+
}
|
|
23990
|
+
async updateAudience(id, data) {
|
|
23991
|
+
const response = await this.request(`/v1/audiences/${id}`, {
|
|
23992
|
+
method: "PATCH",
|
|
23993
|
+
body: JSON.stringify(data)
|
|
23994
|
+
});
|
|
23995
|
+
return response.data;
|
|
23996
|
+
}
|
|
23997
|
+
async deleteAudience(id) {
|
|
23998
|
+
await this.request(`/v1/audiences/${id}`, {
|
|
23999
|
+
method: "DELETE"
|
|
24000
|
+
});
|
|
24001
|
+
}
|
|
24002
|
+
async getStrategy() {
|
|
24003
|
+
const response = await this.request("/v1/strategy");
|
|
24004
|
+
return response.data;
|
|
24005
|
+
}
|
|
24006
|
+
async updateStrategy(data) {
|
|
24007
|
+
const response = await this.request("/v1/strategy", {
|
|
24008
|
+
method: "PATCH",
|
|
24009
|
+
body: JSON.stringify(data)
|
|
24010
|
+
});
|
|
24011
|
+
return response.data;
|
|
24012
|
+
}
|
|
24013
|
+
async listScenarios() {
|
|
24014
|
+
const response = await this.request("/v1/scenarios");
|
|
24015
|
+
return response.data;
|
|
24016
|
+
}
|
|
24017
|
+
async createScenario(data) {
|
|
24018
|
+
const response = await this.request("/v1/scenarios", {
|
|
24019
|
+
method: "POST",
|
|
24020
|
+
body: JSON.stringify(data)
|
|
24021
|
+
});
|
|
24022
|
+
return response.data;
|
|
24023
|
+
}
|
|
24024
|
+
async updateScenario(id, data) {
|
|
24025
|
+
const response = await this.request(`/v1/scenarios/${id}`, {
|
|
24026
|
+
method: "PATCH",
|
|
24027
|
+
body: JSON.stringify(data)
|
|
24028
|
+
});
|
|
24029
|
+
return response.data;
|
|
24030
|
+
}
|
|
24031
|
+
async deleteScenario(id) {
|
|
24032
|
+
await this.request(`/v1/scenarios/${id}`, {
|
|
24033
|
+
method: "DELETE"
|
|
24034
|
+
});
|
|
24035
|
+
}
|
|
23601
24036
|
}
|
|
23602
24037
|
var client = null;
|
|
23603
24038
|
function getApiClient() {
|
|
@@ -23615,27 +24050,49 @@ function registerAllTools(server) {
|
|
|
23615
24050
|
registerGetFeature(server);
|
|
23616
24051
|
registerSearchIdeas(server);
|
|
23617
24052
|
registerGetContext(server);
|
|
24053
|
+
registerGetStrategy(server);
|
|
24054
|
+
registerListScenarios(server);
|
|
23618
24055
|
registerCaptureIdea(server);
|
|
23619
24056
|
registerCreateRoadmapItem(server);
|
|
23620
24057
|
registerUpdateRoadmapItem(server);
|
|
24058
|
+
registerDeleteRoadmapItem(server);
|
|
23621
24059
|
registerAddFeature(server);
|
|
24060
|
+
registerUpdateFeature(server);
|
|
24061
|
+
registerDeleteFeature(server);
|
|
23622
24062
|
registerSavePrd(server);
|
|
23623
24063
|
registerUpdateBrainstormNotes(server);
|
|
24064
|
+
registerGetIdea(server);
|
|
24065
|
+
registerUpdateIdea(server);
|
|
24066
|
+
registerDeleteIdea(server);
|
|
24067
|
+
registerUpdateStrategy(server);
|
|
24068
|
+
registerCreateScenario(server);
|
|
24069
|
+
registerUpdateScenario(server);
|
|
24070
|
+
registerDeleteScenario(server);
|
|
24071
|
+
registerCreateProduct(server);
|
|
24072
|
+
registerUpdateProduct(server);
|
|
24073
|
+
registerDeleteProduct(server);
|
|
24074
|
+
registerCreateAudience(server);
|
|
24075
|
+
registerUpdateAudience(server);
|
|
24076
|
+
registerDeleteAudience(server);
|
|
23624
24077
|
}
|
|
23625
24078
|
function registerSearchRoadmaps(server) {
|
|
23626
24079
|
server.registerTool("search_roadmaps", {
|
|
23627
24080
|
description: "Search for roadmap items by title, status, or horizon. Returns a list of matching roadmap items with basic info.",
|
|
23628
24081
|
inputSchema: {
|
|
23629
24082
|
query: exports_external.string().optional().describe("Search query to match against title or description"),
|
|
23630
|
-
status:
|
|
23631
|
-
horizon:
|
|
23632
|
-
}
|
|
23633
|
-
}, async ({
|
|
24083
|
+
status: roadmapStatusSchema.optional().describe("Filter by status"),
|
|
24084
|
+
horizon: horizonSchema.optional().describe("Filter by planning horizon")
|
|
24085
|
+
}
|
|
24086
|
+
}, async ({
|
|
24087
|
+
query,
|
|
24088
|
+
status,
|
|
24089
|
+
horizon
|
|
24090
|
+
}) => {
|
|
23634
24091
|
const client2 = getApiClient();
|
|
23635
24092
|
let roadmaps = await client2.listRoadmaps();
|
|
23636
24093
|
if (query) {
|
|
23637
24094
|
const q = query.toLowerCase();
|
|
23638
|
-
roadmaps = roadmaps.filter((r) => r.title.toLowerCase().includes(q)
|
|
24095
|
+
roadmaps = roadmaps.filter((r) => r.title.toLowerCase().includes(q));
|
|
23639
24096
|
}
|
|
23640
24097
|
if (status) {
|
|
23641
24098
|
roadmaps = roadmaps.filter((r) => r.status === status);
|
|
@@ -23650,10 +24107,8 @@ function registerSearchRoadmaps(server) {
|
|
|
23650
24107
|
text: JSON.stringify(roadmaps.map((r) => ({
|
|
23651
24108
|
id: r.id,
|
|
23652
24109
|
title: r.title,
|
|
23653
|
-
description: r.description,
|
|
23654
24110
|
status: r.status,
|
|
23655
|
-
horizon: r.horizon
|
|
23656
|
-
commitment: r.commitment
|
|
24111
|
+
horizon: r.horizon
|
|
23657
24112
|
})), null, 2)
|
|
23658
24113
|
}
|
|
23659
24114
|
]
|
|
@@ -23668,38 +24123,36 @@ function registerGetRoadmap(server) {
|
|
|
23668
24123
|
}
|
|
23669
24124
|
}, async ({ id }) => {
|
|
23670
24125
|
const client2 = getApiClient();
|
|
23671
|
-
const
|
|
24126
|
+
const roadmap2 = await client2.getRoadmap(id);
|
|
23672
24127
|
return {
|
|
23673
24128
|
content: [
|
|
23674
24129
|
{
|
|
23675
24130
|
type: "text",
|
|
23676
24131
|
text: JSON.stringify({
|
|
23677
|
-
id:
|
|
23678
|
-
title:
|
|
23679
|
-
|
|
23680
|
-
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
brainstormNotes: roadmap.brainstormNotes,
|
|
23685
|
-
wireframes: roadmap.wireframes?.map((w) => ({
|
|
24132
|
+
id: roadmap2.id,
|
|
24133
|
+
title: roadmap2.title,
|
|
24134
|
+
status: roadmap2.status,
|
|
24135
|
+
horizon: roadmap2.horizon,
|
|
24136
|
+
prd: roadmap2.prd,
|
|
24137
|
+
brainstormNotes: roadmap2.brainstormNotes,
|
|
24138
|
+
wireframes: roadmap2.wireframes?.map((w) => ({
|
|
23686
24139
|
id: w.id,
|
|
23687
24140
|
imageUrl: w.imageUrl,
|
|
23688
24141
|
description: w.description
|
|
23689
24142
|
})),
|
|
23690
|
-
brainstormMedia:
|
|
24143
|
+
brainstormMedia: roadmap2.brainstormMedia?.map((m) => ({
|
|
23691
24144
|
id: m.id,
|
|
23692
|
-
|
|
23693
|
-
|
|
24145
|
+
url: m.mediaUrl,
|
|
24146
|
+
type: m.mediaType,
|
|
23694
24147
|
description: m.description
|
|
23695
24148
|
})),
|
|
23696
|
-
|
|
23697
|
-
|
|
23698
|
-
|
|
23699
|
-
|
|
24149
|
+
featureLinks: roadmap2.featureLinks?.map((l) => ({
|
|
24150
|
+
id: l.id,
|
|
24151
|
+
featureId: l.featureId,
|
|
24152
|
+
featureName: l.feature.name,
|
|
24153
|
+
featureType: l.feature.type
|
|
23700
24154
|
})),
|
|
23701
|
-
createdAt:
|
|
23702
|
-
updatedAt: roadmap.updatedAt
|
|
24155
|
+
createdAt: roadmap2.createdAt
|
|
23703
24156
|
}, null, 2)
|
|
23704
24157
|
}
|
|
23705
24158
|
]
|
|
@@ -23710,15 +24163,15 @@ function registerSearchFeatures(server) {
|
|
|
23710
24163
|
server.registerTool("search_features", {
|
|
23711
24164
|
description: "Search for features and feature areas by name. Returns a list of matching features with basic info.",
|
|
23712
24165
|
inputSchema: {
|
|
23713
|
-
query: exports_external.string().optional().describe("Search query to match against name
|
|
23714
|
-
type:
|
|
24166
|
+
query: exports_external.string().optional().describe("Search query to match against name"),
|
|
24167
|
+
type: featureTypeSchema.optional().describe("Filter by type (feature or area)")
|
|
23715
24168
|
}
|
|
23716
24169
|
}, async ({ query, type }) => {
|
|
23717
24170
|
const client2 = getApiClient();
|
|
23718
24171
|
let features = await client2.listFeatures();
|
|
23719
24172
|
if (query) {
|
|
23720
24173
|
const q = query.toLowerCase();
|
|
23721
|
-
features = features.filter((f) => f.name.toLowerCase().includes(q)
|
|
24174
|
+
features = features.filter((f) => f.name.toLowerCase().includes(q));
|
|
23722
24175
|
}
|
|
23723
24176
|
if (type) {
|
|
23724
24177
|
features = features.filter((f) => f.type === type);
|
|
@@ -23730,7 +24183,6 @@ function registerSearchFeatures(server) {
|
|
|
23730
24183
|
text: JSON.stringify(features.map((f) => ({
|
|
23731
24184
|
id: f.id,
|
|
23732
24185
|
name: f.name,
|
|
23733
|
-
description: f.description,
|
|
23734
24186
|
type: f.type,
|
|
23735
24187
|
parentId: f.parentId
|
|
23736
24188
|
})), null, 2)
|
|
@@ -23747,29 +24199,31 @@ function registerGetFeature(server) {
|
|
|
23747
24199
|
}
|
|
23748
24200
|
}, async ({ id }) => {
|
|
23749
24201
|
const client2 = getApiClient();
|
|
23750
|
-
const
|
|
24202
|
+
const feature2 = await client2.getFeature(id);
|
|
23751
24203
|
return {
|
|
23752
24204
|
content: [
|
|
23753
24205
|
{
|
|
23754
24206
|
type: "text",
|
|
23755
24207
|
text: JSON.stringify({
|
|
23756
|
-
id:
|
|
23757
|
-
name:
|
|
23758
|
-
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
outcomes: feature.outcomes?.map((o) => ({
|
|
24208
|
+
id: feature2.id,
|
|
24209
|
+
name: feature2.name,
|
|
24210
|
+
type: feature2.type,
|
|
24211
|
+
parentId: feature2.parentId,
|
|
24212
|
+
outcomes: feature2.outcomes?.map((o) => ({
|
|
23762
24213
|
id: o.id,
|
|
23763
|
-
|
|
24214
|
+
description: o.description
|
|
23764
24215
|
})),
|
|
23765
|
-
children:
|
|
24216
|
+
children: feature2.children?.map((c) => ({
|
|
23766
24217
|
id: c.id,
|
|
23767
24218
|
name: c.name,
|
|
23768
24219
|
type: c.type
|
|
23769
24220
|
})),
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
|
|
24221
|
+
roadmapLinks: feature2.roadmapLinks?.map((l) => ({
|
|
24222
|
+
id: l.id,
|
|
24223
|
+
roadmapId: l.roadmapId,
|
|
24224
|
+
roadmapTitle: l.roadmap.title
|
|
24225
|
+
})),
|
|
24226
|
+
createdAt: feature2.createdAt
|
|
23773
24227
|
}, null, 2)
|
|
23774
24228
|
}
|
|
23775
24229
|
]
|
|
@@ -23781,7 +24235,7 @@ function registerSearchIdeas(server) {
|
|
|
23781
24235
|
description: "Search for ideas by title or status. Returns a list of matching ideas with basic info.",
|
|
23782
24236
|
inputSchema: {
|
|
23783
24237
|
query: exports_external.string().optional().describe("Search query to match against title or description"),
|
|
23784
|
-
status:
|
|
24238
|
+
status: ideaStatusSchema.optional().describe("Filter by status")
|
|
23785
24239
|
}
|
|
23786
24240
|
}, async ({ query, status }) => {
|
|
23787
24241
|
const client2 = getApiClient();
|
|
@@ -23811,29 +24265,67 @@ function registerSearchIdeas(server) {
|
|
|
23811
24265
|
}
|
|
23812
24266
|
function registerGetContext(server) {
|
|
23813
24267
|
server.registerTool("get_context", {
|
|
23814
|
-
description:
|
|
24268
|
+
description: `Get comprehensive organizational context in a single call. Returns:
|
|
24269
|
+
- Strategy: Vision and mission statements that guide product direction
|
|
24270
|
+
- Products: What the organization builds (brands, products, apps, services) with hierarchy
|
|
24271
|
+
- Audiences: Who the product serves (stakeholders and user personas) with their preferences
|
|
24272
|
+
- Scenarios: User workflows and how they accomplish goals
|
|
24273
|
+
- Roadmap Summary: Count of items by status and horizon for planning overview
|
|
24274
|
+
|
|
24275
|
+
Use this as your FIRST call when starting work on a roadmap to understand the full context.`,
|
|
23815
24276
|
inputSchema: {}
|
|
23816
24277
|
}, async () => {
|
|
23817
24278
|
const client2 = getApiClient();
|
|
23818
|
-
const [products, audiences] = await Promise.all([
|
|
24279
|
+
const [strategy, products, audiences, scenarios, roadmaps] = await Promise.all([
|
|
24280
|
+
client2.getStrategy(),
|
|
23819
24281
|
client2.listProducts(),
|
|
23820
|
-
client2.listAudiences()
|
|
24282
|
+
client2.listAudiences(),
|
|
24283
|
+
client2.listScenarios(),
|
|
24284
|
+
client2.listRoadmaps()
|
|
23821
24285
|
]);
|
|
24286
|
+
const statusCounts = {};
|
|
24287
|
+
const horizonCounts = {};
|
|
24288
|
+
for (const r of roadmaps) {
|
|
24289
|
+
const status = r.status ?? "unknown";
|
|
24290
|
+
const horizon = r.horizon ?? "unknown";
|
|
24291
|
+
statusCounts[status] = (statusCounts[status] || 0) + 1;
|
|
24292
|
+
horizonCounts[horizon] = (horizonCounts[horizon] || 0) + 1;
|
|
24293
|
+
}
|
|
23822
24294
|
return {
|
|
23823
24295
|
content: [
|
|
23824
24296
|
{
|
|
23825
24297
|
type: "text",
|
|
23826
24298
|
text: JSON.stringify({
|
|
24299
|
+
strategy: {
|
|
24300
|
+
vision: strategy.vision,
|
|
24301
|
+
mission: strategy.mission
|
|
24302
|
+
},
|
|
23827
24303
|
products: products.map((p) => ({
|
|
23828
24304
|
id: p.id,
|
|
24305
|
+
type: p.type,
|
|
23829
24306
|
name: p.name,
|
|
23830
|
-
|
|
24307
|
+
parentId: p.parentId
|
|
23831
24308
|
})),
|
|
23832
24309
|
audiences: audiences.map((a) => ({
|
|
23833
24310
|
id: a.id,
|
|
23834
|
-
|
|
23835
|
-
|
|
23836
|
-
|
|
24311
|
+
type: a.type,
|
|
24312
|
+
role: a.role,
|
|
24313
|
+
likes: a.likes,
|
|
24314
|
+
dislikes: a.dislikes,
|
|
24315
|
+
priorities: a.priorities
|
|
24316
|
+
})),
|
|
24317
|
+
scenarios: scenarios.map((s) => ({
|
|
24318
|
+
id: s.id,
|
|
24319
|
+
title: s.title,
|
|
24320
|
+
given: s.given,
|
|
24321
|
+
when: s.when,
|
|
24322
|
+
then: s.then
|
|
24323
|
+
})),
|
|
24324
|
+
roadmapSummary: {
|
|
24325
|
+
total: roadmaps.length,
|
|
24326
|
+
byStatus: statusCounts,
|
|
24327
|
+
byHorizon: horizonCounts
|
|
24328
|
+
}
|
|
23837
24329
|
}, null, 2)
|
|
23838
24330
|
}
|
|
23839
24331
|
]
|
|
@@ -23848,12 +24340,16 @@ function registerCaptureIdea(server) {
|
|
|
23848
24340
|
description: exports_external.string().optional().describe("Detailed description of the idea"),
|
|
23849
24341
|
source: exports_external.string().optional().describe('Source of the idea (defaults to "claude-code")')
|
|
23850
24342
|
}
|
|
23851
|
-
}, async ({
|
|
24343
|
+
}, async ({
|
|
24344
|
+
title,
|
|
24345
|
+
description,
|
|
24346
|
+
source
|
|
24347
|
+
}) => {
|
|
23852
24348
|
const client2 = getApiClient();
|
|
23853
|
-
const
|
|
24349
|
+
const idea2 = await client2.createIdea({
|
|
23854
24350
|
title,
|
|
23855
|
-
description,
|
|
23856
|
-
source: source
|
|
24351
|
+
description: description ?? null,
|
|
24352
|
+
source: source ?? "claude-code",
|
|
23857
24353
|
status: "new"
|
|
23858
24354
|
});
|
|
23859
24355
|
return {
|
|
@@ -23863,11 +24359,11 @@ function registerCaptureIdea(server) {
|
|
|
23863
24359
|
text: JSON.stringify({
|
|
23864
24360
|
success: true,
|
|
23865
24361
|
idea: {
|
|
23866
|
-
id:
|
|
23867
|
-
title:
|
|
23868
|
-
description:
|
|
23869
|
-
status:
|
|
23870
|
-
source:
|
|
24362
|
+
id: idea2.id,
|
|
24363
|
+
title: idea2.title,
|
|
24364
|
+
description: idea2.description,
|
|
24365
|
+
status: idea2.status,
|
|
24366
|
+
source: idea2.source
|
|
23871
24367
|
}
|
|
23872
24368
|
}, null, 2)
|
|
23873
24369
|
}
|
|
@@ -23880,23 +24376,19 @@ function registerCreateRoadmapItem(server) {
|
|
|
23880
24376
|
description: "Create a new roadmap item. Use this to add planned work to the roadmap.",
|
|
23881
24377
|
inputSchema: {
|
|
23882
24378
|
title: exports_external.string().describe("Title of the roadmap item"),
|
|
23883
|
-
status:
|
|
23884
|
-
|
|
23885
|
-
|
|
23886
|
-
|
|
23887
|
-
|
|
23888
|
-
|
|
23889
|
-
|
|
23890
|
-
|
|
23891
|
-
]).optional().describe('Status (defaults to "not_started")'),
|
|
23892
|
-
horizon: exports_external.enum(["inbox", "now", "next", "later", "someday", "icebox", "done", "cancelled"]).optional().describe('Planning horizon (defaults to "inbox")')
|
|
23893
|
-
}
|
|
23894
|
-
}, async ({ title, status, horizon }) => {
|
|
24379
|
+
status: roadmapStatusSchema.optional().describe('Status (defaults to "not_started")'),
|
|
24380
|
+
horizon: horizonSchema.optional().describe('Planning horizon (defaults to "inbox")')
|
|
24381
|
+
}
|
|
24382
|
+
}, async ({
|
|
24383
|
+
title,
|
|
24384
|
+
status,
|
|
24385
|
+
horizon
|
|
24386
|
+
}) => {
|
|
23895
24387
|
const client2 = getApiClient();
|
|
23896
|
-
const
|
|
24388
|
+
const roadmap2 = await client2.createRoadmap({
|
|
23897
24389
|
title,
|
|
23898
|
-
status: status
|
|
23899
|
-
horizon: horizon
|
|
24390
|
+
status: status ?? "not_started",
|
|
24391
|
+
horizon: horizon ?? "inbox"
|
|
23900
24392
|
});
|
|
23901
24393
|
return {
|
|
23902
24394
|
content: [
|
|
@@ -23905,10 +24397,10 @@ function registerCreateRoadmapItem(server) {
|
|
|
23905
24397
|
text: JSON.stringify({
|
|
23906
24398
|
success: true,
|
|
23907
24399
|
roadmap: {
|
|
23908
|
-
id:
|
|
23909
|
-
title:
|
|
23910
|
-
status:
|
|
23911
|
-
horizon:
|
|
24400
|
+
id: roadmap2.id,
|
|
24401
|
+
title: roadmap2.title,
|
|
24402
|
+
status: roadmap2.status,
|
|
24403
|
+
horizon: roadmap2.horizon
|
|
23912
24404
|
}
|
|
23913
24405
|
}, null, 2)
|
|
23914
24406
|
}
|
|
@@ -23922,18 +24414,15 @@ function registerUpdateRoadmapItem(server) {
|
|
|
23922
24414
|
inputSchema: {
|
|
23923
24415
|
id: exports_external.string().describe("The UUID of the roadmap item to update"),
|
|
23924
24416
|
title: exports_external.string().optional().describe("New title"),
|
|
23925
|
-
status:
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
horizon: exports_external.enum(["inbox", "now", "next", "later", "someday", "icebox", "done", "cancelled"]).optional().describe("New planning horizon")
|
|
23935
|
-
}
|
|
23936
|
-
}, async ({ id, title, status, horizon }) => {
|
|
24417
|
+
status: roadmapStatusSchema.optional().describe("New status"),
|
|
24418
|
+
horizon: horizonSchema.optional().describe("New planning horizon")
|
|
24419
|
+
}
|
|
24420
|
+
}, async ({
|
|
24421
|
+
id,
|
|
24422
|
+
title,
|
|
24423
|
+
status,
|
|
24424
|
+
horizon
|
|
24425
|
+
}) => {
|
|
23937
24426
|
const client2 = getApiClient();
|
|
23938
24427
|
const updates = {};
|
|
23939
24428
|
if (title !== undefined)
|
|
@@ -23942,7 +24431,7 @@ function registerUpdateRoadmapItem(server) {
|
|
|
23942
24431
|
updates.status = status;
|
|
23943
24432
|
if (horizon !== undefined)
|
|
23944
24433
|
updates.horizon = horizon;
|
|
23945
|
-
const
|
|
24434
|
+
const roadmap2 = await client2.updateRoadmap(id, updates);
|
|
23946
24435
|
return {
|
|
23947
24436
|
content: [
|
|
23948
24437
|
{
|
|
@@ -23950,10 +24439,10 @@ function registerUpdateRoadmapItem(server) {
|
|
|
23950
24439
|
text: JSON.stringify({
|
|
23951
24440
|
success: true,
|
|
23952
24441
|
roadmap: {
|
|
23953
|
-
id:
|
|
23954
|
-
title:
|
|
23955
|
-
status:
|
|
23956
|
-
horizon:
|
|
24442
|
+
id: roadmap2.id,
|
|
24443
|
+
title: roadmap2.title,
|
|
24444
|
+
status: roadmap2.status,
|
|
24445
|
+
horizon: roadmap2.horizon
|
|
23957
24446
|
}
|
|
23958
24447
|
}, null, 2)
|
|
23959
24448
|
}
|
|
@@ -23967,26 +24456,33 @@ function registerAddFeature(server) {
|
|
|
23967
24456
|
inputSchema: {
|
|
23968
24457
|
name: exports_external.string().describe("Name of the feature"),
|
|
23969
24458
|
description: exports_external.string().optional().describe("Description of the feature"),
|
|
23970
|
-
type:
|
|
24459
|
+
type: featureTypeSchema.optional().describe('Type - "feature" for specific functionality, "area" for grouping (defaults to "feature")'),
|
|
23971
24460
|
parentId: exports_external.string().optional().describe("UUID of parent feature/area to nest under"),
|
|
23972
24461
|
outcomes: exports_external.array(exports_external.string()).optional().describe("List of expected outcomes for this feature"),
|
|
23973
24462
|
linkToRoadmapId: exports_external.string().optional().describe("UUID of roadmap item to link this feature to")
|
|
23974
24463
|
}
|
|
23975
|
-
}, async ({
|
|
24464
|
+
}, async ({
|
|
24465
|
+
name,
|
|
24466
|
+
description,
|
|
24467
|
+
type,
|
|
24468
|
+
parentId,
|
|
24469
|
+
outcomes,
|
|
24470
|
+
linkToRoadmapId
|
|
24471
|
+
}) => {
|
|
23976
24472
|
const client2 = getApiClient();
|
|
23977
|
-
const
|
|
24473
|
+
const feature2 = await client2.createFeature({
|
|
23978
24474
|
name,
|
|
23979
|
-
description,
|
|
23980
|
-
type: type
|
|
23981
|
-
parentId
|
|
24475
|
+
description: description ?? null,
|
|
24476
|
+
type: type ?? "feature",
|
|
24477
|
+
parentId: parentId ?? null
|
|
23982
24478
|
});
|
|
23983
24479
|
if (outcomes && outcomes.length > 0) {
|
|
23984
24480
|
for (const outcome of outcomes) {
|
|
23985
|
-
await client2.addFeatureOutcome(
|
|
24481
|
+
await client2.addFeatureOutcome(feature2.id, outcome);
|
|
23986
24482
|
}
|
|
23987
24483
|
}
|
|
23988
24484
|
if (linkToRoadmapId) {
|
|
23989
|
-
await client2.linkFeatureToRoadmap(
|
|
24485
|
+
await client2.linkFeatureToRoadmap(feature2.id, linkToRoadmapId);
|
|
23990
24486
|
}
|
|
23991
24487
|
return {
|
|
23992
24488
|
content: [
|
|
@@ -23995,13 +24491,12 @@ function registerAddFeature(server) {
|
|
|
23995
24491
|
text: JSON.stringify({
|
|
23996
24492
|
success: true,
|
|
23997
24493
|
feature: {
|
|
23998
|
-
id:
|
|
23999
|
-
name:
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24003
|
-
|
|
24004
|
-
linkedToRoadmap: linkToRoadmapId || null
|
|
24494
|
+
id: feature2.id,
|
|
24495
|
+
name: feature2.name,
|
|
24496
|
+
type: feature2.type,
|
|
24497
|
+
parentId: feature2.parentId,
|
|
24498
|
+
outcomesAdded: outcomes?.length ?? 0,
|
|
24499
|
+
linkedToRoadmap: linkToRoadmapId ?? null
|
|
24005
24500
|
}
|
|
24006
24501
|
}, null, 2)
|
|
24007
24502
|
}
|
|
@@ -24018,13 +24513,18 @@ function registerSavePrd(server) {
|
|
|
24018
24513
|
why: exports_external.string().nullable().describe("Why this is being built - the business justification"),
|
|
24019
24514
|
outcomes: exports_external.array(exports_external.string()).optional().describe("List of expected outcomes/success criteria")
|
|
24020
24515
|
}
|
|
24021
|
-
}, async ({
|
|
24516
|
+
}, async ({
|
|
24517
|
+
roadmapId,
|
|
24518
|
+
what,
|
|
24519
|
+
why,
|
|
24520
|
+
outcomes
|
|
24521
|
+
}) => {
|
|
24022
24522
|
const client2 = getApiClient();
|
|
24023
24523
|
const prd = await client2.savePrd(roadmapId, {
|
|
24024
|
-
what: what
|
|
24025
|
-
why: why
|
|
24524
|
+
what: what ?? null,
|
|
24525
|
+
why: why ?? null,
|
|
24026
24526
|
status: "draft",
|
|
24027
|
-
outcomes: (outcomes
|
|
24527
|
+
outcomes: (outcomes ?? []).map((desc, index) => ({ description: desc, order: index }))
|
|
24028
24528
|
});
|
|
24029
24529
|
return {
|
|
24030
24530
|
content: [
|
|
@@ -24054,7 +24554,7 @@ function registerUpdateBrainstormNotes(server) {
|
|
|
24054
24554
|
}
|
|
24055
24555
|
}, async ({ roadmapId, notes }) => {
|
|
24056
24556
|
const client2 = getApiClient();
|
|
24057
|
-
const
|
|
24557
|
+
const roadmap2 = await client2.updateRoadmap(roadmapId, {
|
|
24058
24558
|
brainstormNotes: notes
|
|
24059
24559
|
});
|
|
24060
24560
|
return {
|
|
@@ -24064,9 +24564,430 @@ function registerUpdateBrainstormNotes(server) {
|
|
|
24064
24564
|
text: JSON.stringify({
|
|
24065
24565
|
success: true,
|
|
24066
24566
|
roadmap: {
|
|
24067
|
-
id:
|
|
24068
|
-
title:
|
|
24069
|
-
|
|
24567
|
+
id: roadmap2.id,
|
|
24568
|
+
title: roadmap2.title,
|
|
24569
|
+
notesUpdated: true,
|
|
24570
|
+
notesLength: notes.length
|
|
24571
|
+
}
|
|
24572
|
+
}, null, 2)
|
|
24573
|
+
}
|
|
24574
|
+
]
|
|
24575
|
+
};
|
|
24576
|
+
});
|
|
24577
|
+
}
|
|
24578
|
+
function registerDeleteRoadmapItem(server) {
|
|
24579
|
+
server.registerTool("delete_roadmap_item", {
|
|
24580
|
+
description: "Delete a roadmap item. This is a soft delete - the item can potentially be recovered.",
|
|
24581
|
+
inputSchema: {
|
|
24582
|
+
id: exports_external.string().describe("The UUID of the roadmap item to delete")
|
|
24583
|
+
}
|
|
24584
|
+
}, async ({ id }) => {
|
|
24585
|
+
const client2 = getApiClient();
|
|
24586
|
+
await client2.deleteRoadmap(id);
|
|
24587
|
+
return {
|
|
24588
|
+
content: [
|
|
24589
|
+
{
|
|
24590
|
+
type: "text",
|
|
24591
|
+
text: JSON.stringify({
|
|
24592
|
+
success: true,
|
|
24593
|
+
message: `Roadmap item ${id} has been deleted`
|
|
24594
|
+
}, null, 2)
|
|
24595
|
+
}
|
|
24596
|
+
]
|
|
24597
|
+
};
|
|
24598
|
+
});
|
|
24599
|
+
}
|
|
24600
|
+
function registerUpdateFeature(server) {
|
|
24601
|
+
server.registerTool("update_feature", {
|
|
24602
|
+
description: "Update an existing feature. Can update name, type, or parent.",
|
|
24603
|
+
inputSchema: {
|
|
24604
|
+
id: exports_external.string().describe("The UUID of the feature to update"),
|
|
24605
|
+
name: exports_external.string().optional().describe("New name for the feature"),
|
|
24606
|
+
type: featureTypeSchema.optional().describe('New type - "feature" or "area"'),
|
|
24607
|
+
parentId: exports_external.string().nullable().optional().describe("New parent feature/area UUID, or null to move to root")
|
|
24608
|
+
}
|
|
24609
|
+
}, async ({
|
|
24610
|
+
id,
|
|
24611
|
+
name,
|
|
24612
|
+
type,
|
|
24613
|
+
parentId
|
|
24614
|
+
}) => {
|
|
24615
|
+
const client2 = getApiClient();
|
|
24616
|
+
const updates = {};
|
|
24617
|
+
if (name !== undefined)
|
|
24618
|
+
updates.name = name;
|
|
24619
|
+
if (type !== undefined)
|
|
24620
|
+
updates.type = type;
|
|
24621
|
+
if (parentId !== undefined)
|
|
24622
|
+
updates.parentId = parentId;
|
|
24623
|
+
const feature2 = await client2.updateFeature(id, updates);
|
|
24624
|
+
return {
|
|
24625
|
+
content: [
|
|
24626
|
+
{
|
|
24627
|
+
type: "text",
|
|
24628
|
+
text: JSON.stringify({
|
|
24629
|
+
success: true,
|
|
24630
|
+
feature: {
|
|
24631
|
+
id: feature2.id,
|
|
24632
|
+
name: feature2.name,
|
|
24633
|
+
type: feature2.type,
|
|
24634
|
+
parentId: feature2.parentId
|
|
24635
|
+
}
|
|
24636
|
+
}, null, 2)
|
|
24637
|
+
}
|
|
24638
|
+
]
|
|
24639
|
+
};
|
|
24640
|
+
});
|
|
24641
|
+
}
|
|
24642
|
+
function registerDeleteFeature(server) {
|
|
24643
|
+
server.registerTool("delete_feature", {
|
|
24644
|
+
description: "Delete a feature. This is a soft delete that also deletes all child features.",
|
|
24645
|
+
inputSchema: {
|
|
24646
|
+
id: exports_external.string().describe("The UUID of the feature to delete")
|
|
24647
|
+
}
|
|
24648
|
+
}, async ({ id }) => {
|
|
24649
|
+
const client2 = getApiClient();
|
|
24650
|
+
await client2.deleteFeature(id);
|
|
24651
|
+
return {
|
|
24652
|
+
content: [
|
|
24653
|
+
{
|
|
24654
|
+
type: "text",
|
|
24655
|
+
text: JSON.stringify({
|
|
24656
|
+
success: true,
|
|
24657
|
+
message: `Feature ${id} has been deleted`
|
|
24658
|
+
}, null, 2)
|
|
24659
|
+
}
|
|
24660
|
+
]
|
|
24661
|
+
};
|
|
24662
|
+
});
|
|
24663
|
+
}
|
|
24664
|
+
function registerGetIdea(server) {
|
|
24665
|
+
server.registerTool("get_idea", {
|
|
24666
|
+
description: "Get full details of a single idea by ID.",
|
|
24667
|
+
inputSchema: {
|
|
24668
|
+
id: exports_external.string().describe("The UUID of the idea")
|
|
24669
|
+
}
|
|
24670
|
+
}, async ({ id }) => {
|
|
24671
|
+
const client2 = getApiClient();
|
|
24672
|
+
const idea2 = await client2.getIdea(id);
|
|
24673
|
+
return {
|
|
24674
|
+
content: [
|
|
24675
|
+
{
|
|
24676
|
+
type: "text",
|
|
24677
|
+
text: JSON.stringify({
|
|
24678
|
+
id: idea2.id,
|
|
24679
|
+
title: idea2.title,
|
|
24680
|
+
description: idea2.description,
|
|
24681
|
+
status: idea2.status,
|
|
24682
|
+
source: idea2.source,
|
|
24683
|
+
submittedBy: idea2.submittedBy,
|
|
24684
|
+
value: idea2.value,
|
|
24685
|
+
effort: idea2.effort,
|
|
24686
|
+
createdAt: idea2.createdAt
|
|
24687
|
+
}, null, 2)
|
|
24688
|
+
}
|
|
24689
|
+
]
|
|
24690
|
+
};
|
|
24691
|
+
});
|
|
24692
|
+
}
|
|
24693
|
+
function registerUpdateIdea(server) {
|
|
24694
|
+
server.registerTool("update_idea", {
|
|
24695
|
+
description: "Update an existing idea. Can update title, description, status, value, or effort.",
|
|
24696
|
+
inputSchema: {
|
|
24697
|
+
id: exports_external.string().describe("The UUID of the idea to update"),
|
|
24698
|
+
title: exports_external.string().optional().describe("New title"),
|
|
24699
|
+
description: exports_external.string().nullable().optional().describe("New description"),
|
|
24700
|
+
status: ideaStatusSchema.optional().describe("New status"),
|
|
24701
|
+
value: exports_external.enum(["xs", "s", "m", "l", "xl"]).nullable().optional().describe("Estimated value"),
|
|
24702
|
+
effort: exports_external.enum(["xs", "s", "m", "l", "xl"]).nullable().optional().describe("Estimated effort")
|
|
24703
|
+
}
|
|
24704
|
+
}, async ({
|
|
24705
|
+
id,
|
|
24706
|
+
title,
|
|
24707
|
+
description,
|
|
24708
|
+
status,
|
|
24709
|
+
value,
|
|
24710
|
+
effort
|
|
24711
|
+
}) => {
|
|
24712
|
+
const client2 = getApiClient();
|
|
24713
|
+
const updates = {};
|
|
24714
|
+
if (title !== undefined)
|
|
24715
|
+
updates.title = title;
|
|
24716
|
+
if (description !== undefined)
|
|
24717
|
+
updates.description = description;
|
|
24718
|
+
if (status !== undefined)
|
|
24719
|
+
updates.status = status;
|
|
24720
|
+
if (value !== undefined)
|
|
24721
|
+
updates.value = value;
|
|
24722
|
+
if (effort !== undefined)
|
|
24723
|
+
updates.effort = effort;
|
|
24724
|
+
const idea2 = await client2.updateIdea(id, updates);
|
|
24725
|
+
return {
|
|
24726
|
+
content: [
|
|
24727
|
+
{
|
|
24728
|
+
type: "text",
|
|
24729
|
+
text: JSON.stringify({
|
|
24730
|
+
success: true,
|
|
24731
|
+
idea: {
|
|
24732
|
+
id: idea2.id,
|
|
24733
|
+
title: idea2.title,
|
|
24734
|
+
description: idea2.description,
|
|
24735
|
+
status: idea2.status,
|
|
24736
|
+
value: idea2.value,
|
|
24737
|
+
effort: idea2.effort
|
|
24738
|
+
}
|
|
24739
|
+
}, null, 2)
|
|
24740
|
+
}
|
|
24741
|
+
]
|
|
24742
|
+
};
|
|
24743
|
+
});
|
|
24744
|
+
}
|
|
24745
|
+
function registerDeleteIdea(server) {
|
|
24746
|
+
server.registerTool("delete_idea", {
|
|
24747
|
+
description: "Delete an idea. This is a soft delete.",
|
|
24748
|
+
inputSchema: {
|
|
24749
|
+
id: exports_external.string().describe("The UUID of the idea to delete")
|
|
24750
|
+
}
|
|
24751
|
+
}, async ({ id }) => {
|
|
24752
|
+
const client2 = getApiClient();
|
|
24753
|
+
await client2.deleteIdea(id);
|
|
24754
|
+
return {
|
|
24755
|
+
content: [
|
|
24756
|
+
{
|
|
24757
|
+
type: "text",
|
|
24758
|
+
text: JSON.stringify({
|
|
24759
|
+
success: true,
|
|
24760
|
+
message: `Idea ${id} has been deleted`
|
|
24761
|
+
}, null, 2)
|
|
24762
|
+
}
|
|
24763
|
+
]
|
|
24764
|
+
};
|
|
24765
|
+
});
|
|
24766
|
+
}
|
|
24767
|
+
function registerGetStrategy(server) {
|
|
24768
|
+
server.registerTool("get_strategy", {
|
|
24769
|
+
description: "Get the organization strategy including vision and mission statements. Use this to understand the high-level direction and purpose of the product.",
|
|
24770
|
+
inputSchema: {}
|
|
24771
|
+
}, async () => {
|
|
24772
|
+
const client2 = getApiClient();
|
|
24773
|
+
const strategy = await client2.getStrategy();
|
|
24774
|
+
return {
|
|
24775
|
+
content: [
|
|
24776
|
+
{
|
|
24777
|
+
type: "text",
|
|
24778
|
+
text: JSON.stringify(strategy, null, 2)
|
|
24779
|
+
}
|
|
24780
|
+
]
|
|
24781
|
+
};
|
|
24782
|
+
});
|
|
24783
|
+
}
|
|
24784
|
+
function registerUpdateStrategy(server) {
|
|
24785
|
+
server.registerTool("update_strategy", {
|
|
24786
|
+
description: "Update the organization strategy. Can update vision, mission, or both. Use this to set or refine the high-level direction.",
|
|
24787
|
+
inputSchema: {
|
|
24788
|
+
vision: exports_external.string().nullable().optional().describe("The vision statement - where the product is headed"),
|
|
24789
|
+
mission: exports_external.string().nullable().optional().describe("The mission statement - why the product exists")
|
|
24790
|
+
}
|
|
24791
|
+
}, async ({ vision, mission }) => {
|
|
24792
|
+
const client2 = getApiClient();
|
|
24793
|
+
const updates = {};
|
|
24794
|
+
if (vision !== undefined)
|
|
24795
|
+
updates.vision = vision;
|
|
24796
|
+
if (mission !== undefined)
|
|
24797
|
+
updates.mission = mission;
|
|
24798
|
+
const strategy = await client2.updateStrategy(updates);
|
|
24799
|
+
return {
|
|
24800
|
+
content: [
|
|
24801
|
+
{
|
|
24802
|
+
type: "text",
|
|
24803
|
+
text: JSON.stringify({ success: true, strategy }, null, 2)
|
|
24804
|
+
}
|
|
24805
|
+
]
|
|
24806
|
+
};
|
|
24807
|
+
});
|
|
24808
|
+
}
|
|
24809
|
+
function registerListScenarios(server) {
|
|
24810
|
+
server.registerTool("list_scenarios", {
|
|
24811
|
+
description: "List all user scenarios. Scenarios describe how users interact with the product to accomplish goals using Given/When/Then format.",
|
|
24812
|
+
inputSchema: {}
|
|
24813
|
+
}, async () => {
|
|
24814
|
+
const client2 = getApiClient();
|
|
24815
|
+
const scenarios = await client2.listScenarios();
|
|
24816
|
+
return {
|
|
24817
|
+
content: [
|
|
24818
|
+
{
|
|
24819
|
+
type: "text",
|
|
24820
|
+
text: JSON.stringify(scenarios.map((s) => ({
|
|
24821
|
+
id: s.id,
|
|
24822
|
+
title: s.title,
|
|
24823
|
+
given: s.given,
|
|
24824
|
+
when: s.when,
|
|
24825
|
+
then: s.then,
|
|
24826
|
+
order: s.order
|
|
24827
|
+
})), null, 2)
|
|
24828
|
+
}
|
|
24829
|
+
]
|
|
24830
|
+
};
|
|
24831
|
+
});
|
|
24832
|
+
}
|
|
24833
|
+
function registerCreateScenario(server) {
|
|
24834
|
+
server.registerTool("create_scenario", {
|
|
24835
|
+
description: "Create a new user scenario. Scenarios describe user workflows and how they accomplish goals.",
|
|
24836
|
+
inputSchema: {
|
|
24837
|
+
title: exports_external.string().describe('Title of the scenario (e.g., "User creates their first roadmap")'),
|
|
24838
|
+
description: exports_external.string().nullable().optional().describe("Detailed description of the scenario workflow")
|
|
24839
|
+
}
|
|
24840
|
+
}, async ({ title, description }) => {
|
|
24841
|
+
const client2 = getApiClient();
|
|
24842
|
+
const scenario2 = await client2.createScenario({
|
|
24843
|
+
title,
|
|
24844
|
+
description: description ?? null
|
|
24845
|
+
});
|
|
24846
|
+
return {
|
|
24847
|
+
content: [
|
|
24848
|
+
{
|
|
24849
|
+
type: "text",
|
|
24850
|
+
text: JSON.stringify({
|
|
24851
|
+
success: true,
|
|
24852
|
+
scenario: {
|
|
24853
|
+
id: scenario2.id,
|
|
24854
|
+
title: scenario2.title,
|
|
24855
|
+
description: scenario2.description ?? scenario2.given
|
|
24856
|
+
}
|
|
24857
|
+
}, null, 2)
|
|
24858
|
+
}
|
|
24859
|
+
]
|
|
24860
|
+
};
|
|
24861
|
+
});
|
|
24862
|
+
}
|
|
24863
|
+
function registerUpdateScenario(server) {
|
|
24864
|
+
server.registerTool("update_scenario", {
|
|
24865
|
+
description: "Update an existing scenario.",
|
|
24866
|
+
inputSchema: {
|
|
24867
|
+
id: exports_external.string().describe("The UUID of the scenario to update"),
|
|
24868
|
+
title: exports_external.string().optional().describe("New title"),
|
|
24869
|
+
description: exports_external.string().nullable().optional().describe("New description")
|
|
24870
|
+
}
|
|
24871
|
+
}, async ({
|
|
24872
|
+
id,
|
|
24873
|
+
title,
|
|
24874
|
+
description
|
|
24875
|
+
}) => {
|
|
24876
|
+
const client2 = getApiClient();
|
|
24877
|
+
const updates = {};
|
|
24878
|
+
if (title !== undefined)
|
|
24879
|
+
updates.title = title;
|
|
24880
|
+
if (description !== undefined)
|
|
24881
|
+
updates.description = description;
|
|
24882
|
+
const scenario2 = await client2.updateScenario(id, updates);
|
|
24883
|
+
return {
|
|
24884
|
+
content: [
|
|
24885
|
+
{
|
|
24886
|
+
type: "text",
|
|
24887
|
+
text: JSON.stringify({
|
|
24888
|
+
success: true,
|
|
24889
|
+
scenario: {
|
|
24890
|
+
id: scenario2.id,
|
|
24891
|
+
title: scenario2.title,
|
|
24892
|
+
description: scenario2.description ?? scenario2.given
|
|
24893
|
+
}
|
|
24894
|
+
}, null, 2)
|
|
24895
|
+
}
|
|
24896
|
+
]
|
|
24897
|
+
};
|
|
24898
|
+
});
|
|
24899
|
+
}
|
|
24900
|
+
function registerDeleteScenario(server) {
|
|
24901
|
+
server.registerTool("delete_scenario", {
|
|
24902
|
+
description: "Delete a scenario. This is a soft delete.",
|
|
24903
|
+
inputSchema: {
|
|
24904
|
+
id: exports_external.string().describe("The UUID of the scenario to delete")
|
|
24905
|
+
}
|
|
24906
|
+
}, async ({ id }) => {
|
|
24907
|
+
const client2 = getApiClient();
|
|
24908
|
+
await client2.deleteScenario(id);
|
|
24909
|
+
return {
|
|
24910
|
+
content: [
|
|
24911
|
+
{
|
|
24912
|
+
type: "text",
|
|
24913
|
+
text: JSON.stringify({ success: true, message: `Scenario ${id} has been deleted` }, null, 2)
|
|
24914
|
+
}
|
|
24915
|
+
]
|
|
24916
|
+
};
|
|
24917
|
+
});
|
|
24918
|
+
}
|
|
24919
|
+
var productTypeSchema2 = exports_external.enum([
|
|
24920
|
+
"brand",
|
|
24921
|
+
"product",
|
|
24922
|
+
"app",
|
|
24923
|
+
"marketing_site",
|
|
24924
|
+
"landing_page",
|
|
24925
|
+
"service"
|
|
24926
|
+
]);
|
|
24927
|
+
function registerCreateProduct(server) {
|
|
24928
|
+
server.registerTool("create_product", {
|
|
24929
|
+
description: "Create a new product, app, brand, or service. Products represent what the organization builds and offers.",
|
|
24930
|
+
inputSchema: {
|
|
24931
|
+
type: productTypeSchema2.describe("Type of product"),
|
|
24932
|
+
name: exports_external.string().describe("Name of the product"),
|
|
24933
|
+
parentId: exports_external.string().nullable().optional().describe("UUID of parent product to nest under")
|
|
24934
|
+
}
|
|
24935
|
+
}, async ({
|
|
24936
|
+
type,
|
|
24937
|
+
name,
|
|
24938
|
+
parentId
|
|
24939
|
+
}) => {
|
|
24940
|
+
const client2 = getApiClient();
|
|
24941
|
+
const product2 = await client2.createProduct({
|
|
24942
|
+
type,
|
|
24943
|
+
name,
|
|
24944
|
+
parentId: parentId ?? null
|
|
24945
|
+
});
|
|
24946
|
+
return {
|
|
24947
|
+
content: [
|
|
24948
|
+
{
|
|
24949
|
+
type: "text",
|
|
24950
|
+
text: JSON.stringify({
|
|
24951
|
+
success: true,
|
|
24952
|
+
product: {
|
|
24953
|
+
id: product2.id,
|
|
24954
|
+
type: product2.type,
|
|
24955
|
+
name: product2.name,
|
|
24956
|
+
parentId: product2.parentId
|
|
24957
|
+
}
|
|
24958
|
+
}, null, 2)
|
|
24959
|
+
}
|
|
24960
|
+
]
|
|
24961
|
+
};
|
|
24962
|
+
});
|
|
24963
|
+
}
|
|
24964
|
+
function registerUpdateProduct(server) {
|
|
24965
|
+
server.registerTool("update_product", {
|
|
24966
|
+
description: "Update an existing product.",
|
|
24967
|
+
inputSchema: {
|
|
24968
|
+
id: exports_external.string().describe("The UUID of the product to update"),
|
|
24969
|
+
name: exports_external.string().optional().describe("New name"),
|
|
24970
|
+
parentId: exports_external.string().nullable().optional().describe("New parent product UUID, or null to move to root")
|
|
24971
|
+
}
|
|
24972
|
+
}, async ({ id, name, parentId }) => {
|
|
24973
|
+
const client2 = getApiClient();
|
|
24974
|
+
const updates = {};
|
|
24975
|
+
if (name !== undefined)
|
|
24976
|
+
updates.name = name;
|
|
24977
|
+
if (parentId !== undefined)
|
|
24978
|
+
updates.parentId = parentId;
|
|
24979
|
+
const product2 = await client2.updateProduct(id, updates);
|
|
24980
|
+
return {
|
|
24981
|
+
content: [
|
|
24982
|
+
{
|
|
24983
|
+
type: "text",
|
|
24984
|
+
text: JSON.stringify({
|
|
24985
|
+
success: true,
|
|
24986
|
+
product: {
|
|
24987
|
+
id: product2.id,
|
|
24988
|
+
type: product2.type,
|
|
24989
|
+
name: product2.name,
|
|
24990
|
+
parentId: product2.parentId
|
|
24070
24991
|
}
|
|
24071
24992
|
}, null, 2)
|
|
24072
24993
|
}
|
|
@@ -24074,6 +24995,146 @@ function registerUpdateBrainstormNotes(server) {
|
|
|
24074
24995
|
};
|
|
24075
24996
|
});
|
|
24076
24997
|
}
|
|
24998
|
+
function registerDeleteProduct(server) {
|
|
24999
|
+
server.registerTool("delete_product", {
|
|
25000
|
+
description: "Delete a product. This is a soft delete that also deletes all child products.",
|
|
25001
|
+
inputSchema: {
|
|
25002
|
+
id: exports_external.string().describe("The UUID of the product to delete")
|
|
25003
|
+
}
|
|
25004
|
+
}, async ({ id }) => {
|
|
25005
|
+
const client2 = getApiClient();
|
|
25006
|
+
const result = await client2.deleteProduct(id);
|
|
25007
|
+
return {
|
|
25008
|
+
content: [
|
|
25009
|
+
{
|
|
25010
|
+
type: "text",
|
|
25011
|
+
text: JSON.stringify({
|
|
25012
|
+
success: true,
|
|
25013
|
+
message: `Product and ${result.deletedCount - 1} children have been deleted`,
|
|
25014
|
+
deletedCount: result.deletedCount
|
|
25015
|
+
}, null, 2)
|
|
25016
|
+
}
|
|
25017
|
+
]
|
|
25018
|
+
};
|
|
25019
|
+
});
|
|
25020
|
+
}
|
|
25021
|
+
var audienceTypeSchema2 = exports_external.enum(["stakeholder", "user_persona"]);
|
|
25022
|
+
function registerCreateAudience(server) {
|
|
25023
|
+
server.registerTool("create_audience", {
|
|
25024
|
+
description: "Create a new audience member - either a stakeholder or user persona. Audiences represent who the product serves.",
|
|
25025
|
+
inputSchema: {
|
|
25026
|
+
type: audienceTypeSchema2.describe("Type of audience - stakeholder or user_persona"),
|
|
25027
|
+
role: exports_external.string().describe('Role or title of the audience (e.g., "Product Manager", "End User")'),
|
|
25028
|
+
likes: exports_external.string().nullable().optional().describe("What this audience likes or values"),
|
|
25029
|
+
dislikes: exports_external.string().nullable().optional().describe("What this audience dislikes or avoids"),
|
|
25030
|
+
priorities: exports_external.string().nullable().optional().describe("Key priorities for this audience")
|
|
25031
|
+
}
|
|
25032
|
+
}, async ({
|
|
25033
|
+
type,
|
|
25034
|
+
role,
|
|
25035
|
+
likes,
|
|
25036
|
+
dislikes,
|
|
25037
|
+
priorities
|
|
25038
|
+
}) => {
|
|
25039
|
+
const client2 = getApiClient();
|
|
25040
|
+
const audience2 = await client2.createAudience({
|
|
25041
|
+
type,
|
|
25042
|
+
role,
|
|
25043
|
+
likes: likes ?? null,
|
|
25044
|
+
dislikes: dislikes ?? null,
|
|
25045
|
+
priorities: priorities ?? null
|
|
25046
|
+
});
|
|
25047
|
+
return {
|
|
25048
|
+
content: [
|
|
25049
|
+
{
|
|
25050
|
+
type: "text",
|
|
25051
|
+
text: JSON.stringify({
|
|
25052
|
+
success: true,
|
|
25053
|
+
audience: {
|
|
25054
|
+
id: audience2.id,
|
|
25055
|
+
type: audience2.type,
|
|
25056
|
+
role: audience2.role,
|
|
25057
|
+
likes: audience2.likes,
|
|
25058
|
+
dislikes: audience2.dislikes,
|
|
25059
|
+
priorities: audience2.priorities
|
|
25060
|
+
}
|
|
25061
|
+
}, null, 2)
|
|
25062
|
+
}
|
|
25063
|
+
]
|
|
25064
|
+
};
|
|
25065
|
+
});
|
|
25066
|
+
}
|
|
25067
|
+
function registerUpdateAudience(server) {
|
|
25068
|
+
server.registerTool("update_audience", {
|
|
25069
|
+
description: "Update an existing audience member.",
|
|
25070
|
+
inputSchema: {
|
|
25071
|
+
id: exports_external.string().describe("The UUID of the audience to update"),
|
|
25072
|
+
type: audienceTypeSchema2.optional().describe("New type"),
|
|
25073
|
+
role: exports_external.string().optional().describe("New role"),
|
|
25074
|
+
likes: exports_external.string().nullable().optional().describe("New likes"),
|
|
25075
|
+
dislikes: exports_external.string().nullable().optional().describe("New dislikes"),
|
|
25076
|
+
priorities: exports_external.string().nullable().optional().describe("New priorities")
|
|
25077
|
+
}
|
|
25078
|
+
}, async ({
|
|
25079
|
+
id,
|
|
25080
|
+
type,
|
|
25081
|
+
role,
|
|
25082
|
+
likes,
|
|
25083
|
+
dislikes,
|
|
25084
|
+
priorities
|
|
25085
|
+
}) => {
|
|
25086
|
+
const client2 = getApiClient();
|
|
25087
|
+
const updates = {};
|
|
25088
|
+
if (type !== undefined)
|
|
25089
|
+
updates.type = type;
|
|
25090
|
+
if (role !== undefined)
|
|
25091
|
+
updates.role = role;
|
|
25092
|
+
if (likes !== undefined)
|
|
25093
|
+
updates.likes = likes;
|
|
25094
|
+
if (dislikes !== undefined)
|
|
25095
|
+
updates.dislikes = dislikes;
|
|
25096
|
+
if (priorities !== undefined)
|
|
25097
|
+
updates.priorities = priorities;
|
|
25098
|
+
const audience2 = await client2.updateAudience(id, updates);
|
|
25099
|
+
return {
|
|
25100
|
+
content: [
|
|
25101
|
+
{
|
|
25102
|
+
type: "text",
|
|
25103
|
+
text: JSON.stringify({
|
|
25104
|
+
success: true,
|
|
25105
|
+
audience: {
|
|
25106
|
+
id: audience2.id,
|
|
25107
|
+
type: audience2.type,
|
|
25108
|
+
role: audience2.role,
|
|
25109
|
+
likes: audience2.likes,
|
|
25110
|
+
dislikes: audience2.dislikes,
|
|
25111
|
+
priorities: audience2.priorities
|
|
25112
|
+
}
|
|
25113
|
+
}, null, 2)
|
|
25114
|
+
}
|
|
25115
|
+
]
|
|
25116
|
+
};
|
|
25117
|
+
});
|
|
25118
|
+
}
|
|
25119
|
+
function registerDeleteAudience(server) {
|
|
25120
|
+
server.registerTool("delete_audience", {
|
|
25121
|
+
description: "Delete an audience member. This is a soft delete.",
|
|
25122
|
+
inputSchema: {
|
|
25123
|
+
id: exports_external.string().describe("The UUID of the audience to delete")
|
|
25124
|
+
}
|
|
25125
|
+
}, async ({ id }) => {
|
|
25126
|
+
const client2 = getApiClient();
|
|
25127
|
+
await client2.deleteAudience(id);
|
|
25128
|
+
return {
|
|
25129
|
+
content: [
|
|
25130
|
+
{
|
|
25131
|
+
type: "text",
|
|
25132
|
+
text: JSON.stringify({ success: true, message: `Audience ${id} has been deleted` }, null, 2)
|
|
25133
|
+
}
|
|
25134
|
+
]
|
|
25135
|
+
};
|
|
25136
|
+
});
|
|
25137
|
+
}
|
|
24077
25138
|
|
|
24078
25139
|
// src/index.ts
|
|
24079
25140
|
async function main() {
|