@jaypie/mcp 0.8.182 → 0.8.184

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/assets.js CHANGED
@@ -55,11 +55,11 @@ function getMcpAssetPaths() {
55
55
  */
56
56
  function getMcpBuildInfo() {
57
57
  return {
58
- commit: "91eb8a17"
58
+ commit: "9aa68f12"
59
59
  ,
60
- version: "0.8.182"
60
+ version: "0.8.184"
61
61
  ,
62
- versionString: "@jaypie/mcp@0.8.182#91eb8a17"
62
+ versionString: "@jaypie/mcp@0.8.184#9aa68f12"
63
63
  ,
64
64
  };
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/mcp",
3
- "version": "0.8.182",
3
+ "version": "0.8.184",
4
4
  "description": "Jaypie MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,9 @@
1
+ ---
2
+ version: 1.2.118
3
+ date: 2026-10-05
4
+ summary: Pulls @jaypie/llm 1.3.59
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`@jaypie/llm` 1.3.59**: the structured-output corrective turn is taken once per run; an empty Gemini reply makes 2 requests before failing over instead of 24.
@@ -0,0 +1,9 @@
1
+ ---
2
+ version: 1.2.119
3
+ date: 2026-10-07
4
+ summary: Pulls @jaypie/llm 1.3.60
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`@jaypie/llm` 1.3.60**: `effort` accepts a per-model map, fallback entries take their own `effort`, and `resolveEffort` exports the native mapping.
@@ -0,0 +1,18 @@
1
+ ---
2
+ version: 1.3.59
3
+ date: 2026-10-05
4
+ summary: The structured-output corrective turn is taken once per run instead of repeating until the turn budget runs out
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ ### One corrective turn (issue #610)
10
+
11
+ A `format` request answered with prose or with nothing took the corrective turn (only the `structured_output` tool offered) on every turn until `turns` ran out. With the default budget of 24, an empty Gemini reply cost 24 requests, each resending the full prompt, before the chain failed over.
12
+
13
+ - The corrective turn is taken at most once per run. A second miss settles: empty content fails over as in 1.3.58, and prose completes as it did when turns ran out.
14
+ - Applies to every adapter with a corrective turn: Fireworks, Google, and Mistral.
15
+
16
+ ## Testing
17
+
18
+ - `OperateLoop` specs cover one corrective turn with the default budget for empty content and for prose.
@@ -0,0 +1,26 @@
1
+ ---
2
+ version: 1.3.60
3
+ date: 2026-10-07
4
+ summary: effort accepts a per-model map, fallback entries take their own effort, and resolveEffort exports the native mapping
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ ### Per-model effort (issue #612)
10
+
11
+ A fallback chain mixes providers whose reasoning cost differs sharply at the same level, but `effort` was one value per call.
12
+
13
+ - `effort` accepts `LlmEffortMap`. Each attempt (primary, fallback, linger pass) resolves its own level: exact model id, then `MODEL` catalog key whose value is exactly the model, then provider (or the `gemini` alias), then `default`. No match leaves the provider default.
14
+ - Catalog keys match exact catalog values only, never name fragments, so `flash` cannot catch both Gemini Flash and GLM Flash.
15
+ - `LlmFallbackConfig.effort` sets a single level for one entry and replaces the call's value there.
16
+ - `LlmExchangeRequest.effort` records the level each attempt resolved.
17
+
18
+ ### `resolveEffort`
19
+
20
+ - `resolveEffort({ model, effort, provider? })` returns `{ level, model, native, papered, provider }`, where `native` is the request fragment the adapter sends (e.g. `{ thinkingConfig: { thinkingLevel: "LOW" } }`). Undefined `native` means no level resolved or the model has no reasoning control.
21
+ - Adapters expose `resolveEffort` and build requests from it, so the export and the wire request share one mapping.
22
+
23
+ ## Testing
24
+
25
+ - `resolveEffort.spec.ts` covers map precedence, catalog keys, the provider alias, and native fragments per provider.
26
+ - `OperateLoop` and `StreamLoop` specs cover map resolution and the exchange record; `Llm` specs cover per-entry effort on a fallback.
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: 0.8.183
3
+ date: 2026-10-05
4
+ summary: Release notes for @jaypie/llm 1.3.59 and jaypie 1.2.118; llm skill documents the single corrective turn
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **Release notes**: `@jaypie/llm` 1.3.59 and `jaypie` 1.2.118
10
+ - **`llm` skill**: the corrective turn is taken once per run
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: 0.8.184
3
+ date: 2026-10-07
4
+ summary: Release notes for @jaypie/llm 1.3.60, testkit 1.2.82, and jaypie 1.2.119; llm skill documents per-model effort and resolveEffort
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **Release notes**: `@jaypie/llm` 1.3.60, `@jaypie/testkit` 1.2.82, and `jaypie` 1.2.119
10
+ - **`llm` skill**: per-model effort maps, `LlmFallbackConfig.effort`, and `resolveEffort`
@@ -0,0 +1,9 @@
1
+ ---
2
+ version: 1.2.82
3
+ date: 2026-10-07
4
+ summary: Passes through resolveEffort from @jaypie/llm
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - `resolveEffort` in the `@jaypie/llm` mock, passed through to the real implementation.
package/skills/llm.md CHANGED
@@ -384,7 +384,7 @@ string. The operate loop first parses the text as JSON, stripping a Markdown
384
384
  code fence — this runs for every provider. If that fails, adapters that opt in
385
385
  (`supportsStructuredOutputRetry`: **Fireworks** and **Google**) take a
386
386
  corrective turn offering only the `structured_output` tool and demanding it be
387
- called, bounded by the `turns` budget. That turn withholds the caller's own
387
+ called. The corrective turn is taken once per run, within the `turns` budget. That turn withholds the caller's own
388
388
  tools and does not send the schema natively, leaving one unambiguous way to
389
389
  answer.
390
390
 
@@ -1125,7 +1125,7 @@ describe("LLM Integration", () => {
1125
1125
  interface LlmOperateOptions {
1126
1126
  cache?: boolean | 0 | "5m" | "1h"; // Prompt caching (default on at 1h; false/0 disables)
1127
1127
  data?: Record<string, any>; // Placeholder substitution data
1128
- effort?: LlmEffort; // Provider-neutral reasoning effort (lowest|low|medium|high|highest)
1128
+ effort?: LlmEffort | LlmEffortMap; // Reasoning effort (lowest|low|medium|high|highest), or a per-model map
1129
1129
  fallback?: LlmFallbackConfig[] | false; // Fallback provider chain
1130
1130
  format?: NaturalSchema | JsonObject | ZodType; // Structured output schema (natural syntax preferred)
1131
1131
  history?: LlmHistory; // Previous conversation
@@ -1144,6 +1144,9 @@ interface LlmFallbackConfig {
1144
1144
  provider: string; // Provider name (e.g., "openai", "anthropic", "google")
1145
1145
  model?: string; // Model to use (optional, uses provider default)
1146
1146
  apiKey?: string; // API key (optional, uses environment variable)
1147
+ effort?: LlmEffort; // Effort for this entry only, replacing the call's effort
1148
+ providerOptions?: JsonObject; // Provider-specific options for this entry only
1149
+ timeout?: number | false; // Per-attempt deadline for this entry only
1147
1150
  }
1148
1151
  ```
1149
1152
 
@@ -1220,6 +1223,58 @@ erroring):
1220
1223
  tools natively — no emulation.
1221
1224
  - **Bedrock** — not yet wired; `effort` is ignored.
1222
1225
 
1226
+ ### Per-model effort
1227
+
1228
+ Reasoning cost differs sharply between providers at the same level, so a
1229
+ fallback chain can set `effort` per model with a map. Each attempt (primary,
1230
+ every fallback, and the linger pass) resolves its own level, first match wins:
1231
+
1232
+ 1. **Exact model id** (`"gpt-6.1-sol"`)
1233
+ 2. **`MODEL` catalog key** whose value is exactly the serving model (`"sol"`
1234
+ for `MODEL.SOL`, `"gemini_flash"`, `"fireworks.glm"`); case-insensitive,
1235
+ any separator. Keys never match by name fragment: `"flash"` matches nothing.
1236
+ 3. **Provider** (`"openai"`, `"anthropic"`, `"google"`, `"xai"`,
1237
+ `"openrouter"`, ...) or an alias (`"gemini"` → `google`)
1238
+ 4. **`default`**
1239
+ 5. No match leaves the provider default untouched
1240
+
1241
+ ```typescript
1242
+ await llm.operate(input, {
1243
+ model: "gemini-3-flash",
1244
+ fallback: [
1245
+ { provider: "openai", model: "gpt-6.1-sol" },
1246
+ { provider: "anthropic", model: "claude-opus-5-5", effort: "highest" },
1247
+ ],
1248
+ effort: { gemini: "low", "gpt-6.1-sol": "medium", default: "high" },
1249
+ });
1250
+ ```
1251
+
1252
+ A single `LlmEffort` keeps its meaning everywhere. A fallback entry's own
1253
+ `effort` replaces the call's value (single or map) for that entry. The exchange
1254
+ records the level each attempt resolved (`LlmExchangeRequest.effort`).
1255
+
1256
+ ### `resolveEffort`
1257
+
1258
+ `resolveEffort` returns the level a model resolves to and the request fragment
1259
+ its adapter would send (`native`), or no `native` when the model has no
1260
+ reasoning control:
1261
+
1262
+ ```typescript
1263
+ import { resolveEffort } from "@jaypie/llm";
1264
+
1265
+ resolveEffort({ model: "gemini-3-flash", effort: "low" });
1266
+ // → { level: "low", model: "gemini-3-flash", provider: "google", papered: false,
1267
+ // native: { thinkingConfig: { thinkingLevel: "LOW" } } }
1268
+
1269
+ resolveEffort({ model: "claude-opus-5-5", effort: { anthropic: "high" } });
1270
+ // → { level: "high", ..., native: { output_config: { effort: "high" } } }
1271
+ ```
1272
+
1273
+ Accepts an optional `provider` when the model id alone does not route (e.g. an
1274
+ OpenRouter path). Comparing `native` across levels shows which are distinct on
1275
+ a model: `lowest` and `low` on Claude both send `{ effort: "low" }`, so one of
1276
+ the two is redundant in an effort sweep.
1277
+
1223
1278
  First-class `effort` takes precedence over a raw `providerOptions.reasoning`
1224
1279
  (same convention as `temperature`). For control the neutral scale doesn't
1225
1280
  express (an exact token budget, OpenAI `none`), use `providerOptions` directly.