@integrity-labs/agt-cli 0.28.1121 → 0.28.1122

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/dist/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-4SPIQ3W2.js";
43
+ } from "../chunk-EDD5I22B.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1121" : "dev";
5477
+ var cliVersion = true ? "0.28.1122" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1121" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1122" : "dev";
6738
6738
  var program = new Command();
6739
6739
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -7518,7 +7518,7 @@ function exchangeFailureKind(err) {
7518
7518
  }
7519
7519
 
7520
7520
  // src/lib/api-client.ts
7521
- var agtCliVersion = true ? "0.28.1121" : "dev";
7521
+ var agtCliVersion = true ? "0.28.1122" : "dev";
7522
7522
  var lastConfigHash = null;
7523
7523
  function setConfigHash(hash) {
7524
7524
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -12664,4 +12664,4 @@ export {
12664
12664
  managerInstallSystemUnitCommand,
12665
12665
  managerUninstallSystemUnitCommand
12666
12666
  };
12667
- //# sourceMappingURL=chunk-4SPIQ3W2.js.map
12667
+ //# sourceMappingURL=chunk-EDD5I22B.js.map
@@ -68,7 +68,7 @@ import {
68
68
  safeWriteJsonAtomic,
69
69
  setConfigHash,
70
70
  tripClass
71
- } from "../chunk-4SPIQ3W2.js";
71
+ } from "../chunk-EDD5I22B.js";
72
72
  import {
73
73
  getProjectDir as getProjectDir2,
74
74
  getReadyTasks,
@@ -14941,7 +14941,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
14941
14941
  var lastVersionCheckAt = 0;
14942
14942
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
14943
14943
  var lastResponsivenessProbeAt = 0;
14944
- var agtCliVersion = true ? "0.28.1121" : "dev";
14944
+ var agtCliVersion = true ? "0.28.1122" : "dev";
14945
14945
  function resolveBrewPath(execFileSync3) {
14946
14946
  try {
14947
14947
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -22367,6 +22367,23 @@ var require_nunjucks = __commonJS({
22367
22367
  }
22368
22368
  });
22369
22369
 
22370
+ // src/artefact-analytics-format.ts
22371
+ function dwell(ms) {
22372
+ const secs = Math.round((ms ?? 0) / 1e3);
22373
+ if (secs < 60) return `${secs}s`;
22374
+ const mins = secs / 60;
22375
+ return mins < 60 ? `${Math.round(mins)}m` : `${(mins / 60).toFixed(1)}h`;
22376
+ }
22377
+ function gatedAnalyticsLine(a) {
22378
+ const u = a.unlocks ?? {};
22379
+ const total = u.total ?? 0;
22380
+ const failed = u.failed_attempts ?? 0;
22381
+ const gatedViews = a.views_by_source?.gated ?? 0;
22382
+ if (!total && !failed && !gatedViews) return null;
22383
+ const last = u.last_unlock_at ? `, last ${u.last_unlock_at.slice(0, 10)}` : "";
22384
+ return `- Gate: ${total} unlock${total === 1 ? "" : "s"} (${u.unique ?? 0} unique${last}), ${failed} failed password attempt${failed === 1 ? "" : "s"} | Gated views: ${gatedViews}, ${dwell(a.views_by_source?.gated_dwell_ms)} dwell`;
22385
+ }
22386
+
22370
22387
  // src/index.ts
22371
22388
  import { writeFile } from "fs/promises";
22372
22389
 
@@ -51650,10 +51667,14 @@ async function getArtefactAnalyticsText(params) {
51650
51667
  `Project analytics${data.project_name ? ` \u2014 "${data.project_name}"` : ""} (${a2.artefact_count} published artefact${a2.artefact_count === 1 ? "" : "s"}):`,
51651
51668
  `- Total views: ${t.views} | Unique visitors: ${t.unique_visitors} | Avg dwell: ${formatDwellMs(t.avg_dwell_ms)}`,
51652
51669
  `- Trend: ${trendSparkText(a2.timeseries)}`,
51670
+ // ENG-11471: only when something in the project is gated.
51671
+ ...(t.unlocks ?? 0) || (t.failed_unlock_attempts ?? 0) || (t.gated_views ?? 0) ? [
51672
+ `- Gate: ${t.unlocks ?? 0} unlocks (${t.unique_unlocks ?? 0} unique), ${t.failed_unlock_attempts ?? 0} failed password attempts | Gated views: ${t.gated_views ?? 0}`
51673
+ ] : [],
51653
51674
  "",
51654
51675
  "Per episode (newest first):",
51655
51676
  ...(a2.episodes ?? []).map(
51656
- (e) => `- ${e.title ?? "(untitled)"} [${e.kind ?? "?"}] \u2014 ${e.views} views, ${e.unique_visitors} unique, ${formatDwellMs(e.total_dwell_ms)} dwell${e.live_url ? ` (${e.live_url})` : ""}`
51677
+ (e) => `- ${e.title ?? "(untitled)"} [${e.kind ?? "?"}] \u2014 ${e.views} views, ${e.unique_visitors} unique, ${formatDwellMs(e.total_dwell_ms)} dwell` + (e.unlocks ? `, ${e.unlocks} unlocks` : "") + (e.live_url ? ` (${e.live_url})` : "")
51657
51678
  )
51658
51679
  ];
51659
51680
  if (!(a2.episodes ?? []).length) lines.push("- (no published artefacts in this project yet)");
@@ -51664,10 +51685,12 @@ async function getArtefactAnalyticsText(params) {
51664
51685
  const header = `Analytics for ${art?.title ?? "(untitled)"}${art?.kind ? ` [${art.kind}]` : ""}${art?.live_url ? ` (${art.live_url})` : ""}:`;
51665
51686
  if (!a) return `${header}
51666
51687
  - No view data yet.`;
51688
+ const gate = gatedAnalyticsLine(a);
51667
51689
  return [
51668
51690
  header,
51669
51691
  `- Views: ${a.views ?? 0} | Unique visitors: ${a.unique_visitors ?? 0} | Avg dwell: ${formatDwellMs(a.avg_dwell_ms)}`,
51670
- `- Trend: ${trendSparkText(a.timeseries)}`
51692
+ `- Trend: ${trendSparkText(a.timeseries)}`,
51693
+ ...gate ? [gate] : []
51671
51694
  ].join("\n");
51672
51695
  }
51673
51696
  var artefactListSchema = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1121",
3
+ "version": "0.28.1122",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {