@rallycry/conveyor-agent 10.13.61 → 10.13.63
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.
|
@@ -1882,6 +1882,28 @@ var projectCheckpointSettingsSchema = z.object({
|
|
|
1882
1882
|
}
|
|
1883
1883
|
});
|
|
1884
1884
|
var TUI_KINDS = ["claude-code", "opencode"];
|
|
1885
|
+
var ACHIEVEMENT_RARITIES = [
|
|
1886
|
+
{
|
|
1887
|
+
key: "common",
|
|
1888
|
+
name: "Common",
|
|
1889
|
+
color: "#22c55e",
|
|
1890
|
+
iconPath: "/storypoints/square-solid-full.svg"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
key: "magic",
|
|
1894
|
+
name: "Magic",
|
|
1895
|
+
color: "#3b82f6",
|
|
1896
|
+
iconPath: "/storypoints/diamond-solid-full.svg"
|
|
1897
|
+
},
|
|
1898
|
+
{ key: "rare", name: "Rare", color: "#eab308", iconPath: "/storypoints/gem-solid-full.svg" },
|
|
1899
|
+
{
|
|
1900
|
+
key: "unique",
|
|
1901
|
+
name: "Unique",
|
|
1902
|
+
color: "#f97316",
|
|
1903
|
+
iconPath: "/storypoints/scroll-sharp-solid-full.svg"
|
|
1904
|
+
},
|
|
1905
|
+
{ key: "pack", name: "Pack", color: "#9c27b0", iconPath: "/storypoints/pack.svg" }
|
|
1906
|
+
];
|
|
1885
1907
|
var RISK_LEVELS = ["critical", "high", "medium", "low"];
|
|
1886
1908
|
var riskLevelSchema = z2.enum(RISK_LEVELS);
|
|
1887
1909
|
var DEFAULT_RISK_LEVELS = [
|
|
@@ -2797,6 +2819,40 @@ var QueryProjectGrafanaLogsRequestSchema = z5.object({
|
|
|
2797
2819
|
endTime: z5.string().optional(),
|
|
2798
2820
|
limit: z5.number().int().min(1).max(200).optional().default(50)
|
|
2799
2821
|
});
|
|
2822
|
+
var driveFileNameSchema = z5.string().min(1).max(255).regex(/^[^/\\\r\n]+$/, "File names cannot contain slashes or line breaks");
|
|
2823
|
+
var DRIVE_MAX_CONTENT_CHARS = 1e6;
|
|
2824
|
+
var ListProjectDriveFilesRequestSchema = z5.object({
|
|
2825
|
+
projectId: z5.string(),
|
|
2826
|
+
folderId: z5.string().max(200).optional(),
|
|
2827
|
+
search: z5.string().max(200).optional(),
|
|
2828
|
+
limit: z5.number().int().min(1).max(200).optional()
|
|
2829
|
+
});
|
|
2830
|
+
var ReadProjectDriveFileRequestSchema = z5.object({
|
|
2831
|
+
projectId: z5.string(),
|
|
2832
|
+
fileId: z5.string().min(1).max(200)
|
|
2833
|
+
});
|
|
2834
|
+
var CreateProjectDriveFileRequestSchema = z5.object({
|
|
2835
|
+
projectId: z5.string(),
|
|
2836
|
+
name: driveFileNameSchema,
|
|
2837
|
+
content: z5.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2838
|
+
mimeType: z5.string().max(200).optional(),
|
|
2839
|
+
folderId: z5.string().max(200).optional()
|
|
2840
|
+
});
|
|
2841
|
+
var UpdateProjectDriveFileRequestSchema = z5.object({
|
|
2842
|
+
projectId: z5.string(),
|
|
2843
|
+
fileId: z5.string().min(1).max(200),
|
|
2844
|
+
content: z5.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2845
|
+
mimeType: z5.string().max(200).optional()
|
|
2846
|
+
});
|
|
2847
|
+
var DeleteProjectDriveFileRequestSchema = z5.object({
|
|
2848
|
+
projectId: z5.string(),
|
|
2849
|
+
fileId: z5.string().min(1).max(200)
|
|
2850
|
+
});
|
|
2851
|
+
var CreateProjectDriveFolderRequestSchema = z5.object({
|
|
2852
|
+
projectId: z5.string(),
|
|
2853
|
+
name: driveFileNameSchema,
|
|
2854
|
+
folderId: z5.string().max(200).optional()
|
|
2855
|
+
});
|
|
2800
2856
|
var StartProjectBuildRequestSchema = z5.object({
|
|
2801
2857
|
projectId: z5.string(),
|
|
2802
2858
|
taskId: z5.string(),
|
|
@@ -3563,6 +3619,15 @@ var MIRRORABLE_SIDECARS = Object.fromEntries(
|
|
|
3563
3619
|
return mirror ? [[dep, mirror]] : [];
|
|
3564
3620
|
})
|
|
3565
3621
|
);
|
|
3622
|
+
var LEVELS_PER_BAND = 100;
|
|
3623
|
+
var PRESTIGE_TIERS = ACHIEVEMENT_RARITIES.map((rarity, index) => ({
|
|
3624
|
+
prestige: index + 1,
|
|
3625
|
+
name: rarity.name,
|
|
3626
|
+
color: rarity.color,
|
|
3627
|
+
iconPath: rarity.iconPath,
|
|
3628
|
+
minLevel: (index + 1) * LEVELS_PER_BAND
|
|
3629
|
+
}));
|
|
3630
|
+
var TOP_PRESTIGE_BAND = PRESTIGE_TIERS.length;
|
|
3566
3631
|
var PRE_BUILD_TASK_STATUSES = /* @__PURE__ */ new Set(["Planning", "Open"]);
|
|
3567
3632
|
function hasTaskPlan(plan) {
|
|
3568
3633
|
return !!plan?.trim();
|
|
@@ -9943,14 +10008,14 @@ var f = {
|
|
|
9943
10008
|
return { kind: "nullable", inner };
|
|
9944
10009
|
}
|
|
9945
10010
|
};
|
|
9946
|
-
function compileString(
|
|
9947
|
-
let schema =
|
|
10011
|
+
function compileString(z19, spec) {
|
|
10012
|
+
let schema = z19.string();
|
|
9948
10013
|
if (spec.min !== void 0) schema = schema.min(spec.min);
|
|
9949
10014
|
if (spec.max !== void 0) schema = schema.max(spec.max);
|
|
9950
10015
|
return schema;
|
|
9951
10016
|
}
|
|
9952
|
-
function compileNumber(
|
|
9953
|
-
let schema =
|
|
10017
|
+
function compileNumber(z19, spec) {
|
|
10018
|
+
let schema = z19.number();
|
|
9954
10019
|
if (spec.int) schema = schema.int();
|
|
9955
10020
|
if (spec.positive) schema = schema.positive();
|
|
9956
10021
|
if (spec.nonnegative) schema = schema.nonnegative();
|
|
@@ -9958,41 +10023,41 @@ function compileNumber(z18, spec) {
|
|
|
9958
10023
|
if (spec.max !== void 0) schema = schema.max(spec.max);
|
|
9959
10024
|
return schema;
|
|
9960
10025
|
}
|
|
9961
|
-
function compileArray(
|
|
9962
|
-
let schema =
|
|
10026
|
+
function compileArray(z19, spec) {
|
|
10027
|
+
let schema = z19.array(compileField(z19, spec.item));
|
|
9963
10028
|
if (spec.min !== void 0) schema = schema.min(spec.min);
|
|
9964
10029
|
return schema;
|
|
9965
10030
|
}
|
|
9966
|
-
function compileBase(
|
|
10031
|
+
function compileBase(z19, spec) {
|
|
9967
10032
|
switch (spec.kind) {
|
|
9968
10033
|
case "string":
|
|
9969
|
-
return compileString(
|
|
10034
|
+
return compileString(z19, spec);
|
|
9970
10035
|
case "number":
|
|
9971
|
-
return compileNumber(
|
|
10036
|
+
return compileNumber(z19, spec);
|
|
9972
10037
|
case "boolean":
|
|
9973
|
-
return
|
|
10038
|
+
return z19.boolean();
|
|
9974
10039
|
case "enum":
|
|
9975
|
-
return
|
|
10040
|
+
return z19.enum([...spec.values]);
|
|
9976
10041
|
case "array":
|
|
9977
|
-
return compileArray(
|
|
10042
|
+
return compileArray(z19, spec);
|
|
9978
10043
|
case "object":
|
|
9979
|
-
return
|
|
10044
|
+
return z19.object(compileShape(z19, spec.fields));
|
|
9980
10045
|
}
|
|
9981
10046
|
}
|
|
9982
|
-
function compileField(
|
|
10047
|
+
function compileField(z19, spec) {
|
|
9983
10048
|
if (spec.kind === "optional") {
|
|
9984
|
-
return compileField(
|
|
10049
|
+
return compileField(z19, spec.inner).optional();
|
|
9985
10050
|
}
|
|
9986
10051
|
if (spec.kind === "nullable") {
|
|
9987
|
-
return compileField(
|
|
10052
|
+
return compileField(z19, spec.inner).nullable();
|
|
9988
10053
|
}
|
|
9989
|
-
const schema = compileBase(
|
|
10054
|
+
const schema = compileBase(z19, spec);
|
|
9990
10055
|
return spec.desc === void 0 ? schema : schema.describe(spec.desc);
|
|
9991
10056
|
}
|
|
9992
|
-
function compileShape(
|
|
10057
|
+
function compileShape(z19, fields) {
|
|
9993
10058
|
const shape = {};
|
|
9994
10059
|
for (const [key, spec] of Object.entries(fields)) {
|
|
9995
|
-
shape[key] = compileField(
|
|
10060
|
+
shape[key] = compileField(z19, spec);
|
|
9996
10061
|
}
|
|
9997
10062
|
return shape;
|
|
9998
10063
|
}
|
|
@@ -10193,13 +10258,13 @@ var tagRef = f.string({
|
|
|
10193
10258
|
var getTagContract = defineToolContract({
|
|
10194
10259
|
name: "get_tag",
|
|
10195
10260
|
agent: {
|
|
10196
|
-
description: "Read one tag's full glossary entry: description, the full markdown overview (the term's spec \u2014 philosophy, mechanics, invariants), linked files/rules (each with its verified-link status \u2014 ok/stale/unchecked \u2014 from the periodic repo check), parent/child tags, active-card count, attachment count (files labelled as examples of the term), and recent revisions with their reasons. Call this whenever a chat message, plan, or tag list points at a term you need the full context for. A response with `overviewPath` set means the overview is sourced from that repo file \u2014 prefer Reading the path from your checkout (branch-correct); the served overview is the base
|
|
10261
|
+
description: "Read one tag's full glossary entry: description, the full markdown overview (the term's spec \u2014 philosophy, mechanics, invariants), linked files/rules (each with its verified-link status \u2014 ok/stale/unchecked \u2014 from the periodic repo check), parent/child tags, active-card count, attachment count (files labelled as examples of the term), and recent revisions with their reasons. Call this whenever a chat message, plan, or tag list points at a term you need the full context for. A response with `overviewPath` set means the overview is sourced from that repo file \u2014 prefer Reading the path from your checkout (branch-correct); the served overview is materialized from the project's dev branch (the PR base; default branch when the repo has no dev branch) (`overviewSource.state`: ok/pending/stale).",
|
|
10197
10262
|
fields: {
|
|
10198
10263
|
tag: tagRef
|
|
10199
10264
|
}
|
|
10200
10265
|
},
|
|
10201
10266
|
mcp: {
|
|
10202
|
-
description: "Read one tag's full glossary entry \u2014 description, markdown overview, context links (each with its verified-link status: ok/stale/unchecked plus last-checked provenance), parent/child tags, active-card count, attachment count (files labelled as examples of the term \u2014 read the tiles with list_tag_attachments), and recent revisions with provenance. A response with `overviewPath` set means the overview is sourced from that repo file at the base branch (`overviewSource.state`: ok/pending/stale) \u2014 clients with a checkout can read the path directly for the branch-correct copy. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
10267
|
+
description: "Read one tag's full glossary entry \u2014 description, markdown overview, context links (each with its verified-link status: ok/stale/unchecked plus last-checked provenance), parent/child tags, active-card count, attachment count (files labelled as examples of the term \u2014 read the tiles with list_tag_attachments), and recent revisions with provenance. A response with `overviewPath` set means the overview is sourced from that repo file at the project's dev branch (the PR base; default branch when the repo has no dev branch) (`overviewSource.state`: ok/pending/stale) \u2014 clients with a checkout can read the path directly for the branch-correct copy. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
10203
10268
|
fields: {
|
|
10204
10269
|
projectId: mcpProjectId,
|
|
10205
10270
|
tag: tagRef
|
|
@@ -11372,6 +11437,8 @@ var MIME_BY_EXT = {
|
|
|
11372
11437
|
".txt": "text/plain",
|
|
11373
11438
|
".log": "text/plain",
|
|
11374
11439
|
".md": "text/markdown",
|
|
11440
|
+
".mmd": "text/vnd.mermaid",
|
|
11441
|
+
".mermaid": "text/vnd.mermaid",
|
|
11375
11442
|
".csv": "text/csv",
|
|
11376
11443
|
".html": "text/html",
|
|
11377
11444
|
".css": "text/css",
|
|
@@ -12334,10 +12401,165 @@ function buildProjectTools(connection, projectId, workspaceDir) {
|
|
|
12334
12401
|
];
|
|
12335
12402
|
}
|
|
12336
12403
|
|
|
12404
|
+
// src/tools/drive-tools.ts
|
|
12405
|
+
import { z as z17 } from "zod";
|
|
12406
|
+
var MAX_CONTENT_CHARS = 1e6;
|
|
12407
|
+
var MAX_READ_CHARS = 1e5;
|
|
12408
|
+
function errText2(prefix, error) {
|
|
12409
|
+
return textResult(`${prefix}: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
12410
|
+
}
|
|
12411
|
+
function buildDriveListFilesTool(connection, projectId) {
|
|
12412
|
+
return defineTool(
|
|
12413
|
+
"drive_list_files",
|
|
12414
|
+
"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.",
|
|
12415
|
+
{
|
|
12416
|
+
folderId: z17.string().optional().describe("Folder to list. Defaults to the project's connected root folder."),
|
|
12417
|
+
search: z17.string().max(200).optional().describe("Only return names containing this text"),
|
|
12418
|
+
limit: z17.number().int().min(1).max(200).optional().describe("Max entries (default 100)")
|
|
12419
|
+
},
|
|
12420
|
+
async ({ folderId, search, limit }) => {
|
|
12421
|
+
try {
|
|
12422
|
+
const result = await connection.call("listProjectDriveFiles", {
|
|
12423
|
+
projectId,
|
|
12424
|
+
folderId,
|
|
12425
|
+
search,
|
|
12426
|
+
limit
|
|
12427
|
+
});
|
|
12428
|
+
return textResult(JSON.stringify(result, null, 2));
|
|
12429
|
+
} catch (error) {
|
|
12430
|
+
return errText2("Failed to list Google Drive files", error);
|
|
12431
|
+
}
|
|
12432
|
+
},
|
|
12433
|
+
{ annotations: { readOnlyHint: true } }
|
|
12434
|
+
);
|
|
12435
|
+
}
|
|
12436
|
+
function buildDriveReadFileTool(connection, projectId) {
|
|
12437
|
+
return defineTool(
|
|
12438
|
+
"drive_read_file",
|
|
12439
|
+
"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.",
|
|
12440
|
+
{ fileId: z17.string().describe("Drive file id, as returned by drive_list_files") },
|
|
12441
|
+
async ({ fileId }) => {
|
|
12442
|
+
try {
|
|
12443
|
+
const result = await connection.call("readProjectDriveFile", { projectId, fileId });
|
|
12444
|
+
const overReadCap = result.content.length > MAX_READ_CHARS;
|
|
12445
|
+
const content = overReadCap ? result.content.slice(0, MAX_READ_CHARS) : result.content;
|
|
12446
|
+
const notes = [
|
|
12447
|
+
result.exported ? "(exported from a Google-native document)" : null,
|
|
12448
|
+
result.truncated || overReadCap ? "(truncated at the 100 KB read limit)" : null
|
|
12449
|
+
].filter(Boolean);
|
|
12450
|
+
const header = `${result.file.name} ${notes.join(" ")}`.trim();
|
|
12451
|
+
return textResult(`${header}
|
|
12452
|
+
|
|
12453
|
+
${content}`);
|
|
12454
|
+
} catch (error) {
|
|
12455
|
+
return errText2("Failed to read the Google Drive file", error);
|
|
12456
|
+
}
|
|
12457
|
+
},
|
|
12458
|
+
{ annotations: { readOnlyHint: true } }
|
|
12459
|
+
);
|
|
12460
|
+
}
|
|
12461
|
+
function buildDriveCreateFileTool(connection, projectId) {
|
|
12462
|
+
return defineTool(
|
|
12463
|
+
"drive_create_file",
|
|
12464
|
+
"Create a new file in the project's connected Google Drive folder. Use drive_update_file to change an existing file instead.",
|
|
12465
|
+
{
|
|
12466
|
+
name: z17.string().min(1).max(255).describe("File name, without any path separators"),
|
|
12467
|
+
content: z17.string().max(MAX_CONTENT_CHARS).describe("File content, UTF-8 text"),
|
|
12468
|
+
mimeType: z17.string().optional().describe("MIME type (default text/plain)"),
|
|
12469
|
+
folderId: z17.string().optional().describe("Destination folder. Defaults to the project's connected root folder.")
|
|
12470
|
+
},
|
|
12471
|
+
async ({ name, content, mimeType, folderId }) => {
|
|
12472
|
+
try {
|
|
12473
|
+
const file = await connection.call("createProjectDriveFile", {
|
|
12474
|
+
projectId,
|
|
12475
|
+
name,
|
|
12476
|
+
content,
|
|
12477
|
+
mimeType,
|
|
12478
|
+
folderId
|
|
12479
|
+
});
|
|
12480
|
+
return textResult(`Created "${file.name}" (${file.id})`);
|
|
12481
|
+
} catch (error) {
|
|
12482
|
+
return errText2("Failed to create the Google Drive file", error);
|
|
12483
|
+
}
|
|
12484
|
+
}
|
|
12485
|
+
);
|
|
12486
|
+
}
|
|
12487
|
+
function buildDriveUpdateFileTool(connection, projectId) {
|
|
12488
|
+
return defineTool(
|
|
12489
|
+
"drive_update_file",
|
|
12490
|
+
"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.",
|
|
12491
|
+
{
|
|
12492
|
+
fileId: z17.string().describe("Drive file id, as returned by drive_list_files"),
|
|
12493
|
+
content: z17.string().max(MAX_CONTENT_CHARS).describe("Replacement content, UTF-8 text"),
|
|
12494
|
+
mimeType: z17.string().optional().describe("MIME type (defaults to the file's current type)")
|
|
12495
|
+
},
|
|
12496
|
+
async ({ fileId, content, mimeType }) => {
|
|
12497
|
+
try {
|
|
12498
|
+
const file = await connection.call("updateProjectDriveFile", {
|
|
12499
|
+
projectId,
|
|
12500
|
+
fileId,
|
|
12501
|
+
content,
|
|
12502
|
+
mimeType
|
|
12503
|
+
});
|
|
12504
|
+
return textResult(`Updated "${file.name}" (${file.id})`);
|
|
12505
|
+
} catch (error) {
|
|
12506
|
+
return errText2("Failed to update the Google Drive file", error);
|
|
12507
|
+
}
|
|
12508
|
+
}
|
|
12509
|
+
);
|
|
12510
|
+
}
|
|
12511
|
+
function buildDriveDeleteFileTool(connection, projectId) {
|
|
12512
|
+
return defineTool(
|
|
12513
|
+
"drive_delete_file",
|
|
12514
|
+
"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.",
|
|
12515
|
+
{ fileId: z17.string().describe("Drive file id, as returned by drive_list_files") },
|
|
12516
|
+
async ({ fileId }) => {
|
|
12517
|
+
try {
|
|
12518
|
+
const result = await connection.call("deleteProjectDriveFile", { projectId, fileId });
|
|
12519
|
+
return textResult(`Moved "${result.name}" (${result.id}) to the Google Drive trash`);
|
|
12520
|
+
} catch (error) {
|
|
12521
|
+
return errText2("Failed to delete the Google Drive file", error);
|
|
12522
|
+
}
|
|
12523
|
+
}
|
|
12524
|
+
);
|
|
12525
|
+
}
|
|
12526
|
+
function buildDriveCreateFolderTool(connection, projectId) {
|
|
12527
|
+
return defineTool(
|
|
12528
|
+
"drive_create_folder",
|
|
12529
|
+
"Create a folder inside the project's connected Google Drive folder.",
|
|
12530
|
+
{
|
|
12531
|
+
name: z17.string().min(1).max(255).describe("Folder name, without any path separators"),
|
|
12532
|
+
folderId: z17.string().optional().describe("Parent folder. Defaults to the project's connected root folder.")
|
|
12533
|
+
},
|
|
12534
|
+
async ({ name, folderId }) => {
|
|
12535
|
+
try {
|
|
12536
|
+
const folder = await connection.call("createProjectDriveFolder", {
|
|
12537
|
+
projectId,
|
|
12538
|
+
name,
|
|
12539
|
+
folderId
|
|
12540
|
+
});
|
|
12541
|
+
return textResult(`Created folder "${folder.name}" (${folder.id})`);
|
|
12542
|
+
} catch (error) {
|
|
12543
|
+
return errText2("Failed to create the Google Drive folder", error);
|
|
12544
|
+
}
|
|
12545
|
+
}
|
|
12546
|
+
);
|
|
12547
|
+
}
|
|
12548
|
+
function buildDriveTools(connection, projectId) {
|
|
12549
|
+
return [
|
|
12550
|
+
buildDriveListFilesTool(connection, projectId),
|
|
12551
|
+
buildDriveReadFileTool(connection, projectId),
|
|
12552
|
+
buildDriveCreateFileTool(connection, projectId),
|
|
12553
|
+
buildDriveUpdateFileTool(connection, projectId),
|
|
12554
|
+
buildDriveDeleteFileTool(connection, projectId),
|
|
12555
|
+
buildDriveCreateFolderTool(connection, projectId)
|
|
12556
|
+
];
|
|
12557
|
+
}
|
|
12558
|
+
|
|
12337
12559
|
// src/tools/code-review-tools.ts
|
|
12338
12560
|
import { execFile as execFile2 } from "child_process";
|
|
12339
12561
|
import { promisify as promisify2 } from "util";
|
|
12340
|
-
import { z as
|
|
12562
|
+
import { z as z18 } from "zod";
|
|
12341
12563
|
async function endReviewSession(connection, reason) {
|
|
12342
12564
|
await connection.call("endReviewSession", {
|
|
12343
12565
|
sessionId: connection.sessionId,
|
|
@@ -12345,26 +12567,26 @@ async function endReviewSession(connection, reason) {
|
|
|
12345
12567
|
});
|
|
12346
12568
|
}
|
|
12347
12569
|
var RISK_LEVELS2 = ["critical", "high", "medium", "low"];
|
|
12348
|
-
var reviewedShaSchema =
|
|
12570
|
+
var reviewedShaSchema = z18.string().regex(/^[0-9a-f]{40}$/i).describe("REQUIRED. The full 40-character commit SHA this verdict reviews.");
|
|
12349
12571
|
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.";
|
|
12350
|
-
var ReviewGuideToolSchema =
|
|
12351
|
-
reviewedSha:
|
|
12572
|
+
var ReviewGuideToolSchema = z18.strictObject({
|
|
12573
|
+
reviewedSha: z18.string().regex(/^[0-9a-f]{40}$/i).describe(
|
|
12352
12574
|
"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."
|
|
12353
12575
|
),
|
|
12354
|
-
overview:
|
|
12355
|
-
sections:
|
|
12356
|
-
|
|
12357
|
-
title:
|
|
12358
|
-
explanation:
|
|
12359
|
-
classification:
|
|
12360
|
-
files:
|
|
12361
|
-
|
|
12362
|
-
path:
|
|
12576
|
+
overview: z18.string().min(1).max(6e4).describe("REQUIRED. Plain-text walkthrough intro, max 3000 characters. Keep it short."),
|
|
12577
|
+
sections: z18.array(
|
|
12578
|
+
z18.strictObject({
|
|
12579
|
+
title: z18.string().min(1).max(160),
|
|
12580
|
+
explanation: z18.string().min(1).max(2e3),
|
|
12581
|
+
classification: z18.enum(["core", "supporting"]).optional(),
|
|
12582
|
+
files: z18.array(
|
|
12583
|
+
z18.strictObject({
|
|
12584
|
+
path: z18.string().min(1).max(500).describe(
|
|
12363
12585
|
"A file the PR's diff actually changed. Context files you merely read are rejected."
|
|
12364
12586
|
),
|
|
12365
|
-
startLine:
|
|
12366
|
-
endLine:
|
|
12367
|
-
hunkHeader:
|
|
12587
|
+
startLine: z18.number().int().positive().max(1e6).optional(),
|
|
12588
|
+
endLine: z18.number().int().positive().max(1e6).optional(),
|
|
12589
|
+
hunkHeader: z18.string().min(1).max(300).optional().describe(
|
|
12368
12590
|
"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)."
|
|
12369
12591
|
)
|
|
12370
12592
|
})
|
|
@@ -12439,8 +12661,8 @@ function buildApproveCodeReviewTool(connection) {
|
|
|
12439
12661
|
"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.",
|
|
12440
12662
|
{
|
|
12441
12663
|
reviewedSha: reviewedShaSchema,
|
|
12442
|
-
summary:
|
|
12443
|
-
risk:
|
|
12664
|
+
summary: z18.string().describe("Brief summary of what was reviewed and why it looks good"),
|
|
12665
|
+
risk: z18.enum(RISK_LEVELS2).describe(riskDescription)
|
|
12444
12666
|
},
|
|
12445
12667
|
async ({ reviewedSha, summary, risk }) => {
|
|
12446
12668
|
const content = `**Code Review: Approved** :white_check_mark:
|
|
@@ -12471,16 +12693,16 @@ function buildRequestCodeChangesTool(connection) {
|
|
|
12471
12693
|
"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 }.",
|
|
12472
12694
|
{
|
|
12473
12695
|
reviewedSha: reviewedShaSchema,
|
|
12474
|
-
issues:
|
|
12475
|
-
|
|
12476
|
-
file:
|
|
12477
|
-
line:
|
|
12478
|
-
severity:
|
|
12479
|
-
description:
|
|
12696
|
+
issues: z18.array(
|
|
12697
|
+
z18.object({
|
|
12698
|
+
file: z18.string().describe("File path where the issue was found"),
|
|
12699
|
+
line: z18.number().optional().describe("Line number (if applicable)"),
|
|
12700
|
+
severity: z18.enum(["critical", "major", "minor"]).describe("Issue severity"),
|
|
12701
|
+
description: z18.string().describe("What is wrong and how to fix it")
|
|
12480
12702
|
})
|
|
12481
12703
|
).describe("List of issues found during review"),
|
|
12482
|
-
summary:
|
|
12483
|
-
risk:
|
|
12704
|
+
summary: z18.string().describe("Brief overall summary of the review findings"),
|
|
12705
|
+
risk: z18.enum(RISK_LEVELS2).describe(riskDescription)
|
|
12484
12706
|
},
|
|
12485
12707
|
async ({ reviewedSha, issues, summary, risk }) => {
|
|
12486
12708
|
const issueLines = issues.map((issue) => {
|
|
@@ -12592,6 +12814,9 @@ var PACK_PROMOTED_TOOLS = /* @__PURE__ */ new Set(["get_execution_logs"]);
|
|
|
12592
12814
|
function glossaryToolsFor(connection, config, context) {
|
|
12593
12815
|
return context?.projectId ? buildGlossaryTools(connection, context.projectId, config.taskId, config.workspaceDir) : [];
|
|
12594
12816
|
}
|
|
12817
|
+
function driveToolsFor(connection, context) {
|
|
12818
|
+
return context?.projectId && context.googleDriveConnected ? buildDriveTools(connection, context.projectId) : [];
|
|
12819
|
+
}
|
|
12595
12820
|
function promotedToolsFor(effectiveMode, isPack) {
|
|
12596
12821
|
const names = /* @__PURE__ */ new Set();
|
|
12597
12822
|
if (effectiveMode === "building" || effectiveMode === "auto") {
|
|
@@ -12620,6 +12845,7 @@ function buildConveyorTools(connection, config, context, agentMode) {
|
|
|
12620
12845
|
const handoffTools = config.mode === "pm" && (effectiveMode === "discovery" || effectiveMode === "auto") ? [buildHandoffTool(connection)] : [];
|
|
12621
12846
|
const emergencyTools = [buildForceUpdateTaskStatusTool(connection)];
|
|
12622
12847
|
const glossaryTools = glossaryToolsFor(connection, config, context);
|
|
12848
|
+
const driveTools = driveToolsFor(connection, context);
|
|
12623
12849
|
const isPack = config.mode === "pack" || Boolean(context?.isParentTask);
|
|
12624
12850
|
return withAlwaysLoad(
|
|
12625
12851
|
[
|
|
@@ -12630,6 +12856,7 @@ function buildConveyorTools(connection, config, context, agentMode) {
|
|
|
12630
12856
|
...prGuideTools,
|
|
12631
12857
|
...handoffTools,
|
|
12632
12858
|
...glossaryTools,
|
|
12859
|
+
...driveTools,
|
|
12633
12860
|
...emergencyTools
|
|
12634
12861
|
],
|
|
12635
12862
|
promotedToolsFor(effectiveMode, isPack)
|
|
@@ -16530,4 +16757,4 @@ export {
|
|
|
16530
16757
|
loadConveyorConfig,
|
|
16531
16758
|
unshallowRepo
|
|
16532
16759
|
};
|
|
16533
|
-
//# sourceMappingURL=chunk-
|
|
16760
|
+
//# sourceMappingURL=chunk-ELGNA6SP.js.map
|