@oh-my-pi/pi-ai 18.8.8 → 18.8.9

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.8.9] - 2026-10-10
6
+
7
+ ### Changed
8
+
9
+ - Updated state field rendering to trim trailing whitespace and normalize empty collection formatting for consistent prompt output
10
+
5
11
  ## [18.8.8] - 2026-10-10
6
12
 
7
13
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-ai",
3
- "version": "18.8.8",
3
+ "version": "18.8.9",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "keywords": [
6
6
  "ai",
@@ -155,11 +155,11 @@
155
155
  "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
156
156
  },
157
157
  "dependencies": {
158
- "@oh-my-pi/omptype": "18.8.8",
159
- "@oh-my-pi/pi-catalog": "18.8.8",
160
- "@oh-my-pi/pi-natives": "18.8.8",
161
- "@oh-my-pi/pi-utils": "18.8.8",
162
- "@oh-my-pi/pi-wire": "18.8.8"
158
+ "@oh-my-pi/omptype": "18.8.9",
159
+ "@oh-my-pi/pi-catalog": "18.8.9",
160
+ "@oh-my-pi/pi-natives": "18.8.9",
161
+ "@oh-my-pi/pi-utils": "18.8.9",
162
+ "@oh-my-pi/pi-wire": "18.8.9"
163
163
  },
164
164
  "devDependencies": {
165
165
  "@types/bun": "^1.3.14"
@@ -93,7 +93,15 @@ function renderStateField(key: string, value: JsonValue): string {
93
93
  if (typeof value !== "object" || value === null) {
94
94
  return `${open}${escapeXmlText(value === null ? "null" : String(value))}${close}`;
95
95
  }
96
- const yaml = YAML.stringify(value, null, 2).trimEnd();
96
+ const yaml = YAML.stringify(value, null, 2)
97
+ // Bun <=1.4.2 emits `key: ` before a nested block and puts an empty
98
+ // collection on its own line; 1.4.3 emits `key:` and `key: {}`. Pin the
99
+ // newer form so prompt bytes (and prompt-cache keys) do not depend on the
100
+ // Bun build. Values with edge whitespace are always quoted, so trimming
101
+ // line ends never alters data.
102
+ .replace(/[ \t]+$/gm, "")
103
+ .replace(/:\n +(\{\}|\[\])$/gm, ": $1")
104
+ .trimEnd();
97
105
  return `${open}\n${escapeXmlText(yaml)}\n${close}`;
98
106
  }
99
107