@integrity-labs/agt-cli 0.28.1011 → 0.28.1013

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-IXWRE7BB.js → chunk-ER7XDBMQ.js} +8 -6
  3. package/dist/chunk-ER7XDBMQ.js.map +1 -0
  4. package/dist/{chunk-OPDT2OE5.js → chunk-MLCGPEN6.js} +22 -3
  5. package/dist/chunk-MLCGPEN6.js.map +1 -0
  6. package/dist/{chunk-APSSNA7A.js → chunk-QBQLG2PY.js} +32 -4
  7. package/dist/chunk-QBQLG2PY.js.map +1 -0
  8. package/dist/{claude-pair-runtime-WLXYE2XB.js → claude-pair-runtime-4F73QFXF.js} +2 -2
  9. package/dist/lib/manager-worker.js +95 -19
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +12 -1
  12. package/dist/mcp/index.js +12 -1
  13. package/dist/mcp/origami.js +12 -1
  14. package/dist/mcp/slack-channel.js +12 -1
  15. package/dist/mcp/telegram-channel.js +12 -1
  16. package/dist/{persistent-session-FV6AAMTM.js → persistent-session-IEGA6OSO.js} +3 -3
  17. package/dist/{responsiveness-probe-243L66XK.js → responsiveness-probe-KWFVG5EI.js} +3 -3
  18. package/dist/{session-auth-dead-J3MNBHCZ.js → session-auth-dead-P6KOHDYJ.js} +2 -2
  19. package/package.json +1 -1
  20. package/dist/chunk-APSSNA7A.js.map +0 -1
  21. package/dist/chunk-IXWRE7BB.js.map +0 -1
  22. package/dist/chunk-OPDT2OE5.js.map +0 -1
  23. /package/dist/{claude-pair-runtime-WLXYE2XB.js.map → claude-pair-runtime-4F73QFXF.js.map} +0 -0
  24. /package/dist/{persistent-session-FV6AAMTM.js.map → persistent-session-IEGA6OSO.js.map} +0 -0
  25. /package/dist/{responsiveness-probe-243L66XK.js.map → responsiveness-probe-KWFVG5EI.js.map} +0 -0
  26. /package/dist/{session-auth-dead-J3MNBHCZ.js.map → session-auth-dead-P6KOHDYJ.js.map} +0 -0
@@ -23,7 +23,7 @@ import {
23
23
  rotateDailySession,
24
24
  sessionFileExists,
25
25
  todayLocalIso
26
- } from "./chunk-OPDT2OE5.js";
26
+ } from "./chunk-MLCGPEN6.js";
27
27
  import {
28
28
  classifyUnanswerablePane,
29
29
  findUsageLimitResetHint,
@@ -3414,7 +3414,20 @@ function parseModelPolicyModels(raw) {
3414
3414
  if (typeof role !== "string" || !ROLES.includes(role)) return [];
3415
3415
  if (typeof slot !== "string" || slot.trim() === "") return [];
3416
3416
  if (typeof modelId !== "string" || modelId.trim() === "") return [];
3417
- out.push({ role, slot: slot.trim(), modelId: modelId.trim() });
3417
+ const windowRaw = entry["context_window"];
3418
+ let contextWindow = null;
3419
+ if (windowRaw !== void 0 && windowRaw !== null) {
3420
+ if (typeof windowRaw !== "number" || !Number.isSafeInteger(windowRaw) || windowRaw <= 0) {
3421
+ return [];
3422
+ }
3423
+ contextWindow = windowRaw;
3424
+ }
3425
+ out.push({
3426
+ role,
3427
+ slot: slot.trim(),
3428
+ modelId: modelId.trim(),
3429
+ contextWindow
3430
+ });
3418
3431
  }
3419
3432
  return out;
3420
3433
  }
@@ -3563,6 +3576,17 @@ function modelEnvForRole(policy, role) {
3563
3576
  }
3564
3577
  return out;
3565
3578
  }
3579
+ var CLAUDE_CODE_CONTEXT_WINDOW_ENV = "CLAUDE_CODE_MAX_CONTEXT_TOKENS";
3580
+ function contextWindowEnvForRole(policy, role) {
3581
+ if (!policy) return {};
3582
+ for (const m of policy.models) {
3583
+ if (m.role !== role) continue;
3584
+ if (CLAUDE_CODE_SLOT_ENV.get(m.slot) !== "ANTHROPIC_MODEL") continue;
3585
+ if (m.contextWindow === null) continue;
3586
+ return { [CLAUDE_CODE_CONTEXT_WINDOW_ENV]: String(m.contextWindow) };
3587
+ }
3588
+ return {};
3589
+ }
3566
3590
  function resolveModelPolicySpawnEnv(input) {
3567
3591
  const { policy, openRouterMode, gatewayToken, codeName } = input;
3568
3592
  const active = activeBinding(policy);
@@ -3584,7 +3608,10 @@ function resolveModelPolicySpawnEnv(input) {
3584
3608
  notice: `[model-policy] '${codeName}' has policy '${policy.name}' but is in OpenRouter mode \u2014 OpenRouter wins, policy not applied (ENG-9483: unifying the two actuators is a separate migration)`
3585
3609
  };
3586
3610
  }
3587
- const modelEnv = modelEnvForRole(policy, active.role);
3611
+ const modelEnv = {
3612
+ ...modelEnvForRole(policy, active.role),
3613
+ ...contextWindowEnvForRole(policy, active.role)
3614
+ };
3588
3615
  const projectSettings = projectSettingsForRole(policy, active.role);
3589
3616
  const modelNote = Object.keys(modelEnv).length > 0 ? ` models=${Object.entries(modelEnv).map(([k, v]) => `${k}=${v}`).join(" ")}` : "";
3590
3617
  const advisorNote = Object.keys(projectSettings).length > 0 ? ` project-settings=${Object.entries(projectSettings).map(([k, v]) => `${k}=${v}`).join(" ")}` : "";
@@ -4109,6 +4136,7 @@ function buildDockerRunCommand(args) {
4109
4136
  if (passModelPolicyModel) {
4110
4137
  envArgs.push("-e ANTHROPIC_MODEL");
4111
4138
  envArgs.push("-e ANTHROPIC_SMALL_FAST_MODEL");
4139
+ envArgs.push("-e CLAUDE_CODE_MAX_CONTEXT_TOKENS");
4112
4140
  }
4113
4141
  if (runId) envArgs.push(`-e ${q(`AGT_RUN_ID=${runId}`)}`);
4114
4142
  envArgs.push("-e AGT_API_KEY");
@@ -5856,4 +5884,4 @@ export {
5856
5884
  stopAllSessionsAndWait,
5857
5885
  getProjectDir
5858
5886
  };
5859
- //# sourceMappingURL=chunk-APSSNA7A.js.map
5887
+ //# sourceMappingURL=chunk-QBQLG2PY.js.map