@integrity-labs/agt-cli 0.28.692 → 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 (25) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-WHW747J3.js → chunk-4ARKV2GJ.js} +2 -2
  3. package/dist/chunk-4ARKV2GJ.js.map +1 -0
  4. package/dist/{chunk-7K2I4LJZ.js → chunk-BV2ZQRFB.js} +17 -7
  5. package/dist/chunk-BV2ZQRFB.js.map +1 -0
  6. package/dist/{chunk-ITB6NEXM.js → chunk-HAOMTMPE.js} +4 -4
  7. package/dist/{claude-pair-runtime-ENI5O3JA.js → claude-pair-runtime-Q5OIAZWC.js} +2 -2
  8. package/dist/lib/manager-worker.js +16 -16
  9. package/dist/lib/manager-worker.js.map +1 -1
  10. package/dist/mcp/direct-chat-channel.js +6 -0
  11. package/dist/mcp/index.js +6 -0
  12. package/dist/mcp/origami.js +6 -0
  13. package/dist/mcp/slack-channel.js +6 -0
  14. package/dist/mcp/telegram-channel.js +6 -0
  15. package/dist/{persistent-session-42FL5BEW.js → persistent-session-PPBLGH2J.js} +3 -3
  16. package/dist/{responsiveness-probe-RG2SD7HX.js → responsiveness-probe-H3UBUTW7.js} +3 -3
  17. package/dist/{session-auth-dead-SHLP7FRQ.js → session-auth-dead-K3XQNN5A.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-7K2I4LJZ.js.map +0 -1
  20. package/dist/chunk-WHW747J3.js.map +0 -1
  21. /package/dist/{chunk-ITB6NEXM.js.map → chunk-HAOMTMPE.js.map} +0 -0
  22. /package/dist/{claude-pair-runtime-ENI5O3JA.js.map → claude-pair-runtime-Q5OIAZWC.js.map} +0 -0
  23. /package/dist/{persistent-session-42FL5BEW.js.map → persistent-session-PPBLGH2J.js.map} +0 -0
  24. /package/dist/{responsiveness-probe-RG2SD7HX.js.map → responsiveness-probe-H3UBUTW7.js.map} +0 -0
  25. /package/dist/{session-auth-dead-SHLP7FRQ.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
  }
@@ -12474,7 +12484,7 @@ export {
12474
12484
  resolveAvatarEnvUrl,
12475
12485
  PLATFORM_STORAGE_RULE,
12476
12486
  SCRATCH_RETENTION_DAYS,
12477
- CLAUDE_MD_MAX_CHARS,
12487
+ CLAUDE_MD_CONTEXT_ALARM_CHARS,
12478
12488
  INTEGRATIONS_SECTION_START,
12479
12489
  INTEGRATIONS_SECTION_END,
12480
12490
  buildIntegrationsSection,
@@ -12612,4 +12622,4 @@ export {
12612
12622
  minutesSinceLocalMidnight,
12613
12623
  peekCurrentSession
12614
12624
  };
12615
- //# sourceMappingURL=chunk-7K2I4LJZ.js.map
12625
+ //# sourceMappingURL=chunk-BV2ZQRFB.js.map