Files
semif-agent/config.example.json
T
gabby 78b4621ba0 Abstract seeds into modular skill packs + split config
Group committed starter skills into packs (semif_agent/packs.py) that bind a
concern to its categories, bridge(s), requirements, and config schema:

- seeds/ -> packs/<name>/ with a pack.json manifest + skills/<category>/<leaf>/.
  Shipped: nextcloud, simplex, outlook, browser (each owning its bridge) and
  essentials (time + calculator, no bridge).
- PackRegistry discovers packs (a root with no manifest is one implicit pack);
  merge_packs loads every enabled pack. Pack enable is one switch
  (packs.<name>.enabled -> bridges.<bridge>.enabled -> enabled_by_default);
  disabling a pack drops its categories (incl. generated bodies) and its bridge.
- CATEGORY_DESCRIPTIONS now comes from the pack manifests (built-ins stay).

Adopt a Home-Assistant-style layered config (semif_agent/config.py):

- config.json is a thin index ({"include": [...]}) over config/core.json,
  config/gateway.json, config/bridges.json, config/packs/*.json, deep-merged.
- Secrets live in the gitignored secrets.json, referenced as "!secret <key>";
  api_key_env is removed.
- CORE_SCHEMA + each pack's config schema own defaults and GENERATE the
  committed config.example.json; new `check-config` (validate + --write-example)
  and `config-init` (seed the split layout) commands.
- scripts/config_merge.py (stdlib) lets bootstrap read the merged config.

Tests: tests/test_packs.py (renamed from test_seed_skills, +enable/merge),
new tests/test_config.py. All unit tests pass (772).
2026-10-13 14:20:35 +00:00

312 lines
7.3 KiB
JSON

{
"tau": 0.6,
"max_reentries": 3,
"query_recall_window": 30,
"new_skill_creation": "allow",
"verbosity": "result",
"chain": {
"result_chars": 300
},
"assess": {
"done_tau": 0.5,
"fail_tau": 0.5
},
"timezone": "",
"navigation": {
"intent_tau": 0.6,
"category_tau": 0.75,
"action_tau": 0.5,
"softmax_bypass_tau": 0.5
},
"queue": {
"max_size": 100
},
"engine": {
"provider": "semif",
"backend": "llamacpp",
"context_tokens": 4096,
"threads": 8,
"gpu_layers": 0,
"gpu_device": null,
"gpu_split": 0,
"winnow": {
"base_url": "http://127.0.0.1:8091",
"model": "",
"context_tokens": 32768,
"api_key": "!secret engine_winnow_api_key",
"timeout": 120,
"retries": 0,
"user_agent": "semif-agent",
"extra_headers": {}
},
"gguf": ""
},
"llm": {
"provider": "ollama",
"base_url": "http://localhost:11434/v1",
"model": "",
"api_key": "!secret llm_api_key",
"user_agent": "",
"timeout": 600,
"stream": false,
"idle_warn": 30,
"idle_timeout": 120,
"context_window": 0,
"temperature": 0.2,
"top_p": 0.9,
"presence_penalty": 0.0,
"frequency_penalty": 0.0,
"disable_thinking": true,
"semif": {
"temperature": 0.0,
"max_tokens": 256
}
},
"codegen": {
"provider": "ollama",
"base_url": "http://localhost:11434/v1",
"model": "",
"api_key": "!secret codegen_api_key",
"user_agent": "",
"timeout": 3600,
"stream": true,
"idle_warn": 60,
"idle_timeout": 180,
"context_window": 0,
"smart_limit": 250000,
"warn_limit": 500000,
"max_fill_ratio": 0.9,
"warn_fill_ratio": 0.7,
"max_output": 0.85,
"chars_per_token": 4.0,
"temperature": 1,
"top_p": 0.95,
"presence_penalty": 0,
"frequency_penalty": 1,
"max_attempts": 3,
"approval": {
"wait_timeout": 900
},
"fidelity": {
"enabled": true,
"max_attempts": 1,
"tau": 0.6
},
"repair": {
"enabled": true,
"max_attempts": 1
},
"test_timeout": 30,
"test_max_attempts": 3,
"max_body_tokens": 0,
"max_test_tokens": 0,
"decision_reserve_tokens": 1024,
"contract_search": {
"enabled": true
},
"degeneration": {
"enabled": true,
"threshold": 0.9,
"interval": 8000,
"window": 2000,
"min_chars": 4000
}
},
"skill_bodies": "data/skills",
"log": "data/decisions.jsonl",
"trace": "data/runs.jsonl",
"category_registry": "data/categories.json",
"simplex_chat": {
"port": 5226,
"display_name": "semif",
"forward_port": 5228,
"forward_display_name": "semif-forward"
},
"gateway": {
"humanize": {
"enabled": true,
"timeout": 20.0,
"max_tokens": 200,
"max_chars": 600
},
"simplex": {
"enabled": true,
"ws_url": "ws://127.0.0.1:5226",
"allowed_users": [],
"allow_all_users": false,
"auto_accept": true,
"home_channel": "",
"reply_prefix": "",
"text_batch_delay": 0.8,
"reconnect": {
"initial": 1.0,
"max": 60.0,
"jitter": 0.2
}
},
"lxmf": {
"enabled": false,
"allowed_users": [],
"allow_all_users": false,
"display_name": "semif",
"announce_interval": 3600,
"stamp_cost": 8,
"desired_method": "direct",
"propagation_node": "",
"config_dir": "",
"storage_path": "",
"home_channel": "",
"reply_prefix": "",
"text_batch_delay": 0.8
},
"voice": {
"enabled": false,
"chat_id": "voice",
"display_name": "voice",
"home_channel": "voice",
"reply_prefix": "",
"result_only": true,
"max_speak_chars": 600,
"listen_timeout_s": 3.0,
"cue": {
"enabled": true,
"frequency": 880,
"duration_ms": 120,
"volume": 0.9,
"submit_frequency": 0,
"submit_duration_ms": 100,
"submit_notes": [
[
1046.5,
70
],
[
1568.0,
90
]
],
"note_gap_ms": 20
},
"wake": {
"model": "hey_computer",
"threshold": 0.2,
"inference_framework": "onnx",
"model_dir": ""
},
"stt": {
"model": "base.en",
"device": "cpu",
"compute_type": "int8",
"language": "en"
},
"tts": {
"voice": "en_US-lessac-medium",
"voice_dir": "",
"speaker_id": 0,
"length_scale": 1.0,
"volume": 1.0
},
"audio": {
"input_device": "",
"output_device": "",
"sample_rate": 16000,
"frame_ms": 80,
"capture_sample_rate": 0,
"output_sample_rate": 0,
"dc_removal": true,
"read_timeout_s": 1.0,
"stall_timeout_s": 5.0
},
"vad": {
"silence_ms": 500,
"min_speech_ms": 120,
"max_utterance_s": 30,
"min_command_ms": 700,
"initial_silence_ms": 1500,
"aggressiveness": 2,
"energy_threshold": 200.0
},
"follow_up_window_s": 0.0
}
},
"dashboard": {
"port": 8765,
"host": "127.0.0.1"
},
"skill_packs": "packs",
"secrets_file": "secrets.json",
"_comment": "GENERATED from the core schema (semif_agent/config.py) and each pack's pack.json `config` schema \u2014 do not hand-edit; edit a pack's schema or the core schema. This is the reference example; the live per-machine config is split under config/ (see config.json's include list) and secrets live in the gitignored secrets.json, referenced as '!secret <key>'.",
"bridges": {
"llm": {
"enabled": true,
"host": "127.0.0.1",
"port": 5229,
"token": "!secret llm_token"
},
"browser": {
"enabled": false,
"host": "127.0.0.1",
"port": 5232,
"token": "!secret browser_token",
"engine": "chromium",
"headless": true,
"channel": "",
"executable_path": "",
"profile_dir": "",
"browsers_path": "",
"screenshot_dir": "",
"default_timeout": 30.0,
"max_text_chars": 20000
},
"nextcloud": {
"enabled": true,
"host": "127.0.0.1",
"port": 5230,
"token": "!secret nextcloud_token",
"url": "",
"username": "",
"app_password": "!secret nextcloud_app_password",
"default_calendar": "",
"default_task_calendar": "",
"default_addressbook": "",
"verify_tls": true,
"timeout": 30
},
"outlook": {
"enabled": false,
"host": "127.0.0.1",
"port": 5231,
"token": "!secret outlook_token",
"client_id": "",
"tenant": "common",
"token_path": ".runtime/outlook/token.json",
"default_calendar": "",
"default_task_list": "",
"default_mail_folder": "inbox",
"default_timezone": "UTC",
"verify_tls": true,
"timeout": 30
},
"simplex": {
"enabled": true,
"host": "127.0.0.1",
"port": 5227,
"token": "!secret simplex_token",
"max_inbox": 100,
"ws_url": "ws://127.0.0.1:5228",
"user_id": 1,
"auto_accept": true,
"reconnect": {
"initial": 1.0,
"max": 60.0,
"jitter": 0.2
}
}
},
"packs": {
"essentials": {
"enabled": true
}
}
}