@integrity-labs/agt-cli 0.28.625 → 0.28.627

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-WTNH3VCT.js";
43
+ } from "../chunk-DTVTLSID.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
46
  } from "../chunk-7QNQRV3A.js";
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.625" : "dev";
4912
+ var cliVersion = true ? "0.28.627" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.625" : "dev";
6092
+ var cliVersion2 = true ? "0.28.627" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6069,7 +6069,7 @@ function exchangeFailureKind(err) {
6069
6069
  }
6070
6070
 
6071
6071
  // src/lib/api-client.ts
6072
- var agtCliVersion = true ? "0.28.625" : "dev";
6072
+ var agtCliVersion = true ? "0.28.627" : "dev";
6073
6073
  var lastConfigHash = null;
6074
6074
  function setConfigHash(hash) {
6075
6075
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -9589,4 +9589,4 @@ export {
9589
9589
  managerInstallSystemUnitCommand,
9590
9590
  managerUninstallSystemUnitCommand
9591
9591
  };
9592
- //# sourceMappingURL=chunk-WTNH3VCT.js.map
9592
+ //# sourceMappingURL=chunk-DTVTLSID.js.map
@@ -54,7 +54,7 @@ import {
54
54
  safeWriteJsonAtomic,
55
55
  setConfigHash,
56
56
  tripClass
57
- } from "../chunk-WTNH3VCT.js";
57
+ } from "../chunk-DTVTLSID.js";
58
58
  import {
59
59
  getProjectDir as getProjectDir2,
60
60
  getReadyTasks,
@@ -2312,6 +2312,7 @@ async function maybeReportUsageBanner(args) {
2312
2312
  const next = {
2313
2313
  lastPct: existing?.lastPct ?? null,
2314
2314
  lastWeekResetsAt: existing?.lastWeekResetsAt ?? null,
2315
+ lastLimitScope: existing?.lastLimitScope ?? null,
2315
2316
  lastCheckedAt: nowMs
2316
2317
  };
2317
2318
  if (!tail) {
@@ -2326,7 +2327,7 @@ async function maybeReportUsageBanner(args) {
2326
2327
  }
2327
2328
  const observedAtIso = next.lastWeekResetsAt;
2328
2329
  const weekResetsAtIso = observation.weekResetsAt.toISOString();
2329
- if (existing && existing.lastPct === observation.pct && observedAtIso === weekResetsAtIso) {
2330
+ if (existing && existing.lastPct === observation.pct && observedAtIso === weekResetsAtIso && existing.lastLimitScope === observation.limitScope) {
2330
2331
  state.set(codeName, next);
2331
2332
  return;
2332
2333
  }
@@ -2340,10 +2341,25 @@ async function maybeReportUsageBanner(args) {
2340
2341
  // server cannot tell a measurement from a guess, which is how a reset
2341
2342
  // three days early reached an operator as a precise timestamp.
2342
2343
  reset_precision: observation.resetPrecision,
2344
+ // ENG-9007 wired the producer end. `classifyLimitScope` had been reading
2345
+ // the banner's qualifier and `parseUsageBanner` had been returning it on
2346
+ // every observation, but this POST never carried it — so the API's
2347
+ // validate-or-'unknown' contract (host-runtime.ts: an older host that
2348
+ // does not send it is not an error) resolved EVERY observation on the
2349
+ // fleet to `limit_scope: 'unknown'`, and every usage alert rendered
2350
+ // "banner qualifier not recognised, treated as weekly".
2351
+ //
2352
+ // That sentence was false on its face for the commonest banner of all —
2353
+ // "You've used 93% of your weekly limit", whose qualifier the parser
2354
+ // hard-codes to 'weekly'. Nothing was unrecognised; nobody had asked.
2355
+ // Sending the field is the whole fix: a session cap can now be told from
2356
+ // a weekly one, which is what ENG-9007 exists to do.
2357
+ limit_scope: observation.limitScope,
2343
2358
  source: "pane_log"
2344
2359
  });
2345
2360
  next.lastPct = observation.pct;
2346
2361
  next.lastWeekResetsAt = weekResetsAtIso;
2362
+ next.lastLimitScope = observation.limitScope;
2347
2363
  state.set(codeName, next);
2348
2364
  } catch (err) {
2349
2365
  log2(`[usage-banner] POST /host/usage-observations failed for '${codeName}': ${err.message}`);
@@ -12033,7 +12049,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12033
12049
  var lastVersionCheckAt = 0;
12034
12050
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12035
12051
  var lastResponsivenessProbeAt = 0;
12036
- var agtCliVersion = true ? "0.28.625" : "dev";
12052
+ var agtCliVersion = true ? "0.28.627" : "dev";
12037
12053
  function resolveBrewPath(execFileSync3) {
12038
12054
  try {
12039
12055
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();