@rallycry/conveyor-agent 5.10.3 → 5.11.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.
|
@@ -572,6 +572,10 @@ var ProjectConnection = class {
|
|
|
572
572
|
if (!this.socket) return;
|
|
573
573
|
this.socket.emit("conveyor:tagAuditResult", data);
|
|
574
574
|
}
|
|
575
|
+
emitAuditProgress(data) {
|
|
576
|
+
if (!this.socket) return;
|
|
577
|
+
this.socket.emit("conveyor:tagAuditProgress", data);
|
|
578
|
+
}
|
|
575
579
|
sendHeartbeat() {
|
|
576
580
|
if (!this.socket) return;
|
|
577
581
|
this.socket.emit("projectRunner:heartbeat", {});
|
|
@@ -2357,11 +2361,14 @@ function buildCreatePullRequestTool(connection) {
|
|
|
2357
2361
|
"Create a GitHub pull request for this task. Use this instead of gh CLI or git commands to create PRs.",
|
|
2358
2362
|
{
|
|
2359
2363
|
title: z.string().describe("The PR title"),
|
|
2360
|
-
body: z.string().describe("The PR description/body in markdown")
|
|
2364
|
+
body: z.string().describe("The PR description/body in markdown"),
|
|
2365
|
+
branch: z.string().optional().describe(
|
|
2366
|
+
"The head branch name for the PR. If the task doesn't have a branch set, this will be used. Defaults to the task's existing branch."
|
|
2367
|
+
)
|
|
2361
2368
|
},
|
|
2362
|
-
async ({ title, body }) => {
|
|
2369
|
+
async ({ title, body, branch }) => {
|
|
2363
2370
|
try {
|
|
2364
|
-
const result = await connection.createPR({ title, body });
|
|
2371
|
+
const result = await connection.createPR({ title, body, branch });
|
|
2365
2372
|
connection.sendEvent({
|
|
2366
2373
|
type: "pr_created",
|
|
2367
2374
|
url: result.url,
|
|
@@ -4603,6 +4610,23 @@ function buildAuditSystemPrompt(projectName, tags, heatmapData, projectDir) {
|
|
|
4603
4610
|
"Analyze actual file contents, not just file names."
|
|
4604
4611
|
].join("\n");
|
|
4605
4612
|
}
|
|
4613
|
+
function emitToolCallProgress(event, request, connection) {
|
|
4614
|
+
if (event.type !== "assistant") return;
|
|
4615
|
+
const assistantEvent = event;
|
|
4616
|
+
for (const block of assistantEvent.message.content) {
|
|
4617
|
+
if (block.type === "tool_use" && block.name) {
|
|
4618
|
+
const inputStr = typeof block.input === "string" ? block.input : JSON.stringify(block.input);
|
|
4619
|
+
connection.emitAuditProgress({
|
|
4620
|
+
requestId: request.requestId,
|
|
4621
|
+
activity: {
|
|
4622
|
+
tool: block.name,
|
|
4623
|
+
input: inputStr.slice(0, 500),
|
|
4624
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
4625
|
+
}
|
|
4626
|
+
});
|
|
4627
|
+
}
|
|
4628
|
+
}
|
|
4629
|
+
}
|
|
4606
4630
|
async function runAuditQuery(request, connection, projectDir) {
|
|
4607
4631
|
connection.emitAgentStatus("fetching_context");
|
|
4608
4632
|
let agentCtx = null;
|
|
@@ -4660,6 +4684,7 @@ async function runAuditQuery(request, connection, projectDir) {
|
|
|
4660
4684
|
const turnToolCalls = [];
|
|
4661
4685
|
const isTyping = { value: false };
|
|
4662
4686
|
for await (const event of events) {
|
|
4687
|
+
emitToolCallProgress(event, request, connection);
|
|
4663
4688
|
const done = processEventStream(event, connection, responseParts, turnToolCalls, isTyping);
|
|
4664
4689
|
if (done) break;
|
|
4665
4690
|
}
|
|
@@ -5363,4 +5388,4 @@ export {
|
|
|
5363
5388
|
ProjectRunner,
|
|
5364
5389
|
FileCache
|
|
5365
5390
|
};
|
|
5366
|
-
//# sourceMappingURL=chunk-
|
|
5391
|
+
//# sourceMappingURL=chunk-LBEAK2VJ.js.map
|