Commit Graph
31 Commits
Author SHA1 Message Date
weichenandCursor e829dd6074 fix(db): enable test env cold-start migrations on empty database.
Use pgvector image with extensions-only init, seed legacy users before project/chat fixtures, and align test compose with goose-only schema bootstrap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 09:42:45 +00:00
weichenandCursor e416b67a45 feat(taskrun): resume interrupted runs and harden P1 security gaps
Add confirm-gated resume API with resumable flag, Phase 5 finalize fault
and rolling-restart replay tests, Mermaid strict mode, request body limits,
and optional Runner Bearer auth between app and pi-agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 08:49:23 +00:00
weichenandCursor b3e529e444 feat(taskrun): add worker lease/heartbeat and Phase 5 fault injection tests
Introduce goose v20 lease columns with heartbeat loops so only expired
leases are marked interrupted on restart; add PG tests for concurrent
stage advance, active lease survival, and backup migration idempotency.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 08:46:05 +00:00
weichenandCursor b7cd24b267 feat(taskrun): persist runs/events and fix finalize-before-done ordering
Add goose v19 task_runs/task_run_events tables with PG store for restart
replay, orphan interruption on startup, strict /ready checks, and strip
client work_dir from chat/SSE paths per P0 path sandbox requirements.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 06:07:31 +00:00
weichenandCursor 00b0bb6882 feat(db): add outbox, notifications and stage advance request tables.
Support transactional stage.ready_to_advance events with dedupe by stage instance and config revision.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 03:14:30 +00:00
weichenandCursor caa98d8722 feat(db): add project workflow instance tables for Phase 3 governance.
Introduce planning/active lifecycle, instance snapshots, duty assignments, and activation confirmation tokens with single-live-instance constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 03:03:34 +00:00
weichenandCursor 7951b0f0b5 feat(db): add workflow definitions, versions, and template asset tables
Introduce Phase 2 IAM-adjacent schema for versioned workflow definitions,
template assets/versions, and workflow_defs permissions seed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 02:53:09 +00:00
weichen bc37debc31 feat(db): add IAM core migration for users, sessions, and RBAC
Introduce goose migration 00015 to extend users with IAM columns and seed system roles/permissions for Phase 1 authorization.
2026-09-12 01:39:29 +00:00
weichen 2772c9e526 feat(security): complete P0 release blocking remediation
Unify auth middleware and remove X-User-ID trust, add project_members
authorization, sandbox workspaces via resolver, and admin-only reconcile
by run_id. Introduce goose migrations with startup schema gate, fail closed
when DB unavailable outside explicit ALLOW_IN_MEMORY, bundle web/dist in
app Dockerfile, and remove frontend pseudo-login fallback.
2026-09-11 16:04:53 +00:00
WeiCHENandCursor 8abf190e75 chore(deploy): 三环境 Compose 构建真实 app 镜像并补齐法规库运维
将 dev/test/main 的 app 服务从占位容器改为 Dockerfile 多阶段构建,增加 healthcheck 与 .regulations 只读挂载;新增法规库备份/恢复脚本并同步 env-service 目录初始化与 gitignore。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 19:53:24 +08:00
WeiCHENandCursor 63cc8ab1da feat(api): observer task runs decoupled from SSE lifecycle
Add POST/GET/POST cancel task run APIs, background worker with event replay,
workspace reconcile, runner child cancel, and chat message metadata updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 15:15:15 +08:00
WeiCHENandCursor 463f7d5ea5 feat(agent): project asset upload and squad materials assembly
Register uploads via CAS, resolve project asset pools into task materials
with server-side extraction, and propagate asset_id through the bizdev/squad chain.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 15:15:15 +08:00
WeiCHENandCursor 9202ca7bf3 feat(db): add chat_turns idempotency table
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 13:18:16 +08:00
WeiCHENandCursor 8c8fa4721a chore(db): add ten-project chat seed migration and generator script
Provide SQL migration and Python helper to import review demo sessions
and seed messages from tenProjectsSeed.json into Postgres.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 13:00:35 +08:00
WeiCHEN f3337b7bf9 feat(chat): add URS requirement document upload dialogues with attachments and phase events for all 10 projects 2026-09-11 09:03:54 +08:00
WeiCHEN 0d3cc6a6ce feat(review): seed 10 real medical device projects with dual workflows, multi-role dialogues and fix account-switch chat isolation 2026-09-11 00:47:23 +08:00
WeiCHEN 7c899605ea feat(workflow): Phase 1 & 2 数据库迁移、项目创建人权威化与多工作流控制面 2026-09-10 23:35:44 +08:00
WeiCHEN 4962cefdae feat(export): 实现单次智能体回复导出、私密文档保存与隐私防泄露全套闭环 (Phase 0 - Phase 2)
- Phase 0: 实现服务端回复导出策略矩阵引擎 (replyexport.EvaluatePolicy)、数据库迁移 (2026-09-11-message-export-policy.sql)、SSE done 事件挂载与能力探测 API
- Phase 1: 构建前端 ReplyDocumentIR 语法树解析与渲染管道,支持 Markdown / DOCX 文件下载及带格式富文本剪贴板复制
- Phase 2: 实现私密自由文档 (freeform_documents) 领域服务、PostgreSQL 乐观锁版本管理、ACL 隐私隔离、一键共享与右侧栏编辑联动
- 专项修复:
  1. 修复后台 API 路由注册并加入双向拉取同步,确保私密保存实时进入我的私密列表
  2. 实现轻量回复专属 DOCX 生成与静默下载逻辑 (downloadDocxReply)
  3. 将 LaTeX 公式转为标准 MathML 矢量标记,支持粘贴到 Microsoft Word / WPS 自动识别为原生公式
2026-09-10 23:04:04 +08:00
WeiCHEN 5a83b9fa44 feat(chat): 完成分类锚点坞(CategoryDock)与双轨制未读重构 (含方案A轮次归一化与起始位置居中) 2026-09-10 15:44:05 +08:00
WeiCHEN de015d694a feat(history): 实现三模历史搜索、每日智能协同摘要与时间轴侧栏 (Phase P2) 2026-09-10 13:53:07 +08:00
WeiCHEN 2ece0ce882 feat(history): 实现超长对话历史按日归档与滑动窗口 (Phase P0) 2026-09-10 13:24:32 +08:00
WeiCHEN 747cd39e97 feat(core): update backend coordinator, docgov lease, squad workflow and web governance integration 2026-09-10 09:38:35 +08:00
WeiCHENandCursor 42fff9dfdb feat(db): 增加受控文档编制审核批准生命周期与认领治理Schema
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 11:46:33 +08:00
WeiCHENandCursor e88a47db6d feat(agent): 增强上下文沙箱指引、搜索过滤与CLI用户ID上下文透传
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 11:21:18 +08:00
WeiCHENandCursor 38aac97d24 feat(db): 部署专属记忆与多级上下文数据库容器与pgvector初始化Schema
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 10:13:54 +08:00
WeiCHENandCursor 0f21060bce feat(db): 启动本项目专属知识库容器并完成法规数据无损迁移与解耦
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 23:40:23 +08:00
WeiCHENandCursor cd39a52dce feat(agent): ensure clean container and isolate workspace artifacts strictly to host volume
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 17:51:50 +08:00
WeiCHENandCursor 38406f5e0b test(agent): add Tavily pool rotation and PiAgent remote runner tests
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 17:31:35 +08:00
WeiCHENandCursor fabdb51e65 feat(agent): add pi-agent container assets with dynamic MiniMax config and HTTP runner
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 17:31:27 +08:00
WeiCHENandCursor 1edf5f60ab feat(agent): add Tavily search extension with API key pool and auto-rotation
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 17:31:23 +08:00
WeiCHENandCursor 6478742d44 feat(db): 增加共享知识库与隔离系统数据库初始化脚本
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 15:59:19 +08:00