@integrity-labs/agt-cli 0.27.0 → 0.27.2
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 +305 -83
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-YWXPSVI5.js → chunk-5N3JKXMU.js} +5 -4
- package/dist/chunk-5N3JKXMU.js.map +1 -0
- package/dist/{chunk-LJZK5RL3.js → chunk-CSDKWI5V.js} +92 -11
- package/dist/chunk-CSDKWI5V.js.map +1 -0
- package/dist/{chunk-BKLEFKUZ.js → chunk-JTZZ6YB2.js} +38 -1
- package/dist/chunk-JTZZ6YB2.js.map +1 -0
- package/dist/{claude-pair-runtime-3UQKYKMO.js → claude-pair-runtime-O6ZAT7MQ.js} +2 -2
- package/dist/lib/manager-worker.js +33 -17
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/index.js +40 -1
- package/dist/mcp/slack-channel.js +57 -3
- package/dist/{persistent-session-SE3E72ET.js → persistent-session-3MXZBC5W.js} +3 -3
- package/dist/{responsiveness-probe-MTMEIXEL.js → responsiveness-probe-37336LTO.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-BKLEFKUZ.js.map +0 -1
- package/dist/chunk-LJZK5RL3.js.map +0 -1
- package/dist/chunk-YWXPSVI5.js.map +0 -1
- /package/dist/{claude-pair-runtime-3UQKYKMO.js.map → claude-pair-runtime-O6ZAT7MQ.js.map} +0 -0
- /package/dist/{persistent-session-SE3E72ET.js.map → persistent-session-3MXZBC5W.js.map} +0 -0
- /package/dist/{responsiveness-probe-MTMEIXEL.js.map → responsiveness-probe-37336LTO.js.map} +0 -0
package/dist/mcp/index.js
CHANGED
|
@@ -21228,7 +21228,7 @@ server.tool(
|
|
|
21228
21228
|
]
|
|
21229
21229
|
});
|
|
21230
21230
|
const first = data.added_items?.[0];
|
|
21231
|
-
const text = !data.ok ? "Failed to add item." : first ? `Added "${first.title}" to board (status: ${params.status ?? "today"}, id: ${first.id})
|
|
21231
|
+
const text = !data.ok ? "Failed to add item." : first ? `Added "${first.title}" to board (status: ${params.status ?? "today"}, id: ${first.id}).` : `Added "${params.title}" to board (status: ${params.status ?? "today"}).`;
|
|
21232
21232
|
return {
|
|
21233
21233
|
content: [{ type: "text", text }]
|
|
21234
21234
|
};
|
|
@@ -21323,6 +21323,44 @@ server.tool(
|
|
|
21323
21323
|
};
|
|
21324
21324
|
}
|
|
21325
21325
|
);
|
|
21326
|
+
server.tool(
|
|
21327
|
+
"kanban.progress",
|
|
21328
|
+
"Report what you're doing RIGHT NOW on a kanban item. Overwrites a single live status line (the Step row on the Slack progress card the requester is watching) \u2014 not a log. Call it at the start of each phase of a long task (ideally ~every minute) so the requester can watch the work move. Each call also renews the task heartbeat. Pass an empty step to clear it.",
|
|
21329
|
+
{
|
|
21330
|
+
id: external_exports.string().optional().describe("Item UUID (preferred)"),
|
|
21331
|
+
title: external_exports.string().optional().describe("Item title (exact match if no id)"),
|
|
21332
|
+
step: external_exports.string().describe(
|
|
21333
|
+
'One short line describing what you are doing right now (e.g. "Drafting the reply", "Running tests"). Overwrites the previous step. Empty string clears it.'
|
|
21334
|
+
)
|
|
21335
|
+
},
|
|
21336
|
+
async (params) => {
|
|
21337
|
+
if (!params.id && !params.title) {
|
|
21338
|
+
return {
|
|
21339
|
+
content: [{ type: "text", text: "Error: provide either id or title." }],
|
|
21340
|
+
isError: true
|
|
21341
|
+
};
|
|
21342
|
+
}
|
|
21343
|
+
const data = await apiPost("/host/kanban", {
|
|
21344
|
+
agent_id: AGT_AGENT_ID,
|
|
21345
|
+
update: [
|
|
21346
|
+
{
|
|
21347
|
+
id: params.id,
|
|
21348
|
+
title: params.title,
|
|
21349
|
+
step: params.step
|
|
21350
|
+
}
|
|
21351
|
+
]
|
|
21352
|
+
});
|
|
21353
|
+
const label = params.id ?? params.title;
|
|
21354
|
+
return {
|
|
21355
|
+
content: [
|
|
21356
|
+
{
|
|
21357
|
+
type: "text",
|
|
21358
|
+
text: data.updated > 0 ? params.step.trim().length > 0 ? `Progress on "${label}": ${params.step}` : `Cleared progress step on "${label}".` : `Item "${label}" not found.`
|
|
21359
|
+
}
|
|
21360
|
+
]
|
|
21361
|
+
};
|
|
21362
|
+
}
|
|
21363
|
+
);
|
|
21326
21364
|
server.tool(
|
|
21327
21365
|
"kanban.done",
|
|
21328
21366
|
"Mark a kanban item as done with an optional result.",
|
|
@@ -22248,6 +22286,7 @@ async function registerForwardedApiTools() {
|
|
|
22248
22286
|
"kanban.add",
|
|
22249
22287
|
"kanban.move",
|
|
22250
22288
|
"kanban.update",
|
|
22289
|
+
"kanban.progress",
|
|
22251
22290
|
"kanban.done",
|
|
22252
22291
|
"status.standup",
|
|
22253
22292
|
"status.update",
|
|
@@ -14230,6 +14230,24 @@ function decideSlackEngagement(input) {
|
|
|
14230
14230
|
function decideSlackAckReaction(input) {
|
|
14231
14231
|
return Boolean(input.channel && input.ts);
|
|
14232
14232
|
}
|
|
14233
|
+
function extractAugmentedSlackLabel(evt) {
|
|
14234
|
+
if (evt.metadata?.event_type !== "augmented_agent_message") return null;
|
|
14235
|
+
return {
|
|
14236
|
+
teamId: evt.metadata.event_payload?.["augmented_team_id"],
|
|
14237
|
+
agentId: evt.metadata.event_payload?.["augmented_agent_id"]
|
|
14238
|
+
};
|
|
14239
|
+
}
|
|
14240
|
+
function decideSenderPolicyForward(evt, policy) {
|
|
14241
|
+
if (policy.mode === "all") return { forward: true };
|
|
14242
|
+
const label = extractAugmentedSlackLabel(evt);
|
|
14243
|
+
if (!label) return { forward: false, reason: "sender_policy" };
|
|
14244
|
+
if (policy.mode === "team_agents_only") {
|
|
14245
|
+
if (!policy.teamId || label.teamId !== policy.teamId) {
|
|
14246
|
+
return { forward: false, reason: "sender_policy" };
|
|
14247
|
+
}
|
|
14248
|
+
}
|
|
14249
|
+
return { forward: true };
|
|
14250
|
+
}
|
|
14233
14251
|
|
|
14234
14252
|
// src/slack-loop-throttle.ts
|
|
14235
14253
|
var DEFAULT_THROTTLE = {
|
|
@@ -15752,6 +15770,19 @@ var AGENT_CODE_NAME = process.env.AGT_AGENT_CODE_NAME ?? null;
|
|
|
15752
15770
|
var AGT_HOST = process.env.AGT_HOST ?? null;
|
|
15753
15771
|
var AGT_API_KEY = process.env.AGT_API_KEY ?? null;
|
|
15754
15772
|
var AGT_AGENT_ID = process.env.AGT_AGENT_ID ?? null;
|
|
15773
|
+
var AGT_TEAM_ID = process.env.AGT_TEAM_ID ?? null;
|
|
15774
|
+
var SLACK_SENDER_POLICY = (() => {
|
|
15775
|
+
const raw = (process.env.SLACK_SENDER_POLICY ?? "all").trim().toLowerCase();
|
|
15776
|
+
if (raw === "all") return { mode: "all" };
|
|
15777
|
+
if (raw === "agents_only") return { mode: "agents_only" };
|
|
15778
|
+
if (raw === "team_agents_only") {
|
|
15779
|
+
if (!AGT_TEAM_ID) {
|
|
15780
|
+
throw new Error("SLACK_SENDER_POLICY=team_agents_only requires AGT_TEAM_ID");
|
|
15781
|
+
}
|
|
15782
|
+
return { mode: "team_agents_only", teamId: AGT_TEAM_ID };
|
|
15783
|
+
}
|
|
15784
|
+
throw new Error(`Invalid SLACK_SENDER_POLICY=${JSON.stringify(process.env.SLACK_SENDER_POLICY)}`);
|
|
15785
|
+
})();
|
|
15755
15786
|
var BLOCK_KIT_ENABLED = process.env.SLACK_BLOCK_KIT_ENABLED === "true";
|
|
15756
15787
|
var BLOCK_KIT_ASK_USER_ENABLED = process.env.SLACK_BLOCK_KIT_ASK_USER_ENABLED === "true";
|
|
15757
15788
|
var BLOCK_KIT_DISABLED = process.env.SLACK_BLOCK_KIT_DISABLED === "true";
|
|
@@ -16125,6 +16156,16 @@ function noteThreadActivityByMessageTs(channel, messageTs) {
|
|
|
16125
16156
|
}
|
|
16126
16157
|
}
|
|
16127
16158
|
var RESTART_FLAGS_DIR = join3(homedir2(), ".augmented", "restart-flags");
|
|
16159
|
+
function buildAugmentedSlackMetadata() {
|
|
16160
|
+
if (!AGT_TEAM_ID) return void 0;
|
|
16161
|
+
return {
|
|
16162
|
+
event_type: "augmented_agent_message",
|
|
16163
|
+
event_payload: {
|
|
16164
|
+
augmented_team_id: AGT_TEAM_ID,
|
|
16165
|
+
...AGT_AGENT_ID ? { augmented_agent_id: AGT_AGENT_ID } : {}
|
|
16166
|
+
}
|
|
16167
|
+
};
|
|
16168
|
+
}
|
|
16128
16169
|
function hashChannelId(id) {
|
|
16129
16170
|
return createHash("sha256").update(id).digest("hex").slice(0, 8);
|
|
16130
16171
|
}
|
|
@@ -16132,6 +16173,8 @@ function hashId(id) {
|
|
|
16132
16173
|
return createHash("sha256").update(id).digest("hex").slice(0, 8);
|
|
16133
16174
|
}
|
|
16134
16175
|
async function postSlackMessage(body) {
|
|
16176
|
+
const augmentedMeta = buildAugmentedSlackMetadata();
|
|
16177
|
+
const bodyWithLabel = augmentedMeta ? { ...body, metadata: augmentedMeta } : body;
|
|
16135
16178
|
try {
|
|
16136
16179
|
const res = await fetch("https://slack.com/api/chat.postMessage", {
|
|
16137
16180
|
method: "POST",
|
|
@@ -16139,7 +16182,7 @@ async function postSlackMessage(body) {
|
|
|
16139
16182
|
"Content-Type": "application/json; charset=utf-8",
|
|
16140
16183
|
Authorization: `Bearer ${BOT_TOKEN}`
|
|
16141
16184
|
},
|
|
16142
|
-
body: JSON.stringify(
|
|
16185
|
+
body: JSON.stringify(bodyWithLabel),
|
|
16143
16186
|
// Hard deadline so a hung Slack API can't stall the live Socket Mode
|
|
16144
16187
|
// event loop or the manager's restart ack path. Matches the timeout
|
|
16145
16188
|
// used elsewhere in this file for chat.postMessage.
|
|
@@ -16941,7 +16984,10 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
16941
16984
|
body: JSON.stringify({
|
|
16942
16985
|
channel,
|
|
16943
16986
|
text,
|
|
16944
|
-
...thread_ts ? { thread_ts } : {}
|
|
16987
|
+
...thread_ts ? { thread_ts } : {},
|
|
16988
|
+
...buildAugmentedSlackMetadata() ? { metadata: buildAugmentedSlackMetadata() } : {}
|
|
16989
|
+
// ↑ Labels this message as Augmented-agent-originated so peer agents
|
|
16990
|
+
// enforcing sender_policy=team_agents_only can verify the sender.
|
|
16945
16991
|
})
|
|
16946
16992
|
});
|
|
16947
16993
|
const data = await res.json();
|
|
@@ -17365,6 +17411,8 @@ function forwardingHostAvailable() {
|
|
|
17365
17411
|
return Boolean(AGT_HOST && AGT_API_KEY && AGT_AGENT_ID);
|
|
17366
17412
|
}
|
|
17367
17413
|
async function postSlackMessageWithTs(payload) {
|
|
17414
|
+
const augmentedMeta = buildAugmentedSlackMetadata();
|
|
17415
|
+
const payloadWithLabel = augmentedMeta ? { ...payload, metadata: augmentedMeta } : payload;
|
|
17368
17416
|
try {
|
|
17369
17417
|
const res = await fetch("https://slack.com/api/chat.postMessage", {
|
|
17370
17418
|
method: "POST",
|
|
@@ -17372,7 +17420,7 @@ async function postSlackMessageWithTs(payload) {
|
|
|
17372
17420
|
"Content-Type": "application/json; charset=utf-8",
|
|
17373
17421
|
Authorization: `Bearer ${BOT_TOKEN}`
|
|
17374
17422
|
},
|
|
17375
|
-
body: JSON.stringify(
|
|
17423
|
+
body: JSON.stringify(payloadWithLabel),
|
|
17376
17424
|
signal: AbortSignal.timeout(SLACK_DOWNLOAD_TIMEOUT_MS)
|
|
17377
17425
|
});
|
|
17378
17426
|
const data = await res.json();
|
|
@@ -17996,6 +18044,12 @@ async function connectSocketMode() {
|
|
|
17996
18044
|
const filterDecision = decideSlackMessageForward(evt);
|
|
17997
18045
|
if (!filterDecision.forward) {
|
|
17998
18046
|
process.stderr.write(`slack-channel: dropped message event (reason=${filterDecision.reason}, subtype=${evt.subtype ?? "none"}, ts=${evt.ts ?? "n/a"})
|
|
18047
|
+
`);
|
|
18048
|
+
return;
|
|
18049
|
+
}
|
|
18050
|
+
const senderPolicyDecision = decideSenderPolicyForward(evt, SLACK_SENDER_POLICY);
|
|
18051
|
+
if (!senderPolicyDecision.forward) {
|
|
18052
|
+
process.stderr.write(`slack-channel: dropped message event (reason=sender_policy, mode=${SLACK_SENDER_POLICY.mode}, ts=${evt.ts ?? "n/a"})
|
|
17999
18053
|
`);
|
|
18000
18054
|
return;
|
|
18001
18055
|
}
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
stopPersistentSession,
|
|
21
21
|
takeZombieDetection,
|
|
22
22
|
writePersistentClaudeWrapper
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-CSDKWI5V.js";
|
|
24
|
+
import "./chunk-JTZZ6YB2.js";
|
|
25
25
|
import "./chunk-XWVM4KPK.js";
|
|
26
26
|
export {
|
|
27
27
|
_internals,
|
|
@@ -46,4 +46,4 @@ export {
|
|
|
46
46
|
takeZombieDetection,
|
|
47
47
|
writePersistentClaudeWrapper
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=persistent-session-
|
|
49
|
+
//# sourceMappingURL=persistent-session-3MXZBC5W.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CSDKWI5V.js";
|
|
4
|
+
import "./chunk-JTZZ6YB2.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
collectResponsivenessProbes,
|
|
31
31
|
getResponsivenessIntervalMs
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
33
|
+
//# sourceMappingURL=responsiveness-probe-37336LTO.js.map
|