# airweave - Doramagic AI Context Pack

> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。

## 充分原则

- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。
- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 airweave 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。

## Claim 消费规则

- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。
- **事实最低状态**：`supported`
- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。
- `weak`：只能作为低置信度线索，必须要求用户继续核实。
- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。
- `unverified`：不得作为事实使用，应明确说证据不足。
- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。

## 它最适合谁

- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`CLAUDE.md`, `README.md` Claim：`clm_0001` supported 0.86

## 怎么开始

- `git clone https://github.com/airweave-ai/airweave.git` 证据：`README.md` Claim：`clm_0003` supported 0.86
- `pip install airweave-sdk        # Python` 证据：`README.md` Claim：`clm_0004` supported 0.86
- `npm install @airweave/sdk       # TypeScript` 证据：`README.md` Claim：`clm_0005` supported 0.86
- `pip install airweave-cli` 证据：`README.md` Claim：`clm_0006` supported 0.86
- `npm install                    # Install dependencies` 证据：`CLAUDE.md` Claim：`clm_0007` supported 0.86

## 继续前判断卡

- **当前建议**：需要管理员/安全审批
- **为什么**：继续前可能涉及密钥、账号、外部服务或敏感上下文，建议先经过管理员或安全审批。

### 30 秒判断

- **现在怎么做**：需要管理员/安全审批
- **最小安全下一步**：先跑 Prompt Preview；若涉及凭证或企业环境，先审批再试装
- **先别相信**：工具权限边界不能在安装前相信。
- **继续会触碰**：命令执行、宿主 AI 配置、本地环境或项目文件

### 现在可以相信

- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`CLAUDE.md`, `README.md` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86

### 现在还不能相信

- **工具权限边界不能在安装前相信。**（unverified）：MCP/tool 类项目通常会触碰文件、网络、浏览器或外部 API，必须真实检查权限和日志。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`CLAUDE.md`
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。
- **安装命令是否需要网络、权限或全局写入？**（unverified）：这影响企业环境和个人环境的安装风险。 证据：`README.md`

### 继续会触碰什么

- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`CLAUDE.md`, `README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`CLAUDE.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`CLAUDE.md`, `README.md`
- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`examples/README.md`, `examples/quickstart_tutorial.py`, `mcp/README.md`, `mcp/config-example.json` 等
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：用安装前交互式试用判断工作方式是否匹配，不需要授权或改环境。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）
- **不要使用真实生产凭证**：环境变量/API key 一旦进入宿主或工具链，可能产生账号和合规风险。（适用：出现 API、TOKEN、KEY、SECRET 等环境线索时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **准备撤销测试 API key 或 token**：测试凭证泄露或误用时，可以快速止损。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

- 解释项目适合谁和能做什么
- 基于项目文档演示典型对话流程
- 帮助用户判断是否值得安装或继续研究

## 哪些必须安装后验证

- 真实安装 Skill、插件或 CLI
- 执行脚本、修改本地文件或访问外部服务
- 验证真实输出质量、性能和兼容性

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0008` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`CLAUDE.md`, `README.md` Claim：`clm_0009` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。
- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。
- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。
- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。
- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。

### 任务路由

- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`CLAUDE.md`, `README.md` Claim：`clm_0001` supported 0.86

### 上下文规模

- 文件总数：1870
- 重要文件覆盖：40/1870
- 证据索引条目：80
- 角色 / Skill 条目：16

### 证据不足时的处理

- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。
- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。
- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。
- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。

## Prompt Recipes

### 适配判断

- 目标：判断这个项目是否适合用户当前任务。
- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。

```text
请基于 airweave 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。
```

### 安装前体验

- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。
- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。

```text
请把 airweave 当作安装前体验资产，而不是已安装工具或真实运行环境。

请严格输出四段：
1. 先问我 3 个必要问题。
2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。
3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。
4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。

硬性边界：
- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。
- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。
- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。
- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。
- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。
- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。

```

### 角色 / Skill 选择

- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。
- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。

```text
请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。
```

### 风险预检

- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。
- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。

```text
请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。
```

### 宿主 AI 开工指令

- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。
- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。

```text
请基于 airweave 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```

## 角色 / Skill 索引

- 共索引 16 个角色 / Skill / 项目文档条目。

- **What is Airweave?**（project_doc）：Open-source context retrieval layer for AI agents and RAG systems. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Airweave Connect**（project_doc）：Airweave Connect is a hosted UI component that enables end-users to connect data sources to the Airweave platform. It provides a Plaid-style Connect modal experience, designed to be embedded as an iframe in parent applications. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`connect/README.md`
- **Developer Enablement Materials**（project_doc）：This folder contains educational materials and tutorials to help developers get started with Airweave quickly and effectively. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/README.md`
- **Fern Module**（project_doc）：This directory contains the Fern API definition and configuration for Airweave's API documentation and SDK generation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`fern/README.md`
- **Airweave Frontend**（project_doc）：The Airweave frontend is a React/TypeScript application that provides the UI for the Airweave platform. Airweave is an open-source platform that makes any app searchable for your agent by syncing data from various sources into vector and graph databases with minimal configuration. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`frontend/README.md`
- **Airweave MCP Search Server**（project_doc）：! npm version https://img.shields.io/npm/v/airweave-mcp-search.svg https://www.npmjs.com/package/airweave-mcp-search ! License: MIT https://img.shields.io/badge/License-MIT-yellow.svg https://opensource.org/licenses/MIT ! Node.js = 20 https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg https://nodejs.org/ ! MCP Protocol https://img.shields.io/badge/MCP-2025--03--26-blue.svg https://modelcontextprotocol.io/ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`mcp/README.md`
- **Monke 🐒🥁 - Airweave Integration Testing Framework**（project_doc）：Monke 🐒🥁 - Airweave Integration Testing Framework 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`monke/README.md`
- **Airweave Analytics Module**（project_doc）：This module provides PostHog analytics integration for Airweave, enabling comprehensive tracking of user behavior, business metrics, and system performance. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`backend/airweave/analytics/README.md`
- **Temporal Integration**（project_doc）：This directory contains the Temporal workflow integration for Airweave. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`backend/airweave/domains/temporal/README.md`
- **@airweave/connect-react**（project_doc）：React hook for integrating Airweave Connect into your application. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`connect/packages/react/README.md`
- **Airweave Webhook Demo**（project_doc）：A minimal FastAPI app that receives Airweave webhook events and streams them to a browser UI in real time via WebSocket. Useful for testing and debugging your webhook integration locally. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/webhook-demo/README.md`
- **Airweave API SDK and Documentation Generation**（project_doc）：Airweave API SDK and Documentation Generation 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`fern/scripts/README.md`
- **Monke Frontend**（project_doc）：Vite + React + Tailwind UI for Monke runs. Proxies API/WS to localhost:8081. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`monke/frontend/README.md`
- **CLAUDE.md**（project_doc）：This file provides guidance to Claude Code claude.ai/code when working with code in this repository. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`
- **Contributing to Airweave**（project_doc）：Thank you for your interest in contributing to Airweave! This document provides guidelines and instructions for contributing to the project. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Airweave Backend Architecture Refactor v0**（project_doc）：Airweave Backend Architecture Refactor v0 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`backend/airweave/architecture-refactor.md`

## 证据索引

- 共索引 80 条证据。

- **What is Airweave?**（documentation）：Open-source context retrieval layer for AI agents and RAG systems. 证据：`README.md`
- **Airweave Connect**（documentation）：Airweave Connect is a hosted UI component that enables end-users to connect data sources to the Airweave platform. It provides a Plaid-style Connect modal experience, designed to be embedded as an iframe in parent applications. 证据：`connect/README.md`
- **Developer Enablement Materials**（documentation）：This folder contains educational materials and tutorials to help developers get started with Airweave quickly and effectively. 证据：`examples/README.md`
- **Fern Module**（documentation）：This directory contains the Fern API definition and configuration for Airweave's API documentation and SDK generation. 证据：`fern/README.md`
- **Airweave Frontend**（documentation）：The Airweave frontend is a React/TypeScript application that provides the UI for the Airweave platform. Airweave is an open-source platform that makes any app searchable for your agent by syncing data from various sources into vector and graph databases with minimal configuration. 证据：`frontend/README.md`
- **Airweave MCP Search Server**（documentation）：! npm version https://img.shields.io/npm/v/airweave-mcp-search.svg https://www.npmjs.com/package/airweave-mcp-search ! License: MIT https://img.shields.io/badge/License-MIT-yellow.svg https://opensource.org/licenses/MIT ! Node.js = 20 https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg https://nodejs.org/ ! MCP Protocol https://img.shields.io/badge/MCP-2025--03--26-blue.svg https://modelcontextprotocol.io/ 证据：`mcp/README.md`
- **Monke 🐒🥁 - Airweave Integration Testing Framework**（documentation）：Monke 🐒🥁 - Airweave Integration Testing Framework 证据：`monke/README.md`
- **Airweave Analytics Module**（documentation）：This module provides PostHog analytics integration for Airweave, enabling comprehensive tracking of user behavior, business metrics, and system performance. 证据：`backend/airweave/analytics/README.md`
- **Temporal Integration**（documentation）：This directory contains the Temporal workflow integration for Airweave. 证据：`backend/airweave/domains/temporal/README.md`
- **@airweave/connect-react**（documentation）：React hook for integrating Airweave Connect into your application. 证据：`connect/packages/react/README.md`
- **Airweave Webhook Demo**（documentation）：A minimal FastAPI app that receives Airweave webhook events and streams them to a browser UI in real time via WebSocket. Useful for testing and debugging your webhook integration locally. 证据：`examples/webhook-demo/README.md`
- **Airweave API SDK and Documentation Generation**（documentation）：Airweave API SDK and Documentation Generation 证据：`fern/scripts/README.md`
- **Monke Frontend**（documentation）：Vite + React + Tailwind UI for Monke runs. Proxies API/WS to localhost:8081. 证据：`monke/frontend/README.md`
- **CLAUDE.md**（documentation）：This file provides guidance to Claude Code claude.ai/code when working with code in this repository. 证据：`CLAUDE.md`
- **Package**（package_manifest）：{ "name": "airweave-connect", "private": true, "type": "module", "exports": { ".": "./src/index.ts", "./lib/types": "./src/lib/types.ts", "./lib/connection-utils": "./src/lib/connection-utils.ts", "./lib/icons": "./src/lib/icons.ts", "./lib/theme-defaults": "./src/lib/theme-defaults.ts" }, "scripts": { "dev": "vite dev --port 8082", "build": "vite build", "start": "node .output/server/index.mjs", "preview": "vite preview", "test": "vitest run", "test:e2e": "playwright test", "lint": "eslint .", "typecheck": "tsc --noEmit" }, "dependencies": { "@base-ui/react": "^1.0.0", "@microsoft/fetch-event-source": "^2.0.1", "@number-flow/react": "^0.5.10", "@tailwindcss/vite": "^4.0.6", "@tanstack/reac… 证据：`connect/package.json`
- **Package**（package_manifest）：{ "name": "vite react shadcn ts", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "build:dev": "vite build --mode development", "lint": "eslint .", "preview": "vite preview", "test": "vitest run", "test:watch": "vitest" }, "dependencies": { "@auth0/auth0-react": "^2.2.4", "@hookform/resolvers": "^3.9.0", "@microsoft/fetch-event-source": "^2.0.1", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-avatar": "^1.1.0", "@radix-ui/react-checkbox": "^1.1.1", "@radix-ui/react-collapsible": "^1.1.0", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-popo… 证据：`frontend/package.json`
- **Package**（package_manifest）：{ "name": "airweave-mcp-search", "version": "0.5.7", "mcpName": "io.github.airweave-ai/search", "description": "MCP server for searching Airweave collections", "type": "module", "main": "build/index.js", "bin": { "airweave-mcp-search": "./build/index.js" }, "scripts": { "build": "tsc && chmod 755 build/index.js", "start": "node build/index.js", "start:http": "node build/index-http.js", "dev": "npm run build && npm run start", "dev:http": "npm run build && npm run start:http", "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", "test:mcp": "vitest run tests/mcp-server.test.ts", "test:http": "vitest run tests/http-transport.test.ts", "test:oauth": "vitest r… 证据：`mcp/package.json`
- **Contributing to Airweave**（documentation）：Thank you for your interest in contributing to Airweave! This document provides guidelines and instructions for contributing to the project. 证据：`CONTRIBUTING.md`
- **Package**（package_manifest）：{ "name": "@airweave/connect-js", "version": "0.1.0", "description": "Vanilla JavaScript SDK for Airweave Connect", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "unpkg": "./dist/index.iife.js", "jsdelivr": "./dist/index.iife.js", "exports": { ".": { "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }, "require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" } } }, "files": "dist" , "sideEffects": false, "scripts": { "dev": "vite build --watch", "build": "tsc && vite build", "lint": "eslint .", "test": "vitest run", "test:watch": "vitest", "prepublishOnly": "npm run build" }, "peerDependencies":… 证据：`connect/packages/js/package.json`
- **Package**（package_manifest）：{ "name": "@airweave/connect-react", "version": "0.1.0", "description": "React hook for Airweave Connect", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }, "require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" } } }, "files": "dist" , "sideEffects": false, "scripts": { "dev": "vite build --watch", "build": "tsc && vite build", "lint": "eslint .", "prepublishOnly": "npm run build" }, "peerDependencies": { "react": " =19.0.0", "react-dom": " =19.0.0" }, "devDependencies": { "airweave-connect": "file:../..", "@types/react": "^… 证据：`connect/packages/react/package.json`
- **Package**（package_manifest）：{ "name": "monke-frontend", "version": "0.1.0", "private": true, "type": "module", "scripts": { "dev": "vite", "build": "tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1", "sonner": "^1.4.41" }, "devDependencies": { "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", "postcss": "^8.4.47", "tailwindcss": "^3.4.10", "typescript": "^5.5.4", "vite": "^5.4.1" } } 证据：`monke/frontend/package.json`
- **License**（source_file）：Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 证据：`LICENSE`
- **Airweave Backend Architecture Refactor v0**（documentation）：Airweave Backend Architecture Refactor v0 证据：`backend/airweave/architecture-refactor.md`
- **Docker Compose**（source_file）：services: postgres: container name: airweave-db image: postgres:16 environment: POSTGRES DB: ${POSTGRES DB:-airweave} POSTGRES USER: ${POSTGRES USER} POSTGRES PASSWORD: ${POSTGRES PASSWORD} command: - "postgres" - "-c" - "max connections=200" - "-c" - "shared buffers=256MB" - "-c" - "effective cache size=1GB" ports: - "5432:5432" volumes: - postgres data:/var/lib/postgresql/data - ./init-scripts:/docker-entrypoint-initdb.d:ro healthcheck: test: "CMD-SHELL", "pg isready -U ${POSTGRES USER}" interval: 5s timeout: 5s retries: 5 redis: container name: airweave-redis image: redis:7-alpine ports: - "6379:6379" volumes: - redis data:/data healthcheck: test: "CMD", "redis-cli", "ping" interval: 5s… 证据：`docker/docker-compose.yml`
- **Registry**（source_file）：class LLMProvider str, Enum ⋮---- CEREBRAS = "cerebras" GROQ = "groq" ANTHROPIC = "anthropic" TOGETHER = "together" MISTRAL = "mistral" ⋮---- class LLMModel str, Enum ⋮---- GPT OSS 120B = "gpt-oss-120b" ZAI GLM 4 7 = "zai-glm-4.7" ZAI GLM 5 = "zai-glm-5" CLAUDE SONNET 4 5 = "claude-sonnet-4.5" CLAUDE SONNET 4 6 = "claude-sonnet-4.6" KIMI K2 5 = "kimi-k2.5" QWEN 3 5 = "qwen-3.5" QWEN 3 5 DEDICATED = "qwen-3.5-dedicated" ZAI GLM 5 DEDICATED = "zai-glm-5-dedicated" MINIMAX M2 5 = "minimax-m2.5" MISTRAL LARGE = "mistral-large" MISTRAL SMALL = "mistral-small" MAGISTRAL SMALL = "magistral-small" ⋮---- @dataclass frozen=True class ThinkingConfig ⋮---- param name: str param value: Union str, bool,… 证据：`backend/airweave/adapters/llm/registry.py`
- **Registry**（source_file）：class TokenizerType str, Enum ⋮---- TIKTOKEN = "tiktoken" ⋮---- class TokenizerEncoding str, Enum ⋮---- O200K HARMONY = "o200k harmony" ⋮---- @dataclass frozen=True class TokenizerModelSpec ⋮---- encoding name: str ⋮---- TOKENIZER REGISTRY: dict TokenizerType, dict TokenizerEncoding, TokenizerModelSpec = { ⋮---- type encodings = TOKENIZER REGISTRY tokenizer type ⋮---- available = e.value for e in type encodings.keys 证据：`backend/airweave/adapters/tokenizer/registry.py`
- **Service**（source_file）：class AnalyticsService ⋮---- def init self - None ⋮---- def get deployment type self - str ⋮---- """Determine if this is hosted platform or self-hosted deployment. Returns: str: "hosted" for app.airweave.ai, "self hosted" for other deployments Get a unique identifier for this deployment. Returns: str: Unique identifier for the deployment Identify a user with properties. Args: ---- user id: Unique identifier for the user properties: User properties to set Extract distinct id, groups, and metadata from a request context.""" ⋮---- user = getattr ctx, "user", None ⋮---- distinct id = str user.id ⋮---- distinct id = f"api key {ctx.organization.id}" ⋮---- groups = {"organization": str ctx.organiz… 证据：`backend/airweave/analytics/service.py`
- **Track active SSE connections**（source_file）：router = TrailingSlashRouter ⋮---- Track active SSE connections connection id = f"{ctx}:{job id}:{asyncio.get running loop .time }" ⋮---- ps = await pubsub.subscribe "sync job", job id ⋮---- async def event stream - AsyncGenerator str, None ⋮---- last heartbeat = asyncio.get running loop .time heartbeat interval = 30 ⋮---- current time = asyncio.get running loop .time ⋮---- last heartbeat = current time ⋮---- channel = f"sync job state:{job id}" ⋮---- ps = await pubsub.subscribe "sync job state", job id 证据：`backend/airweave/api/v1/endpoints/sync.py`
- **Limit concurrency to prevent overload**（source_file）：class AdminSyncQueryBuilder ⋮---- def init self ⋮---- def with sync ids self, sync ids: List UUID - "AdminSyncQueryBuilder" ⋮---- def with organization id self, organization id: UUID - "AdminSyncQueryBuilder" ⋮---- def with status self, status: str - "AdminSyncQueryBuilder" ⋮---- status enum = SyncStatus status.lower ⋮---- def with source connection filter self, has source connection: bool - "AdminSyncQueryBuilder" ⋮---- def with is authenticated self, is authenticated: bool - "AdminSyncQueryBuilder" ⋮---- def with collection id self, collection id: str - "AdminSyncQueryBuilder" ⋮---- def with source type self, source type: str - "AdminSyncQueryBuilder" ⋮---- def with last job status self,… 证据：`backend/airweave/core/admin_sync_service.py`
- **Container**（source_file）：@dataclass frozen=True class Container ⋮---- context cache: ContextCache ⋮---- rate limiter: RateLimiter ⋮---- health: HealthServiceProtocol ⋮---- event bus: EventBus ⋮---- pubsub: PubSub ⋮---- webhook publisher: WebhookPublisher webhook admin: WebhookAdmin endpoint verifier: EndpointVerifier webhook service: WebhookServiceProtocol ⋮---- circuit breaker: CircuitBreaker ⋮---- metrics: MetricsService ⋮---- source service: SourceServiceProtocol ⋮---- source registry: SourceRegistryProtocol auth provider registry: AuthProviderRegistryProtocol auth provider service: AuthProviderServiceProtocol entity definition registry: EntityDefinitionRegistryProtocol ⋮---- collection service: CollectionServic… 证据：`backend/airweave/core/container/container.py`
- **Repository adapters**（source_file）：def create container settings: Settings - Container ⋮---- context cache = RedisContextCache redis client=redis client.client ⋮---- rate limiter = create rate limiter settings ⋮---- svix adapter = SvixAdapter ⋮---- endpoint verifier = HttpEndpointVerifier ⋮---- billing services = create billing services settings ⋮---- identity provider = create identity provider settings ⋮---- user org repo = UserOrganizationRepository ⋮---- source deps = create source services settings ⋮---- usage checker = create usage checker settings, billing services, source deps, user org repo usage ledger = create usage ledger settings, billing services ⋮---- webhook service = WebhookServiceImpl ⋮---- pubsub = RedisPu… 证据：`backend/airweave/core/container/factory.py`
- **Collection**（source_file）：class CollectionLifecycleEvent DomainEvent ⋮---- event type: CollectionEventType ⋮---- collection id: UUID collection name: str collection readable id: str 证据：`backend/airweave/core/events/collection.py`
- **Source Connection**（source_file）：class SourceConnectionLifecycleEvent DomainEvent ⋮---- event type: SourceConnectionEventType ⋮---- source connection id: UUID collection readable id: str ⋮---- source type: str = "" short name, e.g. "slack", "notion" is authenticated: bool = False 证据：`backend/airweave/core/events/source_connection.py`
- **Identifiers**（source_file）：class TypeActionCounts BaseModel ⋮---- model config = ConfigDict frozen=True ⋮---- inserted: int = 0 updated: int = 0 deleted: int = 0 kept: int = 0 ⋮---- class EntityBatchProcessedEvent DomainEvent ⋮---- event type: EntityEventType = EntityEventType.BATCH PROCESSED ⋮---- sync id: UUID sync job id: UUID collection id: UUID source connection id: UUID source type: str = "" ⋮---- type breakdown: Dict str, TypeActionCounts = Field default factory=dict ⋮---- batch seq: int = 0 batch duration ms: float = 0 billable: bool = True ⋮---- class AccessControlMembershipBatchProcessedEvent DomainEvent ⋮---- """Emitted during ACL membership collection to signal progress. Unlike EntityBatchProcessedEvent w… 证据：`backend/airweave/core/events/sync.py`
- **Metrics Service**（source_file）：class FakeMetricsService MetricsService ⋮---- async def start self, , pool: DbPool - None ⋮---- async def stop self - None 证据：`backend/airweave/core/fakes/metrics_service.py`
- **Service**（source_file）：class HealthService HealthServiceProtocol ⋮---- @property def shutting down self - bool ⋮---- @shutting down.setter def shutting down self, value: bool - None ⋮---- async def check readiness self, , debug: bool - ReadinessResponse ⋮---- all probes = self. critical, self. informational critical names = {p.name for p in self. critical} ⋮---- skipped = DependencyCheck status=CheckStatus.skipped ⋮---- results = await asyncio.gather ⋮---- checks: dict str, DependencyCheck = {} ready = True ⋮---- ready = False ⋮---- async def run probe self, probe: HealthProbe - tuple str, DependencyCheck Exception ⋮---- result = await asyncio.wait for probe.check , timeout=self. timeout ⋮---- @staticmethod def s… 证据：`backend/airweave/core/health/service.py`
- **Metrics Service**（source_file）：class PrometheusMetricsService MetricsService ⋮---- http: HttpMetrics agentic search: AgenticSearchMetrics db pool: DbPoolMetrics ⋮---- async def start self, , pool: DbPool - None ⋮---- async def stop self - None 证据：`backend/airweave/core/metrics_service.py`
- **Registry**（source_file）：class BaseRegistryEntry BaseModel ⋮---- model config = ConfigDict frozen=True ⋮---- short name: str name: str description: str None class name: str ⋮---- EntryT = TypeVar "EntryT", bound=BaseRegistryEntry, covariant=True ⋮---- class RegistryProtocol Protocol EntryT ⋮---- def get self, short name: str - EntryT ⋮---- def list all self - list EntryT 证据：`backend/airweave/core/protocols/registry.py`
- **Worker Metrics Registry**（source_file）：class SyncMetricDetail TypedDict ⋮---- sync id: str sync job id: str org name: str source type: str ⋮---- class SyncWorkerCount TypedDict ⋮---- active and pending worker count: int ⋮---- @runtime checkable class WorkerMetricsRegistryProtocol Protocol ⋮---- def get pod ordinal self - str: ... ⋮---- async def get metrics summary self - dict str, Any : ... ⋮---- async def get per connector metrics self - dict str, dict str, int : ... ⋮---- async def get total active and pending workers self - int: ... ⋮---- async def get detailed sync metrics self - list SyncMetricDetail : ... ⋮---- async def get per sync worker counts self - list SyncWorkerCount : ... 证据：`backend/airweave/core/protocols/worker_metrics_registry.py`
- **Redis Factory**（source_file）：def is sentinel mode - bool ⋮---- def parse sentinel nodes raw: str - list tuple str, int ⋮---- parsed = json.loads raw ⋮---- nodes: list tuple str, int = ⋮---- def get socket keepalive options - dict int, int ⋮---- """Return TCP keepalive options that work on the current OS. macOS does not support the Linux keepalive constants and will raise if they are passed to setsockopt . We return an empty dict there and on any Linux system that does not expose TCP KEEPIDLE . """ ⋮---- db = settings.REDIS DB password = settings.REDIS PASSWORD or None ⋮---- nodes = parse sentinel nodes settings.REDIS NODES ⋮---- sentinel kwargs = { sentinel = Sentinel ⋮---- pool = redis.ConnectionPool 证据：`backend/airweave/core/redis_factory.py`
- **Crud Collection**（source_file）：class CRUDCollection CRUDBaseOrganization Collection, CollectionCreate, CollectionUpdate ⋮---- result = await db.execute select Collection .where Collection.readable id == readable id collection = result.scalar one or none ⋮---- """Get multiple collections with pagination and optional search.""" query = select Collection .where Collection.organization id == ctx.organization.id ⋮---- search pattern = f"%{search query.lower }%" query = query.where ⋮---- query = query.order by Collection.created at.desc query = query.offset skip .limit limit ⋮---- result = await db.execute query ⋮---- """Get total count of collections for the organization.""" query = ⋮---- collection = CRUDCollection Collection 证据：`backend/airweave/crud/crud_collection.py`
- **Crud Source Connection**（source_file）：class CRUDSourceConnection ⋮---- query = select SourceConnection .where ⋮---- query = query.options joinedload SourceConnection.sync ⋮---- query = query.options joinedload SourceConnection.sync .joinedload Sync.collection ⋮---- query = query.options ⋮---- result = await db.execute query ⋮---- query = query.where SourceConnection.readable collection id == collection id ⋮---- query = query.offset skip .limit limit .order by SourceConnection.created at.desc ⋮---- source connections = list result.scalars .all ⋮---- auth methods = await self. fetch auth methods db, source connections last jobs = await self. fetch last jobs db, source connections entity counts = await self. fetch entity counts db… 证据：`backend/airweave/crud/crud_source_connection.py`
- **If cron schedule is None, also set next scheduled run to None**（source_file）：class CRUDSync CRUDBaseOrganization Sync, SyncCreate, SyncUpdate ⋮---- sync = await super .get db, id=id, ctx=ctx ⋮---- sync = await self.enrich sync with connections db, sync=sync ⋮---- syncs = await super .get multi db, ctx, skip=skip, limit=limit ⋮---- syncs = await self.enrich sync with connections db, sync for sync in syncs ⋮---- enriched syncs = await self.enricher for all db, sync ⋮---- sync ids = sync.id for sync in syncs ⋮---- stmt = result = await db.execute stmt all connections = result.unique .all ⋮---- sync connections = {} ⋮---- sync id = sync connection.sync id ⋮---- enriched syncs = ⋮---- sync dict = { sync. dict } ⋮---- connections = sync connections.get ⋮---- source = conn… 证据：`backend/airweave/crud/crud_sync.py`
- **Service**（source_file）：class FakeArfService ArfServiceProtocol ⋮---- def init self - None ⋮---- def seed self, sync id: str, entity id: str, entity dict: Dict str, Any - None ⋮---- def seed manifest self, sync id: str, manifest: SyncManifest - None ⋮---- def set error self, error: Exception - None ⋮---- def get calls self, method: str - List tuple ⋮---- def entity count for self, sync id: str - int ⋮---- async def upsert manifest self, sync context: SyncContext, runtime: SyncRuntime - None ⋮---- async def upsert entities self, entities: List BaseEntity , sync context: SyncContext - int ⋮---- sync id = str sync context.sync.id bucket = self. store.setdefault sync id, {} ⋮---- async def delete entities self, entity… 证据：`backend/airweave/domains/arf/fakes/service.py`
- **=========================================================================**（source_file）：class ArfService ArfServiceProtocol ⋮---- def init self, storage: StorageBackend - None ⋮---- @staticmethod def sync path sync id: str - str ⋮---- @staticmethod def manifest path sync id: str - str ⋮---- @staticmethod def entity path sync id: str, entity id: str - str ⋮---- @staticmethod def file path sync id: str, entity id: str, filename: str = "" - str ⋮---- safe filename = staticmethod StoragePaths.safe filename ⋮---- ========================================================================= Entity serialization helpers ⋮---- @staticmethod def get source short name sync context: SyncContext, runtime: SyncRuntime - str ⋮---- source = runtime.source name = getattr source, "short name", ""… 证据：`backend/airweave/domains/arf/service.py`
- **Fall back to default logger**（source_file）：AUTH PROVIDER OPTIONAL FIELDS: frozenset str = frozenset ⋮---- class BaseAuthProvider ABC ⋮---- is auth provider: ClassVar bool = False provider name: ClassVar str = "" short name: ClassVar str = "" auth config class: ClassVar Optional type BaseModel = None config class: ClassVar Optional type BaseModel = None SETTINGS URL: ClassVar str = "" feature flag: ClassVar Optional str = None ⋮---- def init self ⋮---- """Initialize the base auth provider.""" self. logger: Optional Any = None Store contextual logger as instance variable ⋮---- @property def logger self ⋮---- """Get the logger for this auth provider, falling back to default if not set.""" ⋮---- Fall back to default logger ⋮---- def set… 证据：`backend/airweave/domains/auth_provider/_base.py`
- **------------------------------------------------------------------**（source_file）：registry logger = logger.with prefix "AuthProviderRegistry: " .with context ⋮---- class AuthProviderRegistry AuthProviderRegistryProtocol ⋮---- def init self - None ⋮---- def get self, short name: str - AuthProviderRegistryEntry ⋮---- def list all self - list AuthProviderRegistryEntry ⋮---- def get settings url self, short name: str - str None ⋮---- entry = self. entries short name url = entry.settings url or None ⋮---- def build self - None ⋮---- provider classes = ALL AUTH PROVIDERS ⋮---- short name = provider cls.short name ⋮---- entry = self. build entry provider cls ⋮---- ------------------------------------------------------------------ Private helpers ⋮---- @staticmethod def build en… 证据：`backend/airweave/domains/auth_provider/registry.py`
- **Service**（source_file）：class AuthProviderService AuthProviderServiceProtocol ⋮---- connections = await self. connection repo.get by integration type result: list schemas.AuthProviderConnection = ⋮---- async def list metadata self, , ctx: ApiContext - list AuthProviderMetadata ⋮---- enabled features = ctx.organization.enabled features or ⋮---- async def get metadata self, , short name: str, ctx: ApiContext - AuthProviderMetadata ⋮---- entry = self. get registry entry short name ⋮---- connection = await self. get auth provider connection db, readable id=readable id, ctx=ctx ⋮---- entry = self. get registry entry obj in.short name validated auth fields = self. validate auth fields entry, obj in.auth fields ⋮---- int… 证据：`backend/airweave/domains/auth_provider/service.py`
- **Check if checkout is needed**（source_file）：class BillingService BillingServiceProtocol ⋮---- @staticmethod def analyze plan change context: PlanChangeContext - PlanChangeDecision ⋮---- change type = compare plans context.current plan, context.target plan ⋮---- target is paid = is paid plan context.target plan needs payment method = target is paid and not context.has payment method ⋮---- org model = await self. org repo.get by id db, organization id=organization id ⋮---- new price id = self. payment gateway.get price for plan target plan ⋮---- percent off = coupon percent off for yearly prepay target plan idempotency key = f"yearly:{ctx.organization.id}:{target plan.value}" coupon = await self. payment gateway.create or get yearly co… 证据：`backend/airweave/domains/billing/service.py`
- **Service**（source_file）：class BrowseTreeService BrowseTreeServiceProtocol ⋮---- sc = await self. sc repo.get db, source connection id, ctx ⋮---- sc sync id = sc.sync id sc readable collection id = sc.readable collection id sc connection id = sc.connection id ⋮---- sync schema = await self. sync repo.get db, sc sync id, ctx ⋮---- collection obj = await self. collection repo.get by readable id ⋮---- collection schema = schemas.CollectionRecord.model validate ⋮---- connection obj = await self. conn repo.get db, sc connection id, ctx ⋮---- connection schema = schemas.Connection.model validate connection obj, from attributes=True ⋮---- sync job create = SyncJobCreate ⋮---- sync job obj = await self. sync job repo.creat… 证据：`backend/airweave/domains/browse_tree/service.py`
- **Service**（source_file）：class FakeCollectionService ⋮---- def init self - None ⋮---- def seed self, id: UUID, obj: schemas.Collection - None ⋮---- def seed readable self, readable id: str, obj: schemas.Collection - None ⋮---- def set create result self, result: schemas.Collection - None ⋮---- def set delete result self, result: schemas.Collection - None ⋮---- obj = self. readable store.get readable id 证据：`backend/airweave/domains/collections/fakes/service.py`
- **Snapshot while session is fresh teardown expires all objects via db.expire all**（source_file）：class CollectionService CollectionServiceProtocol ⋮---- vd = db obj.vector db deployment metadata base = schemas.CollectionRecord.model validate db obj, from attributes=True ⋮---- result = await self. collection repo.get multi ⋮---- existing = await self. collection repo.get by readable id ⋮---- deployment metadata = await self. deployment metadata repo.get db ⋮---- collection data = collection in.model dump ⋮---- collection = await self. collection repo.create ⋮---- result = self. to response collection ⋮---- """Get a collection by readable ID.""" db obj = await self. collection repo.get by readable id db, readable id, ctx ⋮---- """Update a collection by readable ID.""" ⋮---- updated = awa… 证据：`backend/airweave/domains/collections/service.py`
- **Service**（source_file）：class FakeConnectService ConnectServiceProtocol ⋮---- def init self - None ⋮---- def seed session response self, resp: ConnectSessionResponse - None ⋮---- def seed sources self, sources: List schemas.Source - None ⋮---- def seed connections self, items: List schemas.SourceConnectionListItem - None ⋮---- def seed connection self, id: UUID, conn: Any - None ⋮---- def seed jobs self, jobs: List schemas.SourceConnectionJob - None ⋮---- source = self. source by name.get short name ⋮---- conn = self. connection by id.get connection id ⋮---- conn = self. connection by id.pop connection id, None 证据：`backend/airweave/domains/connect/fakes/service.py`
- **------------------------------------------------------------------**（source_file）：class ConnectService ConnectServiceProtocol ⋮---- """Raise 403 if integration is not in allowed integrations.""" ⋮---- org = await self. org repo.get ⋮---- connection = await self. sc service.get ⋮---- collection = await self. collection repo.get by readable id ⋮---- session id = uuid4 ⋮---- token = make state ⋮---- expires at = datetime.now timezone.utc + timedelta minutes=10 ⋮---- ------------------------------------------------------------------ Source catalog ⋮---- """List available sources, filtered by session restrictions.""" ctx = await self. build context db, session ⋮---- all sources = await self. source service.list ctx ⋮---- all sources = s for s in all sources if s.short name in… 证据：`backend/airweave/domains/connect/service.py`
- **Base**（source_file）：class BaseTextConverter ABC ⋮---- @abstractmethod async def convert batch self, file paths: List str - Dict str, str ⋮---- class HybridDocumentConverter BaseTextConverter ⋮---- def init self, ocr provider: Optional OcrProvider = None - None ⋮---- @abstractmethod async def try extract self, path: str - Optional str ⋮---- @staticmethod def try read as text path: str, max probe bytes: int = 8192 - Optional str ⋮---- probe = f.read max probe bytes ⋮---- control count = sum 1 for b in probe if b Dict str, Optional str ⋮---- results: Dict str, Optional str = {} needs ocr: List str = ⋮---- name = os.path.basename path ⋮---- markdown = await self. try extract path ⋮---- text content = self. try rea… 证据：`backend/airweave/domains/converters/_base.py`
- **Registry**（source_file）：class StubConverter BaseTextConverter ⋮---- def init self, text: str = "fake-markdown" - None ⋮---- async def convert batch self, file paths: List str - Dict str, str ⋮---- class FakeConverterRegistry ConverterRegistryProtocol ⋮---- def for extension self, ext: str - Optional BaseTextConverter ⋮---- def for web self - BaseTextConverter 证据：`backend/airweave/domains/converters/fakes/registry.py`
- **Registry**（source_file）：class ConverterRegistry ConverterRegistryProtocol ⋮---- def init self, ocr provider: Optional OcrProvider = None - None ⋮---- pdf = PdfConverter ocr provider=ocr provider doc = DocConverter ocr provider=ocr provider docx = DocxConverter ocr provider=ocr provider pptx = PptxConverter ocr provider=ocr provider html = HtmlConverter txt = TxtConverter xlsx = XlsxConverter code = CodeConverter ⋮---- ocr adapter = OcrConverterAdapter ocr provider ⋮---- def for extension self, ext: str - Optional BaseTextConverter ⋮---- def for web self - BaseTextConverter 证据：`backend/airweave/domains/converters/registry.py`
- **Service**（source_file）：class FakeIntegrationCredentialService IntegrationCredentialServiceProtocol ⋮---- def init self - None ⋮---- def seed self, credential: DecryptedCredential, record: IntegrationCredential - None ⋮---- cred = self. store.get credential id ⋮---- record = IntegrationCredential dc = DecryptedCredential rid = UUID str record.id ⋮---- record = self. records.get credential.credential id 证据：`backend/airweave/domains/credentials/fakes/service.py`
- **Service**（source_file）：class IntegrationCredentialService IntegrationCredentialServiceProtocol ⋮---- record = await self. repo.get db, credential id, ctx ⋮---- raw = self. encryptor.decrypt record.encrypted credentials ⋮---- credential create = IntegrationCredentialCreateEncrypted ⋮---- """Re-encrypt and persist an updated DecryptedCredential.""" record = await self. repo.get db, credential.credential id, ctx ⋮---- update = IntegrationCredentialUpdate 证据：`backend/airweave/domains/credentials/service.py`
- **Registry**（source_file）：class FakeDenseEmbedderRegistry ⋮---- def init self - None ⋮---- def get self, short name: str - DenseEmbedderEntry ⋮---- def list all self - list DenseEmbedderEntry ⋮---- def list for provider self, provider: str - list DenseEmbedderEntry ⋮---- def seed self, entries: DenseEmbedderEntry - None ⋮---- def clear self - None ⋮---- class FakeSparseEmbedderRegistry ⋮---- def get self, short name: str - SparseEmbedderEntry ⋮---- def list all self - list SparseEmbedderEntry ⋮---- def list for provider self, provider: str - list SparseEmbedderEntry ⋮---- def seed self, entries: SparseEmbedderEntry - None 证据：`backend/airweave/domains/embedders/fakes/registry.py`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

## 宿主 AI 必须遵守的规则

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`README.md`, `connect/README.md`, `examples/README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`README.md`, `connect/README.md`, `examples/README.md`

## 用户开工前应该回答的问题

- 你准备在哪个宿主 AI 或本地环境中使用它？
- 你只是想先体验工作流，还是准备真实安装？
- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？

## 验收标准

- 所有能力声明都能回指到 evidence_refs 中的文件路径。
- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。
- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。

---

## Doramagic Context Augmentation

下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。

## Human Manual 骨架

使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。

宿主 AI 硬性规则：
- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。
- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。
- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。

- **项目概述与系统架构**：importance `high`
  - source_paths: README.md, backend/airweave/main.py, backend/airweave/architecture-refactor.md, backend/airweave/core/container/container.py, backend/airweave/models/collection.py
- **同步管道与数据流**：importance `high`
  - source_paths: backend/airweave/domains/sync_pipeline/orchestrator.py, backend/airweave/domains/sync_pipeline/factory.py, backend/airweave/domains/sync_pipeline/pipeline/entity_tracker.py, backend/airweave/domains/sync_pipeline/processors/chunk_embed.py, backend/airweave/domains/sync_pipeline/builders/sync.py
- **连接器生态与定制开发**：importance `high`
  - source_paths: backend/airweave/platform/sources/_base.py, backend/airweave/platform/entities/_base.py, backend/airweave/domains/sources/registry.py, backend/airweave/domains/auth_provider/registry.py, backend/airweave/domains/oauth/oauth2_service.py
- **搜索、AI 集成与部署运维**：importance `high`
  - source_paths: backend/airweave/domains/search/executor.py, backend/airweave/domains/search/classic/service.py, backend/airweave/domains/search/agentic/service.py, backend/airweave/domains/search/browse/service.py, backend/airweave/platform/destinations/vespa/vespa_client.py

## Repo Inspection Evidence / 源码检查证据

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `1ebe1af2dbfb90f3334410721e69997e4f02b320`
- inspected_files: `README.md`, `examples/README.md`, `examples/quickstart_tutorial.py`, `examples/webhook-demo/README.md`, `examples/webhook-demo/app.py`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 来源证据：[Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing

- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing
- Why it matters: 可能影响授权、密钥配置或安全边界。
- Evidence: community_evidence:github | https://github.com/airweave-ai/airweave/issues/1801 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 可能修改宿主 AI 配置

- Trigger: 项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。
- Host AI rule: 列出会写入的配置文件、目录和卸载/回滚步骤。
- Why it matters: 安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。
- Evidence: capability.host_targets | https://github.com/airweave-ai/airweave | host_targets=cursor, chatgpt
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 失败模式：configuration: OneDrive connector appears to continue prefetching after Microsoft account lockout / source s...

- Trigger: Developers should check this configuration risk before relying on the project: OneDrive connector appears to continue prefetching after Microsoft account lockout / source state NEEDS_SOURCE
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: OneDrive connector appears to continue prefetching after Microsoft account lockout / source state NEEDS_SOURCE. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: OneDrive connector appears to continue prefetching after Microsoft account lockout / source state NEEDS_SOURCE
- Evidence: failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1807 | OneDrive connector appears to continue prefetching after Microsoft account lockout / source state NEEDS_SOURCE
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 失败模式：configuration: [Bug] Sync Failure: Illegal code point 0x1B in TeamsMessageEntity causes Vespa ingestion to fail

- Trigger: Developers should check this configuration risk before relying on the project: [Bug] Sync Failure: Illegal code point 0x1B in TeamsMessageEntity causes Vespa ingestion to fail
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Bug] Sync Failure: Illegal code point 0x1B in TeamsMessageEntity causes Vespa ingestion to fail. Context: Observed when using python
- Why it matters: Developers may misconfigure credentials, environment, or host setup: [Bug] Sync Failure: Illegal code point 0x1B in TeamsMessageEntity causes Vespa ingestion to fail
- Evidence: failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1269 | [Bug] Sync Failure: Illegal code point 0x1B in TeamsMessageEntity causes Vespa ingestion to fail
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 失败模式：configuration: [Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing

- Trigger: Developers should check this configuration risk before relying on the project: [Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing. Context: Observed when using python, docker
- Why it matters: Developers may misconfigure credentials, environment, or host setup: [Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing
- Evidence: failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1801 | [Connector Request] Meta Threads Integration for Drafting, Scheduling, and Publishing
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 失败模式：configuration: [Connector Request] neo4j as a source would also be helpful

- Trigger: Developers should check this configuration risk before relying on the project: [Connector Request] neo4j as a source would also be helpful
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Connector Request] neo4j as a source would also be helpful. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: [Connector Request] neo4j as a source would also be helpful
- Evidence: failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1117 | [Connector Request] neo4j as a source would also be helpful
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 失败模式：configuration: [connector support] push

- Trigger: Developers should check this configuration risk before relying on the project: [connector support] push
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [connector support] push. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: [connector support] push
- Evidence: failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1148 | [connector support] push, failure_mode_cluster:github_issue | https://github.com/airweave-ai/airweave/issues/1148 | [connector support] push
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 失败模式：configuration: v0.9.64

- Trigger: Developers should check this configuration risk before relying on the project: v0.9.64
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.9.64. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v0.9.64
- Evidence: failure_mode_cluster:github_release | https://github.com/airweave-ai/airweave/releases/tag/v0.9.64 | v0.9.64
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 失败模式：configuration: v0.9.66

- Trigger: Developers should check this configuration risk before relying on the project: v0.9.66
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.9.66. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v0.9.66
- Evidence: failure_mode_cluster:github_release | https://github.com/airweave-ai/airweave/releases/tag/v0.9.66 | v0.9.66
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: 失败模式：configuration: v0.9.69

- Trigger: Developers should check this configuration risk before relying on the project: v0.9.69
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v0.9.69. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v0.9.69
- Evidence: failure_mode_cluster:github_release | https://github.com/airweave-ai/airweave/releases/tag/v0.9.69 | v0.9.69
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
