[{"data":1,"prerenderedAt":7267},["ShallowReactive",2],{"site-navigation-docs":3,"page-docs-/document/ai-security/advanced/mcp-security":2945,"surround-docs-/document/ai-security/advanced/mcp-security":7262},{"collection":4,"items":5},"docs",[6],{"title":7,"path":8,"stem":9,"children":10,"page":44},"Document","/document","document",[11,45,107,134,186,242,281,312,327,362,401,428,462,497,524,548,572,604,639,670,701,733,770,802,838,868,903,939,975,1014,1084,1172,1204,1235,1266,1294,1371,1411,1443,1483,1520,1552,1584,1681,1767,1840,1898,2040,2094,2133,2202,2256,2330,2401,2441,2499,2561,2620,2675,2742,2789,2835,2881],{"title":12,"path":13,"stem":14,"children":15,"page":44},"Html5","/document/html5","document/01.html5",[16],{"title":17,"path":18,"stem":19,"children":20,"icon":43},"指南","/document/html5/guide","document/01.html5/01.guide/01.index",[21,23,27,31,35,39],{"title":22,"path":18,"stem":19},"HTML 入门教程",{"title":24,"path":25,"stem":26},"常用标签详解","/document/html5/guide/tag","document/01.html5/01.guide/02.tag",{"title":28,"path":29,"stem":30},"布局与语义标签","/document/html5/guide/layout","document/01.html5/01.guide/03.layout",{"title":32,"path":33,"stem":34},"表单设计与用户输入","/document/html5/guide/form","document/01.html5/01.guide/04.form",{"title":36,"path":37,"stem":38},"多媒体与 HTML5 新特性","/document/html5/guide/html5","document/01.html5/01.guide/05.html5",{"title":40,"path":41,"stem":42},"Web 标准与 HTML 编写规范","/document/html5/guide/web","document/01.html5/01.guide/06.web","i-lucide-code",false,{"title":46,"path":47,"stem":48,"children":49,"page":44},"Css","/document/css","document/02.css",[50,69,94],{"title":51,"path":52,"stem":53,"children":54,"icon":44},"启航","/document/css/guide","document/02.css/01.guide/01.index",[55,57,61,65],{"title":56,"path":52,"stem":53},"CSS 基础入门教程",{"title":58,"path":59,"stem":60},"文本与盒子样式详解","/document/css/guide/styles","document/02.css/01.guide/02.styles",{"title":62,"path":63,"stem":64},"选择器与权重机制","/document/css/guide/selected","document/02.css/01.guide/03.selected",{"title":66,"path":67,"stem":68},"盒模型详解","/document/css/guide/box","document/02.css/01.guide/04.box",{"title":70,"icon":44,"path":71,"stem":72,"children":73,"page":44},"布局","/document/css/layout","document/02.css/02.layout",[74,78,82,86,90],{"title":75,"path":76,"stem":77},"网页布局三剑客详解","/document/css/layout/policy","document/02.css/02.layout/01.policy",{"title":79,"path":80,"stem":81},"Position 定位详解","/document/css/layout/position","document/02.css/02.layout/02.position",{"title":83,"path":84,"stem":85},"Flexbox 布局入门指南","/document/css/layout/flex","document/02.css/02.layout/03.flex",{"title":87,"path":88,"stem":89},"Grid 布局入门指南","/document/css/layout/grid","document/02.css/02.layout/04.grid",{"title":91,"path":92,"stem":93},"响应式设计指南","/document/css/layout/relative","document/02.css/02.layout/05.relative",{"title":95,"icon":44,"path":96,"stem":97,"children":98,"page":44},"使用技巧","/document/css/skill","document/02.css/03.skill",[99,103],{"title":100,"path":101,"stem":102},"CSS 动画全解析","/document/css/skill/animation","document/02.css/03.skill/01.animation",{"title":104,"path":105,"stem":106},"CSS 使用技巧全攻略","/document/css/skill/skill","document/02.css/03.skill/02.skill",{"title":108,"path":109,"stem":110,"children":111,"page":44},"Git","/document/git","document/03.git",[112],{"title":51,"path":113,"stem":114,"children":115,"icon":44},"/document/git/guide","document/03.git/01.guide/01.index",[116,118,122,126,130],{"title":117,"path":113,"stem":114},"Git 入门指南",{"title":119,"path":120,"stem":121},"Git 安装与初体验","/document/git/guide/install","document/03.git/01.guide/02.install",{"title":123,"path":124,"stem":125},"常用 Git 命令详解","/document/git/guide/command","document/03.git/01.guide/03.command",{"title":127,"path":128,"stem":129},"Git 分支管理全解析","/document/git/guide/branch","document/03.git/01.guide/04.branch",{"title":131,"path":132,"stem":133},"使用 GitHub 轻松托管和管理代码","/document/git/guide/github","document/03.git/01.guide/05.github",{"title":135,"path":136,"stem":137,"children":138,"page":44},"Js Base","/document/js-base","document/04.js-base",[139,169],{"title":17,"path":140,"stem":141,"children":142,"icon":43},"/document/js-base/guide","document/04.js-base/01.guide/01.index",[143,145,149,153,157,161,165],{"title":144,"path":140,"stem":141},"JavaScript 基础快速入门",{"title":146,"path":147,"stem":148},"搞懂变量与数据类型","/document/js-base/guide/variable","document/04.js-base/01.guide/02.variable",{"title":150,"path":151,"stem":152},"JavaScript 运算符详解","/document/js-base/guide/operator","document/04.js-base/01.guide/03.operator",{"title":154,"path":155,"stem":156},"条件判断与循环语句","/document/js-base/guide/flow","document/04.js-base/01.guide/04.flow",{"title":158,"path":159,"stem":160},"深入理解 JavaScript 函数","/document/js-base/guide/function","document/04.js-base/01.guide/05.function",{"title":162,"path":163,"stem":164},"对象数组的创建与操作","/document/js-base/guide/object","document/04.js-base/01.guide/06.object",{"title":166,"path":167,"stem":168},"Math 和 Date 用法详解","/document/js-base/guide/math","document/04.js-base/01.guide/07.math",{"title":170,"icon":43,"path":171,"stem":172,"children":173,"page":44},"浏览器","/document/js-base/browser","document/04.js-base/02.browser",[174,178,182],{"title":175,"path":176,"stem":177},"DOM 操作入门与实战","/document/js-base/browser/dom","document/04.js-base/02.browser/01.dom",{"title":179,"path":180,"stem":181},"浏览器 BOM 基础知识","/document/js-base/browser/bom","document/04.js-base/02.browser/02.bom",{"title":183,"path":184,"stem":185},"JavaScript 事件处理机制","/document/js-base/browser/event","document/04.js-base/02.browser/03.event",{"title":187,"path":188,"stem":189,"children":190,"page":44},"Js Advanced","/document/js-advanced","document/05.js-advanced",[191,210,228],{"title":192,"path":193,"stem":194,"children":195,"icon":43},"JavaScript 原理","/document/js-advanced/guide","document/05.js-advanced/01.guide/01.index",[196,198,202,206],{"title":197,"path":193,"stem":194},"JavaScript 是怎么运行的？",{"title":199,"path":200,"stem":201},"深入理解函数和作用域","/document/js-advanced/guide/function","document/05.js-advanced/01.guide/02.function",{"title":203,"path":204,"stem":205},"深入理解 this 指向","/document/js-advanced/guide/this","document/05.js-advanced/01.guide/03.this",{"title":207,"path":208,"stem":209},"浅拷贝与深拷贝详解","/document/js-advanced/guide/copy","document/05.js-advanced/01.guide/04.copy",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":44},"编程范式","i-lucide-shapes","/document/js-advanced/program","document/05.js-advanced/02.program",[216,220,224],{"title":217,"path":218,"stem":219},"面向对象编程（OOP）","/document/js-advanced/program/object","document/05.js-advanced/02.program/01.object",{"title":221,"path":222,"stem":223},"函数式编程入门","/document/js-advanced/program/fp","document/05.js-advanced/02.program/02.fp",{"title":225,"path":226,"stem":227},"防抖和节流详解","/document/js-advanced/program/debounce","document/05.js-advanced/02.program/03.debounce",{"title":229,"icon":230,"path":231,"stem":232,"children":233,"page":44},"浏览器相关特性","i-lucide-monitor","/document/js-advanced/browser","document/05.js-advanced/03.browser",[234,238],{"title":235,"path":236,"stem":237},"浏览器缓存入门指南","/document/js-advanced/browser/cache","document/05.js-advanced/03.browser/01.cache",{"title":239,"path":240,"stem":241},"Web 存储机制深度剖析","/document/js-advanced/browser/storage","document/05.js-advanced/03.browser/02.storage",{"title":243,"path":244,"stem":245,"children":246,"page":44},"Es6","/document/es6","document/06.es6",[247],{"title":192,"path":248,"stem":249,"children":250,"icon":43},"/document/es6/guide","document/06.es6/01.guide/01.index",[251,253,257,261,265,269,273,277],{"title":252,"path":248,"stem":249},"ES6 入门指南",{"title":254,"path":255,"stem":256},"变量声明：let 与 const","/document/es6/guide/const","document/06.es6/01.guide/02.const",{"title":258,"path":259,"stem":260},"箭头函数的用法与特点","/document/es6/guide/arrow","document/06.es6/01.guide/03.arrow",{"title":262,"path":263,"stem":264},"字符串、对象与数组的新特性","/document/es6/guide/enhance","document/06.es6/01.guide/04.enhance",{"title":266,"path":267,"stem":268},"Map 和 Set 的使用方式","/document/es6/guide/set","document/06.es6/01.guide/05.set",{"title":270,"path":271,"stem":272},"Promise 实现异步流程控制","/document/es6/guide/promise","document/06.es6/01.guide/06.promise",{"title":274,"path":275,"stem":276},"ESM 模块化语法解析","/document/es6/guide/esm","document/06.es6/01.guide/07.esm",{"title":278,"path":279,"stem":280},"Class 的定义与继承机制","/document/es6/guide/class","document/06.es6/01.guide/08.class",{"title":282,"path":283,"stem":284,"children":285,"page":44},"Js Algorithms","/document/js-algorithms","document/07.js-algorithms",[286],{"title":17,"path":287,"stem":288,"children":289,"icon":43},"/document/js-algorithms/guide","document/07.js-algorithms/01.guide/01.index",[290,292,296,300,304,308],{"title":291,"path":287,"stem":288},"什么是数据结构和算法？",{"title":293,"path":294,"stem":295},"时间和空间复杂度","/document/js-algorithms/guide/complexity","document/07.js-algorithms/01.guide/02.complexity",{"title":297,"path":298,"stem":299},"数据结构","/document/js-algorithms/guide/structure","document/07.js-algorithms/01.guide/03.structure",{"title":301,"path":302,"stem":303},"算法","/document/js-algorithms/guide/algorithms","document/07.js-algorithms/01.guide/04.algorithms",{"title":305,"path":306,"stem":307},"算法思想","/document/js-algorithms/guide/heuristic","document/07.js-algorithms/01.guide/05.heuristic",{"title":309,"path":310,"stem":311},"深度优先与广度优先搜索","/document/js-algorithms/guide/search","document/07.js-algorithms/01.guide/06.search",{"title":313,"path":314,"stem":315,"children":316,"page":44},"Automation","/document/automation","document/08.automation",[317],{"title":17,"path":318,"stem":319,"children":320,"icon":43},"/document/automation/guide","document/08.automation/01.guide/01.index",[321,323],{"title":322,"path":318,"stem":319},"什么是前端工程化？",{"title":324,"path":325,"stem":326},"开始搭建工程化项目","/document/automation/guide/start","document/08.automation/01.guide/02.start",{"title":328,"path":329,"stem":330,"children":331,"page":44},"Webpack","/document/webpack","document/09.webpack",[332],{"title":17,"path":333,"stem":334,"children":335,"icon":43},"/document/webpack/guide","document/09.webpack/01.guide/01.index",[336,338,342,346,350,354,358],{"title":337,"path":333,"stem":334},"Webpack 初识",{"title":339,"path":340,"stem":341},"搭建 Webpack 项目","/document/webpack/guide/start","document/09.webpack/01.guide/02.start",{"title":343,"path":344,"stem":345},"Loader 加载器","/document/webpack/guide/loader","document/09.webpack/01.guide/03.loader",{"title":347,"path":348,"stem":349},"Plugin 插件","/document/webpack/guide/plugin","document/09.webpack/01.guide/04.plugin",{"title":351,"path":352,"stem":353},"HMR 热更新与开发模式","/document/webpack/guide/dev","document/09.webpack/01.guide/05.dev",{"title":355,"path":356,"stem":357},"性能优化配置","/document/webpack/guide/optimize","document/09.webpack/01.guide/06.optimize",{"title":359,"path":360,"stem":361},"webpack 生产环境构建全攻略","/document/webpack/guide/production","document/09.webpack/01.guide/07.production",{"title":363,"path":364,"stem":365,"children":366,"page":44},"Scss","/document/scss","document/10.scss",[367],{"title":17,"path":368,"stem":369,"children":370,"icon":43},"/document/scss/guide","document/10.scss/01.guide/01.index",[371,373,377,381,385,389,393,397],{"title":372,"path":368,"stem":369},"什么是 SCSS？",{"title":374,"path":375,"stem":376},"SCSS 入门语法基础","/document/scss/guide/syntax","document/10.scss/01.guide/02.syntax",{"title":378,"path":379,"stem":380},"开始编写 Scss 项目","/document/scss/guide/start","document/10.scss/01.guide/03.start",{"title":382,"path":383,"stem":384},"Scss 模块导入方式","/document/scss/guide/import","document/10.scss/01.guide/04.import",{"title":386,"path":387,"stem":388},"Mixin 与函数详解","/document/scss/guide/mixin","document/10.scss/01.guide/05.mixin",{"title":390,"path":391,"stem":392},"Scss 继承、占位符技巧","/document/scss/guide/extend","document/10.scss/01.guide/06.extend",{"title":394,"path":395,"stem":396},"SCSS 流程控制与逻辑语法","/document/scss/guide/flow","document/10.scss/01.guide/07.flow",{"title":398,"path":399,"stem":400},"SCSS 内置函数","/document/scss/guide/function","document/10.scss/01.guide/08.function",{"title":402,"path":403,"stem":404,"children":405,"page":44},"Eslint","/document/eslint","document/11.eslint",[406],{"title":17,"path":407,"stem":408,"children":409,"icon":43},"/document/eslint/guide","document/11.eslint/01.guide/01.index",[410,412,416,420,424],{"title":411,"path":407,"stem":408},"ESLint 是什么？",{"title":413,"path":414,"stem":415},"ESLint 安装与运行详解","/document/eslint/guide/install","document/11.eslint/01.guide/02.install",{"title":417,"path":418,"stem":419},"ESLint  规则介绍","/document/eslint/guide/rule","document/11.eslint/01.guide/03.rule",{"title":421,"path":422,"stem":423},"集成 ESLint 到 Webpack","/document/eslint/guide/webpack","document/11.eslint/01.guide/04.webpack",{"title":425,"path":426,"stem":427},"Plugins 和 Extends 使用","/document/eslint/guide/plugins","document/11.eslint/01.guide/05.plugins",{"title":429,"path":430,"stem":431,"children":432,"page":44},"Axios","/document/axios","document/12.axios",[433,443],{"title":17,"path":434,"stem":435,"children":436,"icon":43},"/document/axios/guide","document/12.axios/01.guide/01.index",[437,439],{"title":438,"path":434,"stem":435},"HTTP 协议与网络请求",{"title":440,"path":441,"stem":442},"使用 JavaScript 发起请求","/document/axios/guide/get","document/12.axios/01.guide/02.get",{"title":444,"path":445,"stem":446,"children":447,"icon":43},"axios 插件","/document/axios/axios","document/12.axios/02.axios/01.index",[448,450,454,458],{"title":449,"path":445,"stem":446},"Axios 入门",{"title":451,"path":452,"stem":453},"Axios 请求基础全面讲解","/document/axios/axios/start","document/12.axios/02.axios/02.start",{"title":455,"path":456,"stem":457},"Axios 高级使用技巧","/document/axios/axios/advenced","document/12.axios/02.axios/03.advenced",{"title":459,"path":460,"stem":461},"CORS 跨域解决方案","/document/axios/axios/cors","document/12.axios/02.axios/04.cors",{"title":463,"path":464,"stem":465,"children":466,"page":44},"Typescript","/document/typescript","document/13.typescript",[467],{"title":17,"path":468,"stem":469,"children":470,"icon":43},"/document/typescript/guide","document/13.typescript/01.guide/01.index",[471,473,477,481,485,489,493],{"title":472,"path":468,"stem":469},"TypeScript 简介与入门",{"title":474,"path":475,"stem":476},"类型系统基础","/document/typescript/guide/base","document/13.typescript/01.guide/02.base",{"title":478,"path":479,"stem":480},"类型组合与类型保护","/document/typescript/guide/compose","document/13.typescript/01.guide/03.compose",{"title":482,"path":483,"stem":484},"类与面向对象编程","/document/typescript/guide/class","document/13.typescript/01.guide/04.class",{"title":486,"path":487,"stem":488},"泛型与类型复用","/document/typescript/guide/generic","document/13.typescript/01.guide/05.generic",{"title":490,"path":491,"stem":492},"项目进阶与配置实战","/document/typescript/guide/config","document/13.typescript/01.guide/06.config",{"title":494,"path":495,"stem":496},"第三方库类型支持与声明","/document/typescript/guide/declare","document/13.typescript/01.guide/07.declare",{"title":498,"path":499,"stem":500,"children":501,"page":44},"Vue2","/document/vue2","document/14.vue2",[502],{"title":17,"path":503,"stem":504,"children":505,"icon":43},"/document/vue2/guide","document/14.vue2/01.guide/01.index",[506,508,512,516,520],{"title":507,"path":503,"stem":504},"Vue 2 入门与安装",{"title":509,"path":510,"stem":511},"模板语法与指令详解","/document/vue2/guide/directive","document/14.vue2/01.guide/02.directive",{"title":513,"path":514,"stem":515},"组件化开发基础","/document/vue2/guide/component","document/14.vue2/01.guide/03.component",{"title":517,"path":518,"stem":519},"计算属性与监听器","/document/vue2/guide/reactive","document/14.vue2/01.guide/04.reactive",{"title":521,"path":522,"stem":523},"生命周期钩子解析","/document/vue2/guide/hooks","document/14.vue2/01.guide/05.hooks",{"title":525,"path":526,"stem":527,"children":528,"page":44},"Router","/document/router","document/15.router",[529],{"title":530,"path":531,"stem":532,"children":533,"icon":43},"Vue Router 路由","/document/router/guide","document/15.router/01.guide/01.index",[534,536,540,544],{"title":535,"path":531,"stem":532},"Vue Router 入门",{"title":537,"path":538,"stem":539},"路由核心功能详解","/document/router/guide/routing","document/15.router/01.guide/02.routing",{"title":541,"path":542,"stem":543},"路由守卫钩子和元信息","/document/router/guide/hook","document/15.router/01.guide/03.hook",{"title":545,"path":546,"stem":547},"路由优化与懒加载","/document/router/guide/optimize","document/15.router/01.guide/04.optimize",{"title":549,"path":550,"stem":551,"children":552,"page":44},"Vuex","/document/vuex","document/16.vuex",[553],{"title":554,"path":555,"stem":556,"children":557,"icon":43},"Vuex 状态管理器","/document/vuex/guide","document/16.vuex/01.guide/01.index",[558,560,564,568],{"title":559,"path":555,"stem":556},"为什么要使用 Vuex？",{"title":561,"path":562,"stem":563},"快速上手 Vuex","/document/vuex/guide/start","document/16.vuex/01.guide/02.start",{"title":565,"path":566,"stem":567},"深入理解 Vuex 核心功能","/document/vuex/guide/core","document/16.vuex/01.guide/03.core",{"title":569,"path":570,"stem":571},"模块化与进阶用法","/document/vuex/guide/module","document/16.vuex/01.guide/04.module",{"title":573,"path":574,"stem":575,"children":576,"page":44},"Element Ui","/document/element-ui","document/17.element-ui",[577],{"title":578,"path":579,"stem":580,"children":581,"icon":43},"Element UI 组件库","/document/element-ui/guide","document/17.element-ui/01.guide/01.index",[582,584,588,592,596,600],{"title":583,"path":579,"stem":580},"Element UI 初体验",{"title":585,"path":586,"stem":587},"常用组件快速上手","/document/element-ui/guide/quickstart","document/17.element-ui/01.guide/02.quickstart",{"title":589,"path":590,"stem":591},"布局与结构类组件","/document/element-ui/guide/layout","document/17.element-ui/01.guide/03.layout",{"title":593,"path":594,"stem":595},"自定义组件样式","/document/element-ui/guide/style","document/17.element-ui/01.guide/04.style",{"title":597,"path":598,"stem":599},"组件封装与复用","/document/element-ui/guide/component","document/17.element-ui/01.guide/05.component",{"title":601,"path":602,"stem":603},"自定义主题色与深色模式","/document/element-ui/guide/theme","document/17.element-ui/01.guide/06.theme",{"title":605,"path":606,"stem":607,"children":608,"page":44},"Vue3","/document/vue3","document/18.vue3",[609],{"title":605,"path":610,"stem":611,"children":612,"icon":43},"/document/vue3/guide","document/18.vue3/01.guide/01.index",[613,615,619,623,627,631,635],{"title":614,"path":610,"stem":611},"Vue 3 概览与生态升级",{"title":616,"path":617,"stem":618},"组合式 API 入门指南","/document/vue3/guide/composition","document/18.vue3/01.guide/02.composition",{"title":620,"path":621,"stem":622},"组合式 API 逻辑抽离","/document/vue3/guide/composable","document/18.vue3/01.guide/03.composable",{"title":624,"path":625,"stem":626},"模板语法及新特性","/document/vue3/guide/features","document/18.vue3/01.guide/04.features",{"title":628,"path":629,"stem":630},"TypeScript 开发支持","/document/vue3/guide/typescript","document/18.vue3/01.guide/05.typescript",{"title":632,"path":633,"stem":634},"响应式系统原理与进阶 API","/document/vue3/guide/reactive","document/18.vue3/01.guide/06.reactive",{"title":636,"path":637,"stem":638},"Vue Router 4 路由实战","/document/vue3/guide/vue-router","document/18.vue3/01.guide/07.vue-router",{"title":640,"path":641,"stem":642,"children":643,"page":44},"Pinia","/document/pinia","document/19.pinia",[644],{"title":640,"path":645,"stem":646,"children":647,"icon":43},"/document/pinia/guide","document/19.pinia/01.guide/01.index",[648,650,654,658,662,666],{"title":649,"path":645,"stem":646},"Pinia 简介与安装",{"title":651,"path":652,"stem":653},"Store 三大核心","/document/pinia/guide/store","document/19.pinia/01.guide/02.store",{"title":655,"path":656,"stem":657},"在组件中使用 Store","/document/pinia/guide/usage","document/19.pinia/01.guide/03.usage",{"title":659,"path":660,"stem":661},"State 修改与响应式细节","/document/pinia/guide/state","document/19.pinia/01.guide/04.state",{"title":663,"path":664,"stem":665},"Action 与异步操作","/document/pinia/guide/action","document/19.pinia/01.guide/05.action",{"title":667,"path":668,"stem":669},"组合、TypeScript 与插件","/document/pinia/guide/advanced","document/19.pinia/01.guide/06.advanced",{"title":671,"path":672,"stem":673,"children":674,"page":44},"Vite","/document/vite","document/20.vite",[675],{"title":671,"path":676,"stem":677,"children":678,"icon":43},"/document/vite/guide","document/20.vite/01.guide/01.index",[679,681,685,689,693,697],{"title":680,"path":676,"stem":677},"Vite 简介与安装",{"title":682,"path":683,"stem":684},"基础配置","/document/vite/guide/config","document/20.vite/01.guide/02.config",{"title":686,"path":687,"stem":688},"常用插件","/document/vite/guide/plugins","document/20.vite/01.guide/03.plugins",{"title":690,"path":691,"stem":692},"环境变量与模式","/document/vite/guide/env","document/20.vite/01.guide/04.env",{"title":694,"path":695,"stem":696},"依赖预构建","/document/vite/guide/optimize-deps","document/20.vite/01.guide/05.optimize-deps",{"title":698,"path":699,"stem":700},"构建与部署","/document/vite/guide/build-deploy","document/20.vite/01.guide/06.build-deploy",{"title":702,"path":703,"stem":704,"children":705,"page":44},"Nuxt","/document/nuxt","document/21.nuxt",[706],{"title":707,"path":708,"stem":709,"children":710,"icon":43},"Nuxt.js","/document/nuxt/guide","document/21.nuxt/01.guide/01.index",[711,713,717,721,725,729],{"title":712,"path":708,"stem":709},"Nuxt.js 简介与安装",{"title":714,"path":715,"stem":716},"目录约定与自动导入","/document/nuxt/guide/directory-and-auto-imports","document/21.nuxt/01.guide/02.directory-and-auto-imports",{"title":718,"path":719,"stem":720},"文件路由与导航","/document/nuxt/guide/routing","document/21.nuxt/01.guide/03.routing",{"title":722,"path":723,"stem":724},"数据获取","/document/nuxt/guide/data-fetching","document/21.nuxt/01.guide/04.data-fetching",{"title":726,"path":727,"stem":728},"状态管理","/document/nuxt/guide/state-management","document/21.nuxt/01.guide/05.state-management",{"title":730,"path":731,"stem":732},"配置与部署","/document/nuxt/guide/config-and-deploy","document/21.nuxt/01.guide/06.config-and-deploy",{"title":734,"path":735,"stem":736,"children":737,"page":44},"Npm","/document/npm","document/22.npm",[738],{"title":739,"path":740,"stem":741,"children":742,"icon":769},"NPM","/document/npm/guide","document/22.npm/01.guide/01.index",[743,745,749,753,757,761,765],{"title":744,"path":740,"stem":741},"NPM 入门",{"title":746,"path":747,"stem":748},"package.json 详解","/document/npm/guide/package-json","document/22.npm/01.guide/02.package-json",{"title":750,"path":751,"stem":752},"安装命令与版本","/document/npm/guide/install-commands","document/22.npm/01.guide/03.install-commands",{"title":754,"path":755,"stem":756},"scripts 与 npx","/document/npm/guide/scripts-and-npx","document/22.npm/01.guide/04.scripts-and-npx",{"title":758,"path":759,"stem":760},"发布包与镜像源","/document/npm/guide/publish-and-registry","document/22.npm/01.guide/05.publish-and-registry",{"title":762,"path":763,"stem":764},"lock 文件与清理","/document/npm/guide/lock-and-clean","document/22.npm/01.guide/06.lock-and-clean",{"title":766,"path":767,"stem":768},"Yarn 与 pnpm","/document/npm/guide/yarn-and-pnpm","document/22.npm/01.guide/07.yarn-and-pnpm","i-simple-icons-npm",{"title":771,"icon":772,"path":773,"stem":774,"children":775,"page":44},"Handlebars","i-simple-icons-handlebarsdotjs","/document/handlebars","document/23.handlebars",[776],{"title":777,"path":778,"stem":779,"children":780},"Handlebars 简介","/document/handlebars/guide","document/23.handlebars/01.guide/01.index",[781,782,786,790,794,798],{"title":777,"path":778,"stem":779},{"title":783,"path":784,"stem":785},"基本语法","/document/handlebars/guide/syntax","document/23.handlebars/01.guide/02.syntax",{"title":787,"path":788,"stem":789},"内置辅助函数","/document/handlebars/guide/builtins","document/23.handlebars/01.guide/03.builtins",{"title":791,"path":792,"stem":793},"模板复用","/document/handlebars/guide/partials","document/23.handlebars/01.guide/04.partials",{"title":795,"path":796,"stem":797},"自定义 Helpers","/document/handlebars/guide/helpers","document/23.handlebars/01.guide/05.helpers",{"title":799,"path":800,"stem":801},"预编译与运行时","/document/handlebars/guide/runtime","document/23.handlebars/01.guide/06.runtime",{"title":803,"icon":804,"path":805,"stem":806,"children":807,"page":44},"Plop","i-simple-icons-nodedotjs","/document/plop","document/24.plop",[808],{"title":809,"path":810,"stem":811,"children":812},"Plop 简介","/document/plop/guide","document/24.plop/01.guide/01.index",[813,814,818,822,826,830,834],{"title":809,"path":810,"stem":811},{"title":815,"path":816,"stem":817},"第一个生成器","/document/plop/guide/plopfile","document/24.plop/01.guide/02.plopfile",{"title":819,"path":820,"stem":821},"交互式询问","/document/plop/guide/prompts","document/24.plop/01.guide/03.prompts",{"title":823,"path":824,"stem":825},"核心动作","/document/plop/guide/actions","document/24.plop/01.guide/04.actions",{"title":827,"path":828,"stem":829},"模板文件组织","/document/plop/guide/templates","document/24.plop/01.guide/05.templates",{"title":831,"path":832,"stem":833},"Helper 扩展","/document/plop/guide/helpers","document/24.plop/01.guide/06.helpers",{"title":835,"path":836,"stem":837},"组件生成实战","/document/plop/guide/practice","document/24.plop/01.guide/07.practice",{"title":839,"icon":840,"path":841,"stem":842,"children":843,"page":44},"Rollup","i-simple-icons-rollupdotjs","/document/rollup","document/25.rollup",[844],{"title":845,"path":846,"stem":847,"children":848},"Rollup 简介","/document/rollup/guide","document/25.rollup/01.guide/01.index",[849,850,853,857,860,864],{"title":845,"path":846,"stem":847},{"title":682,"path":851,"stem":852},"/document/rollup/guide/config","document/25.rollup/01.guide/02.config",{"title":854,"path":855,"stem":856},"输出格式","/document/rollup/guide/formats","document/25.rollup/01.guide/03.formats",{"title":686,"path":858,"stem":859},"/document/rollup/guide/plugins","document/25.rollup/01.guide/04.plugins",{"title":861,"path":862,"stem":863},"Tree Shaking","/document/rollup/guide/tree-shaking","document/25.rollup/01.guide/05.tree-shaking",{"title":865,"path":866,"stem":867},"打包工具库实战","/document/rollup/guide/library","document/25.rollup/01.guide/06.library",{"title":869,"icon":804,"path":870,"stem":871,"children":872,"page":44},"Snabbdom","/document/snabbdom","document/26.snabbdom",[873],{"title":874,"path":875,"stem":876,"children":877},"Snabbdom 简介","/document/snabbdom/guide","document/26.snabbdom/01.guide/01.index",[878,879,883,887,891,895,899],{"title":874,"path":875,"stem":876},{"title":880,"path":881,"stem":882},"h 函数","/document/snabbdom/guide/h","document/26.snabbdom/01.guide/02.h",{"title":884,"path":885,"stem":886},"模块机制","/document/snabbdom/guide/modules","document/26.snabbdom/01.guide/03.modules",{"title":888,"path":889,"stem":890},"patch 渲染与更新","/document/snabbdom/guide/patch","document/26.snabbdom/01.guide/04.patch",{"title":892,"path":893,"stem":894},"key 的作用","/document/snabbdom/guide/key","document/26.snabbdom/01.guide/05.key",{"title":896,"path":897,"stem":898},"Diff 原理","/document/snabbdom/guide/diff","document/26.snabbdom/01.guide/06.diff",{"title":900,"path":901,"stem":902},"手写迷你虚拟 DOM","/document/snabbdom/guide/practice","document/26.snabbdom/01.guide/07.practice",{"title":904,"icon":905,"path":906,"stem":907,"children":908,"page":44},"Vercel","i-simple-icons-vercel","/document/vercel","document/27.vercel",[909],{"title":910,"path":911,"stem":912,"children":913},"Vercel 简介","/document/vercel/guide","document/27.vercel/01.guide/01.index",[914,915,919,923,927,931,935],{"title":910,"path":911,"stem":912},{"title":916,"path":917,"stem":918},"Vercel CLI","/document/vercel/guide/cli","document/27.vercel/01.guide/02.cli",{"title":920,"path":921,"stem":922},"项目设置与环境变量","/document/vercel/guide/settings","document/27.vercel/01.guide/03.settings",{"title":924,"path":925,"stem":926},"预览部署与回滚","/document/vercel/guide/preview","document/27.vercel/01.guide/04.preview",{"title":928,"path":929,"stem":930},"自定义域名","/document/vercel/guide/domain","document/27.vercel/01.guide/05.domain",{"title":932,"path":933,"stem":934},"vercel.json 配置","/document/vercel/guide/vercel-json","document/27.vercel/01.guide/06.vercel-json",{"title":936,"path":937,"stem":938},"Serverless Functions","/document/vercel/guide/serverless","document/27.vercel/01.guide/07.serverless",{"title":940,"icon":941,"path":942,"stem":943,"children":944,"page":44},"ECharts","i-simple-icons-apacheecharts","/document/echarts","document/28.echarts",[945],{"title":946,"path":947,"stem":948,"children":949},"ECharts 简介","/document/echarts/guide","document/28.echarts/01.guide/01.index",[950,951,955,959,963,967,971],{"title":946,"path":947,"stem":948},{"title":952,"path":953,"stem":954},"核心配置项","/document/echarts/guide/option","document/28.echarts/01.guide/02.option",{"title":956,"path":957,"stem":958},"常用图表类型","/document/echarts/guide/charts","document/28.echarts/01.guide/03.charts",{"title":960,"path":961,"stem":962},"样式与主题","/document/echarts/guide/style","document/28.echarts/01.guide/04.style",{"title":964,"path":965,"stem":966},"交互与事件","/document/echarts/guide/interaction","document/28.echarts/01.guide/05.interaction",{"title":968,"path":969,"stem":970},"动态数据","/document/echarts/guide/data","document/28.echarts/01.guide/06.data",{"title":972,"path":973,"stem":974},"Vue3 实战","/document/echarts/guide/vue","document/28.echarts/01.guide/07.vue",{"title":976,"icon":977,"path":978,"stem":979,"children":980,"page":44},"D3","i-simple-icons-d3dotjs","/document/d3","document/29.d3",[981],{"title":982,"path":983,"stem":984,"children":985},"D3 简介","/document/d3/guide","document/29.d3/01.guide/01.index",[986,987,991,995,999,1003,1007,1011],{"title":982,"path":983,"stem":984},{"title":988,"path":989,"stem":990},"选择集与数据绑定","/document/d3/guide/selection","document/29.d3/01.guide/02.selection",{"title":992,"path":993,"stem":994},"比例尺","/document/d3/guide/scale","document/29.d3/01.guide/03.scale",{"title":996,"path":997,"stem":998},"坐标轴","/document/d3/guide/axis","document/29.d3/01.guide/04.axis",{"title":1000,"path":1001,"stem":1002},"图形生成器","/document/d3/guide/shape","document/29.d3/01.guide/05.shape",{"title":1004,"path":1005,"stem":1006},"过渡动画","/document/d3/guide/transition","document/29.d3/01.guide/06.transition",{"title":1008,"path":1009,"stem":1010},"交互与缩放","/document/d3/guide/interaction","document/29.d3/01.guide/07.interaction",{"title":972,"path":1012,"stem":1013},"/document/d3/guide/vue","document/29.d3/01.guide/08.vue",{"title":1015,"icon":1016,"path":1017,"stem":1018,"children":1019,"page":44},"Three.js","i-simple-icons-threedotjs","/document/threejs","document/30.threejs",[1020,1034,1056,1074],{"title":1021,"path":1022,"stem":1023,"children":1024,"icon":1016},"Three.js 基础入门","/document/threejs/basics","document/30.threejs/01.basics/01.index",[1025,1026,1030],{"title":1021,"path":1022,"stem":1023},{"title":1027,"path":1028,"stem":1029},"物体变换","/document/threejs/basics/transform","document/30.threejs/01.basics/02.transform",{"title":1031,"path":1032,"stem":1033},"相机与视角","/document/threejs/basics/camera-controls","document/30.threejs/01.basics/03.camera-controls",{"title":1035,"icon":1036,"path":1037,"stem":1038,"children":1039,"page":44},"创建和组织三维场景","i-lucide-boxes","/document/threejs/scene","document/30.threejs/02.scene",[1040,1044,1048,1052],{"title":1041,"path":1042,"stem":1043},"Geometry 与 Mesh","/document/threejs/scene/geometry","document/30.threejs/02.scene/04.geometry",{"title":1045,"path":1046,"stem":1047},"材质与灯光","/document/threejs/scene/material-light","document/30.threejs/02.scene/05.material-light",{"title":1049,"path":1050,"stem":1051},"纹理与颜色空间","/document/threejs/scene/texture","document/30.threejs/02.scene/06.texture",{"title":1053,"path":1054,"stem":1055},"场景树与对象管理","/document/threejs/scene/scene-graph","document/30.threejs/02.scene/07.scene-graph",{"title":1057,"icon":1058,"path":1059,"stem":1060,"children":1061,"page":44},"模型、动画与交互","i-lucide-orbit","/document/threejs/model-interaction","document/30.threejs/03.model-interaction",[1062,1066,1070],{"title":1063,"path":1064,"stem":1065},"模型加载","/document/threejs/model-interaction/model-loading","document/30.threejs/03.model-interaction/08.model-loading",{"title":1067,"path":1068,"stem":1069},"动画循环","/document/threejs/model-interaction/animation-loop","document/30.threejs/03.model-interaction/09.animation-loop",{"title":1071,"path":1072,"stem":1073},"射线拾取与交互","/document/threejs/model-interaction/raycast-interaction","document/30.threejs/03.model-interaction/10.raycast-interaction",{"title":1075,"icon":1076,"path":1077,"stem":1078,"children":1079,"page":44},"工程化与性能","i-lucide-gauge","/document/threejs/engineering","document/30.threejs/04.engineering",[1080],{"title":1081,"path":1082,"stem":1083},"渲染器与性能","/document/threejs/engineering/renderer-performance","document/30.threejs/04.engineering/11.renderer-performance",{"title":1085,"icon":804,"path":1086,"stem":1087,"children":1088,"page":44},"Node.js 核心基础","/document/nodejs","document/32.nodejs",[1089,1104,1115,1150,1165],{"title":1090,"path":1091,"stem":1092,"children":1093},"Node.js 入门与运行环境","/document/nodejs/guide","document/32.nodejs/01.guide/01.index",[1094,1096,1100],{"title":1095,"path":1091,"stem":1092},"Node.js 简介与应用场景",{"title":1097,"path":1098,"stem":1099},"环境搭建","/document/nodejs/guide/setup","document/32.nodejs/01.guide/02.setup",{"title":1101,"path":1102,"stem":1103},"程序运行方式","/document/nodejs/guide/running","document/32.nodejs/01.guide/03.running",{"title":1105,"path":1106,"stem":1107,"children":1108},"Node.js 模块系统","/document/nodejs/modules","document/32.nodejs/02.modules/01.index",[1109,1111],{"title":1110,"path":1106,"stem":1107},"ESM 与 CommonJS",{"title":1112,"path":1113,"stem":1114},"模块加载机制","/document/nodejs/modules/loading","document/32.nodejs/02.modules/02.loading",{"title":1116,"path":1117,"stem":1118,"children":1119},"Node.js 核心内置模块","/document/nodejs/core","document/32.nodejs/03.core/01.index",[1120,1122,1126,1130,1134,1138,1142,1146],{"title":1121,"path":1117,"stem":1118},"path 路径处理",{"title":1123,"path":1124,"stem":1125},"fs 文件与目录","/document/nodejs/core/file-system","document/32.nodejs/03.core/02.file-system",{"title":1127,"path":1128,"stem":1129},"fs/promises 异步文件操作","/document/nodejs/core/fs-promises","document/32.nodejs/03.core/03.fs-promises",{"title":1131,"path":1132,"stem":1133},"Buffer 与字符编码","/document/nodejs/core/buffer","document/32.nodejs/03.core/04.buffer",{"title":1135,"path":1136,"stem":1137},"process 进程对象","/document/nodejs/core/process","document/32.nodejs/03.core/05.process",{"title":1139,"path":1140,"stem":1141},"events 事件模块","/document/nodejs/core/events","document/32.nodejs/03.core/06.events",{"title":1143,"path":1144,"stem":1145},"URL 与查询参数","/document/nodejs/core/url-query","document/32.nodejs/03.core/07.url-query",{"title":1147,"path":1148,"stem":1149},"crypto 常用能力","/document/nodejs/core/crypto","document/32.nodejs/03.core/08.crypto",{"title":1151,"path":1152,"stem":1153,"children":1154},"Node.js 异步 I/O 与运行机制","/document/nodejs/async","document/32.nodejs/04.async/01.index",[1155,1157,1161],{"title":1156,"path":1152,"stem":1153},"单线程与非阻塞 I/O",{"title":1158,"path":1159,"stem":1160},"事件循环","/document/nodejs/async/event-loop","document/32.nodejs/04.async/02.event-loop",{"title":1162,"path":1163,"stem":1164},"异步任务调度","/document/nodejs/async/scheduling","document/32.nodejs/04.async/03.scheduling",{"title":1166,"path":1167,"stem":1168,"children":1169},"Node.js Stream 与数据处理","/document/nodejs/streams","document/32.nodejs/05.streams/01.index",[1170],{"title":1171,"path":1167,"stem":1168},"Stream 数据处理",{"title":1173,"icon":1174,"path":1175,"stem":1176,"children":1177,"page":44},"Express","i-simple-icons-express","/document/express","document/33.express",[1178],{"title":1179,"path":1180,"stem":1181,"children":1182},"Express 简介","/document/express/guide","document/33.express/01.guide/01.index",[1183,1184,1188,1192,1196,1200],{"title":1179,"path":1180,"stem":1181},{"title":1185,"path":1186,"stem":1187},"路由","/document/express/guide/routing","document/33.express/01.guide/02.routing",{"title":1189,"path":1190,"stem":1191},"中间件","/document/express/guide/middleware","document/33.express/01.guide/03.middleware",{"title":1193,"path":1194,"stem":1195},"请求与响应","/document/express/guide/request-response","document/33.express/01.guide/04.request-response",{"title":1197,"path":1198,"stem":1199},"错误处理","/document/express/guide/error-handling","document/33.express/01.guide/05.error-handling",{"title":1201,"path":1202,"stem":1203},"RESTful 实战","/document/express/guide/restful-api","document/33.express/01.guide/06.restful-api",{"title":1205,"icon":1206,"path":1207,"stem":1208,"children":1209,"page":44},"Koa","i-simple-icons-koa","/document/koa","document/34.koa",[1210],{"title":1211,"path":1212,"stem":1213,"children":1214},"Koa 简介","/document/koa/guide","document/34.koa/01.guide/01.index",[1215,1216,1220,1224,1227,1231],{"title":1211,"path":1212,"stem":1213},{"title":1217,"path":1218,"stem":1219},"Context 上下文","/document/koa/guide/context","document/34.koa/01.guide/02.context",{"title":1221,"path":1222,"stem":1223},"中间件与洋葱模型","/document/koa/guide/middleware","document/34.koa/01.guide/03.middleware",{"title":1185,"path":1225,"stem":1226},"/document/koa/guide/routing","document/34.koa/01.guide/04.routing",{"title":1228,"path":1229,"stem":1230},"请求体与错误处理","/document/koa/guide/body-and-error","document/34.koa/01.guide/05.body-and-error",{"title":1232,"path":1233,"stem":1234},"RESTful 接口实战","/document/koa/guide/restful-api","document/34.koa/01.guide/06.restful-api",{"title":1236,"icon":1237,"path":1238,"stem":1239,"children":1240,"page":44},"Egg.js","i-lucide-egg","/document/egg","document/35.egg",[1241],{"title":1242,"path":1243,"stem":1244,"children":1245},"Egg.js 简介","/document/egg/guide","document/35.egg/01.guide/01.index",[1246,1247,1251,1255,1259,1263],{"title":1242,"path":1243,"stem":1244},{"title":1248,"path":1249,"stem":1250},"路由与 Controller","/document/egg/guide/router-controller","document/35.egg/01.guide/02.router-controller",{"title":1252,"path":1253,"stem":1254},"Service 业务逻辑","/document/egg/guide/service","document/35.egg/01.guide/03.service",{"title":1256,"path":1257,"stem":1258},"配置与中间件","/document/egg/guide/config-middleware","document/35.egg/01.guide/04.config-middleware",{"title":1260,"path":1261,"stem":1262},"插件与扩展","/document/egg/guide/plugin-extend","document/35.egg/01.guide/05.plugin-extend",{"title":1232,"path":1264,"stem":1265},"/document/egg/guide/restful-api","document/35.egg/01.guide/06.restful-api",{"title":1267,"icon":1268,"path":1269,"stem":1270,"children":1271,"page":44},"Docker","i-simple-icons-docker","/document/docker","document/36.docker",[1272],{"title":1273,"path":1274,"stem":1275,"children":1276},"Docker 简介","/document/docker/guide","document/36.docker/01.guide/01.index",[1277,1278,1282,1286,1290],{"title":1273,"path":1274,"stem":1275},{"title":1279,"path":1280,"stem":1281},"镜像与容器","/document/docker/guide/image-container","document/36.docker/01.guide/02.image-container",{"title":1283,"path":1284,"stem":1285},"数据卷","/document/docker/guide/volume","document/36.docker/01.guide/03.volume",{"title":1287,"path":1288,"stem":1289},"Dockerfile","/document/docker/guide/dockerfile","document/36.docker/01.guide/04.dockerfile",{"title":1291,"path":1292,"stem":1293},"Docker Compose","/document/docker/guide/docker-compose","document/36.docker/01.guide/05.docker-compose",{"title":1295,"icon":1296,"path":1297,"stem":1298,"children":1299,"page":44},"MySQL","i-simple-icons-mysql","/document/mysql","document/37.mysql",[1300,1315,1334,1349,1360],{"title":1301,"path":1302,"stem":1303,"children":1304},"基础入门","/document/mysql/guide","document/37.mysql/01.guide/01.index",[1305,1307,1311],{"title":1306,"path":1302,"stem":1303},"MySQL 入门",{"title":1308,"path":1309,"stem":1310},"建库与增删改","/document/mysql/guide/crud","document/37.mysql/01.guide/02.crud",{"title":1312,"path":1313,"stem":1314},"类型与约束","/document/mysql/guide/data-type","document/37.mysql/01.guide/03.data-type",{"title":1316,"path":1317,"stem":1318,"children":1319},"查询与统计","/document/mysql/query","document/37.mysql/02.query/01.index",[1320,1322,1326,1330],{"title":1321,"path":1317,"stem":1318},"条件查询与分页",{"title":1323,"path":1324,"stem":1325},"分组与统计","/document/mysql/query/aggregate","document/37.mysql/02.query/02.aggregate",{"title":1327,"path":1328,"stem":1329},"多表关联","/document/mysql/query/join","document/37.mysql/02.query/03.join",{"title":1331,"path":1332,"stem":1333},"子查询与分组排名","/document/mysql/query/subqueries","document/37.mysql/02.query/04.subqueries",{"title":1335,"path":1336,"stem":1337,"children":1338},"表设计与事务","/document/mysql/reliability","document/37.mysql/03.reliability/01.index",[1339,1341,1345],{"title":1340,"path":1336,"stem":1337},"关系设计",{"title":1342,"path":1343,"stem":1344},"事务与回滚","/document/mysql/reliability/transactions","document/37.mysql/03.reliability/02.transactions",{"title":1346,"path":1347,"stem":1348},"并发与锁","/document/mysql/reliability/concurrency","document/37.mysql/03.reliability/03.concurrency",{"title":1350,"path":1351,"stem":1352,"children":1353},"索引与性能","/document/mysql/performance","document/37.mysql/04.performance/01.index",[1354,1356],{"title":1355,"path":1351,"stem":1352},"索引设计",{"title":1357,"path":1358,"stem":1359},"执行计划与优化","/document/mysql/performance/explain","document/37.mysql/04.performance/02.explain",{"title":1361,"path":1362,"stem":1363,"children":1364},"项目接入与维护","/document/mysql/engineering","document/37.mysql/05.engineering/01.index",[1365,1367],{"title":1366,"path":1362,"stem":1363},"Node.js 接入",{"title":1368,"path":1369,"stem":1370},"备份与恢复","/document/mysql/engineering/backup","document/37.mysql/05.engineering/02.backup",{"title":1372,"icon":1373,"path":1374,"stem":1375,"children":1376,"page":44},"MongoDB","i-simple-icons-mongodb","/document/mongodb","document/38.mongodb",[1377],{"title":1378,"path":1379,"stem":1380,"children":1381},"MongoDB 简介","/document/mongodb/guide","document/38.mongodb/01.guide/01.index",[1382,1383,1387,1391,1395,1399,1403,1407],{"title":1378,"path":1379,"stem":1380},{"title":1384,"path":1385,"stem":1386},"增删改查","/document/mongodb/guide/crud","document/38.mongodb/01.guide/02.crud",{"title":1388,"path":1389,"stem":1390},"条件查询","/document/mongodb/guide/query","document/38.mongodb/01.guide/03.query",{"title":1392,"path":1393,"stem":1394},"文档与数据类型","/document/mongodb/guide/document","document/38.mongodb/01.guide/04.document",{"title":1396,"path":1397,"stem":1398},"Node.js 操作 MongoDB","/document/mongodb/guide/nodejs","document/38.mongodb/01.guide/05.nodejs",{"title":1400,"path":1401,"stem":1402},"Mongoose","/document/mongodb/guide/mongoose","document/38.mongodb/01.guide/06.mongoose",{"title":1404,"path":1405,"stem":1406},"索引","/document/mongodb/guide/optimize","document/38.mongodb/01.guide/07.optimize",{"title":1408,"path":1409,"stem":1410},"聚合管道","/document/mongodb/guide/aggregate","document/38.mongodb/01.guide/08.aggregate",{"title":1412,"icon":1413,"path":1414,"stem":1415,"children":1416,"page":44},"GraphQL","i-simple-icons-graphql","/document/graphql","document/39.graphql",[1417],{"title":1418,"path":1419,"stem":1420,"children":1421},"GraphQL 简介","/document/graphql/guide","document/39.graphql/01.guide/01.index",[1422,1423,1427,1431,1435,1439],{"title":1418,"path":1419,"stem":1420},{"title":1424,"path":1425,"stem":1426},"类型系统","/document/graphql/guide/schema","document/39.graphql/01.guide/02.schema",{"title":1428,"path":1429,"stem":1430},"查询进阶","/document/graphql/guide/query","document/39.graphql/01.guide/03.query",{"title":1432,"path":1433,"stem":1434},"Mutation 增删改","/document/graphql/guide/mutation","document/39.graphql/01.guide/04.mutation",{"title":1436,"path":1437,"stem":1438},"Express 集成","/document/graphql/guide/express","document/39.graphql/01.guide/05.express",{"title":1440,"path":1441,"stem":1442},"前端调用","/document/graphql/guide/client","document/39.graphql/01.guide/06.client",{"title":1444,"icon":1445,"path":1446,"stem":1447,"children":1448,"page":44},"Vue2 源码","i-simple-icons-vuedotjs","/document/source-vue2","document/40.source-vue2",[1449],{"title":1450,"path":1451,"stem":1452,"children":1453},"Vue2 源码简介","/document/source-vue2/guide","document/40.source-vue2/01.guide/01.index",[1454,1455,1459,1463,1467,1471,1475,1479],{"title":1450,"path":1451,"stem":1452},{"title":1456,"path":1457,"stem":1458},"初始化流程","/document/source-vue2/guide/init","document/40.source-vue2/01.guide/02.init",{"title":1460,"path":1461,"stem":1462},"响应式原理","/document/source-vue2/guide/reactive","document/40.source-vue2/01.guide/03.reactive",{"title":1464,"path":1465,"stem":1466},"Dep 与 Watcher","/document/source-vue2/guide/dep-watcher","document/40.source-vue2/01.guide/04.dep-watcher",{"title":1468,"path":1469,"stem":1470},"异步更新与 nextTick","/document/source-vue2/guide/nexttick","document/40.source-vue2/01.guide/05.nexttick",{"title":1472,"path":1473,"stem":1474},"虚拟 DOM 与 patch","/document/source-vue2/guide/vnode-patch","document/40.source-vue2/01.guide/06.vnode-patch",{"title":1476,"path":1477,"stem":1478},"模板编译","/document/source-vue2/guide/compile","document/40.source-vue2/01.guide/07.compile",{"title":1480,"path":1481,"stem":1482},"computed 与 watch 原理","/document/source-vue2/guide/computed-watch","document/40.source-vue2/01.guide/08.computed-watch",{"title":1484,"icon":1445,"path":1485,"stem":1486,"children":1487,"page":44},"Vue3 源码","/document/source-vue3","document/41.source-vue3",[1488],{"title":1489,"path":1490,"stem":1491,"children":1492},"Vue3 源码简介","/document/source-vue3/guide","document/41.source-vue3/01.guide/01.index",[1493,1494,1498,1502,1506,1510,1514,1517],{"title":1489,"path":1490,"stem":1491},{"title":1495,"path":1496,"stem":1497},"创建与挂载","/document/source-vue3/guide/create-app","document/41.source-vue3/01.guide/02.create-app",{"title":1499,"path":1500,"stem":1501},"Proxy 响应式","/document/source-vue3/guide/reactive","document/41.source-vue3/01.guide/03.reactive",{"title":1503,"path":1504,"stem":1505},"effect 与依赖收集","/document/source-vue3/guide/effect","document/41.source-vue3/01.guide/04.effect",{"title":1507,"path":1508,"stem":1509},"ref 与 computed","/document/source-vue3/guide/ref-computed","document/41.source-vue3/01.guide/05.ref-computed",{"title":1511,"path":1512,"stem":1513},"调度器与 nextTick","/document/source-vue3/guide/scheduler-nexttick","document/41.source-vue3/01.guide/06.scheduler-nexttick",{"title":1472,"path":1515,"stem":1516},"/document/source-vue3/guide/vnode-patch","document/41.source-vue3/01.guide/07.vnode-patch",{"title":1476,"path":1518,"stem":1519},"/document/source-vue3/guide/compile","document/41.source-vue3/01.guide/08.compile",{"title":1521,"icon":1522,"path":1523,"stem":1524,"children":1525,"page":44},"性能优化","i-lucide-zap","/document/performance","document/42.performance",[1526],{"title":1527,"path":1528,"stem":1529,"children":1530},"性能优化简介","/document/performance/guide","document/42.performance/01.guide/01.index",[1531,1532,1536,1540,1544,1548],{"title":1527,"path":1528,"stem":1529},{"title":1533,"path":1534,"stem":1535},"加载优化","/document/performance/guide/loading","document/42.performance/01.guide/02.loading",{"title":1537,"path":1538,"stem":1539},"渲染优化","/document/performance/guide/rendering","document/42.performance/01.guide/03.rendering",{"title":1541,"path":1542,"stem":1543},"缓存策略","/document/performance/guide/cache","document/42.performance/01.guide/04.cache",{"title":1545,"path":1546,"stem":1547},"构建产物优化","/document/performance/guide/build","document/42.performance/01.guide/05.build",{"title":1549,"path":1550,"stem":1551},"性能指标与工具","/document/performance/guide/metrics","document/42.performance/01.guide/06.metrics",{"title":1553,"icon":1554,"path":1555,"stem":1556,"children":1557,"page":44},"前端监控","i-lucide-activity","/document/monitor","document/43.monitor",[1558],{"title":1559,"path":1560,"stem":1561,"children":1562},"前端监控简介","/document/monitor/guide","document/43.monitor/01.guide/01.index",[1563,1564,1568,1572,1576,1580],{"title":1559,"path":1560,"stem":1561},{"title":1565,"path":1566,"stem":1567},"错误采集","/document/monitor/guide/error","document/43.monitor/01.guide/02.error",{"title":1569,"path":1570,"stem":1571},"埋点与上报","/document/monitor/guide/tracking","document/43.monitor/01.guide/03.tracking",{"title":1573,"path":1574,"stem":1575},"性能数据上报","/document/monitor/guide/performance-data","document/43.monitor/01.guide/04.performance-data",{"title":1577,"path":1578,"stem":1579},"Sentry 实践","/document/monitor/guide/sentry","document/43.monitor/01.guide/05.sentry",{"title":1581,"path":1582,"stem":1583},"日志与告警","/document/monitor/guide/logging","document/43.monitor/01.guide/06.logging",{"title":1585,"icon":1586,"path":1587,"stem":1588,"children":1589,"page":44},"Electron","i-simple-icons-electron","/document/electron","document/44.electron",[1590,1606,1624,1642,1659],{"title":1591,"path":1592,"stem":1593,"children":1594,"icon":1605},"基础架构","/document/electron/guide","document/44.electron/01.guide/01.index",[1595,1597,1601],{"title":1596,"path":1592,"stem":1593},"Electron 简介",{"title":1598,"path":1599,"stem":1600},"主进程、渲染进程与 preload","/document/electron/guide/process-model","document/44.electron/01.guide/02.process-model",{"title":1602,"path":1603,"stem":1604},"Electron 与 Vue 集成","/document/electron/guide/vue-integration","document/44.electron/01.guide/03.vue-integration","i-lucide-layers",{"title":1607,"icon":1608,"path":1609,"stem":1610,"children":1611,"page":44},"核心开发","i-lucide-code-2","/document/electron/core","document/44.electron/02.core",[1612,1616,1620],{"title":1613,"path":1614,"stem":1615},"创建窗口与应用生命周期","/document/electron/core/window-lifecycle","document/44.electron/02.core/04.window-lifecycle",{"title":1617,"path":1618,"stem":1619},"IPC 通信与接口设计","/document/electron/core/ipc-design","document/44.electron/02.core/05.ipc-design",{"title":1621,"path":1622,"stem":1623},"本地文件与系统交互","/document/electron/core/filesystem-system","document/44.electron/02.core/06.filesystem-system",{"title":1625,"icon":1626,"path":1627,"stem":1628,"children":1629,"page":44},"桌面能力与安全","i-lucide-monitor-cog","/document/electron/desktop","document/44.electron/03.desktop",[1630,1634,1638],{"title":1631,"path":1632,"stem":1633},"桌面端安全基础","/document/electron/desktop/security","document/44.electron/03.desktop/07.security",{"title":1635,"path":1636,"stem":1637},"菜单、托盘与多窗口","/document/electron/desktop/window-menu-tray","document/44.electron/03.desktop/08.window-menu-tray",{"title":1639,"path":1640,"stem":1641},"会话、网络与本地存储","/document/electron/desktop/session-storage","document/44.electron/03.desktop/09.session-storage",{"title":1643,"icon":1076,"path":1644,"stem":1645,"children":1646,"page":44},"资源、性能与导出","/document/electron/stability","document/44.electron/04.stability",[1647,1651,1655],{"title":1648,"path":1649,"stem":1650},"自定义协议、资源加载与深链接","/document/electron/stability/protocol-loading","document/44.electron/04.stability/10.protocol-loading",{"title":1652,"path":1653,"stem":1654},"耗时任务与性能排查","/document/electron/stability/tasks-performance","document/44.electron/04.stability/11.tasks-performance",{"title":1656,"path":1657,"stem":1658},"PDF 打印与报告导出","/document/electron/stability/pdf-report","document/44.electron/04.stability/12.pdf-report",{"title":1660,"icon":1661,"path":1662,"stem":1663,"children":1664,"page":44},"交付与实战","i-lucide-rocket","/document/electron/delivery","document/44.electron/05.delivery",[1665,1669,1673,1677],{"title":1666,"path":1667,"stem":1668},"应用打包与自动更新","/document/electron/delivery/package-update","document/44.electron/05.delivery/13.package-update",{"title":1670,"path":1671,"stem":1672},"桌面应用签名与公证","/document/electron/delivery/code-signing","document/44.electron/05.delivery/14.code-signing",{"title":1674,"path":1675,"stem":1676},"测试、监控与发布","/document/electron/delivery/test-monitor-release","document/44.electron/05.delivery/15.test-monitor-release",{"title":1678,"path":1679,"stem":1680},"实战：桌面资料管理工具","/document/electron/delivery/project-file-manager","document/44.electron/05.delivery/16.project-file-manager",{"title":1682,"icon":1683,"path":1684,"stem":1685,"children":1686,"page":44},"WebGIS","i-lucide-map","/document/webgis","document/45.webgis",[1687,1694,1707,1721,1739,1753],{"title":1688,"path":1689,"stem":1690,"children":1691,"icon":1683},"WebGIS 基础认知","/document/webgis/guide","document/45.webgis/01.guide/01.index",[1692],{"title":1693,"path":1689,"stem":1690},"WebGIS 全景",{"title":1695,"icon":212,"path":1696,"stem":1697,"children":1698,"page":44},"空间数据基础","/document/webgis/spatial","document/45.webgis/02.spatial",[1699,1703],{"title":1700,"path":1701,"stem":1702},"矢量与栅格","/document/webgis/spatial/vector-and-raster","document/45.webgis/02.spatial/02.vector-and-raster",{"title":1704,"path":1705,"stem":1706},"GeoJSON 与常见格式","/document/webgis/spatial/geojson-and-formats","document/45.webgis/02.spatial/03.geojson-and-formats",{"title":1708,"icon":1709,"path":1710,"stem":1711,"children":1712,"page":44},"坐标与地图投影","i-lucide-compass","/document/webgis/coordinate","document/45.webgis/03.coordinate",[1713,1717],{"title":1714,"path":1715,"stem":1716},"CRS 与地图投影","/document/webgis/coordinate/coordinate-reference-systems","document/45.webgis/03.coordinate/04.coordinate-reference-systems",{"title":1718,"path":1719,"stem":1720},"坐标转换与偏移","/document/webgis/coordinate/coordinate-offset","document/45.webgis/03.coordinate/05.coordinate-offset",{"title":1722,"icon":1723,"path":1724,"stem":1725,"children":1726,"page":44},"瓦片与地图服务","i-lucide-grid-2x2","/document/webgis/tiles","document/45.webgis/04.tiles",[1727,1731,1735],{"title":1728,"path":1729,"stem":1730},"地图瓦片","/document/webgis/tiles/map-tiles","document/45.webgis/04.tiles/06.map-tiles",{"title":1732,"path":1733,"stem":1734},"栅格与矢量瓦片","/document/webgis/tiles/raster-and-vector-tiles","document/45.webgis/04.tiles/07.raster-and-vector-tiles",{"title":1736,"path":1737,"stem":1738},"地图服务与 OGC","/document/webgis/tiles/map-services","document/45.webgis/04.tiles/08.map-services",{"title":1740,"icon":1741,"path":1742,"stem":1743,"children":1744,"page":44},"空间查询与分析","i-lucide-search","/document/webgis/analysis","document/45.webgis/05.analysis",[1745,1749],{"title":1746,"path":1747,"stem":1748},"空间查询与空间关系","/document/webgis/analysis/spatial-relationships","document/45.webgis/05.analysis/09.spatial-relationships",{"title":1750,"path":1751,"stem":1752},"距离、面积与空间分析","/document/webgis/analysis/distance-and-analysis","document/45.webgis/05.analysis/10.distance-and-analysis",{"title":1754,"icon":1755,"path":1756,"stem":1757,"children":1758,"page":44},"GIS 数据工程","i-lucide-database","/document/webgis/engineering","document/45.webgis/06.engineering",[1759,1763],{"title":1760,"path":1761,"stem":1762},"GIS 数据处理与清洗","/document/webgis/engineering/data-cleaning","document/45.webgis/06.engineering/11.data-cleaning",{"title":1764,"path":1765,"stem":1766},"海量数据展示","/document/webgis/engineering/large-data-display","document/45.webgis/06.engineering/12.large-data-display",{"title":1768,"icon":1769,"path":1770,"stem":1771,"children":1772,"page":44},"Mapbox GL JS","i-simple-icons-mapbox","/document/mapbox-gl-js","document/46.mapbox-gl-js",[1773,1788,1814],{"title":1774,"path":1775,"stem":1776,"children":1777,"icon":1683},"地图基础","/document/mapbox-gl-js/start","document/46.mapbox-gl-js/01.start/01.index",[1778,1780,1784],{"title":1779,"path":1775,"stem":1776},"Mapbox GL JS 入门",{"title":1781,"path":1782,"stem":1783},"初始化与视角控制","/document/mapbox-gl-js/start/view-control","document/46.mapbox-gl-js/01.start/02.view-control",{"title":1785,"path":1786,"stem":1787},"地图事件与基础控件","/document/mapbox-gl-js/start/events-controls","document/46.mapbox-gl-js/01.start/03.events-controls",{"title":1789,"icon":1790,"path":1791,"stem":1792,"children":1793,"page":44},"数据与样式","i-lucide-layers-3","/document/mapbox-gl-js/data","document/46.mapbox-gl-js/02.data",[1794,1798,1802,1806,1810],{"title":1795,"path":1796,"stem":1797},"Source 与 Layer","/document/mapbox-gl-js/data/source-layer","document/46.mapbox-gl-js/02.data/04.source-layer",{"title":1799,"path":1800,"stem":1801},"GeoJSON 点线面","/document/mapbox-gl-js/data/geojson-features","document/46.mapbox-gl-js/02.data/05.geojson-features",{"title":1803,"path":1804,"stem":1805},"样式与表达式","/document/mapbox-gl-js/data/style-expressions","document/46.mapbox-gl-js/02.data/06.style-expressions",{"title":1807,"path":1808,"stem":1809},"Marker、Popup 与 Symbol","/document/mapbox-gl-js/data/marker-popup-symbol","document/46.mapbox-gl-js/02.data/07.marker-popup-symbol",{"title":1811,"path":1812,"stem":1813},"加载瓦片服务","/document/mapbox-gl-js/data/tile-services","document/46.mapbox-gl-js/02.data/08.tile-services",{"title":1815,"icon":1816,"path":1817,"stem":1818,"children":1819,"page":44},"业务交互","i-lucide-map-pinned","/document/mapbox-gl-js/business","document/46.mapbox-gl-js/03.business",[1820,1824,1828,1832,1836],{"title":1821,"path":1822,"stem":1823},"查询与高亮","/document/mapbox-gl-js/business/query-highlight","document/46.mapbox-gl-js/03.business/08.query-highlight",{"title":1825,"path":1826,"stem":1827},"筛选与图层管理","/document/mapbox-gl-js/business/filter-layers","document/46.mapbox-gl-js/03.business/09.filter-layers",{"title":1829,"path":1830,"stem":1831},"点聚合","/document/mapbox-gl-js/business/clusters","document/46.mapbox-gl-js/03.business/10.clusters",{"title":1833,"path":1834,"stem":1835},"绘制、编辑与测量","/document/mapbox-gl-js/business/draw-measure","document/46.mapbox-gl-js/03.business/11.draw-measure",{"title":1837,"path":1838,"stem":1839},"接入 Three.js","/document/mapbox-gl-js/business/three-in-mapbox","document/46.mapbox-gl-js/03.business/12.three-in-mapbox",{"title":1841,"icon":1790,"path":1842,"stem":1843,"children":1844,"page":44},"deck.gl","/document/deck-gl","document/47.deck-gl",[1845,1860,1877],{"title":1846,"path":1847,"stem":1848,"children":1849},"deck.gl 基础入门","/document/deck-gl/basics","document/47.deck-gl/01.basics/01.index",[1850,1852,1856],{"title":1851,"path":1847,"stem":1848},"deck.gl 简介",{"title":1853,"path":1854,"stem":1855},"Layer、Data 与 Accessor","/document/deck-gl/basics/layer-data-accessor","document/47.deck-gl/01.basics/02.layer-data-accessor",{"title":1857,"path":1858,"stem":1859},"常用基础图层","/document/deck-gl/basics/common-layers","document/47.deck-gl/01.basics/03.common-layers",{"title":1861,"path":1862,"stem":1863,"children":1864,"page":44},"地图交互与 Mapbox 集成","/document/deck-gl/interaction-mapbox","document/47.deck-gl/02.interaction-mapbox",[1865,1869,1873],{"title":1866,"path":1867,"stem":1868},"拾取与 Tooltip","/document/deck-gl/interaction-mapbox/picking-tooltip","document/47.deck-gl/02.interaction-mapbox/04.picking-tooltip",{"title":1870,"path":1871,"stem":1872},"坐标与单位","/document/deck-gl/interaction-mapbox/coordinates-units","document/47.deck-gl/02.interaction-mapbox/05.coordinates-units",{"title":1874,"path":1875,"stem":1876},"deck.gl 与 Mapbox","/document/deck-gl/interaction-mapbox/mapbox-integration","document/47.deck-gl/02.interaction-mapbox/06.mapbox-integration",{"title":1878,"path":1879,"stem":1880,"children":1881,"page":44},"动态数据与专题可视化","/document/deck-gl/dynamic-thematic","document/47.deck-gl/03.dynamic-thematic",[1882,1886,1890,1894],{"title":1883,"path":1884,"stem":1885},"Layer 更新与动态数据","/document/deck-gl/dynamic-thematic/layer-updates","document/47.deck-gl/03.dynamic-thematic/07.layer-updates",{"title":1887,"path":1888,"stem":1889},"聚合与专题地图","/document/deck-gl/dynamic-thematic/aggregation-thematic","document/47.deck-gl/03.dynamic-thematic/08.aggregation-thematic",{"title":1891,"path":1892,"stem":1893},"时间序列与轨迹动画","/document/deck-gl/dynamic-thematic/trips-animation","document/47.deck-gl/03.dynamic-thematic/09.trips-animation",{"title":1895,"path":1896,"stem":1897},"瓦片与大规模空间数据","/document/deck-gl/dynamic-thematic/tiles-large-data","document/47.deck-gl/03.dynamic-thematic/10.tiles-large-data",{"title":1899,"icon":804,"path":1900,"stem":1901,"children":1902,"page":44},"HTTP 与后端开发基础","/document/nodejs-backend","document/48.nodejs-backend",[1903,1923,1942,1961,1980,1999,2014,2029],{"title":1904,"path":1905,"stem":1906,"children":1907,"icon":1922},"后端开发基础认知","/document/nodejs-backend/guide","document/48.nodejs-backend/01.guide/01.index",[1908,1910,1914,1918],{"title":1909,"path":1905,"stem":1906},"前端与后端的区别",{"title":1911,"path":1912,"stem":1913},"HTTP / HTTPS 核心原理","/document/nodejs-backend/guide/http-https","document/48.nodejs-backend/01.guide/02.http-https",{"title":1915,"path":1916,"stem":1917},"Cookie、Session 与浏览器同源策略","/document/nodejs-backend/guide/cookies-origin","document/48.nodejs-backend/01.guide/03.cookies-origin",{"title":1919,"path":1920,"stem":1921},"从浏览器发起请求到服务端返回数据的完整过程","/document/nodejs-backend/guide/request-lifecycle","document/48.nodejs-backend/01.guide/04.request-lifecycle","i-lucide-book-open",{"title":1924,"path":1925,"stem":1926,"children":1927,"icon":1922},"Node.js HTTP 服务开发","/document/nodejs-backend/http","document/48.nodejs-backend/02.http/01.index",[1928,1930,1934,1938],{"title":1929,"path":1925,"stem":1926},"使用原生 Node.js 创建 HTTP 服务器",{"title":1931,"path":1932,"stem":1933},"HTTP 请求解析","/document/nodejs-backend/http/request","document/48.nodejs-backend/02.http/02.request",{"title":1935,"path":1936,"stem":1937},"HTTP 响应处理","/document/nodejs-backend/http/response","document/48.nodejs-backend/02.http/03.response",{"title":1939,"path":1940,"stem":1941},"路由匹配与请求处理流程","/document/nodejs-backend/http/routing","document/48.nodejs-backend/02.http/04.routing",{"title":1943,"path":1944,"stem":1945,"children":1946,"icon":1922},"RESTful API 接口设计","/document/nodejs-backend/api","document/48.nodejs-backend/03.api/01.index",[1947,1949,1953,1957],{"title":1948,"path":1944,"stem":1945},"RESTful API 设计规范与 HTTP 请求方法",{"title":1950,"path":1951,"stem":1952},"接口参数校验与数据格式规范","/document/nodejs-backend/api/validation","document/48.nodejs-backend/03.api/02.validation",{"title":1954,"path":1955,"stem":1956},"统一响应格式、错误码与异常处理","/document/nodejs-backend/api/errors","document/48.nodejs-backend/03.api/03.errors",{"title":1958,"path":1959,"stem":1960},"API 版本管理、分页、筛选、排序与接口文档","/document/nodejs-backend/api/query-contract","document/48.nodejs-backend/03.api/04.query-contract",{"title":1962,"path":1963,"stem":1964,"children":1965,"icon":1922},"身份认证与权限控制","/document/nodejs-backend/auth","document/48.nodejs-backend/04.auth/01.index",[1966,1968,1972,1976],{"title":1967,"path":1963,"stem":1964},"身份认证与权限授权",{"title":1969,"path":1970,"stem":1971},"Session、JWT 与 Token 认证机制","/document/nodejs-backend/auth/session-jwt","document/48.nodejs-backend/04.auth/02.session-jwt",{"title":1973,"path":1974,"stem":1975},"Access Token、Refresh Token 与登录状态管理","/document/nodejs-backend/auth/token-lifecycle","document/48.nodejs-backend/04.auth/03.token-lifecycle",{"title":1977,"path":1978,"stem":1979},"RBAC 权限模型与接口级权限控制","/document/nodejs-backend/auth/rbac","document/48.nodejs-backend/04.auth/04.rbac",{"title":1981,"path":1982,"stem":1983,"children":1984,"icon":1922},"后端安全与风险防护","/document/nodejs-backend/security","document/48.nodejs-backend/05.security/01.index",[1985,1987,1991,1995],{"title":1986,"path":1982,"stem":1983},"CORS 跨域机制与跨域请求处理",{"title":1988,"path":1989,"stem":1990},"XSS、CSRF、SQL 注入与常见 Web 安全风险","/document/nodejs-backend/security/web-risks","document/48.nodejs-backend/05.security/02.web-risks",{"title":1992,"path":1993,"stem":1994},"密码安全","/document/nodejs-backend/security/passwords","document/48.nodejs-backend/05.security/03.passwords",{"title":1996,"path":1997,"stem":1998},"接口防护","/document/nodejs-backend/security/request-protection","document/48.nodejs-backend/05.security/04.request-protection",{"title":2000,"path":2001,"stem":2002,"children":2003,"icon":1922},"后端工程化与架构设计","/document/nodejs-backend/architecture","document/48.nodejs-backend/06.architecture/01.index",[2004,2006,2010],{"title":2005,"path":2001,"stem":2002},"后端项目目录结构与分层架构设计",{"title":2007,"path":2008,"stem":2009},"Controller、Service、Repository 的职责划分","/document/nodejs-backend/architecture/layers","document/48.nodejs-backend/06.architecture/02.layers",{"title":2011,"path":2012,"stem":2013},"环境变量、配置管理、日志与统一异常处理","/document/nodejs-backend/architecture/configuration-logging","document/48.nodejs-backend/06.architecture/03.configuration-logging",{"title":2015,"path":2016,"stem":2017,"children":2018,"icon":1922},"常见后端业务场景","/document/nodejs-backend/business","document/48.nodejs-backend/07.business/01.index",[2019,2021,2025],{"title":2020,"path":2016,"stem":2017},"文件上传、下载与静态资源访问",{"title":2022,"path":2023,"stem":2024},"邮件、验证码与第三方服务接口集成","/document/nodejs-backend/business/integrations","document/48.nodejs-backend/07.business/02.integrations",{"title":2026,"path":2027,"stem":2028},"WebSocket、SSE 与实时消息通信","/document/nodejs-backend/business/realtime","document/48.nodejs-backend/07.business/03.realtime",{"title":2030,"path":2031,"stem":2032,"children":2033,"icon":1922},"接口测试与部署基础","/document/nodejs-backend/delivery","document/48.nodejs-backend/08.delivery/01.index",[2034,2036],{"title":2035,"path":2031,"stem":2032},"使用 Postman / Apifox 调试接口与 Node.js 接口自动化测试",{"title":2037,"path":2038,"stem":2039},"Node.js 服务部署入门","/document/nodejs-backend/delivery/deployment","document/48.nodejs-backend/08.delivery/02.deployment",{"title":2041,"icon":2042,"path":2043,"stem":2044,"children":2045,"page":44},"Redis","i-simple-icons-redis","/document/redis","document/50.redis",[2046,2061,2076,2087],{"title":2047,"path":2048,"stem":2049,"children":2050},"Redis 基础与数据结构","/document/redis/guide","document/50.redis/01.guide/01.index",[2051,2053,2057],{"title":2052,"path":2048,"stem":2049},"简介与 Node.js 集成",{"title":2054,"path":2055,"stem":2056},"核心数据类型与常用操作","/document/redis/guide/data-types","document/50.redis/01.guide/02.data-types",{"title":2058,"path":2059,"stem":2060},"Key 管理与过期时间","/document/redis/guide/keys-expiration","document/50.redis/01.guide/03.keys-expiration",{"title":2062,"path":2063,"stem":2064,"children":2065},"Redis 核心机制","/document/redis/mechanisms","document/50.redis/02.mechanisms/01.index",[2066,2068,2072],{"title":2067,"path":2063,"stem":2064},"原子操作、事务与 Pipeline",{"title":2069,"path":2070,"stem":2071},"内存管理与淘汰策略","/document/redis/mechanisms/memory-eviction","document/50.redis/02.mechanisms/02.memory-eviction",{"title":2073,"path":2074,"stem":2075},"持久化机制","/document/redis/mechanisms/persistence","document/50.redis/02.mechanisms/03.persistence",{"title":2077,"path":2078,"stem":2079,"children":2080},"Redis 在 Node.js 中的应用","/document/redis/applications","document/50.redis/03.applications/01.index",[2081,2083],{"title":2082,"path":2078,"stem":2079},"实现数据缓存",{"title":2084,"path":2085,"stem":2086},"缓存常见问题与解决方案","/document/redis/applications/cache-protection","document/50.redis/03.applications/02.cache-protection",{"title":2088,"path":2089,"stem":2090,"children":2091},"Redis 生产实践","/document/redis/production","document/50.redis/04.production/01.index",[2092],{"title":2093,"path":2089,"stem":2090},"连接管理、安全与性能排查",{"title":2095,"icon":2096,"path":2097,"stem":2098,"children":2099,"page":44},"BullMQ","i-lucide-list-todo","/document/bullmq","document/51.bullmq",[2100,2111,2126],{"title":2101,"path":2102,"stem":2103,"children":2104},"BullMQ 基础","/document/bullmq/guide","document/51.bullmq/01.guide/01.index",[2105,2107],{"title":2106,"path":2102,"stem":2103},"简介与快速入门",{"title":2108,"path":2109,"stem":2110},"Queue、Worker 与 Job","/document/bullmq/guide/queue-worker-job","document/51.bullmq/01.guide/02.queue-worker-job",{"title":2112,"path":2113,"stem":2114,"children":2115},"任务调度与管理","/document/bullmq/scheduling","document/51.bullmq/02.scheduling/01.index",[2116,2118,2122],{"title":2117,"path":2113,"stem":2114},"延迟任务与定时任务",{"title":2119,"path":2120,"stem":2121},"任务并发与速率限制","/document/bullmq/scheduling/concurrency-rate-limiting","document/51.bullmq/02.scheduling/02.concurrency-rate-limiting",{"title":2123,"path":2124,"stem":2125},"任务状态、进度与事件监听","/document/bullmq/scheduling/status-progress-events","document/51.bullmq/02.scheduling/03.status-progress-events",{"title":2127,"path":2128,"stem":2129,"children":2130},"任务可靠性","/document/bullmq/reliability","document/51.bullmq/03.reliability/01.index",[2131],{"title":2132,"path":2128,"stem":2129},"任务失败重试与异常处理",{"title":2134,"icon":2135,"path":2136,"stem":2137,"children":2138,"page":44},"RabbitMQ","i-simple-icons-rabbitmq","/document/rabbitmq","document/52.rabbitmq",[2139,2157,2172,2191],{"title":1301,"path":2140,"stem":2141,"children":2142},"/document/rabbitmq/guide","document/52.rabbitmq/01.guide/01.index",[2143,2145,2149,2153],{"title":2144,"path":2140,"stem":2141},"RabbitMQ 简介",{"title":2146,"path":2147,"stem":2148},"安装与连接","/document/rabbitmq/guide/environment","document/52.rabbitmq/01.guide/02.environment",{"title":2150,"path":2151,"stem":2152},"发送和接收一条消息","/document/rabbitmq/guide/first-message","document/52.rabbitmq/01.guide/03.first-message",{"title":2154,"path":2155,"stem":2156},"消息正文与属性","/document/rabbitmq/guide/message-format","document/52.rabbitmq/01.guide/04.message-format",{"title":2158,"path":2159,"stem":2160,"children":2161},"交换机与路由","/document/rabbitmq/routing","document/52.rabbitmq/02.routing/01.index",[2162,2164,2168],{"title":2163,"path":2159,"stem":2160},"交换机与发布订阅",{"title":2165,"path":2166,"stem":2167},"Direct 交换机的精确路由","/document/rabbitmq/routing/direct","document/52.rabbitmq/02.routing/02.direct",{"title":2169,"path":2170,"stem":2171},"Topic 交换机的通配符路由","/document/rabbitmq/routing/topic","document/52.rabbitmq/02.routing/03.topic",{"title":2173,"path":2174,"stem":2175,"children":2176},"消息可靠性","/document/rabbitmq/reliability","document/52.rabbitmq/03.reliability/01.index",[2177,2179,2183,2187],{"title":2178,"path":2174,"stem":2175},"消息处理与消费确认",{"title":2180,"path":2181,"stem":2182},"发布确认与消息退回","/document/rabbitmq/reliability/publisher-confirms","document/52.rabbitmq/03.reliability/02.publisher-confirms",{"title":2184,"path":2185,"stem":2186},"队列与消息持久化","/document/rabbitmq/reliability/persistence","document/52.rabbitmq/03.reliability/03.persistence",{"title":2188,"path":2189,"stem":2190},"消费失败与死信处理","/document/rabbitmq/reliability/dead-letter","document/52.rabbitmq/03.reliability/04.dead-letter",{"title":2192,"path":2193,"stem":2194,"children":2195},"消费与运行管理","/document/rabbitmq/management","document/52.rabbitmq/04.management/01.index",[2196,2198],{"title":2197,"path":2193,"stem":2194},"多消费者与预取控制",{"title":2199,"path":2200,"stem":2201},"队列状态与故障排查","/document/rabbitmq/management/monitoring","document/52.rabbitmq/04.management/02.monitoring",{"title":2203,"icon":2204,"path":2205,"stem":2206,"children":2207,"page":44},"Socket.IO","i-simple-icons-socketdotio","/document/socket-io","document/53.socket-io",[2208,2223,2238,2249],{"title":2209,"path":2210,"stem":2211,"children":2212},"认识与消息收发","/document/socket-io/guide","document/53.socket-io/01.guide/01.index",[2213,2215,2219],{"title":2214,"path":2210,"stem":2211},"Socket.IO 简介与环境搭建",{"title":2216,"path":2217,"stem":2218},"事件发送与监听","/document/socket-io/guide/events","document/53.socket-io/01.guide/02.events",{"title":2220,"path":2221,"stem":2222},"消息确认与输入校验","/document/socket-io/guide/acknowledgements","document/53.socket-io/01.guide/03.acknowledgements",{"title":2224,"path":2225,"stem":2226,"children":2227},"广播、房间与认证","/document/socket-io/messaging","document/53.socket-io/02.messaging/01.index",[2228,2230,2234],{"title":2229,"path":2225,"stem":2226},"广播与消息接收范围",{"title":2231,"path":2232,"stem":2233},"房间加入与分组聊天","/document/socket-io/messaging/rooms","document/53.socket-io/02.messaging/02.rooms",{"title":2235,"path":2236,"stem":2237},"身份认证与房间权限","/document/socket-io/messaging/authentication","document/53.socket-io/02.messaging/03.authentication",{"title":2239,"path":2240,"stem":2241,"children":2242},"断线与消息补取","/document/socket-io/reliability","document/53.socket-io/03.reliability/01.index",[2243,2245],{"title":2244,"path":2240,"stem":2241},"断线重连与状态提示",{"title":2246,"path":2247,"stem":2248},"最近消息与断线补取","/document/socket-io/reliability/history","document/53.socket-io/03.reliability/02.history",{"title":2250,"path":2251,"stem":2252,"children":2253},"部署与故障排查","/document/socket-io/production","document/53.socket-io/04.production/01.index",[2254],{"title":2255,"path":2251,"stem":2252},"服务部署与常见故障排查",{"title":2257,"icon":2258,"path":2259,"stem":2260,"children":2261,"page":44},"Nginx","i-simple-icons-nginx","/document/nginx","document/55.nginx",[2262,2281,2300,2315],{"title":2263,"path":2264,"stem":2265,"children":2266},"认识与运行","/document/nginx/guide","document/55.nginx/01.guide/01.index",[2267,2269,2273,2277],{"title":2268,"path":2264,"stem":2265},"Nginx 课程概览",{"title":2270,"path":2271,"stem":2272},"安装与实验环境","/document/nginx/guide/install","document/55.nginx/01.guide/02.install",{"title":2274,"path":2275,"stem":2276},"配置结构","/document/nginx/guide/configuration","document/55.nginx/01.guide/03.configuration",{"title":2278,"path":2279,"stem":2280},"启动与重载","/document/nginx/guide/lifecycle","document/55.nginx/01.guide/04.lifecycle",{"title":2282,"path":2283,"stem":2284,"children":2285},"发布静态网站","/document/nginx/website","document/55.nginx/02.website/01.index",[2286,2288,2292,2296],{"title":2287,"path":2283,"stem":2284},"静态文件与目录",{"title":2289,"path":2290,"stem":2291},"站点与路径匹配","/document/nginx/website/location","document/55.nginx/02.website/02.location",{"title":2293,"path":2294,"stem":2295},"前端路由与回退","/document/nginx/website/spa-routing","document/55.nginx/02.website/03.spa-routing",{"title":2297,"path":2298,"stem":2299},"缓存与压缩","/document/nginx/website/cache-gzip","document/55.nginx/02.website/04.cache-gzip",{"title":2301,"path":2302,"stem":2303,"children":2304},"代理与服务分流","/document/nginx/proxy","document/55.nginx/03.proxy/01.index",[2305,2307,2311],{"title":2306,"path":2302,"stem":2303},"反向代理入门",{"title":2308,"path":2309,"stem":2310},"转发信息与超时","/document/nginx/proxy/forwarded-headers","document/55.nginx/03.proxy/02.forwarded-headers",{"title":2312,"path":2313,"stem":2314},"负载均衡","/document/nginx/proxy/load-balancing","document/55.nginx/03.proxy/03.load-balancing",{"title":2316,"path":2317,"stem":2318,"children":2319},"排错与发布","/document/nginx/operations","document/55.nginx/04.operations/01.index",[2320,2322,2326],{"title":2321,"path":2317,"stem":2318},"日志与故障排查",{"title":2323,"path":2324,"stem":2325},"大小与速率限制","/document/nginx/operations/request-limits","document/55.nginx/04.operations/02.request-limits",{"title":2327,"path":2328,"stem":2329},"HTTPS 与证书","/document/nginx/operations/https","document/55.nginx/04.operations/03.https",{"title":2331,"icon":2332,"path":2333,"stem":2334,"children":2335,"page":44},"Linux 与服务器基础","i-simple-icons-linux","/document/linux","document/56.linux",[2336,2363,2386],{"title":2337,"path":2338,"stem":2339,"children":2340},"Linux 入门与基本操作","/document/linux/guide","document/56.linux/01.guide/01.index",[2341,2343,2347,2351,2355,2359],{"title":2342,"path":2338,"stem":2339},"Linux 课程概览",{"title":2344,"path":2345,"stem":2346},"文件系统与目录","/document/linux/guide/filesystem","document/56.linux/01.guide/02.filesystem",{"title":2348,"path":2349,"stem":2350},"文件查看与 Vim","/document/linux/guide/editing","document/56.linux/01.guide/03.editing",{"title":2352,"path":2353,"stem":2354},"搜索、管道与重定向","/document/linux/guide/search-pipelines","document/56.linux/01.guide/04.search-pipelines",{"title":2356,"path":2357,"stem":2358},"用户、用户组与权限","/document/linux/guide/permissions","document/56.linux/01.guide/05.permissions",{"title":2360,"path":2361,"stem":2362},"SSH 与文件传输","/document/linux/guide/ssh","document/56.linux/01.guide/06.ssh",{"title":2364,"path":2365,"stem":2366,"children":2367},"Linux 服务器管理","/document/linux/server","document/56.linux/02.server/01.index",[2368,2370,2374,2378,2382],{"title":2369,"path":2365,"stem":2366},"软件包与环境变量",{"title":2371,"path":2372,"stem":2373},"进程与后台运行","/document/linux/server/processes","document/56.linux/02.server/02.processes",{"title":2375,"path":2376,"stem":2377},"systemd 服务管理","/document/linux/server/systemd","document/56.linux/02.server/03.systemd",{"title":2379,"path":2380,"stem":2381},"系统资源与磁盘","/document/linux/server/resources","document/56.linux/02.server/05.resources",{"title":2383,"path":2384,"stem":2385},"系统与应用日志","/document/linux/server/logs","document/56.linux/02.server/06.logs",{"title":2387,"path":2388,"stem":2389,"children":2390},"Shell 与服务器实战","/document/linux/practice","document/56.linux/03.practice/01.index",[2391,2393,2397],{"title":2392,"path":2388,"stem":2389},"Bash 脚本入门",{"title":2394,"path":2395,"stem":2396},"cron 定时任务","/document/linux/practice/cron","document/56.linux/03.practice/02.cron",{"title":2398,"path":2399,"stem":2400},"服务器基础安全","/document/linux/practice/security","document/56.linux/03.practice/03.security",{"title":2402,"icon":2403,"path":2404,"stem":2405,"children":2406,"page":44},"BFF 与多服务架构","i-lucide-network","/document/backend-architecture","document/57.backend-architecture",[2407,2422],{"title":2408,"path":2409,"stem":2410,"children":2411},"BFF 基础与实践","/document/backend-architecture/guide","document/57.backend-architecture/01.guide/01.index",[2412,2414,2418],{"title":2413,"path":2409,"stem":2410},"BFF 概览",{"title":2415,"path":2416,"stem":2417},"接口聚合","/document/backend-architecture/guide/aggregation","document/57.backend-architecture/01.guide/02.aggregation",{"title":2419,"path":2420,"stem":2421},"接口适配与职责边界","/document/backend-architecture/guide/adaptation","document/57.backend-architecture/01.guide/03.adaptation",{"title":2423,"path":2424,"stem":2425,"children":2426},"多服务拆分与协作","/document/backend-architecture/services","document/57.backend-architecture/02.services/01.index",[2427,2429,2433,2437],{"title":2428,"path":2424,"stem":2425},"从单体到多服务",{"title":2430,"path":2431,"stem":2432},"HTTP 服务协作","/document/backend-architecture/services/http-collaboration","document/57.backend-architecture/02.services/02.http-collaboration",{"title":2434,"path":2435,"stem":2436},"统一 API 入口","/document/backend-architecture/services/api-entry","document/57.backend-architecture/02.services/03.api-entry",{"title":2438,"path":2439,"stem":2440},"服务调用故障处理","/document/backend-architecture/services/failure-handling","document/57.backend-architecture/02.services/04.failure-handling",{"title":2442,"icon":2403,"path":2443,"stem":2444,"children":2445,"page":44},"微服务架构","/document/microservices","document/58.microservices",[2446,2465,2484],{"title":2447,"path":2448,"stem":2449,"children":2450},"微服务架构与设计","/document/microservices/guide","document/58.microservices/01.guide/01.index",[2451,2453,2457,2461],{"title":2452,"path":2448,"stem":2449},"微服务架构简介",{"title":2454,"path":2455,"stem":2456},"微服务的设计与拆分","/document/microservices/guide/service-design","document/58.microservices/01.guide/02.service-design",{"title":2458,"path":2459,"stem":2460},"项目结构与搭建","/document/microservices/guide/project-setup","document/58.microservices/01.guide/03.project-setup",{"title":2462,"path":2463,"stem":2464},"服务通信与发现","/document/microservices/guide/communication-discovery","document/58.microservices/01.guide/04.communication-discovery",{"title":2466,"path":2467,"stem":2468,"children":2469},"微服务业务开发","/document/microservices/development","document/58.microservices/02.development/01.index",[2470,2472,2476,2480],{"title":2471,"path":2467,"stem":2468},"数据库设计",{"title":2473,"path":2474,"stem":2475},"业务事件","/document/microservices/development/business-events","document/58.microservices/02.development/02.business-events",{"title":2477,"path":2478,"stem":2479},"分布式事务与数据一致性","/document/microservices/development/distributed-transactions","document/58.microservices/02.development/03.distributed-transactions",{"title":2481,"path":2482,"stem":2483},"容错与可靠性","/document/microservices/development/resilience","document/58.microservices/02.development/04.resilience",{"title":2485,"path":2486,"stem":2487,"children":2488},"微服务运行与治理","/document/microservices/operations","document/58.microservices/03.operations/01.index",[2489,2491,2495],{"title":2490,"path":2486,"stem":2487},"安全",{"title":2492,"path":2493,"stem":2494},"可观测性","/document/microservices/operations/observability","document/58.microservices/03.operations/02.observability",{"title":2496,"path":2497,"stem":2498},"部署与扩容","/document/microservices/operations/deployment-scaling","document/58.microservices/03.operations/04.deployment-scaling",{"title":2500,"icon":2501,"path":2502,"stem":2503,"children":2504,"page":44},"Kubernetes 应用部署","i-simple-icons-kubernetes","/document/kubernetes","document/59.kubernetes",[2505,2528],{"title":2506,"path":2507,"stem":2508,"children":2509},"Kubernetes 基础与应用部署","/document/kubernetes/guide","document/59.kubernetes/01.guide/01.index",[2510,2512,2516,2520,2524],{"title":2511,"path":2507,"stem":2508},"Kubernetes 简介",{"title":2513,"path":2514,"stem":2515},"环境搭建与基本操作","/document/kubernetes/guide/setup","document/59.kubernetes/01.guide/02.setup",{"title":2517,"path":2518,"stem":2519},"Pod","/document/kubernetes/guide/pod","document/59.kubernetes/01.guide/03.pod",{"title":2521,"path":2522,"stem":2523},"Deployment","/document/kubernetes/guide/deployment","document/59.kubernetes/01.guide/04.deployment",{"title":2525,"path":2526,"stem":2527},"Service","/document/kubernetes/guide/service","document/59.kubernetes/01.guide/05.service",{"title":2529,"path":2530,"stem":2531,"children":2532,"page":44},"服务配置与运行管理","/document/kubernetes/management","document/59.kubernetes/02.management",[2533,2537,2541,2545,2549,2553,2557],{"title":2534,"path":2535,"stem":2536},"Gateway API","/document/kubernetes/management/gateway-api","document/59.kubernetes/02.management/06.gateway-api",{"title":2538,"path":2539,"stem":2540},"ConfigMap 与 Secret","/document/kubernetes/management/configmap-secret","document/59.kubernetes/02.management/07.configmap-secret",{"title":2542,"path":2543,"stem":2544},"健康检查","/document/kubernetes/management/probes","document/59.kubernetes/02.management/08.probes",{"title":2546,"path":2547,"stem":2548},"资源请求与限制","/document/kubernetes/management/resources","document/59.kubernetes/02.management/09.resources",{"title":2550,"path":2551,"stem":2552},"滚动更新与回滚","/document/kubernetes/management/rolling-update","document/59.kubernetes/02.management/10.rolling-update",{"title":2554,"path":2555,"stem":2556},"扩容与自动伸缩","/document/kubernetes/management/autoscaling","document/59.kubernetes/02.management/11.autoscaling",{"title":2558,"path":2559,"stem":2560},"存储与持久化","/document/kubernetes/management/storage","document/59.kubernetes/02.management/12.storage",{"title":2562,"icon":2563,"path":2564,"stem":2565,"children":2566,"page":44},"LLM 基础","i-lucide-brain","/document/llm","document/60.llm",[2567,2590,2609],{"title":2568,"path":2569,"stem":2570,"children":2571},"大语言模型基础","/document/llm/guide","document/60.llm/01.guide/01.index",[2572,2574,2578,2582,2586],{"title":2573,"path":2569,"stem":2570},"LLM 基础概览",{"title":2575,"path":2576,"stem":2577},"模型工作原理","/document/llm/guide/how-llms-work","document/60.llm/01.guide/02.how-llms-work",{"title":2579,"path":2580,"stem":2581},"Token 与上下文","/document/llm/guide/tokens-and-context-window","document/60.llm/01.guide/03.tokens-and-context-window",{"title":2583,"path":2584,"stem":2585},"模型类型与参数","/document/llm/guide/model-types-and-parameters","document/60.llm/01.guide/04.model-types-and-parameters",{"title":2587,"path":2588,"stem":2589},"Embedding 与语义","/document/llm/guide/embeddings","document/60.llm/01.guide/05.embeddings",{"title":2591,"path":2592,"stem":2593,"children":2594},"Prompt Engineering","/document/llm/prompt-engineering","document/60.llm/02.prompt-engineering/01.index",[2595,2597,2601,2605],{"title":2596,"path":2592,"stem":2593},"提示词工程简介",{"title":2598,"path":2599,"stem":2600},"角色与指令设计","/document/llm/prompt-engineering/roles-and-instructions","document/60.llm/02.prompt-engineering/02.roles-and-instructions",{"title":2602,"path":2603,"stem":2604},"Few-shot 示例引导","/document/llm/prompt-engineering/few-shot","document/60.llm/02.prompt-engineering/03.few-shot",{"title":2606,"path":2607,"stem":2608},"结构化输出与任务拆分","/document/llm/prompt-engineering/structured-output-and-complex-tasks","document/60.llm/02.prompt-engineering/04.structured-output-and-complex-tasks",{"title":2610,"path":2611,"stem":2612,"children":2613},"上下文工程与实践","/document/llm/context-engineering","document/60.llm/03.context-engineering/01.index",[2614,2616],{"title":2615,"path":2611,"stem":2612},"上下文工程基础",{"title":2617,"path":2618,"stem":2619},"提示词测试与优化","/document/llm/context-engineering/prompt-testing-and-optimization","document/60.llm/03.context-engineering/02.prompt-testing-and-optimization",{"title":2621,"icon":2622,"path":2623,"stem":2624,"children":2625,"page":44},"AI SDK","i-lucide-code-xml","/document/ai-sdk","document/61.ai-sdk",[2626,2645,2662],{"title":2627,"path":2628,"stem":2629,"children":2630},"基础调用","/document/ai-sdk/guide","document/61.ai-sdk/01.guide/01.index",[2631,2633,2637,2641],{"title":2632,"path":2628,"stem":2629},"AI SDK 简介",{"title":2634,"path":2635,"stem":2636},"文本生成与参数","/document/ai-sdk/guide/text-generation","document/61.ai-sdk/01.guide/02.text-generation",{"title":2638,"path":2639,"stem":2640},"消息管理与多轮对话","/document/ai-sdk/guide/conversation","document/61.ai-sdk/01.guide/03.conversation",{"title":2642,"path":2643,"stem":2644},"流式输出","/document/ai-sdk/guide/streaming","document/61.ai-sdk/01.guide/04.streaming",{"title":2646,"path":2647,"stem":2648,"children":2649,"page":44},"模型能力与接入","/document/ai-sdk/capabilities","document/61.ai-sdk/02.capabilities",[2650,2654,2658],{"title":2651,"path":2652,"stem":2653},"结构化输出","/document/ai-sdk/capabilities/structured-output","document/61.ai-sdk/02.capabilities/05.structured-output",{"title":2655,"path":2656,"stem":2657},"Function Calling","/document/ai-sdk/capabilities/function-calling","document/61.ai-sdk/02.capabilities/06.function-calling",{"title":2659,"path":2660,"stem":2661},"多模态输入","/document/ai-sdk/capabilities/multimodal","document/61.ai-sdk/02.capabilities/07.multimodal",{"title":2663,"path":2664,"stem":2665,"children":2666,"page":44},"应用开发实战","/document/ai-sdk/application","document/61.ai-sdk/03.application",[2667,2671],{"title":2668,"path":2669,"stem":2670},"AI 服务接口","/document/ai-sdk/application/express-api","document/61.ai-sdk/03.application/08.express-api",{"title":2672,"path":2673,"stem":2674},"对话历史持久化","/document/ai-sdk/application/persistence","document/61.ai-sdk/03.application/09.persistence",{"title":2676,"icon":2677,"path":2678,"stem":2679,"children":2680,"page":44},"RAG（检索增强生成）","i-lucide-book-open-check","/document/rag","document/62.rag",[2681,2696,2717],{"title":2682,"path":2683,"stem":2684,"children":2685},"RAG 基础与实现","/document/rag/guide","document/62.rag/01.guide/01.index",[2686,2688,2692],{"title":2687,"path":2683,"stem":2684},"RAG 概览",{"title":2689,"path":2690,"stem":2691},"第一个 RAG 应用","/document/rag/guide/first-rag","document/62.rag/01.guide/02.first-rag",{"title":2693,"path":2694,"stem":2695},"文档加载与切分","/document/rag/guide/document-chunking","document/62.rag/01.guide/03.document-chunking",{"title":2697,"path":2698,"stem":2699,"children":2700,"page":44},"知识库与检索","/document/rag/knowledge-retrieval","document/62.rag/02.knowledge-retrieval",[2701,2705,2709,2713],{"title":2702,"path":2703,"stem":2704},"向量数据库","/document/rag/knowledge-retrieval/vector-database","document/62.rag/02.knowledge-retrieval/01.vector-database",{"title":2706,"path":2707,"stem":2708},"相似度检索","/document/rag/knowledge-retrieval/similarity-search","document/62.rag/02.knowledge-retrieval/02.similarity-search",{"title":2710,"path":2711,"stem":2712},"检索与回答","/document/rag/knowledge-retrieval/grounded-answer","document/62.rag/02.knowledge-retrieval/03.grounded-answer",{"title":2714,"path":2715,"stem":2716},"多轮 RAG","/document/rag/knowledge-retrieval/conversational-rag","document/62.rag/02.knowledge-retrieval/04.conversational-rag",{"title":2718,"path":2719,"stem":2720,"children":2721,"page":44},"管理与优化","/document/rag/management-optimization","document/62.rag/03.management-optimization",[2722,2726,2730,2734,2738],{"title":2723,"path":2724,"stem":2725},"知识库维护","/document/rag/management-optimization/knowledge-maintenance","document/62.rag/03.management-optimization/01.knowledge-maintenance",{"title":2727,"path":2728,"stem":2729},"RAG 效果评估","/document/rag/management-optimization/rag-evaluation","document/62.rag/03.management-optimization/02.rag-evaluation",{"title":2731,"path":2732,"stem":2733},"混合检索","/document/rag/management-optimization/retrieval-optimization","document/62.rag/03.management-optimization/03.retrieval-optimization",{"title":2735,"path":2736,"stem":2737},"RRF 排名融合","/document/rag/management-optimization/retrieval-reranking","document/62.rag/03.management-optimization/04.retrieval-reranking",{"title":2739,"path":2740,"stem":2741},"Reranker 重排序","/document/rag/management-optimization/reranker","document/62.rag/03.management-optimization/05.reranker",{"title":2743,"icon":2744,"path":2745,"stem":2746,"children":2747,"page":44},"MCP","i-lucide-plug","/document/mcp","document/63.mcp",[2748,2759,2776],{"title":2749,"path":2750,"stem":2751,"children":2752},"MCP 基础","/document/mcp/guide","document/63.mcp/01.guide/01.index",[2753,2755],{"title":2754,"path":2750,"stem":2751},"MCP 概览",{"title":2756,"path":2757,"stem":2758},"第一个 MCP Server","/document/mcp/guide/first-server","document/63.mcp/01.guide/02.first-server",{"title":2760,"path":2761,"stem":2762,"children":2763,"page":44},"MCP Server 开发","/document/mcp/server","document/63.mcp/02.server",[2764,2768,2772],{"title":2765,"path":2766,"stem":2767},"Tools 工具","/document/mcp/server/tools","document/63.mcp/02.server/01.tools",{"title":2769,"path":2770,"stem":2771},"Resources 资源","/document/mcp/server/resources","document/63.mcp/02.server/02.resources",{"title":2773,"path":2774,"stem":2775},"Prompts 提示词","/document/mcp/server/prompts","document/63.mcp/02.server/03.prompts",{"title":2777,"path":2778,"stem":2779,"children":2780,"page":44},"MCP 应用集成","/document/mcp/integration","document/63.mcp/03.integration",[2781,2785],{"title":2782,"path":2783,"stem":2784},"MCP 与 AI 应用集成","/document/mcp/integration/ai-integration","document/63.mcp/03.integration/03.ai-integration",{"title":2786,"path":2787,"stem":2788},"MCP 认证与授权","/document/mcp/integration/auth-deployment","document/63.mcp/03.integration/04.auth-deployment",{"title":2790,"icon":2791,"path":2792,"stem":2793,"children":2794,"page":44},"LangChain","i-lucide-bot","/document/ai-agent","document/64.ai-agent",[2795,2806,2820],{"title":2796,"path":2797,"stem":2798,"children":2799},"Agent 基础","/document/ai-agent/guide","document/64.ai-agent/01.guide/01.index",[2800,2802],{"title":2801,"path":2797,"stem":2798},"AI Agent 概览",{"title":2803,"path":2804,"stem":2805},"Agent Loop","/document/ai-agent/guide/agent-loop","document/64.ai-agent/01.guide/02.agent-loop",{"title":2807,"path":2808,"stem":2809,"children":2810},"Agent 开发","/document/ai-agent/langchain","document/64.ai-agent/02.langchain/01.index",[2811,2813,2817],{"title":2812,"path":2808,"stem":2809},"第一个 LangChain Agent",{"title":2814,"path":2815,"stem":2816},"RAG 与 MCP 集成","/document/ai-agent/langchain/rag-mcp","document/64.ai-agent/02.langchain/02.rag-mcp",{"title":2642,"path":2818,"stem":2819},"/document/ai-agent/langchain/streaming","document/64.ai-agent/02.langchain/03.streaming",{"title":2821,"path":2822,"stem":2823,"children":2824},"Agent 进阶","/document/ai-agent/advanced","document/64.ai-agent/03.advanced/01.index",[2825,2827,2831],{"title":2826,"path":2822,"stem":2823},"短期记忆",{"title":2828,"path":2829,"stem":2830},"长期记忆","/document/ai-agent/advanced/long-term-memory","document/64.ai-agent/03.advanced/02.long-term-memory",{"title":2832,"path":2833,"stem":2834},"Middleware 与执行控制","/document/ai-agent/advanced/middleware","document/64.ai-agent/03.advanced/03.middleware",{"title":2836,"icon":2837,"path":2838,"stem":2839,"children":2840,"page":44},"LangGraph","i-lucide-workflow","/document/langgraph","document/65.langgraph",[2841,2855,2870],{"title":2842,"path":2843,"stem":2844,"children":2845,"icon":1922},"LangGraph 基础","/document/langgraph/guide","document/65.langgraph/01.guide/01.index",[2846,2848,2852],{"title":2847,"path":2843,"stem":2844},"LangGraph 概览",{"title":2849,"path":2850,"stem":2851},"第一个工作流","/document/langgraph/guide/first-workflow","document/65.langgraph/01.guide/02.first-workflow",{"title":726,"path":2853,"stem":2854},"/document/langgraph/guide/state","document/65.langgraph/01.guide/03.state",{"title":2856,"path":2857,"stem":2858,"children":2859,"icon":2837},"工作流编排","/document/langgraph/workflow","document/65.langgraph/02.workflow/01.index",[2860,2862,2866],{"title":2861,"path":2857,"stem":2858},"条件分支与循环",{"title":2863,"path":2864,"stem":2865},"并行执行","/document/langgraph/workflow/parallel","document/65.langgraph/02.workflow/02.parallel",{"title":2867,"path":2868,"stem":2869},"子图与流程复用","/document/langgraph/workflow/subgraphs","document/65.langgraph/02.workflow/03.subgraphs",{"title":2871,"path":2872,"stem":2873,"children":2874,"icon":1605},"LangGraph 进阶","/document/langgraph/advanced","document/65.langgraph/03.advanced/01.index",[2875,2877],{"title":2876,"path":2872,"stem":2873},"状态持久化",{"title":2878,"path":2879,"stem":2880},"中断与恢复","/document/langgraph/advanced/interrupts","document/65.langgraph/03.advanced/02.interrupts",{"title":2882,"icon":2883,"path":2884,"stem":2885,"children":2886,"page":44},"AI 安全","i-lucide-shield-check","/document/ai-security","document/66.ai-security",[2887,2902,2921],{"title":2888,"path":2889,"stem":2890,"children":2891,"icon":1922},"AI 安全基础","/document/ai-security/guide","document/66.ai-security/01.guide/01.index",[2892,2894,2898],{"title":2893,"path":2889,"stem":2890},"AI 安全概览",{"title":2895,"path":2896,"stem":2897},"提示词注入","/document/ai-security/guide/prompt-injection","document/66.ai-security/01.guide/02.prompt-injection",{"title":2899,"path":2900,"stem":2901},"敏感数据保护","/document/ai-security/guide/sensitive-data","document/66.ai-security/01.guide/03.sensitive-data",{"title":2903,"path":2904,"stem":2905,"children":2906,"icon":2883},"AI 应用安全防护","/document/ai-security/protection","document/66.ai-security/02.protection/01.index",[2907,2909,2913,2917],{"title":2908,"path":2904,"stem":2905},"输入安全与内容审核",{"title":2910,"path":2911,"stem":2912},"模型输出安全","/document/ai-security/protection/output-safety","document/66.ai-security/02.protection/02.output-safety",{"title":2914,"path":2915,"stem":2916},"资源消耗防护","/document/ai-security/protection/resource-protection","document/66.ai-security/02.protection/03.resource-protection",{"title":2918,"path":2919,"stem":2920},"Token 与成本控制","/document/ai-security/protection/token-cost","document/66.ai-security/02.protection/04.token-cost",{"title":2922,"path":2923,"stem":2924,"children":2925,"icon":2944},"高级安全防护","/document/ai-security/advanced","document/66.ai-security/03.advanced/01.index",[2926,2928,2932,2936,2940],{"title":2927,"path":2923,"stem":2924},"RAG 安全",{"title":2929,"path":2930,"stem":2931},"MCP 安全","/document/ai-security/advanced/mcp-security","document/66.ai-security/03.advanced/02.mcp-security",{"title":2933,"path":2934,"stem":2935},"Agent 权限与执行安全","/document/ai-security/advanced/agent-execution","document/66.ai-security/03.advanced/03.agent-execution",{"title":2937,"path":2938,"stem":2939},"Agent 记忆与上下文安全","/document/ai-security/advanced/agent-context","document/66.ai-security/03.advanced/04.agent-context",{"title":2941,"path":2942,"stem":2943},"AI 安全测试","/document/ai-security/advanced/security-testing","document/66.ai-security/03.advanced/05.security-testing","i-lucide-lock-keyhole",{"id":2946,"title":2929,"body":2947,"description":7255,"extension":7256,"links":7257,"meta":7258,"navigation":7259,"path":2930,"seo":7260,"stem":2931,"__hash__":7261},"docs/document/66.ai-security/03.advanced/02.mcp-security.md",{"type":2948,"value":2949,"toc":7233},"minimal",[2950,2955,2959,2962,2966,2969,2972,3022,3025,3028,3034,3036,3040,3043,3086,3090,3097,3151,3158,3162,3165,3196,3203,4349,4352,4365,4376,4382,4386,4392,4705,4707,4711,4714,4720,4982,4989,5004,5010,5013,5016,5019,5025,5396,5411,5414,5420,5755,5761,5781,5787,5790,5792,5796,5799,5858,5861,5864,5870,6093,6099,6232,6242,6245,6252,6258,6467,6473,6499,6505,6648,6657,6660,6663,6669,7015,7020,7035,7048,7058,7085,7092,7123,7126,7141,7144,7151,7156,7159,7161,7165,7168,7171,7178,7181,7183,7187,7193,7196,7198,7202,7215,7224,7226,7229],[2951,2952,2954],"h2",{"id":2953},"引言","🎯 引言",[2956,2957,2958],"p",{},"文档助手只需要查询文档，但接入 MCP Server 后，可能同时获得删除文档的工具；如果连接了不可信的服务，还可能泄露业务数据。本文使用 Streamable HTTP，学习如何限制服务地址和工具调用范围、识别工具定义变更，以及正确使用 MCP 访问令牌。",[2960,2961],"hr",{},[2951,2963,2965],{"id":2964},"mcp-server-接入安全","🧱 MCP Server 接入安全",[2956,2967,2968],{},"MCP Client 会向服务端发送工具调用参数，因此连接错了服务，不仅可能获得恶意工具，还可能泄露业务数据。",[2956,2970,2971],{},"假设文档助手只允许连接公司的文档服务：",[2973,2974,2975,2988],"table",{},[2976,2977,2978],"thead",{},[2979,2980,2981,2985],"tr",{},[2982,2983,2984],"th",{},"MCP 地址（示例）",[2982,2986,2987],{},"是否允许连接",[2989,2990,2991,3003,3013],"tbody",{},[2979,2992,2993,3000],{},[2994,2995,2996],"td",{},[2997,2998,2999],"code",{},"https://mcp.example.com/mcp",[2994,3001,3002],{},"已批准，允许连接",[2979,3004,3005,3010],{},[2994,3006,3007],{},[2997,3008,3009],{},"https://unknown.example.com/mcp",[2994,3011,3012],{},"未批准，拒绝连接",[2979,3014,3015,3020],{},[2994,3016,3017],{},[2997,3018,3019],{},"http://192.168.1.100/mcp",[2994,3021,3012],{},[2956,3023,3024],{},"将完整的 MCP 地址保存在服务端配置中，由应用决定连接目标，不使用模型生成的 URL。生产环境使用 HTTPS 并验证服务端证书。",[2956,3026,3027],{},"如果允许用户自行填写 MCP 地址，应用可能被诱导请求内部业务服务。这类攻击称为 SSRF（服务端请求伪造）。仅检查域名并不够，因为域名也可能解析到内网 IP。",[3029,3030,3031],"tip",{},[2956,3032,3033],{},"动态接入时，应通过网络出口策略限制实际可访问的 IP 和端口，并对重定向及 OAuth 自动发现的后续请求执行同样的限制。",[2960,3035],{},[2951,3037,3039],{"id":3038},"创建实验服务","🛠 创建实验服务",[2956,3041,3042],{},"以文档助手为例，客户端只应允许读取文档，但服务端同时提供两个工具：",[2973,3044,3045,3058],{},[2976,3046,3047],{},[2979,3048,3049,3052,3055],{},[2982,3050,3051],{},"工具",[2982,3053,3054],{},"功能",[2982,3056,3057],{},"客户端策略",[2989,3059,3060,3073],{},[2979,3061,3062,3067,3070],{},[2994,3063,3064],{},[2997,3065,3066],{},"read_document",[2994,3068,3069],{},"读取文档",[2994,3071,3072],{},"允许",[2979,3074,3075,3080,3083],{},[2994,3076,3077],{},[2997,3078,3079],{},"delete_document",[2994,3081,3082],{},"模拟删除文档",[2994,3084,3085],{},"拒绝",[3087,3088,3089],"h3",{"id":3089},"工具注释",[2956,3091,3092,3093,3096],{},"工具定义中的 ",[2997,3094,3095],{},"annotations"," 是服务端提供的行为提示，可用于展示风险，但不能用于授予权限。",[2973,3098,3099,3109],{},[2976,3100,3101],{},[2979,3102,3103,3106],{},[2982,3104,3105],{},"属性",[2982,3107,3108],{},"服务器声明的含义",[2989,3110,3111,3121,3131,3141],{},[2979,3112,3113,3118],{},[2994,3114,3115],{},[2997,3116,3117],{},"readOnlyHint",[2994,3119,3120],{},"是否只读，不修改环境",[2979,3122,3123,3128],{},[2994,3124,3125],{},[2997,3126,3127],{},"destructiveHint",[2994,3129,3130],{},"非只读操作是否可能具有破坏性",[2979,3132,3133,3138],{},[2994,3134,3135],{},[2997,3136,3137],{},"idempotentHint",[2994,3139,3140],{},"非只读工具使用相同参数重复调用是否不产生额外影响",[2979,3142,3143,3148],{},[2994,3144,3145],{},[2997,3146,3147],{},"openWorldHint",[2994,3149,3150],{},"是否与外部环境交互",[2956,3152,3153,3154,3157],{},"例如，下面的删除工具故意声明 ",[2997,3155,3156],{},"readOnlyHint: true","，用来验证客户端不会仅凭注释开放工具。",[3087,3159,3161],{"id":3160},"创建-mcp-server","创建 MCP Server",[2956,3163,3164],{},"使用 Node.js 22、MCP TypeScript SDK 1.26.0、Express 5.1.0 和 Zod 3.25.76（用于后面的 Schema 变更实验），在独立目录安装依赖：",[3166,3167,3172],"pre",{"className":3168,"code":3169,"language":3170,"meta":3171,"style":3171},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @modelcontextprotocol/sdk@1.26.0 express@5.1.0 zod@3.25.76\n","bash","",[2997,3173,3174],{"__ignoreMap":3171},[3175,3176,3179,3183,3187,3190,3193],"span",{"class":3177,"line":3178},"line",1,[3175,3180,3182],{"class":3181},"sYGMc","npm",[3175,3184,3186],{"class":3185},"sIEYB"," install",[3175,3188,3189],{"class":3185}," @modelcontextprotocol/sdk@1.26.0",[3175,3191,3192],{"class":3185}," express@5.1.0",[3175,3194,3195],{"class":3185}," zod@3.25.76\n",[2956,3197,3198,3199,3202],{},"创建 ",[2997,3200,3201],{},"server.mjs","。使用无状态 Streamable HTTP，删除工具只打印调用记录并返回测试文本，不会删除真实数据。",[3166,3204,3208],{"className":3205,"code":3206,"language":3207,"meta":3171,"style":3171},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import express from 'express';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';\n\nconst app = express();\napp.use(express.json());\n\nfunction createServer() {\n    const server = new McpServer({\n        name: 'document-server',\n        version: '1.0.0'\n    });\n\n    server.registerTool('read_document', {\n        description: '读取文档',\n        inputSchema: {},\n        annotations: { readOnlyHint: true }\n    }, async () => {\n        return {\n            content: [{ type: 'text', text: '文档内容：MCP 使用指南' }]\n        };\n    });\n\n    server.registerTool('delete_document', {\n        description: '删除文档',\n        inputSchema: {},\n        annotations: { readOnlyHint: true }\n    }, async () => {\n        console.log('收到删除工具调用');\n        return {\n            content: [{ type: 'text', text: '删除工具被调用（仅模拟）' }]\n        };\n    });\n\n    return server;\n}\n\napp.post('/mcp', async (req, res) => {\n    // 仅接受本机实验地址，拒绝其他 Host 和浏览器来源。\n    if (req.get('Host') !== '127.0.0.1:3000') {\n        return res.sendStatus(403);\n    }\n\n    const origin = req.get('Origin');\n    if (origin && origin !== 'http://127.0.0.1:3000') {\n        return res.sendStatus(403);\n    }\n\n    // 无状态模式：每次请求使用独立实例。\n    const server = createServer();\n    const transport = new StreamableHTTPServerTransport({\n        sessionIdGenerator: undefined,\n        enableJsonResponse: true\n    });\n\n    res.on('close', () => {\n        void server.close();\n    });\n\n    await server.connect(transport);\n    await transport.handleRequest(req, res, req.body);\n});\n\napp.all('/mcp', (req, res) => {\n    res.set('Allow', 'POST').sendStatus(405);\n});\n\napp.listen(3000, '127.0.0.1', () => {\n    console.log('MCP Server: http://127.0.0.1:3000/mcp');\n});\n","js",[2997,3209,3210,3236,3262,3285,3292,3314,3339,3344,3358,3382,3401,3417,3428,3433,3457,3473,3484,3506,3523,3531,3576,3582,3591,3596,3617,3633,3642,3659,3672,3696,3703,3741,3746,3755,3760,3770,3776,3781,3822,3829,3870,3892,3898,3903,3933,3962,3981,3986,3991,3997,4012,4030,4041,4052,4061,4066,4094,4110,4119,4124,4146,4179,4189,4194,4228,4271,4280,4285,4317,4340],{"__ignoreMap":3171},[3175,3211,3212,3216,3220,3223,3227,3230,3233],{"class":3177,"line":3178},[3175,3213,3215],{"class":3214},"s8pZq","import",[3175,3217,3219],{"class":3218},"sndM8"," express ",[3175,3221,3222],{"class":3214},"from",[3175,3224,3226],{"class":3225},"s86vT"," '",[3175,3228,3229],{"class":3185},"express",[3175,3231,3232],{"class":3225},"'",[3175,3234,3235],{"class":3225},";\n",[3175,3237,3239,3241,3244,3247,3250,3253,3255,3258,3260],{"class":3177,"line":3238},2,[3175,3240,3215],{"class":3214},[3175,3242,3243],{"class":3225}," {",[3175,3245,3246],{"class":3218}," McpServer",[3175,3248,3249],{"class":3225}," }",[3175,3251,3252],{"class":3214}," from",[3175,3254,3226],{"class":3225},[3175,3256,3257],{"class":3185},"@modelcontextprotocol/sdk/server/mcp.js",[3175,3259,3232],{"class":3225},[3175,3261,3235],{"class":3225},[3175,3263,3265,3267,3269,3272,3274,3276,3278,3281,3283],{"class":3177,"line":3264},3,[3175,3266,3215],{"class":3214},[3175,3268,3243],{"class":3225},[3175,3270,3271],{"class":3218}," StreamableHTTPServerTransport",[3175,3273,3249],{"class":3225},[3175,3275,3252],{"class":3214},[3175,3277,3226],{"class":3225},[3175,3279,3280],{"class":3185},"@modelcontextprotocol/sdk/server/streamableHttp.js",[3175,3282,3232],{"class":3225},[3175,3284,3235],{"class":3225},[3175,3286,3288],{"class":3177,"line":3287},4,[3175,3289,3291],{"emptyLinePlaceholder":3290},true,"\n",[3175,3293,3295,3299,3302,3305,3309,3312],{"class":3177,"line":3294},5,[3175,3296,3298],{"class":3297},"s50WR","const",[3175,3300,3301],{"class":3218}," app ",[3175,3303,3304],{"class":3225},"=",[3175,3306,3308],{"class":3307},"swgpB"," express",[3175,3310,3311],{"class":3218},"()",[3175,3313,3235],{"class":3225},[3175,3315,3317,3320,3323,3326,3329,3331,3334,3337],{"class":3177,"line":3316},6,[3175,3318,3319],{"class":3218},"app",[3175,3321,3322],{"class":3225},".",[3175,3324,3325],{"class":3307},"use",[3175,3327,3328],{"class":3218},"(express",[3175,3330,3322],{"class":3225},[3175,3332,3333],{"class":3307},"json",[3175,3335,3336],{"class":3218},"())",[3175,3338,3235],{"class":3225},[3175,3340,3342],{"class":3177,"line":3341},7,[3175,3343,3291],{"emptyLinePlaceholder":3290},[3175,3345,3347,3350,3353,3355],{"class":3177,"line":3346},8,[3175,3348,3349],{"class":3297},"function",[3175,3351,3352],{"class":3307}," createServer",[3175,3354,3311],{"class":3225},[3175,3356,3357],{"class":3225}," {\n",[3175,3359,3361,3364,3367,3370,3373,3375,3379],{"class":3177,"line":3360},9,[3175,3362,3363],{"class":3297},"    const",[3175,3365,3366],{"class":3218}," server",[3175,3368,3369],{"class":3225}," =",[3175,3371,3372],{"class":3225}," new",[3175,3374,3246],{"class":3307},[3175,3376,3378],{"class":3377},"sd2Uz","(",[3175,3380,3381],{"class":3225},"{\n",[3175,3383,3385,3388,3391,3393,3396,3398],{"class":3177,"line":3384},10,[3175,3386,3387],{"class":3377},"        name",[3175,3389,3390],{"class":3225},":",[3175,3392,3226],{"class":3225},[3175,3394,3395],{"class":3185},"document-server",[3175,3397,3232],{"class":3225},[3175,3399,3400],{"class":3225},",\n",[3175,3402,3404,3407,3409,3411,3414],{"class":3177,"line":3403},11,[3175,3405,3406],{"class":3377},"        version",[3175,3408,3390],{"class":3225},[3175,3410,3226],{"class":3225},[3175,3412,3413],{"class":3185},"1.0.0",[3175,3415,3416],{"class":3225},"'\n",[3175,3418,3420,3423,3426],{"class":3177,"line":3419},12,[3175,3421,3422],{"class":3225},"    }",[3175,3424,3425],{"class":3377},")",[3175,3427,3235],{"class":3225},[3175,3429,3431],{"class":3177,"line":3430},13,[3175,3432,3291],{"emptyLinePlaceholder":3290},[3175,3434,3436,3439,3441,3444,3446,3448,3450,3452,3455],{"class":3177,"line":3435},14,[3175,3437,3438],{"class":3218},"    server",[3175,3440,3322],{"class":3225},[3175,3442,3443],{"class":3307},"registerTool",[3175,3445,3378],{"class":3377},[3175,3447,3232],{"class":3225},[3175,3449,3066],{"class":3185},[3175,3451,3232],{"class":3225},[3175,3453,3454],{"class":3225},",",[3175,3456,3357],{"class":3225},[3175,3458,3460,3463,3465,3467,3469,3471],{"class":3177,"line":3459},15,[3175,3461,3462],{"class":3377},"        description",[3175,3464,3390],{"class":3225},[3175,3466,3226],{"class":3225},[3175,3468,3069],{"class":3185},[3175,3470,3232],{"class":3225},[3175,3472,3400],{"class":3225},[3175,3474,3476,3479,3481],{"class":3177,"line":3475},16,[3175,3477,3478],{"class":3377},"        inputSchema",[3175,3480,3390],{"class":3225},[3175,3482,3483],{"class":3225}," {},\n",[3175,3485,3487,3490,3492,3494,3497,3499,3503],{"class":3177,"line":3486},17,[3175,3488,3489],{"class":3377},"        annotations",[3175,3491,3390],{"class":3225},[3175,3493,3243],{"class":3225},[3175,3495,3496],{"class":3377}," readOnlyHint",[3175,3498,3390],{"class":3225},[3175,3500,3502],{"class":3501},"sPKOg"," true",[3175,3504,3505],{"class":3225}," }\n",[3175,3507,3509,3512,3515,3518,3521],{"class":3177,"line":3508},18,[3175,3510,3511],{"class":3225},"    },",[3175,3513,3514],{"class":3297}," async",[3175,3516,3517],{"class":3225}," ()",[3175,3519,3520],{"class":3297}," =>",[3175,3522,3357],{"class":3225},[3175,3524,3526,3529],{"class":3177,"line":3525},19,[3175,3527,3528],{"class":3214},"        return",[3175,3530,3357],{"class":3225},[3175,3532,3534,3537,3539,3542,3545,3548,3550,3552,3555,3557,3559,3562,3564,3566,3569,3571,3573],{"class":3177,"line":3533},20,[3175,3535,3536],{"class":3377},"            content",[3175,3538,3390],{"class":3225},[3175,3540,3541],{"class":3377}," [",[3175,3543,3544],{"class":3225},"{",[3175,3546,3547],{"class":3377}," type",[3175,3549,3390],{"class":3225},[3175,3551,3226],{"class":3225},[3175,3553,3554],{"class":3185},"text",[3175,3556,3232],{"class":3225},[3175,3558,3454],{"class":3225},[3175,3560,3561],{"class":3377}," text",[3175,3563,3390],{"class":3225},[3175,3565,3226],{"class":3225},[3175,3567,3568],{"class":3185},"文档内容：MCP 使用指南",[3175,3570,3232],{"class":3225},[3175,3572,3249],{"class":3225},[3175,3574,3575],{"class":3377},"]\n",[3175,3577,3579],{"class":3177,"line":3578},21,[3175,3580,3581],{"class":3225},"        };\n",[3175,3583,3585,3587,3589],{"class":3177,"line":3584},22,[3175,3586,3422],{"class":3225},[3175,3588,3425],{"class":3377},[3175,3590,3235],{"class":3225},[3175,3592,3594],{"class":3177,"line":3593},23,[3175,3595,3291],{"emptyLinePlaceholder":3290},[3175,3597,3599,3601,3603,3605,3607,3609,3611,3613,3615],{"class":3177,"line":3598},24,[3175,3600,3438],{"class":3218},[3175,3602,3322],{"class":3225},[3175,3604,3443],{"class":3307},[3175,3606,3378],{"class":3377},[3175,3608,3232],{"class":3225},[3175,3610,3079],{"class":3185},[3175,3612,3232],{"class":3225},[3175,3614,3454],{"class":3225},[3175,3616,3357],{"class":3225},[3175,3618,3620,3622,3624,3626,3629,3631],{"class":3177,"line":3619},25,[3175,3621,3462],{"class":3377},[3175,3623,3390],{"class":3225},[3175,3625,3226],{"class":3225},[3175,3627,3628],{"class":3185},"删除文档",[3175,3630,3232],{"class":3225},[3175,3632,3400],{"class":3225},[3175,3634,3636,3638,3640],{"class":3177,"line":3635},26,[3175,3637,3478],{"class":3377},[3175,3639,3390],{"class":3225},[3175,3641,3483],{"class":3225},[3175,3643,3645,3647,3649,3651,3653,3655,3657],{"class":3177,"line":3644},27,[3175,3646,3489],{"class":3377},[3175,3648,3390],{"class":3225},[3175,3650,3243],{"class":3225},[3175,3652,3496],{"class":3377},[3175,3654,3390],{"class":3225},[3175,3656,3502],{"class":3501},[3175,3658,3505],{"class":3225},[3175,3660,3662,3664,3666,3668,3670],{"class":3177,"line":3661},28,[3175,3663,3511],{"class":3225},[3175,3665,3514],{"class":3297},[3175,3667,3517],{"class":3225},[3175,3669,3520],{"class":3297},[3175,3671,3357],{"class":3225},[3175,3673,3675,3678,3680,3683,3685,3687,3690,3692,3694],{"class":3177,"line":3674},29,[3175,3676,3677],{"class":3218},"        console",[3175,3679,3322],{"class":3225},[3175,3681,3682],{"class":3307},"log",[3175,3684,3378],{"class":3377},[3175,3686,3232],{"class":3225},[3175,3688,3689],{"class":3185},"收到删除工具调用",[3175,3691,3232],{"class":3225},[3175,3693,3425],{"class":3377},[3175,3695,3235],{"class":3225},[3175,3697,3699,3701],{"class":3177,"line":3698},30,[3175,3700,3528],{"class":3214},[3175,3702,3357],{"class":3225},[3175,3704,3706,3708,3710,3712,3714,3716,3718,3720,3722,3724,3726,3728,3730,3732,3735,3737,3739],{"class":3177,"line":3705},31,[3175,3707,3536],{"class":3377},[3175,3709,3390],{"class":3225},[3175,3711,3541],{"class":3377},[3175,3713,3544],{"class":3225},[3175,3715,3547],{"class":3377},[3175,3717,3390],{"class":3225},[3175,3719,3226],{"class":3225},[3175,3721,3554],{"class":3185},[3175,3723,3232],{"class":3225},[3175,3725,3454],{"class":3225},[3175,3727,3561],{"class":3377},[3175,3729,3390],{"class":3225},[3175,3731,3226],{"class":3225},[3175,3733,3734],{"class":3185},"删除工具被调用（仅模拟）",[3175,3736,3232],{"class":3225},[3175,3738,3249],{"class":3225},[3175,3740,3575],{"class":3377},[3175,3742,3744],{"class":3177,"line":3743},32,[3175,3745,3581],{"class":3225},[3175,3747,3749,3751,3753],{"class":3177,"line":3748},33,[3175,3750,3422],{"class":3225},[3175,3752,3425],{"class":3377},[3175,3754,3235],{"class":3225},[3175,3756,3758],{"class":3177,"line":3757},34,[3175,3759,3291],{"emptyLinePlaceholder":3290},[3175,3761,3763,3766,3768],{"class":3177,"line":3762},35,[3175,3764,3765],{"class":3214},"    return",[3175,3767,3366],{"class":3218},[3175,3769,3235],{"class":3225},[3175,3771,3773],{"class":3177,"line":3772},36,[3175,3774,3775],{"class":3225},"}\n",[3175,3777,3779],{"class":3177,"line":3778},37,[3175,3780,3291],{"emptyLinePlaceholder":3290},[3175,3782,3784,3786,3788,3791,3793,3795,3798,3800,3802,3804,3807,3811,3813,3816,3818,3820],{"class":3177,"line":3783},38,[3175,3785,3319],{"class":3218},[3175,3787,3322],{"class":3225},[3175,3789,3790],{"class":3307},"post",[3175,3792,3378],{"class":3218},[3175,3794,3232],{"class":3225},[3175,3796,3797],{"class":3185},"/mcp",[3175,3799,3232],{"class":3225},[3175,3801,3454],{"class":3225},[3175,3803,3514],{"class":3297},[3175,3805,3806],{"class":3225}," (",[3175,3808,3810],{"class":3809},"sK9QF","req",[3175,3812,3454],{"class":3225},[3175,3814,3815],{"class":3809}," res",[3175,3817,3425],{"class":3225},[3175,3819,3520],{"class":3297},[3175,3821,3357],{"class":3225},[3175,3823,3825],{"class":3177,"line":3824},39,[3175,3826,3828],{"class":3827},"syuKq","    // 仅接受本机实验地址，拒绝其他 Host 和浏览器来源。\n",[3175,3830,3832,3835,3837,3839,3841,3844,3846,3848,3851,3853,3856,3859,3861,3864,3866,3868],{"class":3177,"line":3831},40,[3175,3833,3834],{"class":3214},"    if",[3175,3836,3806],{"class":3377},[3175,3838,3810],{"class":3218},[3175,3840,3322],{"class":3225},[3175,3842,3843],{"class":3307},"get",[3175,3845,3378],{"class":3377},[3175,3847,3232],{"class":3225},[3175,3849,3850],{"class":3185},"Host",[3175,3852,3232],{"class":3225},[3175,3854,3855],{"class":3377},") ",[3175,3857,3858],{"class":3225},"!==",[3175,3860,3226],{"class":3225},[3175,3862,3863],{"class":3185},"127.0.0.1:3000",[3175,3865,3232],{"class":3225},[3175,3867,3855],{"class":3377},[3175,3869,3381],{"class":3225},[3175,3871,3873,3875,3877,3879,3882,3884,3888,3890],{"class":3177,"line":3872},41,[3175,3874,3528],{"class":3214},[3175,3876,3815],{"class":3218},[3175,3878,3322],{"class":3225},[3175,3880,3881],{"class":3307},"sendStatus",[3175,3883,3378],{"class":3377},[3175,3885,3887],{"class":3886},"smPcV","403",[3175,3889,3425],{"class":3377},[3175,3891,3235],{"class":3225},[3175,3893,3895],{"class":3177,"line":3894},42,[3175,3896,3897],{"class":3225},"    }\n",[3175,3899,3901],{"class":3177,"line":3900},43,[3175,3902,3291],{"emptyLinePlaceholder":3290},[3175,3904,3906,3908,3911,3913,3916,3918,3920,3922,3924,3927,3929,3931],{"class":3177,"line":3905},44,[3175,3907,3363],{"class":3297},[3175,3909,3910],{"class":3218}," origin",[3175,3912,3369],{"class":3225},[3175,3914,3915],{"class":3218}," req",[3175,3917,3322],{"class":3225},[3175,3919,3843],{"class":3307},[3175,3921,3378],{"class":3377},[3175,3923,3232],{"class":3225},[3175,3925,3926],{"class":3185},"Origin",[3175,3928,3232],{"class":3225},[3175,3930,3425],{"class":3377},[3175,3932,3235],{"class":3225},[3175,3934,3936,3938,3940,3943,3946,3948,3951,3953,3956,3958,3960],{"class":3177,"line":3935},45,[3175,3937,3834],{"class":3214},[3175,3939,3806],{"class":3377},[3175,3941,3942],{"class":3218},"origin",[3175,3944,3945],{"class":3225}," &&",[3175,3947,3910],{"class":3218},[3175,3949,3950],{"class":3225}," !==",[3175,3952,3226],{"class":3225},[3175,3954,3955],{"class":3185},"http://127.0.0.1:3000",[3175,3957,3232],{"class":3225},[3175,3959,3855],{"class":3377},[3175,3961,3381],{"class":3225},[3175,3963,3965,3967,3969,3971,3973,3975,3977,3979],{"class":3177,"line":3964},46,[3175,3966,3528],{"class":3214},[3175,3968,3815],{"class":3218},[3175,3970,3322],{"class":3225},[3175,3972,3881],{"class":3307},[3175,3974,3378],{"class":3377},[3175,3976,3887],{"class":3886},[3175,3978,3425],{"class":3377},[3175,3980,3235],{"class":3225},[3175,3982,3984],{"class":3177,"line":3983},47,[3175,3985,3897],{"class":3225},[3175,3987,3989],{"class":3177,"line":3988},48,[3175,3990,3291],{"emptyLinePlaceholder":3290},[3175,3992,3994],{"class":3177,"line":3993},49,[3175,3995,3996],{"class":3827},"    // 无状态模式：每次请求使用独立实例。\n",[3175,3998,4000,4002,4004,4006,4008,4010],{"class":3177,"line":3999},50,[3175,4001,3363],{"class":3297},[3175,4003,3366],{"class":3218},[3175,4005,3369],{"class":3225},[3175,4007,3352],{"class":3307},[3175,4009,3311],{"class":3377},[3175,4011,3235],{"class":3225},[3175,4013,4015,4017,4020,4022,4024,4026,4028],{"class":3177,"line":4014},51,[3175,4016,3363],{"class":3297},[3175,4018,4019],{"class":3218}," transport",[3175,4021,3369],{"class":3225},[3175,4023,3372],{"class":3225},[3175,4025,3271],{"class":3307},[3175,4027,3378],{"class":3377},[3175,4029,3381],{"class":3225},[3175,4031,4033,4036,4038],{"class":3177,"line":4032},52,[3175,4034,4035],{"class":3377},"        sessionIdGenerator",[3175,4037,3390],{"class":3225},[3175,4039,4040],{"class":3225}," undefined,\n",[3175,4042,4044,4047,4049],{"class":3177,"line":4043},53,[3175,4045,4046],{"class":3377},"        enableJsonResponse",[3175,4048,3390],{"class":3225},[3175,4050,4051],{"class":3501}," true\n",[3175,4053,4055,4057,4059],{"class":3177,"line":4054},54,[3175,4056,3422],{"class":3225},[3175,4058,3425],{"class":3377},[3175,4060,3235],{"class":3225},[3175,4062,4064],{"class":3177,"line":4063},55,[3175,4065,3291],{"emptyLinePlaceholder":3290},[3175,4067,4069,4072,4074,4077,4079,4081,4084,4086,4088,4090,4092],{"class":3177,"line":4068},56,[3175,4070,4071],{"class":3218},"    res",[3175,4073,3322],{"class":3225},[3175,4075,4076],{"class":3307},"on",[3175,4078,3378],{"class":3377},[3175,4080,3232],{"class":3225},[3175,4082,4083],{"class":3185},"close",[3175,4085,3232],{"class":3225},[3175,4087,3454],{"class":3225},[3175,4089,3517],{"class":3225},[3175,4091,3520],{"class":3297},[3175,4093,3357],{"class":3225},[3175,4095,4097,4100,4102,4104,4106,4108],{"class":3177,"line":4096},57,[3175,4098,4099],{"class":3225},"        void",[3175,4101,3366],{"class":3218},[3175,4103,3322],{"class":3225},[3175,4105,4083],{"class":3307},[3175,4107,3311],{"class":3377},[3175,4109,3235],{"class":3225},[3175,4111,4113,4115,4117],{"class":3177,"line":4112},58,[3175,4114,3422],{"class":3225},[3175,4116,3425],{"class":3377},[3175,4118,3235],{"class":3225},[3175,4120,4122],{"class":3177,"line":4121},59,[3175,4123,3291],{"emptyLinePlaceholder":3290},[3175,4125,4127,4130,4132,4134,4137,4139,4142,4144],{"class":3177,"line":4126},60,[3175,4128,4129],{"class":3214},"    await",[3175,4131,3366],{"class":3218},[3175,4133,3322],{"class":3225},[3175,4135,4136],{"class":3307},"connect",[3175,4138,3378],{"class":3377},[3175,4140,4141],{"class":3218},"transport",[3175,4143,3425],{"class":3377},[3175,4145,3235],{"class":3225},[3175,4147,4149,4151,4153,4155,4158,4160,4162,4164,4166,4168,4170,4172,4175,4177],{"class":3177,"line":4148},61,[3175,4150,4129],{"class":3214},[3175,4152,4019],{"class":3218},[3175,4154,3322],{"class":3225},[3175,4156,4157],{"class":3307},"handleRequest",[3175,4159,3378],{"class":3377},[3175,4161,3810],{"class":3218},[3175,4163,3454],{"class":3225},[3175,4165,3815],{"class":3218},[3175,4167,3454],{"class":3225},[3175,4169,3915],{"class":3218},[3175,4171,3322],{"class":3225},[3175,4173,4174],{"class":3218},"body",[3175,4176,3425],{"class":3377},[3175,4178,3235],{"class":3225},[3175,4180,4182,4185,4187],{"class":3177,"line":4181},62,[3175,4183,4184],{"class":3225},"}",[3175,4186,3425],{"class":3218},[3175,4188,3235],{"class":3225},[3175,4190,4192],{"class":3177,"line":4191},63,[3175,4193,3291],{"emptyLinePlaceholder":3290},[3175,4195,4197,4199,4201,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226],{"class":3177,"line":4196},64,[3175,4198,3319],{"class":3218},[3175,4200,3322],{"class":3225},[3175,4202,4203],{"class":3307},"all",[3175,4205,3378],{"class":3218},[3175,4207,3232],{"class":3225},[3175,4209,3797],{"class":3185},[3175,4211,3232],{"class":3225},[3175,4213,3454],{"class":3225},[3175,4215,3806],{"class":3225},[3175,4217,3810],{"class":3809},[3175,4219,3454],{"class":3225},[3175,4221,3815],{"class":3809},[3175,4223,3425],{"class":3225},[3175,4225,3520],{"class":3297},[3175,4227,3357],{"class":3225},[3175,4229,4231,4233,4235,4238,4240,4242,4245,4247,4249,4251,4254,4256,4258,4260,4262,4264,4267,4269],{"class":3177,"line":4230},65,[3175,4232,4071],{"class":3218},[3175,4234,3322],{"class":3225},[3175,4236,4237],{"class":3307},"set",[3175,4239,3378],{"class":3377},[3175,4241,3232],{"class":3225},[3175,4243,4244],{"class":3185},"Allow",[3175,4246,3232],{"class":3225},[3175,4248,3454],{"class":3225},[3175,4250,3226],{"class":3225},[3175,4252,4253],{"class":3185},"POST",[3175,4255,3232],{"class":3225},[3175,4257,3425],{"class":3377},[3175,4259,3322],{"class":3225},[3175,4261,3881],{"class":3307},[3175,4263,3378],{"class":3377},[3175,4265,4266],{"class":3886},"405",[3175,4268,3425],{"class":3377},[3175,4270,3235],{"class":3225},[3175,4272,4274,4276,4278],{"class":3177,"line":4273},66,[3175,4275,4184],{"class":3225},[3175,4277,3425],{"class":3218},[3175,4279,3235],{"class":3225},[3175,4281,4283],{"class":3177,"line":4282},67,[3175,4284,3291],{"emptyLinePlaceholder":3290},[3175,4286,4288,4290,4292,4295,4297,4300,4302,4304,4307,4309,4311,4313,4315],{"class":3177,"line":4287},68,[3175,4289,3319],{"class":3218},[3175,4291,3322],{"class":3225},[3175,4293,4294],{"class":3307},"listen",[3175,4296,3378],{"class":3218},[3175,4298,4299],{"class":3886},"3000",[3175,4301,3454],{"class":3225},[3175,4303,3226],{"class":3225},[3175,4305,4306],{"class":3185},"127.0.0.1",[3175,4308,3232],{"class":3225},[3175,4310,3454],{"class":3225},[3175,4312,3517],{"class":3225},[3175,4314,3520],{"class":3297},[3175,4316,3357],{"class":3225},[3175,4318,4320,4323,4325,4327,4329,4331,4334,4336,4338],{"class":3177,"line":4319},69,[3175,4321,4322],{"class":3218},"    console",[3175,4324,3322],{"class":3225},[3175,4326,3682],{"class":3307},[3175,4328,3378],{"class":3377},[3175,4330,3232],{"class":3225},[3175,4332,4333],{"class":3185},"MCP Server: http://127.0.0.1:3000/mcp",[3175,4335,3232],{"class":3225},[3175,4337,3425],{"class":3377},[3175,4339,3235],{"class":3225},[3175,4341,4343,4345,4347],{"class":3177,"line":4342},70,[3175,4344,4184],{"class":3225},[3175,4346,3425],{"class":3218},[3175,4348,3235],{"class":3225},[2956,4350,4351],{},"启动服务，预期输出如下：",[3166,4353,4355],{"className":3168,"code":4354,"language":3170,"meta":3171,"style":3171},"node server.mjs\n",[2997,4356,4357],{"__ignoreMap":3171},[3175,4358,4359,4362],{"class":3177,"line":3178},[3175,4360,4361],{"class":3181},"node",[3175,4363,4364],{"class":3185}," server.mjs\n",[3166,4366,4370],{"className":4367,"code":4368,"language":4369,"meta":3171,"style":3171},"language-console shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","MCP Server: http://127.0.0.1:3000/mcp\n","console",[2997,4371,4372],{"__ignoreMap":3171},[3175,4373,4374],{"class":3177,"line":3178},[3175,4375,4368],{},[4377,4378,4379],"warning",{},[2956,4380,4381],{},"实验服务没有用户认证，只允许本机测试。生产环境必须使用适当的连接认证、Origin 检查和业务授权，不能直接公开此服务。",[3087,4383,4385],{"id":4384},"创建-mcp-client","创建 MCP Client",[2956,4387,3198,4388,4391],{},[2997,4389,4390],{},"client.mjs","，将连接和工具发现封装为公共函数，后面的实验直接复用。",[3166,4393,4395],{"className":3205,"code":4394,"language":3207,"meta":3171,"style":3171},"import { Client } from '@modelcontextprotocol/sdk/client/index.js';\nimport { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';\n\nexport async function connectClient() {\n    const client = new Client({\n        name: 'document-client',\n        version: '1.0.0'\n    });\n\n    const url = new URL('http://127.0.0.1:3000/mcp');\n    await client.connect(new StreamableHTTPClientTransport(url));\n    return client;\n}\n\nexport async function listTools(client) {\n    const { tools, nextCursor } = await client.listTools();\n\n    // 本实验只有一页工具，遇到分页时拒绝使用不完整的列表。\n    if (nextCursor) {\n        throw new Error('请先获取完整工具列表');\n    }\n\n    return tools;\n}\n",[2997,4396,4397,4419,4441,4445,4462,4479,4494,4506,4514,4518,4545,4572,4580,4584,4588,4608,4640,4644,4649,4662,4685,4689,4693,4701],{"__ignoreMap":3171},[3175,4398,4399,4401,4403,4406,4408,4410,4412,4415,4417],{"class":3177,"line":3178},[3175,4400,3215],{"class":3214},[3175,4402,3243],{"class":3225},[3175,4404,4405],{"class":3218}," Client",[3175,4407,3249],{"class":3225},[3175,4409,3252],{"class":3214},[3175,4411,3226],{"class":3225},[3175,4413,4414],{"class":3185},"@modelcontextprotocol/sdk/client/index.js",[3175,4416,3232],{"class":3225},[3175,4418,3235],{"class":3225},[3175,4420,4421,4423,4425,4428,4430,4432,4434,4437,4439],{"class":3177,"line":3238},[3175,4422,3215],{"class":3214},[3175,4424,3243],{"class":3225},[3175,4426,4427],{"class":3218}," StreamableHTTPClientTransport",[3175,4429,3249],{"class":3225},[3175,4431,3252],{"class":3214},[3175,4433,3226],{"class":3225},[3175,4435,4436],{"class":3185},"@modelcontextprotocol/sdk/client/streamableHttp.js",[3175,4438,3232],{"class":3225},[3175,4440,3235],{"class":3225},[3175,4442,4443],{"class":3177,"line":3264},[3175,4444,3291],{"emptyLinePlaceholder":3290},[3175,4446,4447,4450,4452,4455,4458,4460],{"class":3177,"line":3287},[3175,4448,4449],{"class":3214},"export",[3175,4451,3514],{"class":3297},[3175,4453,4454],{"class":3297}," function",[3175,4456,4457],{"class":3307}," connectClient",[3175,4459,3311],{"class":3225},[3175,4461,3357],{"class":3225},[3175,4463,4464,4466,4469,4471,4473,4475,4477],{"class":3177,"line":3294},[3175,4465,3363],{"class":3297},[3175,4467,4468],{"class":3218}," client",[3175,4470,3369],{"class":3225},[3175,4472,3372],{"class":3225},[3175,4474,4405],{"class":3307},[3175,4476,3378],{"class":3377},[3175,4478,3381],{"class":3225},[3175,4480,4481,4483,4485,4487,4490,4492],{"class":3177,"line":3316},[3175,4482,3387],{"class":3377},[3175,4484,3390],{"class":3225},[3175,4486,3226],{"class":3225},[3175,4488,4489],{"class":3185},"document-client",[3175,4491,3232],{"class":3225},[3175,4493,3400],{"class":3225},[3175,4495,4496,4498,4500,4502,4504],{"class":3177,"line":3341},[3175,4497,3406],{"class":3377},[3175,4499,3390],{"class":3225},[3175,4501,3226],{"class":3225},[3175,4503,3413],{"class":3185},[3175,4505,3416],{"class":3225},[3175,4507,4508,4510,4512],{"class":3177,"line":3346},[3175,4509,3422],{"class":3225},[3175,4511,3425],{"class":3377},[3175,4513,3235],{"class":3225},[3175,4515,4516],{"class":3177,"line":3360},[3175,4517,3291],{"emptyLinePlaceholder":3290},[3175,4519,4520,4522,4525,4527,4529,4532,4534,4536,4539,4541,4543],{"class":3177,"line":3384},[3175,4521,3363],{"class":3297},[3175,4523,4524],{"class":3218}," url",[3175,4526,3369],{"class":3225},[3175,4528,3372],{"class":3225},[3175,4530,4531],{"class":3307}," URL",[3175,4533,3378],{"class":3377},[3175,4535,3232],{"class":3225},[3175,4537,4538],{"class":3185},"http://127.0.0.1:3000/mcp",[3175,4540,3232],{"class":3225},[3175,4542,3425],{"class":3377},[3175,4544,3235],{"class":3225},[3175,4546,4547,4549,4551,4553,4555,4557,4560,4562,4564,4567,4570],{"class":3177,"line":3403},[3175,4548,4129],{"class":3214},[3175,4550,4468],{"class":3218},[3175,4552,3322],{"class":3225},[3175,4554,4136],{"class":3307},[3175,4556,3378],{"class":3377},[3175,4558,4559],{"class":3225},"new",[3175,4561,4427],{"class":3307},[3175,4563,3378],{"class":3377},[3175,4565,4566],{"class":3218},"url",[3175,4568,4569],{"class":3377},"))",[3175,4571,3235],{"class":3225},[3175,4573,4574,4576,4578],{"class":3177,"line":3419},[3175,4575,3765],{"class":3214},[3175,4577,4468],{"class":3218},[3175,4579,3235],{"class":3225},[3175,4581,4582],{"class":3177,"line":3430},[3175,4583,3775],{"class":3225},[3175,4585,4586],{"class":3177,"line":3435},[3175,4587,3291],{"emptyLinePlaceholder":3290},[3175,4589,4590,4592,4594,4596,4599,4601,4604,4606],{"class":3177,"line":3459},[3175,4591,4449],{"class":3214},[3175,4593,3514],{"class":3297},[3175,4595,4454],{"class":3297},[3175,4597,4598],{"class":3307}," listTools",[3175,4600,3378],{"class":3225},[3175,4602,4603],{"class":3809},"client",[3175,4605,3425],{"class":3225},[3175,4607,3357],{"class":3225},[3175,4609,4610,4612,4614,4617,4619,4622,4624,4626,4629,4631,4633,4636,4638],{"class":3177,"line":3475},[3175,4611,3363],{"class":3297},[3175,4613,3243],{"class":3225},[3175,4615,4616],{"class":3218}," tools",[3175,4618,3454],{"class":3225},[3175,4620,4621],{"class":3218}," nextCursor",[3175,4623,3249],{"class":3225},[3175,4625,3369],{"class":3225},[3175,4627,4628],{"class":3214}," await",[3175,4630,4468],{"class":3218},[3175,4632,3322],{"class":3225},[3175,4634,4635],{"class":3307},"listTools",[3175,4637,3311],{"class":3377},[3175,4639,3235],{"class":3225},[3175,4641,4642],{"class":3177,"line":3486},[3175,4643,3291],{"emptyLinePlaceholder":3290},[3175,4645,4646],{"class":3177,"line":3508},[3175,4647,4648],{"class":3827},"    // 本实验只有一页工具，遇到分页时拒绝使用不完整的列表。\n",[3175,4650,4651,4653,4655,4658,4660],{"class":3177,"line":3525},[3175,4652,3834],{"class":3214},[3175,4654,3806],{"class":3377},[3175,4656,4657],{"class":3218},"nextCursor",[3175,4659,3855],{"class":3377},[3175,4661,3381],{"class":3225},[3175,4663,4664,4667,4669,4672,4674,4676,4679,4681,4683],{"class":3177,"line":3533},[3175,4665,4666],{"class":3214},"        throw",[3175,4668,3372],{"class":3225},[3175,4670,4671],{"class":3307}," Error",[3175,4673,3378],{"class":3377},[3175,4675,3232],{"class":3225},[3175,4677,4678],{"class":3185},"请先获取完整工具列表",[3175,4680,3232],{"class":3225},[3175,4682,3425],{"class":3377},[3175,4684,3235],{"class":3225},[3175,4686,4687],{"class":3177,"line":3578},[3175,4688,3897],{"class":3225},[3175,4690,4691],{"class":3177,"line":3584},[3175,4692,3291],{"emptyLinePlaceholder":3290},[3175,4694,4695,4697,4699],{"class":3177,"line":3593},[3175,4696,3765],{"class":3214},[3175,4698,4616],{"class":3218},[3175,4700,3235],{"class":3225},[3175,4702,4703],{"class":3177,"line":3598},[3175,4704,3775],{"class":3225},[2960,4706],{},[2951,4708,4710],{"id":4709},"限制-mcp-工具调用","🛠 限制 MCP 工具调用",[3087,4712,4713],{"id":4713},"观察未防护时的调用结果",[2956,4715,3198,4716,4719],{},[2997,4717,4718],{},"test-unprotected.mjs","，获取全部工具，并直接调用未批准的删除工具。",[3166,4721,4723],{"className":3205,"code":4722,"language":3207,"meta":3171,"style":3171},"import { connectClient, listTools } from './client.mjs';\n\nconst client = await connectClient();\n\ntry {\n    const tools = await listTools(client);\n    console.log('服务端工具：', tools.map((tool) => tool.name).sort());\n\n    const result = await client.callTool({\n        name: 'delete_document',\n        arguments: {}\n    });\n\n    console.log(result.content[0].text);\n} finally {\n    await client.close();\n}\n",[2997,4724,4725,4750,4754,4771,4775,4782,4802,4858,4862,4884,4898,4908,4916,4920,4955,4964,4978],{"__ignoreMap":3171},[3175,4726,4727,4729,4731,4733,4735,4737,4739,4741,4743,4746,4748],{"class":3177,"line":3178},[3175,4728,3215],{"class":3214},[3175,4730,3243],{"class":3225},[3175,4732,4457],{"class":3218},[3175,4734,3454],{"class":3225},[3175,4736,4598],{"class":3218},[3175,4738,3249],{"class":3225},[3175,4740,3252],{"class":3214},[3175,4742,3226],{"class":3225},[3175,4744,4745],{"class":3185},"./client.mjs",[3175,4747,3232],{"class":3225},[3175,4749,3235],{"class":3225},[3175,4751,4752],{"class":3177,"line":3238},[3175,4753,3291],{"emptyLinePlaceholder":3290},[3175,4755,4756,4758,4761,4763,4765,4767,4769],{"class":3177,"line":3264},[3175,4757,3298],{"class":3297},[3175,4759,4760],{"class":3218}," client ",[3175,4762,3304],{"class":3225},[3175,4764,4628],{"class":3214},[3175,4766,4457],{"class":3307},[3175,4768,3311],{"class":3218},[3175,4770,3235],{"class":3225},[3175,4772,4773],{"class":3177,"line":3287},[3175,4774,3291],{"emptyLinePlaceholder":3290},[3175,4776,4777,4780],{"class":3177,"line":3294},[3175,4778,4779],{"class":3214},"try",[3175,4781,3357],{"class":3225},[3175,4783,4784,4786,4788,4790,4792,4794,4796,4798,4800],{"class":3177,"line":3316},[3175,4785,3363],{"class":3297},[3175,4787,4616],{"class":3218},[3175,4789,3369],{"class":3225},[3175,4791,4628],{"class":3214},[3175,4793,4598],{"class":3307},[3175,4795,3378],{"class":3377},[3175,4797,4603],{"class":3218},[3175,4799,3425],{"class":3377},[3175,4801,3235],{"class":3225},[3175,4803,4804,4806,4808,4810,4812,4814,4817,4819,4821,4823,4825,4828,4830,4832,4835,4837,4839,4842,4844,4847,4849,4851,4854,4856],{"class":3177,"line":3341},[3175,4805,4322],{"class":3218},[3175,4807,3322],{"class":3225},[3175,4809,3682],{"class":3307},[3175,4811,3378],{"class":3377},[3175,4813,3232],{"class":3225},[3175,4815,4816],{"class":3185},"服务端工具：",[3175,4818,3232],{"class":3225},[3175,4820,3454],{"class":3225},[3175,4822,4616],{"class":3218},[3175,4824,3322],{"class":3225},[3175,4826,4827],{"class":3307},"map",[3175,4829,3378],{"class":3377},[3175,4831,3378],{"class":3225},[3175,4833,4834],{"class":3809},"tool",[3175,4836,3425],{"class":3225},[3175,4838,3520],{"class":3297},[3175,4840,4841],{"class":3218}," tool",[3175,4843,3322],{"class":3225},[3175,4845,4846],{"class":3218},"name",[3175,4848,3425],{"class":3377},[3175,4850,3322],{"class":3225},[3175,4852,4853],{"class":3307},"sort",[3175,4855,3336],{"class":3377},[3175,4857,3235],{"class":3225},[3175,4859,4860],{"class":3177,"line":3346},[3175,4861,3291],{"emptyLinePlaceholder":3290},[3175,4863,4864,4866,4869,4871,4873,4875,4877,4880,4882],{"class":3177,"line":3360},[3175,4865,3363],{"class":3297},[3175,4867,4868],{"class":3218}," result",[3175,4870,3369],{"class":3225},[3175,4872,4628],{"class":3214},[3175,4874,4468],{"class":3218},[3175,4876,3322],{"class":3225},[3175,4878,4879],{"class":3307},"callTool",[3175,4881,3378],{"class":3377},[3175,4883,3381],{"class":3225},[3175,4885,4886,4888,4890,4892,4894,4896],{"class":3177,"line":3384},[3175,4887,3387],{"class":3377},[3175,4889,3390],{"class":3225},[3175,4891,3226],{"class":3225},[3175,4893,3079],{"class":3185},[3175,4895,3232],{"class":3225},[3175,4897,3400],{"class":3225},[3175,4899,4900,4903,4905],{"class":3177,"line":3403},[3175,4901,4902],{"class":3377},"        arguments",[3175,4904,3390],{"class":3225},[3175,4906,4907],{"class":3225}," {}\n",[3175,4909,4910,4912,4914],{"class":3177,"line":3419},[3175,4911,3422],{"class":3225},[3175,4913,3425],{"class":3377},[3175,4915,3235],{"class":3225},[3175,4917,4918],{"class":3177,"line":3430},[3175,4919,3291],{"emptyLinePlaceholder":3290},[3175,4921,4922,4924,4926,4928,4930,4933,4935,4938,4941,4944,4947,4949,4951,4953],{"class":3177,"line":3435},[3175,4923,4322],{"class":3218},[3175,4925,3322],{"class":3225},[3175,4927,3682],{"class":3307},[3175,4929,3378],{"class":3377},[3175,4931,4932],{"class":3218},"result",[3175,4934,3322],{"class":3225},[3175,4936,4937],{"class":3218},"content",[3175,4939,4940],{"class":3377},"[",[3175,4942,4943],{"class":3886},"0",[3175,4945,4946],{"class":3377},"]",[3175,4948,3322],{"class":3225},[3175,4950,3554],{"class":3218},[3175,4952,3425],{"class":3377},[3175,4954,3235],{"class":3225},[3175,4956,4957,4959,4962],{"class":3177,"line":3459},[3175,4958,4184],{"class":3225},[3175,4960,4961],{"class":3214}," finally",[3175,4963,3357],{"class":3225},[3175,4965,4966,4968,4970,4972,4974,4976],{"class":3177,"line":3475},[3175,4967,4129],{"class":3214},[3175,4969,4468],{"class":3218},[3175,4971,3322],{"class":3225},[3175,4973,4083],{"class":3307},[3175,4975,3311],{"class":3377},[3175,4977,3235],{"class":3225},[3175,4979,4980],{"class":3177,"line":3486},[3175,4981,3775],{"class":3225},[2956,4983,4984,4985,4988],{},"保持服务端运行，在另一个终端执行 ",[2997,4986,4987],{},"node test-unprotected.mjs","，预期输出：",[3166,4990,4992],{"className":4367,"code":4991,"language":4369,"meta":3171,"style":3171},"服务端工具： [ 'delete_document', 'read_document' ]\n删除工具被调用（仅模拟）\n",[2997,4993,4994,4999],{"__ignoreMap":3171},[3175,4995,4996],{"class":3177,"line":3178},[3175,4997,4998],{},"服务端工具： [ 'delete_document', 'read_document' ]\n",[3175,5000,5001],{"class":3177,"line":3238},[3175,5002,5003],{},"删除工具被调用（仅模拟）\n",[2956,5005,5006,5007,5009],{},"服务端也会打印 ",[2997,5008,3689],{},"。尽管文档助手只需要读取功能，客户端仍然能够调用删除工具。",[3087,5011,5012],{"id":5012},"添加工具白名单",[2956,5014,5015],{},"安全检查需要放在两个位置：发现工具时限制提供给模型的定义，发送调用时拒绝未批准的工具。",[5017,5018],"ai-security-mcp-boundary",{},[2956,5020,3198,5021,5024],{},[2997,5022,5023],{},"guard.mjs","，集中实现这两项检查。",[3166,5026,5028],{"className":3205,"code":5027,"language":3207,"meta":3171,"style":3171},"import { listTools } from './client.mjs';\n\nconst allowedNames = new Set(['read_document']);\n\nexport async function getApprovedTools(client) {\n    const tools = await listTools(client);\n    return tools.filter((tool) => allowedNames.has(tool.name));\n}\n\nexport async function callApprovedTool(client, name, args = {}) {\n    if (!allowedNames.has(name)) {\n        throw new Error(`禁止调用：${name}`);\n    }\n\n    const tools = await getApprovedTools(client);\n    if (!tools.some((tool) => tool.name === name)) {\n        throw new Error(`工具不可用：${name}`);\n    }\n\n    return client.callTool({ name, arguments: args });\n}\n",[2997,5029,5030,5050,5054,5082,5086,5105,5125,5166,5170,5174,5206,5231,5259,5263,5267,5287,5328,5353,5357,5361,5392],{"__ignoreMap":3171},[3175,5031,5032,5034,5036,5038,5040,5042,5044,5046,5048],{"class":3177,"line":3178},[3175,5033,3215],{"class":3214},[3175,5035,3243],{"class":3225},[3175,5037,4598],{"class":3218},[3175,5039,3249],{"class":3225},[3175,5041,3252],{"class":3214},[3175,5043,3226],{"class":3225},[3175,5045,4745],{"class":3185},[3175,5047,3232],{"class":3225},[3175,5049,3235],{"class":3225},[3175,5051,5052],{"class":3177,"line":3238},[3175,5053,3291],{"emptyLinePlaceholder":3290},[3175,5055,5056,5058,5061,5063,5065,5068,5071,5073,5075,5077,5080],{"class":3177,"line":3264},[3175,5057,3298],{"class":3297},[3175,5059,5060],{"class":3218}," allowedNames ",[3175,5062,3304],{"class":3225},[3175,5064,3372],{"class":3225},[3175,5066,5067],{"class":3307}," Set",[3175,5069,5070],{"class":3218},"([",[3175,5072,3232],{"class":3225},[3175,5074,3066],{"class":3185},[3175,5076,3232],{"class":3225},[3175,5078,5079],{"class":3218},"])",[3175,5081,3235],{"class":3225},[3175,5083,5084],{"class":3177,"line":3287},[3175,5085,3291],{"emptyLinePlaceholder":3290},[3175,5087,5088,5090,5092,5094,5097,5099,5101,5103],{"class":3177,"line":3294},[3175,5089,4449],{"class":3214},[3175,5091,3514],{"class":3297},[3175,5093,4454],{"class":3297},[3175,5095,5096],{"class":3307}," getApprovedTools",[3175,5098,3378],{"class":3225},[3175,5100,4603],{"class":3809},[3175,5102,3425],{"class":3225},[3175,5104,3357],{"class":3225},[3175,5106,5107,5109,5111,5113,5115,5117,5119,5121,5123],{"class":3177,"line":3316},[3175,5108,3363],{"class":3297},[3175,5110,4616],{"class":3218},[3175,5112,3369],{"class":3225},[3175,5114,4628],{"class":3214},[3175,5116,4598],{"class":3307},[3175,5118,3378],{"class":3377},[3175,5120,4603],{"class":3218},[3175,5122,3425],{"class":3377},[3175,5124,3235],{"class":3225},[3175,5126,5127,5129,5131,5133,5136,5138,5140,5142,5144,5146,5149,5151,5154,5156,5158,5160,5162,5164],{"class":3177,"line":3341},[3175,5128,3765],{"class":3214},[3175,5130,4616],{"class":3218},[3175,5132,3322],{"class":3225},[3175,5134,5135],{"class":3307},"filter",[3175,5137,3378],{"class":3377},[3175,5139,3378],{"class":3225},[3175,5141,4834],{"class":3809},[3175,5143,3425],{"class":3225},[3175,5145,3520],{"class":3297},[3175,5147,5148],{"class":3218}," allowedNames",[3175,5150,3322],{"class":3225},[3175,5152,5153],{"class":3307},"has",[3175,5155,3378],{"class":3377},[3175,5157,4834],{"class":3218},[3175,5159,3322],{"class":3225},[3175,5161,4846],{"class":3218},[3175,5163,4569],{"class":3377},[3175,5165,3235],{"class":3225},[3175,5167,5168],{"class":3177,"line":3346},[3175,5169,3775],{"class":3225},[3175,5171,5172],{"class":3177,"line":3360},[3175,5173,3291],{"emptyLinePlaceholder":3290},[3175,5175,5176,5178,5180,5182,5185,5187,5189,5191,5194,5196,5199,5201,5204],{"class":3177,"line":3384},[3175,5177,4449],{"class":3214},[3175,5179,3514],{"class":3297},[3175,5181,4454],{"class":3297},[3175,5183,5184],{"class":3307}," callApprovedTool",[3175,5186,3378],{"class":3225},[3175,5188,4603],{"class":3809},[3175,5190,3454],{"class":3225},[3175,5192,5193],{"class":3809}," name",[3175,5195,3454],{"class":3225},[3175,5197,5198],{"class":3809}," args",[3175,5200,3369],{"class":3225},[3175,5202,5203],{"class":3225}," {})",[3175,5205,3357],{"class":3225},[3175,5207,5208,5210,5212,5215,5218,5220,5222,5224,5226,5229],{"class":3177,"line":3403},[3175,5209,3834],{"class":3214},[3175,5211,3806],{"class":3377},[3175,5213,5214],{"class":3225},"!",[3175,5216,5217],{"class":3218},"allowedNames",[3175,5219,3322],{"class":3225},[3175,5221,5153],{"class":3307},[3175,5223,3378],{"class":3377},[3175,5225,4846],{"class":3218},[3175,5227,5228],{"class":3377},")) ",[3175,5230,3381],{"class":3225},[3175,5232,5233,5235,5237,5239,5241,5244,5247,5250,5252,5255,5257],{"class":3177,"line":3419},[3175,5234,4666],{"class":3214},[3175,5236,3372],{"class":3225},[3175,5238,4671],{"class":3307},[3175,5240,3378],{"class":3377},[3175,5242,5243],{"class":3225},"`",[3175,5245,5246],{"class":3185},"禁止调用：",[3175,5248,5249],{"class":3225},"${",[3175,5251,4846],{"class":3218},[3175,5253,5254],{"class":3225},"}`",[3175,5256,3425],{"class":3377},[3175,5258,3235],{"class":3225},[3175,5260,5261],{"class":3177,"line":3430},[3175,5262,3897],{"class":3225},[3175,5264,5265],{"class":3177,"line":3435},[3175,5266,3291],{"emptyLinePlaceholder":3290},[3175,5268,5269,5271,5273,5275,5277,5279,5281,5283,5285],{"class":3177,"line":3459},[3175,5270,3363],{"class":3297},[3175,5272,4616],{"class":3218},[3175,5274,3369],{"class":3225},[3175,5276,4628],{"class":3214},[3175,5278,5096],{"class":3307},[3175,5280,3378],{"class":3377},[3175,5282,4603],{"class":3218},[3175,5284,3425],{"class":3377},[3175,5286,3235],{"class":3225},[3175,5288,5289,5291,5293,5295,5298,5300,5303,5305,5307,5309,5311,5313,5315,5317,5319,5322,5324,5326],{"class":3177,"line":3475},[3175,5290,3834],{"class":3214},[3175,5292,3806],{"class":3377},[3175,5294,5214],{"class":3225},[3175,5296,5297],{"class":3218},"tools",[3175,5299,3322],{"class":3225},[3175,5301,5302],{"class":3307},"some",[3175,5304,3378],{"class":3377},[3175,5306,3378],{"class":3225},[3175,5308,4834],{"class":3809},[3175,5310,3425],{"class":3225},[3175,5312,3520],{"class":3297},[3175,5314,4841],{"class":3218},[3175,5316,3322],{"class":3225},[3175,5318,4846],{"class":3218},[3175,5320,5321],{"class":3225}," ===",[3175,5323,5193],{"class":3218},[3175,5325,5228],{"class":3377},[3175,5327,3381],{"class":3225},[3175,5329,5330,5332,5334,5336,5338,5340,5343,5345,5347,5349,5351],{"class":3177,"line":3486},[3175,5331,4666],{"class":3214},[3175,5333,3372],{"class":3225},[3175,5335,4671],{"class":3307},[3175,5337,3378],{"class":3377},[3175,5339,5243],{"class":3225},[3175,5341,5342],{"class":3185},"工具不可用：",[3175,5344,5249],{"class":3225},[3175,5346,4846],{"class":3218},[3175,5348,5254],{"class":3225},[3175,5350,3425],{"class":3377},[3175,5352,3235],{"class":3225},[3175,5354,5355],{"class":3177,"line":3508},[3175,5356,3897],{"class":3225},[3175,5358,5359],{"class":3177,"line":3525},[3175,5360,3291],{"emptyLinePlaceholder":3290},[3175,5362,5363,5365,5367,5369,5371,5373,5375,5377,5379,5382,5384,5386,5388,5390],{"class":3177,"line":3533},[3175,5364,3765],{"class":3214},[3175,5366,4468],{"class":3218},[3175,5368,3322],{"class":3225},[3175,5370,4879],{"class":3307},[3175,5372,3378],{"class":3377},[3175,5374,3544],{"class":3225},[3175,5376,5193],{"class":3218},[3175,5378,3454],{"class":3225},[3175,5380,5381],{"class":3377}," arguments",[3175,5383,3390],{"class":3225},[3175,5385,5198],{"class":3218},[3175,5387,3249],{"class":3225},[3175,5389,3425],{"class":3377},[3175,5391,3235],{"class":3225},[3175,5393,5394],{"class":3177,"line":3578},[3175,5395,3775],{"class":3225},[2956,5397,5398,5399,5402,5403,5406,5407,5410],{},"接入模型时，将 ",[2997,5400,5401],{},"getApprovedTools()"," 返回的完整工具定义转换为模型 API 所需格式；将模型的调用请求交给 ",[2997,5404,5405],{},"callApprovedTool()","，而不是直接调用 SDK 的 ",[2997,5408,5409],{},"callTool()","。",[3087,5412,5413],{"id":5413},"验证防护效果",[2956,5415,3198,5416,5419],{},[2997,5417,5418],{},"test-guard.mjs","，分别测试读取和删除工具。",[3166,5421,5423],{"className":3205,"code":5422,"language":3207,"meta":3171,"style":3171},"import { connectClient } from './client.mjs';\nimport { getApprovedTools, callApprovedTool } from './guard.mjs';\n\nconst client = await connectClient();\n\ntry {\n    const tools = await getApprovedTools(client);\n    console.log('允许使用：', tools.map((tool) => tool.name));\n\n    const result = await callApprovedTool(client, 'read_document');\n    if (result.isError) {\n        throw new Error('读取工具执行失败');\n    }\n    console.log(result.content[0].text);\n\n    await callApprovedTool(client, 'delete_document');\n} catch (error) {\n    console.log(error.message);\n} finally {\n    await client.close();\n}\n",[2997,5424,5425,5445,5470,5474,5490,5494,5500,5520,5565,5569,5597,5614,5635,5639,5669,5673,5695,5707,5729,5737,5751],{"__ignoreMap":3171},[3175,5426,5427,5429,5431,5433,5435,5437,5439,5441,5443],{"class":3177,"line":3178},[3175,5428,3215],{"class":3214},[3175,5430,3243],{"class":3225},[3175,5432,4457],{"class":3218},[3175,5434,3249],{"class":3225},[3175,5436,3252],{"class":3214},[3175,5438,3226],{"class":3225},[3175,5440,4745],{"class":3185},[3175,5442,3232],{"class":3225},[3175,5444,3235],{"class":3225},[3175,5446,5447,5449,5451,5453,5455,5457,5459,5461,5463,5466,5468],{"class":3177,"line":3238},[3175,5448,3215],{"class":3214},[3175,5450,3243],{"class":3225},[3175,5452,5096],{"class":3218},[3175,5454,3454],{"class":3225},[3175,5456,5184],{"class":3218},[3175,5458,3249],{"class":3225},[3175,5460,3252],{"class":3214},[3175,5462,3226],{"class":3225},[3175,5464,5465],{"class":3185},"./guard.mjs",[3175,5467,3232],{"class":3225},[3175,5469,3235],{"class":3225},[3175,5471,5472],{"class":3177,"line":3264},[3175,5473,3291],{"emptyLinePlaceholder":3290},[3175,5475,5476,5478,5480,5482,5484,5486,5488],{"class":3177,"line":3287},[3175,5477,3298],{"class":3297},[3175,5479,4760],{"class":3218},[3175,5481,3304],{"class":3225},[3175,5483,4628],{"class":3214},[3175,5485,4457],{"class":3307},[3175,5487,3311],{"class":3218},[3175,5489,3235],{"class":3225},[3175,5491,5492],{"class":3177,"line":3294},[3175,5493,3291],{"emptyLinePlaceholder":3290},[3175,5495,5496,5498],{"class":3177,"line":3316},[3175,5497,4779],{"class":3214},[3175,5499,3357],{"class":3225},[3175,5501,5502,5504,5506,5508,5510,5512,5514,5516,5518],{"class":3177,"line":3341},[3175,5503,3363],{"class":3297},[3175,5505,4616],{"class":3218},[3175,5507,3369],{"class":3225},[3175,5509,4628],{"class":3214},[3175,5511,5096],{"class":3307},[3175,5513,3378],{"class":3377},[3175,5515,4603],{"class":3218},[3175,5517,3425],{"class":3377},[3175,5519,3235],{"class":3225},[3175,5521,5522,5524,5526,5528,5530,5532,5535,5537,5539,5541,5543,5545,5547,5549,5551,5553,5555,5557,5559,5561,5563],{"class":3177,"line":3346},[3175,5523,4322],{"class":3218},[3175,5525,3322],{"class":3225},[3175,5527,3682],{"class":3307},[3175,5529,3378],{"class":3377},[3175,5531,3232],{"class":3225},[3175,5533,5534],{"class":3185},"允许使用：",[3175,5536,3232],{"class":3225},[3175,5538,3454],{"class":3225},[3175,5540,4616],{"class":3218},[3175,5542,3322],{"class":3225},[3175,5544,4827],{"class":3307},[3175,5546,3378],{"class":3377},[3175,5548,3378],{"class":3225},[3175,5550,4834],{"class":3809},[3175,5552,3425],{"class":3225},[3175,5554,3520],{"class":3297},[3175,5556,4841],{"class":3218},[3175,5558,3322],{"class":3225},[3175,5560,4846],{"class":3218},[3175,5562,4569],{"class":3377},[3175,5564,3235],{"class":3225},[3175,5566,5567],{"class":3177,"line":3360},[3175,5568,3291],{"emptyLinePlaceholder":3290},[3175,5570,5571,5573,5575,5577,5579,5581,5583,5585,5587,5589,5591,5593,5595],{"class":3177,"line":3384},[3175,5572,3363],{"class":3297},[3175,5574,4868],{"class":3218},[3175,5576,3369],{"class":3225},[3175,5578,4628],{"class":3214},[3175,5580,5184],{"class":3307},[3175,5582,3378],{"class":3377},[3175,5584,4603],{"class":3218},[3175,5586,3454],{"class":3225},[3175,5588,3226],{"class":3225},[3175,5590,3066],{"class":3185},[3175,5592,3232],{"class":3225},[3175,5594,3425],{"class":3377},[3175,5596,3235],{"class":3225},[3175,5598,5599,5601,5603,5605,5607,5610,5612],{"class":3177,"line":3403},[3175,5600,3834],{"class":3214},[3175,5602,3806],{"class":3377},[3175,5604,4932],{"class":3218},[3175,5606,3322],{"class":3225},[3175,5608,5609],{"class":3218},"isError",[3175,5611,3855],{"class":3377},[3175,5613,3381],{"class":3225},[3175,5615,5616,5618,5620,5622,5624,5626,5629,5631,5633],{"class":3177,"line":3419},[3175,5617,4666],{"class":3214},[3175,5619,3372],{"class":3225},[3175,5621,4671],{"class":3307},[3175,5623,3378],{"class":3377},[3175,5625,3232],{"class":3225},[3175,5627,5628],{"class":3185},"读取工具执行失败",[3175,5630,3232],{"class":3225},[3175,5632,3425],{"class":3377},[3175,5634,3235],{"class":3225},[3175,5636,5637],{"class":3177,"line":3430},[3175,5638,3897],{"class":3225},[3175,5640,5641,5643,5645,5647,5649,5651,5653,5655,5657,5659,5661,5663,5665,5667],{"class":3177,"line":3435},[3175,5642,4322],{"class":3218},[3175,5644,3322],{"class":3225},[3175,5646,3682],{"class":3307},[3175,5648,3378],{"class":3377},[3175,5650,4932],{"class":3218},[3175,5652,3322],{"class":3225},[3175,5654,4937],{"class":3218},[3175,5656,4940],{"class":3377},[3175,5658,4943],{"class":3886},[3175,5660,4946],{"class":3377},[3175,5662,3322],{"class":3225},[3175,5664,3554],{"class":3218},[3175,5666,3425],{"class":3377},[3175,5668,3235],{"class":3225},[3175,5670,5671],{"class":3177,"line":3459},[3175,5672,3291],{"emptyLinePlaceholder":3290},[3175,5674,5675,5677,5679,5681,5683,5685,5687,5689,5691,5693],{"class":3177,"line":3475},[3175,5676,4129],{"class":3214},[3175,5678,5184],{"class":3307},[3175,5680,3378],{"class":3377},[3175,5682,4603],{"class":3218},[3175,5684,3454],{"class":3225},[3175,5686,3226],{"class":3225},[3175,5688,3079],{"class":3185},[3175,5690,3232],{"class":3225},[3175,5692,3425],{"class":3377},[3175,5694,3235],{"class":3225},[3175,5696,5697,5699,5702,5705],{"class":3177,"line":3486},[3175,5698,4184],{"class":3225},[3175,5700,5701],{"class":3214}," catch",[3175,5703,5704],{"class":3218}," (error) ",[3175,5706,3381],{"class":3225},[3175,5708,5709,5711,5713,5715,5717,5720,5722,5725,5727],{"class":3177,"line":3508},[3175,5710,4322],{"class":3218},[3175,5712,3322],{"class":3225},[3175,5714,3682],{"class":3307},[3175,5716,3378],{"class":3377},[3175,5718,5719],{"class":3218},"error",[3175,5721,3322],{"class":3225},[3175,5723,5724],{"class":3218},"message",[3175,5726,3425],{"class":3377},[3175,5728,3235],{"class":3225},[3175,5730,5731,5733,5735],{"class":3177,"line":3525},[3175,5732,4184],{"class":3225},[3175,5734,4961],{"class":3214},[3175,5736,3357],{"class":3225},[3175,5738,5739,5741,5743,5745,5747,5749],{"class":3177,"line":3533},[3175,5740,4129],{"class":3214},[3175,5742,4468],{"class":3218},[3175,5744,3322],{"class":3225},[3175,5746,4083],{"class":3307},[3175,5748,3311],{"class":3377},[3175,5750,3235],{"class":3225},[3175,5752,5753],{"class":3177,"line":3578},[3175,5754,3775],{"class":3225},[2956,5756,5757,5758,4988],{},"执行 ",[2997,5759,5760],{},"node test-guard.mjs",[3166,5762,5764],{"className":4367,"code":5763,"language":4369,"meta":3171,"style":3171},"允许使用： [ 'read_document' ]\n文档内容：MCP 使用指南\n禁止调用：delete_document\n",[2997,5765,5766,5771,5776],{"__ignoreMap":3171},[3175,5767,5768],{"class":3177,"line":3178},[3175,5769,5770],{},"允许使用： [ 'read_document' ]\n",[3175,5772,5773],{"class":3177,"line":3238},[3175,5774,5775],{},"文档内容：MCP 使用指南\n",[3175,5777,5778],{"class":3177,"line":3264},[3175,5779,5780],{},"禁止调用：delete_document\n",[2956,5782,5783,5784,5786],{},"这次服务端不会新增 ",[2997,5785,3689],{}," 的记录。客户端拦截了请求，而不是等待服务端执行后再检查结果。",[2956,5788,5789],{},"白名单必须绑定经过批准的服务连接。服务端仍需判断调用者是否有权访问具体文档，不能用客户端白名单代替业务授权。",[2960,5791],{},[2951,5793,5795],{"id":5794},"检查工具定义变更","🛠 检查工具定义变更",[2956,5797,5798],{},"白名单只检查名称。如果已经批准的读取工具突然要求提交新的参数，或者描述从“读取文档”变为“读取并修改文档”，仅凭名称就无法识别变化。",[2973,5800,5801,5814],{},[2976,5802,5803],{},[2979,5804,5805,5808,5811],{},[2982,5806,5807],{},"字段",[2982,5809,5810],{},"已批准的工具",[2982,5812,5813],{},"更新后的工具",[2989,5815,5816,5830,5842],{},[2979,5817,5818,5822,5826],{},[2994,5819,5820],{},[2997,5821,4846],{},[2994,5823,5824],{},[2997,5825,3066],{},[2994,5827,5828],{},[2997,5829,3066],{},[2979,5831,5832,5837,5839],{},[2994,5833,5834],{},[2997,5835,5836],{},"description",[2994,5838,3069],{},[2994,5840,5841],{},"读取并修改文档",[2979,5843,5844,5848,5853],{},[2994,5845,5846],{},[2997,5847,3117],{},[2994,5849,5850],{},[2997,5851,5852],{},"true",[2994,5854,5855],{},[2997,5856,5857],{},"false",[2956,5859,5860],{},"因此，批准工具时不仅要保存名称，还要保存经过审查的完整定义。",[3087,5862,5863],{"id":5863},"保存已批准的定义",[2956,5865,3198,5866,5869],{},[2997,5867,5868],{},"review-tool.mjs","，用于输出读取工具的定义。这是人工审查时使用的独立脚本，不参与日常调用。",[3166,5871,5873],{"className":3205,"code":5872,"language":3207,"meta":3171,"style":3171},"import { connectClient, listTools } from './client.mjs';\n\nconst client = await connectClient();\n\ntry {\n    const tools = await listTools(client);\n    const tool = tools.find((item) => item.name === 'read_document');\n    if (!tool) {\n        throw new Error('读取工具不存在');\n    }\n    console.log(JSON.stringify(tool, null, 4));\n} finally {\n    await client.close();\n}\n",[2997,5874,5875,5899,5903,5919,5923,5929,5949,5994,6008,6029,6033,6067,6075,6089],{"__ignoreMap":3171},[3175,5876,5877,5879,5881,5883,5885,5887,5889,5891,5893,5895,5897],{"class":3177,"line":3178},[3175,5878,3215],{"class":3214},[3175,5880,3243],{"class":3225},[3175,5882,4457],{"class":3218},[3175,5884,3454],{"class":3225},[3175,5886,4598],{"class":3218},[3175,5888,3249],{"class":3225},[3175,5890,3252],{"class":3214},[3175,5892,3226],{"class":3225},[3175,5894,4745],{"class":3185},[3175,5896,3232],{"class":3225},[3175,5898,3235],{"class":3225},[3175,5900,5901],{"class":3177,"line":3238},[3175,5902,3291],{"emptyLinePlaceholder":3290},[3175,5904,5905,5907,5909,5911,5913,5915,5917],{"class":3177,"line":3264},[3175,5906,3298],{"class":3297},[3175,5908,4760],{"class":3218},[3175,5910,3304],{"class":3225},[3175,5912,4628],{"class":3214},[3175,5914,4457],{"class":3307},[3175,5916,3311],{"class":3218},[3175,5918,3235],{"class":3225},[3175,5920,5921],{"class":3177,"line":3287},[3175,5922,3291],{"emptyLinePlaceholder":3290},[3175,5924,5925,5927],{"class":3177,"line":3294},[3175,5926,4779],{"class":3214},[3175,5928,3357],{"class":3225},[3175,5930,5931,5933,5935,5937,5939,5941,5943,5945,5947],{"class":3177,"line":3316},[3175,5932,3363],{"class":3297},[3175,5934,4616],{"class":3218},[3175,5936,3369],{"class":3225},[3175,5938,4628],{"class":3214},[3175,5940,4598],{"class":3307},[3175,5942,3378],{"class":3377},[3175,5944,4603],{"class":3218},[3175,5946,3425],{"class":3377},[3175,5948,3235],{"class":3225},[3175,5950,5951,5953,5955,5957,5959,5961,5964,5966,5968,5971,5973,5975,5978,5980,5982,5984,5986,5988,5990,5992],{"class":3177,"line":3341},[3175,5952,3363],{"class":3297},[3175,5954,4841],{"class":3218},[3175,5956,3369],{"class":3225},[3175,5958,4616],{"class":3218},[3175,5960,3322],{"class":3225},[3175,5962,5963],{"class":3307},"find",[3175,5965,3378],{"class":3377},[3175,5967,3378],{"class":3225},[3175,5969,5970],{"class":3809},"item",[3175,5972,3425],{"class":3225},[3175,5974,3520],{"class":3297},[3175,5976,5977],{"class":3218}," item",[3175,5979,3322],{"class":3225},[3175,5981,4846],{"class":3218},[3175,5983,5321],{"class":3225},[3175,5985,3226],{"class":3225},[3175,5987,3066],{"class":3185},[3175,5989,3232],{"class":3225},[3175,5991,3425],{"class":3377},[3175,5993,3235],{"class":3225},[3175,5995,5996,5998,6000,6002,6004,6006],{"class":3177,"line":3346},[3175,5997,3834],{"class":3214},[3175,5999,3806],{"class":3377},[3175,6001,5214],{"class":3225},[3175,6003,4834],{"class":3218},[3175,6005,3855],{"class":3377},[3175,6007,3381],{"class":3225},[3175,6009,6010,6012,6014,6016,6018,6020,6023,6025,6027],{"class":3177,"line":3360},[3175,6011,4666],{"class":3214},[3175,6013,3372],{"class":3225},[3175,6015,4671],{"class":3307},[3175,6017,3378],{"class":3377},[3175,6019,3232],{"class":3225},[3175,6021,6022],{"class":3185},"读取工具不存在",[3175,6024,3232],{"class":3225},[3175,6026,3425],{"class":3377},[3175,6028,3235],{"class":3225},[3175,6030,6031],{"class":3177,"line":3384},[3175,6032,3897],{"class":3225},[3175,6034,6035,6037,6039,6041,6043,6046,6048,6051,6053,6055,6057,6060,6063,6065],{"class":3177,"line":3403},[3175,6036,4322],{"class":3218},[3175,6038,3322],{"class":3225},[3175,6040,3682],{"class":3307},[3175,6042,3378],{"class":3377},[3175,6044,6045],{"class":3218},"JSON",[3175,6047,3322],{"class":3225},[3175,6049,6050],{"class":3307},"stringify",[3175,6052,3378],{"class":3377},[3175,6054,4834],{"class":3218},[3175,6056,3454],{"class":3225},[3175,6058,6059],{"class":3225}," null,",[3175,6061,6062],{"class":3886}," 4",[3175,6064,4569],{"class":3377},[3175,6066,3235],{"class":3225},[3175,6068,6069,6071,6073],{"class":3177,"line":3419},[3175,6070,4184],{"class":3225},[3175,6072,4961],{"class":3214},[3175,6074,3357],{"class":3225},[3175,6076,6077,6079,6081,6083,6085,6087],{"class":3177,"line":3430},[3175,6078,4129],{"class":3214},[3175,6080,4468],{"class":3218},[3175,6082,3322],{"class":3225},[3175,6084,4083],{"class":3307},[3175,6086,3311],{"class":3377},[3175,6088,3235],{"class":3225},[3175,6090,6091],{"class":3177,"line":3435},[3175,6092,3775],{"class":3225},[2956,6094,5757,6095,6098],{},[2997,6096,6097],{},"node review-tool.mjs","，输出类似下面的 JSON（Schema 的具体字段以实际 SDK 输出为准）：",[3166,6100,6103],{"className":6101,"code":6102,"language":3333,"meta":3171,"style":3171},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n    \"name\": \"read_document\",\n    \"description\": \"读取文档\",\n    \"inputSchema\": {\n        \"type\": \"object\",\n        \"properties\": {}\n    },\n    \"annotations\": {\n        \"readOnlyHint\": true\n    }\n}\n",[2997,6104,6105,6109,6130,6148,6161,6182,6195,6200,6212,6224,6228],{"__ignoreMap":3171},[3175,6106,6107],{"class":3177,"line":3178},[3175,6108,3381],{"class":3225},[3175,6110,6111,6114,6116,6119,6121,6124,6126,6128],{"class":3177,"line":3238},[3175,6112,6113],{"class":3225},"    \"",[3175,6115,4846],{"class":3297},[3175,6117,6118],{"class":3225},"\"",[3175,6120,3390],{"class":3225},[3175,6122,6123],{"class":3225}," \"",[3175,6125,3066],{"class":3185},[3175,6127,6118],{"class":3225},[3175,6129,3400],{"class":3225},[3175,6131,6132,6134,6136,6138,6140,6142,6144,6146],{"class":3177,"line":3264},[3175,6133,6113],{"class":3225},[3175,6135,5836],{"class":3297},[3175,6137,6118],{"class":3225},[3175,6139,3390],{"class":3225},[3175,6141,6123],{"class":3225},[3175,6143,3069],{"class":3185},[3175,6145,6118],{"class":3225},[3175,6147,3400],{"class":3225},[3175,6149,6150,6152,6155,6157,6159],{"class":3177,"line":3287},[3175,6151,6113],{"class":3225},[3175,6153,6154],{"class":3297},"inputSchema",[3175,6156,6118],{"class":3225},[3175,6158,3390],{"class":3225},[3175,6160,3357],{"class":3225},[3175,6162,6163,6166,6169,6171,6173,6175,6178,6180],{"class":3177,"line":3294},[3175,6164,6165],{"class":3225},"        \"",[3175,6167,6168],{"class":3181},"type",[3175,6170,6118],{"class":3225},[3175,6172,3390],{"class":3225},[3175,6174,6123],{"class":3225},[3175,6176,6177],{"class":3185},"object",[3175,6179,6118],{"class":3225},[3175,6181,3400],{"class":3225},[3175,6183,6184,6186,6189,6191,6193],{"class":3177,"line":3316},[3175,6185,6165],{"class":3225},[3175,6187,6188],{"class":3181},"properties",[3175,6190,6118],{"class":3225},[3175,6192,3390],{"class":3225},[3175,6194,4907],{"class":3225},[3175,6196,6197],{"class":3177,"line":3341},[3175,6198,6199],{"class":3225},"    },\n",[3175,6201,6202,6204,6206,6208,6210],{"class":3177,"line":3346},[3175,6203,6113],{"class":3225},[3175,6205,3095],{"class":3297},[3175,6207,6118],{"class":3225},[3175,6209,3390],{"class":3225},[3175,6211,3357],{"class":3225},[3175,6213,6214,6216,6218,6220,6222],{"class":3177,"line":3360},[3175,6215,6165],{"class":3225},[3175,6217,3117],{"class":3181},[3175,6219,6118],{"class":3225},[3175,6221,3390],{"class":3225},[3175,6223,4051],{"class":3225},[3175,6225,6226],{"class":3177,"line":3384},[3175,6227,3897],{"class":3225},[3175,6229,6230],{"class":3177,"line":3403},[3175,6231,3775],{"class":3225},[2956,6233,6234,6235,6237,6238,6241],{},"核对 ",[2997,6236,3201],{}," 中的读取工具，确认用途、参数和执行行为符合要求后，将终端输出的 完整 JSON 对象 保存为同目录下的 ",[2997,6239,6240],{},"approved-tool.json","。不要直接复制上面的示意 JSON，也不要在每次连接时自动更新批准文件。",[3087,6243,6244],{"id":6244},"增加定义检查",[2956,6246,6247,6248,6251],{},"使用 Node.js 的 ",[2997,6249,6250],{},"isDeepStrictEqual()"," 比较完整工具定义。它会检查对象的字段和值，而不要求对象属性的排列顺序一致。",[2956,6253,3198,6254,6257],{},[2997,6255,6256],{},"check-definition.mjs","，读取人工批准的定义，并检查当前工具：",[3166,6259,6261],{"className":3205,"code":6260,"language":3207,"meta":3171,"style":3171},"import { readFile } from 'node:fs/promises';\nimport { isDeepStrictEqual } from 'node:util';\n\nconst approvedDefinition = JSON.parse(\n    await readFile(new URL('./approved-tool.json', import.meta.url), 'utf8')\n);\n\nexport function checkDefinition(tool) {\n    if (!isDeepStrictEqual(tool, approvedDefinition)) {\n        throw new Error(`工具定义已变更：${tool.name}`);\n    }\n}\n",[2997,6262,6263,6285,6307,6311,6331,6379,6385,6389,6406,6430,6459,6463],{"__ignoreMap":3171},[3175,6264,6265,6267,6269,6272,6274,6276,6278,6281,6283],{"class":3177,"line":3178},[3175,6266,3215],{"class":3214},[3175,6268,3243],{"class":3225},[3175,6270,6271],{"class":3218}," readFile",[3175,6273,3249],{"class":3225},[3175,6275,3252],{"class":3214},[3175,6277,3226],{"class":3225},[3175,6279,6280],{"class":3185},"node:fs/promises",[3175,6282,3232],{"class":3225},[3175,6284,3235],{"class":3225},[3175,6286,6287,6289,6291,6294,6296,6298,6300,6303,6305],{"class":3177,"line":3238},[3175,6288,3215],{"class":3214},[3175,6290,3243],{"class":3225},[3175,6292,6293],{"class":3218}," isDeepStrictEqual",[3175,6295,3249],{"class":3225},[3175,6297,3252],{"class":3214},[3175,6299,3226],{"class":3225},[3175,6301,6302],{"class":3185},"node:util",[3175,6304,3232],{"class":3225},[3175,6306,3235],{"class":3225},[3175,6308,6309],{"class":3177,"line":3264},[3175,6310,3291],{"emptyLinePlaceholder":3290},[3175,6312,6313,6315,6318,6320,6323,6325,6328],{"class":3177,"line":3287},[3175,6314,3298],{"class":3297},[3175,6316,6317],{"class":3218}," approvedDefinition ",[3175,6319,3304],{"class":3225},[3175,6321,6322],{"class":3218}," JSON",[3175,6324,3322],{"class":3225},[3175,6326,6327],{"class":3307},"parse",[3175,6329,6330],{"class":3218},"(\n",[3175,6332,6333,6335,6337,6339,6341,6343,6345,6347,6350,6352,6354,6357,6359,6362,6364,6367,6369,6371,6374,6376],{"class":3177,"line":3294},[3175,6334,4129],{"class":3214},[3175,6336,6271],{"class":3307},[3175,6338,3378],{"class":3218},[3175,6340,4559],{"class":3225},[3175,6342,4531],{"class":3307},[3175,6344,3378],{"class":3218},[3175,6346,3232],{"class":3225},[3175,6348,6349],{"class":3185},"./approved-tool.json",[3175,6351,3232],{"class":3225},[3175,6353,3454],{"class":3225},[3175,6355,6356],{"class":3214}," import",[3175,6358,3322],{"class":3225},[3175,6360,6361],{"class":3218},"meta",[3175,6363,3322],{"class":3225},[3175,6365,6366],{"class":3218},"url)",[3175,6368,3454],{"class":3225},[3175,6370,3226],{"class":3225},[3175,6372,6373],{"class":3185},"utf8",[3175,6375,3232],{"class":3225},[3175,6377,6378],{"class":3218},")\n",[3175,6380,6381,6383],{"class":3177,"line":3316},[3175,6382,3425],{"class":3218},[3175,6384,3235],{"class":3225},[3175,6386,6387],{"class":3177,"line":3341},[3175,6388,3291],{"emptyLinePlaceholder":3290},[3175,6390,6391,6393,6395,6398,6400,6402,6404],{"class":3177,"line":3346},[3175,6392,4449],{"class":3214},[3175,6394,4454],{"class":3297},[3175,6396,6397],{"class":3307}," checkDefinition",[3175,6399,3378],{"class":3225},[3175,6401,4834],{"class":3809},[3175,6403,3425],{"class":3225},[3175,6405,3357],{"class":3225},[3175,6407,6408,6410,6412,6414,6417,6419,6421,6423,6426,6428],{"class":3177,"line":3360},[3175,6409,3834],{"class":3214},[3175,6411,3806],{"class":3377},[3175,6413,5214],{"class":3225},[3175,6415,6416],{"class":3307},"isDeepStrictEqual",[3175,6418,3378],{"class":3377},[3175,6420,4834],{"class":3218},[3175,6422,3454],{"class":3225},[3175,6424,6425],{"class":3218}," approvedDefinition",[3175,6427,5228],{"class":3377},[3175,6429,3381],{"class":3225},[3175,6431,6432,6434,6436,6438,6440,6442,6445,6447,6449,6451,6453,6455,6457],{"class":3177,"line":3384},[3175,6433,4666],{"class":3214},[3175,6435,3372],{"class":3225},[3175,6437,4671],{"class":3307},[3175,6439,3378],{"class":3377},[3175,6441,5243],{"class":3225},[3175,6443,6444],{"class":3185},"工具定义已变更：",[3175,6446,5249],{"class":3225},[3175,6448,4834],{"class":3218},[3175,6450,3322],{"class":3225},[3175,6452,4846],{"class":3218},[3175,6454,5254],{"class":3225},[3175,6456,3425],{"class":3377},[3175,6458,3235],{"class":3225},[3175,6460,6461],{"class":3177,"line":3403},[3175,6462,3897],{"class":3225},[3175,6464,6465],{"class":3177,"line":3419},[3175,6466,3775],{"class":3225},[2956,6468,6469,6470,6472],{},"在 ",[2997,6471,5023],{}," 顶部引入检查函数：",[3166,6474,6476],{"className":3205,"code":6475,"language":3207,"meta":3171,"style":3171},"import { checkDefinition } from './check-definition.mjs';\n",[2997,6477,6478],{"__ignoreMap":3171},[3175,6479,6480,6482,6484,6486,6488,6490,6492,6495,6497],{"class":3177,"line":3178},[3175,6481,3215],{"class":3214},[3175,6483,3243],{"class":3225},[3175,6485,6397],{"class":3218},[3175,6487,3249],{"class":3225},[3175,6489,3252],{"class":3214},[3175,6491,3226],{"class":3225},[3175,6493,6494],{"class":3185},"./check-definition.mjs",[3175,6496,3232],{"class":3225},[3175,6498,3235],{"class":3225},[2956,6500,6501,6502,6504],{},"将 ",[2997,6503,5401],{}," 替换为以下版本：",[3166,6506,6508],{"className":3205,"code":6507,"language":3207,"meta":3171,"style":3171},"export async function getApprovedTools(client) {\n    const tools = await listTools(client);\n    const approvedTools = tools.filter((tool) => allowedNames.has(tool.name));\n\n    for (const tool of approvedTools) {\n        checkDefinition(tool);\n    }\n\n    return approvedTools;\n}\n",[2997,6509,6510,6528,6548,6591,6595,6615,6628,6632,6636,6644],{"__ignoreMap":3171},[3175,6511,6512,6514,6516,6518,6520,6522,6524,6526],{"class":3177,"line":3178},[3175,6513,4449],{"class":3214},[3175,6515,3514],{"class":3297},[3175,6517,4454],{"class":3297},[3175,6519,5096],{"class":3307},[3175,6521,3378],{"class":3225},[3175,6523,4603],{"class":3809},[3175,6525,3425],{"class":3225},[3175,6527,3357],{"class":3225},[3175,6529,6530,6532,6534,6536,6538,6540,6542,6544,6546],{"class":3177,"line":3238},[3175,6531,3363],{"class":3297},[3175,6533,4616],{"class":3218},[3175,6535,3369],{"class":3225},[3175,6537,4628],{"class":3214},[3175,6539,4598],{"class":3307},[3175,6541,3378],{"class":3377},[3175,6543,4603],{"class":3218},[3175,6545,3425],{"class":3377},[3175,6547,3235],{"class":3225},[3175,6549,6550,6552,6555,6557,6559,6561,6563,6565,6567,6569,6571,6573,6575,6577,6579,6581,6583,6585,6587,6589],{"class":3177,"line":3264},[3175,6551,3363],{"class":3297},[3175,6553,6554],{"class":3218}," approvedTools",[3175,6556,3369],{"class":3225},[3175,6558,4616],{"class":3218},[3175,6560,3322],{"class":3225},[3175,6562,5135],{"class":3307},[3175,6564,3378],{"class":3377},[3175,6566,3378],{"class":3225},[3175,6568,4834],{"class":3809},[3175,6570,3425],{"class":3225},[3175,6572,3520],{"class":3297},[3175,6574,5148],{"class":3218},[3175,6576,3322],{"class":3225},[3175,6578,5153],{"class":3307},[3175,6580,3378],{"class":3377},[3175,6582,4834],{"class":3218},[3175,6584,3322],{"class":3225},[3175,6586,4846],{"class":3218},[3175,6588,4569],{"class":3377},[3175,6590,3235],{"class":3225},[3175,6592,6593],{"class":3177,"line":3287},[3175,6594,3291],{"emptyLinePlaceholder":3290},[3175,6596,6597,6600,6602,6604,6606,6609,6611,6613],{"class":3177,"line":3294},[3175,6598,6599],{"class":3214},"    for",[3175,6601,3806],{"class":3377},[3175,6603,3298],{"class":3297},[3175,6605,4841],{"class":3218},[3175,6607,6608],{"class":3225}," of",[3175,6610,6554],{"class":3218},[3175,6612,3855],{"class":3377},[3175,6614,3381],{"class":3225},[3175,6616,6617,6620,6622,6624,6626],{"class":3177,"line":3316},[3175,6618,6619],{"class":3307},"        checkDefinition",[3175,6621,3378],{"class":3377},[3175,6623,4834],{"class":3218},[3175,6625,3425],{"class":3377},[3175,6627,3235],{"class":3225},[3175,6629,6630],{"class":3177,"line":3341},[3175,6631,3897],{"class":3225},[3175,6633,6634],{"class":3177,"line":3346},[3175,6635,3291],{"emptyLinePlaceholder":3290},[3175,6637,6638,6640,6642],{"class":3177,"line":3360},[3175,6639,3765],{"class":3214},[3175,6641,6554],{"class":3218},[3175,6643,3235],{"class":3225},[3175,6645,6646],{"class":3177,"line":3384},[3175,6647,3775],{"class":3225},[2956,6649,6650,6651,6653,6654,6656],{},"原有 ",[2997,6652,5405],{}," 不需要修改。它在发送请求前已经调用了 ",[2997,6655,5401],{},"，因此发现工具和实际调用都会执行定义检查。",[3087,6658,6659],{"id":6659},"验证定义变更",[2956,6661,6662],{},"下面分别修改工具描述和输入参数，观察客户端是否拒绝发生变化的工具。不要修改批准文件。",[2956,6664,3198,6665,6668],{},[2997,6666,6667],{},"test-definition.mjs","，分别验证工具发现和实际调用，避免第一个错误导致第二项测试未执行。",[3166,6670,6672],{"className":3205,"code":6671,"language":3207,"meta":3171,"style":3171},"import { connectClient } from './client.mjs';\nimport { getApprovedTools, callApprovedTool } from './guard.mjs';\n\nconst client = await connectClient();\n\ntry {\n    try {\n        await getApprovedTools(client);\n        console.log('发现阶段：通过');\n    } catch (error) {\n        console.log('发现阶段：', error.message);\n    }\n\n    try {\n        const result = await callApprovedTool(client, 'read_document');\n        if (result.isError) {\n            throw new Error('读取工具执行失败');\n        }\n        console.log('调用阶段：通过');\n    } catch (error) {\n        console.log('调用阶段：', error.message);\n    }\n} finally {\n    await client.close();\n}\n",[2997,6673,6674,6694,6718,6722,6738,6742,6748,6755,6770,6791,6805,6835,6839,6843,6849,6878,6895,6916,6921,6942,6956,6985,6989,6997,7011],{"__ignoreMap":3171},[3175,6675,6676,6678,6680,6682,6684,6686,6688,6690,6692],{"class":3177,"line":3178},[3175,6677,3215],{"class":3214},[3175,6679,3243],{"class":3225},[3175,6681,4457],{"class":3218},[3175,6683,3249],{"class":3225},[3175,6685,3252],{"class":3214},[3175,6687,3226],{"class":3225},[3175,6689,4745],{"class":3185},[3175,6691,3232],{"class":3225},[3175,6693,3235],{"class":3225},[3175,6695,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716],{"class":3177,"line":3238},[3175,6697,3215],{"class":3214},[3175,6699,3243],{"class":3225},[3175,6701,5096],{"class":3218},[3175,6703,3454],{"class":3225},[3175,6705,5184],{"class":3218},[3175,6707,3249],{"class":3225},[3175,6709,3252],{"class":3214},[3175,6711,3226],{"class":3225},[3175,6713,5465],{"class":3185},[3175,6715,3232],{"class":3225},[3175,6717,3235],{"class":3225},[3175,6719,6720],{"class":3177,"line":3264},[3175,6721,3291],{"emptyLinePlaceholder":3290},[3175,6723,6724,6726,6728,6730,6732,6734,6736],{"class":3177,"line":3287},[3175,6725,3298],{"class":3297},[3175,6727,4760],{"class":3218},[3175,6729,3304],{"class":3225},[3175,6731,4628],{"class":3214},[3175,6733,4457],{"class":3307},[3175,6735,3311],{"class":3218},[3175,6737,3235],{"class":3225},[3175,6739,6740],{"class":3177,"line":3294},[3175,6741,3291],{"emptyLinePlaceholder":3290},[3175,6743,6744,6746],{"class":3177,"line":3316},[3175,6745,4779],{"class":3214},[3175,6747,3357],{"class":3225},[3175,6749,6750,6753],{"class":3177,"line":3341},[3175,6751,6752],{"class":3214},"    try",[3175,6754,3357],{"class":3225},[3175,6756,6757,6760,6762,6764,6766,6768],{"class":3177,"line":3346},[3175,6758,6759],{"class":3214},"        await",[3175,6761,5096],{"class":3307},[3175,6763,3378],{"class":3377},[3175,6765,4603],{"class":3218},[3175,6767,3425],{"class":3377},[3175,6769,3235],{"class":3225},[3175,6771,6772,6774,6776,6778,6780,6782,6785,6787,6789],{"class":3177,"line":3360},[3175,6773,3677],{"class":3218},[3175,6775,3322],{"class":3225},[3175,6777,3682],{"class":3307},[3175,6779,3378],{"class":3377},[3175,6781,3232],{"class":3225},[3175,6783,6784],{"class":3185},"发现阶段：通过",[3175,6786,3232],{"class":3225},[3175,6788,3425],{"class":3377},[3175,6790,3235],{"class":3225},[3175,6792,6793,6795,6797,6799,6801,6803],{"class":3177,"line":3384},[3175,6794,3422],{"class":3225},[3175,6796,5701],{"class":3214},[3175,6798,3806],{"class":3377},[3175,6800,5719],{"class":3218},[3175,6802,3855],{"class":3377},[3175,6804,3381],{"class":3225},[3175,6806,6807,6809,6811,6813,6815,6817,6820,6822,6824,6827,6829,6831,6833],{"class":3177,"line":3403},[3175,6808,3677],{"class":3218},[3175,6810,3322],{"class":3225},[3175,6812,3682],{"class":3307},[3175,6814,3378],{"class":3377},[3175,6816,3232],{"class":3225},[3175,6818,6819],{"class":3185},"发现阶段：",[3175,6821,3232],{"class":3225},[3175,6823,3454],{"class":3225},[3175,6825,6826],{"class":3218}," error",[3175,6828,3322],{"class":3225},[3175,6830,5724],{"class":3218},[3175,6832,3425],{"class":3377},[3175,6834,3235],{"class":3225},[3175,6836,6837],{"class":3177,"line":3419},[3175,6838,3897],{"class":3225},[3175,6840,6841],{"class":3177,"line":3430},[3175,6842,3291],{"emptyLinePlaceholder":3290},[3175,6844,6845,6847],{"class":3177,"line":3435},[3175,6846,6752],{"class":3214},[3175,6848,3357],{"class":3225},[3175,6850,6851,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876],{"class":3177,"line":3459},[3175,6852,6853],{"class":3297},"        const",[3175,6855,4868],{"class":3218},[3175,6857,3369],{"class":3225},[3175,6859,4628],{"class":3214},[3175,6861,5184],{"class":3307},[3175,6863,3378],{"class":3377},[3175,6865,4603],{"class":3218},[3175,6867,3454],{"class":3225},[3175,6869,3226],{"class":3225},[3175,6871,3066],{"class":3185},[3175,6873,3232],{"class":3225},[3175,6875,3425],{"class":3377},[3175,6877,3235],{"class":3225},[3175,6879,6880,6883,6885,6887,6889,6891,6893],{"class":3177,"line":3475},[3175,6881,6882],{"class":3214},"        if",[3175,6884,3806],{"class":3377},[3175,6886,4932],{"class":3218},[3175,6888,3322],{"class":3225},[3175,6890,5609],{"class":3218},[3175,6892,3855],{"class":3377},[3175,6894,3381],{"class":3225},[3175,6896,6897,6900,6902,6904,6906,6908,6910,6912,6914],{"class":3177,"line":3486},[3175,6898,6899],{"class":3214},"            throw",[3175,6901,3372],{"class":3225},[3175,6903,4671],{"class":3307},[3175,6905,3378],{"class":3377},[3175,6907,3232],{"class":3225},[3175,6909,5628],{"class":3185},[3175,6911,3232],{"class":3225},[3175,6913,3425],{"class":3377},[3175,6915,3235],{"class":3225},[3175,6917,6918],{"class":3177,"line":3508},[3175,6919,6920],{"class":3225},"        }\n",[3175,6922,6923,6925,6927,6929,6931,6933,6936,6938,6940],{"class":3177,"line":3525},[3175,6924,3677],{"class":3218},[3175,6926,3322],{"class":3225},[3175,6928,3682],{"class":3307},[3175,6930,3378],{"class":3377},[3175,6932,3232],{"class":3225},[3175,6934,6935],{"class":3185},"调用阶段：通过",[3175,6937,3232],{"class":3225},[3175,6939,3425],{"class":3377},[3175,6941,3235],{"class":3225},[3175,6943,6944,6946,6948,6950,6952,6954],{"class":3177,"line":3533},[3175,6945,3422],{"class":3225},[3175,6947,5701],{"class":3214},[3175,6949,3806],{"class":3377},[3175,6951,5719],{"class":3218},[3175,6953,3855],{"class":3377},[3175,6955,3381],{"class":3225},[3175,6957,6958,6960,6962,6964,6966,6968,6971,6973,6975,6977,6979,6981,6983],{"class":3177,"line":3578},[3175,6959,3677],{"class":3218},[3175,6961,3322],{"class":3225},[3175,6963,3682],{"class":3307},[3175,6965,3378],{"class":3377},[3175,6967,3232],{"class":3225},[3175,6969,6970],{"class":3185},"调用阶段：",[3175,6972,3232],{"class":3225},[3175,6974,3454],{"class":3225},[3175,6976,6826],{"class":3218},[3175,6978,3322],{"class":3225},[3175,6980,5724],{"class":3218},[3175,6982,3425],{"class":3377},[3175,6984,3235],{"class":3225},[3175,6986,6987],{"class":3177,"line":3584},[3175,6988,3897],{"class":3225},[3175,6990,6991,6993,6995],{"class":3177,"line":3593},[3175,6992,4184],{"class":3225},[3175,6994,4961],{"class":3214},[3175,6996,3357],{"class":3225},[3175,6998,6999,7001,7003,7005,7007,7009],{"class":3177,"line":3598},[3175,7000,4129],{"class":3214},[3175,7002,4468],{"class":3218},[3175,7004,3322],{"class":3225},[3175,7006,4083],{"class":3307},[3175,7008,3311],{"class":3377},[3175,7010,3235],{"class":3225},[3175,7012,7013],{"class":3177,"line":3619},[3175,7014,3775],{"class":3225},[2956,7016,5757,7017,4988],{},[2997,7018,7019],{},"node test-definition.mjs",[3166,7021,7023],{"className":4367,"code":7022,"language":4369,"meta":3171,"style":3171},"发现阶段：通过\n调用阶段：通过\n",[2997,7024,7025,7030],{"__ignoreMap":3171},[3175,7026,7027],{"class":3177,"line":3178},[3175,7028,7029],{},"发现阶段：通过\n",[3175,7031,7032],{"class":3177,"line":3238},[3175,7033,7034],{},"调用阶段：通过\n",[2956,7036,7037,7038,7040,7041,7043,7044,7047],{},"实验一：修改工具描述。 在 ",[2997,7039,3201],{}," 的读取工具配置中，将 ",[2997,7042,5836],{}," 改为 ",[2997,7045,7046],{},"'读取并修改文档'","，重启服务并运行测试。",[2956,7049,7050,7051,7053,7054,7057],{},"实验二：修改输入参数。 恢复原描述，在 ",[2997,7052,3201],{}," 顶部导入 ",[2997,7055,7056],{},"z","：",[3166,7059,7061],{"className":3205,"code":7060,"language":3207,"meta":3171,"style":3171},"import { z } from 'zod';\n",[2997,7062,7063],{"__ignoreMap":3171},[3175,7064,7065,7067,7069,7072,7074,7076,7078,7081,7083],{"class":3177,"line":3178},[3175,7066,3215],{"class":3214},[3175,7068,3243],{"class":3225},[3175,7070,7071],{"class":3218}," z",[3175,7073,3249],{"class":3225},[3175,7075,3252],{"class":3214},[3175,7077,3226],{"class":3225},[3175,7079,7080],{"class":3185},"zod",[3175,7082,3232],{"class":3225},[3175,7084,3235],{"class":3225},[2956,7086,7087,7088,7091],{},"将读取工具的 ",[2997,7089,7090],{},"inputSchema: {}"," 改为：",[3166,7093,7095],{"className":3205,"code":7094,"language":3207,"meta":3171,"style":3171},"inputSchema: { documentId: z.string() },\n",[2997,7096,7097],{"__ignoreMap":3171},[3175,7098,7099,7101,7103,7105,7108,7110,7112,7114,7117,7120],{"class":3177,"line":3178},[3175,7100,6154],{"class":3181},[3175,7102,3390],{"class":3225},[3175,7104,3243],{"class":3225},[3175,7106,7107],{"class":3181}," documentId",[3175,7109,3390],{"class":3225},[3175,7111,7071],{"class":3218},[3175,7113,3322],{"class":3225},[3175,7115,7116],{"class":3307},"string",[3175,7118,7119],{"class":3377},"() ",[3175,7121,7122],{"class":3225},"},\n",[2956,7124,7125],{},"重启服务并运行测试。两次实验的预期输出相同：",[3166,7127,7129],{"className":4367,"code":7128,"language":4369,"meta":3171,"style":3171},"发现阶段： 工具定义已变更：read_document\n调用阶段： 工具定义已变更：read_document\n",[2997,7130,7131,7136],{"__ignoreMap":3171},[3175,7132,7133],{"class":3177,"line":3178},[3175,7134,7135],{},"发现阶段： 工具定义已变更：read_document\n",[3175,7137,7138],{"class":3177,"line":3238},[3175,7139,7140],{},"调用阶段： 工具定义已变更：read_document\n",[2956,7142,7143],{},"工具名称没有变化，但两个入口都拒绝使用该工具。实验结束后恢复原定义并重启服务。",[2956,7145,7146,7147,7150],{},"声明支持工具列表变化通知的服务可以发送 ",[2997,7148,7149],{},"notifications/tools/list_changed","。收到通知后应暂停使用受影响的工具，重新获取并审查定义。本实验使用无状态 HTTP，直接在调用前重新获取列表，不依赖通知。",[4377,7152,7153],{},[2956,7154,7155],{},"定义一致不代表执行行为一致：服务端可能在不改变定义的情况下改变行为，也可能在检查后、调用前发生变化。仍需审查服务来源、管理版本并限制服务端权限。",[2956,7157,7158],{},"批准记录应由可信的应用配置维护，不能由模型或工具返回内容修改。",[2960,7160],{},[2951,7162,7164],{"id":7163},"mcp-认证与授权","🧱 MCP 认证与授权",[2956,7166,7167],{},"假设文档 MCP Server 需要登录授权，文档助手只需读取用户有权访问的文档。使用 MCP OAuth 授权流程时，客户端向授权服务器申请面向文档 MCP Server 的访问令牌，并尽量只申请读取权限（scope）。",[7169,7170],"ai-security-mcp-authorization",{},[2956,7172,7173,7174,7177],{},"客户端通过 ",[2997,7175,7176],{},"Authorization: Bearer \u003Ctoken>"," 请求头发送令牌。服务端收到请求后，需要验证令牌是否有效、是否签发给当前服务，以及是否具备本次操作所需的权限。",[2956,7179,7180],{},"如果文档 MCP Server 还需要请求其他业务 API，应通过该 API 支持的授权方式获得适用的凭据，不能直接透传客户端提供的 MCP 访问令牌。",[2960,7182],{},[2951,7184,7186],{"id":7185},"知识问答","❓ 知识问答",[2956,7188,7189,7190,7192],{},"Q1：两个 MCP Server 都提供 ",[2997,7191,3066],{},"，能否共用同一份批准记录？",[2956,7194,7195],{},"不能。工具名称相同不代表服务来源、定义或权限相同。连接多个服务时，应通过服务标识和工具名称共同区分工具，并将调用路由到对应的已批准连接。",[2960,7197],{},[2951,7199,7201],{"id":7200},"小练习","🧪 小练习",[2956,7203,7204,7205,7208,7209,7211,7212,7214],{},"在实验服务中注册 ",[2997,7206,7207],{},"search_documents"," 工具，保持客户端批准记录不变。重启服务后，在 ",[2997,7210,5418],{}," 中将最后一次调用的工具名改为 ",[2997,7213,7207],{},"，运行测试。",[2956,7216,7217,7218,7220,7221,5410],{},"验收标准：允许列表仍然只有 ",[2997,7219,3066],{},"，读取成功，最后输出 ",[2997,7222,7223],{},"禁止调用：search_documents",[2960,7225],{},[2956,7227,7228],{},"🎉 现在你可以为 MCP 服务接入设置安全限制，并检查工具定义是否发生变化。",[7230,7231,7232],"style",{},"html pre.shiki code .sYGMc, html code.shiki .sYGMc{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sIEYB, html code.shiki .sIEYB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s8pZq, html code.shiki .s8pZq{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sndM8, html code.shiki .sndM8{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s86vT, html code.shiki .s86vT{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s50WR, html code.shiki .s50WR{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swgpB, html code.shiki .swgpB{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sd2Uz, html code.shiki .sd2Uz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sPKOg, html code.shiki .sPKOg{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sK9QF, html code.shiki .sK9QF{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .syuKq, html code.shiki .syuKq{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .smPcV, html code.shiki .smPcV{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":3171,"searchDepth":3238,"depth":3238,"links":7234},[7235,7236,7237,7242,7247,7252,7253,7254],{"id":2953,"depth":3238,"text":2954},{"id":2964,"depth":3238,"text":2965},{"id":3038,"depth":3238,"text":3039,"children":7238},[7239,7240,7241],{"id":3089,"depth":3264,"text":3089},{"id":3160,"depth":3264,"text":3161},{"id":4384,"depth":3264,"text":4385},{"id":4709,"depth":3238,"text":4710,"children":7243},[7244,7245,7246],{"id":4713,"depth":3264,"text":4713},{"id":5012,"depth":3264,"text":5012},{"id":5413,"depth":3264,"text":5413},{"id":5794,"depth":3238,"text":5795,"children":7248},[7249,7250,7251],{"id":5863,"depth":3264,"text":5863},{"id":6244,"depth":3264,"text":6244},{"id":6659,"depth":3264,"text":6659},{"id":7163,"depth":3238,"text":7164},{"id":7185,"depth":3238,"text":7186},{"id":7200,"depth":3238,"text":7201},"使用 Streamable HTTP 安全接入 MCP Server，通过工具白名单和定义检查限制工具调用，并理解访问令牌的使用边界。","md",null,{},{"title":2929},{"title":2929,"description":7255},"i7DIcHUHDF",[7263,7265],{"title":2927,"path":2923,"stem":2924,"description":7264,"children":-1},"使用 Qdrant 实现知识库发布过滤、文档访问权限控制和权限撤销，安全构建模型上下文。",{"title":2933,"path":2934,"stem":2935,"description":7266,"children":-1},"为 Agent 高风险工具调用加入服务端授权、操作审批与一次性执行校验。",1796265417594]