@testchimp/cli 0.1.31 → 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)
@@ -1253,6 +1262,21 @@ export function buildCliProgram() {
1253
1262
  }
1254
1263
  console.log(await runTool("upsert-plans-support-file", merged, { postMcp }));
1255
1264
  });
1265
+ program
1266
+ .command("get-plans-support-file")
1267
+ .description(TOOL_DEFINITIONS.find((t) => t.kebab === "get-plans-support-file").description)
1268
+ .addOption(jsonInputOption())
1269
+ .option("--file-path <path>", "path relative to mapped plans root (e.g. knowledge/workflow_plans/run-qa/<ulid>.plan.md)")
1270
+ .action(async (opts) => {
1271
+ const body = {};
1272
+ if (opts.filePath)
1273
+ body.filePath = String(opts.filePath);
1274
+ const merged = mergeBodies(body, opts.jsonInput);
1275
+ if (!merged.filePath) {
1276
+ throw new Error("Provide --file-path (or full body via --json-input)");
1277
+ }
1278
+ console.log(await runTool("get-plans-support-file", merged, { postMcp }));
1279
+ });
1256
1280
  program
1257
1281
  .command("list-api-operation-services")
1258
1282
  .description(TOOL_DEFINITIONS.find((t) => t.kebab === "list-api-operation-services").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";
@@ -1478,6 +1524,9 @@ export declare const upsertPlansSupportFileInput: z.ZodObject<{
1478
1524
  filePath: z.ZodString;
1479
1525
  content: z.ZodString;
1480
1526
  }, z.core.$strip>;
1527
+ export declare const getPlansSupportFileInput: z.ZodObject<{
1528
+ filePath: z.ZodString;
1529
+ }, z.core.$strip>;
1481
1530
  export declare const listWorkflowCatalogInput: z.ZodObject<{}, z.core.$strip>;
1482
1531
  /** API operation coverage (OpenAPI ops + denorm coverage) — CLI ≥ 0.1.28 */
1483
1532
  export declare const listApiOperationServicesInput: z.ZodObject<{}, z.core.$strip>;
@@ -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",
@@ -811,6 +822,10 @@ export const upsertPlansSupportFileInput = z.object({
811
822
  filePath: z.string().min(1),
812
823
  content: z.string().min(1),
813
824
  });
825
+ export const getPlansSupportFileInput = z.object({
826
+ /** Path relative to mapped plans root (e.g. knowledge/workflow_plans/run-qa/<ulid>.plan.md). */
827
+ filePath: z.string().min(1),
828
+ });
814
829
  export const listWorkflowCatalogInput = z.object({});
815
830
  /** API operation coverage (OpenAPI ops + denorm coverage) — CLI ≥ 0.1.28 */
816
831
  export const listApiOperationServicesInput = z.object({});
@@ -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). " +
@@ -1183,6 +1216,20 @@ export const TOOL_DEFINITIONS = [
1183
1216
  });
1184
1217
  },
1185
1218
  },
1219
+ {
1220
+ kebab: "get-plans-support-file",
1221
+ description: "Fetch a file under the mapped plans root from the platform by relative path (no git required). " +
1222
+ "Primary use: load a workflow execution plan named in a Continue Locally / implement prompt before falling back to the repo copy. " +
1223
+ "filePath is relative to the plans mapped root (leading plans/ is stripped). Under workflow_plans/, filenames are coerced to *.plan.md. " +
1224
+ "Response: found (false if missing), supportFileId, filePath (canonical), filetype, content.",
1225
+ inputSchema: S.getPlansSupportFileInput,
1226
+ execute: async (args, { postMcp }) => {
1227
+ const a = args;
1228
+ return postMcp("/api/mcp/get_plans_support_file", {
1229
+ filePath: a.filePath,
1230
+ });
1231
+ },
1232
+ },
1186
1233
  {
1187
1234
  kebab: "list-workflow-catalog",
1188
1235
  description: "List supported TestChimp workflows with Active / Disabled / Missing Config status for the project.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.31",
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",