@jaypie/mcp 0.8.91 → 0.8.92

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.
@@ -9,7 +9,7 @@ import { gt } from 'semver';
9
9
  /**
10
10
  * Docs Suite - Documentation services (skill, version, release_notes)
11
11
  */
12
- const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.91#18d21761"
12
+ const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.92#ea103a82"
13
13
  ;
14
14
  const __filename$1 = fileURLToPath(import.meta.url);
15
15
  const __dirname$1 = path.dirname(__filename$1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/mcp",
3
- "version": "0.8.91",
3
+ "version": "0.8.92",
4
4
  "description": "Jaypie MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,28 @@
1
+ ---
2
+ version: 1.3.8
3
+ date: 2026-07-04
4
+ summary: Surface resolved LlmTool.message in tool hooks and the tool_call progress event; add Toolkit.resolveMessage
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ ### Tool Messages
10
+
11
+ - `beforeEachTool`, `afterEachTool`, and `onToolError` hooks receive
12
+ `message` — the tool's resolved `LlmTool.message` (static string or
13
+ function of the parsed args), `undefined` when the tool defines none.
14
+ Applies to both `operate()` and `stream()`
15
+ - The `tool_call` progress event (`onProgress`) carries `tool.message`
16
+ - New public `Toolkit.resolveMessage({ name, arguments })` — resolves a
17
+ tool's message without calling the tool; returns `undefined` when the
18
+ tool is missing or defines no message; never throws (resolution errors
19
+ log at warn)
20
+ - `Toolkit.call({ name, arguments, message })` accepts an optional
21
+ pre-resolved message so the loops resolve each tool's message exactly
22
+ once per call (function messages are not invoked twice)
23
+
24
+ ## Migration
25
+
26
+ No changes required. The Toolkit `log` option remains supported and
27
+ continues to receive the resolved message (or the default
28
+ `name:{args}` line when no message is defined).
@@ -0,0 +1,13 @@
1
+ ---
2
+ version: 0.8.92
3
+ date: 2026-07-04
4
+ summary: Document tool messages in the llm skill — hooks message field, tool_call event message, Toolkit.resolveMessage
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - `skill("llm")` documents Tool Messages: the `LlmTool.message` field, the
10
+ `message` field on `beforeEachTool`/`afterEachTool`/`onToolError` hook
11
+ contexts, `tool.message` on the `tool_call` progress event, and
12
+ `Toolkit.resolveMessage()`
13
+ - Release notes for `@jaypie/llm` 1.3.8
package/skills/llm.md CHANGED
@@ -166,6 +166,30 @@ When enabled:
166
166
  - The explanation is stripped before the tool executes (tools receive clean arguments)
167
167
  - Useful for debugging and understanding LLM decision-making
168
168
 
169
+ ### Tool Messages
170
+
171
+ Tools may define a `message` — a human-readable status line for the call, either a static string or a function of the parsed arguments:
172
+
173
+ ```typescript
174
+ const toolkit = new Toolkit([
175
+ {
176
+ name: "get_weather",
177
+ description: "Get current weather for a city",
178
+ type: "function",
179
+ parameters: { type: "object", properties: { city: { type: "string" } } },
180
+ call: async ({ city }) => ({ temp: 72 }),
181
+ message: ({ city }) => `Checking weather in ${city}`,
182
+ },
183
+ ]);
184
+ ```
185
+
186
+ The resolved message surfaces in three places during `operate()`/`stream()`:
187
+ - The Toolkit's `log` option: `new Toolkit(tools, { log: (message, { name, args }) => ... })`
188
+ - The `beforeEachTool`, `afterEachTool`, and `onToolError` hooks as `message`
189
+ - The `tool_call` progress event as `tool.message` (`operate()` only)
190
+
191
+ Resolve one directly with `toolkit.resolveMessage({ name, arguments })` — returns the resolved string, or `undefined` when the tool is missing or defines no message; it never throws.
192
+
169
193
  ## Structured Output
170
194
 
171
195
  ### Natural Schema
@@ -303,19 +327,21 @@ const response = await Llm.operate(input, {
303
327
  afterEachModelResponse: ({ content, usage }) => {
304
328
  console.log(`Tokens: ${usage.total}`);
305
329
  },
306
- beforeEachTool: ({ toolName, args }) => {
307
- console.log(`Calling ${toolName} with`, args);
330
+ beforeEachTool: ({ toolName, args, message }) => {
331
+ console.log(message ?? `Calling ${toolName} with ${args}`);
308
332
  },
309
- afterEachTool: ({ result, toolName }) => {
333
+ afterEachTool: ({ result, toolName, message }) => {
310
334
  console.log(`${toolName} returned:`, result);
311
335
  },
312
- onToolError: ({ error, toolName }) => {
336
+ onToolError: ({ error, toolName, message }) => {
313
337
  console.error(`${toolName} failed:`, error);
314
338
  },
315
339
  },
316
340
  });
317
341
  ```
318
342
 
343
+ The tool hooks receive `message` — the tool's resolved `LlmTool.message`, when the tool defines one (see Tool Messages).
344
+
319
345
  ## Progress Events
320
346
 
321
347
  For progress reporting (UI updates, websockets, queue notifications), prefer `onProgress` over wiring individual hooks. It receives lightweight, serializable events as the loop runs:
@@ -341,7 +367,7 @@ Fields carried by each event (`turn` is 1-indexed):
341
367
  | `start` | `model`, `provider`, `maxTurns` |
342
368
  | `model_request` | `turn`, `model` |
343
369
  | `model_response` | `turn`, `content` (text, if any), `toolCalls` (`[{ name, arguments }]`, if any), `usage` (this turn) |
344
- | `tool_call` | `turn`, `tool: { name, arguments }` — fires before the tool runs; `arguments` is the JSON string |
370
+ | `tool_call` | `turn`, `tool: { name, arguments, message }` — fires before the tool runs; `arguments` is the JSON string; `message` is the resolved `LlmTool.message`, when the tool defines one |
345
371
  | `tool_result` | `turn`, `tool: { name }` — the result value is deliberately omitted (it can be arbitrarily large); use the `afterEachTool` hook to receive it |
346
372
  | `tool_error` | `turn`, `tool: { name }`, `error` (message string) |
347
373
  | `retry` | `turn`, `error` (message string) |