@kylewadegrove/cutline-mcp-cli 0.6.1 → 0.6.2

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.
@@ -0,0 +1,331 @@
1
+ // ../mcp/dist/mcp/src/schemas.js
2
+ import { z } from "zod";
3
+ var PMJsonSchema = z.object({
4
+ project: z.object({
5
+ name: z.string(),
6
+ brief: z.string(),
7
+ constraints: z.object({
8
+ team: z.string().optional(),
9
+ budget_usd: z.number().optional(),
10
+ deadline_days: z.number().int().optional(),
11
+ must_ship_scope: z.string().optional()
12
+ }).optional(),
13
+ reference_classes: z.array(z.string()).optional().default([])
14
+ }),
15
+ personas: z.object({
16
+ user_personas: z.array(z.object({
17
+ name: z.string(),
18
+ role: z.string().optional(),
19
+ segment: z.string().optional(),
20
+ is_buyer: z.boolean().optional(),
21
+ description: z.string(),
22
+ motivations: z.array(z.string()).optional(),
23
+ skills: z.array(z.string()).optional(),
24
+ objections: z.array(z.string()).optional()
25
+ })).optional(),
26
+ buyer_personas: z.array(z.object({
27
+ name: z.string(),
28
+ role: z.string().optional(),
29
+ segment: z.string().optional(),
30
+ is_buyer: z.boolean().optional(),
31
+ description: z.string(),
32
+ motivations: z.array(z.string()).optional(),
33
+ skills: z.array(z.string()).optional(),
34
+ objections: z.array(z.string()).optional()
35
+ })).optional()
36
+ }).optional(),
37
+ outside_view: z.object({
38
+ base_rates: z.array(z.object({
39
+ statement: z.string(),
40
+ p50: z.number().optional(),
41
+ p90: z.number().optional(),
42
+ source_hint: z.string().optional()
43
+ })).optional(),
44
+ failed_analogs: z.array(z.string()).optional(),
45
+ success_analogs: z.array(z.string()).optional()
46
+ }).optional(),
47
+ pricing: z.object({
48
+ monthly: z.number().optional(),
49
+ annual: z.number().optional(),
50
+ tiers: z.array(z.object({
51
+ name: z.string(),
52
+ price_month_usd: z.number(),
53
+ features: z.array(z.string()).optional()
54
+ })).optional(),
55
+ freemium: z.object({
56
+ enabled: z.boolean(),
57
+ features: z.array(z.string()).optional()
58
+ }).optional(),
59
+ trialDays: z.number().optional(),
60
+ adTier: z.object({
61
+ enabled: z.boolean(),
62
+ notes: z.string().optional()
63
+ }).optional(),
64
+ strategy: z.string().optional()
65
+ }).optional(),
66
+ kill_criteria: z.array(z.object({
67
+ name: z.string(),
68
+ threshold: z.string(),
69
+ status: z.enum(["unknown", "pass", "fail"]).optional(),
70
+ evidence: z.string().optional()
71
+ })).optional(),
72
+ decision: z.object({
73
+ recommendation: z.enum(["No-Go", "Revise", "Go (guarded)"]),
74
+ rationale: z.string(),
75
+ what_would_change_my_mind: z.string().optional(),
76
+ market_feasibility: z.object({
77
+ score: z.enum(["strong", "moderate", "weak"]),
78
+ rationale: z.string(),
79
+ nfr_coverage_pct: z.number().optional()
80
+ }).optional(),
81
+ productionalization_feasibility: z.object({
82
+ score: z.enum(["strong", "moderate", "weak"]),
83
+ rationale: z.string(),
84
+ nfr_coverage_pct: z.number().optional()
85
+ }).optional(),
86
+ engineering_time_reduction: z.object({
87
+ unassisted_hours: z.number(),
88
+ assisted_hours: z.number(),
89
+ speedup_factor: z.number()
90
+ }).optional()
91
+ }).optional(),
92
+ confidence: z.object({
93
+ p50: z.number(),
94
+ p75: z.number().optional(),
95
+ p90: z.number()
96
+ }).optional(),
97
+ risks: z.array(z.object({
98
+ area: z.enum(["Demand", "Channel", "UnitEcon", "Ops", "Legal", "Competition", "Tech"]).optional(),
99
+ description: z.string(),
100
+ likelihood: z.enum(["Low", "Med", "High"]).optional(),
101
+ impact: z.enum(["Low", "Med", "High", "Severe"]).optional(),
102
+ mitigation: z.string().optional(),
103
+ owner: z.string().optional()
104
+ })).optional(),
105
+ assumptions: z.array(z.object({
106
+ statement: z.string(),
107
+ falsifiable: z.boolean(),
108
+ owner: z.string(),
109
+ due_by: z.string()
110
+ })).optional(),
111
+ experiments: z.array(z.object({
112
+ name: z.string(),
113
+ cost_usd: z.number(),
114
+ days: z.number().int(),
115
+ reduces_uncertainty_on: z.array(z.string()),
116
+ success_criterion: z.string()
117
+ })).optional(),
118
+ competitors: z.array(z.object({
119
+ name: z.string(),
120
+ notes: z.string().optional()
121
+ })).optional(),
122
+ market: z.object({
123
+ tam_usd: z.number().optional(),
124
+ sam_usd: z.number().optional(),
125
+ som_3yr_usd: z.number().optional(),
126
+ method: z.string().optional(),
127
+ notes: z.string().optional(),
128
+ tam_rationale: z.array(z.string()).optional(),
129
+ sam_rationale: z.array(z.string()).optional(),
130
+ som_rationale: z.array(z.string()).optional(),
131
+ growth_cagr: z.number().optional(),
132
+ geo_scope: z.string().optional(),
133
+ segments: z.array(z.string()).optional(),
134
+ pricing_model: z.string().optional(),
135
+ arpa_usd: z.number().optional(),
136
+ adoption_notes: z.string().optional(),
137
+ icp: z.array(z.string()).optional(),
138
+ ease_of_spend: z.enum(["Low", "Med", "High"]).optional(),
139
+ ease_of_reach: z.enum(["Low", "Med", "High"]).optional(),
140
+ how_to_reach: z.array(z.string()).optional(),
141
+ channels: z.array(z.string()).optional(),
142
+ decision_makers: z.array(z.string()).optional(),
143
+ adoption_ramp: z.array(z.object({
144
+ month: z.number().int(),
145
+ adoption_pct: z.number().optional(),
146
+ revenue_usd: z.number().optional(),
147
+ notes: z.string().optional()
148
+ })).optional(),
149
+ sources: z.array(z.object({
150
+ title: z.string(),
151
+ url: z.string().optional(),
152
+ as_of: z.string().optional()
153
+ })).optional(),
154
+ confidence: z.object({
155
+ p50: z.number().optional(),
156
+ p90: z.number().optional()
157
+ }).optional()
158
+ }).optional(),
159
+ icp: z.object({
160
+ primary_icp: z.object({
161
+ title: z.string(),
162
+ description: z.string(),
163
+ demographics: z.object({
164
+ company_size: z.string(),
165
+ industry: z.string(),
166
+ geography: z.string(),
167
+ budget_range: z.string(),
168
+ job_titles: z.array(z.string()).optional(),
169
+ tech_stack: z.array(z.string()).optional()
170
+ }),
171
+ psychographics: z.object({
172
+ pain_points: z.array(z.string()),
173
+ goals: z.array(z.string()),
174
+ values: z.array(z.string()),
175
+ frustrations: z.array(z.string()).optional()
176
+ }),
177
+ buying_behavior: z.object({
178
+ decision_makers: z.array(z.string()),
179
+ buying_triggers: z.array(z.string()),
180
+ objections: z.array(z.string()),
181
+ sales_cycle_days: z.number().optional(),
182
+ preferred_channels: z.array(z.string()).optional()
183
+ }),
184
+ fit_score: z.number(),
185
+ rationale: z.string()
186
+ }),
187
+ secondary_icps: z.array(z.object({
188
+ title: z.string(),
189
+ description: z.string(),
190
+ key_differences: z.array(z.string()),
191
+ fit_score: z.number()
192
+ })).optional(),
193
+ anti_personas: z.array(z.object({
194
+ title: z.string(),
195
+ description: z.string(),
196
+ why_poor_fit: z.array(z.string())
197
+ })),
198
+ consulting_fit: z.object({
199
+ ideal_client_profile: z.string(),
200
+ engagement_signals: z.array(z.string()),
201
+ disqualifiers: z.array(z.string()),
202
+ stakeholder_map: z.array(z.string()).optional()
203
+ }).optional(),
204
+ sources: z.array(z.object({
205
+ title: z.string(),
206
+ url: z.string().optional(),
207
+ as_of: z.string().optional()
208
+ })).optional()
209
+ }).optional(),
210
+ metrics: z.object({
211
+ north_star: z.string().optional(),
212
+ leading: z.array(z.string()).optional(),
213
+ unit_econ: z.object({
214
+ target_cac: z.number().optional(),
215
+ target_gpm: z.number().optional(),
216
+ payback_months: z.number().optional()
217
+ }).optional()
218
+ }).optional(),
219
+ plan: z.object({
220
+ tasks: z.array(z.object({
221
+ id: z.string().optional(),
222
+ name: z.string(),
223
+ owner: z.enum(["Eng", "Design", "PM", "Compliance"]).optional(),
224
+ days: z.number().int(),
225
+ deps: z.array(z.string()).optional()
226
+ })).optional()
227
+ }).optional(),
228
+ notes: z.object({
229
+ pre_mortem: z.string().optional(),
230
+ evidence_gaps: z.array(z.string()).optional()
231
+ }).optional(),
232
+ role_summaries: z.array(z.object({
233
+ role: z.string(),
234
+ summary: z.string()
235
+ })).optional()
236
+ }).passthrough();
237
+ var RunInputSchema = z.object({
238
+ mode: z.enum(["product", "consulting"]).optional().default("product"),
239
+ project: z.object({
240
+ name: z.string(),
241
+ brief: z.string(),
242
+ constraints: z.object({
243
+ team: z.string().optional(),
244
+ budget_usd: z.number().optional(),
245
+ deadline_days: z.number().int().optional(),
246
+ must_ship_scope: z.string().optional()
247
+ }).optional(),
248
+ reference_classes: z.array(z.string()).optional().default([]),
249
+ tech_stack: z.array(z.string()).optional()
250
+ }),
251
+ client: z.object({
252
+ name: z.string().optional(),
253
+ industry: z.string().optional(),
254
+ size: z.enum(["startup", "smb", "enterprise"]).optional(),
255
+ stakeholders: z.array(z.object({
256
+ name: z.string(),
257
+ role: z.string().optional(),
258
+ influence: z.enum(["decision_maker", "influencer", "blocker", "champion"]).optional()
259
+ })).optional()
260
+ }).optional(),
261
+ kill_criteria: z.array(z.object({ name: z.string(), threshold: z.string() })).optional(),
262
+ pessimism: z.number().min(0).max(1).optional(),
263
+ organizationId: z.string().optional(),
264
+ productId: z.string().optional(),
265
+ seed_personas: z.object({
266
+ user_personas: z.array(z.object({
267
+ name: z.string(),
268
+ role: z.string().optional(),
269
+ segment: z.string().optional(),
270
+ is_buyer: z.boolean().optional(),
271
+ description: z.string(),
272
+ motivations: z.array(z.string()).optional(),
273
+ skills: z.array(z.string()).optional(),
274
+ objections: z.array(z.string()).optional()
275
+ })).optional(),
276
+ buyer_personas: z.array(z.object({
277
+ name: z.string(),
278
+ role: z.string().optional(),
279
+ segment: z.string().optional(),
280
+ is_buyer: z.boolean().optional(),
281
+ description: z.string(),
282
+ motivations: z.array(z.string()).optional(),
283
+ skills: z.array(z.string()).optional(),
284
+ objections: z.array(z.string()).optional()
285
+ })).optional()
286
+ }).optional(),
287
+ conversational_artifacts: z.object({
288
+ risks: z.array(z.object({
289
+ title: z.string(),
290
+ description: z.string().optional(),
291
+ category: z.string().optional(),
292
+ severity: z.enum(["low", "medium", "high", "critical"]).optional(),
293
+ likelihood: z.number().min(0).max(1).optional(),
294
+ impact: z.number().min(0).max(1).optional()
295
+ })).optional(),
296
+ assumptions: z.array(z.object({
297
+ statement: z.string(),
298
+ category: z.string().optional(),
299
+ confidence: z.number().min(0).max(1).optional(),
300
+ importance: z.number().min(0).max(1).optional()
301
+ })).optional(),
302
+ market_context: z.string().optional(),
303
+ competitors: z.array(z.object({
304
+ name: z.string(),
305
+ description: z.string().optional(),
306
+ threat_level: z.enum(["low", "medium", "high"]).optional()
307
+ })).optional(),
308
+ conversation_summary: z.string().optional(),
309
+ target_users: z.string().optional()
310
+ }).optional(),
311
+ code_context: z.object({
312
+ files_audited: z.array(z.string()).optional(),
313
+ ecosystem: z.object({
314
+ languages: z.array(z.string()).optional(),
315
+ frameworks: z.array(z.string()).optional(),
316
+ orms: z.array(z.string()).optional()
317
+ }).optional(),
318
+ binding_health: z.object({
319
+ healthy: z.number().optional(),
320
+ total: z.number().optional(),
321
+ coverage_pct: z.number().optional()
322
+ }).optional(),
323
+ sensitive_data_count: z.number().optional(),
324
+ security_gaps: z.array(z.string()).optional()
325
+ }).optional()
326
+ });
327
+
328
+ export {
329
+ PMJsonSchema,
330
+ RunInputSchema
331
+ };
@@ -1,30 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- GraphTraverser,
4
- computeGenericGraphMetrics,
5
- computeMetricsFromGraph,
6
- detectConstraintConflicts
7
- } from "./chunk-UBBAYTW3.js";
3
+ PMJsonSchema,
4
+ RunInputSchema
5
+ } from "./chunk-DE7R7WKY.js";
8
6
  import {
9
7
  isWriteTool
10
8
  } from "./chunk-KMUSQOTJ.js";
11
- import {
12
- applyEditsLogic,
13
- buildPdfBuffer,
14
- chatWithPersona,
15
- createLinearIssues,
16
- generateAnswer,
17
- generateChatSuggestion,
18
- generateExplorationResponse,
19
- generateTemplateResponse,
20
- generateTrialRun,
21
- getPersona,
22
- getWikiMarkdown,
23
- listPersonas,
24
- saveWikiMarkdown,
25
- uploadAndSign
26
- } from "./chunk-M37M2UA4.js";
27
- import "./chunk-JBJYSV4P.js";
28
9
  import {
29
10
  guardBoundary,
30
11
  guardOutput,
@@ -36,6 +17,20 @@ import {
36
17
  addEntity,
37
18
  addNodes,
38
19
  addTestCases,
20
+ cfApplyEdits,
21
+ cfBuildAndUploadPdf,
22
+ cfChatWithPersona,
23
+ cfCreateLinearIssues,
24
+ cfGenerateAnswer,
25
+ cfGenerateChatSuggestion,
26
+ cfGenerateExplorationResponse,
27
+ cfGenerateTemplateResponse,
28
+ cfGenerateTrialRun,
29
+ cfGetWikiMarkdown,
30
+ cfPremortemRun,
31
+ cfRegenAssumptions,
32
+ cfRegenExperiments,
33
+ cfSaveWikiMarkdown,
39
34
  createPremortem,
40
35
  createTemplate,
41
36
  generateReadinessReportViaProxy,
@@ -50,14 +45,20 @@ import {
50
45
  getNodesByCategories,
51
46
  getNodesMissingEmbeddings,
52
47
  getNodesWithEmbeddings,
48
+ getPersona,
53
49
  getPremortem,
54
50
  getScanRateLimit,
55
51
  getTemplate,
56
52
  getTestCasesForEntity,
57
53
  hasConstraints,
54
+ listPersonas,
58
55
  listPremortems,
59
56
  listTemplates,
57
+ mapErrorToMcp,
60
58
  recordScoreSnapshot,
59
+ requirePremiumWithAutoAuth,
60
+ resolveAuthContext,
61
+ resolveAuthContextFree,
61
62
  saveScanReport,
62
63
  updateEntityEmbedding,
63
64
  updateGraphMetadata,
@@ -68,23 +69,15 @@ import {
68
69
  upsertBindings,
69
70
  upsertEdges,
70
71
  upsertEntities,
71
- upsertNodes
72
- } from "./chunk-PQUAX5YW.js";
73
- import {
74
- mapErrorToMcp,
75
- requirePremiumWithAutoAuth,
76
- resolveAuthContext,
77
- resolveAuthContextFree,
72
+ upsertNodes,
78
73
  validateRequestSize
79
- } from "./chunk-NUBIEJTU.js";
74
+ } from "./chunk-7N4HJ3KR.js";
80
75
  import {
81
- PMJsonSchema,
82
- RunInputSchema,
83
- regenerateAssumptions,
84
- regenerateExperiments,
85
- runRolesAndSummarize,
86
- runRolesAndSummarizeIncremental
87
- } from "./chunk-7FHM2GD3.js";
76
+ GraphTraverser,
77
+ computeGenericGraphMetrics,
78
+ computeMetricsFromGraph,
79
+ detectConstraintConflicts
80
+ } from "./chunk-UBBAYTW3.js";
88
81
 
89
82
  // ../mcp/dist/mcp/src/cutline-server.js
90
83
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -2828,7 +2821,7 @@ async function propagateConstraints(productId, sourceEntityId, targetEntityId, s
2828
2821
  // ../mcp/dist/src/orchestrator/agents/shared/vertex.js
2829
2822
  import { VertexAI } from "@google-cloud/vertexai";
2830
2823
  import { GoogleAuth as GoogleAuth2 } from "google-auth-library";
2831
- import { Buffer as Buffer2 } from "node:buffer";
2824
+ import { Buffer } from "node:buffer";
2832
2825
 
2833
2826
  // ../mcp/dist/src/shared/circuit-breaker.js
2834
2827
  var DEFAULT_OPTIONS = {
@@ -3195,7 +3188,7 @@ ${options.system || ""}`.trim();
3195
3188
  }
3196
3189
  if (p?.inlineData?.data) {
3197
3190
  try {
3198
- const decoded = Buffer2.from(p.inlineData.data, "base64").toString("utf8");
3191
+ const decoded = Buffer.from(p.inlineData.data, "base64").toString("utf8");
3199
3192
  inlineSegments.push(decoded);
3200
3193
  } catch {
3201
3194
  }
@@ -8587,7 +8580,7 @@ What's your connection to this space? Are you an insider who knows the pain, or
8587
8580
  ideas: session.ideas,
8588
8581
  conversationHistory: session.conversationHistory
8589
8582
  };
8590
- const response = await generateExplorationResponse(message, context);
8583
+ const response = await cfGenerateExplorationResponse(message, context);
8591
8584
  session.conversationHistory.push({ role: "assistant", content: response.content });
8592
8585
  if (response.artifacts) {
8593
8586
  for (const artifact of response.artifacts) {
@@ -8789,7 +8782,7 @@ Why AI: ${idea.whyAI}`
8789
8782
  }
8790
8783
  if (name2 === "trial_generate") {
8791
8784
  const { prompt } = args;
8792
- const text = await generateTrialRun(prompt);
8785
+ const text = await cfGenerateTrialRun(prompt);
8793
8786
  return { content: [{ type: "text", text: JSON.stringify({ text }) }] };
8794
8787
  }
8795
8788
  if (name2 === "engineering_audit") {
@@ -8881,7 +8874,7 @@ Why AI: ${idea.whyAI}`
8881
8874
  const { id: runDocId } = await createPremortem({ status: "running", payload: parsedInput }, jobId);
8882
8875
  const timeoutMs = 10 * 60 * 1e3;
8883
8876
  const result = await Promise.race([
8884
- runRolesAndSummarize(parsedInput, { includeDiagnostics: true }),
8877
+ cfPremortemRun(parsedInput),
8885
8878
  new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), timeoutMs))
8886
8879
  ]);
8887
8880
  await updatePremortem(runDocId, { status: "completed", result });
@@ -8931,7 +8924,7 @@ Competitive threats: ${competitors}` : ""
8931
8924
  ftInput.productId = ftDocId;
8932
8925
  const ftTimeoutMs = 10 * 60 * 1e3;
8933
8926
  const ftResult = await Promise.race([
8934
- runRolesAndSummarize(ftInput, { includeDiagnostics: true }),
8927
+ cfPremortemRun(ftInput),
8935
8928
  new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), ftTimeoutMs))
8936
8929
  ]);
8937
8930
  await updatePremortem(ftDocId, { status: "completed", result: ftResult });
@@ -8987,11 +8980,8 @@ Competitive threats: ${competitors}` : ""
8987
8980
  if (!kickInput.productId)
8988
8981
  kickInput.productId = jobId;
8989
8982
  await updatePremortem(jobId, { status: "running", payload: kickInput });
8990
- const update = async (patch) => {
8991
- await updatePremortem(jobId, patch);
8992
- };
8993
8983
  const result = await Promise.race([
8994
- runRolesAndSummarizeIncremental(kickInput, update),
8984
+ cfPremortemRun(kickInput),
8995
8985
  new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 10 * 60 * 1e3))
8996
8986
  ]);
8997
8987
  const doc = PMJsonSchema.parse(result);
@@ -9011,74 +9001,67 @@ Competitive threats: ${competitors}` : ""
9011
9001
  return { content: [{ type: "text", text: JSON.stringify(premortems, null, 2) }] };
9012
9002
  }
9013
9003
  case "premortem_render_pdf": {
9014
- const { doc, store = true } = args;
9004
+ const { doc } = args;
9015
9005
  const parsedDoc = PMJsonSchema.parse(doc);
9016
- const bytes = await buildPdfBuffer(parsedDoc);
9017
- if (store) {
9018
- const uploaded = await uploadAndSign(bytes, parsedDoc?.project?.name || "premortem");
9019
- if (uploaded?.url) {
9020
- return { content: [{ type: "text", text: JSON.stringify({ url: uploaded.url }) }] };
9021
- }
9022
- }
9023
- const base64 = Buffer.from(bytes).toString("base64");
9024
- return { content: [{ type: "text", text: JSON.stringify({ dataUrl: `data:application/pdf;base64,${base64}` }) }] };
9006
+ const result = await cfBuildAndUploadPdf(parsedDoc);
9007
+ return { content: [{ type: "text", text: JSON.stringify(result) }] };
9025
9008
  }
9026
9009
  case "premortem_qa": {
9027
9010
  const { question, doc } = args;
9028
- const result = await generateAnswer(question, doc);
9011
+ const result = await cfGenerateAnswer(question, doc);
9029
9012
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
9030
9013
  }
9031
9014
  case "premortem_regen_assumptions": {
9032
9015
  const { input, doc } = args;
9033
- const out = await regenerateAssumptions(input, doc);
9016
+ const out = await cfRegenAssumptions(input, doc);
9034
9017
  return { content: [{ type: "text", text: JSON.stringify(out) }] };
9035
9018
  }
9036
9019
  case "premortem_regen_experiments": {
9037
9020
  const { input, doc } = args;
9038
- const out = await regenerateExperiments(input, doc);
9021
+ const out = await cfRegenExperiments(input, doc);
9039
9022
  return { content: [{ type: "text", text: JSON.stringify(out) }] };
9040
9023
  }
9041
9024
  // Personas tools
9042
9025
  case "personas_list": {
9043
9026
  const { productId } = args;
9044
- const personas = await listPersonas(effectiveUid, productId);
9027
+ const personas = await listPersonas(productId);
9045
9028
  return { content: [{ type: "text", text: JSON.stringify({ personas }) }] };
9046
9029
  }
9047
9030
  case "personas_get": {
9048
9031
  const { personaId } = args;
9049
- const persona = await getPersona(effectiveUid, personaId);
9032
+ const persona = await getPersona(personaId);
9050
9033
  return { content: [{ type: "text", text: JSON.stringify({ persona }) }] };
9051
9034
  }
9052
9035
  case "personas_chat": {
9053
9036
  const { persona, userMessage, product, conversationHistory } = args;
9054
- const result = await chatWithPersona(persona, userMessage, product, conversationHistory);
9037
+ const result = await cfChatWithPersona(persona, userMessage, product, conversationHistory);
9055
9038
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
9056
9039
  }
9057
9040
  // Wiki tools
9058
9041
  case "wiki_load": {
9059
9042
  const { projectId } = args;
9060
- const markdown = await getWikiMarkdown(projectId);
9043
+ const markdown = await cfGetWikiMarkdown(projectId);
9061
9044
  return { content: [{ type: "text", text: JSON.stringify({ markdown }) }] };
9062
9045
  }
9063
9046
  case "wiki_save": {
9064
9047
  const { projectId, markdown } = args;
9065
- await saveWikiMarkdown(projectId, markdown, effectiveUid);
9048
+ await cfSaveWikiMarkdown(projectId, markdown);
9066
9049
  return { content: [{ type: "text", text: JSON.stringify({ ok: true }) }] };
9067
9050
  }
9068
9051
  case "wiki_apply_edits": {
9069
9052
  const { edits } = args;
9070
- const result = await applyEditsLogic(edits);
9053
+ const result = await cfApplyEdits(edits);
9071
9054
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
9072
9055
  }
9073
9056
  case "agent_chat": {
9074
9057
  const { prompt, wikiMarkdown } = args;
9075
- const text = await generateChatSuggestion(prompt, wikiMarkdown);
9058
+ const text = await cfGenerateChatSuggestion(prompt, wikiMarkdown);
9076
9059
  return { content: [{ type: "text", text: JSON.stringify({ text }) }] };
9077
9060
  }
9078
9061
  // Integrations
9079
9062
  case "integrations_create_issues": {
9080
9063
  const { schema_json, limit } = args;
9081
- const result = await createLinearIssues(schema_json, limit);
9064
+ const result = await cfCreateLinearIssues(schema_json, limit);
9082
9065
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
9083
9066
  }
9084
9067
  // ─────────────────────────────────────────────────────────────────
@@ -9195,7 +9178,7 @@ Meta: ${JSON.stringify(output.meta)}` }
9195
9178
  if (!persona_id || !product_id) {
9196
9179
  throw new McpError(ErrorCode.InvalidParams, "persona_id and product_id are required");
9197
9180
  }
9198
- const persona = await getPersona(effectiveUid, persona_id);
9181
+ const persona = await getPersona(persona_id);
9199
9182
  if (!persona) {
9200
9183
  throw new McpError(ErrorCode.InvalidRequest, "Persona not found");
9201
9184
  }
@@ -9220,7 +9203,7 @@ Meta: ${JSON.stringify(output.meta)}` }
9220
9203
  if (!wiki_id || !product_id) {
9221
9204
  throw new McpError(ErrorCode.InvalidParams, "wiki_id and product_id are required");
9222
9205
  }
9223
- const markdown = await getWikiMarkdown(wiki_id);
9206
+ const markdown = await cfGetWikiMarkdown(wiki_id);
9224
9207
  if (!markdown) {
9225
9208
  throw new McpError(ErrorCode.InvalidRequest, "Wiki not found or empty");
9226
9209
  }
@@ -9885,7 +9868,7 @@ Meta: ${JSON.stringify(output.meta)}` }
9885
9868
  deepDiveData = ddData.result;
9886
9869
  }
9887
9870
  }
9888
- const response = await generateTemplateResponse(message, {
9871
+ const response = await cfGenerateTemplateResponse(message, {
9889
9872
  templateType: templateData.type,
9890
9873
  currentAct: templateData.discoverySession?.currentAct || 1,
9891
9874
  deepDiveData,
@@ -3,6 +3,21 @@ import {
3
3
  addEntity,
4
4
  addNodes,
5
5
  addTestCases,
6
+ cfApplyEdits,
7
+ cfBuildAndUploadPdf,
8
+ cfChatWithPersona,
9
+ cfCreateLinearIssues,
10
+ cfGenerateAnswer,
11
+ cfGenerateChatSuggestion,
12
+ cfGenerateExplorationResponse,
13
+ cfGenerateTemplateResponse,
14
+ cfGenerateTrialRun,
15
+ cfGetWikiMarkdown,
16
+ cfPremortemRun,
17
+ cfPremortemStart,
18
+ cfRegenAssumptions,
19
+ cfRegenExperiments,
20
+ cfSaveWikiMarkdown,
6
21
  createExplorationSession,
7
22
  createPremortem,
8
23
  createTemplate,
@@ -27,6 +42,7 @@ import {
27
42
  getNodesMissingEmbeddings,
28
43
  getNodesWithEmbeddings,
29
44
  getPersona,
45
+ getPodcastIntroductions,
30
46
  getPremortem,
31
47
  getReadinessReport,
32
48
  getScanRateLimit,
@@ -55,13 +71,27 @@ import {
55
71
  upsertEdges,
56
72
  upsertEntities,
57
73
  upsertNodes
58
- } from "./chunk-PQUAX5YW.js";
59
- import "./chunk-NUBIEJTU.js";
74
+ } from "./chunk-7N4HJ3KR.js";
60
75
  export {
61
76
  addEdges,
62
77
  addEntity,
63
78
  addNodes,
64
79
  addTestCases,
80
+ cfApplyEdits,
81
+ cfBuildAndUploadPdf,
82
+ cfChatWithPersona,
83
+ cfCreateLinearIssues,
84
+ cfGenerateAnswer,
85
+ cfGenerateChatSuggestion,
86
+ cfGenerateExplorationResponse,
87
+ cfGenerateTemplateResponse,
88
+ cfGenerateTrialRun,
89
+ cfGetWikiMarkdown,
90
+ cfPremortemRun,
91
+ cfPremortemStart,
92
+ cfRegenAssumptions,
93
+ cfRegenExperiments,
94
+ cfSaveWikiMarkdown,
65
95
  createExplorationSession,
66
96
  createPremortem,
67
97
  createTemplate,
@@ -86,6 +116,7 @@ export {
86
116
  getNodesMissingEmbeddings,
87
117
  getNodesWithEmbeddings,
88
118
  getPersona,
119
+ getPodcastIntroductions,
89
120
  getPremortem,
90
121
  getReadinessReport,
91
122
  getScanRateLimit,
@@ -8,13 +8,11 @@ import {
8
8
  createExplorationSession,
9
9
  getExplorationSession,
10
10
  listExplorationSessions,
11
- updateExplorationSession
12
- } from "./chunk-PQUAX5YW.js";
13
- import {
14
11
  mapErrorToMcp,
15
12
  requirePremiumWithAutoAuth,
13
+ updateExplorationSession,
16
14
  validateRequestSize
17
- } from "./chunk-NUBIEJTU.js";
15
+ } from "./chunk-7N4HJ3KR.js";
18
16
 
19
17
  // ../mcp/dist/mcp/src/exploration-server.js
20
18
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";