@integrity-labs/agt-cli 0.28.443 → 0.28.445

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.
@@ -29,7 +29,7 @@ import {
29
29
  resolveConnectivityProbe,
30
30
  worseConnectivityOutcome,
31
31
  wrapScheduledTaskPrompt
32
- } from "./chunk-IQX7TMYZ.js";
32
+ } from "./chunk-3CTWN3L4.js";
33
33
  import {
34
34
  parsePsRows
35
35
  } from "./chunk-XWVM4KPK.js";
@@ -3345,6 +3345,11 @@ var claudeCodeAdapter = {
3345
3345
  // is the render gate for the platform-storage section's workflow rows.
3346
3346
  hasWorkflows: input.workflows !== void 0,
3347
3347
  integrations: integrationSummaries,
3348
+ // ENG-8174: gate for the `## Integrations` section only. Must match
3349
+ // what the manager passes to `writeIntegrations` — the two writers
3350
+ // target the same sentinel range, and disagreeing would have one
3351
+ // re-add what the other just stripped.
3352
+ renderIntegrationsSection: input.renderIntegrationsSection === true,
3348
3353
  knowledge: knowledgeRefs.length > 0 ? knowledgeRefs : void 0,
3349
3354
  timezone: input.timezone,
3350
3355
  reportsTo: input.reportsTo,
@@ -4183,7 +4188,7 @@ ${sections}`
4183
4188
  writeFileSync3(schedulesPath, JSON.stringify({ schedules: mapped }, null, 2));
4184
4189
  return Promise.resolve();
4185
4190
  },
4186
- writeIntegrations(codeName, integrations, agentId) {
4191
+ writeIntegrations(codeName, integrations, agentId, options) {
4187
4192
  const agentDir = getAgentDir(codeName);
4188
4193
  mkdirSync2(agentDir, { recursive: true });
4189
4194
  const summariesForSidecar = integrations.map((i) => {
@@ -4473,7 +4478,8 @@ ${sections}`
4473
4478
  const claudeMdPath = join2(projectDir, "CLAUDE.md");
4474
4479
  try {
4475
4480
  const existing = readFileSync3(claudeMdPath, "utf-8");
4476
- const newSection = buildIntegrationsSection(summariesForSidecar);
4481
+ const renderSection = options?.renderClaudeMdSection === true;
4482
+ const newSection = renderSection ? buildIntegrationsSection(summariesForSidecar) : "";
4477
4483
  const sentinelStart = INTEGRATIONS_SECTION_START.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4478
4484
  const sentinelEnd = INTEGRATIONS_SECTION_END.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4479
4485
  const sentinelPattern = new RegExp(`${sentinelStart}[\\s\\S]*?${sentinelEnd}\\n*`);
@@ -4481,11 +4487,14 @@ ${sections}`
4481
4487
  if (sentinelPattern.test(existing)) {
4482
4488
  updated = existing.replace(sentinelPattern, newSection);
4483
4489
  } else if (existing.includes("## Integrations")) {
4484
- updated = existing.replace(/## Integrations[\s\S]*?(?=\n##\s|$)/, newSection.trimEnd() + "\n\n");
4485
- } else {
4490
+ updated = existing.replace(/## Integrations[\s\S]*?(?=\n##\s|$)/, newSection ? newSection.trimEnd() + "\n\n" : "");
4491
+ } else if (newSection) {
4486
4492
  updated = existing.replace("## Rules", `${newSection}## Rules`);
4493
+ } else {
4494
+ updated = existing;
4487
4495
  }
4488
- writeFileSync3(claudeMdPath, updated);
4496
+ if (updated !== existing)
4497
+ writeFileSync3(claudeMdPath, updated);
4489
4498
  const agentDir2 = getAgentDir(codeName);
4490
4499
  const envSrc = join2(agentDir2, ".env.integrations");
4491
4500
  try {
@@ -4901,7 +4910,7 @@ function requireHost() {
4901
4910
  }
4902
4911
 
4903
4912
  // src/lib/api-client.ts
4904
- var agtCliVersion = true ? "0.28.443" : "dev";
4913
+ var agtCliVersion = true ? "0.28.445" : "dev";
4905
4914
  var lastConfigHash = null;
4906
4915
  function setConfigHash(hash) {
4907
4916
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7402,4 +7411,4 @@ export {
7402
7411
  managerInstallSystemUnitCommand,
7403
7412
  managerUninstallSystemUnitCommand
7404
7413
  };
7405
- //# sourceMappingURL=chunk-X2LHWP6E.js.map
7414
+ //# sourceMappingURL=chunk-H43XPGEC.js.map