aienvmp 0.1.22 → 0.1.23
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/commands/context.js +3 -0
- package/src/commands/plan.js +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.23
|
|
4
|
+
|
|
5
|
+
- Added compact `stepSummary` output to `context --json`.
|
|
6
|
+
- Reused the AI plan step model so preflight context can show remediation and environment drift summaries.
|
|
7
|
+
- Kept full step details in `aienvmp plan` while keeping context lightweight.
|
|
8
|
+
|
|
3
9
|
## 0.1.22
|
|
4
10
|
|
|
5
11
|
- Reworked the README around Quick Start, AI Usage, CI Usage, and outputs.
|
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ Use the GitHub Action to write the env map, plan, dashboard, and optional strict
|
|
|
79
79
|
```bash
|
|
80
80
|
aienvmp sync # update env map, light SBOM, ledger, dashboard
|
|
81
81
|
aienvmp context # AI preflight brief
|
|
82
|
-
aienvmp context --json #
|
|
82
|
+
aienvmp context --json # AI decision context + actions + compact step summary
|
|
83
83
|
aienvmp plan # read-only AI action plan for drift and remediation
|
|
84
84
|
aienvmp handoff # next-agent handoff summary + recommended actions
|
|
85
85
|
aienvmp intent # record a planned env change
|
package/package.json
CHANGED
package/src/commands/context.js
CHANGED
|
@@ -5,6 +5,7 @@ import { intentsPath, manifestPath, timelinePath, workspaceDir } from "../paths.
|
|
|
5
5
|
import { renderContext } from "../render.js";
|
|
6
6
|
import { loadPolicy, policyWarnings } from "../policy.js";
|
|
7
7
|
import { recommendedActions } from "../actions.js";
|
|
8
|
+
import { buildPlan, compactStepSummary } from "./plan.js";
|
|
8
9
|
|
|
9
10
|
export async function contextWorkspace(args) {
|
|
10
11
|
const dir = workspaceDir(args);
|
|
@@ -16,11 +17,13 @@ export async function contextWorkspace(args) {
|
|
|
16
17
|
const warnings = [...diagnose(manifest, { timeline, intents }), ...policyWarnings(manifest, policy)];
|
|
17
18
|
const decision = contextDecision(warnings, intents);
|
|
18
19
|
const actions = recommendedActions(manifest, { warnings, intents });
|
|
20
|
+
const stepSummary = compactStepSummary(buildPlan(manifest, warnings, intents, policy));
|
|
19
21
|
if (args.json) {
|
|
20
22
|
console.log(JSON.stringify({
|
|
21
23
|
status: warnings.length ? "review-required" : "clear",
|
|
22
24
|
decision,
|
|
23
25
|
recommendedActions: actions,
|
|
26
|
+
stepSummary,
|
|
24
27
|
trust: manifest.trust || {},
|
|
25
28
|
guidance: decision,
|
|
26
29
|
workspace: manifest.workspace,
|
package/src/commands/plan.js
CHANGED
|
@@ -66,6 +66,22 @@ export function buildPlan(manifest, warnings = [], intents = [], policy = {}) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
export function compactStepSummary(plan = {}) {
|
|
70
|
+
return {
|
|
71
|
+
remediation: (plan.remediationSteps || []).slice(0, 3).map((item) => ({
|
|
72
|
+
package: item.package,
|
|
73
|
+
severity: item.severity,
|
|
74
|
+
fixVersions: (item.fixVersions || []).slice(0, 3),
|
|
75
|
+
advisoryIds: (item.advisories || []).map((advisory) => advisory.id || advisory.title).filter(Boolean).slice(0, 3)
|
|
76
|
+
})),
|
|
77
|
+
environment: (plan.environmentSteps || []).slice(0, 3).map((item) => ({
|
|
78
|
+
code: item.code,
|
|
79
|
+
category: item.category,
|
|
80
|
+
summary: item.summary
|
|
81
|
+
}))
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
69
85
|
function environmentSteps(warnings = []) {
|
|
70
86
|
return warnings
|
|
71
87
|
.filter((warning) => warning.code !== "security-vulnerabilities")
|