ferix-code 0.0.2-beta.16 → 0.0.2-beta.18
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/index.d.ts +1034 -16
- package/dist/index.js +1174 -476
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema, Brand, Stream, Effect, Context, Layer } from 'effect';
|
|
1
|
+
import { Schema, Either, Brand, ParseResult, Stream, Effect, Context, Layer } from 'effect';
|
|
2
2
|
import * as effect_Cause from 'effect/Cause';
|
|
3
3
|
import * as effect_Types from 'effect/Types';
|
|
4
4
|
import * as effect_Effect from 'effect/Effect';
|
|
@@ -96,7 +96,7 @@ declare const GitError_base: new <A extends Record<string, any> = {}>(args: effe
|
|
|
96
96
|
*/
|
|
97
97
|
declare class GitError extends GitError_base<{
|
|
98
98
|
readonly message: string;
|
|
99
|
-
readonly operation: "createWorktree" | "removeWorktree" | "commit" | "push" | "createPR" | "status";
|
|
99
|
+
readonly operation: "createWorktree" | "removeWorktree" | "removeWorktreeKeepBranch" | "commit" | "push" | "createPR" | "renameBranch" | "status";
|
|
100
100
|
readonly cause?: unknown;
|
|
101
101
|
}> {
|
|
102
102
|
}
|
|
@@ -105,6 +105,539 @@ declare class GitError extends GitError_base<{
|
|
|
105
105
|
*/
|
|
106
106
|
type FerixError = LLMError | ParseError | PlanStoreError | SessionStoreError | ProgressStoreError | GuardrailsStoreError | OrchestratorError | GitError;
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Text delta event - streamed text content.
|
|
110
|
+
*/
|
|
111
|
+
declare const TextDeltaSchema: Schema.Struct<{
|
|
112
|
+
type: Schema.Literal<["text_delta"]>;
|
|
113
|
+
text: typeof Schema.String;
|
|
114
|
+
}>;
|
|
115
|
+
type TextDelta = typeof TextDeltaSchema.Type;
|
|
116
|
+
/**
|
|
117
|
+
* Input JSON delta - partial tool input being streamed.
|
|
118
|
+
*/
|
|
119
|
+
declare const InputJsonDeltaSchema: Schema.Struct<{
|
|
120
|
+
type: Schema.Literal<["input_json_delta"]>;
|
|
121
|
+
partial_json: typeof Schema.String;
|
|
122
|
+
}>;
|
|
123
|
+
type InputJsonDelta = typeof InputJsonDeltaSchema.Type;
|
|
124
|
+
/**
|
|
125
|
+
* Delta union - either text or input JSON delta.
|
|
126
|
+
*/
|
|
127
|
+
declare const DeltaSchema: Schema.Union<[Schema.Struct<{
|
|
128
|
+
type: Schema.Literal<["text_delta"]>;
|
|
129
|
+
text: typeof Schema.String;
|
|
130
|
+
}>, Schema.Struct<{
|
|
131
|
+
type: Schema.Literal<["input_json_delta"]>;
|
|
132
|
+
partial_json: typeof Schema.String;
|
|
133
|
+
}>]>;
|
|
134
|
+
type Delta = typeof DeltaSchema.Type;
|
|
135
|
+
/**
|
|
136
|
+
* Text content block in an assistant message.
|
|
137
|
+
*/
|
|
138
|
+
declare const TextContentBlockSchema: Schema.Struct<{
|
|
139
|
+
type: Schema.Literal<["text"]>;
|
|
140
|
+
text: typeof Schema.String;
|
|
141
|
+
}>;
|
|
142
|
+
type TextContentBlock = typeof TextContentBlockSchema.Type;
|
|
143
|
+
/**
|
|
144
|
+
* Tool use content block with name and input.
|
|
145
|
+
*/
|
|
146
|
+
declare const ToolUseContentBlockSchema: Schema.Struct<{
|
|
147
|
+
type: Schema.Literal<["tool_use"]>;
|
|
148
|
+
id: Schema.optional<typeof Schema.String>;
|
|
149
|
+
name: typeof Schema.String;
|
|
150
|
+
input: typeof Schema.Unknown;
|
|
151
|
+
}>;
|
|
152
|
+
type ToolUseContentBlock = typeof ToolUseContentBlockSchema.Type;
|
|
153
|
+
/**
|
|
154
|
+
* Content block union for assistant messages.
|
|
155
|
+
*/
|
|
156
|
+
declare const ContentBlockSchema: Schema.Union<[Schema.Struct<{
|
|
157
|
+
type: Schema.Literal<["text"]>;
|
|
158
|
+
text: typeof Schema.String;
|
|
159
|
+
}>, Schema.Struct<{
|
|
160
|
+
type: Schema.Literal<["tool_use"]>;
|
|
161
|
+
id: Schema.optional<typeof Schema.String>;
|
|
162
|
+
name: typeof Schema.String;
|
|
163
|
+
input: typeof Schema.Unknown;
|
|
164
|
+
}>]>;
|
|
165
|
+
type ContentBlock = typeof ContentBlockSchema.Type;
|
|
166
|
+
/**
|
|
167
|
+
* Content block start event - beginning of a content block.
|
|
168
|
+
*/
|
|
169
|
+
declare const ContentBlockStartSchema: Schema.Struct<{
|
|
170
|
+
type: Schema.Literal<["content_block_start"]>;
|
|
171
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
172
|
+
content_block: Schema.Union<[Schema.Struct<{
|
|
173
|
+
type: Schema.Literal<["text"]>;
|
|
174
|
+
text: Schema.optional<typeof Schema.String>;
|
|
175
|
+
}>, Schema.Struct<{
|
|
176
|
+
type: Schema.Literal<["tool_use"]>;
|
|
177
|
+
id: Schema.optional<typeof Schema.String>;
|
|
178
|
+
name: typeof Schema.String;
|
|
179
|
+
input: Schema.optional<typeof Schema.Unknown>;
|
|
180
|
+
}>]>;
|
|
181
|
+
}>;
|
|
182
|
+
type ContentBlockStart = typeof ContentBlockStartSchema.Type;
|
|
183
|
+
/**
|
|
184
|
+
* Content block delta event - incremental update to a content block.
|
|
185
|
+
*/
|
|
186
|
+
declare const ContentBlockDeltaSchema: Schema.Struct<{
|
|
187
|
+
type: Schema.Literal<["content_block_delta"]>;
|
|
188
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
189
|
+
delta: Schema.Union<[Schema.Struct<{
|
|
190
|
+
type: Schema.Literal<["text_delta"]>;
|
|
191
|
+
text: typeof Schema.String;
|
|
192
|
+
}>, Schema.Struct<{
|
|
193
|
+
type: Schema.Literal<["input_json_delta"]>;
|
|
194
|
+
partial_json: typeof Schema.String;
|
|
195
|
+
}>]>;
|
|
196
|
+
}>;
|
|
197
|
+
type ContentBlockDelta = typeof ContentBlockDeltaSchema.Type;
|
|
198
|
+
/**
|
|
199
|
+
* Content block stop event - end of a content block.
|
|
200
|
+
*/
|
|
201
|
+
declare const ContentBlockStopSchema: Schema.Struct<{
|
|
202
|
+
type: Schema.Literal<["content_block_stop"]>;
|
|
203
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
204
|
+
}>;
|
|
205
|
+
type ContentBlockStop = typeof ContentBlockStopSchema.Type;
|
|
206
|
+
/**
|
|
207
|
+
* Assistant message event with full content.
|
|
208
|
+
*/
|
|
209
|
+
declare const AssistantMessageSchema: Schema.Struct<{
|
|
210
|
+
type: Schema.Literal<["assistant"]>;
|
|
211
|
+
message: Schema.Struct<{
|
|
212
|
+
content: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
213
|
+
type: Schema.Literal<["text"]>;
|
|
214
|
+
text: typeof Schema.String;
|
|
215
|
+
}>, Schema.Struct<{
|
|
216
|
+
type: Schema.Literal<["tool_use"]>;
|
|
217
|
+
id: Schema.optional<typeof Schema.String>;
|
|
218
|
+
name: typeof Schema.String;
|
|
219
|
+
input: typeof Schema.Unknown;
|
|
220
|
+
}>]>>;
|
|
221
|
+
}>;
|
|
222
|
+
}>;
|
|
223
|
+
type AssistantMessage = typeof AssistantMessageSchema.Type;
|
|
224
|
+
/**
|
|
225
|
+
* Stream event envelope - CLI wraps streaming events in this format.
|
|
226
|
+
*/
|
|
227
|
+
declare const StreamEventEnvelopeSchema: Schema.Struct<{
|
|
228
|
+
type: Schema.Literal<["stream_event"]>;
|
|
229
|
+
event: typeof Schema.Unknown;
|
|
230
|
+
}>;
|
|
231
|
+
type StreamEventEnvelope = typeof StreamEventEnvelopeSchema.Type;
|
|
232
|
+
/**
|
|
233
|
+
* Union of all Claude/Cursor CLI streaming events.
|
|
234
|
+
*/
|
|
235
|
+
declare const ClaudeCliEventSchema: Schema.Union<[Schema.Struct<{
|
|
236
|
+
type: Schema.Literal<["content_block_start"]>;
|
|
237
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
238
|
+
content_block: Schema.Union<[Schema.Struct<{
|
|
239
|
+
type: Schema.Literal<["text"]>;
|
|
240
|
+
text: Schema.optional<typeof Schema.String>;
|
|
241
|
+
}>, Schema.Struct<{
|
|
242
|
+
type: Schema.Literal<["tool_use"]>;
|
|
243
|
+
id: Schema.optional<typeof Schema.String>;
|
|
244
|
+
name: typeof Schema.String;
|
|
245
|
+
input: Schema.optional<typeof Schema.Unknown>;
|
|
246
|
+
}>]>;
|
|
247
|
+
}>, Schema.Struct<{
|
|
248
|
+
type: Schema.Literal<["content_block_delta"]>;
|
|
249
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
250
|
+
delta: Schema.Union<[Schema.Struct<{
|
|
251
|
+
type: Schema.Literal<["text_delta"]>;
|
|
252
|
+
text: typeof Schema.String;
|
|
253
|
+
}>, Schema.Struct<{
|
|
254
|
+
type: Schema.Literal<["input_json_delta"]>;
|
|
255
|
+
partial_json: typeof Schema.String;
|
|
256
|
+
}>]>;
|
|
257
|
+
}>, Schema.Struct<{
|
|
258
|
+
type: Schema.Literal<["content_block_stop"]>;
|
|
259
|
+
index: Schema.optional<typeof Schema.Number>;
|
|
260
|
+
}>, Schema.Struct<{
|
|
261
|
+
type: Schema.Literal<["assistant"]>;
|
|
262
|
+
message: Schema.Struct<{
|
|
263
|
+
content: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
264
|
+
type: Schema.Literal<["text"]>;
|
|
265
|
+
text: typeof Schema.String;
|
|
266
|
+
}>, Schema.Struct<{
|
|
267
|
+
type: Schema.Literal<["tool_use"]>;
|
|
268
|
+
id: Schema.optional<typeof Schema.String>;
|
|
269
|
+
name: typeof Schema.String;
|
|
270
|
+
input: typeof Schema.Unknown;
|
|
271
|
+
}>]>>;
|
|
272
|
+
}>;
|
|
273
|
+
}>, Schema.Struct<{
|
|
274
|
+
type: Schema.Literal<["stream_event"]>;
|
|
275
|
+
event: typeof Schema.Unknown;
|
|
276
|
+
}>]>;
|
|
277
|
+
type ClaudeCliEvent = typeof ClaudeCliEventSchema.Type;
|
|
278
|
+
/**
|
|
279
|
+
* Type guards using Effect Schema.
|
|
280
|
+
*/
|
|
281
|
+
declare const isContentBlockStart: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
282
|
+
readonly type: "content_block_start";
|
|
283
|
+
readonly index?: number | undefined;
|
|
284
|
+
readonly content_block: {
|
|
285
|
+
readonly type: "text";
|
|
286
|
+
readonly text?: string | undefined;
|
|
287
|
+
} | {
|
|
288
|
+
readonly type: "tool_use";
|
|
289
|
+
readonly input?: unknown;
|
|
290
|
+
readonly id?: string | undefined;
|
|
291
|
+
readonly name: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
declare const isContentBlockDelta: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
295
|
+
readonly type: "content_block_delta";
|
|
296
|
+
readonly index?: number | undefined;
|
|
297
|
+
readonly delta: {
|
|
298
|
+
readonly type: "text_delta";
|
|
299
|
+
readonly text: string;
|
|
300
|
+
} | {
|
|
301
|
+
readonly type: "input_json_delta";
|
|
302
|
+
readonly partial_json: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
declare const isContentBlockStop: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
306
|
+
readonly type: "content_block_stop";
|
|
307
|
+
readonly index?: number | undefined;
|
|
308
|
+
};
|
|
309
|
+
declare const isAssistantMessage: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
310
|
+
readonly type: "assistant";
|
|
311
|
+
readonly message: {
|
|
312
|
+
readonly content: readonly ({
|
|
313
|
+
readonly type: "text";
|
|
314
|
+
readonly text: string;
|
|
315
|
+
} | {
|
|
316
|
+
readonly type: "tool_use";
|
|
317
|
+
readonly input: unknown;
|
|
318
|
+
readonly id?: string | undefined;
|
|
319
|
+
readonly name: string;
|
|
320
|
+
})[];
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
declare const isStreamEventEnvelope: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
324
|
+
readonly type: "stream_event";
|
|
325
|
+
readonly event: unknown;
|
|
326
|
+
};
|
|
327
|
+
declare const isTextDelta: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
328
|
+
readonly type: "text_delta";
|
|
329
|
+
readonly text: string;
|
|
330
|
+
};
|
|
331
|
+
declare const isInputJsonDelta: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
332
|
+
readonly type: "input_json_delta";
|
|
333
|
+
readonly partial_json: string;
|
|
334
|
+
};
|
|
335
|
+
declare const isToolUseContentBlock: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
336
|
+
readonly type: "tool_use";
|
|
337
|
+
readonly input: unknown;
|
|
338
|
+
readonly id?: string | undefined;
|
|
339
|
+
readonly name: string;
|
|
340
|
+
};
|
|
341
|
+
declare const isTextContentBlock: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
342
|
+
readonly type: "text";
|
|
343
|
+
readonly text: string;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Decode helpers.
|
|
347
|
+
*/
|
|
348
|
+
declare const decodeClaudeCliEvent: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
349
|
+
readonly type: "content_block_start";
|
|
350
|
+
readonly index?: number | undefined;
|
|
351
|
+
readonly content_block: {
|
|
352
|
+
readonly type: "text";
|
|
353
|
+
readonly text?: string | undefined;
|
|
354
|
+
} | {
|
|
355
|
+
readonly type: "tool_use";
|
|
356
|
+
readonly input?: unknown;
|
|
357
|
+
readonly id?: string | undefined;
|
|
358
|
+
readonly name: string;
|
|
359
|
+
};
|
|
360
|
+
} | {
|
|
361
|
+
readonly type: "content_block_delta";
|
|
362
|
+
readonly index?: number | undefined;
|
|
363
|
+
readonly delta: {
|
|
364
|
+
readonly type: "text_delta";
|
|
365
|
+
readonly text: string;
|
|
366
|
+
} | {
|
|
367
|
+
readonly type: "input_json_delta";
|
|
368
|
+
readonly partial_json: string;
|
|
369
|
+
};
|
|
370
|
+
} | {
|
|
371
|
+
readonly type: "content_block_stop";
|
|
372
|
+
readonly index?: number | undefined;
|
|
373
|
+
} | {
|
|
374
|
+
readonly type: "assistant";
|
|
375
|
+
readonly message: {
|
|
376
|
+
readonly content: readonly ({
|
|
377
|
+
readonly type: "text";
|
|
378
|
+
readonly text: string;
|
|
379
|
+
} | {
|
|
380
|
+
readonly type: "tool_use";
|
|
381
|
+
readonly input: unknown;
|
|
382
|
+
readonly id?: string | undefined;
|
|
383
|
+
readonly name: string;
|
|
384
|
+
})[];
|
|
385
|
+
};
|
|
386
|
+
} | {
|
|
387
|
+
readonly type: "stream_event";
|
|
388
|
+
readonly event: unknown;
|
|
389
|
+
}, effect_ParseResult.ParseError, never>;
|
|
390
|
+
declare const decodeClaudeCliEventSync: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => {
|
|
391
|
+
readonly type: "content_block_start";
|
|
392
|
+
readonly index?: number | undefined;
|
|
393
|
+
readonly content_block: {
|
|
394
|
+
readonly type: "text";
|
|
395
|
+
readonly text?: string | undefined;
|
|
396
|
+
} | {
|
|
397
|
+
readonly type: "tool_use";
|
|
398
|
+
readonly input?: unknown;
|
|
399
|
+
readonly id?: string | undefined;
|
|
400
|
+
readonly name: string;
|
|
401
|
+
};
|
|
402
|
+
} | {
|
|
403
|
+
readonly type: "content_block_delta";
|
|
404
|
+
readonly index?: number | undefined;
|
|
405
|
+
readonly delta: {
|
|
406
|
+
readonly type: "text_delta";
|
|
407
|
+
readonly text: string;
|
|
408
|
+
} | {
|
|
409
|
+
readonly type: "input_json_delta";
|
|
410
|
+
readonly partial_json: string;
|
|
411
|
+
};
|
|
412
|
+
} | {
|
|
413
|
+
readonly type: "content_block_stop";
|
|
414
|
+
readonly index?: number | undefined;
|
|
415
|
+
} | {
|
|
416
|
+
readonly type: "assistant";
|
|
417
|
+
readonly message: {
|
|
418
|
+
readonly content: readonly ({
|
|
419
|
+
readonly type: "text";
|
|
420
|
+
readonly text: string;
|
|
421
|
+
} | {
|
|
422
|
+
readonly type: "tool_use";
|
|
423
|
+
readonly input: unknown;
|
|
424
|
+
readonly id?: string | undefined;
|
|
425
|
+
readonly name: string;
|
|
426
|
+
})[];
|
|
427
|
+
};
|
|
428
|
+
} | {
|
|
429
|
+
readonly type: "stream_event";
|
|
430
|
+
readonly event: unknown;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Text content event from OpenCode.
|
|
435
|
+
*/
|
|
436
|
+
declare const OpenCodeTextEventSchema: Schema.Struct<{
|
|
437
|
+
type: Schema.Literal<["text"]>;
|
|
438
|
+
text: typeof Schema.String;
|
|
439
|
+
}>;
|
|
440
|
+
type OpenCodeTextEvent = typeof OpenCodeTextEventSchema.Type;
|
|
441
|
+
/**
|
|
442
|
+
* Tool state within a tool_use event.
|
|
443
|
+
*/
|
|
444
|
+
declare const OpenCodeToolStateSchema: Schema.Struct<{
|
|
445
|
+
status: typeof Schema.String;
|
|
446
|
+
input: typeof Schema.Unknown;
|
|
447
|
+
output: Schema.optional<typeof Schema.String>;
|
|
448
|
+
}>;
|
|
449
|
+
type OpenCodeToolState = typeof OpenCodeToolStateSchema.Type;
|
|
450
|
+
/**
|
|
451
|
+
* Tool part within a tool_use event.
|
|
452
|
+
*/
|
|
453
|
+
declare const OpenCodeToolPartSchema: Schema.Struct<{
|
|
454
|
+
tool: typeof Schema.String;
|
|
455
|
+
callID: typeof Schema.String;
|
|
456
|
+
state: Schema.Struct<{
|
|
457
|
+
status: typeof Schema.String;
|
|
458
|
+
input: typeof Schema.Unknown;
|
|
459
|
+
output: Schema.optional<typeof Schema.String>;
|
|
460
|
+
}>;
|
|
461
|
+
}>;
|
|
462
|
+
type OpenCodeToolPart = typeof OpenCodeToolPartSchema.Type;
|
|
463
|
+
/**
|
|
464
|
+
* Tool use event from OpenCode - complete tool invocation with input/output.
|
|
465
|
+
*/
|
|
466
|
+
declare const OpenCodeToolUseEventSchema: Schema.Struct<{
|
|
467
|
+
type: Schema.Literal<["tool_use"]>;
|
|
468
|
+
part: Schema.Struct<{
|
|
469
|
+
tool: typeof Schema.String;
|
|
470
|
+
callID: typeof Schema.String;
|
|
471
|
+
state: Schema.Struct<{
|
|
472
|
+
status: typeof Schema.String;
|
|
473
|
+
input: typeof Schema.Unknown;
|
|
474
|
+
output: Schema.optional<typeof Schema.String>;
|
|
475
|
+
}>;
|
|
476
|
+
}>;
|
|
477
|
+
}>;
|
|
478
|
+
type OpenCodeToolUseEvent = typeof OpenCodeToolUseEventSchema.Type;
|
|
479
|
+
/**
|
|
480
|
+
* Part information in step_start events.
|
|
481
|
+
*/
|
|
482
|
+
declare const OpenCodeStepPartSchema: Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
483
|
+
type OpenCodeStepPart = typeof OpenCodeStepPartSchema.Type;
|
|
484
|
+
/**
|
|
485
|
+
* Step start event from OpenCode.
|
|
486
|
+
*/
|
|
487
|
+
declare const OpenCodeStepStartSchema: Schema.Struct<{
|
|
488
|
+
type: Schema.Literal<["step_start"]>;
|
|
489
|
+
timestamp: typeof Schema.Number;
|
|
490
|
+
sessionID: typeof Schema.String;
|
|
491
|
+
part: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
492
|
+
}>;
|
|
493
|
+
type OpenCodeStepStart = typeof OpenCodeStepStartSchema.Type;
|
|
494
|
+
/**
|
|
495
|
+
* Token information in step_finish events.
|
|
496
|
+
*/
|
|
497
|
+
declare const OpenCodeTokensSchema: Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
498
|
+
type OpenCodeTokens = typeof OpenCodeTokensSchema.Type;
|
|
499
|
+
/**
|
|
500
|
+
* Cost information in step_finish events.
|
|
501
|
+
*/
|
|
502
|
+
declare const OpenCodeCostSchema: Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
503
|
+
type OpenCodeCost = typeof OpenCodeCostSchema.Type;
|
|
504
|
+
/**
|
|
505
|
+
* Step finish event from OpenCode.
|
|
506
|
+
*/
|
|
507
|
+
declare const OpenCodeStepFinishSchema: Schema.Struct<{
|
|
508
|
+
type: Schema.Literal<["step_finish"]>;
|
|
509
|
+
tokens: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
510
|
+
cost: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
511
|
+
}>;
|
|
512
|
+
type OpenCodeStepFinish = typeof OpenCodeStepFinishSchema.Type;
|
|
513
|
+
/**
|
|
514
|
+
* Union of all OpenCode CLI streaming events.
|
|
515
|
+
*/
|
|
516
|
+
declare const OpenCodeCliEventSchema: Schema.Union<[Schema.Struct<{
|
|
517
|
+
type: Schema.Literal<["text"]>;
|
|
518
|
+
text: typeof Schema.String;
|
|
519
|
+
}>, Schema.Struct<{
|
|
520
|
+
type: Schema.Literal<["tool_use"]>;
|
|
521
|
+
part: Schema.Struct<{
|
|
522
|
+
tool: typeof Schema.String;
|
|
523
|
+
callID: typeof Schema.String;
|
|
524
|
+
state: Schema.Struct<{
|
|
525
|
+
status: typeof Schema.String;
|
|
526
|
+
input: typeof Schema.Unknown;
|
|
527
|
+
output: Schema.optional<typeof Schema.String>;
|
|
528
|
+
}>;
|
|
529
|
+
}>;
|
|
530
|
+
}>, Schema.Struct<{
|
|
531
|
+
type: Schema.Literal<["step_start"]>;
|
|
532
|
+
timestamp: typeof Schema.Number;
|
|
533
|
+
sessionID: typeof Schema.String;
|
|
534
|
+
part: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
535
|
+
}>, Schema.Struct<{
|
|
536
|
+
type: Schema.Literal<["step_finish"]>;
|
|
537
|
+
tokens: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
538
|
+
cost: Schema.optional<Schema.extend<Schema.Struct<{}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>>;
|
|
539
|
+
}>]>;
|
|
540
|
+
type OpenCodeCliEvent = typeof OpenCodeCliEventSchema.Type;
|
|
541
|
+
/**
|
|
542
|
+
* Type guards using Effect Schema.
|
|
543
|
+
*/
|
|
544
|
+
declare const isOpenCodeTextEvent: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
545
|
+
readonly type: "text";
|
|
546
|
+
readonly text: string;
|
|
547
|
+
};
|
|
548
|
+
declare const isOpenCodeToolUseEvent: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
549
|
+
readonly type: "tool_use";
|
|
550
|
+
readonly part: {
|
|
551
|
+
readonly tool: string;
|
|
552
|
+
readonly callID: string;
|
|
553
|
+
readonly state: {
|
|
554
|
+
readonly input: unknown;
|
|
555
|
+
readonly status: string;
|
|
556
|
+
readonly output?: string | undefined;
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
declare const isOpenCodeStepStart: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
561
|
+
readonly type: "step_start";
|
|
562
|
+
readonly part?: ({} & {
|
|
563
|
+
readonly [x: string]: unknown;
|
|
564
|
+
}) | undefined;
|
|
565
|
+
readonly timestamp: number;
|
|
566
|
+
readonly sessionID: string;
|
|
567
|
+
};
|
|
568
|
+
declare const isOpenCodeStepFinish: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
569
|
+
readonly type: "step_finish";
|
|
570
|
+
readonly tokens?: ({} & {
|
|
571
|
+
readonly [x: string]: unknown;
|
|
572
|
+
}) | undefined;
|
|
573
|
+
readonly cost?: ({} & {
|
|
574
|
+
readonly [x: string]: unknown;
|
|
575
|
+
}) | undefined;
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* Decode helpers.
|
|
579
|
+
*/
|
|
580
|
+
declare const decodeOpenCodeCliEvent: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
581
|
+
readonly type: "text";
|
|
582
|
+
readonly text: string;
|
|
583
|
+
} | {
|
|
584
|
+
readonly type: "tool_use";
|
|
585
|
+
readonly part: {
|
|
586
|
+
readonly tool: string;
|
|
587
|
+
readonly callID: string;
|
|
588
|
+
readonly state: {
|
|
589
|
+
readonly input: unknown;
|
|
590
|
+
readonly status: string;
|
|
591
|
+
readonly output?: string | undefined;
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
} | {
|
|
595
|
+
readonly type: "step_start";
|
|
596
|
+
readonly part?: ({} & {
|
|
597
|
+
readonly [x: string]: unknown;
|
|
598
|
+
}) | undefined;
|
|
599
|
+
readonly timestamp: number;
|
|
600
|
+
readonly sessionID: string;
|
|
601
|
+
} | {
|
|
602
|
+
readonly type: "step_finish";
|
|
603
|
+
readonly tokens?: ({} & {
|
|
604
|
+
readonly [x: string]: unknown;
|
|
605
|
+
}) | undefined;
|
|
606
|
+
readonly cost?: ({} & {
|
|
607
|
+
readonly [x: string]: unknown;
|
|
608
|
+
}) | undefined;
|
|
609
|
+
}, effect_ParseResult.ParseError, never>;
|
|
610
|
+
declare const decodeOpenCodeCliEventSync: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => {
|
|
611
|
+
readonly type: "text";
|
|
612
|
+
readonly text: string;
|
|
613
|
+
} | {
|
|
614
|
+
readonly type: "tool_use";
|
|
615
|
+
readonly part: {
|
|
616
|
+
readonly tool: string;
|
|
617
|
+
readonly callID: string;
|
|
618
|
+
readonly state: {
|
|
619
|
+
readonly input: unknown;
|
|
620
|
+
readonly status: string;
|
|
621
|
+
readonly output?: string | undefined;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
} | {
|
|
625
|
+
readonly type: "step_start";
|
|
626
|
+
readonly part?: ({} & {
|
|
627
|
+
readonly [x: string]: unknown;
|
|
628
|
+
}) | undefined;
|
|
629
|
+
readonly timestamp: number;
|
|
630
|
+
readonly sessionID: string;
|
|
631
|
+
} | {
|
|
632
|
+
readonly type: "step_finish";
|
|
633
|
+
readonly tokens?: ({} & {
|
|
634
|
+
readonly [x: string]: unknown;
|
|
635
|
+
}) | undefined;
|
|
636
|
+
readonly cost?: ({} & {
|
|
637
|
+
readonly [x: string]: unknown;
|
|
638
|
+
}) | undefined;
|
|
639
|
+
};
|
|
640
|
+
|
|
108
641
|
/**
|
|
109
642
|
* Supported LLM provider names.
|
|
110
643
|
*/
|
|
@@ -491,6 +1024,17 @@ declare const WorktreeRemovedEventSchema: Schema.TaggedStruct<"WorktreeRemoved",
|
|
|
491
1024
|
timestamp: typeof Schema.Number;
|
|
492
1025
|
}>;
|
|
493
1026
|
type WorktreeRemovedEvent = typeof WorktreeRemovedEventSchema.Type;
|
|
1027
|
+
/**
|
|
1028
|
+
* Session name generated event - signals that the LLM generated a descriptive name for the session.
|
|
1029
|
+
* Emitted during the discovery phase after the session name signal is parsed.
|
|
1030
|
+
*/
|
|
1031
|
+
declare const SessionNameGeneratedEventSchema: Schema.TaggedStruct<"SessionNameGenerated", {
|
|
1032
|
+
sessionId: typeof Schema.String;
|
|
1033
|
+
/** Task-based descriptive name (kebab-case slug, e.g., "add-dark-mode-toggle") */
|
|
1034
|
+
displayName: typeof Schema.String;
|
|
1035
|
+
timestamp: typeof Schema.Number;
|
|
1036
|
+
}>;
|
|
1037
|
+
type SessionNameGeneratedEvent = typeof SessionNameGeneratedEventSchema.Type;
|
|
494
1038
|
/**
|
|
495
1039
|
* Union of all domain events.
|
|
496
1040
|
*/
|
|
@@ -676,11 +1220,16 @@ declare const DomainEventSchema: Schema.Union<[Schema.TaggedStruct<"LoopStarted"
|
|
|
676
1220
|
}>, Schema.TaggedStruct<"WorktreeRemoved", {
|
|
677
1221
|
sessionId: typeof Schema.String;
|
|
678
1222
|
timestamp: typeof Schema.Number;
|
|
1223
|
+
}>, Schema.TaggedStruct<"SessionNameGenerated", {
|
|
1224
|
+
sessionId: typeof Schema.String;
|
|
1225
|
+
/** Task-based descriptive name (kebab-case slug, e.g., "add-dark-mode-toggle") */
|
|
1226
|
+
displayName: typeof Schema.String;
|
|
1227
|
+
timestamp: typeof Schema.Number;
|
|
679
1228
|
}>]>;
|
|
680
1229
|
/**
|
|
681
1230
|
* Explicit discriminated union type for proper TypeScript narrowing.
|
|
682
1231
|
*/
|
|
683
|
-
type DomainEvent = LoopStartedEvent | LoopCompletedEvent | LoopFailedEvent | DiscoveryStartedEvent | DiscoveryCompletedEvent | IterationStartedEvent | IterationCompletedEvent | LLMTextEvent | LLMToolStartEvent | LLMToolUseEvent | LLMToolEndEvent | TasksDefinedEvent | PhasesDefinedEvent | CriteriaDefinedEvent | PhaseStartedEvent | PhaseCompletedEvent | PhaseFailedEvent | CriterionPassedEvent | CriterionFailedEvent | CheckPassedEvent | CheckFailedEvent | ReviewCompleteEvent | TaskCompletedEvent | PlanCreatedEvent | PlanUpdatedEvent | PlanUpdateFailedEvent | LearningRecordedEvent | GuardrailAddedEvent | ProgressUpdatedEvent | WorktreeCreatedEvent | WorktreeRemovedEvent;
|
|
1232
|
+
type DomainEvent = LoopStartedEvent | LoopCompletedEvent | LoopFailedEvent | DiscoveryStartedEvent | DiscoveryCompletedEvent | IterationStartedEvent | IterationCompletedEvent | LLMTextEvent | LLMToolStartEvent | LLMToolUseEvent | LLMToolEndEvent | TasksDefinedEvent | PhasesDefinedEvent | CriteriaDefinedEvent | PhaseStartedEvent | PhaseCompletedEvent | PhaseFailedEvent | CriterionPassedEvent | CriterionFailedEvent | CheckPassedEvent | CheckFailedEvent | ReviewCompleteEvent | TaskCompletedEvent | PlanCreatedEvent | PlanUpdatedEvent | PlanUpdateFailedEvent | LearningRecordedEvent | GuardrailAddedEvent | ProgressUpdatedEvent | WorktreeCreatedEvent | WorktreeRemovedEvent | SessionNameGeneratedEvent;
|
|
684
1233
|
/**
|
|
685
1234
|
* Type guard utilities for domain events.
|
|
686
1235
|
*/
|
|
@@ -759,16 +1308,315 @@ declare const decodeGuardrailsFile: (u: unknown, overrideOptions?: effect_Schema
|
|
|
759
1308
|
}[];
|
|
760
1309
|
}, effect_ParseResult.ParseError, never>;
|
|
761
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* Read tool input schema.
|
|
1313
|
+
*/
|
|
1314
|
+
declare const ReadToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1315
|
+
file_path: typeof Schema.String;
|
|
1316
|
+
offset: Schema.optional<typeof Schema.Number>;
|
|
1317
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
1318
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1319
|
+
type ReadToolInput = typeof ReadToolInputSchema.Type;
|
|
1320
|
+
/**
|
|
1321
|
+
* Edit tool input schema.
|
|
1322
|
+
*/
|
|
1323
|
+
declare const EditToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1324
|
+
file_path: typeof Schema.String;
|
|
1325
|
+
old_string: typeof Schema.String;
|
|
1326
|
+
new_string: typeof Schema.String;
|
|
1327
|
+
replace_all: Schema.optional<typeof Schema.Boolean>;
|
|
1328
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1329
|
+
type EditToolInput = typeof EditToolInputSchema.Type;
|
|
1330
|
+
/**
|
|
1331
|
+
* Write tool input schema.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const WriteToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1334
|
+
file_path: typeof Schema.String;
|
|
1335
|
+
content: typeof Schema.String;
|
|
1336
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1337
|
+
type WriteToolInput = typeof WriteToolInputSchema.Type;
|
|
1338
|
+
/**
|
|
1339
|
+
* Bash tool input schema.
|
|
1340
|
+
*/
|
|
1341
|
+
declare const BashToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1342
|
+
command: typeof Schema.String;
|
|
1343
|
+
description: Schema.optional<typeof Schema.String>;
|
|
1344
|
+
timeout: Schema.optional<typeof Schema.Number>;
|
|
1345
|
+
run_in_background: Schema.optional<typeof Schema.Boolean>;
|
|
1346
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1347
|
+
type BashToolInput = typeof BashToolInputSchema.Type;
|
|
1348
|
+
/**
|
|
1349
|
+
* Glob tool input schema.
|
|
1350
|
+
*/
|
|
1351
|
+
declare const GlobToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1352
|
+
pattern: typeof Schema.String;
|
|
1353
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1354
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1355
|
+
type GlobToolInput = typeof GlobToolInputSchema.Type;
|
|
1356
|
+
/**
|
|
1357
|
+
* Grep tool input schema.
|
|
1358
|
+
*/
|
|
1359
|
+
declare const GrepToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1360
|
+
pattern: typeof Schema.String;
|
|
1361
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1362
|
+
glob: Schema.optional<typeof Schema.String>;
|
|
1363
|
+
type: Schema.optional<typeof Schema.String>;
|
|
1364
|
+
output_mode: Schema.optional<Schema.Literal<["content", "files_with_matches", "count"]>>;
|
|
1365
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1366
|
+
type GrepToolInput = typeof GrepToolInputSchema.Type;
|
|
1367
|
+
/**
|
|
1368
|
+
* Task tool input schema.
|
|
1369
|
+
*/
|
|
1370
|
+
declare const TaskToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1371
|
+
description: typeof Schema.String;
|
|
1372
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1373
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1374
|
+
type TaskToolInput = typeof TaskToolInputSchema.Type;
|
|
1375
|
+
/**
|
|
1376
|
+
* WebFetch tool input schema.
|
|
1377
|
+
*/
|
|
1378
|
+
declare const WebFetchToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1379
|
+
url: typeof Schema.String;
|
|
1380
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1381
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1382
|
+
type WebFetchToolInput = typeof WebFetchToolInputSchema.Type;
|
|
1383
|
+
/**
|
|
1384
|
+
* WebSearch tool input schema.
|
|
1385
|
+
*/
|
|
1386
|
+
declare const WebSearchToolInputSchema: Schema.extend<Schema.Struct<{
|
|
1387
|
+
query: typeof Schema.String;
|
|
1388
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1389
|
+
type WebSearchToolInput = typeof WebSearchToolInputSchema.Type;
|
|
1390
|
+
/**
|
|
1391
|
+
* Registry of tool input schemas.
|
|
1392
|
+
*/
|
|
1393
|
+
declare const ToolInputSchemaRegistry: {
|
|
1394
|
+
readonly read: Schema.extend<Schema.Struct<{
|
|
1395
|
+
file_path: typeof Schema.String;
|
|
1396
|
+
offset: Schema.optional<typeof Schema.Number>;
|
|
1397
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
1398
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1399
|
+
readonly edit: Schema.extend<Schema.Struct<{
|
|
1400
|
+
file_path: typeof Schema.String;
|
|
1401
|
+
old_string: typeof Schema.String;
|
|
1402
|
+
new_string: typeof Schema.String;
|
|
1403
|
+
replace_all: Schema.optional<typeof Schema.Boolean>;
|
|
1404
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1405
|
+
readonly write: Schema.extend<Schema.Struct<{
|
|
1406
|
+
file_path: typeof Schema.String;
|
|
1407
|
+
content: typeof Schema.String;
|
|
1408
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1409
|
+
readonly bash: Schema.extend<Schema.Struct<{
|
|
1410
|
+
command: typeof Schema.String;
|
|
1411
|
+
description: Schema.optional<typeof Schema.String>;
|
|
1412
|
+
timeout: Schema.optional<typeof Schema.Number>;
|
|
1413
|
+
run_in_background: Schema.optional<typeof Schema.Boolean>;
|
|
1414
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1415
|
+
readonly glob: Schema.extend<Schema.Struct<{
|
|
1416
|
+
pattern: typeof Schema.String;
|
|
1417
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1418
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1419
|
+
readonly grep: Schema.extend<Schema.Struct<{
|
|
1420
|
+
pattern: typeof Schema.String;
|
|
1421
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1422
|
+
glob: Schema.optional<typeof Schema.String>;
|
|
1423
|
+
type: Schema.optional<typeof Schema.String>;
|
|
1424
|
+
output_mode: Schema.optional<Schema.Literal<["content", "files_with_matches", "count"]>>;
|
|
1425
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1426
|
+
readonly task: Schema.extend<Schema.Struct<{
|
|
1427
|
+
description: typeof Schema.String;
|
|
1428
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1429
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1430
|
+
readonly webfetch: Schema.extend<Schema.Struct<{
|
|
1431
|
+
url: typeof Schema.String;
|
|
1432
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1433
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1434
|
+
readonly websearch: Schema.extend<Schema.Struct<{
|
|
1435
|
+
query: typeof Schema.String;
|
|
1436
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
1437
|
+
};
|
|
1438
|
+
/**
|
|
1439
|
+
* Known tool names.
|
|
1440
|
+
*/
|
|
1441
|
+
type KnownToolName = keyof typeof ToolInputSchemaRegistry;
|
|
1442
|
+
/**
|
|
1443
|
+
* Get the input schema for a tool.
|
|
1444
|
+
*
|
|
1445
|
+
* @param tool - Tool name (case-insensitive)
|
|
1446
|
+
* @returns Schema for the tool or undefined if not found
|
|
1447
|
+
*/
|
|
1448
|
+
declare function getToolInputSchema(tool: string): Schema.Schema<AnyToolInput, AnyToolInput, never> | undefined;
|
|
1449
|
+
/**
|
|
1450
|
+
* Union of all known tool inputs.
|
|
1451
|
+
*/
|
|
1452
|
+
declare const AnyToolInputSchema: Schema.Union<[Schema.extend<Schema.Struct<{
|
|
1453
|
+
file_path: typeof Schema.String;
|
|
1454
|
+
offset: Schema.optional<typeof Schema.Number>;
|
|
1455
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
1456
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1457
|
+
file_path: typeof Schema.String;
|
|
1458
|
+
old_string: typeof Schema.String;
|
|
1459
|
+
new_string: typeof Schema.String;
|
|
1460
|
+
replace_all: Schema.optional<typeof Schema.Boolean>;
|
|
1461
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1462
|
+
file_path: typeof Schema.String;
|
|
1463
|
+
content: typeof Schema.String;
|
|
1464
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1465
|
+
command: typeof Schema.String;
|
|
1466
|
+
description: Schema.optional<typeof Schema.String>;
|
|
1467
|
+
timeout: Schema.optional<typeof Schema.Number>;
|
|
1468
|
+
run_in_background: Schema.optional<typeof Schema.Boolean>;
|
|
1469
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1470
|
+
pattern: typeof Schema.String;
|
|
1471
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1472
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1473
|
+
pattern: typeof Schema.String;
|
|
1474
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1475
|
+
glob: Schema.optional<typeof Schema.String>;
|
|
1476
|
+
type: Schema.optional<typeof Schema.String>;
|
|
1477
|
+
output_mode: Schema.optional<Schema.Literal<["content", "files_with_matches", "count"]>>;
|
|
1478
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1479
|
+
description: typeof Schema.String;
|
|
1480
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1481
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1482
|
+
url: typeof Schema.String;
|
|
1483
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1484
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1485
|
+
query: typeof Schema.String;
|
|
1486
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>]>;
|
|
1487
|
+
type AnyToolInput = typeof AnyToolInputSchema.Type;
|
|
1488
|
+
/**
|
|
1489
|
+
* Validate a tool input against its schema.
|
|
1490
|
+
*
|
|
1491
|
+
* @param tool - Tool name
|
|
1492
|
+
* @param input - Input to validate
|
|
1493
|
+
* @returns Either with validated input or parse error
|
|
1494
|
+
*/
|
|
1495
|
+
declare function validateToolInput(tool: string, input: unknown): Either.Either<AnyToolInput, unknown>;
|
|
1496
|
+
/**
|
|
1497
|
+
* Type guards for specific tool inputs.
|
|
1498
|
+
*/
|
|
1499
|
+
declare const isReadToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1500
|
+
readonly file_path: string;
|
|
1501
|
+
readonly offset?: number | undefined;
|
|
1502
|
+
readonly limit?: number | undefined;
|
|
1503
|
+
} & {
|
|
1504
|
+
readonly [x: string]: unknown;
|
|
1505
|
+
};
|
|
1506
|
+
declare const isEditToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1507
|
+
readonly file_path: string;
|
|
1508
|
+
readonly old_string: string;
|
|
1509
|
+
readonly new_string: string;
|
|
1510
|
+
readonly replace_all?: boolean | undefined;
|
|
1511
|
+
} & {
|
|
1512
|
+
readonly [x: string]: unknown;
|
|
1513
|
+
};
|
|
1514
|
+
declare const isWriteToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1515
|
+
readonly content: string;
|
|
1516
|
+
readonly file_path: string;
|
|
1517
|
+
} & {
|
|
1518
|
+
readonly [x: string]: unknown;
|
|
1519
|
+
};
|
|
1520
|
+
declare const isBashToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1521
|
+
readonly description?: string | undefined;
|
|
1522
|
+
readonly command: string;
|
|
1523
|
+
readonly timeout?: number | undefined;
|
|
1524
|
+
readonly run_in_background?: boolean | undefined;
|
|
1525
|
+
} & {
|
|
1526
|
+
readonly [x: string]: unknown;
|
|
1527
|
+
};
|
|
1528
|
+
declare const isGlobToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1529
|
+
readonly pattern: string;
|
|
1530
|
+
readonly path?: string | undefined;
|
|
1531
|
+
} & {
|
|
1532
|
+
readonly [x: string]: unknown;
|
|
1533
|
+
};
|
|
1534
|
+
declare const isGrepToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1535
|
+
readonly type?: string | undefined;
|
|
1536
|
+
readonly pattern: string;
|
|
1537
|
+
readonly path?: string | undefined;
|
|
1538
|
+
readonly glob?: string | undefined;
|
|
1539
|
+
readonly output_mode?: "content" | "files_with_matches" | "count" | undefined;
|
|
1540
|
+
} & {
|
|
1541
|
+
readonly [x: string]: unknown;
|
|
1542
|
+
};
|
|
1543
|
+
declare const isTaskToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1544
|
+
readonly description: string;
|
|
1545
|
+
readonly prompt?: string | undefined;
|
|
1546
|
+
} & {
|
|
1547
|
+
readonly [x: string]: unknown;
|
|
1548
|
+
};
|
|
1549
|
+
declare const isWebFetchToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1550
|
+
readonly prompt?: string | undefined;
|
|
1551
|
+
readonly url: string;
|
|
1552
|
+
} & {
|
|
1553
|
+
readonly [x: string]: unknown;
|
|
1554
|
+
};
|
|
1555
|
+
declare const isWebSearchToolInput: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions | number) => u is {
|
|
1556
|
+
readonly query: string;
|
|
1557
|
+
} & {
|
|
1558
|
+
readonly [x: string]: unknown;
|
|
1559
|
+
};
|
|
1560
|
+
|
|
762
1561
|
declare const TextEventSchema: Schema.TaggedStruct<"Text", {
|
|
763
1562
|
text: typeof Schema.String;
|
|
764
1563
|
}>;
|
|
765
1564
|
declare const ToolStartEventSchema: Schema.TaggedStruct<"ToolStart", {
|
|
766
1565
|
tool: typeof Schema.String;
|
|
767
1566
|
}>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Tool use event schema.
|
|
1569
|
+
*
|
|
1570
|
+
* The input field uses AnyToolInputSchema for known tools,
|
|
1571
|
+
* but falls back to S.Unknown for forward compatibility with
|
|
1572
|
+
* unknown tools or new tool versions.
|
|
1573
|
+
*/
|
|
768
1574
|
declare const ToolUseEventSchema: Schema.TaggedStruct<"ToolUse", {
|
|
769
1575
|
tool: typeof Schema.String;
|
|
770
1576
|
input: typeof Schema.Unknown;
|
|
771
1577
|
}>;
|
|
1578
|
+
/**
|
|
1579
|
+
* Validated tool use event schema - validates input against known tool schemas.
|
|
1580
|
+
* Use this when you want strict validation of tool inputs.
|
|
1581
|
+
*/
|
|
1582
|
+
declare const ValidatedToolUseEventSchema: Schema.TaggedStruct<"ToolUse", {
|
|
1583
|
+
tool: typeof Schema.String;
|
|
1584
|
+
input: Schema.Union<[Schema.extend<Schema.Struct<{
|
|
1585
|
+
file_path: typeof Schema.String;
|
|
1586
|
+
offset: Schema.optional<typeof Schema.Number>;
|
|
1587
|
+
limit: Schema.optional<typeof Schema.Number>;
|
|
1588
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1589
|
+
file_path: typeof Schema.String;
|
|
1590
|
+
old_string: typeof Schema.String;
|
|
1591
|
+
new_string: typeof Schema.String;
|
|
1592
|
+
replace_all: Schema.optional<typeof Schema.Boolean>;
|
|
1593
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1594
|
+
file_path: typeof Schema.String;
|
|
1595
|
+
content: typeof Schema.String;
|
|
1596
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1597
|
+
command: typeof Schema.String;
|
|
1598
|
+
description: Schema.optional<typeof Schema.String>;
|
|
1599
|
+
timeout: Schema.optional<typeof Schema.Number>;
|
|
1600
|
+
run_in_background: Schema.optional<typeof Schema.Boolean>;
|
|
1601
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1602
|
+
pattern: typeof Schema.String;
|
|
1603
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1604
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1605
|
+
pattern: typeof Schema.String;
|
|
1606
|
+
path: Schema.optional<typeof Schema.String>;
|
|
1607
|
+
glob: Schema.optional<typeof Schema.String>;
|
|
1608
|
+
type: Schema.optional<typeof Schema.String>;
|
|
1609
|
+
output_mode: Schema.optional<Schema.Literal<["content", "files_with_matches", "count"]>>;
|
|
1610
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1611
|
+
description: typeof Schema.String;
|
|
1612
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1613
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1614
|
+
url: typeof Schema.String;
|
|
1615
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1616
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>, Schema.extend<Schema.Struct<{
|
|
1617
|
+
query: typeof Schema.String;
|
|
1618
|
+
}>, Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>]>;
|
|
1619
|
+
}>;
|
|
772
1620
|
declare const ToolEndEventSchema: Schema.TaggedStruct<"ToolEnd", {
|
|
773
1621
|
tool: typeof Schema.String;
|
|
774
1622
|
}>;
|
|
@@ -793,6 +1641,14 @@ type ToolUseEvent = typeof ToolUseEventSchema.Type;
|
|
|
793
1641
|
type ToolEndEvent = typeof ToolEndEventSchema.Type;
|
|
794
1642
|
type DoneEvent = typeof DoneEventSchema.Type;
|
|
795
1643
|
type LLMEvent = TextEvent | ToolStartEvent | ToolUseEvent | ToolEndEvent | DoneEvent;
|
|
1644
|
+
/**
|
|
1645
|
+
* Validated tool use event type with typed input.
|
|
1646
|
+
*/
|
|
1647
|
+
interface ValidatedToolUseEvent {
|
|
1648
|
+
readonly _tag: "ToolUse";
|
|
1649
|
+
readonly tool: string;
|
|
1650
|
+
readonly input: AnyToolInput;
|
|
1651
|
+
}
|
|
796
1652
|
declare const decodeLLMEvent: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
797
1653
|
readonly _tag: "Text";
|
|
798
1654
|
readonly text: string;
|
|
@@ -810,6 +1666,13 @@ declare const decodeLLMEvent: (u: unknown, overrideOptions?: effect_SchemaAST.Pa
|
|
|
810
1666
|
readonly _tag: "Done";
|
|
811
1667
|
readonly output: string;
|
|
812
1668
|
}, effect_ParseResult.ParseError, never>;
|
|
1669
|
+
/**
|
|
1670
|
+
* Create a validated ToolUseEvent by validating the input against the tool's schema.
|
|
1671
|
+
*
|
|
1672
|
+
* @param event - ToolUseEvent with unknown input
|
|
1673
|
+
* @returns Either with validated event or parse error
|
|
1674
|
+
*/
|
|
1675
|
+
declare function validateToolUseEvent(event: ToolUseEvent): Either.Either<ToolUseEvent, unknown>;
|
|
813
1676
|
|
|
814
1677
|
declare const LogLevelSchema: Schema.Literal<["debug", "info", "warn", "error"]>;
|
|
815
1678
|
type LogLevel = typeof LogLevelSchema.Type;
|
|
@@ -1089,20 +1952,20 @@ type ProgressFile = typeof ProgressFileSchema.Type;
|
|
|
1089
1952
|
*/
|
|
1090
1953
|
declare const decodeProgressEntry: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
1091
1954
|
readonly iteration: number;
|
|
1955
|
+
readonly timestamp: string;
|
|
1092
1956
|
readonly taskId: string;
|
|
1093
1957
|
readonly summary: string;
|
|
1094
1958
|
readonly filesModified?: readonly string[] | undefined;
|
|
1095
|
-
readonly timestamp: string;
|
|
1096
1959
|
readonly action: "failed" | "started" | "completed" | "learning";
|
|
1097
1960
|
readonly learnings?: readonly string[] | undefined;
|
|
1098
1961
|
}, effect_ParseResult.ParseError, never>;
|
|
1099
1962
|
declare const decodeProgressFile: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
1100
1963
|
readonly entries: readonly {
|
|
1101
1964
|
readonly iteration: number;
|
|
1965
|
+
readonly timestamp: string;
|
|
1102
1966
|
readonly taskId: string;
|
|
1103
1967
|
readonly summary: string;
|
|
1104
1968
|
readonly filesModified?: readonly string[] | undefined;
|
|
1105
|
-
readonly timestamp: string;
|
|
1106
1969
|
readonly action: "failed" | "started" | "completed" | "learning";
|
|
1107
1970
|
readonly learnings?: readonly string[] | undefined;
|
|
1108
1971
|
}[];
|
|
@@ -1127,6 +1990,8 @@ declare const SessionSchema: Schema.Struct<{
|
|
|
1127
1990
|
currentTaskId: Schema.optional<typeof Schema.String>;
|
|
1128
1991
|
worktreePath: Schema.optional<typeof Schema.String>;
|
|
1129
1992
|
branchName: Schema.optional<typeof Schema.String>;
|
|
1993
|
+
/** Task-based descriptive name (kebab-case slug, e.g., "add-dark-mode-toggle") */
|
|
1994
|
+
displayName: Schema.optional<typeof Schema.String>;
|
|
1130
1995
|
}>;
|
|
1131
1996
|
type Session = typeof SessionSchema.Type;
|
|
1132
1997
|
/**
|
|
@@ -1134,12 +1999,13 @@ type Session = typeof SessionSchema.Type;
|
|
|
1134
1999
|
*/
|
|
1135
2000
|
declare const decodeSession: (u: unknown, overrideOptions?: effect_SchemaAST.ParseOptions) => effect_Effect.Effect<{
|
|
1136
2001
|
readonly status: "failed" | "completed" | "active" | "paused";
|
|
1137
|
-
readonly completedTasks: readonly string[];
|
|
1138
2002
|
readonly id: string;
|
|
2003
|
+
readonly completedTasks: readonly string[];
|
|
1139
2004
|
readonly createdAt: string;
|
|
1140
2005
|
readonly originalTask: string;
|
|
1141
2006
|
readonly worktreePath?: string | undefined;
|
|
1142
2007
|
readonly branchName?: string | undefined;
|
|
2008
|
+
readonly displayName?: string | undefined;
|
|
1143
2009
|
readonly currentTaskId?: string | undefined;
|
|
1144
2010
|
}, effect_ParseResult.ParseError, never>;
|
|
1145
2011
|
|
|
@@ -1293,6 +2159,15 @@ declare const TaskCompleteSignalSchema: Schema.TaggedStruct<"TaskComplete", Read
|
|
|
1293
2159
|
type TaskCompleteSignal = typeof TaskCompleteSignalSchema.Type;
|
|
1294
2160
|
declare const LoopCompleteSignalSchema: Schema.TaggedStruct<"LoopComplete", {}>;
|
|
1295
2161
|
type LoopCompleteSignal = typeof LoopCompleteSignalSchema.Type;
|
|
2162
|
+
/**
|
|
2163
|
+
* Session name signal - defines a task-based descriptive name for the session.
|
|
2164
|
+
* Generated during discovery phase.
|
|
2165
|
+
*/
|
|
2166
|
+
declare const SessionNameDefinedSignalSchema: Schema.TaggedStruct<"SessionNameDefined", {
|
|
2167
|
+
/** Kebab-case slug, e.g., "add-dark-mode-toggle" */
|
|
2168
|
+
name: typeof Schema.String;
|
|
2169
|
+
}>;
|
|
2170
|
+
type SessionNameDefinedSignal = typeof SessionNameDefinedSignalSchema.Type;
|
|
1296
2171
|
/**
|
|
1297
2172
|
* Learning category types.
|
|
1298
2173
|
*/
|
|
@@ -1364,6 +2239,9 @@ declare const SignalSchema: Schema.Union<[Schema.TaggedStruct<"TasksDefined", Re
|
|
|
1364
2239
|
sign: typeof Schema.String;
|
|
1365
2240
|
avoidance: typeof Schema.String;
|
|
1366
2241
|
severity: Schema.Literal<["warning", "critical"]>;
|
|
2242
|
+
}>, Schema.TaggedStruct<"SessionNameDefined", {
|
|
2243
|
+
/** Kebab-case slug, e.g., "add-dark-mode-toggle" */
|
|
2244
|
+
name: typeof Schema.String;
|
|
1367
2245
|
}>]>;
|
|
1368
2246
|
type Signal = typeof SignalSchema.Type;
|
|
1369
2247
|
/**
|
|
@@ -1422,6 +2300,9 @@ declare const decodeSignal: (u: unknown, overrideOptions?: effect_SchemaAST.Pars
|
|
|
1422
2300
|
readonly filesCreated: readonly string[];
|
|
1423
2301
|
} | {
|
|
1424
2302
|
readonly _tag: "LoopComplete";
|
|
2303
|
+
} | {
|
|
2304
|
+
readonly _tag: "SessionNameDefined";
|
|
2305
|
+
readonly name: string;
|
|
1425
2306
|
} | {
|
|
1426
2307
|
readonly _tag: "Learning";
|
|
1427
2308
|
readonly content: string;
|
|
@@ -1486,6 +2367,9 @@ declare const decodeSignalSync: (u: unknown, overrideOptions?: effect_SchemaAST.
|
|
|
1486
2367
|
readonly filesCreated: readonly string[];
|
|
1487
2368
|
} | {
|
|
1488
2369
|
readonly _tag: "LoopComplete";
|
|
2370
|
+
} | {
|
|
2371
|
+
readonly _tag: "SessionNameDefined";
|
|
2372
|
+
readonly name: string;
|
|
1489
2373
|
} | {
|
|
1490
2374
|
readonly _tag: "Learning";
|
|
1491
2375
|
readonly content: string;
|
|
@@ -1498,6 +2382,115 @@ declare const decodeSignalSync: (u: unknown, overrideOptions?: effect_SchemaAST.
|
|
|
1498
2382
|
readonly severity: "warning" | "critical";
|
|
1499
2383
|
};
|
|
1500
2384
|
|
|
2385
|
+
/**
|
|
2386
|
+
* Factory functions for creating signals with proper typing.
|
|
2387
|
+
*
|
|
2388
|
+
* These factories provide type-safe signal construction by adding
|
|
2389
|
+
* the _tag field automatically. Returns Effect Either for validation.
|
|
2390
|
+
*/
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Create a TasksDefined signal.
|
|
2394
|
+
*/
|
|
2395
|
+
declare function createTasksDefinedSignal(input: {
|
|
2396
|
+
tasks: readonly TaskBasicInfo[];
|
|
2397
|
+
}): Either.Either<TasksDefinedSignal, ParseResult.ParseError>;
|
|
2398
|
+
/**
|
|
2399
|
+
* Create a PhasesDefinedSignal.
|
|
2400
|
+
*/
|
|
2401
|
+
declare function createPhasesDefinedSignal(input: {
|
|
2402
|
+
taskId: string;
|
|
2403
|
+
phases: readonly PhaseBasicInfo[];
|
|
2404
|
+
}): Either.Either<PhasesDefinedSignal, ParseResult.ParseError>;
|
|
2405
|
+
/**
|
|
2406
|
+
* Create a CriteriaDefinedSignal.
|
|
2407
|
+
*/
|
|
2408
|
+
declare function createCriteriaDefinedSignal(input: {
|
|
2409
|
+
taskId: string;
|
|
2410
|
+
criteria: readonly CriterionBasicInfo[];
|
|
2411
|
+
}): Either.Either<CriteriaDefinedSignal, ParseResult.ParseError>;
|
|
2412
|
+
/**
|
|
2413
|
+
* Create a PhaseStartedSignal.
|
|
2414
|
+
*/
|
|
2415
|
+
declare function createPhaseStartedSignal(input: {
|
|
2416
|
+
phaseId: string;
|
|
2417
|
+
}): Either.Either<PhaseStartedSignal, ParseResult.ParseError>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Create a PhaseCompletedSignal.
|
|
2420
|
+
*/
|
|
2421
|
+
declare function createPhaseCompletedSignal(input: {
|
|
2422
|
+
phaseId: string;
|
|
2423
|
+
}): Either.Either<PhaseCompletedSignal, ParseResult.ParseError>;
|
|
2424
|
+
/**
|
|
2425
|
+
* Create a PhaseFailedSignal.
|
|
2426
|
+
*/
|
|
2427
|
+
declare function createPhaseFailedSignal(input: {
|
|
2428
|
+
phaseId: string;
|
|
2429
|
+
reason: string;
|
|
2430
|
+
}): Either.Either<PhaseFailedSignal, ParseResult.ParseError>;
|
|
2431
|
+
/**
|
|
2432
|
+
* Create a CriterionPassedSignal.
|
|
2433
|
+
*/
|
|
2434
|
+
declare function createCriterionPassedSignal(input: {
|
|
2435
|
+
criterionId: string;
|
|
2436
|
+
}): Either.Either<CriterionPassedSignal, ParseResult.ParseError>;
|
|
2437
|
+
/**
|
|
2438
|
+
* Create a CriterionFailedSignal.
|
|
2439
|
+
*/
|
|
2440
|
+
declare function createCriterionFailedSignal(input: {
|
|
2441
|
+
criterionId: string;
|
|
2442
|
+
reason: string;
|
|
2443
|
+
}): Either.Either<CriterionFailedSignal, ParseResult.ParseError>;
|
|
2444
|
+
/**
|
|
2445
|
+
* Create a CheckPassedSignal.
|
|
2446
|
+
*/
|
|
2447
|
+
declare function createCheckPassedSignal(_input: Record<string, never>): Either.Either<CheckPassedSignal, ParseResult.ParseError>;
|
|
2448
|
+
/**
|
|
2449
|
+
* Create a CheckFailedSignal.
|
|
2450
|
+
*/
|
|
2451
|
+
declare function createCheckFailedSignal(_input: Record<string, never>): Either.Either<CheckFailedSignal, ParseResult.ParseError>;
|
|
2452
|
+
/**
|
|
2453
|
+
* Create a ReviewCompleteSignal.
|
|
2454
|
+
*/
|
|
2455
|
+
declare function createReviewCompleteSignal(input: {
|
|
2456
|
+
changesMade: boolean;
|
|
2457
|
+
}): Either.Either<ReviewCompleteSignal, ParseResult.ParseError>;
|
|
2458
|
+
/**
|
|
2459
|
+
* Create a TaskCompleteSignal.
|
|
2460
|
+
*/
|
|
2461
|
+
declare function createTaskCompleteSignal(input: {
|
|
2462
|
+
taskId: string;
|
|
2463
|
+
summary: string;
|
|
2464
|
+
filesModified: readonly string[];
|
|
2465
|
+
filesCreated: readonly string[];
|
|
2466
|
+
}): Either.Either<TaskCompleteSignal, ParseResult.ParseError>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Create a LoopCompleteSignal.
|
|
2469
|
+
*/
|
|
2470
|
+
declare function createLoopCompleteSignal(_input: Record<string, never>): Either.Either<LoopCompleteSignal, ParseResult.ParseError>;
|
|
2471
|
+
/**
|
|
2472
|
+
* Create a LearningSignal.
|
|
2473
|
+
*/
|
|
2474
|
+
declare function createLearningSignal(input: {
|
|
2475
|
+
content: string;
|
|
2476
|
+
category?: LearningCategory;
|
|
2477
|
+
}): Either.Either<LearningSignal, ParseResult.ParseError>;
|
|
2478
|
+
/**
|
|
2479
|
+
* Create a GuardrailSignal.
|
|
2480
|
+
*/
|
|
2481
|
+
declare function createGuardrailSignal(input: {
|
|
2482
|
+
pattern: string;
|
|
2483
|
+
sign: string;
|
|
2484
|
+
avoidance: string;
|
|
2485
|
+
severity: "warning" | "critical";
|
|
2486
|
+
}): Either.Either<GuardrailSignal, ParseResult.ParseError>;
|
|
2487
|
+
/**
|
|
2488
|
+
* Create a SessionNameDefinedSignal.
|
|
2489
|
+
*/
|
|
2490
|
+
declare function createSessionNameDefinedSignal(input: {
|
|
2491
|
+
name: string;
|
|
2492
|
+
}): Either.Either<SessionNameDefinedSignal, ParseResult.ParseError>;
|
|
2493
|
+
|
|
1501
2494
|
/**
|
|
1502
2495
|
* Status for generated tasks in tasks.md
|
|
1503
2496
|
*/
|
|
@@ -1943,6 +2936,26 @@ interface GitService {
|
|
|
1943
2936
|
* @returns Branch name (e.g., "ferix/calm-snails-dream-123")
|
|
1944
2937
|
*/
|
|
1945
2938
|
readonly getBranchName: (sessionId: string) => string;
|
|
2939
|
+
/**
|
|
2940
|
+
* Remove a worktree but keep its branch.
|
|
2941
|
+
*
|
|
2942
|
+
* Removes the worktree directory and cleans up git worktree references,
|
|
2943
|
+
* but preserves the branch for user review and merge.
|
|
2944
|
+
*
|
|
2945
|
+
* @param sessionId - Session ID whose worktree to remove
|
|
2946
|
+
*/
|
|
2947
|
+
readonly removeWorktreeKeepBranch: (sessionId: string) => Effect.Effect<void, GitError>;
|
|
2948
|
+
/**
|
|
2949
|
+
* Rename a session's branch to use a descriptive display name.
|
|
2950
|
+
*
|
|
2951
|
+
* This is called after discovery phase when the LLM generates a
|
|
2952
|
+
* task-based name for the session.
|
|
2953
|
+
*
|
|
2954
|
+
* @param sessionId - Session ID whose branch to rename
|
|
2955
|
+
* @param displayName - New display name for the branch (kebab-case)
|
|
2956
|
+
* @returns The new branch name (e.g., "ferix/add-dark-mode")
|
|
2957
|
+
*/
|
|
2958
|
+
readonly renameBranch: (sessionId: string, displayName: string) => Effect.Effect<string, GitError>;
|
|
1946
2959
|
}
|
|
1947
2960
|
declare const Git_base: Context.TagClass<Git, "@ferix/Git", GitService>;
|
|
1948
2961
|
/**
|
|
@@ -2086,22 +3099,26 @@ declare const MemoryGuardrails: {
|
|
|
2086
3099
|
};
|
|
2087
3100
|
|
|
2088
3101
|
/**
|
|
2089
|
-
*
|
|
3102
|
+
* Provider configuration schema with runtime validation.
|
|
2090
3103
|
*/
|
|
2091
|
-
|
|
3104
|
+
declare const ProviderConfigSchema: Schema.Struct<{
|
|
2092
3105
|
/** Provider name */
|
|
2093
|
-
|
|
3106
|
+
name: Schema.Literal<["claude", "cursor", "opencode"]>;
|
|
2094
3107
|
/** CLI command to execute */
|
|
2095
|
-
|
|
3108
|
+
cliCommand: typeof Schema.String;
|
|
2096
3109
|
/** Default arguments for the CLI */
|
|
2097
|
-
|
|
3110
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
2098
3111
|
/** Environment variables to pass */
|
|
2099
|
-
|
|
3112
|
+
env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
2100
3113
|
/** Permission mode for the CLI */
|
|
2101
|
-
|
|
3114
|
+
permissions: Schema.optional<Schema.Literal<["acceptEdits", "yolo", "prompt"]>>;
|
|
2102
3115
|
/** URL for installation instructions */
|
|
2103
|
-
|
|
2104
|
-
}
|
|
3116
|
+
installUrl: typeof Schema.String;
|
|
3117
|
+
}>;
|
|
3118
|
+
/**
|
|
3119
|
+
* Configuration for a provider.
|
|
3120
|
+
*/
|
|
3121
|
+
type ProviderConfig = typeof ProviderConfigSchema.Type;
|
|
2105
3122
|
/**
|
|
2106
3123
|
* Provider interface that all LLM implementations must satisfy.
|
|
2107
3124
|
*
|
|
@@ -2122,6 +3139,7 @@ interface Provider {
|
|
|
2122
3139
|
}
|
|
2123
3140
|
/**
|
|
2124
3141
|
* Default provider configurations.
|
|
3142
|
+
* Validated at module load time using Effect Schema.
|
|
2125
3143
|
*/
|
|
2126
3144
|
declare const PROVIDER_CONFIGS: Readonly<Record<ProviderName, ProviderConfig>>;
|
|
2127
3145
|
|
|
@@ -2765,4 +3783,4 @@ declare function collectEvents(config: LoopConfig, mockEvents?: readonly LLMEven
|
|
|
2765
3783
|
*/
|
|
2766
3784
|
declare function main(config: LoopConfig): Promise<void>;
|
|
2767
3785
|
|
|
2768
|
-
export { type CheckFailedEvent, CheckFailedEventSchema, type CheckFailedSignal, CheckFailedSignalSchema, type CheckPassedEvent, CheckPassedEventSchema, type CheckPassedSignal, CheckPassedSignalSchema, ClaudeCLI, type CommitHash, type ConsoleLoggerConfig, ConsoleLoggerConfigSchema, type Consumer, type ConsumerType, ConsumerTypeSchema, type CriteriaDefinedData, CriteriaDefinedDataSchema, type CriteriaDefinedEvent, CriteriaDefinedEventSchema, type CriteriaDefinedSignal, CriteriaDefinedSignalSchema, type Criterion, type CriterionBasicInfo, CriterionBasicInfoSchema, type CriterionFailedData, CriterionFailedDataSchema, type CriterionFailedEvent, CriterionFailedEventSchema, type CriterionFailedSignal, CriterionFailedSignalSchema, type CriterionIdData, CriterionIdDataSchema, type CriterionPassedEvent, CriterionPassedEventSchema, type CriterionPassedSignal, CriterionPassedSignalSchema, CriterionSchema, type CriterionStatus, CriterionStatusSchema, CursorCLI, type DiscoveryCompletedEvent, DiscoveryCompletedEventSchema, type DiscoveryStartedEvent, DiscoveryStartedEventSchema, type DomainEvent, DomainEventSchema, DomainEventUtils, type DoneEvent, DoneEventSchema, type ExecutionMode, ExecutionModeSchema, type FerixError, FerixParser, type FileLoggerConfig, FileLoggerConfigSchema, FileSystemGit, FileSystemGuardrails, FileSystemPlan, FileSystemProgress, FileSystemSession, type GeneratedTask, type GeneratedTaskList, GeneratedTaskListSchema, GeneratedTaskSchema, type GeneratedTaskStatus, GeneratedTaskStatusSchema, Git, GitError, type GitService, type Guardrail, type GuardrailAddedEvent, GuardrailAddedEventSchema, GuardrailSchema, type GuardrailSeverity, GuardrailSeveritySchema, type GuardrailSignal, GuardrailSignalSchema, type GuardrailsFile, GuardrailsFileSchema, GuardrailsStore, GuardrailsStoreError, type GuardrailsStoreService, type IterationCompletedEvent, IterationCompletedEventSchema, type IterationStartedEvent, IterationStartedEventSchema, LLM, LLMError, type LLMEvent, LLMEventSchema, type LLMExecuteOptions, type LLMService, type LLMTextEvent, LLMTextEventSchema, type LLMToolEndEvent, LLMToolEndEventSchema, type LLMToolStartEvent, LLMToolStartEventSchema, type LLMToolUseEvent, LLMToolUseEventSchema, type LearningCategory, LearningCategorySchema, type LearningRecordedEvent, LearningRecordedEventSchema, type LearningSignal, LearningSignalSchema, type LogEntry, LogEntrySchema, type LogLevel, LogLevelSchema, type LoopCompleteSignal, LoopCompleteSignalSchema, type LoopCompletedEvent, LoopCompletedEventSchema, type LoopConfig, LoopConfigSchema, type LoopError, LoopErrorSchema, type LoopFailedEvent, LoopFailedEventSchema, type LoopStartedEvent, LoopStartedEventSchema, type LoopStatus, LoopStatusSchema, type LoopSummary, LoopSummarySchema, MemoryGit, MemoryGuardrails, MemoryPlan, MemoryProgress, MemorySession, Mock, Mock as MockLLM, OrchestratorError, type OrchestratorServices, PROVIDER_CONFIGS, ParseError, type Phase, type PhaseBasicInfo, PhaseBasicInfoSchema, type PhaseCompletedEvent, PhaseCompletedEventSchema, type PhaseCompletedSignal, PhaseCompletedSignalSchema, type PhaseFailedData, PhaseFailedDataSchema, type PhaseFailedEvent, PhaseFailedEventSchema, type PhaseFailedSignal, PhaseFailedSignalSchema, type PhaseIdData, PhaseIdDataSchema, type PhasePromptOverrides, PhasePromptOverridesSchema, PhaseSchema, type PhaseStartedEvent, PhaseStartedEventSchema, type PhaseStartedSignal, PhaseStartedSignalSchema, type PhaseStatus, PhaseStatusSchema, type PhasesDefinedData, PhasesDefinedDataSchema, type PhasesDefinedEvent, PhasesDefinedEventSchema, type PhasesDefinedSignal, PhasesDefinedSignalSchema, type Plan, type PlanCreatedEvent, PlanCreatedEventSchema, type PlanData, PlanDataSchema, PlanId, PlanSchema, PlanStore, PlanStoreError, type PlanStoreService, type PlanUpdateFailedEvent, PlanUpdateFailedEventSchema, type PlanUpdatedEvent, PlanUpdatedEventSchema, type PrUrl, ProductionLayers, type ProgressAction, ProgressActionSchema, type ProgressEntry, ProgressEntrySchema, type ProgressFile, ProgressFileSchema, ProgressStore, ProgressStoreError, type ProgressStoreService, type ProgressUpdatedEvent, ProgressUpdatedEventSchema, type PromptConfig, PromptConfigSchema, type Provider, type ProviderConfig, type ProviderName, ProviderNameSchema, type ReviewCompleteData, ReviewCompleteDataSchema, type ReviewCompleteEvent, ReviewCompleteEventSchema, type ReviewCompleteSignal, ReviewCompleteSignalSchema, type RunOptions, type RunOptionsData, RunOptionsDataSchema, type Session, SessionSchema, type SessionStatus, SessionStatusSchema, SessionStore, SessionStoreError, type SessionStoreService, type Signal, type SignalAccumulator, SignalParser, type SignalParserService, SignalSchema, type TUICriterion, TUICriterionSchema, type TUICriterionStatus, TUICriterionStatusSchema, type TUIPhase, TUIPhaseSchema, type TUIPhaseStatus, TUIPhaseStatusSchema, type TUIState, TUIStateSchema, type TUITask, TUITaskSchema, type TUITaskStatus, TUITaskStatusSchema, type Task, type TaskBasicInfo, TaskBasicInfoSchema, type TaskCompleteData, TaskCompleteDataSchema, type TaskCompleteSignal, type TaskCompleteSignalData, TaskCompleteSignalDataSchema, TaskCompleteSignalSchema, type TaskCompletedEvent, TaskCompletedEventSchema, TaskSchema, type TaskStatus, TaskStatusSchema, type TasksDefinedData, TasksDefinedDataSchema, type TasksDefinedEvent, TasksDefinedEventSchema, type TasksDefinedSignal, TasksDefinedSignalSchema, TestLayers, type TextEvent, TextEventSchema, type ToolEndEvent, ToolEndEventSchema, type ToolStartEvent, ToolStartEventSchema, type ToolUseEvent, ToolUseEventSchema, type ViewMode, ViewModeSchema, type WorktreeCreatedEvent, WorktreeCreatedEventSchema, type WorktreeInfo, type WorktreePath, type WorktreeRemovedEvent, WorktreeRemovedEventSchema, buildPrompt, collectEvents, createHeadlessConsumer, createProductionLayers, createProviderLayer, createTUIConsumer, createTestLayers, decodeGuardrail, decodeGuardrailsFile, decodeLLMEvent, decodeLoopConfig, decodePlan, decodePlanData, decodeProgressEntry, decodeProgressFile, decodeSession, decodeSignal, decodeSignalSync, formatTasksMd, main, parseTasksMd, run, runLoop, runTest };
|
|
3786
|
+
export { type AnyToolInput, AnyToolInputSchema, type AssistantMessage, AssistantMessageSchema, type BashToolInput, BashToolInputSchema, type CheckFailedEvent, CheckFailedEventSchema, type CheckFailedSignal, CheckFailedSignalSchema, type CheckPassedEvent, CheckPassedEventSchema, type CheckPassedSignal, CheckPassedSignalSchema, ClaudeCLI, type ClaudeCliEvent, ClaudeCliEventSchema, type CommitHash, type ConsoleLoggerConfig, ConsoleLoggerConfigSchema, type Consumer, type ConsumerType, ConsumerTypeSchema, type ContentBlock, type ContentBlockDelta, ContentBlockDeltaSchema, ContentBlockSchema, type ContentBlockStart, ContentBlockStartSchema, type ContentBlockStop, ContentBlockStopSchema, type CriteriaDefinedData, CriteriaDefinedDataSchema, type CriteriaDefinedEvent, CriteriaDefinedEventSchema, type CriteriaDefinedSignal, CriteriaDefinedSignalSchema, type Criterion, type CriterionBasicInfo, CriterionBasicInfoSchema, type CriterionFailedData, CriterionFailedDataSchema, type CriterionFailedEvent, CriterionFailedEventSchema, type CriterionFailedSignal, CriterionFailedSignalSchema, type CriterionIdData, CriterionIdDataSchema, type CriterionPassedEvent, CriterionPassedEventSchema, type CriterionPassedSignal, CriterionPassedSignalSchema, CriterionSchema, type CriterionStatus, CriterionStatusSchema, CursorCLI, type Delta, DeltaSchema, type DiscoveryCompletedEvent, DiscoveryCompletedEventSchema, type DiscoveryStartedEvent, DiscoveryStartedEventSchema, type DomainEvent, DomainEventSchema, DomainEventUtils, type DoneEvent, DoneEventSchema, type EditToolInput, EditToolInputSchema, type ExecutionMode, ExecutionModeSchema, type FerixError, FerixParser, type FileLoggerConfig, FileLoggerConfigSchema, FileSystemGit, FileSystemGuardrails, FileSystemPlan, FileSystemProgress, FileSystemSession, type GeneratedTask, type GeneratedTaskList, GeneratedTaskListSchema, GeneratedTaskSchema, type GeneratedTaskStatus, GeneratedTaskStatusSchema, Git, GitError, type GitService, type GlobToolInput, GlobToolInputSchema, type GrepToolInput, GrepToolInputSchema, type Guardrail, type GuardrailAddedEvent, GuardrailAddedEventSchema, GuardrailSchema, type GuardrailSeverity, GuardrailSeveritySchema, type GuardrailSignal, GuardrailSignalSchema, type GuardrailsFile, GuardrailsFileSchema, GuardrailsStore, GuardrailsStoreError, type GuardrailsStoreService, type InputJsonDelta, InputJsonDeltaSchema, type IterationCompletedEvent, IterationCompletedEventSchema, type IterationStartedEvent, IterationStartedEventSchema, type KnownToolName, LLM, LLMError, type LLMEvent, LLMEventSchema, type LLMExecuteOptions, type LLMService, type LLMTextEvent, LLMTextEventSchema, type LLMToolEndEvent, LLMToolEndEventSchema, type LLMToolStartEvent, LLMToolStartEventSchema, type LLMToolUseEvent, LLMToolUseEventSchema, type LearningCategory, LearningCategorySchema, type LearningRecordedEvent, LearningRecordedEventSchema, type LearningSignal, LearningSignalSchema, type LogEntry, LogEntrySchema, type LogLevel, LogLevelSchema, type LoopCompleteSignal, LoopCompleteSignalSchema, type LoopCompletedEvent, LoopCompletedEventSchema, type LoopConfig, LoopConfigSchema, type LoopError, LoopErrorSchema, type LoopFailedEvent, LoopFailedEventSchema, type LoopStartedEvent, LoopStartedEventSchema, type LoopStatus, LoopStatusSchema, type LoopSummary, LoopSummarySchema, MemoryGit, MemoryGuardrails, MemoryPlan, MemoryProgress, MemorySession, Mock, Mock as MockLLM, type OpenCodeCliEvent, OpenCodeCliEventSchema, type OpenCodeCost, OpenCodeCostSchema, type OpenCodeStepFinish, OpenCodeStepFinishSchema, type OpenCodeStepPart, OpenCodeStepPartSchema, type OpenCodeStepStart, OpenCodeStepStartSchema, type OpenCodeTextEvent, OpenCodeTextEventSchema, type OpenCodeTokens, OpenCodeTokensSchema, type OpenCodeToolPart, OpenCodeToolPartSchema, type OpenCodeToolState, OpenCodeToolStateSchema, type OpenCodeToolUseEvent, OpenCodeToolUseEventSchema, OrchestratorError, type OrchestratorServices, PROVIDER_CONFIGS, ParseError, type Phase, type PhaseBasicInfo, PhaseBasicInfoSchema, type PhaseCompletedEvent, PhaseCompletedEventSchema, type PhaseCompletedSignal, PhaseCompletedSignalSchema, type PhaseFailedData, PhaseFailedDataSchema, type PhaseFailedEvent, PhaseFailedEventSchema, type PhaseFailedSignal, PhaseFailedSignalSchema, type PhaseIdData, PhaseIdDataSchema, type PhasePromptOverrides, PhasePromptOverridesSchema, PhaseSchema, type PhaseStartedEvent, PhaseStartedEventSchema, type PhaseStartedSignal, PhaseStartedSignalSchema, type PhaseStatus, PhaseStatusSchema, type PhasesDefinedData, PhasesDefinedDataSchema, type PhasesDefinedEvent, PhasesDefinedEventSchema, type PhasesDefinedSignal, PhasesDefinedSignalSchema, type Plan, type PlanCreatedEvent, PlanCreatedEventSchema, type PlanData, PlanDataSchema, PlanId, PlanSchema, PlanStore, PlanStoreError, type PlanStoreService, type PlanUpdateFailedEvent, PlanUpdateFailedEventSchema, type PlanUpdatedEvent, PlanUpdatedEventSchema, type PrUrl, ProductionLayers, type ProgressAction, ProgressActionSchema, type ProgressEntry, ProgressEntrySchema, type ProgressFile, ProgressFileSchema, ProgressStore, ProgressStoreError, type ProgressStoreService, type ProgressUpdatedEvent, ProgressUpdatedEventSchema, type PromptConfig, PromptConfigSchema, type Provider, type ProviderConfig, type ProviderName, ProviderNameSchema, type ReadToolInput, ReadToolInputSchema, type ReviewCompleteData, ReviewCompleteDataSchema, type ReviewCompleteEvent, ReviewCompleteEventSchema, type ReviewCompleteSignal, ReviewCompleteSignalSchema, type RunOptions, type RunOptionsData, RunOptionsDataSchema, type Session, type SessionNameDefinedSignal, SessionNameDefinedSignalSchema, type SessionNameGeneratedEvent, SessionNameGeneratedEventSchema, SessionSchema, type SessionStatus, SessionStatusSchema, SessionStore, SessionStoreError, type SessionStoreService, type Signal, type SignalAccumulator, SignalParser, type SignalParserService, SignalSchema, type StreamEventEnvelope, StreamEventEnvelopeSchema, type TUICriterion, TUICriterionSchema, type TUICriterionStatus, TUICriterionStatusSchema, type TUIPhase, TUIPhaseSchema, type TUIPhaseStatus, TUIPhaseStatusSchema, type TUIState, TUIStateSchema, type TUITask, TUITaskSchema, type TUITaskStatus, TUITaskStatusSchema, type Task, type TaskBasicInfo, TaskBasicInfoSchema, type TaskCompleteData, TaskCompleteDataSchema, type TaskCompleteSignal, type TaskCompleteSignalData, TaskCompleteSignalDataSchema, TaskCompleteSignalSchema, type TaskCompletedEvent, TaskCompletedEventSchema, TaskSchema, type TaskStatus, TaskStatusSchema, type TaskToolInput, TaskToolInputSchema, type TasksDefinedData, TasksDefinedDataSchema, type TasksDefinedEvent, TasksDefinedEventSchema, type TasksDefinedSignal, TasksDefinedSignalSchema, TestLayers, type TextContentBlock, TextContentBlockSchema, type TextDelta, TextDeltaSchema, type TextEvent, TextEventSchema, type ToolEndEvent, ToolEndEventSchema, ToolInputSchemaRegistry, type ToolStartEvent, ToolStartEventSchema, type ToolUseContentBlock, ToolUseContentBlockSchema, type ToolUseEvent, ToolUseEventSchema, type ValidatedToolUseEvent, ValidatedToolUseEventSchema, type ViewMode, ViewModeSchema, type WebFetchToolInput, WebFetchToolInputSchema, type WebSearchToolInput, WebSearchToolInputSchema, type WorktreeCreatedEvent, WorktreeCreatedEventSchema, type WorktreeInfo, type WorktreePath, type WorktreeRemovedEvent, WorktreeRemovedEventSchema, type WriteToolInput, WriteToolInputSchema, buildPrompt, collectEvents, createCheckFailedSignal, createCheckPassedSignal, createCriteriaDefinedSignal, createCriterionFailedSignal, createCriterionPassedSignal, createGuardrailSignal, createHeadlessConsumer, createLearningSignal, createLoopCompleteSignal, createPhaseCompletedSignal, createPhaseFailedSignal, createPhaseStartedSignal, createPhasesDefinedSignal, createProductionLayers, createProviderLayer, createReviewCompleteSignal, createSessionNameDefinedSignal, createTUIConsumer, createTaskCompleteSignal, createTasksDefinedSignal, createTestLayers, decodeClaudeCliEvent, decodeClaudeCliEventSync, decodeGuardrail, decodeGuardrailsFile, decodeLLMEvent, decodeLoopConfig, decodeOpenCodeCliEvent, decodeOpenCodeCliEventSync, decodePlan, decodePlanData, decodeProgressEntry, decodeProgressFile, decodeSession, decodeSignal, decodeSignalSync, formatTasksMd, getToolInputSchema, isAssistantMessage, isBashToolInput, isContentBlockDelta, isContentBlockStart, isContentBlockStop, isEditToolInput, isGlobToolInput, isGrepToolInput, isInputJsonDelta, isOpenCodeStepFinish, isOpenCodeStepStart, isOpenCodeTextEvent, isOpenCodeToolUseEvent, isReadToolInput, isStreamEventEnvelope, isTaskToolInput, isTextContentBlock, isTextDelta, isToolUseContentBlock, isWebFetchToolInput, isWebSearchToolInput, isWriteToolInput, main, parseTasksMd, run, runLoop, runTest, validateToolInput, validateToolUseEvent };
|