@rallycry/conveyor-agent 10.13.62 → 10.13.64
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.
|
@@ -2270,7 +2270,10 @@ var CreateSubtaskRequestSchema = z4.object({
|
|
|
2270
2270
|
followParentStatus: z4.boolean().optional(),
|
|
2271
2271
|
/** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
|
|
2272
2272
|
* metadata — preferred over encoding order in plan text / ordinal). */
|
|
2273
|
-
dependsOn: z4.array(z4.string().min(1)).max(32).optional()
|
|
2273
|
+
dependsOn: z4.array(z4.string().min(1)).max(32).optional(),
|
|
2274
|
+
/** Glossary tag names to assign to the child. Unmatched names come back in
|
|
2275
|
+
* the response rather than failing the create. */
|
|
2276
|
+
tags: z4.array(z4.string().min(1)).max(10).optional()
|
|
2274
2277
|
});
|
|
2275
2278
|
var UpdateSubtaskRequestSchema = z4.object({
|
|
2276
2279
|
sessionId: z4.string(),
|
|
@@ -2819,6 +2822,40 @@ var QueryProjectGrafanaLogsRequestSchema = z5.object({
|
|
|
2819
2822
|
endTime: z5.string().optional(),
|
|
2820
2823
|
limit: z5.number().int().min(1).max(200).optional().default(50)
|
|
2821
2824
|
});
|
|
2825
|
+
var driveFileNameSchema = z5.string().min(1).max(255).regex(/^[^/\\\r\n]+$/, "File names cannot contain slashes or line breaks");
|
|
2826
|
+
var DRIVE_MAX_CONTENT_CHARS = 1e6;
|
|
2827
|
+
var ListProjectDriveFilesRequestSchema = z5.object({
|
|
2828
|
+
projectId: z5.string(),
|
|
2829
|
+
folderId: z5.string().max(200).optional(),
|
|
2830
|
+
search: z5.string().max(200).optional(),
|
|
2831
|
+
limit: z5.number().int().min(1).max(200).optional()
|
|
2832
|
+
});
|
|
2833
|
+
var ReadProjectDriveFileRequestSchema = z5.object({
|
|
2834
|
+
projectId: z5.string(),
|
|
2835
|
+
fileId: z5.string().min(1).max(200)
|
|
2836
|
+
});
|
|
2837
|
+
var CreateProjectDriveFileRequestSchema = z5.object({
|
|
2838
|
+
projectId: z5.string(),
|
|
2839
|
+
name: driveFileNameSchema,
|
|
2840
|
+
content: z5.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2841
|
+
mimeType: z5.string().max(200).optional(),
|
|
2842
|
+
folderId: z5.string().max(200).optional()
|
|
2843
|
+
});
|
|
2844
|
+
var UpdateProjectDriveFileRequestSchema = z5.object({
|
|
2845
|
+
projectId: z5.string(),
|
|
2846
|
+
fileId: z5.string().min(1).max(200),
|
|
2847
|
+
content: z5.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2848
|
+
mimeType: z5.string().max(200).optional()
|
|
2849
|
+
});
|
|
2850
|
+
var DeleteProjectDriveFileRequestSchema = z5.object({
|
|
2851
|
+
projectId: z5.string(),
|
|
2852
|
+
fileId: z5.string().min(1).max(200)
|
|
2853
|
+
});
|
|
2854
|
+
var CreateProjectDriveFolderRequestSchema = z5.object({
|
|
2855
|
+
projectId: z5.string(),
|
|
2856
|
+
name: driveFileNameSchema,
|
|
2857
|
+
folderId: z5.string().max(200).optional()
|
|
2858
|
+
});
|
|
2822
2859
|
var StartProjectBuildRequestSchema = z5.object({
|
|
2823
2860
|
projectId: z5.string(),
|
|
2824
2861
|
taskId: z5.string(),
|
|
@@ -3283,11 +3320,11 @@ function anthropicEntry(model, label, inputPerMillion, outputPerMillion, experim
|
|
|
3283
3320
|
};
|
|
3284
3321
|
}
|
|
3285
3322
|
var ANTHROPIC_CATALOG = [
|
|
3286
|
-
anthropicEntry(DEFAULT_OPUS_MODEL, "Opus 5 Latest",
|
|
3287
|
-
anthropicEntry(PREVIOUS_OPUS_MODEL, "Opus 4.8",
|
|
3323
|
+
anthropicEntry(DEFAULT_OPUS_MODEL, "Opus 5 Latest", 5, 25),
|
|
3324
|
+
anthropicEntry(PREVIOUS_OPUS_MODEL, "Opus 4.8", 5, 25),
|
|
3288
3325
|
anthropicEntry(DEFAULT_SONNET_MODEL, "Sonnet 5 Latest", 3, 15),
|
|
3289
3326
|
anthropicEntry(PREVIOUS_SONNET_MODEL, "Sonnet 4.6", 3, 15),
|
|
3290
|
-
anthropicEntry(DEFAULT_HAIKU_MODEL, "Haiku 4.5",
|
|
3327
|
+
anthropicEntry(DEFAULT_HAIKU_MODEL, "Haiku 4.5", 1, 5),
|
|
3291
3328
|
anthropicEntry(FABLE_MODEL, "Fable 5 (experimental)", 10, 50, true)
|
|
3292
3329
|
];
|
|
3293
3330
|
var HUMAN_PROSE_WRITING_STYLE = `## Writing style for humans
|
|
@@ -9974,14 +10011,14 @@ var f = {
|
|
|
9974
10011
|
return { kind: "nullable", inner };
|
|
9975
10012
|
}
|
|
9976
10013
|
};
|
|
9977
|
-
function compileString(
|
|
9978
|
-
let schema =
|
|
10014
|
+
function compileString(z19, spec) {
|
|
10015
|
+
let schema = z19.string();
|
|
9979
10016
|
if (spec.min !== void 0) schema = schema.min(spec.min);
|
|
9980
10017
|
if (spec.max !== void 0) schema = schema.max(spec.max);
|
|
9981
10018
|
return schema;
|
|
9982
10019
|
}
|
|
9983
|
-
function compileNumber(
|
|
9984
|
-
let schema =
|
|
10020
|
+
function compileNumber(z19, spec) {
|
|
10021
|
+
let schema = z19.number();
|
|
9985
10022
|
if (spec.int) schema = schema.int();
|
|
9986
10023
|
if (spec.positive) schema = schema.positive();
|
|
9987
10024
|
if (spec.nonnegative) schema = schema.nonnegative();
|
|
@@ -9989,41 +10026,41 @@ function compileNumber(z18, spec) {
|
|
|
9989
10026
|
if (spec.max !== void 0) schema = schema.max(spec.max);
|
|
9990
10027
|
return schema;
|
|
9991
10028
|
}
|
|
9992
|
-
function compileArray(
|
|
9993
|
-
let schema =
|
|
10029
|
+
function compileArray(z19, spec) {
|
|
10030
|
+
let schema = z19.array(compileField(z19, spec.item));
|
|
9994
10031
|
if (spec.min !== void 0) schema = schema.min(spec.min);
|
|
9995
10032
|
return schema;
|
|
9996
10033
|
}
|
|
9997
|
-
function compileBase(
|
|
10034
|
+
function compileBase(z19, spec) {
|
|
9998
10035
|
switch (spec.kind) {
|
|
9999
10036
|
case "string":
|
|
10000
|
-
return compileString(
|
|
10037
|
+
return compileString(z19, spec);
|
|
10001
10038
|
case "number":
|
|
10002
|
-
return compileNumber(
|
|
10039
|
+
return compileNumber(z19, spec);
|
|
10003
10040
|
case "boolean":
|
|
10004
|
-
return
|
|
10041
|
+
return z19.boolean();
|
|
10005
10042
|
case "enum":
|
|
10006
|
-
return
|
|
10043
|
+
return z19.enum([...spec.values]);
|
|
10007
10044
|
case "array":
|
|
10008
|
-
return compileArray(
|
|
10045
|
+
return compileArray(z19, spec);
|
|
10009
10046
|
case "object":
|
|
10010
|
-
return
|
|
10047
|
+
return z19.object(compileShape(z19, spec.fields));
|
|
10011
10048
|
}
|
|
10012
10049
|
}
|
|
10013
|
-
function compileField(
|
|
10050
|
+
function compileField(z19, spec) {
|
|
10014
10051
|
if (spec.kind === "optional") {
|
|
10015
|
-
return compileField(
|
|
10052
|
+
return compileField(z19, spec.inner).optional();
|
|
10016
10053
|
}
|
|
10017
10054
|
if (spec.kind === "nullable") {
|
|
10018
|
-
return compileField(
|
|
10055
|
+
return compileField(z19, spec.inner).nullable();
|
|
10019
10056
|
}
|
|
10020
|
-
const schema = compileBase(
|
|
10057
|
+
const schema = compileBase(z19, spec);
|
|
10021
10058
|
return spec.desc === void 0 ? schema : schema.describe(spec.desc);
|
|
10022
10059
|
}
|
|
10023
|
-
function compileShape(
|
|
10060
|
+
function compileShape(z19, fields) {
|
|
10024
10061
|
const shape = {};
|
|
10025
10062
|
for (const [key, spec] of Object.entries(fields)) {
|
|
10026
|
-
shape[key] = compileField(
|
|
10063
|
+
shape[key] = compileField(z19, spec);
|
|
10027
10064
|
}
|
|
10028
10065
|
return shape;
|
|
10029
10066
|
}
|
|
@@ -10463,10 +10500,11 @@ var MCP_STATUS_ENUM = [
|
|
|
10463
10500
|
"Complete",
|
|
10464
10501
|
"Cancelled"
|
|
10465
10502
|
];
|
|
10503
|
+
var AGENT_TAGS = `Glossary tag names to label the child with, e.g. ["agent", "pack"]. Names, not ids, matched case-insensitively against this project's tags (use list_tags to see them). A name that matches nothing comes back in the result and never fails the create.`;
|
|
10466
10504
|
var createSubtaskContract = defineToolContract({
|
|
10467
10505
|
name: "create_subtask",
|
|
10468
10506
|
agent: {
|
|
10469
|
-
description: "Create a subtask under the
|
|
10507
|
+
description: "Create a subtask (a child card) under the CURRENT card. This is how a card becomes a pack: the first child turns this card into the pack parent, and the children build as one unit. Use when breaking the current card into smaller pieces during planning. For a sibling card that lands after this one merges, use create_follow_up_task.",
|
|
10470
10508
|
fields: {
|
|
10471
10509
|
title: f.string({ desc: "Subtask title" }),
|
|
10472
10510
|
description: f.optional(f.string({ desc: cardDescriptionDesc("Brief description") })),
|
|
@@ -10474,7 +10512,8 @@ var createSubtaskContract = defineToolContract({
|
|
|
10474
10512
|
ordinal: f.optional(f.number({ desc: "Step/order number (0-based)" })),
|
|
10475
10513
|
storyPointValue: f.optional(f.number({ desc: SP_DESCRIPTION })),
|
|
10476
10514
|
followParentStatus: f.optional(f.boolean({ desc: AGENT_FOLLOW_PARENT_STATUS })),
|
|
10477
|
-
dependsOn: f.optional(f.array(f.string(), { desc: AGENT_DEPENDS_ON }))
|
|
10515
|
+
dependsOn: f.optional(f.array(f.string(), { desc: AGENT_DEPENDS_ON })),
|
|
10516
|
+
tags: f.optional(f.array(f.string(), { desc: AGENT_TAGS }))
|
|
10478
10517
|
}
|
|
10479
10518
|
},
|
|
10480
10519
|
mcp: {
|
|
@@ -11230,7 +11269,7 @@ function buildRemoveDependencyTool(connection) {
|
|
|
11230
11269
|
function buildCreateFollowUpTaskTool(connection) {
|
|
11231
11270
|
return defineTool(
|
|
11232
11271
|
"create_follow_up_task",
|
|
11233
|
-
"Create a follow-up task that depends on the current task.
|
|
11272
|
+
"Create a follow-up task that depends on the current task. The new card is a SIBLING of this one (same parent) and is blocked until this task merges \u2014 it is NOT a child of this card. To break this card into child cards that build as a pack, use create_subtask. For blockers use add_dependency.",
|
|
11234
11273
|
{
|
|
11235
11274
|
title: z13.string().describe("Follow-up task title"),
|
|
11236
11275
|
description: z13.string().optional().describe(cardDescriptionDesc("Brief description of the follow-up work")),
|
|
@@ -11717,7 +11756,8 @@ function buildCreateSubtaskTool(connection) {
|
|
|
11717
11756
|
ordinal,
|
|
11718
11757
|
storyPointValue,
|
|
11719
11758
|
followParentStatus,
|
|
11720
|
-
dependsOn
|
|
11759
|
+
dependsOn,
|
|
11760
|
+
tags
|
|
11721
11761
|
}) => {
|
|
11722
11762
|
try {
|
|
11723
11763
|
const result = await connection.call("createSubtask", {
|
|
@@ -11728,9 +11768,14 @@ function buildCreateSubtaskTool(connection) {
|
|
|
11728
11768
|
...storyPointValue !== void 0 && { storyPointValue },
|
|
11729
11769
|
...ordinal !== void 0 && { ordinal },
|
|
11730
11770
|
...followParentStatus !== void 0 && { followParentStatus },
|
|
11731
|
-
...dependsOn !== void 0 && { dependsOn }
|
|
11771
|
+
...dependsOn !== void 0 && { dependsOn },
|
|
11772
|
+
...tags !== void 0 && { tags }
|
|
11732
11773
|
});
|
|
11733
|
-
|
|
11774
|
+
const unmatched = result.unmatchedTags ?? [];
|
|
11775
|
+
const tagNote = unmatched.length > 0 ? ` These tag names matched no project tag and were skipped: ${unmatched.join(", ")}. Use list_tags to see the glossary.` : "";
|
|
11776
|
+
return textResult(
|
|
11777
|
+
`Subtask created with ID: ${result.id} (slug: ${result.slug})${tagNote}`
|
|
11778
|
+
);
|
|
11734
11779
|
} catch (error) {
|
|
11735
11780
|
return textResult(
|
|
11736
11781
|
`Failed to create subtask: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
@@ -12367,10 +12412,165 @@ function buildProjectTools(connection, projectId, workspaceDir) {
|
|
|
12367
12412
|
];
|
|
12368
12413
|
}
|
|
12369
12414
|
|
|
12415
|
+
// src/tools/drive-tools.ts
|
|
12416
|
+
import { z as z17 } from "zod";
|
|
12417
|
+
var MAX_CONTENT_CHARS = 1e6;
|
|
12418
|
+
var MAX_READ_CHARS = 1e5;
|
|
12419
|
+
function errText2(prefix, error) {
|
|
12420
|
+
return textResult(`${prefix}: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
12421
|
+
}
|
|
12422
|
+
function buildDriveListFilesTool(connection, projectId) {
|
|
12423
|
+
return defineTool(
|
|
12424
|
+
"drive_list_files",
|
|
12425
|
+
"List files and folders in the project's connected Google Drive folder. Omit folderId to list the project's root folder. Returns id, name, mimeType, size, and modified time for each entry.",
|
|
12426
|
+
{
|
|
12427
|
+
folderId: z17.string().optional().describe("Folder to list. Defaults to the project's connected root folder."),
|
|
12428
|
+
search: z17.string().max(200).optional().describe("Only return names containing this text"),
|
|
12429
|
+
limit: z17.number().int().min(1).max(200).optional().describe("Max entries (default 100)")
|
|
12430
|
+
},
|
|
12431
|
+
async ({ folderId, search, limit }) => {
|
|
12432
|
+
try {
|
|
12433
|
+
const result = await connection.call("listProjectDriveFiles", {
|
|
12434
|
+
projectId,
|
|
12435
|
+
folderId,
|
|
12436
|
+
search,
|
|
12437
|
+
limit
|
|
12438
|
+
});
|
|
12439
|
+
return textResult(JSON.stringify(result, null, 2));
|
|
12440
|
+
} catch (error) {
|
|
12441
|
+
return errText2("Failed to list Google Drive files", error);
|
|
12442
|
+
}
|
|
12443
|
+
},
|
|
12444
|
+
{ annotations: { readOnlyHint: true } }
|
|
12445
|
+
);
|
|
12446
|
+
}
|
|
12447
|
+
function buildDriveReadFileTool(connection, projectId) {
|
|
12448
|
+
return defineTool(
|
|
12449
|
+
"drive_read_file",
|
|
12450
|
+
"Read a file's text content from the project's connected Google Drive folder. Google Docs, Sheets, and Slides are exported to text automatically. Content over 100 KB is truncated.",
|
|
12451
|
+
{ fileId: z17.string().describe("Drive file id, as returned by drive_list_files") },
|
|
12452
|
+
async ({ fileId }) => {
|
|
12453
|
+
try {
|
|
12454
|
+
const result = await connection.call("readProjectDriveFile", { projectId, fileId });
|
|
12455
|
+
const overReadCap = result.content.length > MAX_READ_CHARS;
|
|
12456
|
+
const content = overReadCap ? result.content.slice(0, MAX_READ_CHARS) : result.content;
|
|
12457
|
+
const notes = [
|
|
12458
|
+
result.exported ? "(exported from a Google-native document)" : null,
|
|
12459
|
+
result.truncated || overReadCap ? "(truncated at the 100 KB read limit)" : null
|
|
12460
|
+
].filter(Boolean);
|
|
12461
|
+
const header = `${result.file.name} ${notes.join(" ")}`.trim();
|
|
12462
|
+
return textResult(`${header}
|
|
12463
|
+
|
|
12464
|
+
${content}`);
|
|
12465
|
+
} catch (error) {
|
|
12466
|
+
return errText2("Failed to read the Google Drive file", error);
|
|
12467
|
+
}
|
|
12468
|
+
},
|
|
12469
|
+
{ annotations: { readOnlyHint: true } }
|
|
12470
|
+
);
|
|
12471
|
+
}
|
|
12472
|
+
function buildDriveCreateFileTool(connection, projectId) {
|
|
12473
|
+
return defineTool(
|
|
12474
|
+
"drive_create_file",
|
|
12475
|
+
"Create a new file in the project's connected Google Drive folder. Use drive_update_file to change an existing file instead.",
|
|
12476
|
+
{
|
|
12477
|
+
name: z17.string().min(1).max(255).describe("File name, without any path separators"),
|
|
12478
|
+
content: z17.string().max(MAX_CONTENT_CHARS).describe("File content, UTF-8 text"),
|
|
12479
|
+
mimeType: z17.string().optional().describe("MIME type (default text/plain)"),
|
|
12480
|
+
folderId: z17.string().optional().describe("Destination folder. Defaults to the project's connected root folder.")
|
|
12481
|
+
},
|
|
12482
|
+
async ({ name, content, mimeType, folderId }) => {
|
|
12483
|
+
try {
|
|
12484
|
+
const file = await connection.call("createProjectDriveFile", {
|
|
12485
|
+
projectId,
|
|
12486
|
+
name,
|
|
12487
|
+
content,
|
|
12488
|
+
mimeType,
|
|
12489
|
+
folderId
|
|
12490
|
+
});
|
|
12491
|
+
return textResult(`Created "${file.name}" (${file.id})`);
|
|
12492
|
+
} catch (error) {
|
|
12493
|
+
return errText2("Failed to create the Google Drive file", error);
|
|
12494
|
+
}
|
|
12495
|
+
}
|
|
12496
|
+
);
|
|
12497
|
+
}
|
|
12498
|
+
function buildDriveUpdateFileTool(connection, projectId) {
|
|
12499
|
+
return defineTool(
|
|
12500
|
+
"drive_update_file",
|
|
12501
|
+
"Replace the content of an existing file in the project's connected Google Drive folder. This overwrites the whole file. Google-native documents cannot be overwritten.",
|
|
12502
|
+
{
|
|
12503
|
+
fileId: z17.string().describe("Drive file id, as returned by drive_list_files"),
|
|
12504
|
+
content: z17.string().max(MAX_CONTENT_CHARS).describe("Replacement content, UTF-8 text"),
|
|
12505
|
+
mimeType: z17.string().optional().describe("MIME type (defaults to the file's current type)")
|
|
12506
|
+
},
|
|
12507
|
+
async ({ fileId, content, mimeType }) => {
|
|
12508
|
+
try {
|
|
12509
|
+
const file = await connection.call("updateProjectDriveFile", {
|
|
12510
|
+
projectId,
|
|
12511
|
+
fileId,
|
|
12512
|
+
content,
|
|
12513
|
+
mimeType
|
|
12514
|
+
});
|
|
12515
|
+
return textResult(`Updated "${file.name}" (${file.id})`);
|
|
12516
|
+
} catch (error) {
|
|
12517
|
+
return errText2("Failed to update the Google Drive file", error);
|
|
12518
|
+
}
|
|
12519
|
+
}
|
|
12520
|
+
);
|
|
12521
|
+
}
|
|
12522
|
+
function buildDriveDeleteFileTool(connection, projectId) {
|
|
12523
|
+
return defineTool(
|
|
12524
|
+
"drive_delete_file",
|
|
12525
|
+
"Move a file in the project's connected Google Drive folder to the Drive trash. The file is recoverable from the trash; it is never permanently deleted.",
|
|
12526
|
+
{ fileId: z17.string().describe("Drive file id, as returned by drive_list_files") },
|
|
12527
|
+
async ({ fileId }) => {
|
|
12528
|
+
try {
|
|
12529
|
+
const result = await connection.call("deleteProjectDriveFile", { projectId, fileId });
|
|
12530
|
+
return textResult(`Moved "${result.name}" (${result.id}) to the Google Drive trash`);
|
|
12531
|
+
} catch (error) {
|
|
12532
|
+
return errText2("Failed to delete the Google Drive file", error);
|
|
12533
|
+
}
|
|
12534
|
+
}
|
|
12535
|
+
);
|
|
12536
|
+
}
|
|
12537
|
+
function buildDriveCreateFolderTool(connection, projectId) {
|
|
12538
|
+
return defineTool(
|
|
12539
|
+
"drive_create_folder",
|
|
12540
|
+
"Create a folder inside the project's connected Google Drive folder.",
|
|
12541
|
+
{
|
|
12542
|
+
name: z17.string().min(1).max(255).describe("Folder name, without any path separators"),
|
|
12543
|
+
folderId: z17.string().optional().describe("Parent folder. Defaults to the project's connected root folder.")
|
|
12544
|
+
},
|
|
12545
|
+
async ({ name, folderId }) => {
|
|
12546
|
+
try {
|
|
12547
|
+
const folder = await connection.call("createProjectDriveFolder", {
|
|
12548
|
+
projectId,
|
|
12549
|
+
name,
|
|
12550
|
+
folderId
|
|
12551
|
+
});
|
|
12552
|
+
return textResult(`Created folder "${folder.name}" (${folder.id})`);
|
|
12553
|
+
} catch (error) {
|
|
12554
|
+
return errText2("Failed to create the Google Drive folder", error);
|
|
12555
|
+
}
|
|
12556
|
+
}
|
|
12557
|
+
);
|
|
12558
|
+
}
|
|
12559
|
+
function buildDriveTools(connection, projectId) {
|
|
12560
|
+
return [
|
|
12561
|
+
buildDriveListFilesTool(connection, projectId),
|
|
12562
|
+
buildDriveReadFileTool(connection, projectId),
|
|
12563
|
+
buildDriveCreateFileTool(connection, projectId),
|
|
12564
|
+
buildDriveUpdateFileTool(connection, projectId),
|
|
12565
|
+
buildDriveDeleteFileTool(connection, projectId),
|
|
12566
|
+
buildDriveCreateFolderTool(connection, projectId)
|
|
12567
|
+
];
|
|
12568
|
+
}
|
|
12569
|
+
|
|
12370
12570
|
// src/tools/code-review-tools.ts
|
|
12371
12571
|
import { execFile as execFile2 } from "child_process";
|
|
12372
12572
|
import { promisify as promisify2 } from "util";
|
|
12373
|
-
import { z as
|
|
12573
|
+
import { z as z18 } from "zod";
|
|
12374
12574
|
async function endReviewSession(connection, reason) {
|
|
12375
12575
|
await connection.call("endReviewSession", {
|
|
12376
12576
|
sessionId: connection.sessionId,
|
|
@@ -12378,26 +12578,26 @@ async function endReviewSession(connection, reason) {
|
|
|
12378
12578
|
});
|
|
12379
12579
|
}
|
|
12380
12580
|
var RISK_LEVELS2 = ["critical", "high", "medium", "low"];
|
|
12381
|
-
var reviewedShaSchema =
|
|
12581
|
+
var reviewedShaSchema = z18.string().regex(/^[0-9a-f]{40}$/i).describe("REQUIRED. The full 40-character commit SHA this verdict reviews.");
|
|
12382
12582
|
var riskDescription = "REQUIRED. The risk level this change carries, judged by the surface area it touches: critical = touches critical/foundational surface, high = important surface, medium = moderate, low = small/isolated. Set this on every verdict. You have authority to override a risk level already set on the task if you disagree with it.";
|
|
12383
|
-
var ReviewGuideToolSchema =
|
|
12384
|
-
reviewedSha:
|
|
12583
|
+
var ReviewGuideToolSchema = z18.strictObject({
|
|
12584
|
+
reviewedSha: z18.string().regex(/^[0-9a-f]{40}$/i).describe(
|
|
12385
12585
|
"REQUIRED. The PR's current head as a full 40-char SHA. Run `git rev-parse HEAD` immediately before this call \u2014 never extend an abbreviated hash into 40 characters."
|
|
12386
12586
|
),
|
|
12387
|
-
overview:
|
|
12388
|
-
sections:
|
|
12389
|
-
|
|
12390
|
-
title:
|
|
12391
|
-
explanation:
|
|
12392
|
-
classification:
|
|
12393
|
-
files:
|
|
12394
|
-
|
|
12395
|
-
path:
|
|
12587
|
+
overview: z18.string().min(1).max(6e4).describe("REQUIRED. Plain-text walkthrough intro, max 3000 characters. Keep it short."),
|
|
12588
|
+
sections: z18.array(
|
|
12589
|
+
z18.strictObject({
|
|
12590
|
+
title: z18.string().min(1).max(160),
|
|
12591
|
+
explanation: z18.string().min(1).max(2e3),
|
|
12592
|
+
classification: z18.enum(["core", "supporting"]).optional(),
|
|
12593
|
+
files: z18.array(
|
|
12594
|
+
z18.strictObject({
|
|
12595
|
+
path: z18.string().min(1).max(500).describe(
|
|
12396
12596
|
"A file the PR's diff actually changed. Context files you merely read are rejected."
|
|
12397
12597
|
),
|
|
12398
|
-
startLine:
|
|
12399
|
-
endLine:
|
|
12400
|
-
hunkHeader:
|
|
12598
|
+
startLine: z18.number().int().positive().max(1e6).optional(),
|
|
12599
|
+
endLine: z18.number().int().positive().max(1e6).optional(),
|
|
12600
|
+
hunkHeader: z18.string().min(1).max(300).optional().describe(
|
|
12401
12601
|
"Optional anchor, matched byte-exactly against the full hunk header line from `git diff` INCLUDING the context text after the second @@. Copy it verbatim from `git diff <base>..HEAD -- <file> | grep '^@@'`, or omit anchors entirely (path-only entries always validate)."
|
|
12402
12602
|
)
|
|
12403
12603
|
})
|
|
@@ -12472,8 +12672,8 @@ function buildApproveCodeReviewTool(connection) {
|
|
|
12472
12672
|
"Approve the code review and exit. Use when the diff passes all review criteria. Requires a summary and a risk level \u2014 for changes, use request_code_changes with a structured issues[] list.",
|
|
12473
12673
|
{
|
|
12474
12674
|
reviewedSha: reviewedShaSchema,
|
|
12475
|
-
summary:
|
|
12476
|
-
risk:
|
|
12675
|
+
summary: z18.string().describe("Brief summary of what was reviewed and why it looks good"),
|
|
12676
|
+
risk: z18.enum(RISK_LEVELS2).describe(riskDescription)
|
|
12477
12677
|
},
|
|
12478
12678
|
async ({ reviewedSha, summary, risk }) => {
|
|
12479
12679
|
const content = `**Code Review: Approved** :white_check_mark:
|
|
@@ -12504,16 +12704,16 @@ function buildRequestCodeChangesTool(connection) {
|
|
|
12504
12704
|
"Request changes during code review and exit. Use when substantive issues must be fixed before merge. Each issue: { file, line?, severity: critical|major|minor, description }.",
|
|
12505
12705
|
{
|
|
12506
12706
|
reviewedSha: reviewedShaSchema,
|
|
12507
|
-
issues:
|
|
12508
|
-
|
|
12509
|
-
file:
|
|
12510
|
-
line:
|
|
12511
|
-
severity:
|
|
12512
|
-
description:
|
|
12707
|
+
issues: z18.array(
|
|
12708
|
+
z18.object({
|
|
12709
|
+
file: z18.string().describe("File path where the issue was found"),
|
|
12710
|
+
line: z18.number().optional().describe("Line number (if applicable)"),
|
|
12711
|
+
severity: z18.enum(["critical", "major", "minor"]).describe("Issue severity"),
|
|
12712
|
+
description: z18.string().describe("What is wrong and how to fix it")
|
|
12513
12713
|
})
|
|
12514
12714
|
).describe("List of issues found during review"),
|
|
12515
|
-
summary:
|
|
12516
|
-
risk:
|
|
12715
|
+
summary: z18.string().describe("Brief overall summary of the review findings"),
|
|
12716
|
+
risk: z18.enum(RISK_LEVELS2).describe(riskDescription)
|
|
12517
12717
|
},
|
|
12518
12718
|
async ({ reviewedSha, issues, summary, risk }) => {
|
|
12519
12719
|
const issueLines = issues.map((issue) => {
|
|
@@ -12556,7 +12756,7 @@ function buildCodeReviewTools(connection) {
|
|
|
12556
12756
|
// src/tools/index.ts
|
|
12557
12757
|
function getTaskModeTools(agentMode, connection) {
|
|
12558
12758
|
if (agentMode === "discovery" || agentMode === "auto" || agentMode === "building" || agentMode === "chat") {
|
|
12559
|
-
return
|
|
12759
|
+
return buildPmTools(connection, { includePackTools: false });
|
|
12560
12760
|
}
|
|
12561
12761
|
return [];
|
|
12562
12762
|
}
|
|
@@ -12602,11 +12802,9 @@ var ALWAYS_LOADED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
12602
12802
|
"publish_review_guide",
|
|
12603
12803
|
// Review mode
|
|
12604
12804
|
"approve_code_review",
|
|
12605
|
-
"request_code_changes"
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
// trips in one session). The whole orchestration loop (list → promote/assign
|
|
12609
|
-
// → fire → merge/stop) is called by virtually every pack session.
|
|
12805
|
+
"request_code_changes"
|
|
12806
|
+
]);
|
|
12807
|
+
var ORCHESTRATION_PROMOTED_TOOLS = /* @__PURE__ */ new Set([
|
|
12610
12808
|
"list_subtasks",
|
|
12611
12809
|
"update_subtask",
|
|
12612
12810
|
"start_child_cloud_build",
|
|
@@ -12625,7 +12823,10 @@ var PACK_PROMOTED_TOOLS = /* @__PURE__ */ new Set(["get_execution_logs"]);
|
|
|
12625
12823
|
function glossaryToolsFor(connection, config, context) {
|
|
12626
12824
|
return context?.projectId ? buildGlossaryTools(connection, context.projectId, config.taskId, config.workspaceDir) : [];
|
|
12627
12825
|
}
|
|
12628
|
-
function
|
|
12826
|
+
function driveToolsFor(connection, context) {
|
|
12827
|
+
return context?.projectId && context.googleDriveConnected ? buildDriveTools(connection, context.projectId) : [];
|
|
12828
|
+
}
|
|
12829
|
+
function promotedToolsFor(effectiveMode, isPack, isProjectAgent) {
|
|
12629
12830
|
const names = /* @__PURE__ */ new Set();
|
|
12630
12831
|
if (effectiveMode === "building" || effectiveMode === "auto") {
|
|
12631
12832
|
for (const name of BUILDING_PROMOTED_TOOLS) names.add(name);
|
|
@@ -12636,6 +12837,9 @@ function promotedToolsFor(effectiveMode, isPack) {
|
|
|
12636
12837
|
if (isPack) {
|
|
12637
12838
|
for (const name of PACK_PROMOTED_TOOLS) names.add(name);
|
|
12638
12839
|
}
|
|
12840
|
+
if (isPack || isProjectAgent) {
|
|
12841
|
+
for (const name of ORCHESTRATION_PROMOTED_TOOLS) names.add(name);
|
|
12842
|
+
}
|
|
12639
12843
|
return names;
|
|
12640
12844
|
}
|
|
12641
12845
|
function withAlwaysLoad(tools, promoted) {
|
|
@@ -12653,6 +12857,7 @@ function buildConveyorTools(connection, config, context, agentMode) {
|
|
|
12653
12857
|
const handoffTools = config.mode === "pm" && (effectiveMode === "discovery" || effectiveMode === "auto") ? [buildHandoffTool(connection)] : [];
|
|
12654
12858
|
const emergencyTools = [buildForceUpdateTaskStatusTool(connection)];
|
|
12655
12859
|
const glossaryTools = glossaryToolsFor(connection, config, context);
|
|
12860
|
+
const driveTools = driveToolsFor(connection, context);
|
|
12656
12861
|
const isPack = config.mode === "pack" || Boolean(context?.isParentTask);
|
|
12657
12862
|
return withAlwaysLoad(
|
|
12658
12863
|
[
|
|
@@ -12663,9 +12868,10 @@ function buildConveyorTools(connection, config, context, agentMode) {
|
|
|
12663
12868
|
...prGuideTools,
|
|
12664
12869
|
...handoffTools,
|
|
12665
12870
|
...glossaryTools,
|
|
12871
|
+
...driveTools,
|
|
12666
12872
|
...emergencyTools
|
|
12667
12873
|
],
|
|
12668
|
-
promotedToolsFor(effectiveMode, isPack)
|
|
12874
|
+
promotedToolsFor(effectiveMode, isPack, config.mode === "pm")
|
|
12669
12875
|
);
|
|
12670
12876
|
}
|
|
12671
12877
|
function createConveyorMcpServer(harness, connection, config, context, agentMode) {
|
|
@@ -16563,4 +16769,4 @@ export {
|
|
|
16563
16769
|
loadConveyorConfig,
|
|
16564
16770
|
unshallowRepo
|
|
16565
16771
|
};
|
|
16566
|
-
//# sourceMappingURL=chunk-
|
|
16772
|
+
//# sourceMappingURL=chunk-YSALHJTS.js.map
|