Metadata-Version: 2.4
Name: findyou
Version: 0.1.1
Summary: Autonomous Recruiting Agent - 持续发现、理解、匹配、触达人才
Author: findyou team
License: MIT
Keywords: recruiting,agent,hr,automation,llm
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.9.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: SQLAlchemy>=2.0.0
Requires-Dist: openai>=1.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: APScheduler>=3.10.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: fastapi>=0.110.0
Requires-Dist: uvicorn>=0.27.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: python-multipart>=0.0.6
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: httpx>=0.25.0; extra == "dev"

# findyou — Autonomous Recruiting Agent

> 一个永不停机的 AI 招聘顾问，持续在互联网里找人、认识人、记住人、联系他们。

## 安装

```bash
pip install -e .
```

## 配置

复制示例配置并填写：

```bash
cp findyou.example.yaml findyou.yaml
```

编辑 `findyou.yaml`，填写 LLM API Key、邮箱账号等。也可用环境变量：

```bash
export FINDYOU_LLM_API_KEY=your_key
```

## 快速开始

### CLI 模式

```bash
# 启动 Agent（永久运行）
findyou start

# 查看状态
findyou status

# 紧急停止 / 恢复
findyou emergency-stop
findyou resume
```

### Web 模式（推荐）

```bash
# 启动 Web 管理界面 + Agent（默认端口 8000）
findyou web

# 指定端口
findyou web --port 8080

# 开发模式（热重载）
findyou web --port 8080 --reload

# 仅启动 Web，不启动 Agent
findyou web --no-agent

# 生产部署
findyou web --host 0.0.0.0 --port 80 --workers 4
```

浏览器打开 `http://localhost:8000` 即可访问完整的 Web 管理界面。

## CLI 命令一览

```bash
# Agent 控制
findyou start                  # 启动 Agent
findyou stop                   # 停止 Agent
findyou status                 # 查看状态
findyou emergency-stop         # 紧急停止
findyou resume                 # 恢复运行

# Web 界面
findyou web                    # 启动 Web + Agent
findyou web --port 8080        # 指定端口
findyou web --no-agent         # 仅 Web
findyou web --reload           # 开发模式

# 岗位管理
findyou position add --id pos1 --title "LLM Researcher" --company "ACME"
findyou position list
findyou position pause pos1
findyou position resume pos1
findyou position close pos1

# 候选人管理
findyou candidate list
findyou candidate show <id>
findyou candidate pause <id>
findyou candidate stop <id>

# 触达管理
findyou outreach list
findyou outreach pause <id>
findyou outreach resume <id>
findyou outreach skip <id>

# 人工审核
findyou review list
findyou review approve <id>
findyou review reject <id>
```

## Web 界面

`findyou web` 启动后提供以下页面：

| 页面 | 路径 | 功能 |
|------|------|------|
| 仪表盘 | `/` | KPI 总览、Agent 状态控制、候选人分布 |
| 审核队列 | `/reviews` | 待审核列表、邮件编辑、批准/拒绝/编辑 |
| 岗位管理 | `/positions` | 岗位 CRUD、暂停/恢复/关闭 |
| 候选人 | `/candidates` | 候选人列表、搜索、状态管理 |
| 系统配置 | `/config` | 运行时/LLM/数据源/触达/评分/FAQ 配置查看 |

REST API 文档：`http://localhost:8000/api/docs`

### 技术栈

- **后端**：FastAPI + Jinja2 模板 + SQLAlchemy + SQLite
- **前端**：Alpine.js 3.x（~15KB gzip）+ Tailwind CSS（CDN）
- **打包**：前端静态资源打包进 Python 包，`pip install` 即用，零 Node.js 依赖

## 测试

```bash
pip install -e ".[dev]"
pytest
```

当前共 **190 个测试**，覆盖配置、模型、数据源、智能匹配、Memory、触达、对话、FAQ、运行时、CLI、Web API 全链路。

## 项目结构

```
findyou/
├── findyou/
│   ├── cli.py                 # typer CLI 入口
│   ├── config.py              # pydantic 配置
│   ├── database.py            # SQLite + SQLAlchemy
│   ├── models/                # 数据模型 (12 个)
│   ├── sources/               # 数据源插件 (GitHub/Paper/LinkedIn/Web)
│   ├── intelligence/          # 候选人智能 + 匹配
│   ├── memory/                # 四层 Memory 管理
│   ├── outreach/              # 触达 (邮件发现/发送门控/池/Follow-up)
│   ├── conversation/          # 对话 (邮件监听/意图/FAQ/Agent)
│   ├── runtime/               # Agent 主循环 + 调度 + 恢复
│   ├── llm/                   # LLM Client (OpenAI-Compatible)
│   ├── api/                   # ★ FastAPI Web 服务层
│   │   ├── server.py          #   应用工厂
│   │   ├── deps.py            #   依赖注入
│   │   └── routers/           #   REST API 路由 (6 个)
│   └── web/                   # ★ 前端静态资源
│       ├── static/
│       │   ├── css/app.css
│       │   ├── js/alpine.min.js
│       │   └── js/app.js
│       └── templates/         # Jinja2 HTML 模板 (5 个)
├── tests/                     # 190 个测试
├── docs/                      # 设计文档
├── pyproject.toml
└── findyou.example.yaml
```

## 文档

- [design.md](docs/design.md) — 技术设计文档
- [spec.md](docs/spec.md) — 功能规格文档（106 条 EARS 需求）
- [tasks.md](docs/tasks.md) — 实现任务分解（42 任务 / 8 阶段）
- [review.md](docs/review.md) — 文档评审报告
- [frontend_assessment.md](docs/frontend_assessment.md) — 前端技术选型评估
- [alpine_tailwind_assessment.md](docs/alpine_tailwind_assessment.md) — Alpine.js + Tailwind 方案详述

## 架构

```
CLI (typer) ──→ Agent Runtime ──→ 业务模块 ──→ SQLite
  │                                  ↓
  │              Discovery / Intelligence / Memory
  │              Outreach / Conversation / FAQ
  │
  └── Web (FastAPI) ──→ REST API ──→ 业务模块
                      ──→ Jinja2 HTML ──→ Alpine.js + Tailwind
```

核心原则：**LLM 负责理解，程序负责执行边界。**

## License

MIT
