@jrpool/kilotest 59.1.4 → 60.0.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.
Files changed (62) hide show
  1. package/README.md +2 -5
  2. package/api/awaitTest.test.ts +9 -9
  3. package/api/awaitTest.ts +12 -12
  4. package/api/getReport.test.ts +4 -4
  5. package/api/getReport.ts +9 -9
  6. package/api/listDiagnoses.test.ts +14 -14
  7. package/api/listDiagnoses.ts +8 -8
  8. package/api/listIssues.test.ts +15 -15
  9. package/api/listIssues.ts +18 -20
  10. package/api/listPages.test.ts +2 -2
  11. package/api/listPages.ts +4 -4
  12. package/api/listViolators.test.ts +10 -10
  13. package/api/listViolators.ts +10 -10
  14. package/api/orderNewTest.test.ts +1 -2
  15. package/api/orderNewTest.ts +3 -4
  16. package/api/orderRetest.test.ts +10 -10
  17. package/api/orderRetest.ts +13 -14
  18. package/api/requestRetest.test.ts +11 -11
  19. package/api/requestRetest.ts +11 -11
  20. package/api/routes.ts +9 -11
  21. package/api/schemas.ts +18 -28
  22. package/api/util.test.ts +2 -2
  23. package/api/util.ts +7 -7
  24. package/capability.md +4 -4
  25. package/docs/AI-TOOLS.md +41 -1
  26. package/docs/decisions/009-report-id.md +16 -0
  27. package/index.test.ts +91 -41
  28. package/index.ts +66 -15
  29. package/lhm.plugin.json +33 -119
  30. package/llms-full.txt +18 -24
  31. package/llms.txt +12 -12
  32. package/mcp.test.ts +11 -20
  33. package/mcp.ts +18 -18
  34. package/openapi-3.0.yaml +1847 -0
  35. package/openapi.yaml +38 -97
  36. package/package.json +1 -1
  37. package/routing.test.ts +1 -1
  38. package/scripts/generate-openapi.ts +83 -1
  39. package/server.json +1 -1
  40. package/util.test.ts +32 -33
  41. package/util.ts +47 -43
  42. package/web/hideReportForm/index.ts +5 -6
  43. package/web/listDiagnoses/index.ts +4 -5
  44. package/web/listDiagnoses/listDiagnoses.test.ts +13 -13
  45. package/web/listIssues/index.ts +11 -12
  46. package/web/listIssues/listIssues.test.ts +24 -24
  47. package/web/listPages/index.ts +2 -2
  48. package/web/listPages/listPages.test.ts +2 -2
  49. package/web/listTopIssues/index.ts +2 -2
  50. package/web/listViolators/index.ts +5 -6
  51. package/web/listViolators/listViolators.test.ts +12 -12
  52. package/web/reannotate/index.ts +3 -3
  53. package/web/reannotateForm/index.ts +1 -2
  54. package/web/reportDeletion.ts +9 -12
  55. package/web/requestRetest/index.ts +2 -2
  56. package/web/requestRetest/requestRetest.test.ts +7 -7
  57. package/web/requestRetestForm/index.html +2 -2
  58. package/web/requestRetestForm/index.ts +3 -4
  59. package/web/requestRetestForm/requestRetestForm.test.ts +7 -8
  60. package/web/unhideReportForm/index.ts +4 -6
  61. package/web/util.test.ts +29 -29
  62. package/web/util.ts +1 -1
package/mcp.ts CHANGED
@@ -100,7 +100,7 @@ export const createMCPServer = (): McpServer => {
100
100
  server.registerTool(
101
101
  'listPages',
102
102
  {
103
- description: 'Lists all pages Kilotest has tested. Use this first to discover whether a page already has any reports before requesting a test. Returns, for each tested page, its description, URL, and the timestamp and job identifier of its latest available report.',
103
+ description: 'Lists all pages Kilotest has tested. Use this first to discover whether a page already has any reports before requesting a test. Returns, for each tested page, its description, URL, and the identifier of its latest available report.',
104
104
  inputSchema: {},
105
105
  outputSchema: listPagesResponseSchema,
106
106
  annotations: {
@@ -131,8 +131,8 @@ export const createMCPServer = (): McpServer => {
131
131
  openWorldHint: false
132
132
  }
133
133
  },
134
- async ({timeStamp, jobID}) => {
135
- const result = await listIssuesAPI.response([timeStamp, jobID]);
134
+ async ({reportID}) => {
135
+ const result = await listIssuesAPI.response([reportID]);
136
136
  await recordMetric('mcpToolCalls', 'listIssues');
137
137
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
138
138
  }
@@ -151,8 +151,8 @@ export const createMCPServer = (): McpServer => {
151
151
  openWorldHint: false
152
152
  }
153
153
  },
154
- async ({issueID, timeStamp, jobID}) => {
155
- const result = await listViolatorsAPI.response([issueID, timeStamp, jobID]);
154
+ async ({issueID, reportID}) => {
155
+ const result = await listViolatorsAPI.response([issueID, reportID]);
156
156
  await recordMetric('mcpToolCalls', 'listViolators');
157
157
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
158
158
  }
@@ -171,8 +171,8 @@ export const createMCPServer = (): McpServer => {
171
171
  openWorldHint: false
172
172
  }
173
173
  },
174
- async ({catalogIndex, issueID, timeStamp, jobID}) => {
175
- const result = await listDiagnosesAPI.response([catalogIndex, issueID, timeStamp, jobID]);
174
+ async ({catalogIndex, issueID, reportID}) => {
175
+ const result = await listDiagnosesAPI.response([catalogIndex, issueID, reportID]);
176
176
  await recordMetric('mcpToolCalls', 'listDiagnoses');
177
177
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
178
178
  }
@@ -180,7 +180,7 @@ export const createMCPServer = (): McpServer => {
180
180
  server.registerTool(
181
181
  'getReport',
182
182
  {
183
- description: 'Retrieves one entire report as JSON, with all of its issues, violators, and diagnoses. Use this instead of drilling down through listIssues, listViolators, and listDiagnoses when the full report is needed in one call. Returns the complete report data for the specified timestamp and job identifier. The size of the report is disclosed by the listIssues tool.',
183
+ description: 'Retrieves one entire report as JSON, with all of its issues, violators, and diagnoses. Use this instead of drilling down through listIssues, listViolators, and listDiagnoses when the full report is needed in one call. Returns the complete report data for the specified report identifier. The size of the report is disclosed by the listIssues tool.',
184
184
  inputSchema: getReportSchema,
185
185
  outputSchema: getReportResponseSchema,
186
186
  annotations: {
@@ -191,8 +191,8 @@ export const createMCPServer = (): McpServer => {
191
191
  openWorldHint: false
192
192
  }
193
193
  },
194
- async ({timeStamp, jobID}) => {
195
- const result = await getReportAPI.response([timeStamp, jobID]);
194
+ async ({reportID}) => {
195
+ const result = await getReportAPI.response([reportID]);
196
196
  await recordMetric('mcpToolCalls', 'getReport');
197
197
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
198
198
  }
@@ -231,8 +231,8 @@ export const createMCPServer = (): McpServer => {
231
231
  openWorldHint: false
232
232
  }
233
233
  },
234
- async ({timeStamp, jobID, reason}) => {
235
- const result = await requestRetestAPI.response([timeStamp, jobID, reason]);
234
+ async ({reportID, reason}) => {
235
+ const result = await requestRetestAPI.response([reportID, reason]);
236
236
  await recordMetric('mcpToolCalls', 'requestRetest');
237
237
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
238
238
  }
@@ -260,7 +260,7 @@ export const createMCPServer = (): McpServer => {
260
260
  server.registerTool(
261
261
  'orderNewTest',
262
262
  {
263
- description: 'Orders testing of a page that has no report yet, with automated approval or rejection and immediate enqueueing if approved. Use this instead of requestNewTest when immediate testing is wanted; testing typically takes 2 to 4 minutes. Returns an order confirmation and disposition details, including, if approved, a report identifier (timestamp and job identifier) and a question about whether to wait for completion with the awaitTest tool.',
263
+ description: 'Orders testing of a page that has no report yet, with automated approval or rejection and immediate enqueueing if approved. Use this instead of requestNewTest when immediate testing is wanted; testing typically takes 2 to 4 minutes. Returns an order confirmation and disposition details, including, if approved, a report identifier and a question about whether to wait for completion with the awaitTest tool.',
264
264
  inputSchema: orderNewTestSchema,
265
265
  outputSchema: orderNewTestResponseSchema,
266
266
  annotations: {
@@ -280,7 +280,7 @@ export const createMCPServer = (): McpServer => {
280
280
  server.registerTool(
281
281
  'orderRetest',
282
282
  {
283
- description: 'Orders a retest of a page whose existing report is considered obsolete, with automated approval or rejection and immediate enqueuing if approved. Use this instead of requestRetest when immediate retesting is wanted; testing typically takes 2 to 4 minutes. Returns an order confirmation and disposition details, including, if approved, a report identifier (timestamp and job identifier) and a question about whether to wait for completion with the awaitTest tool.',
283
+ description: 'Orders a retest of a page whose existing report is considered obsolete, with automated approval or rejection and immediate enqueuing if approved. Use this instead of requestRetest when immediate retesting is wanted; testing typically takes 2 to 4 minutes. Returns an order confirmation and disposition details, including, if approved, a report identifier and a question about whether to wait for completion with the awaitTest tool.',
284
284
  inputSchema: orderRetestSchema,
285
285
  outputSchema: orderRetestResponseSchema,
286
286
  annotations: {
@@ -291,8 +291,8 @@ export const createMCPServer = (): McpServer => {
291
291
  openWorldHint: false
292
292
  }
293
293
  },
294
- async ({timeStamp, jobID, reason}) => {
295
- const result = await orderRetestAPI.response([timeStamp, jobID, reason]);
294
+ async ({reportID, reason}) => {
295
+ const result = await orderRetestAPI.response([reportID, reason]);
296
296
  await recordMetric('mcpToolCalls', 'orderRetest');
297
297
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
298
298
  }
@@ -311,8 +311,8 @@ export const createMCPServer = (): McpServer => {
311
311
  openWorldHint: false
312
312
  }
313
313
  },
314
- async ({timeStamp, jobID}) => {
315
- const result = await awaitTestAPI.response([timeStamp, jobID]);
314
+ async ({reportID}) => {
315
+ const result = await awaitTestAPI.response([reportID]);
316
316
  await recordMetric('mcpToolCalls', 'awaitTest');
317
317
  return {content: [{type: 'text', text: JSON.stringify(result)}], structuredContent: result};
318
318
  }