Navigate

API reference

@pyric/ui/agents

36 published symbols from @pyric/ui

Generated from the TypeScript declarations shipped at this import path.

Interfaces

ContextWindowBreakdownRow

Properties

PropertyType
colorstring
estimatedboolean
idstring
labelstring
tokensnumber

ContextWindowCompactionPreview

Properties

PropertyType
automaticSavedTokensnumber
compactedTokensnumber
currentTokensnumber
losesreadonly string[]
manualSavedTokensnumber
rawTokensnumber
retainsreadonly string[]
savedTokensnumber
statsContextWindowCompactionStats

ContextWindowCompactionStats

Properties

PropertyType
bytesSavednumber
compactedboolean
compactedCharsnumber
messagesCompactednumber
originalCharsnumber
turnsCompactednumber

ContextWindowMeterProps

Properties

PropertyType
buttonClassName?string
className?string
formatTokens?(tokens: number) => string
onOpen?() => void
ringClassName?string
ringInnerClassName?string
snapshotContextWindowSnapshot
tooltipClassName?string

ContextWindowPanelProps

Properties

PropertyType
className?string
formatTokens?(tokens: number) => string
onCompactNow?() => void
slots?ClassSlots
snapshotContextWindowSnapshot

ContextWindowPricing

Properties

PropertyType
compactedContextWindowPromptCostEstimate
currentContextWindowPromptCostEstimate
savedCostUsdnumber

ContextWindowPromptCostEstimate

Properties

PropertyType
cachedPromptUsd?number
cacheReadPricePerMillion?number
costUsd?number
estimated?boolean
inputPricePerMillion?number
promptUsd?number
source?string
totalUsd?number

ContextWindowRingProps

Properties

PropertyType
className?string
innerClassName?string
size?number
snapshotContextWindowSnapshot
style?CSSProperties

ContextWindowSnapshot

Properties

PropertyType
basis"estimated-next-send"
breakdownreadonly ContextWindowBreakdownRow[]
compactionContextWindowCompactionStats
compactionPreviewContextWindowCompactionPreview
limitTokens?number
percentFull?number
pricingContextWindowPricing
sessionUsage?SessionTokenUsage
statusContextWindowStatus
toolCountnumber
usedTokensnumber

EmptyStateProps

Properties

PropertyTypeDescription
body?ReactNode-
className?string-
icon?ReactNodeOptional pre-rendered icon node — consumers pass whatever icon primitive their app uses (Material Symbols span, lucide-react component, plain SVG, …).
titleReactNode-

FoldProps

@pyric/ui/agents — headless structural components for agentic UIs (chat surfaces, tool-call drill-ins, streaming state indicators).

Matches the rest of @pyric/ui: zero shipped CSS. Components emit data-pyric-* attributes and accept className slots. Consumers bring their own design system (Tailwind, CSS modules, plain CSS) and attach styling via attribute selectors or class names.

Properties

PropertyTypeDescription
bodyClassName?stringForwarded to the body wrapper revealed when open.
childrenReactNodeRevealed when the user expands.
className?stringForwarded to the root <details> element.
defaultOpen?boolean-
headerReactNodeVisible summary line, always rendered.
headerAction?ReactNodeOptional right-aligned action (e.g. a copy button). Children should stopPropagation so clicks don’t toggle the fold.
summaryClassName?stringForwarded to the <summary> element.
tone?FoldToneSurfaced via [data-pyric-fold-tone] so consumers can tint the summary or border based on semantic context (error / thought). Defaults to normal.

PulsingDotProps

Properties

PropertyTypeDescription
className?stringForwarded to the outer wrapper. Consumers attach all visual styling (size, animation, color) via this hook or by selecting on [data-pyric-ui="pulsing-dot"].

RequestInputComposition

Properties

PropertyType
currentPromptnumber
historynumber
resentToolResultsnumber
systemnumber
toolSchemasnumber

RequestUsageTimelineProps

Properties

PropertyType
className?string
empty?ReactNode
formatTokens?(tokens: number) => string
onOpenTool?(messageId: string, callId: string) => void
requestsreadonly SessionRequestUsage[]
slots?ClassSlots

SessionCacheInsight

Properties

PropertyType
cachedTokensnumber
explanationstring
freshTokensnumber
hitRatenumber
knownMinimumTokens?number
likelyStablePrefixTokensnumber
meetsKnownMinimum?boolean
providerModestring

SessionRequestUsage

Properties

PropertyType
cachedInputTokensnumber
cacheInsight?string | SessionCacheInsight
compositionRequestInputComposition
costUsd?number
emittedToolCallsreadonly SessionToolRef[]
freshInputTokensnumber
idstring
inputTokensnumber
iterationnumber
messageCountnumber
modelLabel?string
outputTokensnumber
providerId?string
providerLabel?string
reasoningTokensnumber
requestIdstring
resentToolResultsreadonly SessionToolRef[]
strategy?string
strategySource?string
tokensTotalnumber
toolNamesreadonly string[]
toolResultMessageCountnumber
toolSchemaNamesreadonly string[]
ts?number
turnIdstring
usageSource"estimate" | "provider"
visibleOutputTokensnumber

SessionSpendSummaryProps

Properties

PropertyType
className?string
currentContextTokens?number
formatTokens?(tokens: number) => string
slots?ClassSlots
usage?SessionTokenUsage

SessionTokenUsage

Properties

PropertyType
averageRequestTokens?number
cachedInputTokensnumber
categoryDetailsRecord<string, SessionUsageCategoryDetail | undefined>
costUsdTotal?number
inputTokensnumber
outputTokensnumber
reasoningTokensnumber
requestRowsreadonly SessionRequestUsage[]
requestsnumber
teachingNotes?{ contextVsSpend: string; estimatedComposition: string; providerUsage: string; }
teachingNotes.contextVsSpendstring
teachingNotes.estimatedCompositionstring
teachingNotes.providerUsagestring
tokensTotalnumber
turnRowsreadonly SessionTurnUsage[]
turnsnumber
workMultiplier?number

SessionToolRef

Properties

PropertyType
callId?string
messageId?string
namestring
tokens?number
tokensEstimated?number

SessionTurnUsage

Properties

PropertyType
cachedInputTokensnumber
costUsd?number
freshInputTokens?number
id?string
inputTokensnumber
label?string
multiplierContribution?number
outputTokensnumber
reasoningTokensnumber
requestCount?number
requests?number
tokensTotalnumber
turnId?string
visibleOutputTokens?number

SessionUsageCategoryDetail

Properties

PropertyType
id?string
labelstring
note?string
rows?readonly SessionUsageDetailRow[]
share?number
source?"mixed" | "unavailable" | "provider-reported" | "estimated-from-traces"
tokens?number

SessionUsageDetailRow

Properties

PropertyType
colorstring
descriptionstring
estimatedboolean
idstring
labelstring
source"provider-reported" | "estimated-from-traces"
tokensnumber

TokenUsageInlineProps

Properties

PropertyType
className?string
formatTokens?(tokens: number) => string
labelClassName?string
usage?SessionTokenUsage
valueClassName?string

Type Aliases

ContextWindowStatus

type ContextWindowStatus = "unknown" | "low" | "medium" | "high" | "critical";

Structural context-window and token-usage contracts rendered by @pyric/ui/agents.

Structurally assignable from @inbrowser/agent/usage (ContextWindowSnapshot, SessionRequestUsage, SessionTokenUsage) so callers using @inbrowser/agent pass snapshots directly without casts, while consumers of @pyric/ui ship complete .d.ts definitions with zero runtime or peer dependency on @inbrowser/agent.


FoldTone

type FoldTone = "normal" | "error" | "thought";

@pyric/ui/agents — headless structural components for agentic UIs (chat surfaces, tool-call drill-ins, streaming state indicators).

Matches the rest of @pyric/ui: zero shipped CSS. Components emit data-pyric-* attributes and accept className slots. Consumers bring their own design system (Tailwind, CSS modules, plain CSS) and attach styling via attribute selectors or class names.

Functions

ContextWindowMeter()

function ContextWindowMeter(__namedParameters: ContextWindowMeterProps): Element;

Parameters

ParameterType
__namedParametersContextWindowMeterProps

Returns

Element


ContextWindowPanel()

function ContextWindowPanel(__namedParameters: ContextWindowPanelProps): Element;

Parameters

ParameterType
__namedParametersContextWindowPanelProps

Returns

Element


ContextWindowRing()

function ContextWindowRing(__namedParameters: ContextWindowRingProps): Element;

Parameters

ParameterType
__namedParametersContextWindowRingProps

Returns

Element


EmptyState()

function EmptyState(__namedParameters: EmptyStateProps): Element;

Headless zero-state. Structural only: icon slot, title, optional body, all wrapped in a flex container marked [data-pyric-ui="empty-state"]. Consumers attach all visual styling.

Parameters

ParameterType
__namedParametersEmptyStateProps

Returns

Element


Fold()

function Fold(__namedParameters: FoldProps): Element;

Headless disclosure container — native <details> for keyboard / a11y. Ships zero visual styling. Consumers style via the three className slots or by selecting on:

[data-pyric-ui=“fold”] — root <details> [data-pyric-ui=“fold”][open] — expanded state [data-pyric-fold-tone=“error”] — error tint [data-pyric-fold-tone=“thought”] — thought-stream tint [data-pyric-fold-summary] — clickable summary row [data-pyric-fold-chevron] — disclosure indicator slot [data-pyric-fold-body] — revealed body wrapper

Parameters

ParameterType
__namedParametersFoldProps

Returns

Element


PulsingDot()

function PulsingDot(__namedParameters: PulsingDotProps): Element;

Headless “live / streaming” indicator. Ships zero visual styling.

Renders three nested spans so consumers can style ring + core independently:

Animation, color, and size are entirely consumer-defined.

Parameters

ParameterType
__namedParametersPulsingDotProps

Returns

Element


RequestUsageTimeline()

function RequestUsageTimeline(__namedParameters: RequestUsageTimelineProps): Element;

Parameters

ParameterType
__namedParametersRequestUsageTimelineProps

Returns

Element


SessionSpendSummary()

function SessionSpendSummary(__namedParameters: SessionSpendSummaryProps): Element;

Parameters

ParameterType
__namedParametersSessionSpendSummaryProps

Returns

Element


TokenUsageInline()

function TokenUsageInline(__namedParameters: TokenUsageInlineProps): Element;

Parameters

ParameterType
__namedParametersTokenUsageInlineProps

Returns

Element

References

Re-exports Modal


ModalProps

Re-exports ModalProps