kifaru 1.0.179 → 1.0.181

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.
@@ -1324,9 +1324,30 @@
1324
1324
  <button class="tab" role="tab" data-tab="audit" aria-selected="false">
1325
1325
  <span class="num">4</span> Audit Evidence
1326
1326
  </button>
1327
- <div class="session-picker" style="margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;">
1328
- <label for="globalSessionSelect" class="eyebrow" style="font-size: 11px; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);">Agent Session:</label>
1329
- <select id="globalSessionSelect" style="background: var(--surface-2, #18202b); color: var(--ink, #e6edf3); border: 1px solid var(--border, #293039); border-radius: 6px; padding: 4px 8px; font-size: 12px; font-family: var(--font-mono, monospace); max-width: 380px; cursor: pointer;">
1327
+ <div
1328
+ class="session-picker"
1329
+ style="margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0"
1330
+ >
1331
+ <label
1332
+ for="globalSessionSelect"
1333
+ class="eyebrow"
1334
+ style="font-size: 11px; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted)"
1335
+ >Agent Session:</label
1336
+ >
1337
+ <select
1338
+ id="globalSessionSelect"
1339
+ style="
1340
+ background: var(--surface-2, #18202b);
1341
+ color: var(--ink, #e6edf3);
1342
+ border: 1px solid var(--border, #293039);
1343
+ border-radius: 6px;
1344
+ padding: 4px 8px;
1345
+ font-size: 12px;
1346
+ font-family: var(--font-mono, monospace);
1347
+ max-width: 380px;
1348
+ cursor: pointer;
1349
+ "
1350
+ >
1330
1351
  <option value="auto">⚡ Latest Session (Auto)</option>
1331
1352
  <option value="all">🌐 All Workspace Sessions</option>
1332
1353
  </select>
@@ -1381,12 +1402,12 @@
1381
1402
  <div class="flist" id="topfindings"></div>
1382
1403
  </div>
1383
1404
  </div>
1384
- <div class="card" id="overviewRecentRunsCard" style="margin-top: 14px; display: none;">
1405
+ <div class="card" id="overviewRecentRunsCard" style="margin-top: 14px; display: none">
1385
1406
  <div class="card-h">
1386
1407
  <h2>Recent agent sessions &amp; runs</h2>
1387
1408
  <span class="sub" id="overviewRunsCount">Durable platform ledger</span>
1388
1409
  </div>
1389
- <div id="overviewRunsList" style="display:flex; flex-direction:column; gap:8px;"></div>
1410
+ <div id="overviewRunsList" style="display: flex; flex-direction: column; gap: 8px"></div>
1390
1411
  </div>
1391
1412
  </section>
1392
1413
 
@@ -1400,7 +1421,10 @@
1400
1421
  </p>
1401
1422
  </div>
1402
1423
  <div class="card">
1403
- <div class="run-head" style="display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:12px;">
1424
+ <div
1425
+ class="run-head"
1426
+ style="display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px"
1427
+ >
1404
1428
  <div>
1405
1429
  <div class="eyebrow">Target</div>
1406
1430
  <div class="mono" id="runTarget" style="font-size: 14px; font-weight: 600; margin-top: 3px">
@@ -1410,15 +1434,42 @@
1410
1434
  Run <span class="mono">RUN-7F3A9C</span> · worker <span class="mono">kf-worker-nbo-02</span> ·
1411
1435
  authorization verified ✓
1412
1436
  </div>
1413
- <div style="margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
1414
- <span class="eyebrow" style="font-size: 10px;">Select Run / Session:</span>
1415
- <select id="runSelect" style="background: var(--surface-2, #18202b); color: var(--ink, #e6edf3); border: 1px solid var(--border, #293039); border-radius: 6px; padding: 4px 8px; font-size: 12px; font-family: var(--font-mono, monospace); max-width: 480px; cursor: pointer;">
1437
+ <div style="margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap">
1438
+ <span class="eyebrow" style="font-size: 10px">Select Run / Session:</span>
1439
+ <select
1440
+ id="runSelect"
1441
+ style="
1442
+ background: var(--surface-2, #18202b);
1443
+ color: var(--ink, #e6edf3);
1444
+ border: 1px solid var(--border, #293039);
1445
+ border-radius: 6px;
1446
+ padding: 4px 8px;
1447
+ font-size: 12px;
1448
+ font-family: var(--font-mono, monospace);
1449
+ max-width: 480px;
1450
+ cursor: pointer;
1451
+ "
1452
+ >
1416
1453
  <option value="auto">⚡ Auto-follow (Latest / In-Flight)</option>
1417
1454
  </select>
1418
1455
  </div>
1419
1456
  </div>
1420
- <div style="display:flex; gap:8px; align-items:center;">
1421
- <a href="/agent" target="_blank" class="btn" style="text-decoration:none; font-size:12px; padding:6px 12px; background:var(--surface-2); border:1px solid var(--border); color:var(--ink-2); border-radius:8px;">Open Agent View ↗</a>
1457
+ <div style="display: flex; gap: 8px; align-items: center">
1458
+ <a
1459
+ href="/agent"
1460
+ target="_blank"
1461
+ class="btn"
1462
+ style="
1463
+ text-decoration: none;
1464
+ font-size: 12px;
1465
+ padding: 6px 12px;
1466
+ background: var(--surface-2);
1467
+ border: 1px solid var(--border);
1468
+ color: var(--ink-2);
1469
+ border-radius: 8px;
1470
+ "
1471
+ >Open Agent View ↗</a
1472
+ >
1422
1473
  <button class="btn btn-primary" id="runBtn">
1423
1474
  <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z" /></svg
1424
1475
  ><span id="runBtnLabel">Run assessment</span>
@@ -2309,7 +2360,9 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2309
2360
  if (metaEl) {
2310
2361
  const worker = run.workerId || run.source || (run.runtime ? `runtime ${run.runtime}` : "kf-worker-local")
2311
2362
  const auth = isLive ? "turn in flight · active hunting" : "authorization verified ✓"
2312
- const sessionPart = run.sessionId ? ` · session <span class="mono" style="color:var(--accent); font-weight:600">${run.sessionId}</span>` : ""
2363
+ const sessionPart = run.sessionId
2364
+ ? ` · session <span class="mono" style="color:var(--accent); font-weight:600">${run.sessionId}</span>`
2365
+ : ""
2313
2366
  const wsPart = run.workspaceId ? ` · ws <span class="mono">${run.workspaceId}</span>` : ""
2314
2367
  metaEl.innerHTML = `Run <span class="mono">${run.id}</span>${sessionPart}${wsPart} · worker <span class="mono">${worker}</span> · ${auth}`
2315
2368
  }
@@ -2722,7 +2775,9 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2722
2775
  label: `${statusIcon} ${shortTitle} · ${shortId} (${countLabel})`,
2723
2776
  })
2724
2777
  }
2725
- const currentOpts = Array.from(select.options).map((o) => o.value).join(",")
2778
+ const currentOpts = Array.from(select.options)
2779
+ .map((o) => o.value)
2780
+ .join(",")
2726
2781
  const newOpts = opts.map((o) => o.val).join(",")
2727
2782
  if (currentOpts !== newOpts) {
2728
2783
  select.innerHTML = ""
@@ -2746,16 +2801,22 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2746
2801
  const opts = [{ val: "auto", label: "⚡ Auto-follow (Latest / In-Flight)" }]
2747
2802
  for (const r of runs) {
2748
2803
  const status = r.status ?? r.state ?? "unknown"
2749
- const icon = ["running", "leased", "queued"].includes(status) ? "● [RUNNING]" : ["completed", "succeeded"].includes(status) ? "✓" : "✗"
2804
+ const icon = ["running", "leased", "queued"].includes(status)
2805
+ ? "● [RUNNING]"
2806
+ : ["completed", "succeeded"].includes(status)
2807
+ ? "✓"
2808
+ : "✗"
2750
2809
  const shortId = r.id.length > 20 ? `${r.id.slice(0, 16)}…` : r.id
2751
2810
  const shortTitle = (r.title || r.id).slice(0, 36)
2752
2811
  const sessionSuffix = r.sessionId ? ` [${r.sessionId.slice(0, 10)}…]` : ""
2753
2812
  opts.push({
2754
2813
  val: r.id,
2755
- label: `${icon} ${shortTitle} · ${shortId}${sessionSuffix}`
2814
+ label: `${icon} ${shortTitle} · ${shortId}${sessionSuffix}`,
2756
2815
  })
2757
2816
  }
2758
- const currentOpts = Array.from(select.options).map((o) => o.value).join(",")
2817
+ const currentOpts = Array.from(select.options)
2818
+ .map((o) => o.value)
2819
+ .join(",")
2759
2820
  const newOpts = opts.map((o) => o.val).join(",")
2760
2821
  if (currentOpts !== newOpts) {
2761
2822
  select.innerHTML = ""
@@ -2783,13 +2844,15 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2783
2844
  }
2784
2845
  card.style.display = "block"
2785
2846
  if (count) count.textContent = `${runs.length} recorded run${runs.length === 1 ? "" : "s"} in workspace`
2786
- list.innerHTML = runs.slice(0, 8).map((r) => {
2787
- const status = r.status ?? r.state ?? "unknown"
2788
- const isLive = ["running", "queued", "leased"].includes(status)
2789
- const isOk = ["completed", "succeeded"].includes(status)
2790
- const badgeClass = isLive ? "sevtag sev-low" : isOk ? "statuspill" : "sevtag sev-critical"
2791
- const timeStr = r.updatedAt ? new Date(r.updatedAt).toLocaleTimeString() : ""
2792
- return `<div style="display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:var(--surface-2); border-radius:8px; border:1px solid var(--hair); font-size:12.5px;">
2847
+ list.innerHTML = runs
2848
+ .slice(0, 8)
2849
+ .map((r) => {
2850
+ const status = r.status ?? r.state ?? "unknown"
2851
+ const isLive = ["running", "queued", "leased"].includes(status)
2852
+ const isOk = ["completed", "succeeded"].includes(status)
2853
+ const badgeClass = isLive ? "sevtag sev-low" : isOk ? "statuspill" : "sevtag sev-critical"
2854
+ const timeStr = r.updatedAt ? new Date(r.updatedAt).toLocaleTimeString() : ""
2855
+ return `<div style="display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:var(--surface-2); border-radius:8px; border:1px solid var(--hair); font-size:12.5px;">
2793
2856
  <div style="display:flex; align-items:center; gap:10px; min-width:0; overflow:hidden;">
2794
2857
  <span class="${badgeClass}">${status.toUpperCase()}</span>
2795
2858
  <span style="font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">${r.title || r.id}</span>
@@ -2801,7 +2864,8 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2801
2864
  <button class="btn btn-sm" onclick="inspectRun('${r.id}')" style="font-size:11px; padding:3px 9px;">Inspect Run &rarr;</button>
2802
2865
  </div>
2803
2866
  </div>`
2804
- }).join("")
2867
+ })
2868
+ .join("")
2805
2869
  }
2806
2870
 
2807
2871
  async function inspectRun(runId) {
@@ -2967,10 +3031,9 @@ ${f.dpa.map((d) => " - " + d).join("\n")}`
2967
3031
  $("#srcPill").className = "src live"
2968
3032
  $("#srcText").textContent = "Live · platform DB"
2969
3033
  $("#srcPill").title = "Live — click to manage sign-in."
2970
- const sessionFlag = effectiveSessionId
2971
- ? ` · session ${effectiveSessionId.slice(0, 16)}…`
2972
- : " · all sessions"
2973
- $("#demoFlag").textContent = "● Live — " + total + " findings across " + runs + " runs" + sessionFlag + " · updated " + ago
3034
+ const sessionFlag = effectiveSessionId ? ` · session ${effectiveSessionId.slice(0, 16)}…` : " · all sessions"
3035
+ $("#demoFlag").textContent =
3036
+ "● Live — " + total + " findings across " + runs + " runs" + sessionFlag + " · updated " + ago
2974
3037
  const footFindings = effectiveSessionId
2975
3038
  ? `/api/v1/findings?sessionId=${effectiveSessionId.slice(0, 12)}…`
2976
3039
  : "/api/v1/findings"