@feniix/bridgekit 0.9.0 → 0.9.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
@@ -4,6 +4,18 @@ All notable changes to `@feniix/bridgekit` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.9.1] - 2026-05-26
8
+
9
+ ### Fixed
10
+
11
+ - pi adapter now spreads `hostExtras.pi.promptGuidelines` into a fresh
12
+ `string[]` before handing it to `pi.registerTool`. Bridgekit's declared type
13
+ stays `readonly string[]` (signals immutability of consumer-owned metadata),
14
+ but the boundary copy satisfies pi-coding-agent's mutable `string[]`
15
+ contract. Resolves contravariance friction observed in three downstream
16
+ consumers that previously needed `pi as unknown as PiToolRegistration`
17
+ casts. Resolves [#47](https://github.com/feniix/bridgekit/issues/47).
18
+
7
19
  ## [0.9.0] - 2026-05-26
8
20
 
9
21
  ### Changed
@@ -60,7 +60,11 @@ export function registerPiTools(pi, tools, options = {}) {
60
60
  // so tools without `hostExtras.pi` build a registration object whose
61
61
  // own-property keys are unchanged from the pre-0.9 shape.
62
62
  ...(piExtras?.promptSnippet !== undefined && { promptSnippet: piExtras.promptSnippet }),
63
- ...(piExtras?.promptGuidelines !== undefined && { promptGuidelines: piExtras.promptGuidelines }),
63
+ // Spread into a fresh array at the boundary: bridgekit declares promptGuidelines
64
+ // as `readonly string[]` (signal: "we don't mutate consumer metadata"), but
65
+ // pi-coding-agent's registerTool input is `string[]` (mutable). The boundary
66
+ // copy satisfies both sides without weakening either declared type.
67
+ ...(piExtras?.promptGuidelines !== undefined && { promptGuidelines: [...piExtras.promptGuidelines] }),
64
68
  async execute(_toolCallId, params, signal, onUpdate, _ctx) {
65
69
  let result;
66
70
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feniix/bridgekit",
3
- "version": "0.9.0",
3
+ "version": "0.9.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",