refactor: simplify providers, add OpenCode, migrate to YAML#60
Merged
Conversation
…mand The registration functions in cmd/providers.go already validate all prerequisites inline (env vars, files, health checks) and show clear skip messages. The TOML-based preflight system was a parallel validation layer that duplicated this logic. Deleted: - providers.toml (provider catalog) - internal/preflight/ (package: LoadProviders, CheckInput, CheckProvider) - cmd/preflight.go (harness preflight command) - test/preflight.bats (29 bats tests for the deleted system) Updated: - cmd/create.go: remove preflight check block for missing providers - cmd/deploy.go: inline openshell.toml chart-version read (was preflight.LoadConfig) - main.go: remove NewPreflightCmd registration - Makefile: remove bats from test target - .github/workflows/ci.yml: remove bats install and test step
…command Both 'harness up' and 'harness create' now register missing providers automatically. The standalone 'harness providers' command is removed. - create: registers missing providers before sandbox creation instead of erroring with 'run: harness providers' - up: add --provider-refresh flag (replaces providers --force) to delete and recreate all providers - providers.go: remove NewProvidersCmd, keep registerProviders() as internal function called by up and create
Two agent config improvements:
- Empty env values in agent YAML now read from the host environment.
JIRA_URL: '' in the YAML resolves to os.Getenv('JIRA_URL'). Vars
that resolve to empty after host lookup are omitted from the env map.
- When task: is specified, the entrypoint receives the task content
via -p flag: exec claude -p "$(cat task.md)" instead of passing
the file path as a positional argument. The entrypoint field is now
the base command only (e.g., 'claude' not 'claude -p').
- agents/demo.yaml: remove -p from entrypoint (harness adds it
automatically when task is present)
OpenCode is an open-source AI coding agent that supports Anthropic/Vertex AI. Same gateway, same providers, same credentials — just a different entrypoint. Usage: harness up --agent opencode Added: - agents/opencode.yaml: OpenCode agent config with Vertex AI inference - sandbox/opencode.json: MCP server config for OpenCode (atlassian) - sandbox/Dockerfile: install opencode via npm, copy config - sandbox/policy.yaml: rename claude_telemetry to agent_telemetry, add opencode.ai endpoint and /usr/local/bin/opencode binary
Convert gateway.toml to gateway.yaml in all three gateway directories (local, ocp, kind) and openshell.toml to openshell.yaml. Update config parsing to use gopkg.in/yaml.v3 instead of BurntSushi/toml. - internal/gateway/config.go: TOML struct tags to YAML, read gateway.yaml - cmd/deploy.go: read openshell.yaml for chart-version - All gateway configs converted with identical structure - Chart versions bumped to 0.0.59 in ocp and kind configs - go.mod: BurntSushi/toml dependency removed (go mod tidy)
The installed CLI outputs 'openshell 0.0.59' (no v prefix) on some platforms. ParseCLIVersion now falls back to splitting on the last space when no 'v' is found.
openshell.yaml was a global config with three fields: - providers: dead — agent YAML is the source of truth - inference.model: dead — read from OPENSHELL_MODEL env or defaulted - upstream.chart-version: redundant — already in each gateway.yaml The only caller (deploy.go) now reads chart-version from the gateway config or OPENSHELL_CHART_VERSION env var.
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
providers.toml,internal/preflight/package,harness preflightandharness providerscommands (-1,948 lines)harness upandharness createnow auto-register missing providers — no separateharness providersstep needed--provider-refreshflag toup(replacesproviders --force)JIRA_URL:resolves viaos.Getenv)-p "$(cat task.md)"instead of file pathharness up --agent opencode)BurntSushi/tomldependencyParseCLIVersionfor version strings withoutvprefixCommands removed
harness preflight— registration functions already validate inlineharness providers— folded intoupandcreateCommands updated
harness up --provider-refresh— replacesproviders --forceharness create— now auto-registers missing providersNew
agents/opencode.yaml— OpenCode agent configsandbox/opencode.json— MCP config for OpenCodenpm install -g opencode-ai)Test plan
make test— unit tests passmake test-local— 22/22 pass (sandbox create, providers, env vars, GWS, MCP, Claude)make test-remote(OCP) — 15/15 pass (full deploy + sandbox lifecycle)🤖 Generated with Claude Code