clavarium 0.2.327-next.1 → 0.2.328-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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.327-next.1",
3
+ "version": "0.2.328-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.327-next.1",
9
+ "version": "0.2.328-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.327-next.1",
3
+ "version": "0.2.328-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/api.mjs CHANGED
@@ -603,7 +603,13 @@ export async function handleApi(request, response, conversations, headers, resou
603
603
  if (renaming && secrets) { const done = secrets.rename(renaming[1], String(body.name ?? '').trim()); await redeliver(String(body.name ?? '').trim()); return send(200, done), true; }
604
604
  /* A new value (never sent back) and/or a new expiry, in place. */
605
605
  const replacing = /^\/api\/secrets\/([A-Z][A-Z0-9_]{0,39})\/replace$/.exec(pathname);
606
- if (replacing && secrets) { const done = secrets.replace(replacing[1], { value: body.value, expires: body.expires }); await redeliver(replacing[1]); return send(200, done), true; }
606
+ if (replacing && secrets) {
607
+ const done = secrets.replace(replacing[1], { value: body.value, expires: body.expires });
608
+ await redeliver(replacing[1]);
609
+ /* Its new value is in each machine's /run/secrets now; their tools are told again what that means (guide.mjs). */
610
+ for (const c of conversations.list()) if (secrets.of(c.name).includes(replacing[1])) void guide?.changed(c.name).catch(() => {});
611
+ return send(200, done), true;
612
+ }
607
613
  const dropped = /^\/api\/secrets\/([A-Z][A-Z0-9_]{0,39})\/remove$/.exec(pathname);
608
614
  if (dropped && secrets) { secrets.remove(dropped[1]); return send(200, { ok: true }), true; }
609
615
  if (pathname === '/api/alerts' && alerts) return send(201, alerts.add(body.subscription, body.label)), true;
package/server/guide.mjs CHANGED
@@ -130,7 +130,7 @@ export function ownText({ name, tool, workKept, resources = [], chat, online, se
130
130
  /* Its binder of batches is shown beside the chat (web/app.js): the person ticks there. */
131
131
  if (chat) out.push('- When you work in batches: keep them in a binder of batches, shown beside the chat. None yet: make it once (binder new batches; MCP: new-list, template batches). Then one card each (binder add Batches "title"), kept up to date; start only those the person ticked.');
132
132
  out.push(online === false ? '- Internet: off.' : '- Internet: on.');
133
- if (secrets.length) out.push(`- Secrets given, by name only: ${list(secrets.map((s) => plain(s, 40)))}.`);
133
+ if (secrets.length) out.push(`- Secrets given, by name only: ${list(secrets.map((s) => plain(s, 40)))}. Each value is the file /run/secrets/NAME, always the current one (updated within a minute when the person changes it); the variable $NAME holds the value your tool started with -- read the file when you use a key, so a key the person replaced works at once.`);
134
134
  /* A secret pasted in the chat is lifted out (talk.mjs, secret-scan.mjs): the message shows a marker, the value waits in /run/secrets. */
135
135
  if (chat) out.push('- A secret the person pastes in the chat is kept OUT of it: the message shows ⟨secret:NAME⟩ and the value waits at /run/secrets/NAME for a few minutes. Use it only from there, inside a command (clv-run, or $(cat /run/secrets/NAME)); never write its value back into the chat. It clears itself when its time runs out, or at once with `parley forget NAME` when you are done.');
136
136
  const own = lines.map((l) => plain(l)).filter(Boolean).slice(0, LINES_MAX);