@integrity-labs/agt-cli 0.28.15 → 0.28.17
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-7BWFZ7LX.js → chunk-F3RMS762.js} +2 -2
- package/dist/{chunk-CHUL4CPY.js → chunk-FW5TXDQC.js} +11 -1
- package/dist/{chunk-CHUL4CPY.js.map → chunk-FW5TXDQC.js.map} +1 -1
- package/dist/{chunk-5IZQ35DJ.js → chunk-TORLV2SF.js} +2 -2
- package/dist/{claude-pair-runtime-AVIWH62D.js → claude-pair-runtime-VQWI5YXW.js} +2 -2
- package/dist/lib/manager-worker.js +8 -8
- package/dist/mcp/index.js +74 -4
- package/dist/mcp/slack-channel.js +14 -0
- package/dist/{persistent-session-EO6TNQK2.js → persistent-session-MIRJWKG7.js} +3 -3
- package/dist/{responsiveness-probe-SV6QQHRW.js → responsiveness-probe-3G7C4AP4.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-7BWFZ7LX.js.map → chunk-F3RMS762.js.map} +0 -0
- /package/dist/{chunk-5IZQ35DJ.js.map → chunk-TORLV2SF.js.map} +0 -0
- /package/dist/{claude-pair-runtime-AVIWH62D.js.map → claude-pair-runtime-VQWI5YXW.js.map} +0 -0
- /package/dist/{persistent-session-EO6TNQK2.js.map → persistent-session-MIRJWKG7.js.map} +0 -0
- /package/dist/{responsiveness-probe-SV6QQHRW.js.map → responsiveness-probe-3G7C4AP4.js.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
registerFramework,
|
|
15
15
|
resolveAvatarEnvUrl,
|
|
16
16
|
wrapScheduledTaskPrompt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FW5TXDQC.js";
|
|
18
18
|
|
|
19
19
|
// ../../packages/core/dist/integrations/registry.js
|
|
20
20
|
var INTEGRATION_REGISTRY = [
|
|
@@ -8275,4 +8275,4 @@ export {
|
|
|
8275
8275
|
managerInstallSystemUnitCommand,
|
|
8276
8276
|
managerUninstallSystemUnitCommand
|
|
8277
8277
|
};
|
|
8278
|
-
//# sourceMappingURL=chunk-
|
|
8278
|
+
//# sourceMappingURL=chunk-TORLV2SF.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-MIRJWKG7.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-VQWI5YXW.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
provisionStopHook,
|
|
23
23
|
requireHost,
|
|
24
24
|
safeWriteJsonAtomic
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-TORLV2SF.js";
|
|
26
26
|
import {
|
|
27
27
|
getProjectDir as getProjectDir2,
|
|
28
28
|
getReadyTasks,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
takeWatchdogGiveUpCount,
|
|
65
65
|
takeZombieDetection,
|
|
66
66
|
transcriptActivityAgeSeconds
|
|
67
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-F3RMS762.js";
|
|
68
68
|
import {
|
|
69
69
|
FLAGS_SCHEMA_VERSION,
|
|
70
70
|
KANBAN_CHECK_COMMAND,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
sumTranscriptUsageInWindow,
|
|
97
97
|
worseConnectivityOutcome,
|
|
98
98
|
wrapScheduledTaskPrompt
|
|
99
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-FW5TXDQC.js";
|
|
100
100
|
import {
|
|
101
101
|
parsePsRows,
|
|
102
102
|
reapOrphanChannelMcps
|
|
@@ -5266,7 +5266,7 @@ var cachedMaintenanceWindow = null;
|
|
|
5266
5266
|
var lastVersionCheckAt = 0;
|
|
5267
5267
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
5268
5268
|
var lastResponsivenessProbeAt = 0;
|
|
5269
|
-
var agtCliVersion = true ? "0.28.
|
|
5269
|
+
var agtCliVersion = true ? "0.28.17" : "dev";
|
|
5270
5270
|
function resolveBrewPath(execFileSync4) {
|
|
5271
5271
|
try {
|
|
5272
5272
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -6375,7 +6375,7 @@ async function pollCycle() {
|
|
|
6375
6375
|
}
|
|
6376
6376
|
try {
|
|
6377
6377
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
6378
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
6378
|
+
const { collectDiagnostics } = await import("../persistent-session-MIRJWKG7.js");
|
|
6379
6379
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
6380
6380
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
6381
6381
|
let tailscaleHostname;
|
|
@@ -6469,7 +6469,7 @@ async function pollCycle() {
|
|
|
6469
6469
|
const {
|
|
6470
6470
|
collectResponsivenessProbes,
|
|
6471
6471
|
getResponsivenessIntervalMs
|
|
6472
|
-
} = await import("../responsiveness-probe-
|
|
6472
|
+
} = await import("../responsiveness-probe-3G7C4AP4.js");
|
|
6473
6473
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
6474
6474
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
6475
6475
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -6501,7 +6501,7 @@ async function pollCycle() {
|
|
|
6501
6501
|
collectResponsivenessProbes,
|
|
6502
6502
|
livePendingInboundOldestAgeSeconds,
|
|
6503
6503
|
parkPendingInbound
|
|
6504
|
-
} = await import("../responsiveness-probe-
|
|
6504
|
+
} = await import("../responsiveness-probe-3G7C4AP4.js");
|
|
6505
6505
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
6506
6506
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
6507
6507
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -11092,7 +11092,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11092
11092
|
killPairSession,
|
|
11093
11093
|
pairTmuxSession,
|
|
11094
11094
|
finalizeClaudePairOnboarding
|
|
11095
|
-
} = await import("../claude-pair-runtime-
|
|
11095
|
+
} = await import("../claude-pair-runtime-VQWI5YXW.js");
|
|
11096
11096
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11097
11097
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11098
11098
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
package/dist/mcp/index.js
CHANGED
|
@@ -22607,26 +22607,96 @@ if (isSelfRestartEnabled(process.env) && AGT_AGENT_CODE_NAME) {
|
|
|
22607
22607
|
)
|
|
22608
22608
|
},
|
|
22609
22609
|
async (params) => {
|
|
22610
|
+
let resp;
|
|
22610
22611
|
try {
|
|
22611
|
-
|
|
22612
|
+
resp = await apiPost("/host/agents/request-restart", {
|
|
22613
|
+
agent_id: AGT_AGENT_ID,
|
|
22614
|
+
reason: params.reason
|
|
22615
|
+
});
|
|
22612
22616
|
} catch (err) {
|
|
22613
22617
|
return {
|
|
22614
22618
|
content: [
|
|
22615
22619
|
{
|
|
22616
22620
|
type: "text",
|
|
22617
|
-
text: `Could not
|
|
22621
|
+
text: `Could not reach the restart-approval system (${err.message}). I did NOT restart. Tell the operator you may need a restart to reload: ${params.reason}. Do not keep retrying \u2014 a repeated failure here is structural.`
|
|
22622
|
+
}
|
|
22623
|
+
],
|
|
22624
|
+
isError: true
|
|
22625
|
+
};
|
|
22626
|
+
}
|
|
22627
|
+
if (resp.mode === "local") {
|
|
22628
|
+
try {
|
|
22629
|
+
writeAgentRestartFlag(codeName, params.reason, Date.now());
|
|
22630
|
+
} catch (err) {
|
|
22631
|
+
return {
|
|
22632
|
+
content: [
|
|
22633
|
+
{
|
|
22634
|
+
type: "text",
|
|
22635
|
+
text: `Could not queue the restart: ${err.message}. Tell the operator you may be missing: ${params.reason}.`
|
|
22636
|
+
}
|
|
22637
|
+
],
|
|
22638
|
+
isError: true
|
|
22639
|
+
};
|
|
22640
|
+
}
|
|
22641
|
+
return {
|
|
22642
|
+
content: [
|
|
22643
|
+
{
|
|
22644
|
+
type: "text",
|
|
22645
|
+
text: `Restart queued \u2014 your manager will recreate this session shortly to reload: ${params.reason}. You'll come back as a fresh session in ~30s, so finish your current turn. If you do NOT come back able to do the thing, the fault is structural \u2014 tell the operator rather than requesting another restart.`
|
|
22646
|
+
}
|
|
22647
|
+
]
|
|
22648
|
+
};
|
|
22649
|
+
}
|
|
22650
|
+
if (resp.status === "auto_approved") {
|
|
22651
|
+
return {
|
|
22652
|
+
content: [
|
|
22653
|
+
{
|
|
22654
|
+
type: "text",
|
|
22655
|
+
text: `Restarting now \u2014 nothing was in flight, so no approval was needed (your Manager was notified). You'll come back fresh in ~30s to reload: ${params.reason}. Finish your current turn and do not call this again.`
|
|
22656
|
+
}
|
|
22657
|
+
]
|
|
22658
|
+
};
|
|
22659
|
+
}
|
|
22660
|
+
if (resp.status === "duplicate") {
|
|
22661
|
+
return {
|
|
22662
|
+
content: [
|
|
22663
|
+
{
|
|
22664
|
+
type: "text",
|
|
22665
|
+
text: `You already have a restart request pending your Manager's approval. Do nothing and do not ask again \u2014 you'll simply come back as a fresh session if they approve.`
|
|
22666
|
+
}
|
|
22667
|
+
]
|
|
22668
|
+
};
|
|
22669
|
+
}
|
|
22670
|
+
if (resp.status === "rate_limited") {
|
|
22671
|
+
return {
|
|
22672
|
+
content: [
|
|
22673
|
+
{
|
|
22674
|
+
type: "text",
|
|
22675
|
+
text: `You've requested a restart too many times recently, so this was not filed. STOP requesting restarts \u2014 the repeated need is structural. Tell the operator what you are missing: ${params.reason}.`
|
|
22618
22676
|
}
|
|
22619
22677
|
],
|
|
22620
22678
|
isError: true
|
|
22621
22679
|
};
|
|
22622
22680
|
}
|
|
22681
|
+
if (resp.status === "pending") {
|
|
22682
|
+
const work = resp.active_work_summary ? ` (in flight: ${resp.active_work_summary})` : "";
|
|
22683
|
+
return {
|
|
22684
|
+
content: [
|
|
22685
|
+
{
|
|
22686
|
+
type: "text",
|
|
22687
|
+
text: `Your restart needs your Manager's approval because you have work in flight${work}. I've asked them. Do NOTHING about the restart \u2014 keep serving normally. If they approve, you'll simply come back as a fresh session; you do not need to check on this or ask again. If you're still missing ${params.reason} afterwards, the fault is structural \u2014 tell the operator.`
|
|
22688
|
+
}
|
|
22689
|
+
]
|
|
22690
|
+
};
|
|
22691
|
+
}
|
|
22623
22692
|
return {
|
|
22624
22693
|
content: [
|
|
22625
22694
|
{
|
|
22626
22695
|
type: "text",
|
|
22627
|
-
text: `
|
|
22696
|
+
text: `Your restart could not be routed for approval (no Manager approval channel is configured). I did NOT restart. Tell your operator you need a restart to reload: ${params.reason}.`
|
|
22628
22697
|
}
|
|
22629
|
-
]
|
|
22698
|
+
],
|
|
22699
|
+
isError: true
|
|
22630
22700
|
};
|
|
22631
22701
|
}
|
|
22632
22702
|
);
|
|
@@ -14204,6 +14204,12 @@ function decideSlackMessageForward(evt) {
|
|
|
14204
14204
|
}
|
|
14205
14205
|
return { forward: true };
|
|
14206
14206
|
}
|
|
14207
|
+
function isAppMentionEcho(evt, botUserId2) {
|
|
14208
|
+
if (evt.type !== "message") return false;
|
|
14209
|
+
if (!botUserId2) return false;
|
|
14210
|
+
if (evt.channel?.startsWith("D")) return false;
|
|
14211
|
+
return typeof evt.text === "string" && evt.text.includes(`<@${botUserId2}>`);
|
|
14212
|
+
}
|
|
14207
14213
|
function decideSlackEngagement(input) {
|
|
14208
14214
|
const isExplicitMention = input.type === "app_mention" || !!input.botUserId && input.text.includes(`<@${input.botUserId}>`);
|
|
14209
14215
|
return !(input.isAutoFollowed && !isExplicitMention);
|
|
@@ -19545,6 +19551,14 @@ async function connectSocketMode() {
|
|
|
19545
19551
|
const evt = msg.payload.event;
|
|
19546
19552
|
if (evt.user === botUserId) return;
|
|
19547
19553
|
if (evt.type !== "app_mention" && evt.type !== "message") return;
|
|
19554
|
+
if (isAppMentionEcho(evt, botUserId)) {
|
|
19555
|
+
recordChannelDeflection(SLACK_AGENT_DIR, "slack", "duplicate");
|
|
19556
|
+
process.stderr.write(
|
|
19557
|
+
`slack-channel(${AGENT_CODE_NAME}): [channel-duplicate] dropped app_mention echo channel=${redactSlackId(evt.channel)} ts=${redactSlackId(evt.ts)}
|
|
19558
|
+
`
|
|
19559
|
+
);
|
|
19560
|
+
return;
|
|
19561
|
+
}
|
|
19548
19562
|
if (evt.channel && evt.ts && markInboundDelivered("slack", `${evt.channel}:${evt.ts}`)) {
|
|
19549
19563
|
recordChannelDeflection(SLACK_AGENT_DIR, "slack", "duplicate");
|
|
19550
19564
|
process.stderr.write(
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
takeZombieDetection,
|
|
26
26
|
writeDirectChatSessionState,
|
|
27
27
|
writePersistentClaudeWrapper
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-F3RMS762.js";
|
|
29
|
+
import "./chunk-FW5TXDQC.js";
|
|
30
30
|
import "./chunk-XWVM4KPK.js";
|
|
31
31
|
export {
|
|
32
32
|
SEND_KEYS_ENTER_DELAY_MS,
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
writeDirectChatSessionState,
|
|
57
57
|
writePersistentClaudeWrapper
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=persistent-session-
|
|
59
|
+
//# sourceMappingURL=persistent-session-MIRJWKG7.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-F3RMS762.js";
|
|
4
|
+
import "./chunk-FW5TXDQC.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -250,4 +250,4 @@ export {
|
|
|
250
250
|
parkPendingInbound,
|
|
251
251
|
readAndResetChannelDeflections
|
|
252
252
|
};
|
|
253
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
253
|
+
//# sourceMappingURL=responsiveness-probe-3G7C4AP4.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|