claude-code-best/docs
林凯90331 0b36424820 feat(server/question): adapt question API to opencode-compatible format
Refactor csc serve question endpoints to match opencode/app-ai-native
expected data models and request/response shapes:

- GET /question now returns QuestionRequest[] (direct array) instead of
  { questions: [...] }
- POST /question/:id/reply accepts { answers: string[][] } mapping to
  selected option labels per question
- POST /question/:id/reject no longer requires a request body
- Support dual question sources:
  - MCP Elicitation (converted to opencode format with enum→options)
  - AskUserQuestionTool permissions exposed as questions
- Add conversion helpers: convertAskUserQuestionToOpencode,
  convertElicitationToOpencode, buildElicitationContent
- Reply to AskUserQuestionTool via replyPermission('allow') with
  constructed updatedInput.answers map

Also includes serve-mode infrastructure improvements:
- Session routes auto-create sessions on demand via getOrCreateSession
- Set CSC_SERVE_MODE env var in child process spawn
- Skip push-suggestion stream waiting in serve mode

Add comprehensive unit tests for question route opencode conversion.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-09 17:52:43 +08:00
..
agent docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
context docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
conversation docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
design/nested-agent feat(costrict): add depthGuard agent and refine strictPlan/strictSpec workflow 2026-04-10 21:42:53 +08:00
diagrams feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
extensibility docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
features fix: resolve dependency audit findings precisely (#361) 2026-04-26 19:49:54 +08:00
images docs: 更新文档, 加上配图 2026-04-01 11:14:20 +08:00
internals fix: resolve dependency audit findings precisely (#361) 2026-04-26 19:49:54 +08:00
introduction docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
logo docs: 尝试修复 docs 的位置 2026-04-01 10:09:00 +08:00
safety docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
serve feat(server/question): adapt question API to opencode-compatible format 2026-05-09 17:52:43 +08:00
task docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
test-plans Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
tools docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
auto-updater.md merge: sync upstream/main while preserving local brand/config 2026-04-29 09:06:20 +08:00
config-list.md chore: 更新配置和组件文件 2026-04-09 15:42:48 +08:00
external-dependencies.md docs: 文档检查/check 20260419 (#296) 2026-04-19 09:30:00 +08:00
favicon.svg docs: 尝试修复 docs 的位置 2026-04-01 10:09:00 +08:00
lsp-integration.md Fix mintlify validate errors (#367) 2026-04-26 11:07:20 +08:00
telemetry-remote-config-audit.md feat: 关闭 Datadog 日志发送 2026-04-03 09:49:59 +08:00
user-guide.md feat(costrict): add depthGuard agent and refine strictPlan/strictSpec workflow 2026-04-10 21:42:53 +08:00