Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def build_mcp_servers(
load_rubric_content,
)
from ambient_runner.bridges.claude.corrections import create_correction_mcp_tool
from ambient_runner.bridges.claude.backend_tools import create_backend_mcp_tools

mcp_servers = load_mcp_config(context, cwd_path) or {}

Expand Down Expand Up @@ -117,6 +118,20 @@ def build_mcp_servers(
mcp_servers["corrections"] = correction_server
logger.info("Added corrections feedback MCP tool (log_correction)")

# Backend API tools (session management) — fallback when ambient MCP sidecar is absent
if not ambient_mcp_url:
backend_tools = create_backend_mcp_tools(sdk_tool_decorator=sdk_tool)
if backend_tools:
backend_server = create_sdk_mcp_server(
name="acp", version="1.0.0", tools=backend_tools
)
mcp_servers["acp"] = backend_server
logger.info(
"Added backend API MCP tools (%d): %s",
len(backend_tools),
", ".join(t.name for t in backend_tools),
)

# Credential-aware MCP servers (dynamically configured per bound credentials)
credential_mcp_servers = build_credential_mcp_servers()
mcp_servers.update(credential_mcp_servers)
Expand Down
20 changes: 20 additions & 0 deletions e2e/cypress/e2e/scheduled-sessions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,29 @@ describe('Scheduled Sessions', () => {
expect(resp.status).to.be.oneOf([200, 201])
const scheduleName = resp.body.name

// Stub the OOTB workflows API so the test doesn't depend on live GitHub access
cy.intercept('GET', `/api/workflows/ootb*`, {
statusCode: 200,
body: {
workflows: [
{
id: 'bugfix',
name: 'Fix a bug',
description: 'Systematic workflow for analyzing, fixing, and verifying software bugs.',
gitUrl: 'https://github.com/ambient-code/workflows.git',
branch: 'main',
path: 'workflows/bugfix',
enabled: true,
},
],
},
}).as('ootbWorkflows')

// Navigate to edit page
cy.visit(`/projects/${workspaceSlug}/scheduled-sessions/${scheduleName}/edit`)

cy.wait('@ootbWorkflows')

// The workflow select should show the OOTB workflow name, not "Custom workflow..."
cy.get('[data-testid="workflow-select"]', { timeout: 10000 })
.should('contain.text', 'Fix a bug')
Expand Down
Loading