termrelay 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # 更新日志
2
+
3
+ ## 0.1.0
4
+
5
+ 首个 npm 版本,支持 macOS、Node.js 22.19.0 及以上版本和 Pi `0.84.x`。
6
+
7
+ - 提供本地网页界面,支持导入项目、新建 Pi 会话、读取原生历史并继续对话。
8
+ - 展示回复、工具执行过程、待办事项和上下文用量,支持选择模型、调整思考强度及使用斜杠指令。
9
+ - 支持按轮次审阅文件修改、撤销修改和重新应用。
10
+ - 提供 Git 状态、文件差异和提交图表,支持暂存、提交、推送及由 Agent 执行的自动提交流程。
11
+ - 提醒 TermRelay、Pi 和已登记安装包的可用更新,提供对应更新日志和升级命令。
12
+ - 通过 `termrelay` 启动并自动打开浏览器,服务仅供本机访问。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TermRelay contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # TermRelay
2
+
3
+ <p>
4
+ <img src="https://raw.githubusercontent.com/dramxia/TermRelay/main/apps/web/public/logo.svg" alt="TermRelay logo" width="72" />
5
+ </p>
6
+
7
+ ## 项目背景
8
+
9
+ TermRelay 是面向多种编程 Agent(任务执行程序)的本地适配层与统一网页界面,
10
+ 用于管理项目与会话、查看执行过程、审阅代码修改和完成常用 Git 操作。
11
+
12
+ 目前已实现 Pi 适配器,后续计划接入 Claude Code 和 Codex CLI。
13
+ 各 Agent 负责执行任务并管理自身配置,TermRelay 负责适配接入和统一展示。
14
+
15
+ [源代码](https://github.com/dramxia/TermRelay) ·
16
+ [问题反馈](https://github.com/dramxia/TermRelay/issues) ·
17
+ [更新日志](https://github.com/dramxia/TermRelay/blob/main/CHANGELOG.md) ·
18
+ [MIT 许可证](https://github.com/dramxia/TermRelay/blob/main/LICENSE)
19
+
20
+ ## 项目架构
21
+
22
+ ```text
23
+ 浏览器界面(apps/web)
24
+ |
25
+ v
26
+ 本地服务(packages/server)
27
+ |
28
+ +-- Agent 适配层
29
+ | |
30
+ | +-- Pi(已接入:packages/adapter-pi)
31
+ | +-- Claude Code(计划接入)
32
+ | +-- Codex CLI(计划接入)
33
+ |
34
+ +-- 本机 Git
35
+ ```
36
+
37
+ `apps/cli` 负责环境检查和服务启动,`packages/protocol` 定义各模块共享的数据结构与校验。
38
+ 各适配器负责与对应 Agent 通信,将原生会话和执行事件转换为共享协议的数据;会话历史沿用所属 Agent 的原生存储。
39
+
40
+ 开发约束见 [项目规则](https://github.com/dramxia/TermRelay/blob/main/rules/PROJECT_RULES.md),
41
+ 协作流程见 [AGENTS.md](https://github.com/dramxia/TermRelay/blob/main/AGENTS.md)。
42
+ Git 图表的第三方代码来源与许可见 [版权说明](https://github.com/dramxia/TermRelay/blob/main/apps/web/public/third-party-notices.txt)。
43
+
44
+ ## 如何使用
45
+
46
+ ### 准备环境
47
+
48
+ - macOS
49
+ - Node.js 22.19.0 或更高版本(与 Pi 的环境要求一致)
50
+ - Git,可通过 `git --version` 检查是否已安装
51
+ - 当前版本需安装并配置 Pi `0.84.x`;Claude Code 和 Codex CLI 尚未接入
52
+
53
+ 尚未安装 Pi 时,先安装当前适配的版本:
54
+
55
+ ```bash
56
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.4
57
+ ```
58
+
59
+ 模型配置见 [Pi 使用说明](https://github.com/earendil-works/pi/tree/v0.84.4/packages/coding-agent)。
60
+ 启动 TermRelay 前,请确认能在终端运行 `pi` 并正常对话。
61
+
62
+ ### 安装与启动
63
+
64
+ 通过 npm 全局安装:
65
+
66
+ ```bash
67
+ npm install -g termrelay
68
+ ```
69
+
70
+ 进入你要开发的项目目录并启动:
71
+
72
+ ```bash
73
+ cd /path/to/project
74
+ termrelay
75
+ ```
76
+
77
+ 把 `/path/to/project` 替换为你自己的项目目录。启动后自动打开浏览器,服务仅供本机访问。
78
+
79
+ ### 开始使用
80
+
81
+ 1. 在 **Code** 页面点击“工作区”旁的“+”导入项目目录;再次启动时可直接选择已导入的项目。
82
+ 2. 新建会话或打开历史会话,在输入框中发送消息,开始或继续开发任务。
83
+ 3. 点击回复下方的“审阅”查看文件修改,按需撤销或重新应用。
84
+ 4. 在 **Git** 页面查看差异和提交图表,暂存需要的修改后提交、推送;也可选择“自动提交并推送”启动自动提交流程。
85
+
86
+ 更多启动选项可通过 `termrelay --help` 查看。