clavarium 0.2.197-beta.1 → 0.2.198-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/config/tools.json +18 -10
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server/conversations.mjs +4 -2
- package/server/tools.mjs +6 -4
- package/web/style.css +8 -0
package/config/tools.json
CHANGED
|
@@ -46,13 +46,17 @@
|
|
|
46
46
|
"@anthropic-ai/claude-code"
|
|
47
47
|
],
|
|
48
48
|
"npm-writable",
|
|
49
|
+
[
|
|
50
|
+
"install",
|
|
51
|
+
"-D",
|
|
52
|
+
"-m",
|
|
53
|
+
"0600",
|
|
54
|
+
"/dev/null",
|
|
55
|
+
".claude/settings.json"
|
|
56
|
+
],
|
|
49
57
|
{
|
|
50
58
|
"argv": [
|
|
51
|
-
"
|
|
52
|
-
"-D",
|
|
53
|
-
"-m",
|
|
54
|
-
"0600",
|
|
55
|
-
"/dev/stdin",
|
|
59
|
+
"tee",
|
|
56
60
|
".claude/settings.json"
|
|
57
61
|
],
|
|
58
62
|
"input": "{\n \"theme\": \"dark-ansi\",\n \"permissions\": {\n \"allow\": [\n \"Bash(parley:*)\"\n ]\n }\n}\n"
|
|
@@ -137,13 +141,17 @@
|
|
|
137
141
|
"@anthropic-ai/claude-code"
|
|
138
142
|
],
|
|
139
143
|
"npm-writable",
|
|
144
|
+
[
|
|
145
|
+
"install",
|
|
146
|
+
"-D",
|
|
147
|
+
"-m",
|
|
148
|
+
"0600",
|
|
149
|
+
"/dev/null",
|
|
150
|
+
".claude/settings.json"
|
|
151
|
+
],
|
|
140
152
|
{
|
|
141
153
|
"argv": [
|
|
142
|
-
"
|
|
143
|
-
"-D",
|
|
144
|
-
"-m",
|
|
145
|
-
"0600",
|
|
146
|
-
"/dev/stdin",
|
|
154
|
+
"tee",
|
|
147
155
|
".claude/settings.json"
|
|
148
156
|
],
|
|
149
157
|
"input": "{\n \"theme\": \"dark-ansi\",\n \"permissions\": {\n \"allow\": [\n \"Bash(parley:*)\"\n ]\n }\n}\n"
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.198-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.198-beta.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
|
@@ -486,9 +486,11 @@ export class Conversations {
|
|
|
486
486
|
/* Its tool: there already (another conversation installed it), or installed -- a step as root for the
|
|
487
487
|
machine, any other as its own user (its settings, in its home). */
|
|
488
488
|
const there = tool.steps.length === 0 || (await this.#vms.exec(name, ['sh', '-c', `command -v ${tool.command[0]}`])).code === 0;
|
|
489
|
-
|
|
489
|
+
/* There already: its own steps still (its settings, in its own home), the machine's not. */
|
|
490
|
+
const steps = there ? tool.steps.filter((s) => s.argv[0] !== 'sudo') : tool.steps;
|
|
491
|
+
for (const [i, step] of steps.entries()) {
|
|
490
492
|
if (!this.#store.get(name)) return undefined;
|
|
491
|
-
this.#store.patch(name, { step: `Installing ${tool.label} (${i + 1}/${
|
|
493
|
+
this.#store.patch(name, { step: `Installing ${tool.label} (${i + 1}/${steps.length})` });
|
|
492
494
|
const r = await this.#vms.exec(name, step.argv, { input: step.input, timeoutMs: STEP_MS });
|
|
493
495
|
if (r.code !== 0) return fail(`Installing ${tool.label} failed at step ${i + 1}`, r);
|
|
494
496
|
}
|
package/server/tools.mjs
CHANGED
|
@@ -18,14 +18,16 @@ const ARCHIVE = `node-${NODE_VERSION}-linux-x64.tar.xz`;
|
|
|
18
18
|
const TMP = `/tmp/${ARCHIVE}`;
|
|
19
19
|
const APT = ['sudo', '-n', 'env', 'DEBIAN_FRONTEND=noninteractive', 'apt-get'];
|
|
20
20
|
|
|
21
|
-
/* A step is { argv, input? }: `input` goes to standard input.
|
|
21
|
+
/* A step is { argv, input? }: `input` goes to standard input. Every one as root (sudo): in a shared machine a
|
|
22
|
+
step without sudo runs as the conversation's own user, behind its door, with its own /tmp -- the archive
|
|
23
|
+
fetched there would not be the one root unpacks (#221, 13-11: "tar: Error is not recoverable"). */
|
|
22
24
|
export const NODE_STEPS = [
|
|
23
25
|
{ argv: [...APT, 'update', '-q'] },
|
|
24
26
|
{ argv: [...APT, 'install', '-y', '-q', '--no-install-recommends', 'curl', 'xz-utils', 'ca-certificates'] },
|
|
25
|
-
{ argv: ['curl', '--proto', '=https', '--tlsv1.2', '-fsSL', '--max-time', '600', '-o', TMP, `https://nodejs.org/dist/${NODE_VERSION}/${ARCHIVE}`] },
|
|
26
|
-
{ argv: ['sha256sum', '-c', '-'], input: `${NODE_SHA256} ${TMP}\n` },
|
|
27
|
+
{ argv: ['sudo', '-n', 'curl', '--proto', '=https', '--tlsv1.2', '-fsSL', '--max-time', '600', '-o', TMP, `https://nodejs.org/dist/${NODE_VERSION}/${ARCHIVE}`] },
|
|
28
|
+
{ argv: ['sudo', '-n', 'sha256sum', '-c', '-'], input: `${NODE_SHA256} ${TMP}\n` },
|
|
27
29
|
{ argv: ['sudo', '-n', 'tar', '-xJf', TMP, '-C', '/usr/local', '--strip-components=1', '--no-same-owner'] },
|
|
28
|
-
{ argv: ['rm', '-f', TMP] },
|
|
30
|
+
{ argv: ['sudo', '-n', 'rm', '-f', TMP] },
|
|
29
31
|
];
|
|
30
32
|
|
|
31
33
|
/* "npm-writable": what npm installs globally becomes the machine user's, so
|
package/web/style.css
CHANGED
|
@@ -3049,3 +3049,11 @@ button.kit-switch[aria-checked="true"]::after { left: 18px; background: var(--ok
|
|
|
3049
3049
|
.list-item.machine-item > .set-what > small.status-line { font-size: .75rem; margin: 0; }
|
|
3050
3050
|
#manager-row .status-line { margin: 2px 0 0; font-size: .75rem; }
|
|
3051
3051
|
#machines-confirm { margin: 8px 16px; }
|
|
3052
|
+
/* A phone (13-11): the bar's five buttons tighter, so that all stay on the screen -- its name gives way, never the bar. */
|
|
3053
|
+
@media (max-width: 480px) {
|
|
3054
|
+
html:not([data-door="device"]) #room > header #name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3055
|
+
html:not([data-door="device"]) #room > header :is(.bar-right, .views) { flex: none; }
|
|
3056
|
+
html:not([data-door="device"]) #room > header .views { gap: 0; padding: 2px; }
|
|
3057
|
+
html:not([data-door="device"]) #room > header .views button { gap: 4px; padding-inline: 7px; }
|
|
3058
|
+
html:not([data-door="device"]) #room > header .views .count { min-width: 1.2em; padding: 1px 4px; }
|
|
3059
|
+
}
|