@agentistics/mcp 2.154.0 → 2.156.0

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.
@@ -1072,6 +1072,8 @@ var PLAN_WINDOW_MS = {
1072
1072
  "5h": 5 * 60 * 60000,
1073
1073
  week: 7 * 24 * 60 * 60000
1074
1074
  };
1075
+ var AGY_WEEK_MAX_MS = 7 * DAY_MS + 60 * 60000;
1076
+ var AGY_SAME_RESET_MS = 5 * 60000;
1075
1077
  var PLAN_LIMITS_STALE_MS = 10 * 60000;
1076
1078
  var PROJECTED_MAX_PCT_PER_HOUR = 100 / 0.5 * 0.99;
1077
1079
  var ROUTE_PREFERENCES = {
@@ -1083,6 +1085,9 @@ var ROUTE_PREFERENCES = {
1083
1085
  qa: [["gemini"], ["copilot"], ["codex"], ["claude", "sonnet"]],
1084
1086
  probe: [["claude", "haiku"], ["gemini"]]
1085
1087
  };
1088
+ for (const k of ["spec-impl", "mechanical", "qa", "probe"])
1089
+ ROUTE_PREFERENCES[k] = [...ROUTE_PREFERENCES[k], ["antigravity"]];
1090
+ var HARNESS_VENDOR = { claude: "anthropic", codex: "openai", gemini: "google" };
1086
1091
  var STATUS_RANK = { ok: 0, tight: 1, hold: 2 };
1087
1092
  var PACE_RANK = { under: 0, on: 1, over: 2 };
1088
1093
  function harnessAggregate(rows) {
@@ -1108,6 +1113,15 @@ function pickAccount(candidates) {
1108
1113
  return candidates.map((b, i) => ({ b, i })).sort((x, y) => (x.b.daysToWeekReset > 0 ? x.b.weekResetsAt : Infinity) - (y.b.daysToWeekReset > 0 ? y.b.weekResetsAt : Infinity) || roomOf(x.b) - roomOf(y.b) || (y.b.updatedAt ?? 0) - (x.b.updatedAt ?? 0) || y.i - x.i)[0]?.b;
1109
1114
  }
1110
1115
  function routeRecommendation(budgets, kind, authorHarness) {
1116
+ const authorVendor = kind === "qa" && authorHarness ? HARNESS_VENDOR[authorHarness] : undefined;
1117
+ budgets = budgets.flatMap((b) => {
1118
+ if (!b.scopes?.length)
1119
+ return [b];
1120
+ return b.scopes.filter((sb) => !(authorVendor && sb.scope.providers.includes(authorVendor))).map(({ scope, ...sb }) => {
1121
+ const { scopes: _scopes, ...row } = b;
1122
+ return { ...row, ...sb, scope: scope.id, model: scope.models[0], scopeProviders: scope.providers };
1123
+ });
1124
+ });
1111
1125
  const aggregates = new Map(harnessAggregate(budgets.filter((b) => b.plan !== "unregistered")).map((a) => [a.harness, a]));
1112
1126
  const eligibleHarness = (agg) => eligibleAccounts(agg.harness).length > 0 && agg.status !== "hold" && agg.harness !== (kind === "qa" ? authorHarness : undefined);
1113
1127
  const eligibleAccounts = (h) => budgets.filter((b) => b.harness === h && b.spawnable !== false && b.plan !== "unregistered" && !b.yieldsTo && b.status !== "hold");
@@ -1151,7 +1165,7 @@ function routeRecommendation(budgets, kind, authorHarness) {
1151
1165
  harness: pick.harness,
1152
1166
  ...pick.account ? { account: pick.account } : {},
1153
1167
  ...pick.accountLabel ? { accountLabel: pick.accountLabel } : {},
1154
- ...selected?.[1] ? { model: selected[1] } : {},
1168
+ ...pick.scope && pick.model ? { model: pick.model, scope: pick.scope } : selected?.[1] ? { model: selected[1] } : {},
1155
1169
  reason: `${pick.harness} is the preferred eligible plan for ${kind}.${budgetText}${paceText}`,
1156
1170
  alternatives,
1157
1171
  accountAlternatives,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentistics/mcp",
3
- "version": "2.154.0",
3
+ "version": "2.156.0",
4
4
  "description": "Agentistics MCP server — Claude Code analytics for Claude Desktop and Claude Code",
5
5
  "type": "module",
6
6
  "main": "./dist/agentistics-mcp.js",