tech-lead-stack 1.2.0 → 1.2.1

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.
Files changed (2) hide show
  1. package/dist/mcp-server.mjs +62 -34
  2. package/package.json +7 -7
@@ -1861,8 +1861,8 @@ function validatePlanContract(planMarkdown) {
1861
1861
  }
1862
1862
  if (/Verification:/i.test(chunk)) {
1863
1863
  hasVerificationGate = true;
1864
- const verificationLineMatch = /Verification:([^\n]*)/i.exec(chunk);
1865
- const verificationText = verificationLineMatch ? verificationLineMatch[1] : chunk;
1864
+ const verificationMatch = /Verification:([\s\S]*)/i.exec(chunk);
1865
+ const verificationText = (verificationMatch ? verificationMatch[1] : chunk).replace(/\s+/g, " ");
1866
1866
  const runnableTokens = ["npm", "pnpm", "tsc", "jest", "curl", "run", "npx"];
1867
1867
  const hasRunnableToken = runnableTokens.some((t) => verificationText.toLowerCase().includes(t));
1868
1868
  const isFake = /(looks correct|seems right|assumed to pass|tested manually)/i.test(verificationText);
@@ -2099,7 +2099,19 @@ var init_model_registry = __esm({
2099
2099
  [/^(gpt|o[1-9]|chatgpt|text-|omni)/i, "openai"]
2100
2100
  ];
2101
2101
  MODEL_CATALOG = [
2102
- // Anthropic
2102
+ // Anthropic. The 4.6 entries stay while saved Project/User settings use them.
2103
+ {
2104
+ id: "claude-opus-5-5",
2105
+ label: "Claude Opus 5.5",
2106
+ family: "anthropic",
2107
+ keySlot: "anthropic"
2108
+ },
2109
+ {
2110
+ id: "claude-sonnet-5-5",
2111
+ label: "Claude Sonnet 5.5",
2112
+ family: "anthropic",
2113
+ keySlot: "anthropic"
2114
+ },
2103
2115
  {
2104
2116
  id: "claude-opus-4-6",
2105
2117
  label: "Claude Opus 4.6",
@@ -2120,8 +2132,8 @@ var init_model_registry = __esm({
2120
2132
  },
2121
2133
  // Google (Gemini)
2122
2134
  {
2123
- id: "gemini-3.6-flash",
2124
- label: "Gemini 3.6 Flash",
2135
+ id: "gemini-3.8-flash",
2136
+ label: "Gemini 3.8 Flash",
2125
2137
  family: "google",
2126
2138
  keySlot: "gemini"
2127
2139
  },
@@ -2131,15 +2143,16 @@ var init_model_registry = __esm({
2131
2143
  family: "google",
2132
2144
  keySlot: "gemini"
2133
2145
  },
2134
- // Google (Jules — same SDK, different key slot)
2146
+ // Google (Jules — same SDK, different key slot). Needs an id distinct from the
2147
+ // Gemini entries because catalogEntry() resolves the key slot by id.
2135
2148
  {
2136
- id: "gemini-3.1-pro",
2137
- label: "Google Jules (Gemini 3.1 Pro)",
2149
+ id: "gemini-3.1-pro-preview-customtools",
2150
+ label: "Google Jules (Gemini 3.1 Pro, custom tools)",
2138
2151
  family: "google",
2139
2152
  keySlot: "jules"
2140
2153
  },
2141
2154
  // OpenAI
2142
- { id: "gpt-5.4", label: "GPT-5.4", family: "openai", keySlot: "openai" }
2155
+ { id: "gpt-6.1-sol", label: "GPT-6.1 Sol", family: "openai", keySlot: "openai" }
2143
2156
  ];
2144
2157
  }
2145
2158
  });
@@ -2174,10 +2187,16 @@ var init_routing_policy = __esm({
2174
2187
  "use strict";
2175
2188
  init_model_registry();
2176
2189
  LADDERS = {
2177
- "anthropic": ["claude-haiku-4-5", "claude-sonnet-4-6", "claude-opus-4-6"],
2178
- "gemini": ["gemini-3.6-flash", "gemini-3.1-pro-preview", "gemini-3.1-pro"],
2179
- "jules": ["gemini-3.1-pro"],
2180
- "openai": ["gpt-5.4"]
2190
+ "anthropic": [
2191
+ "claude-haiku-4-5",
2192
+ "claude-sonnet-4-6",
2193
+ "claude-sonnet-5-5",
2194
+ "claude-opus-4-6",
2195
+ "claude-opus-5-5"
2196
+ ],
2197
+ "gemini": ["gemini-3.8-flash", "gemini-3.1-pro-preview"],
2198
+ "jules": ["gemini-3.1-pro-preview-customtools"],
2199
+ "openai": ["gpt-6.1-sol"]
2181
2200
  };
2182
2201
  }
2183
2202
  });
@@ -2835,13 +2854,13 @@ var init_constants = __esm({
2835
2854
  "src/lib/ai/constants.ts"() {
2836
2855
  "use strict";
2837
2856
  MODELS = {
2838
- GEMINI: "gemini-3.6-flash",
2839
- FALLBACK_GEMINI: "gemini-2.5-flash",
2857
+ GEMINI: "gemini-3.8-flash",
2858
+ FALLBACK_GEMINI: "gemini-3.7-flash",
2840
2859
  GEMINI_FALLBACK_CRITIC: "gemini-3.1-pro-preview",
2841
- CLAUDE: "claude-sonnet-4-6",
2842
- OPENAI: "gpt-5.4",
2843
- JULES: "gemini-3.1-pro",
2844
- FALLBACK_JULES: "gemini-3.1-flash"
2860
+ CLAUDE: "claude-sonnet-5-5",
2861
+ OPENAI: "gpt-6.1-sol",
2862
+ JULES: "gemini-3.1-pro-preview-customtools",
2863
+ FALLBACK_JULES: "gemini-3.8-flash"
2845
2864
  };
2846
2865
  }
2847
2866
  });
@@ -3049,9 +3068,11 @@ var init_pricing = __esm({
3049
3068
  init_constants();
3050
3069
  PRICE_PER_MTOK = {
3051
3070
  [MODELS.GEMINI]: {
3071
+ // Google's published rate from 2027-01-01 ($0.75 / $3.75 until then): budget
3072
+ // caps should over- rather than under-estimate.
3052
3073
  inputUsdPerMTok: 1.5,
3053
3074
  // For prompts and input context
3054
- outputUsdPerMTok: 9,
3075
+ outputUsdPerMTok: 7.5,
3055
3076
  // For generated text
3056
3077
  cachedInputUsdPerMTok: 0.375,
3057
3078
  // TODO: verify with provider
@@ -3059,14 +3080,14 @@ var init_pricing = __esm({
3059
3080
  // TODO: verify with provider
3060
3081
  },
3061
3082
  [MODELS.CLAUDE]: {
3062
- inputUsdPerMTok: 3,
3083
+ inputUsdPerMTok: 2,
3063
3084
  // For prompts and input context
3064
- outputUsdPerMTok: 15,
3065
- // For generated text (including "extended thinking" tokens)
3066
- cachedInputUsdPerMTok: 0.3,
3067
- // TODO: verify with provider (usually 10%)
3068
- cacheWriteUsdPerMTok: 3.75
3069
- // TODO: verify with provider (usually +25%)
3085
+ outputUsdPerMTok: 10,
3086
+ // For generated text (including thinking tokens)
3087
+ cachedInputUsdPerMTok: 0.2,
3088
+ // Published cache-read rate
3089
+ cacheWriteUsdPerMTok: 2.5
3090
+ // 5-minute cache write (1.25x input)
3070
3091
  },
3071
3092
  [MODELS.GEMINI_FALLBACK_CRITIC]: {
3072
3093
  inputUsdPerMTok: 2,
@@ -3414,8 +3435,8 @@ function runnerFromEnv(ctx = {}) {
3414
3435
  let fallbackPlannerId;
3415
3436
  const candidatePlanners = [
3416
3437
  { id: "claude-haiku-4-5", slot: "anthropic" },
3417
- { id: "gemini-3.6-flash", slot: "gemini" },
3418
- { id: "gpt-5.4", slot: "openai" }
3438
+ { id: MODELS.GEMINI, slot: "gemini" },
3439
+ { id: MODELS.OPENAI, slot: "openai" }
3419
3440
  ];
3420
3441
  for (const { id, slot } of candidatePlanners) {
3421
3442
  if (slot === plannerSlot) continue;
@@ -3461,6 +3482,7 @@ var init_providers_env = __esm({
3461
3482
  });
3462
3483
 
3463
3484
  // src/lib/ai/reflexion/state-store.ts
3485
+ import { randomUUID } from "crypto";
3464
3486
  import * as fs8 from "fs";
3465
3487
  import * as path9 from "path";
3466
3488
  import * as os3 from "os";
@@ -3552,7 +3574,7 @@ var init_state_store = __esm({
3552
3574
  fs8.mkdirSync(this.dir, { recursive: true });
3553
3575
  }
3554
3576
  const statePath = path9.join(this.dir, "state.json");
3555
- const tmpPath = path9.join(this.dir, "state.json.tmp");
3577
+ const tmpPath = path9.join(this.dir, `state.json.${randomUUID()}.tmp`);
3556
3578
  fs8.writeFileSync(tmpPath, JSON.stringify(state, null, 2), "utf-8");
3557
3579
  fs8.renameSync(tmpPath, statePath);
3558
3580
  }
@@ -3928,6 +3950,7 @@ var init_trace_utils = __esm({
3928
3950
  // src/lib/telemetry-service.ts
3929
3951
  var telemetry_service_exports = {};
3930
3952
  __export(telemetry_service_exports, {
3953
+ PRICING_MAP: () => PRICING_MAP,
3931
3954
  TelemetryService: () => TelemetryService,
3932
3955
  telemetryService: () => telemetryService,
3933
3956
  withAnalytics: () => withAnalytics
@@ -3998,11 +4021,16 @@ var init_telemetry_service = __esm({
3998
4021
  init_trace_utils();
3999
4022
  init_model_registry();
4000
4023
  PRICING_MAP = {
4024
+ "claude-opus-5-5": { input: 4, output: 20 },
4025
+ "claude-sonnet-5-5": { input: 2, output: 10 },
4001
4026
  "claude-opus-4-6": { input: 5, output: 25 },
4002
4027
  "claude-sonnet-4-6": { input: 3, output: 15 },
4003
4028
  "claude-haiku-4-5": { input: 1, output: 5 },
4004
- "gemini-3.6-flash": { input: 0.75, output: 3.75 },
4005
- "gemini-3.1-pro": { input: 2, output: 12 }
4029
+ "gemini-3.8-flash": { input: 0.75, output: 3.75 },
4030
+ "gemini-3.7-flash": { input: 0.75, output: 3.75 },
4031
+ "gemini-3.1-pro-preview": { input: 2, output: 12 },
4032
+ "gemini-3.1-pro-preview-customtools": { input: 2, output: 12 },
4033
+ "gpt-6.1-sol": { input: 2, output: 10 }
4006
4034
  };
4007
4035
  DEFAULT_PRICING = { input: 3, output: 15 };
4008
4036
  TelemetryService = class _TelemetryService {
@@ -4104,8 +4132,8 @@ var init_telemetry_service = __esm({
4104
4132
  outputRate = PRICING_MAP[validatedModel].output;
4105
4133
  } else if (validatedModel !== "unknown-model") {
4106
4134
  const familyRates = [
4107
- { match: /gemini-.*-flash/i, rate: PRICING_MAP["gemini-3.6-flash"] },
4108
- { match: /gemini-.*-pro/i, rate: PRICING_MAP["gemini-3.1-pro"] },
4135
+ { match: /gemini-.*-flash/i, rate: PRICING_MAP["gemini-3.8-flash"] },
4136
+ { match: /gemini-.*-pro/i, rate: PRICING_MAP["gemini-3.1-pro-preview"] },
4109
4137
  { match: /claude-.*-opus/i, rate: PRICING_MAP["claude-opus-4-6"] },
4110
4138
  { match: /claude-.*-sonnet/i, rate: PRICING_MAP["claude-sonnet-4-6"] },
4111
4139
  { match: /claude-.*-haiku/i, rate: PRICING_MAP["claude-haiku-4-5"] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tech-lead-stack",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "MCP server for the Tech-Lead Stack: agent skills and workflows for tech leads, PMs and HR.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -33,16 +33,16 @@
33
33
  ".agents"
34
34
  ],
35
35
  "dependencies": {
36
- "@ai-sdk/anthropic": "^3.0.68",
37
- "@ai-sdk/google": "^3.0.61",
38
- "@ai-sdk/openai": "^3.0.52",
39
- "@modelcontextprotocol/sdk": "^1.30.1",
36
+ "@ai-sdk/anthropic": "^4.0.71",
37
+ "@ai-sdk/google": "^4.0.87",
38
+ "@ai-sdk/openai": "^4.0.83",
39
+ "@modelcontextprotocol/sdk": "^1.31.0",
40
40
  "@prisma/adapter-pg": "^7.10.0",
41
41
  "@prisma/client": "^7.10.0",
42
- "ai": "^6.0.168",
42
+ "ai": "7.0.127",
43
43
  "dotenv": "^16.5.0",
44
44
  "gray-matter": "^4.0.3",
45
- "pg": "^8.23.0",
45
+ "pg": "^8.23.1",
46
46
  "yaml": "^2.9.1",
47
47
  "zod": "^4.6.5"
48
48
  }