environment

package
v0.1.70 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package environment builds EnvironmentFingerprints from the host and adapter-provided hints. Raw probe output stays local (goal.md §8.2).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(ctx context.Context, hints map[string]string) domain.EnvironmentFingerprint

Collect assembles a fingerprint. Hints use the JSON field names of domain.EnvironmentFingerprint ("runtime", "runtimeVersion", ...); a hint naming a tool with an empty version triggers a local probe.

func DetectCI

func DetectCI() bool

DetectCI reports whether this process looks like an automated runner.

func Probe

func Probe(ctx context.Context, tool string) string

Probe returns the "major.minor(.patch)" version of a known tool, or "" if the tool is missing, unknown, or times out.

Types

type BrowserContext

type BrowserContext struct {
	Family        string // chrome|edge|firefox|safari|chromium|android-webview|ios-wkwebview|electron
	Major         string // "140"
	Engine        string // chromium|gecko|webkit
	EngineVersion string // engine major, e.g. "140" or "605"
}

BrowserContext is the normalized, privacy-reduced form of a browser runtime. The full User-Agent string is parsed locally and then discarded: only these coarse fields may enter Evidence (goal — API compatibility, not fingerprinting).

func ParseUserAgent

func ParseUserAgent(ua string) BrowserContext

ParseUserAgent normalizes a User-Agent into a BrowserContext. Unrecognized agents return a zero value — an unknown context is honest, a guessed one is not.

Jump to

Keyboard shortcuts

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