clavarium 0.2.455-next.1 → 0.2.456-next.1
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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server/conversations.mjs +4 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.456-next.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.456-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/conversations.mjs
CHANGED
|
@@ -1402,6 +1402,10 @@ export class Conversations {
|
|
|
1402
1402
|
const state = await this.#vms.state(name, { fresh: true }).catch(() => undefined);
|
|
1403
1403
|
if (tool.state && state !== 'Running') throw new Refusal(409, 'Its shared machine is not running: open the conversation first, so that its tool\'s state can come along.', { retry: false });
|
|
1404
1404
|
const memory = Math.max(tool.memoryMb, Number(c.memoryMb) || tool.memoryMb);
|
|
1405
|
+
/* One of its own left by an attempt cut short (a restart meanwhile): not its machine any more -- removed
|
|
1406
|
+
first, so that the room it takes is counted free (15-11, seen on test-c). */
|
|
1407
|
+
const states = await this.#vms.states().catch(() => null);
|
|
1408
|
+
if (states?.has(vmName(name))) await this.#vms.removeVm(vmName(name)).catch(() => {});
|
|
1405
1409
|
await this.room({ kind: 'create', memoryMb: memory });
|
|
1406
1410
|
const act = this.#take(name, 'move');
|
|
1407
1411
|
this.#cancelStop(name);
|