@integrity-labs/agt-cli 0.28.1254 → 0.28.1255
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/{api-client-EW7NBMWI.js → api-client-QWPG4CTP.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-AZOT5URF.js → chunk-FHBQ567A.js} +2 -2
- package/dist/{chunk-EWD3K6YD.js → chunk-JNG5SRQC.js} +1 -1
- package/dist/chunk-JNG5SRQC.js.map +1 -0
- package/dist/{chunk-SEXB6LTM.js → chunk-JZFSKDEJ.js} +15 -13
- package/dist/chunk-JZFSKDEJ.js.map +1 -0
- package/dist/{chunk-FD3GWWVL.js → chunk-M4IKX2W2.js} +3 -3
- package/dist/{chunk-ZKLOPCWS.js → chunk-YRKZIOZ4.js} +56 -9
- package/dist/{chunk-ZKLOPCWS.js.map → chunk-YRKZIOZ4.js.map} +1 -1
- package/dist/{chunk-ZDON4IXL.js → chunk-ZGG6D257.js} +2 -2
- package/dist/{claude-code-updater-CHEL6LOF.js → claude-code-updater-DE7N7KAQ.js} +3 -3
- package/dist/{claude-pair-runtime-AGJH54AR.js → claude-pair-runtime-NNQOJHPB.js} +3 -3
- package/dist/lib/manager-worker.js +29 -22
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-HQPQPNPK.js → persistent-session-JR6TQJXM.js} +4 -4
- package/dist/{responsiveness-probe-6GNSPLD2.js → responsiveness-probe-MOGAXCXI.js} +4 -4
- package/dist/{session-auth-dead-4Z24MU6C.js → session-auth-dead-KZ7BTXYR.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-EWD3K6YD.js.map +0 -1
- package/dist/chunk-SEXB6LTM.js.map +0 -1
- /package/dist/{api-client-EW7NBMWI.js.map → api-client-QWPG4CTP.js.map} +0 -0
- /package/dist/{chunk-AZOT5URF.js.map → chunk-FHBQ567A.js.map} +0 -0
- /package/dist/{chunk-FD3GWWVL.js.map → chunk-M4IKX2W2.js.map} +0 -0
- /package/dist/{chunk-ZDON4IXL.js.map → chunk-ZGG6D257.js.map} +0 -0
- /package/dist/{claude-code-updater-CHEL6LOF.js.map → claude-code-updater-DE7N7KAQ.js.map} +0 -0
- /package/dist/{claude-pair-runtime-AGJH54AR.js.map → claude-pair-runtime-NNQOJHPB.js.map} +0 -0
- /package/dist/{persistent-session-HQPQPNPK.js.map → persistent-session-JR6TQJXM.js.map} +0 -0
- /package/dist/{responsiveness-probe-6GNSPLD2.js.map → responsiveness-probe-MOGAXCXI.js.map} +0 -0
- /package/dist/{session-auth-dead-4Z24MU6C.js.map → session-auth-dead-KZ7BTXYR.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_ROTATE_KEY_CONFLICT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JNG5SRQC.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/config.ts
|
|
6
6
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/lib/api-client.ts
|
|
106
|
-
var agtCliVersion = true ? "0.28.
|
|
106
|
+
var agtCliVersion = true ? "0.28.1255" : "dev";
|
|
107
107
|
var lastConfigHash = null;
|
|
108
108
|
function setConfigHash(hash) {
|
|
109
109
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
api,
|
|
469
469
|
getHostId
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-M4IKX2W2.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZGG6D257.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
remoteMcpConnectionEnvInfix,
|
|
52
52
|
remoteMcpConnectionLabel,
|
|
53
53
|
remoteMcpConnectionScopedEnvVar
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-JNG5SRQC.js";
|
|
55
55
|
import {
|
|
56
56
|
CLAUDE_CONFIG_DIR_ENV,
|
|
57
57
|
approveApiKeyInClaudeConfig,
|
|
@@ -1088,6 +1088,23 @@ function hasGatedTool(tiers) {
|
|
|
1088
1088
|
return true;
|
|
1089
1089
|
return Object.values(tiers).some((tier) => !isAutoTier(tier));
|
|
1090
1090
|
}
|
|
1091
|
+
function remoteMcpToolAllowlist(spec) {
|
|
1092
|
+
const raw = spec?.tool_allowlist;
|
|
1093
|
+
if (!Array.isArray(raw))
|
|
1094
|
+
return null;
|
|
1095
|
+
const names = raw.filter((n) => typeof n === "string" && n.trim() !== "" && !n.includes(",")).map((n) => n.trim());
|
|
1096
|
+
return names.length > 0 ? names : null;
|
|
1097
|
+
}
|
|
1098
|
+
function hasUnusableToolAllowlist(spec) {
|
|
1099
|
+
return hasToolAllowlistField(spec) && remoteMcpToolAllowlist(spec) === null;
|
|
1100
|
+
}
|
|
1101
|
+
function hasToolAllowlistField(spec) {
|
|
1102
|
+
return Array.isArray(spec?.tool_allowlist);
|
|
1103
|
+
}
|
|
1104
|
+
function toolAllowlistEnv(spec) {
|
|
1105
|
+
const names = remoteMcpToolAllowlist(spec);
|
|
1106
|
+
return names ? { [REMOTE_MCP_PROXY_ENV.toolAllowlist]: names.join(",") } : {};
|
|
1107
|
+
}
|
|
1091
1108
|
function toolTiersEnv(tiers) {
|
|
1092
1109
|
if (!tiers)
|
|
1093
1110
|
return {};
|
|
@@ -1097,6 +1114,10 @@ function buildLiveHeaderRemoteMcpProxyEntry(definitionId, dbSpec, paths, connect
|
|
|
1097
1114
|
const spec = dbSpec ?? INTEGRATION_REGISTRY.find((d) => d.id === definitionId)?.remoteMcp;
|
|
1098
1115
|
if (!spec?.liveHeaderRefresh)
|
|
1099
1116
|
return null;
|
|
1117
|
+
if (hasUnusableToolAllowlist(spec))
|
|
1118
|
+
return null;
|
|
1119
|
+
if (requiresRemoteMcpToolGate(definitionId, spec) && toolTiers == null)
|
|
1120
|
+
return null;
|
|
1100
1121
|
assertSafeRemoteMcpUrl(spec.url, definitionId);
|
|
1101
1122
|
if (!spec.auth || spec.auth.scheme !== "header" || !spec.auth.header_name) {
|
|
1102
1123
|
throw new Error(`remoteMcp.liveHeaderRefresh for '${definitionId}' requires a header-scheme 'auth' with a header_name`);
|
|
@@ -1121,7 +1142,9 @@ function buildLiveHeaderRemoteMcpProxyEntry(definitionId, dbSpec, paths, connect
|
|
|
1121
1142
|
// ENG-10614: the catalogued HITL floors. anchor-browser reaches the proxy
|
|
1122
1143
|
// via this branch, so this is where its one gated tool
|
|
1123
1144
|
// (`anchor_network_requests`, write_high_risk) starts being enforced.
|
|
1124
|
-
...toolTiersEnv(toolTiers)
|
|
1145
|
+
...toolTiersEnv(toolTiers),
|
|
1146
|
+
// ENG-11915: the granted-tool allowlist, when a scope is denied.
|
|
1147
|
+
...toolAllowlistEnv(spec)
|
|
1125
1148
|
}
|
|
1126
1149
|
};
|
|
1127
1150
|
}
|
|
@@ -1176,16 +1199,36 @@ function requiresRemoteMcpToolGate(definitionId, dbSpec) {
|
|
|
1176
1199
|
const spec = dbSpec ?? INTEGRATION_REGISTRY.find((d) => d.id === definitionId)?.remoteMcp;
|
|
1177
1200
|
return spec?.requireToolTiers === true;
|
|
1178
1201
|
}
|
|
1202
|
+
function mustNotRenderDirectRemoteMcp(definitionId, dbSpec) {
|
|
1203
|
+
if (requiresRemoteMcpToolGate(definitionId, dbSpec))
|
|
1204
|
+
return true;
|
|
1205
|
+
const spec = dbSpec ?? INTEGRATION_REGISTRY.find((d) => d.id === definitionId)?.remoteMcp;
|
|
1206
|
+
return hasToolAllowlistField(spec);
|
|
1207
|
+
}
|
|
1208
|
+
function withheldRemoteMcpReasonFor(integration) {
|
|
1209
|
+
if (integration.remoteMcp?.requireToolTiers === true && integration.toolTiers == null)
|
|
1210
|
+
return "no_tier_table";
|
|
1211
|
+
if (hasToolAllowlistField(integration.remoteMcp))
|
|
1212
|
+
return "tool_allowlist_unrendered";
|
|
1213
|
+
return integration.toolTiers == null ? "no_tier_table" : "no_gated_tool";
|
|
1214
|
+
}
|
|
1179
1215
|
function withheldRemoteMcpMessage(definitionId, reason) {
|
|
1216
|
+
if (reason === "tool_allowlist_unrendered") {
|
|
1217
|
+
return `[provisioning] ENG-11915: remote MCP '${definitionId}' WITHHELD: the agent was granted only some of its scopes, which only the remote-MCP proxy can enforce, and no proxy entry could be rendered. It gets no entry rather than one serving the denied scopes' tools.`;
|
|
1218
|
+
}
|
|
1180
1219
|
const why = reason === "no_tier_table" ? "no tool tier table arrived this cycle (did the tool_definitions read fail?)" : reason === "no_gated_tool" ? "its tier table has no gated tool, so no proxy was rendered" : "this framework cannot gate remote MCPs";
|
|
1181
1220
|
return `[provisioning] CS-1561: remote MCP '${definitionId}' WITHHELD: it requires its tool tier gate and ${why}. It gets no entry rather than an ungated one, so the agent has no ${definitionId} tools until this clears.`;
|
|
1182
1221
|
}
|
|
1183
1222
|
function buildApiKeyRemoteMcpProxyEntry(definitionId, dbSpec, paths, connectionKey, toolTiers) {
|
|
1184
|
-
if (!hasGatedTool(toolTiers))
|
|
1185
|
-
return null;
|
|
1186
1223
|
const spec = dbSpec ?? INTEGRATION_REGISTRY.find((d) => d.id === definitionId)?.remoteMcp;
|
|
1187
1224
|
if (!spec)
|
|
1188
1225
|
return null;
|
|
1226
|
+
if (hasUnusableToolAllowlist(spec))
|
|
1227
|
+
return null;
|
|
1228
|
+
if (!hasGatedTool(toolTiers) && remoteMcpToolAllowlist(spec) === null)
|
|
1229
|
+
return null;
|
|
1230
|
+
if (requiresRemoteMcpToolGate(definitionId, spec) && toolTiers == null)
|
|
1231
|
+
return null;
|
|
1189
1232
|
if (spec.liveHeaderRefresh)
|
|
1190
1233
|
return null;
|
|
1191
1234
|
if (!spec.auth?.credential_ref)
|
|
@@ -1215,7 +1258,8 @@ function buildApiKeyRemoteMcpProxyEntry(definitionId, dbSpec, paths, connectionK
|
|
|
1215
1258
|
AGT_REMOTE_MCP_LABEL: remoteMcpConnectionLabel(definitionId, connectionKey),
|
|
1216
1259
|
...scheme === "header" && spec.auth.header_name ? { AGT_REMOTE_MCP_AUTH_HEADER: spec.auth.header_name } : {},
|
|
1217
1260
|
...extraPairs.length > 0 ? { AGT_REMOTE_MCP_EXTRA_HEADERS: extraPairs.join(",") } : {},
|
|
1218
|
-
...toolTiersEnv(toolTiers)
|
|
1261
|
+
...toolTiersEnv(toolTiers),
|
|
1262
|
+
...toolAllowlistEnv(spec)
|
|
1219
1263
|
}
|
|
1220
1264
|
};
|
|
1221
1265
|
}
|
|
@@ -1352,8 +1396,8 @@ function buildOpencodeIntegrationServers(integrations, ctx) {
|
|
|
1352
1396
|
}
|
|
1353
1397
|
for (const integration of integrations) {
|
|
1354
1398
|
const def = INTEGRATION_REGISTRY.find((d) => d.id === integration.definition_id);
|
|
1355
|
-
if (
|
|
1356
|
-
console.error(withheldRemoteMcpMessage(integration.definition_id, "framework_cannot_gate"));
|
|
1399
|
+
if (mustNotRenderDirectRemoteMcp(integration.definition_id, integration.remoteMcp ?? null)) {
|
|
1400
|
+
console.error(withheldRemoteMcpMessage(integration.definition_id, hasToolAllowlistField(integration.remoteMcp ?? null) ? "tool_allowlist_unrendered" : "framework_cannot_gate"));
|
|
1357
1401
|
continue;
|
|
1358
1402
|
}
|
|
1359
1403
|
const remote = buildRemoteMcpEntry(integration.definition_id, integration.remoteMcp ?? null);
|
|
@@ -6093,9 +6137,12 @@ export {
|
|
|
6093
6137
|
PLATFORM_DENY_PERMISSIONS,
|
|
6094
6138
|
agentTmpDirFor,
|
|
6095
6139
|
buildRemoteMcpEntry,
|
|
6140
|
+
hasToolAllowlistField,
|
|
6096
6141
|
buildLiveHeaderRemoteMcpProxyEntry,
|
|
6097
6142
|
buildOAuthRemoteMcpProxyEntry,
|
|
6098
6143
|
requiresRemoteMcpToolGate,
|
|
6144
|
+
mustNotRenderDirectRemoteMcp,
|
|
6145
|
+
withheldRemoteMcpReasonFor,
|
|
6099
6146
|
withheldRemoteMcpMessage,
|
|
6100
6147
|
buildApiKeyRemoteMcpProxyEntry,
|
|
6101
6148
|
buildNativeMcpEntry,
|
|
@@ -6230,4 +6277,4 @@ export {
|
|
|
6230
6277
|
stopAllSessionsAndWait,
|
|
6231
6278
|
getProjectDir
|
|
6232
6279
|
};
|
|
6233
|
-
//# sourceMappingURL=chunk-
|
|
6280
|
+
//# sourceMappingURL=chunk-YRKZIOZ4.js.map
|