forked from bai/curriculum-project-hub
ce767e9cab
FeishuRead(ADR-0003): feishuContextTool 从 stub 换成真实 lark im.v1.message.get(单条 trigger/reply/status_card)+ list(thread 回复); ADR-0003 chat 授权不变式不变(handler 已 gate)。 StatusCard: sendCard + buildRunStatusCard——完成/出错发 interactive card (status 文案 + model 选择器 + 取消按钮带 runId),替代纯文本。 Permission(ADR-0004, project-wise): triggerAgent 查 PermissionGrant 对 project 的 edit+ 能力(manage⊇edit 单调);sender open_id 当 principal (子类型学 OPEN,务实选择,permission.ts 标注);per-artifact OPEN; settings 组合规则 OPEN。无权限回 '无权限触发'。 Deploy: cph-hub.service systemd unit(ExecStartPre 跑 prisma migrate)+ install_service.sh(idempotent,seed env)+ deploy_platform.sh (rsync + npm ci + build + restart + healthz)。 client.ts 抽 createLarkClient/startFeishuListenerWithClient,tools 与 ws 共用同一 client。 tsc rc=0;prisma validate 通过;deploy 脚本 bash -n 通过。
24 lines
856 B
Bash
24 lines
856 B
Bash
# Hub runtime configuration. Copy to .env and fill in.
|
|
|
|
# PostgreSQL connection string. Used by Prisma and the Hub server.
|
|
DATABASE_URL="postgresql://paradigm:paradigm@127.0.0.1:5432/paradigm"
|
|
|
|
# OpenRouter (or any OpenAI-compatible) API key + base URL.
|
|
# The Hub's agent layer is provider-agnostic (ADR-0017); this points the
|
|
# OpenAI-compatible client at OpenRouter by default.
|
|
OPENROUTER_API_KEY=""
|
|
# Optional: override the base URL (e.g. direct vendor API, local gateway).
|
|
# OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"
|
|
|
|
# Hub server port. Defaults to 8788.
|
|
PORT=8788
|
|
|
|
# Feishu (lark) bot credentials. The bot receives @mentions in project groups.
|
|
FEISHU_APP_ID=""
|
|
FEISHU_APP_SECRET=""
|
|
FEISHU_BOT_OPEN_ID=""
|
|
|
|
# Path to the `cph` binary (the Courseware-side checker, ADR-0016).
|
|
# Defaults to `cph` on PATH if unset.
|
|
# CPH_BIN="/usr/local/bin/cph"
|