claude-code-best/src/services/mcp
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__ feat: 注册所有新命令到命令系统和工具注册表 2026-05-09 23:04:39 +08:00
auth.ts fix: resolve dependency audit findings precisely (#361) 2026-04-26 19:49:54 +08:00
channelAllowlist.ts style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
channelNotification.ts Fix/coderabbit nits (#1259) 2026-06-07 20:06:16 +08:00
channelPermissions.ts feat: 接入内建 weixin channel(同 #301 重构版本) (#303) 2026-04-19 21:33:27 +08:00
claudeai.ts feat: build 2026-03-31 19:22:47 +08:00
client.ts fix: align mcp transform pipeline with Anthropic Claude Code 2.1.128 2026-05-05 14:53:57 -07:00
config.ts style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
elicitationHandler.ts feat: build 2026-03-31 19:22:47 +08:00
envExpansion.ts feat: build 2026-03-31 19:22:47 +08:00
headersHelper.ts feat: build 2026-03-31 19:22:47 +08:00
InProcessTransport.ts feat: build 2026-03-31 19:22:47 +08:00
MCPConnectionManager.tsx style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
mcpStringUtils.ts feat: build 2026-03-31 19:22:47 +08:00
normalization.ts feat: build 2026-03-31 19:22:47 +08:00
oauthPort.ts style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
officialRegistry.ts fix: resolve dependency audit findings precisely (#361) 2026-04-26 19:49:54 +08:00
SdkControlTransport.ts feat: build 2026-03-31 19:22:47 +08:00
types.ts feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
useManageMCPConnections.ts fix: 删除 edit tool 中的旧逻辑处理, 现在已经不需要这些处理了, 大模型够屌 (#1251) 2026-05-28 21:52:31 +08:00
utils.ts feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
vscodeSdkMcp.ts fix: 删除 edit tool 中的旧逻辑处理, 现在已经不需要这些处理了, 大模型够屌 (#1251) 2026-05-28 21:52:31 +08:00
xaa.ts feat: build 2026-03-31 19:22:47 +08:00
xaaIdpLogin.ts feat: build 2026-03-31 19:22:47 +08:00