go/internal/cmd
Claude 3ccb67bddd
feat(agentci): rate limiting and native Go dispatch runner
Adds pkg/ratelimit for Gemini API rate limiting with sliding window
(RPM/TPM/RPD), persistent state, and token counting. Replaces the
bash agent-runner.sh with a native Go implementation under
`core ai dispatch {run,watch,status}` for local queue processing.

Rate limiting:
- Per-model quotas (RPM, TPM, RPD) with 1-minute sliding window
- WaitForCapacity blocks until capacity available or context cancelled
- Persistent state in ~/.core/ratelimits.yaml
- Default quotas for Gemini 3 Pro/Flash, 2.5 Pro, 2.0 Flash/Lite
- CountTokens helper calls Google tokenizer API
- CLI: core ai ratelimits {show,reset,count,config,check}

Dispatch runner:
- core ai dispatch run — process single ticket from queue
- core ai dispatch watch — daemon mode with configurable interval
- core ai dispatch status — show queue/active/done counts
- Supports claude/codex/gemini runners with rate-limited Gemini
- File-based locking with stale PID detection
- Completion handler updates issue labels on success/failure

Closes #42

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
..
ai feat(agentci): rate limiting and native Go dispatch runner 2026-02-10 03:08:16 +00:00
ci fix: resolve API signature mismatches after IO migration merge 2026-02-08 21:55:10 +00:00
collect feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
config feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
crypt feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
daemon fix: resolve API signature mismatches after IO migration merge 2026-02-08 21:55:10 +00:00
deploy feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
dev fix: resolve conflict markers and remove legacy code after branch consolidation 2026-02-08 22:08:35 +00:00
docs Merge branch 'fix/consolidate-workflows' into new 2026-02-08 22:00:21 +00:00
doctor Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
forge feat: add crypto, session, sigil, and node packages 2026-02-08 20:52:28 +00:00
gitcmd feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
gitea fix: restore packages accidentally deleted during PR #313 rebase (#333) 2026-02-05 11:16:23 +00:00
go fix: resolve conflict markers and remove legacy code after branch consolidation 2026-02-08 22:08:35 +00:00
help feat(help): Implement full-text search (#294) 2026-02-05 10:26:16 +00:00
mcpcmd feat: BugSETI app, WebSocket hub, browser automation, and MCP tools (#336) 2026-02-05 17:22:05 +00:00
monitor Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
php fix: resolve conflict markers and remove legacy code after branch consolidation 2026-02-08 22:08:35 +00:00
pkgcmd fix: resolve API signature mismatches after IO migration merge 2026-02-08 21:55:10 +00:00
plugin feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
prod feat(prod): add production infrastructure management 2026-02-06 03:03:29 +00:00
qa feat: BugSETI app, WebSocket hub, browser automation, and MCP tools (#336) 2026-02-05 17:22:05 +00:00
rag feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
sdk Merge branch 'feature/cli-batch' into new 2026-02-08 21:29:47 +00:00
security Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
session fix(core-ide): use path-based routing for multi-window SPA, clean up formatting 2026-02-09 01:50:57 +00:00
setup fix: resolve API signature mismatches after IO migration merge 2026-02-08 21:55:10 +00:00
test feat: BugSETI app, WebSocket hub, browser automation, and MCP tools (#336) 2026-02-05 17:22:05 +00:00
unifi fix: restore packages accidentally deleted during PR #313 rebase (#333) 2026-02-05 11:16:23 +00:00
updater feat: BugSETI app, WebSocket hub, browser automation, and MCP tools (#336) 2026-02-05 17:22:05 +00:00
vm fix: resolve API signature mismatches after IO migration merge 2026-02-08 21:55:10 +00:00
workspace fix(core-ide): use path-based routing for multi-window SPA, clean up formatting 2026-02-09 01:50:57 +00:00