@swarmclawai/swarmclaw 0.7.2 → 0.7.4
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 +116 -50
- package/bin/package-manager.js +157 -0
- package/bin/package-manager.test.js +90 -0
- package/bin/server-cmd.js +38 -7
- package/bin/swarmclaw.js +54 -4
- package/bin/update-cmd.js +48 -10
- package/bin/update-cmd.test.js +55 -0
- package/package.json +8 -3
- package/scripts/postinstall.mjs +26 -0
- package/src/app/api/agents/[id]/route.ts +43 -0
- package/src/app/api/agents/[id]/thread/route.ts +39 -8
- package/src/app/api/agents/route.ts +35 -2
- package/src/app/api/auth/route.ts +77 -8
- package/src/app/api/chatrooms/[id]/chat/route.ts +22 -6
- package/src/app/api/chatrooms/[id]/pins/route.ts +2 -1
- package/src/app/api/chatrooms/[id]/reactions/route.ts +2 -1
- package/src/app/api/chatrooms/[id]/route.ts +6 -0
- 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]/messages/route.ts +19 -13
- package/src/app/api/chats/[id]/route.ts +30 -0
- package/src/app/api/chats/[id]/stop/route.ts +6 -1
- package/src/app/api/chats/heartbeat/route.ts +2 -1
- package/src/app/api/chats/route.ts +23 -1
- 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/external-agents/[id]/heartbeat/route.ts +33 -0
- package/src/app/api/external-agents/[id]/route.ts +31 -0
- package/src/app/api/external-agents/register/route.ts +3 -0
- package/src/app/api/external-agents/route.ts +66 -0
- package/src/app/api/files/open/route.ts +16 -14
- package/src/app/api/gateways/[id]/health/route.ts +28 -0
- package/src/app/api/gateways/[id]/route.ts +79 -0
- package/src/app/api/gateways/route.ts +57 -0
- 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/gateway/route.ts +10 -7
- package/src/app/api/openclaw/skills/route.ts +12 -4
- 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/providers/[id]/discover-models/route.ts +27 -0
- package/src/app/api/schedules/[id]/route.ts +38 -9
- package/src/app/api/schedules/route.ts +51 -28
- package/src/app/api/settings/route.ts +55 -17
- package/src/app/api/setup/doctor/route.ts +6 -4
- package/src/app/api/tasks/[id]/route.ts +16 -6
- package/src/app/api/tasks/bulk/route.ts +3 -3
- package/src/app/api/tasks/route.ts +9 -4
- package/src/app/api/webhooks/[id]/route.ts +8 -1
- package/src/app/page.tsx +135 -17
- package/src/cli/binary.test.js +142 -0
- package/src/cli/index.js +38 -11
- package/src/cli/index.test.js +195 -0
- package/src/cli/index.ts +21 -12
- package/src/cli/server-cmd.test.js +59 -0
- package/src/cli/spec.js +20 -2
- 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 +456 -23
- package/src/components/agents/inspector-panel.tsx +110 -49
- package/src/components/agents/sandbox-env-panel.tsx +4 -1
- package/src/components/auth/access-key-gate.tsx +36 -97
- package/src/components/auth/setup-wizard.tsx +970 -275
- package/src/components/chat/chat-area.tsx +70 -27
- package/src/components/chat/chat-card.tsx +6 -21
- package/src/components/chat/chat-header.tsx +263 -366
- package/src/components/chat/chat-list.tsx +62 -26
- package/src/components/chat/checkpoint-timeline.tsx +1 -1
- package/src/components/chat/message-list.tsx +145 -19
- package/src/components/chatrooms/chatroom-input.tsx +96 -33
- package/src/components/chatrooms/chatroom-list.tsx +141 -72
- package/src/components/chatrooms/chatroom-message.tsx +7 -6
- package/src/components/chatrooms/chatroom-sheet.tsx +13 -1
- package/src/components/chatrooms/chatroom-tool-request-banner.tsx +5 -2
- package/src/components/chatrooms/chatroom-view.tsx +422 -209
- package/src/components/chatrooms/reaction-picker.tsx +38 -33
- package/src/components/connectors/connector-list.tsx +265 -127
- package/src/components/connectors/connector-sheet.tsx +217 -0
- package/src/components/gateways/gateway-sheet.tsx +567 -0
- package/src/components/home/home-view.tsx +128 -4
- package/src/components/input/chat-input.tsx +135 -86
- package/src/components/layout/app-layout.tsx +385 -194
- package/src/components/layout/mobile-header.tsx +26 -8
- package/src/components/memory/memory-browser.tsx +71 -6
- package/src/components/memory/memory-card.tsx +18 -0
- package/src/components/memory/memory-detail.tsx +58 -31
- package/src/components/memory/memory-sheet.tsx +32 -4
- 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 +189 -1
- package/src/components/providers/provider-list.tsx +158 -2
- package/src/components/providers/provider-sheet.tsx +81 -70
- package/src/components/shared/agent-picker-list.tsx +2 -2
- package/src/components/shared/bottom-sheet.tsx +31 -15
- package/src/components/shared/command-palette.tsx +111 -24
- package/src/components/shared/confirm-dialog.tsx +45 -30
- package/src/components/shared/model-combobox.tsx +90 -8
- 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 +88 -6
- package/src/components/shared/settings/section-orchestrator.tsx +6 -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 +248 -47
- package/src/components/tasks/approvals-panel.tsx +211 -18
- package/src/components/tasks/task-board.tsx +242 -46
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/usage/metrics-dashboard.tsx +74 -1
- package/src/components/wallets/wallet-approval-dialog.tsx +59 -54
- 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/heartbeat-defaults.ts +48 -0
- package/src/lib/memory-presentation.ts +59 -0
- package/src/lib/openclaw-agent-id.test.ts +14 -0
- package/src/lib/openclaw-agent-id.ts +31 -0
- package/src/lib/provider-model-discovery-client.ts +29 -0
- package/src/lib/providers/index.ts +12 -5
- package/src/lib/runtime-loop.ts +105 -3
- package/src/lib/safe-storage.ts +6 -1
- package/src/lib/server/agent-assignment.test.ts +112 -0
- package/src/lib/server/agent-assignment.ts +169 -0
- package/src/lib/server/agent-runtime-config.test.ts +141 -0
- package/src/lib/server/agent-runtime-config.ts +277 -0
- package/src/lib/server/approval-connector-notify.test.ts +253 -0
- package/src/lib/server/approvals-auto-approve.test.ts +264 -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 +44 -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 +219 -0
- package/src/lib/server/chat-execution.ts +402 -125
- 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 +74 -2
- package/src/lib/server/chatroom-helpers.ts +144 -11
- package/src/lib/server/chatroom-session-persistence.test.ts +87 -0
- 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 +994 -130
- 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 +189 -10
- 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 +62 -3
- 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/eval/agent-regression.test.ts +47 -0
- package/src/lib/server/eval/agent-regression.ts +1742 -0
- package/src/lib/server/eval/runner.ts +11 -1
- package/src/lib/server/eval/store.ts +2 -1
- package/src/lib/server/heartbeat-service.ts +23 -43
- 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 +31 -964
- 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 +6 -5
- package/src/lib/server/openclaw-gateway.ts +123 -36
- 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 +18 -8
- package/src/lib/server/orchestrator.ts +5 -4
- package/src/lib/server/playwright-proxy.mjs +27 -3
- package/src/lib/server/plugins.test.ts +215 -0
- package/src/lib/server/plugins.ts +832 -69
- package/src/lib/server/provider-health.ts +33 -3
- package/src/lib/server/provider-model-discovery.ts +481 -0
- package/src/lib/server/queue.ts +4 -21
- package/src/lib/server/runtime-settings.test.ts +119 -0
- package/src/lib/server/runtime-settings.ts +12 -92
- package/src/lib/server/schedule-normalization.ts +187 -0
- 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 +128 -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 +96 -34
- 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-approvals.test.ts +170 -0
- package/src/lib/server/session-tools/discovery.ts +40 -12
- 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 +98 -0
- package/src/lib/server/session-tools/file-send.test.ts +84 -1
- package/src/lib/server/session-tools/file.ts +243 -24
- package/src/lib/server/session-tools/http.ts +9 -3
- 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 +87 -2
- package/src/lib/server/session-tools/mailbox.ts +276 -0
- package/src/lib/server/session-tools/manage-schedules.test.ts +137 -0
- package/src/lib/server/session-tools/memory.ts +35 -3
- package/src/lib/server/session-tools/monitor.ts +162 -12
- package/src/lib/server/session-tools/normalize-tool-args.ts +17 -14
- package/src/lib/server/session-tools/openclaw-nodes.test.ts +111 -0
- package/src/lib/server/session-tools/openclaw-nodes.ts +86 -20
- 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 +95 -25
- 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/sandbox.ts +51 -92
- package/src/lib/server/session-tools/schedule.ts +20 -10
- package/src/lib/server/session-tools/session-info.ts +58 -4
- package/src/lib/server/session-tools/session-tools-wiring.test.ts +54 -17
- package/src/lib/server/session-tools/shell.ts +2 -2
- package/src/lib/server/session-tools/subagent.ts +195 -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 +947 -108
- package/src/lib/server/storage.ts +255 -10
- package/src/lib/server/stream-agent-chat.test.ts +61 -0
- package/src/lib/server/stream-agent-chat.ts +185 -25
- 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 -11
- package/src/lib/server/tool-aliases.ts +80 -12
- package/src/lib/server/tool-capability-policy.ts +7 -1
- 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/setup-defaults.ts +352 -11
- package/src/lib/tool-definitions.ts +3 -4
- package/src/lib/validation/schemas.test.ts +26 -0
- package/src/lib/validation/schemas.ts +62 -1
- package/src/lib/ws-client.ts +14 -12
- package/src/proxy.ts +5 -5
- package/src/stores/use-app-store.ts +43 -7
- package/src/stores/use-chat-store.ts +31 -2
- package/src/stores/use-chatroom-store.ts +153 -26
- package/src/types/index.ts +470 -44
- package/src/app/api/chats/[id]/main-loop/route.ts +0 -94
- 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 {
|
|
@@ -31,12 +52,26 @@ export interface ProviderInfo {
|
|
|
31
52
|
name: string
|
|
32
53
|
models: string[]
|
|
33
54
|
defaultModels?: string[]
|
|
55
|
+
supportsModelDiscovery?: boolean
|
|
34
56
|
requiresApiKey: boolean
|
|
35
57
|
optionalApiKey?: boolean
|
|
36
58
|
requiresEndpoint: boolean
|
|
37
59
|
defaultEndpoint?: string
|
|
38
60
|
}
|
|
39
61
|
|
|
62
|
+
export interface ProviderModelDiscoveryResult {
|
|
63
|
+
ok: boolean
|
|
64
|
+
providerId: string
|
|
65
|
+
providerName?: string
|
|
66
|
+
models: string[]
|
|
67
|
+
cached: boolean
|
|
68
|
+
fetchedAt: number
|
|
69
|
+
cacheTtlMs: number
|
|
70
|
+
supportsDiscovery: boolean
|
|
71
|
+
missingCredential?: boolean
|
|
72
|
+
message?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
40
75
|
export interface Credential {
|
|
41
76
|
id: string
|
|
42
77
|
provider: string
|
|
@@ -49,6 +84,7 @@ export type Credentials = Record<string, Credential>
|
|
|
49
84
|
export interface Session {
|
|
50
85
|
id: string
|
|
51
86
|
name: string
|
|
87
|
+
shortcutForAgentId?: string | null
|
|
52
88
|
cwd: string
|
|
53
89
|
user: string
|
|
54
90
|
provider: ProviderType
|
|
@@ -56,6 +92,7 @@ export interface Session {
|
|
|
56
92
|
credentialId?: string | null
|
|
57
93
|
fallbackCredentialIds?: string[]
|
|
58
94
|
apiEndpoint?: string | null
|
|
95
|
+
gatewayProfileId?: string | null
|
|
59
96
|
claudeSessionId: string | null
|
|
60
97
|
codexThreadId?: string | null
|
|
61
98
|
opencodeSessionId?: string | null
|
|
@@ -78,47 +115,55 @@ export interface Session {
|
|
|
78
115
|
heartbeatEnabled?: boolean | null
|
|
79
116
|
heartbeatIntervalSec?: number | null
|
|
80
117
|
heartbeatTarget?: 'last' | 'none' | string | null
|
|
118
|
+
sessionResetMode?: SessionResetMode | null
|
|
119
|
+
sessionIdleTimeoutSec?: number | null
|
|
120
|
+
sessionMaxAgeSec?: number | null
|
|
121
|
+
sessionDailyResetAt?: string | null
|
|
122
|
+
sessionResetTimezone?: string | null
|
|
123
|
+
thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high' | null
|
|
124
|
+
browserProfileId?: string | null
|
|
125
|
+
connectorThinkLevel?: 'minimal' | 'low' | 'medium' | 'high' | null
|
|
126
|
+
connectorSessionScope?: 'main' | 'channel' | 'peer' | 'channel-peer' | 'thread' | null
|
|
127
|
+
connectorReplyMode?: 'off' | 'first' | 'all' | null
|
|
128
|
+
connectorThreadBinding?: 'off' | 'prefer' | 'strict' | null
|
|
129
|
+
connectorGroupPolicy?: 'open' | 'mention' | 'reply-or-mention' | 'disabled' | null
|
|
130
|
+
connectorIdleTimeoutSec?: number | null
|
|
131
|
+
connectorMaxAgeSec?: number | null
|
|
132
|
+
mailbox?: MailboxEnvelope[] | null
|
|
133
|
+
connectorContext?: {
|
|
134
|
+
connectorId?: string | null
|
|
135
|
+
platform?: ConnectorPlatform | null
|
|
136
|
+
channelId?: string | null
|
|
137
|
+
senderId?: string | null
|
|
138
|
+
senderName?: string | null
|
|
139
|
+
sessionKey?: string | null
|
|
140
|
+
peerKey?: string | null
|
|
141
|
+
scope?: 'main' | 'channel' | 'peer' | 'channel-peer' | 'thread' | null
|
|
142
|
+
replyMode?: 'off' | 'first' | 'all' | null
|
|
143
|
+
threadBinding?: 'off' | 'prefer' | 'strict' | null
|
|
144
|
+
groupPolicy?: 'open' | 'mention' | 'reply-or-mention' | 'disabled' | null
|
|
145
|
+
threadId?: string | null
|
|
146
|
+
threadTitle?: string | null
|
|
147
|
+
threadPersonaLabel?: string | null
|
|
148
|
+
threadParentChannelId?: string | null
|
|
149
|
+
threadParentChannelName?: string | null
|
|
150
|
+
isGroup?: boolean
|
|
151
|
+
lastInboundAt?: number | null
|
|
152
|
+
lastInboundMessageId?: string | null
|
|
153
|
+
lastInboundReplyToMessageId?: string | null
|
|
154
|
+
lastInboundThreadId?: string | null
|
|
155
|
+
lastOutboundAt?: number | null
|
|
156
|
+
lastOutboundMessageId?: string | null
|
|
157
|
+
lastResetAt?: number | null
|
|
158
|
+
lastResetReason?: string | null
|
|
159
|
+
}
|
|
81
160
|
lastAutoMemoryAt?: number | null
|
|
82
161
|
lastHeartbeatText?: string | null
|
|
83
162
|
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
|
-
}
|
|
163
|
+
lastSessionResetAt?: number | null
|
|
164
|
+
lastSessionResetReason?: string | null
|
|
165
|
+
identityState?: IdentityContinuityState | null
|
|
166
|
+
sessionArchiveState?: SessionArchiveState | null
|
|
122
167
|
pinned?: boolean
|
|
123
168
|
file?: string | null
|
|
124
169
|
queuedCount?: number
|
|
@@ -148,10 +193,16 @@ export type SessionTool =
|
|
|
148
193
|
| 'canvas'
|
|
149
194
|
| 'http_request'
|
|
150
195
|
| 'git'
|
|
196
|
+
| 'mailbox'
|
|
197
|
+
| 'ask_human'
|
|
198
|
+
| 'document'
|
|
199
|
+
| 'extract'
|
|
200
|
+
| 'table'
|
|
201
|
+
| 'crawl'
|
|
151
202
|
|
|
152
203
|
// --- Approvals ---
|
|
153
204
|
|
|
154
|
-
export type ApprovalCategory = 'tool_access' | 'wallet_transfer' | 'plugin_scaffold' | 'plugin_install' | 'task_tool'
|
|
205
|
+
export type ApprovalCategory = 'tool_access' | 'wallet_transfer' | 'plugin_scaffold' | 'plugin_install' | 'task_tool' | 'human_loop'
|
|
155
206
|
|
|
156
207
|
export interface ApprovalRequest {
|
|
157
208
|
id: string
|
|
@@ -165,10 +216,36 @@ export interface ApprovalRequest {
|
|
|
165
216
|
createdAt: number
|
|
166
217
|
updatedAt: number
|
|
167
218
|
status: 'pending' | 'approved' | 'rejected'
|
|
219
|
+
connectorNotification?: {
|
|
220
|
+
attemptedAt?: number | null
|
|
221
|
+
sentAt?: number | null
|
|
222
|
+
connectorId?: string | null
|
|
223
|
+
channelId?: string | null
|
|
224
|
+
threadId?: string | null
|
|
225
|
+
messageId?: string | null
|
|
226
|
+
lastError?: string | null
|
|
227
|
+
} | null
|
|
168
228
|
}
|
|
169
229
|
|
|
170
230
|
export type Approvals = Record<string, ApprovalRequest>
|
|
171
231
|
|
|
232
|
+
export type MailboxStatus = 'new' | 'ack'
|
|
233
|
+
|
|
234
|
+
export interface MailboxEnvelope {
|
|
235
|
+
id: string
|
|
236
|
+
type: string
|
|
237
|
+
payload: string
|
|
238
|
+
fromSessionId?: string | null
|
|
239
|
+
fromAgentId?: string | null
|
|
240
|
+
toSessionId: string
|
|
241
|
+
toAgentId?: string | null
|
|
242
|
+
correlationId?: string | null
|
|
243
|
+
status: MailboxStatus
|
|
244
|
+
createdAt: number
|
|
245
|
+
expiresAt?: number | null
|
|
246
|
+
ackAt?: number | null
|
|
247
|
+
}
|
|
248
|
+
|
|
172
249
|
export interface PluginInvocationRecord {
|
|
173
250
|
pluginId: string
|
|
174
251
|
toolName: string
|
|
@@ -307,6 +384,8 @@ export interface Plugin {
|
|
|
307
384
|
name: string
|
|
308
385
|
version?: string
|
|
309
386
|
description?: string
|
|
387
|
+
author?: string
|
|
388
|
+
openclaw?: boolean
|
|
310
389
|
enabledByDefault?: boolean
|
|
311
390
|
hooks?: PluginHooks
|
|
312
391
|
tools?: PluginToolDef[]
|
|
@@ -320,6 +399,7 @@ export interface PluginMeta {
|
|
|
320
399
|
description?: string
|
|
321
400
|
filename: string
|
|
322
401
|
enabled: boolean
|
|
402
|
+
isBuiltin?: boolean
|
|
323
403
|
author?: string
|
|
324
404
|
version?: string
|
|
325
405
|
source?: 'local' | 'marketplace'
|
|
@@ -336,7 +416,18 @@ export interface PluginMeta {
|
|
|
336
416
|
connectorCount?: number
|
|
337
417
|
createdByAgentId?: string | null
|
|
338
418
|
settingsFields?: PluginSettingsField[]
|
|
419
|
+
hasDependencyManifest?: boolean
|
|
420
|
+
dependencyCount?: number
|
|
421
|
+
devDependencyCount?: number
|
|
422
|
+
packageManager?: PluginPackageManager
|
|
423
|
+
dependencyInstallStatus?: PluginDependencyInstallStatus
|
|
424
|
+
dependencyInstallError?: string
|
|
425
|
+
dependencyInstalledAt?: number
|
|
339
426
|
}
|
|
427
|
+
|
|
428
|
+
export type PluginPackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun'
|
|
429
|
+
export type PluginDependencyInstallStatus = 'none' | 'ready' | 'installing' | 'installed' | 'error'
|
|
430
|
+
|
|
340
431
|
export interface MarketplacePlugin {
|
|
341
432
|
id: string
|
|
342
433
|
name: string
|
|
@@ -394,6 +485,7 @@ export interface Agent {
|
|
|
394
485
|
name: string
|
|
395
486
|
description: string
|
|
396
487
|
soul?: string
|
|
488
|
+
identityState?: IdentityContinuityState | null
|
|
397
489
|
emoji?: string
|
|
398
490
|
creature?: string
|
|
399
491
|
vibe?: string
|
|
@@ -405,6 +497,9 @@ export interface Agent {
|
|
|
405
497
|
credentialId?: string | null
|
|
406
498
|
fallbackCredentialIds?: string[]
|
|
407
499
|
apiEndpoint?: string | null
|
|
500
|
+
gatewayProfileId?: string | null
|
|
501
|
+
routingStrategy?: AgentRoutingStrategy | null
|
|
502
|
+
routingTargets?: AgentRoutingTarget[]
|
|
408
503
|
isOrchestrator?: boolean
|
|
409
504
|
subAgentIds?: string[]
|
|
410
505
|
plugins?: string[] // e.g. ['browser', 'memory'] — enabled plugin IDs
|
|
@@ -415,7 +510,7 @@ export interface Agent {
|
|
|
415
510
|
mcpServerIds?: string[] // IDs of configured MCP servers to inject tools from
|
|
416
511
|
mcpDisabledTools?: string[] // MCP tool names disabled for this agent (denylist)
|
|
417
512
|
capabilities?: string[] // e.g. ['frontend', 'screenshots', 'research', 'devops']
|
|
418
|
-
threadSessionId?: string | null // persistent chat
|
|
513
|
+
threadSessionId?: string | null // persistent shortcut chat session for agent-centric UI
|
|
419
514
|
platformAssignScope?: 'self' | 'all' // defaults to 'self'
|
|
420
515
|
heartbeatEnabled?: boolean
|
|
421
516
|
heartbeatIntervalSec?: number | null
|
|
@@ -428,7 +523,14 @@ export interface Agent {
|
|
|
428
523
|
heartbeatTarget?: 'last' | 'none' | string | null
|
|
429
524
|
heartbeatGoal?: string | null
|
|
430
525
|
heartbeatNextAction?: string | null
|
|
526
|
+
sessionResetMode?: SessionResetMode | null
|
|
527
|
+
sessionIdleTimeoutSec?: number | null
|
|
528
|
+
sessionMaxAgeSec?: number | null
|
|
529
|
+
sessionDailyResetAt?: string | null
|
|
530
|
+
sessionResetTimezone?: string | null
|
|
431
531
|
thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high'
|
|
532
|
+
memoryScopeMode?: 'auto' | 'all' | 'global' | 'agent' | 'session' | 'project' | null
|
|
533
|
+
memoryTierPreference?: 'working' | 'durable' | 'archive' | 'blended' | null
|
|
432
534
|
elevenLabsVoiceId?: string | null
|
|
433
535
|
projectId?: string
|
|
434
536
|
avatarSeed?: string
|
|
@@ -521,6 +623,11 @@ export interface Schedule {
|
|
|
521
623
|
projectId?: string
|
|
522
624
|
taskPrompt: string
|
|
523
625
|
scheduleType: ScheduleType
|
|
626
|
+
action?: string
|
|
627
|
+
path?: string
|
|
628
|
+
command?: string
|
|
629
|
+
description?: string
|
|
630
|
+
frequency?: string
|
|
524
631
|
cron?: string
|
|
525
632
|
intervalMs?: number
|
|
526
633
|
runAt?: number
|
|
@@ -529,9 +636,158 @@ export interface Schedule {
|
|
|
529
636
|
status: ScheduleStatus
|
|
530
637
|
linkedTaskId?: string | null
|
|
531
638
|
runNumber?: number
|
|
639
|
+
createdByAgentId?: string | null
|
|
640
|
+
createdInSessionId?: string | null
|
|
641
|
+
createdAt: number
|
|
642
|
+
updatedAt?: number
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export type BrowserSessionStatus = 'active' | 'idle' | 'closed' | 'error'
|
|
646
|
+
|
|
647
|
+
export interface BrowserSessionTab {
|
|
648
|
+
index: number
|
|
649
|
+
title?: string | null
|
|
650
|
+
url?: string | null
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export interface BrowserSessionArtifact {
|
|
654
|
+
kind: 'snapshot' | 'screenshot' | 'download' | 'pdf'
|
|
655
|
+
path: string
|
|
656
|
+
url?: string | null
|
|
657
|
+
filename?: string | null
|
|
532
658
|
createdAt: number
|
|
533
659
|
}
|
|
534
660
|
|
|
661
|
+
export interface BrowserObservationLink {
|
|
662
|
+
text: string
|
|
663
|
+
href: string
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export interface BrowserObservationFormField {
|
|
667
|
+
name?: string | null
|
|
668
|
+
label?: string | null
|
|
669
|
+
type: string
|
|
670
|
+
required?: boolean
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export interface BrowserObservationForm {
|
|
674
|
+
index: number
|
|
675
|
+
action?: string | null
|
|
676
|
+
method?: string | null
|
|
677
|
+
fields: BrowserObservationFormField[]
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface BrowserObservationTable {
|
|
681
|
+
index: number
|
|
682
|
+
headers: string[]
|
|
683
|
+
rowCount: number
|
|
684
|
+
rows?: string[][]
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export interface BrowserObservation {
|
|
688
|
+
capturedAt: number
|
|
689
|
+
url?: string | null
|
|
690
|
+
title?: string | null
|
|
691
|
+
textPreview?: string | null
|
|
692
|
+
activeTabIndex?: number | null
|
|
693
|
+
tabs?: BrowserSessionTab[]
|
|
694
|
+
links?: BrowserObservationLink[]
|
|
695
|
+
forms?: BrowserObservationForm[]
|
|
696
|
+
tables?: BrowserObservationTable[]
|
|
697
|
+
errors?: string[]
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export interface BrowserSessionRecord {
|
|
701
|
+
id: string
|
|
702
|
+
sessionId: string
|
|
703
|
+
profileId: string
|
|
704
|
+
profileDir: string
|
|
705
|
+
status: BrowserSessionStatus
|
|
706
|
+
inheritedFromSessionId?: string | null
|
|
707
|
+
currentUrl?: string | null
|
|
708
|
+
pageTitle?: string | null
|
|
709
|
+
activeTabIndex?: number | null
|
|
710
|
+
tabs?: BrowserSessionTab[]
|
|
711
|
+
lastAction?: string | null
|
|
712
|
+
lastError?: string | null
|
|
713
|
+
lastObservation?: BrowserObservation | null
|
|
714
|
+
artifacts?: BrowserSessionArtifact[]
|
|
715
|
+
createdAt: number
|
|
716
|
+
updatedAt: number
|
|
717
|
+
lastUsedAt: number
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export type WatchJobType = 'time' | 'http' | 'file' | 'task' | 'webhook' | 'page' | 'email' | 'mailbox' | 'approval'
|
|
721
|
+
export type WatchJobStatus = 'active' | 'triggered' | 'failed' | 'cancelled'
|
|
722
|
+
|
|
723
|
+
export interface WatchJob {
|
|
724
|
+
id: string
|
|
725
|
+
type: WatchJobType
|
|
726
|
+
status: WatchJobStatus
|
|
727
|
+
description?: string | null
|
|
728
|
+
sessionId?: string | null
|
|
729
|
+
agentId?: string | null
|
|
730
|
+
createdByAgentId?: string | null
|
|
731
|
+
browserProfileId?: string | null
|
|
732
|
+
resumeMessage: string
|
|
733
|
+
target: Record<string, unknown>
|
|
734
|
+
condition: Record<string, unknown>
|
|
735
|
+
runAt?: number | null
|
|
736
|
+
nextCheckAt?: number | null
|
|
737
|
+
intervalMs?: number | null
|
|
738
|
+
timeoutAt?: number | null
|
|
739
|
+
lastCheckedAt?: number | null
|
|
740
|
+
lastTriggeredAt?: number | null
|
|
741
|
+
lastError?: string | null
|
|
742
|
+
result?: Record<string, unknown> | null
|
|
743
|
+
createdAt: number
|
|
744
|
+
updatedAt: number
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export type DelegationJobKind = 'subagent' | 'delegate'
|
|
748
|
+
export type DelegationJobStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled'
|
|
749
|
+
|
|
750
|
+
export interface DelegationJobCheckpoint {
|
|
751
|
+
at: number
|
|
752
|
+
note: string
|
|
753
|
+
status?: DelegationJobStatus
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export interface DelegationJobArtifact {
|
|
757
|
+
type: 'text' | 'file' | 'image' | 'link'
|
|
758
|
+
value: string
|
|
759
|
+
label?: string | null
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export interface DelegationJobRecord {
|
|
763
|
+
id: string
|
|
764
|
+
kind: DelegationJobKind
|
|
765
|
+
status: DelegationJobStatus
|
|
766
|
+
backend?: 'claude' | 'codex' | 'opencode' | 'gemini' | null
|
|
767
|
+
parentSessionId?: string | null
|
|
768
|
+
childSessionId?: string | null
|
|
769
|
+
agentId?: string | null
|
|
770
|
+
agentName?: string | null
|
|
771
|
+
cwd?: string | null
|
|
772
|
+
task: string
|
|
773
|
+
result?: string | null
|
|
774
|
+
resultPreview?: string | null
|
|
775
|
+
error?: string | null
|
|
776
|
+
checkpoints?: DelegationJobCheckpoint[]
|
|
777
|
+
artifacts?: DelegationJobArtifact[]
|
|
778
|
+
resumeId?: string | null
|
|
779
|
+
resumeIds?: {
|
|
780
|
+
claudeCode?: string | null
|
|
781
|
+
codex?: string | null
|
|
782
|
+
opencode?: string | null
|
|
783
|
+
gemini?: string | null
|
|
784
|
+
}
|
|
785
|
+
createdAt: number
|
|
786
|
+
updatedAt: number
|
|
787
|
+
startedAt?: number | null
|
|
788
|
+
completedAt?: number | null
|
|
789
|
+
}
|
|
790
|
+
|
|
535
791
|
export interface FileReference {
|
|
536
792
|
path: string
|
|
537
793
|
contextSnippet?: string
|
|
@@ -584,7 +840,7 @@ export interface MemoryEntry {
|
|
|
584
840
|
updatedAt: number
|
|
585
841
|
}
|
|
586
842
|
|
|
587
|
-
export type SessionType = 'human'
|
|
843
|
+
export type SessionType = 'human'
|
|
588
844
|
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
845
|
|
|
590
846
|
// --- Chatrooms ---
|
|
@@ -766,10 +1022,13 @@ export interface AppSettings {
|
|
|
766
1022
|
userAvatarSeed?: string
|
|
767
1023
|
elevenLabsEnabled?: boolean
|
|
768
1024
|
elevenLabsApiKey?: string | null
|
|
1025
|
+
elevenLabsApiKeyConfigured?: boolean
|
|
769
1026
|
elevenLabsVoiceId?: string | null
|
|
770
1027
|
speechRecognitionLang?: string | null
|
|
771
1028
|
tavilyApiKey?: string | null
|
|
1029
|
+
tavilyApiKeyConfigured?: boolean
|
|
772
1030
|
braveApiKey?: string | null
|
|
1031
|
+
braveApiKeyConfigured?: boolean
|
|
773
1032
|
heartbeatPrompt?: string | null
|
|
774
1033
|
heartbeatIntervalSec?: number | null
|
|
775
1034
|
heartbeatInterval?: string | number | null
|
|
@@ -781,12 +1040,21 @@ export interface AppSettings {
|
|
|
781
1040
|
heartbeatActiveStart?: string | null
|
|
782
1041
|
heartbeatActiveEnd?: string | null
|
|
783
1042
|
heartbeatTimezone?: string | null
|
|
1043
|
+
sessionResetMode?: SessionResetMode | null
|
|
1044
|
+
sessionIdleTimeoutSec?: number | null
|
|
1045
|
+
sessionMaxAgeSec?: number | null
|
|
1046
|
+
sessionDailyResetAt?: string | null
|
|
1047
|
+
sessionResetTimezone?: string | null
|
|
784
1048
|
// Task resiliency and supervision
|
|
785
1049
|
defaultTaskMaxAttempts?: number
|
|
786
1050
|
taskRetryBackoffSec?: number
|
|
787
1051
|
taskStallTimeoutMin?: number
|
|
788
1052
|
// Safety rails
|
|
1053
|
+
approvalsEnabled?: boolean
|
|
789
1054
|
safetyRequireApprovalForOutbound?: boolean
|
|
1055
|
+
approvalAutoApproveCategories?: ApprovalCategory[]
|
|
1056
|
+
approvalConnectorNotifyEnabled?: boolean
|
|
1057
|
+
approvalConnectorNotifyDelaySec?: number | null
|
|
790
1058
|
safetyMaxDailySpendUsd?: number | null
|
|
791
1059
|
safetyBlockedTools?: string[]
|
|
792
1060
|
capabilityPolicyMode?: 'permissive' | 'balanced' | 'strict'
|
|
@@ -847,7 +1115,7 @@ export interface AppSettings {
|
|
|
847
1115
|
pluginSettings?: Record<string, Record<string, unknown>>
|
|
848
1116
|
}
|
|
849
1117
|
|
|
850
|
-
// ---
|
|
1118
|
+
// --- Agent Secrets ---
|
|
851
1119
|
|
|
852
1120
|
export interface OrchestratorSecret {
|
|
853
1121
|
id: string
|
|
@@ -855,7 +1123,7 @@ export interface OrchestratorSecret {
|
|
|
855
1123
|
service: string // e.g. 'gmail', 'ahrefs', 'custom'
|
|
856
1124
|
encryptedValue: string
|
|
857
1125
|
scope: 'global' | 'agent'
|
|
858
|
-
agentIds: string[] // if scope === 'agent', which
|
|
1126
|
+
agentIds: string[] // if scope === 'agent', which agents can use it
|
|
859
1127
|
createdAt: number
|
|
860
1128
|
updatedAt: number
|
|
861
1129
|
}
|
|
@@ -867,7 +1135,7 @@ export type BoardTaskStatus = 'backlog' | 'queued' | 'running' | 'completed' | '
|
|
|
867
1135
|
export interface TaskComment {
|
|
868
1136
|
id: string
|
|
869
1137
|
author: string // agent name or 'user'
|
|
870
|
-
agentId?: string // if from an
|
|
1138
|
+
agentId?: string // if from an agent
|
|
871
1139
|
text: string
|
|
872
1140
|
createdAt: number
|
|
873
1141
|
}
|
|
@@ -896,6 +1164,161 @@ export interface ProviderConfig {
|
|
|
896
1164
|
updatedAt: number
|
|
897
1165
|
}
|
|
898
1166
|
|
|
1167
|
+
// --- Gateways ---
|
|
1168
|
+
|
|
1169
|
+
export type GatewayProvider = 'openclaw'
|
|
1170
|
+
export type GatewayHealthState = 'unknown' | 'healthy' | 'degraded' | 'offline' | 'pending'
|
|
1171
|
+
|
|
1172
|
+
export interface GatewayProfile {
|
|
1173
|
+
id: string
|
|
1174
|
+
name: string
|
|
1175
|
+
provider: GatewayProvider
|
|
1176
|
+
endpoint: string
|
|
1177
|
+
wsUrl?: string | null
|
|
1178
|
+
credentialId?: string | null
|
|
1179
|
+
status: GatewayHealthState
|
|
1180
|
+
notes?: string | null
|
|
1181
|
+
tags?: string[]
|
|
1182
|
+
lastError?: string | null
|
|
1183
|
+
lastCheckedAt?: number | null
|
|
1184
|
+
lastModelCount?: number | null
|
|
1185
|
+
discoveredHost?: string | null
|
|
1186
|
+
discoveredPort?: number | null
|
|
1187
|
+
isDefault?: boolean
|
|
1188
|
+
createdAt: number
|
|
1189
|
+
updatedAt: number
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
export interface OpenClawNode {
|
|
1193
|
+
nodeId: string
|
|
1194
|
+
displayName?: string
|
|
1195
|
+
platform?: string
|
|
1196
|
+
version?: string
|
|
1197
|
+
coreVersion?: string
|
|
1198
|
+
uiVersion?: string
|
|
1199
|
+
deviceFamily?: string
|
|
1200
|
+
modelIdentifier?: string
|
|
1201
|
+
remoteIp?: string
|
|
1202
|
+
caps?: string[]
|
|
1203
|
+
commands?: string[]
|
|
1204
|
+
pathEnv?: string[]
|
|
1205
|
+
permissions?: string[]
|
|
1206
|
+
connectedAtMs?: number
|
|
1207
|
+
paired?: boolean
|
|
1208
|
+
connected?: boolean
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
export interface OpenClawNodePairRequest {
|
|
1212
|
+
requestId: string
|
|
1213
|
+
nodeId?: string
|
|
1214
|
+
displayName?: string
|
|
1215
|
+
platform?: string
|
|
1216
|
+
remoteIp?: string
|
|
1217
|
+
createdAtMs?: number
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export interface OpenClawPairedDevice {
|
|
1221
|
+
deviceId: string
|
|
1222
|
+
displayName?: string
|
|
1223
|
+
role?: string
|
|
1224
|
+
remoteIp?: string
|
|
1225
|
+
platform?: string
|
|
1226
|
+
tokens?: Array<{ role?: string; scopes?: string[]; createdAtMs?: number; rotatedAtMs?: number; revokedAtMs?: number }>
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
export interface OpenClawDevicePairRequest {
|
|
1230
|
+
requestId: string
|
|
1231
|
+
deviceId?: string
|
|
1232
|
+
displayName?: string
|
|
1233
|
+
role?: string
|
|
1234
|
+
platform?: string
|
|
1235
|
+
remoteIp?: string
|
|
1236
|
+
createdAtMs?: number
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
export interface OpenClawPairingSnapshot {
|
|
1240
|
+
pending?: OpenClawDevicePairRequest[]
|
|
1241
|
+
paired?: OpenClawPairedDevice[]
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
// --- Agent Routing / Packs ---
|
|
1245
|
+
|
|
1246
|
+
export type AgentRoutingStrategy = 'single' | 'balanced' | 'economy' | 'premium' | 'reasoning'
|
|
1247
|
+
export type AgentRoutingTargetRole = 'primary' | 'economy' | 'premium' | 'reasoning' | 'backup'
|
|
1248
|
+
|
|
1249
|
+
export interface AgentRoutingTarget {
|
|
1250
|
+
id: string
|
|
1251
|
+
label?: string
|
|
1252
|
+
role?: AgentRoutingTargetRole
|
|
1253
|
+
provider: ProviderType
|
|
1254
|
+
model: string
|
|
1255
|
+
credentialId?: string | null
|
|
1256
|
+
fallbackCredentialIds?: string[]
|
|
1257
|
+
apiEndpoint?: string | null
|
|
1258
|
+
gatewayProfileId?: string | null
|
|
1259
|
+
priority?: number
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export interface AgentPackEntry {
|
|
1263
|
+
id: string
|
|
1264
|
+
name: string
|
|
1265
|
+
description?: string
|
|
1266
|
+
provider: ProviderType
|
|
1267
|
+
model: string
|
|
1268
|
+
credentialId?: string | null
|
|
1269
|
+
fallbackCredentialIds?: string[]
|
|
1270
|
+
apiEndpoint?: string | null
|
|
1271
|
+
gatewayProfileId?: string | null
|
|
1272
|
+
routingStrategy?: AgentRoutingStrategy | null
|
|
1273
|
+
routingTargets?: AgentRoutingTarget[]
|
|
1274
|
+
tools?: string[]
|
|
1275
|
+
plugins?: string[]
|
|
1276
|
+
capabilities?: string[]
|
|
1277
|
+
soul?: string
|
|
1278
|
+
systemPrompt?: string
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
export interface AgentPackManifest {
|
|
1282
|
+
schemaVersion: 1
|
|
1283
|
+
kind: 'swarmclaw-agent-pack'
|
|
1284
|
+
name: string
|
|
1285
|
+
description?: string
|
|
1286
|
+
exportedAt: number
|
|
1287
|
+
recommendedProviders?: ProviderType[]
|
|
1288
|
+
agents: AgentPackEntry[]
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
// --- External Agents ---
|
|
1292
|
+
|
|
1293
|
+
export type ExternalAgentSourceType = 'codex' | 'claude' | 'opencode' | 'openclaw' | 'custom'
|
|
1294
|
+
export type ExternalAgentStatus = 'online' | 'idle' | 'offline' | 'stale'
|
|
1295
|
+
|
|
1296
|
+
export interface ExternalAgentRuntime {
|
|
1297
|
+
id: string
|
|
1298
|
+
name: string
|
|
1299
|
+
sourceType: ExternalAgentSourceType
|
|
1300
|
+
status: ExternalAgentStatus
|
|
1301
|
+
provider?: ProviderType | null
|
|
1302
|
+
model?: string | null
|
|
1303
|
+
workspace?: string | null
|
|
1304
|
+
transport?: 'http' | 'ws' | 'cli' | 'gateway' | 'custom' | null
|
|
1305
|
+
endpoint?: string | null
|
|
1306
|
+
agentId?: string | null
|
|
1307
|
+
gatewayProfileId?: string | null
|
|
1308
|
+
capabilities?: string[]
|
|
1309
|
+
labels?: string[]
|
|
1310
|
+
metadata?: Record<string, unknown> | null
|
|
1311
|
+
tokenStats?: {
|
|
1312
|
+
inputTokens?: number
|
|
1313
|
+
outputTokens?: number
|
|
1314
|
+
totalTokens?: number
|
|
1315
|
+
} | null
|
|
1316
|
+
lastHeartbeatAt?: number | null
|
|
1317
|
+
lastSeenAt?: number | null
|
|
1318
|
+
createdAt: number
|
|
1319
|
+
updatedAt: number
|
|
1320
|
+
}
|
|
1321
|
+
|
|
899
1322
|
// --- Skills ---
|
|
900
1323
|
|
|
901
1324
|
export interface Skill {
|
|
@@ -937,6 +1360,9 @@ export interface MessageSource {
|
|
|
937
1360
|
channelId?: string
|
|
938
1361
|
senderId?: string
|
|
939
1362
|
senderName?: string
|
|
1363
|
+
messageId?: string
|
|
1364
|
+
replyToMessageId?: string
|
|
1365
|
+
threadId?: string
|
|
940
1366
|
}
|
|
941
1367
|
|
|
942
1368
|
export interface Connector {
|