Skip to content
API reference

parakeet

Import
import * as api from "@fungi.computer/parakeet";
Kind Export Description
type alias AgentHeadActivity What the head is doing: at rest, working something out, or talking.
type alias InteractionPanelProps The interaction to draw and the page’s close callback.
type alias AvatarState The current activity and expression supplied to a live avatar.
type alias ParakeetModel Stable model identity presented by the current Session.
type alias ParakeetUsage Aggregate usage presented by the current Session timeline.
type alias ParakeetStatus Conversation activity presented by Parakeet.
type alias TimelineController Stable history and replaceable work rendered by a conversation client.
type alias ParakeetDraftCheckpoint A host may proceed with restart only after the current journal committed.
type alias ComposerController Draft and prompt operations for the current conversation.
type alias StatusController Session activity, observation, and Agent-lifetime controls.
type alias ParakeetAuthor Who wrote a timeline line, as the host chose to show them.
type alias ParakeetAuthorOf The host’s reading of a message’s opaque metadata: the author to show, or none. Parakeet never interprets metadata itself.
type alias ParakeetDraftIdentity Durable owner identity, independent of the current service endpoint.
type alias ParakeetDraftStorage Hosts must commit a replacement before returning, or throw without changing it.
type alias QueuedRecallState Ephemeral composer reservation, never an admission journal or queue.
type alias QueuedRecallOutcome Result of one recall gesture; an empty queue permits local input history.
type alias ParakeetToolArguments Pi’s JSON argument object after the maintained Zod boundary parser.
type alias ToolDisclosureState View-only open/closed state shared by the browser and terminal renderers.
type alias ParakeetToolKind Closed presentation vocabulary for one tool call. It is chosen from the typed tool name, never inferred from arguments or result text.
type alias ParakeetToolDiffLine One changed or context line of a diff hunk.
type alias ParakeetToolDiffHunk One hunk: a jsdiff hunk, or one @@ block of a Codex patch.
type alias ParakeetToolDiffFile The hunks for one file.
type alias ParakeetToolDiffRow One display row of a diff, flattened once here so every renderer draws the same rows. File rows appear only when a call touches several files.
type alias ParakeetToolExcerptLine One file excerpt line; the number is present only when it is known.
type alias ParakeetToolMatch One search hit.
type alias ParakeetToolOutputLine One line of command output, marked by the stream that produced it.
type alias ParakeetToolCallSection One typed section of an expanded call body. Sections hold complete bounded content; renderers show preview items and offer the rest.
type alias ParakeetToolCallView Renderer-neutral presentation of one tool call and its joined result.
type alias ParakeetVisitor Public composer options for an anonymous visitor conversation.
type alias ParakeetProps Props for the standalone retained conversation surface.
type alias ParakeetViewProps Props for the reusable retained conversation view.
type alias ParakeetPromptResult A prompt may be recorded for a human without admitting Agent work.
type alias ParakeetSessionCommand Session commands preserve their owner results, including held visitor lines.
type alias ParakeetSession The exact Shiitake operations consumed by the retained conversation UI.
type alias ParakeetUserMessageItem One user prompt projected into the conversation timeline.
type alias ParakeetAssistantMessageItem One assistant message projected from exact stored Pi content.
type alias ParakeetToolItem One Pi tool call joined with its corresponding tool result.
type alias ParakeetToolGroupItem One maximal run of consecutive tool calls between conversation rows. A lone call is a group of one. Grouping is computed once by the headless projection.
type alias ParakeetTimelineItem Stable row grammar rendered by Parakeet’s timeline.
constant AgentHead An Agent’s head at avatar size, drawn from the Agent’s own avatar (a property of the Agent record, never of a conversation). The letter shows until a frame is ready. The live canvas stays mounted and is paused unless thinking or speaking, so an idle head shows its real look without animating.
constant ShiitakeAvatar A sprite head drawn in the live activity and expression it is given. With an avatar it draws that look (a member’s own, in their settings); with none it is Shiitake, the product mascot, in the character’s own defaults. Conversations have no avatar: an Agent’s head is AgentHead, drawn from the Agent record.
constant initialToolDisclosure Defaults only, with no reader choices.
function InteractionPanel() Browser renderer for one Whistle interaction. It draws the same host snapshot the terminal draws; the command, not the page, defines the steps.
function ParakeetProvider() Own one renderer-neutral conversation scope over the existing query cache.
function useTimeline() Read stable history and replaceable live work.
function useComposer() Read and mutate the current conversation draft and prompt.
function useStatus() Read Session activity and operate its observation.
function formatTokenCount() One token count, compacted for a narrow readout, e.g. 182000 to 182K. Shared by the context footer and the compaction divider and notices.
function formatContextUsage() Context used over the model’s window, e.g. 12K/200K, shared by the browser and terminal footers. An unknown window shows the tokens alone.
function formatModelIdentity() The durable assistant’s provider/model ids, shared by browser and terminal.
function formatModelWithLevel() The model identity with its thinking level, “provider/model (level)”; no level, no suffix.
function toolGroupDefaultOpen() Active and failed groups show every call; clean history retains a visible tail.
function visibleToolCalls() Even a folded group shows recent calls, rather than hiding all tool work.
function toolCallDefaultOpen() A failed call opens by default so its error is visible.
function disclosureOpen() Whether a group or call is currently open.
function toggleDisclosure() Flip one group or call, recording the reader’s explicit choice.
function toggleAllDisclosure() Expand everything, or collapse everything when the reader has expanded anything. Either way individual choices are cleared.
function formatToolDuration() Compact duration: 340ms, 1.2s, 2m 5s.
function useMarkdown() Parse chat Markdown for headless hosts, including terminal presentation.
function ParakeetView() Render the retained conversation surface within one Parakeet provider.
function Parakeet() Standalone typed composer and exact-message timeline.

AgentHeadActivitytype alias

Section titled “AgentHeadActivity”
Signature
type AgentHeadActivity = "idle" | "thinking" | "speaking";

What the head is doing: at rest, working something out, or talking.


InteractionPanelPropstype alias

Section titled “InteractionPanelProps”
Signature
type InteractionPanelProps = Readonly<{
host: WhistleInteractionHost;
onClose?: () => void;
}>;

The interaction to draw and the page’s close callback.


AvatarStatetype alias

Section titled “AvatarState”
Signature
type AvatarState = Readonly<
Pick<AvatarPresentation, "activity" | "expression">
>;

The current activity and expression supplied to a live avatar.


ParakeetModeltype alias

Section titled “ParakeetModel”
Signature
type ParakeetModel = Readonly<{
model: string;
provider: string;
}>;

Stable model identity presented by the current Session.


ParakeetUsagetype alias

Section titled “ParakeetUsage”
Signature
type ParakeetUsage = Readonly<{
cost: number;
tokens: number;
}>;

Aggregate usage presented by the current Session timeline.


ParakeetStatustype alias

Section titled “ParakeetStatus”
Signature
type ParakeetStatus =
| "connecting"
| "cancelling"
| "error"
| "idle"
| "queued"
| "retrying"
| "sending"
| "streaming"
| "thinking"
| "disconnected";

Conversation activity presented by Parakeet.


TimelineControllertype alias

Section titled “TimelineController”
Signature
type TimelineController = Readonly<{
cancelQueued: (commandId) => Promise<void>;
cancellingQueued: boolean;
settled: readonly ParakeetTimelineItem[];
tail: readonly ParakeetTimelineItem[];
positionAnchors: ReadonlyMap<number, string | null>;
commandAnchors: ReadonlyMap<string, string>;
queued: SessionPendingPrompts;
pendingHasMore: boolean;
hasMoreHistory: boolean;
loadingOlderHistory: boolean;
loadOlderHistory: () => void;
hasNewerHistory: boolean;
loadNewerHistory: () => void;
pinVisibleHistory: () => void;
jumpToLatest: () => void;
model?: ParakeetModel;
usage?: ParakeetUsage;
}>;

Stable history and replaceable work rendered by a conversation client.


ParakeetDraftCheckpointtype alias

Section titled “ParakeetDraftCheckpoint”
Signature
type ParakeetDraftCheckpoint =
| Readonly<{
status: "saved";
}>
| Readonly<{
status: "failed";
reason: string;
}>;

A host may proceed with restart only after the current journal committed.


ComposerControllertype alias

Section titled “ComposerController”
Signature
type ComposerController = Readonly<{
cancel: () => Promise<void>;
draft: string;
images: PromptCommand["images"];
recallState: QueuedRecallState;
recall: () => Promise<QueuedRecallOutcome>;
checkpointDraft: () => ParakeetDraftCheckpoint;
failure: "admission" | "failed" | "cancelled" | "interrupted" | undefined;
admissionError: "offline_queue_full" | "queue_full" | undefined;
retry: () => void;
dismissFailed: (requestId) => void;
send: (delivery?) => void;
submitCommand: (run) => Promise<WhistleExecutionOutcome | undefined>;
setDraft: (value) => void;
setImages: (images) => void;
}>;

Draft and prompt operations for the current conversation.


StatusControllertype alias

Section titled “StatusController”
Signature
type StatusController = Readonly<{
commandId: string | undefined;
observation: ParakeetObservation;
reconnect: () => Promise<ParakeetReconnectOutcome>;
status: ParakeetStatus;
viewState: ParakeetSessionViewState;
context: SessionContext | undefined;
}>;

Session activity, observation, and Agent-lifetime controls.


ParakeetAuthortype alias

Section titled “ParakeetAuthor”
Signature
type ParakeetAuthor = Readonly<{
id: string;
name: string;
kind?: "agent";
}>;

Who wrote a timeline line, as the host chose to show them.


ParakeetAuthorOftype alias

Section titled “ParakeetAuthorOf”
Signature
type ParakeetAuthorOf = (meta) => ParakeetAuthor | undefined;

The host’s reading of a message’s opaque metadata: the author to show, or none. Parakeet never interprets metadata itself.

Parameter Type
meta SessionMessage["meta"]

ParakeetAuthor | undefined


ParakeetDraftIdentitytype alias

Section titled “ParakeetDraftIdentity”
Signature
type ParakeetDraftIdentity = Readonly<{
agentId: string;
sessionId: string;
}>;

Durable owner identity, independent of the current service endpoint.


ParakeetDraftStoragetype alias

Section titled “ParakeetDraftStorage”
Signature
type ParakeetDraftStorage = Readonly<{
getItem: (key) => string | null;
setItem: (key, value) => void;
}>;

Hosts must commit a replacement before returning, or throw without changing it.


QueuedRecallStatetype alias

Section titled “QueuedRecallState”
Signature
type QueuedRecallState =
| Readonly<{
kind: "idle" | "recalling" | "restored";
}>
| Readonly<{
kind: "too_late" | "uncertain";
message: string;
}>;

Ephemeral composer reservation, never an admission journal or queue.


QueuedRecallOutcometype alias

Section titled “QueuedRecallOutcome”
Signature
type QueuedRecallOutcome =
"ignored" | "empty" | "restored" | "too_late" | "uncertain";

Result of one recall gesture; an empty queue permits local input history.


ParakeetToolArgumentstype alias

Section titled “ParakeetToolArguments”
Signature
type ParakeetToolArguments = JsonObject;

Pi’s JSON argument object after the maintained Zod boundary parser.


ToolDisclosureStatetype alias

Section titled “ToolDisclosureState”
Signature
type ToolDisclosureState = Readonly<{
mode: "collapsed" | "default" | "expanded";
overrides: ReadonlyMap<string, boolean>;
}>;

View-only open/closed state shared by the browser and terminal renderers.


ParakeetToolKindtype alias

Section titled “ParakeetToolKind”
Signature
type ParakeetToolKind =
"code" | "command" | "edit" | "other" | "read" | "search";

Closed presentation vocabulary for one tool call. It is chosen from the typed tool name, never inferred from arguments or result text.


ParakeetToolDiffLinetype alias

Section titled “ParakeetToolDiffLine”
Signature
type ParakeetToolDiffLine = Readonly<{
kind: "add" | "context" | "remove";
text: string;
}>;

One changed or context line of a diff hunk.


ParakeetToolDiffHunktype alias

Section titled “ParakeetToolDiffHunk”
Signature
type ParakeetToolDiffHunk = Readonly<{
header?: string;
lines: readonly ParakeetToolDiffLine[];
}>;

One hunk: a jsdiff hunk, or one @@ block of a Codex patch.


ParakeetToolDiffFiletype alias

Section titled “ParakeetToolDiffFile”
Signature
type ParakeetToolDiffFile = Readonly<{
operation: "add" | "delete" | "update";
path?: string;
moveTo?: string;
hunks: readonly ParakeetToolDiffHunk[];
unified: string;
lineNumbers: boolean;
}>;

The hunks for one file.


ParakeetToolDiffRowtype alias

Section titled “ParakeetToolDiffRow”
Signature
type ParakeetToolDiffRow = Readonly<{
kind: "add" | "context" | "file" | "hunk" | "remove";
text: string;
}>;

One display row of a diff, flattened once here so every renderer draws the same rows. File rows appear only when a call touches several files.


ParakeetToolExcerptLinetype alias

Section titled “ParakeetToolExcerptLine”
Signature
type ParakeetToolExcerptLine = Readonly<{
number?: number;
text: string;
}>;

One file excerpt line; the number is present only when it is known.


ParakeetToolMatchtype alias

Section titled “ParakeetToolMatch”
Signature
type ParakeetToolMatch = Readonly<{
location: string;
text: string;
}>;

One search hit.


ParakeetToolOutputLinetype alias

Section titled “ParakeetToolOutputLine”
Signature
type ParakeetToolOutputLine = Readonly<{
stream: "stderr" | "stdout";
text: string;
}>;

One line of command output, marked by the stream that produced it.


ParakeetToolCallSectiontype alias

Section titled “ParakeetToolCallSection”
Signature
type ParakeetToolCallSection = Readonly<
| {
kind: "excerpt";
lines: readonly ParakeetToolExcerptLine[];
preview: number;
}
| {
kind: "matches";
matches: readonly ParakeetToolMatch[];
preview: number;
}
| {
kind: "diff";
files: readonly ParakeetToolDiffFile[];
lines: readonly ParakeetToolDiffRow[];
preview: number;
}
| {
kind: "command";
lines: readonly string[];
preview: number;
}
| {
kind: "script";
lines: readonly string[];
preview: number;
}
| {
kind: "output";
lines: readonly ParakeetToolOutputLine[];
preview: number;
}
| {
kind: "text";
label?: string;
language?: "json";
lines: readonly string[];
preview: number;
}
>;

One typed section of an expanded call body. Sections hold complete bounded content; renderers show preview items and offer the rest.


ParakeetToolCallViewtype alias

Section titled “ParakeetToolCallView”
Signature
type ParakeetToolCallView = Readonly<{
id: string;
kind: ParakeetToolKind;
name: string;
verb: string;
activeVerb: string;
label: string;
paths: readonly string[];
status: ParakeetToolItem["status"];
durationMs?: number;
exitCode?: number;
error?: string;
sections: readonly ParakeetToolCallSection[];
}>;

Renderer-neutral presentation of one tool call and its joined result.


ParakeetVisitortype alias

Section titled “ParakeetVisitor”
Signature
type ParakeetVisitor = Readonly<{
agentName: string;
}>;

Public composer options for an anonymous visitor conversation.


ParakeetPropstype alias

Section titled “ParakeetProps”
Signature
type ParakeetProps = Readonly<{
disambiguateAuthors?: boolean;
authorOf?: ParakeetAuthorOf;
visitor?: ParakeetVisitor;
markdownPolicy?: "session" | "visitor";
session: ParakeetSession;
clients?: readonly ClientEntryV1[];
composerActionVariant?: "primary" | "outline";
renderToolActions?: (item) => ReactNode;
claimsToolMedia?: (item) => boolean;
renderAssistantAttachment?: (text) => ReactNode;
formatAssistantText?: (text) => string;
onLink?: (href) => boolean;
onOpen?: (target) => void;
empty?: ReactNode;
commands?: ParakeetCommandRuntime;
}>;

Props for the standalone retained conversation surface.


ParakeetViewPropstype alias

Section titled “ParakeetViewProps”
Signature
type ParakeetViewProps = Readonly<{
disambiguateAuthors?: boolean;
visitor?: ParakeetVisitor;
composerActionVariant?: "primary" | "outline";
renderToolActions?: (item) => ReactNode;
claimsToolMedia?: (item) => boolean;
renderAssistantAttachment?: (text) => ReactNode;
formatAssistantText?: (text) => string;
onLink?: (href) => boolean;
onOpen?: (target) => void;
empty?: ReactNode;
commands?: ParakeetCommandRuntime;
}>;

Props for the reusable retained conversation view.


ParakeetPromptResulttype alias

Section titled “ParakeetPromptResult”
Signature
type ParakeetPromptResult =
| Accepted
| Readonly<{
status: "recorded";
}>;

A prompt may be recorded for a human without admitting Agent work.


ParakeetSessionCommandtype alias

Section titled “ParakeetSessionCommand”
Signature
type ParakeetSessionCommand = {
(input): Promise<ParakeetPromptResult>;
(input): Promise<CancelResult>;
(input): Promise<undefined>;
(input): Promise<
Readonly<{
sessionId: string;
}>
>;
(input): Promise<
| Readonly<{
status: "accepted";
commandId: string;
sessionId?: string;
}>
| Readonly<{
status: "recorded";
}>
| Readonly<{
status: "too_late";
commandId: string;
}>
| Readonly<{
status: "unknown";
}>
| Readonly<{
sessionId: string;
}>
| undefined
>;
};

Session commands preserve their owner results, including held visitor lines.

Signature
(input): Promise<ParakeetPromptResult>;

Admit Agent work or record a prompt held for a human reply.

Parameter Type
input | { delivery: Schema.Literals<readonly ["steer", "followUp"]>; requestId: Schema.String; type: Schema.Literal<"prompt">; text: Schema.String; images?: Schema.optionalKey<Schema.$Array<Schema.Struct<{ type: Schema.Literal<"image">; data: Schema.String; mimeType: Schema.String; }>>>; } | { type: Schema.Literal<"compact">; requestId: Schema.String; instructions?: Schema.optionalKey<Schema.String>; }

Promise<ParakeetPromptResult>

Signature
(input): Promise<CancelResult>;

Cancel the named queued or running command.

Parameter Type
input { commandId: Schema.String; onlyIfPending?: Schema.optional<Schema.Boolean>; type: Schema.Literal<"cancel">; }
input.commandId Schema.String
input.onlyIfPending? Schema.optional<Schema.Boolean>
input.type Schema.Literal<"cancel">

Promise<CancelResult>

Signature
(input): Promise<undefined>;

Forward an owner-supported Session control command.

Parameter Type
input | { type: Schema.Literal<"branch">; entryId: Schema.String; } | { type: Schema.Literal<"operator">; requestId: Schema.String; author: Schema.Literals<readonly ["operator", "party"]>; text: Schema.String; } | { type: Schema.Literal<"title">; title: Schema.NullOr<Schema.String>; } | { type: Schema.Literal<"abort">; }

Promise<undefined>

Signature
(input): Promise<Readonly<{
sessionId: string;
}>>;

Return the owner-issued address of a forked Session.

Parameter Type
input { type: Schema.Literal<"fork">; entryId: Schema.String; }
input.type Schema.Literal<"fork">
input.entryId Schema.String

Promise<Readonly<{ sessionId: string; }>>

Signature
(input): Promise<
| Readonly<{
status: "accepted";
commandId: string;
sessionId?: string;
}>
| Readonly<{
status: "recorded";
}>
| Readonly<{
status: "too_late";
commandId: string;
}>
| Readonly<{
status: "unknown";
}>
| Readonly<{
sessionId: string;
}>
| undefined>;

Dispatch a typed command without inventing an admission result.

Parameter Type
input | { delivery: Schema.Literals<readonly ["steer", "followUp"]>; requestId: Schema.String; type: Schema.Literal<"prompt">; text: Schema.String; images?: Schema.optionalKey<Schema.$Array<Schema.Struct<{ type: Schema.Literal<"image">; data: Schema.String; mimeType: Schema.String; }>>>; } | { type: Schema.Literal<"abort">; } | { commandId: Schema.String; onlyIfPending?: Schema.optional<Schema.Boolean>; type: Schema.Literal<"cancel">; } | { type: Schema.Literal<"branch">; entryId: Schema.String; } | { type: Schema.Literal<"fork">; entryId: Schema.String; } | { type: Schema.Literal<"operator">; requestId: Schema.String; author: Schema.Literals<readonly ["operator", "party"]>; text: Schema.String; } | { type: Schema.Literal<"compact">; requestId: Schema.String; instructions?: Schema.optionalKey<Schema.String>; } | { type: Schema.Literal<"title">; title: Schema.NullOr<Schema.String>; }

Promise< | Readonly<{ status: "accepted"; commandId: string; sessionId?: string; }> | Readonly<{ status: "recorded"; }> | Readonly<{ status: "too_late"; commandId: string; }> | Readonly<{ status: "unknown"; }> | Readonly<{ sessionId: string; }> | undefined>


ParakeetSessiontype alias

Section titled “ParakeetSession”
Signature
type ParakeetSession = Readonly<
Pick<
ShiitakeSession,
"address" | "extension" | "read" | "watch" | "withdraw" | "latestPending"
> &
object
>;

The exact Shiitake operations consumed by the retained conversation UI.


ParakeetUserMessageItemtype alias

Section titled “ParakeetUserMessageItem”
Signature
type ParakeetUserMessageItem = Readonly<{
author?: ParakeetAuthor;
origin?: SessionMessage["origin"];
id: string;
kind: "user_message";
requestId?: string;
commandId?: string;
status: "pending" | "accepted" | "queued" | "failed" | "confirmed";
delivery?: PromptDelivery;
error?: string;
at?: number;
text: string;
}>;

One user prompt projected into the conversation timeline.


ParakeetAssistantMessageItemtype alias

Section titled “ParakeetAssistantMessageItem”
Signature
type ParakeetAssistantMessageItem = Readonly<{
author?: ParakeetAuthor;
id: string;
kind: "assistant_message";
isError?: boolean;
pending: boolean;
at?: number;
text: string;
providerError?: string;
errorDetail?: string;
repeatCount?: number;
thinking?: string;
usage?: Readonly<{
cost: number;
tokens: number;
}>;
}>;

One assistant message projected from exact stored Pi content.


ParakeetToolItemtype alias

Section titled “ParakeetToolItem”
Signature
type ParakeetToolItem = Readonly<{
args: Readonly<ParakeetToolArguments>;
id: string;
kind: "tool";
name: string;
result?: ToolResultMessage;
data?: SessionMessage["data"];
startedAt?: number;
status: "completed" | "error" | "running" | "unknown";
}>;

One Pi tool call joined with its corresponding tool result.


ParakeetToolGroupItemtype alias

Section titled “ParakeetToolGroupItem”
Signature
type ParakeetToolGroupItem = Readonly<{
active?: ParakeetToolCallView;
calls: readonly ParakeetToolCallView[];
durationMs?: number;
failedCount: number;
id: string;
kind: "tool_group";
status: "completed" | "error" | "running" | "unknown";
summary: string;
tools: readonly ParakeetToolItem[];
}>;

One maximal run of consecutive tool calls between conversation rows. A lone call is a group of one. Grouping is computed once by the headless projection.


ParakeetTimelineItemtype alias

Section titled “ParakeetTimelineItem”
Signature
type ParakeetTimelineItem =
| ParakeetAssistantMessageItem
| {
id: string;
kind: "compaction_divider";
at: number;
tokensBefore: number;
tokensAfter: number | null;
}
| {
id: string;
kind: "compaction_notice";
at: number;
trigger: SessionCompactionTrigger;
result: "failed" | "nothing_to_compact" | "stale" | "insufficient";
diagnostic: string | null;
}
| ParakeetToolGroupItem
| ParakeetUserMessageItem;

Stable row grammar rendered by Parakeet’s timeline.

ParakeetAssistantMessageItem


Signature
{
id: string;
kind: "compaction_divider";
at: number;
tokensBefore: number;
tokensAfter: number | null;
}
Name Type Description
id string Stable rendered-item identity, from the durable compaction entry.
kind "compaction_divider" Compaction-divider timeline discriminator.
at number When the compaction ran, in milliseconds since the epoch.
tokensBefore number Estimated context tokens the compaction started from.
tokensAfter number | null Estimated context tokens right after it; null for older compactions.

Signature
{
id: string;
kind: "compaction_notice";
at: number;
trigger: SessionCompactionTrigger;
result: "failed" | "nothing_to_compact" | "stale" | "insufficient";
diagnostic: string | null;
}
Name Type Description
id string Stable rendered-item identity, from the durable notice entry.
kind "compaction_notice" Compaction-notice timeline discriminator.
at number When it was recorded, in milliseconds since the epoch.
trigger SessionCompactionTrigger What started it: the user, the context threshold, or an overflow.
result "failed" | "nothing_to_compact" | "stale" | "insufficient" What the compaction did: nothing to summarize, a failure, or a summary dropped because its head no longer fit the context (stale) or because placing it would have left the context over the limit (insufficient).
diagnostic string | null A failure’s bounded reason; null otherwise.

ParakeetToolGroupItem


ParakeetUserMessageItem

AgentHeadconstant

Section titled “AgentHead”
Signature
const AgentHead: NamedExoticComponent<{
timeMs?: number;
activity?: AgentHeadActivity;
avatar: {
v: 1;
character: "mushroom" | "cat" | "burger";
appearance: z.ZodRecord<
z.ZodString,
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
>;
expression: string;
renderStyle:
| "plain"
| "pencil"
| "manga"
| "riso"
| "halftone"
| "blueprint"
| "crt"
| "watercolor";
};
className?: string;
name: string;
size?: number;
}>;

An Agent’s head at avatar size, drawn from the Agent’s own avatar (a property of the Agent record, never of a conversation). The letter shows until a frame is ready. The live canvas stays mounted and is paused unless thinking or speaking, so an idle head shows its real look without animating.


ShiitakeAvatarconstant

Section titled “ShiitakeAvatar”
Signature
const ShiitakeAvatar: NamedExoticComponent<{
avatar?: {
v: 1;
character: "mushroom" | "cat" | "burger";
appearance: z.ZodRecord<
z.ZodString,
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
>;
expression: string;
renderStyle:
| "plain"
| "pencil"
| "manga"
| "riso"
| "halftone"
| "blueprint"
| "crt"
| "watercolor";
} | null;
className?: string;
service?: SpriteService;
state: AvatarState;
}>;

A sprite head drawn in the live activity and expression it is given. With an avatar it draws that look (a member’s own, in their settings); with none it is Shiitake, the product mascot, in the character’s own defaults. Conversations have no avatar: an Agent’s head is AgentHead, drawn from the Agent record.


initialToolDisclosureconstant

Section titled “initialToolDisclosure”
Signature
const initialToolDisclosure: ToolDisclosureState;

Defaults only, with no reader choices.

InteractionPanel()function

Section titled “InteractionPanel()”
Signature
function InteractionPanel(__namedParameters): Element;

Browser renderer for one Whistle interaction. It draws the same host snapshot the terminal draws; the command, not the page, defines the steps.

Parameter Type
__namedParameters InteractionPanelProps

Element


ParakeetProvider()function

Section titled “ParakeetProvider()”
Signature
function ParakeetProvider(__namedParameters): Element;

Own one renderer-neutral conversation scope over the existing query cache.

Parameter Type
__namedParameters Readonly<{ children: ReactNode; session: ParakeetSession; clients?: readonly ClientEntryV1[]; interactionStore?: ParakeetInteractions; onToast?: (toast) => void; draftStorage?: ParakeetDraftStorage; draftIdentity?: ParakeetDraftIdentity; authorOf?: ParakeetAuthorOf; }>

Element


useTimeline()function

Section titled “useTimeline()”
Signature
function useTimeline(): TimelineController;

Read stable history and replaceable live work.

TimelineController


useComposer()function

Section titled “useComposer()”
Signature
function useComposer(): ComposerController;

Read and mutate the current conversation draft and prompt.

ComposerController


Signature
function useStatus(): StatusController;

Read Session activity and operate its observation.

StatusController


formatTokenCount()function

Section titled “formatTokenCount()”
Signature
function formatTokenCount(tokens): string;

One token count, compacted for a narrow readout, e.g. 182000 to 182K. Shared by the context footer and the compaction divider and notices.

Parameter Type
tokens number

string


formatContextUsage()function

Section titled “formatContextUsage()”
Signature
function formatContextUsage(context): string;

Context used over the model’s window, e.g. 12K/200K, shared by the browser and terminal footers. An unknown window shows the tokens alone.

Parameter Type
context SessionContext

string


formatModelIdentity()function

Section titled “formatModelIdentity()”
Signature
function formatModelIdentity(model): string;

The durable assistant’s provider/model ids, shared by browser and terminal.

Parameter Type
model ParakeetModel

string


formatModelWithLevel()function

Section titled “formatModelWithLevel()”
Signature
function formatModelWithLevel(model, level): string;

The model identity with its thinking level, “provider/model (level)”; no level, no suffix.

Parameter Type
model ParakeetModel
level string | undefined

string


toolGroupDefaultOpen()function

Section titled “toolGroupDefaultOpen()”
Signature
function toolGroupDefaultOpen(group): boolean;

Active and failed groups show every call; clean history retains a visible tail.

Parameter Type
group ParakeetToolGroupItem

boolean


visibleToolCalls()function

Section titled “visibleToolCalls()”
Signature
function visibleToolCalls(
group,
open,
): readonly Readonly<{
id: string;
kind: ParakeetToolKind;
name: string;
verb: string;
activeVerb: string;
label: string;
paths: readonly string[];
status: "error" | "unknown" | "running" | "completed";
durationMs?: number;
exitCode?: number;
error?: string;
sections: readonly ParakeetToolCallSection[];
}>[];

Even a folded group shows recent calls, rather than hiding all tool work.

Parameter Type
group ParakeetToolGroupItem
open boolean

readonly Readonly<{ id: string; kind: ParakeetToolKind; name: string; verb: string; activeVerb: string; label: string; paths: readonly string[]; status: "error" | "unknown" | "running" | "completed"; durationMs?: number; exitCode?: number; error?: string; sections: readonly ParakeetToolCallSection[]; }>[]


toolCallDefaultOpen()function

Section titled “toolCallDefaultOpen()”
Signature
function toolCallDefaultOpen(call): boolean;

A failed call opens by default so its error is visible.

Parameter Type
call ParakeetToolCallView

boolean


disclosureOpen()function

Section titled “disclosureOpen()”
Signature
function disclosureOpen(state, id, defaultOpen): boolean;

Whether a group or call is currently open.

Parameter Type
state ToolDisclosureState
id string
defaultOpen boolean

boolean


toggleDisclosure()function

Section titled “toggleDisclosure()”
Signature
function toggleDisclosure(state, id, defaultOpen): ToolDisclosureState;

Flip one group or call, recording the reader’s explicit choice.

Parameter Type
state ToolDisclosureState
id string
defaultOpen boolean

ToolDisclosureState


toggleAllDisclosure()function

Section titled “toggleAllDisclosure()”
Signature
function toggleAllDisclosure(state): ToolDisclosureState;

Expand everything, or collapse everything when the reader has expanded anything. Either way individual choices are cleared.

Parameter Type
state ToolDisclosureState

ToolDisclosureState


formatToolDuration()function

Section titled “formatToolDuration()”
Signature
function formatToolDuration(milliseconds): string;

Compact duration: 340ms, 1.2s, 2m 5s.

Parameter Type
milliseconds number

string


useMarkdown()function

Section titled “useMarkdown()”
Signature
function useMarkdown(content): MarkdownDocument;

Parse chat Markdown for headless hosts, including terminal presentation.

Parameter Type
content string

MarkdownDocument


ParakeetView()function

Section titled “ParakeetView()”
Signature
function ParakeetView(__namedParameters): ReactElement;

Render the retained conversation surface within one Parakeet provider.

Parameter Type
__namedParameters ParakeetViewProps

ReactElement


Signature
function Parakeet(__namedParameters): ReactElement;

Standalone typed composer and exact-message timeline.

Parameter Type
__namedParameters ParakeetProps

ReactElement