agent-sanitizer 2.63.1 → 2.64.0
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/package.json +1 -1
- package/src/cf-charset.mjs +5 -4
- package/src/joining-type.mjs +4 -3
- package/src/standardized-variants.mjs +4 -4
- package/src/unicode-properties.mjs +4 -3
- package/types/cf-charset.d.mts +5 -4
- package/types/joining-type.d.mts +4 -3
- package/types/src/cf-charset.d.mts +5 -4
- package/types/src/joining-type.d.mts +4 -3
- package/types/src/standardized-variants.d.mts +3 -3
- package/types/src/unicode-properties.d.mts +4 -3
- package/types/standardized-variants.d.mts +3 -3
- package/types/unicode-properties.d.mts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-sanitizer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.64.0",
|
|
4
4
|
"description": "Defend an agent against hidden-content injection: strip payload-capable invisible Unicode and ANSI, splice out human-invisible HTML, and flag data-exfil URLs in untrusted text before any model sees it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/cf-charset.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by scripts/gen-
|
|
3
|
-
* (General_Category=Cf, Unicode 17.0.0)
|
|
2
|
+
* GENERATED by scripts/gen-cf-charset.mjs from the pinned UCD
|
|
3
|
+
* (General_Category=Cf, Unicode 17.0.0) at install, pack and build
|
|
4
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
4
5
|
*
|
|
5
6
|
* The general-category Cf code points, PINNED at generation time. invisible.mjs
|
|
6
7
|
* strips exactly this set instead of asking the runtime for Cf, and the Python port
|
|
7
8
|
* reads the SAME set from data/invisible-charset.json's `cf_codepoints`, so both
|
|
8
9
|
* layers strip an identical Cf set regardless of each runtime's own Unicode
|
|
9
|
-
* version. Regenerate with `node scripts/gen-
|
|
10
|
-
*
|
|
10
|
+
* version. Regenerate with `node scripts/gen-cf-charset.mjs` (`pnpm install`
|
|
11
|
+
* does).
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
export const UNICODE_VERSION = "17.0.0";
|
package/src/joining-type.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0
|
|
2
|
+
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0 at install
|
|
3
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
3
4
|
*
|
|
4
5
|
* Unicode Joining_Type, Indic virama and Brahmic consonant range tables backing
|
|
5
|
-
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type
|
|
6
|
-
*
|
|
6
|
+
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type`
|
|
7
|
+
* (`pnpm install` does).
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
export const UNICODE_VERSION = "17.0.0";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED by scripts/gen-standardized-variants.mjs from UCD
|
|
3
|
-
* StandardizedVariants.txt (Unicode 17.0.0)
|
|
3
|
+
* StandardizedVariants.txt (Unicode 17.0.0) at install time; git-ignored,
|
|
4
|
+
* never committed — DO NOT EDIT.
|
|
4
5
|
*
|
|
5
6
|
* Registered standardized variation sequences: a base code point followed by the
|
|
6
7
|
* variation selector the UCD registers for it. invisible.mjs preserves such a
|
|
7
8
|
* selector only when the immediately preceding base appears here; every other
|
|
8
9
|
* one is stripped as a hidden-payload byte. Regenerate with
|
|
9
|
-
* `node scripts/gen-standardized-variants.mjs
|
|
10
|
-
* test/invisible-charset.test.mjs fails if this drifts from the pinned UCD.
|
|
10
|
+
* `node scripts/gen-standardized-variants.mjs` (`pnpm install` does).
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export const UNICODE_VERSION = "17.0.0";
|
|
14
14
|
|
|
15
15
|
// The table below is GENERATED UCD data, not hand-written logic. Its correctness
|
|
16
16
|
// is pinned by the SSOT round-trip in test/invisible-charset.test.mjs (re-parse
|
|
17
|
-
// the
|
|
17
|
+
// the pinned file, then assert every pair matches) — a stronger and faster
|
|
18
18
|
// guard than mutating a few hundred numeric literals, so Stryker skips them.
|
|
19
19
|
// Stryker disable all
|
|
20
20
|
/** @type {Array<[number, number]>} [base, selector], sorted by base then selector. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0
|
|
2
|
+
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0 at
|
|
3
|
+
* install time; git-ignored, never committed — DO NOT EDIT.
|
|
3
4
|
*
|
|
4
5
|
* The Unicode properties src/invisible.mjs's carve-out reads, PINNED so the
|
|
5
6
|
* carve-out answers the same on every Node whatever its ICU's Unicode version.
|
|
6
|
-
* Regenerate with `node scripts/gen-unicode-properties.mjs
|
|
7
|
-
*
|
|
7
|
+
* Regenerate with `node scripts/gen-unicode-properties.mjs` (`pnpm install`
|
|
8
|
+
* does).
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
export const UNICODE_VERSION = "17.0.0";
|
package/types/cf-charset.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by scripts/gen-
|
|
3
|
-
* (General_Category=Cf, Unicode 17.0.0)
|
|
2
|
+
* GENERATED by scripts/gen-cf-charset.mjs from the pinned UCD
|
|
3
|
+
* (General_Category=Cf, Unicode 17.0.0) at install, pack and build
|
|
4
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
4
5
|
*
|
|
5
6
|
* The general-category Cf code points, PINNED at generation time. invisible.mjs
|
|
6
7
|
* strips exactly this set instead of asking the runtime for Cf, and the Python port
|
|
7
8
|
* reads the SAME set from data/invisible-charset.json's `cf_codepoints`, so both
|
|
8
9
|
* layers strip an identical Cf set regardless of each runtime's own Unicode
|
|
9
|
-
* version. Regenerate with `node scripts/gen-
|
|
10
|
-
*
|
|
10
|
+
* version. Regenerate with `node scripts/gen-cf-charset.mjs` (`pnpm install`
|
|
11
|
+
* does).
|
|
11
12
|
*/
|
|
12
13
|
export const UNICODE_VERSION: "17.0.0";
|
|
13
14
|
/** @type {readonly number[]} Sorted ascending. */
|
package/types/joining-type.d.mts
CHANGED
|
@@ -24,11 +24,12 @@ export function isVirama(cp: number): boolean;
|
|
|
24
24
|
*/
|
|
25
25
|
export function isBrahmicConsonant(cp: number): boolean;
|
|
26
26
|
/**
|
|
27
|
-
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0
|
|
27
|
+
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0 at install
|
|
28
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
28
29
|
*
|
|
29
30
|
* Unicode Joining_Type, Indic virama and Brahmic consonant range tables backing
|
|
30
|
-
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type
|
|
31
|
-
*
|
|
31
|
+
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type`
|
|
32
|
+
* (`pnpm install` does).
|
|
32
33
|
*/
|
|
33
34
|
export const UNICODE_VERSION: "17.0.0";
|
|
34
35
|
/** @type {ReadonlyArray<readonly [string, number, number]>} */
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by scripts/gen-
|
|
3
|
-
* (General_Category=Cf, Unicode 17.0.0)
|
|
2
|
+
* GENERATED by scripts/gen-cf-charset.mjs from the pinned UCD
|
|
3
|
+
* (General_Category=Cf, Unicode 17.0.0) at install, pack and build
|
|
4
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
4
5
|
*
|
|
5
6
|
* The general-category Cf code points, PINNED at generation time. invisible.mjs
|
|
6
7
|
* strips exactly this set instead of asking the runtime for Cf, and the Python port
|
|
7
8
|
* reads the SAME set from data/invisible-charset.json's `cf_codepoints`, so both
|
|
8
9
|
* layers strip an identical Cf set regardless of each runtime's own Unicode
|
|
9
|
-
* version. Regenerate with `node scripts/gen-
|
|
10
|
-
*
|
|
10
|
+
* version. Regenerate with `node scripts/gen-cf-charset.mjs` (`pnpm install`
|
|
11
|
+
* does).
|
|
11
12
|
*/
|
|
12
13
|
export const UNICODE_VERSION: "17.0.0";
|
|
13
14
|
/** @type {readonly number[]} Sorted ascending. */
|
|
@@ -24,11 +24,12 @@ export function isVirama(cp: number): boolean;
|
|
|
24
24
|
*/
|
|
25
25
|
export function isBrahmicConsonant(cp: number): boolean;
|
|
26
26
|
/**
|
|
27
|
-
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0
|
|
27
|
+
* GENERATED by scripts/gen-joining-type.mjs from the pinned UCD 17.0.0 at install
|
|
28
|
+
* time; git-ignored, never committed — DO NOT EDIT.
|
|
28
29
|
*
|
|
29
30
|
* Unicode Joining_Type, Indic virama and Brahmic consonant range tables backing
|
|
30
|
-
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type
|
|
31
|
-
*
|
|
31
|
+
* the ZWNJ/ZWJ carve-out in invisible.mjs. Regenerate with `pnpm gen:joining-type`
|
|
32
|
+
* (`pnpm install` does).
|
|
32
33
|
*/
|
|
33
34
|
export const UNICODE_VERSION: "17.0.0";
|
|
34
35
|
/** @type {ReadonlyArray<readonly [string, number, number]>} */
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
export function isStandardizedVariant(base: number, selector: number): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* GENERATED by scripts/gen-standardized-variants.mjs from UCD
|
|
11
|
-
* StandardizedVariants.txt (Unicode 17.0.0)
|
|
11
|
+
* StandardizedVariants.txt (Unicode 17.0.0) at install time; git-ignored,
|
|
12
|
+
* never committed — DO NOT EDIT.
|
|
12
13
|
*
|
|
13
14
|
* Registered standardized variation sequences: a base code point followed by the
|
|
14
15
|
* variation selector the UCD registers for it. invisible.mjs preserves such a
|
|
15
16
|
* selector only when the immediately preceding base appears here; every other
|
|
16
17
|
* one is stripped as a hidden-payload byte. Regenerate with
|
|
17
|
-
* `node scripts/gen-standardized-variants.mjs
|
|
18
|
-
* test/invisible-charset.test.mjs fails if this drifts from the pinned UCD.
|
|
18
|
+
* `node scripts/gen-standardized-variants.mjs` (`pnpm install` does).
|
|
19
19
|
*/
|
|
20
20
|
export const UNICODE_VERSION: "17.0.0";
|
|
21
21
|
/** @type {Array<[number, number]>} [base, selector], sorted by base then selector. */
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function inSpans(spans: ReadonlyArray<readonly [number, number]>, cp: number): boolean;
|
|
9
9
|
/**
|
|
10
|
-
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0
|
|
10
|
+
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0 at
|
|
11
|
+
* install time; git-ignored, never committed — DO NOT EDIT.
|
|
11
12
|
*
|
|
12
13
|
* The Unicode properties src/invisible.mjs's carve-out reads, PINNED so the
|
|
13
14
|
* carve-out answers the same on every Node whatever its ICU's Unicode version.
|
|
14
|
-
* Regenerate with `node scripts/gen-unicode-properties.mjs
|
|
15
|
-
*
|
|
15
|
+
* Regenerate with `node scripts/gen-unicode-properties.mjs` (`pnpm install`
|
|
16
|
+
* does).
|
|
16
17
|
*/
|
|
17
18
|
export const UNICODE_VERSION: "17.0.0";
|
|
18
19
|
/** @type {ReadonlyArray<readonly [number, number]>} */
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
export function isStandardizedVariant(base: number, selector: number): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* GENERATED by scripts/gen-standardized-variants.mjs from UCD
|
|
11
|
-
* StandardizedVariants.txt (Unicode 17.0.0)
|
|
11
|
+
* StandardizedVariants.txt (Unicode 17.0.0) at install time; git-ignored,
|
|
12
|
+
* never committed — DO NOT EDIT.
|
|
12
13
|
*
|
|
13
14
|
* Registered standardized variation sequences: a base code point followed by the
|
|
14
15
|
* variation selector the UCD registers for it. invisible.mjs preserves such a
|
|
15
16
|
* selector only when the immediately preceding base appears here; every other
|
|
16
17
|
* one is stripped as a hidden-payload byte. Regenerate with
|
|
17
|
-
* `node scripts/gen-standardized-variants.mjs
|
|
18
|
-
* test/invisible-charset.test.mjs fails if this drifts from the pinned UCD.
|
|
18
|
+
* `node scripts/gen-standardized-variants.mjs` (`pnpm install` does).
|
|
19
19
|
*/
|
|
20
20
|
export const UNICODE_VERSION: "17.0.0";
|
|
21
21
|
/** @type {Array<[number, number]>} [base, selector], sorted by base then selector. */
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function inSpans(spans: ReadonlyArray<readonly [number, number]>, cp: number): boolean;
|
|
9
9
|
/**
|
|
10
|
-
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0
|
|
10
|
+
* GENERATED by scripts/gen-unicode-properties.mjs from the pinned UCD 17.0.0 at
|
|
11
|
+
* install time; git-ignored, never committed — DO NOT EDIT.
|
|
11
12
|
*
|
|
12
13
|
* The Unicode properties src/invisible.mjs's carve-out reads, PINNED so the
|
|
13
14
|
* carve-out answers the same on every Node whatever its ICU's Unicode version.
|
|
14
|
-
* Regenerate with `node scripts/gen-unicode-properties.mjs
|
|
15
|
-
*
|
|
15
|
+
* Regenerate with `node scripts/gen-unicode-properties.mjs` (`pnpm install`
|
|
16
|
+
* does).
|
|
16
17
|
*/
|
|
17
18
|
export const UNICODE_VERSION: "17.0.0";
|
|
18
19
|
/** @type {ReadonlyArray<readonly [number, number]>} */
|