@minonl/dia 0.0.11 → 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 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 (e.name === ".git" || e.name === "node_modules" || e.name === "kit.lock")
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())
@@ -2008,7 +2009,7 @@ function linkManaged(dest, wantTarget) {
2008
2009
  const abs = resolve5(dirname6(dest), cur);
2009
2010
  if (abs === resolve5(wantTarget))
2010
2011
  return true;
2011
- return abs.startsWith(resolve5(dataDir2(), "kits") + sep4);
2012
+ return [join10("kits"), join10("personas")].some((d) => abs.startsWith(resolve5(dataDir2(), d) + sep4));
2012
2013
  }
2013
2014
  function isSymlink(p) {
2014
2015
  try {
@@ -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).includes(".git") && !p.split(sep4).includes("node_modules") });
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 (e.name === ".git" || e.name === "node_modules")
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).includes(".git") && !p.split(sep5).includes("node_modules") });
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,8 @@
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 假漂移 |
94
+ | D0.62 | persona 旧版技能软链视为受管 | **完成** | `linkManaged` 同时认 `~/.dia/kits/**` 与 `~/.dia/personas/**`;`persona update` 升级不再需要 `--force` |
93
95
  | D0.61 | kit 空内容拒绝 + doctor 只查引用 kit | **完成** | `kit add` 拒绝空清单/空树(E_MANIFEST/E_KIT_EMPTY);doctor 按 persona lock 的 kits 校验,孤儿不再拖红 |
94
96
  | D0.60 | persona --force 覆盖内联内容 / update --force | **完成** | `kit.renderContent` 支持 force(写盘前备份到 `backups/force-*`);`persona update --force`;版本冲突错误给可执行提示;`tests/kit.test.ts` |
95
97
  | D0.59 | 包内容守卫 | **完成** | 单测覆盖 docs 回退;publish workflow 发布前断言 tarball 含 docs/deps.jsonl + docs/platforms/registry.json(防「发完才发现缺文件」) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minonl/dia",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "description": "dia (嗲) — lightweight agent framework: knowledge index, audit, session ingest",
6
6
  "bin": {