@integrity-labs/agt-cli 0.28.697 → 0.28.699

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-WJVEHAHV.js → chunk-PBOSJQE6.js} +21 -59
  3. package/dist/chunk-PBOSJQE6.js.map +1 -0
  4. package/dist/{chunk-D6SEJJSV.js → chunk-WDHT7D67.js} +2 -2
  5. package/dist/{chunk-OF2KSRB7.js → chunk-ZLHRSMKL.js} +66 -12
  6. package/dist/chunk-ZLHRSMKL.js.map +1 -0
  7. package/dist/{claude-pair-runtime-OK5NYDP4.js → claude-pair-runtime-6W4UKH3J.js} +2 -2
  8. package/dist/lib/manager-worker.js +50 -16
  9. package/dist/lib/manager-worker.js.map +1 -1
  10. package/dist/mcp/direct-chat-channel.js +18 -18
  11. package/dist/mcp/index.js +19 -19
  12. package/dist/mcp/origami.js +18 -18
  13. package/dist/mcp/slack-channel.js +20 -18
  14. package/dist/mcp/telegram-channel.js +20 -18
  15. package/dist/{persistent-session-XGSDOM7A.js → persistent-session-MIMASNZD.js} +3 -3
  16. package/dist/{responsiveness-probe-KOMJSQQA.js → responsiveness-probe-UWABMXTD.js} +3 -3
  17. package/dist/{session-auth-dead-QQCRWX55.js → session-auth-dead-LRVZHGJI.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-OF2KSRB7.js.map +0 -1
  20. package/dist/chunk-WJVEHAHV.js.map +0 -1
  21. /package/dist/{chunk-D6SEJJSV.js.map → chunk-WDHT7D67.js.map} +0 -0
  22. /package/dist/{claude-pair-runtime-OK5NYDP4.js.map → claude-pair-runtime-6W4UKH3J.js.map} +0 -0
  23. /package/dist/{persistent-session-XGSDOM7A.js.map → persistent-session-MIMASNZD.js.map} +0 -0
  24. /package/dist/{responsiveness-probe-KOMJSQQA.js.map → responsiveness-probe-UWABMXTD.js.map} +0 -0
  25. /package/dist/{session-auth-dead-QQCRWX55.js.map → session-auth-dead-LRVZHGJI.js.map} +0 -0
@@ -17,7 +17,7 @@ import {
17
17
  rotateDailySession,
18
18
  sessionFileExists,
19
19
  todayLocalIso
20
- } from "./chunk-WJVEHAHV.js";
20
+ } from "./chunk-PBOSJQE6.js";
21
21
  import {
22
22
  reapOrphanChannelMcps
23
23
  } from "./chunk-XWVM4KPK.js";
@@ -4531,4 +4531,4 @@ export {
4531
4531
  stopAllSessionsAndWait,
4532
4532
  getProjectDir
4533
4533
  };
4534
- //# sourceMappingURL=chunk-D6SEJJSV.js.map
4534
+ //# sourceMappingURL=chunk-WDHT7D67.js.map
@@ -12,7 +12,7 @@ import {
12
12
  parseEnvFileEntries,
13
13
  parseEnvIntegrations,
14
14
  shellQuote
15
- } from "./chunk-D6SEJJSV.js";
15
+ } from "./chunk-WDHT7D67.js";
16
16
  import {
17
17
  BIND_FAILURE_QUARANTINE_THRESHOLD,
18
18
  INTEGRATIONS_SECTION_END,
@@ -59,7 +59,7 @@ import {
59
59
  resolveConnectivityProbe,
60
60
  worseConnectivityOutcome,
61
61
  wrapScheduledTaskPrompt
62
- } from "./chunk-WJVEHAHV.js";
62
+ } from "./chunk-PBOSJQE6.js";
63
63
  import {
64
64
  parsePsRows
65
65
  } from "./chunk-XWVM4KPK.js";
@@ -408,6 +408,66 @@ function extractCommandNotFound(stderr) {
408
408
  return null;
409
409
  }
410
410
 
411
+ // ../../packages/core/dist/provisioning/frameworks/claudecode/core-knowledge-description.js
412
+ var CORE_KNOWLEDGE_DESCRIPTION_MAX_CHARS = 1024;
413
+ var CORE_KNOWLEDGE_TITLE_MAX_CHARS = 80;
414
+ var HEAD = "Use this skill when the user asks about the company, organization, team, products, or any of: ";
415
+ var TAIL = ". Provides core reference material from the knowledge base.";
416
+ var MARKER_RESERVE = 110;
417
+ function normalizeKnowledgeTitle(title) {
418
+ const flat = title.replace(/[\n\r"\\]/g, " ").replace(/\s+/g, " ").trim().toLowerCase();
419
+ if (flat.length <= CORE_KNOWLEDGE_TITLE_MAX_CHARS)
420
+ return flat;
421
+ return `${flat.slice(0, CORE_KNOWLEDGE_TITLE_MAX_CHARS - 1).trimEnd()}\u2026`;
422
+ }
423
+ function buildCoreKnowledgeDescription(titles) {
424
+ const normalized = titles.map(normalizeKnowledgeTitle).filter(Boolean);
425
+ if (normalized.length === 0) {
426
+ return "Use this skill for core reference material from the knowledge base.";
427
+ }
428
+ const budget = CORE_KNOWLEDGE_DESCRIPTION_MAX_CHARS - HEAD.length - TAIL.length - MARKER_RESERVE;
429
+ const chosen = [];
430
+ let used = 0;
431
+ for (const title of normalized) {
432
+ const cost = (chosen.length > 0 ? 2 : 0) + title.length;
433
+ if (used + cost > budget)
434
+ break;
435
+ chosen.push(title);
436
+ used += cost;
437
+ }
438
+ if (chosen.length === 0) {
439
+ chosen.push((normalized[0] ?? "").slice(0, Math.max(1, budget)));
440
+ }
441
+ const dropped = normalized.length - chosen.length;
442
+ const marker = dropped > 0 ? `, and ${dropped} more (call knowledge_list for the full index)` : "";
443
+ return `${HEAD}${chosen.join(", ")}${marker}${TAIL}`;
444
+ }
445
+ function orderTitlesForDescription(entries) {
446
+ const byScope = /* @__PURE__ */ new Map();
447
+ for (const entry of entries) {
448
+ const bucket = byScope.get(entry.scope);
449
+ if (bucket)
450
+ bucket.push(entry.title);
451
+ else
452
+ byScope.set(entry.scope, [entry.title]);
453
+ }
454
+ const buckets = [...byScope.values()];
455
+ const ordered = [];
456
+ for (let rank = 0; ordered.length < entries.length; rank++) {
457
+ let progressed = false;
458
+ for (const bucket of buckets) {
459
+ const title = bucket[rank];
460
+ if (title !== void 0) {
461
+ ordered.push(title);
462
+ progressed = true;
463
+ }
464
+ }
465
+ if (!progressed)
466
+ break;
467
+ }
468
+ return ordered;
469
+ }
470
+
411
471
  // ../../packages/core/dist/provisioning/frameworks/claudecode/index.js
412
472
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync4, mkdirSync as mkdirSync3, existsSync as existsSync4, chmodSync as chmodSync4, readdirSync, rmSync as rmSync2, copyFileSync, lstatSync, realpathSync, symlinkSync, readlinkSync, renameSync as renameSync4, opendirSync } from "fs";
413
473
  import { join as join3, relative, dirname as dirname3 } from "path";
@@ -4627,11 +4687,6 @@ var claudeCodeAdapter = {
4627
4687
  description: def?.description
4628
4688
  };
4629
4689
  });
4630
- const knowledgeRefs = (input.knowledge ?? []).map((k) => ({
4631
- title: k.title,
4632
- slug: k.slug,
4633
- scope: k.scope
4634
- }));
4635
4690
  const claudeMdInput = {
4636
4691
  frontmatter: input.charterFrontmatter,
4637
4692
  role: input.agent.role,
@@ -4652,7 +4707,6 @@ var claudeCodeAdapter = {
4652
4707
  // target the same sentinel range, and disagreeing would have one
4653
4708
  // re-add what the other just stripped.
4654
4709
  renderIntegrationsSection: input.renderIntegrationsSection === true,
4655
- knowledge: knowledgeRefs.length > 0 ? knowledgeRefs : void 0,
4656
4710
  timezone: input.timezone,
4657
4711
  reportsTo: input.reportsTo,
4658
4712
  personalitySeed: input.personalitySeed,
@@ -4715,7 +4769,7 @@ var claudeCodeAdapter = {
4715
4769
  const delivery = input.knowledgeDelivery ?? "both";
4716
4770
  const includeFiles = delivery === "files" || delivery === "both";
4717
4771
  if (knowledgeEntries.length > 0 && includeFiles) {
4718
- const safeTitles = knowledgeEntries.map((k) => k.title.replace(/[\n\r"\\]/g, " ").trim().toLowerCase()).filter(Boolean);
4772
+ const knowledgeTitles = orderTitlesForDescription(knowledgeEntries);
4719
4773
  const sections = knowledgeEntries.map((entry) => {
4720
4774
  const scopeLabel = entry.scope === "org" ? "Organization" : entry.scope === "global" ? "Augmented Team" : "Team";
4721
4775
  const safeTitle = entry.title.replace(/[\n\r]/g, " ").trim();
@@ -4724,7 +4778,7 @@ var claudeCodeAdapter = {
4724
4778
 
4725
4779
  ${entry.content}`;
4726
4780
  }).join("\n\n---\n\n");
4727
- const description = `Use this skill when the user asks about the company, organization, team, products, or any of: ${safeTitles.join(", ")}. Provides core reference material from the knowledge base.`;
4781
+ const description = buildCoreKnowledgeDescription(knowledgeTitles);
4728
4782
  artifacts.push({
4729
4783
  relativePath: ".claude/skills/core-knowledge/SKILL.md",
4730
4784
  content: `---
@@ -6329,7 +6383,7 @@ function exchangeFailureKind(err) {
6329
6383
  }
6330
6384
 
6331
6385
  // src/lib/api-client.ts
6332
- var agtCliVersion = true ? "0.28.697" : "dev";
6386
+ var agtCliVersion = true ? "0.28.699" : "dev";
6333
6387
  var lastConfigHash = null;
6334
6388
  function setConfigHash(hash) {
6335
6389
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10070,4 +10124,4 @@ export {
10070
10124
  managerInstallSystemUnitCommand,
10071
10125
  managerUninstallSystemUnitCommand
10072
10126
  };
10073
- //# sourceMappingURL=chunk-OF2KSRB7.js.map
10127
+ //# sourceMappingURL=chunk-ZLHRSMKL.js.map