clavarium 0.2.36-next.1 → 0.2.38-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/gitpush.mjs +6 -4
- package/web/gitgraph.js +3 -1
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38-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.38-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
|
-
"clavarium-binder": "0.1.
|
|
14
|
+
"clavarium-binder": "0.1.6-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
16
|
"clavarium-parley": "0.17.3-next.1",
|
|
17
17
|
"mermaid": "11.17.2",
|
|
@@ -688,9 +688,9 @@
|
|
|
688
688
|
}
|
|
689
689
|
},
|
|
690
690
|
"node_modules/clavarium-binder": {
|
|
691
|
-
"version": "0.1.
|
|
692
|
-
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.
|
|
693
|
-
"integrity": "sha512-
|
|
691
|
+
"version": "0.1.6-next.1",
|
|
692
|
+
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.6-next.1.tgz",
|
|
693
|
+
"integrity": "sha512-urE1ZZCYq9svQmQR1ailNX6r5OeBcT0wNDea498PMDRbmcUCOciqoF/1C3IGLT7z133eb4dOUEhVcbRE42/h3A==",
|
|
694
694
|
"license": "MIT",
|
|
695
695
|
"bin": {
|
|
696
696
|
"binder": "bin/binder.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38-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.",
|
|
@@ -44,7 +44,7 @@
|
|
|
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.6-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
49
|
"clavarium-parley": "0.17.3-next.1",
|
|
50
50
|
"mermaid": "11.17.2",
|
package/server/gitpush.mjs
CHANGED
|
@@ -429,7 +429,9 @@ export class GitReview {
|
|
|
429
429
|
/* THE BRANCH DIAGRAM: the agent's branches, the remote's, and their
|
|
430
430
|
last commits, newest first in topological order: { branches: [{name,
|
|
431
431
|
id, side: 'agent'|'remote'}], commits: [{id, parents, subject, date,
|
|
432
|
-
refs: [{name, side}]}] }.
|
|
432
|
+
author, refs: [{name, side}]}] }. `author` is who committed it, so a
|
|
433
|
+
person can see whose work a commit is. What the agent wrote is escaped
|
|
434
|
+
as everywhere. */
|
|
433
435
|
async graph(name) {
|
|
434
436
|
const r = this.#repository(name);
|
|
435
437
|
try {
|
|
@@ -438,13 +440,13 @@ export class GitReview {
|
|
|
438
440
|
for (const [b, id] of [...remoteTips].sort(([a], [c]) => a.localeCompare(c)).slice(0, GRAPH_BRANCHES)) branches.push({ name: escaped(b), id, side: 'remote' });
|
|
439
441
|
const tips = [...new Set(branches.map((b) => b.id))];
|
|
440
442
|
if (tips.length === 0) return { branches, commits: [] };
|
|
441
|
-
const log = await this.#runner.in(got.path, ['log', '--topo-order', `--max-count=${GRAPH_COMMITS}`, '-z', '--format=%H%x00%P%x00%aI%x00%s', '--stdin', '--end-of-options'], { input: `${tips.join('\n')}\n`, deadlineMs: 60_000, maxBytes: 4 * 1024 * 1024 });
|
|
443
|
+
const log = await this.#runner.in(got.path, ['log', '--topo-order', `--max-count=${GRAPH_COMMITS}`, '-z', '--format=%H%x00%P%x00%an%x00%aI%x00%s', '--stdin', '--end-of-options'], { input: `${tips.join('\n')}\n`, deadlineMs: 60_000, maxBytes: 4 * 1024 * 1024 });
|
|
442
444
|
const fields = log.stdout.toString('utf8').split('\0');
|
|
443
445
|
const commits = [];
|
|
444
|
-
for (let i = 0; i +
|
|
446
|
+
for (let i = 0; i + 4 < fields.length; i += 5) {
|
|
445
447
|
const id = fields[i].replace(/^\n/, '');
|
|
446
448
|
if (!isId(id)) break;
|
|
447
|
-
commits.push({ id, parents: fields[i + 1].split(' ').filter(isId),
|
|
449
|
+
commits.push({ id, parents: fields[i + 1].split(' ').filter(isId), author: escaped(fields[i + 2]).slice(0, 200), date: fields[i + 3], subject: escaped(fields[i + 4]).slice(0, 300),
|
|
448
450
|
refs: branches.filter((b) => b.id === id).map((b) => ({ name: b.name, side: b.side })) });
|
|
449
451
|
}
|
|
450
452
|
return { branches, commits };
|
package/web/gitgraph.js
CHANGED
|
@@ -95,7 +95,9 @@
|
|
|
95
95
|
const b = document.createElement('button'); b.type = 'button'; b.className = 'gg-row'; b.dataset.id = c.id;
|
|
96
96
|
b.title = `Open the review of ${c.id.slice(0, 7)}`;
|
|
97
97
|
const subject = document.createElement('span'); subject.className = 'gg-subject'; subject.textContent = c.subject || '(no message)';
|
|
98
|
-
|
|
98
|
+
/* Who committed it, then its short id and when: set as text, never markup. */
|
|
99
|
+
const author = c.author ? `${c.author} · ` : '';
|
|
100
|
+
const meta = document.createElement('small'); meta.textContent = ` · ${author}${c.id.slice(0, 7)} · ${when(c.date, now)}`;
|
|
99
101
|
b.append(subject, meta);
|
|
100
102
|
/* Its branches: the agent's (filled), the remote's (outlined); the same name on both is one label. */
|
|
101
103
|
const names = new Map();
|