@tenonai/yew 1.4.0 → 1.5.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 +21 -5
- package/README.md +9 -9
- package/dist/cli/app.js +22 -12
- package/dist/cli/export.js +5 -5
- package/dist/cli/mcp.js +7 -7
- package/dist/cli/remote.js +6 -6
- package/dist/cli/run.js +3 -3
- package/dist/cli/schedule.js +3 -3
- package/dist/cli/send.js +4 -4
- package/dist/cli/serve.js +13 -11
- package/dist/cli/service.js +13 -13
- package/dist/server/agent/runner.js +1 -1
- package/dist/server/data-usage.js +1 -1
- package/dist/server/db/database.js +1 -1
- package/dist/server/export.js +2 -2
- package/dist/server/folder-picker.js +1 -1
- package/dist/server/http/app.js +3 -3
- package/dist/server/http/data.js +1 -1
- package/dist/server/http/mcp.js +2 -2
- package/dist/server/http/problem.js +1 -1
- package/dist/server/http/security.js +5 -5
- package/dist/server/mail/post.js +2 -2
- package/dist/server/mcp-builtin.js +1 -1
- package/dist/server/mcp-config.js +4 -4
- package/dist/server/mcp-oauth.js +6 -6
- package/dist/server/store.js +2 -2
- package/dist/shared/version.js +2 -0
- package/package.json +2 -2
- package/web/dist/THIRD-PARTY-NOTICES.txt +1 -1
- package/web/dist/assets/{index-C5qBMzFX.js → index-B_NesKxw.js} +18 -18
- package/web/dist/assets/index-BqTqnE18.css +1 -0
- package/web/dist/index.html +3 -3
- package/web/dist/mascot/alarm.webp +0 -0
- package/web/dist/mascot/books.webp +0 -0
- package/web/dist/mascot/bow.webp +0 -0
- package/web/dist/mascot/branch.webp +0 -0
- package/web/dist/mascot/clipboard.webp +0 -0
- package/web/dist/mascot/dozing.webp +0 -0
- package/web/dist/mascot/fired-up.webp +0 -0
- package/web/dist/mascot/giftbox.webp +0 -0
- package/web/dist/mascot/halt.webp +0 -0
- package/web/dist/mascot/jump.webp +0 -0
- package/web/dist/mascot/letter-run.webp +0 -0
- package/web/dist/mascot/magnifier.webp +0 -0
- package/web/dist/mascot/mini.webp +0 -0
- package/web/dist/mascot/nap.webp +0 -0
- package/web/dist/mascot/pajamas.webp +0 -0
- package/web/dist/mascot/paper-plane.webp +0 -0
- package/web/dist/mascot/peek.webp +0 -0
- package/web/dist/mascot/phone.webp +0 -0
- package/web/dist/mascot/pointing.webp +0 -0
- package/web/dist/mascot/portrait.webp +0 -0
- package/web/dist/mascot/pout.webp +0 -0
- package/web/dist/mascot/proud.webp +0 -0
- package/web/dist/mascot/reading.webp +0 -0
- package/web/dist/mascot/stamp.webp +0 -0
- package/web/dist/mascot/stretch.webp +0 -0
- package/web/dist/mascot/surprised.webp +0 -0
- package/web/dist/mascot/tea.webp +0 -0
- package/web/dist/mascot/teary.webp +0 -0
- package/web/dist/mascot/typing.webp +0 -0
- package/dist/server/from-jig.js +0 -98
- package/web/dist/assets/index-B9oWPSod.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
# 更新记录
|
|
2
2
|
|
|
3
|
-
本文件记录 Yew(原名 Jig)各版本中用户能感知的变化。格式参照 [Keep a Changelog 1.1.0](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循[语义化版本 2.0.0](https://semver.org/lang/zh-CN/)。
|
|
3
|
+
本文件记录 Yew Harness(原名 Jig,1.3.0、1.4.0 叫 Yew)各版本中用户能感知的变化。格式参照 [Keep a Changelog 1.1.0](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循[语义化版本 2.0.0](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
|
|
5
|
+
## [1.5.0] - 2026-11-18
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
|
|
9
|
+
- Yew(那个红发女孩)多了 28 个姿势,有侧身、背影、全身、坐着、躺着和从边上探头的,动作对着 Yew Harness 里的事:盖章、送信、读信、打字、打勾、捧礼物、鞠躬、捧茶、打盹等。侧栏里的她按眼下的事从几个姿势里挑一个,每十分钟换一个。
|
|
10
|
+
- 窗口够宽时,会话和首页的右边站着 Yew 的全身立绘,朝左看着对话,不挡正文;这时首页不再放那个小的问候姿势,字标水印也让位。窗口窄、放不下时不显示,仍是字标水印。
|
|
11
|
+
|
|
12
|
+
### 变更
|
|
13
|
+
|
|
14
|
+
- 产品名改为 Yew Harness,红发女孩仍叫 Yew。网页界面、命令行的帮助和输出、iPhone 和安卓应用里说到产品的地方都写 Yew Harness,手机上的应用名和「应用程序」里的启动图标也是;侧栏、关于页和开场的标志在「Yew」字标后面多了一个小一号的「Harness」。命令 `yew`、npm 包 `@tenonai/yew` 和数据目录 `~/.yew` 不变,不用重装,手机也不用重新配对。用过启动图标的,在设置里把它关掉再打开一次,图标的名字就会更新。
|
|
15
|
+
- 设置菜单里控制红发女孩的那一项改叫「界面里的 Yew」:她的名字就是 Yew。关掉后界面里的她都不显示:侧栏、开场、立绘,以及首页、空页面和关于页里的她。
|
|
16
|
+
|
|
17
|
+
### 修复
|
|
18
|
+
|
|
19
|
+
- 1.4.0 的 npm 包里混进了一个 1.3.0 留下的文件(`dist/server/from-jig.js`,不会运行)。这一版起,打包前先清空编译目录。
|
|
4
20
|
|
|
5
21
|
## [1.4.0] - 2026-11-18
|
|
6
22
|
|
|
7
23
|
### 新增
|
|
8
24
|
|
|
9
|
-
-
|
|
10
|
-
- 打开 Yew
|
|
25
|
+
- 侧栏底部站着 Yew(那个红发女孩),旁边的气泡说眼下最要紧的一件事:几件事等你处理、哪个会话出错了或做完了等你核对、哪些会话在干活。说的是一件事或一个会话时,点气泡直接过去。刚打开时她先问候,夜里没事时打瞌睡。
|
|
26
|
+
- 打开 Yew 时有一秒左右的开场:标志画出来,Yew 招手,下面列出连接、读取设置、会话和审批中心这几步。点一下或按任意键跳过;系统设了减少动态效果时不播。
|
|
11
27
|
- 会话和首页的背后多了一个很淡的「Yew」字标。
|
|
12
|
-
-
|
|
28
|
+
- 设置菜单里多了一项,可以把侧栏的 Yew 和开场一起关掉。
|
|
13
29
|
|
|
14
30
|
### 变更
|
|
15
31
|
|
|
@@ -38,7 +54,7 @@
|
|
|
38
54
|
|
|
39
55
|
### 变更
|
|
40
56
|
|
|
41
|
-
- Jig 改名为 Yew,用上 Yew
|
|
57
|
+
- Jig 改名为 Yew,用上 Yew 的名字、标志、配色和红发女孩 Yew 的形象:界面、命令行、文档和手机应用里都叫 Yew。一句话定义不变。
|
|
42
58
|
- 命令改叫 `yew`,npm 包改叫 `@tenonai/yew`,`jig` 命令不再有。第一次运行时,数据目录 `~/.jig` 搬到 `~/.yew`,原处留一个链接;API Key 第一次用到时从钥匙串里 Jig 的位置搬过来;环境变量改叫 `YEW_HOME`、`YEW_KEYCHAIN`、`YEW_MCP_BUILTIN`,旧的 `JIG_*` 仍然认。`yew service install`、`yew app install` 会换掉 Jig 装的开机启动和启动图标。
|
|
43
59
|
- iPhone 和安卓上的 Yew 是新的应用(包名 `cn.tenonai.apps.yew`),装上后要重新配对;配对二维码里的链接改成 `yew://`,手机和电脑之间的握手也换成了 Yew 的,手机上原来的 Jig 应用连不上 Yew。安卓版换了签名证书,SHA-256 指纹是 `9F:F5:6E:EA:A8:3C:DC:01:BA:66:D8:79:23:9C:DE:5A:2A:69:C3:AE:D2:60:5C:D8:E1:B9:34:8D:BF:28:61:B2`,不会覆盖安装 Jig,请先卸载 Jig 再装 Yew。
|
|
44
60
|
- 隐私政策和用户协议更新到 2.4:写明登录 MCP 服务得到的令牌存在系统钥匙串,mcp.json 里存着你填的密钥和自建 Google 客户端的 ID 和密钥;MCP 工具返回的内容(比如邮件、日程、文件)会发给模型服务商;登录过的服务会收到以你的账号发出的请求,境外的服务会把内容发往境外;怎样退出 MCP 服务的登录。用户协议提醒登录过的 MCP 服务也能以你的身份操作。
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# Yew
|
|
1
|
+
# Yew Harness
|
|
2
2
|
|
|
3
3
|
AI 原生的多 Agent 工作台。
|
|
4
4
|
|
|
5
5
|
按 Session Engineering 的做法组织 Agent 会话:你只对接主对话,要你授权和决定的事都汇到审批中心。
|
|
6
6
|
|
|
7
|
-
每个会话有名字、职责、工作区、模型和权限,按团队组织:常设会话长期负责一块事,任务会话为一件事开设,做完回报,之后可以归档。会话之间用信件分派和回报。会话跑在你电脑上的 Yew 服务里,网页关了也照常干活。
|
|
7
|
+
每个会话有名字、职责、工作区、模型和权限,按团队组织:常设会话长期负责一块事,任务会话为一件事开设,做完回报,之后可以归档。会话之间用信件分派和回报。会话跑在你电脑上的 Yew Harness 服务里,网页关了也照常干活。
|
|
8
8
|
|
|
9
|
-
Yew 以 MIT 许可证开源,当前版本 1.
|
|
9
|
+
Yew Harness 以 MIT 许可证开源,当前版本 1.5.0。能做什么见[更新记录](CHANGELOG.md),为什么这样做见[产品蓝图](docs/blueprint.md)。iPhone 应用的源码在 `ios/`,还没有上架;安卓版的源码在 `android/`,安装包见下面的「手机端」。
|
|
10
10
|
|
|
11
11
|
## 安装与快速开始
|
|
12
12
|
|
|
@@ -15,28 +15,28 @@ Yew 以 MIT 许可证开源,当前版本 1.3.0。能做什么见[更新记录]
|
|
|
15
15
|
1. 安装:`npm install -g @tenonai/yew`。
|
|
16
16
|
2. 存入一个模型服务商的 API Key(默认服务商是 DeepSeek):`yew key set deepseek`。Key 只存进系统钥匙串。
|
|
17
17
|
3. 启动服务:`yew serve --open`,浏览器会打开网页界面。以后需要新的登录链接,运行 `yew open`。
|
|
18
|
-
4. 可选:`yew service install` 让 Yew 登录后自动启动;macOS 上 `yew app install` 在「应用程序」里放一个 Yew 图标。
|
|
18
|
+
4. 可选:`yew service install` 让 Yew Harness 登录后自动启动;macOS 上 `yew app install` 在「应用程序」里放一个 Yew Harness 图标。
|
|
19
19
|
|
|
20
20
|
从源码运行:克隆仓库后 `npm install`、`npm run build:web`、`npm link`。
|
|
21
21
|
|
|
22
22
|
## 手机端
|
|
23
23
|
|
|
24
|
-
手机上的 Yew 只连接你自己电脑上的 Yew:在电脑上显示二维码,手机扫码配对,之后在手机上看会话、处理审批中心里的事。两端经中继通信,内容端到端加密;默认用 Tenon AI 运行的中继,也可以自己部署(见 `relay/`)。
|
|
24
|
+
手机上的 Yew Harness 只连接你自己电脑上的 Yew Harness:在电脑上显示二维码,手机扫码配对,之后在手机上看会话、处理审批中心里的事。两端经中继通信,内容端到端加密;默认用 Tenon AI 运行的中继,也可以自己部署(见 `relay/`)。
|
|
25
25
|
|
|
26
|
-
- 安卓:安装包(apk)在 [GitHub](https://github.com/dozybot001/Yew/releases) 和 [Gitee](https://gitee.com/dozybot/yew/releases) 的 Releases 里,由长沙榫卯人工智能科技有限公司签名。签名证书的 SHA-256 指纹是 `9F:F5:6E:EA:A8:3C:DC:01:BA:66:D8:79:23:9C:DE:5A:2A:69:C3:AE:D2:60:5C:D8:E1:B9:34:8D:BF:28:61:B2`;这个指纹也公布在[官网的 Yew 页面](https://tenonai.cn/zh/products/yew/#android)上,可以对照;每个版本的说明里有安装包的 SHA-256。更新时系统如果提示签名不一致,不要安装。
|
|
26
|
+
- 安卓:安装包(apk)在 [GitHub](https://github.com/dozybot001/Yew/releases) 和 [Gitee](https://gitee.com/dozybot/yew/releases) 的 Releases 里,由长沙榫卯人工智能科技有限公司签名。签名证书的 SHA-256 指纹是 `9F:F5:6E:EA:A8:3C:DC:01:BA:66:D8:79:23:9C:DE:5A:2A:69:C3:AE:D2:60:5C:D8:E1:B9:34:8D:BF:28:61:B2`;这个指纹也公布在[官网的 Yew Harness 页面](https://tenonai.cn/zh/products/yew/#android)上,可以对照;每个版本的说明里有安装包的 SHA-256。更新时系统如果提示签名不一致,不要安装。
|
|
27
27
|
- iPhone:还没有上架,之后经 TestFlight 和 App Store 发布。
|
|
28
28
|
|
|
29
29
|
## 隐私
|
|
30
30
|
|
|
31
|
-
Yew 不收集任何数据,也不含统计、遥测或上报代码。会话、消息和设置存在你自己的电脑上,API Key 存在系统钥匙串里。你选用的模型服务商会收到发给它的对话内容,这部分适用该服务商的隐私政策。
|
|
31
|
+
Yew Harness 不收集任何数据,也不含统计、遥测或上报代码。会话、消息和设置存在你自己的电脑上,API Key 存在系统钥匙串里。你选用的模型服务商会收到发给它的对话内容,这部分适用该服务商的隐私政策。
|
|
32
32
|
|
|
33
33
|
## 文档
|
|
34
34
|
|
|
35
35
|
- [产品蓝图](docs/blueprint.md):为什么做、做什么、不做什么、怎么验收
|
|
36
|
-
- [对外介绍](docs/introduction.md):官网、商店和各渠道介绍 Yew 时用的定义、简介和能写的能力
|
|
36
|
+
- [对外介绍](docs/introduction.md):官网、商店和各渠道介绍 Yew Harness 时用的定义、简介和能写的能力
|
|
37
37
|
- 实现计划:[M1](docs/archive/m1-plan.md)、[M2](docs/archive/m2-plan.md)、[M3](docs/archive/m3-plan.md)
|
|
38
38
|
- [可借鉴的开源项目](docs/prior-art.md)
|
|
39
|
-
- [数据清单](docs/data-inventory.md):Yew 在你电脑上存了哪些数据、怎么删除
|
|
39
|
+
- [数据清单](docs/data-inventory.md):Yew Harness 在你电脑上存了哪些数据、怎么删除
|
|
40
40
|
- [iPhone 应用上架](docs/app-store.md):商店里填什么、进度
|
|
41
41
|
- [更新记录](CHANGELOG.md)
|
|
42
42
|
- [开发约定](AGENTS.md)
|
package/dist/cli/app.js
CHANGED
|
@@ -4,20 +4,21 @@ import { homedir, tmpdir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { parseArgs } from "node:util";
|
|
7
|
-
import { VERSION } from "../shared/version.js";
|
|
7
|
+
import { PRODUCT, VERSION } from "../shared/version.js";
|
|
8
8
|
import { EXIT_ERROR, EXIT_OK, UsageError } from "./io.js";
|
|
9
9
|
const HELP = `Usage: yew app <install|uninstall|status> [options]
|
|
10
10
|
|
|
11
|
-
Put a Yew icon in your Applications folder (macOS). Clicking it starts
|
|
12
|
-
the background if it is not running, then opens the web
|
|
11
|
+
Put a Yew Harness icon in your Applications folder (macOS). Clicking it starts
|
|
12
|
+
Yew Harness in the background if it is not running, then opens the web
|
|
13
|
+
interface, signed in.
|
|
13
14
|
|
|
14
|
-
The icon is a small launcher for this installation of Yew: it runs the
|
|
15
|
-
yew you run in a terminal, with the Node.js found now. Run install again
|
|
16
|
-
you move or update Node.js or Yew.
|
|
15
|
+
The icon is a small launcher for this installation of Yew Harness: it runs the
|
|
16
|
+
same yew you run in a terminal, with the Node.js found now. Run install again
|
|
17
|
+
after you move or update Node.js or Yew Harness.
|
|
17
18
|
|
|
18
19
|
Commands:
|
|
19
20
|
install Create ~/Applications/Yew.app
|
|
20
|
-
uninstall Remove it; Yew itself and your data stay
|
|
21
|
+
uninstall Remove it; Yew Harness itself and your data stay
|
|
21
22
|
status Show whether it is there
|
|
22
23
|
|
|
23
24
|
Options:
|
|
@@ -41,6 +42,8 @@ export function realAppHost() {
|
|
|
41
42
|
const xml = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
42
43
|
/** A value inside single quotes in a shell script. */
|
|
43
44
|
const quoted = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
45
|
+
/** Shown for the launcher in every language: macOS falls back to the development region's. */
|
|
46
|
+
export const DISPLAY_NAME = `CFBundleDisplayName = "${PRODUCT}";\nCFBundleName = "${PRODUCT}";\n`;
|
|
44
47
|
export function infoPlist() {
|
|
45
48
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
46
49
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -50,6 +53,10 @@ export function infoPlist() {
|
|
|
50
53
|
<string>Yew</string>
|
|
51
54
|
<key>CFBundleDisplayName</key>
|
|
52
55
|
<string>Yew</string>
|
|
56
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
57
|
+
<string>en</string>
|
|
58
|
+
<key>LSHasLocalizedDisplayName</key>
|
|
59
|
+
<true/>
|
|
53
60
|
<key>CFBundleIdentifier</key>
|
|
54
61
|
<string>cn.tenonai.apps.yew.launcher</string>
|
|
55
62
|
<key>CFBundleExecutable</key>
|
|
@@ -90,7 +97,7 @@ while [ "$tries" -lt 60 ]; do
|
|
|
90
97
|
if ${yew} open >/dev/null 2>&1; then exit 0; fi
|
|
91
98
|
tries=$((tries + 1))
|
|
92
99
|
done
|
|
93
|
-
osascript -e 'display alert "Yew did not start" message "Run yew serve in a terminal to see why."' >/dev/null 2>&1
|
|
100
|
+
osascript -e 'display alert "Yew Harness did not start" message "Run yew serve in a terminal to see why."' >/dev/null 2>&1
|
|
94
101
|
exit 1
|
|
95
102
|
`;
|
|
96
103
|
}
|
|
@@ -110,6 +117,9 @@ export function installApp(host, home, env) {
|
|
|
110
117
|
mkdirSync(join(contents, "MacOS"), { recursive: true });
|
|
111
118
|
mkdirSync(join(contents, "Resources"), { recursive: true });
|
|
112
119
|
writeFileSync(join(contents, "Info.plist"), infoPlist());
|
|
120
|
+
// Finder, Launchpad and the Dock show the product's name; the file keeps the short one.
|
|
121
|
+
mkdirSync(join(contents, "Resources", "en.lproj"));
|
|
122
|
+
writeFileSync(join(contents, "Resources", "en.lproj", "InfoPlist.strings"), DISPLAY_NAME);
|
|
113
123
|
const launcher = join(contents, "MacOS", "yew-launcher");
|
|
114
124
|
writeFileSync(launcher, launcherScript(host, vars, join(home, "logs", "serve.log")));
|
|
115
125
|
chmodSync(launcher, 0o755);
|
|
@@ -148,7 +158,7 @@ export function uninstallApp(host) {
|
|
|
148
158
|
export function appCommand(host = realAppHost()) {
|
|
149
159
|
return {
|
|
150
160
|
name: "app",
|
|
151
|
-
summary: "Put a Yew icon in Applications (macOS)",
|
|
161
|
+
summary: "Put a Yew Harness icon in Applications (macOS)",
|
|
152
162
|
async run(args, io) {
|
|
153
163
|
const { values, positionals } = parseArgs({
|
|
154
164
|
args,
|
|
@@ -172,7 +182,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
172
182
|
if (values.json)
|
|
173
183
|
io.stdout.write(`${JSON.stringify({ installed, app })}\n`);
|
|
174
184
|
else
|
|
175
|
-
io.stdout.write(`Yew icon: ${installed ? app : "not installed"}\n`);
|
|
185
|
+
io.stdout.write(`Yew Harness icon: ${installed ? app : "not installed"}\n`);
|
|
176
186
|
return EXIT_OK;
|
|
177
187
|
}
|
|
178
188
|
if (action === "uninstall") {
|
|
@@ -180,7 +190,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
180
190
|
if (values.json)
|
|
181
191
|
io.stdout.write(`${JSON.stringify({ installed: false, app })}\n`);
|
|
182
192
|
else
|
|
183
|
-
io.stdout.write(installed ? `Removed ${app}.\n` : "The Yew icon was not installed.\n");
|
|
193
|
+
io.stdout.write(installed ? `Removed ${app}.\n` : "The Yew Harness icon was not installed.\n");
|
|
184
194
|
return EXIT_OK;
|
|
185
195
|
}
|
|
186
196
|
const { yewHome } = await import("../server/paths.js");
|
|
@@ -188,7 +198,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
188
198
|
if (values.json)
|
|
189
199
|
io.stdout.write(`${JSON.stringify({ installed: true, app, icon })}\n`);
|
|
190
200
|
else {
|
|
191
|
-
io.stdout.write(`Yew is in your Applications folder: ${app}\nOpen it from Launchpad or Spotlight, or drag it to the Dock.\n`);
|
|
201
|
+
io.stdout.write(`Yew Harness is in your Applications folder: ${app}\nOpen it from Launchpad or Spotlight, or drag it to the Dock.\n`);
|
|
192
202
|
if (!icon)
|
|
193
203
|
io.stderr.write("yew: the icon could not be made; the app has a plain one.\n");
|
|
194
204
|
}
|
package/dist/cli/export.js
CHANGED
|
@@ -3,10 +3,10 @@ import { parseArgs } from "node:util";
|
|
|
3
3
|
import { EXIT_OK, UsageError } from "./io.js";
|
|
4
4
|
const HELP = `Usage: yew export <folder> [options]
|
|
5
5
|
|
|
6
|
-
Write everything Yew keeps into a folder, as files you can read
|
|
7
|
-
each session as Markdown; letters, decision cards,
|
|
8
|
-
settings as JSON; and every version of every artifact. The
|
|
9
|
-
or empty.
|
|
6
|
+
Write everything Yew Harness keeps into a folder, as files you can read
|
|
7
|
+
without Yew Harness: each session as Markdown; letters, decision cards,
|
|
8
|
+
scheduled tasks and settings as JSON; and every version of every artifact. The
|
|
9
|
+
folder must be new or empty.
|
|
10
10
|
|
|
11
11
|
API keys stay in the system keychain and are not exported; neither are paired
|
|
12
12
|
phones or sign-in tokens.
|
|
@@ -18,7 +18,7 @@ Options:
|
|
|
18
18
|
export function exportCommand() {
|
|
19
19
|
return {
|
|
20
20
|
name: "export",
|
|
21
|
-
summary: "Write all of Yew's data into a folder",
|
|
21
|
+
summary: "Write all of Yew Harness's data into a folder",
|
|
22
22
|
async run(args, io) {
|
|
23
23
|
const { values, positionals } = parseArgs({
|
|
24
24
|
args,
|
package/dist/cli/mcp.js
CHANGED
|
@@ -3,18 +3,18 @@ import { VERSION } from "../shared/version.js";
|
|
|
3
3
|
import { EXIT_OK, UsageError } from "./io.js";
|
|
4
4
|
const HELP = `Usage: yew mcp list [options]
|
|
5
5
|
|
|
6
|
-
Show the MCP servers set up in mcp.json in Yew's data folder: whether
|
|
7
|
-
connects, and the tools it offers. The file uses the usual shape:
|
|
6
|
+
Show the MCP servers set up in mcp.json in Yew Harness's data folder: whether
|
|
7
|
+
each one connects, and the tools it offers. The file uses the usual shape:
|
|
8
8
|
|
|
9
9
|
{ "mcpServers": {
|
|
10
10
|
"files": { "command": "npx", "args": ["some-mcp-server"], "env": { "KEY": "\${KEY}" } },
|
|
11
11
|
"search": { "url": "https://example.com/mcp", "headers": { "Authorization": "Bearer \${TOKEN}" } } } }
|
|
12
12
|
|
|
13
|
-
\${NAME} is taken from the environment Yew runs in. Sessions ask you
|
|
14
|
-
they use a tool of a server for the first time. A server with
|
|
15
|
-
stays in the file and is not started. A project's own
|
|
16
|
-
Servers can also be added, disabled and removed in the
|
|
17
|
-
interface.
|
|
13
|
+
\${NAME} is taken from the environment Yew Harness runs in. Sessions ask you
|
|
14
|
+
before they use a tool of a server for the first time. A server with
|
|
15
|
+
"disabled": true stays in the file and is not started. A project's own
|
|
16
|
+
.mcp.json is not read. Servers can also be added, disabled and removed in the
|
|
17
|
+
settings of the web interface.
|
|
18
18
|
|
|
19
19
|
Options:
|
|
20
20
|
--json Print as JSON
|
package/dist/cli/remote.js
CHANGED
|
@@ -4,9 +4,9 @@ import { EXIT_ERROR, EXIT_OK, UsageError } from "./io.js";
|
|
|
4
4
|
import { serviceRunning } from "./serve.js";
|
|
5
5
|
const HELP = `Usage: yew remote <on|off|status|pair> [options]
|
|
6
6
|
|
|
7
|
-
Let your phone reach Yew on this Mac through
|
|
8
|
-
out to the relay, so this Mac opens no port; everything between them
|
|
9
|
-
end-to-end encrypted, and the relay sees only ciphertext.
|
|
7
|
+
Let your phone reach Yew Harness on this Mac through the relay. Both sides
|
|
8
|
+
connect out to the relay, so this Mac opens no port; everything between them
|
|
9
|
+
is end-to-end encrypted, and the relay sees only ciphertext.
|
|
10
10
|
|
|
11
11
|
Commands:
|
|
12
12
|
on Turn on phone access
|
|
@@ -70,7 +70,7 @@ export function remoteCommand() {
|
|
|
70
70
|
io.stdout.write(`Phone access is ${next.enabled ? "on" : "off"} (${next.relayUrl}).\n`);
|
|
71
71
|
// The running service picks the setting up within a few seconds.
|
|
72
72
|
if (!running)
|
|
73
|
-
io.stderr.write("yew: Yew is not running; start it with 'yew serve'.\n");
|
|
73
|
+
io.stderr.write("yew: Yew Harness is not running; start it with 'yew serve'.\n");
|
|
74
74
|
return EXIT_OK;
|
|
75
75
|
}
|
|
76
76
|
if (action === "status") {
|
|
@@ -103,9 +103,9 @@ export function remoteCommand() {
|
|
|
103
103
|
return EXIT_OK;
|
|
104
104
|
}
|
|
105
105
|
const { renderUnicodeCompact } = await import("uqr");
|
|
106
|
-
io.stdout.write(`${renderUnicodeCompact(link)}\nScan this with Yew on your phone within 5 minutes.\n`);
|
|
106
|
+
io.stdout.write(`${renderUnicodeCompact(link)}\nScan this with Yew Harness on your phone within 5 minutes.\n`);
|
|
107
107
|
if (!running)
|
|
108
|
-
io.stderr.write("yew: Yew is not running; start it with 'yew serve'.\n");
|
|
108
|
+
io.stderr.write("yew: Yew Harness is not running; start it with 'yew serve'.\n");
|
|
109
109
|
return EXIT_OK;
|
|
110
110
|
}
|
|
111
111
|
finally {
|
package/dist/cli/run.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
|
-
import { NAME, PUBLISHER, VERSION, WEBSITE } from "../shared/version.js";
|
|
2
|
+
import { NAME, PRODUCT, PUBLISHER, VERSION, WEBSITE } from "../shared/version.js";
|
|
3
3
|
import { EXIT_ERROR, EXIT_OK, EXIT_USAGE, paint, UsageError } from "./io.js";
|
|
4
4
|
function helpText(io, commands) {
|
|
5
5
|
const bold = (s) => paint("bold", s, io.stdout, io.env);
|
|
6
6
|
const lines = [
|
|
7
|
-
`${
|
|
7
|
+
`${PRODUCT} ${VERSION}`,
|
|
8
8
|
"An AI-native multi-agent workbench.",
|
|
9
9
|
"",
|
|
10
10
|
`${bold("Usage:")} ${NAME} <command> [options]`,
|
|
@@ -22,7 +22,7 @@ function versionText(json) {
|
|
|
22
22
|
if (json) {
|
|
23
23
|
return `${JSON.stringify({ name: NAME, version: VERSION, publisher: PUBLISHER, website: WEBSITE })}\n`;
|
|
24
24
|
}
|
|
25
|
-
return `${
|
|
25
|
+
return `${PRODUCT} ${VERSION}\n${PUBLISHER} · ${WEBSITE}\n`;
|
|
26
26
|
}
|
|
27
27
|
export async function run(argv, io, commands = []) {
|
|
28
28
|
const first = argv[0];
|
package/dist/cli/schedule.js
CHANGED
|
@@ -4,8 +4,8 @@ import { serviceRunning } from "./serve.js";
|
|
|
4
4
|
const HELP = `Usage: yew schedule <list|run> [options] [<task>]
|
|
5
5
|
|
|
6
6
|
Scheduled tasks send a standing session a letter at set times; the session's
|
|
7
|
-
last reply goes to the main conversation as the report. Set them up in Yew
|
|
8
|
-
web interface, or ask the main conversation.
|
|
7
|
+
last reply goes to the main conversation as the report. Set them up in Yew
|
|
8
|
+
Harness's web interface, or ask the main conversation.
|
|
9
9
|
|
|
10
10
|
Commands:
|
|
11
11
|
list List the scheduled tasks with their next and last runs
|
|
@@ -111,7 +111,7 @@ export function scheduleCommand() {
|
|
|
111
111
|
io.stdout.write(`Sent ${schedule.name} to ${sessionName(schedule.sessionId)} (letter ${result.letter.id}).\n`);
|
|
112
112
|
}
|
|
113
113
|
if (!serviceRunning(home)) {
|
|
114
|
-
io.stderr.write("Yew is not running; the letter is delivered when it starts.\n");
|
|
114
|
+
io.stderr.write("Yew Harness is not running; the letter is delivered when it starts.\n");
|
|
115
115
|
}
|
|
116
116
|
return EXIT_OK;
|
|
117
117
|
}
|
package/dist/cli/send.js
CHANGED
|
@@ -7,8 +7,8 @@ Send a letter to a session, from a script, CI or a git hook. <session> is the
|
|
|
7
7
|
session's id or name. Use - as the message to read it from standard input; the
|
|
8
8
|
first line is the summary. The letter is marked as coming from the command
|
|
9
9
|
line, not from you; run inside a session's shell, it comes from that session
|
|
10
|
-
and counts against its letters. A running Yew delivers it within a few
|
|
11
|
-
seconds; otherwise it waits until Yew starts.
|
|
10
|
+
and counts against its letters. A running Yew Harness delivers it within a few
|
|
11
|
+
seconds; otherwise it waits until Yew Harness starts.
|
|
12
12
|
|
|
13
13
|
Options:
|
|
14
14
|
-k, --kind <kind> notice, request or report (default: notice)
|
|
@@ -111,10 +111,10 @@ export function sendCommand() {
|
|
|
111
111
|
io.stdout.write(`Sent letter ${letter.id} to ${session.name}.\n`);
|
|
112
112
|
}
|
|
113
113
|
if (letter.status === "held") {
|
|
114
|
-
io.stderr.write("It is held until you release it in Yew's approval center.\n");
|
|
114
|
+
io.stderr.write("It is held until you release it in Yew Harness's approval center.\n");
|
|
115
115
|
}
|
|
116
116
|
else if (!serviceRunning(home)) {
|
|
117
|
-
io.stderr.write("Yew is not running; the letter is delivered when it starts.\n");
|
|
117
|
+
io.stderr.write("Yew Harness is not running; the letter is delivered when it starts.\n");
|
|
118
118
|
}
|
|
119
119
|
return EXIT_OK;
|
|
120
120
|
}
|
package/dist/cli/serve.js
CHANGED
|
@@ -13,8 +13,9 @@ const LETTER_SWEEP_MS = 2000;
|
|
|
13
13
|
const REMOTE_SYNC_MS = 5000;
|
|
14
14
|
const SERVE_HELP = `Usage: yew serve [options]
|
|
15
15
|
|
|
16
|
-
Start Yew's local service. It listens on 127.0.0.1 only, keeps running
|
|
17
|
-
the browser is closed, and prints a one-time link to open the web
|
|
16
|
+
Start Yew Harness's local service. It listens on 127.0.0.1 only, keeps running
|
|
17
|
+
while the browser is closed, and prints a one-time link to open the web
|
|
18
|
+
interface.
|
|
18
19
|
|
|
19
20
|
Options:
|
|
20
21
|
-p, --port <n> Port to listen on (default ${DEFAULT_PORT})
|
|
@@ -23,7 +24,8 @@ Options:
|
|
|
23
24
|
`;
|
|
24
25
|
const OPEN_HELP = `Usage: yew open [options]
|
|
25
26
|
|
|
26
|
-
Open the web interface of the running Yew service with a new one-time
|
|
27
|
+
Open the web interface of the running Yew Harness service with a new one-time
|
|
28
|
+
link.
|
|
27
29
|
|
|
28
30
|
Options:
|
|
29
31
|
--print Print the link instead of opening a browser
|
|
@@ -54,7 +56,7 @@ export function openBrowser(url) {
|
|
|
54
56
|
export function serveCommand() {
|
|
55
57
|
return {
|
|
56
58
|
name: "serve",
|
|
57
|
-
summary: "Start Yew's local service",
|
|
59
|
+
summary: "Start Yew Harness's local service",
|
|
58
60
|
async run(args, io) {
|
|
59
61
|
const { values } = parseArgs({
|
|
60
62
|
args,
|
|
@@ -85,7 +87,7 @@ export function serveCommand() {
|
|
|
85
87
|
const { store, bus, gateway, home } = runtime;
|
|
86
88
|
const stuck = store.recoverAfterRestart();
|
|
87
89
|
if (stuck.length > 0) {
|
|
88
|
-
io.stderr.write(`${stuck.length} session(s) were working when Yew last stopped. They are marked for review; nothing was redone.\n`);
|
|
90
|
+
io.stderr.write(`${stuck.length} session(s) were working when Yew Harness last stopped. They are marked for review; nothing was redone.\n`);
|
|
89
91
|
}
|
|
90
92
|
store.pruneEvents(Date.now() - EVENT_RETENTION_MS);
|
|
91
93
|
// Answers handed to a waiting call whose result was never stored come back as letters.
|
|
@@ -140,7 +142,7 @@ export function serveCommand() {
|
|
|
140
142
|
log,
|
|
141
143
|
handle: async (request, device) => {
|
|
142
144
|
if (!handle)
|
|
143
|
-
throw new Error("Yew is still starting.");
|
|
145
|
+
throw new Error("Yew Harness is still starting.");
|
|
144
146
|
return handle(request, device.id);
|
|
145
147
|
},
|
|
146
148
|
});
|
|
@@ -185,7 +187,7 @@ export function serveCommand() {
|
|
|
185
187
|
server.once("listening", () => resolve(true));
|
|
186
188
|
server.once("error", (error) => {
|
|
187
189
|
io.stderr.write(error.code === "EADDRINUSE"
|
|
188
|
-
? `yew: port ${port} is in use. Is Yew already running? Try 'yew open', or pick another port with --port.\n`
|
|
190
|
+
? `yew: port ${port} is in use. Is Yew Harness already running? Try 'yew open', or pick another port with --port.\n`
|
|
189
191
|
: `yew: could not start: ${error.message}\n`);
|
|
190
192
|
resolve(false);
|
|
191
193
|
});
|
|
@@ -213,12 +215,12 @@ export function serveCommand() {
|
|
|
213
215
|
const info = { port, pid: process.pid, startedAt: Date.now() };
|
|
214
216
|
writeFileSync(serveFile(home), JSON.stringify(info), { mode: 0o600 });
|
|
215
217
|
const url = `http://127.0.0.1:${port}/#t=${issueLoginToken(store)}`;
|
|
216
|
-
io.stdout.write(`Yew ${VERSION} is running at http://127.0.0.1:${port}/\nSign in with this link (works once, within 10 minutes):\n${url}\nStop with Ctrl-C. For a new link later, run: yew open\n`);
|
|
218
|
+
io.stdout.write(`Yew Harness ${VERSION} is running at http://127.0.0.1:${port}/\nSign in with this link (works once, within 10 minutes):\n${url}\nStop with Ctrl-C. For a new link later, run: yew open\n`);
|
|
217
219
|
if (values.open)
|
|
218
220
|
openBrowser(url);
|
|
219
221
|
return await new Promise((resolve) => {
|
|
220
222
|
const stop = () => {
|
|
221
|
-
io.stderr.write("Stopping Yew…\n");
|
|
223
|
+
io.stderr.write("Stopping Yew Harness…\n");
|
|
222
224
|
clearInterval(sweep);
|
|
223
225
|
clearInterval(remoteSweep);
|
|
224
226
|
scheduler.stop();
|
|
@@ -273,7 +275,7 @@ export function openCommand() {
|
|
|
273
275
|
process.kill(info.pid, 0);
|
|
274
276
|
}
|
|
275
277
|
catch {
|
|
276
|
-
io.stderr.write("yew: Yew is not running. Start it with: yew serve\n");
|
|
278
|
+
io.stderr.write("yew: Yew Harness is not running. Start it with: yew serve\n");
|
|
277
279
|
return EXIT_ERROR;
|
|
278
280
|
}
|
|
279
281
|
const { openDatabase } = await import("../server/db/database.js");
|
|
@@ -289,7 +291,7 @@ export function openCommand() {
|
|
|
289
291
|
}
|
|
290
292
|
else {
|
|
291
293
|
openBrowser(url);
|
|
292
|
-
io.stdout.write(`Opened Yew in the browser (http://127.0.0.1:${info.port}/).\n`);
|
|
294
|
+
io.stdout.write(`Opened Yew Harness in the browser (http://127.0.0.1:${info.port}/).\n`);
|
|
293
295
|
}
|
|
294
296
|
return EXIT_OK;
|
|
295
297
|
}
|
package/dist/cli/service.js
CHANGED
|
@@ -8,15 +8,15 @@ import { EXIT_ERROR, EXIT_OK, UsageError } from "./io.js";
|
|
|
8
8
|
import { serviceRunning } from "./serve.js";
|
|
9
9
|
const HELP = `Usage: yew service <install|uninstall|status> [options]
|
|
10
10
|
|
|
11
|
-
Start Yew when you log in, so your phone and scheduled tasks can reach
|
|
12
|
-
without a terminal open. On macOS this is a LaunchAgent for your user, on
|
|
13
|
-
Linux a systemd user unit. Yew is restarted if it exits with an error,
|
|
14
|
-
its log goes to the logs folder in Yew's data directory. Nothing
|
|
15
|
-
on your system until you run install.
|
|
11
|
+
Start Yew Harness when you log in, so your phone and scheduled tasks can reach
|
|
12
|
+
it without a terminal open. On macOS this is a LaunchAgent for your user, on
|
|
13
|
+
Linux a systemd user unit. Yew Harness is restarted if it exits with an error,
|
|
14
|
+
and its log goes to the logs folder in Yew Harness's data directory. Nothing
|
|
15
|
+
is changed on your system until you run install.
|
|
16
16
|
|
|
17
17
|
Commands:
|
|
18
|
-
install Start Yew at login, and start it now
|
|
19
|
-
uninstall Stop starting Yew at login, and stop it now
|
|
18
|
+
install Start Yew Harness at login, and start it now
|
|
19
|
+
uninstall Stop starting Yew Harness at login, and stop it now
|
|
20
20
|
status Show whether it is installed and running
|
|
21
21
|
|
|
22
22
|
Options:
|
|
@@ -83,7 +83,7 @@ export function systemdUnit(host, env, log) {
|
|
|
83
83
|
.map(([key, value]) => `Environment=${quoted(`${key}=${value}`)}`)
|
|
84
84
|
.join("\n");
|
|
85
85
|
return `[Unit]
|
|
86
|
-
Description=Yew, an AI-native multi-agent workbench
|
|
86
|
+
Description=Yew Harness, an AI-native multi-agent workbench
|
|
87
87
|
|
|
88
88
|
[Service]
|
|
89
89
|
ExecStart=${quoted(host.node)} ${quoted(host.entry)} serve
|
|
@@ -181,7 +181,7 @@ export function uninstallService(host, options) {
|
|
|
181
181
|
export function serviceCommand(host = realServiceHost()) {
|
|
182
182
|
return {
|
|
183
183
|
name: "service",
|
|
184
|
-
summary: "Start Yew when you log in",
|
|
184
|
+
summary: "Start Yew Harness when you log in",
|
|
185
185
|
async run(args, io) {
|
|
186
186
|
const { values, positionals } = parseArgs({
|
|
187
187
|
args,
|
|
@@ -216,13 +216,13 @@ export function serviceCommand(host = realServiceHost()) {
|
|
|
216
216
|
io.stdout.write(`${JSON.stringify({ installed: false, file })}\n`);
|
|
217
217
|
else {
|
|
218
218
|
io.stdout.write(had
|
|
219
|
-
? "Yew no longer starts at login, and was stopped.\n"
|
|
220
|
-
: "Yew was not set to start at login.\n");
|
|
219
|
+
? "Yew Harness no longer starts at login, and was stopped.\n"
|
|
220
|
+
: "Yew Harness was not set to start at login.\n");
|
|
221
221
|
}
|
|
222
222
|
return EXIT_OK;
|
|
223
223
|
}
|
|
224
224
|
if (!serviceLoaded(host) && serviceRunning(home)) {
|
|
225
|
-
io.stderr.write("yew: Yew is already running, started by hand. Stop that 'yew serve' first, then run this again.\n");
|
|
225
|
+
io.stderr.write("yew: Yew Harness is already running, started by hand. Stop that 'yew serve' first, then run this again.\n");
|
|
226
226
|
return EXIT_ERROR;
|
|
227
227
|
}
|
|
228
228
|
const { code, log } = installService(host, home, io.env, { start: true });
|
|
@@ -233,7 +233,7 @@ export function serviceCommand(host = realServiceHost()) {
|
|
|
233
233
|
if (values.json)
|
|
234
234
|
io.stdout.write(`${JSON.stringify({ installed: true, file, log })}\n`);
|
|
235
235
|
else {
|
|
236
|
-
io.stdout.write(`Yew now starts when you log in, and was started.\nLog: ${log}\nOpen the web interface with 'yew open'.\n`);
|
|
236
|
+
io.stdout.write(`Yew Harness now starts when you log in, and was started.\nLog: ${log}\nOpen the web interface with 'yew open'.\n`);
|
|
237
237
|
}
|
|
238
238
|
return EXIT_OK;
|
|
239
239
|
},
|
|
@@ -539,7 +539,7 @@ export class Agents {
|
|
|
539
539
|
detail =
|
|
540
540
|
error instanceof YewError
|
|
541
541
|
? error.message
|
|
542
|
-
: `Yew hit an internal error: ${error.message}`;
|
|
542
|
+
: `Yew Harness hit an internal error: ${error.message}`;
|
|
543
543
|
if (!(error instanceof YewError))
|
|
544
544
|
this.#log(`session ${sessionId}: ${error.stack ?? error}`);
|
|
545
545
|
// The code lets the interface explain the problem in the person's language.
|
|
@@ -78,7 +78,7 @@ function scanTemp(home, inUse) {
|
|
|
78
78
|
walk(real, false, true);
|
|
79
79
|
return scan;
|
|
80
80
|
}
|
|
81
|
-
const outside = () => conflict("The tmp folder in Yew's data folder is a link to somewhere else. Yew does not delete through it.", undefined, "temp-outside");
|
|
81
|
+
const outside = () => conflict("The tmp folder in Yew Harness's data folder is a link to somewhere else. Yew Harness does not delete through it.", undefined, "temp-outside");
|
|
82
82
|
export function dataUsage(home, inUse = () => false, now = Date.now()) {
|
|
83
83
|
const bytes = {
|
|
84
84
|
database: 0,
|
|
@@ -17,7 +17,7 @@ export function openDatabase(path) {
|
|
|
17
17
|
export function migrate(db) {
|
|
18
18
|
const row = db.prepare("PRAGMA user_version").get();
|
|
19
19
|
if (row.user_version > migrations.length) {
|
|
20
|
-
throw new Error(`The database was written by a newer version of Yew (schema ${row.user_version}); upgrade Yew.`);
|
|
20
|
+
throw new Error(`The database was written by a newer version of Yew Harness (schema ${row.user_version}); upgrade Yew Harness.`);
|
|
21
21
|
}
|
|
22
22
|
for (let version = row.user_version; version < migrations.length; version++) {
|
|
23
23
|
transaction(db, () => {
|
package/dist/server/export.js
CHANGED
|
@@ -29,7 +29,7 @@ const ZH = {
|
|
|
29
29
|
image: "图片",
|
|
30
30
|
stopped: "已停止",
|
|
31
31
|
modelChanged: "换了模型",
|
|
32
|
-
restarted: "Yew 重启时这个会话在干活,已标为待核对。检查过后点「继续」接着运行。",
|
|
32
|
+
restarted: "Yew Harness 重启时这个会话在干活,已标为待核对。检查过后点「继续」接着运行。",
|
|
33
33
|
changed: "{by} 改了这个会话的设置",
|
|
34
34
|
compacted: "较早的记录已压成摘要",
|
|
35
35
|
modelError: "模型请求失败",
|
|
@@ -92,7 +92,7 @@ const EN = {
|
|
|
92
92
|
image: "Image",
|
|
93
93
|
stopped: "Stopped",
|
|
94
94
|
modelChanged: "Model changed",
|
|
95
|
-
restarted: "Yew restarted while this session was working, so it is marked for review. Check it, then choose Continue.",
|
|
95
|
+
restarted: "Yew Harness restarted while this session was working, so it is marked for review. Check it, then choose Continue.",
|
|
96
96
|
changed: "{by} changed this session's settings",
|
|
97
97
|
compacted: "Earlier messages were summarized",
|
|
98
98
|
modelError: "The model request failed",
|
|
@@ -16,7 +16,7 @@ const runOsascript = (args) => new Promise((resolve, reject) => {
|
|
|
16
16
|
*/
|
|
17
17
|
export async function pickFolder(platform = process.platform, run = runOsascript) {
|
|
18
18
|
if (platform !== "darwin") {
|
|
19
|
-
throw new YewError("not-supported", 501, "Yew cannot open a folder picker on this computer. Type the folder's path instead.");
|
|
19
|
+
throw new YewError("not-supported", 501, "Yew Harness cannot open a folder picker on this computer. Type the folder's path instead.");
|
|
20
20
|
}
|
|
21
21
|
try {
|
|
22
22
|
const out = (await run(["-e", "activate", "-e", "POSIX path of (choose folder)"])).trim();
|
package/dist/server/http/app.js
CHANGED
|
@@ -20,10 +20,10 @@ import { searchRoutes } from "./search.js";
|
|
|
20
20
|
import { authRoutes, deviceLimits, localOnly, requireBrowser, securityHeaders, } from "./security.js";
|
|
21
21
|
import { skillRoutes } from "./skills.js";
|
|
22
22
|
import { systemRoutes } from "./system.js";
|
|
23
|
-
const NOT_BUILT = `<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>Yew</title>
|
|
23
|
+
const NOT_BUILT = `<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>Yew Harness</title>
|
|
24
24
|
<meta name="color-scheme" content="light dark"></head><body>
|
|
25
|
-
<p>网页界面还没有构建。在 Yew 的目录运行 npm run build:web,然后刷新这个页面。</p>
|
|
26
|
-
<p lang="en">The web interface has not been built yet. In the Yew folder, run npm run build:web, then reload this page.</p>
|
|
25
|
+
<p>网页界面还没有构建。在 Yew Harness 的目录运行 npm run build:web,然后刷新这个页面。</p>
|
|
26
|
+
<p lang="en">The web interface has not been built yet. In the Yew Harness folder, run npm run build:web, then reload this page.</p>
|
|
27
27
|
</body></html>`;
|
|
28
28
|
export function createApp(options) {
|
|
29
29
|
const log = options.log ?? ((line) => process.stderr.write(`${line}\n`));
|
package/dist/server/http/data.js
CHANGED
|
@@ -44,7 +44,7 @@ export function dataRoutes(store, options) {
|
|
|
44
44
|
}
|
|
45
45
|
const dir = target === "home" ? options.home : exported;
|
|
46
46
|
if (dir === null) {
|
|
47
|
-
throw conflict("Nothing was exported since Yew started.", { field: "target" }, "no-export");
|
|
47
|
+
throw conflict("Nothing was exported since Yew Harness started.", { field: "target" }, "no-export");
|
|
48
48
|
}
|
|
49
49
|
// The folder itself is opened, so its contents are what the person sees.
|
|
50
50
|
await showInFileManager(dir, { platform, run: options.run, inside: true, field: "target" });
|
package/dist/server/http/mcp.js
CHANGED
|
@@ -123,11 +123,11 @@ export function oauthCallbackRoute(hub, log) {
|
|
|
123
123
|
c.header("Cache-Control", "no-store");
|
|
124
124
|
try {
|
|
125
125
|
const name = await hub.completeSignIn(state, c.req.query("code") ?? null, c.req.query("error") ?? null, c.req.query("iss") ?? null);
|
|
126
|
-
return c.html(page("已登录 · Signed in", `已登录 ${html(name)},可以关掉这个页面回到 Yew。<br>Signed in to ${html(name)}. You can close this page and go back to Yew.`));
|
|
126
|
+
return c.html(page("已登录 · Signed in", `已登录 ${html(name)},可以关掉这个页面回到 Yew Harness。<br>Signed in to ${html(name)}. You can close this page and go back to Yew Harness.`));
|
|
127
127
|
}
|
|
128
128
|
catch (error) {
|
|
129
129
|
log?.(`mcp: sign-in did not finish: ${error.message}`);
|
|
130
|
-
return c.html(page("没有登录 · Not signed in", `${html(error.message)}<br>回到 Yew 的「MCP 服务」再试一次。Go back to MCP servers in Yew and try again.`), 400);
|
|
130
|
+
return c.html(page("没有登录 · Not signed in", `${html(error.message)}<br>回到 Yew Harness 的「MCP 服务」再试一次。Go back to MCP servers in Yew Harness and try again.`), 400);
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
return app;
|
|
@@ -50,6 +50,6 @@ export function errorHandler(log) {
|
|
|
50
50
|
return problemResponse(c, error.status, "http-error", titleFor(error.status), error.message);
|
|
51
51
|
}
|
|
52
52
|
log(`[${c.get("requestId")}] ${c.req.method} ${c.req.path}: ${error.stack ?? error.message}`);
|
|
53
|
-
return problemResponse(c, 500, "internal-error", titleFor(500), "Something went wrong inside Yew. The request ID is in the log.");
|
|
53
|
+
return problemResponse(c, 500, "internal-error", titleFor(500), "Something went wrong inside Yew Harness. The request ID is in the log.");
|
|
54
54
|
};
|
|
55
55
|
}
|