@integrity-labs/agt-cli 0.27.0-test.4 → 0.27.1

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.
@@ -13,7 +13,7 @@ import {
13
13
  provisionOrientHook,
14
14
  provisionStopHook,
15
15
  requireHost
16
- } from "../chunk-CPZIFISH.js";
16
+ } from "../chunk-UVPB6TSJ.js";
17
17
  import {
18
18
  getProjectDir as getProjectDir2,
19
19
  getReadyTasks,
@@ -3161,7 +3161,7 @@ var cachedFrameworkVersion = null;
3161
3161
  var lastVersionCheckAt = 0;
3162
3162
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
3163
3163
  var lastResponsivenessProbeAt = 0;
3164
- var agtCliVersion = true ? "0.27.0-test.4" : "dev";
3164
+ var agtCliVersion = true ? "0.27.1" : "dev";
3165
3165
  function resolveBrewPath(execFileSync4) {
3166
3166
  try {
3167
3167
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7555,12 +7555,22 @@ function formatBoardForPrompt(items, template) {
7555
7555
  const timeLabel = (m) => m ? ` (~${m >= 60 ? `${Math.round(m / 60)}hr` : `${m}min`})` : "";
7556
7556
  const deliverableLine = (d) => d ? `
7557
7557
  Deliverable: ${d}` : "";
7558
+ const sourceLine = (channel, thread, url) => {
7559
+ const parts = [];
7560
+ if (channel && thread) parts.push(`${channel} thread ${thread}`);
7561
+ if (url) parts.push(url);
7562
+ return parts.length > 0 ? `
7563
+ source: ${parts.join(" \u2022 ")}` : "";
7564
+ };
7558
7565
  const grouped = {};
7559
7566
  for (const item of items) {
7560
7567
  const key = item.status;
7561
7568
  if (!grouped[key]) grouped[key] = [];
7562
7569
  grouped[key].push(item);
7563
7570
  }
7571
+ const hasSourceThread = items.some(
7572
+ (i) => (i.status === "todo" || i.status === "in_progress") && !!i.source_integration && !!i.source_external_id
7573
+ );
7564
7574
  const lines = [];
7565
7575
  if (template === "morning-plan") {
7566
7576
  lines.push("=== CURRENT BOARD ===");
@@ -7569,7 +7579,7 @@ function formatBoardForPrompt(items, template) {
7569
7579
  if (statusItems && statusItems.length > 0) {
7570
7580
  lines.push(`${label}:`);
7571
7581
  statusItems.forEach((item, i) => {
7572
- lines.push(` ${i + 1}. [${priorityLabel(item.priority)}] ${item.title}${timeLabel(item.estimated_minutes)}${deliverableLine(item.deliverable)}`);
7582
+ lines.push(` ${i + 1}. [${priorityLabel(item.priority)}] ${item.title}${timeLabel(item.estimated_minutes)}${deliverableLine(item.deliverable)}${sourceLine(item.source_integration, item.source_external_id, item.source_url)}`);
7573
7583
  });
7574
7584
  }
7575
7585
  }
@@ -7587,7 +7597,7 @@ function formatBoardForPrompt(items, template) {
7587
7597
  if (statusItems && statusItems.length > 0) {
7588
7598
  lines.push(`${label}:`);
7589
7599
  statusItems.forEach((item, i) => {
7590
- lines.push(` ${i + 1}. [${priorityLabel(item.priority)}] ${item.title}${timeLabel(item.estimated_minutes)}${deliverableLine(item.deliverable)}`);
7600
+ lines.push(` ${i + 1}. [${priorityLabel(item.priority)}] ${item.title}${timeLabel(item.estimated_minutes)}${deliverableLine(item.deliverable)}${sourceLine(item.source_integration, item.source_external_id, item.source_url)}`);
7591
7601
  });
7592
7602
  }
7593
7603
  }
@@ -7606,6 +7616,14 @@ function formatBoardForPrompt(items, template) {
7606
7616
  lines.push("3. Call kanban.done with a result summary when finished");
7607
7617
  lines.push("4. If blocked, call kanban.update with notes, then pick the next item");
7608
7618
  lines.push("");
7619
+ if (hasSourceThread) {
7620
+ lines.push("THREAD CONTINUITY: If a card shows a `source:` line, the request originated");
7621
+ lines.push("in that Slack/Telegram thread. When you deliver the result, reply in that");
7622
+ lines.push("thread (not the default channel) so the user sees the answer where they");
7623
+ lines.push("asked. The card's `source_channel` + `source_thread_id` are the thread");
7624
+ lines.push("coordinates to use.");
7625
+ lines.push("");
7626
+ }
7609
7627
  lines.push("SELF-MANAGEMENT: When you receive a request from a channel (Slack, Telegram)");
7610
7628
  lines.push("that takes more than a quick response, create a task first with kanban.add,");
7611
7629
  lines.push("move to in_progress, do the work, then kanban.done with a result summary.");
@@ -8350,14 +8368,11 @@ function generateArtifacts(agent, refreshData, adapter) {
8350
8368
  };
8351
8369
  }
8352
8370
  }
8353
- const activeTasksInjectEnabled = process.env["AGT_ACTIVE_TASKS_INJECT"] === "1";
8354
- const activeTasksFromRefresh = activeTasksInjectEnabled ? refreshData.active_tasks ?? [] : void 0;
8355
- if (activeTasksInjectEnabled) {
8356
- const tokens = estimateActiveTasksTokens(activeTasksFromRefresh);
8357
- log(
8358
- `[provision/active-tasks] agent=${agent.code_name} count=${activeTasksFromRefresh?.length ?? 0} estimated_tokens=${tokens}`
8359
- );
8360
- }
8371
+ const activeTasksFromRefresh = refreshData.active_tasks ?? [];
8372
+ const activeTasksTokens = estimateActiveTasksTokens(activeTasksFromRefresh);
8373
+ log(
8374
+ `[provision/active-tasks] agent=${agent.code_name} count=${activeTasksFromRefresh.length} estimated_tokens=${activeTasksTokens}`
8375
+ );
8361
8376
  const provisionInput = {
8362
8377
  agent: refreshData.agent,
8363
8378
  charterFrontmatter,
@@ -8905,6 +8920,7 @@ export {
8905
8920
  deliverScheduledCardResult,
8906
8921
  extractCharterSlackPeers,
8907
8922
  extractCharterTelegramPeers,
8923
+ formatBoardForPrompt,
8908
8924
  hasActionableItems,
8909
8925
  hasHybridActionableItems,
8910
8926
  hasRevokedResiduals,