Repository navigation
chore: release 1.0.3b8 - #3180
Merged
Merged
Conversation
按 review 把"实例共享 token"换成"用户级 token"的存储与发放层: - 迁移 026 建 memory_mcp_tokens 表:token 绑定 user,带客户端名、可限定专家 范围、可单独吊销;服务端只存 sha256(明文只在创建时返回一次) - MemoryMcpTokenRepo(create / list_for_user / get_by_token_hash / get_for_user / revoke / touch / any_active)+ RepoBundle / SharedServices 接线 - token 管理 API:POST/GET/DELETE /api/memory-mcp/tokens,创建时逐个校验专家 存在且当前用户可访问,撤销只能撤自己的 - 迁移版本升到 26:同步 8 处 schema 断言
鉴权 - MCP 中间件从 Bearer token 推出用户(sha256 + hmac.compare_digest,忽略 X-Octop-User-Id);每次请求按 owner / 共享专家规则重新校验专家访问权, 并支持 token 的专家范围限制 - 挂载条件:OCTOP_MEMORY_MCP_ENABLED=1 或已存在有效 token;lifespan 串接原 FastAPI lifespan,不再覆盖 工具面 - capture 改走 MemoryRuntime.capture:脱敏、回声保护、角色/长度策略生效; 调用者写进事件 metadata(caller / source_host),不再拼 `<user>说:` - save 改走 MemoryService.save:人工审核调度器能收到通知 - 9 个工具全部 async,阻塞调用一律 asyncio.to_thread - 审核/运维工具(raws/candidates/extract/promote/reject)仅专家所有者 - 外部写入默认不进晋升(跟随专家提炼配置);后台提炼串行、保存任务引用, 不自动启动停用的专家 测试:越权、伪造 header、密钥脱敏、工具不阻塞事件循环、lifespan 串接。
- docs/memory-mcp.md 重写为 PR a 的实际形态:用户级 token 的创建/吊销、挂载 开关、9 个工具(4 个日常 + 5 个仅专家所有者)、客户端配置与拆分计划 - CHANGELOG 改为描述用户级 token 与审核队列
DSH 的记忆接入从 hook 桥接换成进程内原生插件(v0.1.2):每轮开始前召回并注入 共享记忆,轮末上报本轮增量,不再依赖外部子进程 / hook 方言 / `--use-system-ca`。 插件源码随本仓发版(vendored,`link:` 安装,离线可装)。 开源版相比闭源版本副本的差异只有身份与文案:去掉 userId / X-Octop-User-Id、把闭源专有鉴权头换成通用 Bearer 逻辑、README 的内网域名/员工号替换为公开占位符。
- `/mcp/memory/setup`、`/uninstall`:检测 Claude Code / Kiro / DSH / Codex /
Cursor,写入 hooks(提问前召回、会话结束上报)与 MCP 条目;token 由用户在
运行时粘贴(用户级 omcp_ token),安装器不内置任何凭据
- 项目级安装(`?project=` / `OCTOP_PROJECT_DIR`):项目里只写注册,hook 脚本与
含 token 的 config.json 留在用户目录;Kiro 项目级 MCP 因含凭据而跳过
- Windows 原生 PowerShell 版(`?os=windows`):Read-Host/Read-Secret + .cmd
包装,不需要 Git Bash
- DSH 走原生插件(见上一 commit),安装器负责写 bundle/profile 配置并清理旧的
hook 桥接与 preset
- `memory_capture` 恢复终端 transcript 形态:本地文件或 gzip+base64 上传,按
终端格式解析成 L0(user/assistant/tool 事件),导入前做密钥脱敏;整份原文
归档到 `{workspace}/.octop/memory-sessions/`
- 移除已无引用的 dsh-memory-share preset
- 新增一键安装器章节(macOS/Linux + Windows PowerShell、项目级安装、5 个终端 的 hooks/注册位置) - 拆分计划更新:d 已并入本 PR,c 仍计划下沉到 octop-memory - CHANGELOG 补上终端接入(DSH 原生插件 / 项目级 / Windows)
移除断言里对闭源产品名与私有域名的硬编码,避免测试文件本身携带这些词; 安装器的脱敏由 `grep` 自检与其余用例覆盖。
个人记忆页(/personalization/memory)新增 tab:列出用户级 MCP token(名称、 掩码、专家范围、创建/最近使用/状态),创建时名称必填、可限定专家,明文只显示 一次并提供复制,支持撤销。只对个人记忆页展示(Experts 抽屉不出现)。 - 新增 api/modules/memoryMcp.ts(list/create/revoke,snake_case 对齐 TokenOut) - 新增 pages/Agent/Memory/McpAccess.tsx + 4 条组件测试 - MemoryPanel 增加受 showMcpTab 控制的 mcp tab - en/zh 文案(memory.tabs.mcp / memory.mcp)
- 路由:token 恰好绑定 1 个专家时,客户端只带 Authorization 即可;不限/多专家
且未带 X-Octop-Agent-Id 时返回 400(附允许列表),带头保持原行为
- 每次请求重读 token 行:Dashboard 切换专家 / 撤销 token 对下一次请求立即生效
- 新增 PATCH /api/memory-mcp/tokens/{token_id}:改名 / 换专家 / 清空为不限;
仅本人未撤销可改,他人 404、已撤销 409,专家校验与创建一致
- repo 增加 update()(仅更新未撤销、属于该用户的行)
- 创建 token:专家单选(默认当前专家),最后一个选项「不限定专家」 - 列表:「上报专家」列(单专家显示名称、不限显示 Tag、多专家显示数量) - 行内「切换专家」→ PATCH 换绑,下一次 MCP 请求即生效;已撤销 token 禁用 - 文案 en/zh 同步(memory.mcp 47 键)
- config.json / MCP 条目 / DSH 插件配置只剩 url + token(+ tokenHeader); hooks 与原生插件不再发 X-Octop-Agent-Id,激活判据改为 endpoint && token - 安装器不再询问专家 ID,非交互只认 OCTOP_MEMORY_TOKEN;支持 `curl .../setup | OCTOP_MEMORY_TOKEN=omcp_… sh` 一条命令配置 - hooks 的「未配置」判定同步放宽,避免删掉 agentId 后静默不工作 - 文档:token 绑定专家、可切换;客户端只需 Authorization;补快速配置命令
- 新增 docs/memory-mcp-setup.md:创建 token、绑定/切换专家、macOS/Linux 与 Windows 一键安装、5 个终端落点、手动配置、验证、排障、安全说明 - 主文档 linked 到安装指引,并说明 token 绑定专家、客户端只带 Authorization - Dashboard「MCP 接入」:页面顶部常驻「一条命令接入」提示(可复制),创建成功 弹窗直接给出带该 token 的 curl 命令 - CHANGELOG 补充 token 绑定/切换专家
Claude Code 2.1.x 校验 settings.json 时要求事件下是 matcher 组、组内再套
`hooks` 数组;安装器此前写的是「事件直接挂 handler」的简写形态,
`claude doctor` 报 `Hook matcher "hooks" must be an array of hook entries`
并把该 hook 静默忽略(表现为安装后 Claude 里召回/上报都不生效)。
改成 `[{"hooks": [{type, command}]}]`,重装即可修复;旧形态仍会被识别并替换。
- 创建成功弹窗:Token 输入框旁直接「复制 Token」,下面紧挨着带该 Token 的 安装命令 + 「复制命令」,无需手拼 - 弹窗底部的复制按钮改为「复制命令」(带 token 可直接粘贴执行)
- hooks / DSH 原生插件 / 安装器写入并发送 X-Octop-Client(claude-code、codex、 cursor、kiro、dsh);服务端按 token 记录 first_seen / last_seen / count - token 新增 disabled_clients:命中的接入端直接 403(其它接入端不受影响), 迁移 026 折叠新增 disabled_clients / client_stats 两列 - API:TokenOut 暴露两个字段,PATCH 支持 disabled_clients - Dashboard:列表新增「接入端」列,展开可看每个客户端的最近使用/次数并逐个 开关(已撤销 token 不可改) - 文档补充接入端识别与禁用后的 403 说明
- MemoryPanel 把「MCP 接入」tab 移到「设置」之前
- 标题旁增加「接入说明」链接(docs/memory-mcp-setup.md)
- 每行新增「接入命令」:本次会话创建的 token 直接复制带 token 的 curl 命令;
更早的 token 因服务端只存 hash,走「重新生成并复制」(rotate 旧值立即失效)
- 后端新增 POST /api/memory-mcp/tokens/{id}/rotate:为本人未撤销的 token 换发
新明文(hint 更新、last_used_at 清空),旧明文立即 401
- 创建成功弹窗:Token 段与「一键安装命令」段都带标题与各自的复制按钮 - 重新生成(rotate)弹窗:生成结果同样展示新 Token 与带该 Token 的命令两段, 不再只有命令
- source_host 改为 token 名字(服务端已知的客户端身份),不再信任客户端自报的 source;caller 仍是 token 所有者 - /mcp/memory 只在 OCTOP_MEMORY_MCP_ENABLED=1 时挂载,token 存在与否不再影响 启动期挂载(创建 token 后无需重启) - transcript 导入不再直接 add_raw_batch:解析后的候选事件交给 MemoryRuntime.capture 写入,脱敏 / 回声 / 角色与长度过滤统一生效;删除对 octop-memory 私有 `_privacy_cfg` / `_redact_text` 的依赖 - memory_capture 新增 `events` 入参:客户端可自行解析对话记录后上传事件, content/source 变为可选;dry_run 同样支持 - 文档同步(挂载条件、来源字段、events 形式)
按 review 建议把客户端增强(安装器、hooks、DSH 原生插件、对话记录解析、会话 原文归档)从 Octop 拆出,本 PR 只保留服务端: - 移除 /mcp/memory/setup、/uninstall 与全部终端安装逻辑(client_setup.py) - 移除 hook 脚本、DSH 原生插件、claude_transcript 解析与会话归档 - memory_capture 只保留两条入口:content/assistant 与客户端解析好的 events, 都走 MemoryRuntime.capture - Dashboard 的「一键安装」改为 MCP 客户端配置(URL + Authorization / mcpServers JSON),保留 token 创建、轮转、切换专家、接入端开关 - 文档改为服务端使用说明;安装器 / hooks 文档随客户端走 客户端代码去向:octop-memory 的 plugins/<client>/;DSH 原生插件独立仓库发布。
- 抽屉里的 MemoryPanel 打开 showMcpTab,MCP 配置作为独立 tab - 移除 MemoryCatalogDrawer 顶部的地址提示条 - tab / 页面标题由「MCP 接入」改为「AI 终端接入」(en: AI terminal access)
* feat(qq): configure group slash command owners * fix(gateway): preserve tool limits with legacy inbound messages
octop-memory now issues one token per client and no longer accepts disabled_clients. Drop the per-client switches from the terminal page; one token can still be copied to several terminals, and users who need isolation create additional tokens. Merge develop and drop the retired 026 token migration (026 is invite redemptions now).
* ci: verify pip installation and cli command * chore: restrict boto3 version to avoid potential compatibility issues Updated the boto3 dependency in pyproject.toml and uv.lock to specify a version range of >=1.40.61,<1.40.62, ensuring compatibility with other dependencies. * ci: enhance command installation workflow for cross-platform support Updated the CI configuration to support command installation on both Linux and Windows environments. Added conditional steps for pip installation and command verification based on the operating system, improving the robustness of the workflow.
… Langfuse SDK (#3165) Co-authored-by: eileennchen <eileennchen@tencent.com>
…3090) * feat(channels): add Slack and dual-mode WhatsApp channel integration * fix(channels): remove fork-only plugin setting references and cast bridge return types * fix(channels): harden webhook auth, validate bridge URL, and update migration CLI test * feat(slack): add thread broadcast, auto follow-up, and history context settings in Dashboard * test(channels): add route-level WhatsApp webhook account-binding regression tests * chore(channels): require octop-gateway>=1.0.5 and drop importorskip in Slack/WhatsApp tests
The directory picker resolved its loader before the node was marked loaded, and the tree dropdown sat inside the composer popover, so the tab froze. A managed runner's own shell also waited on a permission card that never renders.
"opens account security with the password form in one drawer" failed on develop: the drawer never left its spinner. The test mocked useTranslation() to return a new t on every render. AccountSecurityDrawer's loadStatus is a useCallback on [t], and its load effect depends on loadStatus, so every render restarted the load and set loading again. Real react-i18next keeps t stable, so the mock now returns one object. Co-authored-by: alison-xx <20137720+alison-xx@users.noreply.github.com>
* feat: integrate CubeSandbox with Octop experts * fix: improve test readability by formatting patch for get_config mock * feat: update octop-harness dependency and integrate CubeSandbox support - Updated octop-harness dependency to version 1.0.12 with additional extras for cubesandbox-native and remote-backends. - Added CubeSandbox package configuration in uv.lock. - Enhanced Dockerfile to include CubeSandbox imports. - Updated Helm charts and documentation to support CubeSandbox integration, including configuration examples and required secrets. * test: initialize _archive_tasks in AgentManager for consistency across tests * docs: update secrets and values example files for clarity and consistency - Translated comments in secrets.example.yaml and values.example.yaml from Chinese to English for better accessibility. - Improved instructions regarding password management and Secret creation in both files. - Clarified usage notes for Ingress and PostgreSQL configurations. * docs: update README files to clarify existingSecret configuration - Changed the description of the existingSecret field to indicate it should be set to the name of a pre-created Secret in the release namespace. - Improved clarity in both Chinese and English README files regarding the usage of the existingSecret key.
* test(dashboard): fix the vitest cases that drifted behind the code Eleven dashboard tests fail on develop. None is a product bug; each test fell behind a deliberate change: - AgentContext projectChatAgentOption: the projection now carries managed_runner (#3018). - publishedExperts refresh: refresh sends the edited name, description and welcome message as its body. - ModelListEditor: the chat/embedding purpose radio was removed (#2320); the purpose is locked by the provider now. - SkillPackagesTab request gate (3 cases): the tab calls useNavigate, so the test renders it inside a MemoryRouter. - useChat.history in-flight send: a stored row without a timestamp is read as this turn's answer by design (mergeHistoryTail); the fixture's earlier reply now carries a timestamp like real history does. - docxSanitize, skillMarkdown, SkillDrawer (whole files): pdfjs-dist runs new DOMMatrix() at import and jsdom has none; the test setup adds an empty stand-in since no test renders a PDF page. * ci: type-check and test the dashboard on pull requests The CI workflow runs only the Python suites, and make all and the pre-commit hook only build the dashboard, so dashboard vitest failures reach develop unnoticed (eleven had piled up). A Dashboard job now runs npm ci, tsc -b and npm test on Node 20, the version the Docker image and release builds use. * fix(dashboard): stabilize navigation checks and render midnight consistently --------- Co-authored-by: alison-xx <20137720+alison-xx@users.noreply.github.com> Co-authored-by: liukewia <liukewia@gmail.com>
feat(memory-mcp): 专家记忆 MCP Server(用户级 token 鉴权)
…nd-hardening fix(sqlite): recover corrupted stores, classify stream errors, and harden fnOS lifecycle
…s-2963 Add global memory defaults with per-expert overrides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.0.3b8
新增
octop doctor db与octop doctor db --fix,用于诊断和修复 SQLite 数据库。修复
变更
octop-harness至 1.0.13,升级octop-memory至 1.0.7。octop.extensions为 Octop 安装扩展包。Release checklist
发布前检查按用户要求跳过;生产 tag 必须在 PR 合入 main 后由 Action 创建。