hooks

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Example: WithHooks wires typed callbacks into opencode's session/update stream + lifecycle + permission path. This example logs every tool opencode is about to run, counts the turns, and refuses any fs/write_text_file delegation targeting /etc/*.

Run with `go run ./examples/hooks`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL