@integrity-labs/agt-cli 0.28.457 → 0.28.459

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-WMGMLOPB.js";
43
+ } from "../chunk-PKZMFA2U.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-QFBCK4ZH.js";
74
+ } from "../chunk-BWH5XTDU.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.457" : "dev";
4833
+ var cliVersion = true ? "0.28.459" : "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.457" : "dev";
6005
+ var cliVersion2 = true ? "0.28.459" : "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) => {
@@ -5132,10 +5132,20 @@ function getOAuthProvider(definitionId) {
5132
5132
  // ../../packages/core/dist/integrations/connectivity-probe.js
5133
5133
  var CONNECTIVITY_SEVERITY = {
5134
5134
  ok: 0,
5135
- transient_error: 1,
5136
- degraded: 2,
5137
- down: 3
5135
+ unverified: 1,
5136
+ transient_error: 2,
5137
+ degraded: 3,
5138
+ down: 4
5138
5139
  };
5140
+ var EVIDENCE_STRENGTH = {
5141
+ none: 0,
5142
+ record_only: 1,
5143
+ handshake: 2,
5144
+ live_call: 3
5145
+ };
5146
+ function bestConnectivityEvidence(a, b) {
5147
+ return EVIDENCE_STRENGTH[b] > EVIDENCE_STRENGTH[a] ? b : a;
5148
+ }
5139
5149
  function worseConnectivityOutcome(a, b) {
5140
5150
  return CONNECTIVITY_SEVERITY[b.status] > CONNECTIVITY_SEVERITY[a.status] ? b : a;
5141
5151
  }
@@ -8624,6 +8634,16 @@ function classifyTranscriptRateLimit(jsonl, startMs, endMs, now) {
8624
8634
  return newest;
8625
8635
  }
8626
8636
 
8637
+ // ../../packages/core/dist/claude-code-usage/turn-failure-classifier.js
8638
+ var UNKNOWN_TURN_FAILURE = Object.freeze({
8639
+ outcome: "unknown",
8640
+ atMs: null,
8641
+ failureClass: null,
8642
+ httpStatus: null,
8643
+ attempt: null,
8644
+ maxAttempts: null
8645
+ });
8646
+
8627
8647
  // ../../packages/core/dist/claude-code-usage/transcript-location.js
8628
8648
  function encodeClaudeProjectPath(projectDir) {
8629
8649
  return "-" + projectDir.replace(/^\//, "").replace(/[/.]/g, "-");
@@ -9539,7 +9559,7 @@ var FLAG_REGISTRY = [
9539
9559
  },
9540
9560
  {
9541
9561
  key: "wedge-transient-notice",
9542
- description: 'When a wedge-respawn was preceded by a transient LLM-API error (529/429/503/500 that exhausted its retries and wedged the turn), the manager writes the ENG-6058 give-up signal tagged reason=transient_overload so the channel sweeps post a friendly "I hit a brief overload \u2014 please resend" notice instead of leaving the user in silence (ENG-7360, extends ENG-6861 to the retry-exhaustion + wedge path). Boolean gate; ships dark \u2014 channel-visible copy soaks per host before going wide.',
9562
+ description: `Tell the person waiting when their turn dies on a transient LLM-API failure (529 overloaded / 5xx). TWO consumers now share this gate. (1) ENG-7360: a wedge-respawn preceded by such an error writes the ENG-6058 give-up signal tagged reason=transient_overload so the channel sweeps post a "please resend" notice. (2) ENG-8269: the channel MCPs watch the dispatched turn in Claude Code's own transcript and notify the conversation that was actually waiting \u2014 Slack, Telegram AND direct chat \u2014 plus a "still working on this" notice after ~3min on Slack/Telegram only (direct chat already shows a client-side one at 90s). NOTE: (2) fires on a MUCH larger population than (1) \u2014 any dispatched turn that dies, not only one that also wedged the session \u2014 and (1) has never actually been able to fire, because its pane.log detector cannot match the banner Claude Code renders today. So flipping this on is in practice enabling (2) for the first time. Boolean gate; ships dark \u2014 channel-visible copy soaks per host before going wide. Materialized into the channel-MCP spawn env: a Docker-isolated agent never mounts the host flags-cache, so a central flip reaches it only that way.`,
9543
9563
  flagType: "boolean",
9544
9564
  defaultValue: false,
9545
9565
  envVar: "AGT_WEDGE_TRANSIENT_NOTICE_ENABLED"
@@ -10033,6 +10053,22 @@ var FLAG_REGISTRY = [
10033
10053
  // registry-only (ADR-0022). NOT `public`: it is resolved server-side only, so it
10034
10054
  // must never be serialized into the browser map.
10035
10055
  defaultValue: false
10056
+ },
10057
+ {
10058
+ key: "ninjafy-brand",
10059
+ description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is USER-FACING BRAND TEXT ONLY: it must never gate a code identifier, package name, env var or CLI name, which stay `Augmented`/`agt` per the CLAUDE.md naming contract (the deep code rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here). Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot one organization while every other org still sees Augmented. Ships dark.',
10060
+ flagType: "boolean",
10061
+ // Declared safe value is `false`: the pre-rebrand brand. `false` is also the
10062
+ // fail-closed direction — if the flag DB is unreachable we must show the brand
10063
+ // that is currently live and contractually correct, never leak an unannounced
10064
+ // rebrand to every customer at once.
10065
+ defaultValue: false,
10066
+ // Read CLIENT-SIDE: sidebar.tsx is a "use client" component and resolves this
10067
+ // via usePublicBooleanFlag, so the key must be in the browser-exposed public
10068
+ // map. Unlike onboarding-msteams-channel above there is no wrong-org hazard —
10069
+ // the sidebar renders inside the active-org cookie's scope, which is exactly
10070
+ // the org whose brand should be shown.
10071
+ public: true
10036
10072
  }
10037
10073
  ];
10038
10074
  var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
@@ -13232,7 +13268,7 @@ function restartEgressSidecar(codeName) {
13232
13268
  }
13233
13269
  }
13234
13270
  function buildDockerRunCommand(args) {
13235
- const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch, forwardUsageLimitReactive } = args;
13271
+ const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch, forwardUsageLimitReactive, forwardTurnFailureNotice } = args;
13236
13272
  const q = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
13237
13273
  const agentDir2 = join5(homeDir, ".augmented", codeName);
13238
13274
  const agentIdDir = join5(homeDir, ".augmented", agentId);
@@ -13270,6 +13306,7 @@ function buildDockerRunCommand(args) {
13270
13306
  if (forwardKanbanWaiting) envArgs.push("-e AGT_KANBAN_WAITING_ENABLED");
13271
13307
  if (forwardNotifyDispatch) envArgs.push("-e AGT_NOTIFY_DISPATCH");
13272
13308
  if (forwardUsageLimitReactive) envArgs.push("-e AGT_USAGE_LIMIT_REACTIVE_MODE");
13309
+ if (forwardTurnFailureNotice) envArgs.push("-e AGT_WEDGE_TRANSIENT_NOTICE_ENABLED");
13273
13310
  const egressImage = process.env.AGT_EGRESS_IMAGE || "agt-squid:latest";
13274
13311
  const internalNet = `agt-net-${codeName}`;
13275
13312
  const squidName = `agt-squid-${codeName}`;
@@ -13629,6 +13666,9 @@ function spawnSession(config, session) {
13629
13666
  `AGT_USAGE_LIMIT_REACTIVE_MODE=${config.usageLimitReactiveMode}`
13630
13667
  );
13631
13668
  }
13669
+ if (config.turnFailureNoticeEnabled && !process.env["AGT_WEDGE_TRANSIENT_NOTICE_ENABLED"]) {
13670
+ tmuxSessionEnvArgs.push("-e", "AGT_WEDGE_TRANSIENT_NOTICE_ENABLED=true");
13671
+ }
13632
13672
  const sessionHomeDir = process.env.HOME?.trim() || homedir5();
13633
13673
  let egress;
13634
13674
  if (egressMode(codeName) === "allowlist") {
@@ -13667,7 +13707,14 @@ function spawnSession(config, session) {
13667
13707
  // is the ONLY way the flag reaches an isolated agent — the flags-cache
13668
13708
  // is not in the container's mount set.
13669
13709
  forwardUsageLimitReactive: !!process.env["AGT_USAGE_LIMIT_REACTIVE_MODE"] || // feature-gate-allow: registry-flag envVar operator-override precedence, not a new gate
13670
- !!config.usageLimitReactiveMode && config.usageLimitReactiveMode !== "off"
13710
+ !!config.usageLimitReactiveMode && config.usageLimitReactiveMode !== "off",
13711
+ // ENG-8269: forward AGT_WEDGE_TRANSIENT_NOTICE_ENABLED if it will be in
13712
+ // the session env (operator-set OR materialized from the flag above).
13713
+ // Without this the tmux-level materialization above stops at the
13714
+ // container boundary and the notice stays dark for exactly the isolated
13715
+ // agents it was added for (CodeRabbit, PR #3907).
13716
+ forwardTurnFailureNotice: !!process.env["AGT_WEDGE_TRANSIENT_NOTICE_ENABLED"] || // feature-gate-allow: registry-flag envVar operator-override precedence, not a new gate
13717
+ !!config.turnFailureNoticeEnabled
13671
13718
  }) : JSON.stringify(wrapperPath);
13672
13719
  const tmuxEnv = {
13673
13720
  ...process.env,
@@ -14326,6 +14373,7 @@ export {
14326
14373
  DEPLOYMENT_TEMPLATES,
14327
14374
  getTemplate,
14328
14375
  StreamEncoder,
14376
+ bestConnectivityEvidence,
14329
14377
  worseConnectivityOutcome,
14330
14378
  resolveConnectivityProbe,
14331
14379
  probeMcpHttp,
@@ -14446,4 +14494,4 @@ export {
14446
14494
  stopAllSessionsAndWait,
14447
14495
  getProjectDir
14448
14496
  };
14449
- //# sourceMappingURL=chunk-QFBCK4ZH.js.map
14497
+ //# sourceMappingURL=chunk-BWH5XTDU.js.map