Skip to content

Feat/cloud team#51

Draft
linkai0924 wants to merge 15 commits intomainfrom
feat/cloud-team
Draft

Feat/cloud team#51
linkai0924 wants to merge 15 commits intomainfrom
feat/cloud-team

Conversation

@linkai0924
Copy link
Copy Markdown
Collaborator

No description provided.

林凯90331 and others added 3 commits April 13, 2026 16:58
Implement Cloud Team feature for real-time team collaboration with the following capabilities:

- Session management: create, join, update, and manage team sessions

- Real-time communication: WebSocket support for live collaboration

- Task workflow: submit task plans, track progress, and manage approvals

- Leader election: automatic leader election with heartbeat mechanism

- Repository affinity: register and query repositories per session

New database models added:

- TeamSession, TeamSessionMember, TeamTask

- TeamApprovalRequest, TeamRepoAffinity

Routes registered at /api/team/* with WebSocket at /ws/sessions/:id

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Add comprehensive client SDK documentation and working examples:

- client/README.md: full integration guide covering architecture,
  plugin reference (all 4 interfaces), config reference, task DAG
  with dependency wiring, repo affinity, REST API reference, and
  WebSocket event reference

- client/go/example/main.go: CLI tool supporting both leader and
  teammate modes; SimplePlanner generates 3-task DAG, ShellExecutor
  runs task descriptions as shell commands, LocalExplorer handles
  file_tree/content_search/git_log/symbol_search queries, StdinApprover
  reads y/n from stdin

- client/ts/examples/leader.ts: TypeScript leader example with plan
  submission, stdin approval plugin, and periodic progress polling

- client/ts/examples/teammate.ts: TypeScript teammate example with
  child_process executor, ripgrep-based explorer, and repo affinity
  registration on startup

Signed-off-by: 林凯90331 <[email protected]>
Co-authored-by: CoStrict <[email protected]>
Add .gitignore to client/ts/ to exclude node_modules/, dist/, and
source maps from version control. Remove previously tracked node_modules
files from the repository index.

Signed-off-by: 林凯90331 <[email protected]>
Co-authored-by: CoStrict <[email protected]>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85d33629-c8c9-4d91-bde1-e4770dd84e62

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cloud-team

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

林凯90331 and others added 9 commits April 13, 2026 19:56
- Add end-to-end tests for team functionality

- Add test helpers and mocks for e2e testing

- Add TypeScript configuration for e2e tests

- Add npm scripts for running e2e tests

- Add @types/node dev dependency

- Remove unused server/migrate binary

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Replace ts-node with tsx for running e2e tests to improve

performance and simplify configuration. Update tsconfig.e2e.json

module resolution to node and remove experimental resolver options.

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
…nment

Client changes:

- Add TeamClient.createSession() static method

- Add waitConnected() to WSConnection for connection readiness

- Fix start() to wait for WS connection before returning

- Update MockLeaderPlugin to round-robin assign tasks to teammates

- Use createSession and UUID task IDs in e2e tests

Server changes:

- Add RetryTask() store method for task retry logic

- Re-dispatch task.assigned on retry when task fails

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Add CRUD operations for item categories including:

- GET /categories - List all categories with i18n names

- POST /categories - Create new category

- GET /categories/{id} - Get category by ID

- PUT /categories/{id} - Update category

- DELETE /categories/{id} - Delete category

Also includes:

- Add tsx dev dependency to client/ts for TypeScript execution

- Add tsconfig.json for client examples

- Update swagger documentation

- Update portal submodule

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
…esolution

- Add gcc and musl-dev to Dockerfile build stage for CGO support
- Enable CGO_ENABLED=1 for server and migrate builds (required by go-sqlite3)
- Add musl to final stage for runtime CGO compatibility
- Update client/ts tsconfig moduleResolution from 'node' to 'bundler'
- Update portal submodule to latest commit

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
- Change CGO_ENABLED from 1 to 0 to support cross-compilation

- Remove gcc, musl-dev and musl dependencies

- Simplify Dockerfile for better multi-arch builds

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Implement P1-P5 priority-based task scheduling with repo affinity algorithm.

Add leader capability scoring based on repo coverage, heartbeat success rate, CPU/memory, and latency.

Introduce task decomposition endpoint for LLM-based sub-task generation.

Extend WebSocket hub with event log replay, leader expiry watcher, and decompose result channels.

Add member capability fields and auto-assignment for task plans.

Update portal submodule to latest commit.

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
林凯90331 and others added 3 commits April 20, 2026 23:33
Improve Cloud Team reliability when teammates disconnect or schemas lag.\nPrefer online non-leader targets for decomposition, fallback to leader-aware\nsingle-task decomposition with degraded success responses, and reassign\npending tasks when members reconnect.\n\nAdd a leader task termination endpoint with fencing token validation and\npropagate task.terminate/task.interrupted events. Harden session member\nupsert logic for reconnects and legacy uniqueness constraints, and add\ncapability columns migration with compatibility fallbacks.

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
- Add SetAssignedTaskPusher function to Handler for cloud-based task dispatch\n- Implement requireUserOrDeviceAuth middleware for flexible authentication\n- Add EventTeamTaskDispatch event type for cloud routing\n- Replace direct hub calls with dispatchAssignedTaskToMachine method\n- Add fallback routing for browser-only machine IDs via user devices\n- Integrate cloud event router for team task distribution

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Implemented comprehensive orchestration feature that combines auto-explore, task decomposition, and scheduling into a single pipeline. Added dry-run support for task decomposition to preview tasks without creating them. Enhanced leader election with crash recovery mechanisms that reconcile orphaned tasks and provide session snapshots to new leaders. Added auto-explore functionality to gather codebase context from online teammates. Improved task interruption logic to handle assigned tasks during member departures.

Signed-off-by: 林凯90331 <[email protected]>

Co-authored-by: CoStrict <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant