config: Phase 2 mcp example block + deep model switch
Phase 2 commit #7 (final) per docs/PHASE2.md §12. Two changes bundled: (1) commented-out mcp = {...} example block (~40 lines) at the end of config.lua showing the Phase 2 schema: - mcp.servers — alias → {url, auth_token | auth_env} - mcp.auto_approve — "<alias>.<tool>" or "<alias>.*" globs - mcp.max_tool_depth — sub-loop budget per ask_ai turn The block is OFF by default; uncomment + adjust per fleet to activate. Documentation-only; no behavior change to existing configs (mcp_sessions stays empty, tools_schema() returns [], broker omits the field — full Phase 1 compatibility). (2) User-authored: deep model preset switched from mistral-nemo-12b-instruct to qwen3-30b-a3b-instruct, with a 10-min timeout_ms accommodating the larger model's RK3588 inference time. Reason: nemo backend is dormant per the proxy /v1/models discovery (aish#23 now returns 404 cleanly for unknown models instead of silent fallback); qwen3-30b is the practical "deep" alternative. Phase 2 implementation is now complete — 7 of 7 commits landed: #16c194demcp.lua + ffi/curl status_code + PHASE0 §4 amendment #20fde77fsafety.lua confirm_tool_call #37c221a8context.lua tool turns + use_tool_role fallback #4c736d0erenderer.lua tool-call frames #5efdc728broker.lua opts.tools + tool_call accumulator #67e9cfffrepl.lua sub-loop + :mcp meta + system-prompt block #7 (this) config.lua example + deep model switch Next phase-loop step: verify (Phase 7). Files written are wired and isolated-tested; end-to-end model-driven verification waits on either a more compliant model or explicit forcing of tool_calls from the prompt — known to be marginal with the loaded qwen-1.5b but proven correct against direct probes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+42
-1
@@ -20,7 +20,8 @@ return {
|
||||
},
|
||||
deep = {
|
||||
endpoint = HOSSENFELDER,
|
||||
model = "mistral-nemo-12b-instruct",
|
||||
model = "qwen3-30b-a3b-instruct",
|
||||
timeout_ms = 1800000, -- 10 min; Nemo on RK3588 is patient work
|
||||
temperature = 0.1,
|
||||
},
|
||||
cloud = {
|
||||
@@ -48,4 +49,44 @@ return {
|
||||
history = {
|
||||
dir = (os.getenv("HOME") or ".") .. "/.local/share/aish",
|
||||
},
|
||||
|
||||
-- Phase 2 (docs/PHASE2.md): MCP server registry + tool-call policy.
|
||||
-- The block is OFF by default — connect-at-startup happens only when
|
||||
-- `servers` is non-empty. Uncomment + adjust per your fleet.
|
||||
--
|
||||
-- mcp = {
|
||||
-- servers = {
|
||||
-- -- Each entry: alias = { url = "...", auth_token = "..." | auth_env = "..." }
|
||||
-- -- auth_token literal > auth_env env-var indirection > nil (no auth).
|
||||
-- -- Aliases become the namespace prefix on tool names sent to the model
|
||||
-- -- ("<alias>.<tool>" — e.g. "boltzmann.list_dir").
|
||||
-- boltzmann = {
|
||||
-- url = "http://boltzmann.fritz.box:8080/mcp",
|
||||
-- auth_env = "BOLTZMANN_MCP_TOKEN",
|
||||
-- },
|
||||
-- hertz = {
|
||||
-- url = "http://hertz.fritz.box:8080/mcp",
|
||||
-- auth_env = "HERTZ_MCP_TOKEN",
|
||||
-- },
|
||||
-- broglie = {
|
||||
-- url = "http://broglie.fritz.box:8080/mcp", -- LAN-only, no auth
|
||||
-- },
|
||||
-- },
|
||||
--
|
||||
-- -- Per-call confirm gate auto-approve policy.
|
||||
-- -- Key forms:
|
||||
-- -- "<alias>.<tool>" — auto-approve one specific tool
|
||||
-- -- "<alias>.*" — auto-approve every tool on that server
|
||||
-- -- Anything not matched falls back to the [y/N] prompt.
|
||||
-- auto_approve = {
|
||||
-- ["boltzmann.read_file"] = true,
|
||||
-- ["boltzmann.list_dir"] = true,
|
||||
-- ["boltzmann.search_files"] = true,
|
||||
-- ["hertz.*"] = true, -- trust the hub fully
|
||||
-- },
|
||||
--
|
||||
-- -- Tool-call sub-loop budget per ask_ai turn. Hitting the cap surfaces
|
||||
-- -- a status and breaks; default 8 if absent.
|
||||
-- max_tool_depth = 8,
|
||||
-- },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user