aienvmp 0.1.53 → 0.1.54
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/BUGFIXES.md +6 -0
- package/CHANGELOG.md +10 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/commands/context.js +1 -0
- package/src/commands/doctor.js +4 -2
- package/src/commands/status.js +1 -0
- package/src/commands/summary.js +2 -0
- package/src/contract.js +2 -2
- package/src/preflight.js +27 -0
- package/src/render.js +2 -0
package/BUGFIXES.md
CHANGED
|
@@ -112,6 +112,12 @@ Short record of bugs, fixes, and follow-up checks.
|
|
|
112
112
|
- Fix: `agentPointers` now appears in status/preflight, context JSON, doctor JSON, and summary markdown.
|
|
113
113
|
- Verification: regression tests cover status, context, doctor, schema, and summary outputs.
|
|
114
114
|
|
|
115
|
+
### AI continuation readiness was spread across several fields
|
|
116
|
+
|
|
117
|
+
- Issue: AI consumers had to infer readiness from status, intents, activity, follow-ups, pointer state, and SBOM risk separately.
|
|
118
|
+
- Fix: `aiReadiness` now provides one advisory ready/review signal across status, context, doctor, summary, and dashboard.
|
|
119
|
+
- Verification: regression tests cover ready/review summaries, text status output, schema metadata, and dashboard rendering.
|
|
120
|
+
|
|
115
121
|
## Template
|
|
116
122
|
|
|
117
123
|
### Title
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.54
|
|
4
|
+
|
|
5
|
+
- Added `aiReadiness` to the shared preflight/status contract.
|
|
6
|
+
- Added root `aiReadiness` to `context --json`.
|
|
7
|
+
- Added `aiReadiness` to `doctor --json` as advisory metadata.
|
|
8
|
+
- Printed `ai-readiness` in plain `aienvmp status` output.
|
|
9
|
+
- Added `AI readiness` to `.aienvmp/summary.md`.
|
|
10
|
+
- Added an AI readiness item to the dashboard audit band.
|
|
11
|
+
- Updated README, schema metadata, and regression tests for the ready/review signal.
|
|
12
|
+
|
|
3
13
|
## 0.1.53
|
|
4
14
|
|
|
5
15
|
- Added `agentPointers` to the shared AI preflight/status contract.
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ AIENV.md # Markdown env map for AI agents
|
|
|
50
50
|
- `schema --json` prints the stable AI-readable output contract without scanning.
|
|
51
51
|
- `summary.md` is the short CI/AI handoff view.
|
|
52
52
|
- `status.json.nextAgent` tells the next AI what to read and whether to review first.
|
|
53
|
+
- `aiReadiness` gives a one-field ready/review signal for AI continuation.
|
|
53
54
|
- `dependencyReadSet` lists manifests and lockfiles before package or security changes.
|
|
54
55
|
- `sbomRisk` gives AI a compact light-SBOM risk level, signals, and next command.
|
|
55
56
|
- `coordination.conflictTargets` shows where multiple agents are planning changes.
|
package/package.json
CHANGED
package/src/commands/context.js
CHANGED
|
@@ -26,6 +26,7 @@ export async function contextWorkspace(args) {
|
|
|
26
26
|
console.log(JSON.stringify({
|
|
27
27
|
status: warnings.length ? "review-required" : "clear",
|
|
28
28
|
preflight,
|
|
29
|
+
aiReadiness: preflight.aiReadiness,
|
|
29
30
|
coordination: preflight.coordination,
|
|
30
31
|
agentPointers: preflight.agentPointers,
|
|
31
32
|
sbomRisk: preflight.sbomRisk,
|
package/src/commands/doctor.js
CHANGED
|
@@ -5,7 +5,7 @@ import { intentsPath, manifestPath, timelinePath, workspaceDir } from "../paths.
|
|
|
5
5
|
import { loadPolicy, policyWarnings } from "../policy.js";
|
|
6
6
|
import { recommendedActions } from "../actions.js";
|
|
7
7
|
import { enforcementAdvice, strictResult } from "../enforcement.js";
|
|
8
|
-
import {
|
|
8
|
+
import { buildPreflight } from "../preflight.js";
|
|
9
9
|
|
|
10
10
|
export { strictResult } from "../enforcement.js";
|
|
11
11
|
|
|
@@ -18,6 +18,7 @@ export async function doctorWorkspace(args) {
|
|
|
18
18
|
const intents = openIntents(await readJsonl(intentsPath(dir)));
|
|
19
19
|
const warnings = [...diagnose(manifest, { timeline, intents }), ...policyWarnings(manifest, policy)];
|
|
20
20
|
const actions = recommendedActions(manifest, { warnings, intents });
|
|
21
|
+
const preflight = buildPreflight(manifest, warnings, intents, timeline);
|
|
21
22
|
const strict = strictResult(warnings, args);
|
|
22
23
|
const exitBehavior = {
|
|
23
24
|
mode: strict.enabled ? "strict" : "advisory",
|
|
@@ -33,7 +34,8 @@ export async function doctorWorkspace(args) {
|
|
|
33
34
|
exitBehavior,
|
|
34
35
|
trust: manifest.trust || {},
|
|
35
36
|
policy,
|
|
36
|
-
|
|
37
|
+
aiReadiness: preflight.aiReadiness,
|
|
38
|
+
agentPointers: preflight.agentPointers,
|
|
37
39
|
openIntentCount: intents.length,
|
|
38
40
|
warnings,
|
|
39
41
|
recommendedActions: actions,
|
package/src/commands/status.js
CHANGED
|
@@ -22,6 +22,7 @@ export async function statusWorkspace(args) {
|
|
|
22
22
|
console.log(JSON.stringify(output, null, 2));
|
|
23
23
|
} else if (!args.quiet) {
|
|
24
24
|
console.log(`${output.state}: ${output.summary}`);
|
|
25
|
+
console.log(`ai-readiness: ${output.aiReadiness?.level || "unknown"} - ${output.aiReadiness?.next || "Run aienvmp context --json for details."}`);
|
|
25
26
|
console.log(`next: ${output.nextCommand}`);
|
|
26
27
|
console.log(`ai: ${output.quickstart.readFirst} -> ${output.quickstart.detailCommand}`);
|
|
27
28
|
console.log(`intent: ${output.intentTargets[0]?.command || output.commands.recordIntent}`);
|
package/src/commands/summary.js
CHANGED
|
@@ -52,6 +52,7 @@ export function renderSummary(status = {}, manifest = {}) {
|
|
|
52
52
|
const dependencyCommands = dependencyProtocol.commands || {};
|
|
53
53
|
const dependencyFiles = dependencyFilesFor(status.dependencyReadSet);
|
|
54
54
|
const agentPointers = status.agentPointers || {};
|
|
55
|
+
const aiReadiness = status.aiReadiness || {};
|
|
55
56
|
|
|
56
57
|
return [
|
|
57
58
|
"# aienvmp summary",
|
|
@@ -62,6 +63,7 @@ export function renderSummary(status = {}, manifest = {}) {
|
|
|
62
63
|
`- runtimes: ${valueOrZero(counts.runtimes)} / dependencies: ${valueOrZero(counts.dependencies)} / vulnerabilities: ${valueOrZero(counts.vulnerabilities)}`,
|
|
63
64
|
`- light SBOM risk: ${riskLevel} (${riskScore}) / scanner: ${scanner}`,
|
|
64
65
|
`- next: ${next}`,
|
|
66
|
+
`- AI readiness: ${aiReadiness.level || "unknown"} / ${aiReadiness.next || "Run aienvmp context --json for details."}`,
|
|
65
67
|
`- AI read first: ${readFirst}, then ${detail}`,
|
|
66
68
|
`- mode: advisory by default; strict is opt-in with ${strict}`,
|
|
67
69
|
"",
|
package/src/contract.js
CHANGED
|
@@ -4,7 +4,7 @@ export function preflightContract() {
|
|
|
4
4
|
version: 1,
|
|
5
5
|
stability: "additive",
|
|
6
6
|
requiredFields: ["schemaVersion", "state", "decision", "quickstart", "commands", "artifacts"],
|
|
7
|
-
aiEntryFields: ["state", "summary", "nextAgent", "coordination", "agentActivity", "agentPointers", "sbomRisk", "followUps", "dependencyReadSet", "dependencyChangeProtocol"],
|
|
7
|
+
aiEntryFields: ["state", "summary", "aiReadiness", "nextAgent", "coordination", "agentActivity", "agentPointers", "sbomRisk", "followUps", "dependencyReadSet", "dependencyChangeProtocol"],
|
|
8
8
|
rule: "Consumers should ignore unknown fields and treat missing optional fields as unavailable."
|
|
9
9
|
};
|
|
10
10
|
}
|
|
@@ -28,7 +28,7 @@ export function schemaContract() {
|
|
|
28
28
|
},
|
|
29
29
|
context: {
|
|
30
30
|
command: "aienvmp context --json",
|
|
31
|
-
rootFields: ["status", "preflight", "coordination", "agentPointers", "decision", "recommendedActions", "workspace", "dependencySnapshot", "lightSbom", "warnings"]
|
|
31
|
+
rootFields: ["status", "preflight", "aiReadiness", "coordination", "agentPointers", "decision", "recommendedActions", "workspace", "dependencySnapshot", "lightSbom", "warnings"]
|
|
32
32
|
},
|
|
33
33
|
handoff: {
|
|
34
34
|
command: "aienvmp handoff --json",
|
package/src/preflight.js
CHANGED
|
@@ -18,6 +18,7 @@ export function buildPreflight(manifest = {}, warnings = [], intents = [], timel
|
|
|
18
18
|
const agentActivity = agentActivitySummary(timeline);
|
|
19
19
|
const sbomRisk = manifest.lightSbom?.riskSummary || {};
|
|
20
20
|
const agentPointers = agentPointerSummary(manifest.agentFiles);
|
|
21
|
+
const aiReadiness = aiReadinessSummary({ state, decision, coordination, agentActivity, agentPointers, sbomRisk, followUps });
|
|
21
22
|
return {
|
|
22
23
|
schemaVersion: 1,
|
|
23
24
|
contract: preflightContract(),
|
|
@@ -60,6 +61,7 @@ export function buildPreflight(manifest = {}, warnings = [], intents = [], timel
|
|
|
60
61
|
coordination,
|
|
61
62
|
agentActivity,
|
|
62
63
|
agentPointers,
|
|
64
|
+
aiReadiness,
|
|
63
65
|
sbomRisk,
|
|
64
66
|
followUps,
|
|
65
67
|
intentTargets,
|
|
@@ -89,6 +91,31 @@ export function buildPreflight(manifest = {}, warnings = [], intents = [], timel
|
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
|
|
94
|
+
function aiReadinessSummary({ state, decision, coordination, agentActivity, agentPointers, sbomRisk, followUps }) {
|
|
95
|
+
const blockers = [];
|
|
96
|
+
const review = [];
|
|
97
|
+
if (state !== "clear") review.push("status review required");
|
|
98
|
+
if ((coordination?.conflictTargets || []).length) review.push("open intent conflicts");
|
|
99
|
+
if ((agentActivity?.multiActorTargets || []).length) review.push("multi-agent environment activity");
|
|
100
|
+
if ((followUps || []).length) review.push("pending environment follow-ups");
|
|
101
|
+
if (["urgent", "high"].includes(sbomRisk?.level)) review.push("high light SBOM risk");
|
|
102
|
+
if ((agentPointers?.targets || []).length && (agentPointers?.installedCount || 0) === 0) review.push("no agent instruction pointer installed");
|
|
103
|
+
|
|
104
|
+
const level = review.length ? "review" : "ready";
|
|
105
|
+
const next = level === "ready"
|
|
106
|
+
? "AI agents can continue project-local work; record intent before environment changes."
|
|
107
|
+
: "Review listed signals before another AI changes runtimes, dependencies, package managers, Docker, or global tools.";
|
|
108
|
+
return {
|
|
109
|
+
level,
|
|
110
|
+
projectLocalWork: decision?.canContinueProjectLocalWork ? "allowed" : "review-first",
|
|
111
|
+
environmentChanges: decision?.canChangeEnvironmentWithoutReview ? "allowed" : "intent-and-review-first",
|
|
112
|
+
signals: review,
|
|
113
|
+
blockers,
|
|
114
|
+
next,
|
|
115
|
+
mode: "advisory"
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
92
119
|
function agentActivitySummary(timeline = []) {
|
|
93
120
|
const lastHandoffAt = lastTime(timeline, (item) => item.type === "agent-handoff");
|
|
94
121
|
const envRecords = timeline
|
package/src/render.js
CHANGED
|
@@ -493,6 +493,7 @@ const nextAction=reviewRequired?'Review before environment changes':'Proceed wit
|
|
|
493
493
|
const auditItem=(key,value,hint,klass='')=>\`<div class="audit-item \${klass}"><div class="audit-k">\${key}</div><div class="audit-v">\${value}</div><div class="audit-hint">\${hint}</div></div>\`;
|
|
494
494
|
const driftLabel=warnings.length?'detected':'none';
|
|
495
495
|
const nextAgent=manifest.preflight?.nextAgent||{};
|
|
496
|
+
const aiReadiness=manifest.preflight?.aiReadiness||{};
|
|
496
497
|
const coordination=manifest.preflight?.coordination||{};
|
|
497
498
|
const conflictTargets=coordination.conflictTargets||[];
|
|
498
499
|
const handoffFiles=nextAgent.dependencyFiles?.length?nextAgent.dependencyFiles:(dependencyReadSet[0]?[dependencyReadSet[0].manifest,...(dependencyReadSet[0].lockfiles||[])].filter(Boolean):[]);
|
|
@@ -509,6 +510,7 @@ document.getElementById('app').innerHTML=\`
|
|
|
509
510
|
</header>
|
|
510
511
|
<section class="audit" aria-label="Audit summary">
|
|
511
512
|
\${auditItem('AI decision',reviewRequired?'review required':'can proceed',nextAction,reviewRequired?'review':'primary')}
|
|
513
|
+
\${auditItem('AI readiness',aiReadiness.level||'unknown',aiReadiness.next||'Run aienvmp context --json for details.',aiReadiness.level==='ready'?'primary':'review')}
|
|
512
514
|
\${auditItem('Runtime drift',driftLabel,warnings.length?'Policy, runtime, or coordination warning detected':'No drift warnings detected',warnings.length?'review':'')}
|
|
513
515
|
\${auditItem('Open env changes',String(intents.length),intents.length?'Resolve or coordinate before changes':'No pending env changes')}
|
|
514
516
|
\${auditItem('Trust',trustState,trustState==='verified'?'Human or CI verified':'Machine observed; not AI-verified')}
|