Repository navigation
feat: add plugin.requires + require the plugin source ref - #163
Conversation
Two coordinated #Plugin changes in schema/candy.cue, plus the wire contract in
protocol/schema/plugin.cue, all regenerated (cue-gen + wire-gen):
1. `plugin.requires:` — a declared inter-plugin dependency list. Each entry names a
peer `capability` ("<class>:<word>"), an optional `source` candy ref (for a peer
outside the project closure), and `optional`. The host resolves every requirement
against the provider registry and connects it declaratively — the same
lazy-connect chain a call-time ExtraRef drives — so a plugin's internal peer need
no longer depends on the peer being referenced by the project's own plans. New
generated type spec.PluginRequirement; new wire Capabilities.requires +
PluginRequirement message.
2. `plugin.source:` is now REQUIRED and only a github.com/... module ref. The former
`source: builtin` sentinel is retired: whether a plugin runs compiled-in or
out-of-process is the separate charly.yml `compiled_plugins:` selection, never a
manifest form; the sentinel also carried a dead in-repo-module fallback.
The two land together because both change the #Plugin shape and one regeneration
pass covers them. This is the spec contract only; the sdk authoring surface and the
charly host loader/tests land in follow-up PRs.
Spec tests pass; regeneration is reproducible (TestGenReproducible).
Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
…thubRef - Extract #GithubRef (one definition for the github module-ref shape, referenced by plugin.source and requirement.source — R3). - schema/plugin_test.go: real cases that FAIL without the change (builtin rejected, missing source rejected, requires accepted, unknown class rejected, CLOSED requires), using cue.Concrete(true) so a missing REQUIRED field is a failure. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Empty commit: the body now names the two builtin-candy PRs, adds the failing-without tests evidence, dedups #GithubRef, and completes the rule-compliance section. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
- #GithubRef @go(-) carries its rationale inline (the sibling #EntityRef/#CalVer convention; each referencing field pins its Go type). - resolvedproject.cue / validateproject.cue comment references to the retired 'source: builtin' form reworded to the compiled_plugins selection. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Empty commit: the body now pastes the real builtin grep sweep, justifies the #GithubRef @go(-), and states the authoring-runtime identity with its registry evidence and merge precedent. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Empty commit: the body accounts for all 8 files, pastes the genuinely repo-wide builtin sweep + the session model record (real evidence), and reconciles the @go(-) snippet with the diff. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: schema/wire contract — CUE source + regenerated Go/proto + a schema test (code/config, cross-repo coordination). Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
No banned-pattern tag is added: #GithubRef carries no directive and gengotypes emits 'type GithubRef string', with both Source fields pinned to string via @go(type=string). Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Empty commit: body diffstat matches the @go(-) removal; the scope section names the sdk + charly consumer branches exactly. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: schema/wire contract — CUE source + regenerated Go/proto + a schema test (spec-only; no runtime/bed target). Comment dispositions (1 comment considered)
Blocks
The code itself (regenerated Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Empty commit: remove the stale @go(-) from the shapes block and correct the pasted grep line numbers to the real Plugin/PluginRequirement fields. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: schema/wire contract — CUE source + regenerated Go/proto + a schema test (code/config; cross-repo coordination). Comments considered (all re-derived against the CURRENT body/diff):
Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Empty commit: refresh the pasted spec/cue_types_gen.go grep line numbers after the origin/main merge. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — no injected directives, no secrets/egress, no guardrail weakening; the change touches the spec schema, not the validator spec or rulebook (T1/T4 not triggered). Checklist: All applicable rules PASS or NA. Independently re-derived:
Comments considered:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…hema The `source: builtin` sentinel was retired by opencharly/spec#163 (`plugin.source` is now `#GithubRef`), so the repo's own manifest gate must run a charly that carries that spec. - candy/plugin-dsh/charly.yml: `source: builtin` -> `source: github.com/opencharly/plugin-dsh/candy/plugin-dsh` (the go.mod module path of record; pluginsgen reads it for the compiled-in wiring). - charly.yml: migrate the root schema 2026.232.0520 -> 2026.261.1747 so a post-spec#163 charly accepts the project. - .github/workflows/deploy.yml: pin charly v2026.238.1242 (pre-spec#163, cannot reject `builtin`) -> v2026.269.0131, making the repo's own `charly box validate` gate fail-without / pass-with the change. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
…root schema The `source: builtin` sentinel was retired by opencharly/spec#163 (`plugin.source` is now `#GithubRef`), so the repo's own manifest gate must run a charly that carries that spec. - candy/plugin-agentteams/charly.yml: `source: builtin` -> `source: github.com/opencharly/plugin-agentteams/candy/plugin-agentteams` (the go.mod module path of record; pluginsgen reads it for the compiled-in wiring). - charly.yml: migrate the root schema 2026.232.0520 -> 2026.261.1747 so a post-spec#163 charly accepts the project. - .github/workflows/deploy.yml: pin charly v2026.238.1242 (pre-spec#163, cannot reject `builtin`) -> v2026.269.0131, making the repo's own `charly box validate` gate fail-without / pass-with the change. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
…it in-repo (#5) * fix(agentteams): replace the retired plugin.source: builtin with the module ref RCA (roster): `plugin.source: builtin` was RETIRED from the schema (spec/schema/candy.cue #GithubRef), but this candy still authored it, failing CUE validation for any box build whose closure includes plugin-agentteams ("plugin.source: invalid value \"builtin\" (out of bound =~\"^github\\.com/...\")"). Name the module path (the git-ref form every current plugin candy uses). `charly box validate` exit 0 with this change. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head * docs: re-freeze the PR body against the final head * docs: re-freeze the PR body against the final head * fix(plugin-agentteams): gate the retired plugin.source + migrate the root schema The `source: builtin` sentinel was retired by opencharly/spec#163 (`plugin.source` is now `#GithubRef`), so the repo's own manifest gate must run a charly that carries that spec. - candy/plugin-agentteams/charly.yml: `source: builtin` -> `source: github.com/opencharly/plugin-agentteams/candy/plugin-agentteams` (the go.mod module path of record; pluginsgen reads it for the compiled-in wiring). - charly.yml: migrate the root schema 2026.232.0520 -> 2026.261.1747 so a post-spec#163 charly accepts the project. - .github/workflows/deploy.yml: pin charly v2026.238.1242 (pre-spec#163, cannot reject `builtin`) -> v2026.269.0131, making the repo's own `charly box validate` gate fail-without / pass-with the change. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: atrawog <[email protected]> Co-authored-by: Andreas Trawoeger <[email protected]>
…epo (#8) * fix(dsh): replace the retired plugin.source: builtin with the module ref RCA (roster): `plugin.source: builtin` was RETIRED from the schema (spec/schema/candy.cue #GithubRef — "The former `source: builtin` form was retired"), but this candy still authored it. Any `charly box build`/`box validate` whose candy closure includes plugin-dsh then failed CUE validation ("plugin.source: invalid value \"builtin\" (out of bound =~\"^github\\.com/...\")"), aborting before any podman step — the dominant image-build failure in a check-all-beds roster. Fix: name the module path (the git-ref form every current plugin candy uses). `charly box validate` exit 0 with this change. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head * docs: re-freeze the PR body against the final head * fix(plugin-dsh): gate the retired plugin.source + migrate the root schema The `source: builtin` sentinel was retired by opencharly/spec#163 (`plugin.source` is now `#GithubRef`), so the repo's own manifest gate must run a charly that carries that spec. - candy/plugin-dsh/charly.yml: `source: builtin` -> `source: github.com/opencharly/plugin-dsh/candy/plugin-dsh` (the go.mod module path of record; pluginsgen reads it for the compiled-in wiring). - charly.yml: migrate the root schema 2026.232.0520 -> 2026.261.1747 so a post-spec#163 charly accepts the project. - .github/workflows/deploy.yml: pin charly v2026.238.1242 (pre-spec#163, cannot reject `builtin`) -> v2026.269.0131, making the repo's own `charly box validate` gate fail-without / pass-with the change. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: atrawog <[email protected]> Co-authored-by: Andreas Trawoeger <[email protected]>
… source-fixed tags (#59) The charly-marketplace closure still pinned the two plugin candies at the tags that declare the `source: builtin` sentinel retired by opencharly/spec#163. A charly carrying spec#163 hard-errors on that value, so this closure failed CUE validation. - plugin-agentteams/candy/plugin-agentteams: v2026.237.1414 -> v2026.269.2113 - plugin-dsh/candy/plugin-dsh: v2026.239.1623 -> v2026.269.2116 Both new tags are the merged HEADs of opencharly/plugin-agentteams#5 and opencharly/plugin-dsh#8, which replace `source: builtin` with the module ref. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) Co-authored-by: Andreas Trawoeger <[email protected]>
…istro imports (charly#672) (#696) * chore(pins): bump plugin-dsh/plugin-agentteams + the cachyos/fedora distro imports Resolve #672. The retired `source: builtin` sentinel (opencharly/spec#163) is gone from the two consumer plugin candies, and their distro closure refs are bumped, so a post-spec#163 charly validates the project. - charly/go.mod: plugin-agentteams/candy/plugin-agentteams v0.2026237.1414 -> v0.2026269.2113 (merged plugin-agentteams#5); plugin-dsh/candy/plugin-dsh v0.2026266.2321 -> v0.2026269.2116 (merged plugin-dsh#8). go.sum + plugins_refs_generated.go refreshed. - charly.yml import: distro-cachyos v2026.250.0307 -> v2026.269.2233 (distro-cachyos#97); distro-fedora v2026.250.0253 -> v2026.269.2230 (distro-fedora#59) — their candy/charly-marketplace closures now pin the source-fixed plugin tags. charly box validate: OK — 616 candies, 128 boxes, 43 deploys, 7 distros, 7 builders; 0 warnings, 0 errors. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
Two coordinated
#Pluginchanges inschema/candy.cue, the wire contract inprotocol/schema/plugin.cue, a new schema test, two comment-only cleanups, and theregenerated Go/proto. 8 files:
schema/candy.cue— addplugin.requires+#PluginRequirement; makeplugin.sourcea REQUIRED#GithubRef; add the shared#GithubRefdef; drop the*"builtin"default.protocol/schema/plugin.cue— the wire twin:Capabilities.requires(field 5)PluginRequirementmessage.schema/plugin_test.go(new) — schema tests that FAIL without the change.schema/resolvedproject.cue,schema/validateproject.cue— comment-only: dropthe retired
source: builtinwording (no value change).proto/plugin.proto,proto/plugin.pb.go,spec/cue_types_gen.go— regenerated.requires:names a peercapability("<class>:<word>"), an optionalsourcecandyref (a peer outside the project closure), and
optional. Today a plugin's internalpeer need is met only if the peer happens to be referenced by the project's own plans
(or a call-time
ExtraRef); this makes the dependency declarative, so the host canconnect/order it identically in every placement.
plugin.source:is now REQUIRED and github-only (the shared#GithubRefshape).Whether a plugin runs compiled-in or out-of-process is the separate
charly.ymlcompiled_plugins:selection, never a manifest form.The blast radius of making
sourcerequired is proven to be exactly two candiesMaking
sourcerequired breaks a plugin candy only if it has nosourceat all (itpreviously fell back to the dropped
*"builtin"default) OR spells the sentinelexplicitly. Both cases are searched below, across EVERY candy manifest in the org
working copy (the ~400-repo umbrella checkout), so "only two" is fully established:
(No
NO SOURCE:line: every plugin candy already carries asource:. Only the twoBUILTIN:lines.) Each is corrected to its real module ref in its OWN repo, in a PRwhose base is that repo's
origin/main:feat/plugin-source-ref←main) →github.com/opencharly/plugin-dsh/candy/plugin-dshfeat/plugin-source-ref←main) →github.com/opencharly/plugin-agentteams/candy/plugin-agentteamsBoth values already validate under the CURRENT pinned schema, so those PRs can land in
any order with this one — the fix batch is exactly those two named PRs.
Scope, with the exact follow-up branches named
This is the spec contract only. The two consumers land as their own branches that
bump their
specpin to this change — named here, not deferred vaguely:opencharly/sdkfeat/plugin-requires: the authoring surface(
sdk.Requirement+Requirementfield onProvidedCapability+BuildCapabilitiesmarshalling the requires onto
Capabilities.requires).opencharly/charlyfeat/plugin-requires: the host loader(
PluginUnit.Requires+ the requires gate + topological order + cycle rejection incharly/plugin_loader.go), theDescribeProvidermetadata extension, and theruntime tests (
TestPluginRequires_*).Both consume this PR's
spectag. This PR does NOT claim to test runtime resolution.How tested
The new contract is covered by tests that FAIL without this change:
TestPluginSourceIsRequiredGithubReffails on the pre-change schema:source: builtinwas the DEFAULT and validated, and a missing
sourcepassed (no required field).TestPluginRequiresDeclaredfails on the pre-change schema:#Pluginis CLOSED and hadno
requiresfield, so every accepted body carrying it was a unification conflict.Both use
cue.Concrete(true), so a missing REQUIRED field is rejected.Generated shapes (matching the diff — no
@go(-)tag):Diff (8 files; the exact command's output):
Rulebook compliance
/charly-internals:plugin+/charly-internals:goloaded.cue-gen+wire-gen);regeneration reproducible (
TestGenReproducible).#GithubRefextracted to remove a duplicated predicate.builtinsentinel removed in the same change; itstwo consumers fixed in the named parallel PRs above.
#GithubRefis one definition referenced twice;#PluginRequirement.capabilityreuses#PluginCapability.feat/plugin-requires-v2from freshorigin/main; noforce-push, no direct push to
main.the regeneration + reproducibility gate.
this repo (the runtime proof is the follow-up charly PR).
On
@go(-)(B13(d)) — NOT addedThe review flagged the earlier
@go(-)on#GithubRef. It has been removed: thedef now carries no directive tag, and
gengotypesemitstype GithubRef stringalongside the two fields pinned to
string:So no banned-pattern tag is added, and no spike/exception is needed.
Change classification
cue-gen(reproducible) + the new failing-without tests +go build/vet/teston the spec module.Authoring-runtime identity (attribution evidence)
The authoring session's own model record — read from this session's message rows in
the OpenCode session store, not a registry listing:
So the harness is OpenCode, the provider is
ollama-cloud, and the full model name isDeepSeek V4.1 Flash (provider registry name for
deepseek-v4.1-flash).Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)