@integrity-labs/agt-cli 0.28.1232 → 0.28.1234

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.
Files changed (29) hide show
  1. package/dist/bin/agt.js +6 -6
  2. package/dist/{chunk-3CUCO6BU.js → chunk-74FVXAHG.js} +3 -3
  3. package/dist/{chunk-BDXOVKWJ.js → chunk-AZ2QBMCL.js} +2 -2
  4. package/dist/{chunk-XBADGTJP.js → chunk-NPW4S55O.js} +295 -3
  5. package/dist/chunk-NPW4S55O.js.map +1 -0
  6. package/dist/{chunk-QCBL7EBD.js → chunk-PV2LPKJ2.js} +2 -2
  7. package/dist/{chunk-LS27F6QF.js → chunk-UWJTR4AS.js} +5 -5
  8. package/dist/{claude-code-updater-R7QSZDGD.js → claude-code-updater-6GP4LY3Y.js} +3 -3
  9. package/dist/{claude-pair-runtime-BH7XN36C.js → claude-pair-runtime-2QA23TMP.js} +3 -3
  10. package/dist/lib/manager-worker.js +19 -19
  11. package/dist/mcp/direct-chat-channel.js +248 -2
  12. package/dist/mcp/index.js +248 -2
  13. package/dist/mcp/origami.js +248 -2
  14. package/dist/mcp/slack-channel.js +248 -2
  15. package/dist/mcp/telegram-channel.js +248 -2
  16. package/dist/{persistent-session-LQ4GJ264.js → persistent-session-YS5LY7YD.js} +4 -4
  17. package/dist/{responsiveness-probe-NN7XEPJM.js → responsiveness-probe-C3SSBQCL.js} +4 -4
  18. package/dist/{session-auth-dead-ESB735FG.js → session-auth-dead-3GT7MM6J.js} +3 -3
  19. package/package.json +1 -1
  20. package/dist/chunk-XBADGTJP.js.map +0 -1
  21. /package/dist/{chunk-3CUCO6BU.js.map → chunk-74FVXAHG.js.map} +0 -0
  22. /package/dist/{chunk-BDXOVKWJ.js.map → chunk-AZ2QBMCL.js.map} +0 -0
  23. /package/dist/{chunk-QCBL7EBD.js.map → chunk-PV2LPKJ2.js.map} +0 -0
  24. /package/dist/{chunk-LS27F6QF.js.map → chunk-UWJTR4AS.js.map} +0 -0
  25. /package/dist/{claude-code-updater-R7QSZDGD.js.map → claude-code-updater-6GP4LY3Y.js.map} +0 -0
  26. /package/dist/{claude-pair-runtime-BH7XN36C.js.map → claude-pair-runtime-2QA23TMP.js.map} +0 -0
  27. /package/dist/{persistent-session-LQ4GJ264.js.map → persistent-session-YS5LY7YD.js.map} +0 -0
  28. /package/dist/{responsiveness-probe-NN7XEPJM.js.map → responsiveness-probe-C3SSBQCL.js.map} +0 -0
  29. /package/dist/{session-auth-dead-ESB735FG.js.map → session-auth-dead-3GT7MM6J.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-XWVM4KPK.js";
5
5
  import {
6
6
  FORCED_UPDATE_HARD_DEADLINE_MS
7
- } from "./chunk-XBADGTJP.js";
7
+ } from "./chunk-NPW4S55O.js";
8
8
  import {
9
9
  effectiveClaudeJsonPath
10
10
  } from "./chunk-AIUIMEUS.js";
@@ -722,4 +722,4 @@ export {
722
722
  probeClaudeInstalls,
723
723
  maybeUpdateClaudeCode
724
724
  };
725
- //# sourceMappingURL=chunk-QCBL7EBD.js.map
725
+ //# sourceMappingURL=chunk-PV2LPKJ2.js.map
@@ -18,11 +18,11 @@ import {
18
18
  requiresRemoteMcpToolGate,
19
19
  shellQuote,
20
20
  withheldRemoteMcpMessage
21
- } from "./chunk-3CUCO6BU.js";
21
+ } from "./chunk-74FVXAHG.js";
22
22
  import {
23
23
  readDailySessionPin,
24
24
  sessionTranscriptDir
25
- } from "./chunk-BDXOVKWJ.js";
25
+ } from "./chunk-AZ2QBMCL.js";
26
26
  import {
27
27
  classifyUnanswerablePane,
28
28
  isConsumerTermsDialogVisible,
@@ -95,7 +95,7 @@ import {
95
95
  scanConfigForLiteralSecrets,
96
96
  worseConnectivityOutcome,
97
97
  wrapScheduledTaskPrompt
98
- } from "./chunk-XBADGTJP.js";
98
+ } from "./chunk-NPW4S55O.js";
99
99
  import {
100
100
  claudeJsonPathFor,
101
101
  effectiveClaudeJsonPath,
@@ -8095,7 +8095,7 @@ function exchangeFailureKind(err) {
8095
8095
  }
8096
8096
 
8097
8097
  // src/lib/api-client.ts
8098
- var agtCliVersion = true ? "0.28.1232" : "dev";
8098
+ var agtCliVersion = true ? "0.28.1234" : "dev";
8099
8099
  var lastConfigHash = null;
8100
8100
  function setConfigHash(hash) {
8101
8101
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13750,4 +13750,4 @@ export {
13750
13750
  managerInstallSystemUnitCommand,
13751
13751
  managerUninstallSystemUnitCommand
13752
13752
  };
13753
- //# sourceMappingURL=chunk-LS27F6QF.js.map
13753
+ //# sourceMappingURL=chunk-UWJTR4AS.js.map
@@ -13,9 +13,9 @@ import {
13
13
  probeClaudeInstalls,
14
14
  readsAsNativeInstall,
15
15
  shouldRunClaudeCodeUpdater
16
- } from "./chunk-QCBL7EBD.js";
16
+ } from "./chunk-PV2LPKJ2.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-XBADGTJP.js";
18
+ import "./chunk-NPW4S55O.js";
19
19
  import "./chunk-AIUIMEUS.js";
20
20
  import "./chunk-DGUM43GV.js";
21
21
  export {
@@ -34,4 +34,4 @@ export {
34
34
  readsAsNativeInstall,
35
35
  shouldRunClaudeCodeUpdater
36
36
  };
37
- //# sourceMappingURL=claude-code-updater-R7QSZDGD.js.map
37
+ //# sourceMappingURL=claude-code-updater-6GP4LY3Y.js.map
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  redactPaneFrame,
10
10
  sanitizeTerminalFrame
11
- } from "./chunk-XBADGTJP.js";
11
+ } from "./chunk-NPW4S55O.js";
12
12
  import {
13
13
  CLAUDE_CONFIG_DIR_ENV,
14
14
  claudeConfigDirFor,
@@ -321,7 +321,7 @@ async function spawnPairSession(session) {
321
321
  return { ok: true };
322
322
  } catch {
323
323
  }
324
- const { resolveClaudeBinary } = await import("./persistent-session-LQ4GJ264.js");
324
+ const { resolveClaudeBinary } = await import("./persistent-session-YS5LY7YD.js");
325
325
  const claudeBin = resolveClaudeBinary();
326
326
  const pairEnv = {
327
327
  ...process.env,
@@ -836,4 +836,4 @@ export {
836
836
  startClaudePair,
837
837
  submitClaudePairCode
838
838
  };
839
- //# sourceMappingURL=claude-pair-runtime-BH7XN36C.js.map
839
+ //# sourceMappingURL=claude-pair-runtime-2QA23TMP.js.map
@@ -85,7 +85,7 @@ import {
85
85
  tripClass,
86
86
  writeEtcEnvironment,
87
87
  writeProfileDScript
88
- } from "../chunk-LS27F6QF.js";
88
+ } from "../chunk-UWJTR4AS.js";
89
89
  import {
90
90
  CLAUDE_CODE_SECURITY_FLOOR,
91
91
  SELF_UPDATE_TIMEOUTS,
@@ -99,7 +99,7 @@ import {
99
99
  runSafeCleanup,
100
100
  tightestDiskStat,
101
101
  withPackageCacheLock
102
- } from "../chunk-QCBL7EBD.js";
102
+ } from "../chunk-PV2LPKJ2.js";
103
103
  import {
104
104
  rewriteSupervisorApiKey,
105
105
  supervisorChannelsRefusing
@@ -192,7 +192,7 @@ import {
192
192
  webFetchBaselineValue,
193
193
  webFetchRestartNeeded,
194
194
  writeEgressAllowlist
195
- } from "../chunk-3CUCO6BU.js";
195
+ } from "../chunk-74FVXAHG.js";
196
196
  import {
197
197
  isAgentIdle,
198
198
  isStaleForToday,
@@ -203,7 +203,7 @@ import {
203
203
  subagentActivityAgeSeconds,
204
204
  subagentTranscriptDir,
205
205
  transcriptActivityAgeSeconds
206
- } from "../chunk-BDXOVKWJ.js";
206
+ } from "../chunk-AZ2QBMCL.js";
207
207
  import {
208
208
  classifyUnanswerablePane,
209
209
  focusedConfirmDialogBlock,
@@ -334,7 +334,7 @@ import {
334
334
  stabiliseResetInstant,
335
335
  sumTranscriptUsageInWindow,
336
336
  summarizeTranscriptActivity
337
- } from "../chunk-XBADGTJP.js";
337
+ } from "../chunk-NPW4S55O.js";
338
338
  import {
339
339
  CLAUDE_CONFIG_DIR_ENV,
340
340
  claudeConfigDirFor,
@@ -15843,7 +15843,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
15843
15843
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
15844
15844
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
15845
15845
  async function channelInboundActivityAgeSecondsFor(codeName) {
15846
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-NN7XEPJM.js");
15846
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-C3SSBQCL.js");
15847
15847
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
15848
15848
  if (newest === null) return null;
15849
15849
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -16649,7 +16649,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16649
16649
  var lastVersionCheckAt = 0;
16650
16650
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16651
16651
  var lastResponsivenessProbeAt = 0;
16652
- var agtCliVersion = true ? "0.28.1232" : "dev";
16652
+ var agtCliVersion = true ? "0.28.1234" : "dev";
16653
16653
  function resolveBrewPath(execFileSync3) {
16654
16654
  try {
16655
16655
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -18646,7 +18646,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
18646
18646
  if (codeNames.length === 0) return;
18647
18647
  void (async () => {
18648
18648
  try {
18649
- const { collectDiagnostics } = await import("../persistent-session-LQ4GJ264.js");
18649
+ const { collectDiagnostics } = await import("../persistent-session-YS5LY7YD.js");
18650
18650
  await api.post("/host/heartbeat", {
18651
18651
  host_id: hostId,
18652
18652
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -18789,7 +18789,7 @@ async function pollCycleInner() {
18789
18789
  }
18790
18790
  try {
18791
18791
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
18792
- const { collectDiagnostics } = await import("../persistent-session-LQ4GJ264.js");
18792
+ const { collectDiagnostics } = await import("../persistent-session-YS5LY7YD.js");
18793
18793
  const diagCodeNames = [...agentState.persistentSessionAgents];
18794
18794
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
18795
18795
  let tailscaleHostname;
@@ -19054,7 +19054,7 @@ async function pollCycleInner() {
19054
19054
  }
19055
19055
  try {
19056
19056
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
19057
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-R7QSZDGD.js");
19057
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-6GP4LY3Y.js");
19058
19058
  const securityFloor = currentSecurityFloor();
19059
19059
  claudeUpdaterInFlight = true;
19060
19060
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
@@ -19089,7 +19089,7 @@ async function pollCycleInner() {
19089
19089
  collectPanelessActivityProbes,
19090
19090
  getResponsivenessIntervalMs,
19091
19091
  occupancyQualificationClassifications
19092
- } = await import("../responsiveness-probe-NN7XEPJM.js");
19092
+ } = await import("../responsiveness-probe-C3SSBQCL.js");
19093
19093
  const probeIntervalMs = getResponsivenessIntervalMs();
19094
19094
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
19095
19095
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -19206,7 +19206,7 @@ async function pollCycleInner() {
19206
19206
  collectResponsivenessProbes,
19207
19207
  livePendingInboundOldestAgeSeconds,
19208
19208
  parkPendingInbound
19209
- } = await import("../responsiveness-probe-NN7XEPJM.js");
19209
+ } = await import("../responsiveness-probe-C3SSBQCL.js");
19210
19210
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
19211
19211
  const wedgeNow = /* @__PURE__ */ new Date();
19212
19212
  const liveAgents = agentState.persistentSessionAgents;
@@ -19492,7 +19492,7 @@ async function pollCycleInner() {
19492
19492
  }
19493
19493
  }
19494
19494
  );
19495
- const { parkPendingInbound } = await import("../responsiveness-probe-NN7XEPJM.js");
19495
+ const { parkPendingInbound } = await import("../responsiveness-probe-C3SSBQCL.js");
19496
19496
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
19497
19497
  paneFatalStreak.delete(codeName);
19498
19498
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -19523,7 +19523,7 @@ async function pollCycleInner() {
19523
19523
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
19524
19524
  bindSourceEscalations
19525
19525
  } = await import("../transcript-mount-health-OHE6IVJV.js");
19526
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-LQ4GJ264.js");
19526
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-YS5LY7YD.js");
19527
19527
  const mountConfig = resolveTranscriptMountConfig();
19528
19528
  const liveAgents = agentState.persistentSessionAgents;
19529
19529
  for (const tracked of [
@@ -19688,7 +19688,7 @@ async function pollCycleInner() {
19688
19688
  }
19689
19689
  try {
19690
19690
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
19691
- const { probeSessionAuth } = await import("../session-auth-dead-ESB735FG.js");
19691
+ const { probeSessionAuth } = await import("../session-auth-dead-3GT7MM6J.js");
19692
19692
  const observations = [];
19693
19693
  const pendingCacheCommits = [];
19694
19694
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -24438,7 +24438,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
24438
24438
  try {
24439
24439
  const freshId = rotateSessionForWedge(codeName);
24440
24440
  consecutiveWedgeCycles.delete(codeName);
24441
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-NN7XEPJM.js");
24441
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-C3SSBQCL.js");
24442
24442
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
24443
24443
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
24444
24444
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -24481,7 +24481,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
24481
24481
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
24482
24482
  void (async () => {
24483
24483
  try {
24484
- const { collectDiagnostics } = await import("../persistent-session-LQ4GJ264.js");
24484
+ const { collectDiagnostics } = await import("../persistent-session-YS5LY7YD.js");
24485
24485
  await api.post("/host/heartbeat", {
24486
24486
  host_id: hostId,
24487
24487
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -24532,7 +24532,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
24532
24532
  }
24533
24533
  try {
24534
24534
  const hostId = await getHostId();
24535
- const { collectDiagnostics } = await import("../persistent-session-LQ4GJ264.js");
24535
+ const { collectDiagnostics } = await import("../persistent-session-YS5LY7YD.js");
24536
24536
  await api.post("/host/heartbeat", {
24537
24537
  host_id: hostId,
24538
24538
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -25234,7 +25234,7 @@ async function processClaudePairSessions(agents) {
25234
25234
  snapshotPairConfig,
25235
25235
  // ENG-11659: result -> report body + the manager.log line that records it.
25236
25236
  planPairStartReport
25237
- } = await import("../claude-pair-runtime-BH7XN36C.js");
25237
+ } = await import("../claude-pair-runtime-2QA23TMP.js");
25238
25238
  const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
25239
25239
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
25240
25240
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
@@ -37254,6 +37254,16 @@ var integration_metadata_v1_default = {
37254
37254
  enum: ["basic_username", "basic_pair", "raw"],
37255
37255
  description: "How the credential is encoded into Authorization (ENG-10524). `basic_username` sends it as the HTTP Basic username with an empty password (`Authorization: Basic base64(<credential>:)`), Sportsyear's API-key form. `basic_pair` splits the credential on its first `:` and sends `Authorization: Basic base64(<username>:<password>)`, Projectworks' API-account form (CS-1980). `raw` sends the credential itself as the header value with no scheme word (`Authorization: <credential>`), AppsFlyer OneLink's form (CS-1918). Omit for `<auth_scheme> <credential>`. Must not be combined with `auth_scheme`."
37256
37256
  },
37257
+ token_exchange: {
37258
+ type: "object",
37259
+ description: "OAuth 2.0 client-credentials exchange (CS-1958). The stored credential is `<client id>:<client secret>`, exchanged at token_url for a short-lived bearer that the broker holds and sends as Bearer.",
37260
+ additionalProperties: false,
37261
+ required: ["token_url", "scope"],
37262
+ properties: {
37263
+ token_url: { type: "string", pattern: "^https://[^\\s]+$" },
37264
+ scope: { type: "string", minLength: 1 }
37265
+ }
37266
+ },
37257
37267
  runtime_scopes: {
37258
37268
  type: "object",
37259
37269
  description: "Per-runtime-scope support map. Each slot is either null (the integration does not support installs at this scope) or an object describing how token resolution and auth work for that scope.",
@@ -37314,8 +37324,13 @@ var integration_metadata_v1_default = {
37314
37324
  anyOf: [{ required: ["base_url"] }, { required: ["base_url_template"] }]
37315
37325
  },
37316
37326
  not: {
37317
- description: "auth_scheme and auth_encoding are mutually exclusive (ENG-10524). The templater refuses the combination on every call, so catalog validation refuses it first.",
37318
- required: ["auth_scheme", "auth_encoding"]
37327
+ description: "auth_scheme and auth_encoding are mutually exclusive (ENG-10524). The templater refuses the combination on every call, so catalog validation refuses it first. token_exchange excludes both (CS-1958): the exchanged token must go out as Bearer, and either field would send it in a form the vendor rejects. It also excludes config_arg_defaults: those resolve the token before the approval gate, and an exchange there would post the secret for a call that may then be denied.",
37328
+ anyOf: [
37329
+ { required: ["auth_scheme", "auth_encoding"] },
37330
+ { required: ["token_exchange", "auth_scheme"] },
37331
+ { required: ["token_exchange", "auth_encoding"] },
37332
+ { required: ["token_exchange", "config_arg_defaults"] }
37333
+ ]
37319
37334
  },
37320
37335
  $defs: {
37321
37336
  scopeConfig: {
@@ -39208,6 +39223,216 @@ var MARKUP_BRIDGE_SCRIPT = `<script>(function(){
39208
39223
  });
39209
39224
  })();</script>`;
39210
39225
 
39226
+ // ../core/dist/integrations/augmented-live/deck-phone-fit.js
39227
+ var DECK_PHONE_FILL_MAX_HEIGHT_PX = 500;
39228
+ var DECK_PHONE_FILL_MIN_WIDTH_PX = 560;
39229
+ var FIXER = String.raw`(function () {
39230
+ // ENG-8819: phone fit for Ninja Canvas slide decks, injected by the viewer shell so it
39231
+ // reaches decks that are already published. Acts only on a deck (a #stage holding
39232
+ // .slide elements); every other page is left alone.
39233
+ var stage = document.getElementById('stage');
39234
+ if (!stage || !stage.querySelector('.slide')) return;
39235
+ var root = document.documentElement;
39236
+ var css = document.createElement('style');
39237
+ css.id = 'agt-deck-phone-fit';
39238
+ css.textContent =
39239
+ // The stage is a flex item in deck mode. Without this it shrinks to the viewport
39240
+ // width before it is scaled, so a phone in landscape got a narrow, clipped slide.
39241
+ 'html.deck-js #stage{flex-shrink:0}' +
39242
+ // Fill-width mode (short landscape screens): the slide is wider than tall enough
39243
+ // to fit, so let the page scroll vertically instead of letterboxing it.
39244
+ 'html.deck-js.agt-fill,html.deck-js.agt-fill body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}' +
39245
+ 'html.deck-js.agt-fill body{display:block}' +
39246
+ 'html.deck-js.agt-fill #stage{transform:none!important;transform-origin:0 0}' +
39247
+ // Room to scroll the end of the page clear of the viewer chrome fixed along the
39248
+ // bottom edge (the HUD row in landscape; Download and the badge in portrait).
39249
+ 'html.deck-js.agt-fill body{padding-bottom:76px}' +
39250
+ 'html:not(.deck-js) body{padding-bottom:124px}' +
39251
+ // Portrait reads as a scrolling page, so the rotate prompt is not needed (and sat on
39252
+ // top of the viewer Download button).
39253
+ 'html:not(.deck-js) #rotate-hint{display:none!important}';
39254
+ (document.head || root).appendChild(css);
39255
+
39256
+ // Shared with the shell's chrome CSS (deckPhoneChromeCss), so the slide only fills
39257
+ // the width where the shell has also moved Download and the badge out of its way.
39258
+ var PHONE_MAX_H = __AGT_MAX_H__, PHONE_MIN_W = __AGT_MIN_W__;
39259
+ var stageZoom0 = stage.style.zoom;
39260
+ var lastSlide = -1;
39261
+
39262
+ function activeIndex() {
39263
+ var s = stage.querySelectorAll('.slide');
39264
+ for (var i = 0; i < s.length; i++) if (s[i].classList.contains('is-active')) return i;
39265
+ return -1;
39266
+ }
39267
+
39268
+ function fitDeck() {
39269
+ var w = innerWidth, h = innerHeight;
39270
+ // The canvas is whatever the deck declares (1280x720 in the skeleton, but a deck
39271
+ // may set its own), read from layout: transform does not change offsetWidth.
39272
+ stage.style.zoom = stageZoom0;
39273
+ var cw = stage.offsetWidth || 1280, ch = stage.offsetHeight || 720;
39274
+ // Height binds when the window is wider than the canvas. On a phone in landscape
39275
+ // that left a third of the screen empty; fill the width and scroll instead.
39276
+ var fill = w / h > cw / ch && h <= PHONE_MAX_H && w >= PHONE_MIN_W;
39277
+ root.classList.toggle('agt-fill', fill);
39278
+ // Scale to the width the page actually lays out in. innerWidth includes a classic
39279
+ // (non-overlay) scrollbar, and fill mode always scrolls, so on a short desktop
39280
+ // window that would push the slide's right edge under overflow-x:hidden. Read after
39281
+ // the class is on, so the scrollbar it turns on is already taken out.
39282
+ if (fill) stage.style.zoom = (root.clientWidth || w) / cw;
39283
+ var a = activeIndex();
39284
+ if (fill && a !== lastSlide) scrollTo(0, 0);
39285
+ lastSlide = a;
39286
+ }
39287
+
39288
+ // Narrow (portrait) mode stacks the slides as a page, but a slide authored for
39289
+ // 1280px still carries blocks that do not fit 390px, and they were clipped at the
39290
+ // right edge. In order, least destructive first: a multi-column grid becomes one
39291
+ // column, unwrappable text wraps, and only what still overflows (a cover canvas,
39292
+ // a diagram drawn at a fixed size) is scaled down to fit.
39293
+ var MARK = 'data-agt-fit';
39294
+ // Every inline value the narrow pass overwrites is recorded first and put back on
39295
+ // undo. Clearing to '' instead would wipe a deck's own inline layout (a
39296
+ // style="grid-template-columns:..." slide) the first time the phone rotated.
39297
+ var touched = [];
39298
+ function put(el, prop, val, mark) {
39299
+ touched.push([el, prop, el.style[prop]]);
39300
+ el.style[prop] = val;
39301
+ // Never downgrade a 'zoom' mark (Obi Wan 9a6ba37489c2): a zoomed block that is also
39302
+ // a grid child getting 'col' would lose the closest('[data-agt-fit="zoom"]')
39303
+ // exclusion, and passes 3 and 4 could wrap or zoom inside it again (a double scale).
39304
+ if (el.getAttribute(MARK) !== 'zoom') el.setAttribute(MARK, mark);
39305
+ }
39306
+ function undoNarrow() {
39307
+ for (var i = touched.length - 1; i >= 0; i--) {
39308
+ touched[i][0].style[touched[i][1]] = touched[i][2];
39309
+ touched[i][0].removeAttribute(MARK);
39310
+ }
39311
+ touched = [];
39312
+ }
39313
+ function overflowing(el, limit) {
39314
+ var r = el.getBoundingClientRect();
39315
+ return r.width > 0 && r.right > limit + 1;
39316
+ }
39317
+ function fitNarrow() {
39318
+ undoNarrow();
39319
+ var slides = stage.querySelectorAll('.slide');
39320
+ for (var j = 0; j < slides.length; j++) {
39321
+ var sl = slides[j], limit = sl.getBoundingClientRect().right;
39322
+ var all = sl.querySelectorAll('*'), k, el, cs;
39323
+ var padR = parseFloat(getComputedStyle(sl).paddingRight) || 0;
39324
+ // A block drawn at a fixed width wider than the column (a cover canvas) is a
39325
+ // picture, not a layout: scale it whole first, and never reflow inside it.
39326
+ for (k = 0; k < all.length; k++) {
39327
+ el = all[k];
39328
+ if (el.closest('[' + MARK + '="zoom"]')) continue;
39329
+ cs = getComputedStyle(el);
39330
+ var fixedW = parseFloat(cs.width);
39331
+ var rr = el.getBoundingClientRect(), room = limit - padR - rr.left;
39332
+ if (/px$/.test(el.style.width || '') || (cs.display !== 'grid' && fixedW > room + 1 && room > 40 && el.children.length > 0 && overflowing(el, limit) && fixedW >= 600)) {
39333
+ if (!overflowing(el, limit) || room <= 40) continue;
39334
+ put(el, 'zoom', Math.max(0.2, room / rr.width), 'zoom');
39335
+ // The slide keeps its full-screen min-height; shrink it to the scaled
39336
+ // picture so there is no empty screen under it. Never below the picture.
39337
+ var sr = sl.getBoundingClientRect(), er = el.getBoundingClientRect();
39338
+ var need = Math.ceil(er.bottom - sr.top + (parseFloat(getComputedStyle(sl).paddingBottom) || 0));
39339
+ if (need > 80 && need < sr.height) put(sl, 'minHeight', need + 'px', 'slide');
39340
+ }
39341
+ }
39342
+ for (k = 0; k < all.length; k++) {
39343
+ el = all[k];
39344
+ if (el.closest('[' + MARK + '="zoom"]')) continue;
39345
+ cs = getComputedStyle(el);
39346
+ if ((cs.display === 'grid' || cs.display === 'inline-grid') && cs.gridTemplateColumns.split(' ').length > 1 &&
39347
+ (el.scrollWidth > el.clientWidth + 1 || overflowing(el, limit))) {
39348
+ // A cell whose content is absolutely positioned took its height from the
39349
+ // row it shared; keep that height, or its drawing collapses on itself.
39350
+ var keep = [];
39351
+ for (var q = 0; q < el.children.length; q++) {
39352
+ var ch = el.children[q], abs = false, ds = ch.querySelectorAll('*');
39353
+ for (var z = 0; z < ds.length && !abs; z++) abs = getComputedStyle(ds[z]).position === 'absolute';
39354
+ keep.push(abs ? ch.getBoundingClientRect().height : 0);
39355
+ }
39356
+ put(el, 'gridTemplateColumns', 'minmax(0,1fr)', 'reflow');
39357
+ for (q = 0; q < el.children.length; q++) {
39358
+ if (keep[q] > 0 && el.children[q].getBoundingClientRect().height < keep[q] - 1) {
39359
+ put(el.children[q], 'minHeight', Math.round(keep[q]) + 'px', 'keep');
39360
+ }
39361
+ }
39362
+ for (var c = 0; c < el.children.length; c++) {
39363
+ if (getComputedStyle(el.children[c]).gridColumnStart !== 'auto') put(el.children[c], 'gridColumn', 'auto', 'col');
39364
+ }
39365
+ } else if (cs.display.indexOf('flex') > -1 && cs.flexDirection.indexOf('row') === 0 && cs.flexWrap === 'nowrap' &&
39366
+ el.children.length > 1 && overflowing(el.lastElementChild || el, limit)) {
39367
+ put(el, 'flexWrap', 'wrap', 'wrap');
39368
+ }
39369
+ }
39370
+ for (k = 0; k < all.length; k++) {
39371
+ el = all[k];
39372
+ if (el.closest('[' + MARK + '="zoom"]')) continue;
39373
+ if (el.children.length === 0 && overflowing(el, limit) && getComputedStyle(el).whiteSpace.indexOf('nowrap') > -1) {
39374
+ put(el, 'whiteSpace', 'normal', 'text');
39375
+ }
39376
+ }
39377
+ for (k = 0; k < all.length; k++) {
39378
+ el = all[k];
39379
+ if (el.closest('[' + MARK + '="zoom"]')) continue;
39380
+ if (!overflowing(el, limit)) continue;
39381
+ var r = el.getBoundingClientRect(), avail = limit - padR - r.left;
39382
+ if (avail <= 40) continue;
39383
+ put(el, 'zoom', Math.max(0.2, avail / r.width), 'zoom');
39384
+ }
39385
+ }
39386
+ }
39387
+
39388
+ // Obi Wan 73a833f8f833: the narrow (stacked) layout depends on WIDTH only, but iOS
39389
+ // fires resize and visualViewport resize as its toolbars collapse during an ordinary
39390
+ // scroll, changing only the height. Re-running fitNarrow there would revert and
39391
+ // re-measure every slide mid-scroll and could make the page jump. So a narrow re-fit
39392
+ // runs only when the width changed, when leaving deck mode, or on load (content sizes).
39393
+ var narrowW = -1;
39394
+ function apply() {
39395
+ try {
39396
+ if (root.classList.contains('deck-js')) {
39397
+ narrowW = -1;
39398
+ undoNarrow();
39399
+ fitDeck();
39400
+ } else {
39401
+ root.classList.remove('agt-fill');
39402
+ stage.style.zoom = stageZoom0;
39403
+ var nw = root.clientWidth || innerWidth;
39404
+ if (nw === narrowW) return;
39405
+ fitNarrow();
39406
+ narrowW = nw;
39407
+ }
39408
+ } catch (e) {
39409
+ // Never break the deck over a fit problem, but leave a trace (and a hook for
39410
+ // tests) rather than swallowing it.
39411
+ window.__agtDeckFitError = String((e && e.message) || e);
39412
+ }
39413
+ }
39414
+
39415
+ var t = 0;
39416
+ function later() {
39417
+ apply();
39418
+ // iOS reports the new size a beat after resize/orientationchange fires.
39419
+ clearTimeout(t);
39420
+ t = setTimeout(apply, 250);
39421
+ if (window.requestAnimationFrame) requestAnimationFrame(apply);
39422
+ }
39423
+ addEventListener('resize', later);
39424
+ addEventListener('orientationchange', later);
39425
+ // Load can change content sizes (images) at the same width, so it always re-fits.
39426
+ addEventListener('load', function () { narrowW = -1; later(); });
39427
+ if (window.visualViewport) visualViewport.addEventListener('resize', later);
39428
+ // Slide changes: keep fill mode scrolled to the top of the new slide.
39429
+ try { new MutationObserver(function () { if (root.classList.contains('agt-fill')) fitDeck(); })
39430
+ .observe(stage, { subtree: true, attributes: true, attributeFilter: ['class'] }); } catch (e) {}
39431
+ later();
39432
+ })();`;
39433
+ var DECK_PHONE_FIT_SOURCE = FIXER.replace("__AGT_MAX_H__", String(DECK_PHONE_FILL_MAX_HEIGHT_PX)).replace("__AGT_MIN_W__", String(DECK_PHONE_FILL_MIN_WIDTH_PX));
39434
+ var DECK_PHONE_FIT_SCRIPT = '<script id="agt-deck-phone-fit-js">' + DECK_PHONE_FIT_SOURCE + "</script>";
39435
+
39211
39436
  // ../core/dist/integrations/augmented-live/live-hosts.js
39212
39437
  function linkOpenerScript(frameId) {
39213
39438
  return 'function alOpenBar(u){var o=document.getElementById("al-open");if(o)o.parentNode.removeChild(o);var b=document.createElement("div");b.id="al-open";b.setAttribute("role","status");b.appendChild(document.createTextNode("Open link to "));var a=document.createElement("a");a.href=u.href;a.target="_blank";a.rel="noopener noreferrer";a.textContent=u.host;a.addEventListener("click",function(){setTimeout(function(){if(b.parentNode)b.parentNode.removeChild(b);},0);});b.appendChild(a);var x=document.createElement("button");x.type="button";x.setAttribute("aria-label","Dismiss");x.textContent="\xD7";x.addEventListener("click",function(){if(b.parentNode)b.parentNode.removeChild(b);});b.appendChild(x);document.body.appendChild(b);}window.addEventListener("message",function(e){var f=document.getElementById(' + JSON.stringify(frameId) + ');if(!f||e.source!==f.contentWindow||e.origin!=="null")return;var d=e.data;if(!d||d.type!=="al-open"||typeof d.url!=="string")return;var u;try{u=new URL(d.url);}catch(x){return;}if(u.protocol!=="https:"||u.username||u.password)return;var w=window.open(u.href,"_blank");if(w){try{w.opener=null;}catch(x){}}else{alOpenBar(u);}});';
@@ -39285,6 +39510,8 @@ var DOWNLOAD_MOBILE_MIN_HEIGHT_PX = 44;
39285
39510
  var DECK_ATTRIBUTION_NARROW_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
39286
39511
  var VISIBILITY_BOTTOM_PX = DOWNLOAD_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
39287
39512
  var DECK_ATTRIBUTION_NARROW_WITH_VISIBILITY_BOTTOM_PX = VISIBILITY_BOTTOM_PX + DOWNLOAD_MOBILE_MIN_HEIGHT_PX + DECK_CHROME_GAP_PX;
39513
+ var DECK_PRINT_BUTTON_W_PX = 72;
39514
+ var DECK_PHONE_DOWNLOAD_BESIDE_PRINT_LEFT_PX = 16 + DECK_PRINT_BUTTON_W_PX + DECK_CHROME_GAP_PX;
39288
39515
 
39289
39516
  // ../core/dist/integrations/augmented-live/codec.js
39290
39517
  var DEFAULT_CHUNK_BUDGET_BYTES = 180 * 1024;
@@ -45204,6 +45431,25 @@ var FLAG_REGISTRY = [
45204
45431
  flagType: "boolean",
45205
45432
  defaultValue: false
45206
45433
  },
45434
+ {
45435
+ key: "kanban-waiting-person-notify",
45436
+ description: `Notify a human teammate, via their preferred channel (Slack DM, else email fallback), when an agent PARKS a kanban card on them - "I still own this and cannot finish until you act" (ENG-8291 / ENG-11974). This is a DIFFERENT ask from human-task-assignment-notify, which covers "this is yours now", where ownership MOVES to the person. Until ENG-11974 one flag gated both, because the park path composes the assignment path's delivery; an org that silenced assignment pings therefore also lost every blocked-on-you message, which is the failure my-waiting.ts measured at a PR sitting 25.5h on a single merge tap. Off = the card is parked silently (it still appears in the recipient's "Awaiting you" queue on My Tasks). Note kanban-waiting-status is a separate gate and governs whether a park may be EMITTED at all; this one governs whether the human is TOLD.`,
45437
+ flagType: "boolean",
45438
+ // Declared safe value is `false`, matching its assignment sibling: fail-closed
45439
+ // is the right direction for a rail that messages a human.
45440
+ //
45441
+ // This default is NOT the deploy-time behaviour, and reading it as such is the
45442
+ // trap. The accompanying migration MIRRORS human-task-assignment-notify onto
45443
+ // this key - whatever that flag's central value is, plus every one of its
45444
+ // overrides at every grain - so no org's effective behaviour changes when
45445
+ // ENG-11974 ships. It deliberately does NOT seed a literal `true`: on a stage
45446
+ // where the old flag has no row, the old gate resolves to `false` and nobody
45447
+ // is being messaged, so a literal `true` would ARM a rail that DMs and emails
45448
+ // real humans on a fleet that never had one. A registry default
45449
+ // renders identically to a measurement - to learn whether this is on for an
45450
+ // org, read feature_flags.value and feature_flag_overrides, never this line.
45451
+ defaultValue: false
45452
+ },
45207
45453
  {
45208
45454
  key: "resume-reconciler",
45209
45455
  description: "Health-gated safe auto-resume for circuit-breaker pauses (ENG-6383, epic ENG-6333). When on, the manager clears a trip only when the dependency has genuinely recovered (status active + MCP present + connectivity ok \u2265 hysteresis), replacing the blind ENG-6088 quiet-timer; when off, the blind timer still governs. Boolean gate; ships dark.",