GCWing / GCWing/OpenBitFun

Feature: per-agent usageCommand in acpClients to surface subscription plan quota

Đang mở
#3,078 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
2.3k
Fork
231
Merge trung bình
2 giờ 49 phút
Pull request đã merge (30 ngày)
589

Mô tả

## Context

ACP has no concept of **plan quota** (limits, reset windows, burn-down). Subscription-backed CLIs — Claude Max, Codex (ChatGPT), Kimi coding plan, GLM coding plan — each expose their remaining usage through their own CLI commands or account endpoints, none of which is visible inside BitFun. When orchestrating a fleet of subscription CLIs as ACP agents, the orchestrator currently has no way to see which agent's plan is nearly exhausted before dispatching work.

## Proposal

Add an optional field on each `acpClients` entry, for example:

```json
{
"kimi": {
"command": "kimi",
"args": ["acp"],
"usageCommand": "kimi usage --json",
"usageIntervalMinutes": 30
}
}
```

- `usageCommand`: a shell command whose (text or JSON) output represents that agent's remaining quota
- BitFun runs it on demand (button on the agent card / ACP settings row) and/or on a refresh interval, parses, and displays the result next to the agent

This keeps quota semantics out of the ACP protocol (where they don't belong) while making them visible exactly where dispatch decisions are made.

## Use case

Multi-agent orchestration over subscription CLIs: check remaining quota per agent before assigning a long-running task, and avoid routing work to an agent whose plan window is exhausted.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định cấu hình acpClients, thẻ/dòng cài đặt tác nhân ACP và các luồng thực thi lệnh hoặc làm mới hiện có. Theo dõi cách cấu hình của một tác nhân đến được UI; được xem là hoàn tất khi có thể cấu hình usageCommand và interval tùy chọn cho từng tác nhân, gọi chúng theo yêu cầu hoặc trong quá trình làm mới, đồng thời hiển thị kết quả dạng văn bản hoặc JSON mà không thay đổi giao thức ACP.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
backend, desktop
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.