agent-trajectories 0.5.3 → 0.5.5
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/{chunk-YI27BR5O.js → chunk-2LMOXJE7.js} +175 -27
- package/dist/chunk-2LMOXJE7.js.map +1 -0
- package/dist/cli/index.js +224 -44
- package/dist/cli/index.js.map +1 -1
- package/dist/{index-Bw0Jk4zO.d.ts → index-DiSIfGXl.d.ts} +270 -200
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/package.json +6 -3
- package/dist/chunk-YI27BR5O.js.map +0 -1
|
@@ -10,28 +10,34 @@ import { z } from 'zod';
|
|
|
10
10
|
/**
|
|
11
11
|
* Supported task source systems
|
|
12
12
|
*/
|
|
13
|
-
type TaskSourceSystem =
|
|
13
|
+
type TaskSourceSystem =
|
|
14
|
+
| "beads"
|
|
15
|
+
| "github"
|
|
16
|
+
| "linear"
|
|
17
|
+
| "jira"
|
|
18
|
+
| "plain"
|
|
19
|
+
| string;
|
|
14
20
|
/**
|
|
15
21
|
* Reference to an external task/issue
|
|
16
22
|
*/
|
|
17
23
|
interface TaskSource {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
/** The task management system (e.g., 'github', 'linear') */
|
|
25
|
+
system: TaskSourceSystem;
|
|
26
|
+
/** The external ID (e.g., 'GH#123', 'ENG-456') */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Optional URL to the external task */
|
|
29
|
+
url?: string;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
32
|
* Task reference - either standalone or linked to external system
|
|
27
33
|
*/
|
|
28
34
|
interface TaskReference {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
/** Human-readable task title */
|
|
36
|
+
title: string;
|
|
37
|
+
/** Optional description */
|
|
38
|
+
description?: string;
|
|
39
|
+
/** Optional link to external task system */
|
|
40
|
+
source?: TaskSource;
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
43
|
* Trajectory status
|
|
@@ -40,7 +46,18 @@ type TrajectoryStatus = "active" | "completed" | "abandoned";
|
|
|
40
46
|
/**
|
|
41
47
|
* Event types that can be recorded in a trajectory
|
|
42
48
|
*/
|
|
43
|
-
type TrajectoryEventType =
|
|
49
|
+
type TrajectoryEventType =
|
|
50
|
+
| "prompt"
|
|
51
|
+
| "thinking"
|
|
52
|
+
| "tool_call"
|
|
53
|
+
| "tool_result"
|
|
54
|
+
| "message_sent"
|
|
55
|
+
| "message_received"
|
|
56
|
+
| "decision"
|
|
57
|
+
| "finding"
|
|
58
|
+
| "reflection"
|
|
59
|
+
| "note"
|
|
60
|
+
| "error";
|
|
44
61
|
/**
|
|
45
62
|
* Significance level for events
|
|
46
63
|
*/
|
|
@@ -49,246 +66,249 @@ type EventSignificance = "low" | "medium" | "high" | "critical";
|
|
|
49
66
|
* A single event in the trajectory timeline
|
|
50
67
|
*/
|
|
51
68
|
interface TrajectoryEvent {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
/** Unix timestamp in milliseconds */
|
|
70
|
+
ts: number;
|
|
71
|
+
/** Type of event */
|
|
72
|
+
type: TrajectoryEventType;
|
|
73
|
+
/** Human-readable summary of the event */
|
|
74
|
+
content: string;
|
|
75
|
+
/** Full raw data (optional, for debugging) */
|
|
76
|
+
raw?: unknown;
|
|
77
|
+
/** Importance level */
|
|
78
|
+
significance?: EventSignificance;
|
|
79
|
+
/** Confidence level for this event (0-1) */
|
|
80
|
+
confidence?: number;
|
|
81
|
+
/** User-defined tags */
|
|
82
|
+
tags?: string[];
|
|
66
83
|
}
|
|
67
84
|
/**
|
|
68
85
|
* An alternative option that was considered
|
|
69
86
|
*/
|
|
70
87
|
interface Alternative {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
/** The alternative option */
|
|
89
|
+
option: string;
|
|
90
|
+
/** Why this alternative was not chosen */
|
|
91
|
+
reason?: string;
|
|
75
92
|
}
|
|
76
93
|
/**
|
|
77
94
|
* A structured decision record
|
|
78
95
|
*/
|
|
79
96
|
interface Decision {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
/** What was the choice/question? */
|
|
98
|
+
question: string;
|
|
99
|
+
/** What was chosen */
|
|
100
|
+
chosen: string;
|
|
101
|
+
/** What alternatives were considered */
|
|
102
|
+
alternatives: Alternative[];
|
|
103
|
+
/** Why this choice was made */
|
|
104
|
+
reasoning: string;
|
|
105
|
+
/** Confidence in this decision (0-1) */
|
|
106
|
+
confidence?: number;
|
|
90
107
|
}
|
|
91
108
|
/**
|
|
92
109
|
* Finding category types
|
|
93
110
|
*/
|
|
94
|
-
type FindingCategory =
|
|
111
|
+
type FindingCategory =
|
|
112
|
+
| "bug"
|
|
113
|
+
| "pattern"
|
|
114
|
+
| "optimization"
|
|
115
|
+
| "security"
|
|
116
|
+
| "documentation"
|
|
117
|
+
| "dependency"
|
|
118
|
+
| "other";
|
|
95
119
|
/**
|
|
96
120
|
* A structured finding record - captures discoveries made during exploration
|
|
97
121
|
*/
|
|
98
122
|
interface Finding {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
/** What was found */
|
|
124
|
+
what: string;
|
|
125
|
+
/** Where it was found (file path, component, etc.) */
|
|
126
|
+
where: string;
|
|
127
|
+
/** Why this finding is significant */
|
|
128
|
+
significance: string;
|
|
129
|
+
/** Category of the finding */
|
|
130
|
+
category: FindingCategory;
|
|
131
|
+
/** Suggested action or follow-up */
|
|
132
|
+
suggestedAction?: string;
|
|
133
|
+
/** Confidence in this finding (0-1) */
|
|
134
|
+
confidence?: number;
|
|
111
135
|
}
|
|
112
136
|
/**
|
|
113
137
|
* Agent participation record
|
|
114
138
|
*/
|
|
115
139
|
interface AgentParticipation {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
/** Agent identifier */
|
|
141
|
+
name: string;
|
|
142
|
+
/** Role in the trajectory */
|
|
143
|
+
role: "lead" | "contributor" | "reviewer";
|
|
144
|
+
/** When the agent joined */
|
|
145
|
+
joinedAt: string;
|
|
146
|
+
/** When the agent left (if applicable) */
|
|
147
|
+
leftAt?: string;
|
|
124
148
|
}
|
|
125
149
|
/**
|
|
126
150
|
* A chapter represents a logical phase of work
|
|
127
151
|
*/
|
|
128
152
|
interface Chapter {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
153
|
+
/** Unique chapter ID */
|
|
154
|
+
id: string;
|
|
155
|
+
/** Chapter title (e.g., "Initial exploration", "Implementation") */
|
|
156
|
+
title: string;
|
|
157
|
+
/** Which agent is working in this chapter */
|
|
158
|
+
agentName: string;
|
|
159
|
+
/** When the chapter started (ISO timestamp) */
|
|
160
|
+
startedAt: string;
|
|
161
|
+
/** When the chapter ended (ISO timestamp, undefined if current) */
|
|
162
|
+
endedAt?: string;
|
|
163
|
+
/** Events that occurred in this chapter */
|
|
164
|
+
events: TrajectoryEvent[];
|
|
141
165
|
}
|
|
142
166
|
/**
|
|
143
167
|
* Retrospective reflection on the completed work
|
|
144
168
|
*/
|
|
145
169
|
interface Retrospective {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
170
|
+
/** Brief summary of what was accomplished */
|
|
171
|
+
summary: string;
|
|
172
|
+
/** How the work was approached */
|
|
173
|
+
approach: string;
|
|
174
|
+
/** Key decisions made during the work */
|
|
175
|
+
decisions?: Decision[];
|
|
176
|
+
/** What was unexpectedly difficult */
|
|
177
|
+
challenges?: string[];
|
|
178
|
+
/** What was learned */
|
|
179
|
+
learnings?: string[];
|
|
180
|
+
/** Suggestions for improvement */
|
|
181
|
+
suggestions?: string[];
|
|
182
|
+
/** Agent's confidence in the solution (0-1) */
|
|
183
|
+
confidence: number;
|
|
184
|
+
/** Total time spent (human-readable) */
|
|
185
|
+
timeSpent?: string;
|
|
162
186
|
}
|
|
163
187
|
/**
|
|
164
188
|
* The main Trajectory type - represents the complete record of work on a task
|
|
165
189
|
*/
|
|
166
190
|
interface Trajectory {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/** Trace information for code attribution */
|
|
196
|
-
_trace?: TrajectoryTraceRef;
|
|
191
|
+
/** Unique trajectory ID (format: traj_xxxxxxxxxxxx) */
|
|
192
|
+
id: string;
|
|
193
|
+
/** Schema version for forward compatibility */
|
|
194
|
+
version: 1;
|
|
195
|
+
/** The task being worked on */
|
|
196
|
+
task: TaskReference;
|
|
197
|
+
/** Current status */
|
|
198
|
+
status: TrajectoryStatus;
|
|
199
|
+
/** When work started (ISO timestamp) */
|
|
200
|
+
startedAt: string;
|
|
201
|
+
/** When work completed (ISO timestamp) */
|
|
202
|
+
completedAt?: string;
|
|
203
|
+
/** Agents who participated */
|
|
204
|
+
agents: AgentParticipation[];
|
|
205
|
+
/** Logical phases of work */
|
|
206
|
+
chapters: Chapter[];
|
|
207
|
+
/** Final reflection (only on completion) */
|
|
208
|
+
retrospective?: Retrospective;
|
|
209
|
+
/** Git commits produced */
|
|
210
|
+
commits: string[];
|
|
211
|
+
/** Files that were modified */
|
|
212
|
+
filesChanged: string[];
|
|
213
|
+
/** Project identifier */
|
|
214
|
+
projectId: string;
|
|
215
|
+
/** User-defined tags */
|
|
216
|
+
tags: string[];
|
|
217
|
+
/** Trace information for code attribution */
|
|
218
|
+
_trace?: TrajectoryTraceRef;
|
|
197
219
|
}
|
|
198
220
|
/**
|
|
199
221
|
* Summary of a trajectory for listing/indexing
|
|
200
222
|
*/
|
|
201
223
|
interface TrajectorySummary {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
id: string;
|
|
225
|
+
title: string;
|
|
226
|
+
status: TrajectoryStatus;
|
|
227
|
+
startedAt: string;
|
|
228
|
+
completedAt?: string;
|
|
229
|
+
confidence?: number;
|
|
230
|
+
chapterCount: number;
|
|
231
|
+
decisionCount: number;
|
|
210
232
|
}
|
|
211
233
|
/**
|
|
212
234
|
* Input for creating a new trajectory
|
|
213
235
|
*/
|
|
214
236
|
interface CreateTrajectoryInput {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/** Optional initial tags */
|
|
226
|
-
tags?: string[];
|
|
237
|
+
/** Task title */
|
|
238
|
+
title: string;
|
|
239
|
+
/** Optional task description */
|
|
240
|
+
description?: string;
|
|
241
|
+
/** Optional external task reference */
|
|
242
|
+
source?: TaskSource;
|
|
243
|
+
/** Optional project ID (defaults to cwd) */
|
|
244
|
+
projectId?: string;
|
|
245
|
+
/** Optional initial tags */
|
|
246
|
+
tags?: string[];
|
|
227
247
|
}
|
|
228
248
|
/**
|
|
229
249
|
* Input for adding a chapter
|
|
230
250
|
*/
|
|
231
251
|
interface AddChapterInput {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
252
|
+
/** Chapter title */
|
|
253
|
+
title: string;
|
|
254
|
+
/** Agent name */
|
|
255
|
+
agentName: string;
|
|
236
256
|
}
|
|
237
257
|
/**
|
|
238
258
|
* Input for adding an event
|
|
239
259
|
*/
|
|
240
260
|
interface AddEventInput {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
261
|
+
/** Event type */
|
|
262
|
+
type: TrajectoryEventType;
|
|
263
|
+
/** Human-readable content */
|
|
264
|
+
content: string;
|
|
265
|
+
/** Optional raw data */
|
|
266
|
+
raw?: unknown;
|
|
267
|
+
/** Optional significance */
|
|
268
|
+
significance?: EventSignificance;
|
|
269
|
+
/** Optional tags */
|
|
270
|
+
tags?: string[];
|
|
251
271
|
}
|
|
252
272
|
/**
|
|
253
273
|
* Input for completing a trajectory
|
|
254
274
|
*/
|
|
255
275
|
interface CompleteTrajectoryInput {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
276
|
+
summary: string;
|
|
277
|
+
approach: string;
|
|
278
|
+
decisions?: Decision[];
|
|
279
|
+
challenges?: string[];
|
|
280
|
+
learnings?: string[];
|
|
281
|
+
suggestions?: string[];
|
|
282
|
+
confidence: number;
|
|
263
283
|
}
|
|
264
284
|
/**
|
|
265
285
|
* Query options for listing trajectories
|
|
266
286
|
*/
|
|
267
287
|
interface TrajectoryQuery {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
288
|
+
/** Filter by status */
|
|
289
|
+
status?: TrajectoryStatus;
|
|
290
|
+
/** Filter by date range */
|
|
291
|
+
since?: string;
|
|
292
|
+
until?: string;
|
|
293
|
+
/** Maximum results */
|
|
294
|
+
limit?: number;
|
|
295
|
+
/** Offset for pagination */
|
|
296
|
+
offset?: number;
|
|
297
|
+
/** Sort field */
|
|
298
|
+
sortBy?: "startedAt" | "completedAt" | "title";
|
|
299
|
+
/** Sort direction */
|
|
300
|
+
sortOrder?: "asc" | "desc";
|
|
281
301
|
}
|
|
282
302
|
/**
|
|
283
303
|
* Reference to trace information within a trajectory
|
|
284
304
|
*/
|
|
285
305
|
interface TrajectoryTraceRef {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
306
|
+
/** Git ref (commit hash) when trace started */
|
|
307
|
+
startRef: string;
|
|
308
|
+
/** Git ref (commit hash) when trace ended */
|
|
309
|
+
endRef?: string;
|
|
310
|
+
/** ID of the associated trace record */
|
|
311
|
+
traceId?: string;
|
|
292
312
|
}
|
|
293
313
|
|
|
294
314
|
/**
|
|
@@ -889,6 +909,19 @@ declare function abandonTrajectory(trajectory: Trajectory, reason?: string): Tra
|
|
|
889
909
|
* Active trajectories go in active/, completed in completed/YYYY-MM/.
|
|
890
910
|
*/
|
|
891
911
|
|
|
912
|
+
/**
|
|
913
|
+
* Aggregated counts emitted by reconcileIndex for observability. Exposed
|
|
914
|
+
* on the return value so tests and callers can assert on counts without
|
|
915
|
+
* parsing log output.
|
|
916
|
+
*/
|
|
917
|
+
interface ReconcileSummary {
|
|
918
|
+
scanned: number;
|
|
919
|
+
added: number;
|
|
920
|
+
alreadyIndexed: number;
|
|
921
|
+
skippedMalformedJson: number;
|
|
922
|
+
skippedSchemaViolation: number;
|
|
923
|
+
skippedIoError: number;
|
|
924
|
+
}
|
|
892
925
|
/**
|
|
893
926
|
* File system storage adapter
|
|
894
927
|
*/
|
|
@@ -904,9 +937,34 @@ declare class FileStorage implements StorageAdapter {
|
|
|
904
937
|
*/
|
|
905
938
|
initialize(): Promise<void>;
|
|
906
939
|
/**
|
|
907
|
-
*
|
|
940
|
+
* Scan active/ and completed/ recursively and add any trajectory files
|
|
941
|
+
* missing from the index. Existing entries are preserved — reconcile
|
|
942
|
+
* only adds, never removes.
|
|
943
|
+
*
|
|
944
|
+
* Handles three on-disk layouts in completed/:
|
|
945
|
+
* - flat: completed/{id}.json (legacy workforce data)
|
|
946
|
+
* - monthly: completed/YYYY-MM/{id}.json (current save() writes)
|
|
947
|
+
* - nested: completed/.../{id}.json (defensive — any depth)
|
|
948
|
+
*
|
|
949
|
+
* Returns a ReconcileSummary so tests and CLI wrappers can observe
|
|
950
|
+
* outcomes without parsing logs. Only writes the index if anything was
|
|
951
|
+
* added.
|
|
908
952
|
*/
|
|
909
|
-
|
|
953
|
+
reconcileIndex(): Promise<ReconcileSummary>;
|
|
954
|
+
/**
|
|
955
|
+
* Recursively collect all .json file paths under `dir` into `out`.
|
|
956
|
+
* Silently treats a missing directory as empty.
|
|
957
|
+
*/
|
|
958
|
+
private walkJsonFilesInto;
|
|
959
|
+
/**
|
|
960
|
+
* Save a trajectory.
|
|
961
|
+
*
|
|
962
|
+
* Validates the input against the trajectory schema before touching
|
|
963
|
+
* disk. Closes the historical read/write asymmetry where save() would
|
|
964
|
+
* happily write data that the reader then rejected, producing files
|
|
965
|
+
* that could never be loaded back.
|
|
966
|
+
*/
|
|
967
|
+
save(input: Trajectory): Promise<void>;
|
|
910
968
|
/**
|
|
911
969
|
* Get a trajectory by ID
|
|
912
970
|
*/
|
|
@@ -933,7 +991,19 @@ declare class FileStorage implements StorageAdapter {
|
|
|
933
991
|
* Close storage (no-op for file storage)
|
|
934
992
|
*/
|
|
935
993
|
close(): Promise<void>;
|
|
994
|
+
/**
|
|
995
|
+
* Read a trajectory file and return a tagged result so callers can
|
|
996
|
+
* distinguish missing files, malformed JSON, and schema violations.
|
|
997
|
+
*
|
|
998
|
+
* Does NOT log. Callers choose whether to warn, swallow, or throw.
|
|
999
|
+
*/
|
|
936
1000
|
private readTrajectoryFile;
|
|
1001
|
+
/**
|
|
1002
|
+
* Convenience wrapper for callers that only care whether they got a
|
|
1003
|
+
* trajectory. Returns null for any failure and writes nothing to the
|
|
1004
|
+
* console — so nothing leaks into test output or the CLI spinner.
|
|
1005
|
+
*/
|
|
1006
|
+
private readTrajectoryOrNull;
|
|
937
1007
|
private loadIndex;
|
|
938
1008
|
private saveIndex;
|
|
939
1009
|
private updateIndex;
|
|
@@ -1028,17 +1098,17 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1028
1098
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
1029
1099
|
agents: z.ZodArray<z.ZodObject<{
|
|
1030
1100
|
name: z.ZodString;
|
|
1031
|
-
role: z.
|
|
1101
|
+
role: z.ZodString;
|
|
1032
1102
|
joinedAt: z.ZodString;
|
|
1033
1103
|
leftAt: z.ZodOptional<z.ZodString>;
|
|
1034
1104
|
}, "strip", z.ZodTypeAny, {
|
|
1035
1105
|
name: string;
|
|
1036
|
-
role:
|
|
1106
|
+
role: string;
|
|
1037
1107
|
joinedAt: string;
|
|
1038
1108
|
leftAt?: string | undefined;
|
|
1039
1109
|
}, {
|
|
1040
1110
|
name: string;
|
|
1041
|
-
role:
|
|
1111
|
+
role: string;
|
|
1042
1112
|
joinedAt: string;
|
|
1043
1113
|
leftAt?: string | undefined;
|
|
1044
1114
|
}>, "many">;
|
|
@@ -1050,7 +1120,7 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1050
1120
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
1051
1121
|
events: z.ZodArray<z.ZodObject<{
|
|
1052
1122
|
ts: z.ZodNumber;
|
|
1053
|
-
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodString]>;
|
|
1123
|
+
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodLiteral<"completion-evidence">, z.ZodLiteral<"completion-marker">, z.ZodString]>;
|
|
1054
1124
|
content: z.ZodString;
|
|
1055
1125
|
raw: z.ZodOptional<z.ZodUnknown>;
|
|
1056
1126
|
significance: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
@@ -1183,11 +1253,11 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1183
1253
|
suggestions?: string[] | undefined;
|
|
1184
1254
|
timeSpent?: string | undefined;
|
|
1185
1255
|
}>>;
|
|
1186
|
-
commits: z.ZodArray<z.ZodString, "many"
|
|
1187
|
-
filesChanged: z.ZodArray<z.ZodString, "many"
|
|
1188
|
-
projectId: z.ZodString
|
|
1256
|
+
commits: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1257
|
+
filesChanged: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1258
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1189
1259
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
1190
|
-
tags: z.ZodArray<z.ZodString, "many"
|
|
1260
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1191
1261
|
_trace: z.ZodOptional<z.ZodObject<{
|
|
1192
1262
|
startRef: z.ZodString;
|
|
1193
1263
|
endRef: z.ZodOptional<z.ZodString>;
|
|
@@ -1218,7 +1288,7 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1218
1288
|
};
|
|
1219
1289
|
agents: {
|
|
1220
1290
|
name: string;
|
|
1221
|
-
role:
|
|
1291
|
+
role: string;
|
|
1222
1292
|
joinedAt: string;
|
|
1223
1293
|
leftAt?: string | undefined;
|
|
1224
1294
|
}[];
|
|
@@ -1240,7 +1310,6 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1240
1310
|
}[];
|
|
1241
1311
|
commits: string[];
|
|
1242
1312
|
filesChanged: string[];
|
|
1243
|
-
projectId: string;
|
|
1244
1313
|
completedAt?: string | undefined;
|
|
1245
1314
|
retrospective?: {
|
|
1246
1315
|
confidence: number;
|
|
@@ -1261,6 +1330,7 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1261
1330
|
suggestions?: string[] | undefined;
|
|
1262
1331
|
timeSpent?: string | undefined;
|
|
1263
1332
|
} | undefined;
|
|
1333
|
+
projectId?: string | undefined;
|
|
1264
1334
|
workflowId?: string | undefined;
|
|
1265
1335
|
_trace?: {
|
|
1266
1336
|
startRef: string;
|
|
@@ -1270,7 +1340,6 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1270
1340
|
}, {
|
|
1271
1341
|
status: "active" | "completed" | "abandoned";
|
|
1272
1342
|
id: string;
|
|
1273
|
-
tags: string[];
|
|
1274
1343
|
startedAt: string;
|
|
1275
1344
|
version: 1;
|
|
1276
1345
|
task: {
|
|
@@ -1284,7 +1353,7 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1284
1353
|
};
|
|
1285
1354
|
agents: {
|
|
1286
1355
|
name: string;
|
|
1287
|
-
role:
|
|
1356
|
+
role: string;
|
|
1288
1357
|
joinedAt: string;
|
|
1289
1358
|
leftAt?: string | undefined;
|
|
1290
1359
|
}[];
|
|
@@ -1304,9 +1373,7 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1304
1373
|
}[];
|
|
1305
1374
|
endedAt?: string | undefined;
|
|
1306
1375
|
}[];
|
|
1307
|
-
|
|
1308
|
-
filesChanged: string[];
|
|
1309
|
-
projectId: string;
|
|
1376
|
+
tags?: string[] | undefined;
|
|
1310
1377
|
completedAt?: string | undefined;
|
|
1311
1378
|
retrospective?: {
|
|
1312
1379
|
confidence: number;
|
|
@@ -1327,6 +1394,9 @@ declare const TrajectorySchema: z.ZodObject<{
|
|
|
1327
1394
|
suggestions?: string[] | undefined;
|
|
1328
1395
|
timeSpent?: string | undefined;
|
|
1329
1396
|
} | undefined;
|
|
1397
|
+
commits?: string[] | undefined;
|
|
1398
|
+
filesChanged?: string[] | undefined;
|
|
1399
|
+
projectId?: string | undefined;
|
|
1330
1400
|
workflowId?: string | undefined;
|
|
1331
1401
|
_trace?: {
|
|
1332
1402
|
startRef: string;
|
|
@@ -1486,7 +1556,7 @@ declare function validateCompleteInput(data: unknown): {
|
|
|
1486
1556
|
*/
|
|
1487
1557
|
declare const TrajectoryEventSchema: z.ZodObject<{
|
|
1488
1558
|
ts: z.ZodNumber;
|
|
1489
|
-
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodString]>;
|
|
1559
|
+
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodLiteral<"completion-evidence">, z.ZodLiteral<"completion-marker">, z.ZodString]>;
|
|
1490
1560
|
content: z.ZodString;
|
|
1491
1561
|
raw: z.ZodOptional<z.ZodUnknown>;
|
|
1492
1562
|
significance: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
@@ -1521,7 +1591,7 @@ declare const ChapterSchema: z.ZodObject<{
|
|
|
1521
1591
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
1522
1592
|
events: z.ZodArray<z.ZodObject<{
|
|
1523
1593
|
ts: z.ZodNumber;
|
|
1524
|
-
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodString]>;
|
|
1594
|
+
type: z.ZodUnion<[z.ZodLiteral<"prompt">, z.ZodLiteral<"thinking">, z.ZodLiteral<"tool_call">, z.ZodLiteral<"tool_result">, z.ZodLiteral<"message_sent">, z.ZodLiteral<"message_received">, z.ZodLiteral<"decision">, z.ZodLiteral<"finding">, z.ZodLiteral<"reflection">, z.ZodLiteral<"note">, z.ZodLiteral<"error">, z.ZodLiteral<"completion-evidence">, z.ZodLiteral<"completion-marker">, z.ZodString]>;
|
|
1525
1595
|
content: z.ZodString;
|
|
1526
1596
|
raw: z.ZodOptional<z.ZodUnknown>;
|
|
1527
1597
|
significance: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|