# 刘耀文 > 刘耀文个人网站,聚焦技术分享、项目展示与成长记录,涵盖前端开发、人工智能、个人作品集等内容,致力于打造专业、有温度的开发者主页。 ## Posts - [Uber 如何在 Agent 请求增长 9.4 倍后稳住 AI 成本](https://liuyaowen.cn/posts/agent-llm-engineering/uber-agent-cost-engineering-9-4x-requests): Uber 的 Agent 周请求量在半年内增长 9.4 倍,总体 AI 支出却从 4 月起相对稳定。本文拆解其模型路由、上下文压缩、Prompt Cache、MCP 工具按需加载、Code Mode 和 Managed Agent 成本治理方法。 - [MyBatis foreach 遍历 Pair 报错:为什么 item 会变成 String?](https://liuyaowen.cn/posts/databases-storage/mybatis-foreach-pair-map-entry-item-string): MyBatis 使用 foreach 遍历 Apache Commons Lang Pair 时,为什么 item 会变成 String 并出现 no getter 异常?本文结合 ForEachSqlNode 对 Map.Entry 的特殊处理解释原因,并给出直接修复和参数对象方案。 - [为什么我做了 DSHX:给 DeepSeek Harness 补一套插件开发工作流](https://liuyaowen.cn/posts/agent-llm-engineering/dshx-deepseek-harness-plugin-toolchain): DSHX 是一套面向 DeepSeek Harness 的插件开发工具链。本文复盘它如何从 Vite 插件演进为覆盖 Host/Client、Typed API、真实 Profile 调试、兼容性诊断和 Framework Hub 的完整工作流。 - [MCP 正在补上的一块拼图:Skills Over MCP](https://liuyaowen.cn/posts/agent-llm-engineering/skills-over-mcp-sep-2640): Skills Over MCP 是什么?本文拆解 SEP-2640 如何基于 MCP Resources 分发 Agent Skills,并解析 skills/list、skills/get、渐进式加载、完整性校验与 Prompt Injection 安全边界。 - [Agent Runtime 系列(十六):Demo:实现一个可恢复、可投影、可插件化的 Agent Web Runtime](https://liuyaowen.cn/posts/agent-llm-engineering/recoverable-projectable-plugin-agent-web-runtime-demo) - [Agent Runtime 系列(十五):DeepSeek Harness 的插件化 UI:Slot、Hook、Props 与 React](https://liuyaowen.cn/posts/agent-llm-engineering/deepseek-harness-plugin-ui-slots-react) - [Agent Runtime 系列(十四):Agent UI 的状态从哪里来:Event、Projection 与 Client Runtime](https://liuyaowen.cn/posts/agent-llm-engineering/agent-ui-event-projection-client-runtime) - [Agent Runtime 系列(十三):Agent 进入 Web 后,Session、Run 和连接应该怎么分离](https://liuyaowen.cn/posts/agent-llm-engineering/agent-web-session-run-connection-lifecycle) - [Agent Runtime 系列(十二):Demo:实现一个会随依赖变化自动启停的 Plugin Runtime](https://liuyaowen.cn/posts/agent-llm-engineering/dynamic-plugin-runtime-dependency-lifecycle-demo) - [Agent Runtime 系列(十一):Cordis 与 DeepSeek Harness:插件卸载以后,依赖链如何重新稳定](https://liuyaowen.cn/posts/agent-llm-engineering/cordis-dependency-chain-lifecycle-reconciliation) - [Agent Runtime 系列(十):时空可组合性:动态插件系统如何处理副作用与依赖](https://liuyaowen.cn/posts/agent-llm-engineering/spatiotemporal-composability-plugin-effects-dependencies) - [Agent Runtime 系列(九):Agent Core 为什么会越来越重:从 Pi Extension 看 Harness 的扩展边界](https://liuyaowen.cn/posts/agent-llm-engineering/pi-extension-harness-core-boundary) - [Agent Runtime 系列(六):Pi Session Tree:一份 JSONL 如何保存分支、Compaction 与当前 Context](https://liuyaowen.cn/posts/agent-llm-engineering/pi-session-tree-jsonl-branch-compaction-context) - [Agent Runtime 系列(八):Demo:实现一个可以 Crash Recovery 的 Agent Session](https://liuyaowen.cn/posts/agent-llm-engineering/agent-session-crash-recovery-demo) - [Agent Runtime 系列(七):DeepSeek Harness 为什么把 Session 做成 Event Log](https://liuyaowen.cn/posts/agent-llm-engineering/deepseek-harness-session-event-log) - [Agent Runtime 系列(五):Agent 的会话应该保存什么:Session、Message、Event 与 Context](https://liuyaowen.cn/posts/agent-llm-engineering/agent-session-message-event-context) - [Agent Runtime 系列(四):Agent 如何接受执行中的新输入:Steer、Follow-up、Inject 与 Inbox](https://liuyaowen.cn/posts/agent-llm-engineering/agent-input-delivery-steer-follow-up-inject-inbox) - [Agent Runtime 系列(三):Pi Agent Loop 源码:一次 Prompt 如何经过 Model、Tool 和下一轮决策](https://liuyaowen.cn/posts/agent-llm-engineering/pi-agent-loop-prompt-model-tool-decision) - [Agent Runtime 系列(二):Agent 为什么需要多层生命周期:Session、Run、Turn 与 Step](https://liuyaowen.cn/posts/agent-llm-engineering/agent-lifecycle-session-run-turn-step) - [Agent Runtime 系列(一):从 Vercel AI SDK、Pi 到 DeepSeek Harness:Agent Runtime 的边界](https://liuyaowen.cn/posts/agent-llm-engineering/agent-runtime-boundary) - [「spring 源码系列」Spring ASM 字节码处理机制](https://liuyaowen.cn/posts/jvm-runtime/spring-asm-bytecode-processing-mechanism) - [读《LobeHub 性能与 DX 优化》:把成本从每次渲染挪到只发生一次](https://liuyaowen.cn/posts/web-typescript/lobehub-performance-dx-optimization-analysis): 对 innei《LobeHub 性能与 DX 优化》一文的分析。把里面散落的具体改动归纳成一个框架:四类成本 × 成本位置转移。高频基础能力静态化、低频交互能力延迟挂载、高频返回页面有选择地保留状态。 - [Spring Boot ConfigData 源码解析:配置资源发现、激活上下文、Profile 推导、递归 Import 与 ContributorIterator 后序遍历](https://liuyaowen.cn/posts/java-spring/spring-boot-config-data): 以 Spring Boot 2.7.18 为基线,沿 ConfigDataEnvironment.processAndApply() 的真实链路,拆解 ConfigData 体系中的 resolve/load/bind/active/apply 五动作、三次 BEFORE/AFTER 处理、不动点 import 展开、Profile 与 CloudPlatform 激活条件、Contributor Tree 的不可变替换与 ContributorIterator 后序 DFS。 - [HTTP 1.1、HTTP 2 与 HTTP 3:把三次协议演进串起来](https://liuyaowen.cn/posts/network-io/http-evolution-1-1-2-3): 从 HTTP/1.1 的队头阻塞,到 HTTP/2 的多路复用和 HPACK,再到 HTTP/3 基于 QUIC 的彻底重写。把三次协议演进的关键改动串起来。 - [Java 虚拟线程如何与网络 I/O 协作:Carrier、Continuation 与 Poller](https://liuyaowen.cn/posts/jvm-runtime/java-virtual-threads-network-io-carrier-continuation-poller) - [我的 TypeScript 全栈技术栈取舍:SSR、SPA 与 API 的边界](https://liuyaowen.cn/posts/web-typescript/typescript-fullstack-ssr-spa-api-boundary) - [为什么 Vite、Webpack、Rspack 能实现 @ 别名](https://liuyaowen.cn/posts/engineering-toolchain/vite-webpack-rspack) - [Node.js ESM 模块解析算法理解](https://liuyaowen.cn/posts/web-typescript/node-js-esm) - [从 C++ 到 Rust、Go:把主流编译流程真正串起来](https://liuyaowen.cn/posts/algorithms-computer-science/c-rust-go) - [Spring 6 循环依赖与早期代理:三级缓存的真实边界](https://liuyaowen.cn/posts/java-spring/spring) - [# 从 Linux 网络到 Kubernetes 网络:彻底理解 Pod 是如何通信的](https://liuyaowen.cn/posts/cloud-native-infrastructure/linux-kubernetes-pod) - [一键配置高效终端:zsh + Oh My Zsh + powerlevel10k(零配置上手)](https://liuyaowen.cn/posts/engineering-toolchain/one-click-setup-zsh-oh-my-zsh-powerlevel10k) - [不想再用 puppeteer 了,我写了个 Markdown 渲染引擎](https://liuyaowen.cn/posts/projects-practice/markdown-rendering-engine-alternative-puppeteer) - [Claude 风格的流式 UI,到底是怎么做出来的](https://liuyaowen.cn/posts/web-typescript/20260317) - [图像生成怎么突然把“写字”这件事做对了?](https://liuyaowen.cn/posts/ai-machine-learning/20260314) - [把经验写进仓库:关于 Skills 的一些想法](https://liuyaowen.cn/posts/agent-llm-engineering/experience-skills-thoughts) - [给 OpenClaw 装上眼睛:ARM64 服务器无头浏览器实战指南](https://liuyaowen.cn/posts/cloud-native-infrastructure/openclaw-arm64-1772639270) - [xMemory:超越RAG的智能体记忆](https://liuyaowen.cn/posts/agent-llm-engineering/xmemory-intelligent-agent-memory-beyond-rag) - [认知红利:工作前几年如何真正拉开差距](https://liuyaowen.cn/posts/codenotes/20260123) - [Seata 2.6.0 AT 分布式事务:从部署、接入到故障边界](https://liuyaowen.cn/posts/distributed-systems/20251217) - [Koupleless 合并部署完整教程](https://liuyaowen.cn/posts/distributed-systems/20251216) - [Java 21+ 虚拟线程:适用场景、调度边界与迁移方法](https://liuyaowen.cn/posts/jvm-runtime/20251023) - [MyBatis 3.5 源码手记:执行器、动态 SQL 与缓存边界](https://liuyaowen.cn/posts/databases-storage/20250906) - [Spring 6 与 MyBatis 3.5 工具类:安全使用与版本边界](https://liuyaowen.cn/posts/java-spring/20250818) - [Java Stream 业务操作手册:现代写法与性能边界](https://liuyaowen.cn/posts/java-spring/20250813) - [Spring Cloud Bootstrap 与 Config Data:历史机制、现代迁移和源码边界](https://liuyaowen.cn/posts/java-spring/202507241) - [《Dispersive Loss:重新审视表征学习中的对比损失》](https://liuyaowen.cn/posts/ai-machine-learning/202506162) - [构建LLM代理:为什么“多代理”架构往往是坑?](https://liuyaowen.cn/posts/agent-llm-engineering/202506131) - [Beyond the Blur: A Deep Dive into a Custom SVG Glass Effect vs. Apple's Liquid Glass](https://liuyaowen.cn/posts/web-typescript/202506121) - [Kotlin 备忘录](https://liuyaowen.cn/posts/java-spring/202506091) ## Notes - [时光的雕刻](https://liuyaowen.cn/notes/2025/4/11/time-carving): 时光如同一位隐形的艺术家,在生命中描绘独特风景。童年充满快乐无拘束,但时间渐渐埋葬童真。追求成功却发现内心平静才是人生意义。放下过去焦虑,珍惜每一次感动。痛苦美丽成长催化剂,用语言音乐表达内心世界。时光雕刻留下痕迹,代表经历成长智慧。人生意义不在光环而在享受每一瞬间创造精彩人生。时光永恒雕刻师在生命石板上刻下人生之歌。 - [为什么我们要删掉 100% 的 useEffect](https://liuyaowen.cn/notes/2025/4/7/why-we-delete-all-useeffect): This article provides a detailed guide on how to say goodbye to useEffect in React. It explains the problems with useEffect and introduces the useUnmountedRef hook as a better alternative. The author also discusses the useCleanupEffect custom hook and explains how to use it effectively. The article offers useful insights for React developers looking to improve their code quality and efficiency. - [shiro 备忘](https://liuyaowen.cn/notes/2024/8/20/shiro-notes): Shiro升级中解决TMDB请求无法访问的问题的方法,包括通过添加代理或利用CloudFlare中的worker进行请求代理并绑定自定义域名的步骤。详细内容包括注册域名、转移到CloudFlare、创建worker、绑定域名、设置反向代理等操作。最终解决跨域访问的问题,使得可以愉快地使用TMDB的LinkCard组件。 - [LeetCode [394] 字符串解码](https://liuyaowen.cn/notes/2024/8/20/leetcode-394-decode-string): 给定一个经过编码的字符串,返回它解码后的字符串。编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。输入字符串总是有效的,没有额外的空格,输入的方括号总是符合格式要求的。原始数据不包含数字,所有的数字只表示重复的次数 k。遍历输入字符串的每个字符,根据字符的情况进行不同的操作:1. 如果是数字,更新重复次数repeat_count。2. 如果是左括号,入栈。3. 如果是右括号,出栈并重复字符串。4. 如果是字母,加入解码字符串中。最终栈中存放的即为解码后的字符串。 ## Pages - [GPT 记忆中的我](https://liuyaowen.cn/me-in-gpt-memory) - [关于本站](https://liuyaowen.cn/about-site) - [留言](https://liuyaowen.cn/message)