Documentation
¶
Overview ¶
Package tape implements append-only audit logs aligned with Republic's tape schema.
Index ¶
- Constants
- type EinoHandler
- func (h *EinoHandler) Needed(ctx context.Context, info *callbacks.RunInfo, timing callbacks.CallbackTiming) bool
- func (h *EinoHandler) OnEnd(ctx context.Context, info *callbacks.RunInfo, output callbacks.CallbackOutput) context.Context
- func (h *EinoHandler) OnEndWithStreamOutput(ctx context.Context, info *callbacks.RunInfo, ...) context.Context
- func (h *EinoHandler) OnError(ctx context.Context, info *callbacks.RunInfo, err error) context.Context
- func (h *EinoHandler) OnStart(ctx context.Context, info *callbacks.RunInfo, input callbacks.CallbackInput) context.Context
- func (h *EinoHandler) OnStartWithStreamInput(ctx context.Context, info *callbacks.RunInfo, ...) context.Context
- type Entry
- func Anchor(name string, state, meta map[string]any) Entry
- func ErrorPayload(message string, extra, meta map[string]any) Entry
- func Event(name string, data, meta map[string]any) Entry
- func Message(msg, meta map[string]any) Entry
- func System(content string, meta map[string]any) Entry
- func ToolCall(calls []map[string]any, meta map[string]any) Entry
- func ToolResult(results []any, meta map[string]any) Entry
- type JSONLStore
- type RunMeta
Constants ¶
View Source
const FileName = ".tape.jsonl"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EinoHandler ¶
type EinoHandler struct {
// contains filtered or unexported fields
}
func NewEinoHandler ¶
func NewEinoHandler(store *JSONLStore, meta RunMeta) *EinoHandler
func (*EinoHandler) Needed ¶
func (h *EinoHandler) Needed(ctx context.Context, info *callbacks.RunInfo, timing callbacks.CallbackTiming) bool
func (*EinoHandler) OnEnd ¶
func (h *EinoHandler) OnEnd(ctx context.Context, info *callbacks.RunInfo, output callbacks.CallbackOutput) context.Context
func (*EinoHandler) OnEndWithStreamOutput ¶
func (h *EinoHandler) OnEndWithStreamOutput(ctx context.Context, info *callbacks.RunInfo, output *schema.StreamReader[callbacks.CallbackOutput]) context.Context
func (*EinoHandler) OnStart ¶
func (h *EinoHandler) OnStart(ctx context.Context, info *callbacks.RunInfo, input callbacks.CallbackInput) context.Context
func (*EinoHandler) OnStartWithStreamInput ¶
func (h *EinoHandler) OnStartWithStreamInput(ctx context.Context, info *callbacks.RunInfo, input *schema.StreamReader[callbacks.CallbackInput]) context.Context
type Entry ¶
type JSONLStore ¶
type JSONLStore struct {
// contains filtered or unexported fields
}
func OpenJSONL ¶
func OpenJSONL(path string) (*JSONLStore, error)
func (*JSONLStore) Append ¶
func (s *JSONLStore) Append(e Entry) error
func (*JSONLStore) Close ¶
func (s *JSONLStore) Close() error
func (*JSONLStore) Path ¶
func (s *JSONLStore) Path() string
Click to show internal directories.
Click to hide internal directories.