Skip to content

feat: customization reference — multi-agent collaboration & external ACP integration - #2139

Open
1688mengdie wants to merge 4 commits into
GCWing:mainfrom
1688mengdie:feat/customization-reference
Open

feat: customization reference — multi-agent collaboration & external ACP integration#2139
1688mengdie wants to merge 4 commits into
GCWing:mainfrom
1688mengdie:feat/customization-reference

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

This PR is a reference submission for upstream review (see issue #191 on the fork). It presents a complete, final-state snapshot of customizations built on BitFun's latest main, focusing on multi-agent collaboration and connecting BitFun to external AI agents through the ACP protocol.

This is a reference for how the customization was approached — not a request to merge blindly. It is intentionally large (370 files), because the purpose is to show the final state of a coherent customization effort. Maintainers are welcome to review, cherry-pick, or use it as a design reference.

What is included

  • 370-file code snapshot relative to upstream \main\ (final state only, no intermediate steps, no scratch files, no internal records).
  • CUSTOMIZATIONS.md — an academic-style report with:
    • Abstract (4 contributions)
    • Introduction (background, 4 gaps, contributions)
    • Related Work (ACP, multi-agent orchestration, RBAC, prompt caching)
    • Design: A Three-Branch Separation-of-Powers Coordination Model (6-phase pipeline, Coordinator/Executor/Reviewer, recursive dispatch, quality gates, atomic steps, determinism)
    • Implementation 1–8 (ACP channel, Session/SessionControl, Warden guard, RBAC subagent roles, engine & context injection, Legion/Task/Plan toolchain, CodeBuddy adapter, Web UI)
    • Evaluation (test evidence, limitations)
    • Conclusion & Future Work
    • References

Highlights (key domains)

  1. ACP channel — Session-level direct connection to external ACP agents (\�cp_tools.rs, \AcpClientPort).
  2. SessionControl / SessionMessage tools — create, talk to, compact, delete sessions (including ACP).
  3. Warden guard system — governance that detects repeated failures, challenges the agent, records violations.
  4. RBAC subagent roles — role templates controlling which tools a subagent may use.
  5. Engine & context injection — per-round runtime-facts refresh, once-per-generation user context.
  6. Legion / Task / Plan toolchain — orchestration topology, task dual lifecycle, plan tool family.
  7. CodeBuddy provider adapter — OpenAI-compatible adapter for the CodeBuddy cloud API.
  8. Web UI — flow-chat display, legion pages, model switching.

Verification

  • Every key file reference in CUSTOMIZATIONS.md was cross-checked against the final state (13/13 line references verified).
  • No intermediate state, no scratch files, no internal/proprietary information in the PR (17-pattern scan clean).
  • The workflow methodology chapter is written academically (no internal jargon).

Notes

  • AI-assisted work: this PR was prepared with AI assistance; the code snapshot is the final state of the customization effort.
  • Testing: the snapshot compiles as part of the customization workspace; focused verification was done at the workspace level.
  • If a smaller, per-domain PR is preferred, the domains can be split — this single PR is provided as a complete reference first.

user added 4 commits August 7, 2026 06:13
Multi-agent collaboration and external ACP agent integration
enhancements on top of upstream main (e640aa4).

Highlights:
- ACP tool family: session-level direct connection with external
  ACP agents (CodeBuddy, Claude Code, etc.) via SessionControl /
  SessionMessage tools, real-session creation and lifecycle bridge
- Warden guard system: failure-streak governance with scene
  fingerprinting, LLM judgement port, goal linkage and reference
  file following
- RBAC subagent roles: role pinning for subagent-marked sessions,
  GeneralPurpose-specific template, K8 template batch
  (Executor read access)
- Session/SessionControl enhancements: compact action, model_id,
  short names, ghost-deletion fix (created_by + owner/ancestor
  fallback), ghost-delivery fix
- Engine/injection: runtime facts per-round refresh, user-context
  once-per-generation injection, context-usage display persistence
- Legion/task/plan toolchain: legion control, task dual lifecycle
  with ACP support, plan tool family, goal dual-trigger
- CodeBuddy provider: local gateway adapter (ApiFormat::CodeBuddy,
  Runs two-step streaming), empty finish_reason protection
- Web UI: flow-chat session/turn display, legion pages, model
  switching UI
- Notify-style injection: minimal metadata for background task
  completion (P-19 family), full content retrievable via
  SessionHistory
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