@zhushanwen/pi-session-reader 0.3.0 → 0.4.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/package.json +3 -2
- package/src/__tests__/cross-package-subagent-core.test.ts +321 -0
- package/src/__tests__/execution-tree.test.ts +1 -1
- package/src/__tests__/find.test.ts +18 -4
- package/src/__tests__/hash-provider.test.ts +2 -2
- package/src/__tests__/result.test.ts +341 -0
- package/src/__tests__/roots.test.ts +2 -2
- package/src/__tests__/session-command.test.ts +2 -2
- package/src/__tests__/subagents.test.ts +3 -3
- package/src/__tests__/tool-handler.test.ts +146 -9
- package/src/__tests__/toolcall.test.ts +13 -0
- package/src/__tests__/workflow.test.ts +59 -1
- package/src/core/family.ts +43 -17
- package/src/core/parser.ts +28 -17
- package/src/core/render.ts +59 -34
- package/src/core/toolcall.ts +105 -69
- package/src/core/workflow.ts +139 -135
- package/src/discovery/find.ts +120 -74
- package/src/discovery/subagents.ts +194 -110
- package/src/discovery/workflows.ts +44 -29
- package/src/index.ts +20 -5
- package/src/result-action.ts +244 -0
- package/src/tool-handler.ts +190 -101
- package/vitest.config.ts +17 -0
package/vitest.config.ts
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
|
|
1
3
|
import { defineConfig } from 'vitest/config'
|
|
2
4
|
|
|
3
5
|
export default defineConfig({
|
|
4
6
|
test: {
|
|
7
|
+
reporters: ['default', 'junit'],
|
|
8
|
+
outputFile: { junit: './test-results/vitest-junit.xml' },
|
|
5
9
|
include: ['src/__tests__/**/*.test.ts'],
|
|
6
10
|
},
|
|
11
|
+
resolve: {
|
|
12
|
+
// 数组形态按序匹配(vite 文档)。跨包集成测试(cross-package-subagent-core.test.ts)
|
|
13
|
+
// 消费 @zhushanwen/subagent-core 未进 barrel 的内部符号(D3 判定不进),按
|
|
14
|
+
// subagent-workflow vitest.config 同款正则把带 .ts 后缀的包名深路径重写到 core src
|
|
15
|
+
// 物理路径——不依赖 package exports 的 `./*` 通配(u-2c 已删);barrel(包根无路径段)
|
|
16
|
+
// 不命中,走 workspace node 解析(exports "." → src/index.ts)。
|
|
17
|
+
alias: [
|
|
18
|
+
{
|
|
19
|
+
find: /^@zhushanwen\/subagent-core\/(.+\.ts)$/,
|
|
20
|
+
replacement: `${path.resolve(__dirname, '../../../packages/subagent-core/src')}/$1`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
7
24
|
})
|