Skip to content

feat: gate the Agent declaration behind --agent-configuration - #11

Merged
EricWvi merged 1 commit into
ora-space:mainfrom
ObsisMc:feat/370-opencode-agent-declaration
Oct 20, 2026
Merged

EricWvi merged 1 commit into
ora-space:mainfrom
ObsisMc:feat/370-opencode-agent-declaration

Conversation

@ObsisMc

@ObsisMc ObsisMc commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Gives this plugin the same publish-order switch claude-code-agent got in ora-space/claude-code-agent#2, so a declared OpenCode release can follow the hosts that resolve it:

  • assets/config.json: one personal model connection, openai-completions and anthropic-messages, modelCardinality: single, no Settings.
  • deno task package --agent-configuration: every .orax carries the declaration; the script reads it back from each finished archive, refuses a release whose packages disagree or miss it, writes dist/agent-configuration.json and binds its digest in [agent_configuration]. Without the flag the manifest renders exactly as before, in both release shapes (per-target and universal).
  • release.yml attaches the static copy when present; marketplace.yml downloads it for a binding release and places it beside the registry entry, removing a stale one otherwise. The flag is not passed. Turning it on is an owner decision after compatible hosts are deployed.
  • scripts/package.ts stays generic: nothing in it names OpenCode.

Independent of #10 (runtime adapter) and of the SDK 0.11.0 publication; both PRs add a test task to deno.json, so whichever merges second resolves that one line.

ADR: agent-configuration-declarations and agent-configuration-metadata remain approved: nothing is published yet.

Refs ora-space/circus#370

Evidence

  • tests/package_test.ts (5 tests, deno task test): the declaration's exact shape and pinned digest f1186c1e…defc49; read-back of bound and unbound archives; rejection of non-JSON, missing or zero schemaVersion and oversize declarations; the flag-off manifest is unchanged for targets and universal releases; with a binding, [agent_configuration] renders after top-level keys and before [[targets]], and after a universal url/sha256.
  • The same bytes compile with the host's ora_plugin_config::compile_agent_configuration (desktop, at feat(node): hand model grants to plugin-owned adapters desktop#708 head): fingerprint f1186c1e0f210b3a1c9d4db7b4929183313288d97246e4d5088a342a02defc49, protocols [OpenaiCompletions, AnthropicMessages].
  • deno check, deno lint, deno fmt --check pass. No real release was packaged.

Merge Danger

Door: two-way

Blast Radius: release-packaging

With the flag off, packages and manifests are byte-for-byte what they were.

assets/config.json declares one personal model connection over
openai-completions or anthropic-messages. With --agent-configuration
every package carries it, the release reads it back from each archive,
binds its digest in [agent_configuration] and publishes the static copy;
without the flag the release is unchanged. release.yml does not pass
the flag until hosts that resolve the declaration are deployed.

@EricWvi EricWvi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 319381f: flag stays off in release.yml, marketplace sync only acts when the manifest binds a declaration, declaration/association shape matches claude-code-agent#2; deno task test/check/lint pass. Non-blocking: add assets/config.json to fmt.exclude so deno fmt cannot change the pinned digest.

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.

2 participants