Help us shape the future of Go! Take the 2026 Go Developer Survey

nativetrace

package
v0.0.0-...-c703685 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package nativetrace decodes bounded observations from an invocation-owned Codex trace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Tool, Input      string
	Command          commandanalysis.Command
	LocalEnvironment bool
	Session          string
}

Call contains decoded native invocation facts, not trace protocol payloads. LocalEnvironment is true only for a supported local command environment.

type Cell

type Cell struct {
	// contains filtered or unexported fields
}

Cell is a detached observation correlated by thread, outer call and source. Its methods do not refresh the reader or execute tools.

func (*Cell) Calls

func (c *Cell) Calls() []Call

Calls returns call inputs in host dispatch order, including repeated occurrences.

func (*Cell) Commands

func (c *Cell) Commands(commands []commandanalysis.Command, workspace string) ([]binding.ToolResult, bool)

Commands confirms each observed command by exactly one terminal host call. Any unobserved occurrence leaves the outcome unconfirmed.

func (*Cell) Ended

func (c *Cell) Ended() bool

Ended reports whether the host ended the outer cell, independently of its tools.

func (*Cell) ExecCommands

func (c *Cell) ExecCommands() []string

ExecCommands lists an ended cell's nested exec_command calls.

func (*Cell) Patch

func (c *Cell) Patch(input string, occurrence int) (binding.ToolResult, bool)

Patch returns one terminal patch result only after its outer cell ended.

func (*Cell) PatchPending

func (c *Cell) PatchPending(input string, occurrence int) bool

PatchPending distinguishes an observed unfinished patch from an absent call.

func (*Cell) Pending

func (c *Cell) Pending() bool

Pending reports an unfinished cell, patch, or yielded command.

func (*Cell) ToolCalls

func (c *Cell) ToolCalls() []string

ToolCalls lists the observed nested host identities of an ended cell. It establishes cell membership only, never a per-tool share of printed output.

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader observes the private directory supplied to a Codex invocation. It owns no process, trace lifetime, capture policy or publication side effects.

func NewWithNotice

func NewWithNotice(directory string, notice func(string)) *Reader

NewWithNotice reports the first unsupported or discontinuous trace in an invocation.

func (*Reader) CommandTimeout

func (t *Reader) CommandTimeout(thread, call string) (uint64, bool)

CommandTimeout reads the original input by exact native thread/call identity. Missing or ambiguous input has no timeout label, including after fresh resume.

func (*Reader) Directory

func (t *Reader) Directory() string

Directory is the invocation's trace location, also supplied to the host.

func (*Reader) ReadCell

func (t *Reader) ReadCell(thread, callID, source string) *Cell

ReadCell returns a copy; concurrent requests never share mutable outcomes. Missing/corrupt/bounded-out evidence is unavailable, never a successful call.

Jump to

Keyboard shortcuts

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