From 445932e45b64d2512d37d2a1a97c7fb566a94545 Mon Sep 17 00:00:00 2001 From: 777genius Date: Sun, 17 May 2026 19:11:26 +0300 Subject: [PATCH] feat(team): improve runtime provider workflows --- .mcp.json | 17 + README.md | 34 +- .../components/sections/ComparisonSection.vue | 20 +- package.json | 1 + .../@radix-ui__react-focus-scope@1.1.7.patch | 46 +- pnpm-lock.yaml | 12 +- resources/pricing.json | 29 + scripts/dev-with-runtime.mjs | 6 +- .../renderer/ui/GraphMemberLogPreviewHud.tsx | 44 +- src/main/http/teams.ts | 73 +- src/main/ipc/teams.ts | 181 +++-- .../analysis/SemanticStepExtractor.ts | 12 +- .../codexAppServer/CodexBinaryResolver.ts | 6 +- .../__tests__/CodexBinaryResolver.test.ts | 138 +++- .../services/team/ChangeExtractorService.ts | 64 +- src/main/services/team/TaskChangeComputer.ts | 20 +- src/main/services/team/TeamDataService.ts | 26 +- src/main/services/team/TeamMemberResolver.ts | 14 +- .../services/team/TeamProvisioningService.ts | 143 +++- .../runtime/OpenCodeTeamRuntimeAdapter.ts | 72 +- src/main/types/messages.ts | 34 +- src/main/workers/team-fs-worker.ts | 59 +- .../components/sidebar/GlobalTaskList.tsx | 1 + .../components/sidebar/SidebarTaskItem.tsx | 17 +- .../components/team/ClaudeLogsSection.tsx | 73 +- .../team/CollapsibleTeamSection.tsx | 6 +- .../components/team/TeamChangesSection.tsx | 27 +- .../components/team/TeamDetailView.tsx | 404 +++++------ src/renderer/components/team/TeamListView.tsx | 89 ++- .../useTeamChangesSummaries.test.tsx | 208 ++++++ .../team/dialogs/CreateTeamDialog.tsx | 28 +- .../team/dialogs/LaunchTeamDialog.tsx | 27 +- .../team/dialogs/TaskDetailDialog.tsx | 62 +- .../team/dialogs/TeamModelSelector.tsx | 540 +++++++++++---- .../team/dialogs/launchDialogPrefill.ts | 14 +- .../dialogs/providerPrepareDiagnostics.ts | 19 + .../dialogs/providerPrepareShortLivedCache.ts | 23 +- .../components/team/members/LeadModelRow.tsx | 14 +- .../components/team/members/MemberCard.tsx | 16 +- .../team/members/MemberDraftRow.tsx | 47 +- .../components/team/members/MemberList.tsx | 58 +- .../team/members/MembersEditorSection.tsx | 23 +- .../team/members/TeamRosterEditorSection.tsx | 6 + .../team/members/membersEditorUtils.ts | 72 +- .../team/messages/MessageComposer.tsx | 68 ++ .../team/messages/MessagesPanel.tsx | 110 +-- .../team/useClaudeLogsController.ts | 3 +- .../team/useTeamChangesSummaries.ts | 51 +- src/renderer/store/slices/teamSlice.ts | 133 +++- src/renderer/utils/memberRuntimeSummary.ts | 93 ++- .../utils/openCodeModelRecommendations.ts | 2 +- src/renderer/utils/teamModelAvailability.ts | 44 +- src/shared/utils/pricing.ts | 4 + src/shared/utils/providerBackend.ts | 29 +- test/main/http/teams.test.ts | 245 +++++++ test/main/ipc/teams.test.ts | 585 ++++++++++++++++ .../services/analysis/ChunkBuilder.test.ts | 55 +- .../AnthropicLaunchSelection.live.test.ts | 550 +++++++++++++++ .../team/ChangeExtractorService.test.ts | 430 ++++++++++-- .../team/OpenCodeTeamRuntimeAdapter.test.ts | 108 +++ .../services/team/TaskChangeComputer.test.ts | 102 ++- .../TeamAgentLaunchMatrix.safe-e2e.test.ts | 632 ++++++++++++++++++ .../services/team/TeamDataService.test.ts | 49 ++ .../team/TeamFsWorker.integration.test.ts | 42 +- .../services/team/TeamMemberResolver.test.ts | 54 +- .../team/TeamProvisioningService.test.ts | 142 +++- .../TeamProvisioningServicePrepare.test.ts | 193 ++++++ .../components/sidebar/GlobalTaskList.test.ts | 36 +- .../sidebar/SidebarTaskItem.test.ts | 48 +- .../TeamModelSelectorDisabledState.test.ts | 97 ++- .../team/dialogs/LaunchTeamDialog.test.ts | 4 + .../team/dialogs/launchDialogPrefill.test.ts | 50 ++ .../providerPrepareDiagnostics.test.ts | 70 ++ .../providerPrepareShortLivedCache.test.ts | 95 ++- .../team/dialogs/teamRelaunchFlow.test.ts | 38 ++ .../team/members/MemberCard.test.ts | 4 +- .../team/members/MemberList.test.ts | 94 +++ .../team/members/membersEditorUtils.test.ts | 222 +++++- ...RuntimeProviderManagementPanelView.test.ts | 2 +- test/renderer/store/teamSlice.test.ts | 229 +++++++ .../utils/memberRuntimeSummary.test.ts | 198 ++++++ .../openCodeModelRecommendations.test.ts | 228 +++---- test/shared/utils/pricing.test.ts | 8 + test/shared/utils/providerBackend.test.ts | 30 + 84 files changed, 7004 insertions(+), 998 deletions(-) create mode 100644 .mcp.json create mode 100644 test/main/services/team/AnthropicLaunchSelection.live.test.ts create mode 100644 test/shared/utils/providerBackend.test.ts diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 00000000..da61a538 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,17 @@ +{ + "mcpServers": { + "playwright-electron": { + "command": "npx", + "args": [ + "-y", + "@playwright/mcp@0.0.75", + "--cdp-endpoint", + "http://127.0.0.1:9222", + "--caps", + "devtools", + "--console-level", + "info" + ] + } + } +} diff --git a/README.md b/README.md index 40eb7624..767d8eef 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,9 @@ pnpm dev `pnpm dev` starts the desktop Electron app. Do not start a browser/web dev server for normal development; that path is limited and is not the supported way to run agent teams locally. +Use `pnpm dev:mcp` when you want an MCP browser/debugging tool to attach to the current +Electron renderer through the local Chrome DevTools Protocol endpoint on `127.0.0.1:9222`. + The desktop app auto-discovers Claude Code projects from `~/.claude/`. ### Debug teammate runtimes @@ -309,21 +312,22 @@ local packaging. ### Scripts -| Command | Description | -|---------|-------------| -| `pnpm dev` | Desktop app development with hot reload | -| `pnpm build` | Production build | -| `pnpm typecheck` | TypeScript type checking | -| `pnpm lint` | Lint (no auto-fix) | -| `pnpm lint:fix` | Lint and auto-fix | -| `pnpm format` | Format code with Prettier | -| `pnpm test` | Run all tests | -| `pnpm test:watch` | Watch mode | -| `pnpm test:coverage` | Coverage report | -| `pnpm test:coverage:critical` | Critical path coverage | -| `pnpm check` | Full quality gate (types + lint + test + build) | -| `pnpm fix` | Lint fix + format | -| `pnpm quality` | Full check + format check + knip | +| Command | Description | +| ----------------------------- | ---------------------------------------------------------------------------- | +| `pnpm dev` | Desktop app development with hot reload | +| `pnpm dev:mcp` | Desktop app development with hot reload and local CDP debugging on port 9222 | +| `pnpm build` | Production build | +| `pnpm typecheck` | TypeScript type checking | +| `pnpm lint` | Lint (no auto-fix) | +| `pnpm lint:fix` | Lint and auto-fix | +| `pnpm format` | Format code with Prettier | +| `pnpm test` | Run all tests | +| `pnpm test:watch` | Watch mode | +| `pnpm test:coverage` | Coverage report | +| `pnpm test:coverage:critical` | Critical path coverage | +| `pnpm check` | Full quality gate (types + lint + test + build) | +| `pnpm fix` | Lint fix + format | +| `pnpm quality` | Full check + format check + knip | diff --git a/landing/components/sections/ComparisonSection.vue b/landing/components/sections/ComparisonSection.vue index 9c22083e..c6a734c8 100644 --- a/landing/components/sections/ComparisonSection.vue +++ b/landing/components/sections/ComparisonSection.vue @@ -305,6 +305,7 @@ function getStatusIcon(status: string): string {