@feniix/bridgekit 0.19.0 → 0.19.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.19.1] - 2026-10-14
10
+
11
+ ### Fixed
12
+
13
+ - Type the pi adapter result's `structuredContent` as a JSON value instead of
14
+ `unknown`, matching pi 1.1+ `AgentToolResult`. Consumers on pi 1.1 and 1.2 can
15
+ pass `registerPiTools` the pi `ExtensionAPI` (and wrap registered tools)
16
+ without casts. Runtime behaviour is unchanged.
17
+
9
18
  ## [0.19.0] - 2026-10-14
10
19
 
11
20
  ### Added
@@ -8,10 +8,13 @@ type PiToolUpdate = {
8
8
  content: PiContent[];
9
9
  details: Record<string, unknown>;
10
10
  };
11
+ type PiJsonValue = null | boolean | number | string | readonly PiJsonValue[] | {
12
+ [key: string]: PiJsonValue;
13
+ };
11
14
  type PiToolResult = {
12
15
  content: PiContent[];
13
16
  details: Record<string, unknown>;
14
- structuredContent?: unknown;
17
+ structuredContent?: PiJsonValue;
15
18
  isError?: boolean;
16
19
  };
17
20
  type PiToolDefinition = {
@@ -131,7 +131,11 @@ export function registerPiTools(pi, tools, options = {}) {
131
131
  return {
132
132
  content: [{ type: "text", text: result.text }],
133
133
  details: toPiDetails(result),
134
- ...(result.structuredContent !== undefined && { structuredContent: result.structuredContent }),
134
+ // Portable structured content is JSON by contract (MCP serializes the same
135
+ // value); the cast narrows the portable `unknown` to pi's wire type.
136
+ ...(result.structuredContent !== undefined && {
137
+ structuredContent: result.structuredContent,
138
+ }),
135
139
  isError: result.isError === true,
136
140
  };
137
141
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feniix/bridgekit",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "BridgeKit defines TypeBox-backed tools once and adapts them to pi, MCP, and other hosts.",
5
5
  "keywords": [
6
6
  "pi",