@zhushanwen/pi-session-path 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-session-path",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Active-path clipping for pi session entries — single shared implementation for state-rebuilding extensions (todo/plan/goal/scheduler), so revoked subtrees stay out of rebuild inputs (shared library, not a Pi extension, zero dependencies).",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "scripts": {
23
23
  "typecheck": "npx tsc --noEmit",
24
- "test": "vitest run"
24
+ "test": "vitest run --pool=threads"
25
25
  }
26
26
  }
@@ -7,7 +7,7 @@ import { describe, expect, it } from "vitest";
7
7
 
8
8
  import { filterActivePath, type ActivePathSessionView } from "../index";
9
9
 
10
- interface BranchEntry { // oe-exempt:20261001:test:测试 fixture 形状契约(分支树 entry 最小形状,断言面消费)
10
+ interface BranchEntry { // oe-exempt:20261001:test:测试 fixture 形状契约(分支树 entry 最小形状,断言范围消费)
11
11
  type: string;
12
12
  id: string;
13
13
  parentId: string | null;
package/src/index.ts CHANGED
@@ -8,14 +8,14 @@
8
8
  // 分叉(plan/todo 取数组尾条目 vs goal/scheduler 取最后一条带 string id 的条目,无
9
9
  // id 尾条目上行为可分叉)。语义同构 = 假差异,收敛为单一实现;读者普查登记见
10
10
  // docs/architecture/session-readers-census.md(§3 各包行 + §4.1 防御语义异源登记)。
11
- // runtime 侧(entry-tree-builder 重建链 / readEntries 投影的 filterEntriesToActivePath)
12
- // 与 plugin 侧不经本包、保持独立——跨面异源是有意设计,非漏接。
11
+ // runtime 侧(entry-tree-builder 重建链 / readEntries 派生视图的 filterEntriesToActivePath)
12
+ // 与 plugin 侧不经本包、保持独立——跨包异源是有意设计,非漏接。
13
13
 
14
14
  /**
15
15
  * entry 的树结构字段视图(duck-typed 收窄,无断言)。含 type?: unknown 只为通过
16
16
  * weak-type 检查(全 optional 目标须与源共享属性名——各消费包的最小 entry 形状
17
- * SessionEntryLike/SchedulerEntryLike 只声明 type);真实 pi SessionEntry 恒有
18
- * id/parentId(SessionEntryBase),缺失时按线性文件语义处理(见 filterActivePath)。
17
+ * SessionEntryLike 只声明 type);真实 pi SessionEntry 恒有 id/parentId
18
+ * (SessionEntryBase),缺失时按线性文件语义处理(见 filterActivePath)。
19
19
  */
20
20
  interface TreeEntryFields { // oe-exempt:20261001:framework:duck-typed 树字段收窄视图(weak-type 检查要求的独立 interface 形态)——共享实现内部结构,非待变体抽象
21
21
  type?: unknown;