@integrity-labs/agt-cli 0.28.572 → 0.28.574
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 +9 -6
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-72K46XUZ.js → chunk-E3KBX3UW.js} +105 -5
- package/dist/chunk-E3KBX3UW.js.map +1 -0
- package/dist/{chunk-NG2MFOSH.js → chunk-PKBAJMBG.js} +9 -5
- package/dist/{chunk-NG2MFOSH.js.map → chunk-PKBAJMBG.js.map} +1 -1
- package/dist/{claude-pair-runtime-XTRJNDP2.js → claude-pair-runtime-4C5YXND6.js} +2 -2
- package/dist/lib/manager-worker.js +20 -12
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +22 -1
- package/dist/mcp/origami.js +22 -1
- package/dist/mcp/slack-channel.js +22 -1
- package/dist/mcp/telegram-channel.js +22 -1
- package/dist/{persistent-session-74MH2XTM.js → persistent-session-2ESCLFCK.js} +2 -2
- package/dist/{responsiveness-probe-5VNQQZNJ.js → responsiveness-probe-YCUDUCAS.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-72K46XUZ.js.map +0 -1
- /package/dist/{claude-pair-runtime-XTRJNDP2.js.map → claude-pair-runtime-4C5YXND6.js.map} +0 -0
- /package/dist/{persistent-session-74MH2XTM.js.map → persistent-session-2ESCLFCK.js.map} +0 -0
- /package/dist/{responsiveness-probe-5VNQQZNJ.js.map → responsiveness-probe-YCUDUCAS.js.map} +0 -0
|
@@ -5684,13 +5684,15 @@ function resolveConnectivityProbe(input) {
|
|
|
5684
5684
|
...probeArgs ? { probeArgs } : {}
|
|
5685
5685
|
};
|
|
5686
5686
|
}
|
|
5687
|
-
|
|
5687
|
+
const remoteMcpUrl = getOAuthProvider(definitionId)?.mcpUrl ?? input.remoteMcpUrl ?? null;
|
|
5688
|
+
if (remoteMcpUrl) {
|
|
5689
|
+
const fromRegistry = Boolean(getOAuthProvider(definitionId)?.mcpUrl);
|
|
5688
5690
|
return {
|
|
5689
5691
|
kind: "mcp_tools_list",
|
|
5690
5692
|
sourceType: sourceType ?? "mcp_server",
|
|
5691
5693
|
readOnly: true,
|
|
5692
5694
|
label: `${definitionId}: MCP tools/list`,
|
|
5693
|
-
centralReachable:
|
|
5695
|
+
centralReachable: fromRegistry
|
|
5694
5696
|
};
|
|
5695
5697
|
}
|
|
5696
5698
|
switch (sourceType) {
|
|
@@ -6112,6 +6114,28 @@ var SCOPE_DEFICIT_ERROR_PATTERNS = [
|
|
|
6112
6114
|
"write_content",
|
|
6113
6115
|
"sales channel is not enabled"
|
|
6114
6116
|
];
|
|
6117
|
+
var QUOTA_EXHAUSTED_ERROR_PATTERNS = [
|
|
6118
|
+
"resource_exhausted",
|
|
6119
|
+
"resource has been exhausted",
|
|
6120
|
+
"rate limit",
|
|
6121
|
+
"rate_limit",
|
|
6122
|
+
"ratelimit",
|
|
6123
|
+
"ratescope",
|
|
6124
|
+
"rate_scope",
|
|
6125
|
+
"too many requests",
|
|
6126
|
+
"quota exceeded",
|
|
6127
|
+
"quota_exceeded",
|
|
6128
|
+
"quotaexceeded",
|
|
6129
|
+
"quota error",
|
|
6130
|
+
"quotaerror",
|
|
6131
|
+
"quota_error",
|
|
6132
|
+
"exceeded your quota",
|
|
6133
|
+
"out of quota",
|
|
6134
|
+
"insufficient quota",
|
|
6135
|
+
"check quota",
|
|
6136
|
+
"usage limit",
|
|
6137
|
+
"daily limit exceeded"
|
|
6138
|
+
];
|
|
6115
6139
|
function isReadonlyToolDescriptor(t) {
|
|
6116
6140
|
if (!t?.name)
|
|
6117
6141
|
return false;
|
|
@@ -6168,9 +6192,47 @@ function isScopeDeficitError(message) {
|
|
|
6168
6192
|
return true;
|
|
6169
6193
|
return m.includes("scope") && ["doesn't have", "does not have", "not have the", "not granted", "lacks the", "not authorized for"].some((p2) => m.includes(p2));
|
|
6170
6194
|
}
|
|
6195
|
+
function isQuotaExhaustedError(message) {
|
|
6196
|
+
const m = message.toLowerCase();
|
|
6197
|
+
if (QUOTA_EXHAUSTED_ERROR_PATTERNS.some((p2) => m.includes(p2)))
|
|
6198
|
+
return true;
|
|
6199
|
+
if (/\b429\s+client error/.test(m))
|
|
6200
|
+
return true;
|
|
6201
|
+
return /(status(?:_?code)?|http_?status(?:_code)?|mercury_last_http_status_code|["'\\]code)["'\\\s]*[:=]["'\\\s]*429\b/.test(m);
|
|
6202
|
+
}
|
|
6203
|
+
function extractRetryAfterSeconds(message) {
|
|
6204
|
+
const m = message.toLowerCase();
|
|
6205
|
+
const patterns = [
|
|
6206
|
+
/retry\s+in\s+(\d+)\s*(?:s\b|sec\b|secs\b|second)/,
|
|
6207
|
+
/retry[-_ ]?after["'\\\s]*[:=]["'\\\s]*(\d+)/,
|
|
6208
|
+
/retry_?delay["'\\\s]*[:=]["'\\\s]*"?(\d+)s?/
|
|
6209
|
+
];
|
|
6210
|
+
for (const re of patterns) {
|
|
6211
|
+
const hit = re.exec(m);
|
|
6212
|
+
if (!hit?.[1])
|
|
6213
|
+
continue;
|
|
6214
|
+
const seconds = Number(hit[1]);
|
|
6215
|
+
if (Number.isFinite(seconds) && seconds > 0)
|
|
6216
|
+
return seconds;
|
|
6217
|
+
}
|
|
6218
|
+
return null;
|
|
6219
|
+
}
|
|
6220
|
+
function formatRetryWindow(seconds) {
|
|
6221
|
+
if (seconds < 90)
|
|
6222
|
+
return `${seconds} seconds`;
|
|
6223
|
+
const minutes = seconds / 60;
|
|
6224
|
+
if (minutes < 90)
|
|
6225
|
+
return `about ${Math.round(minutes)} minutes`;
|
|
6226
|
+
const hours = minutes / 60;
|
|
6227
|
+
if (hours < 24)
|
|
6228
|
+
return `about ${Math.round(hours * 10) / 10} hours`;
|
|
6229
|
+
return `about ${Math.round(hours / 24 * 10) / 10} days`;
|
|
6230
|
+
}
|
|
6171
6231
|
function classifyToolCallFailure(text) {
|
|
6172
6232
|
if (isAccountResolutionError(text))
|
|
6173
6233
|
return "account";
|
|
6234
|
+
if (isQuotaExhaustedError(text))
|
|
6235
|
+
return "quota";
|
|
6174
6236
|
if (isScopeDeficitError(text))
|
|
6175
6237
|
return "scope";
|
|
6176
6238
|
if (isUpstreamAuthError(text))
|
|
@@ -6298,6 +6360,19 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
|
|
|
6298
6360
|
details: baseDetails
|
|
6299
6361
|
};
|
|
6300
6362
|
}
|
|
6363
|
+
if (kind === "quota") {
|
|
6364
|
+
const retryAfterSeconds = extractRetryAfterSeconds(failureText);
|
|
6365
|
+
const retryPhrase = retryAfterSeconds ? ` The provider says to retry in ${formatRetryWindow(retryAfterSeconds)}.` : "";
|
|
6366
|
+
return {
|
|
6367
|
+
status: "degraded",
|
|
6368
|
+
message: `Live tool call '${toolName}' reached the provider and was refused: a quota or rate limit is exhausted. The connection itself is valid \u2014 do NOT reconnect, this resolves when the window resets.${retryPhrase} ${snippet}`,
|
|
6369
|
+
details: {
|
|
6370
|
+
...baseDetails,
|
|
6371
|
+
reason: "quota_exhausted",
|
|
6372
|
+
...retryAfterSeconds ? { retry_after_seconds: retryAfterSeconds } : {}
|
|
6373
|
+
}
|
|
6374
|
+
};
|
|
6375
|
+
}
|
|
6301
6376
|
if (kind === "scope") {
|
|
6302
6377
|
return {
|
|
6303
6378
|
status: "degraded",
|
|
@@ -6319,7 +6394,11 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
|
|
|
6319
6394
|
details: { ...baseDetails, reason: "site_unresolved" }
|
|
6320
6395
|
};
|
|
6321
6396
|
}
|
|
6322
|
-
return {
|
|
6397
|
+
return {
|
|
6398
|
+
status: "ok",
|
|
6399
|
+
message: `Live tool call '${toolName}' resolved the account (tool error: ${snippet})`,
|
|
6400
|
+
details: { ...baseDetails, tool_error: snippet }
|
|
6401
|
+
};
|
|
6323
6402
|
}
|
|
6324
6403
|
return { status: "ok", message: `Live tool call '${toolName}' resolved the connected account`, details: baseDetails };
|
|
6325
6404
|
} catch (err) {
|
|
@@ -10439,7 +10518,7 @@ var FLAG_REGISTRY = [
|
|
|
10439
10518
|
},
|
|
10440
10519
|
{
|
|
10441
10520
|
key: "direct-chat-per-user",
|
|
10442
|
-
description: "Scope a STANDARD agent's Direct Chat to the user who had the conversation (ENG-8712). Today two teammates who open the same agent land in the same thread and read each other's messages: the /recent and per-session reads carry no user predicate unless the agent is the per-org system_support concierge. When on, both reads return only sessions the requester authored in PLUS sessions no user has authored in \u2014 the second arm is load-bearing, since every server-originated row (kanban and scheduled-task nudges, integration failures, HITL approvals, degradation alerts) is written as role=user with no user_id and would otherwise vanish from every console (ENG-8431). Does NOT make the thread private in the live direction: assistant replies
|
|
10521
|
+
description: "Scope a STANDARD agent's Direct Chat to the user who had the conversation (ENG-8712). Today two teammates who open the same agent land in the same thread and read each other's messages: the /recent and per-session reads carry no user predicate unless the agent is the per-org system_support concierge. When on, both reads return only sessions the requester authored in PLUS sessions no user has authored in \u2014 the second arm is load-bearing, since every server-originated row (kanban and scheduled-task nudges, integration failures, HITL approvals, degradation alerts) is written as role=user with no user_id and would otherwise vanish from every console (ENG-8431). Does NOT by itself make the thread private in the live direction: assistant replies fan out on the per-TEAM realtime topic direct-chat-agent:{agentId}, so a teammate holding the drawer open still receives them. That half is direct-chat-live-per-user (ENG-8760), which is a SEPARATE flag on purpose \u2014 turn both on for a private thread.",
|
|
10443
10522
|
flagType: "boolean",
|
|
10444
10523
|
// Declared safe value is `false` — today's team-wide thread. Server-side only
|
|
10445
10524
|
// (the two reads in routes/agents.ts); the browser needs no knowledge of it,
|
|
@@ -10452,6 +10531,27 @@ var FLAG_REGISTRY = [
|
|
|
10452
10531
|
// backfill in migration 20260812000006 is not reversed by the flag.
|
|
10453
10532
|
defaultValue: false
|
|
10454
10533
|
},
|
|
10534
|
+
{
|
|
10535
|
+
key: "direct-chat-live-per-user",
|
|
10536
|
+
description: "The LIVE half of per-user Direct Chat (ENG-8760). direct-chat-per-user scoped the two REST reads; assistant replies kept fanning out on the per-TEAM realtime topic direct-chat-agent:{agentId}, whose RLS (20260804000003) has no session and no user predicate \u2014 so a teammate holding the drawer open still received another member's replies live, and only a reload hid them. When on, a reply in a session a human has authored in is broadcast to direct-chat-user:{agentId}:{userId} instead, whose policy (20260812000009) pins the third segment to auth.uid(). Sessions NO human has authored in \u2014 the agent's inbound work queue: kanban and scheduled-task nudges, integration failures, HITL approvals, degradation alerts \u2014 keep going to the per-TEAM topic, matching arm 2 of the REST read, or this would repeat ENG-8431 in the live lane. Also admits the system_support concierge to the per-user topic, which the per-TEAM topic denies outright (its live delivery is additive here, never narrowed).",
|
|
10537
|
+
flagType: "boolean",
|
|
10538
|
+
// Declared safe value is `false` — today's per-TEAM fan-out, byte for byte,
|
|
10539
|
+
// for every agent kind including the concierge. Server-side only: the browser
|
|
10540
|
+
// subscribes to BOTH topics unconditionally and needs no knowledge of the
|
|
10541
|
+
// flag, so NOT public — which is also what keeps client and server from
|
|
10542
|
+
// disagreeing about it. No envVar: an org/team-scoped rollout gate with no
|
|
10543
|
+
// host-side consumer, and a declared envVar pinned in sst.config.ts would
|
|
10544
|
+
// make every admin-UI override unreachable (ENG-8303).
|
|
10545
|
+
//
|
|
10546
|
+
// DELIBERATELY INDEPENDENT of direct-chat-per-user. The two are separable in
|
|
10547
|
+
// both directions and neither ordering is unsafe: this one alone narrows live
|
|
10548
|
+
// delivery below what the REST read still serves (a teammate can load the
|
|
10549
|
+
// thread but stops receiving it live), and that one alone is the state
|
|
10550
|
+
// ENG-8712 shipped. Coupling them into one switch would have removed the
|
|
10551
|
+
// ability to soak the live change on an org that is already comfortable with
|
|
10552
|
+
// the read change.
|
|
10553
|
+
defaultValue: false
|
|
10554
|
+
},
|
|
10455
10555
|
{
|
|
10456
10556
|
key: "onboarding-auto-deploy",
|
|
10457
10557
|
description: `Auto-deploy the first agent during onboarding (ENG-7378): the agent edit page's Deploy & Test tab fires the existing deploy (draft -> active) automatically once the agent's host is fully deployed (active + manager heartbeating, not provisioning) AND Claude-authenticated (claude_auth_status=valid), replacing the manual "Deploy Agent" click in the recruit funnel. Only draft, non-system_support agents; a failed or timed-out attempt falls back to the manual button (no auto-retry loop).`,
|
|
@@ -15832,4 +15932,4 @@ export {
|
|
|
15832
15932
|
stopAllSessionsAndWait,
|
|
15833
15933
|
getProjectDir
|
|
15834
15934
|
};
|
|
15835
|
-
//# sourceMappingURL=chunk-
|
|
15935
|
+
//# sourceMappingURL=chunk-E3KBX3UW.js.map
|