@integrity-labs/agt-cli 0.28.185 → 0.28.186
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.
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-3UMHVNGB.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -6602,7 +6602,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6602
6602
|
var lastVersionCheckAt = 0;
|
|
6603
6603
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6604
6604
|
var lastResponsivenessProbeAt = 0;
|
|
6605
|
-
var agtCliVersion = true ? "0.28.
|
|
6605
|
+
var agtCliVersion = true ? "0.28.186" : "dev";
|
|
6606
6606
|
function resolveBrewPath(execFileSync4) {
|
|
6607
6607
|
try {
|
|
6608
6608
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
package/dist/mcp/index.js
CHANGED
|
@@ -22389,6 +22389,71 @@ server.tool(
|
|
|
22389
22389
|
return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
|
|
22390
22390
|
}
|
|
22391
22391
|
);
|
|
22392
|
+
server.tool(
|
|
22393
|
+
"request_buttons",
|
|
22394
|
+
'Ask a user to pick ONE option by tapping a button, then END YOUR TURN. Posts a small button card (2-4 choices) into a Slack channel; the platform delivers the tapped choice back to you later as a direct-chat message (payload.kind = "button_click", payload.value / payload.label), carrying source_channel so you reply in the original conversation. Use this for a quick one-of-N decision ("merge it?", "which environment?", "approve copy A/B/C?") when your turn can end rather than block. Buttons only COLLECT a choice; they grant no permission, and any privileged action you take in response runs under your own authority. Slack channels only for now.',
|
|
22395
|
+
{
|
|
22396
|
+
channel_id: external_exports.string().min(1).describe("Slack channel id (C.../G..., NOT a name) to post the buttons into. Resolve names via slack.list_channels first."),
|
|
22397
|
+
thread_ts: external_exports.string().optional().describe("Optional Slack thread_ts to post inside a thread; omit to post top-level in the channel."),
|
|
22398
|
+
prompt_text: external_exports.string().min(1).max(3e3).describe("The question / context shown above the buttons."),
|
|
22399
|
+
options: external_exports.array(
|
|
22400
|
+
external_exports.object({
|
|
22401
|
+
label: external_exports.string().min(1).max(75).describe("Button text the user sees."),
|
|
22402
|
+
value: external_exports.string().min(1).max(2e3).describe("Machine value returned to you on tap (payload.value).")
|
|
22403
|
+
})
|
|
22404
|
+
).min(2).max(4).describe("2-4 button options. Labels and values must each be unique."),
|
|
22405
|
+
request_id: external_exports.string().max(200).optional().describe("Optional correlation id you choose; it comes back on the button_click so you can match the tap. If omitted, the platform assigns one and returns it.")
|
|
22406
|
+
},
|
|
22407
|
+
async (params) => {
|
|
22408
|
+
if (!AGT_AGENT_CODE_NAME) {
|
|
22409
|
+
return {
|
|
22410
|
+
content: [{ type: "text", text: "Error: AGT_AGENT_CODE_NAME not configured." }],
|
|
22411
|
+
isError: true
|
|
22412
|
+
};
|
|
22413
|
+
}
|
|
22414
|
+
let resp;
|
|
22415
|
+
try {
|
|
22416
|
+
resp = await apiPost("/host/request-buttons", {
|
|
22417
|
+
agent_code_name: AGT_AGENT_CODE_NAME,
|
|
22418
|
+
channel_id: params.channel_id,
|
|
22419
|
+
...params.thread_ts ? { thread_ts: params.thread_ts } : {},
|
|
22420
|
+
prompt_text: params.prompt_text,
|
|
22421
|
+
options: params.options,
|
|
22422
|
+
...params.request_id ? { request_id: params.request_id } : {}
|
|
22423
|
+
});
|
|
22424
|
+
} catch (err) {
|
|
22425
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
22426
|
+
if (/returned\s+[45]\d\d/.test(msg)) {
|
|
22427
|
+
let detail = msg;
|
|
22428
|
+
const jsonStart = msg.indexOf("{");
|
|
22429
|
+
if (jsonStart !== -1) {
|
|
22430
|
+
try {
|
|
22431
|
+
const parsedErr = JSON.parse(msg.slice(jsonStart));
|
|
22432
|
+
if (parsedErr.error) detail = parsedErr.error;
|
|
22433
|
+
} catch {
|
|
22434
|
+
}
|
|
22435
|
+
}
|
|
22436
|
+
return {
|
|
22437
|
+
content: [{ type: "text", text: `Buttons request rejected: ${detail}` }],
|
|
22438
|
+
isError: true
|
|
22439
|
+
};
|
|
22440
|
+
}
|
|
22441
|
+
return {
|
|
22442
|
+
content: [{ type: "text", text: `Could not reach the buttons service (${msg}). Tell your operator.` }],
|
|
22443
|
+
isError: true
|
|
22444
|
+
};
|
|
22445
|
+
}
|
|
22446
|
+
const rid = resp.request_id ?? resp.interaction_id ?? "(unknown)";
|
|
22447
|
+
return {
|
|
22448
|
+
content: [
|
|
22449
|
+
{
|
|
22450
|
+
type: "text",
|
|
22451
|
+
text: `Posted ${params.options.length} buttons to ${params.channel_id} (request \`${rid}\`). END YOUR TURN now \u2014 the user's tap arrives later as a direct-chat message (payload.kind = "button_click", payload.value / payload.label) carrying source_channel so you reply in the original conversation. Do not wait or poll.`
|
|
22452
|
+
}
|
|
22453
|
+
]
|
|
22454
|
+
};
|
|
22455
|
+
}
|
|
22456
|
+
);
|
|
22392
22457
|
server.tool(
|
|
22393
22458
|
"drift_report",
|
|
22394
22459
|
"Report configuration drift detected in local agent files (CHARTER.md, TOOLS.md, etc.). Compares local file hashes against API-side versions and reports any differences.",
|
|
@@ -23311,7 +23376,10 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
23311
23376
|
"request_channel_access",
|
|
23312
23377
|
// ENG-7041 (ADR-0034): author + post a structured Slack form, await the typed
|
|
23313
23378
|
// answer via direct-chat. Always registered; no API tool shares this name.
|
|
23314
|
-
"request_form"
|
|
23379
|
+
"request_form",
|
|
23380
|
+
// ENG-7144 (ADR-0036): post a button card, end the turn, await the tap via
|
|
23381
|
+
// direct-chat (button_click). Always registered; no API tool shares this name.
|
|
23382
|
+
"request_buttons"
|
|
23315
23383
|
]);
|
|
23316
23384
|
async function registerForwardedApiTools() {
|
|
23317
23385
|
const apiTools = await discoverApiTools();
|