@supatest/cli 0.0.28 → 0.0.29
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.
- package/README.md +35 -9
- package/dist/index.js +235 -6
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -15,9 +15,11 @@ Supatest AI is an AI-powered CLI that helps you write and maintain E2E tests. Us
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
17
|
- **Node.js 18+** - [Download Node.js](https://nodejs.org/)
|
|
18
|
-
- **Supatest
|
|
18
|
+
- **Supatest Account** - [Sign up at supatest.ai](https://supatest.ai)
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Getting Started
|
|
21
|
+
|
|
22
|
+
### 1. Install
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
25
|
npm install -g @supatest/cli
|
|
@@ -29,19 +31,43 @@ Or use npx without installing:
|
|
|
29
31
|
npx @supatest/cli
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### Interactive Mode
|
|
34
|
+
### 2. Login
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Start the CLI and authenticate:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
supatest
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
```
|
|
43
|
+
> /login
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This opens your browser to authenticate with your Supatest account.
|
|
47
|
+
|
|
48
|
+
### 3. Setup
|
|
49
|
+
|
|
50
|
+
Check that your environment has the required tools:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
> /setup
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This verifies prerequisites like browsers and test frameworks are properly configured.
|
|
57
|
+
|
|
58
|
+
### 4. Discover
|
|
59
|
+
|
|
60
|
+
Scan your project to detect existing test files and configuration:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
> /discover
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This helps Supatest understand your test structure so it can work with your existing setup.
|
|
67
|
+
|
|
68
|
+
### 5. Start Testing
|
|
43
69
|
|
|
44
|
-
|
|
70
|
+
Now describe what you want to test:
|
|
45
71
|
|
|
46
72
|
```
|
|
47
73
|
> Write a test for the login flow
|
|
@@ -113,7 +139,7 @@ test:
|
|
|
113
139
|
## Support
|
|
114
140
|
|
|
115
141
|
- [Documentation](https://supatest.ai/docs)
|
|
116
|
-
- [GitHub Issues](https://github.com/
|
|
142
|
+
- [GitHub Issues](https://github.com/supatest-ai/supatest/issues)
|
|
117
143
|
|
|
118
144
|
## License
|
|
119
145
|
|
package/dist/index.js
CHANGED
|
@@ -538,7 +538,7 @@ function getToolDisplayName(toolName) {
|
|
|
538
538
|
};
|
|
539
539
|
return displayNameMap[toolName] || toolName;
|
|
540
540
|
}
|
|
541
|
-
var AVAILABLE_MODELS, DEFAULT_MODEL_ID, DATE_SUFFIX_REGEX, CONTEXT_WINDOWS, util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, ZodFirstPartyTypeKind, stringType, numberType, booleanType, dateType, unknownType, arrayType, objectType, unionType, discriminatedUnionType, recordType, functionType, lazyType, literalType, enumType, promiseType, coerce, MAX_API_KEY_NAME_LENGTH, apiKeySchema, apiKeyUsageSchema, createApiKeyRequestSchema, apiKeyResponseSchema, apiKeyUsageSummarySchema, genericErrorSchema, validationErrorSchema, feedbackCategorySchema, FEEDBACK_CATEGORIES, createFeedbackSchema, feedbackResponseSchema, listFeedbackQuerySchema, feedbackListResponseSchema, healthMetricSchema, healthMetricDailyItemSchema, healthMetricsWithDailySchema, healthAnalyticsPeriodSchema, healthAnalyticsDailyItemSchema, healthAnalyticsResponseSchema, MAX_TIMEZONE_CHAR_LENGTH, organizationSchema, organizationSettingsSchema, textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, thinkingBlockSchema, imageBlockSchema, contentBlockSchema, sessionSchema, createSessionRequestSchema, updateSessionRequestSchema, messageSchema, createMessageRequestSchema, cliEventSchema, createCLISessionRequestSchema, queryResultSchema, queryTurnSchema, queryContentSchema, queryUsageSchema, querySchema, runStatusSchema, testResultStatusSchema, testOutcomeSchema, attachmentKindSchema, stepCategorySchema, runSummarySchema, ciMetadataSchema, gitMetadataSchema, playwrightConfigSchema, errorInfoSchema, locationSchema, sourceSnippetSchema, runSchema, annotationSchema, testSchema, testResultSchema, baseStepSchema, stepSchema, attachmentSchema, listRunsQuerySchema, listTestsQuerySchema, runsListResponseSchema, runDetailResponseSchema, testsListResponseSchema, testDetailResponseSchema, testHistoryItemSchema, testHistoryResponseSchema, topOffenderSchema, topOffendersResponseSchema, trendPointSchema, trendsResponseSchema, errorCategorySchema, failureClusterSchema, newFailureSchema, runInsightsResponseSchema, FailureCategoryEnum, SelectorTypeEnum, FailureCategoryStatsSchema, FailureCategoriesResponseSchema, FailingSelectorStatsSchema, FailingSelectorsResponseSchema, newFailureItemSchema, newFailuresResponseSchema, flakyTestItemSchema, flakyTestsResponseSchema, slowestTestItemSchema, slowestTestsResponseSchema, runSummaryEmailFailureSchema, runSummaryEmailReportSchema, sendRunReportRequestSchema;
|
|
541
|
+
var AVAILABLE_MODELS, DEFAULT_MODEL_ID, DATE_SUFFIX_REGEX, CONTEXT_WINDOWS, util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, ZodFirstPartyTypeKind, stringType, numberType, booleanType, dateType, unknownType, arrayType, objectType, unionType, discriminatedUnionType, recordType, functionType, lazyType, literalType, enumType, promiseType, coerce, MAX_API_KEY_NAME_LENGTH, apiKeySchema, apiKeyUsageSchema, createApiKeyRequestSchema, apiKeyResponseSchema, apiKeyUsageSummarySchema, genericErrorSchema, validationErrorSchema, feedbackCategorySchema, FEEDBACK_CATEGORIES, createFeedbackSchema, feedbackResponseSchema, listFeedbackQuerySchema, feedbackListResponseSchema, healthMetricSchema, healthMetricDailyItemSchema, healthMetricsWithDailySchema, healthAnalyticsPeriodSchema, healthAnalyticsDailyItemSchema, healthAnalyticsResponseSchema, MAX_TIMEZONE_CHAR_LENGTH, organizationSchema, organizationSettingsSchema, textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, thinkingBlockSchema, imageBlockSchema, contentBlockSchema, sessionSchema, createSessionRequestSchema, updateSessionRequestSchema, messageSchema, createMessageRequestSchema, cliEventSchema, createCLISessionRequestSchema, queryResultSchema, queryTurnSchema, queryContentSchema, queryUsageSchema, querySchema, runStatusSchema, testResultStatusSchema, testOutcomeSchema, attachmentKindSchema, stepCategorySchema, runSummarySchema, ciMetadataSchema, gitMetadataSchema, playwrightConfigSchema, errorInfoSchema, locationSchema, sourceSnippetSchema, runSchema, annotationSchema, testSchema, testResultSchema, baseStepSchema, stepSchema, attachmentSchema, listRunsQuerySchema, listTestsQuerySchema, runsListResponseSchema, runDetailResponseSchema, testsListResponseSchema, testDetailResponseSchema, testHistoryItemSchema, testHistoryResponseSchema, topOffenderSchema, topOffendersResponseSchema, trendPointSchema, trendsResponseSchema, errorCategorySchema, failureClusterSchema, newFailureSchema, runInsightsResponseSchema, FailureCategoryEnum, SelectorTypeEnum, FailureCategoryStatsSchema, FailureCategoriesResponseSchema, FailingSelectorStatsSchema, FailingSelectorsResponseSchema, newFailureItemSchema, newFailuresResponseSchema, flakyTestItemSchema, flakyTestsResponseSchema, slowestTestItemSchema, slowestTestsResponseSchema, runSummaryEmailFailureSchema, runSummaryEmailReportSchema, sendRunReportRequestSchema, metricWithTrendSchema, weekOverWeekMetricsSchema, ciComputeTimeSchema, investigationCandidateSchema, failureCategoryBreakdownSchema, stabilityTrendSchema, folderStabilitySchema, managerReportSchema, managerReportQuerySchema, sendManagerReportRequestSchema, reportAttachmentLinkSchema, developerReportRegressionSchema, developerReportFlakyTestSchema, developerReportSlowTestSchema, developerRunSummaryReportSchema, executiveReportStatusSchema, executiveMetricSchema, executiveKeyMetricsSchema, executiveTrendPointSchema, executiveTrendsSchema, executiveFlakyOffenderSchema, executiveSlowestOffenderSchema, executiveTopOffendersSchema, executiveReportSchema, executiveReportQuerySchema, sendExecutiveReportRequestSchema;
|
|
542
542
|
var init_shared_es = __esm({
|
|
543
543
|
"../shared/dist/shared.es.mjs"() {
|
|
544
544
|
"use strict";
|
|
@@ -5018,24 +5018,248 @@ var init_shared_es = __esm({
|
|
|
5018
5018
|
startedAt: stringType(),
|
|
5019
5019
|
endedAt: stringType().optional(),
|
|
5020
5020
|
durationMs: numberType(),
|
|
5021
|
-
// Git info
|
|
5022
5021
|
branch: stringType().optional(),
|
|
5023
5022
|
commit: stringType().optional(),
|
|
5024
5023
|
commitMessage: stringType().optional(),
|
|
5025
|
-
// Summary stats
|
|
5026
5024
|
totalTests: numberType(),
|
|
5027
5025
|
passedTests: numberType(),
|
|
5028
5026
|
failedTests: numberType(),
|
|
5029
5027
|
flakyTests: numberType(),
|
|
5030
5028
|
skippedTests: numberType(),
|
|
5031
5029
|
passRate: numberType(),
|
|
5032
|
-
// Top failures
|
|
5033
5030
|
topFailures: arrayType(runSummaryEmailFailureSchema)
|
|
5034
5031
|
});
|
|
5035
5032
|
sendRunReportRequestSchema = objectType({
|
|
5036
5033
|
runId: stringType(),
|
|
5037
5034
|
emails: arrayType(stringType().email())
|
|
5038
5035
|
});
|
|
5036
|
+
metricWithTrendSchema = objectType({
|
|
5037
|
+
current: numberType(),
|
|
5038
|
+
previous: numberType(),
|
|
5039
|
+
change: numberType(),
|
|
5040
|
+
percentChange: numberType().nullable()
|
|
5041
|
+
});
|
|
5042
|
+
weekOverWeekMetricsSchema = objectType({
|
|
5043
|
+
passRate: metricWithTrendSchema,
|
|
5044
|
+
flakyTestCount: metricWithTrendSchema,
|
|
5045
|
+
newFailures: metricWithTrendSchema,
|
|
5046
|
+
totalRuns: metricWithTrendSchema
|
|
5047
|
+
});
|
|
5048
|
+
ciComputeTimeSchema = objectType({
|
|
5049
|
+
failedRunsMs: numberType(),
|
|
5050
|
+
retriedRunsMs: numberType(),
|
|
5051
|
+
totalWastedMs: numberType(),
|
|
5052
|
+
failedRunsHours: numberType(),
|
|
5053
|
+
retriedRunsHours: numberType(),
|
|
5054
|
+
totalWastedHours: numberType()
|
|
5055
|
+
});
|
|
5056
|
+
investigationCandidateSchema = objectType({
|
|
5057
|
+
testId: stringType(),
|
|
5058
|
+
testRunId: stringType(),
|
|
5059
|
+
runId: stringType(),
|
|
5060
|
+
file: stringType(),
|
|
5061
|
+
title: stringType(),
|
|
5062
|
+
flakeCount: numberType(),
|
|
5063
|
+
passRate: numberType(),
|
|
5064
|
+
avgDurationMs: numberType(),
|
|
5065
|
+
ciTimeImpactMs: numberType(),
|
|
5066
|
+
ciTimeImpactHours: numberType(),
|
|
5067
|
+
category: FailureCategoryEnum.nullable(),
|
|
5068
|
+
firstFlakyAt: stringType().nullable()
|
|
5069
|
+
});
|
|
5070
|
+
failureCategoryBreakdownSchema = objectType({
|
|
5071
|
+
category: FailureCategoryEnum,
|
|
5072
|
+
count: numberType(),
|
|
5073
|
+
percentage: numberType()
|
|
5074
|
+
});
|
|
5075
|
+
stabilityTrendSchema = enumType(["improving", "degrading", "stable"]);
|
|
5076
|
+
folderStabilitySchema = objectType({
|
|
5077
|
+
folder: stringType(),
|
|
5078
|
+
passRate: numberType(),
|
|
5079
|
+
previousPassRate: numberType(),
|
|
5080
|
+
trend: stabilityTrendSchema,
|
|
5081
|
+
testCount: numberType(),
|
|
5082
|
+
failureCount: numberType()
|
|
5083
|
+
});
|
|
5084
|
+
managerReportSchema = objectType({
|
|
5085
|
+
period: objectType({
|
|
5086
|
+
start: stringType(),
|
|
5087
|
+
end: stringType(),
|
|
5088
|
+
days: numberType()
|
|
5089
|
+
}),
|
|
5090
|
+
weekOverWeek: weekOverWeekMetricsSchema,
|
|
5091
|
+
ciComputeTime: ciComputeTimeSchema,
|
|
5092
|
+
investigationCandidates: arrayType(investigationCandidateSchema),
|
|
5093
|
+
failureCategories: arrayType(failureCategoryBreakdownSchema),
|
|
5094
|
+
folderStability: arrayType(folderStabilitySchema)
|
|
5095
|
+
});
|
|
5096
|
+
managerReportQuerySchema = objectType({
|
|
5097
|
+
startDate: stringType().regex(
|
|
5098
|
+
/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,
|
|
5099
|
+
"startDate must be in format YYYY-MM-DD or ISO datetime"
|
|
5100
|
+
),
|
|
5101
|
+
endDate: stringType().regex(
|
|
5102
|
+
/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,
|
|
5103
|
+
"endDate must be in format YYYY-MM-DD or ISO datetime"
|
|
5104
|
+
)
|
|
5105
|
+
});
|
|
5106
|
+
sendManagerReportRequestSchema = objectType({
|
|
5107
|
+
startDate: stringType(),
|
|
5108
|
+
endDate: stringType(),
|
|
5109
|
+
emails: arrayType(stringType().email())
|
|
5110
|
+
});
|
|
5111
|
+
reportAttachmentLinkSchema = objectType({
|
|
5112
|
+
name: stringType(),
|
|
5113
|
+
kind: attachmentKindSchema,
|
|
5114
|
+
url: stringType().optional()
|
|
5115
|
+
});
|
|
5116
|
+
developerReportRegressionSchema = objectType({
|
|
5117
|
+
testRunId: stringType(),
|
|
5118
|
+
testId: stringType(),
|
|
5119
|
+
title: stringType(),
|
|
5120
|
+
file: stringType(),
|
|
5121
|
+
errorMessage: stringType().nullable(),
|
|
5122
|
+
errorStack: stringType().nullable(),
|
|
5123
|
+
aiSummary: stringType().nullable(),
|
|
5124
|
+
attachments: arrayType(reportAttachmentLinkSchema),
|
|
5125
|
+
lastStableRun: objectType({
|
|
5126
|
+
runId: stringType(),
|
|
5127
|
+
date: stringType(),
|
|
5128
|
+
branch: stringType().optional()
|
|
5129
|
+
}).nullable()
|
|
5130
|
+
});
|
|
5131
|
+
developerReportFlakyTestSchema = objectType({
|
|
5132
|
+
testRunId: stringType(),
|
|
5133
|
+
testId: stringType(),
|
|
5134
|
+
title: stringType(),
|
|
5135
|
+
file: stringType(),
|
|
5136
|
+
passRate: numberType(),
|
|
5137
|
+
category: errorCategorySchema.nullable(),
|
|
5138
|
+
lastPassedRun: objectType({
|
|
5139
|
+
runId: stringType(),
|
|
5140
|
+
date: stringType()
|
|
5141
|
+
}).nullable()
|
|
5142
|
+
});
|
|
5143
|
+
developerReportSlowTestSchema = objectType({
|
|
5144
|
+
testRunId: stringType(),
|
|
5145
|
+
testId: stringType(),
|
|
5146
|
+
title: stringType(),
|
|
5147
|
+
file: stringType(),
|
|
5148
|
+
durationMs: numberType(),
|
|
5149
|
+
historicalAvgMs: numberType(),
|
|
5150
|
+
slowdownFactor: numberType()
|
|
5151
|
+
// how many times slower than average
|
|
5152
|
+
});
|
|
5153
|
+
developerRunSummaryReportSchema = objectType({
|
|
5154
|
+
runId: stringType(),
|
|
5155
|
+
readableId: stringType().optional(),
|
|
5156
|
+
runDetailsUrl: stringType(),
|
|
5157
|
+
startedAt: stringType(),
|
|
5158
|
+
endedAt: stringType().optional(),
|
|
5159
|
+
durationMs: numberType(),
|
|
5160
|
+
branch: stringType().optional(),
|
|
5161
|
+
commit: stringType().optional(),
|
|
5162
|
+
commitMessage: stringType().optional(),
|
|
5163
|
+
// Summary counts
|
|
5164
|
+
totalTests: numberType(),
|
|
5165
|
+
passedTests: numberType(),
|
|
5166
|
+
failedTests: numberType(),
|
|
5167
|
+
flakyTests: numberType(),
|
|
5168
|
+
skippedTests: numberType(),
|
|
5169
|
+
passRate: numberType(),
|
|
5170
|
+
// Sections
|
|
5171
|
+
newRegressions: arrayType(developerReportRegressionSchema),
|
|
5172
|
+
knownFlaky: arrayType(developerReportFlakyTestSchema),
|
|
5173
|
+
slowTests: arrayType(developerReportSlowTestSchema)
|
|
5174
|
+
});
|
|
5175
|
+
executiveReportStatusSchema = enumType([
|
|
5176
|
+
"healthy",
|
|
5177
|
+
"needs_attention",
|
|
5178
|
+
"critical"
|
|
5179
|
+
]);
|
|
5180
|
+
executiveMetricSchema = objectType({
|
|
5181
|
+
/** Current month's value */
|
|
5182
|
+
value: numberType(),
|
|
5183
|
+
/** Previous month's value */
|
|
5184
|
+
previousValue: numberType(),
|
|
5185
|
+
/** Percentage change from previous month (null if previous was 0) */
|
|
5186
|
+
change: numberType().nullable()
|
|
5187
|
+
});
|
|
5188
|
+
executiveKeyMetricsSchema = objectType({
|
|
5189
|
+
/** CI First-Try Pass Rate: COUNT(runs WHERE failed=0 AND flaky=0) / COUNT(runs) */
|
|
5190
|
+
ciFirstTryPassRate: executiveMetricSchema,
|
|
5191
|
+
/** Total Test Pass Rate from health analytics */
|
|
5192
|
+
testPassRate: executiveMetricSchema,
|
|
5193
|
+
/** Count of distinct tests with flaky outcomes */
|
|
5194
|
+
flakyTestCount: executiveMetricSchema,
|
|
5195
|
+
/** CI compute time lost on failed/retried runs in hours */
|
|
5196
|
+
ciComputeLostHours: executiveMetricSchema
|
|
5197
|
+
});
|
|
5198
|
+
executiveTrendPointSchema = objectType({
|
|
5199
|
+
date: stringType(),
|
|
5200
|
+
value: numberType()
|
|
5201
|
+
});
|
|
5202
|
+
executiveTrendsSchema = objectType({
|
|
5203
|
+
/** Daily pass rate values for sparkline */
|
|
5204
|
+
dailyPassRate: arrayType(executiveTrendPointSchema),
|
|
5205
|
+
/** Daily flaky count values for sparkline */
|
|
5206
|
+
dailyFlakyCount: arrayType(executiveTrendPointSchema)
|
|
5207
|
+
});
|
|
5208
|
+
executiveFlakyOffenderSchema = objectType({
|
|
5209
|
+
testId: stringType(),
|
|
5210
|
+
title: stringType(),
|
|
5211
|
+
file: stringType(),
|
|
5212
|
+
/** Number of flaky occurrences */
|
|
5213
|
+
flakyCount: numberType(),
|
|
5214
|
+
/** CI time impact in hours */
|
|
5215
|
+
ciTimeImpactHours: numberType()
|
|
5216
|
+
});
|
|
5217
|
+
executiveSlowestOffenderSchema = objectType({
|
|
5218
|
+
testId: stringType(),
|
|
5219
|
+
title: stringType(),
|
|
5220
|
+
file: stringType(),
|
|
5221
|
+
/** Average duration in milliseconds */
|
|
5222
|
+
avgDurationMs: numberType(),
|
|
5223
|
+
/** Trend percentage change from previous period (null if no previous data) */
|
|
5224
|
+
trend: numberType().nullable()
|
|
5225
|
+
});
|
|
5226
|
+
executiveTopOffendersSchema = objectType({
|
|
5227
|
+
/** Top 3 most flaky tests with CI time impact */
|
|
5228
|
+
mostFlaky: arrayType(executiveFlakyOffenderSchema),
|
|
5229
|
+
/** Top 3 slowest tests with trend */
|
|
5230
|
+
slowest: arrayType(executiveSlowestOffenderSchema)
|
|
5231
|
+
});
|
|
5232
|
+
executiveReportSchema = objectType({
|
|
5233
|
+
/** Month in format YYYY-MM */
|
|
5234
|
+
month: stringType(),
|
|
5235
|
+
/** When the report was generated */
|
|
5236
|
+
generatedAt: stringType(),
|
|
5237
|
+
/** URL to view full report in dashboard */
|
|
5238
|
+
reportUrl: stringType(),
|
|
5239
|
+
/** Overall status: healthy, needs_attention, or critical */
|
|
5240
|
+
status: executiveReportStatusSchema,
|
|
5241
|
+
/** 4 key metrics with month-over-month comparison */
|
|
5242
|
+
keyMetrics: executiveKeyMetricsSchema,
|
|
5243
|
+
/** 30-day trend data for sparklines */
|
|
5244
|
+
trends: executiveTrendsSchema,
|
|
5245
|
+
/** Top offenders (most flaky and slowest tests) */
|
|
5246
|
+
topOffenders: executiveTopOffendersSchema,
|
|
5247
|
+
/** Auto-generated signal messages based on thresholds */
|
|
5248
|
+
signals: arrayType(stringType())
|
|
5249
|
+
});
|
|
5250
|
+
executiveReportQuerySchema = objectType({
|
|
5251
|
+
month: stringType().regex(
|
|
5252
|
+
/^\d{4}-\d{2}$/,
|
|
5253
|
+
"month must be in format YYYY-MM"
|
|
5254
|
+
)
|
|
5255
|
+
});
|
|
5256
|
+
sendExecutiveReportRequestSchema = objectType({
|
|
5257
|
+
month: stringType().regex(
|
|
5258
|
+
/^\d{4}-\d{2}$/,
|
|
5259
|
+
"month must be in format YYYY-MM"
|
|
5260
|
+
),
|
|
5261
|
+
emails: arrayType(stringType().email())
|
|
5262
|
+
});
|
|
5039
5263
|
}
|
|
5040
5264
|
});
|
|
5041
5265
|
|
|
@@ -5294,7 +5518,7 @@ var CLI_VERSION;
|
|
|
5294
5518
|
var init_version = __esm({
|
|
5295
5519
|
"src/version.ts"() {
|
|
5296
5520
|
"use strict";
|
|
5297
|
-
CLI_VERSION = "0.0.
|
|
5521
|
+
CLI_VERSION = "0.0.29";
|
|
5298
5522
|
}
|
|
5299
5523
|
});
|
|
5300
5524
|
|
|
@@ -6260,6 +6484,9 @@ var init_agent = __esm({
|
|
|
6260
6484
|
async run(config2) {
|
|
6261
6485
|
this.abortController = new AbortController();
|
|
6262
6486
|
this.presenter.onStart(config2);
|
|
6487
|
+
if (config2.providerSessionId) {
|
|
6488
|
+
this.presenter.onLog(`Resuming with providerSessionId: ${config2.providerSessionId}`);
|
|
6489
|
+
}
|
|
6263
6490
|
const claudeCodePath = await this.resolveClaudeCodePath();
|
|
6264
6491
|
let prompt = config2.task;
|
|
6265
6492
|
if (config2.logs) {
|
|
@@ -11743,7 +11970,9 @@ var init_interactive = __esm({
|
|
|
11743
11970
|
const uiMessages = convertQueriesToUIMessages(queries);
|
|
11744
11971
|
setSessionId(session.id);
|
|
11745
11972
|
setContextSessionId(session.id);
|
|
11746
|
-
|
|
11973
|
+
const resumeProviderSessionId = session.providerSessionId || void 0;
|
|
11974
|
+
logger.debug(`Resume session: ${session.id}, providerSessionId: ${resumeProviderSessionId || "NOT SET"}`);
|
|
11975
|
+
setProviderSessionId(resumeProviderSessionId);
|
|
11747
11976
|
const contextData = await apiClient.getSessionContext(session.id);
|
|
11748
11977
|
if (contextData.contextTokens > 0) {
|
|
11749
11978
|
const cacheRead = contextData.cacheReadTokens || 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supatest/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "Supatest CLI - AI-powered task automation for CI/CD",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1
|
|
41
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.1",
|
|
42
42
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
43
43
|
"@types/inquirer": "^9.0.0",
|
|
44
44
|
"ansi-escapes": "^7.0.0",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"ink-gradient": "^3.0.0",
|
|
53
53
|
"ink-spinner": "^5.0.0",
|
|
54
54
|
"inquirer": "^10.0.0",
|
|
55
|
+
"latest-version": "^9.0.0",
|
|
55
56
|
"lowlight": "^3.3.0",
|
|
56
57
|
"marked": "^15.0.0",
|
|
57
58
|
"marked-terminal": "^7.3.0",
|
|
@@ -59,18 +60,17 @@
|
|
|
59
60
|
"patch-package": "^8.0.1",
|
|
60
61
|
"postinstall-postinstall": "^2.1.0",
|
|
61
62
|
"react": "^19.0.0",
|
|
63
|
+
"semver": "^7.6.0",
|
|
62
64
|
"string-width": "^8.1.0",
|
|
63
65
|
"strip-ansi": "^7.1.2",
|
|
64
66
|
"undici": "^7.16.0",
|
|
65
|
-
"wrap-ansi": "^9.0.2"
|
|
66
|
-
"latest-version": "^9.0.0",
|
|
67
|
-
"semver": "^7.6.0"
|
|
67
|
+
"wrap-ansi": "^9.0.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/node": "^20.12.12",
|
|
71
|
-
"dotenv": "^16.6.1",
|
|
72
|
-
"@types/semver": "^7.5.8",
|
|
73
71
|
"@types/react": "^19.0.0",
|
|
72
|
+
"@types/semver": "^7.5.8",
|
|
73
|
+
"dotenv": "^16.6.1",
|
|
74
74
|
"nodemon": "^3.1.11",
|
|
75
75
|
"tsup": "^8.5.1",
|
|
76
76
|
"tsx": "^4.10.0",
|