@integrity-labs/agt-cli 0.28.439 → 0.28.440
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-MOASN7XT.js → chunk-R6GVWACQ.js} +48 -6
- package/dist/{chunk-MOASN7XT.js.map → chunk-R6GVWACQ.js.map} +1 -1
- package/dist/{chunk-CM7DWCO4.js → chunk-V3G7G4QM.js} +3 -3
- package/dist/{claude-pair-runtime-QDNXOLED.js → claude-pair-runtime-Z4DP2IQA.js} +2 -2
- package/dist/lib/manager-worker.js +49 -17
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-2TTEAJDH.js → persistent-session-4MIMM3TN.js} +2 -2
- package/dist/{responsiveness-probe-PMDNQ4J4.js → responsiveness-probe-5SRDBI4B.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-CM7DWCO4.js.map → chunk-V3G7G4QM.js.map} +0 -0
- /package/dist/{claude-pair-runtime-QDNXOLED.js.map → claude-pair-runtime-Z4DP2IQA.js.map} +0 -0
- /package/dist/{persistent-session-2TTEAJDH.js.map → persistent-session-4MIMM3TN.js.map} +0 -0
- /package/dist/{responsiveness-probe-PMDNQ4J4.js.map → responsiveness-probe-5SRDBI4B.js.map} +0 -0
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveConnectivityProbe,
|
|
30
30
|
worseConnectivityOutcome,
|
|
31
31
|
wrapScheduledTaskPrompt
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-R6GVWACQ.js";
|
|
33
33
|
import {
|
|
34
34
|
parsePsRows
|
|
35
35
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4901,7 +4901,7 @@ function requireHost() {
|
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
4903
|
// src/lib/api-client.ts
|
|
4904
|
-
var agtCliVersion = true ? "0.28.
|
|
4904
|
+
var agtCliVersion = true ? "0.28.440" : "dev";
|
|
4905
4905
|
var lastConfigHash = null;
|
|
4906
4906
|
function setConfigHash(hash) {
|
|
4907
4907
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7402,4 +7402,4 @@ export {
|
|
|
7402
7402
|
managerInstallSystemUnitCommand,
|
|
7403
7403
|
managerUninstallSystemUnitCommand
|
|
7404
7404
|
};
|
|
7405
|
-
//# sourceMappingURL=chunk-
|
|
7405
|
+
//# sourceMappingURL=chunk-V3G7G4QM.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-4MIMM3TN.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-Z4DP2IQA.js.map
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveEffectivePinRaw,
|
|
43
43
|
safeWriteJsonAtomic,
|
|
44
44
|
setConfigHash
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-V3G7G4QM.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir as getProjectDir2,
|
|
48
48
|
getReadyTasks,
|
|
@@ -129,6 +129,7 @@ import {
|
|
|
129
129
|
readOpencodePaneLogTail,
|
|
130
130
|
readPaneLogTail,
|
|
131
131
|
readProvisionedOpencodeModel,
|
|
132
|
+
readUsageLimitUntil,
|
|
132
133
|
reloadEgressSidecar,
|
|
133
134
|
resetRestartCount,
|
|
134
135
|
resolveAgentTimezone,
|
|
@@ -142,6 +143,7 @@ import {
|
|
|
142
143
|
sessionTranscriptDir,
|
|
143
144
|
sha256,
|
|
144
145
|
sharedBusyBuckets,
|
|
146
|
+
shouldLogUsageCapDeferral,
|
|
145
147
|
startOpencodeSession,
|
|
146
148
|
startPersistentSession,
|
|
147
149
|
stopAllSessionsAndWait,
|
|
@@ -155,7 +157,7 @@ import {
|
|
|
155
157
|
transcriptActivityAgeSeconds,
|
|
156
158
|
writeEgressAllowlist,
|
|
157
159
|
writeUsageLimitMarker
|
|
158
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-R6GVWACQ.js";
|
|
159
161
|
import {
|
|
160
162
|
reapOrphanChannelMcps
|
|
161
163
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -5908,6 +5910,15 @@ async function syncAndCheckClaudeScheduler(agent, tasks, boardItems, refreshData
|
|
|
5908
5910
|
const state7 = claudeSchedulerStates.get(codeName);
|
|
5909
5911
|
const ready = getReadyTasks(state7, inFlightClaudeTasks);
|
|
5910
5912
|
if (ready.length === 0) return;
|
|
5913
|
+
const limitedUntil = readUsageLimitUntil({ codeName });
|
|
5914
|
+
if (limitedUntil) {
|
|
5915
|
+
if (shouldLogUsageCapDeferral("claude-scheduler", codeName, limitedUntil)) {
|
|
5916
|
+
log(
|
|
5917
|
+
`[claude-scheduler] Deferring ${ready.length} ready task(s) for '${codeName}' \u2014 agent is at its Claude usage limit until ${limitedUntil.toISOString()}; schedule NOT advanced, will fire after the limit resets (further deferrals this window are not logged)`
|
|
5918
|
+
);
|
|
5919
|
+
}
|
|
5920
|
+
return;
|
|
5921
|
+
}
|
|
5911
5922
|
for (const task of ready) {
|
|
5912
5923
|
if ((claudeTaskConcurrency.get(codeName) ?? 0) >= MAX_CLAUDE_CONCURRENCY) break;
|
|
5913
5924
|
if (KANBAN_WORK_TEMPLATES.has(task.templateId)) {
|
|
@@ -9756,7 +9767,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9756
9767
|
var lastVersionCheckAt = 0;
|
|
9757
9768
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9758
9769
|
var lastResponsivenessProbeAt = 0;
|
|
9759
|
-
var agtCliVersion = true ? "0.28.
|
|
9770
|
+
var agtCliVersion = true ? "0.28.440" : "dev";
|
|
9760
9771
|
function resolveBrewPath(execFileSync2) {
|
|
9761
9772
|
try {
|
|
9762
9773
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -10914,7 +10925,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
10914
10925
|
if (codeNames.length === 0) return;
|
|
10915
10926
|
void (async () => {
|
|
10916
10927
|
try {
|
|
10917
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10928
|
+
const { collectDiagnostics } = await import("../persistent-session-4MIMM3TN.js");
|
|
10918
10929
|
await api.post("/host/heartbeat", {
|
|
10919
10930
|
host_id: hostId,
|
|
10920
10931
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -11021,7 +11032,7 @@ async function pollCycle() {
|
|
|
11021
11032
|
}
|
|
11022
11033
|
try {
|
|
11023
11034
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
11024
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11035
|
+
const { collectDiagnostics } = await import("../persistent-session-4MIMM3TN.js");
|
|
11025
11036
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
11026
11037
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
|
|
11027
11038
|
let tailscaleHostname;
|
|
@@ -11135,7 +11146,7 @@ async function pollCycle() {
|
|
|
11135
11146
|
collectResponsivenessProbes,
|
|
11136
11147
|
collectPanelessActivityProbes,
|
|
11137
11148
|
getResponsivenessIntervalMs
|
|
11138
|
-
} = await import("../responsiveness-probe-
|
|
11149
|
+
} = await import("../responsiveness-probe-5SRDBI4B.js");
|
|
11139
11150
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
11140
11151
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
11141
11152
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -11199,7 +11210,7 @@ async function pollCycle() {
|
|
|
11199
11210
|
collectResponsivenessProbes,
|
|
11200
11211
|
livePendingInboundOldestAgeSeconds,
|
|
11201
11212
|
parkPendingInbound
|
|
11202
|
-
} = await import("../responsiveness-probe-
|
|
11213
|
+
} = await import("../responsiveness-probe-5SRDBI4B.js");
|
|
11203
11214
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
11204
11215
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
11205
11216
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -13380,12 +13391,21 @@ async function processAgent(agent, agentStates) {
|
|
|
13380
13391
|
);
|
|
13381
13392
|
}
|
|
13382
13393
|
} else if (nudgeAction === "nudge") {
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
agent.
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13394
|
+
const tickLimitedUntil = readUsageLimitUntil({ codeName: agent.code_name });
|
|
13395
|
+
if (tickLimitedUntil) {
|
|
13396
|
+
if (shouldLogUsageCapDeferral("kanban-tick", agent.code_name, tickLimitedUntil)) {
|
|
13397
|
+
log(
|
|
13398
|
+
`[manager-worker] kanban inject skipped for '${agent.code_name}' - agent is at its Claude usage limit until ${tickLimitedUntil.toISOString()} (${allowed.length} actionable card(s) left on the board); further skips this window are not logged`
|
|
13399
|
+
);
|
|
13400
|
+
}
|
|
13401
|
+
} else {
|
|
13402
|
+
void maybeInjectKanbanCheck(
|
|
13403
|
+
agent.code_name,
|
|
13404
|
+
agent.agent_id,
|
|
13405
|
+
allowed.length,
|
|
13406
|
+
kanbanActionableSignature(allowed)
|
|
13407
|
+
);
|
|
13408
|
+
}
|
|
13389
13409
|
} else if (nudgeAction === "close-suppressed") {
|
|
13390
13410
|
closeInjectedRunIfOpen(
|
|
13391
13411
|
agent.code_name,
|
|
@@ -14306,7 +14326,19 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash16("sha256")
|
|
|
14306
14326
|
if (ready.length > 0) {
|
|
14307
14327
|
log(`[persistent-session] ${ready.length} ready task(s) for '${codeName}': ${ready.map((t) => `${t.name}(next=${t.nextFireAt ? new Date(t.nextFireAt).toISOString() : "null"})`).join(", ")}`);
|
|
14308
14328
|
}
|
|
14309
|
-
|
|
14329
|
+
let deferReadyForUsageCap = false;
|
|
14330
|
+
if (ready.length > 0) {
|
|
14331
|
+
const schedLimitedUntil = readUsageLimitUntil({ codeName });
|
|
14332
|
+
if (schedLimitedUntil) {
|
|
14333
|
+
if (shouldLogUsageCapDeferral("persistent-scheduler", codeName, schedLimitedUntil)) {
|
|
14334
|
+
log(
|
|
14335
|
+
`[persistent-session] Deferring ${ready.length} ready task(s) for '${codeName}' \u2014 agent is at its Claude usage limit until ${schedLimitedUntil.toISOString()}; schedule NOT advanced, will fire after the limit resets (further deferrals this window are not logged)`
|
|
14336
|
+
);
|
|
14337
|
+
}
|
|
14338
|
+
deferReadyForUsageCap = true;
|
|
14339
|
+
}
|
|
14340
|
+
}
|
|
14341
|
+
for (const task of deferReadyForUsageCap ? [] : ready) {
|
|
14310
14342
|
if (KANBAN_WORK_TEMPLATES.has(task.templateId)) {
|
|
14311
14343
|
const updated = markTaskFired(codeName, task.taskId, "ok");
|
|
14312
14344
|
claudeSchedulerStates.set(codeName, updated);
|
|
@@ -14517,7 +14549,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14517
14549
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
14518
14550
|
void (async () => {
|
|
14519
14551
|
try {
|
|
14520
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14552
|
+
const { collectDiagnostics } = await import("../persistent-session-4MIMM3TN.js");
|
|
14521
14553
|
await api.post("/host/heartbeat", {
|
|
14522
14554
|
host_id: hostId,
|
|
14523
14555
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -14567,7 +14599,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
14567
14599
|
}
|
|
14568
14600
|
try {
|
|
14569
14601
|
const hostId = await getHostId();
|
|
14570
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14602
|
+
const { collectDiagnostics } = await import("../persistent-session-4MIMM3TN.js");
|
|
14571
14603
|
await api.post("/host/heartbeat", {
|
|
14572
14604
|
host_id: hostId,
|
|
14573
14605
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15020,7 +15052,7 @@ async function processClaudePairSessions(agents) {
|
|
|
15020
15052
|
killPairSession,
|
|
15021
15053
|
pairTmuxSession,
|
|
15022
15054
|
finalizeClaudePairOnboarding
|
|
15023
|
-
} = await import("../claude-pair-runtime-
|
|
15055
|
+
} = await import("../claude-pair-runtime-Z4DP2IQA.js");
|
|
15024
15056
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
15025
15057
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
15026
15058
|
const killed = await killPairSession(pairTmuxSession(pairId));
|