@jskit-ai/assistant-runtime 0.1.228 → 0.1.230
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/assistant-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.230",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./server": "./src/server/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jskit-ai/assistant-core": "0.1.
|
|
15
|
+
"@jskit-ai/assistant-core": "0.1.236",
|
|
16
16
|
"json-rest-schema": "^1.0.17"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
@@ -504,8 +504,10 @@ function createConversation(identity, { api, socket, actorKey, placement, reader
|
|
|
504
504
|
const rejection = failure.details?.delivery;
|
|
505
505
|
const notSent = Number.isInteger(failure.status) && failure.status >= 400 && failure.status < 500 &&
|
|
506
506
|
rejection && !Array.isArray(rejection) && rejection.status === "not-sent" && rejection.messageId === messageId;
|
|
507
|
+
// A definite rejection keeps its code so the application can offer
|
|
508
|
+
// the matching recovery, such as freeing assistant context.
|
|
507
509
|
if (notSent || SEND_REJECTIONS.has(failure.code) || failure.code === "conversation_steer_turn_finished" && failure.status === 409 && !failure.details?.delivery) return { ok: false, error: failure.message,
|
|
508
|
-
...(
|
|
510
|
+
...(failure.code ? { code: failure.code } : {}) };
|
|
509
511
|
throw failure;
|
|
510
512
|
} finally {
|
|
511
513
|
if (pendingMessages.get(messageId) === pending) pendingMessages.delete(messageId);
|