@integrity-labs/agt-cli 0.28.74 → 0.28.75
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.
- package/dist/bin/agt.js +4 -4
- package/dist/{chunk-PXMYLQWB.js → chunk-EGQDFTBK.js} +7 -1
- package/dist/{chunk-PXMYLQWB.js.map → chunk-EGQDFTBK.js.map} +1 -1
- package/dist/{chunk-WNUAEC22.js → chunk-MB5MHGBP.js} +3 -3
- package/dist/{chunk-AB57D3NN.js → chunk-MG4WB7BD.js} +2 -2
- package/dist/{claude-pair-runtime-6KND4QS7.js → claude-pair-runtime-FLD3X32S.js} +2 -2
- package/dist/lib/manager-worker.js +35 -18
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-VKRJVW7A.js → persistent-session-ESLAJLKA.js} +3 -3
- package/dist/{responsiveness-probe-2VTHIPLG.js → responsiveness-probe-GUQFQH5D.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-WNUAEC22.js.map → chunk-MB5MHGBP.js.map} +0 -0
- /package/dist/{chunk-AB57D3NN.js.map → chunk-MG4WB7BD.js.map} +0 -0
- /package/dist/{claude-pair-runtime-6KND4QS7.js.map → claude-pair-runtime-FLD3X32S.js.map} +0 -0
- /package/dist/{persistent-session-VKRJVW7A.js.map → persistent-session-ESLAJLKA.js.map} +0 -0
- /package/dist/{responsiveness-probe-2VTHIPLG.js.map → responsiveness-probe-GUQFQH5D.js.map} +0 -0
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveConnectivityProbe,
|
|
23
23
|
worseConnectivityOutcome,
|
|
24
24
|
wrapScheduledTaskPrompt
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EGQDFTBK.js";
|
|
26
26
|
|
|
27
27
|
// ../../packages/core/dist/integrations/registry.js
|
|
28
28
|
var INTEGRATION_REGISTRY = [
|
|
@@ -7397,7 +7397,7 @@ function requireHost() {
|
|
|
7397
7397
|
}
|
|
7398
7398
|
|
|
7399
7399
|
// src/lib/api-client.ts
|
|
7400
|
-
var agtCliVersion = true ? "0.28.
|
|
7400
|
+
var agtCliVersion = true ? "0.28.75" : "dev";
|
|
7401
7401
|
var lastConfigHash = null;
|
|
7402
7402
|
function setConfigHash(hash) {
|
|
7403
7403
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8693,4 +8693,4 @@ export {
|
|
|
8693
8693
|
managerInstallSystemUnitCommand,
|
|
8694
8694
|
managerUninstallSystemUnitCommand
|
|
8695
8695
|
};
|
|
8696
|
-
//# sourceMappingURL=chunk-
|
|
8696
|
+
//# sourceMappingURL=chunk-MB5MHGBP.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatMissingVar,
|
|
4
4
|
isClaudeFastMode,
|
|
5
5
|
probeMcpEnvSubstitution
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EGQDFTBK.js";
|
|
7
7
|
import {
|
|
8
8
|
reapOrphanChannelMcps
|
|
9
9
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -1395,4 +1395,4 @@ export {
|
|
|
1395
1395
|
stopAllSessionsAndWait,
|
|
1396
1396
|
getProjectDir
|
|
1397
1397
|
};
|
|
1398
|
-
//# sourceMappingURL=chunk-
|
|
1398
|
+
//# sourceMappingURL=chunk-MG4WB7BD.js.map
|
|
@@ -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-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-ESLAJLKA.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-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-FLD3X32S.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
requireHost,
|
|
28
28
|
safeWriteJsonAtomic,
|
|
29
29
|
setConfigHash
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-MB5MHGBP.js";
|
|
31
31
|
import {
|
|
32
32
|
getProjectDir as getProjectDir2,
|
|
33
33
|
getReadyTasks,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
takeWatchdogGiveUpCount,
|
|
66
66
|
takeZombieDetection,
|
|
67
67
|
transcriptActivityAgeSeconds
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-MG4WB7BD.js";
|
|
69
69
|
import {
|
|
70
70
|
FLAGS_SCHEMA_VERSION,
|
|
71
71
|
FLAG_REGISTRY,
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
StreamEncoder,
|
|
76
76
|
appendDmFooter,
|
|
77
77
|
attributeTranscriptUsageByRun,
|
|
78
|
+
buildScheduledTaskContextBlocks,
|
|
78
79
|
classifyActor,
|
|
79
80
|
classifyOutput,
|
|
80
81
|
coerceOnboardingState,
|
|
@@ -97,7 +98,7 @@ import {
|
|
|
97
98
|
resolveDmTarget,
|
|
98
99
|
sumTranscriptUsageInWindow,
|
|
99
100
|
wrapScheduledTaskPrompt
|
|
100
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-EGQDFTBK.js";
|
|
101
102
|
import {
|
|
102
103
|
parsePsRows,
|
|
103
104
|
reapOrphanChannelMcps
|
|
@@ -3882,6 +3883,9 @@ var KANBAN_WORK_TEMPLATES = /* @__PURE__ */ new Set(["kanban-work"]);
|
|
|
3882
3883
|
function isPlainScheduledTemplate(templateId) {
|
|
3883
3884
|
return !STANDUP_TEMPLATES.has(templateId) && !TASK_UPDATE_TEMPLATES.has(templateId) && !PLAN_TEMPLATES.has(templateId) && !KANBAN_WORK_TEMPLATES.has(templateId);
|
|
3884
3885
|
}
|
|
3886
|
+
function isManagerSideEffectTemplate(templateId) {
|
|
3887
|
+
return STANDUP_TEMPLATES.has(templateId) || TASK_UPDATE_TEMPLATES.has(templateId);
|
|
3888
|
+
}
|
|
3885
3889
|
function isKanbanHybridEnabled() {
|
|
3886
3890
|
return true;
|
|
3887
3891
|
}
|
|
@@ -4824,7 +4828,7 @@ async function deliverScheduledTaskOutput(agentCodeName, agentId, rawTarget, bod
|
|
|
4824
4828
|
}
|
|
4825
4829
|
|
|
4826
4830
|
// src/lib/manager/scheduler/kanban-route.ts
|
|
4827
|
-
async function deliverScheduledCardResult(codeName, agentId, cardId) {
|
|
4831
|
+
async function deliverScheduledCardResult(codeName, agentId, cardId, completedBy = "self") {
|
|
4828
4832
|
if (!claimScheduledCardDelivery(cardId)) {
|
|
4829
4833
|
return completedScheduledCards.has(cardId) ? "terminal" : "in_flight";
|
|
4830
4834
|
}
|
|
@@ -4856,8 +4860,11 @@ async function deliverScheduledCardResult(codeName, agentId, cardId) {
|
|
|
4856
4860
|
markScheduledCardDeliveryComplete(cardId);
|
|
4857
4861
|
return "terminal";
|
|
4858
4862
|
}
|
|
4859
|
-
|
|
4860
|
-
|
|
4863
|
+
const isPlain = isPlainScheduledTemplate(task.templateId);
|
|
4864
|
+
const isPlanFamily = PLAN_TEMPLATES.has(task.templateId);
|
|
4865
|
+
const isManagerSideEffect = isManagerSideEffectTemplate(task.templateId);
|
|
4866
|
+
if (!isPlain && !isPlanFamily && !(isManagerSideEffect && completedBy === "self")) {
|
|
4867
|
+
log(`[scheduled-kanban] delivery: card ${cardId} template '${task.templateId}' on '${codeName}' (completedBy=${completedBy}) has no eligible manager side effect \u2014 skipping manager delivery`);
|
|
4861
4868
|
markScheduledCardDeliveryComplete(cardId);
|
|
4862
4869
|
return "terminal";
|
|
4863
4870
|
}
|
|
@@ -4890,7 +4897,8 @@ async function deliverScheduledCardResult(codeName, agentId, cardId) {
|
|
|
4890
4897
|
mode: task.deliveryMode,
|
|
4891
4898
|
channel: task.deliveryChannel,
|
|
4892
4899
|
to: task.deliveryTo,
|
|
4893
|
-
taskId: task.taskId
|
|
4900
|
+
taskId: task.taskId,
|
|
4901
|
+
skipBoardSideEffects: true
|
|
4894
4902
|
});
|
|
4895
4903
|
if (!outcome.ok) {
|
|
4896
4904
|
releaseScheduledCardDelivery(cardId);
|
|
@@ -4909,7 +4917,7 @@ async function reconcileScheduledRuns(codeName, agentId, board) {
|
|
|
4909
4917
|
const card = byId.get(cardId);
|
|
4910
4918
|
if (!card) continue;
|
|
4911
4919
|
if (card.status === "done") {
|
|
4912
|
-
const result = await deliverScheduledCardResult(codeName, agentId, cardId);
|
|
4920
|
+
const result = await deliverScheduledCardResult(codeName, agentId, cardId, "self");
|
|
4913
4921
|
if (result === "retry" || result === "in_flight") continue;
|
|
4914
4922
|
m.delete(cardId);
|
|
4915
4923
|
void finishRun(runId, "completed", { outcomeMessage: "scheduled-task card done" });
|
|
@@ -4926,7 +4934,15 @@ var SCHEDULED_CARD_DELIVERY_CONTRACT = `
|
|
|
4926
4934
|
[delivery contract \u2014 system]
|
|
4927
4935
|
The result you write on this card IS the message that will be delivered to the user. Delivery happens automatically from the card \u2014 never send, post, or message it yourself.
|
|
4928
4936
|
If \u2014 and ONLY if \u2014 the task above contains explicit opt-out wording the user typed ("DO NOT notify me unless \u2026", "only if X", "stay silent unless \u2026") and that condition is NOT met this run, call kanban_done with suppress_delivery: true \u2014 your result is still recorded on the card but will NOT be messaged to the user. That is how you honor the user's do-not-notify instruction; a "nothing urgent" / "all quiet" result WITHOUT the flag would still be DELIVERED as a message. (Legacy fallback: writing exactly ${SUPPRESS_SENTINEL} alone as the result also suppresses.) If the task asks for a digest/report WITHOUT opt-out wording, a zero-item report is a valid deliverable \u2014 deliver it.`;
|
|
4937
|
+
var SCHEDULED_CARD_PLAN_INSTRUCTION = `
|
|
4938
|
+
|
|
4939
|
+
---
|
|
4940
|
+
[planning task \u2014 system]
|
|
4941
|
+
This is a board-PLANNING task. Review your current board with kanban_list, then create each item of today's plan as its OWN card using kanban_add (status: todo, with a sensible priority and estimate). Do NOT just write the plan as text \u2014 the cards you create with kanban_add ARE the deliverable; nothing parses a plan out of this card's result. When done, write a brief summary of the plan you created as this card's result and mark it done.`;
|
|
4929
4942
|
async function routeScheduledTaskViaKanban(codeName, agentId, task, prompt) {
|
|
4943
|
+
const priorRuns = await fetchPriorScheduledRuns(agentId, task.taskId);
|
|
4944
|
+
const contextBlocks = buildScheduledTaskContextBlocks({ priorRuns, timezone: task.timezone });
|
|
4945
|
+
const cardDescription = contextBlocks + (PLAN_TEMPLATES.has(task.templateId) ? prompt + SCHEDULED_CARD_PLAN_INSTRUCTION : prompt + SCHEDULED_CARD_DELIVERY_CONTRACT);
|
|
4930
4946
|
const { run_id, kanban_item_id } = await startRun({
|
|
4931
4947
|
agent_id: agentId,
|
|
4932
4948
|
source_type: "scheduled_task",
|
|
@@ -4934,7 +4950,7 @@ async function routeScheduledTaskViaKanban(codeName, agentId, task, prompt) {
|
|
|
4934
4950
|
metadata: { template_id: task.templateId, name: task.name, via: "kanban-inject" },
|
|
4935
4951
|
materialize_kanban: {
|
|
4936
4952
|
title: task.name,
|
|
4937
|
-
description:
|
|
4953
|
+
description: cardDescription,
|
|
4938
4954
|
priority: 2,
|
|
4939
4955
|
initial_status: "todo",
|
|
4940
4956
|
...deriveScheduledTaskNotify(task)
|
|
@@ -4995,6 +5011,7 @@ async function fireScheduledTaskViaKanban(codeName, agentId, task, prompt) {
|
|
|
4995
5011
|
return routed;
|
|
4996
5012
|
}
|
|
4997
5013
|
async function processClaudeTaskResult(codeName, agentId, templateId, rawOutput, delivery) {
|
|
5014
|
+
const skipBoardSideEffects = delivery?.skipBoardSideEffects === true;
|
|
4998
5015
|
try {
|
|
4999
5016
|
const classification = classifyOutput(rawOutput);
|
|
5000
5017
|
if (classification.action === "suppress") {
|
|
@@ -5031,7 +5048,7 @@ async function processClaudeTaskResult(codeName, agentId, templateId, rawOutput,
|
|
|
5031
5048
|
current_tasks: output.slice(0, 2e3)
|
|
5032
5049
|
});
|
|
5033
5050
|
log(`[claude-scheduler] Task update posted for '${codeName}'`);
|
|
5034
|
-
} else if (PLAN_TEMPLATES.has(templateId)) {
|
|
5051
|
+
} else if (PLAN_TEMPLATES.has(templateId) && !skipBoardSideEffects) {
|
|
5035
5052
|
const planItems = parsePlanItems(output);
|
|
5036
5053
|
if (planItems.length > 0) {
|
|
5037
5054
|
await api.post("/host/kanban", {
|
|
@@ -5040,7 +5057,7 @@ async function processClaudeTaskResult(codeName, agentId, templateId, rawOutput,
|
|
|
5040
5057
|
});
|
|
5041
5058
|
log(`[claude-scheduler] Plan items posted for '${codeName}' (${planItems.length} items)`);
|
|
5042
5059
|
}
|
|
5043
|
-
} else if (KANBAN_WORK_TEMPLATES.has(templateId)) {
|
|
5060
|
+
} else if (KANBAN_WORK_TEMPLATES.has(templateId) && !skipBoardSideEffects) {
|
|
5044
5061
|
const kanbanUpdates = parseKanbanUpdates(output);
|
|
5045
5062
|
if (kanbanUpdates.length > 0) {
|
|
5046
5063
|
await api.post("/host/kanban", {
|
|
@@ -5127,7 +5144,7 @@ async function syncAndCheckClaudeScheduler(agent, tasks, boardItems, refreshData
|
|
|
5127
5144
|
}
|
|
5128
5145
|
inFlightClaudeTasks.add(task.taskId);
|
|
5129
5146
|
claudeTaskConcurrency.set(codeName, (claudeTaskConcurrency.get(codeName) ?? 0) + 1);
|
|
5130
|
-
if (isScheduledViaKanbanEnabled() && isPlainScheduledTemplate(task.templateId)) {
|
|
5147
|
+
if (isScheduledViaKanbanEnabled() && (isPlainScheduledTemplate(task.templateId) || isManagerSideEffectTemplate(task.templateId) || PLAN_TEMPLATES.has(task.templateId))) {
|
|
5131
5148
|
await fireScheduledTaskViaKanban(codeName, agent.agent_id, task, prompt);
|
|
5132
5149
|
inFlightClaudeTasks.delete(task.taskId);
|
|
5133
5150
|
claudeTaskConcurrency.set(codeName, Math.max(0, (claudeTaskConcurrency.get(codeName) ?? 1) - 1));
|
|
@@ -6775,7 +6792,7 @@ var cachedMaintenanceWindow = null;
|
|
|
6775
6792
|
var lastVersionCheckAt = 0;
|
|
6776
6793
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6777
6794
|
var lastResponsivenessProbeAt = 0;
|
|
6778
|
-
var agtCliVersion = true ? "0.28.
|
|
6795
|
+
var agtCliVersion = true ? "0.28.75" : "dev";
|
|
6779
6796
|
function resolveBrewPath(execFileSync4) {
|
|
6780
6797
|
try {
|
|
6781
6798
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7883,7 +7900,7 @@ async function pollCycle() {
|
|
|
7883
7900
|
}
|
|
7884
7901
|
try {
|
|
7885
7902
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
7886
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7903
|
+
const { collectDiagnostics } = await import("../persistent-session-ESLAJLKA.js");
|
|
7887
7904
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
7888
7905
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
7889
7906
|
let tailscaleHostname;
|
|
@@ -7984,7 +8001,7 @@ async function pollCycle() {
|
|
|
7984
8001
|
const {
|
|
7985
8002
|
collectResponsivenessProbes,
|
|
7986
8003
|
getResponsivenessIntervalMs
|
|
7987
|
-
} = await import("../responsiveness-probe-
|
|
8004
|
+
} = await import("../responsiveness-probe-GUQFQH5D.js");
|
|
7988
8005
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
7989
8006
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
7990
8007
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -8016,7 +8033,7 @@ async function pollCycle() {
|
|
|
8016
8033
|
collectResponsivenessProbes,
|
|
8017
8034
|
livePendingInboundOldestAgeSeconds,
|
|
8018
8035
|
parkPendingInbound
|
|
8019
|
-
} = await import("../responsiveness-probe-
|
|
8036
|
+
} = await import("../responsiveness-probe-GUQFQH5D.js");
|
|
8020
8037
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
8021
8038
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
8022
8039
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -10926,7 +10943,7 @@ function ensureRealtimeKanbanStarted(agentStates) {
|
|
|
10926
10943
|
`[realtime] Kanban completion forwarded for '${codeName}': item=${event.item_id} status=${event.status} actor=${event.last_actor_id ?? "unknown"}`
|
|
10927
10944
|
);
|
|
10928
10945
|
if (event.status === "done" && (isScheduledViaKanbanEnabled() || isKanbanHybridEnabled()) && classifyActor(event.last_actor_id, event.agent_id) === "user" && isScheduledCardTracked(event.item_id)) {
|
|
10929
|
-
void deliverScheduledCardResult(codeName, event.agent_id, event.item_id);
|
|
10946
|
+
void deliverScheduledCardResult(codeName, event.agent_id, event.item_id, "user");
|
|
10930
10947
|
}
|
|
10931
10948
|
},
|
|
10932
10949
|
log
|
|
@@ -11479,7 +11496,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11479
11496
|
killPairSession,
|
|
11480
11497
|
pairTmuxSession,
|
|
11481
11498
|
finalizeClaudePairOnboarding
|
|
11482
|
-
} = await import("../claude-pair-runtime-
|
|
11499
|
+
} = await import("../claude-pair-runtime-FLD3X32S.js");
|
|
11483
11500
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11484
11501
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11485
11502
|
const killed = await killPairSession(pairTmuxSession(pairId));
|