aienvmp 0.1.44 → 0.1.45
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 +2 -4
- package/package.json +1 -1
- package/src/cli.js +6 -1
- package/src/commands/checkpoint.js +68 -0
- package/src/commands/handoff.js +2 -1
- package/src/commands/plan.js +10 -6
- package/src/commands/record.js +3 -1
- package/src/commands/status.js +1 -0
- package/src/decision.js +1 -0
- package/src/manifest.js +2 -1
- package/src/preflight.js +4 -1
- package/src/render.js +7 -12
package/BUGFIXES.md
CHANGED
|
@@ -52,6 +52,12 @@ Short record of bugs, fixes, and follow-up checks.
|
|
|
52
52
|
- Fix: `doctor`, status/context, handoff, and the dashboard now expose same-target multi-agent records through advisory warnings and `agentActivity`.
|
|
53
53
|
- Verification: tests cover multi-agent record detection, later handoff reset, status JSON, handoff text, dashboard HTML, and recommended actions.
|
|
54
54
|
|
|
55
|
+
### Post-change loop was too many commands for routine AI handoff
|
|
56
|
+
|
|
57
|
+
- Issue: after an environment change, agents had to remember separate record, sync, status, and handoff commands.
|
|
58
|
+
- Fix: `aienvmp checkpoint` now performs the post-change loop and records an explicit sync ledger entry so follow-ups can be closed.
|
|
59
|
+
- Verification: checkpoint tests cover text/JSON output, status artifact refresh, timeline entries, handoff recording, and cleared follow-ups.
|
|
60
|
+
|
|
55
61
|
## Template
|
|
56
62
|
|
|
57
63
|
### Title
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.45
|
|
4
|
+
|
|
5
|
+
- Added `aienvmp checkpoint` as a one-command post-environment-change flow for record, sync, status, and handoff.
|
|
6
|
+
- Added quiet command support so checkpoint can compose existing commands without noisy intermediate output.
|
|
7
|
+
- Added checkpoint sync ledger entries so follow-up detection can prove the refresh step happened.
|
|
8
|
+
- Added checkpoint guidance to the shared preflight, decision, manifest, dependency protocol, and status outputs.
|
|
9
|
+
- Updated AIENV, handoff, plan, dashboard, and agent pointer rendering to prefer checkpoint after environment changes.
|
|
10
|
+
- Shortened the README environment-change flow to intent plus checkpoint.
|
|
11
|
+
- Added checkpoint regression coverage for JSON output, ledger updates, follow-up closure, status artifacts, and rendered guidance.
|
|
12
|
+
|
|
3
13
|
## 0.1.44
|
|
4
14
|
|
|
5
15
|
- Added multi-agent record warnings when multiple agents record environment changes for the same target after the last handoff.
|
package/README.md
CHANGED
|
@@ -23,10 +23,7 @@ Before environment changes:
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
npx aienvmp intent --actor agent:codex --action "change dependency" --target dependency
|
|
26
|
-
npx aienvmp
|
|
27
|
-
npx aienvmp sync
|
|
28
|
-
npx aienvmp status --write
|
|
29
|
-
npx aienvmp handoff --record --actor agent:codex
|
|
26
|
+
npx aienvmp checkpoint --actor agent:codex --summary "dependency-change" --target dependency
|
|
30
27
|
```
|
|
31
28
|
|
|
32
29
|
Use `--dir <workspace>` when AI or CI runs outside the target project.
|
|
@@ -79,6 +76,7 @@ aienvmp plan --write # read-only action plan
|
|
|
79
76
|
aienvmp handoff --record # next-agent summary
|
|
80
77
|
aienvmp intent # record planned env change
|
|
81
78
|
aienvmp record # record what changed
|
|
79
|
+
aienvmp checkpoint # record + sync + status + handoff after env change
|
|
82
80
|
aienvmp doctor --strict security|policy|coordination|all
|
|
83
81
|
```
|
|
84
82
|
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -14,6 +14,7 @@ import { handoffWorkspace } from "./commands/handoff.js";
|
|
|
14
14
|
import { planWorkspace } from "./commands/plan.js";
|
|
15
15
|
import { statusWorkspace } from "./commands/status.js";
|
|
16
16
|
import { schemaWorkspace } from "./commands/schema.js";
|
|
17
|
+
import { checkpointWorkspace } from "./commands/checkpoint.js";
|
|
17
18
|
import { readFileSync } from "node:fs";
|
|
18
19
|
|
|
19
20
|
const commands = new Map([
|
|
@@ -32,7 +33,8 @@ const commands = new Map([
|
|
|
32
33
|
["handoff", handoffWorkspace],
|
|
33
34
|
["plan", planWorkspace],
|
|
34
35
|
["status", statusWorkspace],
|
|
35
|
-
["schema", schemaWorkspace]
|
|
36
|
+
["schema", schemaWorkspace],
|
|
37
|
+
["checkpoint", checkpointWorkspace]
|
|
36
38
|
]);
|
|
37
39
|
|
|
38
40
|
const version = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
@@ -108,6 +110,7 @@ Usage:
|
|
|
108
110
|
aienvmp context [--dir .] [--json]
|
|
109
111
|
aienvmp status [--dir .] [--json] [--write] [--quiet]
|
|
110
112
|
aienvmp handoff [--dir .] [--json] [--record --actor agent:id]
|
|
113
|
+
aienvmp checkpoint [--dir .] --actor agent:id --summary "what changed" [--target dependency] [--json]
|
|
111
114
|
aienvmp plan [--dir .] [--json] [--write]
|
|
112
115
|
aienvmp schema [--json]
|
|
113
116
|
|
|
@@ -116,6 +119,7 @@ Common:
|
|
|
116
119
|
aienvmp status print one simple environment decision; --write saves .aienvmp/status.json
|
|
117
120
|
aienvmp context print the AI preflight brief
|
|
118
121
|
aienvmp handoff print the next-agent handoff summary
|
|
122
|
+
aienvmp checkpoint record, sync, status, and handoff after an env change
|
|
119
123
|
aienvmp plan print a read-only AI environment action plan
|
|
120
124
|
aienvmp schema print the stable AI-readable output contract
|
|
121
125
|
aienvmp snippet print an AGENTS.md pointer snippet
|
|
@@ -127,6 +131,7 @@ Advanced:
|
|
|
127
131
|
aienvmp intent [--dir .] --actor agent:codex --action "install pnpm"
|
|
128
132
|
aienvmp resolve [--dir .] --actor human:you --id <intent-id> [--status resolved|cancelled]
|
|
129
133
|
aienvmp record [--dir .] --actor agent:codex --summary "updated .nvmrc" [--target node] [--before 20] [--after 24]
|
|
134
|
+
aienvmp checkpoint [--dir .] --actor agent:codex --summary "updated dependency" [--target dependency]
|
|
130
135
|
aienvmp snippet [agents|claude|gemini] [--write AGENTS.md]
|
|
131
136
|
aienvmp compile [--dir .]
|
|
132
137
|
aienvmp diff [--dir .]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { handoffWorkspace } from "./handoff.js";
|
|
2
|
+
import { recordWorkspace } from "./record.js";
|
|
3
|
+
import { statusWorkspace } from "./status.js";
|
|
4
|
+
import { syncWorkspace } from "./sync.js";
|
|
5
|
+
import { appendJsonLine } from "../fsutil.js";
|
|
6
|
+
import { timelinePath, workspaceDir } from "../paths.js";
|
|
7
|
+
import { observedTrust } from "../trust.js";
|
|
8
|
+
|
|
9
|
+
export async function checkpointWorkspace(args) {
|
|
10
|
+
const actor = required(args.actor, "actor");
|
|
11
|
+
const summary = required(args.summary || args.change, "summary");
|
|
12
|
+
const quiet = args.quiet || args.json;
|
|
13
|
+
const base = { ...args, actor, summary, quiet: true };
|
|
14
|
+
|
|
15
|
+
const record = await recordWorkspace(base);
|
|
16
|
+
const sync = await syncWorkspace({ ...base, json: false, quiet: true });
|
|
17
|
+
await recordCheckpointSync(base);
|
|
18
|
+
const handoff = await handoffWorkspace({ ...base, json: false, record: true, quiet: true });
|
|
19
|
+
const status = await statusWorkspace({ ...base, json: false, write: true, quiet: true });
|
|
20
|
+
|
|
21
|
+
const result = {
|
|
22
|
+
status: "ok",
|
|
23
|
+
mode: "post-environment-change",
|
|
24
|
+
actor,
|
|
25
|
+
summary,
|
|
26
|
+
target: args.target || "",
|
|
27
|
+
record,
|
|
28
|
+
outputs: sync.outputs,
|
|
29
|
+
state: status.state,
|
|
30
|
+
warnings: status.counts?.warnings || 0,
|
|
31
|
+
followUps: status.followUps || [],
|
|
32
|
+
agentActivity: status.agentActivity || {},
|
|
33
|
+
handoff: {
|
|
34
|
+
status: handoff.status,
|
|
35
|
+
recommendedNext: handoff.recommendedNext
|
|
36
|
+
},
|
|
37
|
+
next: "Share .aienvmp/status.json or run `aienvmp context --json` before another environment change."
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
if (args.json) {
|
|
41
|
+
console.log(JSON.stringify(result, null, 2));
|
|
42
|
+
} else if (!quiet) {
|
|
43
|
+
console.log(`checkpoint: ${result.state}`);
|
|
44
|
+
console.log(`record: ${record.summary}${record.target ? ` (${record.target})` : ""}`);
|
|
45
|
+
console.log(`status: ${result.outputs.status}`);
|
|
46
|
+
console.log(`handoff: ${handoff.status}`);
|
|
47
|
+
console.log(`next: ${result.next}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function recordCheckpointSync(args) {
|
|
54
|
+
const now = new Date();
|
|
55
|
+
await appendJsonLine(timelinePath(workspaceDir(args)), {
|
|
56
|
+
at: now.toISOString(),
|
|
57
|
+
actor: args.actor,
|
|
58
|
+
type: "sync",
|
|
59
|
+
summary: "checkpoint sync",
|
|
60
|
+
target: "",
|
|
61
|
+
trust: observedTrust(now)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function required(value, name) {
|
|
66
|
+
if (!value) throw new Error(`checkpoint: --${name} is required`);
|
|
67
|
+
return String(value);
|
|
68
|
+
}
|
package/src/commands/handoff.js
CHANGED
|
@@ -24,7 +24,7 @@ export async function handoffWorkspace(args) {
|
|
|
24
24
|
|
|
25
25
|
if (args.json) {
|
|
26
26
|
console.log(JSON.stringify(handoff, null, 2));
|
|
27
|
-
} else {
|
|
27
|
+
} else if (!args.quiet) {
|
|
28
28
|
console.log(renderHandoff(handoff));
|
|
29
29
|
}
|
|
30
30
|
return handoff;
|
|
@@ -95,6 +95,7 @@ function dependencyHandoffSummary(preflight = {}) {
|
|
|
95
95
|
packageManagerPolicy: protocol.packageManagerPolicy || "not-detected",
|
|
96
96
|
recordIntent: protocol.commands?.recordIntent || "aienvmp intent --actor agent:id --action planned-change --target dependency",
|
|
97
97
|
recordAfterChange: protocol.commands?.recordAfterChange || "aienvmp record --actor agent:id --summary dependency-change --target dependency",
|
|
98
|
+
checkpointAfterChange: protocol.commands?.checkpointAfterChange || "aienvmp checkpoint --actor agent:id --summary dependency-change --target dependency",
|
|
98
99
|
handoff: protocol.commands?.handoff || "aienvmp handoff --record --actor agent:id"
|
|
99
100
|
}
|
|
100
101
|
};
|
package/src/commands/plan.js
CHANGED
|
@@ -103,7 +103,7 @@ function environmentSteps(warnings = []) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
function environmentCategory(code = "") {
|
|
106
|
-
if (["conflicting-open-intents", "stale-open-intent", "handoff-stale"].includes(code)) return "coordination";
|
|
106
|
+
if (["conflicting-open-intents", "stale-open-intent", "handoff-stale", "multi-agent-records"].includes(code)) return "coordination";
|
|
107
107
|
if (code.includes("docker")) return "container";
|
|
108
108
|
if (code.includes("lockfile") || code.includes("package-manager")) return "package-manager";
|
|
109
109
|
if (code.includes("node") || code.includes("python") || code.includes("version") || code.includes("runtime")) return "runtime";
|
|
@@ -115,13 +115,13 @@ function environmentStepLines(code = "") {
|
|
|
115
115
|
"Read .nvmrc and the detected Node version before changing tools.",
|
|
116
116
|
"Prefer project-local version managers such as nvm, mise, or asdf.",
|
|
117
117
|
"Ask before changing global Node or npm installations.",
|
|
118
|
-
"Run aienvmp
|
|
118
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target node after alignment."
|
|
119
119
|
];
|
|
120
120
|
if (code === "python-version-mismatch") return [
|
|
121
121
|
"Read .python-version and the detected Python version before changing tools.",
|
|
122
122
|
"Prefer project-local virtual environments or version managers.",
|
|
123
123
|
"Ask before changing global Python installations.",
|
|
124
|
-
"Run aienvmp
|
|
124
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target python after alignment."
|
|
125
125
|
];
|
|
126
126
|
if (code === "mixed-node-lockfiles" || code === "package-manager-policy-mismatch") return [
|
|
127
127
|
"Identify the intended package manager from project policy and lockfiles.",
|
|
@@ -133,13 +133,13 @@ function environmentStepLines(code = "") {
|
|
|
133
133
|
"Confirm whether the Python project is active.",
|
|
134
134
|
"Prefer project-local Python setup before global installation.",
|
|
135
135
|
"Ask before installing a global Python runtime.",
|
|
136
|
-
"Run aienvmp
|
|
136
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target python after setup."
|
|
137
137
|
];
|
|
138
138
|
if (code === "docker-missing") return [
|
|
139
139
|
"Confirm whether Docker is required for the current task.",
|
|
140
140
|
"Do not change Docker daemon or context without user approval.",
|
|
141
141
|
"Document fallback commands if Docker is unavailable.",
|
|
142
|
-
"Run aienvmp
|
|
142
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target docker after Docker availability changes."
|
|
143
143
|
];
|
|
144
144
|
if (code === "manifest-stale") return [
|
|
145
145
|
"Run aienvmp sync before environment changes.",
|
|
@@ -158,10 +158,14 @@ function environmentStepLines(code = "") {
|
|
|
158
158
|
"Run aienvmp handoff --record --actor agent:id before the next AI continues.",
|
|
159
159
|
"Review recent changes before new environment work."
|
|
160
160
|
];
|
|
161
|
+
if (code === "multi-agent-records") return [
|
|
162
|
+
"Review agentActivity and recent timeline records for the shared target.",
|
|
163
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target environment before more environment work."
|
|
164
|
+
];
|
|
161
165
|
return [
|
|
162
166
|
"Review the warning before changing environment state.",
|
|
163
167
|
"Ask before global environment changes.",
|
|
164
|
-
"Run aienvmp
|
|
168
|
+
"Run aienvmp checkpoint --actor agent:id --summary what-changed --target environment after any accepted change."
|
|
165
169
|
];
|
|
166
170
|
}
|
|
167
171
|
|
package/src/commands/record.js
CHANGED
|
@@ -22,7 +22,8 @@ export async function recordWorkspace(args) {
|
|
|
22
22
|
trust: changedTrust(now, requiresReview)
|
|
23
23
|
};
|
|
24
24
|
await appendJsonLine(timelinePath(dir), entry);
|
|
25
|
-
console.log(`recorded ${entry.type} by ${actor}`);
|
|
25
|
+
if (!args.quiet) console.log(`recorded ${entry.type} by ${actor}`);
|
|
26
|
+
return entry;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export function followUpForRecord(record = {}) {
|
|
@@ -42,6 +43,7 @@ export function followUpForRecord(record = {}) {
|
|
|
42
43
|
? "Dependency or security records should refresh the env map and handoff context."
|
|
43
44
|
: "Environment records should refresh the env map and handoff context.",
|
|
44
45
|
commands: [
|
|
46
|
+
`aienvmp checkpoint --actor agent:id --summary ${isDependency ? "dependency-change" : "what-changed"} --target ${isDependency ? "dependency" : target || "environment"}`,
|
|
45
47
|
"aienvmp sync",
|
|
46
48
|
"aienvmp status --write",
|
|
47
49
|
"aienvmp handoff --record --actor agent:id"
|
package/src/commands/status.js
CHANGED
|
@@ -25,6 +25,7 @@ export async function statusWorkspace(args) {
|
|
|
25
25
|
console.log(`next: ${output.nextCommand}`);
|
|
26
26
|
console.log(`ai: ${output.quickstart.readFirst} -> ${output.quickstart.detailCommand}`);
|
|
27
27
|
console.log(`intent: ${output.intentTargets[0]?.command || output.commands.recordIntent}`);
|
|
28
|
+
console.log(`checkpoint: ${output.commands.checkpoint}`);
|
|
28
29
|
console.log(`handoff: ${output.nextAgent.handoffCommand}`);
|
|
29
30
|
console.log(`strict: ${output.enforcement.recommendedCommand}`);
|
|
30
31
|
if (artifact) console.log(`status: ${artifact}`);
|
package/src/decision.js
CHANGED
|
@@ -25,6 +25,7 @@ export function aiDecision(warnings = [], intents = []) {
|
|
|
25
25
|
: ["continue with project-local work", "run aienvmp intent before environment changes"],
|
|
26
26
|
requiredCommands: {
|
|
27
27
|
beforeEnvironmentChange: "aienvmp intent --actor agent:id --action planned-change --target <runtime|package-manager|docker>",
|
|
28
|
+
checkpointAfterChange: "aienvmp checkpoint --actor agent:id --summary what-changed --target environment",
|
|
28
29
|
refreshAfterChange: "aienvmp sync",
|
|
29
30
|
recordAfterChange: "aienvmp record --actor agent:id --summary what-changed",
|
|
30
31
|
handoff: "aienvmp handoff --record --actor agent:id",
|
package/src/manifest.js
CHANGED
|
@@ -42,7 +42,8 @@ export async function buildManifest(dir, options = {}) {
|
|
|
42
42
|
handoffCommand: "aienvmp handoff",
|
|
43
43
|
intentCommand: "aienvmp intent --actor agent:id --action planned-change",
|
|
44
44
|
recordCommand: "aienvmp record --actor agent:id --summary what-changed",
|
|
45
|
-
|
|
45
|
+
checkpointCommand: "aienvmp checkpoint --actor agent:id --summary what-changed --target environment",
|
|
46
|
+
afterEnvironmentChange: ["aienvmp checkpoint --actor agent:id --summary what-changed --target environment"],
|
|
46
47
|
trustModel: {
|
|
47
48
|
agentWritable: ["observed", "planned", "changed", "review", "stale"],
|
|
48
49
|
verifiedRequires: "human-or-ci",
|
package/src/preflight.js
CHANGED
|
@@ -76,6 +76,7 @@ export function buildPreflight(manifest = {}, warnings = [], intents = [], timel
|
|
|
76
76
|
context: "aienvmp context --json",
|
|
77
77
|
plan: "aienvmp plan --write",
|
|
78
78
|
handoff: "aienvmp handoff --record --actor agent:id",
|
|
79
|
+
checkpoint: "aienvmp checkpoint --actor agent:id --summary what-changed --target environment",
|
|
79
80
|
recordIntent: intentTargets[0]?.command || "aienvmp intent --actor agent:id --action planned-change"
|
|
80
81
|
},
|
|
81
82
|
topAction,
|
|
@@ -220,6 +221,7 @@ function dependencyProtocol(manifest = {}, dependencyReadSet = []) {
|
|
|
220
221
|
recordIntent: "aienvmp intent --actor agent:id --action planned-change --target dependency",
|
|
221
222
|
refreshAfterChange: "aienvmp sync",
|
|
222
223
|
recordAfterChange: "aienvmp record --actor agent:id --summary dependency-change --target dependency",
|
|
224
|
+
checkpointAfterChange: "aienvmp checkpoint --actor agent:id --summary dependency-change --target dependency",
|
|
223
225
|
handoff: "aienvmp handoff --record --actor agent:id"
|
|
224
226
|
},
|
|
225
227
|
mustNotDo: [
|
|
@@ -335,7 +337,8 @@ function agentQuickstart(reviewRequired) {
|
|
|
335
337
|
readFirst: "aienvmp status --write",
|
|
336
338
|
detailCommand: "aienvmp context --json",
|
|
337
339
|
beforeEnvironmentChange: "aienvmp intent --actor agent:id --action planned-change --target <runtime|package-manager|docker|dependency>",
|
|
338
|
-
afterEnvironmentChange: "aienvmp
|
|
340
|
+
afterEnvironmentChange: "aienvmp checkpoint --actor agent:id --summary what-changed --target environment",
|
|
341
|
+
checkpointAfterChange: "aienvmp checkpoint --actor agent:id --summary what-changed --target environment",
|
|
339
342
|
handoff: "aienvmp handoff --record --actor agent:id",
|
|
340
343
|
rule: reviewRequired
|
|
341
344
|
? "Review warnings or open intents before environment changes; project-local work may continue."
|
package/src/render.js
CHANGED
|
@@ -13,9 +13,7 @@ export function renderAIEnv(manifest, timeline = [], warnings = [], intents = []
|
|
|
13
13
|
lines.push("2. Prefer project-local version files such as `.nvmrc`, `.python-version`, `mise.toml`, and `.tool-versions`.");
|
|
14
14
|
lines.push("3. Ask the user before changing global environment state.");
|
|
15
15
|
lines.push("4. Record planned environment changes with `aienvmp intent --actor agent:id --action planned-change`.");
|
|
16
|
-
lines.push("5. After environment changes, run `aienvmp
|
|
17
|
-
lines.push("6. Record what changed with `aienvmp record --actor agent:id --summary what-changed`.");
|
|
18
|
-
lines.push("7. At handoff, run `aienvmp handoff --record --actor agent:id`.", "");
|
|
16
|
+
lines.push("5. After environment changes, run `aienvmp checkpoint --actor agent:id --summary what-changed --target environment`.", "");
|
|
19
17
|
lines.push(...preflightLines(manifest.preflight), "");
|
|
20
18
|
lines.push("## Current Policy", "");
|
|
21
19
|
lines.push(...policyLines(policy));
|
|
@@ -107,7 +105,7 @@ function preflightLines(preflight = {}) {
|
|
|
107
105
|
lines.push(`- Mode: ${dependencyProtocol.mode}`);
|
|
108
106
|
lines.push(`- Package manager policy: ${dependencyProtocol.packageManagerPolicy}`);
|
|
109
107
|
lines.push(`- Intent: \`${dependencyProtocol.commands.recordIntent}\``);
|
|
110
|
-
lines.push(`- After change: \`${dependencyProtocol.commands.
|
|
108
|
+
lines.push(`- After change: \`${dependencyProtocol.commands.checkpointAfterChange || dependencyProtocol.commands.recordAfterChange}\``);
|
|
111
109
|
lines.push(`- Handoff: \`${dependencyProtocol.commands.handoff}\``);
|
|
112
110
|
for (const item of dependencyProtocol.mustNotDo.slice(0, 3)) lines.push(`- Must not: ${item}`);
|
|
113
111
|
}
|
|
@@ -127,8 +125,7 @@ Before changing runtimes, package managers, Docker settings, global packages, or
|
|
|
127
125
|
3. Read \`AIENV.md\`.
|
|
128
126
|
4. If status or context says \`review-required\`, ask the user before changing the environment.
|
|
129
127
|
5. Record planned environment changes with the recommended target, for example \`aienvmp intent --actor agent:id --action planned-change --target dependency\`.
|
|
130
|
-
6. After environment changes, run \`aienvmp
|
|
131
|
-
7. At handoff, run \`aienvmp handoff --record --actor agent:id\`.
|
|
128
|
+
6. After environment changes, run \`aienvmp checkpoint --actor agent:id --summary what-changed --target environment\`.
|
|
132
129
|
|
|
133
130
|
\`aienvmp\` does not replace this instruction file. It provides the live env map, lightweight runtime SBOM, intent log, timeline, and dashboard.`;
|
|
134
131
|
}
|
|
@@ -160,9 +157,7 @@ export function renderContext(manifest, timeline = [], warnings = [], intents =
|
|
|
160
157
|
"- Treat policy mismatches as review-required, not as permission to break ongoing operations.",
|
|
161
158
|
"- Prefer project-local version files and local environments.",
|
|
162
159
|
"- Before planned env changes, run `aienvmp intent --actor agent:id --action planned-change`.",
|
|
163
|
-
"- After env changes, run `aienvmp
|
|
164
|
-
"- Then run `aienvmp record --actor agent:id --summary what-changed`.",
|
|
165
|
-
"- Before handing work to another AI, run `aienvmp handoff --record --actor agent:id`.",
|
|
160
|
+
"- After env changes, run `aienvmp checkpoint --actor agent:id --summary what-changed --target environment`.",
|
|
166
161
|
"",
|
|
167
162
|
"Warnings:",
|
|
168
163
|
...(warnings.length ? warnings.map((w) => `- ${w.message}`) : ["- none"]),
|
|
@@ -254,7 +249,7 @@ function dependencyHandoffLines(dependencyHandoff = {}) {
|
|
|
254
249
|
lines.push("- Read: no dependency files detected");
|
|
255
250
|
}
|
|
256
251
|
lines.push(`- Intent: ${protocol.recordIntent || "aienvmp intent --actor agent:id --action planned-change --target dependency"}`);
|
|
257
|
-
lines.push(`- After change: ${protocol.recordAfterChange || "aienvmp
|
|
252
|
+
lines.push(`- After change: ${protocol.checkpointAfterChange || protocol.recordAfterChange || "aienvmp checkpoint --actor agent:id --summary dependency-change --target dependency"}`);
|
|
258
253
|
lines.push(`- Handoff: ${protocol.handoff || "aienvmp handoff --record --actor agent:id"}`);
|
|
259
254
|
return lines;
|
|
260
255
|
}
|
|
@@ -304,7 +299,7 @@ function dependencyProtocolPlanLines(protocol = {}) {
|
|
|
304
299
|
`- Mode: ${protocol.mode || "advisory"}`,
|
|
305
300
|
`- Package manager policy: ${protocol.packageManagerPolicy || "not-detected"}`,
|
|
306
301
|
`- Intent: ${protocol.commands.recordIntent}`,
|
|
307
|
-
`- After change: ${protocol.commands.refreshAfterChange}; ${protocol.commands.recordAfterChange}`,
|
|
302
|
+
`- After change: ${protocol.commands.checkpointAfterChange || `${protocol.commands.refreshAfterChange}; ${protocol.commands.recordAfterChange}`}`,
|
|
308
303
|
...(protocol.mustNotDo || []).slice(0, 3).map((item) => `- Must not: ${item}`)
|
|
309
304
|
];
|
|
310
305
|
}
|
|
@@ -470,7 +465,7 @@ const activityHtml=activityTargets.length?'<div class="timeline">'+activityTarge
|
|
|
470
465
|
const dependencyReadSet=manifest.preflight?.dependencyReadSet||[];
|
|
471
466
|
const dependencyReadSetHtml=dependencyReadSet.length?'<div class="timeline">'+dependencyReadSet.slice(0,5).map(d=>\`<div class="event"><time>\${esc(d.ecosystem||'deps')}</time><div><b>\${esc(d.manifest||'dependency files')}</b> <code>\${esc(d.manager||'unknown')}</code><div class="path">\${esc([d.manifest,...(d.lockfiles||[])].filter(Boolean).join(', '))}</div>\${d.riskPackages?.length?\`<div class="path">risk: \${esc(d.riskPackages.join(', '))}</div>\`:''}</div></div>\`).join('')+'</div>':'<div class="okline">No dependency files detected.</div>';
|
|
472
467
|
const dependencyProtocol=manifest.preflight?.dependencyChangeProtocol||{};
|
|
473
|
-
const dependencyProtocolHtml=dependencyProtocol.commands?'<table><tr><th>Mode</th><td><code>'+esc(dependencyProtocol.mode||'advisory')+'</code></td></tr><tr><th>Policy</th><td><code>'+esc(dependencyProtocol.packageManagerPolicy||'not-detected')+'</code></td></tr><tr><th>Intent</th><td><code>'+esc(dependencyProtocol.commands.recordIntent)+'</code></td></tr><tr><th>After</th><td><code>'+esc(dependencyProtocol.commands.
|
|
468
|
+
const dependencyProtocolHtml=dependencyProtocol.commands?'<table><tr><th>Mode</th><td><code>'+esc(dependencyProtocol.mode||'advisory')+'</code></td></tr><tr><th>Policy</th><td><code>'+esc(dependencyProtocol.packageManagerPolicy||'not-detected')+'</code></td></tr><tr><th>Intent</th><td><code>'+esc(dependencyProtocol.commands.recordIntent)+'</code></td></tr><tr><th>After</th><td><code>'+esc(dependencyProtocol.commands.checkpointAfterChange||dependencyProtocol.commands.recordAfterChange)+'</code></td></tr></table><div class="timeline">'+(dependencyProtocol.mustNotDo||[]).slice(0,3).map(item=>\`<div class="event"><time>avoid</time><div>\${esc(item)}</div></div>\`).join('')+'</div>':'<div class="okline">No dependency change protocol available.</div>';
|
|
474
469
|
const card=(title,badge,body)=>\`<section class="card"><div class="card-head"><h2>\${title}</h2>\${badge||''}</div>\${body}</section>\`;
|
|
475
470
|
const reviewRequired=warnings.length>0||intents.length>0;
|
|
476
471
|
const recentChanges=timeline.slice(-8).length;
|