cvm-server 0.6.0 → 0.7.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/main.cjs +4 -5
- package/package.json +1 -1
package/main.cjs
CHANGED
|
@@ -1405,7 +1405,7 @@ class $ {
|
|
|
1405
1405
|
variables: /* @__PURE__ */ new Map(),
|
|
1406
1406
|
output: []
|
|
1407
1407
|
}, u2 = n2.execute(r2.bytecode, f2);
|
|
1408
|
-
if (u2.output.length > 0 && await this.storage.appendOutput(a2, u2.output), s2.pc = u2.pc, s2.stack = u2.stack, s2.variables = Object.fromEntries(u2.variables), u2.status === "complete")
|
|
1408
|
+
if (u2.output.length > 0 && await this.storage.appendOutput(a2, u2.output), s2.pc = u2.pc, s2.stack = u2.stack, s2.variables = Object.fromEntries(u2.variables), s2.iterators = u2.iterators, u2.status === "complete")
|
|
1409
1409
|
return s2.state = "COMPLETED", u2.returnValue !== void 0 && (s2.returnValue = u2.returnValue), await this.storage.saveExecution(s2), this.vms.delete(a2), {
|
|
1410
1410
|
type: "completed",
|
|
1411
1411
|
message: "Execution completed",
|
|
@@ -1419,7 +1419,7 @@ class $ {
|
|
|
1419
1419
|
if (u2.status === "waiting_fs") {
|
|
1420
1420
|
if (u2.fsOperation) {
|
|
1421
1421
|
const l2 = this.fileSystem.listFiles(u2.fsOperation.path, u2.fsOperation.options), k2 = n2.resumeWithFsResult(u2, l2, r2.bytecode);
|
|
1422
|
-
return k2.output.length > 0 && await this.storage.appendOutput(a2, k2.output), s2.pc = k2.pc, s2.stack = k2.stack, s2.variables = Object.fromEntries(k2.variables), k2.status === "complete" ? (s2.state = "COMPLETED", k2.returnValue !== void 0 && (s2.returnValue = k2.returnValue), await this.storage.saveExecution(s2), this.vms.delete(a2), {
|
|
1422
|
+
return k2.output.length > 0 && await this.storage.appendOutput(a2, k2.output), s2.pc = k2.pc, s2.stack = k2.stack, s2.variables = Object.fromEntries(k2.variables), s2.iterators = k2.iterators, k2.status === "complete" ? (s2.state = "COMPLETED", k2.returnValue !== void 0 && (s2.returnValue = k2.returnValue), await this.storage.saveExecution(s2), this.vms.delete(a2), {
|
|
1423
1423
|
type: "completed",
|
|
1424
1424
|
message: "Execution completed",
|
|
1425
1425
|
result: k2.returnValue
|
|
@@ -1474,10 +1474,9 @@ class $ {
|
|
|
1474
1474
|
output: [],
|
|
1475
1475
|
// Start with empty output for resumed execution
|
|
1476
1476
|
ccPrompt: void 0,
|
|
1477
|
-
iterators: []
|
|
1478
|
-
// TODO: persist iterators in future
|
|
1477
|
+
iterators: r2.iterators || []
|
|
1479
1478
|
}, l2 = f2.resume(u2, s2, n2.bytecode);
|
|
1480
|
-
l2.output.length > 0 && await this.storage.appendOutput(a2, l2.output), r2.pc = l2.pc, r2.stack = l2.stack, r2.variables = Object.fromEntries(l2.variables), l2.status === "complete" ? (r2.state = "COMPLETED", l2.returnValue !== void 0 && (r2.returnValue = l2.returnValue), this.vms.delete(a2)) : l2.status === "error" ? (r2.state = "ERROR", r2.error = l2.error, this.vms.delete(a2)) : l2.status === "waiting_cc" ? (r2.state = "AWAITING_COGNITIVE_RESULT", r2.ccPrompt = l2.ccPrompt) : r2.state = "RUNNING", await this.storage.saveExecution(r2);
|
|
1479
|
+
l2.output.length > 0 && await this.storage.appendOutput(a2, l2.output), r2.pc = l2.pc, r2.stack = l2.stack, r2.variables = Object.fromEntries(l2.variables), r2.iterators = l2.iterators, l2.status === "complete" ? (r2.state = "COMPLETED", l2.returnValue !== void 0 && (r2.returnValue = l2.returnValue), this.vms.delete(a2)) : l2.status === "error" ? (r2.state = "ERROR", r2.error = l2.error, this.vms.delete(a2)) : l2.status === "waiting_cc" ? (r2.state = "AWAITING_COGNITIVE_RESULT", r2.ccPrompt = l2.ccPrompt) : r2.state = "RUNNING", await this.storage.saveExecution(r2);
|
|
1481
1480
|
}
|
|
1482
1481
|
/**
|
|
1483
1482
|
* Get current execution status
|