@integrity-labs/agt-cli 0.28.92 → 0.28.93

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
@@ -37,7 +37,7 @@ import {
37
37
  success,
38
38
  table,
39
39
  warn
40
- } from "../chunk-BXPISVR7.js";
40
+ } from "../chunk-W2VRPZ5M.js";
41
41
  import {
42
42
  CHANNEL_REGISTRY,
43
43
  DEPLOYMENT_TEMPLATES,
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
4777
4777
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4778
4778
  import chalk18 from "chalk";
4779
4779
  import ora16 from "ora";
4780
- var cliVersion = true ? "0.28.92" : "dev";
4780
+ var cliVersion = true ? "0.28.93" : "dev";
4781
4781
  async function fetchLatestVersion() {
4782
4782
  const host2 = getHost();
4783
4783
  if (!host2) return null;
@@ -5791,7 +5791,7 @@ function handleError(err) {
5791
5791
  }
5792
5792
 
5793
5793
  // src/bin/agt.ts
5794
- var cliVersion2 = true ? "0.28.92" : "dev";
5794
+ var cliVersion2 = true ? "0.28.93" : "dev";
5795
5795
  var program = new Command();
5796
5796
  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");
5797
5797
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -7533,7 +7533,7 @@ function requireHost() {
7533
7533
  }
7534
7534
 
7535
7535
  // src/lib/api-client.ts
7536
- var agtCliVersion = true ? "0.28.92" : "dev";
7536
+ var agtCliVersion = true ? "0.28.93" : "dev";
7537
7537
  var lastConfigHash = null;
7538
7538
  function setConfigHash(hash) {
7539
7539
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8830,4 +8830,4 @@ export {
8830
8830
  managerInstallSystemUnitCommand,
8831
8831
  managerUninstallSystemUnitCommand
8832
8832
  };
8833
- //# sourceMappingURL=chunk-BXPISVR7.js.map
8833
+ //# sourceMappingURL=chunk-W2VRPZ5M.js.map
@@ -28,7 +28,7 @@ import {
28
28
  requireHost,
29
29
  safeWriteJsonAtomic,
30
30
  setConfigHash
31
- } from "../chunk-BXPISVR7.js";
31
+ } from "../chunk-W2VRPZ5M.js";
32
32
  import {
33
33
  getProjectDir as getProjectDir2,
34
34
  getReadyTasks,
@@ -848,17 +848,33 @@ function extractSlackBehaviourSubset(config2) {
848
848
  // src/lib/onboarding-drive.ts
849
849
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "fs";
850
850
  import { dirname as dirname2 } from "path";
851
- var ONBOARDING_REINJECT_INTERVAL_MS = 20 * 6e4;
852
- function decideOnboardingDrive(step, marker, nowMs, reinjectIntervalMs = ONBOARDING_REINJECT_INTERVAL_MS) {
851
+ var ONBOARDING_REINJECT_INTERVAL_MS = 5 * 6e4;
852
+ var ONBOARDING_MAX_NUDGES = 3;
853
+ function decideOnboardingDrive(step, marker, nowMs, reinjectIntervalMs = ONBOARDING_REINJECT_INTERVAL_MS, maxNudges = ONBOARDING_MAX_NUDGES) {
853
854
  if (isOnboardingArea(step)) {
854
855
  const sameStep = marker?.step === step;
855
- const stale = sameStep && nowMs - marker.injectedAtMs >= reinjectIntervalMs;
856
- if (!sameStep || stale) {
857
- return { inject: true, clearMarker: false, nextMarker: { step, injectedAtMs: nowMs }, reminder: stale };
856
+ const current = sameStep ? marker : null;
857
+ if (current?.gaveUp) {
858
+ return { inject: false, clearMarker: false, nextMarker: current, reminder: false, standDown: false };
858
859
  }
859
- return { inject: false, clearMarker: false, nextMarker: marker, reminder: false };
860
+ const fresh = current === null;
861
+ const stale = current !== null && nowMs - current.injectedAtMs >= reinjectIntervalMs;
862
+ if (!fresh && !stale) {
863
+ return { inject: false, clearMarker: false, nextMarker: current, reminder: false, standDown: false };
864
+ }
865
+ const nudgeCount = fresh ? 1 : current.nudgeCount + 1;
866
+ const isFinal = nudgeCount >= maxNudges;
867
+ return {
868
+ inject: true,
869
+ clearMarker: false,
870
+ nextMarker: { step, injectedAtMs: nowMs, nudgeCount, gaveUp: isFinal },
871
+ // A middle re-fire (not fresh, not final) is a gentle "still waiting"
872
+ // reminder; the final one is a stand-down, not a reminder.
873
+ reminder: !fresh && !isFinal,
874
+ standDown: isFinal
875
+ };
860
876
  }
861
- return { inject: false, clearMarker: marker !== null, nextMarker: null, reminder: false };
877
+ return { inject: false, clearMarker: marker !== null, nextMarker: null, reminder: false, standDown: false };
862
878
  }
863
879
  var AREA_DIRECTIVE = {
864
880
  framing: "Frame the work \u2014 ask your manager what matters in week one and what success looks like, then record it with memory_save",
@@ -867,11 +883,15 @@ var AREA_DIRECTIVE = {
867
883
  reporting: "Agree how you keep your manager posted \u2014 settle on a cadence and channel, then create a recurring report scheduled task for it"
868
884
  };
869
885
  function buildOnboardingDirective(step, completed = [], opts = {}) {
870
- const { channel, reminder = false } = opts;
886
+ const { channel, reminder = false, standDown = false, code } = opts;
871
887
  const doneAreas = completed.filter(isOnboardingArea);
872
888
  const alreadyCovered = doneAreas.length > 0 ? `You've already covered ${doneAreas.join(", ")} \u2014 re-orient, don't re-ask about those. ` : "";
873
889
  const where = channel ? `your manager in ${describeOnboardingChannel(channel)} (the channel onboarding was triggered from)` : "your manager over your usual channel";
874
890
  const askAndWait = `Ask ${where} this area's question and WAIT for their reply. Do NOT self-answer, and do NOT call \`onboarding_advance\` until they respond. ${AREA_DIRECTIVE[step]} only once they have. `;
891
+ if (standDown) {
892
+ const resumeCmd = code ? `/onboard-${code}` : "/onboard";
893
+ return `\u{1F6D1} Onboarding (${step}): your manager hasn't replied after a few nudges, so stand down on this for now. Post exactly this once to ${where}, then STOP nudging this area and do NOT call \`onboarding_advance\`: "Let me know if you'd like me to stop nudging you on this. You can resume onboarding at any time using ${resumeCmd}." After posting, leave onboarding parked; your manager can resume it whenever they're ready.`;
894
+ }
875
895
  if (reminder) {
876
896
  return `\u23F3 Onboarding (${step}): still waiting on your manager's answer for this area. If you haven't asked yet, ask now; otherwise give them a gentle nudge, but don't move on without a reply. ` + askAndWait + `Advance with \`onboarding_advance\` (ADVANCE) once this area is done.`;
877
897
  }
@@ -884,7 +904,13 @@ function readOnboardingDriveMarker(path) {
884
904
  try {
885
905
  const raw = JSON.parse(readFileSync2(path, "utf8"));
886
906
  if (typeof raw.step === "string" && isOnboardingArea(raw.step) && typeof raw.injectedAtMs === "number" && Number.isFinite(raw.injectedAtMs)) {
887
- return { step: raw.step, injectedAtMs: raw.injectedAtMs };
907
+ const nudgeCount = typeof raw.nudgeCount === "number" && Number.isFinite(raw.nudgeCount) && raw.nudgeCount >= 1 ? Math.floor(raw.nudgeCount) : 1;
908
+ return {
909
+ step: raw.step,
910
+ injectedAtMs: raw.injectedAtMs,
911
+ nudgeCount,
912
+ gaveUp: raw.gaveUp === true
913
+ };
888
914
  }
889
915
  } catch {
890
916
  }
@@ -6910,7 +6936,7 @@ var cachedMaintenanceWindow = null;
6910
6936
  var lastVersionCheckAt = 0;
6911
6937
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6912
6938
  var lastResponsivenessProbeAt = 0;
6913
- var agtCliVersion = true ? "0.28.92" : "dev";
6939
+ var agtCliVersion = true ? "0.28.93" : "dev";
6914
6940
  function resolveBrewPath(execFileSync4) {
6915
6941
  try {
6916
6942
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -10430,17 +10456,22 @@ In progress for ${age} minutes \u2014 auto-failed`).catch(() => {
10430
10456
  agent.code_name,
10431
10457
  "system",
10432
10458
  // ENG-6583: anchor the ask to the channel onboarding was triggered
10433
- // from, and phrase a staleness re-fire as a gentle reminder.
10459
+ // from, and phrase a staleness re-fire as a gentle reminder. ENG-6626:
10460
+ // the final bounded nudge flips to the stand-down message, which names
10461
+ // the agent's /onboard-<code> resume command.
10434
10462
  buildOnboardingDirective(obStep, obState.completed, {
10435
10463
  channel: obState.channel,
10436
- reminder: decision.reminder
10464
+ reminder: decision.reminder,
10465
+ standDown: decision.standDown,
10466
+ code: agent.code_name
10437
10467
  }),
10438
10468
  { task_name: "onboarding" },
10439
10469
  log
10440
10470
  ).catch(() => ({ delivered: false, fallbackUsed: false }));
10441
10471
  if (onboardingNudgeReachedSession(injectResult) && decision.nextMarker) {
10442
10472
  writeOnboardingDriveMarker(markerPath, decision.nextMarker);
10443
- log(`[onboarding] nudged '${agent.code_name}' into '${obStep}'`);
10473
+ const tag = decision.standDown ? `stand-down (nudge ${decision.nextMarker.nudgeCount})` : `nudge ${decision.nextMarker.nudgeCount}`;
10474
+ log(`[onboarding] ${tag} '${agent.code_name}' into '${obStep}'`);
10444
10475
  }
10445
10476
  }
10446
10477
  }