@polpo-ai/server 0.15.128 → 0.15.129
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.
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { modelErrorEnvelope, modelNotFoundEnvelope, visibleModelError } from "./sse.js";
|
|
2
|
+
import { modelErrorEnvelope, modelNotFoundEnvelope, sseChunk, visibleModelError } from "./sse.js";
|
|
3
|
+
describe("sseChunk", () => {
|
|
4
|
+
it("emits reasoning summaries through the existing thinking extension", () => {
|
|
5
|
+
expect(JSON.parse(sseChunk("chat-1", {}, null, {
|
|
6
|
+
thinking: "Checked the constraints.",
|
|
7
|
+
}))).toMatchObject({
|
|
8
|
+
choices: [{
|
|
9
|
+
delta: {},
|
|
10
|
+
finish_reason: null,
|
|
11
|
+
thinking: "Checked the constraints.",
|
|
12
|
+
}],
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
3
16
|
describe("model error envelopes", () => {
|
|
4
17
|
it("extracts a nested gateway error without leaking the whole response", () => {
|
|
5
18
|
const error = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse.test.js","sourceRoot":"","sources":["../../../src/routes/completions/sse.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"sse.test.js","sourceRoot":"","sources":["../../../src/routes/completions/sse.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEl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,EAAE,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE;SAC/D,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polpo-ai/server",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.129",
|
|
4
4
|
"description": "Polpo API route factories — edge-compatible Hono routes for tasks, agents, missions, vault, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"hono": ">=4.0.0",
|
|
21
21
|
"nanoid": ">=5.0.0",
|
|
22
22
|
"typescript": "^5.7.3",
|
|
23
|
-
"@polpo-ai/channels": "0.15.
|
|
24
|
-
"@polpo-ai/connect": "0.15.
|
|
25
|
-
"@polpo-ai/
|
|
26
|
-
"@polpo-ai/
|
|
27
|
-
"@polpo-ai/llm": "0.15.
|
|
28
|
-
"@polpo-ai/tools": "0.15.
|
|
23
|
+
"@polpo-ai/channels": "0.15.129",
|
|
24
|
+
"@polpo-ai/connect": "0.15.129",
|
|
25
|
+
"@polpo-ai/core": "0.15.129",
|
|
26
|
+
"@polpo-ai/connect-server": "0.15.129",
|
|
27
|
+
"@polpo-ai/llm": "0.15.129",
|
|
28
|
+
"@polpo-ai/tools": "0.15.129"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"ai": ">=6.0.182 <7",
|