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).
This commit is contained in:
1 parent
b953475bf7
commit
78b4621ba0
115 files changed
+1701
-398
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "browser",
|
||||
"title": "Browser",
|
||||
"concern": "Real browser automation (Playwright): open a web page, read its text or links, take a screenshot, and click, type, or fill forms to carry out a task on a website.",
|
||||
"categories": {
|
||||
"browser": "Browser automation: opening a web page, reading its text or links, taking a screenshot, and clicking, typing, or filling forms to carry out a task on a website."
|
||||
},
|
||||
"bridges": ["browser"],
|
||||
"requires": ["playwright"],
|
||||
"enabled_by_default": false,
|
||||
"config": {
|
||||
"enabled": {"type": "bool", "default": false, "doc": "Load this pack's skills and run its bridge. Disabled by default: it needs the optional Playwright deps + browser binaries (scripts/bootstrap.sh --browser)."},
|
||||
"host": {"type": "str", "default": "127.0.0.1", "doc": "Bridge bind address (localhost only)."},
|
||||
"port": {"type": "int", "default": 5232, "doc": "Bridge listen port."},
|
||||
"token": {"type": "str", "default": "", "secret": true, "doc": "Shared secret required in the X-Semif-Token header when set."},
|
||||
"engine": {"type": "str", "default": "chromium", "doc": "chromium | firefox | webkit."},
|
||||
"headless": {"type": "bool", "default": true, "doc": "false shows the browser window (to sign in once)."},
|
||||
"channel": {"type": "str", "default": "", "doc": "Use an already-installed browser channel (chrome/msedge) and skip Playwright's download."},
|
||||
"executable_path": {"type": "str", "default": "", "doc": "Use a specific browser binary; wins over channel."},
|
||||
"profile_dir": {"type": "str", "default": "", "doc": "Persistent profile directory (logins survive across calls)."},
|
||||
"browsers_path": {"type": "str", "default": "", "doc": "PLAYWRIGHT_BROWSERS_PATH override."},
|
||||
"screenshot_dir": {"type": "str", "default": "", "doc": "Where screenshots are saved."},
|
||||
"default_timeout": {"type": "float", "default": 30.0, "doc": "Default navigation/action timeout (seconds)."},
|
||||
"max_text_chars": {"type": "int", "default": 20000, "doc": "Bound on returned page text."}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user