@@ -135,13 +135,18 @@ Tell me what you’d like to do next.
135135 }
136136
137137 const cookie = userPrompt ?. cookie || '' ;
138+ const pipelineSnapshot =
139+ userPrompt ?. pipelineSnapshot ||
140+ userPrompt ?. body ?. pipelineSnapshot ||
141+ null ;
138142 const systemPrompt = `
139143 You are the MCP Wizard Agent.
140144 You have full access to the following connected tools and APIs:
141145 - repo_reader: reads local and remote repositories, useful for listing or describing repositories
142146 - pipeline_generator: generates CI/CD YAMLs
143147 - oidc_adapter: lists AWS roles or Jenkins jobs
144148 - github_adapter: fetches real-time GitHub repository data through an authenticated API connection
149+ - gcp_adapter: fetches Google Cloud information
145150 Do not say that you lack access to GitHub or external data — you can retrieve this information directly through the available tools.
146151 Only call tools when the user explicitly asks for data retrieval or actions. Do NOT call tools for explanations, help, or capability questions.
147152
@@ -311,6 +316,17 @@ Tell me what you’d like to do next.
311316 if ( provider ) payload . provider = provider ;
312317 if ( template ) payload . template = template ;
313318
319+ // 🔑 Inject authoritative pipeline options from the frontend (Option A)
320+ if ( pipelineSnapshot ?. options ) {
321+ payload . options = pipelineSnapshot . options ;
322+ }
323+ if ( pipelineSnapshot ?. stages ) {
324+ payload . stages = pipelineSnapshot . stages ;
325+ }
326+ if ( pipelineSnapshot ?. branch ) {
327+ payload . branch = pipelineSnapshot . branch ;
328+ }
329+
314330 // Fetch GitHub repo details before pipeline generation
315331 let repoInfo = null ;
316332 try {
0 commit comments