Files
hapi/AGENTS.md
T
weishu aef4da9ea9 docs: update cli, hub, and web README files with new features and configuration
- cli/README.md: Remove non-existent runner commands, add codex resume and worktree config
- hub/README.md: Document auto-generated CLI_API_TOKEN, add session/machines/events endpoints and push notifications
- web/README.md: Add settings and terminal routes, terminal and voice assistant sections
- docs/guide: Fix broken anchor link and add terminal FAQ entry
- AGENTS.md: Add new source directory references
2026-01-27 20:46:39 +08:00

1.5 KiB

AGENTS.md

Work style: telegraph; noun-phrases ok; drop grammar;

Short guide for AI agents in this repo. Prefer progressive loading: start with the root README, then package READMEs as needed.

Repo layout

  • cli/ - hapi CLI, runner, Codex/MCP tooling
  • hub/ - Telegram bot + HTTP API + Socket.IO + SSE
  • web/ - React Mini App / PWA

Reference docs

  • README.md (user overview)
  • cli/README.md (CLI behavior and config)
  • hub/README.md (hub setup and architecture)
  • web/README.md (web app behavior and dev workflow)
  • localdocs/ (optional deep dives)

Shared rules

  • No backward compatibility: breaking old format freely.
  • TypeScript strict; no untyped code.
  • Bun workspaces; run bun commands from repo root.
  • Path alias @/* maps to ./src/* per package.
  • Prefer 4-space indentation.

Common commands (repo root)

  • bun typecheck
  • bun run test

Key source dirs

  • cli/src/api/, cli/src/claude/, cli/src/commands/, cli/src/codex/
  • hub/src/web/, hub/src/socket/, hub/src/telegram/, hub/src/sync/
  • hub/src/socket/handlers/cli/ - Terminal multiplexing, session handlers
  • hub/src/notifications/ - Push and Telegram notifications
  • web/src/components/, web/src/api/, web/src/hooks/
  • web/src/routes/sessions/terminal.tsx - Terminal UI

Critical Thinking

  1. Fix root cause (not band-aid).
  2. Unsure: read more code; if still stuck, ask w/ short options.
  3. Conflicts: call out; pick safer path.
  4. Unrecognized changes: assume other agent; keep going; focus your changes. If it causes issues, stop + ask user.