aienvmp 0.1.51 → 0.1.52

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 CHANGED
@@ -100,6 +100,12 @@ Short record of bugs, fixes, and follow-up checks.
100
100
  - Fix: snippets and the Codex skill now use the current status, summary, context, intent, and checkpoint flow with agent-specific actor examples.
101
101
  - Verification: regression tests cover snippet output for AGENTS.md, Claude, and Gemini, and summary/status tests cover the read order and dependency protocol.
102
102
 
103
+ ### AI pointer files were only detected as booleans
104
+
105
+ - Issue: AI and humans could see that an instruction file existed, but not whether it actually contained the aienvmp pointer.
106
+ - Fix: `agentFiles` now records path, existence, pointer marker state, role, and install command; recommended actions suggest installing a pointer without failing local work.
107
+ - Verification: tests cover sync pointer scanning, recommended action output, and dashboard status labels.
108
+
103
109
  ## Template
104
110
 
105
111
  ### Title
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.52
4
+
5
+ - Expanded `manifest.agentFiles` from booleans to lightweight agent instruction metadata.
6
+ - Detected whether AGENTS.md, CLAUDE.md, and GEMINI.md contain the aienvmp pointer marker.
7
+ - Added install commands and roles to agent instruction metadata.
8
+ - Added a low-priority recommended action when no AI instruction pointer is installed.
9
+ - Updated the dashboard Agent Pointers card to distinguish installed pointers, missing pointers, and missing files.
10
+ - Updated README guidance to mention pointer detection and non-blocking doctor recommendations.
11
+ - Added regression tests for pointer scanning, pointer recommendations, dashboard rendering, and sync output.
12
+
3
13
  ## 0.1.51
4
14
 
5
15
  - Updated Codex/Claude/Gemini pointer snippets to use the current `status -> summary.md -> context` read order.
package/README.md CHANGED
@@ -72,6 +72,7 @@ npx aienvmp snippet gemini
72
72
  ```
73
73
 
74
74
  Snippets point each AI to `status`, `summary.md`, `context --json`, intent, and checkpoint without taking over the instruction file.
75
+ `sync` records whether those pointers are installed, and `doctor` can recommend installing one without blocking local work.
75
76
 
76
77
  ## Commands
77
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aienvmp",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "AI-first environment maps and lightweight runtime SBOMs for shared development machines.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/actions.js CHANGED
@@ -21,6 +21,7 @@ export function recommendedActions(manifest = {}, context = {}) {
21
21
 
22
22
  actions.push(...securityActions(manifest.security));
23
23
  actions.push(...sbomRiskActions(manifest.lightSbom?.riskSummary));
24
+ actions.push(...agentPointerActions(manifest.agentFiles));
24
25
 
25
26
  if (hasRuntimePolicyWarning(warnings)) {
26
27
  actions.push(action("review-version-policy", "medium", "runtime", "Detected runtime or package manager policy drift. Prefer project-local version files and ask before global changes."));
@@ -74,6 +75,25 @@ function securityActions(security = {}) {
74
75
  )];
75
76
  }
76
77
 
78
+ function agentPointerActions(agentFiles = {}) {
79
+ const known = Object.entries(agentFiles || {}).filter(([name]) => ["agents", "claude", "gemini"].includes(name));
80
+ if (!known.length) return [];
81
+ if (known.some(([, item]) => hasPointer(item))) return [];
82
+ const first = known.find(([, item]) => item?.installCommand) || known[0];
83
+ return [action(
84
+ "install-agent-pointer",
85
+ "low",
86
+ "agent-instructions",
87
+ "Install an aienvmp pointer in an agent instruction file so future AI agents discover the env map before changing runtimes or dependencies.",
88
+ first?.[1]?.installCommand || "aienvmp snippet codex --write"
89
+ )];
90
+ }
91
+
92
+ function hasPointer(item) {
93
+ if (typeof item === "boolean") return item;
94
+ return item?.hasAienvmpPointer === true;
95
+ }
96
+
77
97
  function action(id, priority, category, summary, command = "") {
78
98
  return { id, priority, category, summary, command };
79
99
  }
package/src/manifest.js CHANGED
@@ -205,11 +205,32 @@ async function scanAgentFiles(dir) {
205
205
  };
206
206
  const out = {};
207
207
  for (const [name, rel] of Object.entries(files)) {
208
- out[name] = await exists(path.join(dir, rel));
208
+ const full = path.join(dir, rel);
209
+ const fileExists = await exists(full);
210
+ const content = fileExists ? await fs.readFile(full, "utf8") : "";
211
+ out[name] = {
212
+ path: rel,
213
+ exists: fileExists,
214
+ hasAienvmpPointer: content.includes("<!-- aienvmp:begin -->") && content.includes("<!-- aienvmp:end -->"),
215
+ installCommand: snippetCommand(name),
216
+ role: agentRole(name)
217
+ };
209
218
  }
210
219
  return out;
211
220
  }
212
221
 
222
+ function snippetCommand(name) {
223
+ if (name === "agents") return "aienvmp snippet codex --write";
224
+ if (["claude", "gemini"].includes(name)) return `aienvmp snippet ${name} --write`;
225
+ return "";
226
+ }
227
+
228
+ function agentRole(name) {
229
+ if (name === "agents") return "codex";
230
+ if (["claude", "gemini"].includes(name)) return name;
231
+ return "external";
232
+ }
233
+
213
234
  function compact(obj) {
214
235
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => value));
215
236
  }
package/src/render.js CHANGED
@@ -445,7 +445,11 @@ const securityHtml=sec.enabled?\`<table><tr><th>Total</th><td><code>\${esc(secSu
445
445
  const change=c=>c.type==='changed'?\`\${c.scope} \${c.key}: \${c.before} -> \${c.after}\`:\`\${c.scope} \${c.key}: \${c.type} \${c.after||c.before}\`;
446
446
  const timelineLabel=t=>t.change?change(t.change):(t.summary||t.action||t.type||'recorded change');
447
447
  const agentNames={agents:'Codex',claude:'Claude',gemini:'Gemini'};
448
- const agentCards=Object.entries(agentNames).map(([key,label])=>\`<div class="agent"><strong>\${label}</strong><span>\${manifest.agentFiles?.[key]?'instruction file detected':'not detected'}</span></div>\`).join('');
448
+ const agentInfo=v=>typeof v==='object'&&v? v : {exists:!!v,hasAienvmpPointer:!!v,path:''};
449
+ const agentHasPointer=v=>agentInfo(v).hasAienvmpPointer===true;
450
+ const agentStatus=v=>agentHasPointer(v)?'aienvmp pointer installed':(agentInfo(v).exists?'file detected, pointer missing':'not detected');
451
+ const agentCards=Object.entries(agentNames).map(([key,label])=>\`<div class="agent"><strong>\${label}</strong><span>\${esc(agentStatus(manifest.agentFiles?.[key]))}</span>\${agentInfo(manifest.agentFiles?.[key]).installCommand?\`<span class="path">\${esc(agentInfo(manifest.agentFiles?.[key]).installCommand)}</span>\`:''}</div>\`).join('');
452
+ const agentPointerCount=entries(manifest.agentFiles).filter(([,v])=>agentHasPointer(v)).length;
449
453
  const warnHtml=warnings.length?'<div class="warnings">'+warnings.map(w=>\`<div class="warning">\${esc(w.message)}</div>\`).join('')+'</div>':'<div class="okline">No blocking environment warnings detected.</div>';
450
454
  const timelineHtml=timeline.length?'<div class="timeline">'+timeline.slice(-8).reverse().map(t=>\`<div class="event"><time>\${esc(t.at.replace('T',' ').slice(0,16))}</time><div><b>\${esc(t.actor||'system')}</b> \${esc(timelineLabel(t))}</div></div>\`).join('')+'</div>':'<div class="okline">No previous environment changes recorded.</div>';
451
455
  const intentsHtml=intents.length?'<div class="timeline">'+intents.slice(-6).reverse().map(i=>\`<div class="event"><time>\${esc(i.at.replace('T',' ').slice(0,16))}</time><div><b>\${esc(i.actor)}</b> plans \${esc(i.action)}</div></div>\`).join('')+'</div>':'<div class="okline">No pending agent intents recorded.</div>';
@@ -561,7 +565,7 @@ document.getElementById('app').innerHTML=\`
561
565
  <div style="height:14px"></div>
562
566
  \${card('AI Handoff',reviewRequired?'<span class="pill warn">review</span>':'<span class="pill">ready</span>',handoffHtml)}
563
567
  <div style="height:14px"></div>
564
- \${card('Agent Pointers','<span class="pill">'+entries(manifest.agentFiles).filter(([,v])=>v).length+' detected</span>','<div class="agents">'+agentCards+'</div>')}
568
+ \${card('Agent Pointers','<span class="pill">'+agentPointerCount+' installed</span>','<div class="agents">'+agentCards+'</div>')}
565
569
  <div style="height:14px"></div>
566
570
  \${card('Snapshot','',\`<table><tr><th>OS</th><td>\${esc(manifest.os.platform)} \${esc(manifest.os.release)} \${esc(manifest.os.arch)}</td></tr><tr><th>Shell</th><td>\${esc(manifest.os.shell||'unknown')}</td></tr><tr><th>Workspace</th><td><div class="path">\${esc(manifest.workspace.path)}</div></td></tr></table>\`)}
567
571
  </aside>