agentmode

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enabled bool

Enabled reports whether agent mode is active. The result is determined once, during Init, and cached for the lifetime of the process.

Functions

func Init

func Init(flagValue bool)

Init resolves whether agent mode should be active according to the following priority (first match wins):

  1. DASH0_AGENT_MODE=0|false → disabled (overrides everything)
  2. --agent-mode flag → enabled (passed as flagValue)
  3. DASH0_AGENT_MODE=1|true → enabled
  4. Any known AI-agent env var → enabled

Call Init once from main, before any output.

func PrintJSONError

func PrintJSONError(w io.Writer, err error)

PrintJSONError writes err as a JSON object to w. If the error string contains a "\nHint:" section, it is split into the "error" and "hint" fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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