@integrity-labs/agt-cli 0.28.264 → 0.28.265
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-E45AAMBQ.js → chunk-MWKR6B3T.js} +8 -1
- package/dist/{chunk-E45AAMBQ.js.map → chunk-MWKR6B3T.js.map} +1 -1
- package/dist/{chunk-MQ5S642N.js → chunk-PDE3XSVC.js} +3 -3
- package/dist/{claude-pair-runtime-X5NJYZSK.js → claude-pair-runtime-YZ2PGUW3.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/mcp/index.js +74 -0
- package/dist/mcp/origami.js +7 -0
- package/dist/{persistent-session-OP4TXILO.js → persistent-session-K5RJ4BVF.js} +2 -2
- package/dist/{responsiveness-probe-K2RGVZCR.js → responsiveness-probe-2PHY7QKJ.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-MQ5S642N.js.map → chunk-PDE3XSVC.js.map} +0 -0
- /package/dist/{claude-pair-runtime-X5NJYZSK.js.map → claude-pair-runtime-YZ2PGUW3.js.map} +0 -0
- /package/dist/{persistent-session-OP4TXILO.js.map → persistent-session-K5RJ4BVF.js.map} +0 -0
- /package/dist/{responsiveness-probe-K2RGVZCR.js.map → responsiveness-probe-2PHY7QKJ.js.map} +0 -0
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
resolveConnectivityProbe,
|
|
19
19
|
worseConnectivityOutcome,
|
|
20
20
|
wrapScheduledTaskPrompt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MWKR6B3T.js";
|
|
22
22
|
import {
|
|
23
23
|
parsePsRows
|
|
24
24
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5876,7 +5876,7 @@ function requireHost() {
|
|
|
5876
5876
|
}
|
|
5877
5877
|
|
|
5878
5878
|
// src/lib/api-client.ts
|
|
5879
|
-
var agtCliVersion = true ? "0.28.
|
|
5879
|
+
var agtCliVersion = true ? "0.28.265" : "dev";
|
|
5880
5880
|
var lastConfigHash = null;
|
|
5881
5881
|
function setConfigHash(hash) {
|
|
5882
5882
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8146,4 +8146,4 @@ export {
|
|
|
8146
8146
|
managerInstallSystemUnitCommand,
|
|
8147
8147
|
managerUninstallSystemUnitCommand
|
|
8148
8148
|
};
|
|
8149
|
-
//# sourceMappingURL=chunk-
|
|
8149
|
+
//# sourceMappingURL=chunk-PDE3XSVC.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-K5RJ4BVF.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-YZ2PGUW3.js.map
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
requireHost,
|
|
38
38
|
safeWriteJsonAtomic,
|
|
39
39
|
setConfigHash
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-PDE3XSVC.js";
|
|
41
41
|
import {
|
|
42
42
|
getProjectDir as getProjectDir2,
|
|
43
43
|
getReadyTasks,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
takeZombieDetection,
|
|
123
123
|
transcriptActivityAgeSeconds,
|
|
124
124
|
writeEgressAllowlist
|
|
125
|
-
} from "../chunk-
|
|
125
|
+
} from "../chunk-MWKR6B3T.js";
|
|
126
126
|
import {
|
|
127
127
|
reapOrphanChannelMcps
|
|
128
128
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -6699,7 +6699,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6699
6699
|
var lastVersionCheckAt = 0;
|
|
6700
6700
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6701
6701
|
var lastResponsivenessProbeAt = 0;
|
|
6702
|
-
var agtCliVersion = true ? "0.28.
|
|
6702
|
+
var agtCliVersion = true ? "0.28.265" : "dev";
|
|
6703
6703
|
function resolveBrewPath(execFileSync2) {
|
|
6704
6704
|
try {
|
|
6705
6705
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7549,7 +7549,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
7549
7549
|
if (codeNames.length === 0) return;
|
|
7550
7550
|
void (async () => {
|
|
7551
7551
|
try {
|
|
7552
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7552
|
+
const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
|
|
7553
7553
|
await api.post("/host/heartbeat", {
|
|
7554
7554
|
host_id: hostId,
|
|
7555
7555
|
agent_diagnostics: collectDiagnostics(codeNames)
|
|
@@ -7647,7 +7647,7 @@ async function pollCycle() {
|
|
|
7647
7647
|
}
|
|
7648
7648
|
try {
|
|
7649
7649
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
7650
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7650
|
+
const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
|
|
7651
7651
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
7652
7652
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
7653
7653
|
let tailscaleHostname;
|
|
@@ -7795,7 +7795,7 @@ async function pollCycle() {
|
|
|
7795
7795
|
const {
|
|
7796
7796
|
collectResponsivenessProbes,
|
|
7797
7797
|
getResponsivenessIntervalMs
|
|
7798
|
-
} = await import("../responsiveness-probe-
|
|
7798
|
+
} = await import("../responsiveness-probe-2PHY7QKJ.js");
|
|
7799
7799
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
7800
7800
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
7801
7801
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -7827,7 +7827,7 @@ async function pollCycle() {
|
|
|
7827
7827
|
collectResponsivenessProbes,
|
|
7828
7828
|
livePendingInboundOldestAgeSeconds,
|
|
7829
7829
|
parkPendingInbound
|
|
7830
|
-
} = await import("../responsiveness-probe-
|
|
7830
|
+
} = await import("../responsiveness-probe-2PHY7QKJ.js");
|
|
7831
7831
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
7832
7832
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
7833
7833
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -10671,7 +10671,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
10671
10671
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
10672
10672
|
void (async () => {
|
|
10673
10673
|
try {
|
|
10674
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10674
|
+
const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
|
|
10675
10675
|
await api.post("/host/heartbeat", {
|
|
10676
10676
|
host_id: hostId,
|
|
10677
10677
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -10721,7 +10721,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
10721
10721
|
}
|
|
10722
10722
|
try {
|
|
10723
10723
|
const hostId = await getHostId();
|
|
10724
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10724
|
+
const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
|
|
10725
10725
|
await api.post("/host/heartbeat", {
|
|
10726
10726
|
host_id: hostId,
|
|
10727
10727
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -11112,7 +11112,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11112
11112
|
killPairSession,
|
|
11113
11113
|
pairTmuxSession,
|
|
11114
11114
|
finalizeClaudePairOnboarding
|
|
11115
|
-
} = await import("../claude-pair-runtime-
|
|
11115
|
+
} = await import("../claude-pair-runtime-YZ2PGUW3.js");
|
|
11116
11116
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11117
11117
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11118
11118
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
package/dist/mcp/index.js
CHANGED
|
@@ -21202,6 +21202,37 @@ function describeFeatureRequestResult(resp) {
|
|
|
21202
21202
|
};
|
|
21203
21203
|
}
|
|
21204
21204
|
|
|
21205
|
+
// src/request-reconnect.ts
|
|
21206
|
+
function describeReconnectRequestResult(resp) {
|
|
21207
|
+
switch (resp.status) {
|
|
21208
|
+
case "notified":
|
|
21209
|
+
return {
|
|
21210
|
+
text: "Reconnect request sent \u2014 your manager has been notified with a reconnect link. Stop retrying the failing tool; it should start working again once the integration is reconnected.",
|
|
21211
|
+
isError: false
|
|
21212
|
+
};
|
|
21213
|
+
case "coalesced":
|
|
21214
|
+
return {
|
|
21215
|
+
text: "A reconnect request for this integration was already sent recently, so no new notification went out. Stop retrying the failing tool and wait for the reconnect.",
|
|
21216
|
+
isError: false
|
|
21217
|
+
};
|
|
21218
|
+
case "healthy":
|
|
21219
|
+
return {
|
|
21220
|
+
text: "The platform shows this integration as connected, so no reconnect request was sent. If the tool is still failing, tell your operator exactly what error you saw instead of retrying.",
|
|
21221
|
+
isError: false
|
|
21222
|
+
};
|
|
21223
|
+
case "not_reconnectable":
|
|
21224
|
+
return {
|
|
21225
|
+
text: "This integration has no reconnect path (it is not an OAuth/managed connection), so a reconnect request would not help. Tell your operator what failed so they can fix its configuration.",
|
|
21226
|
+
isError: false
|
|
21227
|
+
};
|
|
21228
|
+
default:
|
|
21229
|
+
return {
|
|
21230
|
+
text: `Could not send the reconnect request${resp.message ? `: ${resp.message}` : ""}. Tell your operator which integration is failing and don't keep retrying.`,
|
|
21231
|
+
isError: true
|
|
21232
|
+
};
|
|
21233
|
+
}
|
|
21234
|
+
}
|
|
21235
|
+
|
|
21205
21236
|
// src/form-request.ts
|
|
21206
21237
|
function describeFormRequestResult(resp) {
|
|
21207
21238
|
if (resp.ok && resp.status === "pending" && resp.request_id) {
|
|
@@ -22236,6 +22267,46 @@ server.tool(
|
|
|
22236
22267
|
return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
|
|
22237
22268
|
}
|
|
22238
22269
|
);
|
|
22270
|
+
server.tool(
|
|
22271
|
+
"request_reconnect",
|
|
22272
|
+
'Ask for one of YOUR OWN integrations to be reconnected when its tools fail with authentication/authorization errors (expired or revoked credentials, "needs re-auth", 401/403 from the provider). This notifies your human manager with a reconnect link \u2014 you cannot re-auth an integration yourself. Use it once per failing integration instead of retrying the failing tool; do NOT use it for tools you never had, for transient errors (timeouts, rate limits), or to request new integrations (use request_feature for that).',
|
|
22273
|
+
{
|
|
22274
|
+
integration: external_exports.string().min(1).max(120).describe(
|
|
22275
|
+
`The integration's id as it appears in your toolkit (e.g. "gmail", "xero", "github") \u2014 the service whose tools are failing with auth errors.`
|
|
22276
|
+
),
|
|
22277
|
+
reason: external_exports.string().min(1).max(500).describe(
|
|
22278
|
+
'Short factual description of what failed \u2014 the tool you called and the auth error you saw (e.g. "gmail search returned 401 invalid_grant"). Shown to the human who reconnects it.'
|
|
22279
|
+
)
|
|
22280
|
+
},
|
|
22281
|
+
async (params) => {
|
|
22282
|
+
if (!AGT_AGENT_CODE_NAME) {
|
|
22283
|
+
return {
|
|
22284
|
+
content: [{ type: "text", text: "Error: AGT_AGENT_CODE_NAME not configured." }],
|
|
22285
|
+
isError: true
|
|
22286
|
+
};
|
|
22287
|
+
}
|
|
22288
|
+
let resp;
|
|
22289
|
+
try {
|
|
22290
|
+
resp = await apiPost("/host/request-reconnect", {
|
|
22291
|
+
agent_code_name: AGT_AGENT_CODE_NAME,
|
|
22292
|
+
integration: params.integration,
|
|
22293
|
+
reason: params.reason
|
|
22294
|
+
});
|
|
22295
|
+
} catch (err) {
|
|
22296
|
+
return {
|
|
22297
|
+
content: [
|
|
22298
|
+
{
|
|
22299
|
+
type: "text",
|
|
22300
|
+
text: `Could not reach the reconnect-request service (${err instanceof Error ? err.message : String(err)}). Tell your operator which integration is failing.`
|
|
22301
|
+
}
|
|
22302
|
+
],
|
|
22303
|
+
isError: true
|
|
22304
|
+
};
|
|
22305
|
+
}
|
|
22306
|
+
const { text, isError } = describeReconnectRequestResult(resp);
|
|
22307
|
+
return { content: [{ type: "text", text }], ...isError ? { isError: true } : {} };
|
|
22308
|
+
}
|
|
22309
|
+
);
|
|
22239
22310
|
server.tool(
|
|
22240
22311
|
"update_identity",
|
|
22241
22312
|
"Update your OWN identity: your role, personality, description, and/or display name. Provide only the fields you want to change; omitted fields are left unchanged, and passing an empty string clears a field (display_name cannot be emptied). Your code_name never changes. Changes are saved immediately and take effect within a few minutes, on your next configuration refresh, when your guidance is regenerated. Use this to refine how you present yourself or how you behave, not for one-off tasks. Avoid changing your identity frequently.",
|
|
@@ -23506,6 +23577,9 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
23506
23577
|
// this name, so the forwarding-skip is a no-op; listed here to keep the
|
|
23507
23578
|
// lockstep guard green.
|
|
23508
23579
|
"request_feature",
|
|
23580
|
+
// ENG-7495: agent-requested integration reconnect (always registered). No
|
|
23581
|
+
// API tool shares this name; listed here to keep the lockstep guard green.
|
|
23582
|
+
"request_reconnect",
|
|
23509
23583
|
// ENG-6686: self-service identity edit (always registered). Listed here to
|
|
23510
23584
|
// keep the lockstep guard green; no API tool shares this name.
|
|
23511
23585
|
"update_identity",
|
package/dist/mcp/origami.js
CHANGED
|
@@ -39779,6 +39779,13 @@ var FLAG_REGISTRY = [
|
|
|
39779
39779
|
defaultValue: false,
|
|
39780
39780
|
envVar: "AGT_MANAGER_FAILURE_NOTIFY_ENABLED"
|
|
39781
39781
|
},
|
|
39782
|
+
{
|
|
39783
|
+
key: "agent-request-reconnect",
|
|
39784
|
+
description: "Agent-facing `request_reconnect` MCP tool (ENG-7495). When ON, POST /host/request-reconnect accepts an agent's report that one of its integrations is failing auth, validates it against the shared needsReconnect predicate, and notifies the agent's human manager with a reconnect deep link (preferred channel; falls back to the team alert channel, then owner/admin email). OFF returns a soft \"not enabled\" result to the agent. Boolean gate; ships dark.",
|
|
39785
|
+
flagType: "boolean",
|
|
39786
|
+
defaultValue: false,
|
|
39787
|
+
envVar: "AGT_AGENT_REQUEST_RECONNECT_ENABLED"
|
|
39788
|
+
},
|
|
39782
39789
|
{
|
|
39783
39790
|
key: "model-api-error-reporting",
|
|
39784
39791
|
description: "Manager reports model-API failures (529 overloaded, 429 rate-limit, 5xx, timeouts) from spawned-agent output and its own eval/memory backend calls to the AGT API, which persists them and opens a threshold alert for early warning of provider incidents (ENG-7363). Boolean gate; ships dark. Materialized to the host flags-cache.",
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
writeDirectChatSessionState,
|
|
37
37
|
writeEgressAllowlist,
|
|
38
38
|
writePersistentClaudeWrapper
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MWKR6B3T.js";
|
|
40
40
|
import "./chunk-XWVM4KPK.js";
|
|
41
41
|
export {
|
|
42
42
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
writeEgressAllowlist,
|
|
78
78
|
writePersistentClaudeWrapper
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=persistent-session-
|
|
80
|
+
//# sourceMappingURL=persistent-session-K5RJ4BVF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MWKR6B3T.js";
|
|
4
4
|
import "./chunk-XWVM4KPK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/responsiveness-probe.ts
|
|
@@ -418,4 +418,4 @@ export {
|
|
|
418
418
|
readAndResetSlackReplyBindingClassifications,
|
|
419
419
|
readAndResetSlackReplyTargetClassifications
|
|
420
420
|
};
|
|
421
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
421
|
+
//# sourceMappingURL=responsiveness-probe-2PHY7QKJ.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|