bootstrap: seed config.json once; move refs to committed pins.json
config.json is now per-machine USER config that no code writes: bootstrap seeds it from config.example.json only when absent, then reads every per-machine value from it. Flags override those values for the run only and are never written back. External refs (engine commit, GGUF url+sha256, HF tokenizer revision, simplex-chat version/url+sha256) move out of config into a committed, code-owned pins.json, so a git pull bump propagates on the next bootstrap run instead of being frozen per machine. The agent reads engine source/revision from pins.json and derives the GGUF path from engine.gguf_url under .runtime/models/ (an explicit engine.gguf in config.json overrides it). - config.example.json: drop all refs; ship the provisioned defaults (codegen.timeout 3600, gateway/bridge enabled, dashboard 127.0.0.1) - scripts/bootstrap.sh: seed config.json if absent, read pins from pins.json and per-machine values from config.json, never write config.json; drop the flags that only existed to populate config.json; US-delimit read fields so empty values do not shift later fields - semif_agent/cli.py: add load_pins / build_engine_config; load_config hard-errors when config.json is missing - tests/integration + README/AGENTS updated
This commit is contained in:
1 parent
38cba33bbf
commit
43ece0cfd6
7 files changed
+294
-257
No files matched your search
@@ -12,7 +12,13 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from semif_agent.cli import _opt_float, _required_model, build_scheduler, load_config
|
||||
from semif_agent.cli import (
|
||||
_opt_float,
|
||||
_required_model,
|
||||
build_engine_config,
|
||||
build_scheduler,
|
||||
load_config,
|
||||
)
|
||||
from semif_agent.codegen import (
|
||||
CodegenClient,
|
||||
generate_skill_body,
|
||||
@@ -40,18 +46,9 @@ from semif_agent.skills import (
|
||||
|
||||
|
||||
def require_real(config: dict):
|
||||
from semif_agent.engine import SemIfEngine, EngineConfig
|
||||
from semif_agent.engine import SemIfEngine
|
||||
|
||||
engine = SemIfEngine(
|
||||
EngineConfig(
|
||||
backend=config.get("engine", {}).get("backend", "llamacpp"),
|
||||
source=config.get("engine", {}).get("source", ""),
|
||||
revision=config.get("engine", {}).get("revision", ""),
|
||||
gguf=config.get("engine", {}).get("gguf", ""),
|
||||
context_tokens=int(config.get("engine", {}).get("context_tokens", 4096)),
|
||||
threads=config.get("engine", {}).get("threads"),
|
||||
)
|
||||
)
|
||||
engine = SemIfEngine(build_engine_config(config))
|
||||
try:
|
||||
engine._ensure_loaded()
|
||||
except EngineUnavailable as exc:
|
||||
|
||||
Reference in new issue
Block a user