@rallycry/conveyor-agent 7.0.10 → 7.0.11
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.
|
@@ -501,23 +501,17 @@ var ModeController = class {
|
|
|
501
501
|
this._mode = "code-review";
|
|
502
502
|
return this._mode;
|
|
503
503
|
}
|
|
504
|
-
if (this._mode === "auto") {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
this.transitionToBuilding(context);
|
|
508
|
-
return this._mode;
|
|
509
|
-
}
|
|
504
|
+
if (this._mode === "auto" && this.canBypassPlanning(context)) {
|
|
505
|
+
this.transitionToBuilding(context);
|
|
506
|
+
return this._mode;
|
|
510
507
|
}
|
|
511
508
|
return this._mode;
|
|
512
509
|
}
|
|
513
510
|
/** Check if auto-mode can bypass planning (task already has plan + properties) */
|
|
514
511
|
canBypassPlanning(context) {
|
|
515
512
|
if (this._mode !== "auto") return false;
|
|
516
|
-
|
|
517
|
-
if (
|
|
518
|
-
if (context.status === "Planning" && context.plan?.trim() && context.storyPointId) {
|
|
519
|
-
return true;
|
|
520
|
-
}
|
|
513
|
+
if (context.status !== "Planning") return true;
|
|
514
|
+
if (context.plan?.trim() && context.storyPointId) return true;
|
|
521
515
|
return false;
|
|
522
516
|
}
|
|
523
517
|
// ── Mode transitions ───────────────────────────────────────────────
|
|
@@ -963,7 +957,8 @@ var GetSuggestionsRequestSchema = z.object({
|
|
|
963
957
|
sessionId: z.string()
|
|
964
958
|
});
|
|
965
959
|
var GetTaskIncidentsRequestSchema = z.object({
|
|
966
|
-
sessionId: z.string()
|
|
960
|
+
sessionId: z.string(),
|
|
961
|
+
taskId: z.string().optional()
|
|
967
962
|
});
|
|
968
963
|
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z.string() });
|
|
969
964
|
var UpdateTaskStatusRequestSchema = z.object({
|
|
@@ -1044,7 +1039,8 @@ var UpdateTaskPropertiesRequestSchema = z.object({
|
|
|
1044
1039
|
sessionId: z.string(),
|
|
1045
1040
|
title: z.string().optional(),
|
|
1046
1041
|
storyPointValue: z.number().int().positive().optional(),
|
|
1047
|
-
tagIds: z.array(z.string()).optional()
|
|
1042
|
+
tagIds: z.array(z.string()).optional(),
|
|
1043
|
+
githubPRUrl: z.string().url().optional()
|
|
1048
1044
|
});
|
|
1049
1045
|
var ListIconsRequestSchema = z.object({
|
|
1050
1046
|
sessionId: z.string()
|
|
@@ -2330,6 +2326,33 @@ async function resolveTaskTagContext(context) {
|
|
|
2330
2326
|
);
|
|
2331
2327
|
return injectedSection || null;
|
|
2332
2328
|
}
|
|
2329
|
+
function formatRepoRefs(repoRefs) {
|
|
2330
|
+
const parts = [];
|
|
2331
|
+
parts.push(`
|
|
2332
|
+
## Repository References`);
|
|
2333
|
+
for (const ref of repoRefs) {
|
|
2334
|
+
const icon = ref.refType === "folder" ? "folder" : "file";
|
|
2335
|
+
parts.push(`- [${icon}] \`${ref.path}\``);
|
|
2336
|
+
}
|
|
2337
|
+
return parts;
|
|
2338
|
+
}
|
|
2339
|
+
function formatIncidents(incidents) {
|
|
2340
|
+
const parts = [];
|
|
2341
|
+
parts.push(`
|
|
2342
|
+
## Linked Incidents`);
|
|
2343
|
+
parts.push(
|
|
2344
|
+
`This task has linked incidents. Review them for context on the problem being addressed.
|
|
2345
|
+
`
|
|
2346
|
+
);
|
|
2347
|
+
for (const inc of incidents) {
|
|
2348
|
+
const severity = inc.severity ? ` [${inc.severity}]` : "";
|
|
2349
|
+
const status = inc.status ? ` (${inc.status})` : "";
|
|
2350
|
+
parts.push(`### ${inc.title}${severity}${status}`);
|
|
2351
|
+
if (inc.description) parts.push(inc.description);
|
|
2352
|
+
if (inc.source) parts.push(`Source: ${inc.source}`);
|
|
2353
|
+
}
|
|
2354
|
+
return parts;
|
|
2355
|
+
}
|
|
2333
2356
|
async function buildTaskBody(context) {
|
|
2334
2357
|
const parts = [];
|
|
2335
2358
|
parts.push(`# Task: ${context.title}`);
|
|
@@ -2357,15 +2380,13 @@ ${context.plan}`);
|
|
|
2357
2380
|
}
|
|
2358
2381
|
}
|
|
2359
2382
|
if (context.repoRefs && context.repoRefs.length > 0) {
|
|
2360
|
-
parts.push(
|
|
2361
|
-
## Repository References`);
|
|
2362
|
-
for (const ref of context.repoRefs) {
|
|
2363
|
-
const icon = ref.refType === "folder" ? "folder" : "file";
|
|
2364
|
-
parts.push(`- [${icon}] \`${ref.path}\``);
|
|
2365
|
-
}
|
|
2383
|
+
parts.push(...formatRepoRefs(context.repoRefs));
|
|
2366
2384
|
}
|
|
2367
2385
|
const tagSection = await resolveTaskTagContext(context);
|
|
2368
2386
|
if (tagSection) parts.push(tagSection);
|
|
2387
|
+
if (context.incidents && context.incidents.length > 0) {
|
|
2388
|
+
parts.push(...formatIncidents(context.incidents));
|
|
2389
|
+
}
|
|
2369
2390
|
if (context.chatHistory.length > 0) {
|
|
2370
2391
|
parts.push(...formatChatHistory(context.chatHistory));
|
|
2371
2392
|
}
|
|
@@ -3447,21 +3468,24 @@ function buildDiscoveryTools(connection) {
|
|
|
3447
3468
|
{
|
|
3448
3469
|
title: z4.string().optional().describe("The new task title"),
|
|
3449
3470
|
storyPointValue: z4.number().optional().describe(SP_DESCRIPTION2),
|
|
3450
|
-
tagIds: z4.array(z4.string()).optional().describe("Array of tag IDs to assign")
|
|
3471
|
+
tagIds: z4.array(z4.string()).optional().describe("Array of tag IDs to assign"),
|
|
3472
|
+
githubPRUrl: z4.string().url().optional().describe("GitHub pull request URL to link to this task")
|
|
3451
3473
|
},
|
|
3452
|
-
async ({ title, storyPointValue, tagIds }) => {
|
|
3474
|
+
async ({ title, storyPointValue, tagIds, githubPRUrl }) => {
|
|
3453
3475
|
try {
|
|
3454
3476
|
await connection.call("updateTaskProperties", {
|
|
3455
3477
|
sessionId: connection.sessionId,
|
|
3456
3478
|
title,
|
|
3457
3479
|
storyPointValue,
|
|
3458
|
-
tagIds
|
|
3480
|
+
tagIds,
|
|
3481
|
+
githubPRUrl
|
|
3459
3482
|
});
|
|
3460
3483
|
const updatedFields = [];
|
|
3461
3484
|
if (title !== void 0) updatedFields.push(`title to "${title}"`);
|
|
3462
3485
|
if (storyPointValue !== void 0)
|
|
3463
3486
|
updatedFields.push(`story points to ${storyPointValue}`);
|
|
3464
3487
|
if (tagIds !== void 0) updatedFields.push(`tags (${tagIds.length} tag(s))`);
|
|
3488
|
+
if (githubPRUrl !== void 0) updatedFields.push(`PR link to "${githubPRUrl}"`);
|
|
3465
3489
|
return textResult(`Task properties updated: ${updatedFields.join(", ")}`);
|
|
3466
3490
|
} catch (error) {
|
|
3467
3491
|
return textResult(
|
|
@@ -6032,6 +6056,27 @@ var QueryBridge = class {
|
|
|
6032
6056
|
};
|
|
6033
6057
|
|
|
6034
6058
|
// src/runner/session-runner.ts
|
|
6059
|
+
function mapChatHistory(messages) {
|
|
6060
|
+
if (!messages) return [];
|
|
6061
|
+
return messages.map((m) => ({
|
|
6062
|
+
role: m.role ?? "user",
|
|
6063
|
+
content: m.content ?? "",
|
|
6064
|
+
userId: m.userId,
|
|
6065
|
+
userName: m.user?.name ?? void 0,
|
|
6066
|
+
createdAt: m.createdAt,
|
|
6067
|
+
...m.files && m.files.length > 0 ? {
|
|
6068
|
+
files: m.files.map((f) => ({
|
|
6069
|
+
fileId: f.id,
|
|
6070
|
+
fileName: f.fileName,
|
|
6071
|
+
mimeType: f.mimeType,
|
|
6072
|
+
fileSize: f.fileSize,
|
|
6073
|
+
downloadUrl: f.downloadUrl ?? "",
|
|
6074
|
+
content: f.content,
|
|
6075
|
+
contentEncoding: f.contentEncoding
|
|
6076
|
+
}))
|
|
6077
|
+
} : {}
|
|
6078
|
+
}));
|
|
6079
|
+
}
|
|
6035
6080
|
var SessionRunner = class _SessionRunner {
|
|
6036
6081
|
connection;
|
|
6037
6082
|
mode;
|
|
@@ -6379,24 +6424,7 @@ var SessionRunner = class _SessionRunner {
|
|
|
6379
6424
|
}
|
|
6380
6425
|
// ── Context & bridge construction ────────────────────────────────
|
|
6381
6426
|
buildFullContext(ctx) {
|
|
6382
|
-
const chatHistory = (ctx.chatHistory
|
|
6383
|
-
role: m.role ?? "user",
|
|
6384
|
-
content: m.content ?? "",
|
|
6385
|
-
userId: m.userId,
|
|
6386
|
-
userName: m.user?.name ?? void 0,
|
|
6387
|
-
createdAt: m.createdAt,
|
|
6388
|
-
...m.files && m.files.length > 0 ? {
|
|
6389
|
-
files: m.files.map((f) => ({
|
|
6390
|
-
fileId: f.id,
|
|
6391
|
-
fileName: f.fileName,
|
|
6392
|
-
mimeType: f.mimeType,
|
|
6393
|
-
fileSize: f.fileSize,
|
|
6394
|
-
downloadUrl: f.downloadUrl ?? "",
|
|
6395
|
-
content: f.content,
|
|
6396
|
-
contentEncoding: f.contentEncoding
|
|
6397
|
-
}))
|
|
6398
|
-
} : {}
|
|
6399
|
-
}));
|
|
6427
|
+
const chatHistory = mapChatHistory(ctx.chatHistory);
|
|
6400
6428
|
return {
|
|
6401
6429
|
taskId: ctx.id,
|
|
6402
6430
|
projectId: ctx.projectId ?? "",
|
|
@@ -6405,7 +6433,8 @@ var SessionRunner = class _SessionRunner {
|
|
|
6405
6433
|
plan: ctx.plan,
|
|
6406
6434
|
status: ctx.status,
|
|
6407
6435
|
chatHistory,
|
|
6408
|
-
agentId: null,
|
|
6436
|
+
agentId: ctx.agentId ?? null,
|
|
6437
|
+
_runnerSessionId: this.sessionId,
|
|
6409
6438
|
agentInstructions: ctx.agentInstructions ?? "",
|
|
6410
6439
|
model: ctx.model,
|
|
6411
6440
|
githubBranch: ctx.githubBranch ?? "",
|
|
@@ -6419,7 +6448,8 @@ var SessionRunner = class _SessionRunner {
|
|
|
6419
6448
|
projectAgents: ctx.projectAgents ?? void 0,
|
|
6420
6449
|
projectTags: ctx.projectTags ?? void 0,
|
|
6421
6450
|
taskTagIds: ctx.taskTagIds ?? void 0,
|
|
6422
|
-
projectObjectives: ctx.projectObjectives ?? void 0
|
|
6451
|
+
projectObjectives: ctx.projectObjectives ?? void 0,
|
|
6452
|
+
incidents: ctx.incidents ?? void 0
|
|
6423
6453
|
};
|
|
6424
6454
|
}
|
|
6425
6455
|
createQueryBridge() {
|
|
@@ -7927,4 +7957,4 @@ export {
|
|
|
7927
7957
|
loadForwardPorts,
|
|
7928
7958
|
loadConveyorConfig
|
|
7929
7959
|
};
|
|
7930
|
-
//# sourceMappingURL=chunk-
|
|
7960
|
+
//# sourceMappingURL=chunk-OUARAX27.js.map
|