@integrity-labs/agt-cli 0.28.923 → 0.28.924

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-D3DVYP4X.js";
43
+ } from "../chunk-FAG5UIWZ.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.923" : "dev";
5470
+ var cliVersion = true ? "0.28.924" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6682,7 +6682,7 @@ function handleError(err) {
6682
6682
  }
6683
6683
 
6684
6684
  // src/bin/agt.ts
6685
- var cliVersion2 = true ? "0.28.923" : "dev";
6685
+ var cliVersion2 = true ? "0.28.924" : "dev";
6686
6686
  var program = new Command();
6687
6687
  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");
6688
6688
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6942,7 +6942,7 @@ function exchangeFailureKind(err) {
6942
6942
  }
6943
6943
 
6944
6944
  // src/lib/api-client.ts
6945
- var agtCliVersion = true ? "0.28.923" : "dev";
6945
+ var agtCliVersion = true ? "0.28.924" : "dev";
6946
6946
  var lastConfigHash = null;
6947
6947
  function setConfigHash(hash) {
6948
6948
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11552,4 +11552,4 @@ export {
11552
11552
  managerInstallSystemUnitCommand,
11553
11553
  managerUninstallSystemUnitCommand
11554
11554
  };
11555
- //# sourceMappingURL=chunk-D3DVYP4X.js.map
11555
+ //# sourceMappingURL=chunk-FAG5UIWZ.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-D3DVYP4X.js";
66
+ } from "../chunk-FAG5UIWZ.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -3536,6 +3536,51 @@ async function maybeReconcileWorkflowRunTokens(args) {
3536
3536
  // src/lib/conversation-evaluator.ts
3537
3537
  import { readdirSync as readdirSync3, readFileSync as readFileSync12, statSync as statSync3 } from "fs";
3538
3538
  import { join as join17 } from "path";
3539
+
3540
+ // src/lib/detect-meta-egress.ts
3541
+ var REPOST_PREAMBLE_WINDOW = 200;
3542
+ var REPOST_ANNOUNCE = /\b(?:re-?(?:post|send)(?:ing)?\s+(?:it|this|that)\b|(?:posting|sending)\s+(?:it|this|that)\s+(?:now|again)\b|re-?posting\s+now\b)/i;
3543
+ var REPOST_FAILURE = /\b(?:it|this|that)\s+(?:did(?:n['’]t| not)|could(?:n['’]t| not)|wasn['’]t|failed to)\s+(?:parse|send|post|go through|land|deliver|come through)\b|\b(?:did(?:n['’]t| not)|could(?:n['’]t| not)|failed to)\s+(?:send|post|deliver)\s+(?:it|this|that)\b/i;
3544
+ var REPOST_PRIOR = /\b(?:drafted|dialled|dialed|typed|composed|wrote)\s+(?:this|that|it)\s+(?:a moment ago|moments ago|just now|earlier)\b/i;
3545
+ function hasRepostPreamble(message) {
3546
+ const head = message.slice(0, REPOST_PREAMBLE_WINDOW);
3547
+ return REPOST_ANNOUNCE.test(head) && (REPOST_FAILURE.test(head) || REPOST_PRIOR.test(head));
3548
+ }
3549
+ var STATUS_NARRATION = [
3550
+ // "Assessment delivered to Samuel:" - a ledger line: the noun OPENS a sentence
3551
+ // (or parenthetical) and the recipient is a capitalised name. Case-sensitive
3552
+ // on purpose, so "Summary delivered to the board" and "Your answer delivered
3553
+ // to the customer" are not matched. \p{Lu} (not [A-Z]) so a non-ASCII
3554
+ // recipient ("Élodie") is still a capitalised name.
3555
+ new RegExp("(?:^|[.!?]\\s+|\\(\\s*)(?:[Aa]ssessment|[Ss]ummary|[Rr]eport|[Aa]nalysis|[Rr]esponse|[Rr]eply|[Uu]pdate|[Aa]nswer)\\s+delivered\\s+to\\s+\\p{Lu}", "u"),
3556
+ // third-person "on his/her/their go" (waiting on the user's go-ahead, narrated)
3557
+ /\bon (?:his|her|their) go\b(?![-\w])/i
3558
+ ];
3559
+ var LOOP_TICK = [
3560
+ // "Standing down - no change." / "Standing down, no action needed"
3561
+ /\bstanding down\s*[—–,:;.-]?\s*no (?:change|changes|action needed|new work)\b/i,
3562
+ // A message that is ONLY "Standing down."
3563
+ /^standing down[.!]?$/i,
3564
+ // "All clear, no pending work."
3565
+ /\ball clear\s*[,—–:;-]?\s*no pending work\b/i
3566
+ ];
3567
+ function detectMetaEgress(agentMessages) {
3568
+ const kinds = /* @__PURE__ */ new Set();
3569
+ for (const raw of agentMessages) {
3570
+ if (!raw) continue;
3571
+ const m = raw.trim();
3572
+ if (!m) continue;
3573
+ if (hasRepostPreamble(m)) kinds.add("repost_preamble");
3574
+ if (STATUS_NARRATION.some((re) => re.test(m))) kinds.add("status_narration");
3575
+ if (LOOP_TICK.some((re) => re.test(m))) kinds.add("loop_tick");
3576
+ }
3577
+ return {
3578
+ meta_leak: kinds.size > 0,
3579
+ meta_leak_kinds: [...kinds].sort()
3580
+ };
3581
+ }
3582
+
3583
+ // src/lib/conversation-evaluator.ts
3539
3584
  var MIN_CHECK_INTERVAL_MS4 = 5 * 6e4;
3540
3585
  var TRANSCRIPT_MTIME_WINDOW_MS3 = 7 * 24 * 60 * 60 * 1e3;
3541
3586
  var WINDOW_PAD_MS = 5 * 6e4;
@@ -3908,6 +3953,9 @@ async function maybeEvaluateConversations(args) {
3908
3953
  continue;
3909
3954
  }
3910
3955
  backendSucceeded = true;
3956
+ const flags = detectMetaEgress(
3957
+ turns.filter((t) => t.role === "assistant").map((t) => t.text)
3958
+ );
3911
3959
  try {
3912
3960
  await api2.post("/host/conversations/evaluation", {
3913
3961
  agent_id: agentId,
@@ -3916,7 +3964,8 @@ async function maybeEvaluateConversations(args) {
3916
3964
  verdict: verdict.verdict,
3917
3965
  summary: verdict.summary,
3918
3966
  failure_category: verdict.failureCategory,
3919
- model: backend.model
3967
+ model: backend.model,
3968
+ eval_flags: flags
3920
3969
  });
3921
3970
  log2(
3922
3971
  `[conversation-eval] ${codeName}: ${conv.conversation_id.slice(0, 8)} \u2192 ${verdict.verdict} (${verdict.score})`
@@ -13823,7 +13872,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13823
13872
  var lastVersionCheckAt = 0;
13824
13873
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13825
13874
  var lastResponsivenessProbeAt = 0;
13826
- var agtCliVersion = true ? "0.28.923" : "dev";
13875
+ var agtCliVersion = true ? "0.28.924" : "dev";
13827
13876
  function resolveBrewPath(execFileSync2) {
13828
13877
  try {
13829
13878
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();