@swarmclawai/swarmclaw 0.7.2 → 0.7.3
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/README.md +81 -22
- package/package.json +1 -1
- package/src/app/api/agents/[id]/route.ts +26 -0
- package/src/app/api/agents/[id]/thread/route.ts +36 -7
- package/src/app/api/agents/route.ts +12 -1
- package/src/app/api/auth/route.ts +76 -7
- package/src/app/api/chatrooms/[id]/chat/route.ts +7 -2
- package/src/app/api/chats/[id]/browser/route.ts +5 -1
- package/src/app/api/chats/[id]/chat/route.ts +7 -3
- package/src/app/api/chats/[id]/main-loop/route.ts +7 -88
- package/src/app/api/chats/[id]/messages/route.ts +19 -13
- package/src/app/api/chats/[id]/route.ts +18 -0
- package/src/app/api/chats/[id]/stop/route.ts +6 -1
- package/src/app/api/chats/route.ts +16 -0
- package/src/app/api/connectors/[id]/doctor/route.ts +26 -0
- package/src/app/api/connectors/doctor/route.ts +13 -0
- package/src/app/api/files/open/route.ts +16 -14
- package/src/app/api/memory/maintenance/route.ts +11 -1
- package/src/app/api/openclaw/agent-files/route.ts +27 -4
- package/src/app/api/openclaw/skills/route.ts +11 -3
- package/src/app/api/plugins/dependencies/route.ts +24 -0
- package/src/app/api/plugins/install/route.ts +15 -92
- package/src/app/api/plugins/route.ts +3 -26
- package/src/app/api/plugins/settings/route.ts +17 -12
- package/src/app/api/plugins/ui/route.ts +1 -0
- package/src/app/api/settings/route.ts +49 -7
- package/src/app/api/tasks/[id]/route.ts +15 -6
- package/src/app/api/tasks/bulk/route.ts +2 -2
- package/src/app/api/tasks/route.ts +9 -4
- package/src/app/api/webhooks/[id]/route.ts +8 -1
- package/src/app/page.tsx +9 -2
- package/src/cli/index.js +4 -0
- package/src/cli/index.ts +3 -10
- package/src/components/agents/agent-card.tsx +15 -12
- package/src/components/agents/agent-chat-list.tsx +101 -1
- package/src/components/agents/agent-list.tsx +46 -9
- package/src/components/agents/agent-sheet.tsx +207 -16
- package/src/components/agents/inspector-panel.tsx +108 -48
- package/src/components/auth/access-key-gate.tsx +36 -97
- package/src/components/chat/chat-area.tsx +29 -13
- package/src/components/chat/chat-card.tsx +4 -20
- package/src/components/chat/chat-header.tsx +255 -353
- package/src/components/chat/chat-list.tsx +7 -9
- package/src/components/chat/checkpoint-timeline.tsx +1 -1
- package/src/components/chat/message-list.tsx +3 -1
- package/src/components/chatrooms/chatroom-view.tsx +347 -205
- package/src/components/connectors/connector-list.tsx +265 -127
- package/src/components/connectors/connector-sheet.tsx +217 -0
- package/src/components/home/home-view.tsx +128 -4
- package/src/components/layout/app-layout.tsx +383 -194
- package/src/components/layout/mobile-header.tsx +26 -8
- package/src/components/plugins/plugin-list.tsx +15 -3
- package/src/components/plugins/plugin-sheet.tsx +118 -9
- package/src/components/projects/project-detail.tsx +183 -0
- package/src/components/shared/agent-picker-list.tsx +2 -2
- package/src/components/shared/command-palette.tsx +111 -24
- package/src/components/shared/settings/plugin-manager.tsx +20 -4
- package/src/components/shared/settings/section-capability-policy.tsx +105 -0
- package/src/components/shared/settings/section-heartbeat.tsx +77 -0
- package/src/components/shared/settings/section-orchestrator.tsx +3 -3
- package/src/components/shared/settings/section-runtime-loop.tsx +5 -5
- package/src/components/shared/settings/section-secrets.tsx +6 -6
- package/src/components/shared/settings/section-user-preferences.tsx +1 -1
- package/src/components/shared/settings/section-voice.tsx +5 -1
- package/src/components/shared/settings/section-web-search.tsx +10 -2
- package/src/components/shared/settings/settings-page.tsx +245 -46
- package/src/components/tasks/approvals-panel.tsx +205 -18
- package/src/components/tasks/task-board.tsx +242 -46
- package/src/components/usage/metrics-dashboard.tsx +74 -1
- package/src/components/wallets/wallet-panel.tsx +17 -5
- package/src/components/webhooks/webhook-sheet.tsx +7 -7
- package/src/lib/auth.ts +17 -0
- package/src/lib/chat-streaming-state.test.ts +108 -0
- package/src/lib/chat-streaming-state.ts +108 -0
- package/src/lib/openclaw-agent-id.test.ts +14 -0
- package/src/lib/openclaw-agent-id.ts +31 -0
- package/src/lib/server/agent-assignment.test.ts +112 -0
- package/src/lib/server/agent-assignment.ts +169 -0
- package/src/lib/server/approval-connector-notify.test.ts +253 -0
- package/src/lib/server/approvals-auto-approve.test.ts +205 -0
- package/src/lib/server/approvals.ts +483 -75
- package/src/lib/server/autonomy-runtime.test.ts +341 -0
- package/src/lib/server/browser-state.test.ts +118 -0
- package/src/lib/server/browser-state.ts +123 -0
- package/src/lib/server/build-llm.test.ts +36 -0
- package/src/lib/server/build-llm.ts +11 -4
- package/src/lib/server/builtin-plugins.ts +34 -0
- package/src/lib/server/chat-execution-heartbeat.test.ts +40 -0
- package/src/lib/server/chat-execution-tool-events.test.ts +134 -0
- package/src/lib/server/chat-execution.ts +250 -61
- package/src/lib/server/chatroom-health.test.ts +26 -0
- package/src/lib/server/chatroom-health.ts +2 -3
- package/src/lib/server/chatroom-helpers.test.ts +67 -2
- package/src/lib/server/chatroom-helpers.ts +45 -5
- package/src/lib/server/connectors/discord.ts +175 -11
- package/src/lib/server/connectors/doctor.test.ts +80 -0
- package/src/lib/server/connectors/doctor.ts +116 -0
- package/src/lib/server/connectors/manager.ts +946 -110
- package/src/lib/server/connectors/policy.test.ts +222 -0
- package/src/lib/server/connectors/policy.ts +452 -0
- package/src/lib/server/connectors/slack.ts +188 -9
- package/src/lib/server/connectors/telegram.ts +65 -15
- package/src/lib/server/connectors/thread-context.test.ts +44 -0
- package/src/lib/server/connectors/thread-context.ts +72 -0
- package/src/lib/server/connectors/types.ts +41 -11
- package/src/lib/server/daemon-state.ts +59 -1
- package/src/lib/server/data-dir.ts +13 -0
- package/src/lib/server/delegation-jobs.test.ts +140 -0
- package/src/lib/server/delegation-jobs.ts +248 -0
- package/src/lib/server/document-utils.test.ts +47 -0
- package/src/lib/server/document-utils.ts +397 -0
- package/src/lib/server/heartbeat-service.ts +13 -39
- package/src/lib/server/heartbeat-source.test.ts +22 -0
- package/src/lib/server/heartbeat-source.ts +7 -0
- package/src/lib/server/identity-continuity.test.ts +77 -0
- package/src/lib/server/identity-continuity.ts +127 -0
- package/src/lib/server/mailbox-utils.ts +347 -0
- package/src/lib/server/main-agent-loop.ts +27 -967
- package/src/lib/server/memory-db.ts +4 -6
- package/src/lib/server/memory-tiers.ts +40 -0
- package/src/lib/server/openclaw-agent-resolver.test.ts +70 -0
- package/src/lib/server/openclaw-agent-resolver.ts +128 -0
- package/src/lib/server/openclaw-exec-config.ts +5 -6
- package/src/lib/server/openclaw-skills-normalize.test.ts +56 -0
- package/src/lib/server/openclaw-skills-normalize.ts +136 -0
- package/src/lib/server/openclaw-sync.ts +3 -2
- package/src/lib/server/orchestrator-lg.ts +17 -6
- package/src/lib/server/orchestrator.ts +2 -2
- package/src/lib/server/playwright-proxy.mjs +27 -3
- package/src/lib/server/plugins.test.ts +207 -0
- package/src/lib/server/plugins.ts +822 -69
- package/src/lib/server/provider-health.ts +33 -3
- package/src/lib/server/queue.ts +3 -20
- package/src/lib/server/scheduler.ts +2 -0
- package/src/lib/server/session-archive-memory.test.ts +85 -0
- package/src/lib/server/session-archive-memory.ts +230 -0
- package/src/lib/server/session-mailbox.ts +8 -18
- package/src/lib/server/session-reset-policy.test.ts +99 -0
- package/src/lib/server/session-reset-policy.ts +311 -0
- package/src/lib/server/session-run-manager.ts +33 -80
- package/src/lib/server/session-tools/autonomy-tools.test.ts +105 -0
- package/src/lib/server/session-tools/calendar.ts +2 -12
- package/src/lib/server/session-tools/connector.ts +109 -8
- package/src/lib/server/session-tools/context.ts +14 -2
- package/src/lib/server/session-tools/crawl.ts +447 -0
- package/src/lib/server/session-tools/crud.ts +70 -32
- package/src/lib/server/session-tools/delegate-fallback.test.ts +219 -0
- package/src/lib/server/session-tools/delegate.ts +406 -20
- package/src/lib/server/session-tools/discovery.ts +22 -4
- package/src/lib/server/session-tools/document.ts +283 -0
- package/src/lib/server/session-tools/email.ts +1 -3
- package/src/lib/server/session-tools/extract.ts +137 -0
- package/src/lib/server/session-tools/file-normalize.test.ts +93 -0
- package/src/lib/server/session-tools/file-send.test.ts +84 -1
- package/src/lib/server/session-tools/file.ts +237 -24
- package/src/lib/server/session-tools/human-loop.ts +227 -0
- package/src/lib/server/session-tools/image-gen.ts +1 -3
- package/src/lib/server/session-tools/index.ts +56 -1
- package/src/lib/server/session-tools/mailbox.ts +276 -0
- package/src/lib/server/session-tools/memory.ts +35 -3
- package/src/lib/server/session-tools/monitor.ts +150 -7
- package/src/lib/server/session-tools/normalize-tool-args.ts +17 -14
- package/src/lib/server/session-tools/platform-normalize.test.ts +142 -0
- package/src/lib/server/session-tools/platform.ts +142 -4
- package/src/lib/server/session-tools/plugin-creator.ts +86 -23
- package/src/lib/server/session-tools/primitive-tools.test.ts +257 -0
- package/src/lib/server/session-tools/replicate.ts +1 -3
- package/src/lib/server/session-tools/schedule.ts +20 -10
- package/src/lib/server/session-tools/session-info.ts +36 -3
- package/src/lib/server/session-tools/session-tools-wiring.test.ts +31 -17
- package/src/lib/server/session-tools/subagent.ts +193 -27
- package/src/lib/server/session-tools/table.ts +587 -0
- package/src/lib/server/session-tools/wallet.ts +13 -10
- package/src/lib/server/session-tools/web-browser-config.test.ts +39 -0
- package/src/lib/server/session-tools/web.ts +896 -100
- package/src/lib/server/storage.ts +226 -7
- package/src/lib/server/stream-agent-chat.ts +46 -21
- package/src/lib/server/structured-extract.test.ts +72 -0
- package/src/lib/server/structured-extract.ts +373 -0
- package/src/lib/server/task-mention.test.ts +16 -2
- package/src/lib/server/task-mention.ts +61 -10
- package/src/lib/server/tool-aliases.ts +44 -7
- package/src/lib/server/tool-capability-policy.ts +6 -0
- package/src/lib/server/tool-retry.ts +2 -0
- package/src/lib/server/watch-jobs.test.ts +173 -0
- package/src/lib/server/watch-jobs.ts +532 -0
- package/src/lib/server/ws-hub.ts +5 -3
- package/src/lib/validation/schemas.test.ts +26 -0
- package/src/lib/validation/schemas.ts +7 -0
- package/src/lib/ws-client.ts +14 -12
- package/src/proxy.ts +5 -5
- package/src/stores/use-app-store.ts +0 -6
- package/src/stores/use-chat-store.ts +31 -2
- package/src/types/index.ts +287 -44
- package/src/components/chat/new-chat-sheet.tsx +0 -253
- package/src/lib/server/main-session.ts +0 -17
- package/src/lib/server/session-run-manager.test.ts +0 -26
package/src/types/index.ts
CHANGED
|
@@ -24,6 +24,27 @@ export interface Message {
|
|
|
24
24
|
streaming?: boolean
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export type SessionResetMode = 'idle' | 'daily'
|
|
28
|
+
export type SessionResetType = 'direct' | 'group' | 'thread' | 'main'
|
|
29
|
+
|
|
30
|
+
export interface IdentityContinuityState {
|
|
31
|
+
selfSummary?: string | null
|
|
32
|
+
relationshipSummary?: string | null
|
|
33
|
+
personaLabel?: string | null
|
|
34
|
+
toneStyle?: string | null
|
|
35
|
+
boundaries?: string[]
|
|
36
|
+
continuityNotes?: string[]
|
|
37
|
+
updatedAt?: number | null
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface SessionArchiveState {
|
|
41
|
+
memoryId?: string | null
|
|
42
|
+
lastSyncedAt?: number | null
|
|
43
|
+
lastHash?: string | null
|
|
44
|
+
messageCount?: number
|
|
45
|
+
exportPath?: string | null
|
|
46
|
+
}
|
|
47
|
+
|
|
27
48
|
export type ProviderType = 'claude-cli' | 'codex-cli' | 'opencode-cli' | 'openai' | 'ollama' | 'anthropic' | 'openclaw' | 'google' | 'deepseek' | 'groq' | 'together' | 'mistral' | 'xai' | 'fireworks'
|
|
28
49
|
|
|
29
50
|
export interface ProviderInfo {
|
|
@@ -49,6 +70,7 @@ export type Credentials = Record<string, Credential>
|
|
|
49
70
|
export interface Session {
|
|
50
71
|
id: string
|
|
51
72
|
name: string
|
|
73
|
+
shortcutForAgentId?: string | null
|
|
52
74
|
cwd: string
|
|
53
75
|
user: string
|
|
54
76
|
provider: ProviderType
|
|
@@ -78,47 +100,55 @@ export interface Session {
|
|
|
78
100
|
heartbeatEnabled?: boolean | null
|
|
79
101
|
heartbeatIntervalSec?: number | null
|
|
80
102
|
heartbeatTarget?: 'last' | 'none' | string | null
|
|
103
|
+
sessionResetMode?: SessionResetMode | null
|
|
104
|
+
sessionIdleTimeoutSec?: number | null
|
|
105
|
+
sessionMaxAgeSec?: number | null
|
|
106
|
+
sessionDailyResetAt?: string | null
|
|
107
|
+
sessionResetTimezone?: string | null
|
|
108
|
+
thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high'
|
|
109
|
+
browserProfileId?: string | null
|
|
110
|
+
connectorThinkLevel?: 'minimal' | 'low' | 'medium' | 'high'
|
|
111
|
+
connectorSessionScope?: 'main' | 'channel' | 'peer' | 'channel-peer' | 'thread'
|
|
112
|
+
connectorReplyMode?: 'off' | 'first' | 'all'
|
|
113
|
+
connectorThreadBinding?: 'off' | 'prefer' | 'strict'
|
|
114
|
+
connectorGroupPolicy?: 'open' | 'mention' | 'reply-or-mention' | 'disabled'
|
|
115
|
+
connectorIdleTimeoutSec?: number | null
|
|
116
|
+
connectorMaxAgeSec?: number | null
|
|
117
|
+
mailbox?: MailboxEnvelope[] | null
|
|
118
|
+
connectorContext?: {
|
|
119
|
+
connectorId?: string | null
|
|
120
|
+
platform?: ConnectorPlatform | null
|
|
121
|
+
channelId?: string | null
|
|
122
|
+
senderId?: string | null
|
|
123
|
+
senderName?: string | null
|
|
124
|
+
sessionKey?: string | null
|
|
125
|
+
peerKey?: string | null
|
|
126
|
+
scope?: 'main' | 'channel' | 'peer' | 'channel-peer' | 'thread' | null
|
|
127
|
+
replyMode?: 'off' | 'first' | 'all' | null
|
|
128
|
+
threadBinding?: 'off' | 'prefer' | 'strict' | null
|
|
129
|
+
groupPolicy?: 'open' | 'mention' | 'reply-or-mention' | 'disabled' | null
|
|
130
|
+
threadId?: string | null
|
|
131
|
+
threadTitle?: string | null
|
|
132
|
+
threadPersonaLabel?: string | null
|
|
133
|
+
threadParentChannelId?: string | null
|
|
134
|
+
threadParentChannelName?: string | null
|
|
135
|
+
isGroup?: boolean
|
|
136
|
+
lastInboundAt?: number | null
|
|
137
|
+
lastInboundMessageId?: string | null
|
|
138
|
+
lastInboundReplyToMessageId?: string | null
|
|
139
|
+
lastInboundThreadId?: string | null
|
|
140
|
+
lastOutboundAt?: number | null
|
|
141
|
+
lastOutboundMessageId?: string | null
|
|
142
|
+
lastResetAt?: number | null
|
|
143
|
+
lastResetReason?: string | null
|
|
144
|
+
}
|
|
81
145
|
lastAutoMemoryAt?: number | null
|
|
82
146
|
lastHeartbeatText?: string | null
|
|
83
147
|
lastHeartbeatSentAt?: number | null
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
summary?: string | null
|
|
89
|
-
nextAction?: string | null
|
|
90
|
-
planSteps?: string[]
|
|
91
|
-
currentPlanStep?: string | null
|
|
92
|
-
reviewNote?: string | null
|
|
93
|
-
reviewConfidence?: number | null
|
|
94
|
-
missionTaskId?: string | null
|
|
95
|
-
momentumScore?: number
|
|
96
|
-
paused?: boolean
|
|
97
|
-
autonomyMode?: 'assist' | 'autonomous'
|
|
98
|
-
pendingEvents?: Array<{
|
|
99
|
-
id: string
|
|
100
|
-
type: string
|
|
101
|
-
text: string
|
|
102
|
-
createdAt: number
|
|
103
|
-
}>
|
|
104
|
-
timeline?: Array<{
|
|
105
|
-
id: string
|
|
106
|
-
at: number
|
|
107
|
-
source: string
|
|
108
|
-
note: string
|
|
109
|
-
status?: 'idle' | 'progress' | 'blocked' | 'ok'
|
|
110
|
-
}>
|
|
111
|
-
missionTokens?: number
|
|
112
|
-
missionCostUsd?: number
|
|
113
|
-
followupChainCount?: number
|
|
114
|
-
metaMissCount?: number
|
|
115
|
-
workingMemoryNotes?: string[]
|
|
116
|
-
lastMemoryNoteAt?: number | null
|
|
117
|
-
lastPlannedAt?: number | null
|
|
118
|
-
lastReviewedAt?: number | null
|
|
119
|
-
lastTickAt?: number | null
|
|
120
|
-
updatedAt?: number
|
|
121
|
-
}
|
|
148
|
+
lastSessionResetAt?: number | null
|
|
149
|
+
lastSessionResetReason?: string | null
|
|
150
|
+
identityState?: IdentityContinuityState | null
|
|
151
|
+
sessionArchiveState?: SessionArchiveState | null
|
|
122
152
|
pinned?: boolean
|
|
123
153
|
file?: string | null
|
|
124
154
|
queuedCount?: number
|
|
@@ -148,10 +178,16 @@ export type SessionTool =
|
|
|
148
178
|
| 'canvas'
|
|
149
179
|
| 'http_request'
|
|
150
180
|
| 'git'
|
|
181
|
+
| 'mailbox'
|
|
182
|
+
| 'ask_human'
|
|
183
|
+
| 'document'
|
|
184
|
+
| 'extract'
|
|
185
|
+
| 'table'
|
|
186
|
+
| 'crawl'
|
|
151
187
|
|
|
152
188
|
// --- Approvals ---
|
|
153
189
|
|
|
154
|
-
export type ApprovalCategory = 'tool_access' | 'wallet_transfer' | 'plugin_scaffold' | 'plugin_install' | 'task_tool'
|
|
190
|
+
export type ApprovalCategory = 'tool_access' | 'wallet_transfer' | 'plugin_scaffold' | 'plugin_install' | 'task_tool' | 'human_loop'
|
|
155
191
|
|
|
156
192
|
export interface ApprovalRequest {
|
|
157
193
|
id: string
|
|
@@ -165,10 +201,36 @@ export interface ApprovalRequest {
|
|
|
165
201
|
createdAt: number
|
|
166
202
|
updatedAt: number
|
|
167
203
|
status: 'pending' | 'approved' | 'rejected'
|
|
204
|
+
connectorNotification?: {
|
|
205
|
+
attemptedAt?: number | null
|
|
206
|
+
sentAt?: number | null
|
|
207
|
+
connectorId?: string | null
|
|
208
|
+
channelId?: string | null
|
|
209
|
+
threadId?: string | null
|
|
210
|
+
messageId?: string | null
|
|
211
|
+
lastError?: string | null
|
|
212
|
+
} | null
|
|
168
213
|
}
|
|
169
214
|
|
|
170
215
|
export type Approvals = Record<string, ApprovalRequest>
|
|
171
216
|
|
|
217
|
+
export type MailboxStatus = 'new' | 'ack'
|
|
218
|
+
|
|
219
|
+
export interface MailboxEnvelope {
|
|
220
|
+
id: string
|
|
221
|
+
type: string
|
|
222
|
+
payload: string
|
|
223
|
+
fromSessionId?: string | null
|
|
224
|
+
fromAgentId?: string | null
|
|
225
|
+
toSessionId: string
|
|
226
|
+
toAgentId?: string | null
|
|
227
|
+
correlationId?: string | null
|
|
228
|
+
status: MailboxStatus
|
|
229
|
+
createdAt: number
|
|
230
|
+
expiresAt?: number | null
|
|
231
|
+
ackAt?: number | null
|
|
232
|
+
}
|
|
233
|
+
|
|
172
234
|
export interface PluginInvocationRecord {
|
|
173
235
|
pluginId: string
|
|
174
236
|
toolName: string
|
|
@@ -307,6 +369,8 @@ export interface Plugin {
|
|
|
307
369
|
name: string
|
|
308
370
|
version?: string
|
|
309
371
|
description?: string
|
|
372
|
+
author?: string
|
|
373
|
+
openclaw?: boolean
|
|
310
374
|
enabledByDefault?: boolean
|
|
311
375
|
hooks?: PluginHooks
|
|
312
376
|
tools?: PluginToolDef[]
|
|
@@ -320,6 +384,7 @@ export interface PluginMeta {
|
|
|
320
384
|
description?: string
|
|
321
385
|
filename: string
|
|
322
386
|
enabled: boolean
|
|
387
|
+
isBuiltin?: boolean
|
|
323
388
|
author?: string
|
|
324
389
|
version?: string
|
|
325
390
|
source?: 'local' | 'marketplace'
|
|
@@ -336,7 +401,18 @@ export interface PluginMeta {
|
|
|
336
401
|
connectorCount?: number
|
|
337
402
|
createdByAgentId?: string | null
|
|
338
403
|
settingsFields?: PluginSettingsField[]
|
|
404
|
+
hasDependencyManifest?: boolean
|
|
405
|
+
dependencyCount?: number
|
|
406
|
+
devDependencyCount?: number
|
|
407
|
+
packageManager?: PluginPackageManager
|
|
408
|
+
dependencyInstallStatus?: PluginDependencyInstallStatus
|
|
409
|
+
dependencyInstallError?: string
|
|
410
|
+
dependencyInstalledAt?: number
|
|
339
411
|
}
|
|
412
|
+
|
|
413
|
+
export type PluginPackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun'
|
|
414
|
+
export type PluginDependencyInstallStatus = 'none' | 'ready' | 'installing' | 'installed' | 'error'
|
|
415
|
+
|
|
340
416
|
export interface MarketplacePlugin {
|
|
341
417
|
id: string
|
|
342
418
|
name: string
|
|
@@ -394,6 +470,7 @@ export interface Agent {
|
|
|
394
470
|
name: string
|
|
395
471
|
description: string
|
|
396
472
|
soul?: string
|
|
473
|
+
identityState?: IdentityContinuityState | null
|
|
397
474
|
emoji?: string
|
|
398
475
|
creature?: string
|
|
399
476
|
vibe?: string
|
|
@@ -415,7 +492,7 @@ export interface Agent {
|
|
|
415
492
|
mcpServerIds?: string[] // IDs of configured MCP servers to inject tools from
|
|
416
493
|
mcpDisabledTools?: string[] // MCP tool names disabled for this agent (denylist)
|
|
417
494
|
capabilities?: string[] // e.g. ['frontend', 'screenshots', 'research', 'devops']
|
|
418
|
-
threadSessionId?: string | null // persistent chat
|
|
495
|
+
threadSessionId?: string | null // persistent shortcut chat session for agent-centric UI
|
|
419
496
|
platformAssignScope?: 'self' | 'all' // defaults to 'self'
|
|
420
497
|
heartbeatEnabled?: boolean
|
|
421
498
|
heartbeatIntervalSec?: number | null
|
|
@@ -428,6 +505,11 @@ export interface Agent {
|
|
|
428
505
|
heartbeatTarget?: 'last' | 'none' | string | null
|
|
429
506
|
heartbeatGoal?: string | null
|
|
430
507
|
heartbeatNextAction?: string | null
|
|
508
|
+
sessionResetMode?: SessionResetMode | null
|
|
509
|
+
sessionIdleTimeoutSec?: number | null
|
|
510
|
+
sessionMaxAgeSec?: number | null
|
|
511
|
+
sessionDailyResetAt?: string | null
|
|
512
|
+
sessionResetTimezone?: string | null
|
|
431
513
|
thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high'
|
|
432
514
|
elevenLabsVoiceId?: string | null
|
|
433
515
|
projectId?: string
|
|
@@ -532,6 +614,152 @@ export interface Schedule {
|
|
|
532
614
|
createdAt: number
|
|
533
615
|
}
|
|
534
616
|
|
|
617
|
+
export type BrowserSessionStatus = 'active' | 'idle' | 'closed' | 'error'
|
|
618
|
+
|
|
619
|
+
export interface BrowserSessionTab {
|
|
620
|
+
index: number
|
|
621
|
+
title?: string | null
|
|
622
|
+
url?: string | null
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface BrowserSessionArtifact {
|
|
626
|
+
kind: 'snapshot' | 'screenshot' | 'download' | 'pdf'
|
|
627
|
+
path: string
|
|
628
|
+
url?: string | null
|
|
629
|
+
filename?: string | null
|
|
630
|
+
createdAt: number
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface BrowserObservationLink {
|
|
634
|
+
text: string
|
|
635
|
+
href: string
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export interface BrowserObservationFormField {
|
|
639
|
+
name?: string | null
|
|
640
|
+
label?: string | null
|
|
641
|
+
type: string
|
|
642
|
+
required?: boolean
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface BrowserObservationForm {
|
|
646
|
+
index: number
|
|
647
|
+
action?: string | null
|
|
648
|
+
method?: string | null
|
|
649
|
+
fields: BrowserObservationFormField[]
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export interface BrowserObservationTable {
|
|
653
|
+
index: number
|
|
654
|
+
headers: string[]
|
|
655
|
+
rowCount: number
|
|
656
|
+
rows?: string[][]
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface BrowserObservation {
|
|
660
|
+
capturedAt: number
|
|
661
|
+
url?: string | null
|
|
662
|
+
title?: string | null
|
|
663
|
+
textPreview?: string | null
|
|
664
|
+
activeTabIndex?: number | null
|
|
665
|
+
tabs?: BrowserSessionTab[]
|
|
666
|
+
links?: BrowserObservationLink[]
|
|
667
|
+
forms?: BrowserObservationForm[]
|
|
668
|
+
tables?: BrowserObservationTable[]
|
|
669
|
+
errors?: string[]
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export interface BrowserSessionRecord {
|
|
673
|
+
id: string
|
|
674
|
+
sessionId: string
|
|
675
|
+
profileId: string
|
|
676
|
+
profileDir: string
|
|
677
|
+
status: BrowserSessionStatus
|
|
678
|
+
inheritedFromSessionId?: string | null
|
|
679
|
+
currentUrl?: string | null
|
|
680
|
+
pageTitle?: string | null
|
|
681
|
+
activeTabIndex?: number | null
|
|
682
|
+
tabs?: BrowserSessionTab[]
|
|
683
|
+
lastAction?: string | null
|
|
684
|
+
lastError?: string | null
|
|
685
|
+
lastObservation?: BrowserObservation | null
|
|
686
|
+
artifacts?: BrowserSessionArtifact[]
|
|
687
|
+
createdAt: number
|
|
688
|
+
updatedAt: number
|
|
689
|
+
lastUsedAt: number
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export type WatchJobType = 'time' | 'http' | 'file' | 'task' | 'webhook' | 'page' | 'email' | 'mailbox' | 'approval'
|
|
693
|
+
export type WatchJobStatus = 'active' | 'triggered' | 'failed' | 'cancelled'
|
|
694
|
+
|
|
695
|
+
export interface WatchJob {
|
|
696
|
+
id: string
|
|
697
|
+
type: WatchJobType
|
|
698
|
+
status: WatchJobStatus
|
|
699
|
+
description?: string | null
|
|
700
|
+
sessionId?: string | null
|
|
701
|
+
agentId?: string | null
|
|
702
|
+
createdByAgentId?: string | null
|
|
703
|
+
browserProfileId?: string | null
|
|
704
|
+
resumeMessage: string
|
|
705
|
+
target: Record<string, unknown>
|
|
706
|
+
condition: Record<string, unknown>
|
|
707
|
+
runAt?: number | null
|
|
708
|
+
nextCheckAt?: number | null
|
|
709
|
+
intervalMs?: number | null
|
|
710
|
+
timeoutAt?: number | null
|
|
711
|
+
lastCheckedAt?: number | null
|
|
712
|
+
lastTriggeredAt?: number | null
|
|
713
|
+
lastError?: string | null
|
|
714
|
+
result?: Record<string, unknown> | null
|
|
715
|
+
createdAt: number
|
|
716
|
+
updatedAt: number
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export type DelegationJobKind = 'subagent' | 'delegate'
|
|
720
|
+
export type DelegationJobStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled'
|
|
721
|
+
|
|
722
|
+
export interface DelegationJobCheckpoint {
|
|
723
|
+
at: number
|
|
724
|
+
note: string
|
|
725
|
+
status?: DelegationJobStatus
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export interface DelegationJobArtifact {
|
|
729
|
+
type: 'text' | 'file' | 'image' | 'link'
|
|
730
|
+
value: string
|
|
731
|
+
label?: string | null
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export interface DelegationJobRecord {
|
|
735
|
+
id: string
|
|
736
|
+
kind: DelegationJobKind
|
|
737
|
+
status: DelegationJobStatus
|
|
738
|
+
backend?: 'claude' | 'codex' | 'opencode' | 'gemini' | null
|
|
739
|
+
parentSessionId?: string | null
|
|
740
|
+
childSessionId?: string | null
|
|
741
|
+
agentId?: string | null
|
|
742
|
+
agentName?: string | null
|
|
743
|
+
cwd?: string | null
|
|
744
|
+
task: string
|
|
745
|
+
result?: string | null
|
|
746
|
+
resultPreview?: string | null
|
|
747
|
+
error?: string | null
|
|
748
|
+
checkpoints?: DelegationJobCheckpoint[]
|
|
749
|
+
artifacts?: DelegationJobArtifact[]
|
|
750
|
+
resumeId?: string | null
|
|
751
|
+
resumeIds?: {
|
|
752
|
+
claudeCode?: string | null
|
|
753
|
+
codex?: string | null
|
|
754
|
+
opencode?: string | null
|
|
755
|
+
gemini?: string | null
|
|
756
|
+
}
|
|
757
|
+
createdAt: number
|
|
758
|
+
updatedAt: number
|
|
759
|
+
startedAt?: number | null
|
|
760
|
+
completedAt?: number | null
|
|
761
|
+
}
|
|
762
|
+
|
|
535
763
|
export interface FileReference {
|
|
536
764
|
path: string
|
|
537
765
|
contextSnippet?: string
|
|
@@ -584,7 +812,7 @@ export interface MemoryEntry {
|
|
|
584
812
|
updatedAt: number
|
|
585
813
|
}
|
|
586
814
|
|
|
587
|
-
export type SessionType = 'human'
|
|
815
|
+
export type SessionType = 'human'
|
|
588
816
|
export type AppView = 'home' | 'agents' | 'chatrooms' | 'schedules' | 'memory' | 'tasks' | 'approvals' | 'secrets' | 'providers' | 'skills' | 'connectors' | 'webhooks' | 'mcp_servers' | 'knowledge' | 'plugins' | 'usage' | 'wallets' | 'runs' | 'logs' | 'settings' | 'projects' | 'activity'
|
|
589
817
|
|
|
590
818
|
// --- Chatrooms ---
|
|
@@ -766,10 +994,13 @@ export interface AppSettings {
|
|
|
766
994
|
userAvatarSeed?: string
|
|
767
995
|
elevenLabsEnabled?: boolean
|
|
768
996
|
elevenLabsApiKey?: string | null
|
|
997
|
+
elevenLabsApiKeyConfigured?: boolean
|
|
769
998
|
elevenLabsVoiceId?: string | null
|
|
770
999
|
speechRecognitionLang?: string | null
|
|
771
1000
|
tavilyApiKey?: string | null
|
|
1001
|
+
tavilyApiKeyConfigured?: boolean
|
|
772
1002
|
braveApiKey?: string | null
|
|
1003
|
+
braveApiKeyConfigured?: boolean
|
|
773
1004
|
heartbeatPrompt?: string | null
|
|
774
1005
|
heartbeatIntervalSec?: number | null
|
|
775
1006
|
heartbeatInterval?: string | number | null
|
|
@@ -781,12 +1012,21 @@ export interface AppSettings {
|
|
|
781
1012
|
heartbeatActiveStart?: string | null
|
|
782
1013
|
heartbeatActiveEnd?: string | null
|
|
783
1014
|
heartbeatTimezone?: string | null
|
|
1015
|
+
sessionResetMode?: SessionResetMode | null
|
|
1016
|
+
sessionIdleTimeoutSec?: number | null
|
|
1017
|
+
sessionMaxAgeSec?: number | null
|
|
1018
|
+
sessionDailyResetAt?: string | null
|
|
1019
|
+
sessionResetTimezone?: string | null
|
|
784
1020
|
// Task resiliency and supervision
|
|
785
1021
|
defaultTaskMaxAttempts?: number
|
|
786
1022
|
taskRetryBackoffSec?: number
|
|
787
1023
|
taskStallTimeoutMin?: number
|
|
788
1024
|
// Safety rails
|
|
1025
|
+
approvalsEnabled?: boolean
|
|
789
1026
|
safetyRequireApprovalForOutbound?: boolean
|
|
1027
|
+
approvalAutoApproveCategories?: ApprovalCategory[]
|
|
1028
|
+
approvalConnectorNotifyEnabled?: boolean
|
|
1029
|
+
approvalConnectorNotifyDelaySec?: number | null
|
|
790
1030
|
safetyMaxDailySpendUsd?: number | null
|
|
791
1031
|
safetyBlockedTools?: string[]
|
|
792
1032
|
capabilityPolicyMode?: 'permissive' | 'balanced' | 'strict'
|
|
@@ -847,7 +1087,7 @@ export interface AppSettings {
|
|
|
847
1087
|
pluginSettings?: Record<string, Record<string, unknown>>
|
|
848
1088
|
}
|
|
849
1089
|
|
|
850
|
-
// ---
|
|
1090
|
+
// --- Agent Secrets ---
|
|
851
1091
|
|
|
852
1092
|
export interface OrchestratorSecret {
|
|
853
1093
|
id: string
|
|
@@ -855,7 +1095,7 @@ export interface OrchestratorSecret {
|
|
|
855
1095
|
service: string // e.g. 'gmail', 'ahrefs', 'custom'
|
|
856
1096
|
encryptedValue: string
|
|
857
1097
|
scope: 'global' | 'agent'
|
|
858
|
-
agentIds: string[] // if scope === 'agent', which
|
|
1098
|
+
agentIds: string[] // if scope === 'agent', which agents can use it
|
|
859
1099
|
createdAt: number
|
|
860
1100
|
updatedAt: number
|
|
861
1101
|
}
|
|
@@ -867,7 +1107,7 @@ export type BoardTaskStatus = 'backlog' | 'queued' | 'running' | 'completed' | '
|
|
|
867
1107
|
export interface TaskComment {
|
|
868
1108
|
id: string
|
|
869
1109
|
author: string // agent name or 'user'
|
|
870
|
-
agentId?: string // if from an
|
|
1110
|
+
agentId?: string // if from an agent
|
|
871
1111
|
text: string
|
|
872
1112
|
createdAt: number
|
|
873
1113
|
}
|
|
@@ -937,6 +1177,9 @@ export interface MessageSource {
|
|
|
937
1177
|
channelId?: string
|
|
938
1178
|
senderId?: string
|
|
939
1179
|
senderName?: string
|
|
1180
|
+
messageId?: string
|
|
1181
|
+
replyToMessageId?: string
|
|
1182
|
+
threadId?: string
|
|
940
1183
|
}
|
|
941
1184
|
|
|
942
1185
|
export interface Connector {
|