54 Commits
Author SHA1 Message Date
weichen 45f21e84c7 feat(jevdecide): product shadow client with offline eval gates
Add typed jevdecide HTTP client (circuit, metrics) and coordinator
DecideAssist wiring behind JEV_DECIDE_MODE (default off). Offline eval
and synthetic soak evidence gate realtime/profile before assist rollout.
2026-09-23 17:40:40 +00:00
WeiCHEN a5ea8197ab fix(coordinator): force Tavily search for weather/realtime dialogue answers
Anchor weather and other realtime questions on runner /v1/search results (or an explicit refuse constraint) so the model cannot invent dates or temperatures from training memory.
2026-09-23 14:51:09 +08:00
WeiCHEN c9e1033926 fix(coordinator): inject current time into dialogue prompt to anchor time-sensitive answers 2026-09-23 10:59:28 +08:00
WeiCHEN 30fa4e88b2 merge: fix/fix-latest-upload-summary-2026-09-23 (latest-upload summary + parse wait) 2026-09-23 10:23:21 +08:00
WeiCHEN 1f37f90b4b feat(chat): show MinerU parse progress while waiting in-turn
When summarizing the latest upload, poll parse state up to MinerU timeout,
emit document_parsing phase events so the bubble stays live and input stays
locked, then summarize or return a clear slow/failed reply.
2026-09-23 09:55:59 +08:00
WeiCHEN 0079080d8a fix(intent): route general smalltalk questions to casual chat instead of stage consult template 2026-09-23 09:54:37 +08:00
WeiCHEN a3b5d4291b fix(chat): resolve latest-upload summary via CAS assets
Recognize “刚刚上传” as @latest_upload and summarize the project’s newest CAS attachment (with clear parse pending/failed/no-asset replies) instead of searching only controlled workflow docs.
2026-09-23 09:42:28 +08:00
WeiCHEN 0ad4ee319c fix(coordinator): map engine-split sentinels to vocabulary 2026-09-22 22:14:22 +08:00
WeiCHEN 834af6dd59 refactor(coordinator): split engine.go by use-case handlers (rebuilt on current dev) 2026-09-22 22:10:26 +08:00
WeiCHEN 08af12b936 merge: feature/g2-g3-exception-clearance-2026-09-22
Keep G1 cleared sql_write; land G2/G3 path clearances; baseline to zero.
2026-09-22 22:08:53 +08:00
WeiCHEN a8c6eb6638 refactor(boundaries): clear U5 path leaks and U8 task_runs write
Route deliverable/workspace paths through workspace constants and cancel
open runs via taskrun.CancelOpenByProject so G2/G3 exceptions can drop.
2026-09-22 22:01:14 +08:00
WeiCHEN 7d51e40b1c refactor(boundaries): clear data/dev path leaks; start output.md via DeliverableKey
Remove coordinator/bizdev/storage data/dev fallbacks and register
agent→workspace so default agent targets use workspace.DeliverableKey.
Remaining U5 path and G3 task_runs clearance stay open.
2026-09-22 21:44:57 +08:00
WeiCHEN 381b56dafc refactor(docgov): converge shared lifecycle vocab into contracts
Introduce internal/contracts/vocabulary for state/role/error sentinels,
alias through docgov, and retarget hot production consumers so
coordinator no longer imports docgov for vocabulary-only use.
2026-09-22 21:44:57 +08:00
weichenandCursor 976f8d30b8 feat(server): allow weighted cross-workflow reads after a view check
Exact out-of-workflow documents can be summarized when WORKFLOW_SCOPE_MODE=weighted and the caller can still view the active instance; writes stay blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:11:47 +00:00
weichenandCursor 6bb2f72507 test(coordinator): cover weak-requirements confirm then affirm path
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 08:27:49 +00:00
weichenandCursor 5ba9bbbe11 feat(coordinator): smart confirm gate before TRIGGER_TASK execution
Ask via PendingExpectation for weak-write verbs, mid confidence, or
stage-mismatched doc tasks instead of running blindly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 08:27:49 +00:00
weichenandCursor 0912efdbd9 feat(coordinator+server): narrow document match pool to active workflow
- ActiveWorkflowScope resolves live instance task keys for the project
- chat document reader matches inside the active pool; cross-flow hits
  return ErrWrongWorkflow with switch guidance
- enrichSessionWorkflowStage injects ActiveWorkflowKey into UserCtx
- TRIGGER_TASK (coordinator + task-run API) blocks out-of-scope task keys

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 08:05:44 +00:00
weichenandCursor 5c6b4f7719 feat(intent): scope slot filling to the active workflow
- ContextSnapshot gains ActiveWorkflowKey; ToSnapshot passes it downstream
- manifest-backed doc-title -> workflow index (main/pm/tm/rdev/sw)
- TRIGGER_TASK and DOCGOV write actions blocked with switch guidance when
  the named document belongs to another active workflow
- legacy projects without an active workflow key keep the old behavior

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 07:38:49 +00:00
weichenandCursor 5e05d966b4 feat(intent): bridge chat into impact analysis and revision proposals
Analysis stays read-only, and a revoked project member cannot confirm an old proposal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 15:35:07 +00:00
weichenandCursor d4041a4f0c fix(coordinator): use the caller name and reject non-decimal user ids
Ambiguous consult only redirects on low confidence, and the testing template greets the signed-in user instead of a hardcoded name. Session tokens no longer parse as user id 0. Live chat sessions now evict the oldest entry at a hard cap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 09:19:36 +00:00
weichenandCursor 2a75abb39e refactor(bizdev): delete eight locator getters
Composition roots already hold Snapshot ports; the interface and archtest now forbid putting Pool/DocGov/DocRevision/ContextManager/CAS/ProjectWorkflow/FreeformDoc/KB back on Service.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 13:08:25 +00:00
weichenandCursor 110c2e810c feat(stageflow): own task/stage types so coordinator drops bizdev
Coordinator now takes a StageTaskRunner and injected context/KB ports.
Chatflow assembler reads maturity tokens instead of the orchestration root.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 11:13:17 +00:00
weichenandCursor 84c0841acb feat(app): add composition root, stageflow, ContextUpdate, and SSE transport
Move construction and document OnOutbox out of server, give HTTP/CLI a shared task use case, and block already-cleared import/event arch rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 05:40:15 +00:00
weichenandCursor 0c6fb090ff fix(chat): show pending confirmation instead of completed for high-risk
Sync coordinator and async CompletionSummary use pending_author_confirmation
with artifact metadata for document entry; completed only after commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:51:15 +00:00
weichen cd506d8cc7 fix(chat): add authorized readonly document summaries 2026-09-13 04:27:01 +00:00
weichen 3d09bd6d7d fix(quality): 闭环 Go 质量门禁(鉴权富化/V0.5/vet/health/KB gate/记忆轮询) 2026-09-13 02:50:23 +00:00
weichen 77b8d07cd7 fix(governance): 统一文档访问判定与上下文快照排除计数
补齐 DocumentAccessDecider HTTP 409、projectcontext 私有对话排除统计,并更新整改 gap matrix 与测试报告。
2026-09-13 02:50:23 +00:00
weichenandCursor f07178fa73 feat(service): enforce three-workflow governance and instance lifecycle
Wire catalog policy, v2 manifests, stage access, activation metadata fixes, and coordinator instance advance around frozen workflow snapshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:23 +00:00
weichenandCursor c7aba86376 fix(test): stabilize PG seed users and CI short test suite.
Reactivate dev seed users after auth PG tests, use unique session tokens, fix import guard and coordinator assertions, and skip flaky E2E in short mode; add pg_restore CI drill job.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:23 +00:00
WeiCHENandCursor f4e4357ddb fix(agent): Chat Agent 全链路 P0-P5 整改
封堵鉴权旁路与导出 IDOR,DocGov 改服务端身份;对话层 PendingAction 接真实 docgov/taskrun;修复流式租约假死与会话级任务流;加固配置/doc_id/NULL;补齐 slog 与测试;前端 ErrorBoundary 与受控文档重试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:22 +00:00
WeiCHENandCursor 24478ec383 feat(intent): Phase 5 V2 shadow gray flags and IntentPlan execution
Add env-based feature flags (intent_v2_shadow/decision, multi_intent,
workflow_intents), V1/V2 shadow diff reporting, expectation_plus_new plan
building, ranked-frame L2 conflict gate, and coordinator sequential query
plan execution with confirm-step deferral.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:21 +00:00
WeiCHENandCursor 9cb129d3e8 feat(intent): Phase 4 run control, subtypes, and limited IntentPlan
Add RUN_STATUS_QUERY/RUN_RESUME/RUN_RESTART with matcher and coordinator
handlers; write QUERY_PROGRESS/SUPPLEMENT_INFO subtypes to V2 frame; support
safe query+query multi-intent plans via IntentPlan dual-write.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:21 +00:00
WeiCHENandCursor dda6a06e4a feat(intent): Phase 3 workflow/help intents and coordinator handlers
Add SWITCH/TRIGGER/QUERY workflow, doc status, help and unsupported intents
with ActionSpec registry entries, NL matchers, L2 handlers with creator-only
switch gate, router routes, and capability-aware AvailableActions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:21 +00:00
WeiCHENandCursor 868238137c fix(intent): Phase 0+1 P0 safety gates for recognition and coordination
Add golden-v1 hard-negative suite, shadow observability fields, query/command
negation gates for high-risk writes, AllowAffirmative enforcement, candidate
conflict clarification, and coordinator clarify-before-ambiguous ordering.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:21 +00:00
WeiCHEN 60d4df4319 fix(chat): resolve intent recognition, workflow auth, and message ordering 2026-09-13 02:50:21 +00:00
WeiCHEN c0d6ef7d80 feat(workflow): Phase 3 Coordinator 上下文、动作路由与工作流运行 API 集成 2026-09-13 02:50:21 +00:00
WeiCHEN 645bd06519 feat(prompt+cache): implement 10-section prompt template, true KB regulation recall, behavior rules and multi-level caching (P4) 2026-09-13 02:50:20 +00:00
WeiCHEN 1635ad0007 feat(coordinator): implement determinism-first query rewrite with ellipsis completion and pronoun resolution (P3) 2026-09-13 02:50:20 +00:00
WeiCHEN 640b672e8b feat(ctxmgr): implement chat memory vectorization, privacy dual-gate retrieval and memory composer (P2) 2026-09-13 02:50:20 +00:00
WeiCHEN c58d33b853 feat(ctxmgr): implement sliding window, rolling summarizer and DST task state (P1) 2026-09-13 02:50:20 +00:00
WeiCHEN e5e80a6fc6 feat(core): update backend coordinator, docgov lease, squad workflow and web governance integration 2026-09-13 02:50:20 +00:00
WeiCHENandCursor 7615beeaf9 fix(agent): scope Task 2 to SSE phases/errors without dialogue_llm leak
- untrack internal/coordinator/dialogue_llm.go (kept on disk untracked as local WIP for a future dialogue-LLM commit with its own tests; it depends on engine.go fields (dialogueBackend, ReplySource) not yet committed)
- slim internal/chat/session.go back to Task 2 scope relative to bfa6889: keep EmitErrorInfo(stream.ClassifyError(...)) for intent+coordination errors and the dialogue_generating EmitPhase before ProcessIntent; drop sync.Mutex/mu, ChatResponse.ReplySource, preference/RecentDialogue injection block, and collectRecentDialogue helper (unrelated WIP for the dialogue-LLM feature)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:20 +00:00
WeiCHENandCursor 1889279b18 feat(agent): emit dialogue phases and classified SSE errors with request id
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:20 +00:00
WeiCHENandCursor a02d4de7d2 docs(test): archive test report for dialogue-driven content and hierarchical intent system
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor 6493ffd3ce fix(coordinator): chain expectation for card confirmation and add ttl lifecycle cleanup
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor 1a1875bc8c feat(coordinator): implement docgov gates, semantic anchoring and interactive card dispatch
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor 46b955f30d feat(cli): 终端自推荐标杆案例渲染与全业务链 E2E 端到端回归实操
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor d0c9670ebc feat(coordinator): 在贴身业务参谋决策锦囊中注入相似标杆案例自推荐
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor 0f01f047d5 feat(agent): 在小队编排与任务生命周期中打通阶段性状态与摘要流式通知
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00
WeiCHENandCursor e2ca8ad55a feat(intent): 增强目标市场槽位意图匹配与上下文兼容推断
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:19 +00:00