clavarium 0.2.76-beta.1 → 0.2.77-beta.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 +10 -10
- package/package.json +3 -3
- package/server/binders.mjs +5 -2
- package/web/app.js +13 -3
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.77-beta.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.77-beta.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
|
13
13
|
"@xterm/xterm": "^6.0.0",
|
|
14
|
-
"clavarium-binder": "0.1.
|
|
14
|
+
"clavarium-binder": "0.1.16-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
|
-
"clavarium-parley": "0.17.
|
|
16
|
+
"clavarium-parley": "0.17.12-next.1",
|
|
17
17
|
"clavarium-tether": "0.1.0-next.28",
|
|
18
18
|
"mermaid": "11.17.2",
|
|
19
19
|
"node-pty": "^1.1.0",
|
|
@@ -716,9 +716,9 @@
|
|
|
716
716
|
}
|
|
717
717
|
},
|
|
718
718
|
"node_modules/clavarium-binder": {
|
|
719
|
-
"version": "0.1.
|
|
720
|
-
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.
|
|
721
|
-
"integrity": "sha512-
|
|
719
|
+
"version": "0.1.16-next.1",
|
|
720
|
+
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.16-next.1.tgz",
|
|
721
|
+
"integrity": "sha512-T0Ys/nHzUoYYC2U8jB9QMKs406yBTPIHzp7JdmYNg9SgwAbqSFmWcg7C9te177V0UdewQWiQnAfLTeO+8WWIXQ==",
|
|
722
722
|
"license": "MIT",
|
|
723
723
|
"bin": {
|
|
724
724
|
"binder": "bin/binder.mjs",
|
|
@@ -742,9 +742,9 @@
|
|
|
742
742
|
}
|
|
743
743
|
},
|
|
744
744
|
"node_modules/clavarium-parley": {
|
|
745
|
-
"version": "0.17.
|
|
746
|
-
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.
|
|
747
|
-
"integrity": "sha512-
|
|
745
|
+
"version": "0.17.12-next.1",
|
|
746
|
+
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.12-next.1.tgz",
|
|
747
|
+
"integrity": "sha512-G20876winm0zAtnxHcJIRqWwl8XnOyg+SYPu2S6xieRYnocgSTdQew9zOoBWmNMirvyyXqI/p8bN0IBQ1caS+w==",
|
|
748
748
|
"license": "MIT",
|
|
749
749
|
"bin": {
|
|
750
750
|
"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.77-beta.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.",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@xterm/addon-fit": "^0.11.0",
|
|
46
46
|
"@xterm/xterm": "^6.0.0",
|
|
47
|
-
"clavarium-binder": "0.1.
|
|
47
|
+
"clavarium-binder": "0.1.16-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
|
-
"clavarium-parley": "0.17.
|
|
49
|
+
"clavarium-parley": "0.17.12-next.1",
|
|
50
50
|
"clavarium-tether": "0.1.0-next.28",
|
|
51
51
|
"mermaid": "11.17.2",
|
|
52
52
|
"node-pty": "^1.1.0",
|
package/server/binders.mjs
CHANGED
|
@@ -110,9 +110,12 @@ export class Binders {
|
|
|
110
110
|
}
|
|
111
111
|
/* Who may own a record, or be given a list. */
|
|
112
112
|
people(identity = '') {
|
|
113
|
+
/* Who signed in, as the store names their ownership ('me' resolves to this). The matrix
|
|
114
|
+
colours a card "à moi" by matching this, so the page is told which entry is the viewer. */
|
|
115
|
+
const meId = `person:${identity || 'owner'}`;
|
|
113
116
|
const persons = (this.#team?.list?.() ?? []).map((o) => ({ id: `person:${String(o.email ?? o.id ?? '').toLowerCase()}`, kind: 'person', name: String(o.email ?? o.id ?? '') })).filter((p) => p.name);
|
|
114
|
-
if (!persons.length) persons.push({ id:
|
|
115
|
-
return [...persons, ...this.#conversations().map((name) => ({ id: `${AGENT}${name}`, kind: 'agent', name }))];
|
|
117
|
+
if (!persons.length) persons.push({ id: meId, kind: 'person', name: identity || 'Owner' });
|
|
118
|
+
return [...persons.map((p) => (p.id === meId ? { ...p, me: true } : p)), ...this.#conversations().map((name) => ({ id: `${AGENT}${name}`, kind: 'agent', name }))];
|
|
116
119
|
}
|
|
117
120
|
/* What each conversation was given: { name: { lists, waiting } }, waiting being the
|
|
118
121
|
records of those lists that wait for a person's tick (a list with a gate, not approved). */
|
package/web/app.js
CHANGED
|
@@ -929,6 +929,14 @@
|
|
|
929
929
|
paint();
|
|
930
930
|
enter();
|
|
931
931
|
void chatFirst();
|
|
932
|
+
/* Opening a conversation gets the list out of the way, so its room has the room;
|
|
933
|
+
the "»" button brings the list back. Only on a real pick by the owner, never on a
|
|
934
|
+
device or when deselecting. */
|
|
935
|
+
if (step && name && !DEVICE && !listFolded) {
|
|
936
|
+
listFolded = true;
|
|
937
|
+
try { localStorage.setItem('clavarium-list', 'folded'); } catch { /* a private window */ }
|
|
938
|
+
applyFold(true); fit.fit?.();
|
|
939
|
+
}
|
|
932
940
|
}
|
|
933
941
|
|
|
934
942
|
/* ---------- THE NAME OF THIS CLAVARIUM (server/instance.mjs) ----------
|
|
@@ -965,7 +973,9 @@
|
|
|
965
973
|
/* Its machine calls its owner for what needs a hand -- it does not serve, its memory or disk is almost
|
|
966
974
|
full -- not marked "Seen"; a program stopped for lack of memory (its files safe) is only said. */
|
|
967
975
|
const healthNeeds = (c) => c.phase === 'ready' && !c.asleep && (c.health?.problems ?? []).some((p) => (p.level === 'bad' || (p.level === 'warn' && ['memory', 'disk'].includes(p.kind) && !String(p.key).startsWith('oom:'))) && !(c.health.seen ?? []).includes(p.key));
|
|
968
|
-
|
|
976
|
+
/* Asleep, it is frozen and asks nothing until it wakes: it does not belong in "Needs you"
|
|
977
|
+
(waking it is what answers it). Health already excludes asleep; this covers the rest. */
|
|
978
|
+
const needsYou = (c) => !c.asleep && Boolean(talkNeeds(c) || c.answerer?.needs || c.phase === 'failed' || healthNeeds(c));
|
|
969
979
|
/* ONE FLAT POINT per conversation, its colour the state -- the worst that applies: a machine problem (red),
|
|
970
980
|
the agent waits for you (blue), the agent at work (gold, pulsing), the machine busy (amber, pulsing),
|
|
971
981
|
fine (green), asleep (a hollow ring). The same point, same colours, sums a folded group below. */
|
|
@@ -1069,8 +1079,8 @@
|
|
|
1069
1079
|
const waking = (c.wakeups?.items ?? []).filter((w) => w.on).length;
|
|
1070
1080
|
if (waking > 0) { const mark = document.createElement('small'); mark.className = 'shared-mark'; mark.textContent = `${waking} wake-up${waking > 1 ? 's' : ''}`; b.append(mark); }
|
|
1071
1081
|
/* It talks through the app, and asks or waits for its owner there. */
|
|
1072
|
-
if (talkNeeds(c)) { const mark = document.createElement('small'); mark.className = 'needs-mark'; mark.textContent = c.talk.waiting > 0 ? 'asks you' : 'waits for you'; b.append(mark); }
|
|
1073
|
-
if (c.answerer?.on) { const mark = document.createElement('small'); mark.className =
|
|
1082
|
+
if (!c.asleep && talkNeeds(c)) { const mark = document.createElement('small'); mark.className = 'needs-mark'; mark.textContent = c.talk.waiting > 0 ? 'asks you' : 'waits for you'; b.append(mark); }
|
|
1083
|
+
if (c.answerer?.on) { const needs = c.answerer.needs && !c.asleep; const mark = document.createElement('small'); mark.className = needs ? 'needs-mark' : 'shared-mark'; mark.textContent = needs ? 'asks for you' : 'answered in your place'; b.append(mark); }
|
|
1074
1084
|
/* Who else holds it is said in its Access, not in the list (where it said the same on every row). */
|
|
1075
1085
|
b.addEventListener('click', () => select(c.name, { step: true }));
|
|
1076
1086
|
return b;
|