@integrity-labs/agt-cli 0.28.691 → 0.28.693

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 (26) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-XF2B7JHC.js → chunk-4ARKV2GJ.js} +2 -2
  3. package/dist/chunk-4ARKV2GJ.js.map +1 -0
  4. package/dist/{chunk-2GNXBVWJ.js → chunk-BV2ZQRFB.js} +28 -31
  5. package/dist/chunk-BV2ZQRFB.js.map +1 -0
  6. package/dist/{chunk-ZY57BJYH.js → chunk-HAOMTMPE.js} +430 -628
  7. package/dist/chunk-HAOMTMPE.js.map +1 -0
  8. package/dist/{claude-pair-runtime-PDOGREOQ.js → claude-pair-runtime-Q5OIAZWC.js} +2 -2
  9. package/dist/lib/manager-worker.js +16 -18
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +17 -24
  12. package/dist/mcp/index.js +17 -24
  13. package/dist/mcp/origami.js +17 -24
  14. package/dist/mcp/slack-channel.js +17 -24
  15. package/dist/mcp/telegram-channel.js +17 -24
  16. package/dist/{persistent-session-LVBNKFMF.js → persistent-session-PPBLGH2J.js} +3 -3
  17. package/dist/{responsiveness-probe-T52RFYK3.js → responsiveness-probe-H3UBUTW7.js} +3 -3
  18. package/dist/{session-auth-dead-MV6C7TBH.js → session-auth-dead-K3XQNN5A.js} +2 -2
  19. package/package.json +1 -1
  20. package/dist/chunk-2GNXBVWJ.js.map +0 -1
  21. package/dist/chunk-XF2B7JHC.js.map +0 -1
  22. package/dist/chunk-ZY57BJYH.js.map +0 -1
  23. /package/dist/{claude-pair-runtime-PDOGREOQ.js.map → claude-pair-runtime-Q5OIAZWC.js.map} +0 -0
  24. /package/dist/{persistent-session-LVBNKFMF.js.map → persistent-session-PPBLGH2J.js.map} +0 -0
  25. /package/dist/{responsiveness-probe-T52RFYK3.js.map → responsiveness-probe-H3UBUTW7.js.map} +0 -0
  26. /package/dist/{session-auth-dead-MV6C7TBH.js.map → session-auth-dead-K3XQNN5A.js.map} +0 -0
@@ -79,15 +79,24 @@ var PLATFORM_STORAGE_RULE = "Store durable, reusable work you build (repeatable
79
79
 
80
80
  // ../../packages/core/dist/provisioning/frameworks/claudecode/identity.js
81
81
  var SCRATCH_RETENTION_DAYS = 7;
82
- var CLAUDE_MD_MAX_CHARS = 4e4;
82
+ var CLAUDE_MD_CHARS_PER_TOKEN = 3.57;
83
+ var CLAUDE_MD_CONTEXT_WINDOW_TOKENS = 2e5;
84
+ var CLAUDE_MD_ALARM_SHARE = 0.1;
83
85
  var CLAUDE_MD_BUDGET_CHARS = 38e3;
86
+ var CLAUDE_MD_CONTEXT_ALARM_CHARS = Math.round(CLAUDE_MD_CONTEXT_WINDOW_TOKENS * CLAUDE_MD_ALARM_SHARE * CLAUDE_MD_CHARS_PER_TOKEN);
87
+ function estimateClaudeMdTokens(chars) {
88
+ return Math.round(chars / CLAUDE_MD_CHARS_PER_TOKEN);
89
+ }
84
90
  function checkClaudeMdSize(md) {
85
91
  const chars = md.length;
92
+ const tokens = estimateClaudeMdTokens(chars);
86
93
  return {
87
94
  chars,
88
- ok: chars <= CLAUDE_MD_MAX_CHARS,
95
+ tokens,
96
+ contextShare: tokens / CLAUDE_MD_CONTEXT_WINDOW_TOKENS,
97
+ ok: chars <= CLAUDE_MD_CONTEXT_ALARM_CHARS,
89
98
  withinBudget: chars <= CLAUDE_MD_BUDGET_CHARS,
90
- overBy: Math.max(0, chars - CLAUDE_MD_MAX_CHARS)
99
+ overBy: Math.max(0, chars - CLAUDE_MD_CONTEXT_ALARM_CHARS)
91
100
  };
92
101
  }
93
102
  function buildMemorySection(hasQmd) {
@@ -1187,8 +1196,9 @@ The marginal cost of completeness is near zero \u2014 do the whole thing.
1187
1196
  - Before concluding that an agent or person doesn't exist, call \`directory_lookup\` first. Only report "not found" after the directory confirms no match. (ENG-7955)
1188
1197
  ${frontmatter.environment === "prod" ? "- Production environment: exercise extra caution with all operations.\n" : ""}`;
1189
1198
  const size = checkClaudeMdSize(body);
1190
- if (!size.ok) {
1191
- console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars, over Claude Code's ${CLAUDE_MD_MAX_CHARS}-char limit by ${size.overBy}. The CLI will truncate it \u2014 trim the generated sections (ENG-8105).`);
1199
+ if (!size.withinBudget) {
1200
+ const share = (size.contextShare * 100).toFixed(1);
1201
+ console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars (~${size.tokens} tokens, ~${share}% of a ${CLAUDE_MD_CONTEXT_WINDOW_TOKENS}-token context window), over the ${CLAUDE_MD_BUDGET_CHARS}-char generator budget by ${size.chars - CLAUDE_MD_BUDGET_CHARS}${size.ok ? "" : ` \u2014 and past the ${CLAUDE_MD_CONTEXT_ALARM_CHARS}-char operational threshold`}. Nothing is truncated; this is context the agent pays for on every request. Trim the generated sections (ENG-8105 / ENG-9459).`);
1192
1202
  }
1193
1203
  return body;
1194
1204
  }
@@ -4969,30 +4979,17 @@ var FLAG_REGISTRY = [
4969
4979
  // first the real cut is higher than this and the pin under-reports.
4970
4980
  since: "0.28.570"
4971
4981
  },
4972
- {
4973
- key: "secret-files-tmpfs",
4974
- description: "Host-side RAM-backing of the per-agent .env.integrations secret files (ENG-9348, epic ENG-9347). When on, the manager turns both copies (the agent-dir file and the project/ mirror) into symlinks pointing at a 0700 per-agent directory under tmpfs (/dev/shm, else /run), so plaintext channel/integration tokens live only in RAM: the persistent EBS volume holds a symlink (no token bytes), an EBS snapshot captures nothing, and a host shutdown is a genuine wipe. Every consumer path is unchanged (same file paths). Boolean gate; ships dark. Fail-safe in every direction \u2014 off is byte-for-byte today; a host with no genuine tmpfs root (e.g. macOS dev) silently keeps the persistent files; a symlink-setup error logs and falls back to the persistent path. Reboot clears tmpfs, and the manager re-backs on its next refresh (surviving reboot is not required \u2014 secrets are re-fetched on refresh).",
4975
- flagType: "boolean",
4976
- // Declared safe value is `false` (persistent files, today's behaviour).
4977
- // Fail-safe direction: a flag-DB read error must never, on its own, start
4978
- // relocating where prod secret files physically live. Flip on per-host for a
4979
- // canary, verify no plaintext lands on the persistent volume, then fleet-wide
4980
- // from the admin Feature Flags page.
4981
- defaultValue: false,
4982
- // ADR-0022 operator override, read by the host flag store's env layer (not a
4983
- // hand-written process.env gate) — same posture as memory-extraction /
4984
- // tool-call-audit above. Gives a per-host canary before the DB flag exists.
4985
- envVar: "AGT_SECRET_FILES_TMPFS_ENABLED",
4986
- // The real published build that carries the manager reader + core writer,
4987
- // replacing the deliberately-unreachable `99.0.0` this flag shipped with.
4988
- // Verified against the tarball (`npm pack @integrity-labs/agt-cli@0.28.678`):
4989
- // `setSecretFileTmpfsBacking` is present in package/dist/lib/manager-worker.js
4990
- // and the `secret-files-tmpfs` key ships in the bundle. Auto-publish patch-
4991
- // bumps from main, so if a CLI-touching PR landed between the ENG-9348 merge
4992
- // and this one the real cut is higher than 0.28.678 and reach under-reports;
4993
- // re-verify before flipping the flag on for a canary (ENG-8575/ENG-9350).
4994
- since: "0.28.678"
4995
- },
4982
+ // ENG-9348 RETIRED (2026-08-24): the `secret-files-tmpfs` flag and its whole
4983
+ // tmpfs-backing implementation are removed after TWO prod outages. Symlinking
4984
+ // `.env.integrations` into /dev/shm raced the agent wrapper's `set -e; source
4985
+ // .env.integrations` (a symlink observed before its target existed → crashloop);
4986
+ // the seed-before-symlink fix (PR #4960) proved insufficient (a flag-read flap
4987
+ // let the destructive disable-revert re-open the window). Approach abandoned in
4988
+ // favour of the spawn-env path (ENG-9350, which never writes the file at all)
4989
+ // plus disk shred (ENG-9349). Removing the flag makes a third outage impossible.
4990
+ // Any lingering feature_flag_overrides rows for this key are inert (no reader);
4991
+ // clear them out-of-band if desired.
4992
+ // flag-archive-allow: secret-files-tmpfs retired after two prod outages feature removed, no manager reader remains
4996
4993
  {
4997
4994
  key: "memory-file-tombstones",
4998
4995
  description: "Host-side removal of RETIRED agent memory files (ENG-9257). The control plane sends an explicit tombstone list on /host/memories and the manager moves the matching .md out of the agent's memory directory \u2014 but only when its write-time manifest says the manager itself wrote that exact file and the sha256 still matches, so an agent-edited or hand-authored file is retained and reported instead. Boolean gate; ships dark. Scope is retirement only, never expiry: /host/memories has always withheld expired rows, so an expiry-driven list would make months of accumulated backlog deletable on the first armed tick. This is the ONLY thing that makes retirement visible to the agent, which reads its memory directory straight off disk \u2014 every server-side reader already excludes retired rows, so with this off a retired memory is gone everywhere except the one surface that changes the agent's behaviour.",
@@ -12487,7 +12484,7 @@ export {
12487
12484
  resolveAvatarEnvUrl,
12488
12485
  PLATFORM_STORAGE_RULE,
12489
12486
  SCRATCH_RETENTION_DAYS,
12490
- CLAUDE_MD_MAX_CHARS,
12487
+ CLAUDE_MD_CONTEXT_ALARM_CHARS,
12491
12488
  INTEGRATIONS_SECTION_START,
12492
12489
  INTEGRATIONS_SECTION_END,
12493
12490
  buildIntegrationsSection,
@@ -12625,4 +12622,4 @@ export {
12625
12622
  minutesSinceLocalMidnight,
12626
12623
  peekCurrentSession
12627
12624
  };
12628
- //# sourceMappingURL=chunk-2GNXBVWJ.js.map
12625
+ //# sourceMappingURL=chunk-BV2ZQRFB.js.map