@integrity-labs/agt-cli 0.28.49 → 0.28.51
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 +12 -8
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-UVKKX46F.js → chunk-CCDBWDBW.js} +3 -3
- package/dist/{chunk-NCP6GVXS.js → chunk-QK4EU3TC.js} +2 -2
- package/dist/{chunk-MJKGJXKV.js → chunk-WBZFCFU6.js} +4 -1
- package/dist/chunk-WBZFCFU6.js.map +1 -0
- package/dist/{claude-pair-runtime-SAJMKK2M.js → claude-pair-runtime-XU7GFFQH.js} +2 -2
- package/dist/lib/manager-worker.js +8 -8
- package/dist/mcp/augmented-admin.js +55 -0
- package/dist/{persistent-session-HL2ANGTL.js → persistent-session-YSE6OUM6.js} +3 -3
- package/dist/{responsiveness-probe-KSY4M6NR.js → responsiveness-probe-4BU75QQV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-MJKGJXKV.js.map +0 -1
- /package/dist/{chunk-UVKKX46F.js.map → chunk-CCDBWDBW.js.map} +0 -0
- /package/dist/{chunk-NCP6GVXS.js.map → chunk-QK4EU3TC.js.map} +0 -0
- /package/dist/{claude-pair-runtime-SAJMKK2M.js.map → claude-pair-runtime-XU7GFFQH.js.map} +0 -0
- /package/dist/{persistent-session-HL2ANGTL.js.map → persistent-session-YSE6OUM6.js.map} +0 -0
- /package/dist/{responsiveness-probe-KSY4M6NR.js.map → responsiveness-probe-4BU75QQV.js.map} +0 -0
|
@@ -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-YSE6OUM6.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-XU7GFFQH.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
requireHost,
|
|
28
28
|
safeWriteJsonAtomic,
|
|
29
29
|
setConfigHash
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-CCDBWDBW.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-QK4EU3TC.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-WBZFCFU6.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.51" : "dev";
|
|
6634
6634
|
function resolveBrewPath(execFileSync4) {
|
|
6635
6635
|
try {
|
|
6636
6636
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7738,7 +7738,7 @@ async function pollCycle() {
|
|
|
7738
7738
|
}
|
|
7739
7739
|
try {
|
|
7740
7740
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
7741
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7741
|
+
const { collectDiagnostics } = await import("../persistent-session-YSE6OUM6.js");
|
|
7742
7742
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
7743
7743
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
7744
7744
|
let tailscaleHostname;
|
|
@@ -7839,7 +7839,7 @@ async function pollCycle() {
|
|
|
7839
7839
|
const {
|
|
7840
7840
|
collectResponsivenessProbes,
|
|
7841
7841
|
getResponsivenessIntervalMs
|
|
7842
|
-
} = await import("../responsiveness-probe-
|
|
7842
|
+
} = await import("../responsiveness-probe-4BU75QQV.js");
|
|
7843
7843
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
7844
7844
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
7845
7845
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -7871,7 +7871,7 @@ async function pollCycle() {
|
|
|
7871
7871
|
collectResponsivenessProbes,
|
|
7872
7872
|
livePendingInboundOldestAgeSeconds,
|
|
7873
7873
|
parkPendingInbound
|
|
7874
|
-
} = await import("../responsiveness-probe-
|
|
7874
|
+
} = await import("../responsiveness-probe-4BU75QQV.js");
|
|
7875
7875
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
7876
7876
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
7877
7877
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -11275,7 +11275,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11275
11275
|
killPairSession,
|
|
11276
11276
|
pairTmuxSession,
|
|
11277
11277
|
finalizeClaudePairOnboarding
|
|
11278
|
-
} = await import("../claude-pair-runtime-
|
|
11278
|
+
} = await import("../claude-pair-runtime-XU7GFFQH.js");
|
|
11279
11279
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11280
11280
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11281
11281
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -21113,6 +21113,10 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21113
21113
|
queryAuditLog(args) {
|
|
21114
21114
|
return this.get("/admin/debug/audit-log", _AdminDebugClient.cleanQuery(args));
|
|
21115
21115
|
}
|
|
21116
|
+
/** List stuck / pending restart requests cross-org (ENG-6444, read). */
|
|
21117
|
+
inspectRestartRequests(args) {
|
|
21118
|
+
return this.get("/admin/debug/restart-requests", _AdminDebugClient.cleanQuery(args));
|
|
21119
|
+
}
|
|
21116
21120
|
// ─────────────────── request-scoped customer grant (ENG-6279) ───────────────────
|
|
21117
21121
|
/**
|
|
21118
21122
|
* Open scoped READ access to a SELF-MANAGED customer org so the read tools can
|
|
@@ -21214,6 +21218,18 @@ var AdminDebugClient = class _AdminDebugClient {
|
|
|
21214
21218
|
run_id: this.runId
|
|
21215
21219
|
});
|
|
21216
21220
|
}
|
|
21221
|
+
/** Request a HITL-gated clear of a stuck restart request (ENG-6444). */
|
|
21222
|
+
requestClearRestartRequest(args) {
|
|
21223
|
+
if (!this.agentId) {
|
|
21224
|
+
throw makeError(400, "AdminDebugClient.requestClearRestartRequest requires agentId (set AGT_AGENT_ID)");
|
|
21225
|
+
}
|
|
21226
|
+
return this.post("/admin/debug/actions/clear-restart-request", {
|
|
21227
|
+
target_agent_id: args.target_agent_id,
|
|
21228
|
+
reason: args.reason,
|
|
21229
|
+
agent_id: this.agentId,
|
|
21230
|
+
run_id: this.runId
|
|
21231
|
+
});
|
|
21232
|
+
}
|
|
21217
21233
|
/** Poll a remedial action's HITL decision. */
|
|
21218
21234
|
getActionStatus(requestId) {
|
|
21219
21235
|
return this.get(`/admin/debug/actions/${encodeURIComponent(requestId)}`);
|
|
@@ -21279,6 +21295,16 @@ var replayDeadLetterSchema = external_exports.object({
|
|
|
21279
21295
|
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
21296
|
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
21297
|
});
|
|
21298
|
+
var inspectRestartRequestsSchema = external_exports.object({
|
|
21299
|
+
agent_id: external_exports.string().min(1).max(64).optional().describe(
|
|
21300
|
+
"Optional: narrow to ONE agent's restart request. Omit for a fleet-wide list across every authorized org. Fails closed (empty) for orgs you are not authorized for."
|
|
21301
|
+
),
|
|
21302
|
+
limit: limitSchema
|
|
21303
|
+
});
|
|
21304
|
+
var clearRestartRequestSchema = external_exports.object({
|
|
21305
|
+
target_agent_id: external_exports.string().min(1).max(64).describe("UUID of the customer agent whose stuck restart request to clear (from the inspect result)."),
|
|
21306
|
+
reason: external_exports.string().min(1).max(2e3).describe("Why this stuck restart request should be cleared \u2014 shown verbatim to the human approver. Be specific.")
|
|
21307
|
+
});
|
|
21282
21308
|
var listAlertsSchema = external_exports.object({
|
|
21283
21309
|
severity: external_exports.string().max(16).optional().describe("Filter by severity (critical | warning | info)."),
|
|
21284
21310
|
open: external_exports.boolean().optional().describe("When true, only currently-open (unclosed) alerts."),
|
|
@@ -21502,6 +21528,35 @@ server.tool(
|
|
|
21502
21528
|
}
|
|
21503
21529
|
}
|
|
21504
21530
|
);
|
|
21531
|
+
server.tool(
|
|
21532
|
+
"debug_inspect_restart_requests",
|
|
21533
|
+
'List STUCK / pending agent restart requests across authorized orgs \u2014 the agent_restart_stuck class. A restart request is "stuck" when the manager never acked it (e.g. one sat open on an agent for ~27 days). Use this when an agent went quiet and you suspect a restart that never landed, or to audit the fleet for unacked restarts. Returns { requests[], count } where each request is { agent_id, code_name, organization_id, host, restart_requested_at, stuck_seconds, is_stuck, incident, alert } \u2014 `is_stuck` flags age past the alert threshold (15 min); `incident`/`alert` carry the open ledger row + paged alert when the cron has escalated it. Routing metadata only, never message content. To cancel one, pass its agent_id to request_clear_restart_request. Pass { agent_id? (narrow to one), limit? }; fleet-wide when agent_id is omitted. Org-walled in SQL; every call is audited as a cross-org access.',
|
|
21534
|
+
inspectRestartRequestsSchema.shape,
|
|
21535
|
+
async (args) => {
|
|
21536
|
+
try {
|
|
21537
|
+
const result = await client.inspectRestartRequests(args);
|
|
21538
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
21539
|
+
} catch (err) {
|
|
21540
|
+
return { content: [{ type: "text", text: formatError2(err) }], isError: true };
|
|
21541
|
+
}
|
|
21542
|
+
}
|
|
21543
|
+
);
|
|
21544
|
+
server.tool(
|
|
21545
|
+
"request_clear_restart_request",
|
|
21546
|
+
"Request a HITL-gated CLEAR of a STUCK restart request \u2014 cancel a restart the manager never acked (listed by debug_inspect_restart_requests) and resolve its agent_restart_stuck alert. Use it to clear a restart signal wedged open for hours/days/weeks. This is NOT a restart and NOT a host action: it nulls the agent's `restart_requested_at` signal in the central DB and closes the alert/incident; the agent keeps running as-is, no in-flight work is destroyed. Reversible \u2014 request a fresh restart afterwards if one is still needed. A HUMAN must approve in Slack before anything happens, and only if writes are armed for this stage (shadow mode runs the approval but executes nothing). Async: returns { request_id, status, write_mode, notification_status }; after approval, poll check_action_status (result_payload carries { cleared_bindings, alert_closed }). Pass { target_agent_id, reason }.",
|
|
21547
|
+
clearRestartRequestSchema.shape,
|
|
21548
|
+
async (args) => {
|
|
21549
|
+
try {
|
|
21550
|
+
const result = await client.requestClearRestartRequest({
|
|
21551
|
+
target_agent_id: args.target_agent_id,
|
|
21552
|
+
reason: args.reason
|
|
21553
|
+
});
|
|
21554
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
21555
|
+
} catch (err) {
|
|
21556
|
+
return { content: [{ type: "text", text: formatError2(err) }], isError: true };
|
|
21557
|
+
}
|
|
21558
|
+
}
|
|
21559
|
+
);
|
|
21505
21560
|
server.tool(
|
|
21506
21561
|
"debug_query_audit_log",
|
|
21507
21562
|
'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.',
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
takeZombieDetection,
|
|
26
26
|
writeDirectChatSessionState,
|
|
27
27
|
writePersistentClaudeWrapper
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-QK4EU3TC.js";
|
|
29
|
+
import "./chunk-WBZFCFU6.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-YSE6OUM6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QK4EU3TC.js";
|
|
4
|
+
import "./chunk-WBZFCFU6.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-4BU75QQV.js.map
|