polpo-ai 0.18.7 → 0.18.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/README.md +11 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -684,12 +684,15 @@ const stream = polpo.chatCompletionsStream({
|
|
|
684
684
|
await stream.start();
|
|
685
685
|
if (!stream.runId) throw new Error("Run steering is unavailable");
|
|
686
686
|
|
|
687
|
-
await polpo.steerRun(stream.runId, {
|
|
687
|
+
const admission = await polpo.steerRun(stream.runId, {
|
|
688
688
|
id: crypto.randomUUID(),
|
|
689
689
|
mode: "steer",
|
|
690
690
|
content: { text: "Use PostgreSQL and keep the existing visual system." },
|
|
691
691
|
});
|
|
692
692
|
|
|
693
|
+
const receipt = await polpo.getSteeringReceipt(stream.runId, admission.id);
|
|
694
|
+
console.log(receipt.admission, receipt.delivery);
|
|
695
|
+
|
|
693
696
|
for await (const chunk of stream) {
|
|
694
697
|
// Render the normal OpenAI-compatible stream.
|
|
695
698
|
}
|
|
@@ -698,10 +701,15 @@ for await (const chunk of stream) {
|
|
|
698
701
|
`steer` is delivered before the next model invocation at a safe boundary.
|
|
699
702
|
`follow_up` waits until the run would otherwise finish and then starts another
|
|
700
703
|
turn. Messages may include HTTPS or data-URL image, audio, and file
|
|
701
|
-
attachments
|
|
702
|
-
enqueue duplicate work
|
|
704
|
+
attachments and an optional BCP 47 `locale`. Message ids are idempotency keys;
|
|
705
|
+
retries with the same payload do not enqueue duplicate work, while conflicting
|
|
706
|
+
reuse is rejected. Admission and eventual delivery are separate receipt states.
|
|
707
|
+
`abortRun(runId, reason)` cancels the same run-scoped
|
|
703
708
|
model and tool lifecycle. Steering never interrupts a tool call in progress.
|
|
704
709
|
|
|
710
|
+
Agents and Loops can choose `accept`, `reject`, or the compatible default
|
|
711
|
+
`best_effort`. See [the complete policy and receipt contract](docs/runtime-steering.md).
|
|
712
|
+
|
|
705
713
|
Pending steering is included in durable turn checkpoints and survives resume.
|
|
706
714
|
The built-in OSS host keeps the active-run index in process; distributed hosts
|
|
707
715
|
should implement the same `SteeringRunRegistry` contract with a durable command
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo-ai",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.9",
|
|
4
4
|
"description": "The open backend for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"node": ">=20.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@polpo-ai/node": "0.18.
|
|
48
|
+
"@polpo-ai/node": "0.18.9"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/better-sqlite3": "^7.6.13",
|