clavarium 0.2.155-next.1 → 0.2.156-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/api.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.156-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.156-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/api.mjs
CHANGED
|
@@ -567,6 +567,10 @@ export async function handleApi(request, response, conversations, headers, resou
|
|
|
567
567
|
const conversation = decodeURIComponent(handed[1]);
|
|
568
568
|
if (!conversations.list().some((c) => c.name === conversation)) throw new Refusal(404, 'No such conversation.');
|
|
569
569
|
secrets.attach(conversation, String(body.secret ?? ''), body.attached === true);
|
|
570
|
+
/* A machine that runs gets it (or loses it) now, in /run/secrets -- not only at the next
|
|
571
|
+
opening of a terminal; its tool's variables still wait for the tool's next start. */
|
|
572
|
+
const c = conversations.list().find((x) => x.name === conversation);
|
|
573
|
+
if (c?.phase === 'ready' && !c.asleep) await secrets.deliver(conversation).catch(() => {});
|
|
570
574
|
retell(conversation);
|
|
571
575
|
return send(200, { ok: true, secrets: secrets.of(conversation) }), true;
|
|
572
576
|
}
|