@llm4ts/flow 0.7.6 → 0.8.1
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/BasecampTool.d.ts +75 -0
- package/dist/BasecampTool.d.ts.map +1 -0
- package/dist/BasecampTool.js +224 -0
- package/dist/BasecampTool.js.map +1 -0
- package/dist/BenchReport.d.ts +2 -2
- package/dist/BenchReport.d.ts.map +1 -1
- package/dist/CostLedger.d.ts +2 -2
- package/dist/CostLedger.d.ts.map +1 -1
- package/dist/Equiv.d.ts +3 -3
- package/dist/Equiv.d.ts.map +1 -1
- package/dist/Flow.d.ts +1 -1
- package/dist/Flow.d.ts.map +1 -1
- package/dist/FlowError.d.ts +9 -2
- package/dist/FlowError.d.ts.map +1 -1
- package/dist/FlowError.js +9 -0
- package/dist/FlowError.js.map +1 -1
- package/dist/Persistence.d.ts +2 -2
- package/dist/Persistence.d.ts.map +1 -1
- package/dist/PlanExecution.d.ts +1 -1
- package/dist/PlanExecution.d.ts.map +1 -1
- package/dist/Replay.d.ts +2 -2
- package/dist/Replay.d.ts.map +1 -1
- package/dist/Review.d.ts +2 -2
- package/dist/Review.d.ts.map +1 -1
- package/dist/ReviewCache.d.ts +1 -1
- package/dist/ReviewCache.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/BasecampTool.ts +417 -0
- package/src/FlowError.ts +10 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import type { ProcessExecutorShape } from "@llm4ts/core/ProcessExecutor";
|
|
4
|
+
import { ProcessError, type FlowError } from "./FlowError.ts";
|
|
5
|
+
import type { FlowEventsShape } from "./FlowEvents.ts";
|
|
6
|
+
declare const BasecampProjectRef_base: Schema.Class<BasecampProjectRef, Schema.Struct<{
|
|
7
|
+
readonly project: Schema.String;
|
|
8
|
+
readonly cardTable: Schema.optionalKey<Schema.String>;
|
|
9
|
+
}>, {}>;
|
|
10
|
+
export declare class BasecampProjectRef extends BasecampProjectRef_base {
|
|
11
|
+
}
|
|
12
|
+
declare const Column_base: Schema.Class<Column, Schema.Struct<{
|
|
13
|
+
readonly id: Schema.Int;
|
|
14
|
+
readonly title: Schema.String;
|
|
15
|
+
}>, {}>;
|
|
16
|
+
export declare class Column extends Column_base {
|
|
17
|
+
}
|
|
18
|
+
declare const Card_base: Schema.Class<Card, Schema.Struct<{
|
|
19
|
+
readonly id: Schema.Int;
|
|
20
|
+
readonly title: Schema.String;
|
|
21
|
+
readonly contentHtml: Schema.String;
|
|
22
|
+
readonly column: typeof Column;
|
|
23
|
+
readonly assignees: Schema.$Array<Schema.String>;
|
|
24
|
+
readonly commentsCount: Schema.Int;
|
|
25
|
+
readonly updatedAt: Schema.String;
|
|
26
|
+
readonly url: Schema.String;
|
|
27
|
+
}>, {}>;
|
|
28
|
+
export declare class Card extends Card_base {
|
|
29
|
+
}
|
|
30
|
+
declare const CardComment_base: Schema.Class<CardComment, Schema.Struct<{
|
|
31
|
+
readonly id: Schema.Int;
|
|
32
|
+
readonly author: Schema.String;
|
|
33
|
+
readonly contentHtml: Schema.String;
|
|
34
|
+
readonly createdAt: Schema.String;
|
|
35
|
+
}>, {}>;
|
|
36
|
+
export declare class CardComment extends CardComment_base {
|
|
37
|
+
}
|
|
38
|
+
declare const CardStep_base: Schema.Class<CardStep, Schema.Struct<{
|
|
39
|
+
readonly id: Schema.Int;
|
|
40
|
+
readonly title: Schema.String;
|
|
41
|
+
readonly completed: Schema.Boolean;
|
|
42
|
+
}>, {}>;
|
|
43
|
+
export declare class CardStep extends CardStep_base {
|
|
44
|
+
}
|
|
45
|
+
export declare const cardColumnsArgs: (board: BasecampProjectRef) => ReadonlyArray<string>;
|
|
46
|
+
export declare const cardListArgs: (board: BasecampProjectRef, column: Column) => ReadonlyArray<string>;
|
|
47
|
+
export declare const cardShowArgs: (board: BasecampProjectRef, cardId: number) => ReadonlyArray<string>;
|
|
48
|
+
export declare const cardMoveArgs: (board: BasecampProjectRef, cardId: number, column: Column) => ReadonlyArray<string>;
|
|
49
|
+
export declare const cardCreateArgs: (board: BasecampProjectRef, column: Column, title: string, content: string, assignee?: string) => ReadonlyArray<string>;
|
|
50
|
+
export declare const cardAssignArgs: (board: BasecampProjectRef, cardId: number, assignee: string) => ReadonlyArray<string>;
|
|
51
|
+
export declare const cardCommentsArgs: (cardId: number) => ReadonlyArray<string>;
|
|
52
|
+
export declare const cardCommentCreateArgs: (cardId: number, body: string) => ReadonlyArray<string>;
|
|
53
|
+
export declare const cardStepsArgs: (board: BasecampProjectRef, cardId: number) => ReadonlyArray<string>;
|
|
54
|
+
export declare const cardStepCompleteArgs: (board: BasecampProjectRef, stepId: number) => ReadonlyArray<string>;
|
|
55
|
+
export declare const parseColumns: (json: string) => Effect.Effect<ReadonlyArray<Column>, ProcessError>;
|
|
56
|
+
export declare const parseCard: (json: string) => Effect.Effect<Card, ProcessError>;
|
|
57
|
+
export declare const parseCards: (json: string) => Effect.Effect<ReadonlyArray<Card>, ProcessError>;
|
|
58
|
+
export declare const parseCardComments: (json: string) => Effect.Effect<ReadonlyArray<CardComment>, ProcessError>;
|
|
59
|
+
export declare const parseCardSteps: (json: string) => Effect.Effect<ReadonlyArray<CardStep>, ProcessError>;
|
|
60
|
+
export interface BasecampToolShape {
|
|
61
|
+
readonly listColumns: Effect.Effect<ReadonlyArray<Column>, FlowError>;
|
|
62
|
+
readonly resolveColumn: (title: string) => Effect.Effect<Column, FlowError>;
|
|
63
|
+
readonly listCards: (column: Column) => Effect.Effect<ReadonlyArray<Card>, FlowError>;
|
|
64
|
+
readonly readCard: (cardId: number) => Effect.Effect<Card, FlowError>;
|
|
65
|
+
readonly moveCard: (cardId: number, column: Column) => Effect.Effect<void, FlowError>;
|
|
66
|
+
readonly createCard: (column: Column, title: string, content: string, assignee?: string) => Effect.Effect<Card, FlowError>;
|
|
67
|
+
readonly assignCard: (cardId: number, assignee: string) => Effect.Effect<void, FlowError>;
|
|
68
|
+
readonly readCardComments: (cardId: number) => Effect.Effect<ReadonlyArray<CardComment>, FlowError>;
|
|
69
|
+
readonly writeCardComment: (cardId: number, body: string) => Effect.Effect<void, FlowError>;
|
|
70
|
+
readonly listSteps: (cardId: number) => Effect.Effect<ReadonlyArray<CardStep>, FlowError>;
|
|
71
|
+
readonly completeStep: (stepId: number) => Effect.Effect<void, FlowError>;
|
|
72
|
+
}
|
|
73
|
+
export declare const makeBasecampTool: (process: ProcessExecutorShape, workDir: string, events: FlowEventsShape, board: BasecampProjectRef) => Effect.Effect<BasecampToolShape, never, never>;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=BasecampTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasecampTool.d.ts","sourceRoot":"","sources":["../src/BasecampTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,oBAAoB,EAAiB,MAAM,8BAA8B,CAAA;AACvF,OAAO,EAAkB,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;;;;;AAKtD,qBAAa,kBAAmB,SAAQ,uBAGtC;CAAG;;;;;AAEL,qBAAa,MAAO,SAAQ,WAG1B;CAAG;;;;;;;;;;;AAGL,qBAAa,IAAK,SAAQ,SASxB;CAAG;;;;;;;AAEL,qBAAa,WAAY,SAAQ,gBAK/B;CAAG;;;;;;AAEL,qBAAa,QAAS,SAAQ,aAI5B;CAAG;AAUL,eAAO,MAAM,eAAe,GAAI,OAAO,kBAAkB,KAAG,aAAa,CAAC,MAAM,CAK/E,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,kBAAkB,EAAE,QAAQ,MAAM,KAAG,aAAa,CAAC,MAAM,CAQ5F,CAA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AAE,CACzB,MAAM,EAAE,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;IACzD,QAAQ,CAAC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;IAC3F,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAA;IACzF,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;CAC1E;AAID,eAAO,MAAM,gBAAgB,wJA2H3B,CAAA"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Ref from "effect/Ref";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import { Capabilities } from "@llm4ts/core/Capability";
|
|
5
|
+
import { ColumnNotFound, ProcessError } from "./FlowError.js";
|
|
6
|
+
import { guarded } from "./CapabilityGuard.js";
|
|
7
|
+
// One tool instance operates one board. `cardTable` is only needed when the
|
|
8
|
+
// project has more than one card table (the CLI resolves the single one).
|
|
9
|
+
export class BasecampProjectRef extends Schema.Class("BasecampProjectRef")({
|
|
10
|
+
project: Schema.String,
|
|
11
|
+
cardTable: Schema.optionalKey(Schema.String)
|
|
12
|
+
}) {
|
|
13
|
+
}
|
|
14
|
+
export class Column extends Schema.Class("Column")({
|
|
15
|
+
id: Schema.Int,
|
|
16
|
+
title: Schema.String
|
|
17
|
+
}) {
|
|
18
|
+
}
|
|
19
|
+
// Basecamp bodies are rich-text HTML, never Markdown — the field names say so.
|
|
20
|
+
export class Card extends Schema.Class("Card")({
|
|
21
|
+
id: Schema.Int,
|
|
22
|
+
title: Schema.String,
|
|
23
|
+
contentHtml: Schema.String,
|
|
24
|
+
column: Column,
|
|
25
|
+
assignees: Schema.Array(Schema.String),
|
|
26
|
+
commentsCount: Schema.Int,
|
|
27
|
+
updatedAt: Schema.String,
|
|
28
|
+
url: Schema.String
|
|
29
|
+
}) {
|
|
30
|
+
}
|
|
31
|
+
export class CardComment extends Schema.Class("CardComment")({
|
|
32
|
+
id: Schema.Int,
|
|
33
|
+
author: Schema.String,
|
|
34
|
+
contentHtml: Schema.String,
|
|
35
|
+
createdAt: Schema.String
|
|
36
|
+
}) {
|
|
37
|
+
}
|
|
38
|
+
export class CardStep extends Schema.Class("CardStep")({
|
|
39
|
+
id: Schema.Int,
|
|
40
|
+
title: Schema.String,
|
|
41
|
+
completed: Schema.Boolean
|
|
42
|
+
}) {
|
|
43
|
+
}
|
|
44
|
+
const projectFlags = (board) => [
|
|
45
|
+
"--project",
|
|
46
|
+
board.project,
|
|
47
|
+
...(board.cardTable === undefined ? [] : ["--card-table", board.cardTable])
|
|
48
|
+
];
|
|
49
|
+
const jsonFlags = ["--json", "--quiet"];
|
|
50
|
+
export const cardColumnsArgs = (board) => [
|
|
51
|
+
"cards",
|
|
52
|
+
"columns",
|
|
53
|
+
...projectFlags(board),
|
|
54
|
+
...jsonFlags
|
|
55
|
+
];
|
|
56
|
+
export const cardListArgs = (board, column) => [
|
|
57
|
+
"cards",
|
|
58
|
+
"list",
|
|
59
|
+
"--column",
|
|
60
|
+
String(column.id),
|
|
61
|
+
"--all",
|
|
62
|
+
...projectFlags(board),
|
|
63
|
+
...jsonFlags
|
|
64
|
+
];
|
|
65
|
+
export const cardShowArgs = (board, cardId) => [
|
|
66
|
+
"cards",
|
|
67
|
+
"show",
|
|
68
|
+
String(cardId),
|
|
69
|
+
...projectFlags(board),
|
|
70
|
+
...jsonFlags
|
|
71
|
+
];
|
|
72
|
+
export const cardMoveArgs = (board, cardId, column) => [
|
|
73
|
+
"cards",
|
|
74
|
+
"move",
|
|
75
|
+
String(cardId),
|
|
76
|
+
"--to",
|
|
77
|
+
String(column.id),
|
|
78
|
+
...projectFlags(board),
|
|
79
|
+
"--quiet"
|
|
80
|
+
];
|
|
81
|
+
export const cardCreateArgs = (board, column, title, content, assignee) => [
|
|
82
|
+
"cards",
|
|
83
|
+
"create",
|
|
84
|
+
title,
|
|
85
|
+
content,
|
|
86
|
+
"--column",
|
|
87
|
+
String(column.id),
|
|
88
|
+
...(assignee === undefined ? [] : ["--assignee", assignee]),
|
|
89
|
+
...projectFlags(board),
|
|
90
|
+
...jsonFlags
|
|
91
|
+
];
|
|
92
|
+
export const cardAssignArgs = (board, cardId, assignee) => [
|
|
93
|
+
"cards",
|
|
94
|
+
"update",
|
|
95
|
+
String(cardId),
|
|
96
|
+
"--assignee",
|
|
97
|
+
assignee,
|
|
98
|
+
...projectFlags(board),
|
|
99
|
+
"--quiet"
|
|
100
|
+
];
|
|
101
|
+
// Comments hang off the card alone; `basecamp comments` rejects --project.
|
|
102
|
+
export const cardCommentsArgs = (cardId) => [
|
|
103
|
+
"comments",
|
|
104
|
+
"list",
|
|
105
|
+
String(cardId),
|
|
106
|
+
"--all",
|
|
107
|
+
...jsonFlags
|
|
108
|
+
];
|
|
109
|
+
export const cardCommentCreateArgs = (cardId, body) => [
|
|
110
|
+
"comments",
|
|
111
|
+
"create",
|
|
112
|
+
String(cardId),
|
|
113
|
+
body,
|
|
114
|
+
"--quiet"
|
|
115
|
+
];
|
|
116
|
+
export const cardStepsArgs = (board, cardId) => [
|
|
117
|
+
"cards",
|
|
118
|
+
"steps",
|
|
119
|
+
String(cardId),
|
|
120
|
+
...projectFlags(board),
|
|
121
|
+
...jsonFlags
|
|
122
|
+
];
|
|
123
|
+
export const cardStepCompleteArgs = (board, stepId) => [
|
|
124
|
+
"cards",
|
|
125
|
+
"step",
|
|
126
|
+
"complete",
|
|
127
|
+
String(stepId),
|
|
128
|
+
...projectFlags(board),
|
|
129
|
+
"--quiet"
|
|
130
|
+
];
|
|
131
|
+
const decodeJson = (operation, schema, json) => Schema.decodeUnknownEffect(schema)(json).pipe(Effect.mapError((error) => ProcessError.make({
|
|
132
|
+
message: operation,
|
|
133
|
+
detail: String(error)
|
|
134
|
+
})));
|
|
135
|
+
const columnStruct = Schema.Struct({
|
|
136
|
+
id: Schema.Int,
|
|
137
|
+
title: Schema.String
|
|
138
|
+
});
|
|
139
|
+
// The CLI prints `null` (not `[]`) for every empty listing — columns,
|
|
140
|
+
// cards in a column, comments — so all list decoders tolerate it.
|
|
141
|
+
export const parseColumns = (json) => decodeJson("basecamp parse columns", Schema.fromJsonString(Schema.NullOr(Schema.Array(columnStruct))), json).pipe(Effect.map((columns) => (columns ?? []).map((column) => Column.make(column))));
|
|
142
|
+
const cardStruct = Schema.Struct({
|
|
143
|
+
id: Schema.Int,
|
|
144
|
+
title: Schema.String,
|
|
145
|
+
content: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
146
|
+
parent: columnStruct,
|
|
147
|
+
assignees: Schema.optionalKey(Schema.NullOr(Schema.Array(Schema.Struct({ name: Schema.String })))),
|
|
148
|
+
comments_count: Schema.optionalKey(Schema.NullOr(Schema.Int)),
|
|
149
|
+
updated_at: Schema.String,
|
|
150
|
+
app_url: Schema.String
|
|
151
|
+
});
|
|
152
|
+
const toCard = (item) => Card.make({
|
|
153
|
+
id: item.id,
|
|
154
|
+
title: item.title,
|
|
155
|
+
contentHtml: item.content ?? "",
|
|
156
|
+
column: Column.make(item.parent),
|
|
157
|
+
assignees: (item.assignees ?? []).map((assignee) => assignee.name),
|
|
158
|
+
commentsCount: item.comments_count ?? 0,
|
|
159
|
+
updatedAt: item.updated_at,
|
|
160
|
+
url: item.app_url
|
|
161
|
+
});
|
|
162
|
+
export const parseCard = (json) => decodeJson("basecamp parse card", Schema.fromJsonString(cardStruct), json).pipe(Effect.map(toCard));
|
|
163
|
+
export const parseCards = (json) => decodeJson("basecamp parse cards", Schema.fromJsonString(Schema.NullOr(Schema.Array(cardStruct))), json).pipe(Effect.map((items) => (items ?? []).map(toCard)));
|
|
164
|
+
const commentStruct = Schema.Struct({
|
|
165
|
+
id: Schema.Int,
|
|
166
|
+
content: Schema.String,
|
|
167
|
+
creator: Schema.Struct({ name: Schema.String }),
|
|
168
|
+
created_at: Schema.String
|
|
169
|
+
});
|
|
170
|
+
export const parseCardComments = (json) => decodeJson("basecamp parse comments", Schema.fromJsonString(Schema.NullOr(Schema.Array(commentStruct))), json).pipe(Effect.map((comments) => (comments ?? []).map((comment) => CardComment.make({
|
|
171
|
+
id: comment.id,
|
|
172
|
+
author: comment.creator.name,
|
|
173
|
+
contentHtml: comment.content,
|
|
174
|
+
createdAt: comment.created_at
|
|
175
|
+
}))));
|
|
176
|
+
const stepStruct = Schema.Struct({
|
|
177
|
+
id: Schema.Int,
|
|
178
|
+
title: Schema.String,
|
|
179
|
+
completed: Schema.Boolean
|
|
180
|
+
});
|
|
181
|
+
// A card without steps prints `null`, not `[]`.
|
|
182
|
+
export const parseCardSteps = (json) => decodeJson("basecamp parse steps", Schema.fromJsonString(Schema.NullOr(Schema.Array(stepStruct))), json).pipe(Effect.map((steps) => (steps ?? []).map((step) => CardStep.make(step))));
|
|
183
|
+
const output = (result) => result.stdout.join("\n").trim();
|
|
184
|
+
export const makeBasecampTool = Effect.fn("@llm4ts/flow/BasecampTool.make")(function* (process, workDir, events, board) {
|
|
185
|
+
const columnsCache = yield* Ref.make(undefined);
|
|
186
|
+
const run = (args) => process.run(["basecamp", ...args], workDir, {}).pipe(Effect.mapError((error) => ProcessError.make({
|
|
187
|
+
message: `basecamp ${args.join(" ")}`,
|
|
188
|
+
detail: error.message
|
|
189
|
+
})), Effect.flatMap((result) => result.exitCode === 0
|
|
190
|
+
? Effect.succeed(result)
|
|
191
|
+
: Effect.fail(ProcessError.make({
|
|
192
|
+
message: `basecamp ${args.join(" ")}`,
|
|
193
|
+
detail: [...result.stdout, ...result.stderr].join("\n").trim() ||
|
|
194
|
+
`exit code ${result.exitCode}`
|
|
195
|
+
}))));
|
|
196
|
+
const read = (operation, effect) => guarded(Capabilities.BasecampRead, operation, events, effect);
|
|
197
|
+
const write = (operation, effect) => guarded(Capabilities.BasecampWrite, operation, events, effect);
|
|
198
|
+
// The board's columns barely change within a tool's lifetime; fetch once.
|
|
199
|
+
const cachedColumns = Ref.get(columnsCache).pipe(Effect.flatMap((cached) => cached !== undefined
|
|
200
|
+
? Effect.succeed(cached)
|
|
201
|
+
: run(cardColumnsArgs(board)).pipe(Effect.flatMap((result) => parseColumns(output(result))), Effect.tap((columns) => Ref.set(columnsCache, columns)))));
|
|
202
|
+
return {
|
|
203
|
+
listColumns: read("basecamp cards columns", cachedColumns),
|
|
204
|
+
resolveColumn: (title) => read("basecamp cards columns", cachedColumns.pipe(Effect.flatMap((columns) => {
|
|
205
|
+
const match = columns.find((column) => column.title.toLowerCase() === title.toLowerCase());
|
|
206
|
+
return match !== undefined
|
|
207
|
+
? Effect.succeed(match)
|
|
208
|
+
: Effect.fail(ColumnNotFound.make({
|
|
209
|
+
title,
|
|
210
|
+
available: columns.map((column) => column.title)
|
|
211
|
+
}));
|
|
212
|
+
}))),
|
|
213
|
+
listCards: (column) => read("basecamp cards list", run(cardListArgs(board, column)).pipe(Effect.flatMap((result) => parseCards(output(result))))),
|
|
214
|
+
readCard: (cardId) => read("basecamp cards show", run(cardShowArgs(board, cardId)).pipe(Effect.flatMap((result) => parseCard(output(result))))),
|
|
215
|
+
moveCard: (cardId, column) => write("basecamp cards move", run(cardMoveArgs(board, cardId, column)).pipe(Effect.asVoid)),
|
|
216
|
+
createCard: (column, title, content, assignee) => write("basecamp cards create", run(cardCreateArgs(board, column, title, content, assignee)).pipe(Effect.flatMap((result) => parseCard(output(result))))),
|
|
217
|
+
assignCard: (cardId, assignee) => write("basecamp cards update", run(cardAssignArgs(board, cardId, assignee)).pipe(Effect.asVoid)),
|
|
218
|
+
readCardComments: (cardId) => read("basecamp comments list", run(cardCommentsArgs(cardId)).pipe(Effect.flatMap((result) => parseCardComments(output(result))))),
|
|
219
|
+
writeCardComment: (cardId, body) => write("basecamp comments create", run(cardCommentCreateArgs(cardId, body)).pipe(Effect.asVoid)),
|
|
220
|
+
listSteps: (cardId) => read("basecamp cards steps", run(cardStepsArgs(board, cardId)).pipe(Effect.flatMap((result) => parseCardSteps(output(result))))),
|
|
221
|
+
completeStep: (stepId) => write("basecamp cards step complete", run(cardStepCompleteArgs(board, stepId)).pipe(Effect.asVoid))
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
//# sourceMappingURL=BasecampTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasecampTool.js","sourceRoot":"","sources":["../src/BasecampTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAA;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,4EAA4E;AAC5E,0EAA0E;AAC1E,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,KAAK,CAAqB,oBAAoB,CAAC,CAAC;IAC7F,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;CAC7C,CAAC;CAAG;AAEL,MAAM,OAAO,MAAO,SAAQ,MAAM,CAAC,KAAK,CAAS,QAAQ,CAAC,CAAC;IACzD,EAAE,EAAE,MAAM,CAAC,GAAG;IACd,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC;CAAG;AAEL,+EAA+E;AAC/E,MAAM,OAAO,IAAK,SAAQ,MAAM,CAAC,KAAK,CAAO,MAAM,CAAC,CAAC;I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edSchemaVersion } from "./FlowError.ts";
|
|
|
4
4
|
import type { PlainFileStoreShape } from "./Persistence.ts";
|
|
5
5
|
export declare const median: (values: ReadonlyArray<number>) => number;
|
|
6
6
|
export declare const renderBenchReport: (records: ReadonlyArray<BenchRecord>, projectPrograms?: number) => string;
|
|
7
|
-
export declare const appendBenchRecord: (files: PlainFileStoreShape, path: string, record: BenchRecord) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
8
|
-
export declare const loadBenchRecords: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly BenchRecord[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
7
|
+
export declare const appendBenchRecord: (files: PlainFileStoreShape, path: string, record: BenchRecord) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
8
|
+
export declare const loadBenchRecords: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly BenchRecord[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
9
9
|
//# sourceMappingURL=BenchReport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenchReport.d.ts","sourceRoot":"","sources":["../src/BenchReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAuC,MAAM,YAAY,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAkB,MAAM,gBAAgB,CAAA;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAI3D,eAAO,MAAM,MAAM,GAAI,QAAQ,aAAa,CAAC,MAAM,CAAC,KAAG,MAStD,CAAA;AA4WD,eAAO,MAAM,iBAAiB,GAC5B,SAAS,aAAa,CAAC,WAAW,CAAC,EACnC,kBAAkB,MAAM,KACvB,MAUF,CAAA;AAID,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BenchReport.d.ts","sourceRoot":"","sources":["../src/BenchReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAuC,MAAM,YAAY,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAkB,MAAM,gBAAgB,CAAA;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAI3D,eAAO,MAAM,MAAM,GAAI,QAAQ,aAAa,CAAC,MAAM,CAAC,KAAG,MAStD,CAAA;AA4WD,eAAO,MAAM,iBAAiB,GAC5B,SAAS,aAAa,CAAC,WAAW,CAAC,EACnC,kBAAkB,MAAM,KACvB,MAUF,CAAA;AAID,eAAO,MAAM,iBAAiB,0jBAa5B,CAAA;AAEF,eAAO,MAAM,gBAAgB,ujBAiC3B,CAAA"}
|
package/dist/CostLedger.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ declare const CostBudget_base: Schema.Class<CostBudget, Schema.Struct<{
|
|
|
48
48
|
export declare class CostBudget extends CostBudget_base {
|
|
49
49
|
}
|
|
50
50
|
export declare const checkCostBudget: (record: CostRecord, budget: CostBudget) => Effect.Effect<void, BudgetExceeded>;
|
|
51
|
-
export declare const appendCostRecord: (files: PlainFileStoreShape, path: string, record: CostRecord) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | BudgetExceeded, never>;
|
|
52
|
-
export declare const loadCostLedger: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly CostRecord[], import("./FlowError.ts").PersistenceError | PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | BudgetExceeded, never>;
|
|
51
|
+
export declare const appendCostRecord: (files: PlainFileStoreShape, path: string, record: CostRecord) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | BudgetExceeded, never>;
|
|
52
|
+
export declare const loadCostLedger: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly CostRecord[], import("./FlowError.ts").PersistenceError | PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | BudgetExceeded, never>;
|
|
53
53
|
export declare const mergeCostCells: (records: ReadonlyArray<CostRecord>) => ReadonlyArray<CostCell>;
|
|
54
54
|
export {};
|
|
55
55
|
//# sourceMappingURL=CostLedger.d.ts.map
|
package/dist/CostLedger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CostLedger.d.ts","sourceRoot":"","sources":["../src/CostLedger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAkB,MAAM,gBAAgB,CAAA;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;;;;;;;;;;;AAI3D,qBAAa,QAAS,SAAQ,aAS5B;CAAG;;;;;;;;;;;;;;;AAEL,qBAAa,UAAW,SAAQ,eAa9B;CAAG;AAEL,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,kBAAkB,gBAAgB,CAAA;AAE/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,EAA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E,aAAa,CAAC,QAAQ,CAAC,CAAA;CACxC;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,eAAe,KAAG,UAgBvD,CAAA;;;;;AAED,qBAAa,UAAW,SAAQ,eAG9B;CAAG;AAEL,eAAO,MAAM,eAAe,GAC1B,QAAQ,UAAU,EAClB,QAAQ,UAAU,KACjB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAqBpC,CAAA;AAID,eAAO,MAAM,gBAAgB,yjBAa3B,CAAA;AAEF,eAAO,MAAM,cAAc,sjBAqBzB,CAAA;AAOF,eAAO,MAAM,cAAc,GAAI,SAAS,aAAa,CAAC,UAAU,CAAC,KAAG,aAAa,CAAC,QAAQ,CA+BzF,CAAA"}
|
package/dist/Equiv.d.ts
CHANGED
|
@@ -174,8 +174,8 @@ export declare class ReplayedCrashed extends ReplayedCrashed_base {
|
|
|
174
174
|
}
|
|
175
175
|
export declare const Replayed: Schema.Union<readonly [typeof ReplayedObserved, typeof ReplayedCrashed]>;
|
|
176
176
|
export type Replayed = typeof Replayed.Type;
|
|
177
|
-
export declare const writeEquivVectors: (files: PlainFileStoreShape, path: string, vectors: readonly EquivVector[]) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
178
|
-
export declare const readEquivVectors: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly EquivVector[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
179
|
-
export declare const replayEquivVector: (process: ProcessExecutorShape, events: FlowEventsShape, command: readonly string[], root: string, vector: EquivVector) => Effect.Effect<ReplayedObserved | ReplayedCrashed, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
177
|
+
export declare const writeEquivVectors: (files: PlainFileStoreShape, path: string, vectors: readonly EquivVector[]) => Effect.Effect<void, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
178
|
+
export declare const readEquivVectors: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly EquivVector[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
179
|
+
export declare const replayEquivVector: (process: ProcessExecutorShape, events: FlowEventsShape, command: readonly string[], root: string, vector: EquivVector) => Effect.Effect<ReplayedObserved | ReplayedCrashed, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
180
180
|
export {};
|
|
181
181
|
//# sourceMappingURL=Equiv.d.ts.map
|
package/dist/Equiv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Equiv.d.ts","sourceRoot":"","sources":["../src/Equiv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAExE,OAAO,EACL,cAAc,EACd,YAAY,EACZ,wBAAwB,EAEzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,SAAS,qDAA6C,CAAA;AACnE,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,eAAO,MAAM,iBAAiB;;;;EAI5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA;AAErE,eAAO,MAAM,kBAAkB;;;;;EAK7B,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAA;AAE/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;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xB,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAsGrD,eAAO,MAAM,gBAAgB,GAC3B,UAAU,aAAa,CAAC,gBAAgB,CAAC,EACzC,QAAQ,aAAa,CAAC,gBAAgB,CAAC,EACvC,QAAQ,gBAAgB,KACvB,aAAa,CAAC,aAAa,CA+C7B,CAAA;;;;;;;;;;;;;;;;;;;AAED,qBAAa,gBAAiB,SAAQ,qBAEpC;CAAG;;;;;AAEL,qBAAa,eAAgB,SAAQ,oBAGnC;CAAG;AAEL,eAAO,MAAM,QAAQ,0EAAoD,CAAA;AACzE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAI3C,eAAO,MAAM,iBAAiB,6iBAkB5B,CAAA;AAEF,eAAO,MAAM,gBAAgB,8hBA2C3B,CAAA;AAEF,eAAO,MAAM,iBAAiB,unBA6D5B,CAAA"}
|
package/dist/Flow.d.ts
CHANGED
|
@@ -38,5 +38,5 @@ export interface ImplementPlanOptions {
|
|
|
38
38
|
*/
|
|
39
39
|
readonly noopTaskPolicy?: "fail" | "complete";
|
|
40
40
|
}
|
|
41
|
-
export declare const implementPlanFlow: (context: FlowContextShape, options: ImplementPlanOptions) => Effect.Effect<Plan, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | FlowAborted | import("./FlowError.ts").ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
41
|
+
export declare const implementPlanFlow: (context: FlowContextShape, options: ImplementPlanOptions) => Effect.Effect<Plan, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | FlowAborted | import("./FlowError.ts").ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
42
42
|
//# sourceMappingURL=Flow.d.ts.map
|
package/dist/Flow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../src/Flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAI9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1E,OAAO,EAAsC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC1F,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAsC,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE/D,eAAO,MAAM,YAAY,GAAI,SAAS,gBAAgB,KAAG,eACd,CAAA;AAE3C,eAAO,MAAM,kBAAkB,mHAmB7B,CAAA;AAEF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;IAC7C,QAAQ,C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ause?: typeof LlmError.Type) => FlowLlmError;
|
|
68
68
|
}
|
|
69
69
|
declare const FlowCapabilityDenied_base: Schema.Class<FlowCapabilityDenied, Schema.TaggedStruct<"CapabilityDenied", {
|
|
70
|
-
readonly capability: Schema.Union<readonly [typeof import("@llm4ts/core/Capability").GitRead, typeof import("@llm4ts/core/Capability").GitWrite, typeof import("@llm4ts/core/Capability").GitPush, typeof import("@llm4ts/core/Capability").GhRead, typeof import("@llm4ts/core/Capability").GhWrite, typeof import("@llm4ts/core/Capability").AdoRead, typeof import("@llm4ts/core/Capability").AdoWrite, typeof import("@llm4ts/core/Capability").Exec, typeof import("@llm4ts/core/Capability").UseCoder, typeof import("@llm4ts/core/Capability").UseReasoning, typeof import("@llm4ts/core/Capability").Declassify]>;
|
|
70
|
+
readonly capability: Schema.Union<readonly [typeof import("@llm4ts/core/Capability").GitRead, typeof import("@llm4ts/core/Capability").GitWrite, typeof import("@llm4ts/core/Capability").GitPush, typeof import("@llm4ts/core/Capability").GhRead, typeof import("@llm4ts/core/Capability").GhWrite, typeof import("@llm4ts/core/Capability").AdoRead, typeof import("@llm4ts/core/Capability").AdoWrite, typeof import("@llm4ts/core/Capability").BasecampRead, typeof import("@llm4ts/core/Capability").BasecampWrite, typeof import("@llm4ts/core/Capability").Exec, typeof import("@llm4ts/core/Capability").UseCoder, typeof import("@llm4ts/core/Capability").UseReasoning, typeof import("@llm4ts/core/Capability").Declassify]>;
|
|
71
71
|
readonly operation: Schema.String;
|
|
72
72
|
}>, import("effect/Cause").YieldableError>;
|
|
73
73
|
export declare class FlowCapabilityDenied extends FlowCapabilityDenied_base {
|
|
74
74
|
get message(): string;
|
|
75
75
|
}
|
|
76
|
+
declare const ColumnNotFound_base: Schema.Class<ColumnNotFound, Schema.TaggedStruct<"ColumnNotFound", {
|
|
77
|
+
readonly title: Schema.String;
|
|
78
|
+
readonly available: Schema.$Array<Schema.String>;
|
|
79
|
+
}>, import("effect/Cause").YieldableError>;
|
|
80
|
+
export declare class ColumnNotFound extends ColumnNotFound_base {
|
|
81
|
+
get message(): string;
|
|
82
|
+
}
|
|
76
83
|
declare const BudgetExceeded_base: Schema.Class<BudgetExceeded, Schema.TaggedStruct<"BudgetExceeded", {
|
|
77
84
|
readonly metric: Schema.Literals<readonly ["tokens", "costUsd"]>;
|
|
78
85
|
readonly limit: Schema.Number;
|
|
@@ -81,7 +88,7 @@ declare const BudgetExceeded_base: Schema.Class<BudgetExceeded, Schema.TaggedStr
|
|
|
81
88
|
export declare class BudgetExceeded extends BudgetExceeded_base {
|
|
82
89
|
get message(): string;
|
|
83
90
|
}
|
|
84
|
-
export declare const FlowError: Schema.Union<readonly [typeof PersistenceError, typeof PlanParseError, typeof UnsupportedSchemaVersion, typeof WorkspacePathError, typeof WorkspaceLimitError, typeof WorkspaceIoError, typeof FlowAborted, typeof ProcessError, typeof FlowLlmError, typeof FlowCapabilityDenied, typeof BudgetExceeded]>;
|
|
91
|
+
export declare const FlowError: Schema.Union<readonly [typeof PersistenceError, typeof PlanParseError, typeof UnsupportedSchemaVersion, typeof WorkspacePathError, typeof WorkspaceLimitError, typeof WorkspaceIoError, typeof FlowAborted, typeof ProcessError, typeof FlowLlmError, typeof FlowCapabilityDenied, typeof ColumnNotFound, typeof BudgetExceeded]>;
|
|
85
92
|
export type FlowError = typeof FlowError.Type;
|
|
86
93
|
export {};
|
|
87
94
|
//# sourceMappingURL=FlowError.d.ts.map
|
package/dist/FlowError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowError.d.ts","sourceRoot":"","sources":["../src/FlowError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;;;;;AAE9C,qBAAa,gBAAiB,SAAQ,qBAGpC;CAAG;;;;AAEL,qBAAa,cAAe,SAAQ,mBAElC;CAAG;;;;;;AAEL,qBAAa,wBAAyB,SAAQ,6BAO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SAAQ,qBAKpC;CAAG;;;;AAEL,qBAAa,WAAY,SAAQ,gBAE/B;CAAG;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAGhC;CAAG;AAEL;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAUlD,CAAA;;;;;AAED,qBAAa,YAAa,SAAQ,iBAGhC;IACA,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAI,QAAQ,OAAO,QAAQ,CAAC,IAAI,KAAG,YAAY,CAI/D;CACL;;;;;AAED,qBAAa,oBAAqB,SAAQ,yBAMzC;IACC,IAAI,OAAO,IAAI,MAAM,CAIpB;CACF;;;;;AAED,qBAAa,cAAe,SAAQ,mBAGlC;IACA,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF;;;;;;AAED,qBAAa,cAAe,SAAQ,mBAIlC;IACA,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF;AAED,eAAO,MAAM,SAAS,mUAapB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA"}
|
package/dist/FlowError.js
CHANGED
|
@@ -84,6 +84,14 @@ export class FlowCapabilityDenied extends Schema.TaggedErrorClass()("CapabilityD
|
|
|
84
84
|
return `capability ${capability} denied for ${this.operation}`;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
export class ColumnNotFound extends Schema.TaggedErrorClass()("ColumnNotFound", {
|
|
88
|
+
title: Schema.String,
|
|
89
|
+
available: Schema.Array(Schema.String)
|
|
90
|
+
}) {
|
|
91
|
+
get message() {
|
|
92
|
+
return `column "${this.title}" not found on the card table; available: ${this.available.join(", ")}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
87
95
|
export class BudgetExceeded extends Schema.TaggedErrorClass()("BudgetExceeded", {
|
|
88
96
|
metric: Schema.Literals(["tokens", "costUsd"]),
|
|
89
97
|
limit: Schema.Number,
|
|
@@ -104,6 +112,7 @@ export const FlowError = Schema.Union([
|
|
|
104
112
|
ProcessError,
|
|
105
113
|
FlowLlmError,
|
|
106
114
|
FlowCapabilityDenied,
|
|
115
|
+
ColumnNotFound,
|
|
107
116
|
BudgetExceeded
|
|
108
117
|
]);
|
|
109
118
|
//# sourceMappingURL=FlowError.js.map
|
package/dist/FlowError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowError.js","sourceRoot":"","sources":["../src/FlowError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,gBAAgB,EAAoB,CAAC,aAAa,EAAE;IAC/F,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;CAC3C,CAAC;CAAG;AAEL,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,gBAAgB,EAAkB,CAAC,WAAW,EAAE;IACzF,OAAO,EAAE,MAAM,CAAC,MAAM;CACvB,CAAC;CAAG;AAEL,MAAM,OAAO,wBAAyB,SAAQ,MAAM,CAAC,gBAAgB,EAA4B,CAC/F,0BAA0B,EAC1B;IACE,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,QAAQ,EAAE,MAAM,CAAC,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,GAAG;CACnB,CACF;IACC,IAAI,OAAO;QACT,OAAO,iCAAiC,IAAI,CAAC,IAAI,cAAc,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,MAAM,EAAE,CAAA;IACzG,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,gBAAgB,EAAsB,CACnF,eAAe,EACf;IACE,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,OAAO,EAA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B,EAAE;IAC9F,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM;CACtB,CAAC;IACA,IAAI,OAAO;QACT,OAAO,GAAG,IAAI,CAAC,MAAM,2BAA2B,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,MAAM,EAAE,CAAA;IACrF,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;IACpC,gBAAgB;IAChB,cAAc;IACd,wBAAwB;IACxB,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,oBAAoB;IACpB,cAAc;IACd,cAAc;CACf,CAAC,CAAA"}
|
package/dist/Persistence.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface PlanStoreShape {
|
|
|
26
26
|
readonly recoverOrCreate: <E, R>(path: string, create: Effect.Effect<Plan, E, R>) => Effect.Effect<Plan, E | PersistenceError | PlanParseError, R>;
|
|
27
27
|
}
|
|
28
28
|
export declare const makePlanStore: (files: PlainFileStoreShape) => PlanStoreShape;
|
|
29
|
-
export declare const saveVersioned: <A, E, RD, RE>(files: PlainFileStoreShape, path: string, schemaVersion: number, schema: Schema.ConstraintCodec<A, E, RD, RE>, value: A) => Effect.Effect<void, PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, RE>;
|
|
30
|
-
export declare const loadVersioned: <A, E, RD, RE>(files: PlainFileStoreShape, path: string, expectedVersion: number, schema: Schema.ConstraintCodec<A, E, RD, RE>) => Effect.Effect<A | undefined, PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, RD>;
|
|
29
|
+
export declare const saveVersioned: <A, E, RD, RE>(files: PlainFileStoreShape, path: string, schemaVersion: number, schema: Schema.ConstraintCodec<A, E, RD, RE>, value: A) => Effect.Effect<void, PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, RE>;
|
|
30
|
+
export declare const loadVersioned: <A, E, RD, RE>(files: PlainFileStoreShape, path: string, expectedVersion: number, schema: Schema.ConstraintCodec<A, E, RD, RE>) => Effect.Effect<A | undefined, PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, RD>;
|
|
31
31
|
export {};
|
|
32
32
|
//# sourceMappingURL=Persistence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Persistence.d.ts","sourceRoot":"","sources":["../src/Persistence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MA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MAAM,wBAAwB,GACnC,UAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,KAC7C,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAoClC,CAAA;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;IAClF,QAAQ,CAAC,IAAI,EAAE,CACb,IAAI,EAAE,MAAM,KACT,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,SAAS,EAAE,gBAAgB,GAAG,cAAc,CAAC,CAAA;IACvE,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;IACxE,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,EAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,KAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,gBAAgB,GAAG,cAAc,EAAE,CAAC,CAAC,CAAA;CACnE;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,mBAAmB,KAAG,cAyB1D,CAAA;AAYD,eAAO,MAAM,aAAa,GACxB,CAAC,EACD,CAAC,EACD,EAAE,EACF,EAAE,ulBAmBF,CAAA;AAEF,eAAO,MAAM,aAAa,GACxB,CAAC,EACD,CAAC,EACD,EAAE,EACF,EAAE,wlBAkCF,CAAA"}
|
package/dist/PlanExecution.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { type FlowEventsShape } from "./FlowEvents.ts";
|
|
|
3
3
|
import type { Plan, Task } from "./Plan.ts";
|
|
4
4
|
import type { PlanStoreShape } from "./Persistence.ts";
|
|
5
5
|
export declare const stage: <A, E, R>(events: FlowEventsShape, name: string, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
6
|
-
export declare const implementTaskLoop: <E, R>(store: PlanStoreShape, events: FlowEventsShape, planPath: string, plan: Plan, perTask: (task: Task, planSoFar: Plan) => Effect.Effect<void, E, R>) => Effect.Effect<Plan, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded | E, R>;
|
|
6
|
+
export declare const implementTaskLoop: <E, R>(store: PlanStoreShape, events: FlowEventsShape, planPath: string, plan: Plan, perTask: (task: Task, planSoFar: Plan) => Effect.Effect<void, E, R>) => Effect.Effect<Plan, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded | E, R>;
|
|
7
7
|
//# sourceMappingURL=PlanExecution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanExecution.d.ts","sourceRoot":"","sources":["../src/PlanExecution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAA6C,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjG,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,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ends ReplayFailure_base {
|
|
|
22
22
|
export declare const ReplayTurn: Schema.Union<readonly [typeof ReplaySuccess, typeof ReplayFailure]>;
|
|
23
23
|
export type ReplayTurn = typeof ReplayTurn.Type;
|
|
24
24
|
export declare const segmentReplayTurns: (lines: ReadonlyArray<TraceLine>) => ReadonlyArray<ReplayTurn>;
|
|
25
|
-
export declare const readTrace: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly TraceLine[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
25
|
+
export declare const readTrace: (files: PlainFileStoreShape, path: string) => Effect.Effect<readonly TraceLine[], import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
26
26
|
export declare const makeReplayConnector: (turns: readonly (ReplaySuccess | ReplayFailure)[]) => Effect.Effect<LlmServiceShape, never, never>;
|
|
27
|
-
export declare const replayFromTrace: (files: PlainFileStoreShape, path: string) => Effect.Effect<LlmServiceShape, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
27
|
+
export declare const replayFromTrace: (files: PlainFileStoreShape, path: string) => Effect.Effect<LlmServiceShape, import("./FlowError.ts").PersistenceError | PlanParseError | UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=Replay.d.ts.map
|
package/dist/Replay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Replay.d.ts","sourceRoot":"","sources":["../src/Replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAY,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAkB,MAAM,gBAAgB,CAAA;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,kBAAkB,IAAI,CAAA;;;;;;AAEnC,qBAAa,aAAc,SAAQ,kBAIjC;CAAG;;;;;AAEL,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;AAEL,eAAO,MAAM,UAAU,qEAA+C,CAAA;AACtE,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AA8C/C,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,CAAC,SAAS,CAAC,KAAG,aAAa,CAAC,UAAU,CAgE5F,CAAA;AAID,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Replay.d.ts","sourceRoot":"","sources":["../src/Replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAY,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAkB,MAAM,gBAAgB,CAAA;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,kBAAkB,IAAI,CAAA;;;;;;AAEnC,qBAAa,aAAc,SAAQ,kBAIjC;CAAG;;;;;AAEL,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;AAEL,eAAO,MAAM,UAAU,qEAA+C,CAAA;AACtE,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AA8C/C,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,CAAC,SAAS,CAAC,KAAG,aAAa,CAAC,UAAU,CAgE5F,CAAA;AAID,eAAO,MAAM,SAAS,qjBAqCpB,CAAA;AAEF,eAAO,MAAM,mBAAmB,qGA6E9B,CAAA;AAEF,eAAO,MAAM,eAAe,gjBAM1B,CAAA"}
|
package/dist/Review.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const llmDriven: (picker: LlmServiceShape) => ReviewerSelector;
|
|
|
51
51
|
export declare const reviewPrompt: (task: string, diff: string) => string;
|
|
52
52
|
export declare const fixPrompt: (result: ReviewResult) => string;
|
|
53
53
|
export declare const mergeReviewResults: (results: ReadonlyArray<ReviewResult>) => ReviewResult;
|
|
54
|
-
export declare const lintCommand: (process: ProcessExecutorShape, events: FlowEventsShape, command: readonly string[], workDir: string) => Effect.Effect<ReviewResult, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
54
|
+
export declare const lintCommand: (process: ProcessExecutorShape, events: FlowEventsShape, command: readonly string[], workDir: string) => Effect.Effect<ReviewResult, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
55
55
|
export interface ReviewAndFixOptions {
|
|
56
56
|
readonly reviewers: ReadonlyArray<Reviewer>;
|
|
57
57
|
readonly reviewerService: LlmServiceShape;
|
|
@@ -66,6 +66,6 @@ export interface ReviewAndFixOptions {
|
|
|
66
66
|
readonly parallelism?: number;
|
|
67
67
|
readonly format?: Effect.Effect<void, FlowError>;
|
|
68
68
|
}
|
|
69
|
-
export declare const reviewAndFixLoop: (options: ReviewAndFixOptions) => Effect.Effect<ReviewResult, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, never>;
|
|
69
|
+
export declare const reviewAndFixLoop: (options: ReviewAndFixOptions) => Effect.Effect<ReviewResult, import("./FlowError.ts").PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | ProcessError | FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, never>;
|
|
70
70
|
export {};
|
|
71
71
|
//# sourceMappingURL=Review.d.ts.map
|
package/dist/Review.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../src/Review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAGxE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAqB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC9F,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGxC,eAAO,MAAM,QAAQ,2DAAmD,CAAA;AACxE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;;;;;;;;;;AAE3C,qBAAa,WAAY,SAAQ,gBAc/B;CAAG;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAMhC;IACA,IAAI,OAAO,IAAI,OAAO,CAErB;CACF;AAED,eAAO,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AQ,CAAC,EAAE,gBAAgB,CAAA;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;CACjD;AA6BD,eAAO,MAAM,gBAAgB,iiBAkE3B,CAAA"}
|
package/dist/ReviewCache.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import * as Effect from "effect/Effect";
|
|
|
2
2
|
import { PersistenceError } from "./FlowError.ts";
|
|
3
3
|
import type { PlainFileStoreShape } from "./Persistence.ts";
|
|
4
4
|
import { ReviewResult } from "./Review.ts";
|
|
5
|
-
export declare const cachedReview: <R>(files: PlainFileStoreShape, path: string, fingerprint: string, evaluate: Effect.Effect<ReviewResult, PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, R>) => Effect.Effect<ReviewResult, PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").BudgetExceeded, R>;
|
|
5
|
+
export declare const cachedReview: <R>(files: PlainFileStoreShape, path: string, fingerprint: string, evaluate: Effect.Effect<ReviewResult, PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, R>) => Effect.Effect<ReviewResult, PersistenceError | import("./FlowError.ts").PlanParseError | import("./FlowError.ts").UnsupportedSchemaVersion | import("./FlowError.ts").WorkspacePathError | import("./FlowError.ts").WorkspaceLimitError | import("./FlowError.ts").WorkspaceIoError | import("./FlowError.ts").FlowAborted | import("./FlowError.ts").ProcessError | import("./FlowError.ts").FlowLlmError | import("./FlowError.ts").FlowCapabilityDenied | import("./FlowError.ts").ColumnNotFound | import("./FlowError.ts").BudgetExceeded, R>;
|
|
6
6
|
//# sourceMappingURL=ReviewCache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewCache.d.ts","sourceRoot":"","sources":["../src/ReviewCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAkB,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa1C,eAAO,MAAM,YAAY,GAA2D,CAAC,
|
|
1
|
+
{"version":3,"file":"ReviewCache.d.ts","sourceRoot":"","sources":["../src/ReviewCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAkB,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa1C,eAAO,MAAM,YAAY,GAA2D,CAAC,onCA2BnF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llm4ts/flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Effect-native LLM workflow, persistence, review, and repository automation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
"./Activity": "./dist/Activity.js",
|
|
18
18
|
"./AzureDevOpsTool": "./dist/AzureDevOpsTool.js",
|
|
19
|
+
"./BasecampTool": "./dist/BasecampTool.js",
|
|
19
20
|
"./Bench": "./dist/Bench.js",
|
|
20
21
|
"./BenchReport": "./dist/BenchReport.js",
|
|
21
22
|
"./CapabilityGuard": "./dist/CapabilityGuard.js",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"typescript"
|
|
81
82
|
],
|
|
82
83
|
"dependencies": {
|
|
83
|
-
"@llm4ts/core": "0.
|
|
84
|
+
"@llm4ts/core": "0.8.1"
|
|
84
85
|
},
|
|
85
86
|
"peerDependencies": {
|
|
86
87
|
"effect": "^4.0.0-beta.102"
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect"
|
|
2
|
+
import * as Ref from "effect/Ref"
|
|
3
|
+
import * as Schema from "effect/Schema"
|
|
4
|
+
import { Capabilities } from "@llm4ts/core/Capability"
|
|
5
|
+
import type { ProcessExecutorShape, ProcessResult } from "@llm4ts/core/ProcessExecutor"
|
|
6
|
+
import { ColumnNotFound, ProcessError, type FlowError } from "./FlowError.ts"
|
|
7
|
+
import type { FlowEventsShape } from "./FlowEvents.ts"
|
|
8
|
+
import { guarded } from "./CapabilityGuard.ts"
|
|
9
|
+
|
|
10
|
+
// One tool instance operates one board. `cardTable` is only needed when the
|
|
11
|
+
// project has more than one card table (the CLI resolves the single one).
|
|
12
|
+
export class BasecampProjectRef extends Schema.Class<BasecampProjectRef>("BasecampProjectRef")({
|
|
13
|
+
project: Schema.String,
|
|
14
|
+
cardTable: Schema.optionalKey(Schema.String)
|
|
15
|
+
}) {}
|
|
16
|
+
|
|
17
|
+
export class Column extends Schema.Class<Column>("Column")({
|
|
18
|
+
id: Schema.Int,
|
|
19
|
+
title: Schema.String
|
|
20
|
+
}) {}
|
|
21
|
+
|
|
22
|
+
// Basecamp bodies are rich-text HTML, never Markdown — the field names say so.
|
|
23
|
+
export class Card extends Schema.Class<Card>("Card")({
|
|
24
|
+
id: Schema.Int,
|
|
25
|
+
title: Schema.String,
|
|
26
|
+
contentHtml: Schema.String,
|
|
27
|
+
column: Column,
|
|
28
|
+
assignees: Schema.Array(Schema.String),
|
|
29
|
+
commentsCount: Schema.Int,
|
|
30
|
+
updatedAt: Schema.String,
|
|
31
|
+
url: Schema.String
|
|
32
|
+
}) {}
|
|
33
|
+
|
|
34
|
+
export class CardComment extends Schema.Class<CardComment>("CardComment")({
|
|
35
|
+
id: Schema.Int,
|
|
36
|
+
author: Schema.String,
|
|
37
|
+
contentHtml: Schema.String,
|
|
38
|
+
createdAt: Schema.String
|
|
39
|
+
}) {}
|
|
40
|
+
|
|
41
|
+
export class CardStep extends Schema.Class<CardStep>("CardStep")({
|
|
42
|
+
id: Schema.Int,
|
|
43
|
+
title: Schema.String,
|
|
44
|
+
completed: Schema.Boolean
|
|
45
|
+
}) {}
|
|
46
|
+
|
|
47
|
+
const projectFlags = (board: BasecampProjectRef): ReadonlyArray<string> => [
|
|
48
|
+
"--project",
|
|
49
|
+
board.project,
|
|
50
|
+
...(board.cardTable === undefined ? [] : ["--card-table", board.cardTable])
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
const jsonFlags = ["--json", "--quiet"]
|
|
54
|
+
|
|
55
|
+
export const cardColumnsArgs = (board: BasecampProjectRef): ReadonlyArray<string> => [
|
|
56
|
+
"cards",
|
|
57
|
+
"columns",
|
|
58
|
+
...projectFlags(board),
|
|
59
|
+
...jsonFlags
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
export const cardListArgs = (board: BasecampProjectRef, column: Column): ReadonlyArray<string> => [
|
|
63
|
+
"cards",
|
|
64
|
+
"list",
|
|
65
|
+
"--column",
|
|
66
|
+
String(column.id),
|
|
67
|
+
"--all",
|
|
68
|
+
...projectFlags(board),
|
|
69
|
+
...jsonFlags
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
export const cardShowArgs = (board: BasecampProjectRef, cardId: number): ReadonlyArray<string> => [
|
|
73
|
+
"cards",
|
|
74
|
+
"show",
|
|
75
|
+
String(cardId),
|
|
76
|
+
...projectFlags(board),
|
|
77
|
+
...jsonFlags
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
export const cardMoveArgs = (
|
|
81
|
+
board: BasecampProjectRef,
|
|
82
|
+
cardId: number,
|
|
83
|
+
column: Column
|
|
84
|
+
): ReadonlyArray<string> => [
|
|
85
|
+
"cards",
|
|
86
|
+
"move",
|
|
87
|
+
String(cardId),
|
|
88
|
+
"--to",
|
|
89
|
+
String(column.id),
|
|
90
|
+
...projectFlags(board),
|
|
91
|
+
"--quiet"
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
export const cardCreateArgs = (
|
|
95
|
+
board: BasecampProjectRef,
|
|
96
|
+
column: Column,
|
|
97
|
+
title: string,
|
|
98
|
+
content: string,
|
|
99
|
+
assignee?: string
|
|
100
|
+
): ReadonlyArray<string> => [
|
|
101
|
+
"cards",
|
|
102
|
+
"create",
|
|
103
|
+
title,
|
|
104
|
+
content,
|
|
105
|
+
"--column",
|
|
106
|
+
String(column.id),
|
|
107
|
+
...(assignee === undefined ? [] : ["--assignee", assignee]),
|
|
108
|
+
...projectFlags(board),
|
|
109
|
+
...jsonFlags
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
export const cardAssignArgs = (
|
|
113
|
+
board: BasecampProjectRef,
|
|
114
|
+
cardId: number,
|
|
115
|
+
assignee: string
|
|
116
|
+
): ReadonlyArray<string> => [
|
|
117
|
+
"cards",
|
|
118
|
+
"update",
|
|
119
|
+
String(cardId),
|
|
120
|
+
"--assignee",
|
|
121
|
+
assignee,
|
|
122
|
+
...projectFlags(board),
|
|
123
|
+
"--quiet"
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
// Comments hang off the card alone; `basecamp comments` rejects --project.
|
|
127
|
+
export const cardCommentsArgs = (cardId: number): ReadonlyArray<string> => [
|
|
128
|
+
"comments",
|
|
129
|
+
"list",
|
|
130
|
+
String(cardId),
|
|
131
|
+
"--all",
|
|
132
|
+
...jsonFlags
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
export const cardCommentCreateArgs = (cardId: number, body: string): ReadonlyArray<string> => [
|
|
136
|
+
"comments",
|
|
137
|
+
"create",
|
|
138
|
+
String(cardId),
|
|
139
|
+
body,
|
|
140
|
+
"--quiet"
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
export const cardStepsArgs = (board: BasecampProjectRef, cardId: number): ReadonlyArray<string> => [
|
|
144
|
+
"cards",
|
|
145
|
+
"steps",
|
|
146
|
+
String(cardId),
|
|
147
|
+
...projectFlags(board),
|
|
148
|
+
...jsonFlags
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
export const cardStepCompleteArgs = (
|
|
152
|
+
board: BasecampProjectRef,
|
|
153
|
+
stepId: number
|
|
154
|
+
): ReadonlyArray<string> => [
|
|
155
|
+
"cards",
|
|
156
|
+
"step",
|
|
157
|
+
"complete",
|
|
158
|
+
String(stepId),
|
|
159
|
+
...projectFlags(board),
|
|
160
|
+
"--quiet"
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
const decodeJson = <A, S extends Schema.Codec<A, string>>(
|
|
164
|
+
operation: string,
|
|
165
|
+
schema: S,
|
|
166
|
+
json: string
|
|
167
|
+
): Effect.Effect<S["Type"], ProcessError> =>
|
|
168
|
+
Schema.decodeUnknownEffect(schema)(json).pipe(
|
|
169
|
+
Effect.mapError((error) =>
|
|
170
|
+
ProcessError.make({
|
|
171
|
+
message: operation,
|
|
172
|
+
detail: String(error)
|
|
173
|
+
})
|
|
174
|
+
)
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
const columnStruct = Schema.Struct({
|
|
178
|
+
id: Schema.Int,
|
|
179
|
+
title: Schema.String
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
// The CLI prints `null` (not `[]`) for every empty listing — columns,
|
|
183
|
+
// cards in a column, comments — so all list decoders tolerate it.
|
|
184
|
+
export const parseColumns = (json: string): Effect.Effect<ReadonlyArray<Column>, ProcessError> =>
|
|
185
|
+
decodeJson(
|
|
186
|
+
"basecamp parse columns",
|
|
187
|
+
Schema.fromJsonString(Schema.NullOr(Schema.Array(columnStruct))),
|
|
188
|
+
json
|
|
189
|
+
).pipe(Effect.map((columns) => (columns ?? []).map((column) => Column.make(column))))
|
|
190
|
+
|
|
191
|
+
const cardStruct = Schema.Struct({
|
|
192
|
+
id: Schema.Int,
|
|
193
|
+
title: Schema.String,
|
|
194
|
+
content: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
195
|
+
parent: columnStruct,
|
|
196
|
+
assignees: Schema.optionalKey(
|
|
197
|
+
Schema.NullOr(Schema.Array(Schema.Struct({ name: Schema.String })))
|
|
198
|
+
),
|
|
199
|
+
comments_count: Schema.optionalKey(Schema.NullOr(Schema.Int)),
|
|
200
|
+
updated_at: Schema.String,
|
|
201
|
+
app_url: Schema.String
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
const toCard = (item: typeof cardStruct.Type): Card =>
|
|
205
|
+
Card.make({
|
|
206
|
+
id: item.id,
|
|
207
|
+
title: item.title,
|
|
208
|
+
contentHtml: item.content ?? "",
|
|
209
|
+
column: Column.make(item.parent),
|
|
210
|
+
assignees: (item.assignees ?? []).map((assignee) => assignee.name),
|
|
211
|
+
commentsCount: item.comments_count ?? 0,
|
|
212
|
+
updatedAt: item.updated_at,
|
|
213
|
+
url: item.app_url
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
export const parseCard = (json: string): Effect.Effect<Card, ProcessError> =>
|
|
217
|
+
decodeJson("basecamp parse card", Schema.fromJsonString(cardStruct), json).pipe(
|
|
218
|
+
Effect.map(toCard)
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
export const parseCards = (json: string): Effect.Effect<ReadonlyArray<Card>, ProcessError> =>
|
|
222
|
+
decodeJson(
|
|
223
|
+
"basecamp parse cards",
|
|
224
|
+
Schema.fromJsonString(Schema.NullOr(Schema.Array(cardStruct))),
|
|
225
|
+
json
|
|
226
|
+
).pipe(Effect.map((items) => (items ?? []).map(toCard)))
|
|
227
|
+
|
|
228
|
+
const commentStruct = Schema.Struct({
|
|
229
|
+
id: Schema.Int,
|
|
230
|
+
content: Schema.String,
|
|
231
|
+
creator: Schema.Struct({ name: Schema.String }),
|
|
232
|
+
created_at: Schema.String
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
export const parseCardComments = (
|
|
236
|
+
json: string
|
|
237
|
+
): Effect.Effect<ReadonlyArray<CardComment>, ProcessError> =>
|
|
238
|
+
decodeJson(
|
|
239
|
+
"basecamp parse comments",
|
|
240
|
+
Schema.fromJsonString(Schema.NullOr(Schema.Array(commentStruct))),
|
|
241
|
+
json
|
|
242
|
+
).pipe(
|
|
243
|
+
Effect.map((comments) =>
|
|
244
|
+
(comments ?? []).map((comment) =>
|
|
245
|
+
CardComment.make({
|
|
246
|
+
id: comment.id,
|
|
247
|
+
author: comment.creator.name,
|
|
248
|
+
contentHtml: comment.content,
|
|
249
|
+
createdAt: comment.created_at
|
|
250
|
+
})
|
|
251
|
+
)
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
const stepStruct = Schema.Struct({
|
|
256
|
+
id: Schema.Int,
|
|
257
|
+
title: Schema.String,
|
|
258
|
+
completed: Schema.Boolean
|
|
259
|
+
})
|
|
260
|
+
|
|
261
|
+
// A card without steps prints `null`, not `[]`.
|
|
262
|
+
export const parseCardSteps = (
|
|
263
|
+
json: string
|
|
264
|
+
): Effect.Effect<ReadonlyArray<CardStep>, ProcessError> =>
|
|
265
|
+
decodeJson(
|
|
266
|
+
"basecamp parse steps",
|
|
267
|
+
Schema.fromJsonString(Schema.NullOr(Schema.Array(stepStruct))),
|
|
268
|
+
json
|
|
269
|
+
).pipe(Effect.map((steps) => (steps ?? []).map((step) => CardStep.make(step))))
|
|
270
|
+
|
|
271
|
+
export interface BasecampToolShape {
|
|
272
|
+
readonly listColumns: Effect.Effect<ReadonlyArray<Column>, FlowError>
|
|
273
|
+
readonly resolveColumn: (title: string) => Effect.Effect<Column, FlowError>
|
|
274
|
+
readonly listCards: (column: Column) => Effect.Effect<ReadonlyArray<Card>, FlowError>
|
|
275
|
+
readonly readCard: (cardId: number) => Effect.Effect<Card, FlowError>
|
|
276
|
+
readonly moveCard: (cardId: number, column: Column) => Effect.Effect<void, FlowError>
|
|
277
|
+
readonly createCard: (
|
|
278
|
+
column: Column,
|
|
279
|
+
title: string,
|
|
280
|
+
content: string,
|
|
281
|
+
assignee?: string
|
|
282
|
+
) => Effect.Effect<Card, FlowError>
|
|
283
|
+
readonly assignCard: (cardId: number, assignee: string) => Effect.Effect<void, FlowError>
|
|
284
|
+
readonly readCardComments: (
|
|
285
|
+
cardId: number
|
|
286
|
+
) => Effect.Effect<ReadonlyArray<CardComment>, FlowError>
|
|
287
|
+
readonly writeCardComment: (cardId: number, body: string) => Effect.Effect<void, FlowError>
|
|
288
|
+
readonly listSteps: (cardId: number) => Effect.Effect<ReadonlyArray<CardStep>, FlowError>
|
|
289
|
+
readonly completeStep: (stepId: number) => Effect.Effect<void, FlowError>
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const output = (result: ProcessResult): string => result.stdout.join("\n").trim()
|
|
293
|
+
|
|
294
|
+
export const makeBasecampTool = Effect.fn("@llm4ts/flow/BasecampTool.make")(function* (
|
|
295
|
+
process: ProcessExecutorShape,
|
|
296
|
+
workDir: string,
|
|
297
|
+
events: FlowEventsShape,
|
|
298
|
+
board: BasecampProjectRef
|
|
299
|
+
): Effect.fn.Return<BasecampToolShape> {
|
|
300
|
+
const columnsCache = yield* Ref.make<ReadonlyArray<Column> | undefined>(undefined)
|
|
301
|
+
|
|
302
|
+
const run = (args: ReadonlyArray<string>): Effect.Effect<ProcessResult, FlowError> =>
|
|
303
|
+
process.run(["basecamp", ...args], workDir, {}).pipe(
|
|
304
|
+
Effect.mapError((error) =>
|
|
305
|
+
ProcessError.make({
|
|
306
|
+
message: `basecamp ${args.join(" ")}`,
|
|
307
|
+
detail: error.message
|
|
308
|
+
})
|
|
309
|
+
),
|
|
310
|
+
Effect.flatMap((result) =>
|
|
311
|
+
result.exitCode === 0
|
|
312
|
+
? Effect.succeed(result)
|
|
313
|
+
: Effect.fail(
|
|
314
|
+
ProcessError.make({
|
|
315
|
+
message: `basecamp ${args.join(" ")}`,
|
|
316
|
+
detail:
|
|
317
|
+
[...result.stdout, ...result.stderr].join("\n").trim() ||
|
|
318
|
+
`exit code ${result.exitCode}`
|
|
319
|
+
})
|
|
320
|
+
)
|
|
321
|
+
)
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
const read = <A>(
|
|
325
|
+
operation: string,
|
|
326
|
+
effect: Effect.Effect<A, FlowError>
|
|
327
|
+
): Effect.Effect<A, FlowError> => guarded(Capabilities.BasecampRead, operation, events, effect)
|
|
328
|
+
const write = <A>(
|
|
329
|
+
operation: string,
|
|
330
|
+
effect: Effect.Effect<A, FlowError>
|
|
331
|
+
): Effect.Effect<A, FlowError> => guarded(Capabilities.BasecampWrite, operation, events, effect)
|
|
332
|
+
|
|
333
|
+
// The board's columns barely change within a tool's lifetime; fetch once.
|
|
334
|
+
const cachedColumns: Effect.Effect<ReadonlyArray<Column>, FlowError> = Ref.get(columnsCache).pipe(
|
|
335
|
+
Effect.flatMap((cached) =>
|
|
336
|
+
cached !== undefined
|
|
337
|
+
? Effect.succeed(cached)
|
|
338
|
+
: run(cardColumnsArgs(board)).pipe(
|
|
339
|
+
Effect.flatMap((result) => parseColumns(output(result))),
|
|
340
|
+
Effect.tap((columns) => Ref.set(columnsCache, columns))
|
|
341
|
+
)
|
|
342
|
+
)
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
listColumns: read("basecamp cards columns", cachedColumns),
|
|
347
|
+
resolveColumn: (title) =>
|
|
348
|
+
read(
|
|
349
|
+
"basecamp cards columns",
|
|
350
|
+
cachedColumns.pipe(
|
|
351
|
+
Effect.flatMap((columns) => {
|
|
352
|
+
const match = columns.find(
|
|
353
|
+
(column) => column.title.toLowerCase() === title.toLowerCase()
|
|
354
|
+
)
|
|
355
|
+
return match !== undefined
|
|
356
|
+
? Effect.succeed(match)
|
|
357
|
+
: Effect.fail(
|
|
358
|
+
ColumnNotFound.make({
|
|
359
|
+
title,
|
|
360
|
+
available: columns.map((column) => column.title)
|
|
361
|
+
})
|
|
362
|
+
)
|
|
363
|
+
})
|
|
364
|
+
)
|
|
365
|
+
),
|
|
366
|
+
listCards: (column) =>
|
|
367
|
+
read(
|
|
368
|
+
"basecamp cards list",
|
|
369
|
+
run(cardListArgs(board, column)).pipe(
|
|
370
|
+
Effect.flatMap((result) => parseCards(output(result)))
|
|
371
|
+
)
|
|
372
|
+
),
|
|
373
|
+
readCard: (cardId) =>
|
|
374
|
+
read(
|
|
375
|
+
"basecamp cards show",
|
|
376
|
+
run(cardShowArgs(board, cardId)).pipe(Effect.flatMap((result) => parseCard(output(result))))
|
|
377
|
+
),
|
|
378
|
+
moveCard: (cardId, column) =>
|
|
379
|
+
write("basecamp cards move", run(cardMoveArgs(board, cardId, column)).pipe(Effect.asVoid)),
|
|
380
|
+
createCard: (column, title, content, assignee) =>
|
|
381
|
+
write(
|
|
382
|
+
"basecamp cards create",
|
|
383
|
+
run(cardCreateArgs(board, column, title, content, assignee)).pipe(
|
|
384
|
+
Effect.flatMap((result) => parseCard(output(result)))
|
|
385
|
+
)
|
|
386
|
+
),
|
|
387
|
+
assignCard: (cardId, assignee) =>
|
|
388
|
+
write(
|
|
389
|
+
"basecamp cards update",
|
|
390
|
+
run(cardAssignArgs(board, cardId, assignee)).pipe(Effect.asVoid)
|
|
391
|
+
),
|
|
392
|
+
readCardComments: (cardId) =>
|
|
393
|
+
read(
|
|
394
|
+
"basecamp comments list",
|
|
395
|
+
run(cardCommentsArgs(cardId)).pipe(
|
|
396
|
+
Effect.flatMap((result) => parseCardComments(output(result)))
|
|
397
|
+
)
|
|
398
|
+
),
|
|
399
|
+
writeCardComment: (cardId, body) =>
|
|
400
|
+
write(
|
|
401
|
+
"basecamp comments create",
|
|
402
|
+
run(cardCommentCreateArgs(cardId, body)).pipe(Effect.asVoid)
|
|
403
|
+
),
|
|
404
|
+
listSteps: (cardId) =>
|
|
405
|
+
read(
|
|
406
|
+
"basecamp cards steps",
|
|
407
|
+
run(cardStepsArgs(board, cardId)).pipe(
|
|
408
|
+
Effect.flatMap((result) => parseCardSteps(output(result)))
|
|
409
|
+
)
|
|
410
|
+
),
|
|
411
|
+
completeStep: (stepId) =>
|
|
412
|
+
write(
|
|
413
|
+
"basecamp cards step complete",
|
|
414
|
+
run(cardStepCompleteArgs(board, stepId)).pipe(Effect.asVoid)
|
|
415
|
+
)
|
|
416
|
+
}
|
|
417
|
+
})
|
package/src/FlowError.ts
CHANGED
|
@@ -105,6 +105,15 @@ export class FlowCapabilityDenied extends Schema.TaggedErrorClass<FlowCapability
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
export class ColumnNotFound extends Schema.TaggedErrorClass<ColumnNotFound>()("ColumnNotFound", {
|
|
109
|
+
title: Schema.String,
|
|
110
|
+
available: Schema.Array(Schema.String)
|
|
111
|
+
}) {
|
|
112
|
+
get message(): string {
|
|
113
|
+
return `column "${this.title}" not found on the card table; available: ${this.available.join(", ")}`
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
108
117
|
export class BudgetExceeded extends Schema.TaggedErrorClass<BudgetExceeded>()("BudgetExceeded", {
|
|
109
118
|
metric: Schema.Literals(["tokens", "costUsd"]),
|
|
110
119
|
limit: Schema.Number,
|
|
@@ -126,6 +135,7 @@ export const FlowError = Schema.Union([
|
|
|
126
135
|
ProcessError,
|
|
127
136
|
FlowLlmError,
|
|
128
137
|
FlowCapabilityDenied,
|
|
138
|
+
ColumnNotFound,
|
|
129
139
|
BudgetExceeded
|
|
130
140
|
])
|
|
131
141
|
export type FlowError = typeof FlowError.Type
|