render

package
v2.20.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render presents the LiveKit Public API's generated types as tables or JSON for the CLI. It maps each oapi type to its columns and delegates the table/JSON mechanics to pkg/util; commands call these functions with the shared Printer and the --json flag value, keeping presentation out of the command layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessKeys added in v2.19.1

func AccessKeys(p *util.Printer, asJSON bool, keys []oapi.LivekitPublicapiProjectsV1AccessKey) error

AccessKeys prints a list of project API keys.

func AgentInsights added in v2.20.2

AgentInsights prints a project's agent insights: a table of the totals, one of the latencies that have measurements, one of the agents and one of the models; --json prints the API's response. empty says why there is no data, on stderr in both modes so --json output stays parseable, and then no tables print.

func DataPending added in v2.19.4

func DataPending(status *oapi.LivekitPublicapiObservabilityV1DataStatus) (why string, ok bool)

DataPending says why a session's data can still change: the session is still active, or it just ended, with when to read again. ok is false once the data has settled, or when the API sent no status.

func Eval added in v2.20.2

func Eval(p *util.Printer, asJSON bool, got public.EvalWithVersion) error

Eval prints an eval and one version of its definition: a few lines about the eval and the version, then the definition as indented JSON. --json prints the API's response, the resolved definition of a revision included.

func EvalDefaults added in v2.20.2

func EvalDefaults(p *util.Printer, asJSON bool, d public.EvalDefaults) error

EvalDefaults prints a project's judge defaults: who last changed them, the judge models a definition can name, and the defaults as indented JSON. --json prints the API's response.

func EvalDiff added in v2.20.2

func EvalDiff(p *util.Printer, asJSON bool, changes []oapi.LivekitPublicapiEvalsV1EvalFieldChange, empty string) error

EvalDiff prints the fields that changed between two versions of a definition, one line each: "+ path: new" for a field added, "- path: old" for one removed, and "~ path: old -> new" for one changed. --json prints the changes. empty says why there are none, on stderr in both modes.

func EvalHistory added in v2.20.2

func EvalHistory(p *util.Printer, asJSON bool, entries []oapi.LivekitPublicapiEvalsV1EvalHistoryEntry, nextCursor, empty string) error

EvalHistory prints a page of an eval's history, one row per change, and a hint when there is more; --json prints the page. empty says why there is nothing, on stderr in both modes.

func EvalResults added in v2.20.2

EvalResults prints a project's eval results: a table of the totals, one of the evals, one of their versions, one of the criteria (only when the read named one eval), one of the agents, and one of the error codes. --json prints the API's response. empty says why there are no results, on stderr in both modes, and then no tables print.

func EvalSessions added in v2.20.2

func EvalSessions(p *util.Printer, asJSON bool, sessions []oapi.LivekitPublicapiObservabilityV1EvalSession, names EvalSessionNames, nextCursor, empty string) error

EvalSessions prints the agent jobs that LiveKit scored or labeled, one row for each eval result of each job (one row for a job it only labeled), and a hint when there are more; --json prints the jobs as a page. The Detail column holds the failed criteria, or with a criterion filter the criterion's answer and its judges' answers. empty says why there are none, on stderr in both modes. names holds the label and eval names the table shows in place of their IDs.

func EvalValidation added in v2.20.2

func EvalValidation(p *util.Printer, asJSON bool, v public.EvalValidation) error

EvalValidation prints a definition's violations, one line each as "path: what is wrong", or on stderr that the definition can be published. --json prints the API's response, with the definition the project's judge defaults complete.

func Evals added in v2.20.2

func Evals(p *util.Printer, asJSON bool, evals []oapi.LivekitPublicapiEvalsV1Eval, empty string) error

Evals prints a project's evals, one row each; --json prints the list.

func LogPatterns added in v2.20.2

LogPatterns prints a project's ranked log patterns, one row each with its count, level, source, first and last record, and template, then on stderr how many records the range holds and whether the counts are estimates; --json prints the API's response. empty says why there are no patterns, on stderr in both modes so --json output stays parseable.

func ProjectInvite

ProjectInvite prints a single project invite.

func ProjectInvites

func ProjectInvites(p *util.Printer, asJSON bool, invites []oapi.LivekitPublicapiProjectsV1ProjectInvite) error

ProjectInvites prints a list of project invites.

func ProjectLogs added in v2.20.2

func ProjectLogs(p *util.Printer, asJSON bool, page public.ProjectLogPage, empty string) error

ProjectLogs prints a page of a project's log records, one line per record with its time, level, source, session, logger and message; --json prints the records as the API sent them. empty says why a page has no records, on stderr in both modes so --json output stays parseable.

func ProjectMember

ProjectMember prints a single project member.

func ProjectMembers

func ProjectMembers(p *util.Printer, asJSON bool, members []oapi.LivekitPublicapiProjectsV1ProjectMember) error

ProjectMembers prints a list of project members.

func RecordingLabel added in v2.19.1

func RecordingLabel(recording string) string

RecordingLabel names a recording ("audio" or "chat-history") for a sentence.

func RecordingSaved added in v2.19.1

RecordingSaved prints the signed URL a recording was downloaded from on stdout, as RecordingURL does, since it is the command's primary output either way, and says on stderr where the recording was saved and when it started (to line the audio up with the transcript).

func RecordingURL added in v2.19.1

RecordingURL prints a signed recording URL. As text it is the bare URL on stdout, so it pipes into curl, with its expiry as a status line; as JSON it is the API's response, recording start and data status included.

func Session

Session prints a single analytics session.

func SessionDetail added in v2.19.1

SessionDetail prints a session with its detail: the list row, the totals, a summary of each timeline, and the first page of participants. As JSON it emits the API's own {session, detail} response. A nil detail means the server is still finalizing it, so only the row prints.

func SessionEvals added in v2.20.2

SessionEvals prints a session's eval results: for each eval on each agent job, a line with its verdict and score, then a table of its criteria, and under the table why each failed criterion failed. Then a table of each job's intent and outcome. --json prints the API's response. empty says why there are none, on stderr in both modes.

func SessionEvents added in v2.19.1

func SessionEvents(p *util.Printer, asJSON bool, page public.EventPage, empty string) error

SessionEvents prints a page of a session's events, one line per event with its time, type, participant identity and participant session, and its payload; --json prints the events as the API sent them. empty says why a page has no events, on stderr in both modes so --json output stays parseable.

func SessionLabelResults added in v2.20.2

func SessionLabelResults(p *util.Printer, asJSON bool, resp oapi.LivekitPublicapiAnalyticsV1SessionLabelResultsGetResponse, empty string) error

SessionLabelResults prints a project's session label results: a table of the intents, one of the outcomes, one of the intent and outcome pairs, and one of the share of each label's sessions in which an eval failed. --json prints the API's response, with the results of each eval for each label. empty says why there are none, on stderr in both modes, and then no tables print.

func SessionLabelSettings added in v2.20.2

func SessionLabelSettings(p *util.Printer, asJSON bool, s oapi.LivekitPublicapiEvalsV1SessionLabelSettings) error

SessionLabelSettings prints the settings that decide which sessions LiveKit labels; --json prints them as the API sent them.

func SessionLabels added in v2.20.2

func SessionLabels(p *util.Printer, asJSON bool, labels []oapi.LivekitPublicapiEvalsV1SessionLabel, empty string) error

SessionLabels prints a project's session labels, one row each; --json prints the list.

func SessionLogs added in v2.19.1

func SessionLogs(p *util.Printer, asJSON bool, page public.LogPage, empty string) error

SessionLogs prints a page of a session's agent logs, one line per record with its time, level, logger and message; --json prints the records as the API sent them. empty says why a page has no records, on stderr in both modes so --json output stays parseable.

func SessionMetrics added in v2.19.1

func SessionMetrics(p *util.Printer, asJSON bool, page public.MetricPage, empty string) error

SessionMetrics prints a page of a session's agent metrics, one line per point with its end time, its metric's name and its value or histogram summary; --json prints the points as the API sent them, attributes and buckets included. empty says why a page has no points, on stderr in both modes so --json output stays parseable.

func SessionParticipantsPage added in v2.19.1

func SessionParticipantsPage(p *util.Printer, asJSON bool, participants []oapi.LivekitPublicapiAnalyticsV1ParticipantInfo, nextCursor string) error

SessionParticipantsPage prints a cursor-paginated page of a session's participants and their participant sessions. As JSON it emits a util.Page with the API's rows, participant sessions nested.

func SessionTraces added in v2.19.1

func SessionTraces(p *util.Printer, asJSON bool, page public.TracePage, empty string) error

SessionTraces prints a session's spans as a tree built from their parent ids, one line per span with its start time, duration and name, and a failed span's status message; --json prints the spans as the API sent them. A span whose parent isn't among them prints as a root, as the dashboard shows it. empty says why there are no spans, on stderr in both modes so --json output stays parseable. page.NextCursor is where the read stopped short of the session's last span.

func SessionTranscript added in v2.19.1

func SessionTranscript(p *util.Printer, asJSON bool, page public.TranscriptPage, empty string, lines func([]public.TranscriptItem) []string) error

SessionTranscript prints a page of a session's transcript, as lines renders it; --json prints the items as the API sent them. empty says why a page has no items, on stderr in both modes so --json output stays parseable, and whether more can still arrive, so no note follows it. lines gets the items as the API sent them, so it must strip what a terminal acts on from their text (see StripControls).

func Sessions

func Sessions(p *util.Printer, asJSON bool, sessions []oapi.LivekitPublicapiAnalyticsV1Session) error

Sessions prints a list of analytics sessions.

func SessionsPage

func SessionsPage(p *util.Printer, asJSON bool, sessions []oapi.LivekitPublicapiAnalyticsV1Session, nextCursor string) error

SessionsPage prints a cursor-paginated page of analytics sessions.

func SimulationRun

func SimulationRun(p *util.Printer, asJSON bool, r oapi.LivekitSimulationRun) error

SimulationRun prints a single simulation run.

func SimulationRuns

func SimulationRuns(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun) error

SimulationRuns prints a list of simulation runs.

func SimulationRunsPage

func SimulationRunsPage(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun, nextCursor string) error

SimulationRunsPage prints a cursor-paginated page of simulation runs.

func StripControls added in v2.19.1

func StripControls(s string) string

StripControls removes the control characters a terminal acts on from untrusted text, such as what a participant, an agent, an LLM or a tool chose: C0 controls except tab and newline, DEL, and C1 controls. Without their ESC (or 8-bit CSI or OSC), escape sequences can't set the window title, clear the screen or restyle what follows; their printable rest stays visible. Invalid UTF-8 becomes U+FFFD, so no lone C1 byte gets through either. --json needs none of this: JSON escapes control characters itself.

func User

User prints a single user.

func Users

func Users(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User) error

Users prints a list of users.

func UsersPage

func UsersPage(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User, nextCursor string) error

UsersPage prints a cursor-paginated page of users.

func Webhook added in v2.19.1

Webhook prints a single project webhook.

func Webhooks added in v2.19.1

func Webhooks(p *util.Printer, asJSON bool, webhooks []oapi.LivekitPublicapiProjectsV1Webhook) error

Webhooks prints a list of project webhooks.

func Workspace

Workspace prints a single workspace.

func WorkspaceInvite

WorkspaceInvite prints a single workspace invite.

func WorkspaceInvites

func WorkspaceInvites(p *util.Printer, asJSON bool, invites []oapi.LivekitPublicapiWorkspacesV1WorkspaceInvite) error

WorkspaceInvites prints a list of workspace invites.

func WorkspaceMember

WorkspaceMember prints a single workspace member.

func WorkspaceMembers

func WorkspaceMembers(p *util.Printer, asJSON bool, members []oapi.LivekitPublicapiWorkspacesV1WorkspaceMember) error

WorkspaceMembers prints a list of workspace members.

func Workspaces

func Workspaces(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace) error

Workspaces prints a list of workspaces.

func WorkspacesPage

func WorkspacesPage(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace, nextCursor string) error

WorkspacesPage prints a cursor-paginated page of workspaces.

Types

type EvalSessionNames added in v2.20.2

type EvalSessionNames struct {
	// Labels maps intent and outcome IDs (LBL_...) to their names.
	Labels map[string]string
	// Evals maps eval IDs (EVAL_...) to their names.
	Evals map[string]string
}

EvalSessionNames maps the IDs in an eval sessions table to names, because the eval sessions response carries only the IDs. A nil map leaves the IDs.

type SavedRecording added in v2.19.1

type SavedRecording struct {
	SessionID string
	Recording string
	File      string
	Bytes     int64
}

SavedRecording is a recording downloaded to a file.

Jump to

Keyboard shortcuts

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