* test(#3673): add failing tests for dispatch.maxConcurrency axis and dispatch-capacity CLI route Extends tests/host-integration.test.cjs with negotiateHostCapabilities maxConcurrency negotiation coverage (test matrix rows 1-15, including a fast-check property test) and a new #3673 dispatch-capacity CLI route describe block spawning the real gsd-tools.cjs (rows 16-25). Extends tests/host-integration-validator-parity.test.cjs with an all-19-descriptor maxConcurrency presence/validity sweep (row 26) and adds a hostile-input validator test to host-integration.test.cjs (row 27). The dispatch.maxConcurrency field does not exist yet, so these tests fail. * feat(#3673): add dispatch.maxConcurrency axis, negotiation, validator parity, and the dispatch-capacity query Adds a numeric dispatch.maxConcurrency sub-field to the Host-Integration Interface (ADR-1239 Phase 1), following the existing dispatch.isolation sub-field pattern: DispatchCapability interface, SAFE_DEFAULTS/PROFILE_BASELINES floors, and a negotiateHostCapabilities branch that passes through a positive safe integer and fails closed to 1 otherwise (no engine-side reduction, per the design doc's explicit rejection of a min(host,engine) rule). capability-validator.cjs gains parity validation for the new field (optional, positive safe integer or the "undocumented" sentinel — mirroring isolation's "added after existing descriptors" treatment). gsd-tools.cjs gains a new `query dispatch-capacity` route, a pure-read sibling of `dispatch-isolation` with no side effects: live env (GSD_DISPATCH_MAX_CONCURRENCY) > descriptor > fallback-to-1 precedence. All 19 capabilities/*/capability.json descriptors now declare dispatch.maxConcurrency: claude carries the one cited value (20, per code.claude.com/docs/en/sub-agents); the other 18 carry "undocumented" (not yet researched for this axis). * docs(#3673): document dispatch.maxConcurrency and add its citation row to the capability matrix Updates docs/reference/host-integration-interface.md's dispatch struct entry (also backfilling the previously-undocumented isolation/backgroundDispatch sub-fields found stale in the same table) and adds fail-closed/live-transport precedence prose for the new maxConcurrency field. Adds a dispatch.maxConcurrency row (with citation) to all 19 host sections in docs/reference/host-integration-capability-matrix.md — required for tests/host-integration-descriptors.test.cjs's kimi-code matrix-parity check, which asserts every declared dispatch sub-axis is documented there. Updates docs/how-to/add-or-update-a-host-integration.md's dispatch checklist and example descriptor block to mention maxConcurrency (and, likewise backfilling a stale gap, isolation/backgroundDispatch). * fix(#3673): extract shared maxConcurrency validator, drop dead reserved-name check Exports isPositiveSafeInteger from src/host-integration.cts as the single source of truth for the dispatch.maxConcurrency positive-safe-integer contract; negotiateHostCapabilities and gsd-tools.cjs's routeDispatchCapacity now both call it instead of independently reimplementing the same predicate. Also removes the __proto__/constructor/prototype reserved-name branch from capability-validator.cjs's maxConcurrency check — copy-pasted from the string-enum fields above it, but unreachable for a numeric field (the generic positive-safe-integer branch already rejects any string) and absent from maxDepth, the field the code's own comment claims to mirror. --------- Co-authored-by: sim <sim@local>
189 lines
5.3 KiB
JSON
189 lines
5.3 KiB
JSON
{
|
|
"id": "opencode",
|
|
"role": "runtime",
|
|
"version": "1.12.0",
|
|
"title": "OpenCode",
|
|
"description": "OpenCode — XDG-based config dir; flat commands/ + skills artifact layout; settings-json config format; no lifecycle hook registration; tier-2 support.",
|
|
"tier": "core",
|
|
"requires": [],
|
|
"engines": {
|
|
"gsd": ">=1.6.0"
|
|
},
|
|
"runtime": {
|
|
"configHome": {
|
|
"kind": "xdg",
|
|
"name": "opencode",
|
|
"env": [
|
|
"OPENCODE_CONFIG_DIR",
|
|
"OPENCODE_CONFIG",
|
|
"XDG_CONFIG_HOME"
|
|
]
|
|
},
|
|
"localConfigDir": ".opencode",
|
|
"configFormat": "settings-json",
|
|
"artifactLayout": {
|
|
"global": [
|
|
{
|
|
"kind": "commands",
|
|
"destSubpath": "commands",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": null
|
|
},
|
|
{
|
|
"kind": "skills",
|
|
"destSubpath": "skills",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": true,
|
|
"converter": "convertClaudeCommandToOpencodeSkill"
|
|
},
|
|
{
|
|
"kind": "agents",
|
|
"destSubpath": "agents",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": "convertClaudeToOpencodeFrontmatter"
|
|
}
|
|
],
|
|
"local": [
|
|
{
|
|
"kind": "commands",
|
|
"destSubpath": "commands",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": null
|
|
},
|
|
{
|
|
"kind": "skills",
|
|
"destSubpath": "skills",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": true,
|
|
"converter": "convertClaudeCommandToOpencodeSkill"
|
|
},
|
|
{
|
|
"kind": "agents",
|
|
"destSubpath": "agents",
|
|
"prefix": "gsd-",
|
|
"nesting": "flat",
|
|
"recursive": false,
|
|
"converter": "convertClaudeToOpencodeFrontmatter"
|
|
}
|
|
]
|
|
},
|
|
"triggerPrecedence": [
|
|
"skills",
|
|
"commands"
|
|
],
|
|
"commandStyle": "slash-hyphen",
|
|
"hooksSurface": "none",
|
|
"extensionEvents": "opencode",
|
|
"sandboxTier": "none",
|
|
"supportTier": 2,
|
|
"installSurface": "settings-json",
|
|
"writesSharedSettings": true,
|
|
"permissionWriter": "opencode",
|
|
"extendedHookEvents": [],
|
|
"hostIntegration": {
|
|
"embeddingMode": "imperative",
|
|
"commandSurface": "slash-file",
|
|
"dispatch": {
|
|
"namedDispatch": true,
|
|
"nested": "undocumented",
|
|
"maxDepth": "undocumented",
|
|
"background": false,
|
|
"subagentToolkit": "full",
|
|
"backgroundDispatch": false,
|
|
"isolation": "orchestrator-worktree",
|
|
"maxConcurrency": "undocumented"
|
|
},
|
|
"modelMode": "active",
|
|
"hookBus": "host",
|
|
"stateIO": "filesystem",
|
|
"transport": "mcp",
|
|
"runtime": "bun",
|
|
"effortSurface": "argv"
|
|
},
|
|
"orchestratorExec": {
|
|
"command": "opencode",
|
|
"args": [
|
|
"run"
|
|
],
|
|
"cwdFlag": "--dir",
|
|
"promptFlag": null
|
|
},
|
|
"hostBehaviors": {
|
|
"reapplyCommand": "/gsd-update --reapply",
|
|
"attributionConfigResolver": "opencode",
|
|
"flatCommandDir": "commands",
|
|
"combinedFamilyInstall": true,
|
|
"frontmatterDialect": "opencode",
|
|
"nativePlugin": {
|
|
"dir": "plugins",
|
|
"file": "gsd-core.js",
|
|
"source": ".opencode/plugins/gsd-core.js"
|
|
},
|
|
"skipHomePrefixSubstitution": true,
|
|
"skipSettingsUi": true,
|
|
"skipUpdateBannerCommand": true,
|
|
"skipCodexSkillsManifest": true
|
|
}
|
|
},
|
|
"reviewer": {
|
|
"slug": "opencode",
|
|
"flags": [
|
|
"--opencode"
|
|
],
|
|
"transport": "spawn",
|
|
"probe": {
|
|
"kind": "command-exists",
|
|
"binary": "opencode"
|
|
},
|
|
"invoke": {
|
|
"binary": "opencode",
|
|
"args": [
|
|
"run",
|
|
"{{model}}",
|
|
"{{effort}}",
|
|
"--format",
|
|
"json",
|
|
"-"
|
|
],
|
|
"promptChannel": "stdin",
|
|
"outputChannel": "stdout",
|
|
"modelArg": "--model",
|
|
"effortChannel": "argv"
|
|
},
|
|
"timeoutFloorMs": 660000,
|
|
"timeoutConfigKey": "review.timeouts.opencode",
|
|
"emptyOutput": "stub-with-stderr",
|
|
"reviewsSection": "OpenCode",
|
|
"evidenceClass": "source-grounded",
|
|
"requiresBinaries": [],
|
|
"promptBudgetKey": "review.max_prompt_tokens_per_reviewer.opencode",
|
|
"modelConfigKey": "review.models.opencode",
|
|
"handler": "opencode"
|
|
},
|
|
"config": {
|
|
"review.models.opencode": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Model passed to the OpenCode reviewer lane."
|
|
},
|
|
"review.max_prompt_tokens_per_reviewer.opencode": {
|
|
"type": "number",
|
|
"default": -1,
|
|
"description": "Prompt-token budget for the OpenCode reviewer lane. Unset is -1, a sentinel: 0 is a legitimate value meaning \"do not trim this lane\", so it cannot double as \"not configured\"."
|
|
},
|
|
"review.timeouts.opencode": {
|
|
"type": "number",
|
|
"default": -1,
|
|
"description": "Outer wall-clock timeout override (seconds) for the OpenCode reviewer lane. Unset is -1, a sentinel: 0 or a negative number is also treated as unset (a timeout has no legitimate zero/negative value), so no second sentinel is needed. Falls back to the lane's built-in timeoutFloorMs when unset."
|
|
}
|
|
}
|
|
}
|