@tenonai/yew 1.3.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 +41 -2
- package/README.md +9 -18
- package/dist/cli/app.js +23 -26
- package/dist/cli/export.js +5 -5
- package/dist/cli/main.js +0 -14
- 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 +5 -6
- package/dist/cli/serve.js +13 -11
- package/dist/cli/service.js +14 -41
- package/dist/server/agent/context.js +2 -3
- package/dist/server/agent/runner.js +1 -1
- package/dist/server/data-usage.js +2 -3
- package/dist/server/db/database.js +1 -1
- package/dist/server/db/migrations.js +4 -0
- package/dist/server/export.js +2 -2
- package/dist/server/folder-picker.js +1 -1
- package/dist/server/http/api.js +3 -0
- 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/keys.js +5 -24
- package/dist/server/mail/post.js +2 -2
- package/dist/server/mcp-builtin.js +2 -3
- package/dist/server/mcp-config.js +4 -4
- package/dist/server/mcp-oauth.js +6 -6
- package/dist/server/paths.js +6 -15
- package/dist/server/settings.js +3 -0
- package/dist/server/skills.js +1 -2
- package/dist/server/store.js +2 -2
- package/dist/server/tools/mail.js +1 -1
- package/dist/server/tools/registry.js +2 -2
- package/dist/shared/policy.js +3 -3
- 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-B_NesKxw.js +68 -0
- 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-BtK_SzpF.css +0 -1
- package/web/dist/assets/index-C0rnUFI-.js +0 -68
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
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`,不会运行)。这一版起,打包前先清空编译目录。
|
|
20
|
+
|
|
21
|
+
## [1.4.0] - 2026-11-18
|
|
22
|
+
|
|
23
|
+
### 新增
|
|
24
|
+
|
|
25
|
+
- 侧栏底部站着 Yew(那个红发女孩),旁边的气泡说眼下最要紧的一件事:几件事等你处理、哪个会话出错了或做完了等你核对、哪些会话在干活。说的是一件事或一个会话时,点气泡直接过去。刚打开时她先问候,夜里没事时打瞌睡。
|
|
26
|
+
- 打开 Yew 时有一秒左右的开场:标志画出来,Yew 招手,下面列出连接、读取设置、会话和审批中心这几步。点一下或按任意键跳过;系统设了减少动态效果时不播。
|
|
27
|
+
- 会话和首页的背后多了一个很淡的「Yew」字标。
|
|
28
|
+
- 设置菜单里多了一项,可以把侧栏的 Yew 和开场一起关掉。
|
|
29
|
+
|
|
30
|
+
### 变更
|
|
31
|
+
|
|
32
|
+
- 隐私政策和用户协议更新到 2.5:删去第 5 段末尾从 Jig 升级要删的数据那一句,Yew 不再碰 Jig 的数据。
|
|
33
|
+
|
|
34
|
+
### 移除
|
|
35
|
+
|
|
36
|
+
- Yew 不再认 Jig 的东西:不再把 `~/.jig` 搬到 `~/.yew`,不再从钥匙串里 Jig 的位置搬 Key,不再认 `JIG_HOME` 这类环境变量,不再替换 Jig 装的开机启动和启动图标,项目里的 `.jig/skills` 也不再读。还没从 Jig 换过来的,装好 Yew 后用 `yew key set` 重新填 Key,需要的话再运行 `yew service install`、`yew app install`。
|
|
37
|
+
|
|
38
|
+
### 修复
|
|
39
|
+
|
|
40
|
+
- 会话请你授权「管理 Yew」时,授权卡片上显示的是工具的内部名,现在显示「管理 Yew」。
|
|
41
|
+
- 技能设置里列的读取位置漏了项目里的 `.yew/skills`。
|
|
42
|
+
- 随包的第三方许可声明开头写的还是 Jig。
|
|
4
43
|
|
|
5
44
|
## [1.3.0] - 2026-11-18
|
|
6
45
|
|
|
@@ -15,7 +54,7 @@
|
|
|
15
54
|
|
|
16
55
|
### 变更
|
|
17
56
|
|
|
18
|
-
- Jig 改名为 Yew,用上 Yew
|
|
57
|
+
- Jig 改名为 Yew,用上 Yew 的名字、标志、配色和红发女孩 Yew 的形象:界面、命令行、文档和手机应用里都叫 Yew。一句话定义不变。
|
|
19
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 装的开机启动和启动图标。
|
|
20
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。
|
|
21
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,37 +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
|
-
### 从 Jig 升级
|
|
23
|
-
|
|
24
|
-
Yew 原名 Jig,2026-11-18 改名。从 Jig 升级:
|
|
25
|
-
|
|
26
|
-
1. 停掉正在运行的 Jig,换装新包:`npm uninstall -g @tenonai/jig`,再 `npm install -g @tenonai/yew`。命令改叫 `yew`。
|
|
27
|
-
2. 第一次运行 `yew` 时,数据目录 `~/.jig` 会搬到 `~/.yew`,原处留一个指向新目录的链接;API Key 第一次用到时从钥匙串里旧的位置搬过来。环境变量改叫 `YEW_HOME` 这类名字,旧的 `JIG_HOME` 这类仍然认。
|
|
28
|
-
3. 设过开机启动或启动图标的,各运行一次 `yew service install`、`yew app install`,换成 Yew 的,旧的 Jig 那份会一起撤掉。
|
|
29
|
-
4. 手机上的 Yew 是新的应用,要重新安装并重新配对;手机上原来的 Jig 应用连不上 Yew,可以卸掉。
|
|
30
|
-
|
|
31
22
|
## 手机端
|
|
32
23
|
|
|
33
|
-
手机上的 Yew 只连接你自己电脑上的 Yew:在电脑上显示二维码,手机扫码配对,之后在手机上看会话、处理审批中心里的事。两端经中继通信,内容端到端加密;默认用 Tenon AI 运行的中继,也可以自己部署(见 `relay/`)。
|
|
24
|
+
手机上的 Yew Harness 只连接你自己电脑上的 Yew Harness:在电脑上显示二维码,手机扫码配对,之后在手机上看会话、处理审批中心里的事。两端经中继通信,内容端到端加密;默认用 Tenon AI 运行的中继,也可以自己部署(见 `relay/`)。
|
|
34
25
|
|
|
35
|
-
- 安卓:安装包(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
|
|
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。更新时系统如果提示签名不一致,不要安装。
|
|
36
27
|
- iPhone:还没有上架,之后经 TestFlight 和 App Store 发布。
|
|
37
28
|
|
|
38
29
|
## 隐私
|
|
39
30
|
|
|
40
|
-
Yew 不收集任何数据,也不含统计、遥测或上报代码。会话、消息和设置存在你自己的电脑上,API Key 存在系统钥匙串里。你选用的模型服务商会收到发给它的对话内容,这部分适用该服务商的隐私政策。
|
|
31
|
+
Yew Harness 不收集任何数据,也不含统计、遥测或上报代码。会话、消息和设置存在你自己的电脑上,API Key 存在系统钥匙串里。你选用的模型服务商会收到发给它的对话内容,这部分适用该服务商的隐私政策。
|
|
41
32
|
|
|
42
33
|
## 文档
|
|
43
34
|
|
|
44
35
|
- [产品蓝图](docs/blueprint.md):为什么做、做什么、不做什么、怎么验收
|
|
45
|
-
- [对外介绍](docs/introduction.md):官网、商店和各渠道介绍 Yew 时用的定义、简介和能写的能力
|
|
36
|
+
- [对外介绍](docs/introduction.md):官网、商店和各渠道介绍 Yew Harness 时用的定义、简介和能写的能力
|
|
46
37
|
- 实现计划:[M1](docs/archive/m1-plan.md)、[M2](docs/archive/m2-plan.md)、[M3](docs/archive/m3-plan.md)
|
|
47
38
|
- [可借鉴的开源项目](docs/prior-art.md)
|
|
48
|
-
- [数据清单](docs/data-inventory.md):Yew 在你电脑上存了哪些数据、怎么删除
|
|
39
|
+
- [数据清单](docs/data-inventory.md):Yew Harness 在你电脑上存了哪些数据、怎么删除
|
|
49
40
|
- [iPhone 应用上架](docs/app-store.md):商店里填什么、进度
|
|
50
41
|
- [更新记录](CHANGELOG.md)
|
|
51
42
|
- [开发约定](AGENTS.md)
|
package/dist/cli/app.js
CHANGED
|
@@ -4,21 +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 {
|
|
8
|
-
import { VERSION } from "../shared/version.js";
|
|
7
|
+
import { PRODUCT, VERSION } from "../shared/version.js";
|
|
9
8
|
import { EXIT_ERROR, EXIT_OK, UsageError } from "./io.js";
|
|
10
9
|
const HELP = `Usage: yew app <install|uninstall|status> [options]
|
|
11
10
|
|
|
12
|
-
Put a Yew icon in your Applications folder (macOS). Clicking it starts
|
|
13
|
-
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.
|
|
14
14
|
|
|
15
|
-
The icon is a small launcher for this installation of Yew: it runs the
|
|
16
|
-
yew you run in a terminal, with the Node.js found now. Run install again
|
|
17
|
-
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.
|
|
18
18
|
|
|
19
19
|
Commands:
|
|
20
20
|
install Create ~/Applications/Yew.app
|
|
21
|
-
uninstall Remove it; Yew itself and your data stay
|
|
21
|
+
uninstall Remove it; Yew Harness itself and your data stay
|
|
22
22
|
status Show whether it is there
|
|
23
23
|
|
|
24
24
|
Options:
|
|
@@ -42,6 +42,8 @@ export function realAppHost() {
|
|
|
42
42
|
const xml = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
43
43
|
/** A value inside single quotes in a shell script. */
|
|
44
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`;
|
|
45
47
|
export function infoPlist() {
|
|
46
48
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
47
49
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -51,6 +53,10 @@ export function infoPlist() {
|
|
|
51
53
|
<string>Yew</string>
|
|
52
54
|
<key>CFBundleDisplayName</key>
|
|
53
55
|
<string>Yew</string>
|
|
56
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
57
|
+
<string>en</string>
|
|
58
|
+
<key>LSHasLocalizedDisplayName</key>
|
|
59
|
+
<true/>
|
|
54
60
|
<key>CFBundleIdentifier</key>
|
|
55
61
|
<string>cn.tenonai.apps.yew.launcher</string>
|
|
56
62
|
<key>CFBundleExecutable</key>
|
|
@@ -91,37 +97,29 @@ while [ "$tries" -lt 60 ]; do
|
|
|
91
97
|
if ${yew} open >/dev/null 2>&1; then exit 0; fi
|
|
92
98
|
tries=$((tries + 1))
|
|
93
99
|
done
|
|
94
|
-
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
|
|
95
101
|
exit 1
|
|
96
102
|
`;
|
|
97
103
|
}
|
|
98
104
|
const SIZES = [16, 32, 128, 256, 512];
|
|
99
105
|
/** Where the launcher goes: the person's own Applications folder. */
|
|
100
106
|
export const appPath = (host) => join(host.homeDir, "Applications", "Yew.app");
|
|
101
|
-
/**
|
|
102
|
-
* Jig's launcher, from before Jig was renamed Yew: taken away when Yew's is made or removed. Only when
|
|
103
|
-
* it is the one Jig made, by the executable it has.
|
|
104
|
-
*/
|
|
105
|
-
function removeJigApp(host) {
|
|
106
|
-
const old = join(host.homeDir, "Applications", JIG_APP);
|
|
107
|
-
if (existsSync(join(old, "Contents", "MacOS", JIG_LAUNCHER))) {
|
|
108
|
-
rmSync(old, { recursive: true, force: true });
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
107
|
export const appInstalled = (host) => existsSync(join(appPath(host), "Contents", "MacOS", "yew-launcher"));
|
|
112
108
|
/** Makes Yew.app; returns whether its icon could be made (the app works without it). */
|
|
113
109
|
export function installApp(host, home, env) {
|
|
114
110
|
const app = appPath(host);
|
|
115
|
-
removeJigApp(host);
|
|
116
111
|
// Sessions' commands need your PATH; an app starts with a bare one.
|
|
117
112
|
const vars = { PATH: env.PATH ?? "/usr/bin:/bin" };
|
|
118
|
-
if (
|
|
113
|
+
if (env.YEW_HOME)
|
|
119
114
|
vars.YEW_HOME = home;
|
|
120
115
|
rmSync(app, { recursive: true, force: true });
|
|
121
116
|
const contents = join(app, "Contents");
|
|
122
117
|
mkdirSync(join(contents, "MacOS"), { recursive: true });
|
|
123
118
|
mkdirSync(join(contents, "Resources"), { recursive: true });
|
|
124
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);
|
|
125
123
|
const launcher = join(contents, "MacOS", "yew-launcher");
|
|
126
124
|
writeFileSync(launcher, launcherScript(host, vars, join(home, "logs", "serve.log")));
|
|
127
125
|
chmodSync(launcher, 0o755);
|
|
@@ -156,12 +154,11 @@ export function installApp(host, home, env) {
|
|
|
156
154
|
}
|
|
157
155
|
export function uninstallApp(host) {
|
|
158
156
|
rmSync(appPath(host), { recursive: true, force: true });
|
|
159
|
-
removeJigApp(host);
|
|
160
157
|
}
|
|
161
158
|
export function appCommand(host = realAppHost()) {
|
|
162
159
|
return {
|
|
163
160
|
name: "app",
|
|
164
|
-
summary: "Put a Yew icon in Applications (macOS)",
|
|
161
|
+
summary: "Put a Yew Harness icon in Applications (macOS)",
|
|
165
162
|
async run(args, io) {
|
|
166
163
|
const { values, positionals } = parseArgs({
|
|
167
164
|
args,
|
|
@@ -185,7 +182,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
185
182
|
if (values.json)
|
|
186
183
|
io.stdout.write(`${JSON.stringify({ installed, app })}\n`);
|
|
187
184
|
else
|
|
188
|
-
io.stdout.write(`Yew icon: ${installed ? app : "not installed"}\n`);
|
|
185
|
+
io.stdout.write(`Yew Harness icon: ${installed ? app : "not installed"}\n`);
|
|
189
186
|
return EXIT_OK;
|
|
190
187
|
}
|
|
191
188
|
if (action === "uninstall") {
|
|
@@ -193,7 +190,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
193
190
|
if (values.json)
|
|
194
191
|
io.stdout.write(`${JSON.stringify({ installed: false, app })}\n`);
|
|
195
192
|
else
|
|
196
|
-
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");
|
|
197
194
|
return EXIT_OK;
|
|
198
195
|
}
|
|
199
196
|
const { yewHome } = await import("../server/paths.js");
|
|
@@ -201,7 +198,7 @@ export function appCommand(host = realAppHost()) {
|
|
|
201
198
|
if (values.json)
|
|
202
199
|
io.stdout.write(`${JSON.stringify({ installed: true, app, icon })}\n`);
|
|
203
200
|
else {
|
|
204
|
-
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`);
|
|
205
202
|
if (!icon)
|
|
206
203
|
io.stderr.write("yew: the icon could not be made; the app has a plain one.\n");
|
|
207
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/main.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { moveJigHome } from "../server/from-jig.js";
|
|
3
2
|
import { appCommand } from "./app.js";
|
|
4
3
|
import { exportCommand } from "./export.js";
|
|
5
4
|
import { keyCommand } from "./key.js";
|
|
@@ -42,17 +41,4 @@ const commands = [
|
|
|
42
41
|
};
|
|
43
42
|
}),
|
|
44
43
|
];
|
|
45
|
-
// Jig is now Yew: its data folder moves the first time Yew runs (blueprint, section 12).
|
|
46
|
-
try {
|
|
47
|
-
const move = moveJigHome(process.env);
|
|
48
|
-
if (move && "moved" in move) {
|
|
49
|
-
process.stderr.write(`yew: Jig is now Yew. Moved its data folder ${move.moved} to ${move.to} and left a link in its place.\n`);
|
|
50
|
-
}
|
|
51
|
-
else if (move && "busy" in move) {
|
|
52
|
-
process.stderr.write(`yew: Jig is still running from ${move.folder} (process ${move.busy}). Stop it, then start Yew again to move its data; until then Yew uses ${move.folder}.\n`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
process.stderr.write(`yew: could not move Jig's data folder: ${error.message}\n`);
|
|
57
|
-
}
|
|
58
44
|
process.exitCode = await run(process.argv.slice(2), { stdout: process.stdout, stderr: process.stderr, stdin: process.stdin, env: process.env }, commands);
|
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)
|
|
@@ -73,8 +73,7 @@ export function sendCommand() {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
// Inside a session's shell the letter is that session's, with its quota, limits and hold.
|
|
76
|
-
const
|
|
77
|
-
const fromId = fromJigEnv(io.env, "SESSION")?.trim();
|
|
76
|
+
const fromId = io.env.YEW_SESSION?.trim();
|
|
78
77
|
let sender = { kind: "cli" };
|
|
79
78
|
if (fromId) {
|
|
80
79
|
try {
|
|
@@ -112,10 +111,10 @@ export function sendCommand() {
|
|
|
112
111
|
io.stdout.write(`Sent letter ${letter.id} to ${session.name}.\n`);
|
|
113
112
|
}
|
|
114
113
|
if (letter.status === "held") {
|
|
115
|
-
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");
|
|
116
115
|
}
|
|
117
116
|
else if (!serviceRunning(home)) {
|
|
118
|
-
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");
|
|
119
118
|
}
|
|
120
119
|
return EXIT_OK;
|
|
121
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
|
}
|