aienvmp 0.1.31 → 0.1.33
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 +12 -0
- package/README.md +5 -2
- package/action.yml +11 -0
- package/examples/github-action.yml +1 -0
- package/package.json +1 -1
- package/src/cli.js +3 -3
- package/src/commands/status.js +19 -7
- package/src/commands/sync.js +4 -1
- package/src/paths.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.33
|
|
4
|
+
|
|
5
|
+
- Made `.aienvmp/status.json` a first-class artifact written by `aienvmp sync`.
|
|
6
|
+
- Added `aienvmp status --write` so AI agents and CI can refresh the compact state file directly.
|
|
7
|
+
- Updated the GitHub Action to use the built-in status writer instead of shell redirection.
|
|
8
|
+
|
|
9
|
+
## 0.1.32
|
|
10
|
+
|
|
11
|
+
- Added GitHub Action support for writing `.aienvmp/status.json` by default.
|
|
12
|
+
- Added a `write-status` action input so CI can keep compact AI status artifacts optional.
|
|
13
|
+
- Updated the GitHub Action example artifact list to include the status output.
|
|
14
|
+
|
|
3
15
|
## 0.1.31
|
|
4
16
|
|
|
5
17
|
- Added `aienvmp status` as a compact human and AI entrypoint.
|
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ npx aienvmp handoff --record --actor agent:codex
|
|
|
45
45
|
```text
|
|
46
46
|
AIENV.md
|
|
47
47
|
.aienvmp/manifest.json
|
|
48
|
+
.aienvmp/status.json # first file for AI: clear/review, next command, strict advice
|
|
48
49
|
.aienvmp/intents.jsonl
|
|
49
50
|
.aienvmp/timeline.jsonl
|
|
50
51
|
.aienvmp/plan.json
|
|
@@ -67,11 +68,13 @@ npx aienvmp snippet agents
|
|
|
67
68
|
## CI Usage
|
|
68
69
|
|
|
69
70
|
Use the GitHub Action to write the env map, plan, dashboard, and optional strict checks. See [examples/github-action.yml](examples/github-action.yml).
|
|
71
|
+
CI also writes `.aienvmp/status.json` for a compact AI-readable result.
|
|
70
72
|
The dashboard shows which strict scopes are CI-ready before you enforce them.
|
|
71
73
|
|
|
72
74
|
```yaml
|
|
73
75
|
- uses: soovwv/aienvmp@main
|
|
74
76
|
with:
|
|
77
|
+
write-status: "true"
|
|
75
78
|
write-plan: "true"
|
|
76
79
|
strict: "off" # security, policy, coordination, all, or off
|
|
77
80
|
```
|
|
@@ -79,8 +82,8 @@ The dashboard shows which strict scopes are CI-ready before you enforce them.
|
|
|
79
82
|
## Commands
|
|
80
83
|
|
|
81
84
|
```bash
|
|
82
|
-
aienvmp sync # update env map, light SBOM, ledger, dashboard
|
|
83
|
-
aienvmp status
|
|
85
|
+
aienvmp sync # update env map, light SBOM, status, ledger, dashboard
|
|
86
|
+
aienvmp status --write # refresh .aienvmp/status.json only
|
|
84
87
|
aienvmp context # AI preflight brief
|
|
85
88
|
aienvmp context --json # AI decision contract + actions + compact step summary
|
|
86
89
|
aienvmp plan # read-only AI action plan using the same decision contract
|
package/action.yml
CHANGED
|
@@ -15,6 +15,10 @@ inputs:
|
|
|
15
15
|
description: Write read-only AI plan artifacts
|
|
16
16
|
required: false
|
|
17
17
|
default: "true"
|
|
18
|
+
write-status:
|
|
19
|
+
description: Write compact AI status artifact
|
|
20
|
+
required: false
|
|
21
|
+
default: "true"
|
|
18
22
|
|
|
19
23
|
runs:
|
|
20
24
|
using: composite
|
|
@@ -30,6 +34,13 @@ runs:
|
|
|
30
34
|
node "$GITHUB_ACTION_PATH/bin/aienvmp.js" plan --dir "${{ inputs.directory }}" --write --json
|
|
31
35
|
fi
|
|
32
36
|
|
|
37
|
+
- name: Write AI status
|
|
38
|
+
shell: bash
|
|
39
|
+
run: |
|
|
40
|
+
if [ "${{ inputs.write-status }}" = "true" ]; then
|
|
41
|
+
node "$GITHUB_ACTION_PATH/bin/aienvmp.js" status --dir "${{ inputs.directory }}" --write --quiet
|
|
42
|
+
fi
|
|
43
|
+
|
|
33
44
|
- name: Doctor
|
|
34
45
|
shell: bash
|
|
35
46
|
run: |
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -80,13 +80,13 @@ function printUsage() {
|
|
|
80
80
|
Usage:
|
|
81
81
|
aienvmp sync [--dir .] [--json] [--quiet] [--deep] [--security]
|
|
82
82
|
aienvmp context [--dir .] [--json]
|
|
83
|
-
aienvmp status [--dir .] [--json]
|
|
83
|
+
aienvmp status [--dir .] [--json] [--write] [--quiet]
|
|
84
84
|
aienvmp handoff [--dir .] [--json] [--record --actor agent:id]
|
|
85
85
|
aienvmp plan [--dir .] [--json] [--write]
|
|
86
86
|
|
|
87
87
|
Common:
|
|
88
|
-
aienvmp sync update AIENV.md, manifest, ledger, intents, and dashboard
|
|
89
|
-
aienvmp status print one simple environment decision
|
|
88
|
+
aienvmp sync update AIENV.md, manifest, status, ledger, intents, and dashboard
|
|
89
|
+
aienvmp status print one simple environment decision; --write saves .aienvmp/status.json
|
|
90
90
|
aienvmp context print the AI preflight brief
|
|
91
91
|
aienvmp handoff print the next-agent handoff summary
|
|
92
92
|
aienvmp plan print a read-only AI environment action plan
|
package/src/commands/status.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
1
3
|
import { diagnose } from "../doctor.js";
|
|
2
4
|
import { readJson } from "../fsutil.js";
|
|
3
5
|
import { loadPolicy, policyWarnings } from "../policy.js";
|
|
4
|
-
import { intentsPath, manifestPath, timelinePath, workspaceDir } from "../paths.js";
|
|
6
|
+
import { intentsPath, manifestPath, statusJsonPath, timelinePath, workspaceDir } from "../paths.js";
|
|
5
7
|
import { openIntents, readJsonl, readTimeline } from "../timeline.js";
|
|
6
8
|
import { recommendedActions } from "../actions.js";
|
|
7
9
|
import { aiDecision } from "../decision.js";
|
|
@@ -16,14 +18,24 @@ export async function statusWorkspace(args) {
|
|
|
16
18
|
const intents = openIntents(await readJsonl(intentsPath(dir)));
|
|
17
19
|
const warnings = [...diagnose(manifest, { timeline, intents }), ...policyWarnings(manifest, policy)];
|
|
18
20
|
const status = buildStatus(manifest, warnings, intents);
|
|
21
|
+
const artifact = args.write ? await writeStatusArtifact(dir, status) : "";
|
|
22
|
+
const output = artifact ? { ...status, artifact } : status;
|
|
19
23
|
if (args.json) {
|
|
20
|
-
console.log(JSON.stringify(
|
|
21
|
-
} else {
|
|
22
|
-
console.log(`${
|
|
23
|
-
console.log(`next: ${
|
|
24
|
-
console.log(`strict: ${
|
|
24
|
+
console.log(JSON.stringify(output, null, 2));
|
|
25
|
+
} else if (!args.quiet) {
|
|
26
|
+
console.log(`${output.state}: ${output.summary}`);
|
|
27
|
+
console.log(`next: ${output.nextCommand}`);
|
|
28
|
+
console.log(`strict: ${output.enforcement.recommendedCommand}`);
|
|
29
|
+
if (artifact) console.log(`status: ${artifact}`);
|
|
25
30
|
}
|
|
26
|
-
return
|
|
31
|
+
return output;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function writeStatusArtifact(dir, status) {
|
|
35
|
+
const out = statusJsonPath(dir);
|
|
36
|
+
await fs.mkdir(path.dirname(out), { recursive: true });
|
|
37
|
+
await fs.writeFile(out, JSON.stringify(status, null, 2), "utf8");
|
|
38
|
+
return out;
|
|
27
39
|
}
|
|
28
40
|
|
|
29
41
|
export function buildStatus(manifest = {}, warnings = [], intents = []) {
|
package/src/commands/sync.js
CHANGED
|
@@ -2,6 +2,7 @@ import { initWorkspace } from "./init.js";
|
|
|
2
2
|
import { scanWorkspace } from "./scan.js";
|
|
3
3
|
import { compileWorkspace } from "./compile.js";
|
|
4
4
|
import { dashWorkspace } from "./dash.js";
|
|
5
|
+
import { statusWorkspace } from "./status.js";
|
|
5
6
|
|
|
6
7
|
export async function syncWorkspace(args) {
|
|
7
8
|
const quiet = args.quiet || args.json;
|
|
@@ -11,6 +12,7 @@ export async function syncWorkspace(args) {
|
|
|
11
12
|
const scanned = await scanWorkspace(next);
|
|
12
13
|
const compiled = await compileWorkspace(next);
|
|
13
14
|
const dashboard = await dashWorkspace(next);
|
|
15
|
+
const status = await statusWorkspace({ ...next, json: false, write: true, quiet: true });
|
|
14
16
|
|
|
15
17
|
const result = {
|
|
16
18
|
status: "ok",
|
|
@@ -18,6 +20,7 @@ export async function syncWorkspace(args) {
|
|
|
18
20
|
aiEnv: compiled.aiEnv,
|
|
19
21
|
manifest: scanned.manifest,
|
|
20
22
|
timeline: scanned.timeline,
|
|
23
|
+
status: status.artifact,
|
|
21
24
|
dashboard: dashboard.dashboard
|
|
22
25
|
},
|
|
23
26
|
changes: scanned.changes,
|
|
@@ -27,7 +30,7 @@ export async function syncWorkspace(args) {
|
|
|
27
30
|
if (args.json) {
|
|
28
31
|
console.log(JSON.stringify(result, null, 2));
|
|
29
32
|
} else if (!quiet) {
|
|
30
|
-
console.log("sync complete: AIENV.md, manifest, ledger, intents, and dashboard are up to date");
|
|
33
|
+
console.log("sync complete: AIENV.md, manifest, status, ledger, intents, and dashboard are up to date");
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
return result;
|
package/src/paths.js
CHANGED
|
@@ -12,6 +12,10 @@ export function manifestPath(dir) {
|
|
|
12
12
|
return path.join(stateDir(dir), "manifest.json");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export function statusJsonPath(dir) {
|
|
16
|
+
return path.join(stateDir(dir), "status.json");
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
export function previousManifestPath(dir) {
|
|
16
20
|
return path.join(stateDir(dir), "manifest.previous.json");
|
|
17
21
|
}
|