Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
36d5300
fix(hooks): Claude hook payload via stdin (-d @-), not $CLAUDE_TOOL_U…
chenyida7-prog Aug 19, 2026
e03d5ea
docs(hooks): hooks_matcher docstring 对齐 stdin (-d @-) 修复
CoderMoray Aug 19, 2026
435670f
docs(DEV): 记录 Claude hook payload 走 stdin (-d @-) 修复
CoderMoray Aug 19, 2026
dbbdfda
docs(hooks): WorkBuddy 协议已确认与 Claude 同构(stdin + permissionDecision + …
CoderMoray Aug 19, 2026
79951b8
docs(desktop): backlog 更新 —— 启动进度挂钩真实后端就绪(高优先,实测数据)
CoderMoray Aug 19, 2026
1a7f6d2
feat(enterprise): 企业定制打包 —— 每个企业一份配置文件控制平台 enabled/display
CoderMoray Aug 19, 2026
c244351
chore(enterprise): 企业配置不入库 —— 移除 Acme 示例,保留 template.json 模板
CoderMoray Aug 19, 2026
cf6a1bd
feat(enterprise): default_disabled 语义 + order 顺序控制
CoderMoray Aug 19, 2026
4feabca
feat(ui): 三页一致 —— 平台原生不支持的 kind 置灰显示而非隐藏
CoderMoray Aug 19, 2026
bfebfe0
docs(enterprise): 企业配置文档补 default_disabled/order/kinds 说明 + 待办清单更新
CoderMoray Aug 19, 2026
1c9b3a6
fix(guide): 引导批量配置改为串行 —— 修复仅首个 kind 生效
CoderMoray Aug 19, 2026
92f3770
fix(release): 后跟全角括号致 bash 误判变量名 → unbound variable
CoderMoray Aug 20, 2026
16bea0c
fix(build-backend): 同款全角括号变量名误判 —— ${ENTERPRISE} 显式分隔
CoderMoray Aug 20, 2026
91603f7
fix(desktop): 端口协商起点 8080 → 2030,避开 nginx/开发后端的 8080-8081
CoderMoray Aug 20, 2026
bc23341
fix(frontend): 平台显示受 enable 管理 —— clientPlatforms 过滤后端启用平台
CoderMoray Aug 20, 2026
5b6f52b
fix(ui): Enchante deeplink 按钮未安装时禁用 + 高度对齐 toggle
CoderMoray Aug 20, 2026
3d40487
style(ui): deeplink 按钮高度 22px → 20px,与 toggle 完全齐平
CoderMoray Aug 20, 2026
cfbe94c
style(ui): 平台原生不支持行 —— dot 保持品牌色,仅名称/文字置灰
CoderMoray Aug 20, 2026
cdfebf1
style(ui): 「请先安装 xxx」字色 --text-muted → --text-secondary 统一
CoderMoray Aug 20, 2026
c4bd1a3
fix(desktop): loading 文本 opacity 冲突 + Enchante deeplink 桌面走 IPC 系统级打开
CoderMoray Aug 20, 2026
43f0cb8
桌面版 MCP stdio 支持:--mcp 复用 cmd_mcp + mcp_entry frozen 分支 + 独立冒烟脚本
CoderMoray Aug 21, 2026
0fea6eb
Enchante deeplink base64 全转义 + 精简 Agent 模板 + spec 纳入 git
CoderMoray Aug 21, 2026
979559f
mcp-smoke.sh: 默认 timeout 8→30s(frozen 二进制冷启动需更宽裕判定窗口)
CoderMoray Aug 21, 2026
4b60974
chore: .gitignore 忽略 .codegraph/ 与 .pytest_cache/,移除已追踪的 .codegraph 运行文件
CoderMoray Aug 21, 2026
7d09330
release: 0.7.7
CoderMoray Aug 21, 2026
bce554b
fix(ui): Enchante 平台状态文字去掉「未配置 ·」前缀
CoderMoray Aug 21, 2026
57efb2c
fix(desktop): 启动加载动画「初始化完成」文本停留时间不足
CoderMoray Aug 21, 2026
d5d6ef7
fix(desktop): loading 兜底 3s→9s,修复「初始化完成」文本不显示
CoderMoray Aug 21, 2026
0783141
fix(desktop): frozen backend accepts bare `mcp` positional, not just …
chenyida7-prog Aug 21, 2026
f1e0bb4
fix(build): use mcp[cli] extra so PyInstaller build has typer
chenyida7-prog Aug 24, 2026
cf5b370
fix(build): use mcp[cli] extra in pyproject.toml too
chenyida7-prog Aug 24, 2026
48602da
Merge pull request #2 from CoderMoray/fix/requirements-mcp-cli
CoderMoray Aug 24, 2026
60ed59c
fix(enchante): add top-level name to Agent deeplink JSON bundle
chenyida7-prog Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .codegraph/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .codegraph/daemon.pid

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
.workbuddy/
.vscode/
.idea/
.codegraph/
*.swp
*.swo
*~
Expand All @@ -20,6 +21,7 @@ Thumbs.db

# Test / local KB
.myknowledge_test/
.pytest_cache/

# Build artifacts
frontend/index.standalone.html
Expand All @@ -29,10 +31,15 @@ frontend/index.standalone.html
dist-backend/
/build/
*.spec
!myknowledge-backend.spec
desktop/node_modules/
desktop/dist/
desktop/assets/icon.icns

# Enterprise configs (per-customer; not versioned — keep template.json + README.md)
desktop/enterprises/*.json
!desktop/enterprises/template.json

# Design artifacts (generated SVG/PNG, not versioned; keep SPEC.md/.md docs versioned)
docs/designs/**/export/
docs/designs/**/screenshots/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ MyKnowledge comes with a complete AI installation guide (`docs/AI-SETUP.md`). Co

## Versioning

- **System version**: defined in `backend/__version__.py` (currently 0.7.6)
- **System version**: defined in `backend/__version__.py` (currently 0.7.7)
- **KB version**: git commit hash from `agent-commit.txt` checkpoint

## License
Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pytest tests/ -v

## 版本

- **系统版本**:定义在 `backend/__version__.py`(当前 0.7.6
- **系统版本**:定义在 `backend/__version__.py`(当前 0.7.7
- **知识库版本**:从 `agent-commit.txt` checkpoint 读取的 git commit hash

## 许可
Expand Down
15 changes: 15 additions & 0 deletions backend/AiClientConfig/agents/MyKnowledge-agent-Enchante.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# MyKnowledge Agent

你是 MyKnowledge 本地知识库(Markdown + Git)的专业 Agent,通过 MyKnowledge MCP 工具读写文档并维护知识库结构。

## 边界与规范

- 一切操作仅限本地知识库 root 内;只允许在 `common-knowledge/`、`projects/`、`archive/` 开头的路径下写入;禁止 `..` 路径穿越与绝对路径。
- 写入会自动重建父级 readme 并提交 git;不要手动伪造 frontmatter,需保持文档为合法 Markdown。
- 不删除或改名已有文档的 frontmatter 必需字段;新增字段安全,删改字段需评估影响。
- 只操作本地知识库,不访问网络、不改写平台自身配置。
- 遇到不确定的写入(覆盖、删除、改名),先说明后果并征得同意再执行。

## 工具

你的全部工具来自 **MyKnowledge** 这个 MCP server(操作本地知识库):用 `mcp_get_tool_description` 查看 MyKnowledge 提供的工具清单与用法,用 `mcp_call_tool` 调用;结构异常时用 `maint__knowledgebase_diagnose` 定位。
8 changes: 4 additions & 4 deletions backend/AiClientConfig/hooks/WorkBuddy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"supports_hooks": true,
"event": "PreToolUse",
"matcher": "Bash|Write|Edit",
"matcher_note": "与 Claude Code 同协议:PreToolUse 按工具名触发,必须同时覆盖 Bash 与 Write/Edit(否则 file_write 拦截分支死代码)。MCP 调用由 hooks.py 内部放行。",
"command": "curl -s -X POST http://127.0.0.1:8080/hooks/pre-tool-use -H 'Content-Type: application/json' -d '$CLAUDE_TOOL_USE_INPUT'",
"protocol": "Claude Code:环境变量 $CLAUDE_TOOL_USE_INPUT 传 JSON,stdout 输出 JSON 决策。",
"matcher_note": "与 Claude Code 同协议:PreToolUse 按工具名触发,必须覆盖 Bash 与 Write/Edit(否则 file_write 拦截分支死代码)。MCP 调用由 hooks.py 内部放行。",
"command": "curl -s -X POST http://127.0.0.1:8080/hooks/pre-tool-use -H 'Content-Type: application/json' -d @-",
"protocol": "WorkBuddy 与 Claude Code 的 PreToolUse hook 协议完全同构(2026-08-19 经官方/实测确认):payload 走 stdin(CodeBuddy CLI 与 WorkBuddy 同源引擎,官方文档「Hook scripts receive JSON-formatted input data via stdin」);读 hookSpecificOutput.permissionDecision 做 allow/deny(另支持 ask 三态,我们只回 allow/deny 兼容);退出码 0=放行(按 stdout JSON)/1=非阻断放行/2=阻断/其它=放行。无 $WORKBUDDY_TOOL_USE_INPUT 环境变量传 payload。后端不依赖 tool_use_id/call_id(只读 tool_name/tool_input/cwd),字段名差异无影响。",
"exit_code_deny": 2,
"fail_open": true,
"notes": "写入 ~/.workbuddy/settings.json 的 hooks.PreToolUse。命令与 ClaudeCode 相同。"
"notes": "写入 ~/.workbuddy/settings.json 的 hooks.PreToolUse(非 ~/.claude/),改完须完全重启 WorkBuddy 才加载。命令与 ClaudeCode 相同(-d @- 从 stdin 读 payload)。阻断判定靠 stdout JSON 的 permissionDecision 而非 curl 退出码;后端不可达时 curl 退出非 0 → 放行(fail-open),符合审计日志场景。"
}
63 changes: 49 additions & 14 deletions backend/AiClientConfig/platforms.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
{
"_comment": "AI 客户端平台 → 各操作系统下的配置文件路径(单一来源)。平台 key 用 PascalCase,与 client_config.PLATFORMS 及前端 store.clientPlatforms 严格一致。路径占位符:~ → Path.home(),%APPDATA% / %USERPROFILE% → 对应环境变量。kinds 声明该平台支持的配置种类(mcp/hooks/agent);Enchante 的 MCP/Agent 均走 deeplink(无本地配置文件/agents 目录)。cli_names 用于 client_installed 检测(PATH 探测)。",
"os_order": ["macos", "windows", "linux"],
"os_order": [
"macos",
"windows",
"linux"
],
"platforms": {
"ClaudeCode": {
"display": "Claude Code",
"kinds": ["mcp", "hooks", "agent"],
"cli_names": { "macos": "claude", "windows": "claude.exe", "linux": "claude" },
"kinds": [
"mcp",
"hooks",
"agent"
],
"cli_names": {
"macos": "claude",
"windows": "claude.exe",
"linux": "claude"
},
"paths": {
"macos": {
"config_dir": "~/.claude",
Expand All @@ -25,11 +37,14 @@
"settings_file": "~/.claude/settings.json",
"agents_dir": "~/.claude/agents"
}
}
},
"enabled": true
},
"ClaudeDesktop": {
"display": "Claude Desktop",
"kinds": ["mcp"],
"kinds": [
"mcp"
],
"cli_names": {},
"paths": {
"macos": {
Expand All @@ -44,11 +59,16 @@
"config_dir": "~/.config/Claude",
"mcp_file": "~/.config/Claude/claude_desktop_config.json"
}
}
},
"enabled": true
},
"CodeBuddyIDE": {
"display": "CodeBuddy IDE",
"kinds": ["mcp", "hooks", "agent"],
"kinds": [
"mcp",
"hooks",
"agent"
],
"cli_names": {},
"paths": {
"macos": {
Expand All @@ -57,11 +77,16 @@
"settings_file": "~/.codebuddy/settings.json",
"agents_dir": "~/.codebuddy/agents"
}
}
},
"enabled": true
},
"WorkBuddy": {
"display": "WorkBuddy",
"kinds": ["mcp", "hooks", "agent"],
"kinds": [
"mcp",
"hooks",
"agent"
],
"cli_names": {},
"paths": {
"macos": {
Expand All @@ -70,21 +95,30 @@
"settings_file": "~/.workbuddy/settings.json",
"agents_dir": "~/.workbuddy/agents"
}
}
},
"enabled": true
},
"Enchante": {
"display": "Enchanté",
"kinds": ["mcp", "agent"],
"kinds": [
"mcp",
"agent"
],
"cli_names": {},
"paths": {
"macos": {
"config_dir": "/Applications"
}
}
},
"enabled": true
},
"Cursor": {
"display": "Cursor",
"kinds": ["mcp", "hooks", "agent"],
"kinds": [
"mcp",
"hooks",
"agent"
],
"cli_names": {},
"paths": {
"macos": {
Expand All @@ -93,7 +127,8 @@
"hooks_file": "~/.cursor/hooks.json",
"agents_dir": "~/.cursor/agents"
}
}
},
"enabled": true
}
}
}
2 changes: 1 addition & 1 deletion backend/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""MyKnowledge version."""
__version__ = "0.7.6"
__version__ = "0.7.7"
Loading
Loading