@conarium-ai/core 0.3.2 → 0.3.3
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/CHANGELOG.md +41 -0
- package/dist/mask-text.d.ts +4 -0
- package/dist/mask-text.d.ts.map +1 -1
- package/dist/mask-text.js +68 -6
- package/dist/mask-text.js.map +1 -1
- package/dist/mask.d.ts +18 -0
- package/dist/mask.d.ts.map +1 -0
- package/dist/mask.js +16 -0
- package/dist/mask.js.map +1 -0
- package/docs/API-STABILITY.md +10 -6
- package/docs/claims/reviews/0.3.3.md +65 -0
- package/package.json +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3 - the masking engine as a library: @conarium-ai/mask, and per-class masking
|
|
4
|
+
|
|
5
|
+
Importing `@conarium-ai/core` runs the stdio gateway: `dist/index.js` calls
|
|
6
|
+
`main()` on import, so a program that only wanted to mask a value had nothing
|
|
7
|
+
it could import. `@conarium-ai/core/mask` is that entry. It exports
|
|
8
|
+
`maskField`, `maskSensitiveText` and `compileCustomPatterns` with their types,
|
|
9
|
+
the same functions the gateway calls (`src/governance.ts`, `src/audit.ts`),
|
|
10
|
+
and importing it starts no server: `test/mask_entry.mjs` imports it by name
|
|
11
|
+
with stdin left open and requires the process to exit with no output.
|
|
12
|
+
|
|
13
|
+
`@conarium-ai/mask` is the same entry as a package of its own, built from the
|
|
14
|
+
same `src/mask.ts` into `packages/mask`. Its only dependencies are the two the
|
|
15
|
+
engine imports, `@eslint-community/regexpp` and `re2js`, at the root's pins, so
|
|
16
|
+
a program that masks does not install the gateway's server and database
|
|
17
|
+
dependencies. `test/mask_package.mjs` checks the version, the pins, that the
|
|
18
|
+
built tree imports nothing else, what npm ships, and that importing it starts
|
|
19
|
+
nothing.
|
|
20
|
+
|
|
21
|
+
`maskField` can now mask some classes and leave others. `only` lists the
|
|
22
|
+
classes to mask. The result gains `classes`, how many spans of each class the
|
|
23
|
+
core found, and `masked`, what was replaced: a count per class,
|
|
24
|
+
`unclassified` for regions the 0.2.54 belt masks without a class (those are
|
|
25
|
+
always masked), or `{ whole: 1 }` when the whole field was replaced. The
|
|
26
|
+
counts carry no values, and a zero-length match (a custom pattern that can
|
|
27
|
+
match the empty string, such as `^|SECRET`) is not counted: before this was
|
|
28
|
+
caught in review, `"SECRET"` came back as `[MASKED_PII]SECRET` with
|
|
29
|
+
`masked: { custom: 1 }`. Without `only` the masked text is what it was. Before
|
|
30
|
+
this, `byClass` was the only count and it covered custom patterns alone; it
|
|
31
|
+
keeps that meaning.
|
|
32
|
+
|
|
33
|
+
The package now has an `exports` map. `"."` is the gateway as before,
|
|
34
|
+
`"./mask"` is the new entry, and `"./*"` resolves a deep path to the same
|
|
35
|
+
file. One thing that resolved before no longer does: an extensionless
|
|
36
|
+
`require` path such as `@conarium-ai/core/dist/governance`. Name the file with
|
|
37
|
+
its extension. What deep paths reach stays internal.
|
|
38
|
+
|
|
39
|
+
`docs/API-STABILITY.md` said there was no `exports` map. It now lists the
|
|
40
|
+
three entries with their labels, and `test/api_stability_exports.mjs` fails
|
|
41
|
+
when a key of the map is missing from that table or when the document says
|
|
42
|
+
the map is absent.
|
|
43
|
+
|
|
3
44
|
## 0.3.2 - compressed JSON bodies are refused, and zod moves to 4.6.7
|
|
4
45
|
|
|
5
46
|
The anchor service and the console parsed JSON request bodies with
|
package/dist/mask-text.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CompiledCustomPattern } from './custom_patterns.js';
|
|
2
2
|
import type { DetectorToggles } from './types.js';
|
|
3
|
+
import { type SpanClass } from './mask/core.js';
|
|
3
4
|
export interface MaskTextOptions {
|
|
4
5
|
scanCharCap?: number;
|
|
5
6
|
detectors?: DetectorToggles;
|
|
@@ -11,11 +12,14 @@ export interface MaskFieldOptions extends MaskTextOptions {
|
|
|
11
12
|
pipeline: 'text' | 'governance';
|
|
12
13
|
column?: string;
|
|
13
14
|
maskLabelledNames?: boolean;
|
|
15
|
+
only?: readonly SpanClass[];
|
|
14
16
|
}
|
|
15
17
|
export declare function maskField(text: string, opts: MaskFieldOptions): {
|
|
16
18
|
text: string;
|
|
17
19
|
count: number;
|
|
18
20
|
byClass: Record<string, number>;
|
|
21
|
+
classes: Record<string, number>;
|
|
22
|
+
masked: Record<string, number>;
|
|
19
23
|
};
|
|
20
24
|
export declare function maskSensitiveText(text: string, opts?: MaskTextOptions): string;
|
|
21
25
|
//# sourceMappingURL=mask-text.d.ts.map
|
package/dist/mask-text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-text.d.ts","sourceRoot":"","sources":["../src/mask-text.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"mask-text.d.ts","sourceRoot":"","sources":["../src/mask-text.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAGzE,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;CACzC;AAED,eAAO,MAAM,eAAe,QAC0I,CAAA;AAEtK,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAoB,GAAG,MAAM,CAGtF;AAKD,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;CAC5B;AAqMD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CA4CA;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CAOlF"}
|
package/dist/mask-text.js
CHANGED
|
@@ -147,11 +147,64 @@ function ownByClass(src) {
|
|
|
147
147
|
}
|
|
148
148
|
return bag;
|
|
149
149
|
}
|
|
150
|
+
function emptyBag() {
|
|
151
|
+
return Object.create(null);
|
|
152
|
+
}
|
|
153
|
+
function addCount(bag, key, n = 1) {
|
|
154
|
+
if (!(n > 0))
|
|
155
|
+
return;
|
|
156
|
+
const prev = Object.prototype.hasOwnProperty.call(bag, key) ? bag[key] : 0;
|
|
157
|
+
Object.defineProperty(bag, key, {
|
|
158
|
+
value: prev + n,
|
|
159
|
+
writable: true,
|
|
160
|
+
enumerable: true,
|
|
161
|
+
configurable: true,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function countClasses(spans) {
|
|
165
|
+
const bag = emptyBag();
|
|
166
|
+
for (let i = 0; i < spans.length; i++) {
|
|
167
|
+
if (spans[i].end > spans[i].start)
|
|
168
|
+
addCount(bag, spans[i].cls);
|
|
169
|
+
}
|
|
170
|
+
return bag;
|
|
171
|
+
}
|
|
172
|
+
function countMasked(core, beltOnly) {
|
|
173
|
+
const bag = emptyBag();
|
|
174
|
+
for (let i = 0; i < core.length; i++) {
|
|
175
|
+
if (core[i].end > core[i].start)
|
|
176
|
+
addCount(bag, core[i].cls);
|
|
177
|
+
}
|
|
178
|
+
for (let i = 0; i < beltOnly.length; i++) {
|
|
179
|
+
if (beltOnly[i].end > beltOnly[i].start)
|
|
180
|
+
addCount(bag, 'unclassified');
|
|
181
|
+
}
|
|
182
|
+
return bag;
|
|
183
|
+
}
|
|
184
|
+
function wholeMasked() {
|
|
185
|
+
const bag = emptyBag();
|
|
186
|
+
addCount(bag, 'whole');
|
|
187
|
+
return bag;
|
|
188
|
+
}
|
|
189
|
+
function coreToApply(spans, only) {
|
|
190
|
+
if (!only)
|
|
191
|
+
return spans;
|
|
192
|
+
const allow = new Set(only);
|
|
193
|
+
const out = [];
|
|
194
|
+
for (let i = 0; i < spans.length; i++) {
|
|
195
|
+
if (allow.has(spans[i].cls))
|
|
196
|
+
out.push(spans[i]);
|
|
197
|
+
}
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
function wholeFieldResult(text, byClass, classes) {
|
|
201
|
+
return { text, count: 1, byClass, classes, masked: wholeMasked() };
|
|
202
|
+
}
|
|
150
203
|
// The core detects on its own. The belt keeps every span 0.2.54 masked.
|
|
151
204
|
// When the belt cannot decide, the whole field is masked.
|
|
152
205
|
export function maskField(text, opts) {
|
|
153
206
|
if (text.length > resolveScanCharCap(opts.scanCharCap)) {
|
|
154
|
-
return
|
|
207
|
+
return wholeFieldResult(PII, emptyBag(), emptyBag());
|
|
155
208
|
}
|
|
156
209
|
try {
|
|
157
210
|
const normalized = normalizePiiText(text);
|
|
@@ -176,16 +229,25 @@ export function maskField(text, opts) {
|
|
|
176
229
|
scanCharCap: opts.scanCharCap,
|
|
177
230
|
});
|
|
178
231
|
const byClass = ownByClass(detected.byClass);
|
|
232
|
+
const classes = countClasses(detected.spans);
|
|
179
233
|
if (!belt.ok)
|
|
180
|
-
return
|
|
234
|
+
return wholeFieldResult(PII, byClass, classes);
|
|
181
235
|
const whole = preferToken(detected.wholeField?.token, belt.wholeField, rules);
|
|
182
236
|
if (whole)
|
|
183
|
-
return
|
|
184
|
-
const
|
|
185
|
-
|
|
237
|
+
return wholeFieldResult(whole, byClass, classes);
|
|
238
|
+
const coreApplied = coreToApply(detected.spans, opts.only);
|
|
239
|
+
const beltOnly = beltOnlySpans(detected.spans, belt.spans);
|
|
240
|
+
const applied = apply(normalized, coreApplied.concat(beltOnly));
|
|
241
|
+
return {
|
|
242
|
+
text: applied.text,
|
|
243
|
+
count: applied.regions,
|
|
244
|
+
byClass,
|
|
245
|
+
classes,
|
|
246
|
+
masked: countMasked(coreApplied, beltOnly),
|
|
247
|
+
};
|
|
186
248
|
}
|
|
187
249
|
catch {
|
|
188
|
-
return
|
|
250
|
+
return wholeFieldResult(PII, emptyBag(), emptyBag());
|
|
189
251
|
}
|
|
190
252
|
}
|
|
191
253
|
// The core detects on its own. The belt keeps every span 0.2.54 masked.
|
package/dist/mask-text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-text.js","sourceRoot":"","sources":["../src/mask-text.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mask-text.js","sourceRoot":"","sources":["../src/mask-text.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,EAA6B,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAQ1C,MAAM,CAAC,MAAM,eAAe,GAC1B,oKAAoK,CAAA;AA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
|
+
/**
|
|
2
|
+
* Library entry: `@conarium-ai/core/mask`.
|
|
3
|
+
*
|
|
4
|
+
* The package root is the stdio server and runs main() on import. This entry
|
|
5
|
+
* is the masking engine alone, for a program that wants to mask a value
|
|
6
|
+
* without starting anything: importing it starts no server and opens no
|
|
7
|
+
* stream (test/mask_entry.mjs). It is the same pipeline the server uses.
|
|
8
|
+
*
|
|
9
|
+
* maskField returns the masked text, how many regions were masked, `classes`
|
|
10
|
+
* (how many spans of each class it found) and `masked` (what it replaced, or
|
|
11
|
+
* `{ whole: 1 }` when the whole field went). `only` lists the classes to mask
|
|
12
|
+
* and leaves the rest; the counts never carry the values.
|
|
13
|
+
*/
|
|
14
|
+
export { maskField, maskSensitiveText, type MaskFieldOptions, type MaskTextOptions, } from './mask-text.js';
|
|
15
|
+
export { compileCustomPatterns, type CompiledCustomPattern, type CustomPatternReject, } from './custom_patterns.js';
|
|
16
|
+
export type { CustomPiiPattern, DetectorToggles } from './types.js';
|
|
17
|
+
export type { SpanClass } from './mask/core.js';
|
|
18
|
+
//# sourceMappingURL=mask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../src/mask.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/mask.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry: `@conarium-ai/core/mask`.
|
|
3
|
+
*
|
|
4
|
+
* The package root is the stdio server and runs main() on import. This entry
|
|
5
|
+
* is the masking engine alone, for a program that wants to mask a value
|
|
6
|
+
* without starting anything: importing it starts no server and opens no
|
|
7
|
+
* stream (test/mask_entry.mjs). It is the same pipeline the server uses.
|
|
8
|
+
*
|
|
9
|
+
* maskField returns the masked text, how many regions were masked, `classes`
|
|
10
|
+
* (how many spans of each class it found) and `masked` (what it replaced, or
|
|
11
|
+
* `{ whole: 1 }` when the whole field went). `only` lists the classes to mask
|
|
12
|
+
* and leaves the rest; the counts never carry the values.
|
|
13
|
+
*/
|
|
14
|
+
export { maskField, maskSensitiveText, } from './mask-text.js';
|
|
15
|
+
export { compileCustomPatterns, } from './custom_patterns.js';
|
|
16
|
+
//# sourceMappingURL=mask.js.map
|
package/dist/mask.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask.js","sourceRoot":"","sources":["../src/mask.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,SAAS,EACT,iBAAiB,GAGlB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,qBAAqB,GAGtB,MAAM,sBAAsB,CAAA"}
|
package/docs/API-STABILITY.md
CHANGED
|
@@ -29,9 +29,10 @@ No dates. Shipping 1.0 is a decision, not a document.
|
|
|
29
29
|
|
|
30
30
|
## What 1.0 would not promise
|
|
31
31
|
|
|
32
|
-
- A JavaScript import surface.
|
|
33
|
-
stdio gateway
|
|
34
|
-
|
|
32
|
+
- A JavaScript import surface. The package root (`main`, and `"."` in the
|
|
33
|
+
`exports` map) is the stdio gateway and runs it on import. The one library
|
|
34
|
+
entry, `@conarium-ai/core/mask`, is experimental (see Package exports).
|
|
35
|
+
`import { Governance } from '@conarium-ai/core'` is not an API.
|
|
35
36
|
- MySQL. The SQL gate is Postgres, Microsoft SQL Server, and Oracle. Oracle synonyms and database links are not resolved.
|
|
36
37
|
- That an OpenTimestamps stamp is confirmed. `pending` is a valid
|
|
37
38
|
outcome.
|
|
@@ -162,10 +163,13 @@ Env: `CONARIUM_CONSOLE_HOST`, `CONARIUM_CONSOLE_PORT`,
|
|
|
162
163
|
| Entry | Label |
|
|
163
164
|
|---|---|
|
|
164
165
|
| `bin` map above | see CLI |
|
|
165
|
-
| `"main": "./dist/index.js"` | experimental — process entry, not a library |
|
|
166
|
-
| `exports`
|
|
166
|
+
| `"main": "./dist/index.js"`, `exports["."]` | experimental — process entry, not a library; importing it starts the stdio gateway |
|
|
167
|
+
| `exports["./mask"]` → `./dist/mask.js` | experimental — `maskField`, `maskSensitiveText`, `compileCustomPatterns` and their types; importing it starts no server (`test/mask_entry.mjs`) |
|
|
168
|
+
| `maskField` options `only`, results `classes` and `masked` | experimental — `only` lists the classes to mask; `classes` counts what the core found per class, `masked` what was replaced (`unclassified`, or `{ whole: 1 }`); counts, never values (`src/mask-classes.test.ts`) |
|
|
169
|
+
| package `@conarium-ai/mask` (`packages/mask`) | experimental — the same `src/mask.ts`, built on its own with `@eslint-community/regexpp` and `re2js` as its only dependencies (`test/mask_package.mjs`) |
|
|
170
|
+
| `exports["./*"]` → `./*` | a deep path that names a file, extension included, resolves to that file; extensionless `require` paths, which resolved before the map existed, no longer do. What it reaches is **internal** |
|
|
167
171
|
| `dist/governance.js`, `dist/ots/*`, `dist/http.js`, … | **internal** |
|
|
168
|
-
| TypeScript types in `src/types.ts` | **internal
|
|
172
|
+
| TypeScript types in `src/types.ts` | **internal**, except the ones `./mask` re-exports |
|
|
169
173
|
|
|
170
174
|
---
|
|
171
175
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Claims review — 0.3.3
|
|
2
|
+
|
|
3
|
+
- base: v0.3.2
|
|
4
|
+
- head: 47e0832
|
|
5
|
+
- surface: sha256:78a212eb6c4e7ba407f228d033143da3c100b180d520fd82b7b9b548f51bffcf
|
|
6
|
+
- verdict: pass
|
|
7
|
+
- reviewer: Claude. One claim surface changed between v0.3.2 and HEAD:
|
|
8
|
+
`docs/API-STABILITY.md` (`node test/denetci.mjs input v0.3.2 HEAD`).
|
|
9
|
+
|
|
10
|
+
The release adds `src/mask.ts`, an `exports` map in `package.json`, two
|
|
11
|
+
checks (`test/mask_entry.mjs`, `test/api_stability_exports.mjs`) and their
|
|
12
|
+
lines in `test/run-checks.mjs`, the version fields (`package.json`,
|
|
13
|
+
`package-lock.json`, `server.json`), the version assertion in
|
|
14
|
+
`src/demo-mode.test.ts`, the changelog entry, and the edits to
|
|
15
|
+
`docs/API-STABILITY.md` below.
|
|
16
|
+
|
|
17
|
+
Each new sentence in `docs/API-STABILITY.md` was set against what
|
|
18
|
+
establishes it: the package root runs the gateway on import (`src/index.ts`
|
|
19
|
+
calls `main()`; pointing `./mask` at `dist/index.js` made
|
|
20
|
+
`test/mask_entry.mjs` fail with the gateway's boot error); `./mask` starts no
|
|
21
|
+
server (`test/mask_entry.mjs`); the list of exported names (`src/mask.ts`);
|
|
22
|
+
which deep paths resolve under `./*` (`createRequire` against the tree, see
|
|
23
|
+
finding 2).
|
|
24
|
+
|
|
25
|
+
The two rows added in `47e0832` were set against their tests: `only`,
|
|
26
|
+
`classes` and `masked`, and that the counts carry no values
|
|
27
|
+
(`src/mask-classes.test.ts`, which failed before `cdbd65e`); the
|
|
28
|
+
`@conarium-ai/mask` package, its two dependencies at the root's pins and that
|
|
29
|
+
its built tree imports nothing else (`test/mask_package.mjs`, which failed
|
|
30
|
+
before `cdbd65e`).
|
|
31
|
+
|
|
32
|
+
The changelog is not a claim surface, but its sentences were checked the same
|
|
33
|
+
way; "the same functions the gateway calls" was read from `src/governance.ts`
|
|
34
|
+
and `src/audit.ts`, which import `maskField` / `maskSensitiveText` from
|
|
35
|
+
`src/mask-text.ts`.
|
|
36
|
+
|
|
37
|
+
## Findings
|
|
38
|
+
|
|
39
|
+
### 1. docs/API-STABILITY.md:33 — "There is no `exports` map."
|
|
40
|
+
|
|
41
|
+
- Claim: "There is no `exports` map." and, in the Package exports table, "`exports` field | **absent**"
|
|
42
|
+
- Mechanism: `package.json` without an `exports` field
|
|
43
|
+
- Why it falls short: #147 added the map, so both statements were false on
|
|
44
|
+
`main` from 0513cfd. The claims gate did not notice: it reads a document
|
|
45
|
+
only when the document changes.
|
|
46
|
+
- Disposition: reworded in `0fefb60`, with `test/api_stability_exports.mjs`
|
|
47
|
+
comparing the table to `package.json` from now on
|
|
48
|
+
|
|
49
|
+
### 2. docs/API-STABILITY.md:168 — "passes every deep path through as before the map existed"
|
|
50
|
+
|
|
51
|
+
- Claim: "passes every deep path through as before the map existed"
|
|
52
|
+
- Mechanism: resolving deep paths by name under the new map
|
|
53
|
+
- Why it falls short: `@conarium-ai/core/dist/governance.js` resolves, but the
|
|
54
|
+
extensionless `@conarium-ai/core/dist/governance`, which `require` resolved
|
|
55
|
+
before the map existed, now fails with `MODULE_NOT_FOUND`
|
|
56
|
+
- Disposition: reworded in `3caffbe`; the changelog names the change
|
|
57
|
+
|
|
58
|
+
### 3. CHANGELOG.md (0.3.3, first draft) — "a count per class"
|
|
59
|
+
|
|
60
|
+
- Claim: "`maskField` returns the masked text, the number of masked regions and a count per class."
|
|
61
|
+
- Mechanism: `maskField`'s `byClass` for a text with an e-mail address and a TCKN
|
|
62
|
+
- Why it falls short: `byClass` came back `{}`; it counts custom patterns only, and the built-in
|
|
63
|
+
classes had no count at all. The changelog is not a claim surface, so the gate did not read it.
|
|
64
|
+
- Disposition: the sentence was replaced in `47e0832` after `cdbd65e` added `classes` and
|
|
65
|
+
`masked`, which `src/mask-classes.test.ts` checks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conarium-ai/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"mcpName": "io.github.dogrucanemek-alt/conarium",
|
|
5
5
|
"//files-artefakt": "Generated files under examples/ (private key, receipt/audit JSONL) are EXCLUDED. .gitignore does not bind npm: because the allow-list contained 'examples', `npm publish` on a machine that had run the demo was shipping _keys/audit-ed25519.pem (PRIVATE KEY) and the receipts. test/pack_artefakt.mjs locks this. The exclusions are LIMITED to examples/: receipts.jsonl and .pub.pem under test-vectors/ MUST ship, or a third party cannot run the conformance vectors.",
|
|
6
6
|
"//files": "Allow-list of what enters the package. Without it npm sent everything: 296 files / 1.5 MB — CI workflows, gitleaks config, a 137 KB marketing image, the site's api/chat.js. A bank security team opens the tarball and sees those. scripts/ is here ON PURPOSE: conarium-reconcile references scripts/pg-snapshot.sql at runtime; without it the user files a support mail.",
|
|
@@ -86,6 +86,14 @@
|
|
|
86
86
|
"license": "MIT",
|
|
87
87
|
"type": "module",
|
|
88
88
|
"main": "./dist/index.js",
|
|
89
|
+
"exports": {
|
|
90
|
+
".": "./dist/index.js",
|
|
91
|
+
"./mask": {
|
|
92
|
+
"types": "./dist/mask.d.ts",
|
|
93
|
+
"default": "./dist/mask.js"
|
|
94
|
+
},
|
|
95
|
+
"./*": "./*"
|
|
96
|
+
},
|
|
89
97
|
"bin": {
|
|
90
98
|
"conarium": "dist/index.js",
|
|
91
99
|
"conarium-doctor": "bin/conarium-doctor.mjs",
|
|
@@ -102,7 +110,7 @@
|
|
|
102
110
|
"conarium-suggest-policy": "bin/conarium-suggest-policy.mjs"
|
|
103
111
|
},
|
|
104
112
|
"scripts": {
|
|
105
|
-
"build": "tsc",
|
|
113
|
+
"build": "tsc && tsc -p tsconfig.mask.json",
|
|
106
114
|
"test": "vitest run",
|
|
107
115
|
"test:anchor-verify": "npm run build && node test/anchor_verify.mjs",
|
|
108
116
|
"test:checks": "npm run build && node test/run-checks.mjs",
|