@theoremjs/agents 0.3.4-next.785.g899b273 → 0.3.4-next.787.g385fa7e
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.
|
@@ -176,9 +176,9 @@ async function applyOutbound(gate, events, turnPhase, onWithhold) {
|
|
|
176
176
|
const out = batch.action === 'emit' ? batch.events : [];
|
|
177
177
|
if (turnPhase !== 'complete')
|
|
178
178
|
return out;
|
|
179
|
-
// why: The response is whole only once its verdict is in: `turn_complete`
|
|
180
|
-
// verdict released, and a withheld response ends on its error.
|
|
181
|
-
const said = out.filter((event) => !isTurnComplete(event));
|
|
179
|
+
// why: The response is whole only once its verdict is in: `turn_complete` and `done` follow what
|
|
180
|
+
// the verdict released, and a withheld response ends on its error.
|
|
181
|
+
const said = out.filter((event) => !isTurnComplete(event) && event.type !== 'done');
|
|
182
182
|
const finalized = await finalizeLiveOutboundTurn(gate);
|
|
183
183
|
if (finalized.action === 'withhold') {
|
|
184
184
|
onWithhold();
|
|
@@ -192,7 +192,7 @@ async function applyOutbound(gate, events, turnPhase, onWithhold) {
|
|
|
192
192
|
...said,
|
|
193
193
|
...(finalized.action === 'emit' ? finalized.events : []),
|
|
194
194
|
...out.filter(isTurnComplete),
|
|
195
|
-
|
|
195
|
+
...out.filter((event) => event.type === 'done'),
|
|
196
196
|
];
|
|
197
197
|
}
|
|
198
198
|
function isTurnComplete(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theoremjs/agents",
|
|
3
|
-
"version": "0.3.4-next.
|
|
3
|
+
"version": "0.3.4-next.787.g385fa7e",
|
|
4
4
|
"description": "A flat TypeScript agent kernel for typed profiles, deterministic turn execution, registered tools, provider adapters, guardrails, and host-injected traces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|