@lincyaw/kernel 1.0.0-rc.93 → 1.0.0-rc.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/contracts/agent-activity.ts +18 -0
- package/src/contracts.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Member } from './server.ts'
|
|
2
|
+
|
|
3
|
+
export type AgentActivityOperation = 'read' | 'edit' | 'navigate' | 'preview' | 'build' | 'voice' | 'workspace'
|
|
4
|
+
export interface AgentActivityTarget { section?: string, block?: string, step?: string }
|
|
5
|
+
/** Ephemeral UI presence. Never contains tool arguments, document text, credentials or failure details. */
|
|
6
|
+
export interface AgentActivity {
|
|
7
|
+
id: string
|
|
8
|
+
operation: AgentActivityOperation
|
|
9
|
+
document?: string
|
|
10
|
+
targets: AgentActivityTarget[]
|
|
11
|
+
state: 'running' | 'done' | 'failed' | 'cancelled'
|
|
12
|
+
startedAt: number
|
|
13
|
+
finishedAt?: number
|
|
14
|
+
}
|
|
15
|
+
export interface AgentActivitySnapshot { activities: AgentActivity[] }
|
|
16
|
+
export interface AgentActivityObserver {
|
|
17
|
+
begin(input: Pick<AgentActivity, 'operation' | 'document' | 'targets'>, member: Member): (state: Exclude<AgentActivity['state'], 'running'>) => void
|
|
18
|
+
}
|