@ai-devkit/agent-manager 0.42.3 → 0.44.0
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/dist/AgentManager.d.ts +14 -5
- package/dist/AgentManager.d.ts.map +1 -1
- package/dist/AgentManager.js +32 -13
- package/dist/AgentManager.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -4
- package/.swcrc +0 -27
- package/dist/__tests__/AgentManager.test.js +0 -1596
- package/dist/__tests__/AgentManager.test.js.map +0 -1
- package/dist/__tests__/adapters/IncrementalSessionRefresh.test.js +0 -486
- package/dist/__tests__/adapters/IncrementalSessionRefresh.test.js.map +0 -1
- package/dist/__tests__/adapters/adapterProcessImports.test.js +0 -52
- package/dist/__tests__/adapters/adapterProcessImports.test.js.map +0 -1
- package/dist/__tests__/adapters/adapterSnapshotCandidates.test.js +0 -247
- package/dist/__tests__/adapters/adapterSnapshotCandidates.test.js.map +0 -1
- package/dist/__tests__/capacity/anthropic.test.js +0 -115
- package/dist/__tests__/capacity/anthropic.test.js.map +0 -1
- package/dist/__tests__/capacity/boundaries.test.js +0 -45
- package/dist/__tests__/capacity/boundaries.test.js.map +0 -1
- package/dist/__tests__/capacity/claude.test.js +0 -485
- package/dist/__tests__/capacity/claude.test.js.map +0 -1
- package/dist/__tests__/capacity/codex.test.js +0 -339
- package/dist/__tests__/capacity/codex.test.js.map +0 -1
- package/dist/__tests__/capacity/devin.test.js +0 -239
- package/dist/__tests__/capacity/devin.test.js.map +0 -1
- package/dist/__tests__/capacity/index.test.js +0 -53
- package/dist/__tests__/capacity/index.test.js.map +0 -1
- package/dist/__tests__/capacity/openai.test.js +0 -687
- package/dist/__tests__/capacity/openai.test.js.map +0 -1
- package/dist/__tests__/capacity/wham.test.js +0 -159
- package/dist/__tests__/capacity/wham.test.js.map +0 -1
- package/dist/__tests__/capacity/zai.test.js +0 -212
- package/dist/__tests__/capacity/zai.test.js.map +0 -1
- package/dist/__tests__/fixtures.test.js +0 -218
- package/dist/__tests__/fixtures.test.js.map +0 -1
- package/dist/__tests__/harnesses/BoundedSummarySkip.test.js +0 -568
- package/dist/__tests__/harnesses/BoundedSummarySkip.test.js.map +0 -1
- package/dist/__tests__/harnesses/SessionSummaryEquivalence.test.js +0 -1089
- package/dist/__tests__/harnesses/SessionSummaryEquivalence.test.js.map +0 -1
- package/dist/__tests__/harnesses/antigravity/AntigravityCliAdapter.subprocess.test.js +0 -143
- package/dist/__tests__/harnesses/antigravity/AntigravityCliAdapter.subprocess.test.js.map +0 -1
- package/dist/__tests__/harnesses/antigravity/AntigravityCliAdapter.test.js +0 -462
- package/dist/__tests__/harnesses/antigravity/AntigravityCliAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/builtinAdapters.test.js +0 -33
- package/dist/__tests__/harnesses/builtinAdapters.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/ClaudeAgentMapper.test.js +0 -79
- package/dist/__tests__/harnesses/claude/ClaudeAgentMapper.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/ClaudeCodeAdapter.test.js +0 -1881
- package/dist/__tests__/harnesses/claude/ClaudeCodeAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/ClaudeSessionLocator.test.js +0 -425
- package/dist/__tests__/harnesses/claude/ClaudeSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/ClaudeSessionParser.test.js +0 -314
- package/dist/__tests__/harnesses/claude/ClaudeSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/durable/ClaudeCliProbe.test.js +0 -49
- package/dist/__tests__/harnesses/claude/durable/ClaudeCliProbe.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintAgent.integration.test.js +0 -76
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintAgent.integration.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintAgentService.test.js +0 -173
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintAgentService.test.js.map +0 -1
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintRunner.test.js +0 -181
- package/dist/__tests__/harnesses/claude/durable/ClaudePrintRunner.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/CodexAdapter.test.js +0 -685
- package/dist/__tests__/harnesses/codex/CodexAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/CodexSessionLocator.test.js +0 -463
- package/dist/__tests__/harnesses/codex/CodexSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/CodexSessionMapping.test.js +0 -86
- package/dist/__tests__/harnesses/codex/CodexSessionMapping.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/CodexSessionParser.test.js +0 -254
- package/dist/__tests__/harnesses/codex/CodexSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/durable/CodexCliProbe.test.js +0 -121
- package/dist/__tests__/harnesses/codex/durable/CodexCliProbe.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/durable/CodexDurableAgentRepository.test.js +0 -84
- package/dist/__tests__/harnesses/codex/durable/CodexDurableAgentRepository.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/durable/CodexPrintAgent.integration.test.js +0 -128
- package/dist/__tests__/harnesses/codex/durable/CodexPrintAgent.integration.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/durable/CodexPrintAgentService.test.js +0 -246
- package/dist/__tests__/harnesses/codex/durable/CodexPrintAgentService.test.js.map +0 -1
- package/dist/__tests__/harnesses/codex/durable/CodexPrintRunner.test.js +0 -384
- package/dist/__tests__/harnesses/codex/durable/CodexPrintRunner.test.js.map +0 -1
- package/dist/__tests__/harnesses/copilot/CopilotAdapter.test.js +0 -659
- package/dist/__tests__/harnesses/copilot/CopilotAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/copilot/CopilotRefreshIO.test.js +0 -290
- package/dist/__tests__/harnesses/copilot/CopilotRefreshIO.test.js.map +0 -1
- package/dist/__tests__/harnesses/devin/DevinAdapter.test.js +0 -597
- package/dist/__tests__/harnesses/devin/DevinAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/devin/DevinAgentMapper.test.js +0 -99
- package/dist/__tests__/harnesses/devin/DevinAgentMapper.test.js.map +0 -1
- package/dist/__tests__/harnesses/devin/DevinSessionLocator.test.js +0 -192
- package/dist/__tests__/harnesses/devin/DevinSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/devin/DevinSessionParser.test.js +0 -407
- package/dist/__tests__/harnesses/devin/DevinSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/devin/fixtures.js +0 -95
- package/dist/__tests__/harnesses/devin/fixtures.js.map +0 -1
- package/dist/__tests__/harnesses/gemini/GeminiCliAdapter.test.js +0 -1454
- package/dist/__tests__/harnesses/gemini/GeminiCliAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/gemini/GeminiSessionJsonl.test.js +0 -491
- package/dist/__tests__/harnesses/gemini/GeminiSessionJsonl.test.js.map +0 -1
- package/dist/__tests__/harnesses/gemini/GeminiSessionLocator.test.js +0 -399
- package/dist/__tests__/harnesses/gemini/GeminiSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/grok/GrokAgentMapper.test.js +0 -56
- package/dist/__tests__/harnesses/grok/GrokAgentMapper.test.js.map +0 -1
- package/dist/__tests__/harnesses/grok/GrokCliAdapter.test.js +0 -421
- package/dist/__tests__/harnesses/grok/GrokCliAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/grok/GrokIncrementalRefresh.test.js +0 -167
- package/dist/__tests__/harnesses/grok/GrokIncrementalRefresh.test.js.map +0 -1
- package/dist/__tests__/harnesses/grok/GrokSessionLocator.test.js +0 -133
- package/dist/__tests__/harnesses/grok/GrokSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/grok/GrokSessionParser.test.js +0 -301
- package/dist/__tests__/harnesses/grok/GrokSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/kiro/KiroAdapter.test.js +0 -662
- package/dist/__tests__/harnesses/kiro/KiroAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/muse/MuseAdapter.test.js +0 -247
- package/dist/__tests__/harnesses/muse/MuseAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/muse/MuseAgentMapper.test.js +0 -81
- package/dist/__tests__/harnesses/muse/MuseAgentMapper.test.js.map +0 -1
- package/dist/__tests__/harnesses/muse/MuseSessionLocator.test.js +0 -185
- package/dist/__tests__/harnesses/muse/MuseSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/muse/MuseSessionParser.test.js +0 -328
- package/dist/__tests__/harnesses/muse/MuseSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/opencode/OpenCodeAdapter.test.js +0 -213
- package/dist/__tests__/harnesses/opencode/OpenCodeAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/opencode/OpenCodeAgentMapper.test.js +0 -108
- package/dist/__tests__/harnesses/opencode/OpenCodeAgentMapper.test.js.map +0 -1
- package/dist/__tests__/harnesses/opencode/OpenCodeSessionLocator.test.js +0 -94
- package/dist/__tests__/harnesses/opencode/OpenCodeSessionLocator.test.js.map +0 -1
- package/dist/__tests__/harnesses/opencode/OpenCodeSessionParser.test.js +0 -147
- package/dist/__tests__/harnesses/opencode/OpenCodeSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/PiAdapter.test.js +0 -367
- package/dist/__tests__/harnesses/pi/PiAdapter.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/PiDiscoveryIO.test.js +0 -382
- package/dist/__tests__/harnesses/pi/PiDiscoveryIO.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/PiSessionParser.test.js +0 -416
- package/dist/__tests__/harnesses/pi/PiSessionParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/PiSessionTracker.test.js +0 -108
- package/dist/__tests__/harnesses/pi/PiSessionTracker.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiCliProbe.test.js +0 -70
- package/dist/__tests__/harnesses/pi/durable/PiCliProbe.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiDurableAgentRepository.test.js +0 -43
- package/dist/__tests__/harnesses/pi/durable/PiDurableAgentRepository.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiPrintAgentService.test.js +0 -192
- package/dist/__tests__/harnesses/pi/durable/PiPrintAgentService.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiPrintProtocol.test.js +0 -119
- package/dist/__tests__/harnesses/pi/durable/PiPrintProtocol.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiPrintRunner.test.js +0 -382
- package/dist/__tests__/harnesses/pi/durable/PiPrintRunner.test.js.map +0 -1
- package/dist/__tests__/harnesses/pi/durable/PiStreamParser.test.js +0 -34
- package/dist/__tests__/harnesses/pi/durable/PiStreamParser.test.js.map +0 -1
- package/dist/__tests__/harnesses/readiness/AgentReadiness.test.js +0 -446
- package/dist/__tests__/harnesses/readiness/AgentReadiness.test.js.map +0 -1
- package/dist/__tests__/harnesses/runtimeProfiles.test.js +0 -101
- package/dist/__tests__/harnesses/runtimeProfiles.test.js.map +0 -1
- package/dist/__tests__/print/DurableAgent.test.js +0 -15
- package/dist/__tests__/print/DurableAgent.test.js.map +0 -1
- package/dist/__tests__/print/DurableAgentRepository.sqlite.test.js +0 -186
- package/dist/__tests__/print/DurableAgentRepository.sqlite.test.js.map +0 -1
- package/dist/__tests__/print/DurableAgentRepository.test.js +0 -249
- package/dist/__tests__/print/DurableAgentRepository.test.js.map +0 -1
- package/dist/__tests__/readiness-fixtures.test.js +0 -54
- package/dist/__tests__/readiness-fixtures.test.js.map +0 -1
- package/dist/__tests__/runtime/AgentRuntime.test.js +0 -13
- package/dist/__tests__/runtime/AgentRuntime.test.js.map +0 -1
- package/dist/__tests__/runtime/HerdrAgentDiscovery.test.js +0 -164
- package/dist/__tests__/runtime/HerdrAgentDiscovery.test.js.map +0 -1
- package/dist/__tests__/runtime/HerdrAgentRuntime.test.js +0 -488
- package/dist/__tests__/runtime/HerdrAgentRuntime.test.js.map +0 -1
- package/dist/__tests__/runtime/ManagedAgentRuntime.test.js +0 -637
- package/dist/__tests__/runtime/ManagedAgentRuntime.test.js.map +0 -1
- package/dist/__tests__/terminal/GhosttyBackend.test.js +0 -334
- package/dist/__tests__/terminal/GhosttyBackend.test.js.map +0 -1
- package/dist/__tests__/terminal/TerminalFocusManager.test.js +0 -253
- package/dist/__tests__/terminal/TerminalFocusManager.test.js.map +0 -1
- package/dist/__tests__/terminal/TmuxManager.test.js +0 -168
- package/dist/__tests__/terminal/TmuxManager.test.js.map +0 -1
- package/dist/__tests__/terminal/TtyWriter.test.js +0 -386
- package/dist/__tests__/terminal/TtyWriter.test.js.map +0 -1
- package/dist/__tests__/utils/AgentRegistry.test.js +0 -636
- package/dist/__tests__/utils/AgentRegistry.test.js.map +0 -1
- package/dist/__tests__/utils/IncrementalJsonlSummary.test.js +0 -650
- package/dist/__tests__/utils/IncrementalJsonlSummary.test.js.map +0 -1
- package/dist/__tests__/utils/agent-requests.test.js +0 -90
- package/dist/__tests__/utils/agent-requests.test.js.map +0 -1
- package/dist/__tests__/utils/conversationTail.bench.test.js +0 -258
- package/dist/__tests__/utils/conversationTail.bench.test.js.map +0 -1
- package/dist/__tests__/utils/conversationTailParity.test.js +0 -588
- package/dist/__tests__/utils/conversationTailParity.test.js.map +0 -1
- package/dist/__tests__/utils/jsonlTail.test.js +0 -360
- package/dist/__tests__/utils/jsonlTail.test.js.map +0 -1
- package/dist/__tests__/utils/matching.test.js +0 -324
- package/dist/__tests__/utils/matching.test.js.map +0 -1
- package/dist/__tests__/utils/matchingConstants.test.js +0 -35
- package/dist/__tests__/utils/matchingConstants.test.js.map +0 -1
- package/dist/__tests__/utils/process.test.js +0 -818
- package/dist/__tests__/utils/process.test.js.map +0 -1
- package/dist/__tests__/utils/session.test.js +0 -175
- package/dist/__tests__/utils/session.test.js.map +0 -1
- package/project.json +0 -29
- package/scripts/benchmark-cold-start.mjs +0 -350
- package/src/AgentManager.ts +0 -530
- package/src/__tests__/AgentManager.test.ts +0 -1483
- package/src/__tests__/adapters/IncrementalSessionRefresh.test.ts +0 -437
- package/src/__tests__/adapters/adapterProcessImports.test.ts +0 -58
- package/src/__tests__/adapters/adapterSnapshotCandidates.test.ts +0 -243
- package/src/__tests__/capacity/anthropic.test.ts +0 -105
- package/src/__tests__/capacity/boundaries.test.ts +0 -36
- package/src/__tests__/capacity/claude.test.ts +0 -462
- package/src/__tests__/capacity/codex.test.ts +0 -311
- package/src/__tests__/capacity/devin.test.ts +0 -210
- package/src/__tests__/capacity/fixtures/claude-credentials.json +0 -7
- package/src/__tests__/capacity/fixtures/claude-usage-malformed.json +0 -1
- package/src/__tests__/capacity/fixtures/claude-usage-partial.json +0 -15
- package/src/__tests__/capacity/fixtures/claude-usage.json +0 -63
- package/src/__tests__/capacity/fixtures/devin-config.json +0 -6
- package/src/__tests__/capacity/fixtures/devin-credentials.toml +0 -4
- package/src/__tests__/capacity/fixtures/devin-quota-nonplan.json +0 -5
- package/src/__tests__/capacity/fixtures/devin-quota.json +0 -10
- package/src/__tests__/capacity/fixtures/openai-auth.json +0 -6
- package/src/__tests__/capacity/fixtures/openai-codex-auth.json +0 -9
- package/src/__tests__/capacity/fixtures/openai-usage-completions.json +0 -67
- package/src/__tests__/capacity/fixtures/openai-usage-responses.json +0 -20
- package/src/__tests__/capacity/fixtures/wham-usage.json +0 -45
- package/src/__tests__/capacity/fixtures/zai-auth.json +0 -6
- package/src/__tests__/capacity/fixtures/zai-quota-invalid.json +0 -7
- package/src/__tests__/capacity/fixtures/zai-quota.json +0 -38
- package/src/__tests__/capacity/index.test.ts +0 -54
- package/src/__tests__/capacity/openai.test.ts +0 -571
- package/src/__tests__/capacity/wham.test.ts +0 -122
- package/src/__tests__/capacity/zai.test.ts +0 -151
- package/src/__tests__/fixtures.test.ts +0 -245
- package/src/__tests__/harnesses/BoundedSummarySkip.test.ts +0 -496
- package/src/__tests__/harnesses/SessionSummaryEquivalence.test.ts +0 -726
- package/src/__tests__/harnesses/antigravity/AntigravityCliAdapter.subprocess.test.ts +0 -133
- package/src/__tests__/harnesses/antigravity/AntigravityCliAdapter.test.ts +0 -396
- package/src/__tests__/harnesses/builtinAdapters.test.ts +0 -33
- package/src/__tests__/harnesses/claude/ClaudeAgentMapper.test.ts +0 -84
- package/src/__tests__/harnesses/claude/ClaudeCodeAdapter.test.ts +0 -1793
- package/src/__tests__/harnesses/claude/ClaudeSessionLocator.test.ts +0 -423
- package/src/__tests__/harnesses/claude/ClaudeSessionParser.test.ts +0 -300
- package/src/__tests__/harnesses/claude/durable/ClaudeCliProbe.test.ts +0 -34
- package/src/__tests__/harnesses/claude/durable/ClaudePrintAgent.integration.test.ts +0 -61
- package/src/__tests__/harnesses/claude/durable/ClaudePrintAgentService.test.ts +0 -129
- package/src/__tests__/harnesses/claude/durable/ClaudePrintRunner.test.ts +0 -152
- package/src/__tests__/harnesses/codex/CodexAdapter.test.ts +0 -652
- package/src/__tests__/harnesses/codex/CodexSessionLocator.test.ts +0 -419
- package/src/__tests__/harnesses/codex/CodexSessionMapping.test.ts +0 -63
- package/src/__tests__/harnesses/codex/CodexSessionParser.test.ts +0 -192
- package/src/__tests__/harnesses/codex/durable/CodexCliProbe.test.ts +0 -80
- package/src/__tests__/harnesses/codex/durable/CodexDurableAgentRepository.test.ts +0 -65
- package/src/__tests__/harnesses/codex/durable/CodexPrintAgent.integration.test.ts +0 -104
- package/src/__tests__/harnesses/codex/durable/CodexPrintAgentService.test.ts +0 -201
- package/src/__tests__/harnesses/codex/durable/CodexPrintRunner.test.ts +0 -299
- package/src/__tests__/harnesses/copilot/CopilotAdapter.test.ts +0 -614
- package/src/__tests__/harnesses/copilot/CopilotRefreshIO.test.ts +0 -270
- package/src/__tests__/harnesses/devin/DevinAdapter.test.ts +0 -290
- package/src/__tests__/harnesses/devin/DevinAgentMapper.test.ts +0 -101
- package/src/__tests__/harnesses/devin/DevinSessionLocator.test.ts +0 -139
- package/src/__tests__/harnesses/devin/DevinSessionParser.test.ts +0 -212
- package/src/__tests__/harnesses/devin/fixtures.ts +0 -144
- package/src/__tests__/harnesses/gemini/GeminiCliAdapter.test.ts +0 -1336
- package/src/__tests__/harnesses/gemini/GeminiSessionJsonl.test.ts +0 -402
- package/src/__tests__/harnesses/gemini/GeminiSessionLocator.test.ts +0 -396
- package/src/__tests__/harnesses/grok/GrokAgentMapper.test.ts +0 -57
- package/src/__tests__/harnesses/grok/GrokCliAdapter.test.ts +0 -376
- package/src/__tests__/harnesses/grok/GrokIncrementalRefresh.test.ts +0 -170
- package/src/__tests__/harnesses/grok/GrokSessionLocator.test.ts +0 -106
- package/src/__tests__/harnesses/grok/GrokSessionParser.test.ts +0 -230
- package/src/__tests__/harnesses/kiro/KiroAdapter.test.ts +0 -552
- package/src/__tests__/harnesses/muse/MuseAdapter.test.ts +0 -197
- package/src/__tests__/harnesses/muse/MuseAgentMapper.test.ts +0 -83
- package/src/__tests__/harnesses/muse/MuseSessionLocator.test.ts +0 -177
- package/src/__tests__/harnesses/muse/MuseSessionParser.test.ts +0 -279
- package/src/__tests__/harnesses/opencode/OpenCodeAdapter.test.ts +0 -215
- package/src/__tests__/harnesses/opencode/OpenCodeAgentMapper.test.ts +0 -101
- package/src/__tests__/harnesses/opencode/OpenCodeSessionLocator.test.ts +0 -84
- package/src/__tests__/harnesses/opencode/OpenCodeSessionParser.test.ts +0 -149
- package/src/__tests__/harnesses/pi/PiAdapter.test.ts +0 -325
- package/src/__tests__/harnesses/pi/PiDiscoveryIO.test.ts +0 -337
- package/src/__tests__/harnesses/pi/PiSessionParser.test.ts +0 -280
- package/src/__tests__/harnesses/pi/PiSessionTracker.test.ts +0 -79
- package/src/__tests__/harnesses/pi/durable/PiCliProbe.test.ts +0 -50
- package/src/__tests__/harnesses/pi/durable/PiDurableAgentRepository.test.ts +0 -33
- package/src/__tests__/harnesses/pi/durable/PiPrintAgentService.test.ts +0 -138
- package/src/__tests__/harnesses/pi/durable/PiPrintProtocol.test.ts +0 -71
- package/src/__tests__/harnesses/pi/durable/PiPrintRunner.test.ts +0 -252
- package/src/__tests__/harnesses/pi/durable/PiStreamParser.test.ts +0 -26
- package/src/__tests__/harnesses/readiness/AgentReadiness.test.ts +0 -362
- package/src/__tests__/harnesses/runtimeProfiles.test.ts +0 -123
- package/src/__tests__/print/DurableAgent.test.ts +0 -15
- package/src/__tests__/print/DurableAgentRepository.sqlite.test.ts +0 -128
- package/src/__tests__/print/DurableAgentRepository.test.ts +0 -184
- package/src/__tests__/readiness-fixtures.test.ts +0 -79
- package/src/__tests__/runtime/AgentRuntime.test.ts +0 -8
- package/src/__tests__/runtime/HerdrAgentDiscovery.test.ts +0 -131
- package/src/__tests__/runtime/HerdrAgentRuntime.test.ts +0 -377
- package/src/__tests__/runtime/ManagedAgentRuntime.test.ts +0 -590
- package/src/__tests__/terminal/GhosttyBackend.test.ts +0 -271
- package/src/__tests__/terminal/TerminalFocusManager.test.ts +0 -280
- package/src/__tests__/terminal/TmuxManager.test.ts +0 -185
- package/src/__tests__/terminal/TtyWriter.test.ts +0 -454
- package/src/__tests__/utils/AgentRegistry.test.ts +0 -532
- package/src/__tests__/utils/IncrementalJsonlSummary.test.ts +0 -414
- package/src/__tests__/utils/agent-requests.test.ts +0 -94
- package/src/__tests__/utils/conversationTail.bench.test.ts +0 -193
- package/src/__tests__/utils/conversationTailParity.test.ts +0 -365
- package/src/__tests__/utils/jsonlTail.test.ts +0 -317
- package/src/__tests__/utils/matching.test.ts +0 -234
- package/src/__tests__/utils/matchingConstants.test.ts +0 -40
- package/src/__tests__/utils/process.test.ts +0 -596
- package/src/__tests__/utils/session.test.ts +0 -158
- package/src/adapters/AgentAdapter.ts +0 -255
- package/src/capacity/index.ts +0 -127
- package/src/capacity/providers/anthropic.ts +0 -198
- package/src/capacity/providers/devin.ts +0 -121
- package/src/capacity/providers/openai-platform.ts +0 -150
- package/src/capacity/providers/openai-subscription.ts +0 -184
- package/src/capacity/providers/zai.ts +0 -155
- package/src/capacity/sources/claude.ts +0 -30
- package/src/capacity/sources/codex.ts +0 -251
- package/src/capacity/sources/devin.ts +0 -49
- package/src/capacity/sources/pi.ts +0 -131
- package/src/capacity/types.ts +0 -29
- package/src/database/connection.ts +0 -96
- package/src/database/index.ts +0 -7
- package/src/database/migrations/001_initial.sql +0 -12
- package/src/database/migrations/002_pins.sql +0 -1
- package/src/database/migrations/003_durable_agents.sql +0 -43
- package/src/database/migrations/004_codex_durable_sessions.sql +0 -1
- package/src/database/migrations/005_agent_runtime.sql +0 -2
- package/src/database/schema.ts +0 -64
- package/src/durable/DurableAgent.ts +0 -139
- package/src/durable/DurableAgentRepository.ts +0 -485
- package/src/durable/process.ts +0 -29
- package/src/durable/run.ts +0 -84
- package/src/durable/utils.ts +0 -66
- package/src/fixtures/bundle.ts +0 -130
- package/src/fixtures/capture.ts +0 -364
- package/src/harnesses/antigravity/AntigravityAgentMapper.ts +0 -34
- package/src/harnesses/antigravity/AntigravityCliAdapter.ts +0 -126
- package/src/harnesses/antigravity/AntigravitySessionLocator.ts +0 -75
- package/src/harnesses/antigravity/AntigravitySessionParser.ts +0 -252
- package/src/harnesses/claude/ClaudeAgentMapper.ts +0 -55
- package/src/harnesses/claude/ClaudeCodeAdapter.ts +0 -175
- package/src/harnesses/claude/ClaudeSessionLocator.ts +0 -358
- package/src/harnesses/claude/ClaudeSessionParser.ts +0 -524
- package/src/harnesses/claude/credentials.ts +0 -122
- package/src/harnesses/claude/durable/ClaudeCliProbe.ts +0 -57
- package/src/harnesses/claude/durable/ClaudePrintAgentService.ts +0 -79
- package/src/harnesses/claude/durable/ClaudePrintRunner.ts +0 -102
- package/src/harnesses/claude/durable/ClaudeStreamParser.ts +0 -108
- package/src/harnesses/claude/readiness.ts +0 -69
- package/src/harnesses/codex/CodexAdapter.ts +0 -337
- package/src/harnesses/codex/CodexAgentMapper.ts +0 -26
- package/src/harnesses/codex/CodexSessionLocator.ts +0 -509
- package/src/harnesses/codex/CodexSessionMapping.ts +0 -89
- package/src/harnesses/codex/CodexSessionParser.ts +0 -462
- package/src/harnesses/codex/credentials.ts +0 -81
- package/src/harnesses/codex/durable/CodexCliProbe.ts +0 -68
- package/src/harnesses/codex/durable/CodexPrintAgentService.ts +0 -79
- package/src/harnesses/codex/durable/CodexPrintRunner.ts +0 -104
- package/src/harnesses/codex/durable/CodexStreamParser.ts +0 -117
- package/src/harnesses/codex/readiness.ts +0 -72
- package/src/harnesses/copilot/CopilotAdapter.ts +0 -161
- package/src/harnesses/copilot/CopilotAgentMapper.ts +0 -27
- package/src/harnesses/copilot/CopilotSessionLocator.ts +0 -161
- package/src/harnesses/copilot/CopilotSessionParser.ts +0 -380
- package/src/harnesses/copilot/readiness.ts +0 -33
- package/src/harnesses/devin/DevinAdapter.ts +0 -212
- package/src/harnesses/devin/DevinAgentMapper.ts +0 -39
- package/src/harnesses/devin/DevinSessionLocator.ts +0 -230
- package/src/harnesses/devin/DevinSessionParser.ts +0 -227
- package/src/harnesses/devin/credentials.ts +0 -88
- package/src/harnesses/devin/readiness.ts +0 -36
- package/src/harnesses/gemini/GeminiAgentMapper.ts +0 -27
- package/src/harnesses/gemini/GeminiCliAdapter.ts +0 -272
- package/src/harnesses/gemini/GeminiSessionLocator.ts +0 -394
- package/src/harnesses/gemini/GeminiSessionParser.ts +0 -395
- package/src/harnesses/gemini/fileSignature.ts +0 -10
- package/src/harnesses/grok/GrokAgentMapper.ts +0 -32
- package/src/harnesses/grok/GrokCliAdapter.ts +0 -126
- package/src/harnesses/grok/GrokSessionLocator.ts +0 -179
- package/src/harnesses/grok/GrokSessionParser.ts +0 -251
- package/src/harnesses/index.ts +0 -32
- package/src/harnesses/kiro/KiroAdapter.ts +0 -143
- package/src/harnesses/kiro/KiroAgentMapper.ts +0 -34
- package/src/harnesses/kiro/KiroSessionLocator.ts +0 -143
- package/src/harnesses/kiro/KiroSessionParser.ts +0 -376
- package/src/harnesses/muse/MuseAdapter.ts +0 -157
- package/src/harnesses/muse/MuseAgentMapper.ts +0 -33
- package/src/harnesses/muse/MuseSessionLocator.ts +0 -286
- package/src/harnesses/muse/MuseSessionParser.ts +0 -435
- package/src/harnesses/muse/readiness.ts +0 -38
- package/src/harnesses/opencode/OpenCodeAdapter.ts +0 -110
- package/src/harnesses/opencode/OpenCodeAgentMapper.ts +0 -49
- package/src/harnesses/opencode/OpenCodeSessionLocator.ts +0 -151
- package/src/harnesses/opencode/OpenCodeSessionParser.ts +0 -146
- package/src/harnesses/opencode/readiness.ts +0 -48
- package/src/harnesses/pi/PiAdapter.ts +0 -197
- package/src/harnesses/pi/PiAgentMapper.ts +0 -27
- package/src/harnesses/pi/PiSessionLocator.ts +0 -288
- package/src/harnesses/pi/PiSessionParser.ts +0 -488
- package/src/harnesses/pi/PiSessionTracker.ts +0 -87
- package/src/harnesses/pi/credentials.ts +0 -129
- package/src/harnesses/pi/durable/PiCliProbe.ts +0 -56
- package/src/harnesses/pi/durable/PiPrintAgentService.ts +0 -77
- package/src/harnesses/pi/durable/PiPrintProtocol.ts +0 -41
- package/src/harnesses/pi/durable/PiPrintRunner.ts +0 -95
- package/src/harnesses/pi/durable/PiStreamParser.ts +0 -94
- package/src/harnesses/pi/readiness.ts +0 -104
- package/src/harnesses/readiness/AgentReadiness.ts +0 -91
- package/src/harnesses/readiness/checks.ts +0 -336
- package/src/harnesses/readiness/types.ts +0 -90
- package/src/harnesses/runtimeProfiles.ts +0 -105
- package/src/harnesses/shared.ts +0 -124
- package/src/index.ts +0 -70
- package/src/runtime/ManagedAgentRuntime.ts +0 -253
- package/src/runtime/RuntimeFactory.ts +0 -13
- package/src/runtime/errors.ts +0 -50
- package/src/runtime/herdr/HerdrAgentDiscovery.ts +0 -166
- package/src/runtime/herdr/HerdrAgentRuntime.ts +0 -216
- package/src/runtime/herdr/HerdrCliClient.ts +0 -78
- package/src/runtime/herdr/HerdrErrors.ts +0 -9
- package/src/runtime/herdr/HerdrResponseParsers.ts +0 -86
- package/src/runtime/herdr/HerdrRuntimeRef.ts +0 -41
- package/src/runtime/tmux/PidPolling.ts +0 -34
- package/src/runtime/tmux/TmuxAgentRuntime.ts +0 -113
- package/src/runtime/tmux/TmuxManager.ts +0 -102
- package/src/runtime/tmux/TmuxRuntimeRef.ts +0 -9
- package/src/runtime/types.ts +0 -56
- package/src/terminal/TerminalFocusManager.ts +0 -52
- package/src/terminal/TtyWriter.ts +0 -26
- package/src/terminal/backends/ghostty.ts +0 -180
- package/src/terminal/backends/index.ts +0 -23
- package/src/terminal/backends/iterm2.ts +0 -126
- package/src/terminal/backends/shared.ts +0 -47
- package/src/terminal/backends/terminal-app.ts +0 -122
- package/src/terminal/backends/tmux.ts +0 -62
- package/src/terminal/backends/wezterm.ts +0 -65
- package/src/terminal/types.ts +0 -23
- package/src/utils/AgentRegistry.ts +0 -351
- package/src/utils/IncrementalJsonlSummary.ts +0 -306
- package/src/utils/agent-requests.ts +0 -28
- package/src/utils/applescript.ts +0 -10
- package/src/utils/jsonlTail.ts +0 -349
- package/src/utils/matching.ts +0 -96
- package/src/utils/matchingConstants.ts +0 -15
- package/src/utils/process.ts +0 -604
- package/src/utils/session.ts +0 -144
- package/src/utils/sortAgents.ts +0 -54
- package/tsconfig.json +0 -11
- package/vitest.config.ts +0 -20
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { describe, expect, it, vi } from "vitest";
|
|
3
|
-
import {
|
|
4
|
-
getAgentReadinessReport,
|
|
5
|
-
getAgentReadinessReports,
|
|
6
|
-
type AgentReadinessOptions,
|
|
7
|
-
type ReadinessAgentType,
|
|
8
|
-
} from "../../../harnesses/readiness/AgentReadiness.js";
|
|
9
|
-
import { HARNESS_RUNTIME_PROFILES } from "../../../harnesses/runtimeProfiles.js";
|
|
10
|
-
|
|
11
|
-
type Files = Record<string, string>;
|
|
12
|
-
|
|
13
|
-
const builtInSkillNames = ["agent-management", "memory", "verify"];
|
|
14
|
-
const skillRoots: Record<string, string> = {
|
|
15
|
-
claude: ".claude/skills",
|
|
16
|
-
codex: ".codex/skills",
|
|
17
|
-
copilot: ".copilot/skills",
|
|
18
|
-
gemini_cli: ".gemini/skills",
|
|
19
|
-
grok_cli: ".grok/skills",
|
|
20
|
-
antigravity_cli: ".gemini/config/skills",
|
|
21
|
-
opencode: ".config/opencode/skill",
|
|
22
|
-
pi: ".pi/agent/skills",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
function fixture(overrides: Partial<AgentReadinessOptions> = {}) {
|
|
26
|
-
const homeDir = "/home/test";
|
|
27
|
-
const assetRoot = "/assets";
|
|
28
|
-
const files: Files = {
|
|
29
|
-
[path.join(homeDir, ".codex", "hooks", "codex-session-mapping.cjs")]: "codex-hook",
|
|
30
|
-
[path.join(assetRoot, "codex", "codex-session-mapping.cjs")]: "codex-hook",
|
|
31
|
-
[path.join(homeDir, ".codex", "hooks.json")]: JSON.stringify({
|
|
32
|
-
hooks: {
|
|
33
|
-
SessionStart: [
|
|
34
|
-
{
|
|
35
|
-
hooks: [{ type: "command", command: "node ~/.codex/hooks/codex-session-mapping.cjs" }],
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
[path.join(homeDir, ".codex", "ai-devkit", "sessions.json")]: JSON.stringify({
|
|
41
|
-
"123": "/sessions/codex.jsonl",
|
|
42
|
-
}),
|
|
43
|
-
"/sessions/codex.jsonl": "",
|
|
44
|
-
[path.join(homeDir, ".claude", "hooks", "claude-prompt-hook.js")]: "claude-hook",
|
|
45
|
-
[path.join(assetRoot, "claude", "claude-prompt-hook.js")]: "claude-hook",
|
|
46
|
-
[path.join(homeDir, ".claude", "settings.json")]: JSON.stringify({
|
|
47
|
-
hooks: {
|
|
48
|
-
PreToolUse: [
|
|
49
|
-
{ hooks: [{ type: "command", command: "node ~/.claude/hooks/claude-prompt-hook.js" }] },
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
}),
|
|
53
|
-
[path.join(homeDir, ".pi", "agent", "sessions.json")]: JSON.stringify({
|
|
54
|
-
"456": "/sessions/missing-pi.jsonl",
|
|
55
|
-
}),
|
|
56
|
-
[path.join(homeDir, ".pi", "agent", "auth.json")]: JSON.stringify({
|
|
57
|
-
anthropic: { access: "access-secret", refresh: "refresh-secret" },
|
|
58
|
-
litellm: { key: "litellm-secret", env: { LITELLM_BASE_URL: "https://litellm.example.test" } },
|
|
59
|
-
}),
|
|
60
|
-
};
|
|
61
|
-
for (const directory of [
|
|
62
|
-
".claude",
|
|
63
|
-
".codex",
|
|
64
|
-
".copilot",
|
|
65
|
-
".gemini",
|
|
66
|
-
".grok",
|
|
67
|
-
".kiro",
|
|
68
|
-
".gemini/antigravity-cli",
|
|
69
|
-
".config/opencode",
|
|
70
|
-
".config/devin",
|
|
71
|
-
".config/muse",
|
|
72
|
-
".pi",
|
|
73
|
-
]) {
|
|
74
|
-
files[path.join(homeDir, directory)] = "<dir>";
|
|
75
|
-
}
|
|
76
|
-
for (const root of Object.values(skillRoots)) {
|
|
77
|
-
for (const skill of builtInSkillNames) {
|
|
78
|
-
files[path.join(homeDir, root, skill, "SKILL.md")] = "# skill";
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const executablePaths = Object.values(HARNESS_RUNTIME_PROFILES).map((agent) =>
|
|
82
|
-
path.join("/bin", agent.command),
|
|
83
|
-
);
|
|
84
|
-
const options: AgentReadinessOptions = {
|
|
85
|
-
homeDir,
|
|
86
|
-
path: "/bin",
|
|
87
|
-
assetRoot,
|
|
88
|
-
builtInSkillNames,
|
|
89
|
-
skillRoots,
|
|
90
|
-
readFile: async (target) => {
|
|
91
|
-
if (!(target in files)) throw new Error("missing");
|
|
92
|
-
return files[target];
|
|
93
|
-
},
|
|
94
|
-
access: async (target) => {
|
|
95
|
-
if (executablePaths.includes(target) || target in files) return;
|
|
96
|
-
throw new Error("missing");
|
|
97
|
-
},
|
|
98
|
-
runCommand: vi.fn(async (command) => {
|
|
99
|
-
if (command === "pi") return { stdout: "npm:@ai-devkit/pi-session-tracker\n", stderr: "" };
|
|
100
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
101
|
-
if (command === "gh")
|
|
102
|
-
return { stdout: "github.com\n Logged in to github.com account test-user\n", stderr: "" };
|
|
103
|
-
if (command === "opencode")
|
|
104
|
-
return { stdout: "● litellm api\n● OpenAI oauth\n", stderr: "" };
|
|
105
|
-
if (command === "devin")
|
|
106
|
-
return { stdout: "Logged in (via Devin).\n\nUser:\n Name: test-user\n", stderr: "" };
|
|
107
|
-
throw new Error(`unexpected command ${command}`);
|
|
108
|
-
}),
|
|
109
|
-
codexAuth: async () => true,
|
|
110
|
-
...overrides,
|
|
111
|
-
};
|
|
112
|
-
return { options, files };
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
describe("agent readiness", () => {
|
|
116
|
-
it("reports every readiness-supported adapter with generic checks and only real integrations", async () => {
|
|
117
|
-
const { options } = fixture();
|
|
118
|
-
|
|
119
|
-
const reports = await getAgentReadinessReports(options);
|
|
120
|
-
|
|
121
|
-
expect(Object.keys(reports)).toEqual([
|
|
122
|
-
"claude",
|
|
123
|
-
"codex",
|
|
124
|
-
"gemini_cli",
|
|
125
|
-
"grok_cli",
|
|
126
|
-
"kiro",
|
|
127
|
-
"antigravity_cli",
|
|
128
|
-
"opencode",
|
|
129
|
-
"copilot",
|
|
130
|
-
"pi",
|
|
131
|
-
"devin",
|
|
132
|
-
"muse",
|
|
133
|
-
]);
|
|
134
|
-
for (const [agent, report] of Object.entries(reports) as Array<
|
|
135
|
-
[ReadinessAgentType, (typeof reports)[ReadinessAgentType]]
|
|
136
|
-
>) {
|
|
137
|
-
expect(report.type).toBe(agent);
|
|
138
|
-
expect(report.executable.status).toBe("pass");
|
|
139
|
-
expect(report.globalConfig.status).toBe("pass");
|
|
140
|
-
expect(report.builtInSkills.status).toBe("info");
|
|
141
|
-
}
|
|
142
|
-
expect(reports.gemini_cli.builtInSkills).toMatchObject({ present: 3, required: 3 });
|
|
143
|
-
expect(reports.antigravity_cli.builtInSkills).toMatchObject({ present: 3, required: 3 });
|
|
144
|
-
expect(reports.kiro.builtInSkills).toMatchObject({
|
|
145
|
-
path: null,
|
|
146
|
-
present: 0,
|
|
147
|
-
required: 3,
|
|
148
|
-
missing: builtInSkillNames,
|
|
149
|
-
});
|
|
150
|
-
expect(reports.codex.integration).toMatchObject({
|
|
151
|
-
label: "ai-devkit hook",
|
|
152
|
-
installed: true,
|
|
153
|
-
status: "pass",
|
|
154
|
-
});
|
|
155
|
-
expect(reports.claude.integration).toMatchObject({
|
|
156
|
-
label: "ai-devkit hook",
|
|
157
|
-
installed: true,
|
|
158
|
-
status: "pass",
|
|
159
|
-
});
|
|
160
|
-
expect(reports.pi.integration).toMatchObject({
|
|
161
|
-
label: "ai-devkit plugin",
|
|
162
|
-
installed: true,
|
|
163
|
-
status: "pass",
|
|
164
|
-
});
|
|
165
|
-
expect(reports.copilot.integration).toBeUndefined();
|
|
166
|
-
expect(reports.gemini_cli.integration).toBeUndefined();
|
|
167
|
-
expect(reports.grok_cli.integration).toBeUndefined();
|
|
168
|
-
expect(reports.kiro.integration).toBeUndefined();
|
|
169
|
-
expect(reports.antigravity_cli.integration).toBeUndefined();
|
|
170
|
-
expect(reports.opencode.integration).toBeUndefined();
|
|
171
|
-
expect(reports.muse.integration).toBeUndefined();
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
it("resolves agent executables from PATH directories containing spaces", async () => {
|
|
175
|
-
const spacedBin = "/Applications/Some App.app/Contents/Resources";
|
|
176
|
-
const codexPath = path.join(spacedBin, HARNESS_RUNTIME_PROFILES.codex.command);
|
|
177
|
-
const { options } = fixture({
|
|
178
|
-
path: [spacedBin, "/usr/local/bin"].join(path.delimiter),
|
|
179
|
-
access: async (target) => {
|
|
180
|
-
if (target === codexPath || target.startsWith("/home/test")) return;
|
|
181
|
-
throw new Error("missing");
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
const report = await getAgentReadinessReport("codex", options);
|
|
186
|
-
|
|
187
|
-
expect(report.executable).toMatchObject({ command: "codex", path: codexPath, status: "pass" });
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
it("parses Pi provider names without returning credential values", async () => {
|
|
191
|
-
const { options } = fixture();
|
|
192
|
-
|
|
193
|
-
const report = await getAgentReadinessReport("pi", options);
|
|
194
|
-
const serialized = JSON.stringify(report);
|
|
195
|
-
|
|
196
|
-
expect(report.auth).toMatchObject({
|
|
197
|
-
state: "authenticated",
|
|
198
|
-
provider: null,
|
|
199
|
-
availableProviders: ["anthropic", "litellm"],
|
|
200
|
-
status: "pass",
|
|
201
|
-
});
|
|
202
|
-
expect(serialized).not.toContain("access-secret");
|
|
203
|
-
expect(serialized).not.toContain("refresh-secret");
|
|
204
|
-
expect(serialized).not.toContain("litellm-secret");
|
|
205
|
-
expect(serialized).not.toContain("litellm.example.test");
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
it("accepts Pi session tracker display names from pi list output", async () => {
|
|
209
|
-
const { options } = fixture({
|
|
210
|
-
runCommand: vi.fn(async (command) => {
|
|
211
|
-
if (command === "pi") return { stdout: "session tracker\n", stderr: "" };
|
|
212
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
213
|
-
throw new Error(`unexpected command ${command}`);
|
|
214
|
-
}),
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
const report = await getAgentReadinessReport("pi", options);
|
|
218
|
-
|
|
219
|
-
expect(report.integration).toMatchObject({
|
|
220
|
-
label: "ai-devkit plugin",
|
|
221
|
-
installed: true,
|
|
222
|
-
status: "pass",
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
it("reports missing built-in skills as informational readiness", async () => {
|
|
227
|
-
const { options, files } = fixture();
|
|
228
|
-
delete files[path.join(options.homeDir!, skillRoots.codex, "verify", "SKILL.md")];
|
|
229
|
-
|
|
230
|
-
const report = await getAgentReadinessReport("codex", options);
|
|
231
|
-
|
|
232
|
-
expect(report.builtInSkills).toMatchObject({
|
|
233
|
-
status: "info",
|
|
234
|
-
present: 2,
|
|
235
|
-
required: 3,
|
|
236
|
-
missing: ["verify"],
|
|
237
|
-
});
|
|
238
|
-
expect(report.status).toBe("pass");
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
it("checks OpenCode auth from auth list output", async () => {
|
|
242
|
-
const { options } = fixture({
|
|
243
|
-
runCommand: vi.fn(async (command) => {
|
|
244
|
-
if (command === "opencode") {
|
|
245
|
-
return {
|
|
246
|
-
stdout: "\x1B[32m●\x1B[0m litellm api\n● OpenAI oauth\n● GitLab Duo GITLAB_TOKEN\n",
|
|
247
|
-
stderr: "",
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
if (command === "pi") return { stdout: "npm:@ai-devkit/pi-session-tracker\n", stderr: "" };
|
|
251
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
252
|
-
throw new Error(`unexpected command ${command}`);
|
|
253
|
-
}),
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
const report = await getAgentReadinessReport("opencode", options);
|
|
257
|
-
|
|
258
|
-
expect(report.auth).toMatchObject({
|
|
259
|
-
state: "authenticated",
|
|
260
|
-
source: "opencode auth list",
|
|
261
|
-
provider: null,
|
|
262
|
-
availableProviders: ["GitLab Duo", "OpenAI", "litellm"],
|
|
263
|
-
status: "pass",
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
it("checks Copilot auth through GitHub CLI authentication", async () => {
|
|
268
|
-
const { options } = fixture({
|
|
269
|
-
runCommand: vi.fn(async (command) => {
|
|
270
|
-
if (command === "gh")
|
|
271
|
-
return {
|
|
272
|
-
stdout: "github.com\n Logged in to github.com account test-user\n",
|
|
273
|
-
stderr: "",
|
|
274
|
-
};
|
|
275
|
-
if (command === "pi") return { stdout: "npm:@ai-devkit/pi-session-tracker\n", stderr: "" };
|
|
276
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
277
|
-
if (command === "opencode") return { stdout: "● litellm api\n", stderr: "" };
|
|
278
|
-
throw new Error(`unexpected command ${command}`);
|
|
279
|
-
}),
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
const report = await getAgentReadinessReport("copilot", options);
|
|
283
|
-
|
|
284
|
-
expect(report.auth).toMatchObject({
|
|
285
|
-
state: "authenticated",
|
|
286
|
-
source: "gh auth status --hostname github.com",
|
|
287
|
-
provider: "github",
|
|
288
|
-
availableProviders: ["GitHub"],
|
|
289
|
-
status: "pass",
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
it("checks Devin auth from devin auth status output", async () => {
|
|
294
|
-
const { options } = fixture({
|
|
295
|
-
runCommand: vi.fn(async (command) => {
|
|
296
|
-
if (command === "devin")
|
|
297
|
-
return { stdout: "Logged in (via Devin).\n\nUser:\n Name: test-user\n", stderr: "" };
|
|
298
|
-
if (command === "pi") return { stdout: "npm:@ai-devkit/pi-session-tracker\n", stderr: "" };
|
|
299
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
300
|
-
throw new Error(`unexpected command ${command}`);
|
|
301
|
-
}),
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
const report = await getAgentReadinessReport("devin", options);
|
|
305
|
-
|
|
306
|
-
expect(report.auth).toMatchObject({
|
|
307
|
-
state: "authenticated",
|
|
308
|
-
source: "devin auth status",
|
|
309
|
-
provider: null,
|
|
310
|
-
availableProviders: ["devin"],
|
|
311
|
-
status: "pass",
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
it("checks Muse auth from the muse auth.json file", async () => {
|
|
316
|
-
const authPath = path.join("/home/test", ".config", "muse", "auth.json");
|
|
317
|
-
const { options, files } = fixture();
|
|
318
|
-
files[authPath] = JSON.stringify({ meta: { token: "secret" } });
|
|
319
|
-
|
|
320
|
-
const report = await getAgentReadinessReport("muse", options);
|
|
321
|
-
|
|
322
|
-
expect(report.auth).toMatchObject({ state: "authenticated", status: "pass" });
|
|
323
|
-
expect(report.globalConfig).toMatchObject({ status: "pass" });
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
it("reports Muse as unauthenticated with an empty auth file", async () => {
|
|
327
|
-
const authPath = path.join("/home/test", ".config", "muse", "auth.json");
|
|
328
|
-
const { options, files } = fixture();
|
|
329
|
-
files[authPath] = JSON.stringify({});
|
|
330
|
-
|
|
331
|
-
const report = await getAgentReadinessReport("muse", options);
|
|
332
|
-
|
|
333
|
-
expect(report.auth).toMatchObject({
|
|
334
|
-
state: "unauthenticated",
|
|
335
|
-
status: "fail",
|
|
336
|
-
errors: ["Muse credential file has no entries"],
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
it("reports Muse as unauthenticated without an auth file", async () => {
|
|
341
|
-
const { options } = fixture();
|
|
342
|
-
|
|
343
|
-
const report = await getAgentReadinessReport("muse", options);
|
|
344
|
-
|
|
345
|
-
expect(report.auth).toMatchObject({ state: "unauthenticated", status: "fail" });
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
it("reports Devin as unauthenticated without a login line", async () => {
|
|
349
|
-
const { options } = fixture({
|
|
350
|
-
runCommand: vi.fn(async (command) => {
|
|
351
|
-
if (command === "devin") return { stdout: "Not logged in\n", stderr: "" };
|
|
352
|
-
if (command === "pi") return { stdout: "npm:@ai-devkit/pi-session-tracker\n", stderr: "" };
|
|
353
|
-
if (command === "claude") return { stdout: JSON.stringify({ loggedIn: true }), stderr: "" };
|
|
354
|
-
throw new Error(`unexpected command ${command}`);
|
|
355
|
-
}),
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
const report = await getAgentReadinessReport("devin", options);
|
|
359
|
-
|
|
360
|
-
expect(report.auth).toMatchObject({ state: "unauthenticated", status: "fail" });
|
|
361
|
-
});
|
|
362
|
-
});
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
import {
|
|
6
|
-
HARNESS_RUNTIME_PROFILES,
|
|
7
|
-
runtimeAgentMatchesHarness,
|
|
8
|
-
} from "../../harnesses/runtimeProfiles.js";
|
|
9
|
-
|
|
10
|
-
describe("harness runtime profiles", () => {
|
|
11
|
-
it("keeps launch and runtime identity metadata together", () => {
|
|
12
|
-
expect(HARNESS_RUNTIME_PROFILES.antigravity_cli).toMatchObject({
|
|
13
|
-
command: "agy",
|
|
14
|
-
runtimeKind: "agy",
|
|
15
|
-
discoveryAliases: ["agy", "antigravity", "antigravity_cli"],
|
|
16
|
-
});
|
|
17
|
-
expect(HARNESS_RUNTIME_PROFILES.antigravity_cli.matches("/usr/local/bin/agy")).toBe(true);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it("recognizes agent commands without matching similar argument text", () => {
|
|
21
|
-
expect(HARNESS_RUNTIME_PROFILES.copilot.matches("/opt/copilot-cli/1.0/copilot")).toBe(true);
|
|
22
|
-
expect(HARNESS_RUNTIME_PROFILES.copilot.matches("node /repo/copilot-cli/script.js")).toBe(
|
|
23
|
-
false,
|
|
24
|
-
);
|
|
25
|
-
expect(HARNESS_RUNTIME_PROFILES.grok_cli.matches("/Users/dev/.grok/bin/grok --approve")).toBe(
|
|
26
|
-
true,
|
|
27
|
-
);
|
|
28
|
-
expect(HARNESS_RUNTIME_PROFILES.grok_cli.matches("node /repo/grok-cli/script.js")).toBe(false);
|
|
29
|
-
expect(
|
|
30
|
-
HARNESS_RUNTIME_PROFILES.gemini_cli.matches("node --no-warnings /usr/local/bin/gemini"),
|
|
31
|
-
).toBe(true);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it("matches runtime discovery names through the owning harness profile", () => {
|
|
35
|
-
expect(runtimeAgentMatchesHarness("kiro-cli", "kiro")).toBe(true);
|
|
36
|
-
expect(runtimeAgentMatchesHarness("gemini", "gemini_cli")).toBe(true);
|
|
37
|
-
expect(runtimeAgentMatchesHarness("codex", "claude")).toBe(false);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("profiles the versioned muse launcher", () => {
|
|
41
|
-
expect(HARNESS_RUNTIME_PROFILES.muse).toMatchObject({
|
|
42
|
-
command: "muse",
|
|
43
|
-
runtimeKind: "muse",
|
|
44
|
-
discoveryAliases: ["muse"],
|
|
45
|
-
});
|
|
46
|
-
expect(
|
|
47
|
-
HARNESS_RUNTIME_PROFILES.muse.matches("/Users/dev/.local/bin/muse-bin-1.4.4-R5419.1"),
|
|
48
|
-
).toBe(true);
|
|
49
|
-
expect(HARNESS_RUNTIME_PROFILES.muse.matches("/usr/local/bin/muse")).toBe(true);
|
|
50
|
-
expect(runtimeAgentMatchesHarness("muse", "muse")).toBe(true);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
describe("harness matchers with executables under paths containing spaces", () => {
|
|
55
|
-
let root: string;
|
|
56
|
-
|
|
57
|
-
function install(relativePath: string): string {
|
|
58
|
-
const fullPath = path.join(root, relativePath);
|
|
59
|
-
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
60
|
-
fs.writeFileSync(fullPath, "");
|
|
61
|
-
return fullPath;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
beforeEach(() => {
|
|
65
|
-
root = fs.mkdtempSync(path.join(os.tmpdir(), "runtime-profiles-spaces-"));
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
afterEach(() => {
|
|
69
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it("recognizes argv[0] under a spaced directory", () => {
|
|
73
|
-
const codex = install("Applications/Some App.app/Contents/Resources/codex");
|
|
74
|
-
const claude = install("Users/dev/My Tools/bin/claude");
|
|
75
|
-
|
|
76
|
-
expect(HARNESS_RUNTIME_PROFILES.codex.matches(`${codex} --sandbox workspace-write`)).toBe(true);
|
|
77
|
-
expect(HARNESS_RUNTIME_PROFILES.codex.matches(codex)).toBe(true);
|
|
78
|
-
expect(HARNESS_RUNTIME_PROFILES.claude.matches(`${claude} --continue`)).toBe(true);
|
|
79
|
-
expect(HARNESS_RUNTIME_PROFILES.claude.matches(`${codex} exec --cd /repo`)).toBe(false);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("recognizes argv[0] by distribution name under a spaced directory", () => {
|
|
83
|
-
const copilot = install("opt/Home Brew/Caskroom/copilot-cli/1.0.60/copilot");
|
|
84
|
-
|
|
85
|
-
expect(HARNESS_RUNTIME_PROFILES.copilot.matches(`${copilot} --allow-all-tools`)).toBe(true);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it("does not treat arguments containing spaces as the executable", () => {
|
|
89
|
-
const vim = install("usr/bin/vim");
|
|
90
|
-
const codex = install("Applications/Some App.app/Contents/Resources/codex");
|
|
91
|
-
|
|
92
|
-
expect(HARNESS_RUNTIME_PROFILES.claude.matches(`${vim} My Notes/claude`)).toBe(false);
|
|
93
|
-
expect(
|
|
94
|
-
HARNESS_RUNTIME_PROFILES.claude.matches(`${codex} exec review the Other Dir/claude`),
|
|
95
|
-
).toBe(false);
|
|
96
|
-
expect(HARNESS_RUNTIME_PROFILES.copilot.matches(`${vim} Some Dir/copilot-cli/notes.md`)).toBe(
|
|
97
|
-
false,
|
|
98
|
-
);
|
|
99
|
-
expect(HARNESS_RUNTIME_PROFILES.claude.matches("/usr/bin/vim My Notes/claude")).toBe(false);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it("recognizes spaced argv[0] in script-aware matchers", () => {
|
|
103
|
-
const pi = install("Users/dev/Node Tools/bin/pi");
|
|
104
|
-
const kiro = install("Applications/Kiro CLI.app/Contents/MacOS/kiro-cli");
|
|
105
|
-
const node = install("Applications/Dev Tools/node/bin/node");
|
|
106
|
-
|
|
107
|
-
expect(HARNESS_RUNTIME_PROFILES.pi.matches(`${pi} --model x`)).toBe(true);
|
|
108
|
-
expect(HARNESS_RUNTIME_PROFILES.kiro.matches(`${kiro} chat`)).toBe(true);
|
|
109
|
-
expect(
|
|
110
|
-
HARNESS_RUNTIME_PROFILES.gemini_cli.matches(`${node} /Users/dev/.npm/bin/gemini --yolo`),
|
|
111
|
-
).toBe(true);
|
|
112
|
-
expect(HARNESS_RUNTIME_PROFILES.pi.matches(`${node} /opt/pi-tools/script.js`)).toBe(false);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
it("does not match agent words inside an executable directory", () => {
|
|
116
|
-
const node = install("opt/Dev pi gemini/bin/node");
|
|
117
|
-
|
|
118
|
-
expect(HARNESS_RUNTIME_PROFILES.pi.matches(`${node} /repo/script.js`)).toBe(false);
|
|
119
|
-
expect(HARNESS_RUNTIME_PROFILES.gemini_cli.matches(`${node} /repo/script.js`)).toBe(false);
|
|
120
|
-
expect(HARNESS_RUNTIME_PROFILES.gemini_cli.matches(`${node} /repo/bin/gemini`)).toBe(true);
|
|
121
|
-
expect(HARNESS_RUNTIME_PROFILES.pi.matches(`${node} --title pi`)).toBe(true);
|
|
122
|
-
});
|
|
123
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { DurableAgentBusyError } from "../../durable/DurableAgent.js";
|
|
3
|
-
|
|
4
|
-
describe("durable-agent errors", () => {
|
|
5
|
-
it("classifies a busy error without exposing prompt data", () => {
|
|
6
|
-
const error = new DurableAgentBusyError("agent-id", "reviewer");
|
|
7
|
-
|
|
8
|
-
expect(error).toMatchObject({
|
|
9
|
-
name: "DurableAgentBusyError",
|
|
10
|
-
code: "DURABLE_AGENT_BUSY",
|
|
11
|
-
agentId: "agent-id",
|
|
12
|
-
message: 'Durable agent "reviewer" is busy.',
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import os from "os";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import Database from "better-sqlite3";
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
6
|
-
import { DurableAgentRepository } from "../../durable/DurableAgentRepository.js";
|
|
7
|
-
|
|
8
|
-
const roots: string[] = [];
|
|
9
|
-
afterEach(() => {
|
|
10
|
-
for (const root of roots.splice(0)) fs.rmSync(root, { recursive: true, force: true });
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
function fixture() {
|
|
14
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), "durable-agent-sqlite-"));
|
|
15
|
-
roots.push(root);
|
|
16
|
-
const cwd = path.join(root, "project");
|
|
17
|
-
fs.mkdirSync(cwd);
|
|
18
|
-
return { root, cwd, dbPath: path.join(root, "state", "agents.db") };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
describe("DurableAgentRepository SQLite concurrency", () => {
|
|
22
|
-
it("allows exactly one acquisition across two connections", async () => {
|
|
23
|
-
const { cwd, dbPath } = fixture();
|
|
24
|
-
const identity = { pid: process.pid, startedAt: "owner-start" };
|
|
25
|
-
const processInspector = {
|
|
26
|
-
getIdentity: (pid: number) => (pid === process.pid ? identity : null),
|
|
27
|
-
};
|
|
28
|
-
const first = new DurableAgentRepository({ dbPath, processInspector });
|
|
29
|
-
const second = new DurableAgentRepository({ dbPath, processInspector });
|
|
30
|
-
const agent = await first.create({ name: "race", cwd });
|
|
31
|
-
const results = await Promise.allSettled([
|
|
32
|
-
first.acquireRun(agent.id),
|
|
33
|
-
second.acquireRun(agent.id),
|
|
34
|
-
]);
|
|
35
|
-
expect(results.filter(({ status }) => status === "fulfilled")).toHaveLength(1);
|
|
36
|
-
const rejected = results.find(({ status }) => status === "rejected");
|
|
37
|
-
expect(rejected).toMatchObject({ reason: { code: "DURABLE_AGENT_BUSY" } });
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("accepts deprecated lock options without creating lock artifacts", async () => {
|
|
41
|
-
const { root, cwd, dbPath } = fixture();
|
|
42
|
-
const repository = new DurableAgentRepository({
|
|
43
|
-
dbPath,
|
|
44
|
-
lockTimeoutMs: 1,
|
|
45
|
-
incompleteLockGraceMs: 1,
|
|
46
|
-
mutationLockStaleMs: 1,
|
|
47
|
-
});
|
|
48
|
-
await repository.create({ name: "lockless", cwd });
|
|
49
|
-
expect(fs.existsSync(`${dbPath}.lock`)).toBe(false);
|
|
50
|
-
expect(fs.existsSync(path.join(root, "state", "durable-agent-locks"))).toBe(false);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it("keeps readonly listing pure", async () => {
|
|
54
|
-
const { cwd, dbPath } = fixture();
|
|
55
|
-
const live = new Map([[process.pid, "owner-start"]]);
|
|
56
|
-
const processInspector = {
|
|
57
|
-
getIdentity: (pid: number) => {
|
|
58
|
-
const startedAt = live.get(pid);
|
|
59
|
-
return startedAt ? { pid, startedAt } : null;
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
const writable = new DurableAgentRepository({ dbPath, processInspector });
|
|
63
|
-
const agent = await writable.create({ name: "readonly", cwd });
|
|
64
|
-
await writable.acquireRun(agent.id);
|
|
65
|
-
live.clear();
|
|
66
|
-
const readonly = new DurableAgentRepository({ dbPath, readonly: true, processInspector });
|
|
67
|
-
expect((await readonly.list())[0]?.state).toBe("running");
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it("rejects stale tokens and caps the persisted completion summary", async () => {
|
|
71
|
-
const { cwd, dbPath } = fixture();
|
|
72
|
-
const processInspector = { getIdentity: (pid: number) => ({ pid, startedAt: "owner-start" }) };
|
|
73
|
-
const repository = new DurableAgentRepository({ dbPath, processInspector });
|
|
74
|
-
const agent = await repository.create({ name: "token", cwd });
|
|
75
|
-
const run = await repository.acquireRun(agent.id);
|
|
76
|
-
await expect(
|
|
77
|
-
repository.recordProviderProcess(agent.id, "stale", { pid: 42, startedAt: "provider" }),
|
|
78
|
-
).rejects.toMatchObject({ code: "DURABLE_AGENT_REPOSITORY" });
|
|
79
|
-
const completed = await repository.completeRun(agent.id, run.token, {
|
|
80
|
-
status: "succeeded",
|
|
81
|
-
exitCode: 0,
|
|
82
|
-
summary: "x".repeat(5000),
|
|
83
|
-
sessionHealth: "healthy",
|
|
84
|
-
});
|
|
85
|
-
expect(completed.lastResult?.summary).toHaveLength(4096);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it("does not reconcile over ownership changed after process inspection", async () => {
|
|
89
|
-
const { cwd, dbPath } = fixture();
|
|
90
|
-
let inspect: (() => void) | undefined;
|
|
91
|
-
const processInspector = {
|
|
92
|
-
getIdentity: (pid: number) => {
|
|
93
|
-
if (inspect) inspect();
|
|
94
|
-
return inspect ? null : { pid, startedAt: "owner-start" };
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
const repository = new DurableAgentRepository({ dbPath, processInspector });
|
|
98
|
-
const agent = await repository.create({ name: "cas", cwd });
|
|
99
|
-
await repository.acquireRun(agent.id);
|
|
100
|
-
const other = new Database(dbPath);
|
|
101
|
-
inspect = () => {
|
|
102
|
-
inspect = undefined;
|
|
103
|
-
other
|
|
104
|
-
.prepare(`UPDATE durable_agents SET
|
|
105
|
-
active_run_token = 'replacement-token', active_owner_started_at = 'replacement-owner'
|
|
106
|
-
WHERE id = ?`)
|
|
107
|
-
.run(agent.id);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
await repository.reconcile();
|
|
111
|
-
|
|
112
|
-
expect(
|
|
113
|
-
other
|
|
114
|
-
.prepare("SELECT state, active_run_token FROM durable_agents WHERE id = ?")
|
|
115
|
-
.get(agent.id),
|
|
116
|
-
).toEqual({ state: "running", active_run_token: "replacement-token" });
|
|
117
|
-
other.close();
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it("maps a corrupt database to a store error", () => {
|
|
121
|
-
const { dbPath } = fixture();
|
|
122
|
-
fs.mkdirSync(path.dirname(dbPath), { recursive: true });
|
|
123
|
-
fs.writeFileSync(dbPath, "not sqlite");
|
|
124
|
-
expect(() => new DurableAgentRepository({ dbPath })).toThrow(
|
|
125
|
-
/Cannot open durable-agent database/,
|
|
126
|
-
);
|
|
127
|
-
});
|
|
128
|
-
});
|