@integrity-labs/agt-cli 0.28.46 → 0.28.48
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 +4 -4
- package/dist/{chunk-ONG7KSRP.js → chunk-5CO27R3F.js} +11 -1
- package/dist/chunk-5CO27R3F.js.map +1 -0
- package/dist/{chunk-34NTBWVL.js → chunk-A5V5GSWV.js} +79 -4
- package/dist/chunk-A5V5GSWV.js.map +1 -0
- package/dist/{chunk-UVE6VSU3.js → chunk-M5MBPE7H.js} +2 -2
- package/dist/{claude-pair-runtime-QXRSXJ4D.js → claude-pair-runtime-F5WFIGUJ.js} +2 -2
- package/dist/lib/manager-worker.js +8 -8
- package/dist/mcp/augmented-admin.js +67 -1
- package/dist/{persistent-session-Q73X7PPM.js → persistent-session-PZUQMDGX.js} +3 -3
- package/dist/{responsiveness-probe-R7WZXP2Y.js → responsiveness-probe-5TG3QMB2.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-34NTBWVL.js.map +0 -1
- package/dist/chunk-ONG7KSRP.js.map +0 -1
- /package/dist/{chunk-UVE6VSU3.js.map → chunk-M5MBPE7H.js.map} +0 -0
- /package/dist/{claude-pair-runtime-QXRSXJ4D.js.map → claude-pair-runtime-F5WFIGUJ.js.map} +0 -0
- /package/dist/{persistent-session-Q73X7PPM.js.map → persistent-session-PZUQMDGX.js.map} +0 -0
- /package/dist/{responsiveness-probe-R7WZXP2Y.js.map → responsiveness-probe-5TG3QMB2.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatMissingVar,
|
|
4
4
|
isClaudeFastMode,
|
|
5
5
|
probeMcpEnvSubstitution
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5CO27R3F.js";
|
|
7
7
|
import {
|
|
8
8
|
reapOrphanChannelMcps
|
|
9
9
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -1395,4 +1395,4 @@ export {
|
|
|
1395
1395
|
stopAllSessionsAndWait,
|
|
1396
1396
|
getProjectDir
|
|
1397
1397
|
};
|
|
1398
|
-
//# sourceMappingURL=chunk-
|
|
1398
|
+
//# sourceMappingURL=chunk-M5MBPE7H.js.map
|
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-PZUQMDGX.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-F5WFIGUJ.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
requireHost,
|
|
28
28
|
safeWriteJsonAtomic,
|
|
29
29
|
setConfigHash
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-A5V5GSWV.js";
|
|
31
31
|
import {
|
|
32
32
|
getProjectDir as getProjectDir2,
|
|
33
33
|
getReadyTasks,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
takeWatchdogGiveUpCount,
|
|
66
66
|
takeZombieDetection,
|
|
67
67
|
transcriptActivityAgeSeconds
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-M5MBPE7H.js";
|
|
69
69
|
import {
|
|
70
70
|
FLAGS_SCHEMA_VERSION,
|
|
71
71
|
FLAG_REGISTRY,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
resolveDmTarget,
|
|
97
97
|
sumTranscriptUsageInWindow,
|
|
98
98
|
wrapScheduledTaskPrompt
|
|
99
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-5CO27R3F.js";
|
|
100
100
|
import {
|
|
101
101
|
parsePsRows,
|
|
102
102
|
reapOrphanChannelMcps
|
|
@@ -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.48" : "dev";
|
|
6634
6634
|
function resolveBrewPath(execFileSync4) {
|
|
6635
6635
|
try {
|
|
6636
6636
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7739,7 +7739,7 @@ async function pollCycle() {
|
|
|
7739
7739
|
}
|
|
7740
7740
|
try {
|
|
7741
7741
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
7742
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7742
|
+
const { collectDiagnostics } = await import("../persistent-session-PZUQMDGX.js");
|
|
7743
7743
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
7744
7744
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
7745
7745
|
let tailscaleHostname;
|
|
@@ -7840,7 +7840,7 @@ async function pollCycle() {
|
|
|
7840
7840
|
const {
|
|
7841
7841
|
collectResponsivenessProbes,
|
|
7842
7842
|
getResponsivenessIntervalMs
|
|
7843
|
-
} = await import("../responsiveness-probe-
|
|
7843
|
+
} = await import("../responsiveness-probe-5TG3QMB2.js");
|
|
7844
7844
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
7845
7845
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
7846
7846
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -7872,7 +7872,7 @@ async function pollCycle() {
|
|
|
7872
7872
|
collectResponsivenessProbes,
|
|
7873
7873
|
livePendingInboundOldestAgeSeconds,
|
|
7874
7874
|
parkPendingInbound
|
|
7875
|
-
} = await import("../responsiveness-probe-
|
|
7875
|
+
} = await import("../responsiveness-probe-5TG3QMB2.js");
|
|
7876
7876
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
7877
7877
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
7878
7878
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -11276,7 +11276,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11276
11276
|
killPairSession,
|
|
11277
11277
|
pairTmuxSession,
|
|
11278
11278
|
finalizeClaudePairOnboarding
|
|
11279
|
-
} = await import("../claude-pair-runtime-
|
|
11279
|
+
} = await import("../claude-pair-runtime-F5WFIGUJ.js");
|
|
11280
11280
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11281
11281
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11282
11282
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -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 {
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
takeZombieDetection,
|
|
26
26
|
writeDirectChatSessionState,
|
|
27
27
|
writePersistentClaudeWrapper
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-M5MBPE7H.js";
|
|
29
|
+
import "./chunk-5CO27R3F.js";
|
|
30
30
|
import "./chunk-XWVM4KPK.js";
|
|
31
31
|
export {
|
|
32
32
|
SEND_KEYS_ENTER_DELAY_MS,
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
writeDirectChatSessionState,
|
|
57
57
|
writePersistentClaudeWrapper
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=persistent-session-
|
|
59
|
+
//# sourceMappingURL=persistent-session-PZUQMDGX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-M5MBPE7H.js";
|
|
4
|
+
import "./chunk-5CO27R3F.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -250,4 +250,4 @@ export {
|
|
|
250
250
|
parkPendingInbound,
|
|
251
251
|
readAndResetChannelDeflections
|
|
252
252
|
};
|
|
253
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
253
|
+
//# sourceMappingURL=responsiveness-probe-5TG3QMB2.js.map
|