cmp-standards 2.0.1 → 2.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/README.md +171 -101
- package/dist/cli/index.js +239 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +203 -39
- package/dist/dashboard/server.js.map +1 -1
- package/dist/db/cloud.d.ts +174 -0
- package/dist/db/cloud.d.ts.map +1 -0
- package/dist/db/cloud.js +241 -0
- package/dist/db/cloud.js.map +1 -0
- package/dist/db/errors.d.ts +76 -0
- package/dist/db/errors.d.ts.map +1 -0
- package/dist/db/errors.js +135 -0
- package/dist/db/errors.js.map +1 -0
- package/dist/db/turso-client.d.ts +178 -0
- package/dist/db/turso-client.d.ts.map +1 -0
- package/dist/db/turso-client.js +455 -0
- package/dist/db/turso-client.js.map +1 -0
- package/dist/db/upstash-client.d.ts +161 -0
- package/dist/db/upstash-client.d.ts.map +1 -0
- package/dist/db/upstash-client.js +325 -0
- package/dist/db/upstash-client.js.map +1 -0
- package/dist/hooks/cloud-post-tool-use.d.ts +30 -0
- package/dist/hooks/cloud-post-tool-use.d.ts.map +1 -0
- package/dist/hooks/cloud-post-tool-use.js +116 -0
- package/dist/hooks/cloud-post-tool-use.js.map +1 -0
- package/dist/hooks/cloud-pre-tool-use.d.ts +19 -0
- package/dist/hooks/cloud-pre-tool-use.d.ts.map +1 -0
- package/dist/hooks/cloud-pre-tool-use.js +149 -0
- package/dist/hooks/cloud-pre-tool-use.js.map +1 -0
- package/dist/hooks/cloud-session-start.d.ts +20 -0
- package/dist/hooks/cloud-session-start.d.ts.map +1 -0
- package/dist/hooks/cloud-session-start.js +130 -0
- package/dist/hooks/cloud-session-start.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/memory-checkpoint.d.ts.map +1 -1
- package/dist/hooks/memory-checkpoint.js +12 -20
- package/dist/hooks/memory-checkpoint.js.map +1 -1
- package/dist/hooks/pre-tool-use.d.ts +2 -8
- package/dist/hooks/pre-tool-use.d.ts.map +1 -1
- package/dist/hooks/pre-tool-use.js +7 -106
- package/dist/hooks/pre-tool-use.js.map +1 -1
- package/dist/hooks/session-start.d.ts.map +1 -1
- package/dist/hooks/session-start.js +15 -6
- package/dist/hooks/session-start.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +223 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/schema/tracking.d.ts +644 -0
- package/dist/schema/tracking.d.ts.map +1 -0
- package/dist/schema/tracking.js +204 -0
- package/dist/schema/tracking.js.map +1 -0
- package/dist/services/ProjectScaffold.d.ts.map +1 -1
- package/dist/services/ProjectScaffold.js +33 -5
- package/dist/services/ProjectScaffold.js.map +1 -1
- package/dist/services/TaskTracker.d.ts +1 -1
- package/dist/services/TaskTracker.d.ts.map +1 -1
- package/dist/services/TaskTracker.js +4 -8
- package/dist/services/TaskTracker.js.map +1 -1
- package/dist/services/WorkPlanManager.d.ts +1 -1
- package/dist/services/WorkPlanManager.d.ts.map +1 -1
- package/dist/services/WorkPlanManager.js +8 -14
- package/dist/services/WorkPlanManager.js.map +1 -1
- package/dist/services/auto-inject.d.ts +1 -0
- package/dist/services/auto-inject.d.ts.map +1 -1
- package/dist/services/auto-inject.js +12 -17
- package/dist/services/auto-inject.js.map +1 -1
- package/dist/services/cross-project-sync.d.ts +2 -0
- package/dist/services/cross-project-sync.d.ts.map +1 -1
- package/dist/services/cross-project-sync.js +26 -21
- package/dist/services/cross-project-sync.js.map +1 -1
- package/dist/services/memory-consolidation.d.ts.map +1 -1
- package/dist/services/memory-consolidation.js +30 -27
- package/dist/services/memory-consolidation.js.map +1 -1
- package/dist/utils/env-loader.d.ts +41 -0
- package/dist/utils/env-loader.d.ts.map +1 -0
- package/dist/utils/env-loader.js +78 -0
- package/dist/utils/env-loader.js.map +1 -0
- package/dist/utils/git.d.ts +52 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +267 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/paths.d.ts +39 -5
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +88 -7
- package/dist/utils/paths.js.map +1 -1
- package/package.json +8 -2
- package/standards/README.md +50 -0
- package/standards/experts/expert-routing.md +215 -0
- package/standards/general/code-quality.md +86 -0
- package/standards/general/memory-usage.md +205 -0
- package/standards/general/sync-workflow.md +235 -0
- package/standards/general/workflow.md +82 -0
- package/standards/hooks/mandatory-tracking.md +446 -0
- package/standards/infrastructure/cloud-database.md +287 -0
- package/standards/mcp/server-design.md +243 -0
- package/standards/mcp/tool-patterns.md +354 -0
- package/standards/skills/skill-structure.md +286 -0
- package/standards/skills/workflow-design.md +323 -0
- package/standards/tools/tool-design.md +297 -0
- package/templates/claude-settings.json +72 -0
- package/templates/memory-config.json +2 -28
- package/templates/skills/continue.md +205 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Schema de tracking para tareas, mejoras y sesiones
|
|
3
|
+
* @description Define los tipos y estructuras para el sistema de tracking obligatorio
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const TaskStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
|
|
7
|
+
export declare const TaskResultSchema: z.ZodEnum<["success", "partial", "blocked"]>;
|
|
8
|
+
export declare const ImprovementSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
area: z.ZodString;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
description: z.ZodString;
|
|
13
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
14
|
+
effort: z.ZodOptional<z.ZodEnum<["trivial", "small", "medium", "large"]>>;
|
|
15
|
+
detectedAt: z.ZodString;
|
|
16
|
+
detectedBy: z.ZodOptional<z.ZodString>;
|
|
17
|
+
implementedAt: z.ZodOptional<z.ZodString>;
|
|
18
|
+
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
id: string;
|
|
21
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
22
|
+
description: string;
|
|
23
|
+
title: string;
|
|
24
|
+
area: string;
|
|
25
|
+
detectedAt: string;
|
|
26
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
27
|
+
detectedBy?: string | undefined;
|
|
28
|
+
implementedAt?: string | undefined;
|
|
29
|
+
implementedInTask?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
id: string;
|
|
32
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
33
|
+
description: string;
|
|
34
|
+
title: string;
|
|
35
|
+
area: string;
|
|
36
|
+
detectedAt: string;
|
|
37
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
38
|
+
detectedBy?: string | undefined;
|
|
39
|
+
implementedAt?: string | undefined;
|
|
40
|
+
implementedInTask?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const TaskContentSchema: z.ZodObject<{
|
|
43
|
+
title: z.ZodString;
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
userRequest: z.ZodString;
|
|
46
|
+
plan: z.ZodArray<z.ZodString, "many">;
|
|
47
|
+
currentStep: z.ZodNumber;
|
|
48
|
+
domain: z.ZodString;
|
|
49
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
50
|
+
sessionId: z.ZodString;
|
|
51
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
startedAt: z.ZodString;
|
|
53
|
+
lastActivityAt: z.ZodString;
|
|
54
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
55
|
+
result: z.ZodOptional<z.ZodEnum<["success", "partial", "blocked"]>>;
|
|
56
|
+
resultNotes: z.ZodOptional<z.ZodString>;
|
|
57
|
+
improvements: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
area: z.ZodString;
|
|
60
|
+
title: z.ZodString;
|
|
61
|
+
description: z.ZodString;
|
|
62
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
63
|
+
effort: z.ZodOptional<z.ZodEnum<["trivial", "small", "medium", "large"]>>;
|
|
64
|
+
detectedAt: z.ZodString;
|
|
65
|
+
detectedBy: z.ZodOptional<z.ZodString>;
|
|
66
|
+
implementedAt: z.ZodOptional<z.ZodString>;
|
|
67
|
+
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
id: string;
|
|
70
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
71
|
+
description: string;
|
|
72
|
+
title: string;
|
|
73
|
+
area: string;
|
|
74
|
+
detectedAt: string;
|
|
75
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
76
|
+
detectedBy?: string | undefined;
|
|
77
|
+
implementedAt?: string | undefined;
|
|
78
|
+
implementedInTask?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
id: string;
|
|
81
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
82
|
+
description: string;
|
|
83
|
+
title: string;
|
|
84
|
+
area: string;
|
|
85
|
+
detectedAt: string;
|
|
86
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
87
|
+
detectedBy?: string | undefined;
|
|
88
|
+
implementedAt?: string | undefined;
|
|
89
|
+
implementedInTask?: string | undefined;
|
|
90
|
+
}>, "many">>;
|
|
91
|
+
lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
title: string;
|
|
94
|
+
files: string[];
|
|
95
|
+
startedAt: string;
|
|
96
|
+
sessionId: string;
|
|
97
|
+
plan: string[];
|
|
98
|
+
improvements: {
|
|
99
|
+
id: string;
|
|
100
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
101
|
+
description: string;
|
|
102
|
+
title: string;
|
|
103
|
+
area: string;
|
|
104
|
+
detectedAt: string;
|
|
105
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
106
|
+
detectedBy?: string | undefined;
|
|
107
|
+
implementedAt?: string | undefined;
|
|
108
|
+
implementedInTask?: string | undefined;
|
|
109
|
+
}[];
|
|
110
|
+
domain: string;
|
|
111
|
+
userRequest: string;
|
|
112
|
+
currentStep: number;
|
|
113
|
+
lastActivityAt: string;
|
|
114
|
+
lessons: string[];
|
|
115
|
+
description?: string | undefined;
|
|
116
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
117
|
+
completedAt?: string | undefined;
|
|
118
|
+
agentId?: string | undefined;
|
|
119
|
+
resultNotes?: string | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
title: string;
|
|
122
|
+
startedAt: string;
|
|
123
|
+
sessionId: string;
|
|
124
|
+
plan: string[];
|
|
125
|
+
domain: string;
|
|
126
|
+
userRequest: string;
|
|
127
|
+
currentStep: number;
|
|
128
|
+
lastActivityAt: string;
|
|
129
|
+
description?: string | undefined;
|
|
130
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
131
|
+
files?: string[] | undefined;
|
|
132
|
+
completedAt?: string | undefined;
|
|
133
|
+
improvements?: {
|
|
134
|
+
id: string;
|
|
135
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
136
|
+
description: string;
|
|
137
|
+
title: string;
|
|
138
|
+
area: string;
|
|
139
|
+
detectedAt: string;
|
|
140
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
141
|
+
detectedBy?: string | undefined;
|
|
142
|
+
implementedAt?: string | undefined;
|
|
143
|
+
implementedInTask?: string | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
agentId?: string | undefined;
|
|
146
|
+
resultNotes?: string | undefined;
|
|
147
|
+
lessons?: string[] | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const TaskSchema: z.ZodObject<{
|
|
150
|
+
id: z.ZodString;
|
|
151
|
+
type: z.ZodLiteral<"task">;
|
|
152
|
+
status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
|
|
153
|
+
system: z.ZodString;
|
|
154
|
+
content: z.ZodObject<{
|
|
155
|
+
title: z.ZodString;
|
|
156
|
+
description: z.ZodOptional<z.ZodString>;
|
|
157
|
+
userRequest: z.ZodString;
|
|
158
|
+
plan: z.ZodArray<z.ZodString, "many">;
|
|
159
|
+
currentStep: z.ZodNumber;
|
|
160
|
+
domain: z.ZodString;
|
|
161
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
162
|
+
sessionId: z.ZodString;
|
|
163
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
164
|
+
startedAt: z.ZodString;
|
|
165
|
+
lastActivityAt: z.ZodString;
|
|
166
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
167
|
+
result: z.ZodOptional<z.ZodEnum<["success", "partial", "blocked"]>>;
|
|
168
|
+
resultNotes: z.ZodOptional<z.ZodString>;
|
|
169
|
+
improvements: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
area: z.ZodString;
|
|
172
|
+
title: z.ZodString;
|
|
173
|
+
description: z.ZodString;
|
|
174
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
175
|
+
effort: z.ZodOptional<z.ZodEnum<["trivial", "small", "medium", "large"]>>;
|
|
176
|
+
detectedAt: z.ZodString;
|
|
177
|
+
detectedBy: z.ZodOptional<z.ZodString>;
|
|
178
|
+
implementedAt: z.ZodOptional<z.ZodString>;
|
|
179
|
+
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
id: string;
|
|
182
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
183
|
+
description: string;
|
|
184
|
+
title: string;
|
|
185
|
+
area: string;
|
|
186
|
+
detectedAt: string;
|
|
187
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
188
|
+
detectedBy?: string | undefined;
|
|
189
|
+
implementedAt?: string | undefined;
|
|
190
|
+
implementedInTask?: string | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
id: string;
|
|
193
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
194
|
+
description: string;
|
|
195
|
+
title: string;
|
|
196
|
+
area: string;
|
|
197
|
+
detectedAt: string;
|
|
198
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
199
|
+
detectedBy?: string | undefined;
|
|
200
|
+
implementedAt?: string | undefined;
|
|
201
|
+
implementedInTask?: string | undefined;
|
|
202
|
+
}>, "many">>;
|
|
203
|
+
lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
title: string;
|
|
206
|
+
files: string[];
|
|
207
|
+
startedAt: string;
|
|
208
|
+
sessionId: string;
|
|
209
|
+
plan: string[];
|
|
210
|
+
improvements: {
|
|
211
|
+
id: string;
|
|
212
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
213
|
+
description: string;
|
|
214
|
+
title: string;
|
|
215
|
+
area: string;
|
|
216
|
+
detectedAt: string;
|
|
217
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
218
|
+
detectedBy?: string | undefined;
|
|
219
|
+
implementedAt?: string | undefined;
|
|
220
|
+
implementedInTask?: string | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
domain: string;
|
|
223
|
+
userRequest: string;
|
|
224
|
+
currentStep: number;
|
|
225
|
+
lastActivityAt: string;
|
|
226
|
+
lessons: string[];
|
|
227
|
+
description?: string | undefined;
|
|
228
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
229
|
+
completedAt?: string | undefined;
|
|
230
|
+
agentId?: string | undefined;
|
|
231
|
+
resultNotes?: string | undefined;
|
|
232
|
+
}, {
|
|
233
|
+
title: string;
|
|
234
|
+
startedAt: string;
|
|
235
|
+
sessionId: string;
|
|
236
|
+
plan: string[];
|
|
237
|
+
domain: string;
|
|
238
|
+
userRequest: string;
|
|
239
|
+
currentStep: number;
|
|
240
|
+
lastActivityAt: string;
|
|
241
|
+
description?: string | undefined;
|
|
242
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
243
|
+
files?: string[] | undefined;
|
|
244
|
+
completedAt?: string | undefined;
|
|
245
|
+
improvements?: {
|
|
246
|
+
id: string;
|
|
247
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
248
|
+
description: string;
|
|
249
|
+
title: string;
|
|
250
|
+
area: string;
|
|
251
|
+
detectedAt: string;
|
|
252
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
253
|
+
detectedBy?: string | undefined;
|
|
254
|
+
implementedAt?: string | undefined;
|
|
255
|
+
implementedInTask?: string | undefined;
|
|
256
|
+
}[] | undefined;
|
|
257
|
+
agentId?: string | undefined;
|
|
258
|
+
resultNotes?: string | undefined;
|
|
259
|
+
lessons?: string[] | undefined;
|
|
260
|
+
}>;
|
|
261
|
+
createdAt: z.ZodString;
|
|
262
|
+
updatedAt: z.ZodString;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
system: string;
|
|
265
|
+
id: string;
|
|
266
|
+
type: "task";
|
|
267
|
+
status: "in_progress" | "blocked" | "pending" | "completed";
|
|
268
|
+
content: {
|
|
269
|
+
title: string;
|
|
270
|
+
files: string[];
|
|
271
|
+
startedAt: string;
|
|
272
|
+
sessionId: string;
|
|
273
|
+
plan: string[];
|
|
274
|
+
improvements: {
|
|
275
|
+
id: string;
|
|
276
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
277
|
+
description: string;
|
|
278
|
+
title: string;
|
|
279
|
+
area: string;
|
|
280
|
+
detectedAt: string;
|
|
281
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
282
|
+
detectedBy?: string | undefined;
|
|
283
|
+
implementedAt?: string | undefined;
|
|
284
|
+
implementedInTask?: string | undefined;
|
|
285
|
+
}[];
|
|
286
|
+
domain: string;
|
|
287
|
+
userRequest: string;
|
|
288
|
+
currentStep: number;
|
|
289
|
+
lastActivityAt: string;
|
|
290
|
+
lessons: string[];
|
|
291
|
+
description?: string | undefined;
|
|
292
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
293
|
+
completedAt?: string | undefined;
|
|
294
|
+
agentId?: string | undefined;
|
|
295
|
+
resultNotes?: string | undefined;
|
|
296
|
+
};
|
|
297
|
+
createdAt: string;
|
|
298
|
+
updatedAt: string;
|
|
299
|
+
}, {
|
|
300
|
+
system: string;
|
|
301
|
+
id: string;
|
|
302
|
+
type: "task";
|
|
303
|
+
status: "in_progress" | "blocked" | "pending" | "completed";
|
|
304
|
+
content: {
|
|
305
|
+
title: string;
|
|
306
|
+
startedAt: string;
|
|
307
|
+
sessionId: string;
|
|
308
|
+
plan: string[];
|
|
309
|
+
domain: string;
|
|
310
|
+
userRequest: string;
|
|
311
|
+
currentStep: number;
|
|
312
|
+
lastActivityAt: string;
|
|
313
|
+
description?: string | undefined;
|
|
314
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
315
|
+
files?: string[] | undefined;
|
|
316
|
+
completedAt?: string | undefined;
|
|
317
|
+
improvements?: {
|
|
318
|
+
id: string;
|
|
319
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
320
|
+
description: string;
|
|
321
|
+
title: string;
|
|
322
|
+
area: string;
|
|
323
|
+
detectedAt: string;
|
|
324
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
325
|
+
detectedBy?: string | undefined;
|
|
326
|
+
implementedAt?: string | undefined;
|
|
327
|
+
implementedInTask?: string | undefined;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
agentId?: string | undefined;
|
|
330
|
+
resultNotes?: string | undefined;
|
|
331
|
+
lessons?: string[] | undefined;
|
|
332
|
+
};
|
|
333
|
+
createdAt: string;
|
|
334
|
+
updatedAt: string;
|
|
335
|
+
}>;
|
|
336
|
+
export type Task = z.infer<typeof TaskSchema>;
|
|
337
|
+
export type TaskContent = z.infer<typeof TaskContentSchema>;
|
|
338
|
+
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
339
|
+
export type TaskResult = z.infer<typeof TaskResultSchema>;
|
|
340
|
+
export declare const ImprovementStatusSchema: z.ZodEnum<["pending", "in_progress", "implemented", "rejected", "deferred"]>;
|
|
341
|
+
export declare const ImprovementContentSchema: z.ZodObject<{
|
|
342
|
+
area: z.ZodString;
|
|
343
|
+
title: z.ZodString;
|
|
344
|
+
description: z.ZodString;
|
|
345
|
+
detectedInTask: z.ZodString;
|
|
346
|
+
detectedBy: z.ZodString;
|
|
347
|
+
detectedAt: z.ZodString;
|
|
348
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
349
|
+
effort: z.ZodOptional<z.ZodEnum<["trivial", "small", "medium", "large"]>>;
|
|
350
|
+
implementedAt: z.ZodOptional<z.ZodString>;
|
|
351
|
+
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
352
|
+
implementedBy: z.ZodOptional<z.ZodString>;
|
|
353
|
+
rejectedAt: z.ZodOptional<z.ZodString>;
|
|
354
|
+
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
357
|
+
description: string;
|
|
358
|
+
title: string;
|
|
359
|
+
area: string;
|
|
360
|
+
detectedAt: string;
|
|
361
|
+
detectedBy: string;
|
|
362
|
+
detectedInTask: string;
|
|
363
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
364
|
+
implementedAt?: string | undefined;
|
|
365
|
+
implementedInTask?: string | undefined;
|
|
366
|
+
implementedBy?: string | undefined;
|
|
367
|
+
rejectedAt?: string | undefined;
|
|
368
|
+
rejectedReason?: string | undefined;
|
|
369
|
+
}, {
|
|
370
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
371
|
+
description: string;
|
|
372
|
+
title: string;
|
|
373
|
+
area: string;
|
|
374
|
+
detectedAt: string;
|
|
375
|
+
detectedBy: string;
|
|
376
|
+
detectedInTask: string;
|
|
377
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
378
|
+
implementedAt?: string | undefined;
|
|
379
|
+
implementedInTask?: string | undefined;
|
|
380
|
+
implementedBy?: string | undefined;
|
|
381
|
+
rejectedAt?: string | undefined;
|
|
382
|
+
rejectedReason?: string | undefined;
|
|
383
|
+
}>;
|
|
384
|
+
export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
385
|
+
id: z.ZodString;
|
|
386
|
+
type: z.ZodLiteral<"improvement">;
|
|
387
|
+
status: z.ZodEnum<["pending", "in_progress", "implemented", "rejected", "deferred"]>;
|
|
388
|
+
system: z.ZodString;
|
|
389
|
+
content: z.ZodObject<{
|
|
390
|
+
area: z.ZodString;
|
|
391
|
+
title: z.ZodString;
|
|
392
|
+
description: z.ZodString;
|
|
393
|
+
detectedInTask: z.ZodString;
|
|
394
|
+
detectedBy: z.ZodString;
|
|
395
|
+
detectedAt: z.ZodString;
|
|
396
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
397
|
+
effort: z.ZodOptional<z.ZodEnum<["trivial", "small", "medium", "large"]>>;
|
|
398
|
+
implementedAt: z.ZodOptional<z.ZodString>;
|
|
399
|
+
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
400
|
+
implementedBy: z.ZodOptional<z.ZodString>;
|
|
401
|
+
rejectedAt: z.ZodOptional<z.ZodString>;
|
|
402
|
+
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
403
|
+
}, "strip", z.ZodTypeAny, {
|
|
404
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
405
|
+
description: string;
|
|
406
|
+
title: string;
|
|
407
|
+
area: string;
|
|
408
|
+
detectedAt: string;
|
|
409
|
+
detectedBy: string;
|
|
410
|
+
detectedInTask: string;
|
|
411
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
412
|
+
implementedAt?: string | undefined;
|
|
413
|
+
implementedInTask?: string | undefined;
|
|
414
|
+
implementedBy?: string | undefined;
|
|
415
|
+
rejectedAt?: string | undefined;
|
|
416
|
+
rejectedReason?: string | undefined;
|
|
417
|
+
}, {
|
|
418
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
419
|
+
description: string;
|
|
420
|
+
title: string;
|
|
421
|
+
area: string;
|
|
422
|
+
detectedAt: string;
|
|
423
|
+
detectedBy: string;
|
|
424
|
+
detectedInTask: string;
|
|
425
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
426
|
+
implementedAt?: string | undefined;
|
|
427
|
+
implementedInTask?: string | undefined;
|
|
428
|
+
implementedBy?: string | undefined;
|
|
429
|
+
rejectedAt?: string | undefined;
|
|
430
|
+
rejectedReason?: string | undefined;
|
|
431
|
+
}>;
|
|
432
|
+
createdAt: z.ZodString;
|
|
433
|
+
updatedAt: z.ZodString;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
system: string;
|
|
436
|
+
id: string;
|
|
437
|
+
type: "improvement";
|
|
438
|
+
status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
|
|
439
|
+
content: {
|
|
440
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
441
|
+
description: string;
|
|
442
|
+
title: string;
|
|
443
|
+
area: string;
|
|
444
|
+
detectedAt: string;
|
|
445
|
+
detectedBy: string;
|
|
446
|
+
detectedInTask: string;
|
|
447
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
448
|
+
implementedAt?: string | undefined;
|
|
449
|
+
implementedInTask?: string | undefined;
|
|
450
|
+
implementedBy?: string | undefined;
|
|
451
|
+
rejectedAt?: string | undefined;
|
|
452
|
+
rejectedReason?: string | undefined;
|
|
453
|
+
};
|
|
454
|
+
createdAt: string;
|
|
455
|
+
updatedAt: string;
|
|
456
|
+
}, {
|
|
457
|
+
system: string;
|
|
458
|
+
id: string;
|
|
459
|
+
type: "improvement";
|
|
460
|
+
status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
|
|
461
|
+
content: {
|
|
462
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
463
|
+
description: string;
|
|
464
|
+
title: string;
|
|
465
|
+
area: string;
|
|
466
|
+
detectedAt: string;
|
|
467
|
+
detectedBy: string;
|
|
468
|
+
detectedInTask: string;
|
|
469
|
+
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
470
|
+
implementedAt?: string | undefined;
|
|
471
|
+
implementedInTask?: string | undefined;
|
|
472
|
+
implementedBy?: string | undefined;
|
|
473
|
+
rejectedAt?: string | undefined;
|
|
474
|
+
rejectedReason?: string | undefined;
|
|
475
|
+
};
|
|
476
|
+
createdAt: string;
|
|
477
|
+
updatedAt: string;
|
|
478
|
+
}>;
|
|
479
|
+
export type ImprovementRecord = z.infer<typeof ImprovementRecordSchema>;
|
|
480
|
+
export type ImprovementContent = z.infer<typeof ImprovementContentSchema>;
|
|
481
|
+
export type ImprovementStatus = z.infer<typeof ImprovementStatusSchema>;
|
|
482
|
+
export type Improvement = z.infer<typeof ImprovementSchema>;
|
|
483
|
+
export declare const SessionContentSchema: z.ZodObject<{
|
|
484
|
+
sessionId: z.ZodString;
|
|
485
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
486
|
+
system: z.ZodString;
|
|
487
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
488
|
+
ide: z.ZodOptional<z.ZodString>;
|
|
489
|
+
startedAt: z.ZodString;
|
|
490
|
+
lastActivityAt: z.ZodString;
|
|
491
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
492
|
+
toolCalls: z.ZodDefault<z.ZodNumber>;
|
|
493
|
+
tasksStarted: z.ZodDefault<z.ZodNumber>;
|
|
494
|
+
tasksCompleted: z.ZodDefault<z.ZodNumber>;
|
|
495
|
+
improvementsDetected: z.ZodDefault<z.ZodNumber>;
|
|
496
|
+
}, "strip", z.ZodTypeAny, {
|
|
497
|
+
system: string;
|
|
498
|
+
startedAt: string;
|
|
499
|
+
sessionId: string;
|
|
500
|
+
toolCalls: number;
|
|
501
|
+
lastActivityAt: string;
|
|
502
|
+
tasksStarted: number;
|
|
503
|
+
tasksCompleted: number;
|
|
504
|
+
improvementsDetected: number;
|
|
505
|
+
endedAt?: string | undefined;
|
|
506
|
+
userId?: string | undefined;
|
|
507
|
+
projectPath?: string | undefined;
|
|
508
|
+
ide?: string | undefined;
|
|
509
|
+
}, {
|
|
510
|
+
system: string;
|
|
511
|
+
startedAt: string;
|
|
512
|
+
sessionId: string;
|
|
513
|
+
lastActivityAt: string;
|
|
514
|
+
endedAt?: string | undefined;
|
|
515
|
+
toolCalls?: number | undefined;
|
|
516
|
+
userId?: string | undefined;
|
|
517
|
+
projectPath?: string | undefined;
|
|
518
|
+
ide?: string | undefined;
|
|
519
|
+
tasksStarted?: number | undefined;
|
|
520
|
+
tasksCompleted?: number | undefined;
|
|
521
|
+
improvementsDetected?: number | undefined;
|
|
522
|
+
}>;
|
|
523
|
+
export declare const SessionSchema: z.ZodObject<{
|
|
524
|
+
id: z.ZodString;
|
|
525
|
+
type: z.ZodLiteral<"session">;
|
|
526
|
+
status: z.ZodEnum<["active", "ended"]>;
|
|
527
|
+
system: z.ZodString;
|
|
528
|
+
content: z.ZodObject<{
|
|
529
|
+
sessionId: z.ZodString;
|
|
530
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
531
|
+
system: z.ZodString;
|
|
532
|
+
projectPath: z.ZodOptional<z.ZodString>;
|
|
533
|
+
ide: z.ZodOptional<z.ZodString>;
|
|
534
|
+
startedAt: z.ZodString;
|
|
535
|
+
lastActivityAt: z.ZodString;
|
|
536
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
537
|
+
toolCalls: z.ZodDefault<z.ZodNumber>;
|
|
538
|
+
tasksStarted: z.ZodDefault<z.ZodNumber>;
|
|
539
|
+
tasksCompleted: z.ZodDefault<z.ZodNumber>;
|
|
540
|
+
improvementsDetected: z.ZodDefault<z.ZodNumber>;
|
|
541
|
+
}, "strip", z.ZodTypeAny, {
|
|
542
|
+
system: string;
|
|
543
|
+
startedAt: string;
|
|
544
|
+
sessionId: string;
|
|
545
|
+
toolCalls: number;
|
|
546
|
+
lastActivityAt: string;
|
|
547
|
+
tasksStarted: number;
|
|
548
|
+
tasksCompleted: number;
|
|
549
|
+
improvementsDetected: number;
|
|
550
|
+
endedAt?: string | undefined;
|
|
551
|
+
userId?: string | undefined;
|
|
552
|
+
projectPath?: string | undefined;
|
|
553
|
+
ide?: string | undefined;
|
|
554
|
+
}, {
|
|
555
|
+
system: string;
|
|
556
|
+
startedAt: string;
|
|
557
|
+
sessionId: string;
|
|
558
|
+
lastActivityAt: string;
|
|
559
|
+
endedAt?: string | undefined;
|
|
560
|
+
toolCalls?: number | undefined;
|
|
561
|
+
userId?: string | undefined;
|
|
562
|
+
projectPath?: string | undefined;
|
|
563
|
+
ide?: string | undefined;
|
|
564
|
+
tasksStarted?: number | undefined;
|
|
565
|
+
tasksCompleted?: number | undefined;
|
|
566
|
+
improvementsDetected?: number | undefined;
|
|
567
|
+
}>;
|
|
568
|
+
createdAt: z.ZodString;
|
|
569
|
+
updatedAt: z.ZodString;
|
|
570
|
+
}, "strip", z.ZodTypeAny, {
|
|
571
|
+
system: string;
|
|
572
|
+
id: string;
|
|
573
|
+
type: "session";
|
|
574
|
+
status: "active" | "ended";
|
|
575
|
+
content: {
|
|
576
|
+
system: string;
|
|
577
|
+
startedAt: string;
|
|
578
|
+
sessionId: string;
|
|
579
|
+
toolCalls: number;
|
|
580
|
+
lastActivityAt: string;
|
|
581
|
+
tasksStarted: number;
|
|
582
|
+
tasksCompleted: number;
|
|
583
|
+
improvementsDetected: number;
|
|
584
|
+
endedAt?: string | undefined;
|
|
585
|
+
userId?: string | undefined;
|
|
586
|
+
projectPath?: string | undefined;
|
|
587
|
+
ide?: string | undefined;
|
|
588
|
+
};
|
|
589
|
+
createdAt: string;
|
|
590
|
+
updatedAt: string;
|
|
591
|
+
}, {
|
|
592
|
+
system: string;
|
|
593
|
+
id: string;
|
|
594
|
+
type: "session";
|
|
595
|
+
status: "active" | "ended";
|
|
596
|
+
content: {
|
|
597
|
+
system: string;
|
|
598
|
+
startedAt: string;
|
|
599
|
+
sessionId: string;
|
|
600
|
+
lastActivityAt: string;
|
|
601
|
+
endedAt?: string | undefined;
|
|
602
|
+
toolCalls?: number | undefined;
|
|
603
|
+
userId?: string | undefined;
|
|
604
|
+
projectPath?: string | undefined;
|
|
605
|
+
ide?: string | undefined;
|
|
606
|
+
tasksStarted?: number | undefined;
|
|
607
|
+
tasksCompleted?: number | undefined;
|
|
608
|
+
improvementsDetected?: number | undefined;
|
|
609
|
+
};
|
|
610
|
+
createdAt: string;
|
|
611
|
+
updatedAt: string;
|
|
612
|
+
}>;
|
|
613
|
+
export type Session = z.infer<typeof SessionSchema>;
|
|
614
|
+
export type SessionContent = z.infer<typeof SessionContentSchema>;
|
|
615
|
+
/**
|
|
616
|
+
* Crear una nueva tarea con valores por defecto
|
|
617
|
+
*/
|
|
618
|
+
export declare function createTask(system: string, sessionId: string, options: {
|
|
619
|
+
title: string;
|
|
620
|
+
userRequest: string;
|
|
621
|
+
plan: string[];
|
|
622
|
+
domain: string;
|
|
623
|
+
description?: string;
|
|
624
|
+
agentId?: string;
|
|
625
|
+
}): Omit<Task, 'createdAt' | 'updatedAt'>;
|
|
626
|
+
/**
|
|
627
|
+
* Crear una mejora detectada
|
|
628
|
+
*/
|
|
629
|
+
export declare function createImprovement(system: string, taskId: string, options: {
|
|
630
|
+
area: string;
|
|
631
|
+
title: string;
|
|
632
|
+
description: string;
|
|
633
|
+
priority: Improvement['priority'];
|
|
634
|
+
effort?: Improvement['effort'];
|
|
635
|
+
detectedBy?: string;
|
|
636
|
+
}): Omit<ImprovementRecord, 'createdAt' | 'updatedAt'>;
|
|
637
|
+
/**
|
|
638
|
+
* Validar que una tarea tiene mejoras antes de completar
|
|
639
|
+
*/
|
|
640
|
+
export declare function validateTaskCompletion(task: Task): {
|
|
641
|
+
valid: boolean;
|
|
642
|
+
errors: string[];
|
|
643
|
+
};
|
|
644
|
+
//# sourceMappingURL=tracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../src/schema/tracking.ts"],"names":[],"mappings":"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"}
|