@integrity-labs/agt-cli 0.28.46 → 0.28.47
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
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
success,
|
|
38
38
|
table,
|
|
39
39
|
warn
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-FON5YIFK.js";
|
|
41
41
|
import {
|
|
42
42
|
CHANNEL_REGISTRY,
|
|
43
43
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4777
4777
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4778
4778
|
import chalk18 from "chalk";
|
|
4779
4779
|
import ora16 from "ora";
|
|
4780
|
-
var cliVersion = true ? "0.28.
|
|
4780
|
+
var cliVersion = true ? "0.28.47" : "dev";
|
|
4781
4781
|
async function fetchLatestVersion() {
|
|
4782
4782
|
const host2 = getHost();
|
|
4783
4783
|
if (!host2) return null;
|
|
@@ -5787,7 +5787,7 @@ function handleError(err) {
|
|
|
5787
5787
|
}
|
|
5788
5788
|
|
|
5789
5789
|
// src/bin/agt.ts
|
|
5790
|
-
var cliVersion2 = true ? "0.28.
|
|
5790
|
+
var cliVersion2 = true ? "0.28.47" : "dev";
|
|
5791
5791
|
var program = new Command();
|
|
5792
5792
|
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");
|
|
5793
5793
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -7280,7 +7280,7 @@ function requireHost() {
|
|
|
7280
7280
|
}
|
|
7281
7281
|
|
|
7282
7282
|
// src/lib/api-client.ts
|
|
7283
|
-
var agtCliVersion = true ? "0.28.
|
|
7283
|
+
var agtCliVersion = true ? "0.28.47" : "dev";
|
|
7284
7284
|
var lastConfigHash = null;
|
|
7285
7285
|
function setConfigHash(hash) {
|
|
7286
7286
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8561,4 +8561,4 @@ export {
|
|
|
8561
8561
|
managerInstallSystemUnitCommand,
|
|
8562
8562
|
managerUninstallSystemUnitCommand
|
|
8563
8563
|
};
|
|
8564
|
-
//# sourceMappingURL=chunk-
|
|
8564
|
+
//# sourceMappingURL=chunk-FON5YIFK.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
requireHost,
|
|
28
28
|
safeWriteJsonAtomic,
|
|
29
29
|
setConfigHash
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-FON5YIFK.js";
|
|
31
31
|
import {
|
|
32
32
|
getProjectDir as getProjectDir2,
|
|
33
33
|
getReadyTasks,
|
|
@@ -6630,7 +6630,7 @@ var cachedMaintenanceWindow = null;
|
|
|
6630
6630
|
var lastVersionCheckAt = 0;
|
|
6631
6631
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6632
6632
|
var lastResponsivenessProbeAt = 0;
|
|
6633
|
-
var agtCliVersion = true ? "0.28.
|
|
6633
|
+
var agtCliVersion = true ? "0.28.47" : "dev";
|
|
6634
6634
|
function resolveBrewPath(execFileSync4) {
|
|
6635
6635
|
try {
|
|
6636
6636
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -21106,6 +21106,10 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21106
21106
|
probeIntegration(args) {
|
|
21107
21107
|
return this.get("/admin/debug/probe-integration", _AdminDebugClient.cleanQuery(args));
|
|
21108
21108
|
}
|
|
21109
|
+
/** List an agent's dead-lettered / quarantined inbound (ENG-6443, read). */
|
|
21110
|
+
inspectDeadLetters(args) {
|
|
21111
|
+
return this.get("/admin/debug/dead-letters", _AdminDebugClient.cleanQuery(args));
|
|
21112
|
+
}
|
|
21109
21113
|
queryAuditLog(args) {
|
|
21110
21114
|
return this.get("/admin/debug/audit-log", _AdminDebugClient.cleanQuery(args));
|
|
21111
21115
|
}
|
|
@@ -21195,6 +21199,21 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21195
21199
|
run_id: this.runId
|
|
21196
21200
|
});
|
|
21197
21201
|
}
|
|
21202
|
+
/** Request a HITL-gated dead-letter replay (re-inject one parked inbound) (ENG-6443). */
|
|
21203
|
+
requestReplayDeadLetter(args) {
|
|
21204
|
+
if (!this.agentId) {
|
|
21205
|
+
throw makeError(400, "AdminDebugClient.requestReplayDeadLetter requires agentId (set AGT_AGENT_ID)");
|
|
21206
|
+
}
|
|
21207
|
+
return this.post("/admin/debug/actions/replay-dead-letter", {
|
|
21208
|
+
target_agent_id: args.target_agent_id,
|
|
21209
|
+
channel: args.channel,
|
|
21210
|
+
store: args.store,
|
|
21211
|
+
marker_name: args.marker_name,
|
|
21212
|
+
reason: args.reason,
|
|
21213
|
+
agent_id: this.agentId,
|
|
21214
|
+
run_id: this.runId
|
|
21215
|
+
});
|
|
21216
|
+
}
|
|
21198
21217
|
/** Poll a remedial action's HITL decision. */
|
|
21199
21218
|
getActionStatus(requestId) {
|
|
21200
21219
|
return this.get(`/admin/debug/actions/${encodeURIComponent(requestId)}`);
|
|
@@ -21245,6 +21264,21 @@ var probeIntegrationSchema = external_exports.object({
|
|
|
21245
21264
|
"The integration slug (its definition code_name, e.g. `gmail`, `slack`, `here-now`) to probe on that agent."
|
|
21246
21265
|
)
|
|
21247
21266
|
});
|
|
21267
|
+
var inspectDeadLettersSchema = external_exports.object({
|
|
21268
|
+
agent_id: external_exports.string().min(1).max(64).describe(
|
|
21269
|
+
"UUID of the agent whose dead-lettered inbound to list. Fails closed (uniform not-found) if you are not authorized for its org."
|
|
21270
|
+
)
|
|
21271
|
+
});
|
|
21272
|
+
var replayDeadLetterSchema = external_exports.object({
|
|
21273
|
+
target_agent_id: external_exports.string().min(1).max(64).describe("UUID of the customer agent whose dead letter to replay."),
|
|
21274
|
+
channel: external_exports.enum(["slack", "telegram"]).describe("Which inbound channel the dead letter belongs to (from the inspect result)."),
|
|
21275
|
+
store: external_exports.string().min(1).max(128).regex(
|
|
21276
|
+
/^(stale|cleared:pending-inbound-cleared-[A-Za-z0-9._-]+)$/,
|
|
21277
|
+
'store must be "stale" or "cleared:pending-inbound-cleared-<stamp>" (copy from the inspect result)'
|
|
21278
|
+
).describe("The dead-letter store the marker is in \u2014 copy the `store` value verbatim from debug_inspect_dead_letters."),
|
|
21279
|
+
marker_name: external_exports.string().trim().min(1).max(256).describe("The exact `marker_name` from the inspect result identifying which parked message to re-inject."),
|
|
21280
|
+
reason: external_exports.string().min(1).max(2e3).describe("Why this message should be re-injected \u2014 shown verbatim to the human approver. Be specific.")
|
|
21281
|
+
});
|
|
21248
21282
|
var listAlertsSchema = external_exports.object({
|
|
21249
21283
|
severity: external_exports.string().max(16).optional().describe("Filter by severity (critical | warning | info)."),
|
|
21250
21284
|
open: external_exports.boolean().optional().describe("When true, only currently-open (unclosed) alerts."),
|
|
@@ -21455,6 +21489,19 @@ server.tool(
|
|
|
21455
21489
|
}
|
|
21456
21490
|
}
|
|
21457
21491
|
);
|
|
21492
|
+
server.tool(
|
|
21493
|
+
"debug_inspect_dead_letters",
|
|
21494
|
+
"List an agent's DEAD-LETTERED / quarantined inbound \u2014 customer messages that were parked on the host instead of delivered (so the agent never saw them), rather than silently lost. Use when a user says \"the agent never replied\" but nothing shows in the normal flow, or to audit what fell into the dead-letter path. Resolves the agent's current host and reads two on-disk stores over SSM: `stale` (markers moved aside on a wedge-respawn because the agent couldn't receive) and `cleared:<stamp>` (markers the clear_pending_inbound remedial action moved aside). Returns { agent_id, code_name, host, markers[], total, ssm_status } where each marker is { index, store, channel (slack|telegram), marker_name, received_at, undeliverable, discretionary, replay_count, conversation, message_ref } \u2014 routing metadata only, NEVER the message body. To re-inject one, pass its exact { channel, store, marker_name } to debug_replay_dead_letter. Fails closed for an unauthorized org; every call is audited as a cross-org host access. Pass { agent_id }.",
|
|
21495
|
+
inspectDeadLettersSchema.shape,
|
|
21496
|
+
async (args) => {
|
|
21497
|
+
try {
|
|
21498
|
+
const result = await client.inspectDeadLetters(args);
|
|
21499
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
21500
|
+
} catch (err) {
|
|
21501
|
+
return { content: [{ type: "text", text: formatError2(err) }], isError: true };
|
|
21502
|
+
}
|
|
21503
|
+
}
|
|
21504
|
+
);
|
|
21458
21505
|
server.tool(
|
|
21459
21506
|
"debug_query_audit_log",
|
|
21460
21507
|
'Read recent audit events to troubleshoot why/when agents bounced \u2014 primarily restart events. Defaults to the "agent.restart" action: each event returns { created_at, source, reason, actor_kind, agent_id, code_name }, where `source` is the restart trigger (agent-self-request, channel-command, maintenance-window, stale-mcp, hot-reload-mcp, mcp-presence-reaper, day-rollover, auth-tuple-change, \u2026) and `reason` is the free-text rationale when one was given (e.g. the agent\'s own words for a request_restart). Two modes: (1) pass { agent_id } to scope to ONE agent (fails closed if you\'re not authorized for its org) \u2014 use when a specific agent went quiet. (2) OMIT agent_id for a CROSS-AGENT sweep across every org you\'re authorized for (optionally narrow with { org_id }) \u2014 use to spot fleet-wide restart storms or compare agents. Filter the action with `action` (pass "all" to drop the action filter and read every event type), and bound with { since_hours?, limit? }. Cross-agent results are org-walled in SQL; unauthorized orgs are invisible.',
|
|
@@ -21535,9 +21582,28 @@ server.tool(
|
|
|
21535
21582
|
}
|
|
21536
21583
|
}
|
|
21537
21584
|
);
|
|
21585
|
+
server.tool(
|
|
21586
|
+
"debug_replay_dead_letter",
|
|
21587
|
+
"Request a HITL-gated REPLAY of ONE dead-lettered inbound \u2014 re-inject a customer message that was parked on the host (listed by debug_inspect_dead_letters) back into the agent's live inbound so it is reprocessed. This is the inverse of clear_pending_inbound: use it to recover a message a wedged agent missed. A HUMAN must approve in Slack before anything happens, and only if writes are armed (shadow mode runs the approval but executes nothing). The marker is matched on the host by the exact (channel, store, marker_name) you pass \u2014 copy them verbatim from the inspect result \u2014 so a stale or wrong selector safely no-ops (`replayed:false, reason:not_found`) rather than moving the wrong message. Async: returns { request_id, status, write_mode, notification_status }; after approval, poll check_action_status (result_payload carries { replayed, moved_to }). Pass { target_agent_id, channel, store, marker_name, reason }.",
|
|
21588
|
+
replayDeadLetterSchema.shape,
|
|
21589
|
+
async (args) => {
|
|
21590
|
+
try {
|
|
21591
|
+
const result = await client.requestReplayDeadLetter({
|
|
21592
|
+
target_agent_id: args.target_agent_id,
|
|
21593
|
+
channel: args.channel,
|
|
21594
|
+
store: args.store,
|
|
21595
|
+
marker_name: args.marker_name,
|
|
21596
|
+
reason: args.reason
|
|
21597
|
+
});
|
|
21598
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
21599
|
+
} catch (err) {
|
|
21600
|
+
return { content: [{ type: "text", text: formatError2(err) }], isError: true };
|
|
21601
|
+
}
|
|
21602
|
+
}
|
|
21603
|
+
);
|
|
21538
21604
|
server.tool(
|
|
21539
21605
|
"check_action_status",
|
|
21540
|
-
"Poll the decision on a remedial action you requested (the approval result is also pushed to you via direct-chat). Returns { status, result_payload, denial_reason, resolved_at } \u2014 for an approved request_ssm_run, result_payload carries the command output. Pass { request_id }.",
|
|
21606
|
+
"Poll the decision on a remedial action you requested (the approval result is also pushed to you via direct-chat). Returns { status, result_payload, denial_reason, resolved_at } \u2014 for an approved request_ssm_run, result_payload carries the command output; for debug_replay_dead_letter, result_payload carries { replayed, moved_to }. Pass { request_id }.",
|
|
21541
21607
|
checkActionStatusSchema.shape,
|
|
21542
21608
|
async (args) => {
|
|
21543
21609
|
try {
|
package/package.json
CHANGED
|
File without changes
|