Commit fe97639
Paul C
v22.6.11: TLS /etc/wolfstack/tls/ probe + AI function-calling for small models
TLS auto-discovery now probes /etc/wolfstack/tls/ and /etc/wolfstack/ssl/
in addition to the legacy /etc/wolfstack/cert.pem path. Both cert.pem
+ key.pem and the Let's-Encrypt-style fullchain.pem + privkey.pem
naming are accepted. Drops a working pair into either subdir without
needing a systemd ExecStart override (NyvenZA v22.6.8 issue). The
"found one of two files" diagnostic fires for every probed pair so a
half-installed cert is visible on the Certificates page instead of
silently being skipped.
AI agent now sends an OpenAI-format `tools` array on every chat-loop
request, mirroring the eight bracket-tag tools (exec_local, exec_all,
read_file, web_search, fetch_url, security_audit, wolfnote_create,
propose_action). Small function-calling-specific models that ignore
prose tool descriptions in the system prompt — FunctionGemma:latest
(270M), Gorilla, NexusRaven, Hermes-FC — can now actually invoke the
full WolfStack toolset instead of self-reporting "I'm limited to
WolfRun and WolfNote" (Gary's Discord debug 2026-04-30). Tool-call
responses are translated back to bracket tags so the existing
execution loop in chat() handles them uniformly. Unknown tool names
and missing required args are dropped — a hallucinating model can't
slip arbitrary commands through.
call_local split into call_local (no tools — used by health-recommend,
issue-explain, call_ai_simple) and call_local_with_tools (used by the
main chat loop). Scoped callers stay scoped; only the agent loop
exposes the full schema. Debug log under target=wolfstack::ai dumps
tool names per request so the next "why can't the AI use tool X"
report is diagnosable in seconds with RUST_LOG=wolfstack::ai=debug.
Older Ollama / llama.cpp builds that reject the `tools` field with a
400 trigger an automatic retry without it — basic chat keeps working
on those servers, function-calling won't but at least the user gets
a response.
15 new unit tests (2 cert path + 13 tool-calling). cargo test 252/252
passing.1 parent 92c84bc commit fe97639
4 files changed
Lines changed: 569 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments