clavarium 0.2.454-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/server/main.mjs +2 -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);
|
package/server/main.mjs
CHANGED
|
@@ -590,6 +590,8 @@ export async function startHome({ port, host, dataDir, mntDir = dataDir, gitRese
|
|
|
590
590
|
await toolbox.installIn(name).catch(() => {});
|
|
591
591
|
if (!toolbox.stale(name)) continue;
|
|
592
592
|
try { if (talk.event(name, { kind: 'tools-updated', text: 'Tools updated: restart it to use them all. Its work picks up where it was.', topic: 'Tools', actions: ['restart'] })) toolbox.told(name); } catch { /* its chat is off */ }
|
|
593
|
+
/* Its tool told too, by its docket (15-11, its owner's ask): it takes them up when it suits it, never mid-work. */
|
|
594
|
+
try { if (dockets.on(name)) dockets.post(name, { kind: 'tools-updated', text: `Clavarium was updated to ${JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version}: your tools (parley, docket, the MCP servers given to you) are new. When nothing runs, touch /work/.parley/restart-asked to take them up; your work picks up where it was.` }); } catch { /* its docket may be off */ }
|
|
593
595
|
}
|
|
594
596
|
});
|
|
595
597
|
/* A TOOL THAT ASKS TO BE RESTARTED (02-11: to take up its tools, after an update): its tool restarted by this server
|