copilotkit 0.0.43-alpha.1 → 0.0.44

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.
Files changed (45) hide show
  1. package/dist/commands/base-command.js +1 -1
  2. package/dist/commands/base-command.js.map +1 -1
  3. package/dist/commands/create.d.ts +1 -0
  4. package/dist/commands/create.js +45 -19
  5. package/dist/commands/create.js.map +1 -1
  6. package/dist/commands/dev.js +1 -17
  7. package/dist/commands/dev.js.map +1 -1
  8. package/dist/commands/init.d.ts +2 -6
  9. package/dist/commands/init.js +299 -378
  10. package/dist/commands/init.js.map +1 -1
  11. package/dist/commands/login.js +1 -17
  12. package/dist/commands/login.js.map +1 -1
  13. package/dist/commands/logout.js +1 -17
  14. package/dist/commands/logout.js.map +1 -1
  15. package/dist/lib/init/index.d.ts +2 -2
  16. package/dist/lib/init/index.js +198 -234
  17. package/dist/lib/init/index.js.map +1 -1
  18. package/dist/lib/init/questions.d.ts +1 -3
  19. package/dist/lib/init/questions.js +183 -211
  20. package/dist/lib/init/questions.js.map +1 -1
  21. package/dist/lib/init/scaffold/env.js +3 -13
  22. package/dist/lib/init/scaffold/env.js.map +1 -1
  23. package/dist/lib/init/scaffold/index.js +24 -35
  24. package/dist/lib/init/scaffold/index.js.map +1 -1
  25. package/dist/lib/init/scaffold/shadcn.js +21 -22
  26. package/dist/lib/init/scaffold/shadcn.js.map +1 -1
  27. package/dist/lib/init/types/index.d.ts +1 -1
  28. package/dist/lib/init/types/index.js +9 -16
  29. package/dist/lib/init/types/index.js.map +1 -1
  30. package/dist/lib/init/types/questions.d.ts +9 -11
  31. package/dist/lib/init/types/questions.js +7 -14
  32. package/dist/lib/init/types/questions.js.map +1 -1
  33. package/dist/lib/init/types/templates.js +2 -2
  34. package/dist/lib/init/types/templates.js.map +1 -1
  35. package/dist/services/analytics.service.d.ts +0 -4
  36. package/dist/services/analytics.service.js +0 -16
  37. package/dist/services/analytics.service.js.map +1 -1
  38. package/dist/services/auth.service.js +0 -16
  39. package/dist/services/auth.service.js.map +1 -1
  40. package/dist/services/events.d.ts +15 -23
  41. package/dist/utils/version.d.ts +1 -1
  42. package/dist/utils/version.js +1 -1
  43. package/dist/utils/version.js.map +1 -1
  44. package/oclif.manifest.json +28 -16
  45. package/package.json +1 -1
@@ -14,7 +14,6 @@ var CHAT_COMPONENTS = ["CopilotChat", "CopilotSidebar", "Headless", "CopilotPopu
14
14
  var LANGGRAPH_AGENTS = ["Python Starter", "TypeScript Starter"];
15
15
  var CREW_FLOW_TEMPLATES = ["Starter"];
16
16
  var YES_NO = ["Yes", "No"];
17
- var DEPLOYMENT_CHOICES = ["Copilot Cloud", "Self-hosted"];
18
17
  var sanitizers = {
19
18
  // Remove trailing slash from URLs
20
19
  url: (value) => {
@@ -43,7 +42,6 @@ var ChatComponentSchema = z.enum(CHAT_COMPONENTS);
43
42
  var LangGraphAgentSchema = z.enum(LANGGRAPH_AGENTS);
44
43
  var CrewFlowTemplateSchema = z.enum(CREW_FLOW_TEMPLATES);
45
44
  var YesNoSchema = z.enum(YES_NO);
46
- var DeploymentChoiceSchema = z.enum(DEPLOYMENT_CHOICES);
47
45
  var UrlSchema = z.preprocess(
48
46
  (val) => sanitizers.url(String(val)),
49
47
  z.string().url("Please enter a valid URL").min(1, "URL is required")
@@ -56,6 +54,8 @@ var ApiKeySchema = z.preprocess(
56
54
  var LLMApiKeySchema = z.preprocess((val) => sanitizers.apiKey(String(val)), z.string().optional());
57
55
  var NameSchema = z.preprocess((val) => sanitizers.trim(String(val)), z.string().min(1, "Name is required"));
58
56
  var ConfigSchema = z.object({
57
+ // NEW: Early signup field
58
+ signupForCopilotCloud: YesNoSchema.optional(),
59
59
  // Core fields
60
60
  copilotKitVersion: z.string().optional(),
61
61
  mode: ModeSchema,
@@ -63,7 +63,6 @@ var ConfigSchema = z.object({
63
63
  // Yes/No fields
64
64
  alreadyDeployed: YesNoSchema.optional(),
65
65
  fastApiEnabled: YesNoSchema.optional(),
66
- // DEPRECATED: useCopilotCloud - consolidated with signupForCopilotCloud
67
66
  useCopilotCloud: YesNoSchema.optional(),
68
67
  // LangGraph specific fields
69
68
  langGraphAgent: LangGraphAgentSchema.optional(),
@@ -81,10 +80,7 @@ var ConfigSchema = z.object({
81
80
  llmToken: LLMApiKeySchema.optional(),
82
81
  // IDE Documentation setup fields
83
82
  setupIDEDocs: YesNoSchema.optional(),
84
- selectedIDE: z.union([z.enum(["cursor", "windsurf"]), z.literal("skip")]).optional(),
85
- // NEW: A/B/C test fields
86
- deploymentChoice: DeploymentChoiceSchema.optional()
87
- // For branch B only (Cloud vs Self-hosted)
83
+ selectedIDE: z.union([z.enum(["cursor", "windsurf"]), z.literal("skip")]).optional()
88
84
  }).refine(
89
85
  (data) => {
90
86
  if (data.mode === "CrewAI") {
@@ -110,6 +106,10 @@ var ConfigSchema = z.object({
110
106
  );
111
107
  var ConfigFlags = {
112
108
  booth: Flags.boolean({ description: "Use CopilotKit in booth mode", default: false, char: "b" }),
109
+ "signup-for-copilot-cloud": Flags.string({
110
+ description: "Sign up for Copilot Cloud for error tracking and debugging insights",
111
+ options: YES_NO
112
+ }),
113
113
  mode: Flags.string({ description: "How you will be interacting with AI", options: MODES, char: "m" }),
114
114
  "copilotkit-version": Flags.string({ description: "CopilotKit version to use (e.g. 1.7.0)" }),
115
115
  "use-copilot-cloud": Flags.string({ description: "Use Copilot Cloud for production-ready hosting", options: YES_NO }),
@@ -124,11 +124,6 @@ var ConfigFlags = {
124
124
  "selected-ide": Flags.string({
125
125
  description: "IDE to configure with documentation rules",
126
126
  options: ["cursor", "windsurf", "skip"]
127
- }),
128
- // NEW: A/B/C test flags
129
- "deployment-choice": Flags.string({
130
- description: "Choose between Copilot Cloud or Self-hosted deployment",
131
- options: DEPLOYMENT_CHOICES
132
127
  })
133
128
  };
134
129
 
@@ -136,8 +131,8 @@ var ConfigFlags = {
136
131
  var BASE_URL = "https://registry.copilotkit.ai/r";
137
132
  var templateMapping = {
138
133
  // Runtimes
139
- RemoteEndpoint: `${BASE_URL}/remote-endpoint.json`,
140
- LangGraphPlatformRuntime: `${BASE_URL}/langgraph-platform-runtime.json`,
134
+ RemoteEndpoint: `${BASE_URL}/remote-endpoint-starter.json`,
135
+ LangGraphPlatformRuntime: `${BASE_URL}/langgraph-platform-starter.json`,
141
136
  // CrewAI
142
137
  CrewEnterprise: [`${BASE_URL}/coagents-crew-starter.json`],
143
138
  CrewFlowsEnterprise: [`${BASE_URL}/coagents-starter-crewai-flows.json`],
@@ -317,212 +312,190 @@ var validateUrl = (input) => {
317
312
  var validateRequired = (input) => {
318
313
  return sanitizers.trim(input) ? true : "This field is required";
319
314
  };
320
- function getQuestionsForBranch(branch) {
321
- const baseQuestions = getBaseQuestions();
322
- switch (branch) {
323
- case "A":
324
- return [...baseQuestions];
325
- case "B":
326
- return [...baseQuestions, ...getDeploymentChoiceQuestions()];
327
- case "C":
328
- default:
329
- return [...baseQuestions, ...getCloudDeploymentQuestions()];
330
- }
331
- }
332
- function getBaseQuestions() {
333
- return [
334
- {
335
- type: "select",
336
- name: "mode",
337
- message: "\u{1F916} How will you be interacting with AI?",
338
- choices: Array.from(MODES),
339
- validate: (input) => {
340
- try {
341
- ModeSchema.parse(input);
342
- return true;
343
- } catch (error) {
344
- return "Please select a valid mode";
345
- }
315
+ var questions = [
316
+ // NEW: Early signup question - first question for maximum visibility
317
+ {
318
+ type: "yes/no",
319
+ name: "signupForCopilotCloud",
320
+ message: "\u{1FA81} Sign up for Copilot Cloud to enable error tracking and get production-ready hosting? (Recommended)",
321
+ validate: (input) => {
322
+ try {
323
+ YesNoSchema.parse(input);
324
+ return true;
325
+ } catch (error) {
326
+ return "Please select Yes or No";
346
327
  }
347
- },
348
- // CrewAI specific questions
349
- {
350
- type: "select",
351
- name: "crewType",
352
- message: "\u{1F465} What kind of CrewAI implementation would you like to use?",
353
- choices: Array.from(CREW_TYPES),
354
- when: (answers) => answers.mode === "CrewAI",
355
- validate: (input) => {
356
- try {
357
- CrewTypeSchema.parse(input);
358
- return true;
359
- } catch (error) {
360
- return "Please select a valid crew type";
361
- }
328
+ }
329
+ },
330
+ // Core setup questions - always shown after signup
331
+ {
332
+ type: "select",
333
+ name: "mode",
334
+ message: "\u{1F916} How will you be interacting with AI?",
335
+ choices: Array.from(MODES),
336
+ validate: (input) => {
337
+ try {
338
+ ModeSchema.parse(input);
339
+ return true;
340
+ } catch (error) {
341
+ return "Please select a valid mode";
362
342
  }
363
- },
364
- {
365
- type: "input",
366
- name: "crewName",
367
- message: "\u{1F465} What would you like to name your crew? (can be anything)",
368
- when: (answers) => answers.mode === "CrewAI",
369
- default: "MyCopilotCrew",
370
- validate: validateRequired,
371
- sanitize: sanitizers.trim
372
- },
373
- {
374
- type: "input",
375
- name: "crewUrl",
376
- message: "\u{1F517} Enter your Crew's Enterprise URL (more info at https://app.crewai.com):",
377
- when: (answers) => answers.mode === "CrewAI",
378
- validate: validateUrl,
379
- sanitize: sanitizers.url
380
- },
381
- {
382
- type: "input",
383
- name: "crewBearerToken",
384
- message: "\u{1F511} Enter your Crew's bearer token:",
385
- when: (answers) => answers.mode === "CrewAI",
386
- sensitive: true,
387
- validate: validateRequired,
388
- sanitize: sanitizers.trim
389
- },
390
- // LangGraph specific questions
391
- {
392
- type: "yes/no",
393
- name: "alreadyDeployed",
394
- message: "\u{1F99C}\u{1F517} Do you have an existing LangGraph agent?",
395
- when: (answers) => answers.mode === "LangGraph",
396
- validate: (input) => {
397
- try {
398
- YesNoSchema.parse(input);
399
- return true;
400
- } catch (error) {
401
- return "Please select Yes or No";
402
- }
343
+ }
344
+ },
345
+ // CrewAI specific questions - shown when CrewAI selected
346
+ {
347
+ type: "select",
348
+ name: "crewType",
349
+ message: "\u{1F465} What kind of CrewAI implementation would you like to use?",
350
+ choices: Array.from(CREW_TYPES),
351
+ when: (answers) => answers.mode === "CrewAI",
352
+ validate: (input) => {
353
+ try {
354
+ CrewTypeSchema.parse(input);
355
+ return true;
356
+ } catch (error) {
357
+ return "Please select a valid crew type";
403
358
  }
404
- },
405
- {
406
- type: "yes/no",
407
- name: "langGraphPlatform",
408
- message: "\u{1F99C}\u{1F517} Do you already have a LangGraph Agent URL? (remote or localhost)",
409
- when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "Yes",
410
- validate: (input) => {
411
- try {
412
- YesNoSchema.parse(input);
413
- return true;
414
- } catch (error) {
415
- return "Please select Yes or No";
416
- }
359
+ }
360
+ },
361
+ // CrewAI specific questions - shown when CrewAI Crews or Flows selected
362
+ {
363
+ type: "input",
364
+ name: "crewName",
365
+ message: "\u{1F465} What would you like to name your crew? (can be anything)",
366
+ when: (answers) => answers.mode === "CrewAI",
367
+ default: "MyCopilotCrew",
368
+ validate: validateRequired,
369
+ sanitize: sanitizers.trim
370
+ },
371
+ {
372
+ type: "input",
373
+ name: "crewUrl",
374
+ message: "\u{1F517} Enter your Crew's Enterprise URL (more info at https://app.crewai.com):",
375
+ when: (answers) => answers.mode === "CrewAI",
376
+ validate: validateUrl,
377
+ sanitize: sanitizers.url
378
+ },
379
+ {
380
+ type: "input",
381
+ name: "crewBearerToken",
382
+ message: "\u{1F511} Enter your Crew's bearer token:",
383
+ when: (answers) => answers.mode === "CrewAI",
384
+ sensitive: true,
385
+ validate: validateRequired,
386
+ sanitize: sanitizers.trim
387
+ },
388
+ // LangGraph specific questions - shown when LangGraph selected
389
+ {
390
+ type: "yes/no",
391
+ name: "alreadyDeployed",
392
+ message: "\u{1F99C}\u{1F517} Do you have an existing LangGraph agent?",
393
+ when: (answers) => answers.mode === "LangGraph",
394
+ validate: (input) => {
395
+ try {
396
+ YesNoSchema.parse(input);
397
+ return true;
398
+ } catch (error) {
399
+ return "Please select Yes or No";
417
400
  }
418
- },
419
- {
420
- type: "input",
421
- name: "langGraphPlatformUrl",
422
- message: "\u{1F99C}\u{1F517} Enter your LangGraph Agent URL (remote or localhost)",
423
- when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "Yes" && answers.langGraphPlatform === "Yes",
424
- validate: validateUrl,
425
- sanitize: sanitizers.url
426
- },
427
- {
428
- type: "select",
429
- name: "langGraphAgent",
430
- message: "\u{1F4E6} Choose a LangGraph starter template:",
431
- choices: Array.from(LANGGRAPH_AGENTS),
432
- when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "No"
433
- },
434
- {
435
- type: "input",
436
- name: "langSmithApiKey",
437
- message: "\u{1F99C}\u{1F517} Enter your LangSmith API key (required by LangGraph Platform) :",
438
- when: (answers) => answers.mode === "LangGraph" && answers.langGraphPlatform === "Yes" && !(answers.langGraphPlatformUrl && isLocalhost(answers.langGraphPlatformUrl)),
439
- sensitive: true,
440
- validate: validateRequired,
441
- sanitize: sanitizers.apiKey
442
- },
443
- // LLM Token for self-hosted setups
444
- {
445
- type: "input",
446
- name: "llmToken",
447
- message: "\u{1F511} Enter your OpenAI API key (optional - leave empty to configure your LLM later):",
448
- when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "No" || answers.mode === "Standard" && answers.deploymentChoice === "Self-hosted" || answers.mode === "MCP" && answers.deploymentChoice === "Self-hosted" || answers.mode === "Standard" && answers.useCopilotCloud !== "Yes" || answers.mode === "MCP" && answers.useCopilotCloud !== "Yes",
449
- sensitive: true,
450
- sanitize: sanitizers.apiKey
451
- },
452
- // IDE Documentation Setup Questions
453
- {
454
- type: "yes/no",
455
- name: "setupIDEDocs",
456
- message: "\u{1F4DA} Would you like to add CopilotKit documentation to your IDE? (Provides AI assistant with CopilotKit context)",
457
- when: async () => {
458
- const installedIDEs = await detectInstalledIDEs();
459
- return installedIDEs.length > 0;
460
- },
461
- validate: (input) => {
462
- try {
463
- YesNoSchema.parse(input);
464
- return true;
465
- } catch (error) {
466
- return "Please select Yes or No";
467
- }
401
+ }
402
+ },
403
+ {
404
+ type: "yes/no",
405
+ name: "langGraphPlatform",
406
+ message: "\u{1F99C}\u{1F517} Do you already have a LangGraph Agent URL? (remote or localhost)",
407
+ when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "Yes",
408
+ validate: (input) => {
409
+ try {
410
+ YesNoSchema.parse(input);
411
+ return true;
412
+ } catch (error) {
413
+ return "Please select Yes or No";
468
414
  }
469
- },
470
- {
471
- type: "select",
472
- name: "selectedIDE",
473
- message: "\u{1F4BB} Which IDE would you like to configure with CopilotKit documentation?",
474
- choices: async () => {
475
- const installedIDEs = await detectInstalledIDEs();
476
- const choices = installedIDEs.map((ide) => ({
477
- name: IDE_DOCS_CONFIGS[ide].displayName,
478
- value: ide
479
- }));
480
- choices.push({ name: "Skip", value: "skip" });
481
- return choices;
482
- },
483
- when: (answers) => answers.setupIDEDocs === "Yes"
484
415
  }
485
- ];
486
- }
487
- function getDeploymentChoiceQuestions() {
488
- return [
489
- {
490
- type: "select",
491
- name: "deploymentChoice",
492
- message: "\u{1F680} Use Copilot Cloud, or self-hosted?",
493
- choices: Array.from(DEPLOYMENT_CHOICES),
494
- validate: (input) => {
495
- try {
496
- DeploymentChoiceSchema.parse(input);
497
- return true;
498
- } catch (error) {
499
- return "Please select a valid deployment option";
500
- }
416
+ },
417
+ {
418
+ type: "input",
419
+ name: "langGraphPlatformUrl",
420
+ message: "\u{1F99C}\u{1F517} Enter your LangGraph Agent URL (remote or localhost)",
421
+ when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "Yes" && answers.langGraphPlatform === "Yes",
422
+ validate: validateUrl,
423
+ sanitize: sanitizers.url
424
+ },
425
+ {
426
+ type: "select",
427
+ name: "langGraphAgent",
428
+ message: "\u{1F4E6} Choose a LangGraph starter template:",
429
+ choices: Array.from(LANGGRAPH_AGENTS),
430
+ when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "No"
431
+ },
432
+ {
433
+ type: "input",
434
+ name: "langSmithApiKey",
435
+ message: "\u{1F99C}\u{1F517} Enter your LangSmith API key (required by LangGraph Platform) :",
436
+ when: (answers) => answers.mode === "LangGraph" && answers.langGraphPlatform === "Yes" && !(answers.langGraphPlatformUrl && isLocalhost(answers.langGraphPlatformUrl)),
437
+ sensitive: true,
438
+ validate: validateRequired,
439
+ sanitize: sanitizers.apiKey
440
+ },
441
+ // Deployment options
442
+ {
443
+ type: "yes/no",
444
+ name: "useCopilotCloud",
445
+ message: "\u{1FA81} Deploy with Copilot Cloud? (recommended for production)",
446
+ when: (answers) => answers.mode === "Standard" || answers.mode === "MCP" || answers.mode !== "CrewAI" && // Crews only cloud, flows are self-hosted
447
+ answers.alreadyDeployed === "Yes" && answers.langGraphPlatform !== "No" && !linkToDocs.includes(answers.mode || "") && !isLocalhost(answers.langGraphPlatformUrl || ""),
448
+ validate: (input) => {
449
+ try {
450
+ YesNoSchema.parse(input);
451
+ return true;
452
+ } catch (error) {
453
+ return "Please select Yes or No";
501
454
  }
502
455
  }
503
- ];
504
- }
505
- function getCloudDeploymentQuestions() {
506
- return [
507
- {
508
- type: "yes/no",
509
- name: "useCopilotCloud",
510
- message: "\u{1FA81} Deploy with Copilot Cloud? (recommended for production)",
511
- when: (answers) => answers.mode === "Standard" || answers.mode === "MCP" || answers.mode === "LangGraph" && answers.alreadyDeployed === "No" || // Include new LangGraph agents
512
- answers.mode !== "CrewAI" && // Crews only cloud, flows are self-hosted
513
- answers.alreadyDeployed === "Yes" && answers.langGraphPlatform !== "No" && !linkToDocs.includes(answers.mode || "") && !isLocalhost(answers.langGraphPlatformUrl || ""),
514
- validate: (input) => {
515
- try {
516
- YesNoSchema.parse(input);
517
- return true;
518
- } catch (error) {
519
- return "Please select Yes or No";
520
- }
456
+ },
457
+ {
458
+ type: "input",
459
+ name: "llmToken",
460
+ message: "\u{1F511} Enter your OpenAI API key (optional - leave empty to configure your LLM later):",
461
+ when: (answers) => answers.mode === "LangGraph" && answers.alreadyDeployed === "No" || answers.mode === "Standard" && answers.useCopilotCloud !== "Yes" || answers.mode === "MCP" && answers.useCopilotCloud !== "Yes",
462
+ sensitive: true,
463
+ sanitize: sanitizers.apiKey
464
+ },
465
+ // IDE Documentation Setup Questions
466
+ {
467
+ type: "yes/no",
468
+ name: "setupIDEDocs",
469
+ message: "\u{1F4DA} Would you like to add CopilotKit documentation to your IDE? (Provides AI assistant with CopilotKit context)",
470
+ when: async () => {
471
+ const installedIDEs = await detectInstalledIDEs();
472
+ return installedIDEs.length > 0;
473
+ },
474
+ validate: (input) => {
475
+ try {
476
+ YesNoSchema.parse(input);
477
+ return true;
478
+ } catch (error) {
479
+ return "Please select Yes or No";
521
480
  }
522
481
  }
523
- ];
524
- }
525
- var questions = getQuestionsForBranch("C");
482
+ },
483
+ {
484
+ type: "select",
485
+ name: "selectedIDE",
486
+ message: "\u{1F4BB} Which IDE would you like to configure with CopilotKit documentation?",
487
+ choices: async () => {
488
+ const installedIDEs = await detectInstalledIDEs();
489
+ const choices = installedIDEs.map((ide) => ({
490
+ name: IDE_DOCS_CONFIGS[ide].displayName,
491
+ value: ide
492
+ }));
493
+ choices.push({ name: "Skip", value: "skip" });
494
+ return choices;
495
+ },
496
+ when: (answers) => answers.setupIDEDocs === "Yes"
497
+ }
498
+ ];
526
499
 
527
500
  // src/lib/init/scaffold/shadcn.ts
528
501
  import spawn from "cross-spawn";
@@ -531,12 +504,16 @@ async function scaffoldShadCN(flags, userAnswers) {
531
504
  const components = [];
532
505
  switch (userAnswers.mode) {
533
506
  case "LangGraph":
534
- components.push(templateMapping.LangGraphGeneric);
535
- if (userAnswers.deploymentChoice === "Self-hosted" || userAnswers.useCopilotCloud === "No") {
536
- if (userAnswers.langGraphPlatform === "Yes") {
537
- components.push(templateMapping.LangGraphPlatformRuntime);
538
- } else {
539
- components.push(templateMapping.RemoteEndpoint);
507
+ if (userAnswers.langGraphAgent || flags.booth) {
508
+ components.push(...templateMapping.LangGraphStarter);
509
+ } else {
510
+ components.push(templateMapping.LangGraphGeneric);
511
+ if (userAnswers.useCopilotCloud !== "Yes") {
512
+ if (userAnswers.langGraphPlatform === "Yes") {
513
+ components.push(templateMapping.LangGraphPlatformRuntime);
514
+ } else {
515
+ components.push(templateMapping.RemoteEndpoint);
516
+ }
540
517
  }
541
518
  }
542
519
  break;
@@ -551,13 +528,13 @@ async function scaffoldShadCN(flags, userAnswers) {
551
528
  break;
552
529
  case "MCP":
553
530
  components.push(templateMapping.McpStarter);
554
- if (userAnswers.deploymentChoice === "Self-hosted" || userAnswers.useCopilotCloud === "No") {
531
+ if (userAnswers.useCopilotCloud !== "Yes") {
555
532
  components.push(templateMapping.McpRuntime);
556
533
  }
557
534
  break;
558
535
  case "Standard":
559
536
  components.push(templateMapping.StandardStarter);
560
- if (userAnswers.deploymentChoice === "Self-hosted" || userAnswers.useCopilotCloud === "No") {
537
+ if (userAnswers.useCopilotCloud !== "Yes") {
561
538
  components.push(templateMapping.StandardRuntime);
562
539
  }
563
540
  break;
@@ -607,12 +584,6 @@ async function getLangGraphAgents(url, langSmithApiKey) {
607
584
 
608
585
  // src/lib/init/scaffold/env.ts
609
586
  import inquirer from "inquirer";
610
- function needsCloudDeployment(userAnswers) {
611
- return userAnswers.deploymentChoice === "Copilot Cloud" || // Branch B choice
612
- userAnswers.useCopilotCloud === "Yes" || // Branch C choice
613
- userAnswers.mode === "CrewAI" || // CrewAI always needs cloud
614
- !userAnswers.deploymentChoice && !userAnswers.useCopilotCloud;
615
- }
616
587
  async function scaffoldEnv(flags, userAnswers) {
617
588
  try {
618
589
  const envFile = path2.join(process.cwd(), ".env");
@@ -621,7 +592,6 @@ async function scaffoldEnv(flags, userAnswers) {
621
592
  } else {
622
593
  }
623
594
  let newEnvValues = "";
624
- const isCloudDeployment = needsCloudDeployment(userAnswers);
625
595
  if (userAnswers.copilotCloudPublicApiKey) {
626
596
  newEnvValues += `NEXT_PUBLIC_COPILOT_API_KEY=${userAnswers.copilotCloudPublicApiKey}
627
597
  `;
@@ -643,7 +613,7 @@ async function scaffoldEnv(flags, userAnswers) {
643
613
  `;
644
614
  newEnvValues += `LANGGRAPH_DEPLOYMENT_URL=http://localhost:8123
645
615
  `;
646
- } else if (userAnswers.langGraphPlatform === "Yes" && !isCloudDeployment) {
616
+ } else if (userAnswers.langGraphPlatform === "Yes" && userAnswers.useCopilotCloud !== "Yes") {
647
617
  newEnvValues += `LANGGRAPH_DEPLOYMENT_URL=${userAnswers.langGraphPlatformUrl}
648
618
  `;
649
619
  } else if (userAnswers.langGraphRemoteEndpointURL) {
@@ -653,15 +623,12 @@ async function scaffoldEnv(flags, userAnswers) {
653
623
  if (flags.runtimeUrl) {
654
624
  newEnvValues += `NEXT_PUBLIC_COPILOTKIT_RUNTIME_URL=${flags.runtimeUrl}
655
625
  `;
656
- } else if (!isCloudDeployment && userAnswers.crewType !== "Crews" && userAnswers.crewType !== "Flows") {
626
+ } else if (userAnswers.useCopilotCloud !== "Yes" && userAnswers.crewType !== "Crews" && userAnswers.crewType !== "Flows") {
657
627
  newEnvValues += `NEXT_PUBLIC_COPILOTKIT_RUNTIME_URL=/api/copilotkit
658
628
  `;
659
629
  }
660
630
  if (userAnswers.langGraphPlatformUrl && (userAnswers.langSmithApiKey || isLocalhost(userAnswers.langGraphPlatformUrl))) {
661
- const langGraphAgents = await getLangGraphAgents(
662
- userAnswers.langGraphPlatformUrl,
663
- userAnswers.langSmithApiKey || ""
664
- );
631
+ const langGraphAgents = await getLangGraphAgents(userAnswers.langGraphPlatformUrl, userAnswers.langSmithApiKey || "");
665
632
  let langGraphAgent = "";
666
633
  if (langGraphAgents.length > 1) {
667
634
  const { langGraphAgentChoice } = await inquirer.prompt([
@@ -970,8 +937,6 @@ export {
970
937
  ConfigSchema,
971
938
  CrewFlowTemplateSchema,
972
939
  CrewTypeSchema,
973
- DEPLOYMENT_CHOICES,
974
- DeploymentChoiceSchema,
975
940
  IDE_DOCS_CONFIGS,
976
941
  LANGGRAPH_AGENTS,
977
942
  LLMApiKeySchema,
@@ -986,7 +951,6 @@ export {
986
951
  addCrewInputs,
987
952
  cloneGitHubSubdirectory,
988
953
  detectInstalledIDEs,
989
- getQuestionsForBranch,
990
954
  handleIDEDocsSetup,
991
955
  isLocalhost,
992
956
  isValidGitHubUrl,