@agentxjs/devtools 1.9.1-dev

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/src/types.ts ADDED
@@ -0,0 +1,90 @@
1
+ /**
2
+ * DevTools Types
3
+ *
4
+ * Defines the fixture format for recording and playback.
5
+ */
6
+
7
+ /**
8
+ * A single event in a fixture
9
+ */
10
+ export interface FixtureEvent {
11
+ /**
12
+ * Event type (e.g., "message_start", "text_delta", "message_stop")
13
+ */
14
+ type: string;
15
+
16
+ /**
17
+ * Delay in milliseconds since last event (0 for first event)
18
+ */
19
+ delay: number;
20
+
21
+ /**
22
+ * Event data (type-specific)
23
+ */
24
+ data: unknown;
25
+
26
+ /**
27
+ * Optional: index for content blocks
28
+ */
29
+ index?: number;
30
+
31
+ /**
32
+ * Optional: event context (agentId, sessionId, etc.)
33
+ */
34
+ context?: unknown;
35
+ }
36
+
37
+ /**
38
+ * A complete fixture (recorded conversation scenario)
39
+ */
40
+ export interface Fixture {
41
+ /**
42
+ * Fixture name (e.g., "simple-reply", "tool-call")
43
+ */
44
+ name: string;
45
+
46
+ /**
47
+ * Human-readable description
48
+ */
49
+ description?: string;
50
+
51
+ /**
52
+ * When this fixture was recorded (Unix timestamp)
53
+ */
54
+ recordedAt?: number;
55
+
56
+ /**
57
+ * The user message that triggers this fixture (optional, for documentation)
58
+ */
59
+ trigger?: string;
60
+
61
+ /**
62
+ * Sequence of events to emit
63
+ */
64
+ events: FixtureEvent[];
65
+ }
66
+
67
+ /**
68
+ * Options for MockDriver
69
+ */
70
+ export interface MockDriverOptions {
71
+ /**
72
+ * Fixture to use for playback
73
+ */
74
+ fixture?: Fixture | string;
75
+
76
+ /**
77
+ * Custom fixtures map (name -> fixture)
78
+ */
79
+ fixtures?: Map<string, Fixture>;
80
+
81
+ /**
82
+ * Default delay between events if not specified (ms)
83
+ */
84
+ defaultDelay?: number;
85
+
86
+ /**
87
+ * Speed multiplier (1.0 = real time, 0 = instant, 2.0 = half speed)
88
+ */
89
+ speedMultiplier?: number;
90
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": ".",
6
+ "types": ["bun-types"]
7
+ },
8
+ "include": ["src/**/*", "fixtures/**/*"],
9
+ "exclude": ["src/**/__tests__/**/*", "src/**/*.test.ts", "src/**/*.spec.ts", "scripts/**/*"]
10
+ }