fischer-agentkit/src/agentkit/cli
chiguyong bbbf9cd40a feat(bitable): add bitable companion service with full P0-P2 fixes
Bitable is a multi-dimensional table companion service that runs alongside
the main AgentKit server. It provides structured data storage with formula
fields, views, and ingestion pipelines.

Major components:
- Domain models (Pydantic v2): Table, Field, Record, View, RecalcTask
- SQLAlchemy 2 async ORM with independent bitable PostgreSQL schema
- Formula engine: AST parser, DAG, Kahn topological sort, safe eval
- RecalcWorker: atomic task claiming (FOR UPDATE SKIP LOCKED), topo-order
  processing, stale-threshold reaper for crash recovery
- REST API (/api/v1/bitable): tables, fields, records, views, files
- BitableTool: agent-facing tool with batch chunking (500/batch)
- CLI: agentkit bitable subcommands (create, list, import-excel, etc.)
- Frontend: Vue 3 + vxe-table grid with field management, views, filters
- Ingestion: Excel (openpyxl), database reflection, API collector

Security fixes (ce-code-review P0 + ce-debug P1):
- SQL injection prevention (field_id validation, parameterized queries)
- IDOR protection (_check_table_ownership on all table-level endpoints)
- SSRF prevention (URL scheme + private IP validation in parse_excel_url)
- OOM prevention (streaming file upload, batch delete, batch insert)
- Atomic recalc task claiming (FOR UPDATE SKIP LOCKED)
- Formula engine cache invalidation on field changes
- Composite cursor pagination for non-id sort orders
- Batch upsert (eliminates N+1 queries)
- Sync I/O offloaded to thread pool in async contexts
- Internal token auth (X-Internal-Token, hmac.compare_digest)
- PK unique index enforcement

Test coverage: 88 unit tests (95 skipped without Docker)
2026-06-25 01:09:59 +08:00
..
__init__.py feat(cli): AgentKit CLI with serve/version/health/task/skill/init/usage 2026-06-06 12:45:51 +08:00
admin.py fix(review): U6 frontend field alignment + CLI top-users field fix 2026-06-22 16:28:44 +08:00
admin_client.py feat(admin): U8 — CLI admin command group 2026-06-21 18:56:14 +08:00
benchmark.py fix(routing): U1-U6 路由优化 + 修复方案 + 代码审查修复 2026-06-20 19:31:49 +08:00
bitable.py feat(bitable): add bitable companion service with full P0-P2 fixes 2026-06-25 01:09:59 +08:00
chat.py fix(experts): PM 协同代码审查全量修复 2026-06-24 18:56:27 +08:00
init.py feat(cli): AgentKit CLI with serve/version/health/task/skill/init/usage 2026-06-06 12:45:51 +08:00
main.py feat(bitable): add bitable companion service with full P0-P2 fixes 2026-06-25 01:09:59 +08:00
onboarding.py fix(config): unify config loading chain and protect ${VAR} references 2026-06-16 00:26:54 +08:00
pair.py feat(cli): pair command + doctor rename + client config priority 2026-06-06 13:08:14 +08:00
skill.py feat(skills): SkillHarness 前置条件 + 风险守卫学习增强 2026-06-24 18:56:51 +08:00
task.py fix(config): unify config loading chain and protect ${VAR} references 2026-06-16 00:26:54 +08:00
templates.py fix(config): unify config loading chain and protect ${VAR} references 2026-06-16 00:26:54 +08:00
usage.py feat(cli): AgentKit CLI with serve/version/health/task/skill/init/usage 2026-06-06 12:45:51 +08:00