zot/internal
patriceckhart e1c1e0e609 fix(cli): load extensions in print and json modes too
runPrintMode and runJSONMode never constructed the extension
manager, so --ext and installed extensions were silently ignored in
non-interactive flows. Only the interactive TUI and rpc mode were
loading them. The symptom: 'zot -e ~/path/to/weather -p "..."'
would spawn nothing, no log, and the model had no weather tool.

Added shared helpers used by both print and json:
  - setupNonInteractiveExtensions: same --ext + Discover sequence
    as interactive, plus the session_start event and MergeExtensionTools.
  - wireNonInteractiveAgentExtHooks: same BeforeToolExecute /
    BeforeTurn / BeforeAssistantMessage / OnEvent plumbing so guard
    extensions, event interceptors, and extension-contributed tools
    work identically in one-shot runs.
  - nonInteractiveExtHooks: minimal HostHooks impl. Notify goes to
    stderr so extensions can still log; Submit / Insert / Display
    are no-ops because there's no TUI to steer.

Verified end-to-end:

  zot -e ~/Developer/zot/examples/extensions/weather \
      -p 'use the weather tool for Berlin'
  -> 'Berlin: 16°C, fog. (deterministic demo)'

Before the fix, the same command silently fell back to bash/curl
suggestions because no tool was ever registered.
2026-04-19 20:00:36 +02:00
..
agent fix(cli): load extensions in print and json modes too 2026-04-19 20:00:36 +02:00
assets add logo to callback page 2026-04-18 10:15:53 +02:00
auth add auto compaction 2026-04-18 10:34:08 +02:00
core fix(no-yolo): don't auto-refuse tool calls in non-interactive modes 2026-04-19 19:17:05 +02:00
extproto feat(ext): phase 4 - full-event interception, arg rewrites, /reload-ext 2026-04-19 17:02:04 +02:00
provider perf(anthropic): fix cost double-count, tighten caching, correct catalog 2026-04-19 18:57:18 +02:00
skills perf(prompt): cut system prompt to the bone (410 -> 54 tokens) 2026-04-19 17:39:38 +02:00
tui fix(tui): cursor after multi-line paste lands in wrong column 2026-04-19 19:50:19 +02:00