@swarmclawai/swarmclaw 1.2.8 → 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 +30 -6
- package/package.json +2 -2
- 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/connectors/route.ts +2 -2
- 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/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-sheet.tsx +2 -40
- package/src/components/agents/inspector-panel.tsx +0 -83
- package/src/components/chat/chat-card.tsx +0 -31
- package/src/components/chat/message-bubble.tsx +1 -108
- package/src/components/connectors/connector-sheet.tsx +25 -1
- 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/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/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 +0 -2
- package/src/lib/server/capability-router.test.ts +0 -2
- package/src/lib/server/chat-execution/chat-execution-tool-events.test.ts +14 -14
- package/src/lib/server/chat-execution/chat-execution-types.ts +0 -2
- package/src/lib/server/chat-execution/chat-execution-utils.ts +0 -2
- 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 +2 -22
- package/src/lib/server/chat-execution/iteration-event-handler.ts +0 -24
- package/src/lib/server/chat-execution/message-classifier.test.ts +0 -45
- package/src/lib/server/chat-execution/message-classifier.ts +1 -16
- package/src/lib/server/chat-execution/prompt-builder.test.ts +0 -1
- package/src/lib/server/chat-execution/prompt-builder.ts +0 -30
- 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 +8 -123
- package/src/lib/server/chat-execution/stream-agent-chat.ts +1 -5
- 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/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/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/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/persistence/storage-context.ts +0 -5
- 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 +0 -9
- 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/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 +0 -1
- package/src/lib/server/runtime/session-run-manager/recovery.ts +0 -1
- package/src/lib/server/runtime/session-run-manager.test.ts +0 -28
- package/src/lib/server/session-tools/crud.ts +0 -14
- package/src/lib/server/session-tools/delegate.ts +0 -4
- package/src/lib/server/session-tools/index.ts +0 -4
- package/src/lib/server/session-tools/team-context.ts +0 -3
- package/src/lib/server/storage-normalization.ts +8 -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 +0 -1
- package/src/lib/server/tool-capability-policy-advanced.test.ts +4 -4
- package/src/lib/server/tool-capability-policy.ts +0 -2
- package/src/lib/server/tool-planning.ts +0 -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/strip-internal-metadata.test.ts +1 -1
- package/src/lib/strip-internal-metadata.ts +1 -1
- package/src/lib/tool-definitions.ts +0 -1
- package/src/lib/validation/schemas.ts +33 -2
- package/src/stores/slices/data-slice.ts +5 -1
- package/src/stores/slices/ui-slice.ts +0 -4
- package/src/types/agent.ts +0 -84
- package/src/types/app-settings.ts +0 -2
- package/src/types/approval.ts +0 -2
- package/src/types/connector.ts +1 -0
- package/src/types/index.ts +1 -1
- package/src/types/message.ts +0 -1
- package/src/types/misc.ts +0 -2
- package/src/types/protocol.ts +0 -2
- package/src/types/run.ts +0 -3
- package/src/types/session.ts +1 -51
- package/src/types/swarmdock.ts +29 -0
- package/src/types/task.ts +7 -3
- package/src/types/working-state.ts +2 -9
- 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/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/types/mission.ts +0 -185
- package/src/views/settings/section-wallets.tsx +0 -35
|
@@ -4,7 +4,6 @@ import { genId } from '@/lib/id'
|
|
|
4
4
|
import { cleanText, cleanMultiline, normalizeList } from '@/lib/server/text-normalization'
|
|
5
5
|
import type {
|
|
6
6
|
EvidenceRef,
|
|
7
|
-
Mission,
|
|
8
7
|
SessionWorkingState,
|
|
9
8
|
WorkingArtifact,
|
|
10
9
|
WorkingArtifactPatch,
|
|
@@ -56,7 +55,7 @@ export const WorkingPlanStepPatchSchema = z.object({
|
|
|
56
55
|
export const WorkingFactPatchSchema = z.object({
|
|
57
56
|
id: z.string().optional().nullable(),
|
|
58
57
|
statement: z.string().optional().nullable(),
|
|
59
|
-
source: z.enum(['user', 'tool', 'assistant', '
|
|
58
|
+
source: z.enum(['user', 'tool', 'assistant', 'system']).optional().nullable(),
|
|
60
59
|
status: WorkingItemStatusSchema.optional().nullable(),
|
|
61
60
|
evidenceIds: z.array(z.string()).optional().nullable(),
|
|
62
61
|
})
|
|
@@ -150,7 +149,6 @@ import type { MessageToolEvent } from '@/types'
|
|
|
150
149
|
|
|
151
150
|
export interface WorkingStateDeterministicUpdateInput {
|
|
152
151
|
sessionId: string
|
|
153
|
-
mission?: Mission | null
|
|
154
152
|
message?: string | null
|
|
155
153
|
assistantText?: string | null
|
|
156
154
|
error?: string | null
|
|
@@ -233,7 +231,6 @@ export function normalizeEvidenceRef(input: unknown): EvidenceRef | null {
|
|
|
233
231
|
if (!summary) return null
|
|
234
232
|
const type = record.type === 'tool'
|
|
235
233
|
|| record.type === 'message'
|
|
236
|
-
|| record.type === 'mission'
|
|
237
234
|
|| record.type === 'task'
|
|
238
235
|
|| record.type === 'artifact'
|
|
239
236
|
|| record.type === 'error'
|
|
@@ -249,7 +246,6 @@ export function normalizeEvidenceRef(input: unknown): EvidenceRef | null {
|
|
|
249
246
|
toolCallId: cleanText(record.toolCallId, 120) || null,
|
|
250
247
|
runId: cleanText(record.runId, 120) || null,
|
|
251
248
|
sessionId: cleanText(record.sessionId, 120) || null,
|
|
252
|
-
missionId: cleanText(record.missionId, 120) || null,
|
|
253
249
|
taskId: cleanText(record.taskId, 120) || null,
|
|
254
250
|
createdAt: typeof record.createdAt === 'number' && Number.isFinite(record.createdAt)
|
|
255
251
|
? Math.trunc(record.createdAt)
|
|
@@ -290,7 +286,6 @@ export function normalizeFact(input: unknown): WorkingFact | null {
|
|
|
290
286
|
source: record.source === 'user'
|
|
291
287
|
|| record.source === 'tool'
|
|
292
288
|
|| record.source === 'assistant'
|
|
293
|
-
|| record.source === 'mission'
|
|
294
289
|
|| record.source === 'system'
|
|
295
290
|
? record.source
|
|
296
291
|
: 'assistant',
|
|
@@ -434,17 +429,16 @@ export function normalizeMatchKey(value: string): string {
|
|
|
434
429
|
// defaultWorkingState & normalizeWorkingState
|
|
435
430
|
// ---------------------------------------------------------------------------
|
|
436
431
|
|
|
437
|
-
export function defaultWorkingState(sessionId: string
|
|
432
|
+
export function defaultWorkingState(sessionId: string): SessionWorkingState {
|
|
438
433
|
const nowTs = now()
|
|
439
434
|
return {
|
|
440
435
|
sessionId,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
summary: cleanMultiline(mission?.verifierSummary || mission?.plannerSummary, 600) || null,
|
|
436
|
+
objective: null,
|
|
437
|
+
summary: null,
|
|
444
438
|
constraints: [],
|
|
445
|
-
successCriteria:
|
|
446
|
-
status:
|
|
447
|
-
nextAction:
|
|
439
|
+
successCriteria: [],
|
|
440
|
+
status: 'idle',
|
|
441
|
+
nextAction: null,
|
|
448
442
|
planSteps: [],
|
|
449
443
|
confirmedFacts: [],
|
|
450
444
|
artifacts: [],
|
|
@@ -462,19 +456,17 @@ export function defaultWorkingState(sessionId: string, mission?: Mission | null)
|
|
|
462
456
|
export function normalizeWorkingState(
|
|
463
457
|
input: unknown,
|
|
464
458
|
sessionId: string,
|
|
465
|
-
mission?: Mission | null,
|
|
466
459
|
): SessionWorkingState {
|
|
467
460
|
if (!input || typeof input !== 'object' || Array.isArray(input)) {
|
|
468
|
-
return defaultWorkingState(sessionId
|
|
461
|
+
return defaultWorkingState(sessionId)
|
|
469
462
|
}
|
|
470
463
|
const record = input as Record<string, unknown>
|
|
471
|
-
const base = defaultWorkingState(sessionId
|
|
464
|
+
const base = defaultWorkingState(sessionId)
|
|
472
465
|
const createdAt = typeof record.createdAt === 'number' && Number.isFinite(record.createdAt)
|
|
473
466
|
? Math.trunc(record.createdAt)
|
|
474
467
|
: base.createdAt
|
|
475
468
|
const normalized: SessionWorkingState = {
|
|
476
469
|
sessionId: cleanText(record.sessionId, 120) || sessionId,
|
|
477
|
-
missionId: cleanText(record.missionId, 120) || mission?.id || null,
|
|
478
470
|
objective: cleanMultiline(record.objective, 900) || base.objective,
|
|
479
471
|
summary: cleanMultiline(record.summary, 600) || base.summary,
|
|
480
472
|
constraints: normalizeList(record.constraints, 12, 240),
|
|
@@ -497,7 +489,7 @@ export function normalizeWorkingState(
|
|
|
497
489
|
? Math.trunc(record.lastCompactedAt)
|
|
498
490
|
: null,
|
|
499
491
|
}
|
|
500
|
-
return compactWorkingStateObject(
|
|
492
|
+
return compactWorkingStateObject(normalized)
|
|
501
493
|
}
|
|
502
494
|
|
|
503
495
|
// ---------------------------------------------------------------------------
|
|
@@ -522,89 +514,6 @@ export function compactWorkingStateObject(state: SessionWorkingState): SessionWo
|
|
|
522
514
|
}
|
|
523
515
|
|
|
524
516
|
// ---------------------------------------------------------------------------
|
|
525
|
-
// missionStatusToWorkingStateStatus & syncWorkingStateWithMission
|
|
526
|
-
// ---------------------------------------------------------------------------
|
|
527
|
-
|
|
528
|
-
export function missionStatusToWorkingStateStatus(mission: Mission): WorkingStateStatus {
|
|
529
|
-
if (mission.status === 'completed') return 'completed'
|
|
530
|
-
if (mission.status === 'waiting') return 'waiting'
|
|
531
|
-
if (mission.status === 'failed' || mission.status === 'cancelled') return 'blocked'
|
|
532
|
-
return 'progress'
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
export function syncWorkingStateWithMission(
|
|
536
|
-
state: SessionWorkingState,
|
|
537
|
-
mission?: Mission | null,
|
|
538
|
-
): SessionWorkingState {
|
|
539
|
-
if (!mission) return state
|
|
540
|
-
const next = { ...state }
|
|
541
|
-
next.missionId = mission.id
|
|
542
|
-
next.objective = cleanMultiline(mission.objective, 900) || next.objective
|
|
543
|
-
next.successCriteria = normalizeList(mission.successCriteria, 12, 240)
|
|
544
|
-
next.summary = next.summary || cleanMultiline(mission.verifierSummary || mission.plannerSummary, 600) || null
|
|
545
|
-
const missionStatus = missionStatusToWorkingStateStatus(mission)
|
|
546
|
-
if (missionStatus === 'completed' || missionStatus === 'waiting' || missionStatus === 'blocked') {
|
|
547
|
-
next.status = missionStatus
|
|
548
|
-
} else if (next.status === 'idle') {
|
|
549
|
-
next.status = missionStatus
|
|
550
|
-
}
|
|
551
|
-
next.nextAction = next.nextAction || cleanText(mission.currentStep, 240) || null
|
|
552
|
-
|
|
553
|
-
if (mission.currentStep) {
|
|
554
|
-
next.planSteps = upsertItems(next.planSteps, [{
|
|
555
|
-
id: null,
|
|
556
|
-
text: mission.currentStep,
|
|
557
|
-
status: mission.status === 'completed' ? 'resolved' : 'active',
|
|
558
|
-
} satisfies WorkingPlanStepPatch], {
|
|
559
|
-
max: MAX_PLAN_STEPS,
|
|
560
|
-
getPatchId: (patch) => cleanText(patch.id, 120) || null,
|
|
561
|
-
getPatchKey: (patch) => cleanText(patch.text, 240),
|
|
562
|
-
getItemKey: (item) => item.text,
|
|
563
|
-
create: (patch, nowTs) => ({
|
|
564
|
-
id: genId(12),
|
|
565
|
-
text: cleanText(patch.text, 240),
|
|
566
|
-
status: normalizeItemStatus(patch.status),
|
|
567
|
-
createdAt: nowTs,
|
|
568
|
-
updatedAt: nowTs,
|
|
569
|
-
}),
|
|
570
|
-
merge: (current, patch, nowTs) => ({
|
|
571
|
-
...current,
|
|
572
|
-
text: cleanText(patch.text, 240) || current.text,
|
|
573
|
-
status: normalizeItemStatus(patch.status, current.status),
|
|
574
|
-
updatedAt: nowTs,
|
|
575
|
-
}),
|
|
576
|
-
compact: compactPlanSteps,
|
|
577
|
-
})
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (mission.waitState?.reason || mission.blockerSummary) {
|
|
581
|
-
const blockerSummary = cleanText(mission.waitState?.reason || mission.blockerSummary, 280)
|
|
582
|
-
if (blockerSummary) {
|
|
583
|
-
next.blockers = upsertItems(next.blockers, [{
|
|
584
|
-
summary: blockerSummary,
|
|
585
|
-
kind: mission.waitState?.kind === 'approval'
|
|
586
|
-
? 'approval'
|
|
587
|
-
: mission.waitState?.kind === 'human_reply'
|
|
588
|
-
? 'human_input'
|
|
589
|
-
: mission.waitState?.kind === 'external_dependency' || mission.waitState?.kind === 'provider'
|
|
590
|
-
? 'external_dependency'
|
|
591
|
-
: mission.status === 'failed'
|
|
592
|
-
? 'error'
|
|
593
|
-
: 'other',
|
|
594
|
-
nextAction: mission.currentStep || null,
|
|
595
|
-
status: mission.status === 'completed' ? 'resolved' : 'active',
|
|
596
|
-
}], blockerUpsertConfig())
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
if (mission.status === 'completed') {
|
|
601
|
-
next.blockers = next.blockers.map((blocker) => blocker.status === 'active'
|
|
602
|
-
? { ...blocker, status: 'resolved', updatedAt: now() }
|
|
603
|
-
: blocker)
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
return next
|
|
607
|
-
}
|
|
608
517
|
|
|
609
518
|
// ---------------------------------------------------------------------------
|
|
610
519
|
// upsertItems & upsertConfig factories
|
|
@@ -647,7 +556,6 @@ export function factUpsertConfig(): UpsertConfig<WorkingFact, WorkingFactPatch>
|
|
|
647
556
|
source: patch.source === 'user'
|
|
648
557
|
|| patch.source === 'tool'
|
|
649
558
|
|| patch.source === 'assistant'
|
|
650
|
-
|| patch.source === 'mission'
|
|
651
559
|
|| patch.source === 'system'
|
|
652
560
|
? patch.source
|
|
653
561
|
: 'assistant',
|
|
@@ -662,7 +570,6 @@ export function factUpsertConfig(): UpsertConfig<WorkingFact, WorkingFactPatch>
|
|
|
662
570
|
source: patch.source === 'user'
|
|
663
571
|
|| patch.source === 'tool'
|
|
664
572
|
|| patch.source === 'assistant'
|
|
665
|
-
|| patch.source === 'mission'
|
|
666
573
|
|| patch.source === 'system'
|
|
667
574
|
? patch.source
|
|
668
575
|
: current.source,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { genId } from '@/lib/id'
|
|
2
2
|
import { cleanText, cleanMultiline, normalizeList } from '@/lib/server/text-normalization'
|
|
3
3
|
import type {
|
|
4
|
-
Mission,
|
|
5
4
|
SessionWorkingState,
|
|
6
5
|
WorkingBlocker,
|
|
7
6
|
WorkingPlanStepPatch,
|
|
@@ -20,7 +19,6 @@ import {
|
|
|
20
19
|
normalizeWorkingState,
|
|
21
20
|
defaultWorkingState,
|
|
22
21
|
compactWorkingStateObject,
|
|
23
|
-
syncWorkingStateWithMission,
|
|
24
22
|
normalizeItemStatus,
|
|
25
23
|
normalizeStateStatus,
|
|
26
24
|
upsertItems,
|
|
@@ -96,8 +94,6 @@ export {
|
|
|
96
94
|
compactPlanSteps,
|
|
97
95
|
defaultWorkingState,
|
|
98
96
|
compactWorkingStateObject,
|
|
99
|
-
missionStatusToWorkingStateStatus,
|
|
100
|
-
syncWorkingStateWithMission,
|
|
101
97
|
// Upsert
|
|
102
98
|
upsertItems,
|
|
103
99
|
factUpsertConfig,
|
|
@@ -142,14 +138,14 @@ export { buildWorkingStatePromptBlockFromState } from '@/lib/server/working-stat
|
|
|
142
138
|
// CRUD / coordination layer
|
|
143
139
|
// ---------------------------------------------------------------------------
|
|
144
140
|
|
|
145
|
-
export function loadSessionWorkingState(sessionId: string
|
|
141
|
+
export function loadSessionWorkingState(sessionId: string): SessionWorkingState | null {
|
|
146
142
|
const stored = loadPersistedWorkingState(sessionId)
|
|
147
|
-
if (!stored
|
|
148
|
-
return normalizeWorkingState(stored, sessionId
|
|
143
|
+
if (!stored) return null
|
|
144
|
+
return normalizeWorkingState(stored, sessionId)
|
|
149
145
|
}
|
|
150
146
|
|
|
151
|
-
export function getOrCreateSessionWorkingState(sessionId: string
|
|
152
|
-
return loadSessionWorkingState(sessionId
|
|
147
|
+
export function getOrCreateSessionWorkingState(sessionId: string): SessionWorkingState {
|
|
148
|
+
return loadSessionWorkingState(sessionId) || defaultWorkingState(sessionId)
|
|
153
149
|
}
|
|
154
150
|
|
|
155
151
|
export function saveSessionWorkingState(state: SessionWorkingState): SessionWorkingState {
|
|
@@ -165,12 +161,10 @@ export function deleteSessionWorkingState(sessionId: string): void {
|
|
|
165
161
|
export function applyWorkingStatePatch(
|
|
166
162
|
sessionId: string,
|
|
167
163
|
patch: WorkingStatePatch,
|
|
168
|
-
options?: { mission?: Mission | null },
|
|
169
164
|
): SessionWorkingState {
|
|
170
|
-
const current = getOrCreateSessionWorkingState(sessionId
|
|
165
|
+
const current = getOrCreateSessionWorkingState(sessionId)
|
|
171
166
|
const next: SessionWorkingState = {
|
|
172
167
|
...current,
|
|
173
|
-
missionId: options?.mission?.id || current.missionId || null,
|
|
174
168
|
objective: patch.objective !== undefined ? (cleanMultiline(patch.objective, 900) || null) : current.objective,
|
|
175
169
|
summary: patch.summary !== undefined ? (cleanMultiline(patch.summary, 600) || null) : current.summary,
|
|
176
170
|
constraints: patch.constraints !== undefined ? normalizeList(patch.constraints, 12, 240) : current.constraints,
|
|
@@ -215,16 +209,15 @@ export function applyWorkingStatePatch(
|
|
|
215
209
|
next.openQuestions = markSuperseded(next.openQuestions, patch.supersedeIds)
|
|
216
210
|
next.hypotheses = markSuperseded(next.hypotheses, patch.supersedeIds)
|
|
217
211
|
|
|
218
|
-
const
|
|
219
|
-
upsertPersistedWorkingState(sessionId,
|
|
220
|
-
return
|
|
212
|
+
const compacted = compactWorkingStateObject(next)
|
|
213
|
+
upsertPersistedWorkingState(sessionId, compacted as unknown as Record<string, unknown>)
|
|
214
|
+
return compacted
|
|
221
215
|
}
|
|
222
216
|
|
|
223
217
|
export function recordWorkingStateEvidence(input: WorkingStateDeterministicUpdateInput): SessionWorkingState {
|
|
224
218
|
return applyWorkingStatePatch(
|
|
225
219
|
input.sessionId,
|
|
226
220
|
deterministicEvidencePatch(input),
|
|
227
|
-
{ mission: input.mission || null },
|
|
228
221
|
)
|
|
229
222
|
}
|
|
230
223
|
|
|
@@ -241,12 +234,11 @@ export async function synchronizeWorkingStateForTurn(
|
|
|
241
234
|
currentState: deterministic,
|
|
242
235
|
}, options)
|
|
243
236
|
if (!patch) return deterministic
|
|
244
|
-
return applyWorkingStatePatch(input.sessionId, patch
|
|
237
|
+
return applyWorkingStatePatch(input.sessionId, patch)
|
|
245
238
|
}
|
|
246
239
|
|
|
247
240
|
export function syncWorkingStateFromMainLoopState(input: {
|
|
248
241
|
sessionId: string
|
|
249
|
-
mission?: Mission | null
|
|
250
242
|
goal?: string | null
|
|
251
243
|
summary?: string | null
|
|
252
244
|
status?: WorkingStateStatus | null
|
|
@@ -281,13 +273,12 @@ export function syncWorkingStateFromMainLoopState(input: {
|
|
|
281
273
|
status: (input.status === 'completed' ? 'resolved' : 'active') as WorkingStateItemStatus,
|
|
282
274
|
})).filter((fact) => fact.statement)
|
|
283
275
|
: undefined,
|
|
284
|
-
}
|
|
276
|
+
})
|
|
285
277
|
}
|
|
286
278
|
|
|
287
279
|
export function buildWorkingStatePromptBlock(
|
|
288
280
|
sessionId: string,
|
|
289
|
-
options?: { mission?: Mission | null },
|
|
290
281
|
): string {
|
|
291
|
-
const state = loadSessionWorkingState(sessionId
|
|
282
|
+
const state = loadSessionWorkingState(sessionId)
|
|
292
283
|
return buildWorkingStatePromptBlockFromState(state)
|
|
293
284
|
}
|
|
@@ -31,7 +31,7 @@ describe('stripInternalJson', () => {
|
|
|
31
31
|
})
|
|
32
32
|
|
|
33
33
|
it('removes JSON with nested objects when internal keys are present', () => {
|
|
34
|
-
const input = '{ "
|
|
34
|
+
const input = '{ "isDeliverableTask": true, "details": { "amount": 100 } }'
|
|
35
35
|
assert.equal(stripInternalJson(input).trim(), '')
|
|
36
36
|
})
|
|
37
37
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
|
|
17
17
|
const INTERNAL_JSON_KEYS = [
|
|
18
|
-
'isDeliverableTask', 'quality_score', 'isBroadGoal',
|
|
18
|
+
'isDeliverableTask', 'quality_score', 'isBroadGoal',
|
|
19
19
|
'hasHumanSignals', 'explicitToolRequests', 'isResearchSynthesis', 'confidence',
|
|
20
20
|
]
|
|
21
21
|
|
|
@@ -23,7 +23,6 @@ export const AVAILABLE_TOOLS: ToolDefinition[] = [
|
|
|
23
23
|
{ id: 'delegate', label: 'Delegate', description: 'Delegate complex tasks to specialized backends (Claude Code, Codex, OpenCode)' },
|
|
24
24
|
{ id: 'browser', label: 'Browser', description: 'Playwright — browse, scrape, interact with web pages' },
|
|
25
25
|
{ id: 'memory', label: 'Memory', description: 'Store and retrieve long-term memories across conversations' },
|
|
26
|
-
{ id: 'wallet', label: 'Wallet', description: 'Manage agent crypto wallet — check balance, send SOL, view transactions', extensionId: 'wallet' },
|
|
27
26
|
{ id: 'monitor', label: 'Monitor', description: 'Durable watch jobs: monitor files, endpoints, tasks, and resume agents on triggers' },
|
|
28
27
|
{ id: 'extension_creator', label: 'Extension Creator', description: 'Design focused extensions for durable capabilities and recurring automations' },
|
|
29
28
|
{ id: 'image_gen', label: 'Image Generation', description: 'Generate images from text prompts using OpenAI, Stability AI, Replicate, fal.ai, and more', extensionId: 'image_gen' },
|
|
@@ -137,7 +137,7 @@ export const ConnectorCreateSchema = z.object({
|
|
|
137
137
|
name: z.string().min(1, 'Connector name is required').optional(),
|
|
138
138
|
platform: z.enum([
|
|
139
139
|
'discord', 'telegram', 'slack', 'whatsapp', 'openclaw',
|
|
140
|
-
'bluebubbles', 'signal', 'teams', 'googlechat', 'matrix', 'email',
|
|
140
|
+
'bluebubbles', 'signal', 'teams', 'googlechat', 'matrix', 'email', 'swarmdock',
|
|
141
141
|
]),
|
|
142
142
|
agentId: z.string().nullable().optional().default(null),
|
|
143
143
|
chatroomId: z.string().nullable().optional().default(null),
|
|
@@ -396,7 +396,6 @@ export const ProtocolRunCreateSchema = z.object({
|
|
|
396
396
|
participantAgentIds: z.array(z.string()).min(1, 'Select at least one participant').default([]),
|
|
397
397
|
facilitatorAgentId: z.string().nullable().optional().default(null),
|
|
398
398
|
observerAgentIds: z.array(z.string()).optional().default([]),
|
|
399
|
-
missionId: z.string().nullable().optional().default(null),
|
|
400
399
|
taskId: z.string().nullable().optional().default(null),
|
|
401
400
|
sessionId: z.string().nullable().optional().default(null),
|
|
402
401
|
parentChatroomId: z.string().nullable().optional().default(null),
|
|
@@ -473,6 +472,38 @@ export const ProtocolRunActionSchema = z.object({
|
|
|
473
472
|
workItemId: z.string().nullable().optional().default(null),
|
|
474
473
|
})
|
|
475
474
|
|
|
475
|
+
const PortableAgentSchema = z.object({
|
|
476
|
+
originalId: z.string().min(1),
|
|
477
|
+
name: z.string().min(1),
|
|
478
|
+
description: z.string(),
|
|
479
|
+
systemPrompt: z.string(),
|
|
480
|
+
provider: z.string().min(1),
|
|
481
|
+
model: z.string().min(1),
|
|
482
|
+
createdAt: z.number().optional(),
|
|
483
|
+
updatedAt: z.number().optional(),
|
|
484
|
+
skillIds: z.array(z.string()).optional(),
|
|
485
|
+
}).passthrough()
|
|
486
|
+
|
|
487
|
+
const PortableSkillSchema = z.object({
|
|
488
|
+
originalId: z.string().min(1),
|
|
489
|
+
name: z.string().min(1),
|
|
490
|
+
content: z.string(),
|
|
491
|
+
}).passthrough()
|
|
492
|
+
|
|
493
|
+
const PortableScheduleSchema = z.object({
|
|
494
|
+
originalId: z.string().min(1),
|
|
495
|
+
originalAgentId: z.string().min(1),
|
|
496
|
+
name: z.string().min(1),
|
|
497
|
+
}).passthrough()
|
|
498
|
+
|
|
499
|
+
export const PortableManifestSchema = z.object({
|
|
500
|
+
formatVersion: z.number().int().nonnegative(),
|
|
501
|
+
exportedAt: z.string().optional(),
|
|
502
|
+
agents: z.array(PortableAgentSchema),
|
|
503
|
+
skills: z.array(PortableSkillSchema),
|
|
504
|
+
schedules: z.array(PortableScheduleSchema),
|
|
505
|
+
})
|
|
506
|
+
|
|
476
507
|
/** Format ZodError into a 400-friendly payload */
|
|
477
508
|
export function formatZodError(err: z.ZodError) {
|
|
478
509
|
return { error: 'Validation failed', issues: err.issues.map((i) => ({ path: i.path.join('.'), message: i.message })) }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StateCreator } from 'zustand'
|
|
2
2
|
import type { AppState } from '../use-app-store'
|
|
3
|
-
import type { NetworkInfo, Directory, ProviderInfo, Credentials, Schedule, AppSettings, StoredSecret, ProviderConfig, Skill, Connector, Webhook, McpServerConfig, ExtensionMeta, Project, ActivityEntry, AppNotification, GatewayProfile } from '../../types'
|
|
3
|
+
import type { NetworkInfo, Directory, ProviderInfo, Credentials, Schedule, AppSettings, StoredSecret, ProviderConfig, Skill, Connector, Webhook, McpServerConfig, ExtensionMeta, Project, ActivityEntry, AppNotification, GatewayProfile, SafeWallet } from '../../types'
|
|
4
4
|
import { api } from '@/lib/app/api-client'
|
|
5
5
|
import { safeStorageGetJson, safeStorageSet } from '@/lib/app/safe-storage'
|
|
6
6
|
import { fetchDirs, fetchProviders, fetchCredentials } from '@/lib/chat/chats'
|
|
@@ -24,6 +24,8 @@ export interface DataSlice {
|
|
|
24
24
|
updateSettings: (patch: Partial<AppSettings>) => Promise<void>
|
|
25
25
|
secrets: Record<string, StoredSecret>
|
|
26
26
|
loadSecrets: () => Promise<void>
|
|
27
|
+
wallets: Record<string, SafeWallet>
|
|
28
|
+
loadWallets: () => Promise<void>
|
|
27
29
|
providerConfigs: ProviderConfig[]
|
|
28
30
|
loadProviderConfigs: () => Promise<void>
|
|
29
31
|
gatewayProfiles: GatewayProfile[]
|
|
@@ -78,6 +80,8 @@ export const createDataSlice: StateCreator<AppState, [], [], DataSlice> = (set,
|
|
|
78
80
|
},
|
|
79
81
|
secrets: {},
|
|
80
82
|
loadSecrets: createLoader<AppState>(set, 'secrets', () => api<Record<string, StoredSecret>>('GET', '/secrets'), {}),
|
|
83
|
+
wallets: {},
|
|
84
|
+
loadWallets: createLoader<AppState>(set, 'wallets', () => api<Record<string, SafeWallet>>('GET', '/wallets'), {}),
|
|
81
85
|
providerConfigs: [],
|
|
82
86
|
loadProviderConfigs: createLoader<AppState>(set, 'providerConfigs', () => api<ProviderConfig[]>('GET', '/providers/configs'), []),
|
|
83
87
|
gatewayProfiles: [],
|
|
@@ -95,8 +95,6 @@ export interface UiSlice {
|
|
|
95
95
|
setFleetFilter: (filter: FleetFilter) => void
|
|
96
96
|
chatFilter: 'all' | 'active' | 'recent'
|
|
97
97
|
setChatFilter: (filter: 'all' | 'active' | 'recent') => void
|
|
98
|
-
walletPanelAgentId: string | null
|
|
99
|
-
setWalletPanelAgentId: (id: string | null) => void
|
|
100
98
|
heartbeatHistoryOpen: boolean
|
|
101
99
|
setHeartbeatHistoryOpen: (open: boolean) => void
|
|
102
100
|
agentPrefill: Partial<Agent> | null
|
|
@@ -195,8 +193,6 @@ export const createUiSlice: StateCreator<AppState, [], [], UiSlice> = (set, get)
|
|
|
195
193
|
setFleetFilter: (filter) => { safeStorageSet('sc_fleet_filter', filter); set({ fleetFilter: filter }) },
|
|
196
194
|
chatFilter: 'all' as const,
|
|
197
195
|
setChatFilter: (filter) => set({ chatFilter: filter }),
|
|
198
|
-
walletPanelAgentId: null,
|
|
199
|
-
setWalletPanelAgentId: (id) => set({ walletPanelAgentId: id }),
|
|
200
196
|
heartbeatHistoryOpen: false,
|
|
201
197
|
setHeartbeatHistoryOpen: (open) => set({ heartbeatHistoryOpen: open }),
|
|
202
198
|
agentPrefill: null,
|
package/src/types/agent.ts
CHANGED
|
@@ -83,10 +83,6 @@ export interface Agent {
|
|
|
83
83
|
trashedAt?: number
|
|
84
84
|
openclawSkillMode?: SkillAllowlistMode
|
|
85
85
|
openclawAllowedSkills?: string[]
|
|
86
|
-
walletIds?: string[]
|
|
87
|
-
activeWalletId?: string | null
|
|
88
|
-
/** @deprecated Use walletIds + activeWalletId */
|
|
89
|
-
walletId?: string | null
|
|
90
86
|
responseStyle?: 'concise' | 'normal' | 'detailed' | null
|
|
91
87
|
responseMaxChars?: number | null
|
|
92
88
|
monthlyBudget?: number | null
|
|
@@ -171,86 +167,6 @@ export interface Agent {
|
|
|
171
167
|
updatedAt: number
|
|
172
168
|
}
|
|
173
169
|
|
|
174
|
-
// --- Agent Wallets ---
|
|
175
|
-
|
|
176
|
-
export type WalletChain = 'solana' | 'ethereum'
|
|
177
|
-
|
|
178
|
-
export interface AgentWallet {
|
|
179
|
-
id: string
|
|
180
|
-
agentId: string
|
|
181
|
-
chain: WalletChain
|
|
182
|
-
publicKey: string
|
|
183
|
-
encryptedPrivateKey: string // AES-256-GCM via encryptKey()
|
|
184
|
-
label?: string
|
|
185
|
-
spendingLimitAtomic?: string
|
|
186
|
-
dailyLimitAtomic?: string
|
|
187
|
-
/** @deprecated Use spendingLimitAtomic */
|
|
188
|
-
spendingLimitLamports?: number
|
|
189
|
-
/** @deprecated Use dailyLimitAtomic */
|
|
190
|
-
dailyLimitLamports?: number
|
|
191
|
-
requireApproval: boolean // default true; can be globally overridden by app settings
|
|
192
|
-
createdAt: number
|
|
193
|
-
updatedAt: number
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export interface WalletAssetBalance {
|
|
197
|
-
id: string
|
|
198
|
-
chain: WalletChain
|
|
199
|
-
networkId: string
|
|
200
|
-
networkLabel: string
|
|
201
|
-
symbol: string
|
|
202
|
-
name?: string
|
|
203
|
-
decimals: number
|
|
204
|
-
balanceAtomic: string
|
|
205
|
-
balanceFormatted?: string
|
|
206
|
-
balanceDisplay?: string
|
|
207
|
-
isNative: boolean
|
|
208
|
-
contractAddress?: string
|
|
209
|
-
tokenMint?: string
|
|
210
|
-
explorerUrl?: string
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export interface WalletPortfolioSummary {
|
|
214
|
-
totalAssets: number
|
|
215
|
-
nonZeroAssets: number
|
|
216
|
-
tokenAssets: number
|
|
217
|
-
networkCount: number
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export type WalletTransactionType = 'send' | 'receive' | 'swap'
|
|
221
|
-
export type WalletTransactionStatus = 'pending_approval' | 'pending' | 'confirmed' | 'failed' | 'denied'
|
|
222
|
-
|
|
223
|
-
export interface WalletTransaction {
|
|
224
|
-
id: string
|
|
225
|
-
walletId: string
|
|
226
|
-
agentId: string
|
|
227
|
-
chain: WalletChain
|
|
228
|
-
type: WalletTransactionType
|
|
229
|
-
signature: string
|
|
230
|
-
fromAddress: string
|
|
231
|
-
toAddress: string
|
|
232
|
-
amountAtomic?: string
|
|
233
|
-
feeAtomic?: string
|
|
234
|
-
/** @deprecated Use amountAtomic */
|
|
235
|
-
amountLamports?: number
|
|
236
|
-
/** @deprecated Use feeAtomic */
|
|
237
|
-
feeLamports?: number
|
|
238
|
-
status: WalletTransactionStatus
|
|
239
|
-
memo?: string // agent's reason for tx
|
|
240
|
-
approvedBy?: 'user' | 'auto'
|
|
241
|
-
tokenMint?: string // null = native chain asset
|
|
242
|
-
timestamp: number
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface WalletBalanceSnapshot {
|
|
246
|
-
id: string
|
|
247
|
-
walletId: string
|
|
248
|
-
balanceAtomic?: string
|
|
249
|
-
/** @deprecated Use balanceAtomic */
|
|
250
|
-
balanceLamports?: number
|
|
251
|
-
timestamp: number
|
|
252
|
-
}
|
|
253
|
-
|
|
254
170
|
export type AgentTool = 'browser'
|
|
255
171
|
|
|
256
172
|
export interface ClaudeSkill {
|
|
@@ -73,7 +73,6 @@ export interface AppSettings {
|
|
|
73
73
|
safetyRequireApprovalForOutbound?: boolean
|
|
74
74
|
safetyMaxDailySpendUsd?: number | null
|
|
75
75
|
safetyBlockedTools?: string[]
|
|
76
|
-
walletApprovalsEnabled?: boolean
|
|
77
76
|
capabilityPolicyMode?: 'permissive' | 'balanced' | 'strict'
|
|
78
77
|
capabilityBlockedTools?: string[]
|
|
79
78
|
capabilityBlockedCategories?: string[]
|
|
@@ -96,7 +95,6 @@ export interface AppSettings {
|
|
|
96
95
|
supervisorNoProgressLimit?: number
|
|
97
96
|
supervisorRepeatedToolLimit?: number
|
|
98
97
|
autonomyResumeApprovalsEnabled?: boolean
|
|
99
|
-
missionHumanLoopEnabled?: boolean
|
|
100
98
|
reflectionEnabled?: boolean
|
|
101
99
|
reflectionAutoWriteMemory?: boolean
|
|
102
100
|
memoryReferenceDepth?: number
|
package/src/types/approval.ts
CHANGED
package/src/types/connector.ts
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from './message'
|
|
|
2
2
|
export * from './session'
|
|
3
3
|
export * from './agent'
|
|
4
4
|
export * from './working-state'
|
|
5
|
-
export * from './mission'
|
|
6
5
|
export * from './extension'
|
|
7
6
|
export * from './connector'
|
|
8
7
|
export * from './provider'
|
|
@@ -14,3 +13,4 @@ export * from './skill'
|
|
|
14
13
|
export * from './run'
|
|
15
14
|
export * from './approval'
|
|
16
15
|
export * from './misc'
|
|
16
|
+
export * from './swarmdock'
|
package/src/types/message.ts
CHANGED
|
@@ -15,7 +15,6 @@ export type MessageWorkType = 'coding' | 'research' | 'writing' | 'review' | 'op
|
|
|
15
15
|
export interface MessageSemanticsSummary {
|
|
16
16
|
taskIntent: MessageTaskIntent
|
|
17
17
|
workType: MessageWorkType
|
|
18
|
-
walletIntent: 'none' | 'read_only' | 'transactional'
|
|
19
18
|
isDeliverableTask: boolean
|
|
20
19
|
isBroadGoal: boolean
|
|
21
20
|
isResearchSynthesis: boolean
|
package/src/types/misc.ts
CHANGED
|
@@ -388,8 +388,6 @@ export interface DelegationJobRecord {
|
|
|
388
388
|
kind: DelegationJobKind
|
|
389
389
|
status: DelegationJobStatus
|
|
390
390
|
backend?: 'claude' | 'codex' | 'opencode' | 'gemini' | null
|
|
391
|
-
missionId?: string | null
|
|
392
|
-
parentMissionId?: string | null
|
|
393
391
|
parentSessionId?: string | null
|
|
394
392
|
childSessionId?: string | null
|
|
395
393
|
agentId?: string | null
|
package/src/types/protocol.ts
CHANGED
|
@@ -122,7 +122,6 @@ export type ProtocolSourceRef =
|
|
|
122
122
|
| { kind: 'api' }
|
|
123
123
|
| { kind: 'session'; sessionId: string }
|
|
124
124
|
| { kind: 'chatroom'; chatroomId: string }
|
|
125
|
-
| { kind: 'mission'; missionId: string }
|
|
126
125
|
| { kind: 'task'; taskId: string }
|
|
127
126
|
| { kind: 'schedule'; scheduleId: string }
|
|
128
127
|
| { kind: 'protocol_run'; runId: string; parentRunId?: string | null; stepId?: string | null; branchId?: string | null }
|
|
@@ -319,7 +318,6 @@ export interface ProtocolRun {
|
|
|
319
318
|
participantAgentIds: string[]
|
|
320
319
|
facilitatorAgentId?: string | null
|
|
321
320
|
observerAgentIds?: string[]
|
|
322
|
-
missionId?: string | null
|
|
323
321
|
taskId?: string | null
|
|
324
322
|
sessionId?: string | null
|
|
325
323
|
parentRunId?: string | null
|
package/src/types/run.ts
CHANGED
|
@@ -17,7 +17,6 @@ export type ExecutionOwnerType =
|
|
|
17
17
|
| 'task'
|
|
18
18
|
| 'protocol_run'
|
|
19
19
|
| 'schedule'
|
|
20
|
-
| 'mission'
|
|
21
20
|
| 'agent'
|
|
22
21
|
| 'subagent'
|
|
23
22
|
|
|
@@ -48,7 +47,6 @@ export interface SessionRunRecoveryPayload {
|
|
|
48
47
|
export interface SessionRunRecord {
|
|
49
48
|
id: string
|
|
50
49
|
sessionId: string
|
|
51
|
-
missionId?: string | null
|
|
52
50
|
kind?: ExecutionKind
|
|
53
51
|
ownerType?: ExecutionOwnerType | null
|
|
54
52
|
ownerId?: string | null
|
|
@@ -78,7 +76,6 @@ export interface SessionRunRecord {
|
|
|
78
76
|
export interface SessionQueuedTurn {
|
|
79
77
|
runId: string
|
|
80
78
|
sessionId: string
|
|
81
|
-
missionId?: string | null
|
|
82
79
|
text: string
|
|
83
80
|
queuedAt: number
|
|
84
81
|
position: number
|