@amistio/cli 0.1.26 → 0.1.27
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/dist/index.js +32 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1691,6 +1691,7 @@ var appEvaluationFindingResultSchema = z.object({
|
|
|
1691
1691
|
proposedPlanTitle: z.string().trim().min(1).max(200).optional(),
|
|
1692
1692
|
proposedPlanRepoPath: z.string().trim().min(1).max(300).optional(),
|
|
1693
1693
|
proposedPlanContent: z.string().trim().min(1).max(3e4).optional(),
|
|
1694
|
+
dedupeKey: z.string().trim().min(1).max(240).optional(),
|
|
1694
1695
|
status: appEvaluationFindingStatusSchema.default("open")
|
|
1695
1696
|
});
|
|
1696
1697
|
var appEvaluationScanResultSchema = z.object({
|
|
@@ -1736,6 +1737,7 @@ var appEvaluationFindingItemSchema = baseItemSchema.extend({
|
|
|
1736
1737
|
verificationPlan: z.array(z.string().trim().min(1).max(300)).min(1),
|
|
1737
1738
|
proposedLifecycleAction: appEvaluationPlanLifecycleActionSchema.default("none"),
|
|
1738
1739
|
relatedArtifactIds: z.array(z.string().trim().min(1).max(160)).default([]),
|
|
1740
|
+
dedupeKey: z.string().trim().min(1).max(240).optional(),
|
|
1739
1741
|
proposedPlanDocumentId: z.string().min(1).optional(),
|
|
1740
1742
|
implementationWorkItemId: z.string().min(1).optional(),
|
|
1741
1743
|
reviewNotes: z.string().trim().min(1).optional(),
|
|
@@ -5616,6 +5618,7 @@ function createTestQualityScanPrompt(workItem, context) {
|
|
|
5616
5618
|
"Accepted command kind values: verify, test, coverage, lint, typecheck, build, focused.",
|
|
5617
5619
|
"Accepted command status values: passed, failed, skipped, missing, blocked.",
|
|
5618
5620
|
"Accepted finding categories: missingTests, missingCoverage, lowCoverage, failingTests, failingQuality, missingCommand, flakyTests, unverifiedImplementation, testGap, other.",
|
|
5621
|
+
"Omit optional fields when unavailable; do not emit null for optional command summary fields such as exitCode, durationMs, outputExcerpt, commandId, or safePaths.",
|
|
5619
5622
|
"",
|
|
5620
5623
|
testQualityStart,
|
|
5621
5624
|
'{"summary":"Whole-app verification exists, but coverage reporting is missing for one package.","profile":{"testProfileId":"test_profile_detected","repositoryLinkId":"repository_link_placeholder","status":"detected","enabled":true,"detectedPackageManager":"pnpm","packageManagers":["pnpm"],"commands":[{"commandId":"verify","kind":"verify","label":"Whole-app verification","source":"detected","scriptName":"verify","workingDirectory":".","required":true}],"coverageThresholds":{"lines":80},"defaultWholeAppCommandId":"verify","focusedCommandIds":[],"lastDetectedAt":"2026-01-01T00:00:00.000Z"},"commandSummaries":[{"commandId":"verify","kind":"verify","label":"Whole-app verification","status":"passed","exitCode":0,"summary":"The repository verification script completed successfully.","safePaths":["package.json"]}],"coverage":{"status":"missing","thresholds":{"lines":80},"summary":"No coverage report was found."},"findings":[{"title":"Coverage report is missing","category":"missingCoverage","severity":"medium","confidence":"high","summary":"The repository test profile does not produce a coverage summary.","affectedSurfaces":["Test verification"],"evidence":["The scan found a test command but no coverage output."],"safePaths":["package.json"],"suggestedAction":"Add or document a coverage command for the affected package and include it in whole-app verification.","verificationPlan":["Run the new coverage command locally","Confirm coverage appears in the Test panel"],"dedupeKey":"missing-coverage"}],"blockedReasons":[],"redactionState":{"status":"clean","redactedFields":[]},"verificationPlan":["Review generated Test findings","Run the whole-app verification command before implementation handoff"],"warnings":[]}',
|
|
@@ -5656,6 +5659,7 @@ function createImplementationTestGatePrompt(workItem) {
|
|
|
5656
5659
|
"",
|
|
5657
5660
|
"Print exactly one JSON object between the markers below. The CLI will submit only this structured gate result back to Amistio.",
|
|
5658
5661
|
"Accepted outcome values: passed, failed, blocked, overridden.",
|
|
5662
|
+
"Omit optional fields when unavailable; do not emit null for optional command summary fields such as exitCode, durationMs, outputExcerpt, commandId, or safePaths.",
|
|
5659
5663
|
"",
|
|
5660
5664
|
implementationTestGateStart,
|
|
5661
5665
|
'{"outcome":"passed","summary":"Focused checks and whole-app verification passed.","commandSummaries":[{"commandId":"verify","kind":"verify","label":"Whole-app verification","status":"passed","exitCode":0,"summary":"The repository verification script completed successfully.","safePaths":["package.json"]}],"coverage":{"status":"unknown","thresholds":{},"summary":"No coverage threshold was configured for this gate."},"findings":[],"blockedReasons":[],"redactionState":{"status":"clean","redactedFields":[]},"verificationPlan":["Record this gate result before marking implementation complete"],"warnings":[]}',
|
|
@@ -5937,9 +5941,10 @@ function createAppEvaluationScanPrompt(workItem, context) {
|
|
|
5937
5941
|
"Accepted severity values: info, low, medium, high, critical.",
|
|
5938
5942
|
"Accepted confidence values: low, medium, high.",
|
|
5939
5943
|
"Accepted proposedLifecycleAction values: createPlan, updatePlan, markCompleted, markImplemented, markSuperseded, markBlocked, archive, keepActive, none.",
|
|
5944
|
+
"Include a stable dedupeKey for each finding based on the underlying issue identity, not scan time, generated wording, or transient ordering.",
|
|
5940
5945
|
"",
|
|
5941
5946
|
appEvaluationStart,
|
|
5942
|
-
'{"summary":"The app is generally healthy, but one release-readiness plan needs cleanup and verification evidence should be refreshed.","baselineVersion":"amistio-app-evaluation-v1","findings":[{"title":"Stale release plan should be marked superseded","category":"planCleanup","severity":"low","confidence":"high","summary":"A release plan appears to describe a workflow that has since been replaced by a newer accepted plan.","affectedSurfaces":["docs/plans"],"evidence":["A newer plan references the same scope and status, while the older plan remains proposed."],"suggestedAction":"Prepare a cleanup update that marks the stale plan superseded and links to the newer plan.","verificationPlan":["Review both plan files","Confirm the newer plan is accepted before changing lifecycle state"],"safePaths":["docs/plans/PLAN-example.md"],"proposedLifecycleAction":"markSuperseded","relatedArtifactIds":[]}],"verificationPlan":["Review App Evaluation findings for approval","Run the canonical verify gate before implementing approved actions"]}',
|
|
5947
|
+
'{"summary":"The app is generally healthy, but one release-readiness plan needs cleanup and verification evidence should be refreshed.","baselineVersion":"amistio-app-evaluation-v1","findings":[{"title":"Stale release plan should be marked superseded","category":"planCleanup","severity":"low","confidence":"high","dedupeKey":"plan-cleanup-docs-plans-plan-example-superseded","summary":"A release plan appears to describe a workflow that has since been replaced by a newer accepted plan.","affectedSurfaces":["docs/plans"],"evidence":["A newer plan references the same scope and status, while the older plan remains proposed."],"suggestedAction":"Prepare a cleanup update that marks the stale plan superseded and links to the newer plan.","verificationPlan":["Review both plan files","Confirm the newer plan is accepted before changing lifecycle state"],"safePaths":["docs/plans/PLAN-example.md"],"proposedLifecycleAction":"markSuperseded","relatedArtifactIds":[]}],"verificationPlan":["Review App Evaluation findings for approval","Run the canonical verify gate before implementing approved actions"]}',
|
|
5943
5948
|
appEvaluationEnd,
|
|
5944
5949
|
"",
|
|
5945
5950
|
"Do not put Markdown fences around the markers. Do not implement improvements or cleanup."
|
|
@@ -6299,9 +6304,9 @@ function parseTestQualityScanResult(output) {
|
|
|
6299
6304
|
}
|
|
6300
6305
|
const payload = output.slice(start + testQualityStart.length, end).trim();
|
|
6301
6306
|
const parsed = JSON.parse(stripJsonFence(payload));
|
|
6302
|
-
return testQualityScanResultSchema.parse(
|
|
6307
|
+
return testQualityScanResultSchema.parse(normalizeTestQualityScanResult(parsed));
|
|
6303
6308
|
}
|
|
6304
|
-
function
|
|
6309
|
+
function normalizeTestQualityScanResult(value) {
|
|
6305
6310
|
if (!isObjectRecord(value)) {
|
|
6306
6311
|
return value;
|
|
6307
6312
|
}
|
|
@@ -6313,7 +6318,29 @@ function normalizeTestQualityScanResultCommandKinds(value) {
|
|
|
6313
6318
|
};
|
|
6314
6319
|
}
|
|
6315
6320
|
if (Array.isArray(normalized.commandSummaries)) {
|
|
6316
|
-
normalized.commandSummaries = normalized.commandSummaries.map(
|
|
6321
|
+
normalized.commandSummaries = normalized.commandSummaries.map(normalizeTestCommandSummaryObject);
|
|
6322
|
+
}
|
|
6323
|
+
return normalized;
|
|
6324
|
+
}
|
|
6325
|
+
function normalizeImplementationTestGateResult(value) {
|
|
6326
|
+
if (!isObjectRecord(value)) {
|
|
6327
|
+
return value;
|
|
6328
|
+
}
|
|
6329
|
+
const normalized = { ...value };
|
|
6330
|
+
if (Array.isArray(normalized.commandSummaries)) {
|
|
6331
|
+
normalized.commandSummaries = normalized.commandSummaries.map(normalizeTestCommandSummaryObject);
|
|
6332
|
+
}
|
|
6333
|
+
return normalized;
|
|
6334
|
+
}
|
|
6335
|
+
function normalizeTestCommandSummaryObject(value) {
|
|
6336
|
+
if (!isObjectRecord(value)) {
|
|
6337
|
+
return value;
|
|
6338
|
+
}
|
|
6339
|
+
const normalized = { ...value, kind: normalizeTestCommandKind(value.kind) };
|
|
6340
|
+
for (const key of ["commandId", "durationMs", "exitCode", "outputExcerpt", "safePaths"]) {
|
|
6341
|
+
if (normalized[key] === null) {
|
|
6342
|
+
delete normalized[key];
|
|
6343
|
+
}
|
|
6317
6344
|
}
|
|
6318
6345
|
return normalized;
|
|
6319
6346
|
}
|
|
@@ -6351,7 +6378,7 @@ function parseImplementationTestGateResult(output) {
|
|
|
6351
6378
|
}
|
|
6352
6379
|
const payload = output.slice(start + implementationTestGateStart.length, end).trim();
|
|
6353
6380
|
const parsed = JSON.parse(stripJsonFence(payload));
|
|
6354
|
-
return implementationTestGateResultSchema.parse(parsed);
|
|
6381
|
+
return implementationTestGateResultSchema.parse(normalizeImplementationTestGateResult(parsed));
|
|
6355
6382
|
}
|
|
6356
6383
|
function projectContextRefreshSubmissionFailureSummary(result) {
|
|
6357
6384
|
if (result.refresh.status !== "failed" && result.workItem.status !== "failed") {
|