@integrity-labs/agt-cli 0.28.473 → 0.28.475

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-VHWLFDME.js";
43
+ } from "../chunk-Q53LFQVD.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -71,7 +71,7 @@ import {
71
71
  requiredMcpWildcard,
72
72
  resolveChannels,
73
73
  serializeManifestForSlackCli
74
- } from "../chunk-YR6ESOCM.js";
74
+ } from "../chunk-LGBI4P2P.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
4830
4830
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4831
4831
  import chalk18 from "chalk";
4832
4832
  import ora16 from "ora";
4833
- var cliVersion = true ? "0.28.473" : "dev";
4833
+ var cliVersion = true ? "0.28.475" : "dev";
4834
4834
  async function fetchLatestVersion() {
4835
4835
  const host2 = getHost();
4836
4836
  if (!host2) return null;
@@ -6002,7 +6002,7 @@ function handleError(err) {
6002
6002
  }
6003
6003
 
6004
6004
  // src/bin/agt.ts
6005
- var cliVersion2 = true ? "0.28.473" : "dev";
6005
+ var cliVersion2 = true ? "0.28.475" : "dev";
6006
6006
  var program = new Command();
6007
6007
  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");
6008
6008
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -8278,6 +8278,7 @@ function formatRunMarker(runId) {
8278
8278
  return `<!-- agt-run:${runId} -->`;
8279
8279
  }
8280
8280
  var RUN_MARKER_RE = /<!--\s*agt-run:([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\s*-->/;
8281
+ var RUN_MARKER_RE_GLOBAL = new RegExp(RUN_MARKER_RE.source, "g");
8281
8282
 
8282
8283
  // ../../packages/core/dist/claude-code-usage/transcript-parser.js
8283
8284
  function nonNegInt(value) {
@@ -8504,38 +8505,6 @@ function attributeTranscriptUsageByRun(jsonl) {
8504
8505
  return { perRunModel: [...agg.values()], runIds: [...runIds] };
8505
8506
  }
8506
8507
 
8507
- // ../../packages/core/dist/claude-code-usage/usage-limit-marker.js
8508
- var USAGE_LIMIT_MARKER_FILENAME = "claude-usage-limit.json";
8509
- var USAGE_LIMIT_MARKER_VERSION = 1;
8510
- function serializeUsageLimitMarker(limitedUntil) {
8511
- const marker = {
8512
- version: USAGE_LIMIT_MARKER_VERSION,
8513
- limited_until: limitedUntil.toISOString()
8514
- };
8515
- return JSON.stringify(marker);
8516
- }
8517
- function parseUsageLimitMarker(raw) {
8518
- let parsed;
8519
- try {
8520
- parsed = JSON.parse(raw);
8521
- } catch {
8522
- return null;
8523
- }
8524
- if (typeof parsed !== "object" || parsed === null || parsed.version !== USAGE_LIMIT_MARKER_VERSION) {
8525
- return null;
8526
- }
8527
- const until = parsed.limited_until;
8528
- if (typeof until !== "string" || !Number.isFinite(Date.parse(until)))
8529
- return null;
8530
- return { version: USAGE_LIMIT_MARKER_VERSION, limited_until: until };
8531
- }
8532
- function resolveUsageLimitUntil(marker, now) {
8533
- if (!marker)
8534
- return null;
8535
- const until = new Date(marker.limited_until);
8536
- return until.getTime() > now.getTime() ? until : null;
8537
- }
8538
-
8539
8508
  // ../../packages/core/dist/claude-code-usage/rate-limit-classifier.js
8540
8509
  var UNKNOWN_RATE_LIMIT = Object.freeze({
8541
8510
  verdict: "unknown",
@@ -9373,42 +9342,6 @@ var FLAG_REGISTRY = [
9373
9342
  // projectDefinition, so setting it does not roll FLAGS_SCHEMA_VERSION.
9374
9343
  since: "0.28.421"
9375
9344
  },
9376
- {
9377
- key: "usage-limit-reactive-notice",
9378
- description: "Report a Claude Code usage cap REACTIVELY instead of predicting it (ENG-8201). Today the manager guesses from the agent transcript that the next turn will be refused, writes a marker, and every channel MCP refuses to dispatch on the strength of that guess - so a wrong guess is a swallowed message, and because the notice is throttled per (channel, sender) while the DROP is not, the usual symptom is total silence rather than a wrong reply. A refused turn actually costs nothing (rejected in under a second, zero tokens) and Claude Code records it with the reset time in it, so there is no need to guess: dispatch, and report the refusal if one comes back. off = today behaviour (pre-dispatch marker gate, no watcher). shadow = still gate on the marker, but ALSO watch dispatched messages and log the refusal that would have been reported - measures the true-positive rate with no user-visible change. enforce = stop reading the marker before dispatch; every admitted human message reaches the agent and a refusal is answered in-thread with the reset time from the error itself. Read live from the heartbeat flags-cache (or the env override).",
9379
- flagType: "enum",
9380
- allowedValues: ["off", "shadow", "enforce"],
9381
- // Ships dark: off preserves today's gate byte-for-byte. shadow is a free
9382
- // local log line (the watch is a transcript read, no model spend), so it is a
9383
- // cheap soak; enforce changes what reaches the agent, so it is the audited
9384
- // per-org flip.
9385
- defaultValue: "off",
9386
- // Enum override AGT_USAGE_LIMIT_REACTIVE_MODE (off|shadow|enforce), resolved
9387
- // by resolveUsageLimitReactiveMode in the channel-server bundle.
9388
- envVar: "AGT_USAGE_LIMIT_REACTIVE_MODE",
9389
- // enforce sends a message to an agent the host currently believes is capped -
9390
- // a deliberate availability trade (the refusal is free, but it is still a
9391
- // dispatch the operator previously suppressed), so flipping toward it is an
9392
- // audited change (ADR-0022 sensitive-flag confirm).
9393
- sensitive: true,
9394
- // ENG-8149 / ENG-8229: the agt-cli that first carries
9395
- // resolveUsageLimitReactiveMode in ALL THREE channel servers - published from
9396
- // the ENG-8207 merge 0294fa1a8. Without this the flip-reach modal reports FULL
9397
- // reach, because an undefined `since` means "every host can honour it" - true
9398
- // for flags that predate the reach work, wrong for a NEW host-read flag whose
9399
- // reader older hosts simply do not have. Excluded from projectDefinition, so
9400
- // setting it does not roll FLAGS_SCHEMA_VERSION.
9401
- //
9402
- // Deliberately the LATER of the two versions this flag's reader shipped in.
9403
- // Unlike its siblings, this reader landed in two stages: direct-chat at the
9404
- // ENG-8201 Slice 2 publish, slack + telegram only at 0.28.450 (ENG-8207) - and
9405
- // `since` is one version per flag, so it cannot express "partially honoured".
9406
- // A host in between genuinely honours the flag for direct-chat and is still
9407
- // classified `stale`. That understates reach rather than overstating it, which
9408
- // is the safe direction, and it is the useful one while the flag sits at
9409
- // enforce and slack/telegram adoption is what an operator needs to track.
9410
- since: "0.28.450"
9411
- },
9412
9345
  {
9413
9346
  key: "slack-hot-thread-guard",
9414
9347
  description: "Server-side hot-thread guard on the slack.reply surface (ENG-7462). Prevents an agent posting a NEW top-level Slack message when it meant to reply inside the thread it is already working in - a prompt/memory rule proved insufficient (the agent had the rule and still slipped). When a reply would otherwise post to channel ROOT (no thread_ts / message_ts / inbound_id, no active kanban card) and the agent has a recent active thread in that channel (its last bot-posted thread, from the persisted trackedThreads cache, within a freshness window), the reply is redirected into that thread. proactive:true no longer implies channel root; posting at root becomes a deliberate action (the to_channel_root flag, or the thread_ts:null sentinel). off = guard never runs, replies with no coords root exactly as today (ships dark). shadow = compute + log the would-redirect but STILL post to root (measure the fire rate before acting). enforce = apply the redirect (a soft-block: redirect + inform, never a hard rejection). Read live from the heartbeat flags-cache (or the env override); enforce is a deliberate per-org flip after a shadow soak.",
@@ -13274,7 +13207,7 @@ function restartEgressSidecar(codeName) {
13274
13207
  }
13275
13208
  }
13276
13209
  function buildDockerRunCommand(args) {
13277
- const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch, forwardUsageLimitReactive, forwardTurnFailureNotice } = args;
13210
+ const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch, forwardTurnFailureNotice } = args;
13278
13211
  const q = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
13279
13212
  const agentDir2 = join5(homeDir, ".augmented", codeName);
13280
13213
  const agentIdDir = join5(homeDir, ".augmented", agentId);
@@ -13311,7 +13244,6 @@ function buildDockerRunCommand(args) {
13311
13244
  if (forwardBlockTurnEndAllMarkers) envArgs.push("-e AGT_BLOCK_TURN_END_ALL_MARKERS_ENABLED");
13312
13245
  if (forwardKanbanWaiting) envArgs.push("-e AGT_KANBAN_WAITING_ENABLED");
13313
13246
  if (forwardNotifyDispatch) envArgs.push("-e AGT_NOTIFY_DISPATCH");
13314
- if (forwardUsageLimitReactive) envArgs.push("-e AGT_USAGE_LIMIT_REACTIVE_MODE");
13315
13247
  if (forwardTurnFailureNotice) envArgs.push("-e AGT_WEDGE_TRANSIENT_NOTICE_ENABLED");
13316
13248
  const egressImage = process.env.AGT_EGRESS_IMAGE || "agt-squid:latest";
13317
13249
  const internalNet = `agt-net-${codeName}`;
@@ -13666,12 +13598,6 @@ function spawnSession(config, session) {
13666
13598
  if (config.notifyDispatchMode && config.notifyDispatchMode !== "off" && !process.env["AGT_NOTIFY_DISPATCH"]) {
13667
13599
  tmuxSessionEnvArgs.push("-e", `AGT_NOTIFY_DISPATCH=${config.notifyDispatchMode}`);
13668
13600
  }
13669
- if (config.usageLimitReactiveMode && config.usageLimitReactiveMode !== "off" && !process.env["AGT_USAGE_LIMIT_REACTIVE_MODE"]) {
13670
- tmuxSessionEnvArgs.push(
13671
- "-e",
13672
- `AGT_USAGE_LIMIT_REACTIVE_MODE=${config.usageLimitReactiveMode}`
13673
- );
13674
- }
13675
13601
  if (config.turnFailureNoticeEnabled && !process.env["AGT_WEDGE_TRANSIENT_NOTICE_ENABLED"]) {
13676
13602
  tmuxSessionEnvArgs.push("-e", "AGT_WEDGE_TRANSIENT_NOTICE_ENABLED=true");
13677
13603
  }
@@ -13708,12 +13634,6 @@ function spawnSession(config, session) {
13708
13634
  // the session env (operator-set OR materialized from the flag above).
13709
13635
  forwardNotifyDispatch: !!process.env["AGT_NOTIFY_DISPATCH"] || // feature-gate-allow: registry-flag envVar operator-override precedence, not a new gate
13710
13636
  !!config.notifyDispatchMode && config.notifyDispatchMode !== "off",
13711
- // ENG-8201: forward AGT_USAGE_LIMIT_REACTIVE_MODE if it will be in the
13712
- // session env (operator-set OR materialized from the flag above). This
13713
- // is the ONLY way the flag reaches an isolated agent — the flags-cache
13714
- // is not in the container's mount set.
13715
- forwardUsageLimitReactive: !!process.env["AGT_USAGE_LIMIT_REACTIVE_MODE"] || // feature-gate-allow: registry-flag envVar operator-override precedence, not a new gate
13716
- !!config.usageLimitReactiveMode && config.usageLimitReactiveMode !== "off",
13717
13637
  // ENG-8269: forward AGT_WEDGE_TRANSIENT_NOTICE_ENABLED if it will be in
13718
13638
  // the session env (operator-set OR materialized from the flag above).
13719
13639
  // Without this the tmux-level materialization above stops at the
@@ -14409,10 +14329,6 @@ export {
14409
14329
  sumTranscriptUsageInWindow,
14410
14330
  isEmptyTotals,
14411
14331
  attributeTranscriptUsageByRun,
14412
- USAGE_LIMIT_MARKER_FILENAME,
14413
- serializeUsageLimitMarker,
14414
- parseUsageLimitMarker,
14415
- resolveUsageLimitUntil,
14416
14332
  UNKNOWN_RATE_LIMIT,
14417
14333
  pickNewerClassification,
14418
14334
  classifyTranscriptRateLimit,
@@ -14500,4 +14416,4 @@ export {
14500
14416
  stopAllSessionsAndWait,
14501
14417
  getProjectDir
14502
14418
  };
14503
- //# sourceMappingURL=chunk-YR6ESOCM.js.map
14419
+ //# sourceMappingURL=chunk-LGBI4P2P.js.map