@swarmclawai/swarmclaw 1.2.6 → 1.2.9
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 +54 -23
- package/next.config.ts +1 -0
- package/package.json +4 -3
- package/scripts/easy-setup.mjs +1 -1
- package/scripts/postinstall.mjs +1 -1
- package/skills/swarmclaw.md +115 -0
- package/skills/tools/browser.md +131 -0
- package/skills/tools/execute.md +98 -0
- package/skills/tools/files.md +98 -0
- package/skills/tools/memory.md +104 -0
- package/skills/tools/platform.md +144 -0
- package/skills/tools/skills.md +83 -0
- package/src/app/agents/[id]/page.tsx +1 -18
- package/src/app/api/agents/thread-route.test.ts +0 -1
- package/src/app/api/approvals/route.test.ts +6 -22
- package/src/app/api/chats/[id]/messages/route.ts +23 -19
- package/src/app/api/chats/messages-route.test.ts +105 -51
- package/src/app/api/connectors/route.ts +2 -2
- package/src/app/api/mcp-servers/[id]/test/route.ts +3 -2
- package/src/app/api/openclaw/deploy/route.ts +2 -0
- package/src/app/api/portability/export/route.ts +8 -0
- package/src/app/api/portability/import/route.test.ts +80 -0
- package/src/app/api/portability/import/route.ts +28 -0
- package/src/app/api/settings/route.ts +0 -2
- package/src/app/api/setup/doctor/route.ts +4 -4
- package/src/app/api/wallets/[id]/route.ts +15 -157
- package/src/app/api/wallets/generate/route.ts +22 -0
- package/src/app/api/wallets/route.test.ts +147 -0
- package/src/app/api/wallets/route.ts +13 -95
- package/src/app/autonomy/page.tsx +2 -57
- package/src/app/protocols/page.tsx +2 -21
- package/src/app/settings/page.tsx +0 -9
- package/src/app/wallets/page.tsx +105 -5
- package/src/cli/index.js +21 -33
- package/src/cli/spec.js +19 -30
- package/src/components/agents/agent-chat-list.tsx +23 -1
- package/src/components/agents/agent-sheet.tsx +2 -40
- package/src/components/agents/inspector-panel.tsx +165 -131
- package/src/components/chat/chat-area.tsx +38 -9
- package/src/components/chat/chat-card.tsx +0 -31
- package/src/components/chat/message-bubble.tsx +1 -108
- package/src/components/chat/message-list.tsx +33 -19
- package/src/components/connectors/connector-sheet.tsx +25 -1
- package/src/components/gateways/gateway-sheet.tsx +5 -2
- package/src/components/layout/sidebar-rail.tsx +6 -10
- package/src/components/projects/project-detail.tsx +3 -35
- package/src/components/projects/tabs/overview-tab.tsx +3 -59
- package/src/components/projects/tabs/work-tab.tsx +7 -77
- package/src/components/protocols/structured-session-launcher.tsx +1 -22
- package/src/components/shared/connector-platform-icon.tsx +1 -0
- package/src/components/tasks/task-card.tsx +4 -34
- package/src/components/tasks/task-sheet.tsx +6 -36
- package/src/components/wallets/wallet-list.tsx +150 -0
- package/src/lib/agent-execute-defaults.test.ts +24 -0
- package/src/lib/agent-execute-defaults.ts +62 -0
- package/src/lib/app/navigation.test.ts +0 -13
- package/src/lib/app/navigation.ts +2 -7
- package/src/lib/app/view-constants.ts +14 -19
- package/src/lib/chat/queued-message-queue.test.ts +134 -1
- package/src/lib/chat/queued-message-queue.ts +77 -2
- package/src/lib/server/agents/agent-service.ts +5 -0
- package/src/lib/server/agents/agent-thread-session.ts +0 -1
- package/src/lib/server/agents/delegation-advisory.test.ts +0 -1
- package/src/lib/server/agents/delegation-jobs.test.ts +0 -69
- package/src/lib/server/agents/delegation-jobs.ts +0 -25
- package/src/lib/server/agents/main-agent-loop.ts +1 -49
- package/src/lib/server/agents/subagent-runtime.ts +0 -1
- package/src/lib/server/approval-match.ts +0 -85
- package/src/lib/server/approvals.test.ts +6 -6
- package/src/lib/server/approvals.ts +0 -6
- package/src/lib/server/autonomy/supervisor-reflection.test.ts +0 -1
- package/src/lib/server/builtin-extensions.ts +1 -2
- package/src/lib/server/capability-router.test.ts +0 -2
- package/src/lib/server/chat-execution/chat-execution-advanced.test.ts +1 -1
- package/src/lib/server/chat-execution/chat-execution-tool-events.test.ts +15 -14
- package/src/lib/server/chat-execution/chat-execution-types.ts +0 -2
- package/src/lib/server/chat-execution/chat-execution-utils.ts +2 -4
- package/src/lib/server/chat-execution/chat-streaming-utils.ts +2 -30
- package/src/lib/server/chat-execution/chat-turn-finalization.ts +1 -36
- package/src/lib/server/chat-execution/chat-turn-preparation.ts +81 -64
- package/src/lib/server/chat-execution/chat-turn-stream-execution.ts +4 -0
- package/src/lib/server/chat-execution/continuation-evaluator.ts +8 -0
- package/src/lib/server/chat-execution/iteration-event-handler.ts +0 -24
- package/src/lib/server/chat-execution/memory-mutation-tools.ts +1 -1
- package/src/lib/server/chat-execution/message-classifier.test.ts +0 -45
- package/src/lib/server/chat-execution/message-classifier.ts +11 -16
- package/src/lib/server/chat-execution/prompt-builder.test.ts +27 -0
- package/src/lib/server/chat-execution/prompt-builder.ts +14 -31
- package/src/lib/server/chat-execution/prompt-mode.test.ts +24 -0
- package/src/lib/server/chat-execution/prompt-mode.ts +5 -1
- package/src/lib/server/chat-execution/prompt-sections.ts +0 -1
- package/src/lib/server/chat-execution/situational-awareness.test.ts +2 -73
- package/src/lib/server/chat-execution/situational-awareness.ts +4 -38
- package/src/lib/server/chat-execution/stream-agent-chat.test.ts +13 -126
- package/src/lib/server/chat-execution/stream-agent-chat.ts +46 -21
- package/src/lib/server/chat-execution/stream-continuation.test.ts +4 -52
- package/src/lib/server/chat-execution/stream-continuation.ts +6 -48
- package/src/lib/server/chatrooms/chatroom-routing.test.ts +4 -0
- package/src/lib/server/chatrooms/session-mailbox.ts +0 -10
- package/src/lib/server/chats/chat-session-service.ts +3 -5
- package/src/lib/server/connectors/connector-inbound.ts +0 -1
- package/src/lib/server/connectors/connector-lifecycle.ts +19 -3
- package/src/lib/server/connectors/connector-service.ts +39 -9
- package/src/lib/server/connectors/discord.ts +2 -2
- package/src/lib/server/connectors/matrix.ts +3 -2
- package/src/lib/server/connectors/signal.ts +5 -4
- package/src/lib/server/connectors/slack.ts +10 -9
- package/src/lib/server/connectors/swarmdock-bidding.ts +74 -0
- package/src/lib/server/connectors/swarmdock-payloads.test.ts +85 -0
- package/src/lib/server/connectors/swarmdock-secret.test.ts +128 -0
- package/src/lib/server/connectors/swarmdock-secret.ts +152 -0
- package/src/lib/server/connectors/swarmdock-tasks.ts +119 -0
- package/src/lib/server/connectors/swarmdock.ts +255 -0
- package/src/lib/server/connectors/teams.ts +3 -2
- package/src/lib/server/connectors/telegram.ts +4 -4
- package/src/lib/server/connectors/whatsapp.ts +2 -2
- package/src/lib/server/daemon/controller.ts +7 -0
- package/src/lib/server/execution-brief.test.ts +2 -25
- package/src/lib/server/execution-brief.ts +12 -35
- package/src/lib/server/execution-engine/task-attempt.ts +0 -1
- package/src/lib/server/gateways/gateway-profile-service.ts +19 -1
- package/src/lib/server/messages/message-repository.test.ts +70 -0
- package/src/lib/server/messages/message-repository.ts +11 -6
- package/src/lib/server/openclaw/deploy.ts +32 -2
- package/src/lib/server/persistence/storage-context.ts +0 -5
- package/src/lib/server/plugins-advanced.test.ts +1 -2
- package/src/lib/server/portability/export.ts +109 -0
- package/src/lib/server/portability/import.ts +159 -0
- package/src/lib/server/protocols/protocol-normalization.ts +0 -4
- package/src/lib/server/protocols/protocol-queries.ts +0 -6
- package/src/lib/server/protocols/protocol-run-lifecycle.ts +4 -32
- package/src/lib/server/protocols/protocol-service.ts +0 -1
- package/src/lib/server/protocols/protocol-step-helpers.ts +0 -4
- package/src/lib/server/protocols/protocol-step-processors.ts +0 -6
- package/src/lib/server/protocols/protocol-swarm.ts +0 -2
- package/src/lib/server/protocols/protocol-types.ts +0 -2
- package/src/lib/server/provider-health.ts +1 -10
- package/src/lib/server/runtime/daemon-state/core.ts +0 -9
- package/src/lib/server/runtime/daemon-state.test.ts +0 -35
- package/src/lib/server/runtime/heartbeat-service.ts +3 -23
- package/src/lib/server/runtime/process-manager.ts +13 -9
- package/src/lib/server/runtime/queue/core.ts +11 -33
- package/src/lib/server/runtime/runtime-storage-write-paths.test.ts +6 -6
- package/src/lib/server/runtime/scheduler.ts +0 -13
- package/src/lib/server/runtime/session-run-manager/drain.ts +0 -24
- package/src/lib/server/runtime/session-run-manager/enqueue.ts +0 -1
- package/src/lib/server/runtime/session-run-manager/queries.ts +15 -1
- package/src/lib/server/runtime/session-run-manager/recovery.ts +0 -1
- package/src/lib/server/runtime/session-run-manager.test.ts +58 -28
- package/src/lib/server/sandbox/session-runtime.test.ts +18 -1
- package/src/lib/server/sandbox/session-runtime.ts +40 -28
- package/src/lib/server/session-tools/autonomy-tools.test.ts +7 -9
- package/src/lib/server/session-tools/context.ts +1 -1
- package/src/lib/server/session-tools/credential-env.ts +109 -0
- package/src/lib/server/session-tools/crud.ts +3 -17
- package/src/lib/server/session-tools/delegate.ts +0 -4
- package/src/lib/server/session-tools/edit_file.ts +3 -2
- package/src/lib/server/session-tools/execute.test.ts +58 -0
- package/src/lib/server/session-tools/execute.ts +334 -0
- package/src/lib/server/session-tools/files-tool.ts +635 -0
- package/src/lib/server/session-tools/index.ts +14 -8
- package/src/lib/server/session-tools/memory-tool.ts +242 -0
- package/src/lib/server/session-tools/memory.ts +1 -1
- package/src/lib/server/session-tools/openclaw-nodes.ts +3 -2
- package/src/lib/server/session-tools/openclaw-workspace.ts +3 -2
- package/src/lib/server/session-tools/platform-tool.ts +617 -0
- package/src/lib/server/session-tools/session-info.ts +3 -2
- package/src/lib/server/session-tools/session-tools-wiring.test.ts +3 -4
- package/src/lib/server/session-tools/shell.ts +7 -122
- package/src/lib/server/session-tools/skills-tool.ts +396 -0
- package/src/lib/server/session-tools/team-context.ts +0 -3
- package/src/lib/server/session-tools/web.ts +2 -2
- package/src/lib/server/storage-normalization.ts +10 -0
- package/src/lib/server/storage.ts +18 -45
- package/src/lib/server/tasks/task-checkout.ts +59 -0
- package/src/lib/server/tasks/task-lifecycle.ts +2 -0
- package/src/lib/server/tasks/task-route-service.ts +4 -26
- package/src/lib/server/tasks/task-service.ts +0 -7
- package/src/lib/server/tool-aliases.ts +2 -2
- package/src/lib/server/tool-capability-policy-advanced.test.ts +13 -6
- package/src/lib/server/tool-capability-policy.test.ts +2 -1
- package/src/lib/server/tool-capability-policy.ts +60 -35
- package/src/lib/server/tool-planning.ts +11 -12
- package/src/lib/server/universal-tool-access.ts +0 -1
- package/src/lib/server/wallets/wallet-crypto.ts +33 -0
- package/src/lib/server/wallets/wallet-repository.ts +24 -0
- package/src/lib/server/wallets/wallet-service.ts +119 -0
- package/src/lib/server/working-state/extraction.ts +8 -42
- package/src/lib/server/working-state/normalization.ts +10 -103
- package/src/lib/server/working-state/service.ts +12 -21
- package/src/lib/setup-defaults.ts +5 -0
- package/src/lib/strip-internal-metadata.test.ts +1 -1
- package/src/lib/strip-internal-metadata.ts +1 -1
- package/src/lib/tool-definitions.ts +1 -1
- package/src/lib/validation/schemas.test.ts +16 -0
- package/src/lib/validation/schemas.ts +49 -2
- package/src/stores/slices/data-slice.ts +5 -1
- package/src/stores/slices/ui-slice.ts +0 -4
- package/src/stores/use-chat-store.test.ts +231 -0
- package/src/stores/use-chat-store.ts +62 -13
- package/src/types/agent.ts +264 -0
- package/src/types/app-settings.ts +173 -0
- package/src/types/approval.ts +25 -0
- package/src/types/connector.ts +188 -0
- package/src/types/extension.ts +386 -0
- package/src/types/index.ts +16 -3555
- package/src/types/message.ts +56 -0
- package/src/types/misc.ts +737 -0
- package/src/types/protocol.ts +420 -0
- package/src/types/provider.ts +52 -0
- package/src/types/run.ts +180 -0
- package/src/types/schedule.ts +59 -0
- package/src/types/session.ts +215 -0
- package/src/types/skill.ts +157 -0
- package/src/types/swarmdock.ts +29 -0
- package/src/types/task.ts +144 -0
- package/src/types/working-state.ts +204 -0
- package/src/views/settings/section-heartbeat.tsx +2 -2
- package/src/views/settings/section-runtime-loop.tsx +0 -14
- package/src/app/api/canvas/[sessionId]/route.ts +0 -35
- package/src/app/api/missions/[id]/actions/route.ts +0 -31
- package/src/app/api/missions/[id]/events/route.ts +0 -14
- package/src/app/api/missions/[id]/route.ts +0 -10
- package/src/app/api/missions/route.test.ts +0 -244
- package/src/app/api/missions/route.ts +0 -57
- package/src/app/api/wallets/[id]/approve/route.ts +0 -79
- package/src/app/api/wallets/[id]/balance-history/route.ts +0 -18
- package/src/app/api/wallets/[id]/send/route.ts +0 -113
- package/src/app/api/wallets/[id]/transactions/route.ts +0 -18
- package/src/app/missions/[id]/page.tsx +0 -3
- package/src/app/missions/page.tsx +0 -685
- package/src/components/canvas/canvas-panel.tsx +0 -267
- package/src/components/wallets/wallet-approval-dialog.tsx +0 -107
- package/src/components/wallets/wallet-panel.tsx +0 -1010
- package/src/components/wallets/wallet-section.tsx +0 -260
- package/src/features/missions/queries.ts +0 -23
- package/src/lib/canvas-content.test.ts +0 -360
- package/src/lib/canvas-content.ts +0 -198
- package/src/lib/server/canvas-content.test.ts +0 -32
- package/src/lib/server/canvas-content.ts +0 -6
- package/src/lib/server/ethereum.ts +0 -591
- package/src/lib/server/evm-swap.ts +0 -476
- package/src/lib/server/missions/mission-intent.test.ts +0 -63
- package/src/lib/server/missions/mission-intent.ts +0 -569
- package/src/lib/server/missions/mission-repository.ts +0 -74
- package/src/lib/server/missions/mission-service/actions.ts +0 -6
- package/src/lib/server/missions/mission-service/bindings.ts +0 -9
- package/src/lib/server/missions/mission-service/context.ts +0 -4
- package/src/lib/server/missions/mission-service/core.ts +0 -2271
- package/src/lib/server/missions/mission-service/queries.ts +0 -12
- package/src/lib/server/missions/mission-service/recovery.ts +0 -5
- package/src/lib/server/missions/mission-service/ticks.ts +0 -9
- package/src/lib/server/missions/mission-service.test.ts +0 -888
- package/src/lib/server/missions/mission-service.ts +0 -6
- package/src/lib/server/session-tools/canvas.ts +0 -105
- package/src/lib/server/session-tools/sandbox.ts +0 -281
- package/src/lib/server/session-tools/wallet-tool.test.ts +0 -150
- package/src/lib/server/session-tools/wallet.ts +0 -1287
- package/src/lib/server/solana.ts +0 -327
- package/src/lib/server/wallet/wallet-execution.test.ts +0 -198
- package/src/lib/server/wallet/wallet-portfolio.test.ts +0 -98
- package/src/lib/server/wallet/wallet-portfolio.ts +0 -772
- package/src/lib/server/wallet/wallet-service.test.ts +0 -81
- package/src/lib/server/wallet/wallet-service.ts +0 -225
- package/src/lib/wallet/wallet-transactions.test.ts +0 -75
- package/src/lib/wallet/wallet-transactions.ts +0 -43
- package/src/lib/wallet/wallet.test.ts +0 -333
- package/src/lib/wallet/wallet.ts +0 -183
- package/src/views/settings/section-wallets.tsx +0 -35
package/src/cli/index.js
CHANGED
|
@@ -105,14 +105,6 @@ const COMMAND_GROUPS = [
|
|
|
105
105
|
cmd('moderate', 'POST', '/chatrooms/:id/moderate', 'Run moderation action on a chatroom', { expectsJsonBody: true }),
|
|
106
106
|
],
|
|
107
107
|
},
|
|
108
|
-
{
|
|
109
|
-
name: 'canvas',
|
|
110
|
-
description: 'Read/update per-session canvas content',
|
|
111
|
-
commands: [
|
|
112
|
-
cmd('get', 'GET', '/canvas/:sessionId', 'Get current canvas content for a session'),
|
|
113
|
-
cmd('set', 'POST', '/canvas/:sessionId', 'Set/clear canvas content for a session', { expectsJsonBody: true }),
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
108
|
{
|
|
117
109
|
name: 'connectors',
|
|
118
110
|
description: 'Manage chat connectors',
|
|
@@ -307,16 +299,7 @@ const COMMAND_GROUPS = [
|
|
|
307
299
|
cmd('get', 'GET', '/memory-images/:filename', 'Download memory image by filename', { responseType: 'binary' }),
|
|
308
300
|
],
|
|
309
301
|
},
|
|
310
|
-
|
|
311
|
-
name: 'missions',
|
|
312
|
-
description: 'Inspect and control durable missions',
|
|
313
|
-
commands: [
|
|
314
|
-
cmd('list', 'GET', '/missions', 'List missions (use --query status=, --query phase=, --query source=, --query sessionId=, --query agentId=, --query projectId=)'),
|
|
315
|
-
cmd('get', 'GET', '/missions/:id', 'Get mission detail by id'),
|
|
316
|
-
cmd('events', 'GET', '/missions/:id/events', 'Get mission event timeline', { expectsQueryHint: true }),
|
|
317
|
-
cmd('action', 'POST', '/missions/:id/actions', 'Run a mission control action (resume, replan, retry_verification, wait, cancel)', { expectsJsonBody: true }),
|
|
318
|
-
],
|
|
319
|
-
},
|
|
302
|
+
|
|
320
303
|
{
|
|
321
304
|
name: 'notifications',
|
|
322
305
|
description: 'Manage in-app notifications',
|
|
@@ -696,21 +679,6 @@ const COMMAND_GROUPS = [
|
|
|
696
679
|
}),
|
|
697
680
|
],
|
|
698
681
|
},
|
|
699
|
-
{
|
|
700
|
-
name: 'wallets',
|
|
701
|
-
description: 'Manage agent wallets and wallet transactions',
|
|
702
|
-
commands: [
|
|
703
|
-
cmd('list', 'GET', '/wallets', 'List wallets'),
|
|
704
|
-
cmd('get', 'GET', '/wallets/:id', 'Get wallet by id'),
|
|
705
|
-
cmd('create', 'POST', '/wallets', 'Create wallet', { expectsJsonBody: true }),
|
|
706
|
-
cmd('update', 'PATCH', '/wallets/:id', 'Update wallet settings', { expectsJsonBody: true }),
|
|
707
|
-
cmd('delete', 'DELETE', '/wallets/:id', 'Delete wallet'),
|
|
708
|
-
cmd('send', 'POST', '/wallets/:id/send', 'Send funds from wallet', { expectsJsonBody: true }),
|
|
709
|
-
cmd('approve', 'POST', '/wallets/:id/approve', 'Approve or deny a pending wallet transaction', { expectsJsonBody: true }),
|
|
710
|
-
cmd('transactions', 'GET', '/wallets/:id/transactions', 'List wallet transactions'),
|
|
711
|
-
cmd('balance-history', 'GET', '/wallets/:id/balance-history', 'Get wallet balance history'),
|
|
712
|
-
],
|
|
713
|
-
},
|
|
714
682
|
{
|
|
715
683
|
name: 'upload',
|
|
716
684
|
description: 'Upload raw file/blob',
|
|
@@ -769,6 +737,26 @@ const COMMAND_GROUPS = [
|
|
|
769
737
|
cmd('history', 'GET', '/webhooks/:id/history', 'Get webhook delivery history'),
|
|
770
738
|
],
|
|
771
739
|
},
|
|
740
|
+
{
|
|
741
|
+
name: 'portability',
|
|
742
|
+
description: 'Export and import agent configurations',
|
|
743
|
+
commands: [
|
|
744
|
+
cmd('export', 'GET', '/portability/export', 'Export agents, skills, and schedules as a portable JSON manifest'),
|
|
745
|
+
cmd('import', 'POST', '/portability/import', 'Import a portable JSON manifest', { expectsJsonBody: true }),
|
|
746
|
+
],
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'wallets',
|
|
750
|
+
description: 'Manage agent wallets',
|
|
751
|
+
commands: [
|
|
752
|
+
cmd('list', 'GET', '/wallets', 'List wallets'),
|
|
753
|
+
cmd('get', 'GET', '/wallets/:id', 'Get wallet by id'),
|
|
754
|
+
cmd('create', 'POST', '/wallets', 'Create a wallet', { expectsJsonBody: true }),
|
|
755
|
+
cmd('generate', 'POST', '/wallets/generate', 'Generate a new wallet for an agent', { expectsJsonBody: true }),
|
|
756
|
+
cmd('update', 'PATCH', '/wallets/:id', 'Update wallet settings', { expectsJsonBody: true }),
|
|
757
|
+
cmd('delete', 'DELETE', '/wallets/:id', 'Delete a wallet'),
|
|
758
|
+
],
|
|
759
|
+
},
|
|
772
760
|
]
|
|
773
761
|
|
|
774
762
|
const GROUP_MAP = new Map(COMMAND_GROUPS.map((group) => [group.name, group]))
|
package/src/cli/spec.js
CHANGED
|
@@ -59,13 +59,6 @@ const COMMAND_GROUPS = {
|
|
|
59
59
|
pin: { description: 'Toggle pin on a chatroom message', method: 'POST', path: '/chatrooms/:id/pins', params: ['id'] },
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
|
-
canvas: {
|
|
63
|
-
description: 'Session canvas content',
|
|
64
|
-
commands: {
|
|
65
|
-
get: { description: 'Get current canvas content for a session', method: 'GET', path: '/canvas/:sessionId', params: ['sessionId'] },
|
|
66
|
-
set: { description: 'Set/clear canvas content for a session', method: 'POST', path: '/canvas/:sessionId', params: ['sessionId'] },
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
62
|
connectors: {
|
|
70
63
|
description: 'Manage chat connectors',
|
|
71
64
|
commands: {
|
|
@@ -214,15 +207,7 @@ const COMMAND_GROUPS = {
|
|
|
214
207
|
clear: { description: 'Clear log file', method: 'DELETE', path: '/logs' },
|
|
215
208
|
},
|
|
216
209
|
},
|
|
217
|
-
|
|
218
|
-
description: 'Inspect and control durable missions',
|
|
219
|
-
commands: {
|
|
220
|
-
list: { description: 'List missions (supports --query status=,phase=,source=,sessionId=,agentId=,projectId=)', method: 'GET', path: '/missions' },
|
|
221
|
-
get: { description: 'Get mission detail by id', method: 'GET', path: '/missions/:id', params: ['id'] },
|
|
222
|
-
events: { description: 'Get mission event timeline', method: 'GET', path: '/missions/:id/events', params: ['id'] },
|
|
223
|
-
action: { description: 'Run a mission control action (resume, replan, retry_verification, wait, cancel)', method: 'POST', path: '/missions/:id/actions', params: ['id'] },
|
|
224
|
-
},
|
|
225
|
-
},
|
|
210
|
+
|
|
226
211
|
memory: {
|
|
227
212
|
description: 'Agent memory entries',
|
|
228
213
|
commands: {
|
|
@@ -526,26 +511,30 @@ const COMMAND_GROUPS = {
|
|
|
526
511
|
events: { description: 'Get run event history by run id', method: 'GET', path: '/runs/:id/events', params: ['id'] },
|
|
527
512
|
},
|
|
528
513
|
},
|
|
529
|
-
wallets: {
|
|
530
|
-
description: 'Agent wallet operations',
|
|
531
|
-
commands: {
|
|
532
|
-
list: { description: 'List wallets', method: 'GET', path: '/wallets' },
|
|
533
|
-
get: { description: 'Get wallet by id', method: 'GET', path: '/wallets/:id', params: ['id'] },
|
|
534
|
-
create: { description: 'Create wallet', method: 'POST', path: '/wallets' },
|
|
535
|
-
update: { description: 'Update wallet settings', method: 'PATCH', path: '/wallets/:id', params: ['id'] },
|
|
536
|
-
delete: { description: 'Delete wallet', method: 'DELETE', path: '/wallets/:id', params: ['id'] },
|
|
537
|
-
send: { description: 'Send funds from wallet', method: 'POST', path: '/wallets/:id/send', params: ['id'] },
|
|
538
|
-
approve: { description: 'Approve or deny pending wallet transaction', method: 'POST', path: '/wallets/:id/approve', params: ['id'] },
|
|
539
|
-
transactions: { description: 'List wallet transactions', method: 'GET', path: '/wallets/:id/transactions', params: ['id'] },
|
|
540
|
-
'balance-history': { description: 'Get wallet balance history', method: 'GET', path: '/wallets/:id/balance-history', params: ['id'] },
|
|
541
|
-
},
|
|
542
|
-
},
|
|
543
514
|
webhooks: {
|
|
544
515
|
description: 'Inbound webhook triggers',
|
|
545
516
|
commands: {
|
|
546
517
|
trigger: { description: 'Trigger webhook by id', method: 'POST', path: '/webhooks/:id', params: ['id'], waitable: true },
|
|
547
518
|
},
|
|
548
519
|
},
|
|
520
|
+
portability: {
|
|
521
|
+
description: 'Export and import agent configurations',
|
|
522
|
+
commands: {
|
|
523
|
+
export: { description: 'Export agents, skills, and schedules as a portable JSON manifest', method: 'GET', path: '/portability/export' },
|
|
524
|
+
import: { description: 'Import a portable JSON manifest', method: 'POST', path: '/portability/import', body: true },
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
wallets: {
|
|
528
|
+
description: 'Manage agent wallets',
|
|
529
|
+
commands: {
|
|
530
|
+
list: { description: 'List wallets', method: 'GET', path: '/wallets' },
|
|
531
|
+
get: { description: 'Get wallet by id', method: 'GET', path: '/wallets/:id', params: ['id'] },
|
|
532
|
+
create: { description: 'Create a wallet', method: 'POST', path: '/wallets' },
|
|
533
|
+
generate: { description: 'Generate a new wallet for an agent', method: 'POST', path: '/wallets/generate', body: true },
|
|
534
|
+
update: { description: 'Update wallet settings', method: 'PATCH', path: '/wallets/:id', params: ['id'], body: true },
|
|
535
|
+
delete: { description: 'Delete a wallet', method: 'DELETE', path: '/wallets/:id', params: ['id'] },
|
|
536
|
+
},
|
|
537
|
+
},
|
|
549
538
|
}
|
|
550
539
|
|
|
551
540
|
const GROUP_NAMES = Object.keys(COMMAND_GROUPS)
|
|
@@ -193,9 +193,11 @@ export function AgentChatList({ inSidebar, onSelect }: Props) {
|
|
|
193
193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
194
194
|
}, [filteredAgents.map((a) => a.id).join(',')])
|
|
195
195
|
|
|
196
|
+
const [enableAgentTarget, setEnableAgentTarget] = useState<Agent | null>(null)
|
|
197
|
+
|
|
196
198
|
const handleSelect = async (agent: Agent) => {
|
|
197
199
|
if (agent.disabled === true && !agent.threadSessionId) {
|
|
198
|
-
|
|
200
|
+
setEnableAgentTarget(agent)
|
|
199
201
|
return
|
|
200
202
|
}
|
|
201
203
|
navigateTo('agents', agent.id)
|
|
@@ -547,6 +549,26 @@ export function AgentChatList({ inSidebar, onSelect }: Props) {
|
|
|
547
549
|
onConfirm={() => { setConfirmBulkDelete(false); handleBulkDelete() }}
|
|
548
550
|
onCancel={() => setConfirmBulkDelete(false)}
|
|
549
551
|
/>
|
|
552
|
+
<ConfirmDialog
|
|
553
|
+
open={!!enableAgentTarget}
|
|
554
|
+
title={`Enable ${enableAgentTarget?.name ?? 'Agent'}?`}
|
|
555
|
+
message={`${enableAgentTarget?.name ?? 'This agent'} is currently disabled. Enable it to start a new chat.`}
|
|
556
|
+
confirmLabel="Enable"
|
|
557
|
+
onConfirm={async () => {
|
|
558
|
+
if (!enableAgentTarget) return
|
|
559
|
+
try {
|
|
560
|
+
await api('PUT', `/agents/${enableAgentTarget.id}`, { disabled: false })
|
|
561
|
+
await loadAgents()
|
|
562
|
+
const agent = enableAgentTarget
|
|
563
|
+
setEnableAgentTarget(null)
|
|
564
|
+
handleSelect(agent)
|
|
565
|
+
} catch {
|
|
566
|
+
toast.error('Failed to enable agent')
|
|
567
|
+
setEnableAgentTarget(null)
|
|
568
|
+
}
|
|
569
|
+
}}
|
|
570
|
+
onCancel={() => setEnableAgentTarget(null)}
|
|
571
|
+
/>
|
|
550
572
|
</div>
|
|
551
573
|
)
|
|
552
574
|
}
|
|
@@ -10,8 +10,7 @@ import { sleep } from '@/lib/shared-utils'
|
|
|
10
10
|
import { BottomSheet } from '@/components/shared/bottom-sheet'
|
|
11
11
|
import { toast } from 'sonner'
|
|
12
12
|
import { ModelCombobox } from '@/components/shared/model-combobox'
|
|
13
|
-
import type { ProviderType, ClaudeSkill,
|
|
14
|
-
import { WalletSection } from '@/components/wallets/wallet-section'
|
|
13
|
+
import type { ProviderType, ClaudeSkill, AgentPackManifest, AgentRoutingStrategy, AgentRoutingTarget } from '@/types'
|
|
15
14
|
import { AVAILABLE_TOOLS, PLATFORM_TOOLS } from '@/lib/tool-definitions'
|
|
16
15
|
import { NATIVE_CAPABILITY_PROVIDER_IDS, NON_LANGGRAPH_PROVIDER_IDS, WORKER_ONLY_PROVIDER_IDS } from '@/lib/provider-sets'
|
|
17
16
|
import { isOrchestratorProviderEligible } from '@/lib/orchestrator-config'
|
|
@@ -49,14 +48,6 @@ const AUTO_SYNC_MODEL_PROVIDER_IDS = new Set<ProviderType>([
|
|
|
49
48
|
const CONNECTION_TEST_TIMEOUT_MS = 40_000
|
|
50
49
|
type AgentProviderId = string
|
|
51
50
|
|
|
52
|
-
type SafeAgentWallet = Omit<AgentWallet, 'encryptedPrivateKey'> & {
|
|
53
|
-
balanceAtomic?: string
|
|
54
|
-
balanceLamports?: number
|
|
55
|
-
balanceFormatted?: string
|
|
56
|
-
balanceSymbol?: string
|
|
57
|
-
isActive?: boolean
|
|
58
|
-
}
|
|
59
|
-
|
|
60
51
|
function SectionCard({
|
|
61
52
|
title,
|
|
62
53
|
description,
|
|
@@ -266,7 +257,6 @@ export function AgentSheet() {
|
|
|
266
257
|
const [dailyBudget, setDailyBudget] = useState('')
|
|
267
258
|
const [monthlyBudget, setMonthlyBudget] = useState('')
|
|
268
259
|
const [budgetAction, setBudgetAction] = useState<'warn' | 'block'>('warn')
|
|
269
|
-
const [agentWallets, setAgentWallets] = useState<SafeAgentWallet[]>([])
|
|
270
260
|
const [addingKey, setAddingKey] = useState(false)
|
|
271
261
|
const [newKeyName, setNewKeyName] = useState('')
|
|
272
262
|
const [newKeyValue, setNewKeyValue] = useState('')
|
|
@@ -297,21 +287,6 @@ export function AgentSheet() {
|
|
|
297
287
|
e.target.value = ''
|
|
298
288
|
}
|
|
299
289
|
|
|
300
|
-
const loadAgentWallets = useCallback(async (agentId: string) => {
|
|
301
|
-
try {
|
|
302
|
-
const wallets = await api<Record<string, SafeAgentWallet>>('GET', `/wallets?agentId=${encodeURIComponent(agentId)}`)
|
|
303
|
-
const matches = Object.values(wallets)
|
|
304
|
-
.filter((wallet) => wallet.agentId === agentId)
|
|
305
|
-
.sort((a, b) => {
|
|
306
|
-
if ((a.isActive ? 1 : 0) !== (b.isActive ? 1 : 0)) return a.isActive ? -1 : 1
|
|
307
|
-
return a.chain.localeCompare(b.chain)
|
|
308
|
-
})
|
|
309
|
-
setAgentWallets(matches)
|
|
310
|
-
} catch {
|
|
311
|
-
setAgentWallets([])
|
|
312
|
-
}
|
|
313
|
-
}, [])
|
|
314
|
-
|
|
315
290
|
const agentSelectableProviders = useMemo(
|
|
316
291
|
() => buildAgentSelectableProviders(providers, providerConfigs),
|
|
317
292
|
[providers, providerConfigs],
|
|
@@ -487,7 +462,6 @@ export function AgentSheet() {
|
|
|
487
462
|
setDailyBudget(typeof editing.dailyBudget === 'number' && editing.dailyBudget > 0 ? String(editing.dailyBudget) : '')
|
|
488
463
|
setMonthlyBudget(typeof editing.monthlyBudget === 'number' && editing.monthlyBudget > 0 ? String(editing.monthlyBudget) : '')
|
|
489
464
|
setBudgetAction(editing.budgetAction || 'warn')
|
|
490
|
-
void loadAgentWallets(editing.id)
|
|
491
465
|
} else if (useAppStore.getState().agentPrefill) {
|
|
492
466
|
// Duplicate mode — prefill from source agent, then clear
|
|
493
467
|
const src = useAppStore.getState().agentPrefill!
|
|
@@ -567,7 +541,6 @@ export function AgentSheet() {
|
|
|
567
541
|
setDailyBudget(typeof src.dailyBudget === 'number' && src.dailyBudget > 0 ? String(src.dailyBudget) : '')
|
|
568
542
|
setMonthlyBudget(typeof src.monthlyBudget === 'number' && src.monthlyBudget > 0 ? String(src.monthlyBudget) : '')
|
|
569
543
|
setBudgetAction(src.budgetAction || 'warn')
|
|
570
|
-
setAgentWallets([])
|
|
571
544
|
} else {
|
|
572
545
|
setName('')
|
|
573
546
|
setDescription('')
|
|
@@ -634,7 +607,6 @@ export function AgentSheet() {
|
|
|
634
607
|
setDailyBudget('')
|
|
635
608
|
setMonthlyBudget('')
|
|
636
609
|
setBudgetAction('warn')
|
|
637
|
-
setAgentWallets([])
|
|
638
610
|
}
|
|
639
611
|
}
|
|
640
612
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2657,7 +2629,7 @@ export function AgentSheet() {
|
|
|
2657
2629
|
|
|
2658
2630
|
<SectionCard
|
|
2659
2631
|
title="Utilities"
|
|
2660
|
-
description="Import and export agents
|
|
2632
|
+
description="Import and export agents."
|
|
2661
2633
|
className="mb-0 border-white/[0.05] bg-white/[0.01]"
|
|
2662
2634
|
>
|
|
2663
2635
|
<div className="flex flex-wrap gap-3">
|
|
@@ -2681,16 +2653,6 @@ export function AgentSheet() {
|
|
|
2681
2653
|
</button>
|
|
2682
2654
|
)}
|
|
2683
2655
|
</div>
|
|
2684
|
-
{editing && (
|
|
2685
|
-
<div className="mt-6">
|
|
2686
|
-
<WalletSection
|
|
2687
|
-
agentId={editing.id}
|
|
2688
|
-
wallets={agentWallets}
|
|
2689
|
-
activeWalletId={editing.activeWalletId || null}
|
|
2690
|
-
onWalletCreated={() => loadAgentWallets(editing.id)}
|
|
2691
|
-
/>
|
|
2692
|
-
</div>
|
|
2693
|
-
)}
|
|
2694
2656
|
</SectionCard>
|
|
2695
2657
|
</AdvancedSettingsSection>
|
|
2696
2658
|
)}
|