Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# API 认证配置
AUTH_SECRET_KEY=your-secret-key-change-this-in-production
ADMIN_API_KEY=your-admin-api-key
# Core API runtime
AUTORESEARCH_API_ENV=dev
AUTORESEARCH_API_HOST=127.0.0.1
AUTORESEARCH_API_PORT=8001

# 允许的 Agent ID 列表(逗号分隔)
ALLOWED_AGENTS=agent-001,agent-002,agent-003
# SQLite backing store
AUTORESEARCH_API_DB_PATH=artifacts/api/evaluations.sqlite3

# Anthropic API Key(用于 Claude)
ANTHROPIC_API_KEY=your-anthropic-api-key

# OpenAI API Key(可选)
OPENAI_API_KEY=your-openai-api-key
# Telegram / Panel
AUTORESEARCH_TELEGRAM_BOT_TOKEN=your-telegram-bot-token
AUTORESEARCH_TELEGRAM_ALLOWED_UIDS=123456789
AUTORESEARCH_PANEL_JWT_SECRET=replace-with-random-secret
AUTORESEARCH_PANEL_BASE_URL=https://panel.example.com/api/v1/panel/view
# Optional: when configured, Telegram notifications use Mini App web_app buttons
AUTORESEARCH_TELEGRAM_MINI_APP_URL=https://panel.example.com/api/v1/panel/view

# 数据库配置
DATABASE_URL=sqlite:///./data/autoresearch.db
# Optional upstream watcher
AUTORESEARCH_UPSTREAM_WATCH_URL=https://github.com/openclaw/openclaw.git
AUTORESEARCH_UPSTREAM_WATCH_WORKSPACE_ROOT=/Volumes/AI_LAB/ai_lab/workspace
AUTORESEARCH_UPSTREAM_WATCH_MAX_COMMITS=5

# Telegram Bot Token(可选)
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
# Admin bootstrap
AUTORESEARCH_ADMIN_BOOTSTRAP_KEY=replace-with-admin-bootstrap-key
AUTORESEARCH_ADMIN_JWT_SECRET=replace-with-admin-jwt-secret

# MCP 配置(可选)
MCP_SERVER_URL=http://localhost:3000
# Optional model providers
OPENAI_API_KEY=your-openai-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
63 changes: 39 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,37 @@ on:
pull_request:
merge_group:

env:
PYTHON_BASELINE: "3.11"
CORE_LINT_PATHS: >-
src/autoresearch/agent_protocol
src/autoresearch/api/routers
src/autoresearch/executions/runner.py
src/gateway
src/gatekeeper
scripts/agent_run.py
tests/gateway/test_message_mirror.py
tests/test_agent_protocol_models.py
tests/test_agent_policy_merge.py
tests/test_agent_runner_patch_filter.py
tests/test_agent_fallbacks.py
tests/test_approvals_api.py
tests/test_capability_api.py
tests/test_gatekeeper_e2e.py
tests/test_openclaw_compat.py
tests/test_openhands_controlled_backend.py
CORE_TEST_PATHS: >-
tests/gateway/test_message_mirror.py
tests/test_agent_protocol_models.py
tests/test_agent_policy_merge.py
tests/test_agent_runner_patch_filter.py
tests/test_agent_fallbacks.py
tests/test_approvals_api.py
tests/test_capability_api.py
tests/test_gatekeeper_e2e.py
tests/test_openclaw_compat.py
tests/test_openhands_controlled_backend.py

jobs:
lint-test-audit:
runs-on: ubuntu-latest
Expand All @@ -26,6 +57,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Show Python support policy
run: |
echo "Project baseline: Python ${PYTHON_BASELINE}+"
echo "CI verification matrix: 3.11, 3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -38,38 +74,17 @@ jobs:

- name: Ruff
run: |
ruff check \
src/autoresearch/agent_protocol \
src/autoresearch/executions/runner.py \
scripts/agent_run.py \
tests/test_agent_protocol_models.py \
tests/test_agent_policy_merge.py \
tests/test_agent_runner_patch_filter.py \
tests/test_agent_fallbacks.py \
tests/test_openhands_controlled_backend.py
ruff check ${CORE_LINT_PATHS}

- name: Black
run: |
black --check \
src/autoresearch/agent_protocol \
src/autoresearch/executions/runner.py \
scripts/agent_run.py \
tests/test_agent_protocol_models.py \
tests/test_agent_policy_merge.py \
tests/test_agent_runner_patch_filter.py \
tests/test_agent_fallbacks.py \
tests/test_openhands_controlled_backend.py
black --check ${CORE_LINT_PATHS}

- name: Pytest
env:
PYTHONPATH: src
run: |
pytest -q \
tests/test_agent_protocol_models.py \
tests/test_agent_policy_merge.py \
tests/test_agent_runner_patch_filter.py \
tests/test_agent_fallbacks.py \
tests/test_openhands_controlled_backend.py
pytest -q ${CORE_TEST_PATHS}

- name: Pip Audit
# Temporary exception: no patched Pygments release published yet.
Expand Down
Loading
Loading