repoburg 1.3.201 → 1.3.204
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/agent-pane/backend/dist/index.js +2714 -32395
- package/agent-pane/backend/dist/server.js +45304 -0
- package/askuser-after-step5-postgres-selected.png +0 -0
- package/askuser-after-step7-answer-sent.png +0 -0
- package/askuser-card-visible.png +0 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.d.ts +16 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js +87 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js.map +1 -1
- package/backend/dist/src/agent-runtime/agent-runtime.types.d.ts +16 -1
- package/backend/dist/src/app.controller.d.ts +1 -0
- package/backend/dist/src/app.service.d.ts +1 -0
- package/backend/dist/src/app.service.js +4 -1
- package/backend/dist/src/app.service.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.service.d.ts +4 -0
- package/backend/dist/src/interactive-chat/chat.service.js +21 -1
- package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +12 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +2 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/daemon/dist/agentPane.js +128 -0
- package/daemon/dist/agentPane.spec.js +183 -0
- package/daemon/dist/api/services.js +4 -0
- package/daemon/dist/index.js +28 -8
- package/daemon/dist/serviceManager.js +30 -11
- package/daemon/dist/serviceManager.spec.js +26 -0
- package/daemon/dist/workspace-validation.js +63 -0
- package/daemon/dist/workspace-validation.spec.js +63 -0
- package/daemon/package.json +1 -1
- package/package.json +15 -2
- package/r2-step4-apple-banana.png +0 -0
- package/r2-step5-after-rewind-apple-last.png +0 -0
- package/r2-step7-apple-cherry.png +0 -0
- package/r2-step8-cherry-menu-no-restore.png +0 -0
- package/r3-step3-live-task-card-running.png +0 -0
- package/r3-step4-after-completion.png +0 -0
- package/r3-step5-persistence-after-reload.png +0 -0
- package/r3-step6-tasks-tab-card.png +0 -0
- package/reverify-answered-state-answer-sent.png +0 -0
- package/reverify-card-visible-after-completion.png +0 -0
- package/rewind-step3-apple-banana-turns.png +0 -0
- package/rewind-step5-ui-unchanged-after-confirmed-rewind.png +0 -0
- package/rewind-step6-apple-menu-no-restore.png +0 -0
- package/rewind-step7-final-turnlist-unchanged.png +0 -0
- package/rewind-step7-negative-error-toast.png +0 -0
- package/rewind-step7-negative-error-toast2.png +0 -0
- package/subagent-r2-step5-turn-after-reload-no-card.png +0 -0
- package/subagent-r2-step6-tasks-panel-card.png +0 -0
- package/subagent-step3-tasks-tab-done-card.png +0 -0
- package/subagent-step4-turn-stuck-no-cards.png +0 -0
- package/agent-pane/.prettierignore +0 -5
- package/agent-pane/.prettierrc +0 -8
- package/agent-pane/backend/coverage/base.css +0 -224
- package/agent-pane/backend/coverage/block-navigation.js +0 -87
- package/agent-pane/backend/coverage/clover.xml +0 -887
- package/agent-pane/backend/coverage/coverage-final.json +0 -10
- package/agent-pane/backend/coverage/favicon.png +0 -0
- package/agent-pane/backend/coverage/index.html +0 -176
- package/agent-pane/backend/coverage/prettify.css +0 -1
- package/agent-pane/backend/coverage/prettify.js +0 -2
- package/agent-pane/backend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/backend/coverage/sorter.js +0 -210
- package/agent-pane/backend/coverage/src/codex/codex-provider.ts.html +0 -1402
- package/agent-pane/backend/coverage/src/codex/index.html +0 -131
- package/agent-pane/backend/coverage/src/codex/item-mapper.ts.html +0 -331
- package/agent-pane/backend/coverage/src/db/index.html +0 -131
- package/agent-pane/backend/coverage/src/db/index.ts.html +0 -436
- package/agent-pane/backend/coverage/src/db/schema.ts.html +0 -175
- package/agent-pane/backend/coverage/src/index.html +0 -116
- package/agent-pane/backend/coverage/src/index.ts.html +0 -262
- package/agent-pane/backend/coverage/src/routes/index.html +0 -146
- package/agent-pane/backend/coverage/src/routes/sessions.ts.html +0 -991
- package/agent-pane/backend/coverage/src/routes/turns.ts.html +0 -256
- package/agent-pane/backend/coverage/src/routes/workspaces.ts.html +0 -406
- package/agent-pane/backend/coverage/src/ws/index.html +0 -116
- package/agent-pane/backend/coverage/src/ws/index.ts.html +0 -238
- package/agent-pane/backend/data.db +0 -0
- package/agent-pane/backend/data.db-shm +0 -0
- package/agent-pane/backend/data.db-wal +0 -0
- package/agent-pane/backend/package-lock.json +0 -5945
- package/agent-pane/backend/package.json +0 -33
- package/agent-pane/backend/scripts/backfill-from-jsonl.ts +0 -206
- package/agent-pane/backend/scripts/import-session-from-jsonl.ts +0 -264
- package/agent-pane/backend/src/claude/claude-message-mapper.test.ts +0 -271
- package/agent-pane/backend/src/claude/claude-message-mapper.ts +0 -259
- package/agent-pane/backend/src/claude/claude-provider.test.ts +0 -455
- package/agent-pane/backend/src/claude/claude-provider.ts +0 -1319
- package/agent-pane/backend/src/claude/claude-types.ts +0 -45
- package/agent-pane/backend/src/codex/app-server-client.test.ts +0 -183
- package/agent-pane/backend/src/codex/app-server-client.ts +0 -247
- package/agent-pane/backend/src/codex/app-server-types.ts +0 -259
- package/agent-pane/backend/src/codex/codex-provider-runtime-config.test.ts +0 -56
- package/agent-pane/backend/src/codex/codex-provider.test.ts +0 -60
- package/agent-pane/backend/src/codex/codex-provider.ts +0 -619
- package/agent-pane/backend/src/codex/item-mapper.test.ts +0 -221
- package/agent-pane/backend/src/codex/item-mapper.ts +0 -86
- package/agent-pane/backend/src/codex/shared-app-server.ts +0 -25
- package/agent-pane/backend/src/db/index.test.ts +0 -125
- package/agent-pane/backend/src/db/index.ts +0 -230
- package/agent-pane/backend/src/db/schema.ts +0 -34
- package/agent-pane/backend/src/index.ts +0 -89
- package/agent-pane/backend/src/integration/__fixtures__/cancel-turn.json +0 -29
- package/agent-pane/backend/src/integration/__fixtures__/delta-streaming.json +0 -40
- package/agent-pane/backend/src/integration/__fixtures__/failed-turn.json +0 -16
- package/agent-pane/backend/src/integration/__fixtures__/mcp-tool-call.json +0 -60
- package/agent-pane/backend/src/integration/__fixtures__/missing-item-started.json +0 -34
- package/agent-pane/backend/src/integration/__fixtures__/multi-item-turn.json +0 -85
- package/agent-pane/backend/src/integration/__fixtures__/multi-turn.json +0 -48
- package/agent-pane/backend/src/integration/__fixtures__/simple-turn.json +0 -35
- package/agent-pane/backend/src/integration/delta-streaming.test.ts +0 -130
- package/agent-pane/backend/src/integration/helpers/app-server-mock.ts +0 -272
- package/agent-pane/backend/src/integration/helpers/test-app.ts +0 -110
- package/agent-pane/backend/src/integration/helpers/ws-capture.ts +0 -64
- package/agent-pane/backend/src/integration/item-lifecycle.test.ts +0 -133
- package/agent-pane/backend/src/integration/mcp-tool-call.test.ts +0 -102
- package/agent-pane/backend/src/integration/missing-item-started.test.ts +0 -91
- package/agent-pane/backend/src/integration/multi-turn.test.ts +0 -121
- package/agent-pane/backend/src/integration/session-operations.test.ts +0 -175
- package/agent-pane/backend/src/integration/threads-claude-fork.test.ts +0 -241
- package/agent-pane/backend/src/integration/threads.test.ts +0 -309
- package/agent-pane/backend/src/integration/title-generation.test.ts +0 -109
- package/agent-pane/backend/src/integration/turn-cancel.test.ts +0 -111
- package/agent-pane/backend/src/integration/turn-failure.test.ts +0 -97
- package/agent-pane/backend/src/integration/turn-lifecycle.test.ts +0 -141
- package/agent-pane/backend/src/providers/index.ts +0 -16
- package/agent-pane/backend/src/providers/registry.test.ts +0 -92
- package/agent-pane/backend/src/providers/registry.ts +0 -43
- package/agent-pane/backend/src/providers/runtime-provider.ts +0 -43
- package/agent-pane/backend/src/repoburg/action-mapping.ts +0 -216
- package/agent-pane/backend/src/repoburg/agent-runtime-client.test.ts +0 -271
- package/agent-pane/backend/src/repoburg/agent-runtime-client.ts +0 -262
- package/agent-pane/backend/src/repoburg/backend-resolver.test.ts +0 -271
- package/agent-pane/backend/src/repoburg/backend-resolver.ts +0 -246
- package/agent-pane/backend/src/repoburg/repoburg-client.test.ts +0 -159
- package/agent-pane/backend/src/repoburg/repoburg-client.ts +0 -181
- package/agent-pane/backend/src/repoburg/repoburg-provider.test.ts +0 -723
- package/agent-pane/backend/src/repoburg/repoburg-provider.ts +0 -422
- package/agent-pane/backend/src/repoburg/turn-projector.test.ts +0 -475
- package/agent-pane/backend/src/repoburg/turn-projector.ts +0 -537
- package/agent-pane/backend/src/routes/files.ts +0 -31
- package/agent-pane/backend/src/routes/mcp.ts +0 -33
- package/agent-pane/backend/src/routes/models.test.ts +0 -92
- package/agent-pane/backend/src/routes/models.ts +0 -16
- package/agent-pane/backend/src/routes/plugins.ts +0 -40
- package/agent-pane/backend/src/routes/providers.test.ts +0 -86
- package/agent-pane/backend/src/routes/providers.ts +0 -86
- package/agent-pane/backend/src/routes/sessions.test.ts +0 -558
- package/agent-pane/backend/src/routes/sessions.ts +0 -504
- package/agent-pane/backend/src/routes/skills.test.ts +0 -114
- package/agent-pane/backend/src/routes/skills.ts +0 -70
- package/agent-pane/backend/src/routes/threads.ts +0 -323
- package/agent-pane/backend/src/routes/turns.test.ts +0 -196
- package/agent-pane/backend/src/routes/turns.ts +0 -103
- package/agent-pane/backend/src/routes/workspaces.test.ts +0 -197
- package/agent-pane/backend/src/routes/workspaces.ts +0 -128
- package/agent-pane/backend/src/ws/index.test.ts +0 -107
- package/agent-pane/backend/src/ws/index.ts +0 -51
- package/agent-pane/backend/tsconfig.json +0 -25
- package/agent-pane/backend/vitest.config.ts +0 -20
- package/agent-pane/eslint.config.js +0 -33
- package/agent-pane/frontend/coverage/base.css +0 -224
- package/agent-pane/frontend/coverage/block-navigation.js +0 -87
- package/agent-pane/frontend/coverage/clover.xml +0 -2962
- package/agent-pane/frontend/coverage/coverage-final.json +0 -37
- package/agent-pane/frontend/coverage/favicon.png +0 -0
- package/agent-pane/frontend/coverage/index.html +0 -251
- package/agent-pane/frontend/coverage/prettify.css +0 -1
- package/agent-pane/frontend/coverage/prettify.js +0 -2
- package/agent-pane/frontend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/frontend/coverage/sorter.js +0 -210
- package/agent-pane/frontend/coverage/src/App.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/AppInitializer.tsx.html +0 -223
- package/agent-pane/frontend/coverage/src/api/client.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/api/index.html +0 -161
- package/agent-pane/frontend/coverage/src/api/sessions.ts.html +0 -316
- package/agent-pane/frontend/coverage/src/api/websocket.ts.html +0 -544
- package/agent-pane/frontend/coverage/src/api/workspaces.ts.html +0 -199
- package/agent-pane/frontend/coverage/src/components/CollapsibleToolCalls.tsx.html +0 -226
- package/agent-pane/frontend/coverage/src/components/CommandInputBar.tsx.html +0 -382
- package/agent-pane/frontend/coverage/src/components/CommandPalette.tsx.html +0 -715
- package/agent-pane/frontend/coverage/src/components/IdeWorkspace.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/ModelSelector.tsx.html +0 -478
- package/agent-pane/frontend/coverage/src/components/NewSessionDialog.tsx.html +0 -472
- package/agent-pane/frontend/coverage/src/components/RenderArea.tsx.html +0 -574
- package/agent-pane/frontend/coverage/src/components/RightPanel.tsx.html +0 -205
- package/agent-pane/frontend/coverage/src/components/RuntimeIcon.tsx.html +0 -133
- package/agent-pane/frontend/coverage/src/components/SessionTabs.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/components/StatusBar.tsx.html +0 -271
- package/agent-pane/frontend/coverage/src/components/StatusDot.tsx.html +0 -109
- package/agent-pane/frontend/coverage/src/components/Toast.tsx.html +0 -313
- package/agent-pane/frontend/coverage/src/components/TurnContent.tsx.html +0 -1216
- package/agent-pane/frontend/coverage/src/components/WorkspaceSidebar.tsx.html +0 -1138
- package/agent-pane/frontend/coverage/src/components/index.html +0 -326
- package/agent-pane/frontend/coverage/src/components/panels/ChangesPanel.tsx.html +0 -247
- package/agent-pane/frontend/coverage/src/components/panels/LogsPanel.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/panels/MetricsPanel.tsx.html +0 -427
- package/agent-pane/frontend/coverage/src/components/panels/TurnsPanel.tsx.html +0 -397
- package/agent-pane/frontend/coverage/src/components/panels/index.html +0 -161
- package/agent-pane/frontend/coverage/src/constants/index.html +0 -116
- package/agent-pane/frontend/coverage/src/constants/models.ts.html +0 -406
- package/agent-pane/frontend/coverage/src/hooks/index.html +0 -146
- package/agent-pane/frontend/coverage/src/hooks/useEscapeKey.ts.html +0 -124
- package/agent-pane/frontend/coverage/src/hooks/useOutsideClick.ts.html +0 -142
- package/agent-pane/frontend/coverage/src/hooks/useSessionStatus.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/index.html +0 -146
- package/agent-pane/frontend/coverage/src/main.tsx.html +0 -115
- package/agent-pane/frontend/coverage/src/store/index.html +0 -116
- package/agent-pane/frontend/coverage/src/store/store.ts.html +0 -2404
- package/agent-pane/frontend/coverage/src/test/component-helpers.ts.html +0 -190
- package/agent-pane/frontend/coverage/src/test/fixtures.ts.html +0 -367
- package/agent-pane/frontend/coverage/src/test/index.html +0 -131
- package/agent-pane/frontend/coverage/src/types/index.html +0 -116
- package/agent-pane/frontend/coverage/src/types/index.ts.html +0 -466
- package/agent-pane/frontend/coverage/src/utils/changes.ts.html +0 -202
- package/agent-pane/frontend/coverage/src/utils/duration.ts.html +0 -127
- package/agent-pane/frontend/coverage/src/utils/index.html +0 -131
- package/agent-pane/frontend/dist/assets/index-34WaZYsW.css +0 -1
- package/agent-pane/frontend/dist/assets/index-y7xlT86e.js +0 -362
- package/agent-pane/frontend/dist/index.html +0 -19
- package/agent-pane/frontend/index.html +0 -18
- package/agent-pane/frontend/package-lock.json +0 -4211
- package/agent-pane/frontend/package.json +0 -35
- package/agent-pane/frontend/src/App.test.tsx +0 -74
- package/agent-pane/frontend/src/App.tsx +0 -44
- package/agent-pane/frontend/src/AppInitializer.test.tsx +0 -142
- package/agent-pane/frontend/src/AppInitializer.tsx +0 -46
- package/agent-pane/frontend/src/__tests__/ThreadsPanel.test.tsx +0 -192
- package/agent-pane/frontend/src/api/client.test.ts +0 -126
- package/agent-pane/frontend/src/api/client.ts +0 -34
- package/agent-pane/frontend/src/api/models.ts +0 -7
- package/agent-pane/frontend/src/api/providers.ts +0 -17
- package/agent-pane/frontend/src/api/sessions.test.ts +0 -245
- package/agent-pane/frontend/src/api/sessions.ts +0 -97
- package/agent-pane/frontend/src/api/skills.ts +0 -12
- package/agent-pane/frontend/src/api/websocket.test.ts +0 -288
- package/agent-pane/frontend/src/api/websocket.ts +0 -238
- package/agent-pane/frontend/src/api/workspaces.test.ts +0 -112
- package/agent-pane/frontend/src/api/workspaces.ts +0 -38
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.test.tsx +0 -49
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.tsx +0 -56
- package/agent-pane/frontend/src/components/CommandInputBar.test.tsx +0 -133
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +0 -584
- package/agent-pane/frontend/src/components/CommandPalette.test.tsx +0 -226
- package/agent-pane/frontend/src/components/CommandPalette.tsx +0 -194
- package/agent-pane/frontend/src/components/CommentableText.test.tsx +0 -196
- package/agent-pane/frontend/src/components/CommentableText.tsx +0 -379
- package/agent-pane/frontend/src/components/IdeWorkspace.test.tsx +0 -39
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +0 -51
- package/agent-pane/frontend/src/components/ModelSelector.test.tsx +0 -129
- package/agent-pane/frontend/src/components/ModelSelector.tsx +0 -191
- package/agent-pane/frontend/src/components/NewSessionDialog.test.tsx +0 -95
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +0 -129
- package/agent-pane/frontend/src/components/RenderArea.test.tsx +0 -160
- package/agent-pane/frontend/src/components/RenderArea.tsx +0 -170
- package/agent-pane/frontend/src/components/ResizeHandle.tsx +0 -29
- package/agent-pane/frontend/src/components/RightPanel.test.tsx +0 -43
- package/agent-pane/frontend/src/components/RightPanel.tsx +0 -46
- package/agent-pane/frontend/src/components/RuntimeIcon.test.tsx +0 -32
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +0 -16
- package/agent-pane/frontend/src/components/SessionTabs.test.tsx +0 -72
- package/agent-pane/frontend/src/components/SessionTabs.tsx +0 -49
- package/agent-pane/frontend/src/components/StatusBar.test.tsx +0 -56
- package/agent-pane/frontend/src/components/StatusBar.tsx +0 -129
- package/agent-pane/frontend/src/components/StatusDot.test.tsx +0 -25
- package/agent-pane/frontend/src/components/StatusDot.tsx +0 -8
- package/agent-pane/frontend/src/components/Toast.test.tsx +0 -79
- package/agent-pane/frontend/src/components/Toast.tsx +0 -76
- package/agent-pane/frontend/src/components/TurnContent.test.tsx +0 -298
- package/agent-pane/frontend/src/components/TurnContent.tsx +0 -548
- package/agent-pane/frontend/src/components/WorkspaceSidebar.test.tsx +0 -297
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +0 -351
- package/agent-pane/frontend/src/components/input/OptionSubPopup.tsx +0 -32
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.test.tsx +0 -63
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.tsx +0 -78
- package/agent-pane/frontend/src/components/input/SlashPopup.test.tsx +0 -96
- package/agent-pane/frontend/src/components/input/SlashPopup.tsx +0 -82
- package/agent-pane/frontend/src/components/panels/ChangesPanel.test.tsx +0 -61
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +0 -54
- package/agent-pane/frontend/src/components/panels/TasksPanel.test.tsx +0 -97
- package/agent-pane/frontend/src/components/panels/TasksPanel.tsx +0 -208
- package/agent-pane/frontend/src/components/panels/ThreadsPanel.tsx +0 -382
- package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +0 -83
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +0 -126
- package/agent-pane/frontend/src/constants/models.test.ts +0 -97
- package/agent-pane/frontend/src/constants/models.ts +0 -166
- package/agent-pane/frontend/src/hooks/useEscapeKey.test.ts +0 -42
- package/agent-pane/frontend/src/hooks/useEscapeKey.ts +0 -13
- package/agent-pane/frontend/src/hooks/useOutsideClick.test.ts +0 -92
- package/agent-pane/frontend/src/hooks/useOutsideClick.ts +0 -19
- package/agent-pane/frontend/src/hooks/useProvider.ts +0 -44
- package/agent-pane/frontend/src/hooks/useResizable.test.ts +0 -97
- package/agent-pane/frontend/src/hooks/useResizable.ts +0 -75
- package/agent-pane/frontend/src/hooks/useSessionStatus.test.ts +0 -116
- package/agent-pane/frontend/src/hooks/useSessionStatus.ts +0 -34
- package/agent-pane/frontend/src/main.test.tsx +0 -37
- package/agent-pane/frontend/src/main.tsx +0 -10
- package/agent-pane/frontend/src/store/sessionSlice.ts +0 -440
- package/agent-pane/frontend/src/store/store.test.ts +0 -1319
- package/agent-pane/frontend/src/store/store.ts +0 -37
- package/agent-pane/frontend/src/store/threadSlice.ts +0 -136
- package/agent-pane/frontend/src/store/uiSlice.ts +0 -133
- package/agent-pane/frontend/src/store/workspaceSlice.ts +0 -77
- package/agent-pane/frontend/src/store/wsSlice.ts +0 -361
- package/agent-pane/frontend/src/styles/app.css +0 -611
- package/agent-pane/frontend/src/styles/tokens.css +0 -62
- package/agent-pane/frontend/src/test/component-helpers.ts +0 -38
- package/agent-pane/frontend/src/test/fixtures.ts +0 -100
- package/agent-pane/frontend/src/test-setup.ts +0 -5
- package/agent-pane/frontend/src/types/index.test.ts +0 -128
- package/agent-pane/frontend/src/types/index.ts +0 -132
- package/agent-pane/frontend/src/utils/changes.test.ts +0 -81
- package/agent-pane/frontend/src/utils/changes.ts +0 -39
- package/agent-pane/frontend/src/utils/duration.test.ts +0 -75
- package/agent-pane/frontend/src/utils/duration.ts +0 -14
- package/agent-pane/frontend/tsconfig.json +0 -25
- package/agent-pane/frontend/vite.config.ts +0 -22
- package/agent-pane/frontend/vitest.config.ts +0 -29
- package/agent-pane/package-lock.json +0 -1527
- package/agent-pane/package.json +0 -19
- package/agent-pane/shared/provider-types.ts +0 -67
- package/agent-pane/shared/types.ts +0 -167
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
2
|
-
|
|
3
|
-
// Capture broadcasts.
|
|
4
|
-
const captured: Array<{ event: string; data: unknown }> = [];
|
|
5
|
-
vi.mock('../ws/index.ts', async (importOriginal) => {
|
|
6
|
-
const actual = (await importOriginal()) as Record<string, unknown>;
|
|
7
|
-
return {
|
|
8
|
-
...actual,
|
|
9
|
-
broadcast: vi.fn((event: string, data: unknown) => {
|
|
10
|
-
captured.push({ event, data });
|
|
11
|
-
}),
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
import { TurnProjector, RESULT_TIMEOUT_MS, MAX_RESULT_EXTENSIONS } from './turn-projector.ts';
|
|
16
|
-
import type { AgentRuntimeActionInfo, AgentRuntimeMessage } from './agent-runtime-client.ts';
|
|
17
|
-
import { initDb } from '../db/index.ts';
|
|
18
|
-
import type Database from 'better-sqlite3';
|
|
19
|
-
import type { RepoburgRuntimeClient } from './repoburg-client.ts';
|
|
20
|
-
|
|
21
|
-
const SESSION_ID = 's1';
|
|
22
|
-
const TURN_ID = 't1';
|
|
23
|
-
const RUNTIME_SESSION_ID = 'rs-1';
|
|
24
|
-
|
|
25
|
-
/** Standard action info block for tool_result messages. */
|
|
26
|
-
function actionInfo(overrides: Partial<AgentRuntimeActionInfo> = {}): AgentRuntimeActionInfo {
|
|
27
|
-
return {
|
|
28
|
-
id: 'a1',
|
|
29
|
-
action_type: 'create_file',
|
|
30
|
-
file_path: 'src/a.ts',
|
|
31
|
-
command_string: null,
|
|
32
|
-
status: 'CONFIRMED_KEPT',
|
|
33
|
-
server_name: null,
|
|
34
|
-
tool_name: null,
|
|
35
|
-
arguments: null,
|
|
36
|
-
plain: null,
|
|
37
|
-
order_of_execution: 0,
|
|
38
|
-
...overrides,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
describe('TurnProjector', () => {
|
|
43
|
-
let db: Database.Database;
|
|
44
|
-
let projector: TurnProjector | null = null;
|
|
45
|
-
const client = {
|
|
46
|
-
getSessionInputs: vi.fn(),
|
|
47
|
-
getSession: vi.fn(),
|
|
48
|
-
} as unknown as RepoburgRuntimeClient;
|
|
49
|
-
|
|
50
|
-
beforeEach(() => {
|
|
51
|
-
vi.clearAllMocks();
|
|
52
|
-
captured.length = 0;
|
|
53
|
-
db = initDb(':memory:');
|
|
54
|
-
const now = new Date().toISOString();
|
|
55
|
-
db.prepare(
|
|
56
|
-
`INSERT INTO sessions (id, title, runtime_type, status, is_running, lifecycle, created_at, updated_at)
|
|
57
|
-
VALUES (?, NULL, 'repoburg', 'running', 1, 'working', ?, ?)`,
|
|
58
|
-
).run(SESSION_ID, now, now);
|
|
59
|
-
db.prepare(
|
|
60
|
-
`INSERT INTO turns (id, session_id, user_prompt, status, created_at, updated_at)
|
|
61
|
-
VALUES (?, ?, 'hello', 'running', ?, ?)`,
|
|
62
|
-
).run(TURN_ID, SESSION_ID, now, now);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
afterEach(() => {
|
|
66
|
-
projector?.close();
|
|
67
|
-
projector = null;
|
|
68
|
-
db.close();
|
|
69
|
-
vi.useRealTimers();
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
function makeProjector(): TurnProjector {
|
|
73
|
-
projector = new TurnProjector({
|
|
74
|
-
agentPaneSessionId: SESSION_ID,
|
|
75
|
-
turnId: TURN_ID,
|
|
76
|
-
repoburgSessionId: RUNTIME_SESSION_ID,
|
|
77
|
-
client,
|
|
78
|
-
});
|
|
79
|
-
return projector;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function items(): Array<{ external_item_id: string; type: string; status: string; data: string }> {
|
|
83
|
-
return db
|
|
84
|
-
.prepare('SELECT external_item_id, type, status, data FROM items WHERE turn_id = ? ORDER BY rowid')
|
|
85
|
-
.all(TURN_ID) as never;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function turnRow(): { status: string; agent_response: string | null; token_usage: string | null; error: string | null } {
|
|
89
|
-
return db.prepare('SELECT status, agent_response, token_usage, error FROM turns WHERE id = ?').get(TURN_ID) as never;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
describe('stream_event + assistant', () => {
|
|
93
|
-
it('starts items on first delta and streams further deltas', () => {
|
|
94
|
-
const p = makeProjector();
|
|
95
|
-
|
|
96
|
-
p.handle({
|
|
97
|
-
type: 'stream_event',
|
|
98
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
99
|
-
inputId: 'in-1',
|
|
100
|
-
delta: { type: 'text', text: 'Hel' },
|
|
101
|
-
});
|
|
102
|
-
p.handle({
|
|
103
|
-
type: 'stream_event',
|
|
104
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
105
|
-
inputId: 'in-1',
|
|
106
|
-
delta: { type: 'text', text: 'lo' },
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const rows = items();
|
|
110
|
-
expect(rows).toHaveLength(1);
|
|
111
|
-
expect(rows[0].type).toBe('agent_message');
|
|
112
|
-
expect(rows[0].status).toBe('in_progress');
|
|
113
|
-
expect(JSON.parse(rows[0].data)).toEqual({ text: 'Hel' }); // item data from FIRST insert
|
|
114
|
-
|
|
115
|
-
const delta = captured.find((b) => b.event === 'item:delta');
|
|
116
|
-
expect(delta).toBeDefined();
|
|
117
|
-
expect(delta!.data).toMatchObject({ turnId: TURN_ID, itemId: 'in-1-text', delta: 'lo' });
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('completes streamed items when the assistant message arrives', () => {
|
|
121
|
-
const p = makeProjector();
|
|
122
|
-
p.handle({
|
|
123
|
-
type: 'stream_event',
|
|
124
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
125
|
-
inputId: 'in-1',
|
|
126
|
-
delta: { type: 'text', text: 'Hel' },
|
|
127
|
-
});
|
|
128
|
-
p.handle({
|
|
129
|
-
type: 'assistant',
|
|
130
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
131
|
-
inputId: 'in-1',
|
|
132
|
-
content: [
|
|
133
|
-
{ type: 'thinking', thinking: 'hmm' },
|
|
134
|
-
{ type: 'text', text: 'Hello world' },
|
|
135
|
-
],
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
const rows = items();
|
|
139
|
-
expect(rows.map((r) => r.type)).toEqual(['agent_message', 'reasoning']);
|
|
140
|
-
expect(rows.every((r) => r.status === 'completed')).toBe(true);
|
|
141
|
-
expect(JSON.parse(rows[0].data)).toEqual({ text: 'Hello world' });
|
|
142
|
-
expect(JSON.parse(rows[1].data)).toEqual({ text: 'hmm' });
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it('creates completed items from assistant alone (deltas off/missed)', () => {
|
|
146
|
-
const p = makeProjector();
|
|
147
|
-
p.handle({
|
|
148
|
-
type: 'assistant',
|
|
149
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
150
|
-
inputId: 'in-1',
|
|
151
|
-
content: [{ type: 'text', text: 'Hello' }],
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
const rows = items();
|
|
155
|
-
expect(rows).toHaveLength(1);
|
|
156
|
-
expect(rows[0].status).toBe('completed');
|
|
157
|
-
expect(JSON.parse(rows[0].data)).toEqual({ text: 'Hello' });
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
describe('user tool_result', () => {
|
|
162
|
-
it('maps actions to items and skips final/html_final (part of the response)', () => {
|
|
163
|
-
const p = makeProjector();
|
|
164
|
-
p.handle({
|
|
165
|
-
type: 'user',
|
|
166
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
167
|
-
inputId: 'in-1',
|
|
168
|
-
content: [
|
|
169
|
-
{
|
|
170
|
-
type: 'tool_result',
|
|
171
|
-
tool_use_id: 'a1',
|
|
172
|
-
content: 'created',
|
|
173
|
-
is_error: false,
|
|
174
|
-
action: actionInfo({ id: 'a1', action_type: 'create_file' }),
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
type: 'tool_result',
|
|
178
|
-
tool_use_id: 'a2',
|
|
179
|
-
content: 'ls output',
|
|
180
|
-
is_error: false,
|
|
181
|
-
action: actionInfo({ id: 'a2', action_type: 'run_command', file_path: null, command_string: 'ls' }),
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
type: 'tool_result',
|
|
185
|
-
tool_use_id: 'a3',
|
|
186
|
-
content: 'final text',
|
|
187
|
-
is_error: false,
|
|
188
|
-
action: actionInfo({ id: 'a3', action_type: 'final', plain: 'Final text' }),
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
const rows = items();
|
|
194
|
-
expect(rows.map((r) => r.external_item_id)).toEqual(['in-1-action-a1', 'in-1-action-a2']);
|
|
195
|
-
expect(rows[0].type).toBe('file_change');
|
|
196
|
-
expect(rows[1].type).toBe('command_execution');
|
|
197
|
-
expect(JSON.parse(rows[1].data).aggregated_output).toBe('ls output');
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it('maps failed actions to failed items with the error text', () => {
|
|
201
|
-
const p = makeProjector();
|
|
202
|
-
p.handle({
|
|
203
|
-
type: 'user',
|
|
204
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
205
|
-
inputId: 'in-1',
|
|
206
|
-
content: [
|
|
207
|
-
{
|
|
208
|
-
type: 'tool_result',
|
|
209
|
-
tool_use_id: 'a1',
|
|
210
|
-
content: 'command crashed',
|
|
211
|
-
is_error: true,
|
|
212
|
-
action: actionInfo({
|
|
213
|
-
id: 'a1',
|
|
214
|
-
action_type: 'run_command',
|
|
215
|
-
file_path: null,
|
|
216
|
-
command_string: 'boom',
|
|
217
|
-
status: 'EXECUTION_FAILED',
|
|
218
|
-
}),
|
|
219
|
-
},
|
|
220
|
-
],
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
const rows = items();
|
|
224
|
-
expect(rows).toHaveLength(1);
|
|
225
|
-
expect(rows[0].status).toBe('failed');
|
|
226
|
-
expect(JSON.parse(rows[0].data).status).toBe('failed');
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
it('is idempotent — replayed messages do not duplicate items', () => {
|
|
230
|
-
const p = makeProjector();
|
|
231
|
-
const assistant: AgentRuntimeMessage = {
|
|
232
|
-
type: 'assistant',
|
|
233
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
234
|
-
inputId: 'in-1',
|
|
235
|
-
content: [{ type: 'text', text: 'Hello' }],
|
|
236
|
-
};
|
|
237
|
-
const user: AgentRuntimeMessage = {
|
|
238
|
-
type: 'user',
|
|
239
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
240
|
-
inputId: 'in-1',
|
|
241
|
-
content: [
|
|
242
|
-
{
|
|
243
|
-
type: 'tool_result',
|
|
244
|
-
tool_use_id: 'a1',
|
|
245
|
-
content: 'created',
|
|
246
|
-
is_error: false,
|
|
247
|
-
action: actionInfo(),
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
p.handle(assistant);
|
|
253
|
-
p.handle(user);
|
|
254
|
-
p.handle(assistant); // replay (reconnect)
|
|
255
|
-
p.handle(user);
|
|
256
|
-
|
|
257
|
-
expect(items().map((r) => r.external_item_id).sort()).toEqual(['in-1-action-a1', 'in-1-text']);
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
describe('result', () => {
|
|
262
|
-
it('success completes the turn with result text, usage, and title sync', async () => {
|
|
263
|
-
(client.getSession as ReturnType<typeof vi.fn>).mockResolvedValue({
|
|
264
|
-
id: RUNTIME_SESSION_ID,
|
|
265
|
-
session_title: 'Synced Title',
|
|
266
|
-
is_running: false,
|
|
267
|
-
});
|
|
268
|
-
const p = makeProjector();
|
|
269
|
-
|
|
270
|
-
p.handle({
|
|
271
|
-
type: 'assistant',
|
|
272
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
273
|
-
inputId: 'in-1',
|
|
274
|
-
content: [{ type: 'text', text: 'working' }],
|
|
275
|
-
});
|
|
276
|
-
p.handle({
|
|
277
|
-
type: 'result',
|
|
278
|
-
subtype: 'success',
|
|
279
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
280
|
-
is_error: false,
|
|
281
|
-
result: 'All done',
|
|
282
|
-
usage: { input_tokens: 10, output_tokens: 5, cache_read_input_tokens: 2, cache_creation_input_tokens: 0 },
|
|
283
|
-
num_rounds: 2,
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
const row = turnRow();
|
|
287
|
-
expect(row.status).toBe('completed');
|
|
288
|
-
expect(row.agent_response).toBe('All done');
|
|
289
|
-
expect(JSON.parse(row.token_usage!)).toMatchObject({
|
|
290
|
-
input_tokens: 10,
|
|
291
|
-
output_tokens: 5,
|
|
292
|
-
cached_input_tokens: 2,
|
|
293
|
-
});
|
|
294
|
-
expect(captured.find((b) => b.event === 'turn:completed')).toBeDefined();
|
|
295
|
-
|
|
296
|
-
// Session marked not-running with unreviewed actions.
|
|
297
|
-
const session = db.prepare('SELECT is_running, status, has_unreviewed FROM sessions WHERE id = ?').get(SESSION_ID) as never;
|
|
298
|
-
expect(session).toMatchObject({ is_running: 0, status: 'active', has_unreviewed: 1 });
|
|
299
|
-
|
|
300
|
-
// Title sync (async, fire-and-forget).
|
|
301
|
-
await vi.waitFor(() => {
|
|
302
|
-
const s = db.prepare('SELECT title FROM sessions WHERE id = ?').get(SESSION_ID) as { title: string | null };
|
|
303
|
-
expect(s.title).toBe('Synced Title');
|
|
304
|
-
});
|
|
305
|
-
expect(captured.find((b) => b.event === 'session:title')).toBeDefined();
|
|
306
|
-
|
|
307
|
-
// Projector done — later messages ignored.
|
|
308
|
-
p.handle({
|
|
309
|
-
type: 'result',
|
|
310
|
-
subtype: 'success',
|
|
311
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
312
|
-
is_error: false,
|
|
313
|
-
result: 'late',
|
|
314
|
-
num_rounds: 0,
|
|
315
|
-
} as never);
|
|
316
|
-
expect(turnRow().agent_response).toBe('All done');
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
it('success falls back to the last round text when result text is empty', () => {
|
|
320
|
-
const p = makeProjector();
|
|
321
|
-
p.handle({
|
|
322
|
-
type: 'assistant',
|
|
323
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
324
|
-
inputId: 'in-1',
|
|
325
|
-
content: [{ type: 'text', text: 'Fallback text' }],
|
|
326
|
-
});
|
|
327
|
-
p.handle({
|
|
328
|
-
type: 'result',
|
|
329
|
-
subtype: 'success',
|
|
330
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
331
|
-
is_error: false,
|
|
332
|
-
result: '',
|
|
333
|
-
num_rounds: 1,
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
expect(turnRow().agent_response).toBe('Fallback text');
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
it('error fails the turn and closes open items as failed', () => {
|
|
340
|
-
const p = makeProjector();
|
|
341
|
-
p.handle({
|
|
342
|
-
type: 'stream_event',
|
|
343
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
344
|
-
inputId: 'in-1',
|
|
345
|
-
delta: { type: 'text', text: 'partial' },
|
|
346
|
-
});
|
|
347
|
-
p.handle({
|
|
348
|
-
type: 'result',
|
|
349
|
-
subtype: 'error_during_execution',
|
|
350
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
351
|
-
is_error: true,
|
|
352
|
-
result: '',
|
|
353
|
-
num_rounds: 1,
|
|
354
|
-
errors: ['boom', 'bang'],
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
const row = turnRow();
|
|
358
|
-
expect(row.status).toBe('failed');
|
|
359
|
-
expect(row.error).toBe('boom; bang');
|
|
360
|
-
expect(items()[0].status).toBe('failed');
|
|
361
|
-
expect(captured.find((b) => b.event === 'turn:failed')).toBeDefined();
|
|
362
|
-
});
|
|
363
|
-
|
|
364
|
-
it('aborted aborts the turn and closes open items as completed', () => {
|
|
365
|
-
const p = makeProjector();
|
|
366
|
-
p.handle({
|
|
367
|
-
type: 'stream_event',
|
|
368
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
369
|
-
inputId: 'in-1',
|
|
370
|
-
delta: { type: 'text', text: 'partial' },
|
|
371
|
-
});
|
|
372
|
-
p.handle({
|
|
373
|
-
type: 'result',
|
|
374
|
-
subtype: 'aborted',
|
|
375
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
376
|
-
is_error: true,
|
|
377
|
-
result: '',
|
|
378
|
-
num_rounds: 0,
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
expect(turnRow().status).toBe('aborted');
|
|
382
|
-
expect(items()[0].status).toBe('completed');
|
|
383
|
-
expect(captured.find((b) => b.event === 'turn:cancelled')).toBeDefined();
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
describe('watch-dog + snapshot reconcile', () => {
|
|
388
|
-
it('completes the turn from the snapshot when the result never arrives', async () => {
|
|
389
|
-
vi.useFakeTimers();
|
|
390
|
-
(client.getSessionInputs as ReturnType<typeof vi.fn>).mockResolvedValue([
|
|
391
|
-
{
|
|
392
|
-
id: 'in-1',
|
|
393
|
-
role: 'model',
|
|
394
|
-
raw_llm_response: 'Snapshot reply',
|
|
395
|
-
thoughts: null,
|
|
396
|
-
input_token_count: 12,
|
|
397
|
-
output_token_count: 6,
|
|
398
|
-
cached_token_count: 3,
|
|
399
|
-
aiActions: [
|
|
400
|
-
{
|
|
401
|
-
id: 'a1',
|
|
402
|
-
action_type: 'create_file',
|
|
403
|
-
file_path: 'src/x.ts',
|
|
404
|
-
status: 'CONFIRMED_KEPT',
|
|
405
|
-
order_of_execution: 0,
|
|
406
|
-
executionLogs: [{ output: 'created', error_message: null }],
|
|
407
|
-
},
|
|
408
|
-
],
|
|
409
|
-
},
|
|
410
|
-
]);
|
|
411
|
-
(client.getSession as ReturnType<typeof vi.fn>).mockResolvedValue({
|
|
412
|
-
id: RUNTIME_SESSION_ID,
|
|
413
|
-
session_title: null,
|
|
414
|
-
is_running: false,
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
const p = makeProjector();
|
|
418
|
-
p.handle({
|
|
419
|
-
type: 'assistant',
|
|
420
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
421
|
-
inputId: 'in-1',
|
|
422
|
-
content: [{ type: 'text', text: 'Snapshot reply' }],
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
await vi.advanceTimersByTimeAsync(RESULT_TIMEOUT_MS + 1000);
|
|
426
|
-
|
|
427
|
-
// Snapshot projected (action item) and turn completed.
|
|
428
|
-
const ids = items().map((r) => r.external_item_id);
|
|
429
|
-
expect(ids).toContain('in-1-action-a1');
|
|
430
|
-
const row = turnRow();
|
|
431
|
-
expect(row.status).toBe('completed');
|
|
432
|
-
expect(row.agent_response).toBe('Snapshot reply');
|
|
433
|
-
expect(JSON.parse(row.token_usage!)).toMatchObject({ input_tokens: 12, output_tokens: 6, cached_input_tokens: 3 });
|
|
434
|
-
expect(client.getSessionInputs).toHaveBeenCalledWith(RUNTIME_SESSION_ID);
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
it('re-arms while the runtime session is still running, then fails after max extensions', async () => {
|
|
438
|
-
vi.useFakeTimers();
|
|
439
|
-
(client.getSessionInputs as ReturnType<typeof vi.fn>).mockResolvedValue([]);
|
|
440
|
-
(client.getSession as ReturnType<typeof vi.fn>).mockResolvedValue({
|
|
441
|
-
id: RUNTIME_SESSION_ID,
|
|
442
|
-
session_title: null,
|
|
443
|
-
is_running: true,
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
makeProjector();
|
|
447
|
-
|
|
448
|
-
const firings = MAX_RESULT_EXTENSIONS + 1;
|
|
449
|
-
await vi.advanceTimersByTimeAsync(RESULT_TIMEOUT_MS * firings + 1000 * firings);
|
|
450
|
-
|
|
451
|
-
const row = turnRow();
|
|
452
|
-
expect(row.status).toBe('failed');
|
|
453
|
-
expect(row.error).toMatch(/still running/);
|
|
454
|
-
});
|
|
455
|
-
|
|
456
|
-
it('a live result cancels the watchdog', async () => {
|
|
457
|
-
vi.useFakeTimers();
|
|
458
|
-
const p = makeProjector();
|
|
459
|
-
p.handle({
|
|
460
|
-
type: 'result',
|
|
461
|
-
subtype: 'success',
|
|
462
|
-
sessionId: RUNTIME_SESSION_ID,
|
|
463
|
-
is_error: false,
|
|
464
|
-
result: 'done',
|
|
465
|
-
num_rounds: 1,
|
|
466
|
-
});
|
|
467
|
-
expect(turnRow().status).toBe('completed');
|
|
468
|
-
|
|
469
|
-
(client.getSessionInputs as ReturnType<typeof vi.fn>).mockResolvedValue([]);
|
|
470
|
-
await vi.advanceTimersByTimeAsync(RESULT_TIMEOUT_MS * 5);
|
|
471
|
-
expect(client.getSessionInputs).not.toHaveBeenCalled();
|
|
472
|
-
expect(p.isDone).toBe(true);
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
});
|