ygl-trees 0.78.0 → 0.79.1
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 +25 -0
- package/README.md +24 -3
- package/dist/apps/cli/src/bin.js +34 -7
- package/dist/bundle/bin.cjs +644 -105
- package/dist/packages/core/database/src/db.js +73 -5
- package/dist/packages/knowledge/skills/src/cmds.js +26 -1
- package/dist/packages/ops/tools/src/agent-cmds.js +35 -0
- package/dist/packages/ops/tools/src/db-cmds.js +70 -0
- package/dist/packages/ops/tools/src/doctor.js +79 -24
- package/dist/packages/ops/tools/src/webui.js +9 -0
- package/dist/packages/research/pipeline/src/cmds.js +95 -10
- package/dist/packages/research/pipeline/src/predict.js +82 -9
- package/dist/packages/research/produce/src/produce-cmds.js +6 -0
- package/dist/packages/research/produce/src/project-cmds.js +27 -2
- package/dist/packages/techtree/model/src/cmds.js +236 -72
- package/dist/packages/techtree/model/src/reads.js +8 -0
- package/package.json +5 -4
- package/skills/ygl-trees-quickstart/SKILL.md +18 -7
- package/skills/ygl-trees-research/SKILL.md +2 -0
- package/skills/ygl-trees-techtree/SKILL.md +2 -0
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
触发词:ygl-trees 入门、初始化、quickstart、工作区、退出码、exit code、备份、export、
|
|
10
10
|
PostgreSQL、sync、migrate、镜像、job、tick、定时、doctor、健康检查、任务、task、
|
|
11
11
|
关联、rel、插件、plugin、WebUI、webui、仪表盘、dashboard、bench、基准、bundle。
|
|
12
|
-
version: 0.
|
|
12
|
+
version: 0.79.0
|
|
13
13
|
tags: ygl-trees,quickstart,backup,postgres,schedule,doctor,plugin,webui,bench
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -56,25 +56,35 @@ ygl-trees llms --json # 结构化 JSON
|
|
|
56
56
|
## 2b. 运维命令速查
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
ygl-trees doctor #
|
|
60
|
-
ygl-trees doctor --fix #
|
|
59
|
+
ygl-trees doctor # 10 项健康检查(含锁 pid 存活、幻影写入对账)
|
|
60
|
+
ygl-trees doctor --fix # 一键安全修复(脏索引 + 死 pid 陈旧锁;活 holder 不动)
|
|
61
|
+
ygl-trees db unlock # 清残留 .ygllock(死 pid 直清;活 holder 回显其命令行并拒绝,--force 强清)
|
|
61
62
|
ygl-trees kb rm <id> # 删除笔记(与 skill rm 对称)
|
|
62
63
|
ygl-trees webui serve --host 0.0.0.0 --port 8642 # LAN/WSL 可访问
|
|
64
|
+
ygl-trees webui serve --help # 只打印用法不启服务(0.79.1 短路)
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
PG 迁移预检:`db migrate pg` 前自动逐表扫描 INTEGER 列类型——非整数值会**点名 table.column rowid=N** 而非迁移时才爆。
|
|
66
68
|
|
|
67
|
-
##
|
|
69
|
+
## 2b2. 多会话安全(0.79)
|
|
68
70
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
+
- `tree use` / `project use` 落 `tree.use` / `project.use` 事件(`YGL_SESSION` 会话标识)
|
|
72
|
+
- `agent brief` 的 `selection_changed`:最近 10 分钟选择变更;跨会话变更置顶提示带 `-t`/`-p`
|
|
73
|
+
- `kb add` 回执自检(`verified:true`)+ 工作区回显(防写错 home 的"丢笔记"事故)
|
|
74
|
+
- `research claim link <cid> <sid> --by-source`:来源下全部证据一次挂齐;误传来源 id 会列出其证据 id
|
|
75
|
+
|
|
76
|
+
## 2c. DB 锁行为(0.68 → 0.79.1)
|
|
77
|
+
|
|
78
|
+
- CLI 短命令:进程级锁(保护写窗口,退出自动释放);锁文件记录**持有者命令行**,撞锁/`db unlock`/`doctor` 都回显真实持有者身份
|
|
79
|
+
- webui serve:无锁(WAL 并发安全,与 CLI 共存;从不取写锁)
|
|
71
80
|
- 死锁自愈:下一进程探测持有者 PID,死则即时清(无需手动 rmdir)
|
|
81
|
+
- 无锁进程(serve / `db unlock` 自身)退出绝不误清并行会话的活锁(0.79.1 所有权守卫)
|
|
72
82
|
- YGL_TEST=1:全旁路(测试并行)
|
|
73
83
|
|
|
74
84
|
## 3. 健康检查与任务
|
|
75
85
|
|
|
76
86
|
```bash
|
|
77
|
-
ygl-trees doctor #
|
|
87
|
+
ygl-trees doctor # 10 项健康检查(schema/索引/FTS/重复/孤儿/config/锁存活/eval信封/插件/幻影写入)
|
|
78
88
|
ygl-trees task add "<标题>" # 建任务(todo 起步)
|
|
79
89
|
ygl-trees task list # 按状态分组
|
|
80
90
|
ygl-trees task done <id> # 勾销(全程留痕)
|
|
@@ -120,6 +130,7 @@ ygl-trees db export <file.sql> # 全部数据表 + 行数摘要
|
|
|
120
130
|
ygl-trees db sync pg <url> # 可刷新 PK-only 镜像
|
|
121
131
|
ygl-trees db migrate pg <url> [--fresh] # 一次性完整保真迁移
|
|
122
132
|
ygl-trees job add <title> -- "<cmd>" --every 60 # cron 每分钟跑 job tick
|
|
133
|
+
ygl-trees job add "闸门探针" -- "node probe.mjs" --every 30 # 树节奏化监控:任意命令皆可(0.79.1 实证)
|
|
123
134
|
```
|
|
124
135
|
|
|
125
136
|
禁止双后端同写:ygl-trees 永远只写 SQLite,PG 是单向出口。
|
|
@@ -57,5 +57,7 @@ ygl-trees produce export <reportId> report.md
|
|
|
57
57
|
|
|
58
58
|
- 先 `agent brief --json` 看 next_actions(它会告诉你缺来源/缺证据/缺断言)
|
|
59
59
|
- 每条断言至少一条证据再进报告;contested 的要么补证据要么 resolve
|
|
60
|
+
- 预测断言(`[预测·N天]`)定期 `research predict audit` 回测:本地判据自动测;`--state <file|url>`
|
|
61
|
+
桥接外部计数(裸键名后缀匹配 `counts.y_imported`);已 resolve 的默认隐藏(`--all` 查看终态表)
|
|
60
62
|
- `--json` 输出可直接 parse 拿 id;列表命令字段:source(id,title,url,relevance,…)、
|
|
61
63
|
claim(id,text,status,confidence,sup,ref)、evidence(id,source,locator,quote,used_by)
|
|
@@ -38,6 +38,7 @@ ygl-trees node index && ygl-trees node validate
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
ygl-trees node can steel --state "lab_level=3,has_eng=1" # 三类失败分开列+成本系数
|
|
41
|
+
ygl-trees node can a b c --state-file bags.json # 批量:一进程测 N 节点(探针 1s×N → 1s)
|
|
41
42
|
ygl-trees node ready # 当前可解锁集合
|
|
42
43
|
ygl-trees node path steel # 解锁顺序+累计成本(目标恒最后)
|
|
43
44
|
ygl-trees node ancestors bronze # 闭包索引直查,depth=1 是直接父
|
|
@@ -46,6 +47,7 @@ ygl-trees node unlock mining && ygl-trees node lock mining
|
|
|
46
47
|
|
|
47
48
|
- 写入时环守卫:门控边(prereq/unlock)成环当场拒绝
|
|
48
49
|
- `node can` 输出:missing_required(阻塞)/ blocked_by(被排斥)/ missing_optional(不阻塞)
|
|
50
|
+
- `--state-file` 两种形状:扁平 `{"y_imported":40}` 全节点共享;按节点 `{"a":{"y_imported":40}}` 各取各袋;多键 `--json` 返回数组(0.79.1)
|
|
49
51
|
|
|
50
52
|
## 3. 迁移与保真
|
|
51
53
|
|