@amykit/agent-kit 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HarnessAgent.d.ts +40 -3
- package/dist/HarnessAgent.d.ts.map +1 -1
- package/dist/HarnessAgent.js +113 -13
- package/dist/HarnessAgent.js.map +1 -1
- package/dist/collection.d.ts +1 -1
- package/dist/collection.d.ts.map +1 -1
- package/package.json +2 -3
package/dist/HarnessAgent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentResult, Git, Harness, ReviewThread } from "@amykit/core";
|
|
2
|
-
import { Agent, AttemptOutcome, ThreadVerdict, Ticket, TriageOutcome } from "@amykit/
|
|
2
|
+
import { Agent, AttemptOutcome, ThreadVerdict, Ticket, TriageOutcome } from "@amykit/core";
|
|
3
3
|
export interface HarnessAgentConfig {
|
|
4
4
|
/**
|
|
5
5
|
* Extra guidance to append when answering a particular reviewer, keyed by
|
|
@@ -28,11 +28,48 @@ export declare class HarnessAgent implements Agent {
|
|
|
28
28
|
private readonly git;
|
|
29
29
|
private readonly config;
|
|
30
30
|
constructor(harness: Harness, git: Git, config?: HarnessAgentConfig);
|
|
31
|
-
triage(ticket: Ticket): Promise<AgentResult<TriageOutcome>>;
|
|
32
|
-
implement(ticket: Ticket, retryContext?: string): Promise<AgentResult<AttemptOutcome>>;
|
|
31
|
+
triage(ticket: Ticket, conversation?: readonly string[]): Promise<AgentResult<TriageOutcome>>;
|
|
32
|
+
implement(ticket: Ticket, retryContext?: string, conversation?: readonly string[]): Promise<AgentResult<AttemptOutcome>>;
|
|
33
33
|
addressThreads(ticket: Ticket, threads: readonly ReviewThread[], from: "automated" | "human"): Promise<AgentResult<ThreadVerdict[]>>;
|
|
34
34
|
private threadPrompt;
|
|
35
35
|
private ask;
|
|
36
|
+
/**
|
|
37
|
+
* The current brief the ticket's work belongs to, when it has one.
|
|
38
|
+
*
|
|
39
|
+
* Rendered rather than referenced: a brief is the revisable statement of
|
|
40
|
+
* the feature, and what a step must judge is what it says *now*, not a link
|
|
41
|
+
* that says "see elsewhere". A ticket with no brief carries none, and every
|
|
42
|
+
* prompt built from it is unchanged — that is the compatibility rule.
|
|
43
|
+
*/
|
|
44
|
+
private briefLines;
|
|
45
|
+
/**
|
|
46
|
+
* The ticket's body, in the prompt, where the work can be judged by it.
|
|
47
|
+
*
|
|
48
|
+
* A ticket with no body says so rather than looking truncated: the absent
|
|
49
|
+
* line is the difference between an agent that asks for the description
|
|
50
|
+
* and one that guesses there was nothing to know.
|
|
51
|
+
*/
|
|
52
|
+
private bodyLines;
|
|
53
|
+
/**
|
|
54
|
+
* What the team says this ticket *is*, beside the body it says it with.
|
|
55
|
+
*
|
|
56
|
+
* A label is the tracker's fact, not the caller's — an epic labelled
|
|
57
|
+
* `Feature` is not work to implement, and its sub-issues are. Naming them
|
|
58
|
+
* here is what lets a step that judges the ticket see the label instead of
|
|
59
|
+
* guessing it; a ticket with none says nothing, because most carry none.
|
|
60
|
+
*/
|
|
61
|
+
private labelLines;
|
|
62
|
+
/**
|
|
63
|
+
* The conversation on the ticket, split by who wrote it.
|
|
64
|
+
*
|
|
65
|
+
* What amy asked is labelled as its own, so the agent reads its words as a
|
|
66
|
+
* question already put rather than as new information, and does not ask it
|
|
67
|
+
* twice. An answer from somebody is the answer to an earlier question, and
|
|
68
|
+
* carries their name, because an unattributed sentence is not a
|
|
69
|
+
* conversation. Nothing here is no conversation at all: most tickets have
|
|
70
|
+
* never been asked anything.
|
|
71
|
+
*/
|
|
72
|
+
private conversationLines;
|
|
36
73
|
/** The prompt, addressed to a skill when one was named. */
|
|
37
74
|
private invoke;
|
|
38
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HarnessAgent.d.ts","sourceRoot":"","sources":["../src/HarnessAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAgB,YAAY,EAAE,MA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C,OAAO,CAAC,YAAY;YAoDN,GAAG;IAWjB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAalB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IAIjB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAMlB;;;;;;;;;OASG;IACH,OAAO,CAAC,iBAAiB;IAMzB,2DAA2D;IAC3D,OAAO,CAAC,MAAM;CAGf"}
|
package/dist/HarnessAgent.js
CHANGED
|
@@ -16,14 +16,17 @@ export class HarnessAgent {
|
|
|
16
16
|
this.git = git;
|
|
17
17
|
this.config = config;
|
|
18
18
|
}
|
|
19
|
-
async triage(ticket) {
|
|
19
|
+
async triage(ticket, conversation) {
|
|
20
20
|
const reply = await this.ask(ticket, [
|
|
21
21
|
`You are deciding whether a ticket can be implemented as written.`,
|
|
22
22
|
``,
|
|
23
23
|
`Ticket ${ticket.id}: ${ticket.title}`,
|
|
24
24
|
`Tracker: ${ticket.url}`,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
...this.briefLines(ticket),
|
|
26
|
+
...this.bodyLines(ticket),
|
|
27
|
+
...this.labelLines(ticket),
|
|
28
|
+
...this.conversationLines(conversation),
|
|
29
|
+
`Read enough of this repository to judge it. Answer with a`,
|
|
27
30
|
`single JSON object and nothing else:`,
|
|
28
31
|
``,
|
|
29
32
|
`{"clear": true}`,
|
|
@@ -34,6 +37,8 @@ export class HarnessAgent {
|
|
|
34
37
|
``,
|
|
35
38
|
`listing only questions that genuinely block the work. A question you`,
|
|
36
39
|
`could answer yourself by reading the code is not a blocking question.`,
|
|
40
|
+
`A question already answered in the conversation above is not a`,
|
|
41
|
+
`question: an answer to an earlier question is part of the ticket.`,
|
|
37
42
|
].join("\n"));
|
|
38
43
|
// A run that did not complete has no answer to parse, and this returns
|
|
39
44
|
// rather than throwing so that a relay above can read the cause and try
|
|
@@ -41,25 +46,41 @@ export class HarnessAgent {
|
|
|
41
46
|
// when it is needed. Nothing consumes this value: an agent action whose
|
|
42
47
|
// run did not complete is failed by the engine.
|
|
43
48
|
if (reply.run.outcome !== "completed") {
|
|
44
|
-
return {
|
|
49
|
+
return {
|
|
50
|
+
value: {
|
|
51
|
+
clear: false,
|
|
52
|
+
questions: [],
|
|
53
|
+
askedQuestions: [],
|
|
54
|
+
at: new Date().toISOString(),
|
|
55
|
+
},
|
|
56
|
+
run: reply.run,
|
|
57
|
+
};
|
|
45
58
|
}
|
|
46
59
|
const answer = extractJson(reply.text);
|
|
47
60
|
return {
|
|
48
61
|
value: {
|
|
49
62
|
clear: answer.clear,
|
|
50
63
|
questions: answer.clear ? [] : (answer.questions ?? []),
|
|
64
|
+
// Recorded so the next look can tell its own words from new
|
|
65
|
+
// information, and so a question that was answered is never asked
|
|
66
|
+
// again.
|
|
67
|
+
askedQuestions: answer.clear ? [] : (answer.questions ?? []),
|
|
51
68
|
at: new Date().toISOString(),
|
|
52
69
|
},
|
|
53
70
|
run: reply.run,
|
|
54
71
|
};
|
|
55
72
|
}
|
|
56
|
-
async implement(ticket, retryContext) {
|
|
57
|
-
await this.git.prepareBranch(ticket.repo, ticket.branchName);
|
|
73
|
+
async implement(ticket, retryContext, conversation) {
|
|
74
|
+
await this.git.prepareBranch(ticket.repo, ticket.branchName, ticket.id);
|
|
58
75
|
const reply = await this.ask(ticket, [
|
|
59
76
|
`Implement this ticket in the current repository.`,
|
|
60
77
|
``,
|
|
61
78
|
`Ticket ${ticket.id}: ${ticket.title}`,
|
|
62
79
|
`Tracker: ${ticket.url}`,
|
|
80
|
+
...this.briefLines(ticket),
|
|
81
|
+
...this.bodyLines(ticket),
|
|
82
|
+
...this.labelLines(ticket),
|
|
83
|
+
...this.conversationLines(conversation),
|
|
63
84
|
...(retryContext
|
|
64
85
|
? [
|
|
65
86
|
``,
|
|
@@ -78,7 +99,7 @@ export class HarnessAgent {
|
|
|
78
99
|
if (reply.run.outcome !== "completed") {
|
|
79
100
|
return { value: { ok: false, output: reply.run.output, at }, run: reply.run };
|
|
80
101
|
}
|
|
81
|
-
const pushed = await this.git.commitAndPush(ticket.repo, ticket.branchName, `${ticket.id}: ${ticket.title}
|
|
102
|
+
const pushed = await this.git.commitAndPush(ticket.repo, ticket.branchName, `${ticket.id}: ${ticket.title}`, ticket.id);
|
|
82
103
|
if (!pushed) {
|
|
83
104
|
// The harness exited cleanly and changed nothing. For a ticket that
|
|
84
105
|
// asked for work, that is a failure worth reporting rather than a
|
|
@@ -95,7 +116,7 @@ export class HarnessAgent {
|
|
|
95
116
|
return { value: { ok: true, output: reply.run.output, at }, run: reply.run };
|
|
96
117
|
}
|
|
97
118
|
async addressThreads(ticket, threads, from) {
|
|
98
|
-
await this.git.prepareBranch(ticket.repo, ticket.branchName);
|
|
119
|
+
await this.git.prepareBranch(ticket.repo, ticket.branchName, ticket.id);
|
|
99
120
|
const reply = await this.ask(ticket, this.threadPrompt(ticket, threads, from));
|
|
100
121
|
// Returned rather than thrown, for the same reason as in `triage`: the
|
|
101
122
|
// relay above decides whether another harness gets a turn, and it needs
|
|
@@ -117,7 +138,7 @@ export class HarnessAgent {
|
|
|
117
138
|
note: given?.note ?? "the agent did not answer this comment",
|
|
118
139
|
};
|
|
119
140
|
});
|
|
120
|
-
await this.git.commitAndPush(ticket.repo, ticket.branchName, `${ticket.id}: address review comments
|
|
141
|
+
await this.git.commitAndPush(ticket.repo, ticket.branchName, `${ticket.id}: address review comments`, ticket.id);
|
|
121
142
|
return { value: verdicts, run: reply.run };
|
|
122
143
|
}
|
|
123
144
|
threadPrompt(ticket, threads, from) {
|
|
@@ -132,11 +153,27 @@ export class HarnessAgent {
|
|
|
132
153
|
: `A human reviewer left comments on the pull request for this ticket.`,
|
|
133
154
|
``,
|
|
134
155
|
`Ticket ${ticket.id}: ${ticket.title}`,
|
|
135
|
-
|
|
156
|
+
...this.briefLines(ticket),
|
|
157
|
+
...this.bodyLines(ticket),
|
|
158
|
+
...this.labelLines(ticket),
|
|
136
159
|
`Comments:`,
|
|
137
|
-
...threads.
|
|
160
|
+
...threads.flatMap((thread) => [
|
|
161
|
+
`\n[${thread.id}] ${thread.author} said:\n${thread.body}`,
|
|
162
|
+
// A review is a conversation, not one comment: what follows the
|
|
163
|
+
// opening comment is a correction of it or an answer to it. The
|
|
164
|
+
// first comment is the header above, so the bullets carry only what
|
|
165
|
+
// came after it, oldest first — the last one says who is being
|
|
166
|
+
// waited on.
|
|
167
|
+
...thread.comments
|
|
168
|
+
.slice(1)
|
|
169
|
+
.map((comment) => ` - ${comment.author} replied:\n${comment.body}`),
|
|
170
|
+
]),
|
|
138
171
|
...(hints.length ? [``, `Reviewer notes:`, ...hints.map((hint) => `- ${hint}`)] : []),
|
|
139
172
|
``,
|
|
173
|
+
`A later comment in a thread answers the earlier ones, and the last`,
|
|
174
|
+
`comment says who the thread is waiting on. Answer the thread as it`,
|
|
175
|
+
`stands now, not as its first comment left it.`,
|
|
176
|
+
``,
|
|
140
177
|
`For each comment, either change the code or say why you disagree. Do not`,
|
|
141
178
|
`argue on the pull request. Do not commit: that is handled for you.`,
|
|
142
179
|
``,
|
|
@@ -148,11 +185,74 @@ export class HarnessAgent {
|
|
|
148
185
|
`note. A disagreement goes to the ticket owner to settle, so be specific.`,
|
|
149
186
|
].join("\n");
|
|
150
187
|
}
|
|
151
|
-
ask(ticket, prompt) {
|
|
152
|
-
|
|
188
|
+
async ask(ticket, prompt) {
|
|
189
|
+
// The work happens where the work is: with a worktree port behind the
|
|
190
|
+
// Git, the path handed over is the ticket's own tree, so the agent —
|
|
191
|
+
// the gate beside it, and every git effect — never sees another item's
|
|
192
|
+
// tree or the standing checkout.
|
|
193
|
+
const cwd = await this.git.acquire(ticket.repo, ticket.id);
|
|
194
|
+
return this.harness.ask(this.invoke(prompt), cwd, {
|
|
153
195
|
workId: ticket.id,
|
|
154
196
|
});
|
|
155
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* The current brief the ticket's work belongs to, when it has one.
|
|
200
|
+
*
|
|
201
|
+
* Rendered rather than referenced: a brief is the revisable statement of
|
|
202
|
+
* the feature, and what a step must judge is what it says *now*, not a link
|
|
203
|
+
* that says "see elsewhere". A ticket with no brief carries none, and every
|
|
204
|
+
* prompt built from it is unchanged — that is the compatibility rule.
|
|
205
|
+
*/
|
|
206
|
+
briefLines(ticket) {
|
|
207
|
+
if (!ticket.brief)
|
|
208
|
+
return [];
|
|
209
|
+
return [
|
|
210
|
+
`The current brief for the feature this ticket belongs to:`,
|
|
211
|
+
``,
|
|
212
|
+
ticket.brief,
|
|
213
|
+
``,
|
|
214
|
+
`Answer for the brief as it stands above, not for what the ticket`,
|
|
215
|
+
`title alone says.`,
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The ticket's body, in the prompt, where the work can be judged by it.
|
|
220
|
+
*
|
|
221
|
+
* A ticket with no body says so rather than looking truncated: the absent
|
|
222
|
+
* line is the difference between an agent that asks for the description
|
|
223
|
+
* and one that guesses there was nothing to know.
|
|
224
|
+
*/
|
|
225
|
+
bodyLines(ticket) {
|
|
226
|
+
return [``, ticket.body ?? `(this ticket has no description)`];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* What the team says this ticket *is*, beside the body it says it with.
|
|
230
|
+
*
|
|
231
|
+
* A label is the tracker's fact, not the caller's — an epic labelled
|
|
232
|
+
* `Feature` is not work to implement, and its sub-issues are. Naming them
|
|
233
|
+
* here is what lets a step that judges the ticket see the label instead of
|
|
234
|
+
* guessing it; a ticket with none says nothing, because most carry none.
|
|
235
|
+
*/
|
|
236
|
+
labelLines(ticket) {
|
|
237
|
+
if (ticket.labels.length === 0)
|
|
238
|
+
return [];
|
|
239
|
+
return [`Labels: ${ticket.labels.join(", ")}`];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The conversation on the ticket, split by who wrote it.
|
|
243
|
+
*
|
|
244
|
+
* What amy asked is labelled as its own, so the agent reads its words as a
|
|
245
|
+
* question already put rather than as new information, and does not ask it
|
|
246
|
+
* twice. An answer from somebody is the answer to an earlier question, and
|
|
247
|
+
* carries their name, because an unattributed sentence is not a
|
|
248
|
+
* conversation. Nothing here is no conversation at all: most tickets have
|
|
249
|
+
* never been asked anything.
|
|
250
|
+
*/
|
|
251
|
+
conversationLines(conversation) {
|
|
252
|
+
if (!conversation || conversation.length === 0)
|
|
253
|
+
return [];
|
|
254
|
+
return [``, `The conversation on the ticket, so far:`, ...conversation.map((line) => `- ${line}`)];
|
|
255
|
+
}
|
|
156
256
|
/** The prompt, addressed to a skill when one was named. */
|
|
157
257
|
invoke(prompt) {
|
|
158
258
|
return this.config.skill ? `/${this.config.skill}\n\n${prompt}` : prompt;
|
package/dist/HarnessAgent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HarnessAgent.js","sourceRoot":"","sources":["../src/HarnessAgent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA2BxC;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IAEJ;IACA;IACA;IAHnB,YACmB,OAAgB,EAChB,GAAQ,EACR,SAA6B,EAAE;QAF/B,YAAO,GAAP,OAAO,CAAS;QAChB,QAAG,GAAH,GAAG,CAAK;QACR,WAAM,GAAN,MAAM,CAAyB;IAC/C,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,MAAc;
|
|
1
|
+
{"version":3,"file":"HarnessAgent.js","sourceRoot":"","sources":["../src/HarnessAgent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA2BxC;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IAEJ;IACA;IACA;IAHnB,YACmB,OAAgB,EAChB,GAAQ,EACR,SAA6B,EAAE;QAF/B,YAAO,GAAP,OAAO,CAAS;QAChB,QAAG,GAAH,GAAG,CAAK;QACR,WAAM,GAAN,MAAM,CAAyB;IAC/C,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,YAAgC;QAC3D,MAAM,KA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AI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,2DAA2D;IACnD,MAAM,CAAC,MAAc;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,OAAO,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3E,CAAC;CACF"}
|
package/dist/collection.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Harness } from "@amykit/core";
|
|
2
|
-
import { Agent } from "@amykit/
|
|
2
|
+
import { Agent } from "@amykit/core";
|
|
3
3
|
import { Rung } from "./ladder.js";
|
|
4
4
|
/** The collection every harness plugin adds its ticket-shaped agents to. */
|
|
5
5
|
export declare const AGENT_COLLECTION = "agent";
|
package/dist/collection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC;CAC1C;AAED,0EAA0E;AAC1E,MAAM,WAAW,YAAa,SAAQ,IAAI;IACxC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amykit/agent-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "What every agent does the same way: the prompts, the git dance, and the JSON.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@amykit/core": "^0.
|
|
32
|
-
"@amykit/workflow-ticket-to-qa": "^0.3.1"
|
|
31
|
+
"@amykit/core": "^0.4.0"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
34
|
"@amykit/test-fixtures": "^0.1.0"
|