finch-shell-go 0.0.0-stage → 0.1.2
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/README.md +57 -2
- package/dist/index.js +10390 -0
- package/dist/ui/panel.css +1357 -0
- package/dist/ui/panel.html +38 -0
- package/dist/ui/panel.js +17735 -0
- package/docs/logo.png +0 -0
- package/finch.json +30 -0
- package/i18n/zh-CN.json +10 -0
- package/icon.png +0 -0
- package/package.json +33 -5
- package/skills/shell-go/SKILL.md +78 -0
package/README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# shellGo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="./docs/logo.png" width="96" alt="shellGo 图标" />
|
|
4
|
+
|
|
5
|
+
在 Finch 里开一条**看得见的终端**:Agent 的命令在这里执行,过程实时可见,输出与退出码回传;你自己也能在同一个面板里敲命令;内置 Bash 的执行会以暗色块镜像进来,一条时间线上看得到全部动作。
|
|
6
|
+
|
|
7
|
+
与官方 `finch-shell` 的区别:`finch-shell` 只负责「开个终端、把命令敲进去」,不返回任何输出,Agent 拿不到结果就没法接着走。shellGo 补的就是这个缺口——**可见 + 可回传**,并且与会话绑定、支持常驻进程。
|
|
8
|
+
|
|
9
|
+
## 动作
|
|
10
|
+
|
|
11
|
+
| action | 用途 |
|
|
12
|
+
| ----------- | ----------------------------------------------------- |
|
|
13
|
+
| `run` | 执行一条命令并等它结束,返回输出与退出码 |
|
|
14
|
+
| `open` | 起常驻进程(dev server、`--watch`),立即返回 `jobId` |
|
|
15
|
+
| `read` | 读常驻进程最近的输出 |
|
|
16
|
+
| `interrupt` | 停常驻进程,连子进程一起 |
|
|
17
|
+
| `close` | 关掉当前会话的 shell、常驻进程与面板 |
|
|
18
|
+
|
|
19
|
+
用法细节见随包的 `skills/shell-go/SKILL.md`。
|
|
20
|
+
|
|
21
|
+
## 需要什么
|
|
22
|
+
|
|
23
|
+
- **bash**:Windows 装 Git for Windows 或 MSYS2;macOS / Linux 用系统自带的。找不到会直接报错并列出试过的路径。
|
|
24
|
+
- **64 位**:Windows 的 32 位 Finch(`setup-ia32.exe`)没有可用的原生二进制,装了也用不了。
|
|
25
|
+
- 语法固定是 bash,不跟随 Finch 的 shell 设置,也不支持 PowerShell / cmd。
|
|
26
|
+
|
|
27
|
+
## 权限
|
|
28
|
+
|
|
29
|
+
| 权限 | 为什么 |
|
|
30
|
+
| ----------------------- | ------------------------------------------------------------ |
|
|
31
|
+
| `shell` | 要起真实的 bash 进程 |
|
|
32
|
+
| `filesystem: readwrite` | 原生模块落到插件私有目录、常驻进程日志 |
|
|
33
|
+
| `agentEvents: full` | 镜像内置 Bash 的命令与结果,否则看不到「另一条通道」在干什么 |
|
|
34
|
+
|
|
35
|
+
`agentEvents` 会读到所有会话的完整运行事件,是本应用最敏感的一项;它只用于渲染终端里的镜像块,不落盘、不外传。
|
|
36
|
+
|
|
37
|
+
## 已知限制
|
|
38
|
+
|
|
39
|
+
- 关闭面板 = 杀掉 shell 和所有常驻进程,正在跑的 dev server 会一起停。
|
|
40
|
+
- 需要交互输入的命令(`ssh`、`sudo -S`、`git rebase -i`)和全屏程序(vim、htop)不能用 `run`,请在面板里手敲。
|
|
41
|
+
- 单条命令超时后 shell 会被占住,新命令会被拒绝,要么等它结束,要么 `close` 重建。
|
|
42
|
+
- 镜像只有「命令开始 / 命令结束」两个点,没有逐行流;高负载下事件可能漏。
|
|
43
|
+
- macOS 未做真机验证(协议层按 bash 3.2 与 POSIX 写,Linux 与 Windows 已实测)。
|
|
44
|
+
|
|
45
|
+
## 开发
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bun scripts/devFinch/dev.js shellGo # 构建 + 软链安装 + 监听
|
|
49
|
+
bun run check finchapp/shellGo --test # 格式、lint、单元测试
|
|
50
|
+
bun run synctpl finchapp # 契约校验
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
开发日志落 `~/.yicodeLogsDev/`:
|
|
54
|
+
|
|
55
|
+
| 文件 | 内容 |
|
|
56
|
+
| ------------------------------ | ---------------------------------------------------------------------------------------- |
|
|
57
|
+
| `finch-shell-go.dev.log.jsonl` | 诊断事件(结构化、一次运行一份、启动清空) |
|
|
58
|
+
| `finch-shell-go.output.log` | 面板与作业的原始输出(纯文本、剥 ANSI、命令单独一行,便于 grep;仅开发档、单次上限 8MB) |
|