@vegamo/loom 0.1.1
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 +15 -0
- package/README.md +465 -0
- package/dist/agents/core/agent.d.ts +65 -0
- package/dist/agents/core/agent.d.ts.map +1 -0
- package/dist/agents/core/agent.js +277 -0
- package/dist/agents/core/agent.js.map +1 -0
- package/dist/agents/core/prompt.d.ts +11 -0
- package/dist/agents/core/prompt.d.ts.map +1 -0
- package/dist/agents/core/prompt.js +117 -0
- package/dist/agents/core/prompt.js.map +1 -0
- package/dist/agents/core/types.d.ts +49 -0
- package/dist/agents/core/types.d.ts.map +1 -0
- package/dist/agents/core/types.js +5 -0
- package/dist/agents/core/types.js.map +1 -0
- package/dist/agents/memory/memory.d.ts +62 -0
- package/dist/agents/memory/memory.d.ts.map +1 -0
- package/dist/agents/memory/memory.js +113 -0
- package/dist/agents/memory/memory.js.map +1 -0
- package/dist/agents/memory/types.d.ts +15 -0
- package/dist/agents/memory/types.d.ts.map +1 -0
- package/dist/agents/memory/types.js +5 -0
- package/dist/agents/memory/types.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/client.d.ts +49 -0
- package/dist/llm/client.d.ts.map +1 -0
- package/dist/llm/client.js +256 -0
- package/dist/llm/client.js.map +1 -0
- package/dist/llm/config.d.ts +13 -0
- package/dist/llm/config.d.ts.map +1 -0
- package/dist/llm/config.js +50 -0
- package/dist/llm/config.js.map +1 -0
- package/dist/llm/types.d.ts +74 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +17 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/mocks/generator.d.ts +10 -0
- package/dist/mocks/generator.d.ts.map +1 -0
- package/dist/mocks/generator.js +19 -0
- package/dist/mocks/generator.js.map +1 -0
- package/dist/mocks/router.d.ts +13 -0
- package/dist/mocks/router.d.ts.map +1 -0
- package/dist/mocks/router.js +44 -0
- package/dist/mocks/router.js.map +1 -0
- package/dist/mocks/server.d.ts +21 -0
- package/dist/mocks/server.d.ts.map +1 -0
- package/dist/mocks/server.js +36 -0
- package/dist/mocks/server.js.map +1 -0
- package/dist/serve.d.ts +17 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/serve.js +56 -0
- package/dist/serve.js.map +1 -0
- package/dist/shared/config-wizard.d.ts +7 -0
- package/dist/shared/config-wizard.d.ts.map +1 -0
- package/dist/shared/config-wizard.js +84 -0
- package/dist/shared/config-wizard.js.map +1 -0
- package/dist/shared/config.d.ts +32 -0
- package/dist/shared/config.d.ts.map +1 -0
- package/dist/shared/config.js +77 -0
- package/dist/shared/config.js.map +1 -0
- package/dist/shared/entity-utils.d.ts +30 -0
- package/dist/shared/entity-utils.d.ts.map +1 -0
- package/dist/shared/entity-utils.js +207 -0
- package/dist/shared/entity-utils.js.map +1 -0
- package/dist/shared/logger.d.ts +13 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/logger.js +45 -0
- package/dist/shared/logger.js.map +1 -0
- package/dist/shared/manifest-utils.d.ts +9 -0
- package/dist/shared/manifest-utils.d.ts.map +1 -0
- package/dist/shared/manifest-utils.js +110 -0
- package/dist/shared/manifest-utils.js.map +1 -0
- package/dist/shared/schema-entity-resolver.d.ts +15 -0
- package/dist/shared/schema-entity-resolver.d.ts.map +1 -0
- package/dist/shared/schema-entity-resolver.js +134 -0
- package/dist/shared/schema-entity-resolver.js.map +1 -0
- package/dist/shared/schema-utils.d.ts +21 -0
- package/dist/shared/schema-utils.d.ts.map +1 -0
- package/dist/shared/schema-utils.js +56 -0
- package/dist/shared/schema-utils.js.map +1 -0
- package/dist/shared/types.d.ts +130 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +5 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/tools/entity-file-ops.d.ts +10 -0
- package/dist/tools/entity-file-ops.d.ts.map +1 -0
- package/dist/tools/entity-file-ops.js +183 -0
- package/dist/tools/entity-file-ops.js.map +1 -0
- package/dist/tools/entity-workflow.d.ts +10 -0
- package/dist/tools/entity-workflow.d.ts.map +1 -0
- package/dist/tools/entity-workflow.js +447 -0
- package/dist/tools/entity-workflow.js.map +1 -0
- package/dist/tools/file-ops.d.ts +9 -0
- package/dist/tools/file-ops.d.ts.map +1 -0
- package/dist/tools/file-ops.js +83 -0
- package/dist/tools/file-ops.js.map +1 -0
- package/dist/tools/registry.d.ts +31 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +58 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/schema-gen.d.ts +8 -0
- package/dist/tools/schema-gen.d.ts.map +1 -0
- package/dist/tools/schema-gen.js +82 -0
- package/dist/tools/schema-gen.js.map +1 -0
- package/dist/tools/schema-validate.d.ts +8 -0
- package/dist/tools/schema-validate.d.ts.map +1 -0
- package/dist/tools/schema-validate.js +79 -0
- package/dist/tools/schema-validate.js.map +1 -0
- package/dist/tools/types.d.ts +29 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tui/app.d.ts +13 -0
- package/dist/tui/app.d.ts.map +1 -0
- package/dist/tui/app.js +357 -0
- package/dist/tui/app.js.map +1 -0
- package/dist/tui/components/Chat.d.ts +14 -0
- package/dist/tui/components/Chat.d.ts.map +1 -0
- package/dist/tui/components/Chat.js +24 -0
- package/dist/tui/components/Chat.js.map +1 -0
- package/dist/tui/components/Header.d.ts +14 -0
- package/dist/tui/components/Header.d.ts.map +1 -0
- package/dist/tui/components/Header.js +6 -0
- package/dist/tui/components/Header.js.map +1 -0
- package/dist/tui/components/Input.d.ts +15 -0
- package/dist/tui/components/Input.d.ts.map +1 -0
- package/dist/tui/components/Input.js +74 -0
- package/dist/tui/components/Input.js.map +1 -0
- package/dist/tui/components/SchemaPreview.d.ts +13 -0
- package/dist/tui/components/SchemaPreview.d.ts.map +1 -0
- package/dist/tui/components/SchemaPreview.js +9 -0
- package/dist/tui/components/SchemaPreview.js.map +1 -0
- package/dist/tui/components/StatusBar.d.ts +15 -0
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +7 -0
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/hooks/useAgent.d.ts +41 -0
- package/dist/tui/hooks/useAgent.d.ts.map +1 -0
- package/dist/tui/hooks/useAgent.js +180 -0
- package/dist/tui/hooks/useAgent.js.map +1 -0
- package/dist/view/frontend/components/App.d.ts +4 -0
- package/dist/view/frontend/components/App.d.ts.map +1 -0
- package/dist/view/frontend/components/App.js +35 -0
- package/dist/view/frontend/components/App.js.map +1 -0
- package/dist/view/frontend/components/EndpointDetailPage.d.ts +4 -0
- package/dist/view/frontend/components/EndpointDetailPage.d.ts.map +1 -0
- package/dist/view/frontend/components/EndpointDetailPage.js +103 -0
- package/dist/view/frontend/components/EndpointDetailPage.js.map +1 -0
- package/dist/view/frontend/components/HomePage.d.ts +4 -0
- package/dist/view/frontend/components/HomePage.d.ts.map +1 -0
- package/dist/view/frontend/components/HomePage.js +6 -0
- package/dist/view/frontend/components/HomePage.js.map +1 -0
- package/dist/view/frontend/components/ModuleDetailPage.d.ts +4 -0
- package/dist/view/frontend/components/ModuleDetailPage.d.ts.map +1 -0
- package/dist/view/frontend/components/ModuleDetailPage.js +64 -0
- package/dist/view/frontend/components/ModuleDetailPage.js.map +1 -0
- package/dist/view/frontend/components/ModulesPage.d.ts +4 -0
- package/dist/view/frontend/components/ModulesPage.d.ts.map +1 -0
- package/dist/view/frontend/components/ModulesPage.js +40 -0
- package/dist/view/frontend/components/ModulesPage.js.map +1 -0
- package/dist/view/frontend/index.d.ts +2 -0
- package/dist/view/frontend/index.d.ts.map +1 -0
- package/dist/view/frontend/index.js +15 -0
- package/dist/view/frontend/index.js.map +1 -0
- package/dist/view/frontend/types.d.ts +35 -0
- package/dist/view/frontend/types.d.ts.map +1 -0
- package/dist/view/frontend/types.js +2 -0
- package/dist/view/frontend/types.js.map +1 -0
- package/dist/view/frontend/utils/api.d.ts +5 -0
- package/dist/view/frontend/utils/api.d.ts.map +1 -0
- package/dist/view/frontend/utils/api.js +28 -0
- package/dist/view/frontend/utils/api.js.map +1 -0
- package/dist/view/public/bundle.js +104633 -0
- package/dist/view/public/bundle.js.map +7 -0
- package/dist/view/public/index.html +50 -0
- package/dist/view/routes/docs.d.ts +13 -0
- package/dist/view/routes/docs.d.ts.map +1 -0
- package/dist/view/routes/docs.js +53 -0
- package/dist/view/routes/docs.js.map +1 -0
- package/dist/view/routes/entities.d.ts +11 -0
- package/dist/view/routes/entities.d.ts.map +1 -0
- package/dist/view/routes/entities.js +39 -0
- package/dist/view/routes/entities.js.map +1 -0
- package/dist/view/routes/schema.d.ts +11 -0
- package/dist/view/routes/schema.d.ts.map +1 -0
- package/dist/view/routes/schema.js +43 -0
- package/dist/view/routes/schema.js.map +1 -0
- package/dist/view/server.d.ts +20 -0
- package/dist/view/server.d.ts.map +1 -0
- package/dist/view/server.js +54 -0
- package/dist/view/server.js.map +1 -0
- package/docgen.config.json +19 -0
- package/docgen.config.json.example +19 -0
- package/package.json +79 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Schema 解析/操作工具函数
|
|
3
|
+
*/
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
/**
|
|
7
|
+
* 读取并解析一个 schema 文件
|
|
8
|
+
*/
|
|
9
|
+
export function readSchemaFile(filepath) {
|
|
10
|
+
const raw = fs.readFileSync(filepath, 'utf-8');
|
|
11
|
+
return JSON.parse(raw);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 扫描目录下所有 .schema.json 文件,返回元信息列表
|
|
15
|
+
*/
|
|
16
|
+
export function listSchemaFiles(docsDir) {
|
|
17
|
+
if (!fs.existsSync(docsDir)) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
const files = fs.readdirSync(docsDir).filter((f) => f.endsWith('.schema.json'));
|
|
21
|
+
return files.map((filename) => {
|
|
22
|
+
const filepath = path.join(docsDir, filename);
|
|
23
|
+
const stat = fs.statSync(filepath);
|
|
24
|
+
const doc = readSchemaFile(filepath);
|
|
25
|
+
return {
|
|
26
|
+
filename,
|
|
27
|
+
filepath,
|
|
28
|
+
title: doc.title || filename,
|
|
29
|
+
description: doc.description || '',
|
|
30
|
+
endpointCount: doc.endpoints?.length || 0,
|
|
31
|
+
updatedAt: stat.mtime,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 将 SchemaDocument 写入文件
|
|
37
|
+
*/
|
|
38
|
+
export function writeSchemaFile(filepath, doc) {
|
|
39
|
+
const dir = path.dirname(filepath);
|
|
40
|
+
if (!fs.existsSync(dir)) {
|
|
41
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
42
|
+
}
|
|
43
|
+
fs.writeFileSync(filepath, JSON.stringify(doc, null, 2), 'utf-8');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 校验一个对象是否符合 SchemaDocument 的基本结构
|
|
47
|
+
*/
|
|
48
|
+
export function isValidSchemaDocument(obj) {
|
|
49
|
+
if (typeof obj !== 'object' || obj === null)
|
|
50
|
+
return false;
|
|
51
|
+
const doc = obj;
|
|
52
|
+
return (typeof doc.title === 'string' &&
|
|
53
|
+
typeof doc.description === 'string' &&
|
|
54
|
+
Array.isArray(doc.endpoints));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=schema-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-utils.js","sourceRoot":"","sources":["../../src/shared/schema-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B;;G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E,CAAC;QACxB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAChD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC1D,MAAM,GAAG,GAAG,GAA8B,CAAC;IAC3C,OAAO,CACL,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;QAC7B,OAAO,GAAG,CAAC,WAAW,KAAK,QAAQ;QACnC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loom 共享类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** LLM 提供商配置 */
|
|
5
|
+
export interface LLMConfig {
|
|
6
|
+
provider: 'deepseek' | string;
|
|
7
|
+
model: string;
|
|
8
|
+
baseURL: string;
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
temperature?: number;
|
|
11
|
+
maxTokens?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Web Viewer 服务配置 */
|
|
14
|
+
export interface ServeConfig {
|
|
15
|
+
port: number;
|
|
16
|
+
host?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Mock 服务配置 */
|
|
19
|
+
export interface MockConfig {
|
|
20
|
+
port: number;
|
|
21
|
+
host?: string;
|
|
22
|
+
}
|
|
23
|
+
/** loom.config.json 完整配置 */
|
|
24
|
+
export interface LoomConfig {
|
|
25
|
+
/** schema 文件输出目录 (相对于目标项目根目录) */
|
|
26
|
+
outDir: string;
|
|
27
|
+
/** LLM 配置 */
|
|
28
|
+
llm: LLMConfig;
|
|
29
|
+
/** Web Viewer 配置 */
|
|
30
|
+
serve: ServeConfig;
|
|
31
|
+
/** Mock Server 配置 */
|
|
32
|
+
mock: MockConfig;
|
|
33
|
+
}
|
|
34
|
+
/** 实体定义文档 (用于接口复用) */
|
|
35
|
+
export interface EntityDocument {
|
|
36
|
+
$schema?: string;
|
|
37
|
+
/** 实体名称 */
|
|
38
|
+
title: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
type: 'object';
|
|
41
|
+
properties: Record<string, unknown>;
|
|
42
|
+
required?: string[];
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
}
|
|
45
|
+
/** 实体文件元信息 */
|
|
46
|
+
export interface EntityFileMeta {
|
|
47
|
+
filename: string;
|
|
48
|
+
filepath: string;
|
|
49
|
+
title: string;
|
|
50
|
+
description: string;
|
|
51
|
+
fieldCount: number;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
/** x-entity-ref 的结构化定义 */
|
|
55
|
+
export interface EntityRefConfig {
|
|
56
|
+
entity: string;
|
|
57
|
+
pick?: string[];
|
|
58
|
+
omit?: string[];
|
|
59
|
+
required?: string[];
|
|
60
|
+
}
|
|
61
|
+
/** Manifest 中记录的 endpoint 索引 */
|
|
62
|
+
export interface EndpointIndexItem {
|
|
63
|
+
filename: string;
|
|
64
|
+
method: EndpointDefinition['method'];
|
|
65
|
+
path: string;
|
|
66
|
+
summary: string;
|
|
67
|
+
}
|
|
68
|
+
/** Manifest 中记录的实体引用 */
|
|
69
|
+
export interface EntityReferenceItem {
|
|
70
|
+
entity: string;
|
|
71
|
+
filename: string;
|
|
72
|
+
method: EndpointDefinition['method'];
|
|
73
|
+
path: string;
|
|
74
|
+
scope: 'request.body' | 'request.query' | 'request.params' | 'request.headers' | `response.${string}`;
|
|
75
|
+
jsonPointer: string;
|
|
76
|
+
fields?: string[];
|
|
77
|
+
}
|
|
78
|
+
/** docs 目录的内部索引文件 */
|
|
79
|
+
export interface LoomManifest {
|
|
80
|
+
version: 1;
|
|
81
|
+
generatedAt: string;
|
|
82
|
+
endpointIndex: EndpointIndexItem[];
|
|
83
|
+
entities: Array<{
|
|
84
|
+
name: string;
|
|
85
|
+
filename: string;
|
|
86
|
+
fieldCount: number;
|
|
87
|
+
}>;
|
|
88
|
+
references: EntityReferenceItem[];
|
|
89
|
+
}
|
|
90
|
+
/** 单个 API Endpoint 定义 */
|
|
91
|
+
export interface EndpointDefinition {
|
|
92
|
+
path: string;
|
|
93
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
94
|
+
summary: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
tags?: string[];
|
|
97
|
+
request?: {
|
|
98
|
+
headers?: Record<string, unknown>;
|
|
99
|
+
params?: Record<string, unknown>;
|
|
100
|
+
query?: Record<string, unknown>;
|
|
101
|
+
body?: Record<string, unknown>;
|
|
102
|
+
};
|
|
103
|
+
response: {
|
|
104
|
+
[statusCode: string]: Record<string, unknown>;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** Schema 文档结构 (单个 .schema.json 文件) */
|
|
108
|
+
export interface SchemaDocument {
|
|
109
|
+
$schema: string;
|
|
110
|
+
title: string;
|
|
111
|
+
description: string;
|
|
112
|
+
version?: string;
|
|
113
|
+
endpoints: EndpointDefinition[];
|
|
114
|
+
}
|
|
115
|
+
/** Schema 文件元信息 (用于列表展示) */
|
|
116
|
+
export interface SchemaFileMeta {
|
|
117
|
+
/** 文件名 (不含路径) */
|
|
118
|
+
filename: string;
|
|
119
|
+
/** 完整文件路径 */
|
|
120
|
+
filepath: string;
|
|
121
|
+
/** 文档标题 */
|
|
122
|
+
title: string;
|
|
123
|
+
/** 文档描述 */
|
|
124
|
+
description: string;
|
|
125
|
+
/** endpoint 数量 */
|
|
126
|
+
endpointCount: number;
|
|
127
|
+
/** 最后修改时间 */
|
|
128
|
+
updatedAt: Date;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,gBAAgB;AAChB,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,sBAAsB;AACtB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,4BAA4B;AAC5B,MAAM,WAAW,UAAU;IACzB,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa;IACb,GAAG,EAAE,SAAS,CAAC;IACf,oBAAoB;IACpB,KAAK,EAAE,WAAW,CAAC;IACnB,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,sBAAsB;AACtB,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,cAAc;AACd,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MA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Root":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: entity-file-ops
|
|
3
|
+
*
|
|
4
|
+
* 管理实体定义文件 (entities/*.entity.schema.json)
|
|
5
|
+
*/
|
|
6
|
+
import type { Tool } from './types.js';
|
|
7
|
+
export declare const listEntitiesTool: Tool;
|
|
8
|
+
export declare const readEntityTool: Tool;
|
|
9
|
+
export declare const writeEntityTool: Tool;
|
|
10
|
+
//# sourceMappingURL=entity-file-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-file-ops.d.ts","sourceRoot":"","sources":["../../src/tools/entity-file-ops.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,IAAI,EAA2B,MAAM,YAAY,CAAC;AAyBhE,eAAO,MAAM,gBAAgB,EAAE,IAuB9B,CAAC;AAsBF,eAAO,MAAM,cAAc,EAAE,IAsC5B,CAAC;AAuCF,eAAO,MAAM,eAAe,EAAE,IAqE7B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: entity-file-ops
|
|
3
|
+
*
|
|
4
|
+
* 管理实体定义文件 (entities/*.entity.schema.json)
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { ENTITY_FILENAME_SUFFIX, getEntitiesDir, isValidEntityDocument, listEntityFiles, readEntityFile, resolveEntityFilename, toEntityFilename, writeEntityFile, } from '../shared/entity-utils.js';
|
|
9
|
+
const LIST_DEFINITION = {
|
|
10
|
+
type: 'function',
|
|
11
|
+
function: {
|
|
12
|
+
name: 'list_entities',
|
|
13
|
+
description: 'List all entity definition files in docs/entities directory.',
|
|
14
|
+
parameters: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const listEntitiesTool = {
|
|
21
|
+
name: 'list_entities',
|
|
22
|
+
description: 'List all entity definition files',
|
|
23
|
+
definition: LIST_DEFINITION,
|
|
24
|
+
async execute(_args, context) {
|
|
25
|
+
const entities = listEntityFiles(context.outDir);
|
|
26
|
+
return {
|
|
27
|
+
success: true,
|
|
28
|
+
data: {
|
|
29
|
+
count: entities.length,
|
|
30
|
+
entities: entities.map((entity) => ({
|
|
31
|
+
filename: entity.filename,
|
|
32
|
+
title: entity.title,
|
|
33
|
+
description: entity.description,
|
|
34
|
+
fieldCount: entity.fieldCount,
|
|
35
|
+
})),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const READ_DEFINITION = {
|
|
41
|
+
type: 'function',
|
|
42
|
+
function: {
|
|
43
|
+
name: 'read_entity',
|
|
44
|
+
description: 'Read one entity definition from docs/entities. ' +
|
|
45
|
+
'Input can be entity title, base name, or full filename.',
|
|
46
|
+
parameters: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
name: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Entity name or filename (e.g. "User" or "user.entity.schema.json")',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: ['name'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
export const readEntityTool = {
|
|
59
|
+
name: 'read_entity',
|
|
60
|
+
description: 'Read one entity definition file',
|
|
61
|
+
definition: READ_DEFINITION,
|
|
62
|
+
async execute(args, context) {
|
|
63
|
+
const name = args.name;
|
|
64
|
+
if (!name || !name.trim()) {
|
|
65
|
+
return { success: false, error: 'name is required' };
|
|
66
|
+
}
|
|
67
|
+
const filename = resolveEntityFilename(context.outDir, name.trim());
|
|
68
|
+
if (!filename) {
|
|
69
|
+
return {
|
|
70
|
+
success: false,
|
|
71
|
+
error: `Entity not found: ${name}`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const entity = readEntityFile(context.outDir, filename);
|
|
76
|
+
return {
|
|
77
|
+
success: true,
|
|
78
|
+
data: {
|
|
79
|
+
filename,
|
|
80
|
+
entity,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
return {
|
|
86
|
+
success: false,
|
|
87
|
+
error: `Failed to read entity: ${err instanceof Error ? err.message : String(err)}`,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const WRITE_DEFINITION = {
|
|
93
|
+
type: 'function',
|
|
94
|
+
function: {
|
|
95
|
+
name: 'write_entity',
|
|
96
|
+
description: 'Write an entity definition to docs/entities. ' +
|
|
97
|
+
'Use mustExist=true for update-only mode.',
|
|
98
|
+
parameters: {
|
|
99
|
+
type: 'object',
|
|
100
|
+
properties: {
|
|
101
|
+
name: {
|
|
102
|
+
type: 'string',
|
|
103
|
+
description: 'Entity name for filename generation. ' +
|
|
104
|
+
'Example: "User" -> "user.entity.schema.json".',
|
|
105
|
+
},
|
|
106
|
+
filename: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Optional explicit filename ending with .entity.schema.json. ' +
|
|
109
|
+
'If omitted, generated from name.',
|
|
110
|
+
},
|
|
111
|
+
entity: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
description: 'Complete entity schema document. Must be object schema with title and properties.',
|
|
114
|
+
},
|
|
115
|
+
mustExist: {
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
description: 'If true, only update existing file and block new file creation.',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
required: ['name', 'entity'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
export const writeEntityTool = {
|
|
125
|
+
name: 'write_entity',
|
|
126
|
+
description: 'Write an entity definition file',
|
|
127
|
+
definition: WRITE_DEFINITION,
|
|
128
|
+
async execute(args, context) {
|
|
129
|
+
const name = args.name;
|
|
130
|
+
const entity = args.entity;
|
|
131
|
+
const mustExist = args.mustExist === true;
|
|
132
|
+
if (!name || !name.trim()) {
|
|
133
|
+
return { success: false, error: 'name is required' };
|
|
134
|
+
}
|
|
135
|
+
const requestedFilename = typeof args.filename === 'string' ? args.filename.trim() : '';
|
|
136
|
+
let filename = requestedFilename || toEntityFilename(name);
|
|
137
|
+
if (!filename.endsWith(ENTITY_FILENAME_SUFFIX)) {
|
|
138
|
+
return {
|
|
139
|
+
success: false,
|
|
140
|
+
error: `filename must end with ${ENTITY_FILENAME_SUFFIX}`,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
if (!isValidEntityDocument(entity)) {
|
|
144
|
+
return {
|
|
145
|
+
success: false,
|
|
146
|
+
error: 'Invalid entity document. It must contain title, type="object", and object properties.',
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const filepath = path.join(getEntitiesDir(context.outDir), filename);
|
|
150
|
+
if (mustExist && !fs.existsSync(filepath)) {
|
|
151
|
+
return {
|
|
152
|
+
success: false,
|
|
153
|
+
error: `Entity file does not exist: ${filename}. ` +
|
|
154
|
+
'Update-only mode is enabled (mustExist=true).',
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
const finalEntity = {
|
|
158
|
+
...entity,
|
|
159
|
+
$schema: entity.$schema || 'http://json-schema.org/draft-07/schema#',
|
|
160
|
+
title: entity.title || name.trim(),
|
|
161
|
+
type: 'object',
|
|
162
|
+
};
|
|
163
|
+
try {
|
|
164
|
+
writeEntityFile(context.outDir, filename, finalEntity);
|
|
165
|
+
return {
|
|
166
|
+
success: true,
|
|
167
|
+
data: {
|
|
168
|
+
filename,
|
|
169
|
+
filepath,
|
|
170
|
+
fieldCount: Object.keys(finalEntity.properties).length,
|
|
171
|
+
message: `Entity "${finalEntity.title}" written to ${filepath}`,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
return {
|
|
177
|
+
success: false,
|
|
178
|
+
error: `Failed to write entity: ${err instanceof Error ? err.message : String(err)}`,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=entity-file-ops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-file-ops.js","sourceRoot":"","sources":["../../src/tools/entity-file-ops.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,eAAe,GAAsB;IACzC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,8DAA8D;QAC3E,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,kCAAkC;IAC/C,UAAU,EAAE,eAAe;IAE3B,KAAK,CAAC,OAAO,CACX,KAA8B,EAC9B,OAAoB;QAEpB,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE;gBACJ,KAAK,EAAE,QAAQ,CAAC,MAAM;gBACtB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,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MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,QAAQ;oBACR,QAAQ;oBACR,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM;oBACtD,OAAO,EAAE,WAAW,WAAW,CAAC,KAAK,gBAAgB,QAAQ,EAAE;iBAChE;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,2BAA2B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;aACrF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: entity-workflow
|
|
3
|
+
*
|
|
4
|
+
* 实体影响分析 / 联动同步 / 校验
|
|
5
|
+
*/
|
|
6
|
+
import type { Tool } from './types.js';
|
|
7
|
+
export declare const entityImpactTool: Tool;
|
|
8
|
+
export declare const entitySyncTool: Tool;
|
|
9
|
+
export declare const entityValidateTool: Tool;
|
|
10
|
+
//# sourceMappingURL=entity-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-workflow.d.ts","sourceRoot":"","sources":["../../src/tools/entity-workflow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,IAAI,EAA2B,MAAM,YAAY,CAAC;AAkMhE,eAAO,MAAM,gBAAgB,EAAE,IA+D9B,CAAC;AAgCF,eAAO,MAAM,cAAc,EAAE,IA2H5B,CAAC;AA4BF,eAAO,MAAM,kBAAkB,EAAE,IA6GhC,CAAC"}
|