Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
cdcaee2
docs: align roadmap and decisions with confirmed WindTerm goal
JavaZeroo Oct 26, 2026
163d8b8
Merge pull request #75 from JavaZeroo/docs/confirmed-project-directio…
JavaZeroo Oct 26, 2026
abe5a85
Merge commit '163d8b8ae58496cc5f9c6e5fb0a04bed8da5b68b' into fix/ui-p…
JavaZeroo Oct 26, 2026
62226af
fix: bind UI paste sender fence before admission (#53)
JavaZeroo Oct 26, 2026
a15eb7f
test: distinguish paste wake cause and verify control pipe bounds
JavaZeroo Oct 26, 2026
9ab85b7
docs: retain UI paste progress and eight-session failures (#53)
JavaZeroo Oct 26, 2026
8ff112e
docs: record prepared Vim stage59 regression separately
JavaZeroo Oct 26, 2026
06bf6b5
perf: reuse row keys during resize replay reconciliation (#53)
JavaZeroo Oct 26, 2026
eae4b6a
fix: stop terminal replies while closing input (#53)
JavaZeroo Oct 26, 2026
848cb0e
docs: record original eight-session repair and remaining regressions …
JavaZeroo Oct 26, 2026
4daf992
fix: recognize empty record redraw before persistence output (#72)
JavaZeroo Oct 26, 2026
188228e
docs: record empty-record CR cause and configuration-specific validat…
JavaZeroo Oct 26, 2026
f199481
Merge pull request #78 from JavaZeroo/fix/persistence-empty-cr-r72
JavaZeroo Oct 26, 2026
97ac142
Merge pull request #77 from JavaZeroo/fix/candidate-replay-cost-r53
JavaZeroo Oct 26, 2026
a5fdd05
ci: retain bounded hosted shell command observations (#81)
JavaZeroo Oct 26, 2026
887c769
Merge pull request #84 from JavaZeroo/diagnose/experimental-preflight…
JavaZeroo Oct 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
7 changes: 6 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Working on TermForge

- Read README.md, docs/PLAN.md, docs/FEATURES.md and the active milestone before making architecture decisions.
- Follow docs/adr/0006-confirmed-project-direction.md: fully recreate WindTerm 2.7.0, with Windows 11 x64 as the first complete-version target and Windows/Linux/macOS as the final platform goal. Prioritize terminal foundations and performance before SSH/SFTP and the remaining features.
- Preserve Alacritty as a candidate, not an approved product-core selection. Keep investigating the original code and mechanisms; internal implementation need not be identical.
- Default to observed WindTerm 2.7.0 behavior when it conflicts with standards, third-party behavior or existing project policy. Unknown behavior requires investigation; important deviations and original-bug fixes require user confirmation.
- The user confirms scope changes, major architecture/dependency choices, acceptance criteria and important behavior differences. Agents may autonomously research, experiment, implement, test and fix within confirmed scope. Record proposal/confirmed status and confirmation evidence in ADRs and issues; merged code or closed issues do not imply user approval.
- Performance tolerances have no approved numeric values yet. Propose them from reliable baseline evidence and explicitly agree them with the user before using them for acceptance; keep existing diagnostic guards separate.
- The project has a limited Windows local-shell prototype. Do not claim a daily-use release, Linux/macOS client, complete WindTerm parity or measured performance equivalence.
- Do not lock the stack or add a large application skeleton before benchmark evidence supports it.
- Every performance claim needs workload identity, environment, correctness checks, raw samples and limitations.
Expand All @@ -17,5 +22,5 @@
- Keep build configurations separate in claims: default core/system backend, main candidate/system backend, and an explicit experimental backend need their own source and validation identity. Do not combine their independent successes into a joint acceptance result.
- Source comments explain responsibilities, invariants and policy. Put changing status, batch names and future work in the owning issue; retain fixed experiment/protocol identities when they define behavior or evidence. A TODO must point to a current task rather than duplicate the roadmap.
- Start only an issue whose real blockers are resolved. Record source observations separately from TermForge policies, implement independently, and validate the complete user-visible behavior. An unknown target behavior is an investigation item, not a passed comparison.
- Before expanding terminal modes and common TUI implementation in R2, complete ADR-0003's actual external-core comparison; candidate build and adaptation feasibility can proceed during R1. Before product backend selection, revisit ADR-0004. Do not silently turn experimental choices into permanent architecture.
- ADR-0003's historical external-core comparison remains evidence for continued candidate work, not user confirmation of a permanent route. Before final product core/backend/GUI selection, revisit ADR-0003/0004 under ADR-0006 and obtain the user's confirmation of a concrete evidence-backed proposal. Do not silently turn experimental choices into permanent architecture.
- Documentation is primarily Chinese; technical identifiers and concise English summaries are welcome.
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ if(WIN32)
target_compile_definitions(shell_query_client PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN UNICODE _UNICODE)
add_dependencies(termforge_shell shell_query_client)
add_executable(shell_queue_probe experiments/shell/queue_probe.cpp)
add_executable(sender_fence_pipe_test experiments/shell/sender_fence_pipe_test.cpp)
termforge_warnings(sender_fence_pipe_test)
target_compile_definitions(sender_fence_pipe_test PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN)
add_executable(shell_size_client experiments/shell/size_client.cpp)
add_executable(shell_input_client experiments/shell/input_client.cpp)
add_executable(shell_text_client experiments/shell/text_client.cpp)
Expand Down Expand Up @@ -244,6 +247,16 @@ if(BUILD_TESTING)
add_test(NAME candidate_title COMMAND candidate_title_test)
set_tests_properties(candidate_title PROPERTIES TIMEOUT 35
ENVIRONMENT "TERMFORGE_TEST_ARTIFACTS=${PROJECT_BINARY_DIR}/test-artifacts")
if(TERMFORGE_CONPTY_BACKEND_DIR)
add_executable(candidate_reply_close_test experiments/shell/candidate_reply_close_test.cpp experiments/shell/shell_launch.cpp)
termforge_warnings(candidate_reply_close_test)
target_compile_definitions(candidate_reply_close_test PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN UNICODE _UNICODE)
target_link_libraries(candidate_reply_close_test PRIVATE termforge_core d2d1 dwrite gdi32 user32 imm32 ole32 oleaut32 uuid bcrypt)
termforge_candidate_shell(candidate_reply_close_test)
add_dependencies(candidate_reply_close_test termforge_shell_assets)
add_test(NAME candidate_reply_close COMMAND candidate_reply_close_test)
set_tests_properties(candidate_reply_close PROPERTIES TIMEOUT 30)
endif()
endif()
add_dependencies(runtime_observation_test termforge_shell_assets)
add_test(NAME runtime_observation COMMAND runtime_observation_test)
Expand Down Expand Up @@ -299,6 +312,10 @@ if(BUILD_TESTING)
add_test(NAME paste COMMAND paste_test)
add_test(NAME sender_fence COMMAND sender_fence_test)
set_tests_properties(sender_fence PROPERTIES TIMEOUT 10)
if(WIN32)
add_test(NAME sender_fence_pipe COMMAND sender_fence_pipe_test)
set_tests_properties(sender_fence_pipe PROPERTIES TIMEOUT 10)
endif()
add_test(NAME clipboard_policy COMMAND clipboard_policy_test)
add_test(NAME keyboard COMMAND keyboard_test)
add_test(NAME text_action_policy COMMAND text_action_policy_test)
Expand Down Expand Up @@ -343,6 +360,7 @@ if(BUILD_TESTING)
termforge_add_python_test(workflow_system_runner -m unittest research.ime.test_workflow_system_runner -v)
set_tests_properties(workflow_system_runner PROPERTIES TIMEOUT 30)
termforge_add_python_test(copy_error_frame -m unittest experiments.shell.test_copy_error_frame -v)
termforge_add_python_test(paste_fence_evidence -m unittest experiments.shell.test_paste_checks -v)
termforge_add_python_test(resize_trace -m unittest experiments.shell.test_resize_trace -v)
if(WIN32)
termforge_add_python_test(research_guards -m unittest discover -s research/tests -v)
Expand All @@ -366,7 +384,7 @@ endif()
if(WIN32)
foreach(target termforge_conpty_probe conpty_ctrl_c_probe conpty_margin_probe conpty_backend_probe real_app_capture
termforge_shell workflow_fixture_test shell_queue_probe shell_paste_probe
runtime_observation_test candidate_title_test raw_console_receiver_test)
runtime_observation_test candidate_title_test candidate_reply_close_test raw_console_receiver_test)
if(TARGET ${target})
termforge_use_conpty_backend(${target})
endif()
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

R1 基础文字交互已按限定合同验收,当前推进 R2 的联合配置、兼容性、输入与交付验收,并行处理性能和环境缺口。

开始前阅读[总体计划](docs/PLAN.md)、[当前能力](docs/FEATURES.md)、[R2 交付路线与验收](docs/milestones/R2-local-terminal.md)和[任务跟踪](docs/TRACKING.md)。已验基础合同见 [R1](docs/milestones/R1-local-text.md);先核对 issue 的真实阻塞、目标构建配置和工作树,再选取范围明确的任务。PR 说明问题、最终行为、验证方法和限制,并更新对应能力行。大型依赖或技术栈变更需要记录 ADR 和实验依据。
开始前阅读[总体计划](docs/PLAN.md)、[当前能力](docs/FEATURES.md)、[R2 交付路线与验收](docs/milestones/R2-local-terminal.md)和[任务跟踪](docs/TRACKING.md)。已验基础合同见 [R1](docs/milestones/R1-local-text.md);先核对 issue 的真实阻塞、目标构建配置和工作树,再选取范围明确的任务。PR 说明问题、最终行为、验证方法和限制,并更新对应能力行。按 [ADR-0006](docs/adr/0006-confirmed-project-direction.md),目标范围、主要技术路线、验收门槛和重要差异需用户确认;ADR 记录提议、证据和确认依据。研究、候选实验及已确认方向内的实现和修复可自主推进。

规划文件各维护一种事实:能力在 FEATURES、路标范围在 PLAN、交付顺序和验收在当前路标、实时进度和依赖在 GitHub。TRACKING 和 EVIDENCE 分别提供任务与来源导航。源码注释说明机制与不变量,TODO 指向责任 issue;不要把“这一批已完成”“下一波”等动态进度写进实现。固定实验、协议和历史结果的身份应保留,不机械改名。

## 性能结果

提供具体应用版本/构建、输入 SHA-256、环境、配置、重复样本和正确性检查。说明时间端点是生产完成、消费完成还是画面呈现;不能混为一谈。报告退化和波动,不只挑最佳结果。

关键指标逐项对标 WindTerm 2.7.0,首个完整版本环境为 Windows 11 x64。先测可靠基线,再提出容差并与用户明确;未经确认的数值只作提案,不用于宣布性能验收通过。终端行为默认原版优先;与规范、第三方核心或项目策略冲突时保留原版证据和差异,明确缺陷的修正由用户确认。

## 来源与隐私

遵守 [PROVENANCE](docs/PROVENANCE.md)。使用自生成输入与隔离测试配置,上传前检查用户名、路径、主机名、地址和凭据。第三方实现单独说明许可证;项目 MIT 许可不覆盖未获授权的第三方材料。
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# TermForge

**独立、完整开源地复刻 WindTerm 2.7.0,以可复现证据验证功能、交互和性能。**
**以完整开源、可独立构建的实现复刻 WindTerm 2.7.0,优先完成 Windows 11 x64,最终覆盖 Windows、Linux、macOS。**

An independent, fully open-source terminal project targeting WindTerm 2.7.0 feature, interaction and performance parity. Not affiliated with WindTerm or KingToolbox.
An independent, fully open-source terminal project targeting WindTerm 2.7.0 feature, behavior, UI and performance parity. Windows 11 x64 first; Windows, Linux and macOS ultimately. Not affiliated with WindTerm or KingToolbox.

当前是有限 Windows 本地终端原型,**R1 基础文字交互已按限定合同验收,正在推进 R2 可靠本地终端与开发版**。主线已有候选核心路线、首批流式字素、有限多会话和配置恢复;候选核心与实验 ConPTY 后端的联合配置、完整 TUI/输入、真实不同 DPI、性能预算和开发包仍需闭合。现状见[能力矩阵](docs/FEATURES.md),接续顺序见 [R2 交付路线与验收](docs/milestones/R2-local-terminal.md)。SSH/SFTP 属于 R3,完整 UI 与 WindTerm 性能等价均未验收。`TermForge` 是暂名。
当前是有限 Windows 本地终端原型,**R1 基础文字交互已按限定合同验收,正在推进 R2 可靠本地终端与开发版**。主线已有 Alacritty 候选实验、首批流式字素、有限多会话和配置恢复;候选核心与实验 ConPTY 后端的联合配置、完整 TUI/输入、真实不同 DPI、性能预算和开发包仍需闭合。现状见[能力矩阵](docs/FEATURES.md),接续顺序见 [R2 交付路线与验收](docs/milestones/R2-local-terminal.md)。SSH/SFTP 属于 R3,完整 UI 与 WindTerm 性能等价均未验收。`TermForge` 是暂名。

方向已经用户确认,依据见 [ADR-0006](docs/adr/0006-confirmed-project-direction.md):原版行为优先,内部结构不强求一致,但认真研究、借鉴原版;Alacritty 保留为候选,正式选型待证据和用户确认。关键性能指标分别验收,具体允许波动范围后续与用户明确。

## 开始使用

Expand All @@ -24,16 +26,17 @@ An independent, fully open-source terminal project targeting WindTerm 2.7.0 feat
|---|---|
| 已经做了什么、还缺什么 | [当前能力与目标矩阵](docs/FEATURES.md) |
| 最终目标与五个路标(从远到近) | [总体计划](docs/PLAN.md) |
| 哪些方向已确认、哪些决定仍需确认 | [方向与决策权限](docs/adr/0006-confirmed-project-direction.md) |
| 官方发行平台、架构与声明的最低系统边界 | [2.7.0 平台范围台账](research/windterm-2.7.0-platform-scope.md) |
| R2 分几步交付,每步还缺什么 | [R2 交付路线与验收](docs/milestones/R2-local-terminal.md) |
| 已验收的基础文字交互合同 | [R1 基础文字交互](docs/milestones/R1-local-text.md) |
| GitHub milestones、issues 和执行顺序 | [任务跟踪](docs/TRACKING.md) |
| 结论依据、复现命令和全部文档 | [证据索引](docs/EVIDENCE.md) · [文档导航](docs/README.md) |

交付主线:**基础文字交互 → 可靠本地终端 → SSH/SFTP 远程日常版 → 高级功能/跨平台/性能 → 完整 2.7.0 复刻验收**。性能工程和定向逆向贯穿各路标,不把远期整块调查当作近期开发的前置。
交付主线:**终端基础能力与性能 → SSH/SFTP 远程工作流 → Windows 高级功能与性能收敛 → Windows 11 x64 完整复刻验收 → Linux/macOS 扩展与全平台验收**。保留 R1–R5 编号,R5 分 Windows 和全平台两个出口;性能工程、原版研究和平台可行性调查持续推进。

## 工程原则与来源

功能先通过正确性验证;性能同时衡量吞吐、交互延迟、CPU、内存、稳定性和多会话公平性。不以丢数据、无界缓冲或积压呈现换取跑分,不预设某种语言或框架必然达标。优先复用许可明确的组件,以测量和可维护性决定产品架构。
功能先通过正确性验证;性能同时衡量吞吐、交互延迟、CPU、内存、稳定性和多会话公平性。不以丢数据、无界缓冲或积压呈现换取跑分,不预设某种语言或框架必然达标。研究原版公开代码、运行行为与关键内部机制,并比较自主实现和许可明确的组件;主要技术路线、验收门槛和重要差异经用户确认后生效。

原创代码和文档采用 [MIT](LICENSE),第三方组件保留自身许可。实现不依赖 WindTerm 二进制或专有资源;观察、静态线索和推断分别记录。详见[来源规则](docs/PROVENANCE.md)与[性能规范](benchmarks/README.md)。
2 changes: 1 addition & 1 deletion benchmarks/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ H01 搜索固定首部/中部/尾部命中及不存在目标各 10 次,冷/重

吞吐和资源报告中位数、最小/最大、IQR、所有样本与失败率;原始批次保留。异常样本只能按预先记录的外部故障理由排除,报告排除前后结果。校准运行不能混入正式样本。

M0 不给出“追平”结论。完成基线后,按每个关键场景制定绝对/相对预算和可接受差异,冻结后用于 M1/M2 对照。吞吐提高但尾延迟或正确性退化不能视为整体达标;没有证据的组件成本(如黑盒布局/解析耗时)必须保持未知。
本协议的历史 M0 基线阶段不给出“追平”结论;当前执行使用 R1–R5 路标。按 [ADR-0006](../docs/adr/0006-confirmed-project-direction.md),先建立 WindTerm 2.7.0 的可靠基线,提出每个关键场景的绝对/相对预算和允许波动范围,与用户明确并记录确认后冻结,用于后续验收。当前没有已批准的数值容差,采样噪声或自有回归护栏不能替代该确认,也不得根据待验结果反填门槛。首个完整版本对照环境为 Windows 11 x64,其他平台分别留证。吞吐提高但尾延迟或正确性退化不能视为整体达标;没有证据的组件成本(如黑盒布局/解析耗时)必须保持未知。
2 changes: 2 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 性能基准

当前优先建立 Windows 11 x64 上 WindTerm 2.7.0 的终端基础能力对照,吞吐、响应、CPU、内存及多会话分别留证。按 [ADR-0006](../docs/adr/0006-confirmed-project-direction.md),具体允许波动范围在可靠基线后与用户明确,当前没有已批准的数值容差;阶段性诊断与性能验收分开。

> M0/M1/M2 是协议 v0.1 的历史阶段名称;场景和测量约束继续有效,当前交付路标与执行顺序以 [R1–R5 计划](../docs/PLAN.md)及 [#3/#4 跟踪](../docs/TRACKING.md)为准。

已定义 [M0 实验协议 v0.1](PROTOCOL.md)、[机器可读场景参数](cases.json) 与 [记录模板](run-template.json)。[工具使用说明](tools/README.md) 包含生成器、播放器、Windows 资源采样与自建窗口视觉诊断。已有[真实 WindTerm 诊断烟测](results/2026-10-21-windterm-smoke/README.md),#3 的实际终端端点适配及正式开销校准仍未完成,尚无正式 WindTerm 性能基线。执行以 PROTOCOL.md 为准,本页为导航摘要。
Expand Down
Loading