resolveRuntimeArtifactLayout now builds Layout from
registry.runtimes[id].runtime.artifactLayout[scope] — a loop dispatching each
ArtifactKind through the SAME 5 builders (commandsKind/agentsKind/skillsKind/
convertedCommandsKind/kimiAgentsKind, unchanged) by (kind, converter, nesting) —
replacing the hardcoded switch(runtime). Equivalence-preserving for all 16 runtimes
× {global, local} (Codex-verified, no divergence). -43 LOC; bin/install.js + the
converters + the install loop untouched. getInstallExports()[converterName]
resolution, configDir threading, scope default, unknown-runtime guard all preserved.
Driving the local scope surfaced a 5a gap: the old switch had no scope branch for 13
runtimes (cursor/gemini/codex/copilot/antigravity/windsurf/augment/trae/qwen/hermes/
codebuddy/opencode/kilo) → local == global for them, but 5a authored local:[].
Backfilled local=global for those 13 (descriptor-faithful; a fall-through shim would
wrongly give cline/kimi local=global). claude/cline/kimi scope-gating untouched.
validateArtifactKindEntry tightened: destSubpath/prefix/nesting/converter required
(ConverterName enum still open — 5e). New 39-case deep-equal golden equivalence test.
Closes #1049
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
{
|
|
"id": "opencode",
|
|
"role": "runtime",
|
|
"title": "OpenCode",
|
|
"description": "OpenCode — XDG-based config dir; flat command/ + skills artifact layout; settings-json config format; no lifecycle hook registration; tier-2 support.",
|
|
"tier": "core",
|
|
"requires": [],
|
|
"runtime": {
|
|
"configHome": {
|
|
"kind": "xdg",
|
|
"name": "opencode",
|
|
"env": ["OPENCODE_CONFIG_DIR", "OPENCODE_CONFIG", "XDG_CONFIG_HOME"]
|
|
},
|
|
"configFormat": "settings-json",
|
|
"artifactLayout": {
|
|
"global": [
|
|
{
|
|
"kind": "commands",
|
|
"destSubpath": "command",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": null
|
|
},
|
|
{
|
|
"kind": "skills",
|
|
"destSubpath": "skills",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": true,
|
|
"converter": "convertClaudeCommandToOpencodeSkill"
|
|
}
|
|
],
|
|
"local": [
|
|
{
|
|
"kind": "commands",
|
|
"destSubpath": "command",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": null
|
|
},
|
|
{
|
|
"kind": "skills",
|
|
"destSubpath": "skills",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": true,
|
|
"converter": "convertClaudeCommandToOpencodeSkill"
|
|
}
|
|
]
|
|
},
|
|
"commandStyle": "slash-hyphen",
|
|
"hooksSurface": "none",
|
|
"sandboxTier": "none",
|
|
"supportTier": 2
|
|
}
|
|
}
|