Repository navigation
Expand file tree
/
Copy pathactivity-journal-types.ts
More file actions
91 lines (86 loc) · 2.03 KB
/
Copy pathactivity-journal-types.ts
File metadata and controls
91 lines (86 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
export type AgentRuntimeEventType =
| 'session.born'
| 'runtime.started'
| 'runtime.spawn_failed'
| 'runtime.stopped'
| 'runtime.rejected'
| 'runtime.turn.text'
| 'runtime.turn.tool'
| 'runtime.turn.error'
| 'dev.sonner_test'
| 'inbox.received'
| 'news.ingested'
| 'news.story.updated'
export type AgentRuntimeSurface = 'terminal' | 'webpi' | 'headless'
export type AgentRuntimeCause =
| { kind: 'issue'; workspaceId: string; issueId: string }
| {
kind: 'conversation'
from?: {
kind: 'session' | 'workspace' | 'human'
resumeId?: string
workspaceId?: string
agent?: string
}
resolution?: 'exact' | 'reconstructed'
}
| { kind: 'ui' }
| { kind: 'http' }
export interface AgentRuntimePayload {
workspaceId?: string
resumeId?: string
agent?: string
sessionRecordId?: string
taskId?: string
surface?: AgentRuntimeSurface
cause?: AgentRuntimeCause
status?: 'done' | 'failed' | 'interrupted' | 'paused'
launchErrorCode?: string
reason?: string
error?: string
exitCode?: number | null
text?: string
toolId?: string
toolName?: string
toolStatus?: 'running' | 'completed' | 'failed'
message?: string
assistantText?: string
metrics?: {
textBlocks: number
toolCalls: number
toolFailures: number
}
truncated?: boolean
testState?: 'running' | 'success' | 'error'
inboxEntryId?: string
workspaceLabel?: string
originKind?: 'headless' | 'interactive' | 'manual'
summary?: string
documentCount?: number
newsItemId?: number
storyId?: string
revision?: number
developmentIds?: string[]
dedupKey?: string
title?: string
source?: string
link?: string
publishedAt?: number
ingestSource?: string
image?: string
}
export interface AgentRuntimeEvent {
seq: number
ts: number
type: AgentRuntimeEventType
causedBy?: number
payload: AgentRuntimePayload
}
export interface AgentRuntimePage {
entries: AgentRuntimeEvent[]
lastSeq: number
page?: number
pageSize?: number
total?: number
totalPages?: number
}