Add Continue (continue.dev) as a ucode harness - #428
Open
natefleming wants to merge 2 commits into
Open
Conversation
natefleming
force-pushed
the
feature/continue-dev-harness
branch
from
September 1, 2026 09:55
f8610f8 to
46d53fe
Compare
Configure and launch Continue's `cn` CLI (and, via the shared ~/.continue/config.yaml, the VS Code/JetBrains extensions) against the Databricks AI Gateway, following the existing baked-token harness pattern. - New `agents/continue_dev.py` (module name avoids the `continue` keyword; tool name stays "continue"): OpenAI-compatible provider at the MLflow chat-completions gateway, chat/edit/apply roles, discovered Claude/GPT models, baked bearer + background refresh + OAUTH_TOKEN env — the same strategy as OpenCode/Copilot/Gemini/Pi. Writes modern config.yaml. - MCP parity: write/remove_mcp_server_config register the shared `ucode mcp-proxy` stdio bridge into config.yaml's mcpServers list, wired into mcp.py's client registry and register/remove dispatch (same pattern as Cursor/OpenCode/Copilot). - Registration across the usual surfaces: _MODULES/aliases/dispatch/ availability/discovery in agents/__init__.py, discovery consumers and want_claude/want_codex in cli.py, build_continue_base_url in databricks.py. - YAML I/O helpers (read_yaml_safe/write_yaml_file) in config_io.py; add pyyaml dependency. - Docs: README agent list, usage, --agents names, managed-files table, and MCP-capable tools list. New tests/test_agent_continue.py plus registry assertions in test_agents_init.py. Verified live on FEVM: configure discovers system.ai.claude-sonnet-5, writes config.yaml, validation round-trips through the gateway, and MCP register/ remove produce the documented schema without clobbering the models list. Co-authored-by: Isaac <no-reply@databricks.com>
- Register the `ucode continue` launch command (was missing, so the documented entry point returned "No such command"); mirrors the other `ucode <agent>` launchers. - Revert safety: Continue writes the user's shared ~/.continue/config.yaml (read by the IDE extensions), so `ucode revert` no longer whole-file restores it — it surgically strips only ucode's own model entries via continue_dev.revert_config(), mirroring Codex's shared-config handling. MCP entries are still removed by revert_mcp_configs. - DRY: build_copilot_base_url and build_continue_base_url now delegate to a shared _mlflow_chat_completions_base_url helper (was a duplicated body). - Remove dead render_config (only tests referenced it, risking drift); tests now assert on the production primitives _ucode_model_entry / _ensure_schema_header, and add revert_config coverage. - Factor the ucode-model-entry match into _is_ucode_model, shared by the write and revert paths. Verified: `ucode continue --help` resolves and a live headless `ucode continue -- -p ...` launches cn on system.ai.claude-sonnet-5 through the gateway. ruff + ty clean; 2171 unit tests pass (the 4 failures are the pre-existing e2e/PTY tests). Co-authored-by: Isaac <no-reply@databricks.com>
natefleming
force-pushed
the
feature/continue-dev-harness
branch
from
September 1, 2026 09:57
46d53fe to
a253e7f
Compare
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.
Summary
Adds Continue (continue.dev) as a configurable ucode agent, so
ucode configure --agents continuepoints it at the Databricks AI Gateway anducode continuelaunches it — the same UX as the other agents. The generated~/.continue/config.yamlis shared by thecnCLI and the Continue VS Code/JetBrains extensions, so configuring once wires up both.The integration reuses existing patterns only — no new techniques:
/ai-gateway/mlflow/v1, which already serves Claude + gpt-5),chat/edit/applyroles, models drawn from the discovered Claude/GPT families, a baked bearer refreshed by a background thread, andOAUTH_TOKENin the launch env. It is correctly excluded fromGLOBAL_SETTINGS_AGENTS(Continue has no self-refresh hook;--use-patbakes a long-lived PAT for IDE-first use).write_/remove_mcp_server_configregister the shareducode mcp-proxystdio bridge intoconfig.yaml'smcpServerslist, wired intomcp.py's client registry and register/remove dispatch.~/.continue/config.yaml(read by the IDE),ucode revertsurgically strips only ucode's own entries instead of whole-file restoring, so user-added models/servers are preserved.The agent module is
agents/continue_dev.pybecausecontinueis a Python keyword; the tool-name string stayscontinue.Changes
src/ucode/agents/continue_dev.py(model config, launch/validate, MCP hooks, surgical revert).agents/__init__.py:_MODULES, aliases (continue/continue-dev/cn),configure_tooldispatch,check_gateway_endpoint,_TOOL_DISCOVERY_SOURCES.cli.py:ucode continuelaunch command, discovery consumers,--agenthelp, and the surgical revert wiring.databricks.py:build_continue_base_urlsharing a_mlflow_chat_completions_base_urlhelper with Copilot.mcp.py:MCP_CLIENTSentry + register/remove dispatch.config_io.py:read_yaml_safe/write_yaml_file; addpyyamldependency.--agentsnames, managed-files table, MCP-capable tools.tests/test_agent_continue.py; registry assertions intests/test_agents_init.py.Testing
uv run pytestgreen (the only failures locally are pre-existing e2e/PTY tests, unrelated to this change);ruffandtyclean.configurediscovers a Claude model and writesconfig.yaml; the validation step round-trips through the gateway;ucode continuelaunchescn;ucode revertsurgically strips only ucode's entries (user models/servers preserved); andcnconsumes the generated config and spawns theucode mcp-proxybridge.Notes / follow-ups (out of scope)
--use-pataddresses IDE-first use. A cleaner long-term fix is an upstreamapiKeyHelper-style auth hook in Continue, or a localhost token-minting proxy.autocomplete/embed/rerankroles are not wired (they need model types ucode does not discover today).This pull request and its description were written by Isaac.