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:
  #1 6c194de  mcp.lua + ffi/curl status_code + PHASE0 §4 amendment
  #2 0fde77f  safety.lua confirm_tool_call
  #3 7c221a8  context.lua tool turns + use_tool_role fallback
  #4 c736d0e  renderer.lua tool-call frames
  #5 efdc728  broker.lua opts.tools + tool_call accumulator
  #6 7e9cfff  repl.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:
2026-05-12 15:40:21 +00:00
parent 7e9cfff04d
commit 09800d192a
+42 -1
View File
@@ -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,
-- },
}