@kenhkl/agent-gate 0.4.2 → 0.5.1

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.
@@ -37,12 +37,25 @@
37
37
  <div id="timeline-panel"><div class="table-wrap">
38
38
  <table><thead><tr><th>Time</th><th>Allow</th><th>Deny</th></tr></thead><tbody id="timeline-table"></tbody></table>
39
39
  </div></div>
40
- <div class="footer">AgentGate v0.4.2 + AgentMoss v0.6.0 (TypeScript)</div>
40
+ <div class="footer" id="footer">Loading versions...</div>
41
41
  <script>
42
42
  (async function(){
43
43
  function setText(id, v){ var el=document.getElementById(id); if(el)el.textContent=v; }
44
44
  function updateClock(){ setText('clock', new Date().toLocaleString('zh-CN')); }
45
45
  updateClock(); setInterval(updateClock, 1000);
46
+ // Fetch versions from health API
47
+ try {
48
+ var hR = await fetch('/api/v1/health');
49
+ var hData = await hR.json();
50
+ var gateV = hData.version || 'N/A';
51
+ var mossV = hData.moss_version || 'N/A';
52
+ var mossS = hData.moss_status || 'unknown';
53
+ var mossLabel = mossV === 'N/A' ? 'AgentMoss N/A (unreachable)' : 'AgentMoss v' + mossV;
54
+ if (mossS === 'healthy') mossLabel += ' ✓';
55
+ setText('footer', 'AgentGate v' + gateV + ' + ' + mossLabel + ' (TypeScript)');
56
+ } catch (e) {
57
+ setText('footer', 'AgentGate v0.5.0 + AgentMoss N/A (TypeScript)');
58
+ }
46
59
  async function refresh(){
47
60
  try {
48
61
  var [tcR, agR, tlR] = await Promise.all([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenhkl/agent-gate",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "AI Agent data collection & security analysis gateway (TypeScript)",
5
5
  "main": "dist/cli.cjs",
6
6
  "bin": {
@@ -21,7 +21,6 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@hono/node-server": "^1.13.0",
24
- "better-sqlite3": "^12.10.0",
25
24
  "hono": "^4.6.0",
26
25
  "node-pty": "^1.0.0",
27
26
  "yaml": "^2.9.0",
@@ -36,5 +35,8 @@
36
35
  "typescript": "^5.6.0",
37
36
  "vitest": "^4.1.8"
38
37
  },
39
- "license": "MIT"
38
+ "license": "MIT",
39
+ "optionalDependencies": {
40
+ "better-sqlite3": "^12.10.0"
41
+ }
40
42
  }