@liuhange/dsh-data-sensitivity-classification 2.0.0 → 2.0.2

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 CHANGED
@@ -1,39 +1,53 @@
1
- {
2
- "name": "@liuhange/dsh-data-sensitivity-classification",
3
- "description": "Data sensitivity classification plugin: auto-identify sensitivity levels (Public/Internal/Confidential/Secret) and recommend masking strategies",
4
- "version": "2.0.0",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/liuhange789/data-asset-inspector.git",
11
- "directory": "packages/data-asset/data-sensitivity-classification"
12
- },
13
- "type": "module",
14
- "main": "lib/index.js",
15
- "types": "lib/types/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "types": "./lib/types/index.d.ts",
19
- "default": "./lib/index.js"
20
- },
21
- "./invariant": {
22
- "types": "./lib/types/invariant.d.ts",
23
- "default": "./lib/invariant.js"
24
- },
25
- "./src/*": "./src/*",
26
- "./package.json": "./package.json"
27
- },
28
- "files": [
29
- "lib/index.js",
30
- "lib/invariant.js",
31
- "lib/types/**/*.d.ts"
32
- ],
33
- "license": "MIT",
34
- "peerDependencies": {
35
- "@deepseek-ai/cordis": "^0.1.0",
36
- "@deepseek-ai/dsh-tools": "^0.1.0",
37
- "@liuhange/dsh-data-asset-shared": "^2.0.0"
38
- }
39
- }
1
+ {
2
+ "name": "@liuhange/dsh-data-sensitivity-classification",
3
+ "description": "Data sensitivity classification plugin: auto-identify sensitivity levels (Public/Internal/Confidential/Secret) and recommend masking strategies Also known as @deepseek-ai/dsh-data-sensitivity-classification.",
4
+ "version": "2.0.2",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/liuhange789/data-asset-inspector.git",
11
+ "directory": "packages/data-asset/data-sensitivity-classification"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./src/*": "./src/*",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "lib/index.js",
30
+ "lib/invariant.js",
31
+ "lib/types/**/*.d.ts"
32
+ ],
33
+ "license": "MIT",
34
+ "scripts": {
35
+ "typecheck": "tsc --noEmit",
36
+ "test": "vitest run",
37
+ "build": "tsc"
38
+ },
39
+ "peerDependencies": {
40
+ "@deepseek-ai/cordis": "^4.0.0",
41
+ "@deepseek-ai/dsh-tools": "0.0.1-rc.1",
42
+ "@liuhange/dsh-data-asset-shared": "^2.0.0"
43
+ },
44
+ "keywords": [
45
+ "deepseek-harness",
46
+ "dsh-plugin",
47
+ "data-asset",
48
+ "data-asset-inspector",
49
+ "shujintong",
50
+ "数据资产"
51
+ ],
52
+ "homepage": "https://github.com/liuhange789/data-asset-inspector#readme"
53
+ }
@@ -1,6 +0,0 @@
1
- import type { ClassificationReportJson, InvalidRule } from './types.js';
2
- export declare class ClassificationReportGenerator {
3
- writeJson(filePath: string, data: ClassificationReportJson): Promise<void>;
4
- writeMarkdown(filePath: string, data: ClassificationReportJson, invalidRules: InvalidRule[]): Promise<void>;
5
- }
6
- //# sourceMappingURL=classificationReportGenerator.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { SensitivityClassificationConfig } from '@liuhange/dsh-data-asset-shared';
2
- export declare const defaultClassificationRules: SensitivityClassificationConfig;
3
- //# sourceMappingURL=defaultClassificationRules.d.ts.map
@@ -1,9 +0,0 @@
1
- import type { SensitivityClassificationConfig } from '@liuhange/dsh-data-asset-shared';
2
- import type { MatchResult, InvalidRule } from './types.js';
3
- export declare class FieldNameMatcher {
4
- match(fieldName: string, rules: SensitivityClassificationConfig['fieldNameRules']): {
5
- result: MatchResult;
6
- invalidRules: InvalidRule[];
7
- };
8
- }
9
- //# sourceMappingURL=fieldNameMatcher.d.ts.map
@@ -1,9 +0,0 @@
1
- import type { SensitivityClassificationConfig } from '@liuhange/dsh-data-asset-shared';
2
- import type { MatchResult, InvalidRule } from './types.js';
3
- export declare class FieldValueMatcher {
4
- match(sampleValues: unknown[], rules: SensitivityClassificationConfig['fieldValueRules']): {
5
- result: MatchResult;
6
- invalidRules: InvalidRule[];
7
- };
8
- }
9
- //# sourceMappingURL=fieldValueMatcher.d.ts.map
@@ -1,5 +0,0 @@
1
- import type { Context } from '@deepseek-ai/cordis';
2
- export declare const name = "data-sensitivity-classification";
3
- export declare const inject: string[];
4
- export declare function apply(ctx: Context): void;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +0,0 @@
1
- export declare const invariant = "data-sensitivity-classification";
2
- export declare function install(): void;
3
- //# sourceMappingURL=invariant.d.ts.map
@@ -1,11 +0,0 @@
1
- import type { SensitivityClassificationConfig } from '@liuhange/dsh-data-asset-shared';
2
- import type { FieldClassification, InvalidRule } from './types.js';
3
- export declare class SensitivityClassifier {
4
- private fieldNameMatcher;
5
- private fieldValueMatcher;
6
- classify(fields: string[], fieldSamples: Record<string, unknown[]>, config: SensitivityClassificationConfig): {
7
- classifications: FieldClassification[];
8
- invalidRules: InvalidRule[];
9
- };
10
- }
11
- //# sourceMappingURL=sensitivityClassifier.d.ts.map
@@ -1,6 +0,0 @@
1
- import type { SensitivityClassificationConfig } from '@liuhange/dsh-data-asset-shared';
2
- import type { SensitivityLevel, RecommendedStrategy } from './types.js';
3
- export declare class StrategyRecommender {
4
- recommend(level: SensitivityLevel, levelMapping: SensitivityClassificationConfig['levelMapping']): RecommendedStrategy;
5
- }
6
- //# sourceMappingURL=strategyRecommender.d.ts.map
@@ -1,40 +0,0 @@
1
- export type SensitivityLevel = 'Public' | 'Internal' | 'Confidential' | 'Secret';
2
- export type RecommendedStrategy = 'none' | 'partial' | 'full' | 'encrypt';
3
- export interface ClassifySensitivityParams {
4
- filePath: string;
5
- outputPathDir?: string;
6
- sampleSize?: number;
7
- }
8
- export interface MatchResult {
9
- matched: boolean;
10
- name?: string;
11
- pattern?: string;
12
- level?: string;
13
- }
14
- export interface InvalidRule {
15
- ruleName: string;
16
- reason: string;
17
- }
18
- export interface FieldClassification {
19
- fieldName: string;
20
- sensitivityLevel: SensitivityLevel;
21
- identifiedBy: {
22
- ruleName: string;
23
- matchType: string;
24
- };
25
- recommendedStrategy: RecommendedStrategy;
26
- }
27
- export interface ClassificationReportJson {
28
- fields: FieldClassification[];
29
- configStatus: string;
30
- classifiedAt: string;
31
- }
32
- export interface ClassifySensitivityResult {
33
- jsonReportPath: string;
34
- markdownReportPath: string;
35
- report: ClassificationReportJson;
36
- fields: FieldClassification[];
37
- status: 'SUCCESS' | 'FAILED';
38
- configStatus: string;
39
- }
40
- //# sourceMappingURL=types.d.ts.map