@integrity-labs/agt-cli 0.28.143 → 0.28.145

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.
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-KSVMYKBU.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-O5ACCLPL.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-JUQZBHID.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-PSXLMBZT.js.map
@@ -28,7 +28,7 @@ import {
28
28
  requireHost,
29
29
  safeWriteJsonAtomic,
30
30
  setConfigHash
31
- } from "../chunk-FY33N3N7.js";
31
+ } from "../chunk-R4JDTW2M.js";
32
32
  import {
33
33
  getProjectDir as getProjectDir2,
34
34
  getReadyTasks,
@@ -72,7 +72,7 @@ import {
72
72
  takeZombieDetection,
73
73
  transcriptActivityAgeSeconds,
74
74
  writeEgressAllowlist
75
- } from "../chunk-DOZH7UNT.js";
75
+ } from "../chunk-P7HRYVA3.js";
76
76
  import {
77
77
  FLAGS_SCHEMA_VERSION,
78
78
  FLAG_REGISTRY,
@@ -99,6 +99,7 @@ import {
99
99
  isSelfCompletion,
100
100
  isUnsetTimezone,
101
101
  laneTagFragment,
102
+ parseDeliverAssertion,
102
103
  parseDeliveryTarget,
103
104
  parseEnvIntegrations,
104
105
  parseTranscriptUsage,
@@ -110,7 +111,7 @@ import {
110
111
  resolveDmTarget,
111
112
  sumTranscriptUsageInWindow,
112
113
  wrapScheduledTaskPrompt
113
- } from "../chunk-AEU5FDZW.js";
114
+ } from "../chunk-SBVI6NJW.js";
114
115
  import {
115
116
  parsePsRows,
116
117
  reapOrphanChannelMcps
@@ -5288,6 +5289,30 @@ async function fireScheduledTaskViaKanban(codeName, agentId, task, prompt) {
5288
5289
  async function processClaudeTaskResult(codeName, agentId, templateId, rawOutput, delivery) {
5289
5290
  const skipBoardSideEffects = delivery?.skipBoardSideEffects === true;
5290
5291
  try {
5292
+ const policy = delivery?.deliveryPolicy ?? null;
5293
+ if (policy === "never") {
5294
+ const trimmed = (rawOutput ?? "").trim();
5295
+ log(`[claude-scheduler] Suppressed by delivery_policy=never for '${codeName}' (template=${templateId}, task=${delivery?.taskId ?? "n/a"}) \u2014 output_len=${trimmed.length}; recorded only, not delivered`);
5296
+ if (delivery?.mode === "announce" && delivery.to) {
5297
+ await reportDeliveryStatus(agentId, delivery.taskId, { status: "skipped", error_code: "SUPPRESSED_BY_POLICY" });
5298
+ }
5299
+ return { ok: true };
5300
+ }
5301
+ if (policy === "conditional") {
5302
+ const assertion = parseDeliverAssertion(rawOutput);
5303
+ if (!assertion.deliver) {
5304
+ const trimmed = (rawOutput ?? "").trim();
5305
+ const outputHash = trimmed.length === 0 ? "empty" : createHash8("sha256").update(trimmed).digest("hex").slice(0, 12);
5306
+ log(`[claude-scheduler] Suppressed by delivery_policy=conditional for '${codeName}' (template=${templateId}, task=${delivery?.taskId ?? "n/a"}) \u2014 ${assertion.vacuous ? "deliver marker had a vacuous reason" : "no deliver marker"}; output_len=${trimmed.length} output_hash=${outputHash}`);
5307
+ if (delivery?.mode === "announce" && delivery.to) {
5308
+ await reportDeliveryStatus(agentId, delivery.taskId, { status: "skipped", error_code: "SUPPRESSED_BY_POLICY" });
5309
+ }
5310
+ return { ok: true };
5311
+ }
5312
+ const reasonHash = createHash8("sha256").update(assertion.reason ?? "").digest("hex").slice(0, 12);
5313
+ log(`[claude-scheduler] Delivering conditional run for '${codeName}' (template=${templateId}, task=${delivery?.taskId ?? "n/a"}) \u2014 agent asserted a concrete trigger (reason_len=${(assertion.reason ?? "").length} reason_hash=${reasonHash})`);
5314
+ rawOutput = assertion.deliverable;
5315
+ }
5291
5316
  const classification = classifyOutput(rawOutput);
5292
5317
  if (classification.action === "suppress") {
5293
5318
  const trimmed = (rawOutput ?? "").trim();
@@ -5440,7 +5465,7 @@ async function executeAndProcessClaudeTask(codeName, agentId, task, prompt) {
5440
5465
  let taskResult;
5441
5466
  sanitizeMcpJson(mcpConfigPath, requireHost());
5442
5467
  const priorRuns = await fetchPriorScheduledRuns(agentId, task.taskId);
5443
- prompt = wrapScheduledTaskPrompt(prompt, { priorRuns, timezone: task.timezone });
5468
+ prompt = wrapScheduledTaskPrompt(prompt, { priorRuns, timezone: task.timezone, deliveryPolicy: task.deliveryPolicy });
5444
5469
  try {
5445
5470
  const claudeMdPath = join14(projectDir, "CLAUDE.md");
5446
5471
  const serverNames = [];
@@ -5525,7 +5550,12 @@ async function executeAndProcessClaudeTask(codeName, agentId, task, prompt) {
5525
5550
  mode: task.deliveryMode,
5526
5551
  channel: task.deliveryChannel,
5527
5552
  to: task.deliveryTo,
5528
- taskId: task.taskId
5553
+ taskId: task.taskId,
5554
+ // ENG-6803: hand the oneshot result processor the policy so it can enforce
5555
+ // conditional (suppressed-by-default, deliver only on a concrete
5556
+ // `<deliver: reason>` marker) / never. The in-session kanban caller
5557
+ // deliberately omits this — it gates upstream via suppress_delivery.
5558
+ deliveryPolicy: task.deliveryPolicy
5529
5559
  });
5530
5560
  if (!outcome.ok) {
5531
5561
  log(`[claude-scheduler] Task '${task.name}' result post failed for '${codeName}': ${outcome.error}`);
@@ -7092,7 +7122,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
7092
7122
  var lastVersionCheckAt = 0;
7093
7123
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
7094
7124
  var lastResponsivenessProbeAt = 0;
7095
- var agtCliVersion = true ? "0.28.143" : "dev";
7125
+ var agtCliVersion = true ? "0.28.145" : "dev";
7096
7126
  function resolveBrewPath(execFileSync4) {
7097
7127
  try {
7098
7128
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -8225,7 +8255,7 @@ async function pollCycle() {
8225
8255
  }
8226
8256
  try {
8227
8257
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
8228
- const { collectDiagnostics } = await import("../persistent-session-KSVMYKBU.js");
8258
+ const { collectDiagnostics } = await import("../persistent-session-O5ACCLPL.js");
8229
8259
  const diagCodeNames = [...agentState.persistentSessionAgents];
8230
8260
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
8231
8261
  let tailscaleHostname;
@@ -8373,7 +8403,7 @@ async function pollCycle() {
8373
8403
  const {
8374
8404
  collectResponsivenessProbes,
8375
8405
  getResponsivenessIntervalMs
8376
- } = await import("../responsiveness-probe-ZFKT6C3Z.js");
8406
+ } = await import("../responsiveness-probe-FT7DMZAR.js");
8377
8407
  const probeIntervalMs = getResponsivenessIntervalMs();
8378
8408
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
8379
8409
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -8405,7 +8435,7 @@ async function pollCycle() {
8405
8435
  collectResponsivenessProbes,
8406
8436
  livePendingInboundOldestAgeSeconds,
8407
8437
  parkPendingInbound
8408
- } = await import("../responsiveness-probe-ZFKT6C3Z.js");
8438
+ } = await import("../responsiveness-probe-FT7DMZAR.js");
8409
8439
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
8410
8440
  const wedgeNow = /* @__PURE__ */ new Date();
8411
8441
  const liveAgents = agentState.persistentSessionAgents;
@@ -10113,7 +10143,7 @@ async function processAgent(agent, agentStates) {
10113
10143
  }
10114
10144
  try {
10115
10145
  const plan = planGlobalSkillSync(
10116
- refreshAny.global_skills ?? [],
10146
+ [...refreshAny.global_skills ?? [], ...refreshAny.shared_skills ?? []],
10117
10147
  agentState.knownGlobalSkillIds.get(agent.agent_id) ?? /* @__PURE__ */ new Set(),
10118
10148
  (content) => createHash11("sha256").update(content).digest("hex").slice(0, 12),
10119
10149
  (skillId) => agentState.knownSkillHashes.get(`global-skill:${agent.agent_id}:${skillId}`)
@@ -11173,7 +11203,7 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash10("sha256")
11173
11203
  }
11174
11204
  inFlightClaudeTasks.add(task.taskId);
11175
11205
  claudeTaskConcurrency.set(codeName, (claudeTaskConcurrency.get(codeName) ?? 0) + 1);
11176
- if (isScheduledViaKanbanEnabled() && isPlainScheduledTemplate(task.templateId)) {
11206
+ if (isScheduledViaKanbanEnabled() && (isPlainScheduledTemplate(task.templateId) || isManagerSideEffectTemplate(task.templateId) || PLAN_TEMPLATES.has(task.templateId))) {
11177
11207
  await fireScheduledTaskViaKanban(codeName, agent.agent_id, task, prompt);
11178
11208
  inFlightClaudeTasks.delete(task.taskId);
11179
11209
  claudeTaskConcurrency.set(codeName, Math.max(0, (claudeTaskConcurrency.get(codeName) ?? 1) - 1));
@@ -11993,7 +12023,7 @@ async function processClaudePairSessions(agents) {
11993
12023
  killPairSession,
11994
12024
  pairTmuxSession,
11995
12025
  finalizeClaudePairOnboarding
11996
- } = await import("../claude-pair-runtime-JUQZBHID.js");
12026
+ } = await import("../claude-pair-runtime-PSXLMBZT.js");
11997
12027
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11998
12028
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11999
12029
  const killed = await killPairSession(pairTmuxSession(pairId));