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