E0-3/E0-4 groundwork: provider options, pinned docs, Track A/B in the protocol

- providers: per-model request extras (e.g. reasoning_effort), key_env,
  token_param (max_completion_tokens on api.openai.com); recorded
- docs pinned to the toolchain being run: Rust offline docs from the
  sysroot, Zig langref and std source of the same installation; several
  mounts under a read-only /docs; hashes recorded (cached for big trees)
- protocol: neutral model labels and calibration before classes (§2);
  smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of
  degradation (§39a); Track A controlled vs Track B native agents (§39b)
- plan: E-C calibration, E-G gates, E-N native-agent run
This commit is contained in:
dev committed 2026-10-04 17:28:15 +03:00
1 parent b49003bdb9
commit d7bb9273f3
14 files changed
+250 -60

No files matched your search

+25 -4
View File
@@ -87,11 +87,32 @@ def versions(prof, env=None):
return out
def docs_path(prof):
def docs_mounts(prof):
"""Documentation mounted under /docs, as [(name, host path)]; name ""
means the directory is /docs itself. The environment variable wins;
otherwise `default`, or `from_toolchain` (paths relative to the bound
toolchain directory, so the documentation always matches the compiler
being run; each is mounted as /docs/<last path component>)."""
d = prof.get("docs") or {}
path = os.environ.get(d.get("env", ""), "") or d.get("default", "")
path = expand(path) if path else ""
return path if path and os.path.exists(path) else None
path = os.environ.get(d.get("env", ""), "") or (expand(d["default"]) if d.get("default") else "")
if path:
if not os.path.exists(path):
return []
return [("", path)] if os.path.isdir(path) else [(os.path.basename(path), path)]
rels = d.get("from_toolchain") or []
if isinstance(rels, str):
rels = [rels]
if not rels:
return []
_, binds = resolve_binaries(prof)
out = []
for rel in rels:
for b in binds:
cand = os.path.join(b, rel)
if os.path.exists(cand):
out.append((os.path.basename(rel.rstrip("/")), cand))
break
return out
def classify(prof, command):