@zeitzeuge/node 0.1.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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Performance metrics computation — re-exports from @zeitzeuge/utils.
3
+ */
4
+ export { computeMetrics } from '@zeitzeuge/utils';
5
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * V8 CPU profile parser — re-exports the shared implementation from @zeitzeuge/utils.
3
+ */
4
+ export { parseCpuProfile, type V8CpuProfile, type V8CpuProfileNode } from '@zeitzeuge/utils';
5
+ //# sourceMappingURL=profile-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-parser.d.ts","sourceRoot":"","sources":["../src/profile-parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Prompt constants — re-exports from @zeitzeuge/utils.
3
+ */
4
+ export { CPU_HOTSPOT_PROMPT, LISTENER_LEAK_PROMPT, MEMORY_CLOSURE_PROMPT, CODE_PATTERN_PROMPT, TEST_ORCHESTRATOR_SYSTEM_PROMPT as NODE_TEST_SYSTEM_PROMPT, } from '@zeitzeuge/utils';
5
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,+BAA+B,IAAI,uBAAuB,GAC3D,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Custom reporter for `node --test` that collects V8 CPU profiles
3
+ * and triggers zeitzeuge performance analysis after tests complete.
4
+ *
5
+ * Usage:
6
+ * node --test \
7
+ * --cpu-prof --cpu-prof-dir=.zeitzeuge-profiles \
8
+ * --test-reporter @zeitzeuge/node/reporter \
9
+ * --test-reporter-destination stdout \
10
+ * tests/*.test.js
11
+ *
12
+ * The reporter consumes the TestEvent stream from node:test, extracts
13
+ * timing information from test:pass / test:fail / test:diagnostic events,
14
+ * and runs the full zeitzeuge analysis pipeline (profile parsing →
15
+ * classification → workspace → Deep Agent) after the test:summary event.
16
+ */
17
+ /** Shape of node:test TestEvent objects. */
18
+ interface TestEvent {
19
+ type: string;
20
+ data: {
21
+ name?: string;
22
+ file?: string;
23
+ nesting?: number;
24
+ details?: {
25
+ duration_ms?: number;
26
+ error?: Error;
27
+ passed?: boolean;
28
+ type?: string;
29
+ };
30
+ skip?: string | boolean;
31
+ todo?: string | boolean;
32
+ message?: string;
33
+ count?: number;
34
+ line?: number;
35
+ column?: number;
36
+ success?: boolean;
37
+ counts?: {
38
+ passed?: number;
39
+ failed?: number;
40
+ cancelled?: number;
41
+ skipped?: number;
42
+ todo?: number;
43
+ topLevel?: number;
44
+ suites?: number;
45
+ tests?: number;
46
+ };
47
+ };
48
+ }
49
+ /**
50
+ * Async generator reporter for `node --test`.
51
+ *
52
+ * This is the default export — node:test will call it with a ReadableStream
53
+ * of TestEvent objects when used via `--test-reporter`.
54
+ */
55
+ export default function zeitZeugeReporter(source: AsyncIterable<TestEvent>): AsyncGenerator<string>;
56
+ export {};
57
+ //# sourceMappingURL=reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqBH,4CAA4C;AAC5C,UAAU,SAAS;IACjB,IAAI,EAA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