Gateway: activity line, thread history paging, a project's threads, and a thread's subagents
This commit is contained in:
1 parent
6bc9cac6ca
commit
52210d0223
11 files changed
+474
-19
No files matched your search
@@ -116,6 +116,8 @@ export interface FeedItem {
|
||||
updatedAt: string;
|
||||
/** The agent's latest message, trimmed for the watch. Null until the gateway has read it. */
|
||||
lastMessage: string | null;
|
||||
/** What a working thread is doing right now. Null when nothing is in progress or not read yet. */
|
||||
activity: Activity | null;
|
||||
request: PendingRequest | null;
|
||||
/**
|
||||
* Set when `request` comes from a subagent this thread delegated to, rather than the thread
|
||||
@@ -124,6 +126,37 @@ export interface FeedItem {
|
||||
via: { hostId: string; threadId: string; title: string } | null;
|
||||
}
|
||||
|
||||
/** One step a thread is taking now. */
|
||||
export interface Activity {
|
||||
kind: "command" | "edit" | "search" | "web" | "subagent" | "thinking" | "tool";
|
||||
/** The command line, file name, search, subagent title or tool name, trimmed. */
|
||||
text: string;
|
||||
/** When the step started, for its elapsed time. */
|
||||
startedAt: string | null;
|
||||
}
|
||||
|
||||
/** A thread in a list: a project's threads, or a thread's subagents. */
|
||||
export interface ThreadRow {
|
||||
hostId: string;
|
||||
threadId: string;
|
||||
title: string;
|
||||
/** Null for a thread that never ran or was stopped. */
|
||||
phase: Phase | null;
|
||||
settled: boolean;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ThreadListResponse {
|
||||
items: ThreadRow[];
|
||||
}
|
||||
|
||||
export interface HistoryResponse {
|
||||
/** Oldest first, just before the messages the watch already has. */
|
||||
messages: Message[];
|
||||
/** Pass to the history route for the page before these. Null at the start of the thread. */
|
||||
earlierCursor: string | null;
|
||||
}
|
||||
|
||||
/** Counts for the watch face complication. Cheap: no thread pages are read. */
|
||||
export interface Summary {
|
||||
needsYou: number;
|
||||
@@ -171,6 +204,10 @@ export interface ThreadDetail {
|
||||
canStop: boolean;
|
||||
/** True when the thread runs in approval-required mode, asking before each action. */
|
||||
askFirst: boolean;
|
||||
/** Pass to the history route for older messages. Null when `messages` starts the thread. */
|
||||
earlierCursor: string | null;
|
||||
/** Subagents and delegated threads this thread started, newest first. */
|
||||
subagents: ThreadRow[];
|
||||
}
|
||||
|
||||
export interface ThreadModeRequest {
|
||||
|
||||
Reference in new issue
Block a user