claude-code-best/src/constants
James F be0c65678d
Fix/coderabbit nits (#1259)
* fix: eliminate 8 as any in MCP handlers, structured output, and stream events

- Group A: Add : () => AnyObjectSchema type annotations to MCP notification
  schema constants (useIdeSelection, useIdeLogging, usePrompts, channelNotification)
- Group B: Add isStructuredOutputAttachmentMessage type guard for structured
  output attachment payloads (execAgentHook)
- Group C: Add isMessageDeltaStreamEvent type guard for message_delta
  stream event usage extraction (forkedAgent)

These as any casts also exist in the upstream CCB source — this fix provides
real type safety without changing any runtime behavior.

* feat: wire mode persona injection — Claude Soul Document distilled into system prompt

- prompts.ts: add getModePersonaSection() → injects current mode's
  systemPrompt as 'mode_persona' dynamic section (first in order,
  before operational instructions). Previously modes had systemPrompt
  fields but they were never sent to the model.
- modes/personas/claude.ts: 3KB distilled Claude persona from
  Anthropic's leaked Claude 4.5 Opus Soul Document (70KB → operational
  extract): core traits, 7 honesty principles, helpfulness/caution
  balance, collaboration stance, identity stability.
- With custom mode YAML (~/.claude/modes/claude.yaml), 7 modes total
  including the new Claude persona — fully operational at /mode claude.

Co-Authored-By: James Feng <47167674+GhostDragon124@users.noreply.github.com>

* fix: import path convention + reword persona source comment

- prompts.ts: use 'src/modes/store.js' alias instead of relative '../modes/store.js'
  to match the file's existing import convention
- claude.ts: reword JSDoc to say 'based on publicly available reference document'
  instead of 'leaked', addressing CodeRabbit review concern
2026-06-07 20:06:16 +08:00
..
__tests__ docs: 添加 ToolSearch 设计指南 + 禁用 turn-zero 工具推荐弹窗 2026-05-09 16:45:56 +08:00
apiLimits.ts feat: build 2026-03-31 19:22:47 +08:00
betas.ts docs: 添加 ToolSearch 设计指南 + 禁用 turn-zero 工具推荐弹窗 2026-05-09 16:45:56 +08:00
common.ts feat: build 2026-03-31 19:22:47 +08:00
cyberRiskInstruction.ts feat: build 2026-03-31 19:22:47 +08:00
errorIds.ts feat: build 2026-03-31 19:22:47 +08:00
figures.ts chore: 添加脚本与构建配置更新 2026-04-22 22:38:10 +08:00
files.ts feat: build 2026-03-31 19:22:47 +08:00
github-app.ts fix: resolve dependency audit findings precisely (#361) 2026-04-26 19:49:54 +08:00
keys.ts feat: 添加 GrowthBook 自定义服务器适配器 2026-04-03 10:37:15 +08:00
messages.ts feat: build 2026-03-31 19:22:47 +08:00
oauth.ts feat: build 2026-03-31 19:22:47 +08:00
outputStyles.ts chore: 清理 src 下 33 项死代码和类型断言 2026-05-05 16:07:30 +08:00
product.ts feat: 添加自动邮箱映射功能并完善署名系统 2026-05-07 11:12:40 +08:00
promptEngineeringAudit.runner.ts refactor: 精简系统提示词 — 合并沟通风格段落、精简 memory/工具描述、截断 gitStatus 2026-05-09 17:14:41 +08:00
prompts.ts Fix/coderabbit nits (#1259) 2026-06-07 20:06:16 +08:00
querySource.ts Fix type (#1239) 2026-05-19 09:05:04 +08:00
spinnerVerbs.ts feat: build 2026-03-31 19:22:47 +08:00
system.ts feat: build 2026-03-31 19:22:47 +08:00
systemPromptSections.ts feat: build 2026-03-31 19:22:47 +08:00
toolLimits.ts feat: build 2026-03-31 19:22:47 +08:00
tools.ts fix: 将 ExecuteExtraTool 加入 ASYNC_AGENT_ALLOWED_TOOLS 允许子代理执行延迟工具 2026-05-16 08:28:43 +08:00
turnCompletionVerbs.ts feat: build 2026-03-31 19:22:47 +08:00
xml.ts feat: build 2026-03-31 19:22:47 +08:00