@rallycry/conveyor-agent 8.6.0 → 8.8.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.
@@ -1491,6 +1491,11 @@ var GetSuggestionsRequestSchema = z.object({
1491
1491
  var ListManualTestsRequestSchema = z.object({
1492
1492
  sessionId: z.string()
1493
1493
  });
1494
+ var QueryManualTestsRequestSchema = z.object({
1495
+ sessionId: z.string(),
1496
+ cardStatuses: z.array(z.string()).optional(),
1497
+ testStatuses: z.array(z.enum(["open", "approved", "rejected"])).optional()
1498
+ });
1494
1499
  var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z.string() });
1495
1500
  var RequestFileUploadRequestSchema = z.object({
1496
1501
  sessionId: z.string(),
@@ -1525,6 +1530,15 @@ var RemoveManualTestRequestSchema = z.object({
1525
1530
  sessionId: z.string(),
1526
1531
  title: z.string().min(1)
1527
1532
  });
1533
+ var ApproveManualTestRequestSchema = z.object({
1534
+ sessionId: z.string(),
1535
+ title: z.string().min(1)
1536
+ });
1537
+ var RejectManualTestRequestSchema = z.object({
1538
+ sessionId: z.string(),
1539
+ title: z.string().min(1),
1540
+ reason: z.string().min(1).max(2e3)
1541
+ });
1528
1542
  var TrackSpendingRequestSchema = z.object({
1529
1543
  sessionId: z.string(),
1530
1544
  inputTokens: z.number().int().nonnegative(),
@@ -2101,6 +2115,11 @@ var ListProjectManualTestsRequestSchema = z2.object({
2101
2115
  projectId: z2.string(),
2102
2116
  taskId: z2.string()
2103
2117
  });
2118
+ var QueryProjectManualTestsRequestSchema = z2.object({
2119
+ projectId: z2.string(),
2120
+ cardStatuses: z2.array(z2.string()).optional(),
2121
+ testStatuses: z2.array(z2.enum(["open", "approved", "rejected"])).optional()
2122
+ });
2104
2123
  var SetProjectManualTestsRequestSchema = z2.object({
2105
2124
  projectId: z2.string(),
2106
2125
  taskId: z2.string(),
@@ -2120,6 +2139,19 @@ var RemoveProjectManualTestRequestSchema = z2.object({
2120
2139
  title: z2.string().min(1),
2121
2140
  requestingUserId: z2.string().optional()
2122
2141
  });
2142
+ var ApproveProjectManualTestRequestSchema = z2.object({
2143
+ projectId: z2.string(),
2144
+ taskId: z2.string(),
2145
+ title: z2.string().min(1),
2146
+ requestingUserId: z2.string().optional()
2147
+ });
2148
+ var RejectProjectManualTestRequestSchema = z2.object({
2149
+ projectId: z2.string(),
2150
+ taskId: z2.string(),
2151
+ title: z2.string().min(1),
2152
+ reason: z2.string().min(1).max(2e3),
2153
+ requestingUserId: z2.string().optional()
2154
+ });
2123
2155
  var StartTaskAuditRequestSchema = z3.object({
2124
2156
  projectId: z3.string(),
2125
2157
  taskIds: z3.array(z3.string()).min(1)
@@ -4167,6 +4199,48 @@ function buildListManualTestsTool(connection) {
4167
4199
  { annotations: { readOnlyHint: true } }
4168
4200
  );
4169
4201
  }
4202
+ function renderManualTestGroups(groups) {
4203
+ const lines = [];
4204
+ for (const g of groups) {
4205
+ lines.push(`## ${g.title} [${g.status}] (${g.slug})`);
4206
+ for (const t of g.tests) {
4207
+ const mark = t.status === "approved" ? "\u2713" : t.status === "rejected" ? "\u2717" : "\u25CB";
4208
+ lines.push(` ${mark} ${t.title} \u2014 ${t.status}`);
4209
+ if (t.status === "rejected") {
4210
+ for (const f of t.failures ?? []) {
4211
+ lines.push(` \u26A0 ${f.userName ?? "Someone"}: ${f.reason ?? "(no message)"}`);
4212
+ }
4213
+ }
4214
+ }
4215
+ lines.push("");
4216
+ }
4217
+ return lines.join("\n").trimEnd();
4218
+ }
4219
+ function buildQueryManualTestsTool(connection) {
4220
+ return defineTool(
4221
+ "query_manual_tests",
4222
+ "Query manual tests across many tasks in this project, grouped by task. Filter by card status (ReviewDev, ReviewLive, Complete, ...) and/or test status (open | approved | rejected). Use to answer 'show all OPEN manual tests in ReviewDev' or 'show all REJECTED manual tests with the failing reason'. With no filters it defaults to the needs-attention view: open+rejected tests on ReviewDev/ReviewLive cards.",
4223
+ {
4224
+ cardStatuses: z8.array(z8.string()).optional().describe('Filter tasks by card status, e.g. ["ReviewDev", "ReviewLive"]'),
4225
+ testStatuses: z8.array(z8.enum(["open", "approved", "rejected"])).optional().describe("Filter tests by status: open | approved | rejected")
4226
+ },
4227
+ async ({ cardStatuses, testStatuses }) => {
4228
+ try {
4229
+ const groups = await connection.call("queryManualTests", {
4230
+ sessionId: connection.sessionId,
4231
+ cardStatuses,
4232
+ testStatuses
4233
+ });
4234
+ if (groups.length === 0) return textResult("No manual tests match those filters.");
4235
+ return textResult(renderManualTestGroups(groups));
4236
+ } catch (error) {
4237
+ const msg = error instanceof Error ? error.message : "Unknown error";
4238
+ return textResult(`Failed to query manual tests: ${msg}`);
4239
+ }
4240
+ },
4241
+ { annotations: { readOnlyHint: true } }
4242
+ );
4243
+ }
4170
4244
  function buildSetManualTestsTool(connection) {
4171
4245
  return defineTool(
4172
4246
  "set_manual_tests",
@@ -4234,6 +4308,50 @@ function buildRemoveManualTestTool(connection) {
4234
4308
  }
4235
4309
  );
4236
4310
  }
4311
+ function buildApproveManualTestTool(connection) {
4312
+ return defineTool(
4313
+ "approve_manual_test",
4314
+ "Sign off on (approve) a manual test step on behalf of your authenticated user. Identify the test by its title (case-insensitive). Use after you have verified the step passes.",
4315
+ {
4316
+ title: z8.string().min(1).describe("The title of the manual test to approve")
4317
+ },
4318
+ async ({ title }) => {
4319
+ try {
4320
+ await connection.call("approveManualTest", {
4321
+ sessionId: connection.sessionId,
4322
+ title
4323
+ });
4324
+ return textResult(`Approved manual test "${title}".`);
4325
+ } catch (error) {
4326
+ const msg = error instanceof Error ? error.message : "Unknown error";
4327
+ return textResult(`Failed to approve manual test: ${msg}`);
4328
+ }
4329
+ }
4330
+ );
4331
+ }
4332
+ function buildRejectManualTestTool(connection) {
4333
+ return defineTool(
4334
+ "reject_manual_test",
4335
+ "Flag an issue with (reject) a manual test step on behalf of your authenticated user, recording the reason. Identify the test by its title (case-insensitive). Use when the step fails verification.",
4336
+ {
4337
+ title: z8.string().min(1).describe("The title of the manual test to reject"),
4338
+ reason: z8.string().min(1).max(2e3).describe("Why the test failed \u2014 what went wrong, shown to the team")
4339
+ },
4340
+ async ({ title, reason }) => {
4341
+ try {
4342
+ await connection.call("rejectManualTest", {
4343
+ sessionId: connection.sessionId,
4344
+ title,
4345
+ reason
4346
+ });
4347
+ return textResult(`Flagged an issue with manual test "${title}": ${reason}`);
4348
+ } catch (error) {
4349
+ const msg = error instanceof Error ? error.message : "Unknown error";
4350
+ return textResult(`Failed to reject manual test: ${msg}`);
4351
+ }
4352
+ }
4353
+ );
4354
+ }
4237
4355
 
4238
4356
  // src/tools/common-tools.ts
4239
4357
  function buildCommonTools(connection, config) {
@@ -4242,9 +4360,12 @@ function buildCommonTools(connection, config) {
4242
4360
  buildGetDependenciesTool(connection),
4243
4361
  buildGetSuggestionsTool(connection),
4244
4362
  buildListManualTestsTool(connection),
4363
+ buildQueryManualTestsTool(connection),
4245
4364
  buildSetManualTestsTool(connection),
4246
4365
  buildEditManualTestTool(connection),
4247
4366
  buildRemoveManualTestTool(connection),
4367
+ buildApproveManualTestTool(connection),
4368
+ buildRejectManualTestTool(connection),
4248
4369
  ...buildMutationTools(connection, config),
4249
4370
  buildUploadAttachmentTool(connection, config)
4250
4371
  ];
@@ -10624,4 +10745,4 @@ export {
10624
10745
  loadConveyorConfig,
10625
10746
  unshallowRepo
10626
10747
  };
10627
- //# sourceMappingURL=chunk-HMSNJRVO.js.map
10748
+ //# sourceMappingURL=chunk-KEBJAORX.js.map