@integrity-labs/agt-cli 0.28.737 → 0.28.738
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 +5 -5
- package/dist/{chunk-MV3QBGO4.js → chunk-JDNULCLF.js} +2 -2
- package/dist/{chunk-WB2E236K.js → chunk-MAXKAS4Q.js} +13 -1
- package/dist/chunk-MAXKAS4Q.js.map +1 -0
- package/dist/{chunk-7LRKRRC5.js → chunk-WTAZ5GOS.js} +4 -4
- package/dist/{claude-pair-runtime-57FICYWW.js → claude-pair-runtime-JUGH4TOW.js} +2 -2
- package/dist/lib/manager-worker.js +76 -16
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +12 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/origami.js +12 -0
- package/dist/mcp/slack-channel.js +12 -0
- package/dist/mcp/telegram-channel.js +12 -0
- package/dist/{persistent-session-NE6DCBFD.js → persistent-session-E7TUUVAI.js} +3 -3
- package/dist/{responsiveness-probe-VN4OPV56.js → responsiveness-probe-PXXWLOML.js} +3 -3
- package/dist/{session-auth-dead-TI6JWW4G.js → session-auth-dead-HZZJK37X.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WB2E236K.js.map +0 -1
- /package/dist/{chunk-MV3QBGO4.js.map → chunk-JDNULCLF.js.map} +0 -0
- /package/dist/{chunk-7LRKRRC5.js.map → chunk-WTAZ5GOS.js.map} +0 -0
- /package/dist/{claude-pair-runtime-57FICYWW.js.map → claude-pair-runtime-JUGH4TOW.js.map} +0 -0
- /package/dist/{persistent-session-NE6DCBFD.js.map → persistent-session-E7TUUVAI.js.map} +0 -0
- /package/dist/{responsiveness-probe-VN4OPV56.js.map → responsiveness-probe-PXXWLOML.js.map} +0 -0
- /package/dist/{session-auth-dead-TI6JWW4G.js.map → session-auth-dead-HZZJK37X.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
parseEnvFileEntries,
|
|
14
14
|
parseEnvIntegrations,
|
|
15
15
|
shellQuote
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JDNULCLF.js";
|
|
17
17
|
import {
|
|
18
18
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
19
19
|
INTEGRATIONS_SECTION_END,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
sessionTranscriptDir,
|
|
63
63
|
worseConnectivityOutcome,
|
|
64
64
|
wrapScheduledTaskPrompt
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-MAXKAS4Q.js";
|
|
66
66
|
import {
|
|
67
67
|
parsePsRows
|
|
68
68
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6427,7 +6427,7 @@ function exchangeFailureKind(err) {
|
|
|
6427
6427
|
}
|
|
6428
6428
|
|
|
6429
6429
|
// src/lib/api-client.ts
|
|
6430
|
-
var agtCliVersion = true ? "0.28.
|
|
6430
|
+
var agtCliVersion = true ? "0.28.738" : "dev";
|
|
6431
6431
|
var lastConfigHash = null;
|
|
6432
6432
|
function setConfigHash(hash) {
|
|
6433
6433
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10473,4 +10473,4 @@ export {
|
|
|
10473
10473
|
managerInstallSystemUnitCommand,
|
|
10474
10474
|
managerUninstallSystemUnitCommand
|
|
10475
10475
|
};
|
|
10476
|
-
//# sourceMappingURL=chunk-
|
|
10476
|
+
//# sourceMappingURL=chunk-WTAZ5GOS.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-E7TUUVAI.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-JUGH4TOW.js.map
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
safeWriteJsonAtomic,
|
|
58
58
|
setConfigHash,
|
|
59
59
|
tripClass
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-WTAZ5GOS.js";
|
|
61
61
|
import {
|
|
62
62
|
getProjectDir as getProjectDir2,
|
|
63
63
|
getReadyTasks,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
takeZombieDetection,
|
|
119
119
|
toOpencodeModel,
|
|
120
120
|
writeEgressAllowlist
|
|
121
|
-
} from "../chunk-
|
|
121
|
+
} from "../chunk-JDNULCLF.js";
|
|
122
122
|
import {
|
|
123
123
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
124
124
|
AnchorSessionClient,
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
subagentActivityAgeSeconds,
|
|
204
204
|
sumTranscriptUsageInWindow,
|
|
205
205
|
transcriptActivityAgeSeconds
|
|
206
|
-
} from "../chunk-
|
|
206
|
+
} from "../chunk-MAXKAS4Q.js";
|
|
207
207
|
import {
|
|
208
208
|
reapOrphanChannelMcps
|
|
209
209
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -5597,6 +5597,58 @@ function createTickBoardFetcher(fetchBoard) {
|
|
|
5597
5597
|
};
|
|
5598
5598
|
}
|
|
5599
5599
|
|
|
5600
|
+
// src/lib/kanban-board-token.ts
|
|
5601
|
+
var BoardTokenCache = class {
|
|
5602
|
+
entries = /* @__PURE__ */ new Map();
|
|
5603
|
+
/** The token to send as `known_token`, or undefined when we hold no board. */
|
|
5604
|
+
tokenFor(agentId) {
|
|
5605
|
+
return this.entries.get(agentId)?.token;
|
|
5606
|
+
}
|
|
5607
|
+
/**
|
|
5608
|
+
* Resolve a response into rows.
|
|
5609
|
+
*
|
|
5610
|
+
* Returns `null` when the server said `unchanged` but we hold nothing for
|
|
5611
|
+
* this agent — which should be impossible (we only send a token we have) but
|
|
5612
|
+
* is reachable across a teardown/re-add race, and the caller must re-fetch
|
|
5613
|
+
* rather than silently serve an empty board. An empty board is not a harmless
|
|
5614
|
+
* default here: section 12 writes whatever it is handed into `notifyBoardCache`
|
|
5615
|
+
* as this tick's truth, so seeding "nothing is done" over a board that has
|
|
5616
|
+
* done cards makes the NEXT tick report every one of them as newly done — a
|
|
5617
|
+
* burst of false completion notifications to real users.
|
|
5618
|
+
*/
|
|
5619
|
+
resolve(agentId, res) {
|
|
5620
|
+
if (res.unchanged === true) {
|
|
5621
|
+
const held = this.entries.get(agentId);
|
|
5622
|
+
if (!held) return null;
|
|
5623
|
+
if (typeof res.board_token === "string" && res.board_token.length > 0) {
|
|
5624
|
+
this.entries.set(agentId, { token: res.board_token, rows: held.rows });
|
|
5625
|
+
}
|
|
5626
|
+
return held.rows;
|
|
5627
|
+
}
|
|
5628
|
+
const rows = res.items ?? [];
|
|
5629
|
+
if (typeof res.board_token === "string" && res.board_token.length > 0) {
|
|
5630
|
+
this.entries.set(agentId, { token: res.board_token, rows });
|
|
5631
|
+
} else {
|
|
5632
|
+
this.entries.delete(agentId);
|
|
5633
|
+
}
|
|
5634
|
+
return rows;
|
|
5635
|
+
}
|
|
5636
|
+
/**
|
|
5637
|
+
* Drop an agent's board. Teardown must call this: a board left behind is
|
|
5638
|
+
* served to the agent if it is later RE-ADDED, which is exactly when its work
|
|
5639
|
+
* is most likely to have moved on. Same argument as ENG-9585's
|
|
5640
|
+
* `lastRefreshPayload` purge, and the same reason it is registered in
|
|
5641
|
+
* `clearAgentCaches` rather than deleted ad hoc at each call site.
|
|
5642
|
+
*/
|
|
5643
|
+
forget(agentId) {
|
|
5644
|
+
this.entries.delete(agentId);
|
|
5645
|
+
}
|
|
5646
|
+
/** Test/diagnostic only. */
|
|
5647
|
+
size() {
|
|
5648
|
+
return this.entries.size;
|
|
5649
|
+
}
|
|
5650
|
+
};
|
|
5651
|
+
|
|
5600
5652
|
// src/lib/refresh-manifest-flags.ts
|
|
5601
5653
|
var REFRESH_MANIFEST_FLAGS = {
|
|
5602
5654
|
/** Knowledge as slug + hash instead of inline bodies. */
|
|
@@ -12430,7 +12482,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12430
12482
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12431
12483
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12432
12484
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12433
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12485
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-PXXWLOML.js");
|
|
12434
12486
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12435
12487
|
if (newest === null) return null;
|
|
12436
12488
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13044,6 +13096,7 @@ function clearAgentCaches(agentId, codeName) {
|
|
|
13044
13096
|
const channelCacheMutated = clearAgentState(agentId, codeName);
|
|
13045
13097
|
agentChannelTokens.delete(codeName);
|
|
13046
13098
|
lastRefreshPayload.delete(agentId);
|
|
13099
|
+
boardTokenCache.forget(agentId);
|
|
13047
13100
|
refreshFetchGate.forget(agentId);
|
|
13048
13101
|
memoriesFetchGate.forget(agentId);
|
|
13049
13102
|
forgetRealtimeRebindState(agentId);
|
|
@@ -13081,7 +13134,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13081
13134
|
var lastVersionCheckAt = 0;
|
|
13082
13135
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13083
13136
|
var lastResponsivenessProbeAt = 0;
|
|
13084
|
-
var agtCliVersion = true ? "0.28.
|
|
13137
|
+
var agtCliVersion = true ? "0.28.738" : "dev";
|
|
13085
13138
|
function resolveBrewPath(execFileSync3) {
|
|
13086
13139
|
try {
|
|
13087
13140
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -14620,7 +14673,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
14620
14673
|
if (codeNames.length === 0) return;
|
|
14621
14674
|
void (async () => {
|
|
14622
14675
|
try {
|
|
14623
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14676
|
+
const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
|
|
14624
14677
|
await api.post("/host/heartbeat", {
|
|
14625
14678
|
host_id: hostId,
|
|
14626
14679
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -14761,7 +14814,7 @@ async function pollCycleInner() {
|
|
|
14761
14814
|
}
|
|
14762
14815
|
try {
|
|
14763
14816
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
14764
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14817
|
+
const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
|
|
14765
14818
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
14766
14819
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
14767
14820
|
let tailscaleHostname;
|
|
@@ -14930,7 +14983,7 @@ async function pollCycleInner() {
|
|
|
14930
14983
|
collectPanelessActivityProbes,
|
|
14931
14984
|
getResponsivenessIntervalMs,
|
|
14932
14985
|
occupancyQualificationClassifications
|
|
14933
|
-
} = await import("../responsiveness-probe-
|
|
14986
|
+
} = await import("../responsiveness-probe-PXXWLOML.js");
|
|
14934
14987
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
14935
14988
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
14936
14989
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15040,7 +15093,7 @@ async function pollCycleInner() {
|
|
|
15040
15093
|
collectResponsivenessProbes,
|
|
15041
15094
|
livePendingInboundOldestAgeSeconds,
|
|
15042
15095
|
parkPendingInbound
|
|
15043
|
-
} = await import("../responsiveness-probe-
|
|
15096
|
+
} = await import("../responsiveness-probe-PXXWLOML.js");
|
|
15044
15097
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15045
15098
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15046
15099
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15196,7 +15249,7 @@ async function pollCycleInner() {
|
|
|
15196
15249
|
}
|
|
15197
15250
|
try {
|
|
15198
15251
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15199
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15252
|
+
const { probeSessionAuth } = await import("../session-auth-dead-HZZJK37X.js");
|
|
15200
15253
|
const observations = [];
|
|
15201
15254
|
const pendingCacheCommits = [];
|
|
15202
15255
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -17580,7 +17633,8 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17580
17633
|
}
|
|
17581
17634
|
}
|
|
17582
17635
|
const fetchTickBoard = createTickBoardFetcher(async () => {
|
|
17583
|
-
const
|
|
17636
|
+
const knownToken = boardTokenCache.tokenFor(agent.agent_id);
|
|
17637
|
+
const post = (token) => api.post("/host/my-kanban", {
|
|
17584
17638
|
agent_id: agent.agent_id,
|
|
17585
17639
|
// ENG-9585: this is the ONLY caller that polls (every ~10s, per agent),
|
|
17586
17640
|
// and it reads exactly `BoardItem`. `description` and `notes` are 57.8%
|
|
@@ -17588,9 +17642,14 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17588
17642
|
// tool and `agt kanban` DO read them, so the route cannot simply drop
|
|
17589
17643
|
// them. Asking for the lean shape is this caller saying what it needs;
|
|
17590
17644
|
// every other caller keeps the full payload by default.
|
|
17591
|
-
detail: "board"
|
|
17645
|
+
detail: "board",
|
|
17646
|
+
...token ? { known_token: token } : {}
|
|
17592
17647
|
});
|
|
17593
|
-
|
|
17648
|
+
let rows = boardTokenCache.resolve(agent.agent_id, await post(knownToken));
|
|
17649
|
+
if (rows === null) {
|
|
17650
|
+
rows = boardTokenCache.resolve(agent.agent_id, await post(void 0)) ?? [];
|
|
17651
|
+
}
|
|
17652
|
+
return rows.map(sanitizeBoardItem);
|
|
17594
17653
|
});
|
|
17595
17654
|
let boardItems = [];
|
|
17596
17655
|
let boardItemsStale = false;
|
|
@@ -19150,7 +19209,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19150
19209
|
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}`));
|
|
19151
19210
|
void (async () => {
|
|
19152
19211
|
try {
|
|
19153
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19212
|
+
const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
|
|
19154
19213
|
await api.post("/host/heartbeat", {
|
|
19155
19214
|
host_id: hostId,
|
|
19156
19215
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19196,7 +19255,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19196
19255
|
}
|
|
19197
19256
|
try {
|
|
19198
19257
|
const hostId = await getHostId();
|
|
19199
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19258
|
+
const { collectDiagnostics } = await import("../persistent-session-E7TUUVAI.js");
|
|
19200
19259
|
await api.post("/host/heartbeat", {
|
|
19201
19260
|
host_id: hostId,
|
|
19202
19261
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19813,6 +19872,7 @@ async function maybeInjectKanbanCheck(codeName, agentId, actionableCount, signat
|
|
|
19813
19872
|
var lastHarvestAt = /* @__PURE__ */ new Map();
|
|
19814
19873
|
var HARVEST_INTERVAL_MS = 3 * 60 * 1e3;
|
|
19815
19874
|
var kanbanBoardCache = /* @__PURE__ */ new Map();
|
|
19875
|
+
var boardTokenCache = new BoardTokenCache();
|
|
19816
19876
|
var notifyBoardCache = /* @__PURE__ */ new Map();
|
|
19817
19877
|
var notifiedWaitingHumanIds = /* @__PURE__ */ new Map();
|
|
19818
19878
|
var spawnedPairIds = /* @__PURE__ */ new Set();
|
|
@@ -19831,7 +19891,7 @@ async function processClaudePairSessions(agents) {
|
|
|
19831
19891
|
killPairSession,
|
|
19832
19892
|
pairTmuxSession,
|
|
19833
19893
|
finalizeClaudePairOnboarding
|
|
19834
|
-
} = await import("../claude-pair-runtime-
|
|
19894
|
+
} = await import("../claude-pair-runtime-JUGH4TOW.js");
|
|
19835
19895
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
19836
19896
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
19837
19897
|
const killed = await killPairSession(pairTmuxSession(pairId));
|