@integrity-labs/agt-cli 0.28.1259 → 0.28.1260

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 (32) hide show
  1. package/dist/{api-client-ATRLQZOU.js → api-client-PXVHBJBB.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-BOITSKCM.js → chunk-7EEU3X3T.js} +3 -3
  4. package/dist/{chunk-RBC22FRC.js → chunk-E7DKUEXC.js} +3 -3
  5. package/dist/{chunk-F6U3ZJCG.js → chunk-LLVL6LIB.js} +2 -2
  6. package/dist/{chunk-UAO5VMYK.js → chunk-NABJJPLW.js} +5 -5
  7. package/dist/{chunk-5433KPH4.js → chunk-UKZ3NXB7.js} +2 -2
  8. package/dist/{chunk-NRNPYXG6.js → chunk-UQLSI3C7.js} +2 -2
  9. package/dist/{chunk-NRNPYXG6.js.map → chunk-UQLSI3C7.js.map} +1 -1
  10. package/dist/{claude-code-updater-SUL3OSGB.js → claude-code-updater-OXTQF5E5.js} +3 -3
  11. package/dist/{claude-pair-runtime-D6ZRO2FC.js → claude-pair-runtime-BBOAF76W.js} +3 -3
  12. package/dist/lib/manager-worker.js +21 -21
  13. package/dist/mcp/direct-chat-channel.js +1 -1
  14. package/dist/mcp/index.js +1 -1
  15. package/dist/mcp/origami.js +1 -1
  16. package/dist/mcp/slack-channel.js +1 -1
  17. package/dist/mcp/telegram-channel.js +1 -1
  18. package/dist/{persistent-session-UC56OJVB.js → persistent-session-XPDKIBEM.js} +4 -4
  19. package/dist/{responsiveness-probe-KGBRCJQW.js → responsiveness-probe-4B6Y2446.js} +4 -4
  20. package/dist/{session-auth-dead-AVYJASOL.js → session-auth-dead-4C7AK3A6.js} +3 -3
  21. package/package.json +1 -1
  22. /package/dist/{api-client-ATRLQZOU.js.map → api-client-PXVHBJBB.js.map} +0 -0
  23. /package/dist/{chunk-BOITSKCM.js.map → chunk-7EEU3X3T.js.map} +0 -0
  24. /package/dist/{chunk-RBC22FRC.js.map → chunk-E7DKUEXC.js.map} +0 -0
  25. /package/dist/{chunk-F6U3ZJCG.js.map → chunk-LLVL6LIB.js.map} +0 -0
  26. /package/dist/{chunk-UAO5VMYK.js.map → chunk-NABJJPLW.js.map} +0 -0
  27. /package/dist/{chunk-5433KPH4.js.map → chunk-UKZ3NXB7.js.map} +0 -0
  28. /package/dist/{claude-code-updater-SUL3OSGB.js.map → claude-code-updater-OXTQF5E5.js.map} +0 -0
  29. /package/dist/{claude-pair-runtime-D6ZRO2FC.js.map → claude-pair-runtime-BBOAF76W.js.map} +0 -0
  30. /package/dist/{persistent-session-UC56OJVB.js.map → persistent-session-XPDKIBEM.js.map} +0 -0
  31. /package/dist/{responsiveness-probe-KGBRCJQW.js.map → responsiveness-probe-4B6Y2446.js.map} +0 -0
  32. /package/dist/{session-auth-dead-AVYJASOL.js.map → session-auth-dead-4C7AK3A6.js.map} +0 -0
@@ -13,9 +13,9 @@ import {
13
13
  probeClaudeInstalls,
14
14
  readsAsNativeInstall,
15
15
  shouldRunClaudeCodeUpdater
16
- } from "./chunk-5433KPH4.js";
16
+ } from "./chunk-UKZ3NXB7.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-NRNPYXG6.js";
18
+ import "./chunk-UQLSI3C7.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-SUL3OSGB.js.map
37
+ //# sourceMappingURL=claude-code-updater-OXTQF5E5.js.map
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  redactPaneFrame,
10
10
  sanitizeTerminalFrame
11
- } from "./chunk-NRNPYXG6.js";
11
+ } from "./chunk-UQLSI3C7.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-UC56OJVB.js");
324
+ const { resolveClaudeBinary } = await import("./persistent-session-XPDKIBEM.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-D6ZRO2FC.js.map
839
+ //# sourceMappingURL=claude-pair-runtime-BBOAF76W.js.map
@@ -69,7 +69,7 @@ import {
69
69
  tripClass,
70
70
  writeEtcEnvironment,
71
71
  writeProfileDScript
72
- } from "../chunk-UAO5VMYK.js";
72
+ } from "../chunk-NABJJPLW.js";
73
73
  import {
74
74
  ApiError,
75
75
  adoptHostKeyInProcess,
@@ -87,7 +87,7 @@ import {
87
87
  probeHostKey,
88
88
  requireHost,
89
89
  setConfigHash
90
- } from "../chunk-BOITSKCM.js";
90
+ } from "../chunk-7EEU3X3T.js";
91
91
  import {
92
92
  BLOCKED_ON_PROMPT_DECISION,
93
93
  CHANNEL_SECRET_ENV_KEYS,
@@ -172,7 +172,7 @@ import {
172
172
  webFetchBaselineValue,
173
173
  webFetchRestartNeeded,
174
174
  writeEgressAllowlist
175
- } from "../chunk-RBC22FRC.js";
175
+ } from "../chunk-E7DKUEXC.js";
176
176
  import {
177
177
  isAgentIdle,
178
178
  isStaleForToday,
@@ -183,7 +183,7 @@ import {
183
183
  subagentActivityAgeSeconds,
184
184
  subagentTranscriptDir,
185
185
  transcriptActivityAgeSeconds
186
- } from "../chunk-F6U3ZJCG.js";
186
+ } from "../chunk-LLVL6LIB.js";
187
187
  import {
188
188
  classifyUnanswerablePane,
189
189
  focusedConfirmDialogBlock,
@@ -207,7 +207,7 @@ import {
207
207
  runSafeCleanup,
208
208
  tightestDiskStat,
209
209
  withPackageCacheLock
210
- } from "../chunk-5433KPH4.js";
210
+ } from "../chunk-UKZ3NXB7.js";
211
211
  import {
212
212
  parsePsRows,
213
213
  reapOrphanChannelMcps
@@ -335,7 +335,7 @@ import {
335
335
  stabiliseResetInstant,
336
336
  sumTranscriptUsageInWindow,
337
337
  summarizeTranscriptActivity
338
- } from "../chunk-NRNPYXG6.js";
338
+ } from "../chunk-UQLSI3C7.js";
339
339
  import {
340
340
  CLAUDE_CONFIG_DIR_ENV,
341
341
  claudeConfigDirFor,
@@ -14188,7 +14188,7 @@ function createFileMigrationReportIO(codeName, log2) {
14188
14188
  };
14189
14189
  }
14190
14190
  var managerHostPost = async (path, body) => {
14191
- const { api: api2, ApiError: ApiError3 } = await import("../api-client-ATRLQZOU.js");
14191
+ const { api: api2, ApiError: ApiError3 } = await import("../api-client-PXVHBJBB.js");
14192
14192
  try {
14193
14193
  const json = await api2.post(path, body);
14194
14194
  return { status: 200, json };
@@ -16227,7 +16227,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
16227
16227
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
16228
16228
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
16229
16229
  async function channelInboundActivityAgeSecondsFor(codeName) {
16230
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-KGBRCJQW.js");
16230
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-4B6Y2446.js");
16231
16231
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
16232
16232
  if (newest === null) return null;
16233
16233
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -17043,7 +17043,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
17043
17043
  var lastVersionCheckAt = 0;
17044
17044
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
17045
17045
  var lastResponsivenessProbeAt = 0;
17046
- var agtCliVersion = true ? "0.28.1259" : "dev";
17046
+ var agtCliVersion = true ? "0.28.1260" : "dev";
17047
17047
  function resolveBrewPath(execFileSync4) {
17048
17048
  try {
17049
17049
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -19042,7 +19042,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
19042
19042
  if (codeNames.length === 0) return;
19043
19043
  void (async () => {
19044
19044
  try {
19045
- const { collectDiagnostics } = await import("../persistent-session-UC56OJVB.js");
19045
+ const { collectDiagnostics } = await import("../persistent-session-XPDKIBEM.js");
19046
19046
  await api.post("/host/heartbeat", {
19047
19047
  host_id: hostId,
19048
19048
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -19185,7 +19185,7 @@ async function pollCycleInner() {
19185
19185
  }
19186
19186
  try {
19187
19187
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
19188
- const { collectDiagnostics } = await import("../persistent-session-UC56OJVB.js");
19188
+ const { collectDiagnostics } = await import("../persistent-session-XPDKIBEM.js");
19189
19189
  const diagCodeNames = [...agentState.persistentSessionAgents];
19190
19190
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
19191
19191
  let tailscaleHostname;
@@ -19450,7 +19450,7 @@ async function pollCycleInner() {
19450
19450
  }
19451
19451
  try {
19452
19452
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
19453
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-SUL3OSGB.js");
19453
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-OXTQF5E5.js");
19454
19454
  const securityFloor = currentSecurityFloor();
19455
19455
  claudeUpdaterInFlight = true;
19456
19456
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
@@ -19485,7 +19485,7 @@ async function pollCycleInner() {
19485
19485
  collectPanelessActivityProbes,
19486
19486
  getResponsivenessIntervalMs,
19487
19487
  occupancyQualificationClassifications
19488
- } = await import("../responsiveness-probe-KGBRCJQW.js");
19488
+ } = await import("../responsiveness-probe-4B6Y2446.js");
19489
19489
  const probeIntervalMs = getResponsivenessIntervalMs();
19490
19490
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
19491
19491
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -19602,7 +19602,7 @@ async function pollCycleInner() {
19602
19602
  collectResponsivenessProbes,
19603
19603
  livePendingInboundOldestAgeSeconds,
19604
19604
  parkPendingInbound
19605
- } = await import("../responsiveness-probe-KGBRCJQW.js");
19605
+ } = await import("../responsiveness-probe-4B6Y2446.js");
19606
19606
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-5PCBGRNY.js");
19607
19607
  const wedgeNow = /* @__PURE__ */ new Date();
19608
19608
  const liveAgents = agentState.persistentSessionAgents;
@@ -19888,7 +19888,7 @@ async function pollCycleInner() {
19888
19888
  }
19889
19889
  }
19890
19890
  );
19891
- const { parkPendingInbound } = await import("../responsiveness-probe-KGBRCJQW.js");
19891
+ const { parkPendingInbound } = await import("../responsiveness-probe-4B6Y2446.js");
19892
19892
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
19893
19893
  paneFatalStreak.delete(codeName);
19894
19894
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -19919,7 +19919,7 @@ async function pollCycleInner() {
19919
19919
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
19920
19920
  bindSourceEscalations
19921
19921
  } = await import("../transcript-mount-health-OHE6IVJV.js");
19922
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-UC56OJVB.js");
19922
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-XPDKIBEM.js");
19923
19923
  const mountConfig = resolveTranscriptMountConfig();
19924
19924
  const liveAgents = agentState.persistentSessionAgents;
19925
19925
  for (const tracked of [
@@ -20084,7 +20084,7 @@ async function pollCycleInner() {
20084
20084
  }
20085
20085
  try {
20086
20086
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
20087
- const { probeSessionAuth } = await import("../session-auth-dead-AVYJASOL.js");
20087
+ const { probeSessionAuth } = await import("../session-auth-dead-4C7AK3A6.js");
20088
20088
  const observations = [];
20089
20089
  const pendingCacheCommits = [];
20090
20090
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -25019,7 +25019,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
25019
25019
  if (!refreshData) return;
25020
25020
  const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
25021
25021
  const hostId = await getHostId();
25022
- const parkForRestart = await import("../responsiveness-probe-KGBRCJQW.js").then(
25022
+ const parkForRestart = await import("../responsiveness-probe-4B6Y2446.js").then(
25023
25023
  (m) => m.parkPendingInbound,
25024
25024
  (err) => err
25025
25025
  );
@@ -25092,7 +25092,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
25092
25092
  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}`));
25093
25093
  void (async () => {
25094
25094
  try {
25095
- const { collectDiagnostics } = await import("../persistent-session-UC56OJVB.js");
25095
+ const { collectDiagnostics } = await import("../persistent-session-XPDKIBEM.js");
25096
25096
  await api.post("/host/heartbeat", {
25097
25097
  host_id: hostId,
25098
25098
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -25143,7 +25143,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
25143
25143
  }
25144
25144
  try {
25145
25145
  const hostId = await getHostId();
25146
- const { collectDiagnostics } = await import("../persistent-session-UC56OJVB.js");
25146
+ const { collectDiagnostics } = await import("../persistent-session-XPDKIBEM.js");
25147
25147
  await api.post("/host/heartbeat", {
25148
25148
  host_id: hostId,
25149
25149
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -25845,7 +25845,7 @@ async function processClaudePairSessions(agents) {
25845
25845
  snapshotPairConfig,
25846
25846
  // ENG-11659: result -> report body + the manager.log line that records it.
25847
25847
  planPairStartReport
25848
- } = await import("../claude-pair-runtime-D6ZRO2FC.js");
25848
+ } = await import("../claude-pair-runtime-BBOAF76W.js");
25849
25849
  const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
25850
25850
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
25851
25851
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
@@ -44754,7 +44754,7 @@ var FLAG_REGISTRY = [
44754
44754
  },
44755
44755
  {
44756
44756
  key: "at-rest-scheme-k-writes",
44757
- description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot: deploy-test.yml pins AUGMENTED_APP_REGION=us-east-2, so the test API runs with AWS_REGION=us-east-2, isSecondaryStack() is true there, and BOTH A9 gates refuse \u2014 the arming seam writes scheme a, and mintDekEpoch throws at its pre-filter (and would fail the ARN-region check anyway, since test's stage CMK is itself in us-east-2). So the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
44757
+ description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
44758
44758
  flagType: "boolean",
44759
44759
  // Declared safe value is `false` = scheme a. A flag-read error must never arm
44760
44760
  // scheme k on its own: an unintended `a` row is re-sealable, an unintended
package/dist/mcp/index.js CHANGED
@@ -30436,7 +30436,7 @@ var FLAG_REGISTRY = [
30436
30436
  },
30437
30437
  {
30438
30438
  key: "at-rest-scheme-k-writes",
30439
- description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot: deploy-test.yml pins AUGMENTED_APP_REGION=us-east-2, so the test API runs with AWS_REGION=us-east-2, isSecondaryStack() is true there, and BOTH A9 gates refuse \u2014 the arming seam writes scheme a, and mintDekEpoch throws at its pre-filter (and would fail the ARN-region check anyway, since test's stage CMK is itself in us-east-2). So the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
30439
+ description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
30440
30440
  flagType: "boolean",
30441
30441
  // Declared safe value is `false` = scheme a. A flag-read error must never arm
30442
30442
  // scheme k on its own: an unintended `a` row is re-sealable, an unintended
@@ -44238,7 +44238,7 @@ var FLAG_REGISTRY = [
44238
44238
  },
44239
44239
  {
44240
44240
  key: "at-rest-scheme-k-writes",
44241
- description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot: deploy-test.yml pins AUGMENTED_APP_REGION=us-east-2, so the test API runs with AWS_REGION=us-east-2, isSecondaryStack() is true there, and BOTH A9 gates refuse \u2014 the arming seam writes scheme a, and mintDekEpoch throws at its pre-filter (and would fail the ARN-region check anyway, since test's stage CMK is itself in us-east-2). So the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
44241
+ description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
44242
44242
  flagType: "boolean",
44243
44243
  // Declared safe value is `false` = scheme a. A flag-read error must never arm
44244
44244
  // scheme k on its own: an unintended `a` row is re-sealable, an unintended
@@ -39093,7 +39093,7 @@ var FLAG_REGISTRY = [
39093
39093
  },
39094
39094
  {
39095
39095
  key: "at-rest-scheme-k-writes",
39096
- description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot: deploy-test.yml pins AUGMENTED_APP_REGION=us-east-2, so the test API runs with AWS_REGION=us-east-2, isSecondaryStack() is true there, and BOTH A9 gates refuse \u2014 the arming seam writes scheme a, and mintDekEpoch throws at its pre-filter (and would fail the ARN-region check anyway, since test's stage CMK is itself in us-east-2). So the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
39096
+ description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
39097
39097
  flagType: "boolean",
39098
39098
  // Declared safe value is `false` = scheme a. A flag-read error must never arm
39099
39099
  // scheme k on its own: an unintended `a` row is re-sealable, an unintended
@@ -39539,7 +39539,7 @@ var FLAG_REGISTRY = [
39539
39539
  },
39540
39540
  {
39541
39541
  key: "at-rest-scheme-k-writes",
39542
- description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot: deploy-test.yml pins AUGMENTED_APP_REGION=us-east-2, so the test API runs with AWS_REGION=us-east-2, isSecondaryStack() is true there, and BOTH A9 gates refuse \u2014 the arming seam writes scheme a, and mintDekEpoch throws at its pre-filter (and would fail the ARN-region check anyway, since test's stage CMK is itself in us-east-2). So the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
39542
+ description: "ADR-0062 increment C arm (ENG-11944). Gates whether an at-rest sink that has an active dek_epochs row seals under a PER-ORG DEK wrapped by the platform KEK (envelope `s: 'k'`) instead of the app key (`s: 'a'`). OFF (default) = scheme a, i.e. the ADR-0061 behaviour, whatever the sink and whatever epochs exist. Resolved FLEET-WIDE and process-global via setSchemeKWritesArmed at the API bootstrap seam \u2014 per-org overrides do NOT apply (the crypto writer carries no request context), despite the DEK itself being per-org. Ships dark; the corpus is empty. NOT REVERSIBLE THE WAY `at-rest-v2-writes` IS, and the difference is the point: clearing that flag returns the writer to v1 and every blob it wrote stays readable under the same app key, whereas clearing THIS one stops new rows but leaves every row already written readable ONLY through the KMS key its inline wrap names (A5 option 2), permanently. Three preconditions for the flip, none of which this flag can check: (1) ENG-10990 \u2014 the re-seal drain never UNWRAPS the survivor it nominates, so DRAIN COMPLETE can be reported over a row whose only path is a kms: ref that does not work; (2) ADR-0062 A9 \u2014 a wrap ref embeds a region and cannot follow a migration. The BINDING check is at the MINT and compares the region in the ARN KMS returns against PRIMARY_APP_REGION; isSecondaryStack() is only its pre-filter (AWS_REGION unset still lets the SDK take a region from the shared profile) and is separately what stops a non-live stack sealing at all. A seal never writes its own region \u2014 it reuses the epoch ref verbatim; (3) an org must have an active dek_epochs row before ANY of its rows can be scheme k, and this flag does not create one. There is no lazy first-write mint (dek-epochs.ts decision 2); the ONE production caller of mintDekEpoch is POST /admin/dek-epochs/:organizationId/mint (ENG-12012), staff-only, one named org per call, and it must be invoked deliberately. So FLIPPING THIS ON BY ITSELF CHANGES NOTHING: every org still seals scheme a until someone mints deliberately. That is the intended rollout for a control whose first row freezes the envelope for the whole corpus: one pilot org, watched. kms:GenerateDataKey is therefore a MINT precondition, not a flip one \u2014 sst.config.ts grants it only where apiSecretsKmsKeyArn is defined (prod and test), so a mint on any other stage fails loudly with AccessDenied, which is the right place to fail. BUT THE GRANT IS NOT THE ONLY PRECONDITION, AND SCHEME K IS PROD-ONLY (Obi Wan 5eda5230451a). This sentence used to stop at the grant, which read as \"prod and test can mint\". Test cannot \u2014 and as of ENG-11886 the REASON HAS CHANGED, so do not reason from the old one. deploy-test.yml PINNED AUGMENTED_APP_REGION=us-east-2, so the test API RAN with AWS_REGION=us-east-2, isSecondaryStack() WAS true there, and both A9 gates refused \u2014 the arming seam wrote scheme a, and mintDekEpoch threw at its pre-filter. ENG-11886 retired that workflow and its `test` GitHub Environment is gone, so NO workflow deploys a non-prod stage any more: there is no test API to mint from at all, which is now the whole of why test cannot. The region argument is history, not the live mechanism. AND DO NOT INVERT IT INTO \"a hand-rebuilt test stage could mint\": that was NOT measured, and it turns on two things nobody has checked \u2014 which region the operator exports (the resolver defaults to ap-southeast-2 now, which IS PRIMARY_APP_REGION, so the pre-filter would NOT refuse) and where alias/augmented-test-secrets resolves. Measure both before using a rebuilt test stage as the pilot. Either way the first scheme-k row ever written will be on PROD, and the one-pilot-org rehearsal above cannot be done on test first. That is a KNOWN LIMITATION, not an oversight: both gates compare against the single PRIMARY_APP_REGION constant, and making them aware of a stage's own home region needs a stage->region source that does not exist at the mint's call site (AUGMENTED_APP_REGION is read only in sst.config.ts at deploy time, and the first mint runs in an operator shell). Do NOT whitelist us-east-2 to make test mint \u2014 that is the pre-cutover region A9 exists to keep out of rows. VERIFIED 2026-11-10 (ENG-11944), replacing the unverified note that stood here: the live key policy on alias/augmented-prod-secrets is the AWS default single statement (account root, kms:*, NO Condition block), so it constrains no EncryptionContext and cannot refuse the per-org one; and the live API role does hold Decrypt + GenerateDataKey on that key, unconditioned. Note what follows: KMS POLICY IS NOT WHAT ISOLATES ONE ORG DEK FROM ANOTHER. AES-GCM AAD is, cryptographically, inside KMS.",
39543
39543
  flagType: "boolean",
39544
39544
  // Declared safe value is `false` = scheme a. A flag-read error must never arm
39545
39545
  // scheme k on its own: an unintended `a` row is re-sealable, an unintended
@@ -68,12 +68,12 @@ import {
68
68
  writeDirectChatSessionState,
69
69
  writeEgressAllowlist,
70
70
  writePersistentClaudeWrapper
71
- } from "./chunk-RBC22FRC.js";
72
- import "./chunk-F6U3ZJCG.js";
71
+ } from "./chunk-E7DKUEXC.js";
72
+ import "./chunk-LLVL6LIB.js";
73
73
  import "./chunk-HYQ7VOC3.js";
74
74
  import "./chunk-6HBXEJHO.js";
75
75
  import "./chunk-XWVM4KPK.js";
76
- import "./chunk-NRNPYXG6.js";
76
+ import "./chunk-UQLSI3C7.js";
77
77
  import "./chunk-AIUIMEUS.js";
78
78
  import "./chunk-DGUM43GV.js";
79
79
  export {
@@ -147,4 +147,4 @@ export {
147
147
  writeEgressAllowlist,
148
148
  writePersistentClaudeWrapper
149
149
  };
150
- //# sourceMappingURL=persistent-session-UC56OJVB.js.map
150
+ //# sourceMappingURL=persistent-session-XPDKIBEM.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-RBC22FRC.js";
4
- import "./chunk-F6U3ZJCG.js";
3
+ } from "./chunk-E7DKUEXC.js";
4
+ import "./chunk-LLVL6LIB.js";
5
5
  import "./chunk-HYQ7VOC3.js";
6
6
  import "./chunk-6HBXEJHO.js";
7
7
  import "./chunk-XWVM4KPK.js";
8
- import "./chunk-NRNPYXG6.js";
8
+ import "./chunk-UQLSI3C7.js";
9
9
  import "./chunk-AIUIMEUS.js";
10
10
  import "./chunk-DGUM43GV.js";
11
11
 
@@ -804,4 +804,4 @@ export {
804
804
  readAndResetSlackReplyBindingClassifications,
805
805
  readAndResetSlackReplyTargetClassifications
806
806
  };
807
- //# sourceMappingURL=responsiveness-probe-KGBRCJQW.js.map
807
+ //# sourceMappingURL=responsiveness-probe-4B6Y2446.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-F6U3ZJCG.js";
4
- import "./chunk-NRNPYXG6.js";
3
+ } from "./chunk-LLVL6LIB.js";
4
+ import "./chunk-UQLSI3C7.js";
5
5
  import "./chunk-DGUM43GV.js";
6
6
 
7
7
  // src/lib/session-auth-dead.ts
@@ -205,4 +205,4 @@ export {
205
205
  decideSessionAuthState,
206
206
  probeSessionAuth
207
207
  };
208
- //# sourceMappingURL=session-auth-dead-AVYJASOL.js.map
208
+ //# sourceMappingURL=session-auth-dead-4C7AK3A6.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1259",
3
+ "version": "0.28.1260",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {