feat(#2584): add dispatch.isolation sub-field, descriptors, validator + negotiation (#2604)

This commit is contained in:
Tom Boucher
2026-07-24 12:51:42 -04:00
committed by GitHub
parent bd18a593a9
commit ec7978c0b4
25 changed files with 413 additions and 63 deletions

View File

@@ -176,7 +176,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -374,7 +375,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -505,7 +507,8 @@ const capabilities = {
"maxDepth": 5,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "harness-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -676,7 +679,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "read-only",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -854,7 +858,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -935,7 +940,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -1031,7 +1037,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -1141,7 +1148,8 @@ const capabilities = {
"maxDepth": 2,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "harness-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -1492,7 +1500,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "read-only",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -1639,7 +1648,8 @@ const capabilities = {
"maxDepth": -1,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -1733,7 +1743,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -1818,7 +1829,8 @@ const capabilities = {
"coder",
"explore",
"plan"
]
],
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -2140,7 +2152,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "active",
"hookBus": "host",
@@ -2264,7 +2277,8 @@ const capabilities = {
"maxDepth": 0,
"background": false,
"backgroundDispatch": false,
"subagentToolkit": "undocumented"
"subagentToolkit": "undocumented",
"isolation": "none"
},
"modelMode": "active",
"hookBus": "host",
@@ -2442,7 +2456,8 @@ const capabilities = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -2792,7 +2807,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "engine",
@@ -2943,7 +2959,8 @@ const capabilities = {
"maxDepth": 5,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "engine",
@@ -3023,7 +3040,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": "undocumented",
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "none"
},
"modelMode": "passive",
"hookBus": "host",
@@ -3132,7 +3150,8 @@ const capabilities = {
"maxDepth": "undocumented",
"background": false,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "none"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4159,7 +4178,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4274,7 +4294,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4359,7 +4380,8 @@ const runtimes = {
"maxDepth": 5,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "harness-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4442,7 +4464,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "read-only",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -4559,7 +4582,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4640,7 +4664,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4736,7 +4761,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4846,7 +4872,8 @@ const runtimes = {
"maxDepth": 2,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "harness-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -4954,7 +4981,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "read-only",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -5049,7 +5077,8 @@ const runtimes = {
"maxDepth": -1,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "host",
@@ -5143,7 +5172,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -5228,7 +5258,8 @@ const runtimes = {
"coder",
"explore",
"plan"
]
],
"isolation": "orchestrator-worktree"
},
"modelMode": "passive",
"hookBus": "host",
@@ -5326,7 +5357,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": true
"backgroundDispatch": true,
"isolation": "orchestrator-worktree"
},
"modelMode": "active",
"hookBus": "host",
@@ -5396,7 +5428,8 @@ const runtimes = {
"maxDepth": 0,
"background": false,
"backgroundDispatch": false,
"subagentToolkit": "undocumented"
"subagentToolkit": "undocumented",
"isolation": "none"
},
"modelMode": "active",
"hookBus": "host",
@@ -5497,7 +5530,8 @@ const runtimes = {
"maxDepth": 1,
"background": true,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "host",
@@ -5597,7 +5631,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "passive",
"hookBus": "engine",
@@ -5653,7 +5688,8 @@ const runtimes = {
"maxDepth": 5,
"background": true,
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "undocumented"
},
"modelMode": "active",
"hookBus": "engine",
@@ -5733,7 +5769,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": "undocumented",
"subagentToolkit": "undocumented",
"backgroundDispatch": "undocumented"
"backgroundDispatch": "undocumented",
"isolation": "none"
},
"modelMode": "passive",
"hookBus": "host",
@@ -5842,7 +5879,8 @@ const runtimes = {
"maxDepth": "undocumented",
"background": false,
"subagentToolkit": "full",
"backgroundDispatch": false
"backgroundDispatch": false,
"isolation": "none"
},
"modelMode": "passive",
"hookBus": "host",

View File

@@ -739,6 +739,9 @@ const VALID_HOST_RUNTIMES = new Set(['node', 'bun', 'sandboxed-web', 'python
const VALID_SUBAGENT_TOOLKITS = new Set(['full', 'read-only', 'built-in-only']);
// ADR-1239 amendment (#2481): how reasoning effort reaches the host.
const VALID_EFFORT_SURFACES = new Set(['argv', 'none']);
// ADR-1239 Codex-binding amendment (#2584): how a host isolates concurrent
// same-wave executors — a dispatch sub-field, not a top-level axis.
const VALID_DISPATCH_ISOLATION = new Set(['harness-worktree', 'orchestrator-worktree', 'none']);
// GATE A: installSurface → allowed hooksSurface values (DEFECT.GENERATIVE-FIX: parity invariant)
// Derived from the actual pairings in the 16 real runtime descriptors.
@@ -1291,6 +1294,25 @@ function validateRuntimeBody(cap) {
'runtime.hostIntegration.dispatch.backgroundDispatch must be a boolean or "undocumented" (got: ' + JSON.stringify(d.backgroundDispatch) + ')',
);
}
// isolation — ADR-1239 Codex-binding amendment (#2584).
// OPTIONAL, like effortSurface: added after descriptors already existed,
// so requiring it would invalidate every descriptor authored before it —
// including third-party ones, breaking the "purely additive" property
// ADR-1239 promises for external descriptors. An omitted isolation is
// legitimate: negotiation degrades it to 'none' (the safe floor) and
// warns, exactly as for any other undeclared dispatch sub-field. Only a
// PRESENT value is checked against the closed vocabulary.
if (d.isolation === undefined) {
// absent — nothing to validate; negotiateHostCapabilities fails it closed.
} else if (d.isolation === '__proto__' || d.isolation === 'constructor' || d.isolation === 'prototype') {
errors.push('runtime.hostIntegration.dispatch.isolation "' + d.isolation + '" is a reserved name');
} else if (d.isolation !== 'undocumented' && !VALID_DISPATCH_ISOLATION.has(d.isolation)) {
errors.push(
'runtime.hostIntegration.dispatch.isolation must be one of: ' + [...VALID_DISPATCH_ISOLATION].join(', ') +
' (or "undocumented") (got: ' + JSON.stringify(d.isolation) + ')',
);
}
}
}
@@ -2321,6 +2343,7 @@ module.exports = {
VALID_TRANSPORTS,
VALID_HOST_RUNTIMES,
VALID_SUBAGENT_TOOLKITS,
VALID_DISPATCH_ISOLATION,
_HOST_INTEGRATION_VOCAB: {
embeddingMode: [...VALID_EMBEDDING_MODES],
commandSurface: [...VALID_COMMAND_SURFACES],
@@ -2331,6 +2354,7 @@ module.exports = {
runtime: [...VALID_HOST_RUNTIMES],
subagentToolkit: [...VALID_SUBAGENT_TOOLKITS],
effortSurface: [...VALID_EFFORT_SURFACES],
isolation: [...VALID_DISPATCH_ISOLATION],
},
INSTALL_SURFACE_TO_ALLOWED_HOOKS_SURFACES,
GEMINI_AGENT_EVENTS,