@integrity-labs/agt-cli 0.28.1218 → 0.28.1220
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 +6 -6
- package/dist/{chunk-2TSVU3OU.js → chunk-QAQIUHMS.js} +32 -17
- package/dist/{chunk-2TSVU3OU.js.map → chunk-QAQIUHMS.js.map} +1 -1
- package/dist/{chunk-F5R622EX.js → chunk-QGBIF6QK.js} +3 -3
- package/dist/{chunk-MJXBNSJY.js → chunk-R7UGBRUR.js} +12 -1
- package/dist/{chunk-MJXBNSJY.js.map → chunk-R7UGBRUR.js.map} +1 -1
- package/dist/{chunk-QI5C2VCI.js → chunk-WXJXO5TE.js} +2 -2
- package/dist/{chunk-HAQXH2J4.js → chunk-YR5PKAAL.js} +2 -2
- package/dist/{claude-code-updater-XZTIAQQ3.js → claude-code-updater-FWBF4JTA.js} +3 -3
- package/dist/{claude-pair-runtime-N7TZVTF7.js → claude-pair-runtime-6BSR5RTE.js} +3 -3
- package/dist/lib/manager-worker.js +127 -28
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +11 -0
- package/dist/mcp/index.js +177 -19
- package/dist/mcp/origami.js +11 -0
- package/dist/mcp/slack-channel.js +11 -0
- package/dist/mcp/telegram-channel.js +11 -0
- package/dist/{persistent-session-NQMAJQF2.js → persistent-session-YMVE4OG5.js} +4 -4
- package/dist/{responsiveness-probe-JGMZCQCI.js → responsiveness-probe-DD7LCTAS.js} +4 -4
- package/dist/{session-auth-dead-DPMMX7QL.js → session-auth-dead-QZOUWP4O.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-F5R622EX.js.map → chunk-QGBIF6QK.js.map} +0 -0
- /package/dist/{chunk-QI5C2VCI.js.map → chunk-WXJXO5TE.js.map} +0 -0
- /package/dist/{chunk-HAQXH2J4.js.map → chunk-YR5PKAAL.js.map} +0 -0
- /package/dist/{claude-code-updater-XZTIAQQ3.js.map → claude-code-updater-FWBF4JTA.js.map} +0 -0
- /package/dist/{claude-pair-runtime-N7TZVTF7.js.map → claude-pair-runtime-6BSR5RTE.js.map} +0 -0
- /package/dist/{persistent-session-NQMAJQF2.js.map → persistent-session-YMVE4OG5.js.map} +0 -0
- /package/dist/{responsiveness-probe-JGMZCQCI.js.map → responsiveness-probe-DD7LCTAS.js.map} +0 -0
- /package/dist/{session-auth-dead-DPMMX7QL.js.map → session-auth-dead-QZOUWP4O.js.map} +0 -0
|
@@ -44791,6 +44791,17 @@ var FLAG_REGISTRY = [
|
|
|
44791
44791
|
defaultValue: false,
|
|
44792
44792
|
envVar: "AGT_SESSION_TOOL_PROBE_ENABLED"
|
|
44793
44793
|
},
|
|
44794
|
+
{
|
|
44795
|
+
key: "mcp-tool-rediscovery",
|
|
44796
|
+
description: "Slow re-check of the forwarded tool list on a healthy `augmented` MCP server (ENG-11708): every 30 minutes, with jitter, per running session. It heals tools lost to a broker that failed closed, which returns an empty list and looks healthy. Adds tools only and never removes one. Boolean gate; ships dark because it adds per-session database load to every healthy session, so canary a host first. Turning it off does not stop the load from unhealthy sessions: one with a failed or partial discovery, or a tool that has not registered, retries without this flag and settles at the same 30-minute full discovery until it recovers or restarts. AGT_MCP_TOOL_REDISCOVERY_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
44797
|
+
flagType: "boolean",
|
|
44798
|
+
defaultValue: false,
|
|
44799
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
44800
|
+
// DELIBERATE UNREACHABLE PLACEHOLDER, as on the entries above: the first agt-cli
|
|
44801
|
+
// carrying this reader is not knowable before merge, and a low guess would promise
|
|
44802
|
+
// reach to hosts without it. Replace with the real version once it publishes.
|
|
44803
|
+
since: "0.29.0"
|
|
44804
|
+
},
|
|
44794
44805
|
{
|
|
44795
44806
|
key: "session-tool-rebind",
|
|
44796
44807
|
description: "Auto-rebind MCP tools that fell out of a running session (ENG-7318, ENG-7053 Slice A). When ON, the session-tool-bind probe does not just report a hard-negative verdict - the manager SIGTERMs just that integration's MCP child so Claude Code's transport respawns it (no full agent restart, conversation context preserved). Fires on `missing` (a dead stdio/proxy child - the ENG-7301/Phil case) and on `unreachable` (an alive ENG-6859 OAuth-proxy child whose upstream stopped answering tools/list after a token rotated under the live session - the ENG-7318/Pepper case). Requires the `session-tool-probe` flag (it consumes that probe's verdict). The reap is debounced (the probe's ~1h cadence plus a per-integration cooldown) so a persistently-broken integration is rebound at most once per window, never every cycle. Boolean gate; ships dark - canary per host (agt-aws-1) before any fleet flip. AGT_SESSION_TOOL_REBIND_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
package/dist/mcp/index.js
CHANGED
|
@@ -30473,6 +30473,17 @@ var FLAG_REGISTRY = [
|
|
|
30473
30473
|
defaultValue: false,
|
|
30474
30474
|
envVar: "AGT_SESSION_TOOL_PROBE_ENABLED"
|
|
30475
30475
|
},
|
|
30476
|
+
{
|
|
30477
|
+
key: "mcp-tool-rediscovery",
|
|
30478
|
+
description: "Slow re-check of the forwarded tool list on a healthy `augmented` MCP server (ENG-11708): every 30 minutes, with jitter, per running session. It heals tools lost to a broker that failed closed, which returns an empty list and looks healthy. Adds tools only and never removes one. Boolean gate; ships dark because it adds per-session database load to every healthy session, so canary a host first. Turning it off does not stop the load from unhealthy sessions: one with a failed or partial discovery, or a tool that has not registered, retries without this flag and settles at the same 30-minute full discovery until it recovers or restarts. AGT_MCP_TOOL_REDISCOVERY_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
30479
|
+
flagType: "boolean",
|
|
30480
|
+
defaultValue: false,
|
|
30481
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
30482
|
+
// DELIBERATE UNREACHABLE PLACEHOLDER, as on the entries above: the first agt-cli
|
|
30483
|
+
// carrying this reader is not knowable before merge, and a low guess would promise
|
|
30484
|
+
// reach to hosts without it. Replace with the real version once it publishes.
|
|
30485
|
+
since: "0.29.0"
|
|
30486
|
+
},
|
|
30476
30487
|
{
|
|
30477
30488
|
key: "session-tool-rebind",
|
|
30478
30489
|
description: "Auto-rebind MCP tools that fell out of a running session (ENG-7318, ENG-7053 Slice A). When ON, the session-tool-bind probe does not just report a hard-negative verdict - the manager SIGTERMs just that integration's MCP child so Claude Code's transport respawns it (no full agent restart, conversation context preserved). Fires on `missing` (a dead stdio/proxy child - the ENG-7301/Phil case) and on `unreachable` (an alive ENG-6859 OAuth-proxy child whose upstream stopped answering tools/list after a token rotated under the live session - the ENG-7318/Pepper case). Requires the `session-tool-probe` flag (it consumes that probe's verdict). The reap is debounced (the probe's ~1h cadence plus a per-integration cooldown) so a persistently-broken integration is rebound at most once per window, never every cycle. Boolean gate; ships dark - canary per host (agt-aws-1) before any fleet flip. AGT_SESSION_TOOL_REBIND_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
@@ -47696,6 +47707,27 @@ function envBoolean(raw) {
|
|
|
47696
47707
|
if (v === "0" || v === "false" || v === "no" || v === "off") return false;
|
|
47697
47708
|
return void 0;
|
|
47698
47709
|
}
|
|
47710
|
+
function cachedBoolean(key, path) {
|
|
47711
|
+
try {
|
|
47712
|
+
if (!existsSync2(path)) return void 0;
|
|
47713
|
+
const parsed = JSON.parse(readFileSync4(path, "utf8"));
|
|
47714
|
+
if (!parsed || typeof parsed !== "object") return void 0;
|
|
47715
|
+
const flags = parsed.flags;
|
|
47716
|
+
if (!flags || typeof flags !== "object") return void 0;
|
|
47717
|
+
const value = flags[key];
|
|
47718
|
+
return typeof value === "boolean" ? value : void 0;
|
|
47719
|
+
} catch {
|
|
47720
|
+
return void 0;
|
|
47721
|
+
}
|
|
47722
|
+
}
|
|
47723
|
+
function resolveHostBooleanFlag(opts) {
|
|
47724
|
+
const env2 = opts.env ?? process.env;
|
|
47725
|
+
const envValue = envBoolean(env2[opts.envVar]);
|
|
47726
|
+
if (envValue !== void 0) return envValue;
|
|
47727
|
+
const cached2 = cachedBoolean(opts.key, opts.cachePath ?? defaultFlagsCachePath(env2));
|
|
47728
|
+
if (cached2 !== void 0) return cached2;
|
|
47729
|
+
return opts.defaultValue;
|
|
47730
|
+
}
|
|
47699
47731
|
var MAINTENANCE_FLAG_KEY = "platform-maintenance-mode";
|
|
47700
47732
|
function parseMaintenanceMode(raw) {
|
|
47701
47733
|
if (raw === void 0) return void 0;
|
|
@@ -48961,6 +48993,73 @@ function writeForwardedToolsReport(agentDir, report) {
|
|
|
48961
48993
|
}
|
|
48962
48994
|
}
|
|
48963
48995
|
|
|
48996
|
+
// src/forwarded-tool-rediscovery.ts
|
|
48997
|
+
var UNHEALTHY_RETRY_DELAYS_MS = [3e4, 6e4, 12e4, 3e5];
|
|
48998
|
+
var FAST_RETRY_ATTEMPTS = 6;
|
|
48999
|
+
var HEALTHY_RECHECK_MS = 30 * 60 * 1e3;
|
|
49000
|
+
var DELAY_JITTER_RATIO = 0.2;
|
|
49001
|
+
function nextDiscoveryDelayMs(consecutiveUnhealthy, healthyRecheckEnabled, random = Math.random) {
|
|
49002
|
+
let base;
|
|
49003
|
+
if (consecutiveUnhealthy > FAST_RETRY_ATTEMPTS) {
|
|
49004
|
+
base = HEALTHY_RECHECK_MS;
|
|
49005
|
+
} else if (consecutiveUnhealthy > 0) {
|
|
49006
|
+
const step = Math.min(consecutiveUnhealthy, UNHEALTHY_RETRY_DELAYS_MS.length) - 1;
|
|
49007
|
+
base = UNHEALTHY_RETRY_DELAYS_MS[step];
|
|
49008
|
+
} else if (healthyRecheckEnabled) {
|
|
49009
|
+
base = HEALTHY_RECHECK_MS;
|
|
49010
|
+
} else {
|
|
49011
|
+
return null;
|
|
49012
|
+
}
|
|
49013
|
+
return Math.round(base * (1 - DELAY_JITTER_RATIO + random() * 2 * DELAY_JITTER_RATIO));
|
|
49014
|
+
}
|
|
49015
|
+
function retryStatusFor(status, failedRegistrations) {
|
|
49016
|
+
return status === "ok" && failedRegistrations > 0 ? "degraded" : status;
|
|
49017
|
+
}
|
|
49018
|
+
function reportSignature(i) {
|
|
49019
|
+
return JSON.stringify([i.status, [...i.degradedBrokers ?? []].sort(), [...i.failed].sort()]);
|
|
49020
|
+
}
|
|
49021
|
+
function shouldReportRetry(i) {
|
|
49022
|
+
return i.status === "ok" || !i.hadCleanDiscovery || i.addedTools > 0 || i.signature !== i.lastReportedSignature;
|
|
49023
|
+
}
|
|
49024
|
+
function startForwardedToolRediscovery(initial, deps) {
|
|
49025
|
+
const setTimer = deps.setTimer ?? ((fn, ms) => {
|
|
49026
|
+
const timer = setTimeout(fn, ms);
|
|
49027
|
+
timer.unref?.();
|
|
49028
|
+
return timer;
|
|
49029
|
+
});
|
|
49030
|
+
let stopped = false;
|
|
49031
|
+
let unhealthy = initial === "ok" ? 0 : 1;
|
|
49032
|
+
const schedule = () => {
|
|
49033
|
+
if (stopped) return;
|
|
49034
|
+
const delay = nextDiscoveryDelayMs(unhealthy, deps.healthyRecheckEnabled(), deps.random);
|
|
49035
|
+
if (delay === null) {
|
|
49036
|
+
setTimer(schedule, HEALTHY_RECHECK_MS);
|
|
49037
|
+
return;
|
|
49038
|
+
}
|
|
49039
|
+
setTimer(() => void tick(), delay);
|
|
49040
|
+
};
|
|
49041
|
+
const tick = async () => {
|
|
49042
|
+
if (stopped) return;
|
|
49043
|
+
if (unhealthy === 0 && !deps.healthyRecheckEnabled()) {
|
|
49044
|
+
schedule();
|
|
49045
|
+
return;
|
|
49046
|
+
}
|
|
49047
|
+
let status;
|
|
49048
|
+
try {
|
|
49049
|
+
status = await deps.attempt();
|
|
49050
|
+
} catch (err) {
|
|
49051
|
+
deps.log?.(`augmented-mcp: tool rediscovery threw: ${err.message}`);
|
|
49052
|
+
status = "failed";
|
|
49053
|
+
}
|
|
49054
|
+
unhealthy = status === "ok" ? 0 : unhealthy + 1;
|
|
49055
|
+
schedule();
|
|
49056
|
+
};
|
|
49057
|
+
schedule();
|
|
49058
|
+
return () => {
|
|
49059
|
+
stopped = true;
|
|
49060
|
+
};
|
|
49061
|
+
}
|
|
49062
|
+
|
|
48964
49063
|
// src/in-container.ts
|
|
48965
49064
|
function isInContainer(env2 = process.env) {
|
|
48966
49065
|
const raw = (env2.AGT_IN_CONTAINER ?? "").trim().toLowerCase();
|
|
@@ -53160,7 +53259,7 @@ server.tool(
|
|
|
53160
53259
|
}
|
|
53161
53260
|
);
|
|
53162
53261
|
async function discoverApiTools() {
|
|
53163
|
-
if (!AGT_AGENT_ID) return [];
|
|
53262
|
+
if (!AGT_AGENT_ID) return { tools: [], status: "ok", degradedBrokers: [] };
|
|
53164
53263
|
try {
|
|
53165
53264
|
const res = await apiPost(
|
|
53166
53265
|
"/host/mcp/tools/list",
|
|
@@ -53168,14 +53267,22 @@ async function discoverApiTools() {
|
|
|
53168
53267
|
);
|
|
53169
53268
|
if (res.error) {
|
|
53170
53269
|
console.error(`augmented-mcp: tools/list returned error: ${res.error}`);
|
|
53171
|
-
return [];
|
|
53270
|
+
return { tools: [], status: "failed", degradedBrokers: [] };
|
|
53172
53271
|
}
|
|
53173
|
-
|
|
53272
|
+
const degradedBrokers = res.degraded_brokers ?? [];
|
|
53273
|
+
return {
|
|
53274
|
+
tools: res.tools ?? [],
|
|
53275
|
+
status: degradedBrokers.length > 0 ? "degraded" : "ok",
|
|
53276
|
+
degradedBrokers
|
|
53277
|
+
};
|
|
53174
53278
|
} catch (err) {
|
|
53175
53279
|
console.error(`augmented-mcp: tools/list failed: ${err.message}`);
|
|
53176
|
-
return [];
|
|
53280
|
+
return { tools: [], status: "failed", degradedBrokers: [] };
|
|
53177
53281
|
}
|
|
53178
53282
|
}
|
|
53283
|
+
var registeredForwardedTools = /* @__PURE__ */ new Set();
|
|
53284
|
+
var lateRegisteredForwardedTools = /* @__PURE__ */ new Set();
|
|
53285
|
+
var unresolvedForwardedTools = /* @__PURE__ */ new Set();
|
|
53179
53286
|
function canonicalAgentDir(dir) {
|
|
53180
53287
|
try {
|
|
53181
53288
|
return realpathSync(dir);
|
|
@@ -53436,8 +53543,8 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
53436
53543
|
// direct-chat (button_click). Always registered; no API tool shares this name.
|
|
53437
53544
|
"request_buttons"
|
|
53438
53545
|
]);
|
|
53439
|
-
async function registerForwardedApiTools() {
|
|
53440
|
-
const apiTools = await discoverApiTools();
|
|
53546
|
+
async function registerForwardedApiTools(isStartup = true) {
|
|
53547
|
+
const { tools: apiTools, status, degradedBrokers } = await discoverApiTools();
|
|
53441
53548
|
const localToolNames = LOCAL_TOOL_NAMES;
|
|
53442
53549
|
let registered = 0;
|
|
53443
53550
|
let skipped = 0;
|
|
@@ -53447,6 +53554,10 @@ async function registerForwardedApiTools() {
|
|
|
53447
53554
|
skipped++;
|
|
53448
53555
|
continue;
|
|
53449
53556
|
}
|
|
53557
|
+
if (registeredForwardedTools.has(tool.name)) {
|
|
53558
|
+
registered++;
|
|
53559
|
+
continue;
|
|
53560
|
+
}
|
|
53450
53561
|
try {
|
|
53451
53562
|
const shape = jsonSchemaToZodShape(tool.inputSchema);
|
|
53452
53563
|
server.registerTool(
|
|
@@ -53460,15 +53571,19 @@ async function registerForwardedApiTools() {
|
|
|
53460
53571
|
return result;
|
|
53461
53572
|
}
|
|
53462
53573
|
);
|
|
53574
|
+
registeredForwardedTools.add(tool.name);
|
|
53575
|
+
unresolvedForwardedTools.delete(tool.name);
|
|
53576
|
+
if (!isStartup) lateRegisteredForwardedTools.add(tool.name);
|
|
53463
53577
|
registered++;
|
|
53464
53578
|
} catch (err) {
|
|
53465
53579
|
failed.push(tool.name);
|
|
53580
|
+
unresolvedForwardedTools.add(tool.name);
|
|
53466
53581
|
console.error(
|
|
53467
53582
|
`augmented-mcp: failed to register forwarded tool '${tool.name}': ${err.message}`
|
|
53468
53583
|
);
|
|
53469
53584
|
}
|
|
53470
53585
|
}
|
|
53471
|
-
return { expected: apiTools.length, registered, skipped, failed };
|
|
53586
|
+
return { expected: apiTools.length, registered, skipped, failed, status, degradedBrokers };
|
|
53472
53587
|
}
|
|
53473
53588
|
async function listPublishedArtefactsText(params) {
|
|
53474
53589
|
const data = await apiPost(
|
|
@@ -54194,9 +54309,36 @@ if (isSelfRestartEnabled(process.env) && AGT_AGENT_CODE_NAME) {
|
|
|
54194
54309
|
}
|
|
54195
54310
|
);
|
|
54196
54311
|
}
|
|
54312
|
+
var lastReportedSignature = null;
|
|
54313
|
+
function forwardedReportSignature(result) {
|
|
54314
|
+
return reportSignature({ status: result.status, degradedBrokers: result.degradedBrokers, failed: unresolvedForwardedTools });
|
|
54315
|
+
}
|
|
54316
|
+
function reportForwardedTools(result) {
|
|
54317
|
+
if (!AGT_AGENT_CODE_NAME) return;
|
|
54318
|
+
const wrote = writeForwardedToolsReport(selfRestartAgentDir(AGT_AGENT_CODE_NAME), {
|
|
54319
|
+
expected: result.expected,
|
|
54320
|
+
// ENG-11708: what this session holds, which a failed retry cannot reduce.
|
|
54321
|
+
registered: registeredForwardedTools.size,
|
|
54322
|
+
skipped: result.skipped,
|
|
54323
|
+
failed: [...unresolvedForwardedTools],
|
|
54324
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54325
|
+
discovery: result.status,
|
|
54326
|
+
degradedBrokers: result.degradedBrokers,
|
|
54327
|
+
lateRegistered: [...lateRegisteredForwardedTools]
|
|
54328
|
+
});
|
|
54329
|
+
if (!wrote) {
|
|
54330
|
+
console.error("augmented-mcp: could not write the forwarded-tools report");
|
|
54331
|
+
return;
|
|
54332
|
+
}
|
|
54333
|
+
lastReportedSignature = forwardedReportSignature(result);
|
|
54334
|
+
}
|
|
54197
54335
|
async function main() {
|
|
54336
|
+
let startupDiscovery = "failed";
|
|
54337
|
+
let hadCleanDiscovery = false;
|
|
54198
54338
|
try {
|
|
54199
54339
|
const result = await registerForwardedApiTools();
|
|
54340
|
+
startupDiscovery = retryStatusFor(result.status, unresolvedForwardedTools.size);
|
|
54341
|
+
hadCleanDiscovery = result.status === "ok";
|
|
54200
54342
|
if (result.expected > 0) {
|
|
54201
54343
|
console.error(
|
|
54202
54344
|
`augmented-mcp: forwarded ${result.registered} of ${result.expected} API tool(s), skipped ${result.skipped} local override(s)`
|
|
@@ -54207,23 +54349,39 @@ async function main() {
|
|
|
54207
54349
|
`augmented-mcp: ${result.failed.length} forwarded tool(s) FAILED to register: ${result.failed.join(", ")}`
|
|
54208
54350
|
);
|
|
54209
54351
|
}
|
|
54210
|
-
|
|
54211
|
-
const wrote = writeForwardedToolsReport(selfRestartAgentDir(AGT_AGENT_CODE_NAME), {
|
|
54212
|
-
expected: result.expected,
|
|
54213
|
-
registered: result.registered,
|
|
54214
|
-
skipped: result.skipped,
|
|
54215
|
-
failed: result.failed,
|
|
54216
|
-
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
54217
|
-
});
|
|
54218
|
-
if (!wrote) {
|
|
54219
|
-
console.error("augmented-mcp: could not write the forwarded-tools report");
|
|
54220
|
-
}
|
|
54221
|
-
}
|
|
54352
|
+
reportForwardedTools(result);
|
|
54222
54353
|
} catch (err) {
|
|
54223
54354
|
console.error(`augmented-mcp: tool discovery threw: ${err.message}`);
|
|
54224
54355
|
}
|
|
54225
54356
|
const transport = new StdioServerTransport();
|
|
54226
54357
|
await server.connect(transport);
|
|
54358
|
+
startForwardedToolRediscovery(startupDiscovery, {
|
|
54359
|
+
attempt: async () => {
|
|
54360
|
+
const before = registeredForwardedTools.size;
|
|
54361
|
+
const result = await registerForwardedApiTools(false);
|
|
54362
|
+
const added = registeredForwardedTools.size - before;
|
|
54363
|
+
if (added > 0) {
|
|
54364
|
+
console.error(`augmented-mcp: registered ${added} forwarded tool(s) after startup`);
|
|
54365
|
+
}
|
|
54366
|
+
if (shouldReportRetry({
|
|
54367
|
+
status: result.status,
|
|
54368
|
+
hadCleanDiscovery,
|
|
54369
|
+
addedTools: added,
|
|
54370
|
+
signature: forwardedReportSignature(result),
|
|
54371
|
+
lastReportedSignature
|
|
54372
|
+
})) {
|
|
54373
|
+
reportForwardedTools(result);
|
|
54374
|
+
}
|
|
54375
|
+
if (result.status === "ok") hadCleanDiscovery = true;
|
|
54376
|
+
return retryStatusFor(result.status, unresolvedForwardedTools.size);
|
|
54377
|
+
},
|
|
54378
|
+
healthyRecheckEnabled: () => resolveHostBooleanFlag({
|
|
54379
|
+
key: "mcp-tool-rediscovery",
|
|
54380
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
54381
|
+
defaultValue: false
|
|
54382
|
+
}),
|
|
54383
|
+
log: (line2) => console.error(line2)
|
|
54384
|
+
});
|
|
54227
54385
|
}
|
|
54228
54386
|
main().catch((err) => {
|
|
54229
54387
|
console.error("augmented-mcp: Fatal error:", err);
|
package/dist/mcp/origami.js
CHANGED
|
@@ -44275,6 +44275,17 @@ var FLAG_REGISTRY = [
|
|
|
44275
44275
|
defaultValue: false,
|
|
44276
44276
|
envVar: "AGT_SESSION_TOOL_PROBE_ENABLED"
|
|
44277
44277
|
},
|
|
44278
|
+
{
|
|
44279
|
+
key: "mcp-tool-rediscovery",
|
|
44280
|
+
description: "Slow re-check of the forwarded tool list on a healthy `augmented` MCP server (ENG-11708): every 30 minutes, with jitter, per running session. It heals tools lost to a broker that failed closed, which returns an empty list and looks healthy. Adds tools only and never removes one. Boolean gate; ships dark because it adds per-session database load to every healthy session, so canary a host first. Turning it off does not stop the load from unhealthy sessions: one with a failed or partial discovery, or a tool that has not registered, retries without this flag and settles at the same 30-minute full discovery until it recovers or restarts. AGT_MCP_TOOL_REDISCOVERY_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
44281
|
+
flagType: "boolean",
|
|
44282
|
+
defaultValue: false,
|
|
44283
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
44284
|
+
// DELIBERATE UNREACHABLE PLACEHOLDER, as on the entries above: the first agt-cli
|
|
44285
|
+
// carrying this reader is not knowable before merge, and a low guess would promise
|
|
44286
|
+
// reach to hosts without it. Replace with the real version once it publishes.
|
|
44287
|
+
since: "0.29.0"
|
|
44288
|
+
},
|
|
44278
44289
|
{
|
|
44279
44290
|
key: "session-tool-rebind",
|
|
44280
44291
|
description: "Auto-rebind MCP tools that fell out of a running session (ENG-7318, ENG-7053 Slice A). When ON, the session-tool-bind probe does not just report a hard-negative verdict - the manager SIGTERMs just that integration's MCP child so Claude Code's transport respawns it (no full agent restart, conversation context preserved). Fires on `missing` (a dead stdio/proxy child - the ENG-7301/Phil case) and on `unreachable` (an alive ENG-6859 OAuth-proxy child whose upstream stopped answering tools/list after a token rotated under the live session - the ENG-7318/Pepper case). Requires the `session-tool-probe` flag (it consumes that probe's verdict). The reap is debounced (the probe's ~1h cadence plus a per-integration cooldown) so a persistently-broken integration is rebound at most once per window, never every cycle. Boolean gate; ships dark - canary per host (agt-aws-1) before any fleet flip. AGT_SESSION_TOOL_REBIND_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
@@ -39127,6 +39127,17 @@ var FLAG_REGISTRY = [
|
|
|
39127
39127
|
defaultValue: false,
|
|
39128
39128
|
envVar: "AGT_SESSION_TOOL_PROBE_ENABLED"
|
|
39129
39129
|
},
|
|
39130
|
+
{
|
|
39131
|
+
key: "mcp-tool-rediscovery",
|
|
39132
|
+
description: "Slow re-check of the forwarded tool list on a healthy `augmented` MCP server (ENG-11708): every 30 minutes, with jitter, per running session. It heals tools lost to a broker that failed closed, which returns an empty list and looks healthy. Adds tools only and never removes one. Boolean gate; ships dark because it adds per-session database load to every healthy session, so canary a host first. Turning it off does not stop the load from unhealthy sessions: one with a failed or partial discovery, or a tool that has not registered, retries without this flag and settles at the same 30-minute full discovery until it recovers or restarts. AGT_MCP_TOOL_REDISCOVERY_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
39133
|
+
flagType: "boolean",
|
|
39134
|
+
defaultValue: false,
|
|
39135
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
39136
|
+
// DELIBERATE UNREACHABLE PLACEHOLDER, as on the entries above: the first agt-cli
|
|
39137
|
+
// carrying this reader is not knowable before merge, and a low guess would promise
|
|
39138
|
+
// reach to hosts without it. Replace with the real version once it publishes.
|
|
39139
|
+
since: "0.29.0"
|
|
39140
|
+
},
|
|
39130
39141
|
{
|
|
39131
39142
|
key: "session-tool-rebind",
|
|
39132
39143
|
description: "Auto-rebind MCP tools that fell out of a running session (ENG-7318, ENG-7053 Slice A). When ON, the session-tool-bind probe does not just report a hard-negative verdict - the manager SIGTERMs just that integration's MCP child so Claude Code's transport respawns it (no full agent restart, conversation context preserved). Fires on `missing` (a dead stdio/proxy child - the ENG-7301/Phil case) and on `unreachable` (an alive ENG-6859 OAuth-proxy child whose upstream stopped answering tools/list after a token rotated under the live session - the ENG-7318/Pepper case). Requires the `session-tool-probe` flag (it consumes that probe's verdict). The reap is debounced (the probe's ~1h cadence plus a per-integration cooldown) so a persistently-broken integration is rebound at most once per window, never every cycle. Boolean gate; ships dark - canary per host (agt-aws-1) before any fleet flip. AGT_SESSION_TOOL_REBIND_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
@@ -39318,6 +39318,17 @@ var FLAG_REGISTRY = [
|
|
|
39318
39318
|
defaultValue: false,
|
|
39319
39319
|
envVar: "AGT_SESSION_TOOL_PROBE_ENABLED"
|
|
39320
39320
|
},
|
|
39321
|
+
{
|
|
39322
|
+
key: "mcp-tool-rediscovery",
|
|
39323
|
+
description: "Slow re-check of the forwarded tool list on a healthy `augmented` MCP server (ENG-11708): every 30 minutes, with jitter, per running session. It heals tools lost to a broker that failed closed, which returns an empty list and looks healthy. Adds tools only and never removes one. Boolean gate; ships dark because it adds per-session database load to every healthy session, so canary a host first. Turning it off does not stop the load from unhealthy sessions: one with a failed or partial discovery, or a tool that has not registered, retries without this flag and settles at the same 30-minute full discovery until it recovers or restarts. AGT_MCP_TOOL_REDISCOVERY_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
39324
|
+
flagType: "boolean",
|
|
39325
|
+
defaultValue: false,
|
|
39326
|
+
envVar: "AGT_MCP_TOOL_REDISCOVERY_ENABLED",
|
|
39327
|
+
// DELIBERATE UNREACHABLE PLACEHOLDER, as on the entries above: the first agt-cli
|
|
39328
|
+
// carrying this reader is not knowable before merge, and a low guess would promise
|
|
39329
|
+
// reach to hosts without it. Replace with the real version once it publishes.
|
|
39330
|
+
since: "0.29.0"
|
|
39331
|
+
},
|
|
39321
39332
|
{
|
|
39322
39333
|
key: "session-tool-rebind",
|
|
39323
39334
|
description: "Auto-rebind MCP tools that fell out of a running session (ENG-7318, ENG-7053 Slice A). When ON, the session-tool-bind probe does not just report a hard-negative verdict - the manager SIGTERMs just that integration's MCP child so Claude Code's transport respawns it (no full agent restart, conversation context preserved). Fires on `missing` (a dead stdio/proxy child - the ENG-7301/Phil case) and on `unreachable` (an alive ENG-6859 OAuth-proxy child whose upstream stopped answering tools/list after a token rotated under the live session - the ENG-7318/Pepper case). Requires the `session-tool-probe` flag (it consumes that probe's verdict). The reap is debounced (the probe's ~1h cadence plus a per-integration cooldown) so a persistently-broken integration is rebound at most once per window, never every cycle. Boolean gate; ships dark - canary per host (agt-aws-1) before any fleet flip. AGT_SESSION_TOOL_REBIND_ENABLED is the highest-precedence operator override; precedence is env override > flag value > this default.",
|
|
@@ -68,12 +68,12 @@ import {
|
|
|
68
68
|
writeDirectChatSessionState,
|
|
69
69
|
writeEgressAllowlist,
|
|
70
70
|
writePersistentClaudeWrapper
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-QGBIF6QK.js";
|
|
72
|
+
import "./chunk-YR5PKAAL.js";
|
|
73
73
|
import "./chunk-HYQ7VOC3.js";
|
|
74
74
|
import "./chunk-6HBXEJHO.js";
|
|
75
75
|
import "./chunk-XWVM4KPK.js";
|
|
76
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-R7UGBRUR.js";
|
|
77
77
|
import "./chunk-AIUIMEUS.js";
|
|
78
78
|
import "./chunk-DGUM43GV.js";
|
|
79
79
|
export {
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
writeEgressAllowlist,
|
|
148
148
|
writePersistentClaudeWrapper
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=persistent-session-
|
|
150
|
+
//# sourceMappingURL=persistent-session-YMVE4OG5.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QGBIF6QK.js";
|
|
4
|
+
import "./chunk-YR5PKAAL.js";
|
|
5
5
|
import "./chunk-HYQ7VOC3.js";
|
|
6
6
|
import "./chunk-6HBXEJHO.js";
|
|
7
7
|
import "./chunk-XWVM4KPK.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-R7UGBRUR.js";
|
|
9
9
|
import "./chunk-AIUIMEUS.js";
|
|
10
10
|
import "./chunk-DGUM43GV.js";
|
|
11
11
|
|
|
@@ -804,4 +804,4 @@ export {
|
|
|
804
804
|
readAndResetSlackReplyBindingClassifications,
|
|
805
805
|
readAndResetSlackReplyTargetClassifications
|
|
806
806
|
};
|
|
807
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
807
|
+
//# sourceMappingURL=responsiveness-probe-DD7LCTAS.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YR5PKAAL.js";
|
|
4
|
+
import "./chunk-R7UGBRUR.js";
|
|
5
5
|
import "./chunk-DGUM43GV.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/session-auth-dead.ts
|
|
@@ -205,4 +205,4 @@ export {
|
|
|
205
205
|
decideSessionAuthState,
|
|
206
206
|
probeSessionAuth
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=session-auth-dead-
|
|
208
|
+
//# sourceMappingURL=session-auth-dead-QZOUWP4O.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|