psyclaw 0.30.7 → 0.30.9
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 +58 -163
- package/agents/recommended/catalog.json +2 -2
- package/dist/src/adapters/pi/extension.js +22 -6
- package/dist/src/adapters/pi/extension.js.map +1 -1
- package/dist/src/panel/extension.js +7 -0
- package/dist/src/panel/extension.js.map +1 -1
- package/dist/src/panel/workbench.d.ts +2 -0
- package/dist/src/panel/workbench.js +10 -3
- package/dist/src/panel/workbench.js.map +1 -1
- package/docs//344/275/277/347/224/250/347/231/275/347/232/256/344/271/246.md +1 -1
- package/package.json +1 -1
- package/skills/recommended/catalog.json +46 -41
- package/skills/recommended/mcp-catalog.json +197 -14
package/README.md
CHANGED
|
@@ -1,221 +1,116 @@
|
|
|
1
1
|
# PsyClaw
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
面向社会科学研究的智能体工作台:把研究项目、证据账本、完整性门禁、可恢复工作流和本地面板接到内置运行时上。它不替代统计软件,也不会把未经核验的引用、结果或审稿意见写成事实。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
当前版本:`0.30.7`。正式命令、用户配置目录和后续发布统一使用 `psyclaw`。
|
|
8
|
-
|
|
9
|
-
## 发布流程
|
|
10
|
-
|
|
11
|
-
发布只提交已跟踪文件,并自动递增 patch 版本、创建版本标签,推送当前分支和标签;`.DS_Store`、论文附件、图形和其他未跟踪生成物不会被加入。GitHub Actions 随标签推送执行 Node 22 检查并发布 npm:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
RELEASE_MESSAGE="release: describe the change" pnpm release:push
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
运行前请确认当前分支、工作区变更和 GitHub 权限。NPM 发布由 GitHub Actions 的 Trusted Publishing 完成,本机不需要 `npm login`。
|
|
5
|
+
当前版本:`0.30.9` · 命令与用户目录:`psyclaw` / `~/.psyclaw` · 许可证:MIT
|
|
6
|
+
内置 Academic Research Skills(`vendor/ars`)遵循上游 CC BY-NC 4.0,仅限非商业用途。
|
|
18
7
|
|
|
19
8
|
## 安装
|
|
20
9
|
|
|
21
|
-
需要 Node.js `>=22.19.0
|
|
22
|
-
|
|
23
|
-
```powershell
|
|
24
|
-
npm install -g psyclaw@0.30.7
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
如果本机 npm 配置把 registry 误写成带有 `~/` 的地址,请显式指定官方源:
|
|
10
|
+
需要 Node.js `>=22.19.0`。
|
|
28
11
|
|
|
29
12
|
```bash
|
|
30
|
-
npm install -g psyclaw@0.30.
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
中国大陆网络较慢或无法访问官方源时:
|
|
34
|
-
|
|
35
|
-
```powershell
|
|
36
|
-
npm install -g psyclaw@0.30.7 --registry=https://registry.npmmirror.com
|
|
13
|
+
npm install -g psyclaw@0.30.9
|
|
37
14
|
```
|
|
38
15
|
|
|
39
|
-
|
|
16
|
+
中国大陆可用镜像或安装脚本:
|
|
40
17
|
|
|
41
18
|
```bash
|
|
42
|
-
|
|
19
|
+
npm install -g psyclaw@0.30.9 --registry=https://registry.npmmirror.com
|
|
20
|
+
# 或
|
|
43
21
|
PSYCLAW_CN=1 curl -fsSL https://exekiel179.github.io/psyclaw/install.sh | sh
|
|
44
22
|
```
|
|
45
23
|
|
|
46
24
|
```powershell
|
|
47
|
-
# Windows
|
|
25
|
+
# Windows
|
|
48
26
|
irm https://exekiel179.github.io/psyclaw/install.ps1 | iex
|
|
49
|
-
# 可选:$env:PSYCLAW_CN = "1";$env:PSYCLAW_VERSION = "0.30.7"
|
|
50
27
|
```
|
|
51
28
|
|
|
52
|
-
|
|
29
|
+
确认入口:
|
|
53
30
|
|
|
54
|
-
|
|
55
|
-
- `psyclaw update` / `check-updates`:读版本与安装命令使用 `PSYCLAW_REGISTRY` 或 npmmirror,不再写死官方 npm
|
|
56
|
-
- 推荐 Skill 的托管 `git clone`:经 GitHub 镜像前缀
|
|
57
|
-
- `fetch` 覆盖 `api.github.com`、`github.com`、`raw.githubusercontent.com`、`codeload.github.com`
|
|
58
|
-
|
|
59
|
-
建议把 `registry=https://registry.npmmirror.com` 写入 `~/.npmrc`,以免下次启动检测不到国内源。已有 HTTP(S) 代理时优先走代理、保持官方 GitHub URL。
|
|
60
|
-
|
|
61
|
-
PsyClaw 的 npm 发布包直接携带 Windows x64/arm64 版 `ripgrep` 和 `fd`,Windows 启动时直接使用包内可执行文件,不再联网下载。
|
|
62
|
-
|
|
63
|
-
确认命令入口:
|
|
64
|
-
|
|
65
|
-
```powershell
|
|
31
|
+
```bash
|
|
66
32
|
psyclaw --help
|
|
67
33
|
```
|
|
68
34
|
|
|
69
|
-
直接运行 `psyclaw`
|
|
35
|
+
直接运行 `psyclaw` 会启动交互工作台;首次无模型配置时会进入配置流程。API Key 只写入用户级 `~/.psyclaw/agent/auth.json`,不要写进命令参数、项目或 Git 仓库。
|
|
70
36
|
|
|
71
37
|
## 五分钟开始
|
|
72
38
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```powershell
|
|
76
|
-
mkdir my-study
|
|
77
|
-
cd my-study
|
|
39
|
+
```bash
|
|
40
|
+
mkdir my-study && cd my-study
|
|
78
41
|
psyclaw init "社交支持与研究生心理健康的关系" --paradigm survey-observational
|
|
79
42
|
psyclaw
|
|
80
43
|
```
|
|
81
44
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
在对话界面中,`/init <研究目标>` 初始化研究项目与工作区;随后用 Shift+Tab 切换到 `analysis` 或 `academic` 推进。没有单独的 `/run` 或 `/brief` 命令。未 `/init` 时保持普通对话,不强制研究门禁。
|
|
45
|
+
初始化会创建 `.psyclaw/data/raw/`(只读保护区)、`data/clean/`、`literature/pdfs/`、`notes/`、`outputs/`。对话中也可用 `/init <研究目标>`;用 `Shift+Tab` 在 `chat` → `analysis` → `academic` 间切换。未 `/init` 时保持普通对话,不强制研究门禁。
|
|
85
46
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
```powershell
|
|
89
|
-
psyclaw evidence add notes\source.md --level user
|
|
47
|
+
```bash
|
|
48
|
+
psyclaw evidence add notes/source.md --level user
|
|
90
49
|
```
|
|
91
50
|
|
|
92
|
-
##
|
|
51
|
+
## 常用命令
|
|
93
52
|
|
|
94
|
-
| 需求 |
|
|
53
|
+
| 需求 | 命令 |
|
|
95
54
|
| --- | --- |
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| 匿名产品遥测 | `psyclaw telemetry status`、`psyclaw telemetry off`、`psyclaw telemetry on`(默认开启;对话中 `/telemetry`) |
|
|
108
|
-
| 打开科研面板 | 在对话中输入 `/panel`(Provider 页可选填 Base URL,指向 OpenAI 兼容网关) |
|
|
109
|
-
| 查看或切换 Provider | 在对话中输入 `/provider` 或 `/provider <id>` |
|
|
110
|
-
| 管理启动横幅宠物 | `/pet`、`/pet on`、`/pet off`(默认关闭) |
|
|
111
|
-
| 管理 Skill | `/skill`(未安装→安装并默认启用;已启用→停用) |
|
|
112
|
-
| 创建项目能力 | `/create-skill`、`/create-hook`、`/create-rule`、`/create-subagent`(附带需求文本) |
|
|
113
|
-
| 运行只读 Subagent | `/agents` 浏览,或 `/agents <task>` 运行 |
|
|
114
|
-
| 调用已加载 Skill | `/skill:<name>` |
|
|
115
|
-
| 使用模式 | `Shift+Tab`:`chat` → `analysis` → `academic`;thinking 用 `Ctrl+Shift+T` |
|
|
116
|
-
| 搭建仓库 | `/init` 或 `/init <研究目标>` |
|
|
117
|
-
| 分析方案 / 交接 | `/plan`、`/plan <目标>`;人审后 `/handoff` |
|
|
118
|
-
| AI 过程核对 / 实质验证 | `/crosscheck [焦点]`;`/verify [焦点]`。人审由收尾门禁自动要求(Panel/唤醒选项) |
|
|
119
|
-
| 使用 PsyClaw ARS | `/ars` 开学术模式,或 `/ars <任务>`;`/ars doctor`、`/ars stop` |
|
|
120
|
-
| 管理 Plugin | `/plugin`;终端使用 `psyclaw plugin install|remove|list` |
|
|
121
|
-
| 调用已配置 MCP | `/mcp` 管理;模型通过 `psyclaw_mcp` 调用已启用服务器 |
|
|
122
|
-
|
|
123
|
-
`psyclaw update` 会更新 PsyClaw 整包,并同时安装该版本锁定的内置运行时。在源码仓库中运行时,命令会停止并提示通过 Git 更新,不会覆盖本地修改。
|
|
124
|
-
仅查看更新计划而不执行时,使用 `psyclaw update --check`。旧的 `--yes` 参数仍兼容,但不再需要。
|
|
125
|
-
|
|
126
|
-
### 导出使用路径
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
/export
|
|
130
|
-
```
|
|
55
|
+
| 启动 / 续接会话 | `psyclaw` · `psyclaw -c` |
|
|
56
|
+
| 初始化项目 | `psyclaw init <goal> --paradigm <profile>` 或 `/init` |
|
|
57
|
+
| 登记证据 | `psyclaw evidence add <path> --level user\|fulltext` |
|
|
58
|
+
| 更新 | `psyclaw check-updates` · `psyclaw update` |
|
|
59
|
+
| 科研面板 | 对话中 `/panel` |
|
|
60
|
+
| 模式切换 | `Shift+Tab`(chat / analysis / academic) |
|
|
61
|
+
| 学术 ARS | `/ars` · `/ars <任务>` · `/ars doctor` |
|
|
62
|
+
| Skill / Plugin / MCP | `/skill` · `/plugin` · `/mcp` |
|
|
63
|
+
| 遥测 | `psyclaw telemetry off\|on\|status`(默认开启,可关) |
|
|
64
|
+
|
|
65
|
+
更多对话命令见 `psyclaw --help` 与 [使用白皮书](docs/使用白皮书.md)。
|
|
131
66
|
|
|
132
|
-
|
|
67
|
+
## 文档
|
|
133
68
|
|
|
134
|
-
|
|
69
|
+
**研究者**
|
|
135
70
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
psyclaw --help
|
|
141
|
-
```
|
|
71
|
+
- [使用白皮书](docs/使用白皮书.md)(正文:[v0.30.1](docs/PsyClaw使用白皮书_v0.30.1.md))
|
|
72
|
+
- [PsyClaw ARS 模式](docs/PsyClaw-ARS模式.md)
|
|
73
|
+
- [遥测说明](docs/telemetry.md)
|
|
74
|
+
- [文档与产物目录规范](docs/文档规范.md) · [产物目录规范](docs/产物目录规范.md)
|
|
142
75
|
|
|
143
|
-
|
|
76
|
+
**贡献者**(实现契约,非日常使用说明)
|
|
144
77
|
|
|
145
|
-
|
|
78
|
+
- [开工纪要](docs/开工纪要.md) · [架构蓝图](docs/架构蓝图.md) · [评测框架](docs/评测框架.md)
|
|
79
|
+
- [技能与生态准入清单](docs/技能与生态准入清单.md) · [威胁模型](docs/威胁模型.md)
|
|
80
|
+
- [AGENTS.md](AGENTS.md)
|
|
146
81
|
|
|
147
|
-
|
|
82
|
+
## 边界
|
|
148
83
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
84
|
+
- 复用官方 Pi runtime,不维护 fork。
|
|
85
|
+
- 统计计算委托 Python/R、SPSS/Stata/Mplus 或受信任 MCP;须保存脚本、输入指纹与环境信息。
|
|
86
|
+
- Skill / Plugin / MCP 默认只发现、不执行;启用前核对来源与信任状态。
|
|
87
|
+
- 无证据的事实性 Claim 须标为 `uncertain` 或阻断;无 receipt / 审批的副作用不算完成。
|
|
153
88
|
|
|
154
|
-
|
|
89
|
+
## 从源码开发
|
|
155
90
|
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
npm install -g psyclaw@0.27.5
|
|
91
|
+
```bash
|
|
92
|
+
pnpm install && pnpm build && npm link
|
|
159
93
|
psyclaw --help
|
|
160
94
|
```
|
|
161
95
|
|
|
162
|
-
|
|
96
|
+
源码树中请用 Git 同步,不要跑 `psyclaw update`(会拒绝覆盖本地修改)。
|
|
163
97
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
仅卸载 PsyClaw 程序,保留用户配置和历史会话:
|
|
98
|
+
发布(维护者):
|
|
167
99
|
|
|
168
100
|
```bash
|
|
169
|
-
|
|
101
|
+
RELEASE_MESSAGE="release: describe the change" pnpm release:push
|
|
170
102
|
```
|
|
171
103
|
|
|
172
|
-
|
|
104
|
+
标签推送后由 GitHub Actions(Node 22 + Trusted Publishing)发布 npm。
|
|
173
105
|
|
|
174
|
-
|
|
175
|
-
npm uninstall -g psyclaw
|
|
176
|
-
```
|
|
106
|
+
## 迁移与卸载
|
|
177
107
|
|
|
178
|
-
|
|
179
|
-
# 删除用户配置目录 ~/.psyclaw(不会删除研究项目)
|
|
180
|
-
Remove-Item -Recurse -Force "$HOME\.psyclaw" -ErrorAction SilentlyContinue
|
|
181
|
-
```
|
|
108
|
+
若出现 `ModuleNotFoundError: No module named 'psyclaw.cli'`,说明仍指向旧 Python 入口。用 `Get-Command psyclaw -All` / `which -a psyclaw` 定位后移除旧入口,再安装当前 npm 包:
|
|
182
109
|
|
|
183
110
|
```bash
|
|
184
|
-
|
|
185
|
-
|
|
111
|
+
npm uninstall -g psyclaw
|
|
112
|
+
npm install -g psyclaw@0.30.9
|
|
186
113
|
```
|
|
187
114
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
## 文档
|
|
191
|
-
|
|
192
|
-
### 使用(面向研究者)
|
|
193
|
-
|
|
194
|
-
- [使用白皮书](docs/使用白皮书.md)(当前版同步说明;带版本号的副本见 `docs/PsyClaw使用白皮书_v*.md`)
|
|
195
|
-
- [PsyClaw ARS 模式与保护边界](docs/PsyClaw-ARS模式.md)
|
|
196
|
-
- [遥测(匿名产品遥测,默认开启,可关闭)](docs/telemetry.md)
|
|
197
|
-
- [文档与交付物规范](docs/文档规范.md)(研究项目内目录约定)
|
|
198
|
-
|
|
199
|
-
### 开发(面向贡献者 / 维护者)
|
|
200
|
-
|
|
201
|
-
下列文件是仓库与实现契约,**不是**日常使用说明;贡献或改核心前再读:
|
|
202
|
-
|
|
203
|
-
- [项目范围与里程碑](docs/开工纪要.md)
|
|
204
|
-
- [架构蓝图](docs/架构蓝图.md)
|
|
205
|
-
- [评测框架](docs/评测框架.md)
|
|
206
|
-
- [技能与生态准入清单](docs/技能与生态准入清单.md)
|
|
207
|
-
- [威胁模型](docs/威胁模型.md)
|
|
208
|
-
- [AGENTS.md](AGENTS.md)(贡献行为约束)
|
|
209
|
-
|
|
210
|
-
历史审计、分模块测评报告、会话复盘等仍在 `docs/` 下,按文件名识别;勿与使用白皮书混读。
|
|
211
|
-
|
|
212
|
-
## 边界
|
|
213
|
-
|
|
214
|
-
- PsyClaw 复用官方 Pi 的 session、model、skill、package 和 extension runtime,不维护 fork。
|
|
215
|
-
- 统计计算委托 Python/R、SPSS/Stata/Mplus 或受信任 MCP;输出必须保存脚本、输入指纹和环境信息。
|
|
216
|
-
- Skill、Plugin 和 MCP 默认只发现、不执行;启用前需要来源、版本/ref、哈希、许可证和依赖状态。
|
|
217
|
-
- 没有可定位证据的事实性 Claim 必须是 `uncertain` 或被阻断;没有审批记录的副作用不能被当作完成。
|
|
218
|
-
- 遥测默认开启(匿名产品使用与错误,不含研究正文)。首次启动会说明如何关闭:`psyclaw telemetry off`。详见 [docs/telemetry.md](docs/telemetry.md)。
|
|
219
|
-
|
|
220
|
-
许可证:MIT。
|
|
221
|
-
|
|
115
|
+
仅卸载程序:`npm uninstall -g psyclaw`
|
|
116
|
+
同时清除用户配置与会话:再删除 `~/.psyclaw`(不会删除研究项目目录)。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "psyclaw/recommended-agents/v1",
|
|
3
|
-
"documentVersion": "0.
|
|
4
|
-
"syncedAt": "2026-09-
|
|
3
|
+
"documentVersion": "0.30.6",
|
|
4
|
+
"syncedAt": "2026-09-21",
|
|
5
5
|
"sourceDocument": "bundled literature/review subagents",
|
|
6
6
|
"sourceRef": "bundled",
|
|
7
7
|
"repositoryHint": "对齐 Claude Code:Subagent = md 提示合订本。外仓可后续以 GitHub 源加入 installPrep;当前内置 8 个无需安装。",
|
|
@@ -726,12 +726,20 @@ function modelMcpInstallTask(root, row, plan) {
|
|
|
726
726
|
"成功后确保 .psyclaw/recommendations.json 的 mcp 列表包含该 id(安装时已默认写入启用),说明写入了哪些配置,并提醒用户执行 /reload。若安装命令本身失败,直接诊断并修复;只有遇到必须由用户提供的凭据或外部软件许可证时才向用户说明。",
|
|
727
727
|
].join("\n");
|
|
728
728
|
}
|
|
729
|
+
/** Queue an install/setup prompt for the model without rendering the long text as a user bubble. */
|
|
730
|
+
function queueHiddenInstallTask(pi, ctx, task) {
|
|
731
|
+
if (typeof pi.sendMessage === "function") {
|
|
732
|
+
pi.sendMessage({ customType: "psyclaw-install-task", content: task, display: false }, ctx.isIdle() ? { triggerTurn: true } : { deliverAs: "followUp" });
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
pi.sendUserMessage(task, ctx.isIdle() ? {} : { deliverAs: "followUp" });
|
|
736
|
+
}
|
|
729
737
|
async function queueModelMcpInstall(pi, ctx, row, plan) {
|
|
730
738
|
if (!row.sourceRef)
|
|
731
739
|
throw new Error(`推荐 MCP 没有来源网址: ${row.id}`);
|
|
732
740
|
await setRecommendedMcpEnabled(ctx.cwd, row.id, true);
|
|
733
|
-
pi
|
|
734
|
-
ctx.ui.notify(`已将 ${row.name}
|
|
741
|
+
queueHiddenInstallTask(pi, ctx, modelMcpInstallTask(ctx.cwd, row, plan));
|
|
742
|
+
ctx.ui.notify(`已将 ${row.name} 的安装任务交给当前模型(指令不展示在对话中;默认启用)。完成后请执行 /reload。`, "info");
|
|
735
743
|
}
|
|
736
744
|
async function showMcpManager(pi, ctx, runtime) {
|
|
737
745
|
const catalog = await recommendedItems("mcp");
|
|
@@ -829,8 +837,8 @@ async function queueModelSkillInstall(pi, ctx, row) {
|
|
|
829
837
|
return;
|
|
830
838
|
}
|
|
831
839
|
void trackSkillInstall("queued", { skill_id: row.id, scope, status: "queued" });
|
|
832
|
-
pi
|
|
833
|
-
ctx.ui.notify(`已将 ${row.name}
|
|
840
|
+
queueHiddenInstallTask(pi, ctx, modelSkillInstallTask(ctx.cwd, row, scope));
|
|
841
|
+
ctx.ui.notify(`已将 ${row.name} 的安装任务交给当前模型(指令不展示在对话中;默认启用),目标为${skillScopeLabel(scope)}。完成后请执行 /reload。`, "info");
|
|
834
842
|
});
|
|
835
843
|
}
|
|
836
844
|
function modelBiosignalPackInstallTask(root, plan, skillRows, mcpRows, mcpPlans, skillScope) {
|
|
@@ -943,8 +951,8 @@ async function queueBiosignalPackInstall(pi, ctx, plan, runtime) {
|
|
|
943
951
|
if (!approved)
|
|
944
952
|
return;
|
|
945
953
|
await markBiosignalPackDesired(ctx.cwd, plan, scope);
|
|
946
|
-
pi
|
|
947
|
-
ctx.ui.notify("
|
|
954
|
+
queueHiddenInstallTask(pi, ctx, modelBiosignalPackInstallTask(ctx.cwd, plan, skillRows, selectedMcp, mcpCatalog.installPrep, scope));
|
|
955
|
+
ctx.ui.notify("已将生理信号能力包安装任务交给当前模型(指令不展示在对话中)。完成后请执行 /reload,并 Shift+Tab 切到 analysis 使用。", "info");
|
|
948
956
|
}
|
|
949
957
|
async function showBiosignalPack(pi, ctx, runtime) {
|
|
950
958
|
const catalog = await readBiosignalPackCatalog();
|
|
@@ -1315,6 +1323,7 @@ export default function psyclawExtension(pi) {
|
|
|
1315
1323
|
isProjectTrusted: () => ctx.isProjectTrusted(),
|
|
1316
1324
|
isIdle: () => ctx.isIdle(),
|
|
1317
1325
|
sendUserMessage: (message, options) => pi.sendUserMessage(message, options ?? {}),
|
|
1326
|
+
sendHiddenInstallTask: (task) => queueHiddenInstallTask(pi, ctx, task),
|
|
1318
1327
|
}, { view: "help" });
|
|
1319
1328
|
ctx.ui.notify(formatSessionHelpBrief(url) + (opened ? "" : "\n(未能自动打开浏览器时请手动访问)"), opened ? "info" : "warning");
|
|
1320
1329
|
}
|
|
@@ -1487,6 +1496,12 @@ export default function psyclawExtension(pi) {
|
|
|
1487
1496
|
});
|
|
1488
1497
|
return undefined;
|
|
1489
1498
|
});
|
|
1499
|
+
pi.registerCommand("exit", {
|
|
1500
|
+
description: "完整退出 PsyClaw(等同 /quit)",
|
|
1501
|
+
handler: async (_args, ctx) => {
|
|
1502
|
+
ctx.shutdown();
|
|
1503
|
+
},
|
|
1504
|
+
});
|
|
1490
1505
|
pi.registerCommand("init", {
|
|
1491
1506
|
description: "搭建干净工作仓库(目录 + psyclaw.md),不自动追问",
|
|
1492
1507
|
handler: async (args, ctx) => {
|
|
@@ -1591,6 +1606,7 @@ export default function psyclawExtension(pi) {
|
|
|
1591
1606
|
isProjectTrusted: () => ctx.isProjectTrusted(),
|
|
1592
1607
|
isIdle: () => ctx.isIdle(),
|
|
1593
1608
|
sendUserMessage: (message, options) => pi.sendUserMessage(message, options ?? {}),
|
|
1609
|
+
sendHiddenInstallTask: (task) => queueHiddenInstallTask(pi, ctx, task),
|
|
1594
1610
|
}, { view: "help" });
|
|
1595
1611
|
ctx.ui.notify(formatSessionHelpBrief(url) + (opened ? "" : "\n(未能自动打开浏览器时请手动访问)"), opened ? "info" : "warning");
|
|
1596
1612
|
}
|