clavarium 0.2.58-next.1 → 0.2.60-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 +6 -6
- package/package.json +2 -2
- package/server/main.mjs +1 -1
- package/server/secret-scan.mjs +2 -2
- package/web/app.js +2 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.60-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.60-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
|
13
13
|
"@xterm/xterm": "^6.0.0",
|
|
14
14
|
"clavarium-binder": "0.1.8-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
|
-
"clavarium-parley": "0.17.
|
|
16
|
+
"clavarium-parley": "0.17.7-next.1",
|
|
17
17
|
"mermaid": "11.17.2",
|
|
18
18
|
"node-pty": "^1.1.0",
|
|
19
19
|
"pdfjs-dist": "6.4.299",
|
|
@@ -714,9 +714,9 @@
|
|
|
714
714
|
}
|
|
715
715
|
},
|
|
716
716
|
"node_modules/clavarium-parley": {
|
|
717
|
-
"version": "0.17.
|
|
718
|
-
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.
|
|
719
|
-
"integrity": "sha512-
|
|
717
|
+
"version": "0.17.7-next.1",
|
|
718
|
+
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.7-next.1.tgz",
|
|
719
|
+
"integrity": "sha512-qzkXBaBY8zn3VQbsbrNeqy3+x/q2wUNn9GIoob+I4EYsFRQGufhboVaD5yogeMgiq1uB1hk5O5/N9Oh18dDUNg==",
|
|
720
720
|
"license": "MIT",
|
|
721
721
|
"bin": {
|
|
722
722
|
"parley": "bin/parley.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.60-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.",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@xterm/xterm": "^6.0.0",
|
|
47
47
|
"clavarium-binder": "0.1.8-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
|
-
"clavarium-parley": "0.17.
|
|
49
|
+
"clavarium-parley": "0.17.7-next.1",
|
|
50
50
|
"mermaid": "11.17.2",
|
|
51
51
|
"node-pty": "^1.1.0",
|
|
52
52
|
"pdfjs-dist": "6.4.299",
|
package/server/main.mjs
CHANGED
|
@@ -431,7 +431,7 @@ export async function startHome({ port, host, dataDir, mntDir = dataDir, gitRese
|
|
|
431
431
|
let out = ''; let last = 0; let any = false;
|
|
432
432
|
for (const h of hits) {
|
|
433
433
|
out += text.slice(last, h.start);
|
|
434
|
-
try { const { name } = secrets.stash(conversation, h.value); out += secretRef(name); any = true; }
|
|
434
|
+
try { const { name, expiresAt } = secrets.stash(conversation, h.value); out += secretRef(name, Date.parse(expiresAt)); any = true; }
|
|
435
435
|
catch { out += text.slice(h.start, h.end); } /* cannot be stashed (too large): left as it is */
|
|
436
436
|
last = h.end;
|
|
437
437
|
}
|
package/server/secret-scan.mjs
CHANGED
|
@@ -57,8 +57,8 @@ function looksRandom(s) {
|
|
|
57
57
|
shows as stars (ui side), and the tool reads to use /run/secrets/<name>.
|
|
58
58
|
Named like `SECRET_` + 10 hex (secrets.mjs stash). The angle brackets
|
|
59
59
|
(U+27E8/U+27E9) are vanishingly rare in a real message. */
|
|
60
|
-
export const secretRef = (name) => `⟨secret:${name}⟩`;
|
|
61
|
-
export const SECRET_REF = /⟨secret:(SECRET_[0-9A-F]{10})
|
|
60
|
+
export const secretRef = (name, at) => `⟨secret:${name}${Number.isFinite(at) ? `@${at}` : ''}⟩`;
|
|
61
|
+
export const SECRET_REF = /⟨secret:(SECRET_[0-9A-F]{10})(?:@(\d+))?⟩/g;
|
|
62
62
|
|
|
63
63
|
export function scan(text) {
|
|
64
64
|
const str = String(text ?? '');
|
package/web/app.js
CHANGED
|
@@ -3228,6 +3228,8 @@
|
|
|
3228
3228
|
const gitSub = (r) => (r.from ? `from ${hostOf(r.from)}` : 'repository');
|
|
3229
3229
|
/* A secret's expiry, as said: `due` when it asks for the person (near, or past). */
|
|
3230
3230
|
const secretState = (s) => {
|
|
3231
|
+
/* Short-lived, lifted from a message (secrets.mjs): minutes, not days -- shown so it can be seen and let go. */
|
|
3232
|
+
if (s.ephemeral) { const mins = Math.max(0, Math.round((s.expiresInMs ?? 0) / 60_000)); return s.expired || mins <= 0 ? { text: 'Expired', tone: 'bad', due: true } : { text: `Short-lived, ${mins} min left`, tone: 'warn', due: true }; }
|
|
3231
3233
|
if (s.expired) return { text: 'Expired', tone: 'bad', due: true };
|
|
3232
3234
|
if (s.days === null || s.days === undefined) return { text: 'No expiry', tone: '', due: false };
|
|
3233
3235
|
if (secretDue(s)) return { text: s.days === 1 ? 'Expires tomorrow' : `Expires in ${s.days} days`, tone: 'warn', due: true };
|