@testchimp/cli 0.1.32 → 0.1.33

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.
@@ -1048,6 +1048,15 @@ export function buildCliProgram() {
1048
1048
  const out = await runTool("mark-semantic-tests-distinct", merged, { postMcp });
1049
1049
  console.log(out);
1050
1050
  });
1051
+ program
1052
+ .command("mark-tests-for-review")
1053
+ .description(TOOL_DEFINITIONS.find((t) => t.kebab === "mark-tests-for-review").description)
1054
+ .addOption(jsonInputOption())
1055
+ .action(async (opts) => {
1056
+ const merged = mergeBodies({}, opts.jsonInput);
1057
+ const out = await runTool("mark-tests-for-review", merged, { postMcp });
1058
+ console.log(out);
1059
+ });
1051
1060
  program
1052
1061
  .command("list-semantic-nearby")
1053
1062
  .description(TOOL_DEFINITIONS.find((t) => t.kebab === "list-semantic-nearby").description)
@@ -984,6 +984,52 @@ export declare const markSemanticTestsDistinctInput: z.ZodObject<{
984
984
  testName: z.ZodString;
985
985
  }, z.core.$strip>;
986
986
  }, z.core.$strip>;
987
+ export declare const markTestsForReviewInput: z.ZodObject<{
988
+ tests: z.ZodArray<z.ZodObject<{
989
+ test: z.ZodObject<{
990
+ folderPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
991
+ fileName: z.ZodString;
992
+ testSuite: z.ZodOptional<z.ZodArray<z.ZodString>>;
993
+ testName: z.ZodString;
994
+ }, z.core.$strip>;
995
+ confidence: z.ZodNumber;
996
+ }, z.core.$strip>>;
997
+ gitCommitSha: z.ZodOptional<z.ZodString>;
998
+ workflowId: z.ZodOptional<z.ZodString>;
999
+ workflowExecutionId: z.ZodOptional<z.ZodString>;
1000
+ policyFile: z.ZodOptional<z.ZodString>;
1001
+ policyVersion: z.ZodOptional<z.ZodString>;
1002
+ gitSha: z.ZodOptional<z.ZodString>;
1003
+ actorType: z.ZodOptional<z.ZodEnum<{
1004
+ LOCAL_AGENT: "LOCAL_AGENT";
1005
+ CLOUD_AGENT: "CLOUD_AGENT";
1006
+ "local-agent": "local-agent";
1007
+ "cloud-agent": "cloud-agent";
1008
+ }>>;
1009
+ userId: z.ZodOptional<z.ZodString>;
1010
+ branchName: z.ZodOptional<z.ZodString>;
1011
+ agentModel: z.ZodOptional<z.ZodString>;
1012
+ skillVersion: z.ZodOptional<z.ZodString>;
1013
+ cliVersion: z.ZodOptional<z.ZodString>;
1014
+ agentTraceability: z.ZodOptional<z.ZodObject<{
1015
+ workflowId: z.ZodOptional<z.ZodString>;
1016
+ workflowExecutionId: z.ZodOptional<z.ZodString>;
1017
+ policyFile: z.ZodOptional<z.ZodString>;
1018
+ policyVersion: z.ZodOptional<z.ZodString>;
1019
+ gitSha: z.ZodOptional<z.ZodString>;
1020
+ actorType: z.ZodOptional<z.ZodEnum<{
1021
+ LOCAL_AGENT: "LOCAL_AGENT";
1022
+ CLOUD_AGENT: "CLOUD_AGENT";
1023
+ "local-agent": "local-agent";
1024
+ "cloud-agent": "cloud-agent";
1025
+ }>>;
1026
+ userId: z.ZodOptional<z.ZodString>;
1027
+ branchName: z.ZodOptional<z.ZodString>;
1028
+ agentModel: z.ZodOptional<z.ZodString>;
1029
+ skillVersion: z.ZodOptional<z.ZodString>;
1030
+ cliVersion: z.ZodOptional<z.ZodString>;
1031
+ }, z.core.$strict>>;
1032
+ }, z.core.$strip>;
987
1033
  /** LinkedEntityType names for semantic nearby (embedding-capable). */
988
1034
  export declare const semanticNearbyEntityTypeSchema: z.ZodEnum<{
989
1035
  STORY: "STORY";
@@ -457,6 +457,17 @@ export const markSemanticTestsDistinctInput = z.object({
457
457
  focusTest: testLocatorSchema,
458
458
  distinctTest: testLocatorSchema,
459
459
  });
460
+ export const markTestsForReviewInput = z
461
+ .object({
462
+ tests: z
463
+ .array(z.object({
464
+ test: testLocatorSchema,
465
+ confidence: z.number().int().min(0).max(100),
466
+ }))
467
+ .min(1),
468
+ gitCommitSha: z.string().optional(),
469
+ })
470
+ .merge(agentTraceabilityFieldsSchema);
460
471
  /** LinkedEntityType names for semantic nearby (embedding-capable). */
461
472
  export const semanticNearbyEntityTypeSchema = z.enum([
462
473
  "STORY",
@@ -880,6 +880,39 @@ export const TOOL_DEFINITIONS = [
880
880
  });
881
881
  },
882
882
  },
883
+ {
884
+ kebab: "mark-tests-for-review",
885
+ description: "Report existing SmartTests that an agent patched so humans can re-verify. " +
886
+ "Always send per-test confidence 0–100 (higher = less need for human review). " +
887
+ "Do not read project config. Call only from fix-test-execution after test-incorrect patches " +
888
+ "(never from run-qa / create-tests; never for product-broken cases). " +
889
+ "Optional agentTraceability / workflowExecutionId / gitCommitSha / branchName.",
890
+ inputSchema: S.markTestsForReviewInput,
891
+ execute: async (args, { postMcp }) => {
892
+ const a = args;
893
+ const nested = a.agentTraceability && typeof a.agentTraceability === "object"
894
+ ? a.agentTraceability
895
+ : undefined;
896
+ const nestedStr = (key) => {
897
+ const v = nested?.[key];
898
+ return typeof v === "string" && v.trim() ? v : undefined;
899
+ };
900
+ const body = { tests: a.tests };
901
+ const branchName = a.branchName || nestedStr("branchName");
902
+ if (branchName)
903
+ body.branchName = branchName;
904
+ const gitCommitSha = a.gitCommitSha ?? a.gitSha ?? nestedStr("gitSha");
905
+ if (gitCommitSha)
906
+ body.gitCommitSha = gitCommitSha;
907
+ const workflowExecutionId = a.workflowExecutionId || nestedStr("workflowExecutionId");
908
+ if (workflowExecutionId)
909
+ body.workflowExecutionId = workflowExecutionId;
910
+ const trace = buildAgentTraceabilityPayload(a);
911
+ if (trace)
912
+ body.agentTraceability = trace;
913
+ return postMcp("/api/mcp/mark_tests_for_review", body);
914
+ },
915
+ },
883
916
  {
884
917
  kebab: "list-semantic-nearby",
885
918
  description: "List semantically nearby entities across types (Story/Scenario/Test/Issue/Event). " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "TestChimp CLI and MCP server — coverage, plans, EaaS, TrueCoverage, API operations (calls /api/mcp/*)",
5
5
  "type": "module",
6
6
  "main": "dist/bin/testchimp.js",