clavarium 0.2.100-next.1 → 0.2.104-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 +10 -10
- package/package.json +3 -3
- package/server/gitkeeper.mjs +5 -1
- package/server/secret-scan.mjs +12 -2
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.104-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.104-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.15-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
16
|
"clavarium-parley": "0.17.11-next.1",
|
|
17
|
-
"clavarium-tether": "0.1.0-next.
|
|
17
|
+
"clavarium-tether": "0.1.0-next.26",
|
|
18
18
|
"mermaid": "11.17.2",
|
|
19
19
|
"node-pty": "^1.1.0",
|
|
20
20
|
"pdfjs-dist": "6.4.299",
|
|
@@ -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.15-next.1",
|
|
720
|
+
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.15-next.1.tgz",
|
|
721
|
+
"integrity": "sha512-Ag8Egur6+EYwfQi3CUGi0Ac1T4viM8Myb224XrZkbwk4baRKekstiSs9joBTAF6hoo/QRAb4QOsSsCxNo3EeGw==",
|
|
722
722
|
"license": "MIT",
|
|
723
723
|
"bin": {
|
|
724
724
|
"binder": "bin/binder.mjs",
|
|
@@ -755,9 +755,9 @@
|
|
|
755
755
|
}
|
|
756
756
|
},
|
|
757
757
|
"node_modules/clavarium-tether": {
|
|
758
|
-
"version": "0.1.0-next.
|
|
759
|
-
"resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.
|
|
760
|
-
"integrity": "sha512
|
|
758
|
+
"version": "0.1.0-next.26",
|
|
759
|
+
"resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.26.tgz",
|
|
760
|
+
"integrity": "sha512-ee3r79RtedDFhUoiFsHxz1ShUybCzrcpLmE4RRjWDFK0+loGW3/fzZS5rbv4c6ljaANLRFfz0y38u7bexiUgfg==",
|
|
761
761
|
"license": "MIT",
|
|
762
762
|
"bin": {
|
|
763
763
|
"tether": "bin/cli.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.104-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,10 +44,10 @@
|
|
|
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.15-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
49
|
"clavarium-parley": "0.17.11-next.1",
|
|
50
|
-
"clavarium-tether": "0.1.0-next.
|
|
50
|
+
"clavarium-tether": "0.1.0-next.26",
|
|
51
51
|
"mermaid": "11.17.2",
|
|
52
52
|
"node-pty": "^1.1.0",
|
|
53
53
|
"pdfjs-dist": "6.4.299",
|
package/server/gitkeeper.mjs
CHANGED
|
@@ -696,7 +696,11 @@ export class GitKeeper {
|
|
|
696
696
|
/* Its machine did not run them: tried again later, when it may. */
|
|
697
697
|
if (checks.status !== 'unavailable') held.done.set(b, tip.id);
|
|
698
698
|
const why = checks.status === 'failed' ? `the checks failed in the machine of ${conversation}` : checks.status === 'none' ? 'automatic sending needs passing checks, and none is set (no pre-push hook, no check command)' : `the checks could not run: the machine of ${conversation} does not run`;
|
|
699
|
-
|
|
699
|
+
/* On a failure the agent is given the END OF THE CHECK OUTPUT, not only
|
|
700
|
+
that it failed: it is the one that can fix it, and guessing without the
|
|
701
|
+
output wastes its time. */
|
|
702
|
+
const tail = String(checks.output ?? '').trim();
|
|
703
|
+
return once(`checks-${checks.status}`, { what: `Not sent: ${why}.`, tell: true, ...(checks.status === 'failed' ? { ai: `the checks failed for ${plain(b)}, it was not sent${tail ? `. The end of the output:\n\n${tail}` : ''}` } : {}) }), false;
|
|
700
704
|
}
|
|
701
705
|
}
|
|
702
706
|
const checked = s.checks ? 'checks passed' : 'no checks asked for';
|
package/server/secret-scan.mjs
CHANGED
|
@@ -75,15 +75,25 @@ function improbableWord(s, floor = ENTROPY_MIN) {
|
|
|
75
75
|
export const secretRef = (name, at) => `⟨secret:${name}${Number.isFinite(at) ? `@${at}` : ''}⟩`;
|
|
76
76
|
export const SECRET_REF = /⟨secret:(SECRET_[0-9A-F]{10})(?:@(\d+))?⟩/g;
|
|
77
77
|
|
|
78
|
+
/* A URL left alone: the entropy nets skip what falls inside one, so a long
|
|
79
|
+
random-looking path or query (a tracking link, a LinkedIn profile) is not
|
|
80
|
+
taken for a secret. A token with a known shape (sk-..., a JWT) is still
|
|
81
|
+
caught, in a URL or not, because the SHAPES run everywhere. */
|
|
82
|
+
const URL = /\bhttps?:\/\/[^\s<>"'`)\]}]+/gi;
|
|
83
|
+
|
|
78
84
|
export function scan(text) {
|
|
79
85
|
const str = String(text ?? '');
|
|
80
86
|
const found = [];
|
|
87
|
+
const urlSpans = [];
|
|
88
|
+
URL.lastIndex = 0;
|
|
89
|
+
for (let m; (m = URL.exec(str));) urlSpans.push([m.index, m.index + m[0].length]);
|
|
90
|
+
const inUrl = (start, end) => urlSpans.some(([s, e]) => start >= s && end <= e);
|
|
81
91
|
for (const { kind, re } of SHAPES) {
|
|
82
92
|
re.lastIndex = 0;
|
|
83
93
|
for (let m; (m = re.exec(str));) found.push({ start: m.index, end: m.index + m[0].length, value: m[0], kind });
|
|
84
94
|
}
|
|
85
95
|
for (let m; (m = BLOB.exec(str));) {
|
|
86
|
-
if (looksRandom(m[0])) found.push({ start: m.index, end: m.index + m[0].length, value: m[0], kind: 'high-entropy' });
|
|
96
|
+
if (looksRandom(m[0]) && !inUrl(m.index, m.index + m[0].length)) found.push({ start: m.index, end: m.index + m[0].length, value: m[0], kind: 'high-entropy' });
|
|
87
97
|
}
|
|
88
98
|
BLOB.lastIndex = 0;
|
|
89
99
|
/* A word nearby that announces a secret widens the net to shorter runs, on a lower floor. */
|
|
@@ -91,7 +101,7 @@ export function scan(text) {
|
|
|
91
101
|
const wordRe = near ? SHORT_WORD : WORD;
|
|
92
102
|
const floor = near ? ENTROPY_SHORT : ENTROPY_MIN;
|
|
93
103
|
for (let m; (m = wordRe.exec(str));) {
|
|
94
|
-
if (improbableWord(m[0], floor)) found.push({ start: m.index, end: m.index + m[0].length, value: m[0], kind: 'high-entropy' });
|
|
104
|
+
if (improbableWord(m[0], floor) && !inUrl(m.index, m.index + m[0].length)) found.push({ start: m.index, end: m.index + m[0].length, value: m[0], kind: 'high-entropy' });
|
|
95
105
|
}
|
|
96
106
|
wordRe.lastIndex = 0;
|
|
97
107
|
/* Keep left-to-right, and when two matches overlap keep the one that starts
|