Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
41d1ff6
修复(provider): cherry-pick 上游 v1.14.30..v1.14.41 provider/会话核心修复
May 9, 2026
60751f3
修复: cherry-pick 上游 v1.14.30..v1.14.41 工具/技能/格式化/认证小型修复
May 9, 2026
636bc8f
文档: 添加上游 cherry-pick 跟踪文件 .codex_plan/TODO.md
May 9, 2026
db84e49
功能: cherry-pick 上游 v1.14.30..v1.14.41 wellknown remote_config 与 webse…
May 9, 2026
a5b7826
修复(session): cherry-pick 上游 A2 compaction 摘要顺序保持 (811954880)
May 9, 2026
6c5d45c
修复(vcs): cherry-pick 上游 A5+A4 大型 diff 内存控制 + 批量 patch 边界 (d1f597b5b, …
May 9, 2026
5875945
文档: 更新 cherry-pick TODO(A2/A4/A5 完成,A3/B3 延后说明)
May 9, 2026
424047e
修复(review): 处理 cherry-pick REVIEW Minor 项 A6/A8/A12
May 9, 2026
5d49290
合并: 从上游 anomalyco/opencode v1.14.30..v1.14.41 抽取 cherry-pick
May 9, 2026
8cd09f2
功能:(hook) 实现 Claude Code 8-event × 5-handler 协议 1:1 兼容
May 10, 2026
e595528
文档:(hook) 同步 8-event 协议口径与 Notification 下线说明
May 10, 2026
cb34fe3
功能:(hook) 阶段 5 协议补强 — SessionStart 注入 / continue=false 短路 / Session h…
May 10, 2026
09d7cf6
文档:(hook) 同步阶段 5 协议补强口径与 SessionHooks fork 扩展说明
May 10, 2026
64df675
功能:(hook) 阶段 6 P1 鲁棒性 — 性能短路 / trust 接入点 / plugin GC 竞态保护
May 10, 2026
0b52aeb
文档:(hook) 同步阶段 6 P1 鲁棒性补强(性能 / trust / GC 竞态保护)
May 10, 2026
5a417c2
文档:(hook) 阶段 7 最终验收 — CC 兼容性总结(6 超集 + 2 行为差异)
May 10, 2026
43642fb
修复:(hook) type=mcp hook 兼容 CC 协议命令名 mcp__server__tool
May 10, 2026
64dd5cf
维护:(opencode) 清空 .opencode/settings.json 残留 hint hooks
May 10, 2026
f2cee5d
功能:(hook) settings.ts 加可观测性 — trigger/runEntry span + spawn/close deb…
May 11, 2026
8366280
修复:(tool) 双修 CI 两生产 bug — strip zod ~standard 泄露 + cleanup 改用 mtime
May 11, 2026
192448a
修复:(effect-zod) 用浅拷贝断开 ~standard 原型链属性
May 11, 2026
d610ce1
文档:更新插件初始化结果内容
May 11, 2026
3b44caa
文档:维护精简
LeXwDeX May 11, 2026
c29c3b9
重构:移除 github-proxy provider 模式
May 12, 2026
fe99cfc
重构(quota): 将 quota 取数与 TUI 显示拆为独立模块,支持代理/原厂双 schema
May 12, 2026
db75722
Potential fix for pull request finding 'CodeQL / Incomplete URL subst…
LeXwDeX May 12, 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
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); case \"$CMD\" in *grep*|*rg\\ *|*ripgrep*|*find\\ *|*fd\\ *|*ack\\ *|*ag\\ *) [ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files.\"}}' || true ;; esac"
}
]
}
]
}
}
2 changes: 1 addition & 1 deletion .claude/skills/gitnexus/gitnexus-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Run from the project root. This parses all source files, builds the knowledge gr
| `--embeddings` | Enable embedding generation for semantic search (off by default) |
| `--drop-embeddings` | Drop existing embeddings on rebuild. By default, an `analyze` without `--embeddings` preserves them. |

**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook runs `analyze` automatically after `git commit` and `git merge`, preserving embeddings if previously generated.
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after `git commit` and `git merge` and notifies the agent to run `analyze` — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout.

### status — Check index freshness

Expand Down
76 changes: 76 additions & 0 deletions .codex_plan/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# TODO:从上游 anomalyco/opencode v1.14.30 抽取价值变更

> 范围:`ac6aa43e3..upstream/dev`(v1.14.30 至今,377 commits)
> 策略:**只读对照上游 → 按本 fork 架构重新实现 → 每项 typecheck 验证**
> 严禁机械 cherry-pick

---

## Tier S — Provider/模型行为修复(最高价值,最小爆炸半径)
- [x] S0a Deepseek v4 flash variants 解禁(`9d6718131e`)
- [x] S0b Deepseek anthropic transform thinking 配置(`56fd16e5c0`)
- [x] S1 GPT-5 reasoning 变体对齐(`1cf8123bc`)
- [x] S2 Anthropic & Bedrock transform 修正(`4e14f7951`)
- [x] S3 Anthropic Opus 4.5 efforts 对齐(`e0396b809`)
- [x] S4 OpenAI deep research efforts 约束(`319498e2f`)
- [x] S5 含 reasoning block 时保留 assistant 内容(`233fc5b91`)
- [x] S6 Mistral medium 3.5 variants 配置(`576480b5d`)
- [x] S7 Anthropic SDK 在 Azure 下解析(`c1f607d20`)
- [x] S8 cf-ai-gateway providerOptions 路由(`ca77b8f8e`)
- [x] S9 providerOptions key 按点分割(`a12333310`)
- [x] S10 Bedrock reasoning 修复(`29ec07700`)
- ✅ 验证:`bun test test/provider/transform.test.ts test/session/message-v2.test.ts test/provider/amazon-bedrock.test.ts` → 186 pass / 0 fail

## Tier A — 核心稳定性 BUG(高价值)
- [x] A1 重试 server_is_overloaded(`25ecf0af6`)
- [x] A2 compaction 摘要顺序(`811954880`)— 26 行 + 4 处测试断言更新
- [~] A3 取消子任务 child sessions(`75d141b57`)— 延后;prompt.ts/task.ts 改造会破坏 bash 取消截断时序,与上游 task.test.ts 大改(-225+474)耦合,需独立深入排查
- [x] A4 vcs 批量 patch 边界(`6a5e32942`)— 后端 splitGitPatch 正则修正;packages/ui 按 fork 规则跳过
- [x] A5 vcs diff 内存控制(`d1f597b5b`)— git 原生 diff + maxOutputBytes 限流,移除 AppFileSystem 依赖
- [x] A6 sanitize surrogates(`6409aceb1`)
- [x] A7 tool 返回 image+空 text 错误(`563177c6a`)
- [x] A8 read 阻止不支持图片格式(`51e310c9c`)
- [x] A9 修复无 model 时恢复 messages 崩溃(`9bddf7f3e`)
- [x] A10 user config 优先于 plugin hooks 解析 model(`560baae15`)
- [ ] A11 bootstrap 后更新 provider store(`a5aa72bd7`)— packages/app(前端,延后)
- [x] A12 OPENCODE_DISABLE_CLAUDE_CODE_SKILLS 不影响外部 skills(`ffe0314c4`)
- ✅ 验证:`bun test test/provider/ test/session/message-v2.test.ts test/skill/ test/tool/read.test.ts` → 345 pass / 0 fail

## Tier B — 服务/Auth/Format 修复(合理价值)
- [x] B1 formatter stdout/stderr ignore 恢复(`293bb422f`)
- [x] B2 auth login stderr 继承(`8e016b470`)
- [~] B3 保留 auth token credentials(`ca6150d6f`)— 延后;fork 的 packages/app 缺 `terminal-websocket-url.ts` 模块(逻辑内联在 terminal.tsx),上游 8 文件 176 行重构需按 fork 架构重写
- [x] B4 task 子 session 保留 external_dir/deny 父权限(`d7701dbfb`)
- [~] B5 archived timestamp schema 用 finite(`16ddf5f55`)— N/A,fork 用 NonNegativeInt 已更严

## Tier C — 新功能(需先评估架构兼容)
- [ ] C1 shell-aware bash tool(bash/pwsh/cmd 上下文,`3f459819b`)— 延后(506+/177-,含 tui 大改)
- [x] C2 config 支持 well-known remote_config(`d9c18381a`)
- [x] C3 websearch 并行 provider rollout(`a43d3e0e1`)— 后端已应用,tui/ui 部分按 fork 规则跳过
- ✅ 验证:`bun test test/tool/websearch.test.ts test/config/config.test.ts` → 91 pass / 0 fail

---

## 显式跳过(与 fork 架构冲突 / 不适用)
- effectCmd 系列重构(25517/25507/25481/25429/25434/146ff8ad8/f8738c900)— 本 fork 已自有 CLI 抽象
- httpapi/server 大型重构(25547/25545/25074/25291/25527/25412/25417/25475/25449/26052/63a175b50/2dffdfff4)— fork 自有 server
- session warping (`22a4a9df8`) + copy file changes (`3c4b4d5fa`) — 大型新特性,需用户单独决策
- ACP modernize (`b2e3dc87e`) — 大型重构
- desktop electron 系列 — fork 用 Tauri + 独立 desktop-electron
- tui/console/web/share/storybook 系列 — 演化路径不同
- chore/sync/generate/typo/changelog 噪音
- 商业化 vendor:zen/go/honeycomb/free-tier/codex spark
- Codex OAuth (`ce89bcb8e`)、basic auth (`adb7cb103/8694c5b68/101566131/7a503de60`)、PTY tickets — 与本 fork auth 模型偏差

## 工作循环(每项)
1. `git show <sha>` 看上游意图
2. fork 中定位对应模块
3. 评估:直接适用 / 需调整 / 不适用
4. 实施修改 + `bun typecheck`
5. 更新本 TODO

## REVIEW Minor 修复(2026-05-09)
- [x] A6 `transform.ts` 文本过滤改回 `text !== ""`(与 upstream 4e14f7951 对齐,移除 trim)
- [x] A8 补 `test/tool/read.test.ts` unsupported mime 回退用例(bmp/tiff/avif)
- [x] A12 `skill/index.ts` `externalDirs` 提到 if 块外(与 upstream ffe0314c4 结构对齐)
- 验证:bun typecheck 干净;`bun test test/provider/transform.test.ts test/tool/read.test.ts test/skill/` 194 pass / 0 fail / 388 expect
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ logs/
*.bun-build
tsconfig.tsbuildinfo
.gitnexus

# MemPalace per-project files (issue #185)
mempalace.yaml
entities.json
26 changes: 20 additions & 6 deletions .opencode/settings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{
"_comment": "mempalace official hook endpoints only. graphify hook -> <cwd>/.claude/settings.json (graphify claude install). gitnexus hook -> ~/.claude/settings.json (gitnexus setup). OPENCODE settings chain merges all three layers automatically.",
"hooks": {
"PreToolUse": [
"SessionStart": [
{
"matcher": "Bash",
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "[ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"[graphify] Knowledge graph available. Read graphify-out/GRAPH_REPORT.md for god nodes and architecture context before searching files.\"}}' || true"
"command": "/root/.local/bin/mempalace hook run --hook session-start --harness claude-code 2>/dev/null || true"
}
]
},
}
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/root/.local/bin/mempalace hook run --hook stop --harness claude-code 2>/dev/null || true"
}
]
}
],
"PreCompact": [
{
"matcher": "Glob|Grep|Read",
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "command -v mempalace >/dev/null 2>&1 && [ -d \"$HOME/.mempalace\" ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"[mempalace] Semantic memory available. Use mempalace_search MCP tool or mempalace search CLI for historical experience retrieval.\"}}' || true"
"command": "/root/.local/bin/mempalace hook run --hook precompact --harness claude-code 2>/dev/null || true"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Rules:
<!-- gitnexus:start -->
# GitNexus — Code Intelligence

This project is indexed by GitNexus as **opencode** (44589 symbols, 68904 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **opencode** (48343 symbols, 75343 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.

> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.

Expand Down
14 changes: 12 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- gitnexus:start -->
# GitNexus — Code Intelligence

This project is indexed by GitNexus as **opencode** (44589 symbols, 68904 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **opencode** (48343 symbols, 75343 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.

> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.

Expand Down Expand Up @@ -40,4 +40,14 @@ This project is indexed by GitNexus as **opencode** (44589 symbols, 68904 relati
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |

<!-- gitnexus:end -->
<!-- gitnexus:end -->

## graphify

This project has a graphify knowledge graph at graphify-out/.

Rules:
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
- For cross-module "how does X relate to Y" questions, prefer `graphify query "<question>"`, `graphify path "<A>" "<B>"`, or `graphify explain "<concept>"` over grep — these traverse the graph's EXTRACTED + INFERRED edges instead of scanning files
- After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
141 changes: 0 additions & 141 deletions README.ar.md

This file was deleted.

Loading
Loading