modelreport

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package modelreport reads the model a native agent session is running from that session's transcript file, for `hadron team session sync-model` (hadron-cli#995, #2252 slice B1).

The reader is deliberately narrow. It never chooses a transcript: the only file it will read is the one the bound Hadron session already RECORDED as its transcriptPath, and the hook's path, native session id and cwd are claims it verifies against that file, not an association source. Anything it cannot prove returns ErrUnavailable, carrying a fixed reason and no path or transcript content, so a caller reports nothing rather than guess.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("model unavailable")

ErrUnavailable is the one failure: no model could be proven. Reasons are fixed strings.

Functions

func DefaultRoots

func DefaultRoots() []string

DefaultRoots are the transcript roots the supported tools write under.

func Read

func Read(o Options) (string, error)

Read returns the model of the native session, or ErrUnavailable.

func ValidModel

func ValidModel(s string) bool

ValidModel bounds a model string before it goes on the wire.

Types

type Claim

type Claim struct {
	SessionID      string
	TranscriptPath string
	Cwd            string
}

Claim is what the native tool's hook supplied on stdin.

type Options

type Options struct {
	Recorded string
	Claim    Claim
	Roots    []string
}

Options: Recorded is the bound session's server-recorded transcriptPath.

Jump to

Keyboard shortcuts

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