@integrity-labs/agt-cli 0.27.153 → 0.27.154
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
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
success,
|
|
29
29
|
table,
|
|
30
30
|
warn
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-ELCLXTJI.js";
|
|
32
32
|
import {
|
|
33
33
|
CHANNEL_REGISTRY,
|
|
34
34
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4941,7 +4941,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4941
4941
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4942
4942
|
import chalk18 from "chalk";
|
|
4943
4943
|
import ora16 from "ora";
|
|
4944
|
-
var cliVersion = true ? "0.27.
|
|
4944
|
+
var cliVersion = true ? "0.27.154" : "dev";
|
|
4945
4945
|
async function fetchLatestVersion() {
|
|
4946
4946
|
const host2 = getHost();
|
|
4947
4947
|
if (!host2) return null;
|
|
@@ -5864,7 +5864,7 @@ function handleError(err) {
|
|
|
5864
5864
|
}
|
|
5865
5865
|
|
|
5866
5866
|
// src/bin/agt.ts
|
|
5867
|
-
var cliVersion2 = true ? "0.27.
|
|
5867
|
+
var cliVersion2 = true ? "0.27.154" : "dev";
|
|
5868
5868
|
var program = new Command();
|
|
5869
5869
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
5870
5870
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
provisionStopHook,
|
|
20
20
|
requireHost,
|
|
21
21
|
safeWriteJsonAtomic
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-ELCLXTJI.js";
|
|
23
23
|
import {
|
|
24
24
|
getProjectDir as getProjectDir2,
|
|
25
25
|
getReadyTasks,
|
|
@@ -4914,7 +4914,7 @@ var cachedMaintenanceWindow = null;
|
|
|
4914
4914
|
var lastVersionCheckAt = 0;
|
|
4915
4915
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4916
4916
|
var lastResponsivenessProbeAt = 0;
|
|
4917
|
-
var agtCliVersion = true ? "0.27.
|
|
4917
|
+
var agtCliVersion = true ? "0.27.154" : "dev";
|
|
4918
4918
|
function resolveBrewPath(execFileSync4) {
|
|
4919
4919
|
try {
|
|
4920
4920
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15092,6 +15092,16 @@ function clearOldestSlackPendingMarkerInChannel(dir, channel, clear = defaultCle
|
|
|
15092
15092
|
}
|
|
15093
15093
|
}
|
|
15094
15094
|
|
|
15095
|
+
// src/slack-reply-threading.ts
|
|
15096
|
+
function isSlackDmChannel(channel) {
|
|
15097
|
+
return typeof channel === "string" && channel.startsWith("D");
|
|
15098
|
+
}
|
|
15099
|
+
function resolveReplyThreadTs(input) {
|
|
15100
|
+
if (input.threadTs) return input.threadTs;
|
|
15101
|
+
if (isSlackDmChannel(input.channel)) return void 0;
|
|
15102
|
+
return input.messageTs || void 0;
|
|
15103
|
+
}
|
|
15104
|
+
|
|
15095
15105
|
// src/restart-confirm.ts
|
|
15096
15106
|
import { existsSync as existsSync3, mkdirSync, readFileSync as readFileSync3, renameSync, unlinkSync as unlinkSync2, writeFileSync } from "fs";
|
|
15097
15107
|
import { dirname } from "path";
|
|
@@ -17827,7 +17837,7 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
17827
17837
|
text: { type: "string", description: "The message to send" },
|
|
17828
17838
|
thread_ts: {
|
|
17829
17839
|
type: "string",
|
|
17830
|
-
description: "Thread timestamp for
|
|
17840
|
+
description: "Thread timestamp for an existing thread reply (from the thread_ts attribute). Safe to omit: for a channel message the server automatically threads your reply off the message you are answering (via message_ts), and a DM reply posts inline."
|
|
17831
17841
|
},
|
|
17832
17842
|
// ENG-5861: explicit message_ts so the cleanup gate can match the
|
|
17833
17843
|
// exact pending-inbound marker — necessary because top-level DM
|
|
@@ -18066,17 +18076,22 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18066
18076
|
}
|
|
18067
18077
|
if (name === "slack.reply") {
|
|
18068
18078
|
const { channel, text, thread_ts, message_ts } = args;
|
|
18069
|
-
|
|
18079
|
+
const effectiveThreadTs = resolveReplyThreadTs({
|
|
18080
|
+
channel,
|
|
18081
|
+
threadTs: thread_ts,
|
|
18082
|
+
messageTs: message_ts
|
|
18083
|
+
});
|
|
18084
|
+
if (channel && effectiveThreadTs) {
|
|
18070
18085
|
const killed = await isThreadKilled({
|
|
18071
18086
|
channelType: "slack",
|
|
18072
18087
|
channelId: channel,
|
|
18073
|
-
threadTs:
|
|
18088
|
+
threadTs: effectiveThreadTs,
|
|
18074
18089
|
agtHost: AGT_HOST,
|
|
18075
18090
|
agtApiKey: AGT_API_KEY
|
|
18076
18091
|
});
|
|
18077
18092
|
if (killed) {
|
|
18078
18093
|
process.stderr.write(
|
|
18079
|
-
`slack-channel(${AGENT_CODE_NAME}): reply_killed channel=${redactSlackId(channel)} thread=${redactSlackId(
|
|
18094
|
+
`slack-channel(${AGENT_CODE_NAME}): reply_killed channel=${redactSlackId(channel)} thread=${redactSlackId(effectiveThreadTs)}
|
|
18080
18095
|
`
|
|
18081
18096
|
);
|
|
18082
18097
|
return {
|
|
@@ -18091,7 +18106,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18091
18106
|
}
|
|
18092
18107
|
}
|
|
18093
18108
|
const throttleCfg = configFromEnv();
|
|
18094
|
-
const throttleKey =
|
|
18109
|
+
const throttleKey = effectiveThreadTs ?? channel;
|
|
18095
18110
|
const throttleNow = Date.now();
|
|
18096
18111
|
const throttleDecision = decideReplyThrottle({
|
|
18097
18112
|
recentReplyTimestamps: getRecentReplies(channel, throttleKey, throttleNow, throttleCfg),
|
|
@@ -18103,14 +18118,14 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18103
18118
|
`slack-channel(${AGENT_CODE_NAME}): reply_throttled channel=${redactSlackId(channel)} thread=${redactSlackId(throttleKey)} count=${throttleDecision.recentCount} window_ms=${throttleCfg.windowMs} threshold=${throttleCfg.threshold}
|
|
18104
18119
|
`
|
|
18105
18120
|
);
|
|
18106
|
-
if (channel &&
|
|
18121
|
+
if (channel && effectiveThreadTs) {
|
|
18107
18122
|
fetch("https://slack.com/api/reactions.add", {
|
|
18108
18123
|
method: "POST",
|
|
18109
18124
|
headers: {
|
|
18110
18125
|
"Content-Type": "application/json",
|
|
18111
18126
|
Authorization: `Bearer ${BOT_TOKEN}`
|
|
18112
18127
|
},
|
|
18113
|
-
body: JSON.stringify({ channel, timestamp:
|
|
18128
|
+
body: JSON.stringify({ channel, timestamp: effectiveThreadTs, name: "lock" })
|
|
18114
18129
|
}).catch(() => {
|
|
18115
18130
|
});
|
|
18116
18131
|
}
|
|
@@ -18144,7 +18159,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18144
18159
|
body: JSON.stringify({
|
|
18145
18160
|
channel,
|
|
18146
18161
|
text,
|
|
18147
|
-
...
|
|
18162
|
+
...effectiveThreadTs ? { thread_ts: effectiveThreadTs } : {},
|
|
18148
18163
|
...buildAugmentedSlackMetadata() ? { metadata: buildAugmentedSlackMetadata() } : {}
|
|
18149
18164
|
// ↑ Labels this message as Augmented-agent-originated so peer agents
|
|
18150
18165
|
// enforcing sender_policy=team_agents_only can verify the sender.
|
|
@@ -18160,7 +18175,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18160
18175
|
recordReply(channel, throttleKey, throttleNow, throttleCfg);
|
|
18161
18176
|
recordActivity("reply");
|
|
18162
18177
|
if (THREAD_AUTO_FOLLOW !== "off") {
|
|
18163
|
-
const trackTs =
|
|
18178
|
+
const trackTs = effectiveThreadTs ?? data.ts ?? void 0;
|
|
18164
18179
|
rememberThread(channel, trackTs, thread_ts ? "mentioned" : "started");
|
|
18165
18180
|
}
|
|
18166
18181
|
if (interactiveHostAvailable() && data.ts) {
|
|
@@ -18170,7 +18185,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
18170
18185
|
agentId: AGT_AGENT_ID
|
|
18171
18186
|
};
|
|
18172
18187
|
const tsToRecord = data.ts;
|
|
18173
|
-
const threadTsToRecord =
|
|
18188
|
+
const threadTsToRecord = effectiveThreadTs;
|
|
18174
18189
|
void (async () => {
|
|
18175
18190
|
try {
|
|
18176
18191
|
const runtime = await Promise.resolve().then(() => (init_slack_block_kit_runtime(), slack_block_kit_runtime_exports));
|
package/package.json
CHANGED
|
File without changes
|