@minonl/dia 0.0.12 → 0.0.13
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/dist/cli.js +5 -4
- package/docs/status.md +1 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1898,11 +1898,12 @@ function assertInside(base, p) {
|
|
|
1898
1898
|
throw new Error(`E_MANIFEST: source escapes kit: ${p}`);
|
|
1899
1899
|
return abs;
|
|
1900
1900
|
}
|
|
1901
|
+
var TREE_SKIP = new Set([".git", "node_modules", ".data"]);
|
|
1901
1902
|
function walkFiles(root) {
|
|
1902
1903
|
const out = [];
|
|
1903
1904
|
(function rec(dir) {
|
|
1904
1905
|
for (const e of readdirSync3(dir, { withFileTypes: true })) {
|
|
1905
|
-
if (
|
|
1906
|
+
if (TREE_SKIP.has(e.name) || e.name === "kit.lock")
|
|
1906
1907
|
continue;
|
|
1907
1908
|
const p = join10(dir, e.name);
|
|
1908
1909
|
if (e.isDirectory())
|
|
@@ -2108,7 +2109,7 @@ function install(from, opts = {}) {
|
|
|
2108
2109
|
if (!alreadyInstalled || hashTree(src.dir) !== hashTree(target)) {
|
|
2109
2110
|
rmSync3(target, { recursive: true, force: true });
|
|
2110
2111
|
mkdirSync7(target, { recursive: true });
|
|
2111
|
-
cpSync(src.dir, target, { recursive: true, dereference: true, filter: (p) => !p.split(sep4).
|
|
2112
|
+
cpSync(src.dir, target, { recursive: true, dereference: true, filter: (p) => !p.split(sep4).some((s) => TREE_SKIP.has(s)) });
|
|
2112
2113
|
}
|
|
2113
2114
|
const rendered = renderContent(src.dir, target, m) ?? planned;
|
|
2114
2115
|
const appliedConfig = apply(m.config ?? []);
|
|
@@ -2710,7 +2711,7 @@ function walkFiles2(root) {
|
|
|
2710
2711
|
const out = [];
|
|
2711
2712
|
(function rec(dir) {
|
|
2712
2713
|
for (const e of readdirSync6(dir, { withFileTypes: true })) {
|
|
2713
|
-
if (
|
|
2714
|
+
if (TREE_SKIP.has(e.name))
|
|
2714
2715
|
continue;
|
|
2715
2716
|
const p = join13(dir, e.name);
|
|
2716
2717
|
if (e.isDirectory())
|
|
@@ -2880,7 +2881,7 @@ function install2(from, opts = {}) {
|
|
|
2880
2881
|
const staging = join13(idDir, `.staging-${process.pid}-${Date.now().toString(36)}`);
|
|
2881
2882
|
rmSync4(staging, { recursive: true, force: true });
|
|
2882
2883
|
mkdirSync10(staging, { recursive: true });
|
|
2883
|
-
cpSync2(src.dir, staging, { recursive: true, dereference: true, filter: (p) => !p.split(sep5).
|
|
2884
|
+
cpSync2(src.dir, staging, { recursive: true, dereference: true, filter: (p) => !p.split(sep5).some((s) => TREE_SKIP.has(s)) });
|
|
2884
2885
|
const stagingHash = hashTree2(staging);
|
|
2885
2886
|
let reuseTarget = false;
|
|
2886
2887
|
if (existsSync11(target)) {
|
package/docs/status.md
CHANGED
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
| D0.21 | worktree 抽取 `packages/wt` | **完成** | 7 处 python→node;`dia wt`;4 套测试原样迁移全绿 |
|
|
91
91
|
| D0.23 | doctor 平台版本自检 | **完成** | `platform:opencode` / `platform:dsh` 报版本(缺宿主 = warn,不判红);`tests/active-doctor.test.ts` |
|
|
92
92
|
| D0.44 | 配置迁移走 LLM 任务 | **完成** | `docs/migrations/llm-migration.md`:升级只改声明;迁移=任务+判据+回滚;禁止代码里堆版本分支(安全敏感/原子场景例外) |
|
|
93
|
+
| D0.63 | 运行时数据 `.data/` 不进快照、不参与哈希 | **完成** | `TREE_SKIP`(kit/persona 共用):安装复制与 `hashTree`/verify 都跳过 `.data`,防运行时写入造成 verify 假漂移 |
|
|
93
94
|
| D0.62 | persona 旧版技能软链视为受管 | **完成** | `linkManaged` 同时认 `~/.dia/kits/**` 与 `~/.dia/personas/**`;`persona update` 升级不再需要 `--force` |
|
|
94
95
|
| D0.61 | kit 空内容拒绝 + doctor 只查引用 kit | **完成** | `kit add` 拒绝空清单/空树(E_MANIFEST/E_KIT_EMPTY);doctor 按 persona lock 的 kits 校验,孤儿不再拖红 |
|
|
95
96
|
| D0.60 | persona --force 覆盖内联内容 / update --force | **完成** | `kit.renderContent` 支持 force(写盘前备份到 `backups/force-*`);`persona update --force`;版本冲突错误给可执行提示;`tests/kit.test.ts` |
|