Files
openclaw/src/commands/status.types.ts
Vincent Koc 46c99cff0b fix(status): show runtime in CLI sessions (#77776)
* fix(status): show agent runtime in cli status

* fix(status): preserve configured runtime labels
2026-05-05 16:50:22 -07:00

71 lines
1.8 KiB
TypeScript

import type { ChannelId } from "../channels/plugins/types.public.js";
import type { TaskAuditSummary } from "../tasks/task-registry.audit.js";
import type { TaskRegistrySummary } from "../tasks/task-registry.types.js";
export type SessionStatus = {
agentId?: string;
key: string;
kind: "cron" | "direct" | "group" | "global" | "unknown";
sessionId?: string;
updatedAt: number | null;
age: number | null;
thinkingLevel?: string;
fastMode?: boolean;
verboseLevel?: string;
traceLevel?: string;
reasoningLevel?: string;
elevatedLevel?: string;
systemSent?: boolean;
abortedLastRun?: boolean;
inputTokens?: number;
outputTokens?: number;
totalTokens: number | null;
totalTokensFresh: boolean;
cacheRead?: number;
cacheWrite?: number;
remainingTokens: number | null;
percentUsed: number | null;
model: string | null;
runtime?: string | null;
contextTokens: number | null;
flags: string[];
};
export type HeartbeatStatus = {
agentId: string;
enabled: boolean;
every: string;
everyMs: number | null;
};
export type StatusSummary = {
runtimeVersion?: string | null;
eventLoop?: import("../gateway/server/event-loop-health.js").GatewayEventLoopHealth;
linkChannel?: {
id: ChannelId;
label: string;
linked: boolean;
authAgeMs: number | null;
};
heartbeat: {
defaultAgentId: string;
agents: HeartbeatStatus[];
};
channelSummary: string[];
queuedSystemEvents: string[];
tasks: TaskRegistrySummary;
taskAudit: TaskAuditSummary;
sessions: {
paths: string[];
count: number;
defaults: { model: string | null; contextTokens: number | null };
recent: SessionStatus[];
byAgent: Array<{
agentId: string;
path: string;
count: number;
recent: SessionStatus[];
}>;
};
};