NEXT temporary contract 3.9 — External adapters: new clients without compiled catalogue lock-in
01Temporary normative staging unit. Its body is the accepted architecture from refined plan revision 4, section 3.9. Before production code cites this law, promote the relevant clauses into permanent specifications. This file is consumed only after semantic coverage, implemented behavior and retained evidence are accepted. The task/retirement checker cannot perform semantic acceptance.
02D-008/D-012: first-wave supported clients — Claude Code, Codex, OpenCode, Qwen Code. Current five legacy profiles — characterization input, не новая граница extensibility. Gemini/Copilot secondary, не acceptance dependency.
03Package-authored request: qualified client/adapter identity, captured descriptor, supported version predicate, surface×scope×resource-shape matrix, relative destinations, structured config member paths, rendering data, requested observation/installation operations. Новый client, path или key не требует нового enum case/core release, если выражается existing operation algebra.
04Host authority: closed generic operation semantics — contained file/tree projection, typed JSON/TOML member reconciliation, approved renderers, safe observation, receipt-scoped removal. Host binds symbolic roots и issues grants по exact normalized resources/operations. Package supplies requested path/key; оно не может само выдать grant. No broad implicit home-write. Package operations cannot edit their own grant issuer/policy store, trusted-producer configuration or publication-mode switch; эти owner-only control-plane resources исключены из generic adapter write grants. Plan exposes resulting active content/MCP launch references и effects до consent. Presence/detection/manifest/hash не authority.
05ClientExecutables/deploy native wire сегодня имеет три named fields (E27); migrate to open validated capability map. Compatibility readers/adapters preserve current values, but Qwen не добавляется merely fourth hardcoded slot. Real external package must introduce a client with unchanged engine binary.
06Pure discovery/plan использует prepared captures and host-read observations; no executable version probes, PATH search, hydrate, native provider or network. Explicit probe/prepare creates bound evidence. Actual client CLI operations используют admitted executable identity и operation/typed-parameter recipe; generic renderer не превращается в shell. Novel effectful native provider проходит separate explicit code trust; typed replies/grants не OS sandbox.
07Ownership: existing standalone/project-binding/deploy receipt families retain authorities. Cross-family adoption explicit, equal bytes не ownership. Resource collision judged physically; config members owned logically, whole config lock excludes concurrent updates. Upgrade added/retained/removed resources, preimage/after-image и descriptor/grant/semantics version bound; expanded grant requires new admission. Current OpenCode update not automatically reversible (E27): retain real before-state либо report non-reversible prepared effect, не обещать inverse без evidence.
08Revocation blocks future apply under revoked grant; receipts/inspection remain. Cleanup uses separately authorized receipt-bounded host primitive and retained operation data even if package missing. Never execute revoked native implementation just to uninstall it. Client unsupported feature must refuse explicitly; mandatory installation/update/removal scenarios for chosen four cannot close on unsupported placeholders.