@integrity-labs/agt-cli 0.28.818 → 0.28.820
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 +3 -3
- package/dist/{chunk-Y3CAZCIA.js → chunk-DMEASYB4.js} +2 -2
- package/dist/lib/manager-worker.js +2 -2
- package/dist/mcp/index.js +123 -13
- package/dist/mcp/slack-channel.js +13 -2
- package/package.json +1 -1
- /package/dist/{chunk-Y3CAZCIA.js.map → chunk-DMEASYB4.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-DMEASYB4.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.820" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6658,7 +6658,7 @@ function handleError(err) {
|
|
|
6658
6658
|
}
|
|
6659
6659
|
|
|
6660
6660
|
// src/bin/agt.ts
|
|
6661
|
-
var cliVersion2 = true ? "0.28.
|
|
6661
|
+
var cliVersion2 = true ? "0.28.820" : "dev";
|
|
6662
6662
|
var program = new Command();
|
|
6663
6663
|
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");
|
|
6664
6664
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6523,7 +6523,7 @@ function exchangeFailureKind(err) {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
|
|
6525
6525
|
// src/lib/api-client.ts
|
|
6526
|
-
var agtCliVersion = true ? "0.28.
|
|
6526
|
+
var agtCliVersion = true ? "0.28.820" : "dev";
|
|
6527
6527
|
var lastConfigHash = null;
|
|
6528
6528
|
function setConfigHash(hash) {
|
|
6529
6529
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10818,4 +10818,4 @@ export {
|
|
|
10818
10818
|
managerInstallSystemUnitCommand,
|
|
10819
10819
|
managerUninstallSystemUnitCommand
|
|
10820
10820
|
};
|
|
10821
|
-
//# sourceMappingURL=chunk-
|
|
10821
|
+
//# sourceMappingURL=chunk-DMEASYB4.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
safeWriteJsonAtomic,
|
|
59
59
|
setConfigHash,
|
|
60
60
|
tripClass
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-DMEASYB4.js";
|
|
62
62
|
import {
|
|
63
63
|
getProjectDir as getProjectDir2,
|
|
64
64
|
getReadyTasks,
|
|
@@ -13586,7 +13586,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13586
13586
|
var lastVersionCheckAt = 0;
|
|
13587
13587
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13588
13588
|
var lastResponsivenessProbeAt = 0;
|
|
13589
|
-
var agtCliVersion = true ? "0.28.
|
|
13589
|
+
var agtCliVersion = true ? "0.28.820" : "dev";
|
|
13590
13590
|
function resolveBrewPath(execFileSync2) {
|
|
13591
13591
|
try {
|
|
13592
13592
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
package/dist/mcp/index.js
CHANGED
|
@@ -29659,6 +29659,13 @@ var MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING = BIND_FAILURE_QUARANTINE_THRES
|
|
|
29659
29659
|
var FORCED_UPDATE_RELAX_AFTER_MS = 7 * 6e4;
|
|
29660
29660
|
var FORCED_UPDATE_HARD_DEADLINE_MS = 15 * 6e4;
|
|
29661
29661
|
|
|
29662
|
+
// src/kanban-get-error.ts
|
|
29663
|
+
function kanbanGetErrorMessage(status, id, fallbackMessage) {
|
|
29664
|
+
if (status === 400) return "A card id is required.";
|
|
29665
|
+
if (status === 404) return `No card with id "${id}" on your board.`;
|
|
29666
|
+
return `Could not read the card: ${fallbackMessage}`;
|
|
29667
|
+
}
|
|
29668
|
+
|
|
29662
29669
|
// src/index.ts
|
|
29663
29670
|
import { homedir as homedir3, tmpdir } from "os";
|
|
29664
29671
|
import { basename, isAbsolute, join as join4, resolve as pathResolve, sep } from "path";
|
|
@@ -44304,7 +44311,7 @@ function renderDescriptionClause(item) {
|
|
|
44304
44311
|
const { shown, total, truncated } = truncateByCodePoints(text, KANBAN_DESCRIPTION_MAX_CHARS);
|
|
44305
44312
|
if (!truncated) return ` ${text}`;
|
|
44306
44313
|
return ` ${shown}
|
|
44307
|
-
[description truncated \u2014 showing ${KANBAN_DESCRIPTION_MAX_CHARS} of ${total} characters;
|
|
44314
|
+
[description truncated \u2014 showing ${KANBAN_DESCRIPTION_MAX_CHARS} of ${total} characters; use kanban_get(id: "${item.id}") for the rest]`;
|
|
44308
44315
|
}
|
|
44309
44316
|
function renderKanbanItemLine(item, nowMs, suffix = "") {
|
|
44310
44317
|
const pri = kanbanPriorityLabel(item.priority);
|
|
@@ -44358,6 +44365,74 @@ var BLOCKED_ON_ME_SECTION_HEADING = "You are blocking these (another agent has s
|
|
|
44358
44365
|
var BLOCKED_ON_ME_SECTION_NOTE = "_Another agent has PARKED its own work until you act. These are not your cards and not pullable work \u2014 you cannot move, note or complete them, and they do not count toward your in-progress load. Do the thing named, then answer with `kanban_respond` (card_id + your answer) \u2014 that delivers it ON the parked card and un-parks it. Do NOT open a second card to carry the answer._";
|
|
44359
44366
|
var HUMAN_ASSIGNED_SECTION_HEADING = "Assigned to a person (not yours to action)";
|
|
44360
44367
|
var HUMAN_ASSIGNED_SECTION_NOTE = "_These belong to a person, not to you. You cannot move, note or complete them \u2014 every kanban write is refused. If the work is finished (or was never really theirs), use `kanban_recall` to pull the card back onto your board, then close it as normal._";
|
|
44368
|
+
function fullCardField(label, value) {
|
|
44369
|
+
if (value === null || value === void 0 || value === "") return null;
|
|
44370
|
+
return `${label}: ${value}`;
|
|
44371
|
+
}
|
|
44372
|
+
function renderKanbanFullCard(item, nowMs = Date.now()) {
|
|
44373
|
+
const lines = [];
|
|
44374
|
+
lines.push(`# ${item.title}`);
|
|
44375
|
+
lines.push(
|
|
44376
|
+
[
|
|
44377
|
+
`id: ${item.id}`,
|
|
44378
|
+
`status: ${item.status}`,
|
|
44379
|
+
`priority: ${kanbanPriorityLabel(item.priority)}`
|
|
44380
|
+
].join(" \xB7 ")
|
|
44381
|
+
);
|
|
44382
|
+
if (item.status === "waiting") {
|
|
44383
|
+
const clause = renderWaitingClause(
|
|
44384
|
+
{
|
|
44385
|
+
...item,
|
|
44386
|
+
estimated_minutes: item.estimated_minutes ?? void 0,
|
|
44387
|
+
description: void 0,
|
|
44388
|
+
// the clause below prints description separately, in full
|
|
44389
|
+
result: void 0,
|
|
44390
|
+
deliverable: void 0
|
|
44391
|
+
},
|
|
44392
|
+
nowMs
|
|
44393
|
+
);
|
|
44394
|
+
if (clause) lines.push(clause.trim().replace(/^⏸\s*/, "waiting: "));
|
|
44395
|
+
}
|
|
44396
|
+
const meta = [
|
|
44397
|
+
fullCardField("created", item.created_at),
|
|
44398
|
+
fullCardField("updated", item.updated_at),
|
|
44399
|
+
fullCardField("completed", item.completed_at)
|
|
44400
|
+
].filter((l) => l !== null);
|
|
44401
|
+
if (meta.length) lines.push(meta.join(" \xB7 "));
|
|
44402
|
+
const source = [
|
|
44403
|
+
fullCardField("source", item.source),
|
|
44404
|
+
fullCardField("source_type", item.source_type),
|
|
44405
|
+
fullCardField("source_integration", item.source_integration),
|
|
44406
|
+
fullCardField("source_ref", item.source_ref),
|
|
44407
|
+
fullCardField("source_external_id", item.source_external_id),
|
|
44408
|
+
fullCardField("source_url", item.source_url)
|
|
44409
|
+
].filter((l) => l !== null);
|
|
44410
|
+
if (source.length) lines.push(source.join(" \xB7 "));
|
|
44411
|
+
if (item.assignee_type && item.assignee_type !== "agent") {
|
|
44412
|
+
lines.push(`assigned to: ${item.assignee_type}${item.assignee_user_id ? ` (${item.assignee_user_id})` : ""}`);
|
|
44413
|
+
}
|
|
44414
|
+
if (item.description && item.description.trim().length > 0) {
|
|
44415
|
+
lines.push("");
|
|
44416
|
+
lines.push("## Description");
|
|
44417
|
+
lines.push(item.description);
|
|
44418
|
+
}
|
|
44419
|
+
if (item.notes && item.notes.trim().length > 0) {
|
|
44420
|
+
lines.push("");
|
|
44421
|
+
lines.push("## Notes");
|
|
44422
|
+
lines.push(item.notes);
|
|
44423
|
+
}
|
|
44424
|
+
if (item.deliverable && item.deliverable.trim().length > 0) {
|
|
44425
|
+
lines.push("");
|
|
44426
|
+
lines.push("## Deliverable");
|
|
44427
|
+
lines.push(item.deliverable);
|
|
44428
|
+
}
|
|
44429
|
+
if (item.result && item.result.trim().length > 0) {
|
|
44430
|
+
lines.push("");
|
|
44431
|
+
lines.push("## Result");
|
|
44432
|
+
lines.push(item.result);
|
|
44433
|
+
}
|
|
44434
|
+
return lines.join("\n");
|
|
44435
|
+
}
|
|
44361
44436
|
|
|
44362
44437
|
// src/kanban-peek-render.ts
|
|
44363
44438
|
var PEEK_RENDER_COLUMNS = [
|
|
@@ -45377,6 +45452,13 @@ async function getToken() {
|
|
|
45377
45452
|
}
|
|
45378
45453
|
return AGT_TOKEN;
|
|
45379
45454
|
}
|
|
45455
|
+
var ApiPostError = class extends Error {
|
|
45456
|
+
constructor(message, status) {
|
|
45457
|
+
super(message);
|
|
45458
|
+
this.status = status;
|
|
45459
|
+
this.name = "ApiPostError";
|
|
45460
|
+
}
|
|
45461
|
+
};
|
|
45380
45462
|
async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName, readOnly = false) {
|
|
45381
45463
|
const token = await getToken();
|
|
45382
45464
|
const controller = new AbortController();
|
|
@@ -45399,11 +45481,12 @@ async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName,
|
|
|
45399
45481
|
if (!res.ok) {
|
|
45400
45482
|
const text = await res.text().catch(() => res.statusText);
|
|
45401
45483
|
if (res.status === 401 && AGT_AGENT_SESSION_TOKEN) {
|
|
45402
|
-
throw new
|
|
45403
|
-
`API ${path} returned 401: agent-session rejected (expired or revoked). Re-run \`agt impersonate connect\` to mint a fresh session. (${text})
|
|
45484
|
+
throw new ApiPostError(
|
|
45485
|
+
`API ${path} returned 401: agent-session rejected (expired or revoked). Re-run \`agt impersonate connect\` to mint a fresh session. (${text})`,
|
|
45486
|
+
401
|
|
45404
45487
|
);
|
|
45405
45488
|
}
|
|
45406
|
-
throw new
|
|
45489
|
+
throw new ApiPostError(
|
|
45407
45490
|
describeToolCallFailure({
|
|
45408
45491
|
path,
|
|
45409
45492
|
toolName,
|
|
@@ -45411,25 +45494,27 @@ async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName,
|
|
|
45411
45494
|
state: classifyMutationCommitState({ status: res.status, body: text }),
|
|
45412
45495
|
status: res.status,
|
|
45413
45496
|
body: text
|
|
45414
|
-
})
|
|
45497
|
+
}),
|
|
45498
|
+
res.status
|
|
45415
45499
|
);
|
|
45416
45500
|
}
|
|
45417
45501
|
try {
|
|
45418
45502
|
return await res.json();
|
|
45419
45503
|
} catch {
|
|
45420
|
-
throw new
|
|
45504
|
+
throw new ApiPostError(
|
|
45421
45505
|
describeToolCallFailure({
|
|
45422
45506
|
path,
|
|
45423
45507
|
toolName,
|
|
45424
45508
|
state: "committed",
|
|
45425
45509
|
status: res.status,
|
|
45426
45510
|
body: "response body was not valid JSON"
|
|
45427
|
-
})
|
|
45511
|
+
}),
|
|
45512
|
+
res.status
|
|
45428
45513
|
);
|
|
45429
45514
|
}
|
|
45430
45515
|
} catch (err) {
|
|
45431
45516
|
if (err instanceof DOMException && err.name === "AbortError") {
|
|
45432
|
-
throw new
|
|
45517
|
+
throw new ApiPostError(
|
|
45433
45518
|
describeToolCallFailure({
|
|
45434
45519
|
path,
|
|
45435
45520
|
toolName,
|
|
@@ -45438,11 +45523,12 @@ async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName,
|
|
|
45438
45523
|
status: null,
|
|
45439
45524
|
aborted: true,
|
|
45440
45525
|
timeoutMs
|
|
45441
|
-
})
|
|
45526
|
+
}),
|
|
45527
|
+
null
|
|
45442
45528
|
);
|
|
45443
45529
|
}
|
|
45444
45530
|
if (err instanceof Error && !/^API /.test(err.message)) {
|
|
45445
|
-
throw new
|
|
45531
|
+
throw new ApiPostError(
|
|
45446
45532
|
describeToolCallFailure({
|
|
45447
45533
|
path,
|
|
45448
45534
|
toolName,
|
|
@@ -45450,7 +45536,8 @@ async function apiPost(path, body, retried = false, timeoutMs = 15e3, toolName,
|
|
|
45450
45536
|
state: classifyMutationCommitState({ status: null }),
|
|
45451
45537
|
status: null,
|
|
45452
45538
|
body: err.message
|
|
45453
|
-
})
|
|
45539
|
+
}),
|
|
45540
|
+
null
|
|
45454
45541
|
);
|
|
45455
45542
|
}
|
|
45456
45543
|
throw err;
|
|
@@ -45556,18 +45643,40 @@ server.tool(
|
|
|
45556
45643
|
desc,
|
|
45557
45644
|
KANBAN_SEARCH_DESCRIPTION_MAX_CHARS
|
|
45558
45645
|
);
|
|
45559
|
-
const line = truncated ? `${shown} \u2026(description trimmed at ${KANBAN_SEARCH_DESCRIPTION_MAX_CHARS} of ${total} characters;
|
|
45646
|
+
const line = truncated ? `${shown} \u2026(description trimmed at ${KANBAN_SEARCH_DESCRIPTION_MAX_CHARS} of ${total} characters; use kanban_get(id: "${item.id}") for the full text)` : desc;
|
|
45560
45647
|
lines.push(` ${line}`);
|
|
45561
45648
|
}
|
|
45562
45649
|
if (item.deliverable) lines.push(` \u2192 ${item.deliverable}`);
|
|
45563
45650
|
if (item.result) {
|
|
45564
|
-
const more = item.result_truncated ?
|
|
45651
|
+
const more = item.result_truncated ? ` \u2026(result trimmed; use kanban_get(id: "${item.id}") for the full text)` : "";
|
|
45565
45652
|
lines.push(` \u2713 ${item.result}${more}`);
|
|
45566
45653
|
}
|
|
45567
45654
|
}
|
|
45568
45655
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
45569
45656
|
}
|
|
45570
45657
|
);
|
|
45658
|
+
server.tool(
|
|
45659
|
+
"kanban_get",
|
|
45660
|
+
'Read ONE of your own kanban cards IN FULL, with no truncation anywhere - description, notes, result, deliverable, every field. kanban_list caps a description at 1,200 characters and kanban_search at 300; this is the one surface where "read the whole thing" always means the whole thing. Use it whenever a card matters enough to read completely - especially a scheduled-task card, whose description IS the routine prompt you are executing: a long one may already be silently truncated everywhere else you have seen it.',
|
|
45661
|
+
{
|
|
45662
|
+
id: external_exports.string().describe("The card id (from kanban_list, kanban_search, or any other kanban tool's response).")
|
|
45663
|
+
},
|
|
45664
|
+
async ({ id }) => {
|
|
45665
|
+
let data;
|
|
45666
|
+
try {
|
|
45667
|
+
data = await apiPost("/host/kanban/get", { agent_id: AGT_AGENT_ID, id }, false, 15e3, "kanban_get", true);
|
|
45668
|
+
} catch (err) {
|
|
45669
|
+
const status = err instanceof ApiPostError ? err.status : null;
|
|
45670
|
+
return {
|
|
45671
|
+
content: [{ type: "text", text: kanbanGetErrorMessage(status, id, err.message) }]
|
|
45672
|
+
};
|
|
45673
|
+
}
|
|
45674
|
+
if (!data.item) {
|
|
45675
|
+
return { content: [{ type: "text", text: kanbanGetErrorMessage(404, id, "card not found") }] };
|
|
45676
|
+
}
|
|
45677
|
+
return { content: [{ type: "text", text: renderKanbanFullCard(data.item) }] };
|
|
45678
|
+
}
|
|
45679
|
+
);
|
|
45571
45680
|
server.tool(
|
|
45572
45681
|
"kanban_add",
|
|
45573
45682
|
"Add a new item to the kanban board.",
|
|
@@ -48191,6 +48300,7 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
48191
48300
|
"cancel_approval",
|
|
48192
48301
|
"kanban_list",
|
|
48193
48302
|
"kanban_search",
|
|
48303
|
+
"kanban_get",
|
|
48194
48304
|
"kanban_add",
|
|
48195
48305
|
"kanban_move",
|
|
48196
48306
|
"kanban_update",
|
|
@@ -41895,7 +41895,11 @@ function buildSlackMcpInstructions(opts) {
|
|
|
41895
41895
|
}
|
|
41896
41896
|
|
|
41897
41897
|
// src/slack-react-taxonomy.ts
|
|
41898
|
-
|
|
41898
|
+
function buildSlackReactToolDescription(opts) {
|
|
41899
|
+
const { skipReactionOn, skipReaction } = opts;
|
|
41900
|
+
const skip = skipReactionOn ? skipReaction.trim() : "";
|
|
41901
|
+
return "Add an emoji reaction to a Slack message. Use sparingly \u2014 prefer a text reply. Reaction taxonomy: \u2705 = action completed successfully. " + (skip ? `":${skip}:" = seen, deliberately NOT replying \u2014 use it on a DM or thread message you correctly chose not to answer (different @-mention, side chat, auto_followed catch-up, nothing useful to add). This one is not cosmetic: it CLOSES the pending-inbound marker, so the message stops being re-delivered to you and the reply-recovery net will not publish your end-of-turn text into a thread you stayed out of. Skipping silently leaves that marker open. (Top-level channel messages you may skip silently.) ` : "") + "\u{1F4DD} (:memo:) and \u26A0\uFE0F (:warning:) are blessed for explicit multi-state STATUS pipelines only \u2014 e.g. marking a run/parent \u2705 done / \u{1F4DD} waiting / \u26A0\uFE0F failed for at-a-glance status. That exception is narrow: never use a reaction to tell a user that YOUR reply failed \u2014 NEVER react to signal failure of your own work; on failure call slack.reply with one sentence explaining what went wrong instead (no stack traces, no secrets). \u{1F440} (eyes) is already auto-applied on inbound; do not duplicate. \u23F3 (:hourglass_flowing_sand:) is reserved for the system to mark an inbound that arrived while the agent couldn't reply \u2014 never add \u23F3 or \u274C yourself. (A \u{1F512} you may see on a thread is the server's reply-throttle marker, not a coerced reaction \u2014 slack.react passes your emoji straight through to Slack and never rewrites it to \u{1F512}.)";
|
|
41902
|
+
}
|
|
41899
41903
|
|
|
41900
41904
|
// src/slack-routed-to-note.ts
|
|
41901
41905
|
function describeChannelRedirect(input) {
|
|
@@ -46080,7 +46084,14 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
46080
46084
|
},
|
|
46081
46085
|
{
|
|
46082
46086
|
name: "slack.react",
|
|
46083
|
-
|
|
46087
|
+
// ENG-10051: built, not a constant — the description must name the
|
|
46088
|
+
// configured skip reaction whenever it is armed, so this surface and the
|
|
46089
|
+
// connect-time instructions cannot disagree about which emoji means
|
|
46090
|
+
// "seen, not replying". Same two inputs the instructions are built from.
|
|
46091
|
+
description: buildSlackReactToolDescription({
|
|
46092
|
+
skipReactionOn: SKIP_REACTION_ON,
|
|
46093
|
+
skipReaction: SLACK_SKIP_REACTION
|
|
46094
|
+
}),
|
|
46084
46095
|
inputSchema: {
|
|
46085
46096
|
type: "object",
|
|
46086
46097
|
properties: {
|
package/package.json
CHANGED
|
File without changes
|