@mossbear/eval-core 0.1.0-alpha.26
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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/adapter.d.ts +31 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +10 -0
- package/dist/adapter.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/redact-prose.d.ts +72 -0
- package/dist/redact-prose.d.ts.map +1 -0
- package/dist/redact-prose.js +202 -0
- package/dist/redact-prose.js.map +1 -0
- package/dist/redact-prose.test.d.ts +2 -0
- package/dist/redact-prose.test.d.ts.map +1 -0
- package/dist/redact-prose.test.js +234 -0
- package/dist/redact-prose.test.js.map +1 -0
- package/dist/sanitize-command.d.ts +21 -0
- package/dist/sanitize-command.d.ts.map +1 -0
- package/dist/sanitize-command.js +92 -0
- package/dist/sanitize-command.js.map +1 -0
- package/dist/sanitize-command.test.d.ts +2 -0
- package/dist/sanitize-command.test.d.ts.map +1 -0
- package/dist/sanitize-command.test.js +75 -0
- package/dist/sanitize-command.test.js.map +1 -0
- package/dist/strip-code-blocks.d.ts +53 -0
- package/dist/strip-code-blocks.d.ts.map +1 -0
- package/dist/strip-code-blocks.js +200 -0
- package/dist/strip-code-blocks.js.map +1 -0
- package/dist/strip-code-blocks.test.d.ts +2 -0
- package/dist/strip-code-blocks.test.d.ts.map +1 -0
- package/dist/strip-code-blocks.test.js +134 -0
- package/dist/strip-code-blocks.test.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { stripCodeBlocks } from './strip-code-blocks.js';
|
|
3
|
+
/**
|
|
4
|
+
* The property every case here is really asserting: no line that sat inside a
|
|
5
|
+
* code block appears in the output. Named once so the individual tests can
|
|
6
|
+
* state the user-visible outcome instead of restating it.
|
|
7
|
+
*/
|
|
8
|
+
function leaks(result, secret) {
|
|
9
|
+
return result.includes(secret);
|
|
10
|
+
}
|
|
11
|
+
describe('stripCodeBlocks', () => {
|
|
12
|
+
it('keeps a fenced block off the wire and says what it was instead', () => {
|
|
13
|
+
const message = [
|
|
14
|
+
"I'll add the client:",
|
|
15
|
+
'```ts',
|
|
16
|
+
'const client = new Client({',
|
|
17
|
+
" apiKey: 'sk-live-4eC39HqLyjWDarjtT1zdp7dc',",
|
|
18
|
+
'})',
|
|
19
|
+
'```',
|
|
20
|
+
'That should do it.',
|
|
21
|
+
].join('\n');
|
|
22
|
+
const { text, blocks, lines } = stripCodeBlocks(message);
|
|
23
|
+
expect(leaks(text, 'sk-live-4eC39HqLyjWDarjtT1zdp7dc')).toBe(false);
|
|
24
|
+
expect(leaks(text, 'new Client')).toBe(false);
|
|
25
|
+
expect(text).toBe(["I'll add the client:", '[code block: ts, 3 lines]', 'That should do it.'].join('\n'));
|
|
26
|
+
expect({ blocks, lines }).toEqual({ blocks: 1, lines: 3 });
|
|
27
|
+
});
|
|
28
|
+
it('keeps the prose either side of a block, which is the reason to sync at all', () => {
|
|
29
|
+
const { text } = stripCodeBlocks(['Because the cache key is wrong:', '```', 'x', '```', 'I am changing it.'].join('\n'));
|
|
30
|
+
expect(text).toContain('Because the cache key is wrong:');
|
|
31
|
+
expect(text).toContain('I am changing it.');
|
|
32
|
+
});
|
|
33
|
+
it('strips an indented block even where CommonMark would call it a paragraph', () => {
|
|
34
|
+
// No blank line before the indent, so CommonMark treats this as a lazy
|
|
35
|
+
// paragraph continuation rather than code. Following that rule here would
|
|
36
|
+
// put the key on the wire.
|
|
37
|
+
const { text, blocks } = stripCodeBlocks(['Here is the config:', ' AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG'].join('\n'));
|
|
38
|
+
expect(leaks(text, 'wJalrXUtnFEMI/K7MDENG')).toBe(false);
|
|
39
|
+
expect(blocks).toBe(1);
|
|
40
|
+
});
|
|
41
|
+
it('strips a tab-indented block', () => {
|
|
42
|
+
const { text } = stripCodeBlocks(['Config:', '', "\tpassword = 'hunter2'"].join('\n'));
|
|
43
|
+
expect(leaks(text, 'hunter2')).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
it('treats an indented run split by a blank line as one block', () => {
|
|
46
|
+
const { text, blocks, lines } = stripCodeBlocks(['Setup:', '', ' a = 1', '', ' b = 2', '', 'Done.'].join('\n'));
|
|
47
|
+
expect(blocks).toBe(1);
|
|
48
|
+
expect(lines).toBe(3);
|
|
49
|
+
expect(text).toContain('Done.');
|
|
50
|
+
expect(leaks(text, 'a = 1')).toBe(false);
|
|
51
|
+
expect(leaks(text, 'b = 2')).toBe(false);
|
|
52
|
+
});
|
|
53
|
+
it('does not end a long-fenced block at a shorter fence inside it', () => {
|
|
54
|
+
const message = [
|
|
55
|
+
'Example:',
|
|
56
|
+
'````md',
|
|
57
|
+
'Write it like this:',
|
|
58
|
+
'```',
|
|
59
|
+
"token = 'ghp_16C7e42F292c6912E7710c838347Ae178B4a'",
|
|
60
|
+
'```',
|
|
61
|
+
'````',
|
|
62
|
+
'Clear?',
|
|
63
|
+
].join('\n');
|
|
64
|
+
const { text, blocks } = stripCodeBlocks(message);
|
|
65
|
+
expect(leaks(text, 'ghp_16C7e42F292c6912E7710c838347Ae178B4a')).toBe(false);
|
|
66
|
+
expect(blocks).toBe(1);
|
|
67
|
+
expect(text).toContain('Clear?');
|
|
68
|
+
});
|
|
69
|
+
it('discards the rest of the message when a fence is never closed', () => {
|
|
70
|
+
const { text } = stripCodeBlocks(['Starting:', '```py', 'SECRET = "s3cr3t"', 'more = "code"'].join('\n'));
|
|
71
|
+
expect(leaks(text, 's3cr3t')).toBe(false);
|
|
72
|
+
expect(leaks(text, 'more = "code"')).toBe(false);
|
|
73
|
+
expect(text).toBe(['Starting:', '[code block: py, 2 lines]'].join('\n'));
|
|
74
|
+
});
|
|
75
|
+
it('refuses to carry an info string out of the block it just removed', () => {
|
|
76
|
+
// The info string is author-controlled text on the fence line; copying it
|
|
77
|
+
// verbatim would reopen a free-text channel out of the stripped block.
|
|
78
|
+
const { text } = stripCodeBlocks(['```ts title="/Users/kier/.aws/credentials"', 'x', '```'].join('\n'));
|
|
79
|
+
expect(leaks(text, '.aws/credentials')).toBe(false);
|
|
80
|
+
expect(text).toBe('[code block: ts, 1 line]');
|
|
81
|
+
});
|
|
82
|
+
it('drops a language label that is not a plausible language', () => {
|
|
83
|
+
const { text } = stripCodeBlocks(['```<script>alert(1)</script>', 'x', '```'].join('\n'));
|
|
84
|
+
expect(text).toBe('[code block: 1 line]');
|
|
85
|
+
});
|
|
86
|
+
it('strips a fenced block nested in a blockquote', () => {
|
|
87
|
+
// The `>` defeats the fence pattern and the line is only two columns in, so
|
|
88
|
+
// without container handling this is copied out verbatim and the prose
|
|
89
|
+
// redactor becomes the only thing between the user's source and the wire —
|
|
90
|
+
// the exact arrangement the plan forbids. Quoting code back at a user is an
|
|
91
|
+
// ordinary thing for an assistant to do.
|
|
92
|
+
const { text, blocks } = stripCodeBlocks([
|
|
93
|
+
'You wrote:',
|
|
94
|
+
'> ```ts',
|
|
95
|
+
'> const secret = "raw-user-code"',
|
|
96
|
+
'> ```',
|
|
97
|
+
'and that is the bug.',
|
|
98
|
+
].join('\n'));
|
|
99
|
+
expect(leaks(text, 'raw-user-code')).toBe(false);
|
|
100
|
+
expect(blocks).toBe(1);
|
|
101
|
+
expect(text).toContain('and that is the bug.');
|
|
102
|
+
});
|
|
103
|
+
it('strips an indented block nested in a blockquote', () => {
|
|
104
|
+
const { text } = stripCodeBlocks(['They said:', '>', '> API_KEY=sk-live-abc123def456'].join('\n'));
|
|
105
|
+
expect(leaks(text, 'sk-live-abc123def456')).toBe(false);
|
|
106
|
+
});
|
|
107
|
+
it('strips a fence nested in a doubly-quoted block', () => {
|
|
108
|
+
const { text } = stripCodeBlocks(['> > ```', '> > password = "hunter2"', '> > ```'].join('\n'));
|
|
109
|
+
expect(leaks(text, 'hunter2')).toBe(false);
|
|
110
|
+
});
|
|
111
|
+
it('leaves quoted prose quoted', () => {
|
|
112
|
+
const quoted = ['> I think the cursor advances too early.', '> Agreed.'].join('\n');
|
|
113
|
+
expect(stripCodeBlocks(quoted).text).toBe(quoted);
|
|
114
|
+
});
|
|
115
|
+
it('leaves ordinary prose exactly as it was', () => {
|
|
116
|
+
const prose = [
|
|
117
|
+
'I looked at the sync path and the cursor is advanced before the upload',
|
|
118
|
+
'succeeds, so a failed batch is skipped forever.',
|
|
119
|
+
'',
|
|
120
|
+
'Two options: move the write after the response, or record a high-water mark.',
|
|
121
|
+
].join('\n');
|
|
122
|
+
const { text, blocks, lines } = stripCodeBlocks(prose);
|
|
123
|
+
expect(text).toBe(prose);
|
|
124
|
+
expect({ blocks, lines }).toEqual({ blocks: 0, lines: 0 });
|
|
125
|
+
});
|
|
126
|
+
it('leaves inline code alone — it is a span, not a block', () => {
|
|
127
|
+
const message = 'Call `readPendingActions` before `writeActionCursors`.';
|
|
128
|
+
expect(stripCodeBlocks(message).text).toBe(message);
|
|
129
|
+
});
|
|
130
|
+
it('handles an empty message', () => {
|
|
131
|
+
expect(stripCodeBlocks('')).toEqual({ text: '', blocks: 0, lines: 0 });
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=strip-code-blocks.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-code-blocks.test.js","sourceRoot":"","sources":["../src/strip-code-blocks.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD;;;;GAIG;AACH,SAAS,KAAK,CAAC,MAAc,EAAE,MAAc;IAC3C,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC;AAED,QAAQ,CAAC,iBAAiB,EAA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EAAE,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,OAAO,GAAG,wDAAwD,CAAA;QAExE,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACrD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;IACxE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mossbear/eval-core",
|
|
3
|
+
"version": "0.1.0-alpha.26",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Portable pieces of Mossbear's evaluation path — command redaction, the LLM adapter seam, and guide normalization.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"!dist/.tsbuildinfo",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/auden-to/auden.git",
|
|
25
|
+
"directory": "packages/eval-core"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"provenance": false
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc --project tsconfig.json",
|
|
33
|
+
"dev": "tsc --project tsconfig.json --watch",
|
|
34
|
+
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
35
|
+
"lint": "oxlint",
|
|
36
|
+
"lint:fix": "oxfmt && oxlint --fix",
|
|
37
|
+
"format": "oxfmt",
|
|
38
|
+
"format:check": "oxfmt --check",
|
|
39
|
+
"test": "vitest run"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@mossbear/protocol": "0.1.0-alpha.26"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"typescript": "*"
|
|
46
|
+
}
|
|
47
|
+
}
|