narraeon 0.2.0 → 0.3.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/dist/node/protocol/v1.js +6 -0
- package/dist/node/runtime/FileNativePhysicalClone.js +86 -0
- package/dist/node/runtime/V1Runtime.js +7 -6
- package/dist/node/runtime/model/FileNativeModelAdapters.js +40 -13
- package/dist/node/runtime/model/ModelHost.js +7 -0
- package/dist/node/runtime/play/FileNativePlayTimelineStore.js +96 -7
- package/dist/node/runtime/play/PlayCallChain.js +309 -53
- package/dist/node/runtime/play/PlayFollowupRequests.js +42 -22
- package/dist/node/runtime/prompt/FileNativePromptCompiler.js +5 -5
- package/dist/node/runtime/world/FileNativeAuthorityV3.js +971 -0
- package/dist/node/runtime/world/FileNativeHistoryProjection.js +39 -0
- package/dist/node/runtime/world/FileNativeWorldStorageMigrator.js +447 -6
- package/dist/node/runtime/world/FileNativeWorldStore.js +423 -850
- package/dist/node/server/createServer.js +10 -2
- package/dist/web/assets/index-D5VqDvjY.js +1192 -0
- package/dist/web/assets/index-Xa0s35CJ.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-DHV_VWl3.js +0 -1192
- package/dist/web/assets/index-DjLCkP99.css +0 -1
|
@@ -98,7 +98,8 @@ export async function createServer(input) {
|
|
|
98
98
|
runtimeRequestType === "play.chain.append") &&
|
|
99
99
|
isRecord(response.result) &&
|
|
100
100
|
response.result.status === "interrupted" &&
|
|
101
|
-
typeof response.result.lastFailure === "string"
|
|
101
|
+
typeof response.result.lastFailure === "string" &&
|
|
102
|
+
!hasPlayCancellation(response.result))
|
|
102
103
|
request.log.error({
|
|
103
104
|
runtimeRequestType,
|
|
104
105
|
playCallFailure: response.result.lastFailure,
|
|
@@ -162,7 +163,8 @@ function sendPlayCallChainStream(runtime, runtimeRequest, request, reply) {
|
|
|
162
163
|
throw new Error("The Runtime stream did not return a call-chain snapshot");
|
|
163
164
|
send({ kind: "snapshot", value: response.result, final: true });
|
|
164
165
|
if (response.result.status === "interrupted" &&
|
|
165
|
-
response.result.lastFailure !== null
|
|
166
|
+
response.result.lastFailure !== null &&
|
|
167
|
+
!hasPlayCancellation(response.result))
|
|
166
168
|
request.log.error({
|
|
167
169
|
runtimeRequestType: runtimeRequest.type,
|
|
168
170
|
playCallFailure: response.result.lastFailure,
|
|
@@ -189,3 +191,9 @@ function isPlayCallChainView(value) {
|
|
|
189
191
|
value.status === "running" ||
|
|
190
192
|
value.status === "interrupted"));
|
|
191
193
|
}
|
|
194
|
+
function hasPlayCancellation(value) {
|
|
195
|
+
if (!isRecord(value) || !Array.isArray(value.events))
|
|
196
|
+
return false;
|
|
197
|
+
const last = value.events.at(-1);
|
|
198
|
+
return isRecord(last) && last.kind === "cancellation";
|
|
199
|
+
}
|