Skip to content

Declare each Harness in one file - #760

Merged
SaladDay merged 5 commits into
mainfrom
declare-each-harness-in-one-file
Oct 18, 2026
Merged

SaladDay merged 5 commits into
mainfrom
declare-each-harness-in-one-file

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Each Harness is now declared once, in internal/harnessconfig/<package>/declaration.go. One harnessconfig.Declaration holds:

  • the kind and label;
  • the model providers and native parameter validation;
  • the capability descriptor;
  • the placements and MCP origins;
  • the Harness's own admission restrictions.

Core admission and the Runtime both read that value. Core no longer keeps a parallel per-Harness profile.

Onboarding a Harness now takes

  1. One declaration file, internal/harnessconfig/<package>/declaration.go.
  2. The adapter's execution code, plus a thin Runtime binding (apps/daemon/internal/agent/<package>/declaration.go) that adds Discover. Discovery can only narrow the declared capabilities, through agent.Narrow and agent.Unavailable, never widen them.
  3. The Runtime image under services/core/deploy/<kind>, as before.

make generate-harness-catalog derives everything else from the declarations:

  • the Core registry;
  • the Runtime declaration list, which is now generated;
  • the client ids and labels;
  • the installer providers;
  • the Harness catalog reference.

Deleted

  • services/core/internal/engine: profiles, catalog, enginetest, and the reflect-based completeness machinery.
  • internal/harnessconfig/builtin/catalog.json.
  • The hand-written adapter list in apps/daemon/internal/cli/agent_discovery.go.
  • The per-Harness configuration.go files, which declaration.go replaces.

Behavior

  • Admission and rejection results and error codes are unchanged.
  • Wording only: Harness restriction messages and the structured-output rejection say "not supported" instead of "not qualified".
  • A configured adapter that fails discovery now advertises every capability as Unsupported and no version. It is unavailable either way.
  • AGENTS.md: the Runtime–Harness row names the declaration file next to the lifecycle file.

Checks

  • go build ./... and go vet ./... pass.
  • make check-harness-catalog passes, and make openapi leaves every YAML unchanged.
  • make check-names passes.
  • scripts/ci_plan_test.py and website/tests/harnesses.test.mjs pass.
  • Go tests pass for:
    • internal/harnessconfig/...
    • scripts/harness-catalog
    • contracts/agents-api/v1
    • apps/daemon/internal/agent/...
    • apps/daemon/internal/cli
    • services/core/internal execution, deployment, processconfig, api, sandbox/providers and persistence/postgres/deploymentpg
  • New test: TestDiscoveryOnlyNarrowsDeclaration, one per adapter.
  • Not run locally: the PostgreSQL-backed integration tests in services/core/tests/integration (they compile and vet; CI runs them) and website/tests/translations.test.mjs (I recomputed the hashes the same way).

Review

No separate blind review on this PR. It will be reviewed in one batch with the follow-up pass-through PRs.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

One harnessconfig.Declaration per Harness is read by Core admission and the Runtime. The generator derives registrations from internal/harnessconfig/*/declaration.go; catalog.json and services/core/internal/engine are deleted. Runtime discovery only narrows the declaration.
@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay merged commit b6e4521 into main Oct 18, 2026
25 checks passed
@SaladDay
SaladDay deleted the declare-each-harness-in-one-file branch October 18, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant