pi-yun 0.3.5 → 0.3.6
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +21 -21
- package/.next/build-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +4 -4
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/api/agent/[id]/events/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
- package/.next/server/app/api/agent/[id]/lease/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/debug/route.js +1 -1
- package/.next/server/app/api/agent/debug/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/cache-miss-notices/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js.nft.json +2 -2
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js.nft.json +2 -2
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/file-index/route.js.nft.json +1 -1
- package/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/sign-in/route.js +1 -1
- package/.next/server/app/api/mcp/sign-in/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/test/route.js +1 -1
- package/.next/server/app/api/mcp/test/route.js.nft.json +1 -1
- package/.next/server/app/api/models/default/route.js +1 -1
- package/.next/server/app/api/models/default/route.js.nft.json +2 -2
- package/.next/server/app/api/models/enabled/route.js +1 -1
- package/.next/server/app/api/models/enabled/route.js.nft.json +2 -2
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/open-in-explorer/route.js +1 -1
- package/.next/server/app/api/open-in-explorer/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/check/route.js +1 -1
- package/.next/server/app/api/plugins/check/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
- package/.next/server/app/api/push/config/route.js +1 -1
- package/.next/server/app/api/push/subscribe/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/fork/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/sources/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/sources/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/delete/route.js +1 -1
- package/.next/server/app/api/sessions/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/ui-state/route.js +1 -1
- package/.next/server/app/api/sessions/ui-state/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/content/route.js +1 -1
- package/.next/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/remove/route.js +1 -1
- package/.next/server/app/api/skills/remove/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +3 -3
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/search/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/transfer/route.js +1 -1
- package/.next/server/app/api/skills/transfer/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js.nft.json +1 -1
- package/.next/server/app/api/subagents/[id]/route.js +1 -1
- package/.next/server/app/api/subagents/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/subagents/profiles/route.js +1 -1
- package/.next/server/app/api/subagents/profiles/route.js.nft.json +1 -1
- package/.next/server/app/api/terminal/route.js +1 -1
- package/.next/server/app/api/terminal/route.js.nft.json +1 -1
- package/.next/server/app/api/tools/settings/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +9 -9
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -9
- package/.next/server/app/index.segments/_full.segment.rsc +9 -9
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +5 -5
- package/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/server/app/login.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/page.js +13 -11
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pet-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pet-preview.html +1 -1
- package/.next/server/app/pet-preview.rsc +5 -5
- package/.next/server/app/pet-preview.segments/_full.segment.rsc +5 -5
- package/.next/server/app/pet-preview.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/pet-preview.segments/pet-preview/__PAGE__.segment.rsc +5 -5
- package/.next/server/app-paths-manifest.json +21 -21
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/chunks/2686.js +1 -1
- package/.next/server/chunks/3374.js +2 -2
- package/.next/server/chunks/{8781.js → 3574.js} +1 -1
- package/.next/server/chunks/3667.js +1 -0
- package/.next/server/chunks/3757.js +1 -1
- package/.next/server/chunks/4698.js +1 -1
- package/.next/server/chunks/5247.js +1 -1
- package/.next/server/chunks/5582.js +3 -3
- package/.next/server/chunks/6429.js +1 -1
- package/.next/server/chunks/8045.js +7 -7
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/1278-6de33b493513715c.js +1 -0
- package/.next/static/chunks/app/{layout-ccc0a44dc6b74f31.js → layout-52bcf90db3172462.js} +1 -1
- package/.next/static/chunks/app/page-6049254fb9cab7bb.js +1095 -0
- package/.next/static/chunks/{webpack-676ab8c981eef2b8.js → webpack-67f30ea39607f470.js} +1 -1
- package/.next/static/css/{d2a00bf5e867507e.css → 687611655a4712bf.css} +1 -1
- package/.next/static/css/{a44956c6510acdd4.css → cc1fd2ede57957fd.css} +1 -1
- package/.next/static/css/db65b1c3dab65d0d.css +1 -0
- package/.next/trace +39 -39
- package/.next/trace-build +1 -1
- package/README.md +176 -176
- package/bin/pi-web.js +1 -1
- package/package.json +109 -109
- package/.next/server/chunks/2498.js +0 -1
- package/.next/server/chunks/5000.js +0 -1
- package/.next/static/chunks/1278-d61b1675a7bb1dd4.js +0 -1
- package/.next/static/chunks/app/page-5a7a54d3a467e42e.js +0 -1093
- package/.next/static/css/e0e914ef050f0168.css +0 -1
- /package/.next/static/{toExMKW8P_655FD51UTu0 → 1A9OLf_6QM_uQp9pDUnS2}/_buildManifest.js +0 -0
- /package/.next/static/{toExMKW8P_655FD51UTu0 → 1A9OLf_6QM_uQp9pDUnS2}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":388439479,"timestamp":2564059299,"id":14,"parentId":1,"tags":{},"startTime":1794794206661,"traceId":"ada43f1a9a6fe8b1"},{"name":"run-typescript","duration":31914525,"timestamp":2952511955,"id":1002,"parentId":1,"tags":{},"startTime":1794794595111,"traceId":"ada43f1a9a6fe8b1"},{"name":"static-check","duration":21143446,"timestamp":2984768191,"id":1005,"parentId":1,"tags":{},"startTime":1794794627368,"traceId":"ada43f1a9a6fe8b1"},{"name":"static-generation","duration":6825900,"timestamp":3006127649,"id":1167,"parentId":1,"tags":{},"startTime":1794794648728,"traceId":"ada43f1a9a6fe8b1"},{"name":"collect-build-traces","duration":35329360,"timestamp":3005941871,"id":1164,"parentId":1,"tags":{},"startTime":1794794648542,"traceId":"ada43f1a9a6fe8b1"},{"name":"telemetry-flush","duration":62,"timestamp":3041277179,"id":1176,"parentId":1,"tags":{},"startTime":1794794683877,"traceId":"ada43f1a9a6fe8b1"},{"name":"next-build","duration":480447558,"timestamp":2560829706,"id":1,"tags":{"buildMode":"default","version":"16.4.4","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1794794203432,"traceId":"ada43f1a9a6fe8b1"}]
|
package/README.md
CHANGED
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
# PI-YUN
|
|
2
|
-
|
|
3
|
-
[日本語](./docs/README.ja.md) | [Русский](./docs/README.ru.md)
|
|
4
|
-
|
|
5
|
-
PI-YUN 是基于 [Pi Web](https://github.com/agegr/pi-web) 的 [pi 编程智能体](https://github.com/earendil-works/pi)浏览器工作空间。它沿用 pi 的本地配置和会话文件,在浏览器中组织项目、与智能体协作,并加入工作台导航、桌面陪伴和专注计时等体验。
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
*使用示例数据展示的 PI-YUN 工作空间。*
|
|
10
|
-
|
|
11
|
-
## 功能
|
|
12
|
-
|
|
13
|
-
- **会话与项目**:按项目浏览、继续、搜索、置顶和归档会话;支持从历史消息创建新会话或在当前会话内分支。
|
|
14
|
-
- **工作空间**:在首页、对话、历史、系统提示词、工具定义、智能体和分支视图之间切换;支持侧聊和子智能体。
|
|
15
|
-
- **项目文件与终端**:浏览和上传文件、查看 Git 差异、预览常见文件格式,并在工作空间中使用终端。
|
|
16
|
-
- **Git worktree**:从项目选择器切换或创建 worktree,将同一仓库的会话归在一起。详见 [worktree 指南](./docs/worktrees.zh-CN.md)。
|
|
17
|
-
- **模型与扩展**:在设置中管理模型、默认模型和思考等级,以及登录凭据、MCP、插件和技能。
|
|
18
|
-
- **陪伴与专注**:桌宠提供会话状态提示、生活习惯提醒和专注计时;提醒与计时设置保存在浏览器中,不调用模型。专注计时可在页面后台运行,并可按需启用浏览器通知。
|
|
19
|
-
- **多语言界面**:支持简体中文、繁体中文和英文,首次使用时跟随浏览器语言。
|
|
20
|
-
|
|
21
|
-
## 快速开始
|
|
22
|
-
|
|
23
|
-
需要 Node.js **22.19.0 或更高版本**,可通过 `node --version` 检查。使用 npm 包启动:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx pi-yun@latest
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
服务就绪后会尝试打开浏览器;也可以访问 [http://127.0.0.1:30141](http://127.0.0.1:30141)。默认只监听本机地址。首次使用时,在设置的「模型」中登录模型服务商或配置 API Key。
|
|
30
|
-
|
|
31
|
-
也可以全局安装:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -g pi-yun@latest
|
|
35
|
-
pi-yun
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
常用命令:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
pi-yun --help # 查看启动选项
|
|
42
|
-
pi-yun version # 查看已安装版本
|
|
43
|
-
pi-yun status # 查看运行中的服务
|
|
44
|
-
pi-yun stop [--port N] # 停止服务
|
|
45
|
-
pi-yun open [--port N] # 在浏览器中打开服务
|
|
46
|
-
pi-yun update [--check] # 更新全局 npm 安装,或只检查更新
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
更新前可先运行 `pi-yun stop`,然后运行 `pi-yun update`;卸载使用 `npm uninstall -g pi-yun`。
|
|
50
|
-
|
|
51
|
-
## 配置与访问
|
|
52
|
-
|
|
53
|
-
命令行选项优先于对应的环境变量:
|
|
54
|
-
|
|
55
|
-
| 选项或环境变量 | 用途 | 默认值 |
|
|
56
|
-
| --- | --- | --- |
|
|
57
|
-
| `--port <port>`、`-p <port>` 或 `PORT` | 服务端口 | `30141` |
|
|
58
|
-
| `--hostname <host>`、`-H <host>` 或 `PI_WEB_HOSTNAME` | 监听地址 | `127.0.0.1` |
|
|
59
|
-
| `--no-open` 或 `PI_WEB_NO_OPEN=1` | 禁止自动打开浏览器 | 自动打开 |
|
|
60
|
-
| `PI_WEB_PASSWORD` | 启用浏览器密码登录;API 可使用用户名 `pi` 的 Basic Auth | 未启用 |
|
|
61
|
-
| `PI_WEB_ALLOWED_HOSTS` | 允许的额外代理或自定义主机名,以逗号分隔 | 未设置 |
|
|
62
|
-
| `PI_WEB_APP_NAME` | PWA 的显示名称;修改后需重启服务 | `Pi Web` |
|
|
63
|
-
| `PI_WEB_SKIP_VERSION_CHECK=1` | 关闭更新检查 | 未设置 |
|
|
64
|
-
| `PI_WEB_IDLE_TIMEOUT_MS` | 会话空闲关闭时间,`0` 为禁用 | `600000` 毫秒 |
|
|
65
|
-
| `PI_WEB_SHUTDOWN_DEADLINE_MS` | 扩展处理会话关闭事件的最长等待时间 | `5000` 毫秒 |
|
|
66
|
-
| `PI_CODEMODE_MAX_WORKERS` | 服务中 Code mode 脚本的并发上限 | `8` |
|
|
67
|
-
|
|
68
|
-
例如,自定义端口并关闭自动打开浏览器:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
pi-yun --port 8080 --no-open
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 局域网与远程访问
|
|
75
|
-
|
|
76
|
-
监听非本机地址会让网络上的访问者接触到能够执行操作的智能体。在可信局域网内使用时,请设置强密码。PowerShell 示例:
|
|
77
|
-
|
|
78
|
-
```powershell
|
|
79
|
-
$env:PI_WEB_PASSWORD = '替换为足够长的随机密码'
|
|
80
|
-
pi-yun --hostname 0.0.0.0
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
密码本身不会加密 HTTP 流量;远程访问请使用可信 VPN 或配置 HTTPS 的反向代理。代理使用额外主机名时,可将准确的主机名加入 `PI_WEB_ALLOWED_HOSTS`。
|
|
84
|
-
|
|
85
|
-
服务端模型和 API 请求支持 `HTTP_PROXY`、`HTTPS_PROXY` 和 `NO_PROXY` 环境变量。
|
|
86
|
-
|
|
87
|
-
## 数据与使用说明
|
|
88
|
-
|
|
89
|
-
- PI-YUN 默认读取 `~/.pi/agent` 中的 pi 配置和会话;可通过 `PI_CODING_AGENT_DIR` 指定其他目录。与 pi 共享会话时,请确保进程能访问相同的工作目录和数据目录。
|
|
90
|
-
- 模型设置与 pi 共用配置和凭据;已打开会话中的模型配置修改后,需要重新选择该模型才能应用。
|
|
91
|
-
- 文件浏览器的访问范围受已选择或已知的项目和会话目录限制。
|
|
92
|
-
- 生活提醒按前台活跃使用时间计时,页面不活跃时会暂停。专注计时使用实际时间;浏览器可能限制后台页面,关闭所有页面后不会安排系统通知。
|
|
93
|
-
- 使用 Docker 时,可按照本仓库的 [Docker 指南](./docs/docker.md)从源码构建镜像。
|
|
94
|
-
|
|
95
|
-
## 集成接口
|
|
96
|
-
|
|
97
|
-
以下接口供下游集成使用。
|
|
98
|
-
|
|
99
|
-
### Downstream Session Context Menu
|
|
100
|
-
|
|
101
|
-
Electron wrappers and other downstream integrations can provide a session-row
|
|
102
|
-
context menu without patching `SessionSidebar`. Listen for the cancelable
|
|
103
|
-
`pi-web:session-row-contextmenu` browser event and call `preventDefault()`
|
|
104
|
-
synchronously when the integration will handle it:
|
|
105
|
-
|
|
106
|
-
```js
|
|
107
|
-
window.addEventListener("pi-web:session-row-contextmenu", (event) => {
|
|
108
|
-
event.preventDefault();
|
|
109
|
-
const { id, path, cwd, name, clientX, clientY, refresh } = event.detail;
|
|
110
|
-
|
|
111
|
-
void openSessionMenu({ id, path, cwd, name, clientX, clientY }).then((changed) => {
|
|
112
|
-
if (changed) refresh();
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
The detail object contains `id`, `path`, `cwd`, optional `name`, pointer
|
|
118
|
-
coordinates, and a `refresh()` callback for actions that change the session
|
|
119
|
-
list. If no listener cancels the extension event, Pi Web opens its built-in
|
|
120
|
-
session menu (pin, rename, fork, mark read or unread, archive, open in new
|
|
121
|
-
tab, delete) at the pointer instead of the browser's native context menu.
|
|
122
|
-
The row's `⋯` button always opens the built-in menu and does not dispatch the
|
|
123
|
-
event. Sessions not yet saved to disk get no built-in menu, so the native one
|
|
124
|
-
still appears for them. This hook is browser-side and independent of Pi agent
|
|
125
|
-
extensions.
|
|
126
|
-
|
|
127
|
-
### Extension Session Liveness
|
|
128
|
-
|
|
129
|
-
Server-side Pi extensions with detached work can prevent automatic idle
|
|
130
|
-
session eviction through the versioned global registry:
|
|
131
|
-
|
|
132
|
-
```js
|
|
133
|
-
const liveness = globalThis[Symbol.for("@agegr/pi-web/session-liveness/v1")];
|
|
134
|
-
const release = liveness?.version === 1
|
|
135
|
-
? liveness.register({
|
|
136
|
-
name: "my-extension",
|
|
137
|
-
sessionId,
|
|
138
|
-
sessionFile: sessionFile || undefined,
|
|
139
|
-
isActive: () => detachedJobs.size > 0,
|
|
140
|
-
})
|
|
141
|
-
: () => {};
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Register once per active extension session and call the returned idempotent
|
|
145
|
-
`release` function on session shutdown, replacement, or reload. `isActive`
|
|
146
|
-
must be synchronous, cheap, and scoped to the supplied exact session id or
|
|
147
|
-
file. Provider errors fail safe by preserving that session. This lease only
|
|
148
|
-
affects automatic idle eviction; explicit shutdown and Stop fallback cleanup
|
|
149
|
-
still take precedence.
|
|
150
|
-
|
|
151
|
-
## 本地开发
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
npm install
|
|
155
|
-
npm run dev
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
开发服务地址为 [http://127.0.0.1:30141](http://127.0.0.1:30141)。常用检查:
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
npm test
|
|
162
|
-
npx tsc --noEmit
|
|
163
|
-
npm run lint
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
开发期间不要运行 `next build` 或 `npm run build`:它们会修改 `.next/`,影响开发服务。发布构建请使用独立的干净工作目录。项目结构和开发约定见 [AGENTS.md](./AGENTS.md),贡献范围见 [CONTRIBUTING.md](./CONTRIBUTING.md)。
|
|
167
|
-
|
|
168
|
-
## 发布说明
|
|
169
|
-
|
|
170
|
-
本项目的 npm 包名为 `pi-yun`,版本在 `package.json` 和 `package-lock.json` 中维护。当前仓库保留了上游发布工作流,但该工作流仅在 `agegr/pi-web` 仓库执行;推送 PI-YUN 的标签不会通过它自动发布 npm 包或 Docker 镜像。仓库中的 `npm run release` 会安装依赖、递增补丁版本、构建并发布 npm 包,应在独立的干净发布目录中使用。具体步骤见[发布指南](./docs/release.md)。
|
|
171
|
-
|
|
172
|
-
## 致谢与许可证
|
|
173
|
-
|
|
174
|
-
PI-YUN 基于 [agegr/pi-web](https://github.com/agegr/pi-web) 开发,并使用 [pi](https://github.com/earendil-works/pi) 生态。感谢上游项目及所有贡献者。
|
|
175
|
-
|
|
176
|
-
[MIT License](./LICENSE)
|
|
1
|
+
# PI-YUN
|
|
2
|
+
|
|
3
|
+
[日本語](./docs/README.ja.md) | [Русский](./docs/README.ru.md)
|
|
4
|
+
|
|
5
|
+
PI-YUN 是基于 [Pi Web](https://github.com/agegr/pi-web) 的 [pi 编程智能体](https://github.com/earendil-works/pi)浏览器工作空间。它沿用 pi 的本地配置和会话文件,在浏览器中组织项目、与智能体协作,并加入工作台导航、桌面陪伴和专注计时等体验。
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
*使用示例数据展示的 PI-YUN 工作空间。*
|
|
10
|
+
|
|
11
|
+
## 功能
|
|
12
|
+
|
|
13
|
+
- **会话与项目**:按项目浏览、继续、搜索、置顶和归档会话;支持从历史消息创建新会话或在当前会话内分支。
|
|
14
|
+
- **工作空间**:在首页、对话、历史、系统提示词、工具定义、智能体和分支视图之间切换;支持侧聊和子智能体。
|
|
15
|
+
- **项目文件与终端**:浏览和上传文件、查看 Git 差异、预览常见文件格式,并在工作空间中使用终端。
|
|
16
|
+
- **Git worktree**:从项目选择器切换或创建 worktree,将同一仓库的会话归在一起。详见 [worktree 指南](./docs/worktrees.zh-CN.md)。
|
|
17
|
+
- **模型与扩展**:在设置中管理模型、默认模型和思考等级,以及登录凭据、MCP、插件和技能。
|
|
18
|
+
- **陪伴与专注**:桌宠提供会话状态提示、生活习惯提醒和专注计时;提醒与计时设置保存在浏览器中,不调用模型。专注计时可在页面后台运行,并可按需启用浏览器通知。
|
|
19
|
+
- **多语言界面**:支持简体中文、繁体中文和英文,首次使用时跟随浏览器语言。
|
|
20
|
+
|
|
21
|
+
## 快速开始
|
|
22
|
+
|
|
23
|
+
需要 Node.js **22.19.0 或更高版本**,可通过 `node --version` 检查。使用 npm 包启动:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx pi-yun@latest
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
服务就绪后会尝试打开浏览器;也可以访问 [http://127.0.0.1:30141](http://127.0.0.1:30141)。默认只监听本机地址。首次使用时,在设置的「模型」中登录模型服务商或配置 API Key。
|
|
30
|
+
|
|
31
|
+
也可以全局安装:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g pi-yun@latest
|
|
35
|
+
pi-yun
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
常用命令:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pi-yun --help # 查看启动选项
|
|
42
|
+
pi-yun version # 查看已安装版本
|
|
43
|
+
pi-yun status # 查看运行中的服务
|
|
44
|
+
pi-yun stop [--port N] # 停止服务
|
|
45
|
+
pi-yun open [--port N] # 在浏览器中打开服务
|
|
46
|
+
pi-yun update [--check] # 更新全局 npm 安装,或只检查更新
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
更新前可先运行 `pi-yun stop`,然后运行 `pi-yun update`;卸载使用 `npm uninstall -g pi-yun`。
|
|
50
|
+
|
|
51
|
+
## 配置与访问
|
|
52
|
+
|
|
53
|
+
命令行选项优先于对应的环境变量:
|
|
54
|
+
|
|
55
|
+
| 选项或环境变量 | 用途 | 默认值 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `--port <port>`、`-p <port>` 或 `PORT` | 服务端口 | `30141` |
|
|
58
|
+
| `--hostname <host>`、`-H <host>` 或 `PI_WEB_HOSTNAME` | 监听地址 | `127.0.0.1` |
|
|
59
|
+
| `--no-open` 或 `PI_WEB_NO_OPEN=1` | 禁止自动打开浏览器 | 自动打开 |
|
|
60
|
+
| `PI_WEB_PASSWORD` | 启用浏览器密码登录;API 可使用用户名 `pi` 的 Basic Auth | 未启用 |
|
|
61
|
+
| `PI_WEB_ALLOWED_HOSTS` | 允许的额外代理或自定义主机名,以逗号分隔 | 未设置 |
|
|
62
|
+
| `PI_WEB_APP_NAME` | PWA 的显示名称;修改后需重启服务 | `Pi Web` |
|
|
63
|
+
| `PI_WEB_SKIP_VERSION_CHECK=1` | 关闭更新检查 | 未设置 |
|
|
64
|
+
| `PI_WEB_IDLE_TIMEOUT_MS` | 会话空闲关闭时间,`0` 为禁用 | `600000` 毫秒 |
|
|
65
|
+
| `PI_WEB_SHUTDOWN_DEADLINE_MS` | 扩展处理会话关闭事件的最长等待时间 | `5000` 毫秒 |
|
|
66
|
+
| `PI_CODEMODE_MAX_WORKERS` | 服务中 Code mode 脚本的并发上限 | `8` |
|
|
67
|
+
|
|
68
|
+
例如,自定义端口并关闭自动打开浏览器:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pi-yun --port 8080 --no-open
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 局域网与远程访问
|
|
75
|
+
|
|
76
|
+
监听非本机地址会让网络上的访问者接触到能够执行操作的智能体。在可信局域网内使用时,请设置强密码。PowerShell 示例:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
$env:PI_WEB_PASSWORD = '替换为足够长的随机密码'
|
|
80
|
+
pi-yun --hostname 0.0.0.0
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
密码本身不会加密 HTTP 流量;远程访问请使用可信 VPN 或配置 HTTPS 的反向代理。代理使用额外主机名时,可将准确的主机名加入 `PI_WEB_ALLOWED_HOSTS`。
|
|
84
|
+
|
|
85
|
+
服务端模型和 API 请求支持 `HTTP_PROXY`、`HTTPS_PROXY` 和 `NO_PROXY` 环境变量。
|
|
86
|
+
|
|
87
|
+
## 数据与使用说明
|
|
88
|
+
|
|
89
|
+
- PI-YUN 默认读取 `~/.pi/agent` 中的 pi 配置和会话;可通过 `PI_CODING_AGENT_DIR` 指定其他目录。与 pi 共享会话时,请确保进程能访问相同的工作目录和数据目录。
|
|
90
|
+
- 模型设置与 pi 共用配置和凭据;已打开会话中的模型配置修改后,需要重新选择该模型才能应用。
|
|
91
|
+
- 文件浏览器的访问范围受已选择或已知的项目和会话目录限制。
|
|
92
|
+
- 生活提醒按前台活跃使用时间计时,页面不活跃时会暂停。专注计时使用实际时间;浏览器可能限制后台页面,关闭所有页面后不会安排系统通知。
|
|
93
|
+
- 使用 Docker 时,可按照本仓库的 [Docker 指南](./docs/docker.md)从源码构建镜像。
|
|
94
|
+
|
|
95
|
+
## 集成接口
|
|
96
|
+
|
|
97
|
+
以下接口供下游集成使用。
|
|
98
|
+
|
|
99
|
+
### Downstream Session Context Menu
|
|
100
|
+
|
|
101
|
+
Electron wrappers and other downstream integrations can provide a session-row
|
|
102
|
+
context menu without patching `SessionSidebar`. Listen for the cancelable
|
|
103
|
+
`pi-web:session-row-contextmenu` browser event and call `preventDefault()`
|
|
104
|
+
synchronously when the integration will handle it:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
window.addEventListener("pi-web:session-row-contextmenu", (event) => {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
const { id, path, cwd, name, clientX, clientY, refresh } = event.detail;
|
|
110
|
+
|
|
111
|
+
void openSessionMenu({ id, path, cwd, name, clientX, clientY }).then((changed) => {
|
|
112
|
+
if (changed) refresh();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The detail object contains `id`, `path`, `cwd`, optional `name`, pointer
|
|
118
|
+
coordinates, and a `refresh()` callback for actions that change the session
|
|
119
|
+
list. If no listener cancels the extension event, Pi Web opens its built-in
|
|
120
|
+
session menu (pin, rename, fork, mark read or unread, archive, open in new
|
|
121
|
+
tab, delete) at the pointer instead of the browser's native context menu.
|
|
122
|
+
The row's `⋯` button always opens the built-in menu and does not dispatch the
|
|
123
|
+
event. Sessions not yet saved to disk get no built-in menu, so the native one
|
|
124
|
+
still appears for them. This hook is browser-side and independent of Pi agent
|
|
125
|
+
extensions.
|
|
126
|
+
|
|
127
|
+
### Extension Session Liveness
|
|
128
|
+
|
|
129
|
+
Server-side Pi extensions with detached work can prevent automatic idle
|
|
130
|
+
session eviction through the versioned global registry:
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
const liveness = globalThis[Symbol.for("@agegr/pi-web/session-liveness/v1")];
|
|
134
|
+
const release = liveness?.version === 1
|
|
135
|
+
? liveness.register({
|
|
136
|
+
name: "my-extension",
|
|
137
|
+
sessionId,
|
|
138
|
+
sessionFile: sessionFile || undefined,
|
|
139
|
+
isActive: () => detachedJobs.size > 0,
|
|
140
|
+
})
|
|
141
|
+
: () => {};
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Register once per active extension session and call the returned idempotent
|
|
145
|
+
`release` function on session shutdown, replacement, or reload. `isActive`
|
|
146
|
+
must be synchronous, cheap, and scoped to the supplied exact session id or
|
|
147
|
+
file. Provider errors fail safe by preserving that session. This lease only
|
|
148
|
+
affects automatic idle eviction; explicit shutdown and Stop fallback cleanup
|
|
149
|
+
still take precedence.
|
|
150
|
+
|
|
151
|
+
## 本地开发
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npm install
|
|
155
|
+
npm run dev
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
开发服务地址为 [http://127.0.0.1:30141](http://127.0.0.1:30141)。常用检查:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
npm test
|
|
162
|
+
npx tsc --noEmit
|
|
163
|
+
npm run lint
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
开发期间不要运行 `next build` 或 `npm run build`:它们会修改 `.next/`,影响开发服务。发布构建请使用独立的干净工作目录。项目结构和开发约定见 [AGENTS.md](./AGENTS.md),贡献范围见 [CONTRIBUTING.md](./CONTRIBUTING.md)。
|
|
167
|
+
|
|
168
|
+
## 发布说明
|
|
169
|
+
|
|
170
|
+
本项目的 npm 包名为 `pi-yun`,版本在 `package.json` 和 `package-lock.json` 中维护。当前仓库保留了上游发布工作流,但该工作流仅在 `agegr/pi-web` 仓库执行;推送 PI-YUN 的标签不会通过它自动发布 npm 包或 Docker 镜像。仓库中的 `npm run release` 会安装依赖、递增补丁版本、构建并发布 npm 包,应在独立的干净发布目录中使用。具体步骤见[发布指南](./docs/release.md)。
|
|
171
|
+
|
|
172
|
+
## 致谢与许可证
|
|
173
|
+
|
|
174
|
+
PI-YUN 基于 [agegr/pi-web](https://github.com/agegr/pi-web) 开发,并使用 [pi](https://github.com/earendil-works/pi) 生态。感谢上游项目及所有贡献者。
|
|
175
|
+
|
|
176
|
+
[MIT License](./LICENSE)
|
package/bin/pi-web.js
CHANGED
|
@@ -154,7 +154,7 @@ function startServer({ port, hostname, openBrowser }) {
|
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
let serverReady = false;
|
|
157
|
-
const url =
|
|
157
|
+
const url = getOpenUrl(hostname, port);
|
|
158
158
|
// Next.js repeats the `-H` value in its own "Network:" line, which a wildcard
|
|
159
159
|
// bind makes unusable; name the interfaces and their addresses instead.
|
|
160
160
|
const reachable = formatReachableAddresses(hostname, port);
|
package/package.json
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-yun",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Web UI for the pi coding agent (fork of @agegr/pi-web)",
|
|
5
|
-
"homepage": "https://github.com/Jason-24/pi-web-yun#readme",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/Jason-24/pi-web-yun.git"
|
|
9
|
-
},
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/Jason-24/pi-web-yun/issues"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"engines": {
|
|
15
|
-
"node": ">=22.19.0"
|
|
16
|
-
},
|
|
17
|
-
"browserslist": [
|
|
18
|
-
"chrome 111",
|
|
19
|
-
"edge 111",
|
|
20
|
-
"firefox 111",
|
|
21
|
-
"safari 16.2",
|
|
22
|
-
"ios_saf 16.2"
|
|
23
|
-
],
|
|
24
|
-
"bin": {
|
|
25
|
-
"pi-yun": "bin/pi-web.js"
|
|
26
|
-
},
|
|
27
|
-
"files": [
|
|
28
|
-
"bin",
|
|
29
|
-
".next",
|
|
30
|
-
"!.next/cache",
|
|
31
|
-
"!.next/dev",
|
|
32
|
-
"!.next/**/*.js.map",
|
|
33
|
-
"public",
|
|
34
|
-
"next.config.ts",
|
|
35
|
-
"package.json"
|
|
36
|
-
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"dev": "next dev -H 127.0.0.1 -p 30141",
|
|
39
|
-
"dev:lan": "next dev -H 0.0.0.0 -p 30141",
|
|
40
|
-
"prebuild": "node bin/verify-next-build.js --dependencies-only",
|
|
41
|
-
"build": "next build --webpack",
|
|
42
|
-
"prepack": "node bin/verify-next-build.js",
|
|
43
|
-
"start": "next start -H 127.0.0.1 -p 30141",
|
|
44
|
-
"start:lan": "next start -H 0.0.0.0 -p 30141",
|
|
45
|
-
"lint": "eslint .",
|
|
46
|
-
"test:terminal": "node e2e/terminal.mjs",
|
|
47
|
-
"test:e2e": "node e2e/run.mjs",
|
|
48
|
-
"test": "node bin/test.mjs",
|
|
49
|
-
"release": "npm ci && npm version patch --no-git-tag-version && npm run build && npm publish",
|
|
50
|
-
"check": "npm run lint && tsc --noEmit && npm test",
|
|
51
|
-
"setup:hooks": "git config core.hooksPath .githooks"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"@earendil-works/pi-agent-core": "1.5.2",
|
|
55
|
-
"@earendil-works/pi-ai": "1.5.2",
|
|
56
|
-
"@earendil-works/pi-codemode": "1.5.2",
|
|
57
|
-
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
58
|
-
"@earendil-works/pi-mcp": "1.5.2",
|
|
59
|
-
"@earendil-works/pi-schema": "1.5.2",
|
|
60
|
-
"@earendil-works/pi-telemetry": "1.5.2",
|
|
61
|
-
"@earendil-works/pi-tui": "1.5.2",
|
|
62
|
-
"@xterm/addon-fit": "0.11.0",
|
|
63
|
-
"@xterm/xterm": "6.0.0",
|
|
64
|
-
"js-yaml": "^5.2.3",
|
|
65
|
-
"next": "16.4.4",
|
|
66
|
-
"node-pty": "1.2.0-beta.15",
|
|
67
|
-
"proper-lockfile": "4.1.2",
|
|
68
|
-
"react": "^19.2.4",
|
|
69
|
-
"react-dom": "^19.2.4",
|
|
70
|
-
"semver": "7.8.5",
|
|
71
|
-
"three": "0.186.1",
|
|
72
|
-
"typebox": "1.3.27",
|
|
73
|
-
"undici": "8.12.3",
|
|
74
|
-
"web-push": "^3.6.7"
|
|
75
|
-
},
|
|
76
|
-
"devDependencies": {
|
|
77
|
-
"@tailwindcss/postcss": "^4.2.2",
|
|
78
|
-
"@types/js-yaml": "^4.0.9",
|
|
79
|
-
"@types/mdast": "^4.0.4",
|
|
80
|
-
"@types/node": "^25",
|
|
81
|
-
"@types/proper-lockfile": "4.1.4",
|
|
82
|
-
"@types/react": "^19",
|
|
83
|
-
"@types/react-dom": "^19",
|
|
84
|
-
"@types/react-syntax-highlighter": "^15.5.13",
|
|
85
|
-
"@types/semver": "7.8.0",
|
|
86
|
-
"@types/three": "0.186.0",
|
|
87
|
-
"@types/web-push": "^3.6.4",
|
|
88
|
-
"ansi_up": "^6.0.6",
|
|
89
|
-
"eslint": "^9",
|
|
90
|
-
"eslint-config-next": "16.4.4",
|
|
91
|
-
"jiti": "^2.7.0",
|
|
92
|
-
"katex": "^0.16.47",
|
|
93
|
-
"mammoth": "^1.12.0",
|
|
94
|
-
"mermaid": "^11.16.1",
|
|
95
|
-
"playwright": "^1.62.1",
|
|
96
|
-
"postcss": "^8.5.26",
|
|
97
|
-
"react-markdown": "^10.1.0",
|
|
98
|
-
"react-syntax-highlighter": "^16.1.1",
|
|
99
|
-
"rehype-katex": "^7.0.1",
|
|
100
|
-
"rehype-raw": "^7.0.0",
|
|
101
|
-
"rehype-sanitize": "^6.0.0",
|
|
102
|
-
"remark-cjk-friendly": "^2.3.2",
|
|
103
|
-
"remark-frontmatter": "^5.0.0",
|
|
104
|
-
"remark-gfm": "^4.0.1",
|
|
105
|
-
"remark-math": "^6.0.0",
|
|
106
|
-
"tailwindcss": "^4.2.2",
|
|
107
|
-
"typescript": "^5"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-yun",
|
|
3
|
+
"version": "0.3.6",
|
|
4
|
+
"description": "Web UI for the pi coding agent (fork of @agegr/pi-web)",
|
|
5
|
+
"homepage": "https://github.com/Jason-24/pi-web-yun#readme",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Jason-24/pi-web-yun.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/Jason-24/pi-web-yun/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22.19.0"
|
|
16
|
+
},
|
|
17
|
+
"browserslist": [
|
|
18
|
+
"chrome 111",
|
|
19
|
+
"edge 111",
|
|
20
|
+
"firefox 111",
|
|
21
|
+
"safari 16.2",
|
|
22
|
+
"ios_saf 16.2"
|
|
23
|
+
],
|
|
24
|
+
"bin": {
|
|
25
|
+
"pi-yun": "bin/pi-web.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"bin",
|
|
29
|
+
".next",
|
|
30
|
+
"!.next/cache",
|
|
31
|
+
"!.next/dev",
|
|
32
|
+
"!.next/**/*.js.map",
|
|
33
|
+
"public",
|
|
34
|
+
"next.config.ts",
|
|
35
|
+
"package.json"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "next dev -H 127.0.0.1 -p 30141",
|
|
39
|
+
"dev:lan": "next dev -H 0.0.0.0 -p 30141",
|
|
40
|
+
"prebuild": "node bin/verify-next-build.js --dependencies-only",
|
|
41
|
+
"build": "next build --webpack",
|
|
42
|
+
"prepack": "node bin/verify-next-build.js",
|
|
43
|
+
"start": "next start -H 127.0.0.1 -p 30141",
|
|
44
|
+
"start:lan": "next start -H 0.0.0.0 -p 30141",
|
|
45
|
+
"lint": "eslint .",
|
|
46
|
+
"test:terminal": "node e2e/terminal.mjs",
|
|
47
|
+
"test:e2e": "node e2e/run.mjs",
|
|
48
|
+
"test": "node bin/test.mjs",
|
|
49
|
+
"release": "npm ci && npm version patch --no-git-tag-version && npm run build && npm publish",
|
|
50
|
+
"check": "npm run lint && tsc --noEmit && npm test",
|
|
51
|
+
"setup:hooks": "git config core.hooksPath .githooks"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@earendil-works/pi-agent-core": "1.5.2",
|
|
55
|
+
"@earendil-works/pi-ai": "1.5.2",
|
|
56
|
+
"@earendil-works/pi-codemode": "1.5.2",
|
|
57
|
+
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
58
|
+
"@earendil-works/pi-mcp": "1.5.2",
|
|
59
|
+
"@earendil-works/pi-schema": "1.5.2",
|
|
60
|
+
"@earendil-works/pi-telemetry": "1.5.2",
|
|
61
|
+
"@earendil-works/pi-tui": "1.5.2",
|
|
62
|
+
"@xterm/addon-fit": "0.11.0",
|
|
63
|
+
"@xterm/xterm": "6.0.0",
|
|
64
|
+
"js-yaml": "^5.2.3",
|
|
65
|
+
"next": "16.4.4",
|
|
66
|
+
"node-pty": "1.2.0-beta.15",
|
|
67
|
+
"proper-lockfile": "4.1.2",
|
|
68
|
+
"react": "^19.2.4",
|
|
69
|
+
"react-dom": "^19.2.4",
|
|
70
|
+
"semver": "7.8.5",
|
|
71
|
+
"three": "0.186.1",
|
|
72
|
+
"typebox": "1.3.27",
|
|
73
|
+
"undici": "8.12.3",
|
|
74
|
+
"web-push": "^3.6.7"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
78
|
+
"@types/js-yaml": "^4.0.9",
|
|
79
|
+
"@types/mdast": "^4.0.4",
|
|
80
|
+
"@types/node": "^25",
|
|
81
|
+
"@types/proper-lockfile": "4.1.4",
|
|
82
|
+
"@types/react": "^19",
|
|
83
|
+
"@types/react-dom": "^19",
|
|
84
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
85
|
+
"@types/semver": "7.8.0",
|
|
86
|
+
"@types/three": "0.186.0",
|
|
87
|
+
"@types/web-push": "^3.6.4",
|
|
88
|
+
"ansi_up": "^6.0.6",
|
|
89
|
+
"eslint": "^9",
|
|
90
|
+
"eslint-config-next": "16.4.4",
|
|
91
|
+
"jiti": "^2.7.0",
|
|
92
|
+
"katex": "^0.16.47",
|
|
93
|
+
"mammoth": "^1.12.0",
|
|
94
|
+
"mermaid": "^11.16.1",
|
|
95
|
+
"playwright": "^1.62.1",
|
|
96
|
+
"postcss": "^8.5.26",
|
|
97
|
+
"react-markdown": "^10.1.0",
|
|
98
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
99
|
+
"rehype-katex": "^7.0.1",
|
|
100
|
+
"rehype-raw": "^7.0.0",
|
|
101
|
+
"rehype-sanitize": "^6.0.0",
|
|
102
|
+
"remark-cjk-friendly": "^2.3.2",
|
|
103
|
+
"remark-frontmatter": "^5.0.0",
|
|
104
|
+
"remark-gfm": "^4.0.1",
|
|
105
|
+
"remark-math": "^6.0.0",
|
|
106
|
+
"tailwindcss": "^4.2.2",
|
|
107
|
+
"typescript": "^5"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=2498,exports.ids=[2498],exports.modules={72498:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$C:()=>y,Fk:()=>r,Y1:()=>o,er:()=>q,mT:()=>u,n:()=>p,nU:()=>A});var e=c(73024),f=c(48161),g=c(76760),h=c(75430),i=c(63108),j=c(82536),k=c(58864),l=a([h]);function m(a){let b=(0,g.resolve)(a);try{return(0,e.realpathSync)(b)}catch{return b}}function n(a,b){return b?{decision:b.decision,decisionPath:b.path,inherited:!(0,k.Eb)(b.path,m(a))}:{decision:null,inherited:!1}}function o(a,b){let c=!!a&&(0,h.hasTrustRequiringProjectResources)(a),d=new h.ProjectTrustStore(b);if(!c){if(!a)return{requiresTrust:!1,trusted:!0,decision:null,inherited:!1};try{let b=d.getEntry(a);return{requiresTrust:!1,trusted:b?.decision??!0,...n(a,b)}}catch(a){return{requiresTrust:!1,trusted:!0,decision:null,inherited:!1,decisionError:a instanceof Error?a.message:String(a)}}}let e=d.getEntry(a);return{requiresTrust:!0,trusted:e?.decision===!0,...n(a,e)}}h=(l.then?(await l)():l)[0];let B=Symbol.for("pi-web:project-trust-read-warnings");function p(a,b){try{if(!a||!(0,h.hasTrustRequiringProjectResources)(a))return!1;return!0===new h.ProjectTrustStore(b).get(a)}catch(h){let a=(0,g.join)(b,"trust.json"),c=h instanceof Error?h.message:String(h),d=globalThis,e=d[B]??=new Set,f=`${a}\0${c}`;return e.has(f)||(e.size>=200&&e.delete(e.values().next().value),e.add(f),console.warn(`[pi-web] cannot read project trust from ${a}; projects that need it count as untrusted meanwhile: ${c}`)),!1}}function q(a,b){let c=o(a,b);return c.requiresTrust?(new h.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0,decision:!0,decisionPath:m(a),inherited:!1}):c}function r(a,b){if(!a||!(0,h.hasTrustRequiringProjectResources)(a))return;let c=new h.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}let C=["settings.json","mcp.json","extensions","skills","prompts","themes","SYSTEM.md","APPEND_SYSTEM.md"];function s(a){let b=(0,g.resolve)(a);try{return(0,e.realpathSync)(b)}catch{return b}}function t(a){try{return(0,e.lstatSync)(a),!0}catch{return!1}}function u(a,b=process.env.HOME||(0,f.homedir)()){let c=s(a);if(v(c))return!0;let d=(0,g.join)(s(b),".agents","skills");for(let a=c;;a=(0,g.dirname)(a)){let b=(0,g.join)(a,".agents","skills");if(!(0,k.Eb)(b,d)&&t(b))return!0;if((0,g.dirname)(a)===a)return!1}}function v(a){let b=(0,g.join)(a,".pi");try{if((0,e.lstatSync)(b).isSymbolicLink()&&s(b)===b)return!0}catch{}return C.some(a=>t((0,g.join)(b,a)))}let D=new Set(["node_modules",".git",".pi",".agents"]);function w(a,b){let c,d=s(a),f=a=>{try{return c??=new h.ProjectTrustStore(b),null!==c.getEntry(a)}catch{return!1}},i=0,j=[d];for(let a=0;a<=4&&j.length>0;a+=1){let b=[];for(let c of j){let h;if(i>=2e3)return{kind:"too-many-folders",path:d};i+=1;let j=[];try{let b=(0,e.readdirSync)(c,{withFileTypes:!0});h=new Set(b.map(a=>a.name)),a<4&&(j=b.filter(a=>a.isDirectory()&&!D.has(a.name)).map(a=>(0,g.join)(c,a.name)))}catch{continue}if(a>0&&(h.has(".pi")&&v(c)||h.has(".agents")&&t((0,g.join)(c,".agents","skills")))&&!f(c))return{kind:"contains-project",path:c};b.push(...j)}j=b}}function x(a,b){return(0,j.o4)(a,new Set([b]))}function y(a,b){let c=s(a);if((0,g.dirname)(c)===c)return{kind:"root",path:c};let d=s(b.home??(process.env.HOME||(0,f.homedir)()));if((0,k.Eb)(c,d))return{kind:"home",path:c};if(x(d,c))return{kind:"contains-home",path:d};let e=s(b.agentDir);if(x(e,c))return{kind:"contains-agent-dir",path:e};for(let a of b.knownFolders){let b=s(a);if(!(0,k.Eb)(b,c)&&x(b,c))return{kind:"contains-folder",path:b}}return w(c,b.agentDir)}let E=Symbol.for("pi-web:fresh-folder-trust-locks");function z(a){return a instanceof Error?a.message:String(a)}async function A(a,b,c,d){var e;let f=y(a,{agentDir:b,knownFolders:d.knownFolders,home:d.home});if(f)return{ok:!1,reason:"trust-too-broad",breadth:f,error:`Trusting ${a} would also trust ${f.path}`};let g=m(a);return e=async()=>{let e,f,i=new h.ProjectTrustStore(b),j=c=>{let d;try{d=o(a,b)}catch{}return{ok:!1,reason:"folder-not-fresh",...d?{status:d}:{},error:c}};if((0,h.hasTrustRequiringProjectResources)(a)||u(a,d.home))return j(`${a} now has project resources that need trust`);try{e=i.getEntry(a)}catch(a){return{ok:!1,reason:"trust-unreadable",error:z(a)}}if(e)return j(`${e.path} has a trust decision now`);let k=w(a,b);if(k)return{ok:!1,reason:"trust-too-broad",breadth:k,error:`Trusting ${a} would also trust ${k.path}`};try{i.set(a,!0)}catch(a){return{ok:!1,reason:"trust-unreadable",error:z(a)}}let l={requiresTrust:!0,trusted:!0,decision:!0,decisionPath:g,inherited:!1};try{f=await c()}catch(b){try{return i.set(a,null),{ok:!1,reason:"write-failed",writeError:b}}catch(c){return console.warn(`[pi-web] could not take back the trust given to ${a} after a failed write: ${z(c)}`),{ok:!1,reason:"write-failed",writeError:b,rollbackError:z(c),status:l}}}return{ok:!0,value:f,status:{...l,requiresTrust:(0,h.hasTrustRequiringProjectResources)(a)}}},(0,i.T)(E,g,e)}d()}catch(a){d(a)}})}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=5e3,exports.ids=[5e3],exports.modules={12069:(a,b,c)=>{c.d(b,{D7:()=>function a(b,c,d){var e,f,g,i;let j=function(a){let b={};for(let[c,d]of Object.entries(a.sessions))b[c]={...d};let c={};for(let[b,d]of Object.entries(a.projects))c[b]={...d};let d={...a,sessions:b,projects:c};return a.projectOrder&&(d.projectOrder=[...a.projectOrder]),a.projectNames&&(d.projectNames={...a.projectNames}),a.removedProjects&&(d.removedProjects={...a.removedProjects}),a.readAt&&(d.readAt={...a.readAt}),d}(b),k=!1;switch(c.action){case"create-project":{let e=n(c.name);if(!e)return{state:j,changed:!1};let f=F(j,c.projectKey,e);if(o(j,c.projectKey)!==e)return{state:b,changed:!1};let g=a(j,{action:"pin-project",projectKey:c.projectKey,root:c.root,pinned:!0},d);return{state:g.state,changed:f||g.changed}}case"set":for(let a of c.ids){let b=h(j.sessions,a)?j.sessions[a]:void 0;D(j.sessions,a,function(a,b,c){let d={...a};return"pinned"in b?b.pinned?(void 0===d.pinnedAt||void 0!==d.archivedAt)&&(d.pinnedAt=c,delete d.archivedAt):delete d.pinnedAt:b.archived?(d.archivedAt=c,delete d.pinnedAt):delete d.archivedAt,d}(b,c,d))&&(k=!0)}break;case"restore":for(let a of c.entries){let b={};null!==a.pinnedAt&&(b.pinnedAt=a.pinnedAt),null!==a.archivedAt&&(b.archivedAt=a.archivedAt),D(j.sessions,a.id,b)&&(k=!0)}break;case"remove-project":{let{projectKey:a}=c;p(j,a)||(j.removedProjects={...j.removedProjects,[a]:d},k=!0),h(j.projects,a)&&(delete j.projects[a],k=!0);break}case"pin-project":{let{projectKey:a,root:b}=c,i=h(j.projects,a)?j.projects[a]:void 0;if(c.pinned?(p(j,a)&&(delete j.removedProjects[a],0===Object.keys(j.removedProjects).length&&delete j.removedProjects,k=!0),i?.root!==b&&(j.projects[a]={pinnedAt:d,root:b},k=!0)):i&&(delete j.projects[a],k=!0),(c.pinned?void 0===i:void 0!==i)&&j.projectOrder){let b,d,i=(e=j.projectOrder,f=j.projects,g=c.pinned,d=e.filter(b=>b!==a),g?(b=0,d.forEach((a,c)=>{h(f,a)&&(b=c+1)})):(b=d.findIndex(a=>!h(f,a)))<0&&(b=d.length),d.splice(b,0,a),d);t(i.length,s(i))&&E(j,i)&&(k=!0)}break}case"add-projects":E(j,function(a,b){let c=G(a,b),d=a.length,e=s(a),f=c.length;for(;f>0;){let a=r(c[f-1]);if(!t(d+1,e+a))break;d++,e+=a,f--}return[...c.slice(f),...a]}(j.projectOrder??[],c.keys))&&(k=!0);break;case"move-project":{let a,b,{projectKey:d,anchorKey:e,position:f,add:g}=c,h=j.projectOrder??[];E(j,function(a,b){let c=a.length,d=s(a);if(t(c,d))return a;let e=new Set;for(let f=a.length-1;f>=0&&!t(c,d);f--)b.has(a[f])||(e.add(f),c--,d-=r(a[f]));let f=a.filter((a,b)=>!e.has(b));return t(c,d)?f:u(f)}((i=[...G(h,g),...h],(a=i.filter(a=>a!==d)).includes(e)||a.unshift(e),b=a.indexOf(e),a.splice("before"===f?b:b+1,0,d),a),new Set([d,e,...g])))&&(k=!0);break}case"rename-project":{let a=n(c.name);void 0!==a&&F(j,c.projectKey,a)&&(k=!0);break}case"read":{let a={...j.readAt};for(let b of c.ids){let c=h(a,b)?a[b]:void 0;void 0!==c&&c>=d||(a[b]=d,k=!0)}k&&(j.readAt=y(a))}}return{state:j,changed:k}},Id:()=>e,Jx:()=>x,KI:()=>C,KV:()=>p,Kk:()=>g,Q3:()=>o,cx:()=>f,fS:()=>d,ly:()=>w});let d=1,e=/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$/,f=1e3,g=262144,h=(a,b)=>Object.prototype.hasOwnProperty.call(a,b);function i(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function j(a){return"number"==typeof a&&Number.isFinite(a)&&a>=0}function k(a){return"string"==typeof a&&e.test(a)}function l(a){return"string"==typeof a&&a.length>0&&a.length<=4096&&"__proto__"!==a}let m=/[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;function n(a){if(null===a)return null;if("string"!=typeof a)return;let b=a.trim();return b?m.test(b)||[...b].length>80?void 0:b:null}function o(a,b){let c=a.projectNames;return c&&h(c,b)?c[b]:void 0}function p(a,b){return!!a.removedProjects&&h(a.removedProjects,b)}let q=new TextEncoder;function r(a){return q.encode(JSON.stringify(a)).length+1}function s(a){let b=1;for(let c of a)b+=r(c);return b}function t(a,b){return a<=1e3&&b<=262144}function u(a){let b=[],c=1;for(let d of a){if(b.length>=1e3)break;let a=r(d);c+a>262144||(b.push(d),c+=a)}return b}function v(a,b){return q.encode(JSON.stringify(a)).length+q.encode(JSON.stringify(b)).length+2}function w(){return{version:d,revision:0,sessions:{},projects:{}}}function x(a){var b,c;if(!i(a)||void 0!==a.version&&a.version!==d||void 0!==a.sessions&&!i(a.sessions)||void 0!==a.projects&&!i(a.projects))return null;let e=w(),h=a.revision;for(let[b,c]of("number"==typeof h&&Number.isSafeInteger(h)&&h>=0&&(e.revision=h),Object.entries(a.sessions??{}))){if(!k(b))continue;let a=function(a){if(!i(a))return null;let b={};return j(a.pinnedAt)&&(b.pinnedAt=a.pinnedAt),j(a.archivedAt)&&(b.archivedAt=a.archivedAt),void 0===b.pinnedAt&&void 0===b.archivedAt?null:b}(c);a&&(e.sessions[b]=a)}for(let[b,c]of Object.entries(a.projects??{})){if(!l(b))continue;let a=i(c)&&j(c.pinnedAt)&&l(c.root)?{pinnedAt:c.pinnedAt,root:c.root}:null;a&&(e.projects[b]=a)}if(i(a.removedProjects)){let b={};for(let[c,d]of Object.entries(a.removedProjects))l(c)&&j(d)&&(b[c]=d);Object.keys(b).length&&(e.removedProjects=b)}if(Array.isArray(a.projectOrder)){let b=new Set,c=u(a.projectOrder.filter(a=>!(!l(a)||b.has(a))&&(b.add(a),!0)));c.length>0&&(e.projectOrder=c)}if(i(a.projectNames)){let d={},h=0,i=1;for(let[e,j]of Object.entries(a.projectNames)){let a=n(j);if(!l(e)||"string"!=typeof a)continue;let k=v(e,a);b=h+1,c=i+k,b<=f&&c<=g&&(d[e]=a,h++,i+=k)}h>0&&(e.projectNames=d)}if(i(a.readAt)){let b={};for(let[c,d]of Object.entries(a.readAt))k(c)&&j(d)&&(b[c]=d);let c=y(b);Object.keys(c).length>0&&(e.readAt=c)}return e}function y(a){let b=Object.entries(a);return b.length<=2e3?a:(b.sort((a,b)=>b[1]-a[1]),Object.fromEntries(b.slice(0,2e3)))}function z(a){if(!Array.isArray(a)||0===a.length)return{ok:!1,error:"ids must be a non-empty array"};if(a.length>500)return{ok:!1,error:"ids may hold at most 500 session ids"};let b=[],c=new Set;for(let d of a){if(!k(d))return{ok:!1,error:"ids must be session ids"};c.has(d)||(c.add(d),b.push(d))}return{ok:!0,ids:b}}function A(a){return null===a?null:j(a)?a:void 0}function B(a,b,c){if(!Array.isArray(a)||!c&&0===a.length)return{ok:!1,error:`${b} must be ${c?"an":"a non-empty"} array`};if(a.length>500)return{ok:!1,error:`${b} may hold at most 500 projectKeys`};let d=[],e=new Set;for(let c of a){if(!l(c))return{ok:!1,error:`${b} must hold non-empty strings of at most 4096 characters`};e.has(c)||(e.add(c),d.push(c))}return{ok:!0,keys:d}}function C(a){if(!i(a))return{ok:!1,error:"Expected a JSON object"};switch(a.action){case"set":{let b=h(a,"pinned");if(b===h(a,"archived"))return{ok:!1,error:"Send exactly one of pinned or archived"};let c=b?a.pinned:a.archived;if("boolean"!=typeof c)return{ok:!1,error:`${b?"pinned":"archived"} must be a boolean`};let d=z(a.ids);if(!d.ok)return d;return{ok:!0,request:b?{action:"set",ids:d.ids,pinned:c}:{action:"set",ids:d.ids,archived:c}}}case"restore":{let b=a.entries;if(!Array.isArray(b))return{ok:!1,error:"entries must be an array"};if(b.length>500)return{ok:!1,error:"entries may hold at most 500 sessions"};let c=[],d=new Set;for(let a of b){if(!i(a)||!k(a.id))return{ok:!1,error:"Each entry needs a session id"};if(d.has(a.id))return{ok:!1,error:"entries must name each session once"};d.add(a.id);let b=A(a.pinnedAt),e=A(a.archivedAt);if(void 0===b||void 0===e)return{ok:!1,error:"pinnedAt and archivedAt must be timestamps or null"};c.push({id:a.id,pinnedAt:b,archivedAt:e})}return{ok:!0,request:{action:"restore",entries:c}}}case"remove-project":if(!l(a.projectKey))return{ok:!1,error:"projectKey must be a non-empty string of at most 4096 characters"};return{ok:!0,request:{action:"remove-project",projectKey:a.projectKey}};case"create-project":{if(!l(a.projectKey)||!l(a.root))return{ok:!1,error:"projectKey and root must be valid project paths"};let b=n(a.name);if(!b)return{ok:!1,error:"name must be one line of at most 80 characters"};return{ok:!0,request:{action:"create-project",projectKey:a.projectKey,root:a.root,name:b}}}case"pin-project":if(!l(a.projectKey))return{ok:!1,error:"projectKey must be a non-empty string of at most 4096 characters"};if(!l(a.root))return{ok:!1,error:"root must be a non-empty string of at most 4096 characters"};if("boolean"!=typeof a.pinned)return{ok:!1,error:"pinned must be a boolean"};return{ok:!0,request:{action:"pin-project",projectKey:a.projectKey,root:a.root,pinned:a.pinned}};case"add-projects":{let b=B(a.keys,"keys",!1);if(!b.ok)return b;return{ok:!0,request:{action:"add-projects",keys:b.keys}}}case"move-project":{let{projectKey:b,anchorKey:c,position:d}=a;if(!l(b)||!l(c))return{ok:!1,error:"projectKey and anchorKey must be non-empty strings of at most 4096 characters"};if(b===c)return{ok:!1,error:"projectKey and anchorKey must differ"};if("before"!==d&&"after"!==d)return{ok:!1,error:'position must be "before" or "after"'};let e=void 0===a.add?{ok:!0,keys:[]}:B(a.add,"add",!0);if(!e.ok)return e;return{ok:!0,request:{action:"move-project",projectKey:b,anchorKey:c,position:d,add:e.keys}}}case"rename-project":{if(!l(a.projectKey))return{ok:!1,error:"projectKey must be a non-empty string of at most 4096 characters"};let b=n(a.name);if(void 0===b)return{ok:!1,error:"name must be null or one line of at most 80 characters"};return{ok:!0,request:{action:"rename-project",projectKey:a.projectKey,name:b}}}case"read":{let b=z(a.ids);if(!b.ok)return b;return{ok:!0,request:{action:"read",ids:b.ids}}}default:return{ok:!1,error:'action must be "set", "restore", "pin-project", "create-project", "remove-project", "add-projects", "move-project", "rename-project" or "read"'}}}function D(a,b,c){let d=h(a,b)?a[b]:void 0;return void 0===c.pinnedAt&&void 0===c.archivedAt?!!d&&(delete a[b],!0):(d?.pinnedAt!==c.pinnedAt||d?.archivedAt!==c.archivedAt)&&(a[b]=c,!0)}function E(a,b){var c;return c=a.projectOrder??[],!(c.length===b.length&&c.every((a,c)=>a===b[c]))&&(0===b.length?delete a.projectOrder:a.projectOrder=b,!0)}function F(a,b,c){let d={...a.projectNames};if((h(d,b)?d[b]:void 0)===(c??void 0))return!1;if(null===c)delete d[b];else{var e,i;if(d[b]=c,e=Object.keys(d).length,i=function(a){let b=1;for(let[c,d]of Object.entries(a))b+=v(c,d);return b}(d),!(e<=f)||!(i<=g))return!1}return 0===Object.keys(d).length?delete a.projectNames:a.projectNames=d,!0}function G(a,b){let c=new Set(a),d=[];for(let a of b)c.has(a)||(c.add(a),d.push(a));return d}},37431:(a,b,c)=>{c.d(b,{T:()=>f,y:()=>g});var d=c(73024);let e=d.constants.O_RDONLY|(d.constants.O_NONBLOCK||0),f=1048576;function g(a,b){let c;try{c=(0,d.openSync)(a,e)}catch(b){let a;if("ENOENT"===(a=b?.code)||"ENOTDIR"===a)return;throw b}try{let e=(0,d.fstatSync)(c);if(!e.isFile())throw Error(`${a} is not a regular file`);if(void 0===b)return(0,d.readFileSync)(c,"utf8");if(e.size>b)throw Error(`${a} is larger than ${b} bytes`);let f=b+1,g=[],h=0;for(;h<f;){let a=Buffer.alloc(Math.min(f-h,65536)),b=(0,d.readSync)(c,a,0,a.length,null);if(0===b)break;g.push(a.subarray(0,b)),h+=b}if(h>b)throw Error(`${a} is larger than ${b} bytes`);return Buffer.concat(g,h).toString("utf8")}finally{(0,d.closeSync)(c)}}},63108:(a,b,c)=>{c.d(b,{T:()=>d});function d(a,b,c){let d=globalThis,e=d[a]??=new Map,f=(e.get(b)??Promise.resolve()).then(c),g=f.then(()=>void 0,()=>void 0);return e.set(b,g),g.then(()=>{e.get(b)===g&&e.delete(b)}),f}}};
|