@warlock.js/ai-panoptic 5.61.0 → 5.62.0
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 +6 -0
- package/cjs/index.cjs +19 -1
- package/cjs/index.cjs.map +1 -1
- package/esm/collector/extract-span-attributes.d.mts.map +1 -1
- package/esm/collector/extract-span-attributes.mjs +19 -1
- package/esm/collector/extract-span-attributes.mjs.map +1 -1
- package/llms-full.txt +1 -1
- package/package.json +4 -4
- package/skills/export-traces/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/ai-panoptic` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.62.0 - 2026-11-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Spans of `ai.image`, `ai.speech` and `ai.transcribe` runs carry their model and size: `image.model.name`, `image.model.provider`, `image.count`, `speech.model.name`, `speech.model.provider`, `speech.characters`, `transcription.model.name`, `transcription.model.provider` and `transcription.durationSeconds`. Before, these spans had no attributes.
|
|
12
|
+
|
|
7
13
|
## 5.60.0 - 2026-11-19
|
|
8
14
|
|
|
9
15
|
### Added
|
package/cjs/index.cjs
CHANGED
|
@@ -124,7 +124,12 @@ function extractSpanAttributes(report) {
|
|
|
124
124
|
case "orchestrator":
|
|
125
125
|
addOrchestratorAttributes(attributes, extensions);
|
|
126
126
|
break;
|
|
127
|
-
case "tool":
|
|
127
|
+
case "tool":
|
|
128
|
+
addToolAttributes(attributes, extensions);
|
|
129
|
+
break;
|
|
130
|
+
case "image":
|
|
131
|
+
case "speech":
|
|
132
|
+
case "transcription": addMediaAttributes(attributes, report.type, extensions);
|
|
128
133
|
}
|
|
129
134
|
if (Object.keys(attributes).length === 0) return;
|
|
130
135
|
return attributes;
|
|
@@ -177,6 +182,19 @@ function addToolAttributes(attributes, extensions) {
|
|
|
177
182
|
if (extensions.callId !== void 0) attributes["tool.callId"] = extensions.callId;
|
|
178
183
|
if (extensions.recoveredFrom !== void 0) attributes["tool.recoveredFrom"] = extensions.recoveredFrom;
|
|
179
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Image, speech and transcription runs report the model they ran against.
|
|
187
|
+
* It is written under `<type>.model.name` / `<type>.model.provider`
|
|
188
|
+
* (for example `image.model.name`), next to one size field per type:
|
|
189
|
+
* `image.count`, `speech.characters`, `transcription.durationSeconds`.
|
|
190
|
+
*/
|
|
191
|
+
function addMediaAttributes(attributes, type, extensions) {
|
|
192
|
+
if (extensions.model?.name !== void 0) attributes[`${type}.model.name`] = extensions.model.name;
|
|
193
|
+
if (extensions.model?.provider !== void 0) attributes[`${type}.model.provider`] = extensions.model.provider;
|
|
194
|
+
if (type === "image" && extensions.imageCount !== void 0) attributes["image.count"] = extensions.imageCount;
|
|
195
|
+
if (type === "speech" && extensions.characters !== void 0) attributes["speech.characters"] = extensions.characters;
|
|
196
|
+
if (type === "transcription" && extensions.durationSeconds !== void 0) attributes["transcription.durationSeconds"] = extensions.durationSeconds;
|
|
197
|
+
}
|
|
180
198
|
|
|
181
199
|
//#endregion
|
|
182
200
|
//#region ../../packages/ai-panoptic/src/collector/report-to-span.ts
|