@liuhange/dsh-city-data-classifier 3.1.0 → 3.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 liuhange789
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # @liuhange/dsh-city-data-classifier
2
2
 
3
+ ## 基本信息
4
+
5
+ | 项目 | 值 |
6
+ |------|-----|
7
+ | 插件名 | dsh-city-data-classifier |
8
+ | 包名 | @liuhange/dsh-city-data-classifier |
9
+ | 版本 | 3.1.0 |
10
+ | 工具 | classify_city_data, confirm_city_classification |
11
+
3
12
  ## 功能说明
4
13
 
5
- City data AI classification plugin: auto-recommend GB/T 47949-2026 category and sensitivity grading
14
+ AI自动推荐城市/组织数据的国标分类(GB/T 47949-2026)和敏感度分级,生成登记台账。支持人工复核确认AI推荐结果,输出含资产代码、敏感度等级和登记条目的分类报告。
6
15
 
7
16
  ## 安装
8
17
 
@@ -14,9 +23,17 @@ dsh plugin --profile web add @liuhange/dsh-city-data-classifier
14
23
 
15
24
  ```javascript
16
25
  import { apply } from '@liuhange/dsh-city-data-classifier';
17
- apply(ctx); // 注册工具: classify_city_data
26
+ apply(ctx); // 注册工具: classify_city_data, confirm_city_classification
18
27
  ```
19
28
 
29
+ ## 政策依据
30
+
31
+ | 文件名称 | 文号 | 核心条款摘要 |
32
+ |---------|------|------------|
33
+ | 资产管理 数据资产分类与代码 | GB/T 47949-2026 | 数据资产分为结构化、半结构化、非结构化三小类,16项具体细类 |
34
+ | 资产管理 数据资产登记指南 | GB/T 47950-2026 | 明确初始、变更和注销登记流程 |
35
+ | 基于AI的城市数据分类分级框架 | ITU-T Y.4550(立项阶段) | AI赋能城市数据分类分级 |
36
+
20
37
  ## License
21
38
 
22
39
  MIT
@@ -0,0 +1,20 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ describe('city-data-classifier', () => {
3
+ it('导出name/inject/apply', async () => {
4
+ const mod = await import('../index.js');
5
+ expect(mod.name).toBe('@liuhange/dsh-city-data-classifier');
6
+ expect(mod.inject).toEqual(['tools']);
7
+ expect(typeof mod.apply).toBe('function');
8
+ });
9
+ it('apply注册classify_city_data和confirm_city_classification工具', async () => {
10
+ const mod = await import('../index.js');
11
+ const tools = [];
12
+ mod.apply({ tools: { register: (t) => tools.push(t) } });
13
+ const tool1 = tools[0];
14
+ const tool2 = tools[1];
15
+ expect(tool1.name).toBe('classify_city_data');
16
+ expect(tool1.description).toContain('分类');
17
+ expect(tool2.name).toBe('confirm_city_classification');
18
+ });
19
+ });
20
+ //# sourceMappingURL=cityData.test.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@liuhange/dsh-city-data-classifier",
3
3
  "description": "City data AI classification plugin: auto-recommend GB/T 47949-2026 category and sensitivity grading",
4
- "version": "3.1.0",
4
+ "version": "3.1.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -26,19 +26,16 @@
26
26
  "lib/types/**/*.d.ts"
27
27
  ],
28
28
  "license": "MIT",
29
- "scripts": {
30
- "typecheck": "tsc --noEmit",
31
- "test": "vitest run",
32
- "build": "tsc"
29
+ "dependencies": {
30
+ "@liuhange/dsh-data-asset-shared": "^3.1.0"
33
31
  },
34
32
  "peerDependencies": {
35
33
  "@deepseek-ai/cordis": "^4.0.0",
36
- "@deepseek-ai/dsh-tools": "0.0.1-rc.1",
37
- "@liuhange/dsh-data-asset-shared": "^3.0.0"
34
+ "@deepseek-ai/dsh-tools": "0.0.1-rc.1"
38
35
  },
39
36
  "dsh": {
40
37
  "bundle": {
41
- "patch": true
38
+ "patch": "./cordis.patch.yml"
42
39
  }
43
40
  },
44
41
  "keywords": [
@@ -54,7 +51,22 @@
54
51
  "gbt-47949",
55
52
  "城市数据",
56
53
  "AI分类",
57
- "敏感度分级"
54
+ "敏感度分级",
55
+ "dsh",
56
+ "typescript",
57
+ "nodejs",
58
+ "automation",
59
+ "audit",
60
+ "compliance",
61
+ "data-governance",
62
+ "data-quality",
63
+ "plugin",
64
+ "open-source"
58
65
  ],
59
- "homepage": "https://github.com/liuhange789/data-asset-inspector#readme"
66
+ "homepage": "https://github.com/liuhange789/data-asset-inspector#readme",
67
+ "scripts": {
68
+ "typecheck": "tsc --noEmit",
69
+ "test": "vitest run",
70
+ "build": "tsc"
71
+ }
60
72
  }