@integrity-labs/agt-cli 0.28.268 → 0.28.270
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-PA3PWATY.js → chunk-ND4BBPV5.js} +8 -4
- package/dist/{chunk-PA3PWATY.js.map → chunk-ND4BBPV5.js.map} +1 -1
- package/dist/{chunk-GBVZDTCB.js → chunk-RH4FTCZK.js} +30 -5
- package/dist/chunk-RH4FTCZK.js.map +1 -0
- package/dist/{claude-pair-runtime-CXIVEO6R.js → claude-pair-runtime-WZLKWP74.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/mcp/origami.js +16 -3
- package/dist/mcp/remote-oauth-proxy.js +66 -0
- package/dist/mcp/telegram-channel.js +262 -23
- package/dist/{persistent-session-FGGXFAJH.js → persistent-session-FMFTNDJO.js} +2 -2
- package/dist/{responsiveness-probe-2734PYS6.js → responsiveness-probe-FPTBS6RZ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-GBVZDTCB.js.map +0 -1
- /package/dist/{claude-pair-runtime-CXIVEO6R.js.map → claude-pair-runtime-WZLKWP74.js.map} +0 -0
- /package/dist/{persistent-session-FGGXFAJH.js.map → persistent-session-FMFTNDJO.js.map} +0 -0
- /package/dist/{responsiveness-probe-2734PYS6.js.map → responsiveness-probe-FPTBS6RZ.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-FMFTNDJO.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-WZLKWP74.js.map
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
requireHost,
|
|
39
39
|
safeWriteJsonAtomic,
|
|
40
40
|
setConfigHash
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-ND4BBPV5.js";
|
|
42
42
|
import {
|
|
43
43
|
getProjectDir as getProjectDir2,
|
|
44
44
|
getReadyTasks,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
takeZombieDetection,
|
|
124
124
|
transcriptActivityAgeSeconds,
|
|
125
125
|
writeEgressAllowlist
|
|
126
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-RH4FTCZK.js";
|
|
127
127
|
import {
|
|
128
128
|
reapOrphanChannelMcps
|
|
129
129
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -6700,7 +6700,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6700
6700
|
var lastVersionCheckAt = 0;
|
|
6701
6701
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6702
6702
|
var lastResponsivenessProbeAt = 0;
|
|
6703
|
-
var agtCliVersion = true ? "0.28.
|
|
6703
|
+
var agtCliVersion = true ? "0.28.270" : "dev";
|
|
6704
6704
|
function resolveBrewPath(execFileSync2) {
|
|
6705
6705
|
try {
|
|
6706
6706
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7550,7 +7550,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
7550
7550
|
if (codeNames.length === 0) return;
|
|
7551
7551
|
void (async () => {
|
|
7552
7552
|
try {
|
|
7553
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7553
|
+
const { collectDiagnostics } = await import("../persistent-session-FMFTNDJO.js");
|
|
7554
7554
|
await api.post("/host/heartbeat", {
|
|
7555
7555
|
host_id: hostId,
|
|
7556
7556
|
agent_diagnostics: collectDiagnostics(codeNames)
|
|
@@ -7648,7 +7648,7 @@ async function pollCycle() {
|
|
|
7648
7648
|
}
|
|
7649
7649
|
try {
|
|
7650
7650
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
7651
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
7651
|
+
const { collectDiagnostics } = await import("../persistent-session-FMFTNDJO.js");
|
|
7652
7652
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
7653
7653
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
7654
7654
|
let tailscaleHostname;
|
|
@@ -7796,7 +7796,7 @@ async function pollCycle() {
|
|
|
7796
7796
|
const {
|
|
7797
7797
|
collectResponsivenessProbes,
|
|
7798
7798
|
getResponsivenessIntervalMs
|
|
7799
|
-
} = await import("../responsiveness-probe-
|
|
7799
|
+
} = await import("../responsiveness-probe-FPTBS6RZ.js");
|
|
7800
7800
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
7801
7801
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
7802
7802
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -7828,7 +7828,7 @@ async function pollCycle() {
|
|
|
7828
7828
|
collectResponsivenessProbes,
|
|
7829
7829
|
livePendingInboundOldestAgeSeconds,
|
|
7830
7830
|
parkPendingInbound
|
|
7831
|
-
} = await import("../responsiveness-probe-
|
|
7831
|
+
} = await import("../responsiveness-probe-FPTBS6RZ.js");
|
|
7832
7832
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
7833
7833
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
7834
7834
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -10686,7 +10686,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
10686
10686
|
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}`));
|
|
10687
10687
|
void (async () => {
|
|
10688
10688
|
try {
|
|
10689
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10689
|
+
const { collectDiagnostics } = await import("../persistent-session-FMFTNDJO.js");
|
|
10690
10690
|
await api.post("/host/heartbeat", {
|
|
10691
10691
|
host_id: hostId,
|
|
10692
10692
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -10736,7 +10736,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
10736
10736
|
}
|
|
10737
10737
|
try {
|
|
10738
10738
|
const hostId = await getHostId();
|
|
10739
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10739
|
+
const { collectDiagnostics } = await import("../persistent-session-FMFTNDJO.js");
|
|
10740
10740
|
await api.post("/host/heartbeat", {
|
|
10741
10741
|
host_id: hostId,
|
|
10742
10742
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -11127,7 +11127,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11127
11127
|
killPairSession,
|
|
11128
11128
|
pairTmuxSession,
|
|
11129
11129
|
finalizeClaudePairOnboarding
|
|
11130
|
-
} = await import("../claude-pair-runtime-
|
|
11130
|
+
} = await import("../claude-pair-runtime-WZLKWP74.js");
|
|
11131
11131
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11132
11132
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11133
11133
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
package/dist/mcp/origami.js
CHANGED
|
@@ -38739,13 +38739,13 @@ var INTEGRATION_REGISTRY = [
|
|
|
38739
38739
|
id: "image-gen",
|
|
38740
38740
|
name: "Image Generation",
|
|
38741
38741
|
category: "media",
|
|
38742
|
-
description: "AI image generation
|
|
38742
|
+
description: "AI image generation from a text prompt. An agent passes a prompt to generate_image and gets back a generated raster image, which it can deliver to a chat channel or embed on an Augmented Live page (ENG-7535). Augmented Team manages the model access for you - there is no key to enter. Generation runs through the Vercel AI Gateway (OpenAI gpt-image-2 today). It is a PREMIUM, usage-billed capability: gated on a per-org opt-in and a monthly USD budget, and metered per generated image.",
|
|
38743
38743
|
// No vendor key to enter: Augmented owns the shared Vercel AI Gateway virtual
|
|
38744
38744
|
// key (AI_GATEWAY_API_KEY) that fronts the image providers, so auth is `none`
|
|
38745
38745
|
// (customers never enter a key), same as ElevenLabs.
|
|
38746
38746
|
supported_auth_types: ["none"],
|
|
38747
38747
|
capabilities: [
|
|
38748
|
-
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt
|
|
38748
|
+
{ id: "image-gen:generate", name: "Generate Image", description: "Generate a raster image from a text prompt (generate_image), deliverable to a chat channel or an Augmented Live page", access: "write" }
|
|
38749
38749
|
],
|
|
38750
38750
|
docs_url: "https://platform.openai.com/docs/guides/images",
|
|
38751
38751
|
beta: true,
|
|
@@ -38762,7 +38762,7 @@ var INTEGRATION_REGISTRY = [
|
|
|
38762
38762
|
// declared here; the handler fails CLOSED when the deployed model maps to an
|
|
38763
38763
|
// undeclared meter, so a version bump without a rate card refuses rather than
|
|
38764
38764
|
// silently disabling the budget. Adding a model = declare its meter here + seed
|
|
38765
|
-
// its rate card + add a normalizer entry in
|
|
38765
|
+
// its rate card + add a normalizer entry in image-generation.ts.
|
|
38766
38766
|
premium: {
|
|
38767
38767
|
pricing: "usage",
|
|
38768
38768
|
note: "Billed per generated image; the rate depends on the model/version used.",
|
|
@@ -40033,6 +40033,19 @@ var FLAG_REGISTRY = [
|
|
|
40033
40033
|
// env var is retired.
|
|
40034
40034
|
envVar: "AUGMENTED_CONNECTIVITY_ESCALATION_ENABLED"
|
|
40035
40035
|
},
|
|
40036
|
+
{
|
|
40037
|
+
key: "managed-health-connectivity-flip",
|
|
40038
|
+
description: "Arm the managed-connection-health status flip on data-plane hard-down (ENG-7539). When on, the managed-connection-health cron flips a managed integration to needs_reauth when the host-side connectivity probe reports a sustained hard-down (consecutive_connectivity_failures at/over the hysteresis threshold with a down observation), even if Composio account-status still reads ACTIVE. When off it keeps the pre-ENG-7539 behaviour: status is driven only by the account-status probe, so a live 401 behind an ACTIVE account never flips status. Boolean gate; ships dark. Sibling of integration-connectivity-escalation: that flag arms the alert; this flag arms the status flip plus the reconnect notification.",
|
|
40039
|
+
flagType: "boolean",
|
|
40040
|
+
// Declared safe value is `false` (no auto status flip). It preserves the
|
|
40041
|
+
// pre-ENG-7539 fleet behaviour where managed status derives solely from the
|
|
40042
|
+
// account-status probe, so merging this dark changes nothing until an
|
|
40043
|
+
// operator arms it per-stage from the admin Feature Flags page. `false` is
|
|
40044
|
+
// also the fail-safe direction: a flag-DB read error must never start
|
|
40045
|
+
// flipping statuses (and firing reconnect notifications) on its own. No env
|
|
40046
|
+
// override - this is a net-new gate, so it is registry-only (ADR-0022).
|
|
40047
|
+
defaultValue: false
|
|
40048
|
+
},
|
|
40036
40049
|
{
|
|
40037
40050
|
key: "projects-menu",
|
|
40038
40051
|
description: "Show the Projects nav item in the webapp (ADR-0017 Projects soft launch, ENG-6342). Replaces the isAdmin/adminOnly gate with a per-org rollout flag.",
|
|
@@ -11,16 +11,38 @@ var URL_ENV = "AGT_REMOTE_MCP_URL";
|
|
|
11
11
|
var TOKEN_FILE_ENV = "AGT_REMOTE_MCP_TOKEN_FILE";
|
|
12
12
|
var TOKEN_VAR_ENV = "AGT_REMOTE_MCP_TOKEN_VAR";
|
|
13
13
|
var ALLOWLIST_ENV = "AGT_REMOTE_MCP_TOOL_ALLOWLIST";
|
|
14
|
+
var PREENABLE_ENV = "AGT_REMOTE_MCP_PREENABLE_TOOLSETS";
|
|
14
15
|
var REMOTE_FETCH_TIMEOUT_MS = 3e4;
|
|
15
16
|
var remoteUrl = process.env[URL_ENV] ?? "";
|
|
16
17
|
var tokenFile = process.env[TOKEN_FILE_ENV] ?? "";
|
|
17
18
|
var tokenVar = process.env[TOKEN_VAR_ENV] ?? "";
|
|
18
19
|
var label = process.env["AGT_REMOTE_MCP_LABEL"] || tokenVar || "remote-oauth";
|
|
19
20
|
var toolAllowlist = parseToolAllowlist(process.env[ALLOWLIST_ENV] ?? "");
|
|
21
|
+
var preEnableToolsets = parsePreEnableToolsets(process.env[PREENABLE_ENV] ?? "");
|
|
20
22
|
function logErr(msg) {
|
|
21
23
|
process.stderr.write(`[remote-oauth-proxy:${label}] ${msg}
|
|
22
24
|
`);
|
|
23
25
|
}
|
|
26
|
+
function parsePreEnableToolsets(raw) {
|
|
27
|
+
const seen = /* @__PURE__ */ new Set();
|
|
28
|
+
const out = [];
|
|
29
|
+
for (const part of (raw || "").split(",")) {
|
|
30
|
+
const name = part.trim();
|
|
31
|
+
if (name && !seen.has(name)) {
|
|
32
|
+
seen.add(name);
|
|
33
|
+
out.push(name);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
function buildEnableToolsetRequest(toolset) {
|
|
39
|
+
return JSON.stringify({
|
|
40
|
+
jsonrpc: "2.0",
|
|
41
|
+
id: `agt-preenable-${toolset}`,
|
|
42
|
+
method: "tools/call",
|
|
43
|
+
params: { name: "enable_toolset", arguments: { name: toolset } }
|
|
44
|
+
});
|
|
45
|
+
}
|
|
24
46
|
function parseToolAllowlist(raw) {
|
|
25
47
|
const out = /* @__PURE__ */ new Set();
|
|
26
48
|
for (const part of (raw || "").split(",")) {
|
|
@@ -104,12 +126,54 @@ function extractJsonRpcMessages(contentType, body) {
|
|
|
104
126
|
}
|
|
105
127
|
return out;
|
|
106
128
|
}
|
|
129
|
+
var preEnabledOnce = null;
|
|
130
|
+
function ensurePreEnabled(token) {
|
|
131
|
+
if (preEnabledOnce) return preEnabledOnce;
|
|
132
|
+
preEnabledOnce = Promise.allSettled(
|
|
133
|
+
preEnableToolsets.map(async (name) => {
|
|
134
|
+
const res = await fetch(remoteUrl, {
|
|
135
|
+
method: "POST",
|
|
136
|
+
headers: {
|
|
137
|
+
"Content-Type": "application/json",
|
|
138
|
+
Accept: "application/json, text/event-stream",
|
|
139
|
+
Authorization: `Bearer ${token}`
|
|
140
|
+
},
|
|
141
|
+
body: buildEnableToolsetRequest(name),
|
|
142
|
+
signal: AbortSignal.timeout(REMOTE_FETCH_TIMEOUT_MS)
|
|
143
|
+
});
|
|
144
|
+
const body = await res.text().catch(() => "");
|
|
145
|
+
if (!res.ok) {
|
|
146
|
+
throw new Error(`HTTP ${res.status}${body ? ` (${body.slice(0, 200).replace(/\s+/g, " ").trim()})` : ""}`);
|
|
147
|
+
}
|
|
148
|
+
let rpcError;
|
|
149
|
+
try {
|
|
150
|
+
rpcError = JSON.parse(body)?.error?.message;
|
|
151
|
+
} catch {
|
|
152
|
+
}
|
|
153
|
+
if (rpcError) throw new Error(rpcError);
|
|
154
|
+
return name;
|
|
155
|
+
})
|
|
156
|
+
).then((results) => {
|
|
157
|
+
results.forEach((r, i) => {
|
|
158
|
+
const name = preEnableToolsets[i];
|
|
159
|
+
if (r.status === "fulfilled") {
|
|
160
|
+
logErr(`pre-enabled toolset "${name}"`);
|
|
161
|
+
} else {
|
|
162
|
+
logErr(`pre-enable toolset "${name}" failed: ${r.reason.message}`);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
return preEnabledOnce;
|
|
167
|
+
}
|
|
107
168
|
async function forward(line, id, isNotification, method) {
|
|
108
169
|
const token = readCurrentToken(tokenFile, tokenVar);
|
|
109
170
|
if (!token) {
|
|
110
171
|
logErr(`no token in ${tokenFile} (var ${tokenVar})`);
|
|
111
172
|
return isNotification ? [] : [jsonRpcError(id, -32e3, `${label}: no current access token available (reconnect the integration)`)];
|
|
112
173
|
}
|
|
174
|
+
if (method === "tools/list" && preEnableToolsets.length > 0) {
|
|
175
|
+
await ensurePreEnabled(token);
|
|
176
|
+
}
|
|
113
177
|
let res;
|
|
114
178
|
try {
|
|
115
179
|
res = await fetch(remoteUrl, {
|
|
@@ -224,10 +288,12 @@ if (invokedDirectly) {
|
|
|
224
288
|
void main();
|
|
225
289
|
}
|
|
226
290
|
export {
|
|
291
|
+
buildEnableToolsetRequest,
|
|
227
292
|
extractJsonRpcMessages,
|
|
228
293
|
filterToolsListMessage,
|
|
229
294
|
isToolCallBlocked,
|
|
230
295
|
main,
|
|
296
|
+
parsePreEnableToolsets,
|
|
231
297
|
parseToolAllowlist,
|
|
232
298
|
readCurrentToken
|
|
233
299
|
};
|