@jamesaphoenix/tx-types 0.4.2 → 0.4.3

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.
Files changed (62) hide show
  1. package/README.md +480 -0
  2. package/dist/anchor.d.ts +93 -96
  3. package/dist/anchor.d.ts.map +1 -1
  4. package/dist/anchor.js +74 -1
  5. package/dist/anchor.js.map +1 -1
  6. package/dist/attempt.d.ts +36 -28
  7. package/dist/attempt.d.ts.map +1 -1
  8. package/dist/attempt.js +59 -1
  9. package/dist/attempt.js.map +1 -1
  10. package/dist/candidate.d.ts +117 -145
  11. package/dist/candidate.d.ts.map +1 -1
  12. package/dist/candidate.js +109 -0
  13. package/dist/candidate.js.map +1 -1
  14. package/dist/cycle.d.ts +130 -0
  15. package/dist/cycle.d.ts.map +1 -0
  16. package/dist/cycle.js +89 -0
  17. package/dist/cycle.js.map +1 -0
  18. package/dist/deduplication.d.ts +76 -92
  19. package/dist/deduplication.d.ts.map +1 -1
  20. package/dist/deduplication.js +63 -2
  21. package/dist/deduplication.js.map +1 -1
  22. package/dist/doc.d.ts +269 -0
  23. package/dist/doc.d.ts.map +1 -0
  24. package/dist/doc.js +232 -0
  25. package/dist/doc.js.map +1 -0
  26. package/dist/edge.d.ts +53 -56
  27. package/dist/edge.d.ts.map +1 -1
  28. package/dist/edge.js +51 -1
  29. package/dist/edge.js.map +1 -1
  30. package/dist/file-learning.d.ts +23 -28
  31. package/dist/file-learning.d.ts.map +1 -1
  32. package/dist/file-learning.js +22 -2
  33. package/dist/file-learning.js.map +1 -1
  34. package/dist/index.d.ts +14 -14
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +38 -21
  37. package/dist/index.js.map +1 -1
  38. package/dist/learning.d.ts +167 -172
  39. package/dist/learning.d.ts.map +1 -1
  40. package/dist/learning.js +109 -1
  41. package/dist/learning.js.map +1 -1
  42. package/dist/response.d.ts +636 -0
  43. package/dist/response.d.ts.map +1 -0
  44. package/dist/response.js +354 -0
  45. package/dist/response.js.map +1 -0
  46. package/dist/run.d.ts +73 -40
  47. package/dist/run.d.ts.map +1 -1
  48. package/dist/run.js +108 -1
  49. package/dist/run.js.map +1 -1
  50. package/dist/symbol.d.ts +42 -43
  51. package/dist/symbol.d.ts.map +1 -1
  52. package/dist/symbol.js +55 -1
  53. package/dist/symbol.js.map +1 -1
  54. package/dist/task.d.ts +114 -78
  55. package/dist/task.d.ts.map +1 -1
  56. package/dist/task.js +149 -2
  57. package/dist/task.js.map +1 -1
  58. package/dist/tracked-project.d.ts +24 -34
  59. package/dist/tracked-project.d.ts.map +1 -1
  60. package/dist/tracked-project.js +34 -0
  61. package/dist/tracked-project.js.map +1 -1
  62. package/package.json +7 -3
@@ -1 +1 @@
1
- {"version":3,"file":"learning.js","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,WAAW;CACH,CAAC"}
1
+ {"version":3,"file":"learning.js","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,WAAW;CACH,CAAC;AAEX,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,qBAAqB,CAAC,CAAA;AAGhF,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAChD,MAAM,CAAC,GAAG,EAAE,EACZ,MAAM,CAAC,KAAK,CAA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C,MAAM,CAAC,OAAO,CAAC;IACxC,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACtC,kEAAkE;IAClE,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;CAClE,CAAC,CAAA;AAGF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;IAClD,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACrD,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CAC/D,CAAC,CAAA"}
@@ -0,0 +1,636 @@
1
+ /**
2
+ * Response types for tx
3
+ *
4
+ * Shared response schemas optimized for agent consumption.
5
+ * All types use consistent camelCase naming and provide full context in every response.
6
+ * Serialized types convert Date objects to ISO strings for JSON output.
7
+ * Core type definitions using Effect Schema (Doctrine Rule 10).
8
+ *
9
+ * Design principles:
10
+ * - Consistent field naming across CLI, MCP, API, and SDK
11
+ * - Full context in every response (no bare Task, always TaskWithDeps)
12
+ * - Serialized types ready for JSON.stringify without custom replacers
13
+ * - Standard envelopes for lists, pagination, and actions
14
+ */
15
+ import { Schema } from "effect";
16
+ import type { TaskWithDeps } from "./task.js";
17
+ import type { Learning, LearningWithScore } from "./learning.js";
18
+ import type { FileLearning } from "./file-learning.js";
19
+ import type { Run } from "./run.js";
20
+ import type { Attempt } from "./attempt.js";
21
+ /**
22
+ * TaskWithDeps serialized for JSON output.
23
+ * All Date fields converted to ISO strings.
24
+ * This is the REQUIRED return type for all external APIs (per Doctrine Rule 1).
25
+ */
26
+ export declare const TaskWithDepsSerializedSchema: Schema.Struct<{
27
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
28
+ title: typeof Schema.String;
29
+ description: typeof Schema.String;
30
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
31
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
32
+ score: Schema.filter<typeof Schema.Number>;
33
+ createdAt: typeof Schema.String;
34
+ updatedAt: typeof Schema.String;
35
+ completedAt: Schema.NullOr<typeof Schema.String>;
36
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
37
+ /** Task IDs that block this task */
38
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
39
+ /** Task IDs this task blocks */
40
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
41
+ /** Direct child task IDs */
42
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
43
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
44
+ isReady: typeof Schema.Boolean;
45
+ }>;
46
+ export type TaskWithDepsSerialized = typeof TaskWithDepsSerializedSchema.Type;
47
+ /**
48
+ * Learning serialized for JSON output.
49
+ * All Date fields converted to ISO strings.
50
+ * Embedding as number array instead of Float32Array.
51
+ */
52
+ export declare const LearningSerializedSchema: Schema.Struct<{
53
+ id: Schema.filter<typeof Schema.Number>;
54
+ content: typeof Schema.String;
55
+ sourceType: Schema.Literal<["compaction", "run", "manual", "claude_md"]>;
56
+ sourceRef: Schema.NullOr<typeof Schema.String>;
57
+ createdAt: typeof Schema.String;
58
+ keywords: Schema.Array$<typeof Schema.String>;
59
+ category: Schema.NullOr<typeof Schema.String>;
60
+ usageCount: Schema.filter<typeof Schema.Number>;
61
+ lastUsedAt: Schema.NullOr<typeof Schema.String>;
62
+ outcomeScore: Schema.NullOr<typeof Schema.Number>;
63
+ /** Embedding vector as number array (null if not computed) */
64
+ embedding: Schema.NullOr<Schema.Array$<typeof Schema.Number>>;
65
+ }>;
66
+ export type LearningSerialized = typeof LearningSerializedSchema.Type;
67
+ /**
68
+ * LearningWithScore serialized for JSON output.
69
+ * Extends LearningSerialized with relevance scoring fields.
70
+ */
71
+ export declare const LearningWithScoreSerializedSchema: Schema.Struct<{
72
+ /** Combined relevance score (0-1) */
73
+ relevanceScore: typeof Schema.Number;
74
+ /** BM25 text search score */
75
+ bm25Score: typeof Schema.Number;
76
+ /** Vector similarity score (0-1) */
77
+ vectorScore: typeof Schema.Number;
78
+ /** Recency score (0-1, higher for newer) */
79
+ recencyScore: typeof Schema.Number;
80
+ /** RRF (Reciprocal Rank Fusion) score from combining BM25 and vector rankings */
81
+ rrfScore: typeof Schema.Number;
82
+ /** Rank in BM25 results (1-indexed, 0 if not in BM25 results) */
83
+ bm25Rank: Schema.filter<typeof Schema.Number>;
84
+ /** Rank in vector similarity results (1-indexed, 0 if not in vector results) */
85
+ vectorRank: Schema.filter<typeof Schema.Number>;
86
+ /** LLM reranker score (0-1, optional - only present when reranking is applied) */
87
+ rerankerScore: Schema.optional<typeof Schema.Number>;
88
+ /** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
89
+ feedbackScore: Schema.optional<typeof Schema.Number>;
90
+ id: Schema.filter<typeof Schema.Number>;
91
+ content: typeof Schema.String;
92
+ sourceType: Schema.Literal<["compaction", "run", "manual", "claude_md"]>;
93
+ sourceRef: Schema.NullOr<typeof Schema.String>;
94
+ createdAt: typeof Schema.String;
95
+ keywords: Schema.Array$<typeof Schema.String>;
96
+ category: Schema.NullOr<typeof Schema.String>;
97
+ usageCount: Schema.filter<typeof Schema.Number>;
98
+ lastUsedAt: Schema.NullOr<typeof Schema.String>;
99
+ outcomeScore: Schema.NullOr<typeof Schema.Number>;
100
+ embedding: Schema.NullOr<Schema.Array$<typeof Schema.Number>>;
101
+ }>;
102
+ export type LearningWithScoreSerialized = typeof LearningWithScoreSerializedSchema.Type;
103
+ /**
104
+ * FileLearning serialized for JSON output.
105
+ */
106
+ export declare const FileLearningsSerializedSchema: Schema.Struct<{
107
+ id: Schema.brand<Schema.filter<typeof Schema.Number>, "FileLearningId">;
108
+ filePattern: typeof Schema.String;
109
+ note: typeof Schema.String;
110
+ taskId: Schema.NullOr<typeof Schema.String>;
111
+ createdAt: typeof Schema.String;
112
+ }>;
113
+ export type FileLearningsSerialized = typeof FileLearningsSerializedSchema.Type;
114
+ /**
115
+ * Run serialized for JSON output.
116
+ */
117
+ export declare const RunSerializedSchema: Schema.Struct<{
118
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "RunId">;
119
+ taskId: Schema.NullOr<typeof Schema.String>;
120
+ agent: typeof Schema.String;
121
+ startedAt: typeof Schema.String;
122
+ endedAt: Schema.NullOr<typeof Schema.String>;
123
+ status: Schema.Literal<["running", "completed", "failed", "timeout", "cancelled"]>;
124
+ exitCode: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
125
+ pid: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
126
+ transcriptPath: Schema.NullOr<typeof Schema.String>;
127
+ stderrPath: Schema.NullOr<typeof Schema.String>;
128
+ stdoutPath: Schema.NullOr<typeof Schema.String>;
129
+ contextInjected: Schema.NullOr<typeof Schema.String>;
130
+ summary: Schema.NullOr<typeof Schema.String>;
131
+ errorMessage: Schema.NullOr<typeof Schema.String>;
132
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
133
+ }>;
134
+ export type RunSerialized = typeof RunSerializedSchema.Type;
135
+ /**
136
+ * Attempt serialized for JSON output.
137
+ */
138
+ export declare const AttemptSerializedSchema: Schema.Struct<{
139
+ id: Schema.brand<Schema.filter<typeof Schema.Number>, "AttemptId">;
140
+ taskId: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
141
+ approach: typeof Schema.String;
142
+ outcome: Schema.Literal<["failed", "succeeded"]>;
143
+ reason: Schema.NullOr<typeof Schema.String>;
144
+ createdAt: typeof Schema.String;
145
+ }>;
146
+ export type AttemptSerialized = typeof AttemptSerializedSchema.Type;
147
+ /**
148
+ * Serialize a TaskWithDeps for JSON output.
149
+ * Converts Date objects to ISO strings.
150
+ */
151
+ export declare const serializeTask: (task: TaskWithDeps) => TaskWithDepsSerialized;
152
+ /**
153
+ * Serialize a Learning for JSON output.
154
+ * Converts Date objects to ISO strings.
155
+ * Embeddings are omitted (null) to avoid serialization overhead —
156
+ * Float32Array → Array.from() → JSON.stringify is expensive and
157
+ * external consumers never need raw embedding vectors.
158
+ */
159
+ export declare const serializeLearning: (learning: Learning) => LearningSerialized;
160
+ /**
161
+ * Serialize a LearningWithScore for JSON output.
162
+ * Extends serializeLearning with score fields.
163
+ */
164
+ export declare const serializeLearningWithScore: (learning: LearningWithScore) => LearningWithScoreSerialized;
165
+ /**
166
+ * Serialize a FileLearning for JSON output.
167
+ */
168
+ export declare const serializeFileLearning: (learning: FileLearning) => FileLearningsSerialized;
169
+ /**
170
+ * Serialize a Run for JSON output.
171
+ */
172
+ export declare const serializeRun: (run: Run) => RunSerialized;
173
+ /**
174
+ * Serialize an Attempt for JSON output.
175
+ */
176
+ export declare const serializeAttempt: (attempt: Attempt) => AttemptSerialized;
177
+ /**
178
+ * Standard list response with count.
179
+ * Use for simple lists without pagination.
180
+ */
181
+ export interface ListResponse<T> {
182
+ readonly items: readonly T[];
183
+ readonly count: number;
184
+ }
185
+ /**
186
+ * Paginated response with cursor-based pagination.
187
+ * Use for large lists that need pagination.
188
+ */
189
+ export interface PaginatedResponse<T> {
190
+ readonly items: readonly T[];
191
+ /** Total count of items matching the filter (not just this page) */
192
+ readonly total: number;
193
+ /** Cursor for next page, null if no more pages */
194
+ readonly nextCursor: string | null;
195
+ /** Whether there are more items after this page */
196
+ readonly hasMore: boolean;
197
+ }
198
+ /**
199
+ * Standard action response for mutations.
200
+ * Use for create, update, delete operations.
201
+ */
202
+ export interface ActionResponse<T = void> {
203
+ readonly success: boolean;
204
+ /** The affected resource (for create/update) */
205
+ readonly data?: T;
206
+ /** Human-readable message describing the action */
207
+ readonly message?: string;
208
+ }
209
+ /**
210
+ * Error response with structured error info.
211
+ * Use for all error responses.
212
+ */
213
+ export declare const ErrorResponseSchema: Schema.Struct<{
214
+ error: Schema.Struct<{
215
+ /** Error code (e.g., "NOT_FOUND", "VALIDATION_ERROR") */
216
+ code: typeof Schema.String;
217
+ /** Human-readable error message */
218
+ message: typeof Schema.String;
219
+ /** Additional error details */
220
+ details: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
221
+ }>;
222
+ }>;
223
+ export type ErrorResponse = typeof ErrorResponseSchema.Type;
224
+ /** Response for listing ready tasks. */
225
+ export declare const TaskReadyResponseSchema: Schema.Struct<{
226
+ tasks: Schema.Array$<Schema.Struct<{
227
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
228
+ title: typeof Schema.String;
229
+ description: typeof Schema.String;
230
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
231
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
232
+ score: Schema.filter<typeof Schema.Number>;
233
+ createdAt: typeof Schema.String;
234
+ updatedAt: typeof Schema.String;
235
+ completedAt: Schema.NullOr<typeof Schema.String>;
236
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
237
+ /** Task IDs that block this task */
238
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
239
+ /** Task IDs this task blocks */
240
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
241
+ /** Direct child task IDs */
242
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
243
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
244
+ isReady: typeof Schema.Boolean;
245
+ }>>;
246
+ count: Schema.filter<typeof Schema.Number>;
247
+ }>;
248
+ export type TaskReadyResponse = typeof TaskReadyResponseSchema.Type;
249
+ /** Response for listing tasks with pagination. */
250
+ export declare const TaskListResponseSchema: Schema.Struct<{
251
+ items: Schema.Array$<Schema.Struct<{
252
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
253
+ title: typeof Schema.String;
254
+ description: typeof Schema.String;
255
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
256
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
257
+ score: Schema.filter<typeof Schema.Number>;
258
+ createdAt: typeof Schema.String;
259
+ updatedAt: typeof Schema.String;
260
+ completedAt: Schema.NullOr<typeof Schema.String>;
261
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
262
+ /** Task IDs that block this task */
263
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
264
+ /** Task IDs this task blocks */
265
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
266
+ /** Direct child task IDs */
267
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
268
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
269
+ isReady: typeof Schema.Boolean;
270
+ }>>;
271
+ tasks: Schema.Array$<Schema.Struct<{
272
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
273
+ title: typeof Schema.String;
274
+ description: typeof Schema.String;
275
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
276
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
277
+ score: Schema.filter<typeof Schema.Number>;
278
+ createdAt: typeof Schema.String;
279
+ updatedAt: typeof Schema.String;
280
+ completedAt: Schema.NullOr<typeof Schema.String>;
281
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
282
+ /** Task IDs that block this task */
283
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
284
+ /** Task IDs this task blocks */
285
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
286
+ /** Direct child task IDs */
287
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
288
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
289
+ isReady: typeof Schema.Boolean;
290
+ }>>;
291
+ total: Schema.filter<typeof Schema.Number>;
292
+ nextCursor: Schema.NullOr<typeof Schema.String>;
293
+ hasMore: typeof Schema.Boolean;
294
+ }>;
295
+ export type TaskListResponse = typeof TaskListResponseSchema.Type;
296
+ /** Response for getting a single task with full details. */
297
+ export declare const TaskDetailResponseSchema: Schema.Struct<{
298
+ task: Schema.Struct<{
299
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
300
+ title: typeof Schema.String;
301
+ description: typeof Schema.String;
302
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
303
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
304
+ score: Schema.filter<typeof Schema.Number>;
305
+ createdAt: typeof Schema.String;
306
+ updatedAt: typeof Schema.String;
307
+ completedAt: Schema.NullOr<typeof Schema.String>;
308
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
309
+ /** Task IDs that block this task */
310
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
311
+ /** Task IDs this task blocks */
312
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
313
+ /** Direct child task IDs */
314
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
315
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
316
+ isReady: typeof Schema.Boolean;
317
+ }>;
318
+ /** Tasks that block this task (full details, not just IDs) */
319
+ blockedByTasks: Schema.Array$<Schema.Struct<{
320
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
321
+ title: typeof Schema.String;
322
+ description: typeof Schema.String;
323
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
324
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
325
+ score: Schema.filter<typeof Schema.Number>;
326
+ createdAt: typeof Schema.String;
327
+ updatedAt: typeof Schema.String;
328
+ completedAt: Schema.NullOr<typeof Schema.String>;
329
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
330
+ /** Task IDs that block this task */
331
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
332
+ /** Task IDs this task blocks */
333
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
334
+ /** Direct child task IDs */
335
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
336
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
337
+ isReady: typeof Schema.Boolean;
338
+ }>>;
339
+ /** Tasks that this task blocks (full details, not just IDs) */
340
+ blocksTasks: Schema.Array$<Schema.Struct<{
341
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
342
+ title: typeof Schema.String;
343
+ description: typeof Schema.String;
344
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
345
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
346
+ score: Schema.filter<typeof Schema.Number>;
347
+ createdAt: typeof Schema.String;
348
+ updatedAt: typeof Schema.String;
349
+ completedAt: Schema.NullOr<typeof Schema.String>;
350
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
351
+ /** Task IDs that block this task */
352
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
353
+ /** Task IDs this task blocks */
354
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
355
+ /** Direct child task IDs */
356
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
357
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
358
+ isReady: typeof Schema.Boolean;
359
+ }>>;
360
+ /** Child tasks (full details, not just IDs) */
361
+ childTasks: Schema.Array$<Schema.Struct<{
362
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
363
+ title: typeof Schema.String;
364
+ description: typeof Schema.String;
365
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
366
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
367
+ score: Schema.filter<typeof Schema.Number>;
368
+ createdAt: typeof Schema.String;
369
+ updatedAt: typeof Schema.String;
370
+ completedAt: Schema.NullOr<typeof Schema.String>;
371
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
372
+ /** Task IDs that block this task */
373
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
374
+ /** Task IDs this task blocks */
375
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
376
+ /** Direct child task IDs */
377
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
378
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
379
+ isReady: typeof Schema.Boolean;
380
+ }>>;
381
+ }>;
382
+ export type TaskDetailResponse = typeof TaskDetailResponseSchema.Type;
383
+ /** Response for completing a task. */
384
+ export declare const TaskCompletionResponseSchema: Schema.Struct<{
385
+ /** The completed task */
386
+ task: Schema.Struct<{
387
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
388
+ title: typeof Schema.String;
389
+ description: typeof Schema.String;
390
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
391
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
392
+ score: Schema.filter<typeof Schema.Number>;
393
+ createdAt: typeof Schema.String;
394
+ updatedAt: typeof Schema.String;
395
+ completedAt: Schema.NullOr<typeof Schema.String>;
396
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
397
+ /** Task IDs that block this task */
398
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
399
+ /** Task IDs this task blocks */
400
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
401
+ /** Direct child task IDs */
402
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
403
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
404
+ isReady: typeof Schema.Boolean;
405
+ }>;
406
+ /** Tasks that became ready after this completion */
407
+ nowReady: Schema.Array$<Schema.Struct<{
408
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
409
+ title: typeof Schema.String;
410
+ description: typeof Schema.String;
411
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
412
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
413
+ score: Schema.filter<typeof Schema.Number>;
414
+ createdAt: typeof Schema.String;
415
+ updatedAt: typeof Schema.String;
416
+ completedAt: Schema.NullOr<typeof Schema.String>;
417
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
418
+ /** Task IDs that block this task */
419
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
420
+ /** Task IDs this task blocks */
421
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
422
+ /** Direct child task IDs */
423
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
424
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
425
+ isReady: typeof Schema.Boolean;
426
+ }>>;
427
+ }>;
428
+ export type TaskCompletionResponse = typeof TaskCompletionResponseSchema.Type;
429
+ /** Response for task tree/hierarchy queries. */
430
+ export declare const TaskTreeResponseSchema: Schema.Struct<{
431
+ tasks: Schema.Array$<Schema.Struct<{
432
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
433
+ title: typeof Schema.String;
434
+ description: typeof Schema.String;
435
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
436
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
437
+ score: Schema.filter<typeof Schema.Number>;
438
+ createdAt: typeof Schema.String;
439
+ updatedAt: typeof Schema.String;
440
+ completedAt: Schema.NullOr<typeof Schema.String>;
441
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
442
+ /** Task IDs that block this task */
443
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
444
+ /** Task IDs this task blocks */
445
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
446
+ /** Direct child task IDs */
447
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
448
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
449
+ isReady: typeof Schema.Boolean;
450
+ }>>;
451
+ /** Root task ID */
452
+ rootId: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
453
+ }>;
454
+ export type TaskTreeResponse = typeof TaskTreeResponseSchema.Type;
455
+ /** Response for searching learnings. */
456
+ export declare const LearningSearchResponseSchema: Schema.Struct<{
457
+ learnings: Schema.Array$<Schema.Struct<{
458
+ /** Combined relevance score (0-1) */
459
+ relevanceScore: typeof Schema.Number;
460
+ /** BM25 text search score */
461
+ bm25Score: typeof Schema.Number;
462
+ /** Vector similarity score (0-1) */
463
+ vectorScore: typeof Schema.Number;
464
+ /** Recency score (0-1, higher for newer) */
465
+ recencyScore: typeof Schema.Number;
466
+ /** RRF (Reciprocal Rank Fusion) score from combining BM25 and vector rankings */
467
+ rrfScore: typeof Schema.Number;
468
+ /** Rank in BM25 results (1-indexed, 0 if not in BM25 results) */
469
+ bm25Rank: Schema.filter<typeof Schema.Number>;
470
+ /** Rank in vector similarity results (1-indexed, 0 if not in vector results) */
471
+ vectorRank: Schema.filter<typeof Schema.Number>;
472
+ /** LLM reranker score (0-1, optional - only present when reranking is applied) */
473
+ rerankerScore: Schema.optional<typeof Schema.Number>;
474
+ /** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
475
+ feedbackScore: Schema.optional<typeof Schema.Number>;
476
+ id: Schema.filter<typeof Schema.Number>;
477
+ content: typeof Schema.String;
478
+ sourceType: Schema.Literal<["compaction", "run", "manual", "claude_md"]>;
479
+ sourceRef: Schema.NullOr<typeof Schema.String>;
480
+ createdAt: typeof Schema.String;
481
+ keywords: Schema.Array$<typeof Schema.String>;
482
+ category: Schema.NullOr<typeof Schema.String>;
483
+ usageCount: Schema.filter<typeof Schema.Number>;
484
+ lastUsedAt: Schema.NullOr<typeof Schema.String>;
485
+ outcomeScore: Schema.NullOr<typeof Schema.Number>;
486
+ embedding: Schema.NullOr<Schema.Array$<typeof Schema.Number>>;
487
+ }>>;
488
+ query: typeof Schema.String;
489
+ count: Schema.filter<typeof Schema.Number>;
490
+ }>;
491
+ export type LearningSearchResponse = typeof LearningSearchResponseSchema.Type;
492
+ /** Response for getting contextual learnings for a task. */
493
+ export declare const ContextResponseSchema: Schema.Struct<{
494
+ taskId: typeof Schema.String;
495
+ taskTitle: typeof Schema.String;
496
+ learnings: Schema.Array$<Schema.Struct<{
497
+ /** Combined relevance score (0-1) */
498
+ relevanceScore: typeof Schema.Number;
499
+ /** BM25 text search score */
500
+ bm25Score: typeof Schema.Number;
501
+ /** Vector similarity score (0-1) */
502
+ vectorScore: typeof Schema.Number;
503
+ /** Recency score (0-1, higher for newer) */
504
+ recencyScore: typeof Schema.Number;
505
+ /** RRF (Reciprocal Rank Fusion) score from combining BM25 and vector rankings */
506
+ rrfScore: typeof Schema.Number;
507
+ /** Rank in BM25 results (1-indexed, 0 if not in BM25 results) */
508
+ bm25Rank: Schema.filter<typeof Schema.Number>;
509
+ /** Rank in vector similarity results (1-indexed, 0 if not in vector results) */
510
+ vectorRank: Schema.filter<typeof Schema.Number>;
511
+ /** LLM reranker score (0-1, optional - only present when reranking is applied) */
512
+ rerankerScore: Schema.optional<typeof Schema.Number>;
513
+ /** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
514
+ feedbackScore: Schema.optional<typeof Schema.Number>;
515
+ id: Schema.filter<typeof Schema.Number>;
516
+ content: typeof Schema.String;
517
+ sourceType: Schema.Literal<["compaction", "run", "manual", "claude_md"]>;
518
+ sourceRef: Schema.NullOr<typeof Schema.String>;
519
+ createdAt: typeof Schema.String;
520
+ keywords: Schema.Array$<typeof Schema.String>;
521
+ category: Schema.NullOr<typeof Schema.String>;
522
+ usageCount: Schema.filter<typeof Schema.Number>;
523
+ lastUsedAt: Schema.NullOr<typeof Schema.String>;
524
+ outcomeScore: Schema.NullOr<typeof Schema.Number>;
525
+ embedding: Schema.NullOr<Schema.Array$<typeof Schema.Number>>;
526
+ }>>;
527
+ searchQuery: typeof Schema.String;
528
+ /** Search duration in milliseconds */
529
+ searchDuration: typeof Schema.Number;
530
+ }>;
531
+ export type ContextResponse = typeof ContextResponseSchema.Type;
532
+ /** Response for file learnings. */
533
+ export declare const FileLearningListResponseSchema: Schema.Struct<{
534
+ learnings: Schema.Array$<Schema.Struct<{
535
+ id: Schema.brand<Schema.filter<typeof Schema.Number>, "FileLearningId">;
536
+ filePattern: typeof Schema.String;
537
+ note: typeof Schema.String;
538
+ taskId: Schema.NullOr<typeof Schema.String>;
539
+ createdAt: typeof Schema.String;
540
+ }>>;
541
+ count: Schema.filter<typeof Schema.Number>;
542
+ /** File path used for matching (if provided) */
543
+ matchedPath: Schema.optional<typeof Schema.String>;
544
+ }>;
545
+ export type FileLearningListResponse = typeof FileLearningListResponseSchema.Type;
546
+ /** Response for listing runs. */
547
+ export declare const RunListResponseSchema: Schema.Struct<{
548
+ runs: Schema.Array$<Schema.Struct<{
549
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "RunId">;
550
+ taskId: Schema.NullOr<typeof Schema.String>;
551
+ agent: typeof Schema.String;
552
+ startedAt: typeof Schema.String;
553
+ endedAt: Schema.NullOr<typeof Schema.String>;
554
+ status: Schema.Literal<["running", "completed", "failed", "timeout", "cancelled"]>;
555
+ exitCode: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
556
+ pid: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
557
+ transcriptPath: Schema.NullOr<typeof Schema.String>;
558
+ stderrPath: Schema.NullOr<typeof Schema.String>;
559
+ stdoutPath: Schema.NullOr<typeof Schema.String>;
560
+ contextInjected: Schema.NullOr<typeof Schema.String>;
561
+ summary: Schema.NullOr<typeof Schema.String>;
562
+ errorMessage: Schema.NullOr<typeof Schema.String>;
563
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
564
+ }>>;
565
+ count: Schema.filter<typeof Schema.Number>;
566
+ }>;
567
+ export type RunListResponse = typeof RunListResponseSchema.Type;
568
+ /** Response for getting a single run with details. */
569
+ export declare const RunDetailResponseSchema: Schema.Struct<{
570
+ run: Schema.Struct<{
571
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "RunId">;
572
+ taskId: Schema.NullOr<typeof Schema.String>;
573
+ agent: typeof Schema.String;
574
+ startedAt: typeof Schema.String;
575
+ endedAt: Schema.NullOr<typeof Schema.String>;
576
+ status: Schema.Literal<["running", "completed", "failed", "timeout", "cancelled"]>;
577
+ exitCode: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
578
+ pid: Schema.NullOr<Schema.filter<typeof Schema.Number>>;
579
+ transcriptPath: Schema.NullOr<typeof Schema.String>;
580
+ stderrPath: Schema.NullOr<typeof Schema.String>;
581
+ stdoutPath: Schema.NullOr<typeof Schema.String>;
582
+ contextInjected: Schema.NullOr<typeof Schema.String>;
583
+ summary: Schema.NullOr<typeof Schema.String>;
584
+ errorMessage: Schema.NullOr<typeof Schema.String>;
585
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
586
+ }>;
587
+ /** Associated task (if any) */
588
+ task: Schema.optional<Schema.Struct<{
589
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
590
+ title: typeof Schema.String;
591
+ description: typeof Schema.String;
592
+ status: Schema.Literal<["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"]>;
593
+ parentId: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
594
+ score: Schema.filter<typeof Schema.Number>;
595
+ createdAt: typeof Schema.String;
596
+ updatedAt: typeof Schema.String;
597
+ completedAt: Schema.NullOr<typeof Schema.String>;
598
+ metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
599
+ /** Task IDs that block this task */
600
+ blockedBy: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
601
+ /** Task IDs this task blocks */
602
+ blocks: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
603
+ /** Direct child task IDs */
604
+ children: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">>;
605
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
606
+ isReady: typeof Schema.Boolean;
607
+ }>>;
608
+ /** Attempts made during this run */
609
+ attempts: Schema.Array$<Schema.Struct<{
610
+ id: Schema.brand<Schema.filter<typeof Schema.Number>, "AttemptId">;
611
+ taskId: Schema.brand<Schema.filter<typeof Schema.String>, "TaskId">;
612
+ approach: typeof Schema.String;
613
+ outcome: Schema.Literal<["failed", "succeeded"]>;
614
+ reason: Schema.NullOr<typeof Schema.String>;
615
+ createdAt: typeof Schema.String;
616
+ }>>;
617
+ }>;
618
+ export type RunDetailResponse = typeof RunDetailResponseSchema.Type;
619
+ /** Response for sync export operation. */
620
+ export declare const SyncExportResponseSchema: Schema.Struct<{
621
+ success: typeof Schema.Boolean;
622
+ outputPath: typeof Schema.String;
623
+ taskCount: Schema.filter<typeof Schema.Number>;
624
+ learningCount: Schema.filter<typeof Schema.Number>;
625
+ }>;
626
+ export type SyncExportResponse = typeof SyncExportResponseSchema.Type;
627
+ /** Response for sync import operation. */
628
+ export declare const SyncImportResponseSchema: Schema.Struct<{
629
+ success: typeof Schema.Boolean;
630
+ inputPath: typeof Schema.String;
631
+ tasksImported: Schema.filter<typeof Schema.Number>;
632
+ learningsImported: Schema.filter<typeof Schema.Number>;
633
+ conflicts: Schema.filter<typeof Schema.Number>;
634
+ }>;
635
+ export type SyncImportResponse = typeof SyncImportResponseSchema.Type;
636
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAQ3C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;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