zot/internal/agent
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
..
extensions feat(ext): phase 4 - full-event interception, arg rewrites, /reload-ext 2026-04-19 17:02:04 +02:00
modes fix(cli): load extensions in print and json modes too 2026-04-19 20:00:36 +02:00
tools perf(prompt): cut system prompt to the bone (410 -> 54 tokens) 2026-04-19 17:39:38 +02:00
args.go fix(no-yolo): don't auto-refuse tool calls in non-interactive modes 2026-04-19 19:17:05 +02:00
botcmd.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_unix.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_windows.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
build.go feat(skills): user skills now opt-in via --with-skills 2026-04-19 16:03:26 +02:00
changelog.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
cli.go fix(cli): load extensions in print and json modes too 2026-04-19 20:00:36 +02:00
config.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
extcmd.go feat: extension system (subprocess + json-rpc, any language) 2026-04-19 14:09:43 +02:00
modelsync.go initial commit 2026-04-17 20:36:38 +02:00
rpc.go fix(no-yolo): don't auto-refuse tool calls in non-interactive modes 2026-04-19 19:17:05 +02:00
systemprompt.go docs(prompt): hyphenate 'zero-overhead-tool' 2026-04-19 19:24:29 +02:00
update.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00