Glossary Addendum(术语表补充)¶
本文件:补充 glossary.md 中未收录的术语 目标:补 50+ 漏的 class / type / 概念
A¶
ANT-ONLY(Ant-Only Build)¶
bun:bundle 编译时字符串字面量 "external" === 'ant',商业版为 false,ANT 内部版为 true。编译时替换。
关联:bun:bundle、DCE
appendSystemPrompt¶
Claude API 调用时追加的 system prompt,用于"在默认 system prompt 基础上加内容"。
关联:system prompt
AgentMailbox¶
TeammateMailboxAttachment 的简称,team 内 agent 之间的"信箱"通信机制。
关联:Swarm、TeammateMailboxAttachment
askUserQuestion¶
特殊工具:让 Claude 向用户提问(多选项)。
关联:Tool
B¶
BashParser¶
手写 bash 解析器(4436 行),用纯 TS 实现,不用 tree-sitter WASM。50ms 超时 + 50K 节点预算。
关联:AST、DCE
BriefTool¶
ANT-ONLY 工具,用于 assistant 模式的"简短"消息发送。
关联:KAIROS、assistant mode
bashClassifier¶
LLM-based 决策器,对 bash 命令做"安全/不安全"分类。speculative 提前启动。
关联:bashSecurity、Speculative Classifier
bashSecurity.ts¶
25+ validator 文件(2592 行),包括 isSafeHeredoc、validateGitCommit、validateObfuscatedFlags 等。
关联:bashPermissions
bashPermissions.ts¶
6 层决策文件(2621 行),exact → wildcard → sandbox → early deny → semantic → classifier。
关联:bashSecurity
bun:bundle¶
Bun 的编译时 DCE 工具。feature('X') 在打包时替换为字面量 'true'/'false',触发 DCE。
关联:DCE
BashOutput¶
推测工具:获取 background bash 的输出。
关联:Bash
C¶
content hash¶
内容哈希 路径生成,避免 UUID 破坏 prompt cache(generateTempFilePath(..., { contentHash }))。
关联:Prompt Cache
Classifier¶
泛指 LLM-based 决策器(bash classifier / permission classifier)。
关联:Speculative Classifier
_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS¶
类型级契约后缀,强制作者审查错误信息可安全上报。
关联:Telemetry
cost-tracker.ts¶
10706 字节文件,累计 input/output/cache token 和 USD 成本。
关联:Cost Tracking
Compact(Compact Conversation)¶
把长对话压缩为短摘要的机制。snipCompact 等推测实现。
关联:PreCompact Hook
CDC(Cursor Doc Compaction? 推测)¶
未确认。可能指 cursor-based doc compaction。
D¶
dangerouslySkipPermissions¶
CLI flag:跳过所有权限检查。等同于 bypassPermissions mode。危险。
关联:Permission Mode
defaultMode¶
settings.json 字段:默认 permission mode(default/acceptEdits/bypassPermissions/plan/auto)。
关联:Permission
DCE(Dead Code Elimination)¶
编译时死代码消除。bun:bundle 在 feature('X') 为 false 时砍掉整段代码。
关联:bun:bundle、Feature Flag
DCR(Dynamic Client Registration)¶
OAuth 协议机制:client 不存在时 server 自动注册。
关联:MCP OAuth
dangerously-skip-permissions¶
与 dangerouslySkipPermissions 等价(连字符 vs 驼峰)。
关联:Permission Mode
DSL(Domain-Specific Language)¶
推测:Claude Code 内部用 Zod schema 描述 settings/permissions 的 DSL。
关联:Zod
E¶
Elicitation¶
MCP 协议扩展:server 要求 client 提供额外信息(auth、user data)。错误码 -32042。
关联:MCP Elicitation
Experiment¶
推测的 A/B testing 框架,与 logEvent 配合。
关联:Telemetry
Exit Code 2¶
Hook 的特殊退出码:阻止 + stderr。其他非 0 视为错误但允许。
关联:Hook
expectedRejection¶
推测:用于 mock 的 rejection helper。
关联:Test
EXTRA_CA_CERTS¶
NODE_EXTRA_CA_CERTS 环境变量:CA 证书路径。
关联:ENV
F¶
feature('X')¶
编译时门控函数,参数是 feature flag 名,返回 boolean。
关联:bun:bundle、DCE
flushGate.ts¶
Bridge 子组件(71 行),防止"历史消息"和"新消息"交错的小型状态机。
关联:Bridge
Forbidden(推测)¶
推测的工具或权限位:禁止某类操作。
关联:Permission
featureSnapshot¶
GrowthBook 的快照功能(推测)。
关联:GrowthBook
failedPluginInfo¶
PluginState 的变体:插件加载失败的元数据。
关联:Plugin
G¶
getApiKeyFromConfigOrMacOSKeychain¶
macOS keychain 集成函数,5min memoize。
关联:Auth
getAnthropicApiKeyWithSource¶
返回 { apiKey, source },source 是 6 种来源之一。
关联:Auth
getCurrentTeammateTask¶
getViewedTeammateTask 的别名。
关联:Swarm
GrowthBook¶
A/B testing + feature flag 服务。Claude Code 用它做实验。
关联:Telemetry
getAttachmentConfig¶
配置文件(推测),含 6 个 attachment config 常量。
关联:Attachment
getMcpAuthCache¶
MCP 鉴权 15min 缓存。
关联:MCP OAuth
getMarketplace¶
Marketplace 入口函数(memoize)。
关联:Marketplace
globalHook¶
推测:全局 hook(vs plugin hook)。
关联:Hook
H¶
handleElicitation¶
Tool 接口的方法,处理 MCP -32042 错误。
关联:MCP Elicitation
handleOAuth401Error¶
Auth 层的 401 处理函数,使用 pending401Handlers Map 去重。
关联:Auth
hangar(推测)¶
未确认,可能是某种调度。
关联:TODO
hiddenTool¶
推测:内部工具,不显示给用户。
关联:Tool
I¶
isEnvTruthy¶
布尔判断 helper,接受 '1' / 'true' / 'yes' / 'on'(不区分大小写)。
关联:ENV
isMcpSessionExpiredError¶
错误判别函数。
关联:MCP
inlinePlugins¶
通过 --plugin-dir 传入的临时 plugin。
关联:Plugin
isDangerousRemovalRawPath¶
Bash 安全检测:识别 rm -rf / 类。
关联:bashSecurity
Inference¶
LLM 推理 / 推断。
关联:LLM
Issue¶
GitHub Issue 工具。
关联:Tool
J¶
JSON-RPC 2.0¶
MCP 协议基于的标准。4 种消息:Request / Response / Notification / Error。
关联:MCP
JIT¶
推测:CLI 启动时的"JIT 编译"某种(实际无,但用词)。
关联:CLI
Jobs(推测)¶
background task / job system。
关联:Background Task
K¶
KAIROS¶
Feature flag + 推测 assistant 模式模块名。assistantModule、kairosGate。
关联:Feature Flag、Assistant Mode
kubectlPathConfig(推测)¶
pathValidation.ts 中的 CmdletPathConfig 别名。
关联:Path Validation
L¶
loadPluginSettings¶
从 settings 加载 plugin 配置。
关联:Plugin
Lazy Require¶
条件动态加载:feature('X') ? require('./X.js') : null 或 getter 包 require。
关联:DCE
loadAllPlugins (memoize)¶
Session 内只加载一次的 plugin loader。
关联:Plugin
Linear Issue¶
Linear(推测)的 Issue 工具。
关联:Tool
Lite Session Info¶
轻量 session 列表(不存完整 log)。
关联:Session
loadAllPluginsCacheOnly¶
只读 cache 版的 loadAllPlugins。
关联:Plugin
M¶
mcpTools¶
getMcpToolsCommandsAndResources 的简称,返回所有 MCP 工具/命令/资源。
关联:MCP
memoize¶
永不过期 memoize,session 内只跑一次。
关联:Cache
memoizeWithLRU¶
LRU 淘汰 memoize。
关联:Cache
memoizeWithTTLAsync¶
时间过期 memoize。
关联:Cache
MCPConnectionManager¶
<MCPConnectionManager> Ink 组件,管理所有 MCP 连接。
关联:MCP、Ink
McpSessionExpiredError¶
MCP session 过期错误(不 export)。
关联:MCP
messageStop¶
MCP stream 事件:消息结束。
关联:MCP
mobileCompat(推测)¶
移动端兼容(推测未支持)。
关联:Roadmap
moreRight¶
ANT-ONLY 桌宠。
关联:BUDDY
MCP_AUTH_CACHE_TTL_MS = 15 * 60 * 1000¶
MCP OAuth 缓存 15 分钟。
关联:Auth
MAX_SUBCOMMANDS_FOR_SECURITY_CHECK = 50¶
Bash 解析最多 50 个子命令(DoS 防护)。
关联:bashSecurity
MAX_NODES = 50_000¶
Bash AST 节点上限(防 OOM)。
关联:BashParser
MAX_FILE_DESCRIPTOR_LENGTH = 2048¶
MCP 工具描述最大 2KB。
关联:MCP
N¶
NO_COLOR¶
环境变量:禁用颜色(可访问性)。
关联:ENV
noCache¶
推测的工具或选项,禁用 cache。
关联:Cache
NO_FLICKER¶
环境变量 CLAUDE_CODE_NO_FLICKER=0,禁闪烁。
关联:ENV
notification¶
Hook 事件:通知触发。
关联:Hook
O¶
offlineMode(推测)¶
离线模式(推测)。
关联:Mode
OAuth Provider(OAuthClientProvider)¶
MCP 协议 OAuth 抽象,由 Claude Code 的 ClaudeAuthProvider 实现(985 行)。
关联:Auth、MCP
OpenTelemetry¶
推测:用于 OTEL headers。
关联:Telemetry
outputStyle¶
settings.json 字段:输出风格。
关联:Settings
onResult¶
Hook 事件:tool 返回。
关联:Hook
orgValidation¶
validateForceLoginOrg 强制登录 org 验证。
关联:Auth
P¶
pending401Handlers¶
Map
关联:Auth
pluginCliCommands¶
plugin 子命令注册。
关联:Plugin
prefetchOfficialMcpUrls¶
预取官方 MCP URLs。
关联:MCP
prefetchGcpCredentialsIfSafe¶
预取 GCP 凭据(fire-and-forget)。
关联:Auth
prefetchAwsCredentialsAndBedRockInfoIfSafe¶
预取 AWS 凭据 + BedRock 信息。
关联:Auth
Plan Mode¶
permission mode:只读。Edit/Write/Bash 都 ask。
关联:Permission Mode
process.argv¶
进程启动参数。
关联:CLI
peekSpeculativeClassifierCheck¶
speculative classifier 的 peek(不消费)。
关联:Speculative Classifier
Q¶
QueryEngine¶
核心消息循环(推测 4000+ 行)。
关联:main、REPL
queryModel¶
推测:调 Claude API 的核心函数。
关联:QueryEngine
quitOnError(推测)¶
推测的配置:错误时退出。
关联:CLI
Quota Check¶
checkQuotaStatus 推测的 quota 限制检查。
关联:Auth
R¶
reconnectMcpServer¶
显式 MCP reconnect API。
关联:MCP
reconnectStrategy¶
推测:重连策略(指数退避)。
关联:MCP
redactUrlCredentials¶
URL 凭证脱敏 helper。
关联:Security
redactHeaders¶
HTTP header 脱敏 helper。
关联:Security
refreshAndGetAwsCredentials (memoizeWithTTLAsync)¶
AWS 凭据获取,1h 缓存。
关联:Auth
refreshGcpCredentialsIfNeeded (memoizeWithTTLAsync)¶
GCP 凭据,1h 缓存。
关联:Auth
RetryPolicy¶
重试策略接口(status code → retry? delay?)。
关联:Retry
runHeadless¶
Print 模式的 QueryEngine 入口。
关联:CLI
runInBackground¶
工具调用后台运行 flag。
关联:Tool
runMigrations¶
迁移老配置。
关联:Migrations
runAndCache¶
推测:run + cache helper。
关联:Cache
S¶
setIsRemoteMode¶
Bootstrap setter:标记当前为远程模式。
关联:Bootstrap
setMainThreadAgentType¶
Bootstrap setter。
关联:Bootstrap
setMainLoopModelOverride¶
Bootstrap setter。
关联:Bootstrap
setTeleportedSessionInfo¶
Bootstrap setter。
关联:Bootstrap
setAdditionalDirectoriesForClaudeMd¶
Bootstrap setter。
关联:Bootstrap
setOriginalCwd¶
Bootstrap setter。
关联:Bootstrap
Snippet¶
session 中被截断/压缩的消息。
关联:Compact
snipCompact¶
推测的截断/压缩实现。
关联:Compact
subscriptionType¶
5 种订阅:max / team / team-premium / enterprise / pro。
关联:Auth
subscribedTools¶
推测:用户订阅的工具列表。
关联:Tool
SSE(Server-Sent Events)¶
MCP transport 之一,HTTP streaming。
关联:MCP
strictMcpConfig¶
CLI flag:只用 --mcp-config,忽略其他 MCP 配置。
关联:MCP
skillSearchModules¶
EXPERIMENTAL_SKILL_SEARCH 门控的实验性 skill 搜索模块。
关联:Skill、Feature Flag
Speculative Classifier¶
投机性 LLM 分类器,启动时 fire-and-forget,规则决定时消费。
关联:bashPermissions
streamingResponse¶
API 流式响应对象。
关联:Claude API
Sandbox¶
推测:bash 命令沙箱模式。
关联:Permission
T¶
taskListId¶
推测:task list ID(多任务系统)。
关联:Todo
teamContextAttachment¶
team_context 附件类型。
关联:Swarm、Attachment
TeammateMailboxAttachment¶
teammate_mailbox 附件类型。
关联:Swarm、Attachment
toolPermissionContext¶
ToolPermissionContext 类型。
关联:Permission
TelemetrySafeError¶
带 _I_VERIFIED_* 后缀的错误类,类型级保证可安全上报。
关联:Telemetry、Error
tryGetAppState¶
推测:getAppState 的 try/catch 版本。
关联:AppState
teammateMode¶
3 种 teammate mode:tmux / in-process / auto。
关联:Swarm
timeOfDay¶
推测:一天中的时间(用于 date_change attachment)。
关联:Attachment
toolset¶
推测:工具集合。
关联:Tool
ToolUseContext¶
30+ 字段的 context,传递到所有 tool。
关联:Tool
TeamCreate¶
推测:team 初始化。
关联:Swarm
U¶
useSyncExternalStore¶
React 18 hook,订阅外部 store。
关联:React
useLocalStorage(推测)¶
推测的 localStorage hook。
关联:Hook
updateUsage¶
claude.ts 中累加 token 的函数。
关联:Cost Tracking
untrustedFilePath(推测)¶
推测的未信任路径检查。
关联:Security
USAGE_USAGE¶
未确认。
关联:Cost Tracking
V¶
viewAgentTask¶
推测:view agent task UI。
关联:Agent
validatePluginPaths¶
Plugin hook 路径不跳出 plugin 目录的校验。
关联:Plugin
validateForceLoginOrg¶
强制登录 org 验证。
关联:Auth
viewedLocalAgent¶
当前查看的 local agent。
关联:Agent
viewAgentTask¶
推测。
关联:Agent
Vote¶
推测:内部投票机制。
关联:Team
W¶
waitForCallback¶
OAuth / Elicitation 等待 callback。
关联:MCP OAuth
walkProgram¶
ast.ts 的 walk 入口。
关联:AST
withRetry¶
重试 helper(指数退避)。
关联:Retry
writeFileSync_DEPRECATED¶
推测:弃用的 sync 写文件。
关联:Filesystem
widerOrg(推测)¶
未确认。
关联:TODO
WebBrowserTool¶
WEB_BROWSER_TOOL 门控的 web 浏览器工具。
关联:Feature Flag、Tool
X¶
xaaS(External-as-a-Service)¶
MCP XaaS IdP 身份提供商(Auth0/Okta)。
关联:MCP OAuth
xaaFailureStage¶
XaaS 鉴权失败的阶段。
关联:MCP
xpack(未确认)¶
未确认的术语。
Y¶
yarnOutput¶
Yarn 输出(推测用于 plugin 安装)。
关联:Plugin
yaml¶
推测:YAML 配置(plugin manifest 等)。
关联:Config
Z¶
ZodError¶
Zod 验证错误。
关联:Zod
zodSchema¶
zod 模式,TypeScript 类型推断。
关联:Zod
zen(未确认)¶
未确认。
关联:TODO
Zod¶
TypeScript schema 验证库,类型推断 + 错误友好。
关联:Validation
zeroCostCall(推测)¶
未确认。
关联:Cost
缩略语速查¶
| 缩略语 | 全称 | 含义 |
|---|---|---|
| MCP | Model Context Protocol | 工具协议 |
| DCE | Dead Code Elimination | 编译时死代码消除 |
| DCR | Dynamic Client Registration | OAuth 动态注册 |
| STS | Security Token Service | AWS 临时凭据 |
| NCC | Non-Commercial Customers | 非商业用户 |
| LLM | Large Language Model | 大语言模型 |
| CLI | Command Line Interface | 命令行 |
| IDE | Integrated Development Environment | 集成开发环境 |
| TUI | Terminal User Interface | 终端 UI |
| IPC | Inter-Process Communication | 进程间通信 |
| SDK | Software Development Kit | 开发工具包 |
| API | Application Programming Interface | 应用接口 |
| CSS | Cascading Style Sheets | 样式表 |
| TS | TypeScript | 类型化 JS |
| JS | JavaScript | 脚本语言 |
| JSON | JavaScript Object Notation | 数据格式 |
| YAML | YAML Ain't Markup Language | 配置格式 |
| MD | Markdown | 文档格式 |
| PR | Pull Request | 合并请求 |
| CI | Continuous Integration | 持续集成 |
| CD | Continuous Deployment | 持续部署 |
| UI | User Interface | 用户界面 |
| UX | User Experience | 用户体验 |
| OT | Operational Transform | 操作变换 |
| CRDT | Conflict-free Replicated Data Type | 无冲突复制数据类型 |
| ANT | Anthropic | Anthropic 内部 |
| DCE | Dead Code Elimination | 死代码消除 |
| 5xx | 5 状态码类 | 服务器错 |
| 4xx | 4 状态码类 | 客户端错 |
| TTL | Time To Live | 生存时间 |
| LRU | Least Recently Used | 最近最少使用 |
| JIT | Just In Time | 即时(编译) |
| AOT | Ahead Of Time | 提前(编译) |
| OOP | Object-Oriented Programming | 面向对象 |
| FP | Functional Programming | 函数式 |
| DI | Dependency Injection | 依赖注入 |
| DSL | Domain-Specific Language | 领域特定语言 |
| GC | Garbage Collection | 垃圾回收 |
| JIT | Just In Time | 即时 |
| MoE | Mixture of Experts | 专家混合 |
| DAG | Directed Acyclic Graph | 有向无环图 |
| AST | Abstract Syntax Tree | 抽象语法树 |
| DSL | Domain-Specific Language | 领域特定语言 |
| CMS | Content Management System | 内容管理系统 |
| CDN | Content Delivery Network | 内容分发网络 |
| OO | Object-Oriented | 面向对象 |
| MVC | Model View Controller | 模型-视图-控制器 |
| PWA | Progressive Web App | 渐进式 Web 应用 |
| SPA | Single Page Application | 单页应用 |
| SSR | Server-Side Rendering | 服务端渲染 |
| SSG | Static Site Generation | 静态站点生成 |
| MVP | Minimum Viable Product | 最小可行产品 |
| KPI | Key Performance Indicator | 关键性能指标 |
| SLA | Service Level Agreement | 服务水平协议 |
| SLO | Service Level Objective | 服务水平目标 |
| SLA | Service Level Agreement | 服务水平协议 |
| AB | A/B | A/B 测试 |
| QA | Quality Assurance | 质量保证 |
| QC | Quality Control | 质量控制 |
| VCS | Version Control System | 版本控制系统 |
| SCM | Source Code Management | 源码管理 |
| COTS | Commercial Off-The-Shelf | 商业现成 |
| OSS | Open Source Software | 开源软件 |
| SaaS | Software as a Service | 软件即服务 |
| PaaS | Platform as a Service | 平台即服务 |
| IaaS | Infrastructure as a Service | 基础设施即服务 |
| FaaS | Function as a Service | 函数即服务 |
| BaaS | Backend as a Service | 后端即服务 |
| DBaaS | Database as a Service | 数据库即服务 |
| ML | Machine Learning | 机器学习 |
| DL | Deep Learning | 深度学习 |
| RL | Reinforcement Learning | 强化学习 |
| NLP | Natural Language Processing | 自然语言处理 |
| CV | Computer Vision | 计算机视觉 |
| NLU | Natural Language Understanding | 自然语言理解 |
| ASR | Automatic Speech Recognition | 自动语音识别 |
| TTS | Text To Speech | 文字转语音 |
| OCR | Optical Character Recognition | 光学字符识别 |
| RLHF | Reinforcement Learning from Human Feedback | 人类反馈强化学习 |
| SFT | Supervised Fine-Tuning | 监督微调 |
| PT | Pre-Training | 预训练 |
| FT | Fine-Tuning | 微调 |
| RAG | Retrieval-Augmented Generation | 检索增强生成 |
| RL | Reinforcement Learning | 强化学习 |
| DPO | Direct Preference Optimization | 直接偏好优化 |
| PPO | Proximal Policy Optimization | 近端策略优化 |
| LoRA | Low-Rank Adaptation | 低秩自适应 |
| PEFT | Parameter-Efficient Fine-Tuning | 参数高效微调 |
| MoE | Mixture of Experts | 专家混合 |
70+ 缩略语。
还在补充¶
本文档持续更新中。新发现的术语会加入。