fix: remove localhost agents-api bypass, use CMA for all agent calls [INTEG-3825]#10903
Open
ryunsong-contentful wants to merge 11 commits intomasterfrom
Open
fix: remove localhost agents-api bypass, use CMA for all agent calls [INTEG-3825]#10903ryunsong-contentful wants to merge 11 commits intomasterfrom
ryunsong-contentful wants to merge 11 commits intomasterfrom
Conversation
…1.2.22 [INTEG-3825]
…I boolean [INTEG-3825]
… type [INTEG-3825]
…ent-scope-selection [INTEG-3825]
…n, and FAILED run handler [INTEG-3825]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INTEG-3825
What & Why
The google-docs app previously had a
LOCAL_AGENTS_API_BASE_URLflag hardcoded tohttp://localhost:4111. When set, all three agents-api functions —getWorkflowRun,startAgentRun, andresumeWorkflowRun— routed calls to a local dev server instead of the CMA. This was useful during development but needs to be removed before deploying to production.This PR strips out all localhost branches so the app always goes through the CMA.
Changes
src/utils/constants/agent.ts— removedLOCAL_AGENTS_API_BASE_URL = 'http://localhost:4111'src/services/agents-api.ts— removed all threeif (LOCAL_AGENTS_API_BASE_URL)fetch branches, along with the now-unusedAGENTS_API_HEADERSconstant andgetJsonHeaders()helperAll three functions now call the CMA directly:
getWorkflowRunsdk.cma.agentRun.getstartAgentRunsdk.cma.agent.generateresumeWorkflowRunsdk.cma.agentRun.resumeTest Plan
localhost:4111calls appear in the network tabstartAgentRun+ polling works via CMAresumeWorkflowRuncorrectly callssdk.cma.agentRun.resumegetWorkflowRunreturnsnullgracefully on aNotFounderrorGenerated with Claude Code