@integrity-labs/agt-cli 0.28.12 → 0.28.13-canary.19
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/bin/agt.js.map +1 -1
- 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-27VZ6HII.js → chunk-JMA55LBY.js} +2 -2
- package/dist/{claude-pair-runtime-AVIWH62D.js → claude-pair-runtime-VQWI5YXW.js} +2 -2
- package/dist/lib/manager-worker.js +438 -426
- package/dist/lib/manager-worker.js.map +1 -1
- 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-27VZ6HII.js.map → chunk-JMA55LBY.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
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
|