@changw98ic/core 1.0.1 → 1.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.
Files changed (2) hide show
  1. package/README.md +14 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,20 +13,25 @@ npm install @changw98ic/core
13
13
  ### 根入口
14
14
 
15
15
  ```typescript
16
+ import { ProjectStateSchema, validateProjectState } from '@changw98ic/core';
16
17
  import {
17
- Skill,
18
- SkillContext,
19
- SkillResult,
20
- ProjectState,
21
- Entity,
22
- EntityType,
18
+ type Skill,
19
+ type ProjectState,
20
+ type Entity,
21
+ type EntityType,
23
22
  } from '@changw98ic/core';
24
23
  ```
25
24
 
26
25
  ### 子路径导入
27
26
 
28
27
  ```typescript
29
- import { ProjectState, Entity, EntityType } from '@changw98ic/core/types';
28
+ import { ProjectStateSchema } from '@changw98ic/core/types';
29
+ import type {
30
+ Skill,
31
+ ProjectState,
32
+ Entity,
33
+ EntityType,
34
+ } from '@changw98ic/core/types';
30
35
  ```
31
36
 
32
37
  ## 说明
@@ -34,6 +39,8 @@ import { ProjectState, Entity, EntityType } from '@changw98ic/core/types';
34
39
  - 根入口当前主要重导出 `types` 模块。
35
40
  - 已发布的导出路径见 `packages/core/package.json`:`.`、`./types`。
36
41
  - 上层 CLI、数据层和适配器包都依赖这里的类型定义。
42
+ - `ProjectState`、`Entity`、`EntityType`、`Skill` 是 TypeScript 类型;在 TS 中请用 `import type`。
43
+ - 纯运行时可直接导入的是 `ProjectStateSchema`、`EntitySchema`、`SkillSchema`、`validateProjectState()` 这类 JS 导出。
37
44
 
38
45
  ## 文档
39
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@changw98ic/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "核心类型和 Skill 定义 - 通用网文创作框架",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",